@polycode-projects/the-mechanical-code-talker 3.0.2 → 3.0.3

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.
@@ -1,186 +1,186 @@
1
- (()=>{var zg=Object.defineProperty;var L=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(s){throw n=[s],s}};var Sn=(e,t)=>{for(var n in t)zg(e,n,{get:t[n],enumerable:!0})};var et,lj,uj,dj,pj,fj,mj,hj,gj,bj,wj,yj,vj,$j,xj,kj,Ej,Z,$e,Bt,Gl,Sj,jj,_j,De=L(()=>{et=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},lj=et("createRequire"),uj=et("readFileSync"),dj=et("access"),pj=et("readFile"),fj=et("writeFile"),mj=et("appendFile"),hj=et("mkdir"),gj=et("mkdtemp"),bj=et("rename"),wj=et("unlink"),yj=et("rm"),vj=et("stat"),$j=et("copyFile"),xj=et("readdir"),kj=et("createReadStream"),Ej=et("createWriteStream"),Z=(...e)=>e.join("/"),$e=e=>String(e).replace(/\/[^/]*$/,""),Bt=(...e)=>e.join("/"),Gl="/",Sj=et("randomBytes"),jj=et("spawnSync"),_j=et("createInterface")});var tt,Aj,Tj,Vl,ze,Ao,Ug,jn,Bg,Er,Fi,Wg,qg,Cj,Gg,Ij,Oj,Lj,Nj,Mj,yt=L(()=>{tt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},Aj=tt("createRequire"),Tj=tt("readFileSync"),Vl=tt("access"),ze=tt("readFile"),Ao=tt("writeFile"),Ug=tt("appendFile"),jn=tt("mkdir"),Bg=tt("mkdtemp"),Er=tt("rename"),Fi=tt("unlink"),Wg=tt("rm"),qg=tt("stat"),Cj=tt("copyFile"),Gg=tt("readdir"),Ij=tt("createReadStream"),Oj=tt("createWriteStream"),Lj=tt("randomBytes"),Nj=tt("spawnSync"),Mj=tt("createInterface")});function hs(e){return e.replace(Vg,"").trim()}function Kt(e){let t=e;for(let n=0;n<2;n+=1){let s=t.replace(Kg,"").trim();if(s=s.replace(Xg,"").trim(),s===t)break;t=s}return t}var Hl,To,Co,Ht,Kl,rn,Di,Vg,Hg,Kg,Yg,Xg,pe,Io,Jg,Yl,Ue,Wt,qn,Xl,zi,Ui,Bi,Jl,Oo,gs,Ql,Zl,bs,_n,Rn,Gs,Ge,eu,ws,ys,Gn,pn,tu,Lo,Vs,Sr,Hs,nu,An=L(()=>{Hl=["is a superclass of","are a superclass of","is a parent class of","are a parent class of","superclass","superclasses"],To={imports:{bare:"import",comment:"Module -> Module: subject's import graph references object (usesComplexType).",verbs:["couples to","couple to","depends on","imports","import","relies on","rely on","requires","require","references","reference","pulls in","pull in","built on","builds on","build on","uses code from","grabs","grab","pulls from","pull from","leans on","lean on","is wired to","are wired to","is hooked up to","are hooked up to","importing"]},uses:{bare:"use",comment:"query-side union: imports (Module->Module) + calls (Module->Module) + callsSymbol (fn->fn).",verbs:["uses","use","makes use of","make use of","talks to","talk to","using"]},calls:{bare:"call",comment:"Function/Method -> Function/Class (symbol-grain) or Module -> Module (coarse): subject invokes object.",verbs:["invokes","invoke","calls","call","runs","run","executes","execute","hits","hit","triggers","trigger","fires","fire","kicks off","kick off","calling"]},defines:{bare:"define",comment:"Module -> top-level Function/Class/Method/Attribute: subject declares object.",verbs:["defines","define","declares","declare","has","have","holds","hold","defining"]},contains:{bare:"contain",comment:"Class -> Method/Attribute: subject's membership includes object.",verbs:["contains","contain","lives in","live in","is defined in","are defined in","is part of","are part of","sits in","sit in","sits inside","sit inside","containing"]},tests:{bare:"test",comment:"Module -> Module: subject is a test module importing/covering object.",verbs:["tests","test","covers","cover","verifies","verify","exercises","exercise","checks","check","makes sure of","make sure of","testing"]},inherits:{bare:"inherit from",comment:"Class -> Class: subject's declared base resolves to object (subclassOf).",verbs:["inherits from","inherit from","inherits","inherit","extends","extend","subclasses","subclass","derives from","derive from","is a subclass of","are a subclass of","is a kind of","are a kind of","is built off","are built off","is built on top of","are built on top of","extending","inheriting from","inheriting","subclassing","extends from",...Hl]},touches:{bare:"touch",comment:"Commit -> Module (coarse) or Commit -> symbol (fine, touchesSymbol): a commit's changed-line-range intersects object.",verbs:["touched","touches","changed","change","modified","modifies","was changed in","were changed in","was edited in","were edited in","was modified by","were modified by","was tweaked in","were tweaked in","got changed in","got edited in","touch","changed in","landed in","land in","was in","were in","went into","included in","updated","edited","touching"]},cochange:{bare:"co-change with",comment:"Module -> Module: subject and object are frequently committed together (changeCoupledWith).",verbs:["changed with","co-changes with","co-change with","changes alongside","change alongside","shares commits with","share commits with","tends to change together with","tend to change together with","moves together with","move together with","changed together with","change together with","changes together with","changes with","change with","tends to change with","tend to change with","usually changes with"]},reexports:{bare:"re-export",comment:"Module -> exported symbol: subject's public API surface (__all__/export list).",verbs:["exports","export","re-exports","re-export","passes through","pass through","exposes","expose","exporting"]}},Co=Object.freeze([...Hl,"is the superclass of","are the superclass of","is the parent class of"]),Ht=Object.freeze(["defined","declared","located","implemented"]),Kl=Object.freeze(["now","currently","right now","at the moment","these days","today"]),rn=Object.freeze(["mentioned","referenced"]),Di=Object.freeze(["in this graph","in the graph","in this codebase","in the codebase","in this repo","in the repo","here"]),Vg=new RegExp(`\\s+(?:${Di.join("|")})\\s*[?.!]*$`,"i");Hg=Object.freeze(["then","though","too"]),Kg=new RegExp(`\\s+(?:${Hg.join("|")})\\s*[?.!]*$`,"i"),Yg=Object.freeze(["please explain","explain"]),Xg=new RegExp(`,\\s*(?:${Yg.join("|")})\\s*[?.!]*$`,"i");pe=Object.freeze(Object.fromEntries(Object.entries(To).flatMap(([e,{verbs:t}])=>t.map(n=>[n,e])))),Io=Object.freeze(new Set(["has","have","holds","hold"])),Jg=e=>!Co.includes(e),Yl=Object.freeze([...new Set(Object.keys(pe).filter(Jg).map(e=>e.match(/^(?:is|are)\s+an?\s+(.+)$/i)).filter(Boolean).map(e=>e[1].toLowerCase()))]),Ue=Object.freeze({function:"Function",functions:"Function",method:"Method",methods:"Method",class:"Class",classes:"Class",module:"Module",modules:"Module",mod:"Module",mods:"Module",file:"Module",files:"Module",attribute:"Attribute",attributes:"Attribute",field:"Attribute",fields:"Attribute",variable:"GlobalVariable",variables:"GlobalVariable",global:"GlobalVariable",globals:"GlobalVariable",change:"Change",changes:"Change",commit:"Commit",commits:"Commit"}),Wt=Object.freeze({explicitly:"direct",directly:"direct",transitively:"transitive",indirectly:"transitive"}),qn=Object.freeze({imported:"imports",called:"calls",used:"uses",tested:"tests",covered:"tests",verified:"tests",exercised:"tests",checked:"tests",defined:"defines",declared:"defines",inherited:"inherits",extended:"inherits",subclassed:"inherits",contained:"contains",exported:"reexports","re-exported":"reexports",exposed:"reexports",touched:"touches",changed:"touches",modified:"touches",edited:"touches",updated:"touches"}),Xl=Object.freeze({"inherited from":{kind:"inherits",role:"object"},"extended from":{kind:"inherits",role:"object"},"subclassed from":{kind:"inherits",role:"object"},"defined in":{kind:"defines",role:"agent"},"declared in":{kind:"defines",role:"agent"},"contained in":{kind:"contains",role:"agent"},"imported by":{kind:"imports",role:"agent"},"called by":{kind:"calls",role:"agent"},"used by":{kind:"uses",role:"agent"},"tested by":{kind:"tests",role:"agent"},"covered by":{kind:"tests",role:"agent"},"touched by":{kind:"touches",role:"agent"},"changed by":{kind:"touches",role:"agent"},"exported by":{kind:"reexports",role:"agent"}}),zi=Object.freeze({"ain't":"is not",aint:"is not","isn't":"is not",isnt:"is not","aren't":"are not",arent:"are not","doesn't":"does not",doesnt:"does not","don't":"do not",dont:"do not","didn't":"did not",didnt:"did not","there's":"there is",theres:"there is","what's":"what is",whats:"what is","who's":"who is",whos:"who is",gonna:"going to",wanna:"want to",gotta:"got to",yer:"your",ur:"your",gimme:"give me"}),Ui=Object.freeze({funtion:"function",funtions:"functions",fucntion:"function",fucntions:"functions",functoin:"function",functoins:"functions",calss:"class",calsses:"classes",classs:"class",clases:"classes",modul:"module",moduls:"modules",moduel:"module",moduels:"modules",moudle:"module",moudles:"modules",methdo:"method",methdos:"methods",mehtod:"method",mehtods:"methods",comit:"commit",comits:"commits",commmit:"commit",commmits:"commits",varaible:"variable",varaibles:"variables",varibale:"variable",varibales:"variables",atribute:"attribute",atributes:"attributes",improt:"import",improts:"imports",imoprt:"import",imoprts:"imports",inherts:"inherits",inheirts:"inherits",extands:"extends",extneds:"extends",depnds:"depends",touchs:"touches",tuoches:"touches",touhced:"touched",touchd:"touched",defned:"defined",chagned:"changed",chnaged:"changed",chagnes:"changes",chnages:"changes",calles:"calls",exprot:"export",exprots:"exports",tets:"tests",whcih:"which",wich:"which",whihc:"which",wehre:"where",whre:"where",waht:"what",wat:"what",dat:"that",dose:"does",doess:"does",teh:"the",manyn:"many",mnay:"many",amny:"many",mnany:"many",hwo:"how",coutn:"count",conut:"count",cuont:"count",ocunt:"count",numer:"number",nubmer:"number",numbr:"number",nmuber:"number",lst:"list",lsit:"list",ilst:"list",shwo:"show",hsow:"show",dispaly:"display",dsiplay:"display",funtcions:"functions",funciton:"function",funcitons:"functions"}),Bi=Object.freeze({folder:"module",folders:"modules",directory:"module",directories:"modules",func:"function",funcs:"functions",changeset:"commit",changesets:"commits",revision:"commit",revisions:"commits",property:"attribute",properties:"attributes"}),Jl=/\b([a-z]{3,})in'/gi,Oo=Object.freeze(["um","uh","erm","so","like","yo","hey","bru","bro","fam","mate","please","could you","can you","would you","tell me","i wonder","just wondering","quickly","real quick","kinda","sorta","btw","by the way","you","quick q"]),gs=Object.freeze(["this","it","that","here","this one","that one"]),Ql=Object.freeze([{re:/\bthere\s+is\s+not\s+(?:anything|nothing)\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\bthere\s+is\s+no\s+\S+\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\bis\s+not\s+there\s+(?:anything|nothing)\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\b(?:nobody|nothing|no one)\s+(\S.*?)(?:,?\s+does\s+it\??|,?\s+do\s+they\??)?$/i,to:e=>`what ${e[1]}`}]),Zl=Object.freeze([{re:/^what\s+(?:is|was|were|are)\s+in\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`},{re:/^what\s+(?:went|got)\s+into\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`},{re:/^what\s+made\s+it\s+into\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`}]),bs=Object.freeze(["mean","means","stand for","stands for","signify","signifies","represent","represents","refer to","refers to"]),_n=Object.freeze(["that","which","who"]),Rn=Object.freeze(["something","anything","everything","somethings","things","thing","entities","entity","nodes","node","stuff","code","symbol","symbols"]),Gs=Object.freeze({"but do not":"difference","but does not":"difference","and do not":"difference","and does not":"difference","but not":"difference","and not":"difference",except:"difference",without:"difference",and:"intersection",plus:"intersection",but:"intersection",or:"union"}),Ge=Object.freeze({public:{via:"visibility",value:"public"},private:{via:"visibility",value:"private"},protected:{via:"visibility",value:"protected"},static:{via:"attr",attr:"isStatic"},abstract:{via:"attr",attr:"isAbstract"},constant:{via:"attr",attr:"isConstant"},exported:{via:"exported"},"re-exported":{via:"exported"},tested:{via:"tested",value:!0},covered:{via:"tested",value:!0},untested:{via:"tested",value:!1},uncovered:{via:"tested",value:!1}}),eu=Object.freeze(new Set(["tests","test","anything","something","anyone","someone","any"])),ws=Object.freeze(["how many","how much","how many of","number of","total number of","quantity of","tally of","sum of","total of","amount of","count","count up","count of","tot up"]),ys=Object.freeze(["list","show","show me","show us","display","print","print out","dump","enumerate","name","give me","get me","spit out","rattle off","run down","run through","ls","what are","which are"]),Gn=Object.freeze({most:"most",greatest:"most",highest:"most",biggest:"most",largest:"most","most-connected":"most","most connected":"most",fewest:"fewest",least:"fewest",smallest:"fewest",lowest:"fewest"}),pn=Object.freeze({imports:{kind:"imports",dir:"out"},dependencies:{kind:"imports",dir:"out"},importers:{kind:"imports",dir:"in"},dependents:{kind:"imports",dir:"in"},callers:{kind:"calls",dir:"in",sibling:"callsSymbol"},callees:{kind:"calls",dir:"out",sibling:"callsSymbol"},calls:{kind:"calls",dir:"out",sibling:"callsSymbol"},methods:{kind:"contains",dir:"out",filter:"Method"},members:{kind:"contains",dir:"out"},tests:{kind:"tests",dir:"in"},test:{kind:"tests",dir:"in"},subclasses:{kind:"inherits",dir:"in"},connections:{kind:"*",dir:"both"},edges:{kind:"*",dir:"both"},connected:{kind:"*",dir:"both"},imported:{kind:"imports",dir:"in"},"depended-on":{kind:"imports",dir:"in"},depended:{kind:"imports",dir:"in"},used:{kind:"imports",dir:"in",sibling:"callsSymbol"},called:{kind:"calls",dir:"in",sibling:"callsSymbol"}}),tu=Object.freeze({tests:"Module",test:"Module"}),Lo=Object.freeze(["those","them","these"]),Vs=Object.freeze(["contains","defines"]),Sr=Object.freeze(["the","a","an","some","other","about","please","pls","plz","kindly","just","simply","maybe","perhaps","thanks","thank","ta","cheers","too","also","well","either","sorry","oops","actually","mean","meant","rather","hi","hello","hey","yo","hiya","howdy","ok","okay","matey","mate","buddy","pal","dude","man","bro","bru","fam","friend","sir","maam","folks","guys","everyone","dear","tmct","show","tell","give","list","find","me","us","lemme"]),Hs=Object.freeze({tally:"count",tallies:"count",sum:"count",total:"count",totals:"count"}),nu=Object.freeze(["help","help me","how do i ask","how do i use this","what can i ask","what can you ask","usage","commands","examples","syntax","options"])});var Yt,su,ou,Wi,ru,zj,Uj,iu=L(()=>{An();Yt=e=>({type:"object",required:["symbol"],properties:{symbol:{type:"string",description:e}}}),su=e=>({type:"object",required:["module"],properties:{module:{type:"string",description:e}}}),ou=e=>({type:"object",required:["class"],properties:{class:{type:"string",description:e}}}),Wi=Object.freeze([{name:"tmct_context",tier:"hot",summary:"A sized edit bundle for one symbol \u2014 exemplar source, sibling signatures, registration anchor and the insertion region, in one call.",agentDescription:"START HERE to add/modify code: ONE call returns a sized edit bundle (exemplar source, sibling signatures, registration, insertion region) \u2014 then write directly, don't Read.",inputSchema:{type:"object",required:["symbol"],properties:{symbol:{type:"string",description:"Module path (e.g. path/to/module) or a sibling function/class name defined in it."},depth:{type:"string",enum:["min","auto","full"],default:"auto",description:"auto (sized to the task) | min (leanest) | full (every section)."}}},example:{symbol:"django/utils/text.py"}},{name:"tmct_snippet",tier:"hot",summary:"The exact source of one function, class or Class.method \u2014 its line span only, plus a one-line in-repo call hint.",agentDescription:"EXACT source of one function/class/Class.method by name (its line span only) + a one-line in-repo call hint. Prefer over Read for a single symbol.",inputSchema:{type:"object",required:["symbol"],properties:{symbol:{type:"string",description:"function/class name, Class.method, or fn:<path>#name."}}},example:{symbol:"Truncator.chars"}},{name:"tmct_ask",tier:"hot",summary:"A structural question in plain English, answered from the graph in one call \u2014 no model, and a clean miss instead of a guess.",agentDescription:'Ask a structural question in plain English: "which functions call X", "what uses X", "where is X defined", "when did X change". One call, no model. A clean miss beats a guess.',inputSchema:{type:"object",required:["query"],properties:{query:{type:"string",description:'A free-text question, e.g. "which functions explicitly couple to logging".'}}},example:{query:"which modules import src/core/model.mjs"},chat:{exampleRepo:"examples/mini-webapp",grammar:[{form:"which <things> <relation-verb> <entity>",example:"which modules import src/core/model.mjs",answers:"the imports edge, read forwards"},{form:"what is <relation-verb-passive> <entity>",example:"what is imported by src/core/store.mjs",answers:"the same edge, read backwards \u2014 a passive is the opposite direction, not a synonym"},{form:"what <relation-verb> <entity>",example:"what uses src/lib/http.mjs",answers:"the uses union: imports plus calls"},{form:"where is <entity> <where-marker>",example:"where is saveStore defined",answers:"the definition's file and line span"},{form:"when did <entity> change",example:"when did src/core/store.mjs change",answers:"the commits that touched it, newest first"}],whereMarkers:Ht}},{name:"tmct_describe",tier:"cold",summary:"Locate one symbol and list its typed edges (both directions) with provenance.",inputSchema:Yt("A module path, symbol name, or Class.method."),example:{symbol:"django/utils/text.py"}},{name:"tmct_signature",tier:"cold",summary:"One symbol's API surface (params, returns, raises/catches, flags, decorators, doc) without the body.",inputSchema:Yt("A function, method, or Class.method name."),example:{symbol:"Truncator.chars"}},{name:"tmct_impact",tier:"cold",summary:"Transitive reverse closure over imports/calls \u2014 what breaks if a module or symbol changes, by depth, with tests.",inputSchema:su("The module (or a symbol it defines) whose dependents you want."),example:{module:"django/utils/text.py"}},{name:"tmct_search",tier:"cold",summary:"Free-text/ranked lookup over the code-map to find the right module or symbol.",inputSchema:{type:"object",required:[],properties:{query:{type:"string",description:"Free text to rank against the code-map. Required unless kind narrows the search on its own."},kind:{type:"string",description:"Restrict to an entity class, e.g. function, class, module."},decorator:{type:"string",description:"Restrict to definitions carrying this decorator."},name:{type:"string",description:"Restrict to definitions whose name matches."}}},example:{query:"template filters",kind:"function"}},{name:"tmct_members",tier:"cold",summary:"A class's methods + attributes (file:line, decorators) in one slice.",inputSchema:ou("The class whose members you want."),example:{class:"Truncator"}},{name:"tmct_subclasses",tier:"cold",summary:"A class's base classes plus the transitive set of classes that extend it.",inputSchema:ou("The class to walk the inheritance edges of."),example:{class:"Field"}},{name:"tmct_related",tier:"cold",summary:"A term's synonyms (skos:altLabel) and related concepts (skos:related), from the memory graph's relation facts.",inputSchema:{type:"object",required:["term"],properties:{term:{type:"string",description:"The term whose synonyms / related concepts you want."}}},example:{term:"sofa"}},{name:"tmct_architecture",tier:"cold",summary:"Package/module map + the most-imported hub modules (optionally scoped to a package).",inputSchema:{type:"object",required:[],properties:{package:{type:"string",description:"Scope the map to one package. Omit for the whole repository."}}},example:{package:"django/template"}},{name:"tmct_exports",tier:"cold",summary:"A module's public __all__ surface, each name resolved to the module that defines it.",inputSchema:su("The module whose public API surface you want."),example:{module:"django/db/models/__init__.py"}},{name:"tmct_tests_for",tier:"cold",summary:"The test modules covering a symbol or module, from the typed test edges.",inputSchema:Yt("The symbol or module to find covering tests for."),example:{symbol:"django/utils/text.py"}},{name:"tmct_untested",tier:"cold",summary:"Source modules with no covering test module \u2014 a coverage-gap view (no arguments).",inputSchema:{type:"object",required:[],properties:{}},example:{}},{name:"tmct_history",tier:"cold",summary:"Recent commits that touched a symbol's module (newest first).",inputSchema:Yt("The symbol whose module's history you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_file_history",tier:"cold",summary:"Commits that touched a symbol's module, each with author / date / subject.",inputSchema:Yt("The symbol whose module's history you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_method_history",tier:"cold",summary:"Commits that touched a specific method symbol (fine-grained), with author / date / subject.",inputSchema:Yt("A Class.method name."),example:{symbol:"Truncator.chars"}},{name:"tmct_class_history",tier:"cold",summary:"Commits that touched a specific class symbol (fine-grained), with author / date / subject.",inputSchema:Yt("A class name."),example:{symbol:"Truncator"}},{name:"tmct_callers",tier:"cold",summary:"Modules that call into a symbol's module (one hop).",inputSchema:Yt("The symbol whose callers you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_callees",tier:"cold",summary:"Modules a symbol's module calls into (one hop).",inputSchema:Yt("The symbol whose callees you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_calls",tier:"cold",summary:"The in-repo symbols a function calls (fn\u2192fn), each with file:line.",inputSchema:Yt("The function whose in-repo call sites you want."),example:{symbol:"slugify"}},{name:"tmct_cochanges",tier:"cold",summary:"Modules that historically change in the same commit as a symbol's module (git co-change).",inputSchema:Yt("The symbol whose module's change-coupling you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_context_more",tier:"cold",summary:"The bundle sections a lean tmct_context omitted (siblings / tests / cochange / class members / re-exports).",inputSchema:Yt("The symbol a lean tmct_context bundle was built for."),example:{symbol:"django/utils/text.py"}},{name:"tmct_export",tier:"cold",summary:"Every stored memory fact as JSONL (subject/predicate/object/provenance) \u2014 the shape `tmct extract` emits, for backup or audit.",inputSchema:{type:"object",required:[],properties:{}},example:{}},{name:"tmct_ingest",tier:"cold",summary:"Ground plain text into memory facts with the same deterministic recognizer the chat teach lane uses \u2014 the strict tier, plus an optional lower-trust fuzzy tier \u2014 and report the canonical triples.",inputSchema:{type:"object",required:["text"],properties:{text:{type:"string",description:"The plain text to ground into facts."},optimistic:{type:"boolean",description:"Also run the lower-trust fuzzy tier over sentences the strict recognizer skips."}}},example:{text:"A kettle is a container. An otter is a mammal.",optimistic:!0}}]),ru=Wi.filter(e=>e.tier==="hot"),zj=Wi.filter(e=>e.tier==="cold"),Uj=Object.freeze(Wi.map(e=>e.name))});var au,Le,Lt=L(()=>{De();au=Z(".tmct","graph.json"),Le=class extends Error{constructor(t){super(t),this.name="ToolError"}}});function Qg(e){let t=new Set;for(let n of Array.isArray(e?.individuals)?e.individuals:[])n&&n.id&&t.add(n.id);return t}function cu(e){let t=(Array.isArray(e)?e:[]).map((l,c)=>({file:l?.file,payload:l?.payload||{},name:l?.name!=null&&String(l.name).length?String(l.name):String(c)})),n=t.map(({payload:l})=>Qg(l)),s=new Map;for(let l of n)for(let c of l)s.set(c,(s.get(c)||0)+1);let o=new Set([...s.entries()].filter(([,l])=>l>1).map(([l])=>l)),r={generated_at:"",classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}},i="",a=t.length>0;for(let{payload:l,name:c}of t){a=a&&!!l.bootstrap,typeof l.generated_at=="string"&&l.generated_at>i&&(i=l.generated_at);let u=m=>o.has(m)?`${c}/${m}`:m;Array.isArray(l.classes)&&r.classes.push(...l.classes),Array.isArray(l.vocabulary)&&r.vocabulary.push(...l.vocabulary);for(let m of Array.isArray(l.individuals)?l.individuals:[]){if(!m)continue;let p={...m};p.id&&(p.id=u(p.id)),Array.isArray(p.derived_from)&&(p.derived_from=p.derived_from.map(f=>u(f))),Array.isArray(p.mentions)&&(p.mentions=p.mentions.map(f=>f&&f.id?{...f,id:u(f.id)}:f)),r.individuals.push(p)}for(let m of Array.isArray(l.objectProperties)?l.objectProperties:[]){if(!m)continue;let p={...m};Array.isArray(p.examples)&&(p.examples=p.examples.map(f=>{if(!f)return f;let g={...f};return g.subject&&(g.subject=u(g.subject)),g.object&&(g.object=u(g.object)),g})),r.objectProperties.push(p)}let d=l.proseIndex&&typeof l.proseIndex=="object"?l.proseIndex:{};for(let[m,p]of Object.entries(d)){let f=r.proseIndex[m]||(r.proseIndex[m]=[]);for(let g of Array.isArray(p)?p:[]){let h=u(g);f.includes(h)||f.push(h)}}}return r.generated_at=i,a&&(r.bootstrap=!0),r}var lu=L(()=>{});var Ys={};Sn(Ys,{clearCache:()=>Zg,emptyEntities:()=>qi,fetchEntities:()=>sb,registerProvider:()=>eb});function Zg(){Ks=null,No=null}function eb(e){if(e!=null&&typeof e!="function")throw new TypeError("registerProvider expects a function (config) => entities payload, or null");let t=jr;return jr=e??null,Ks=null,t}function qi(){return{generated_at:"",bootstrap:!0,classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}}}async function tb(e){let t;try{t=await ze(e,"utf8")}catch(n){if(n?.code==="ENOENT")return qi();throw new Le(`cannot read graph artifact at ${e} (${n?.code||n?.message||n})`)}try{return JSON.parse(t)}catch{throw new Le(`graph artifact ${e} is not valid JSON`)}}async function nb(e){let t=e.graphFiles,n=[...t].map(String).sort().join("|");if(No&&No.key===n)return No.payload;let s=[];for(let r=0;r<t.length;r++){let i=await tb(t[r]);s.push({file:t[r],payload:i,name:e.graphNames?.[r]})}let o=cu(s);return No={key:n,payload:o},o}async function sb(e){if(jr){let s;try{s=await jr(e)}catch(o){throw o instanceof Le?o:new Le(`graph provider failed (${o?.message||o})`)}if(!s||typeof s!="object")throw new Le("graph provider returned no entities payload");return s}if(Array.isArray(e.graphFiles)&&e.graphFiles.length>1)return nb(e);if(Ks&&Ks.file===e.graphFile)return Ks.payload;let t;try{t=await ze(e.graphFile,"utf8")}catch(s){if(s?.code==="ENOENT")return qi();throw new Le(`cannot read graph artifact at ${e.graphFile} (${s?.code||s?.message||s})`)}let n;try{n=JSON.parse(t)}catch{throw new Le(`graph artifact ${e.graphFile} is not valid JSON`)}return Ks={file:e.graphFile,payload:n},n}var Ks,No,jr,Mo=L(()=>{yt();Lt();lu();Ks=null,No=null,jr=null});function fn(e){if(!e)return[];let t=String(e).replace(/\.[A-Za-z0-9]+$/,"");return t=t.replace(/[/\\]/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").replace(/[_\-.]+/g," "),t.split(/\s+/).map(n=>n.toLowerCase()).filter(n=>n.length>1&&n.length<=uu)}function Gi(e){if(!e)return[];let t=[],n=new Set;for(let s of String(e).toLowerCase().split(/[^a-z0-9]+/))if(!(s.length<2||s.length>uu||ob.has(s))&&!n.has(s)&&(n.add(s),t.push(s),t.length>=rb))break;return t}function _r({name:e,doc:t}={}){return[...new Set([...fn(e),...Gi(t)])].sort()}function du(e){let t=Object.create(null);for(let n of e){let s=(n.attributes||[]).find(o=>o.key==="prose_tokens");if(s?.value)for(let o of s.value.split(" "))t[o]||(t[o]=[]),t[o].push(n.id)}for(let n of Object.keys(t))t[n].sort();return t}function vs(e,t,{limit:n=10}={}){let s=[...new Set([...fn(t),...Gi(t)])];if(!s.length)return[];let o=new Map;for(let r of s)for(let i of e?.[r]||[])o.set(i,(o.get(i)||0)+1);return[...o.entries()].sort((r,i)=>i[1]-r[1]||String(r[0]).localeCompare(i[0])).slice(0,n).map(([r,i])=>({id:r,score:i}))}function pu(e,t){let n=e&&(e["tmct:layers"]?e:e.proseIndex),s=n&&n["tmct:layers"],o=String(t||"").toLowerCase(),r={ids:[],via:null};if(!o||!s||typeof s!="object")return r;let i=new Set,a=new Set;for(let l of Object.keys(s)){let c=s[l];if(!c||typeof c!="object")continue;let u=c[o],d=Array.isArray(u)?u:Array.isArray(u?.ids)?u.ids:null;if(d?.length){for(let m of d)i.add(m);a.add(l)}}return i.size?{ids:[...i].sort(),via:[...a].sort().join("+")}:r}var ob,uu,rb,Vn=L(()=>{ob=new Set("a an and or but the of to in on at for with from by as is are was were be been being it its this that these those i you he she they we me my your our do does did not no yes if then else than so such can will would should could may might about into over under out up down off again more most some any all what which who whom whose when where why how".split(/\s+/)),uu=40,rb=120});function fu(e){let t=e.indexOf("@"),n=t>=0?e.slice(0,t):e,s=t>=0?e.slice(t+1):"",o=n.indexOf(":"),r=o>=0?n.slice(o+1):"";return{createdAt:s,...r?{sessionId:r}:{}}}function Po(e){let t=String(e||"").trim();if(!t)return null;if(t.startsWith("reference:")){let s=t.slice(10),o=s.indexOf(":");if(o<0)return{kind:"reference",pack:s||"unknown",article:""};let r=s.slice(0,o)||"unknown";return{kind:ab(r),pack:r,article:s.slice(o+1)}}if(t.startsWith("research:")){let s=t.slice(9),o=s.lastIndexOf("@");return{kind:"referenceLive",pack:"research",article:(o>=0?s.slice(0,o):s).trim()||"unknown"}}let n=t.split(/\s+/)[0];return n.startsWith("corpus-weak:")?{kind:"corpusWeak",name:n.slice(12)||"unknown"}:n.startsWith("corpus:")?{kind:"corpus",name:n.slice(7)||"unknown"}:n.startsWith("child:")?{kind:"corpus",name:n.slice(6).split(":")[0]||"unknown"}:n.startsWith("world:")?{kind:"corpus",name:n.slice(6).split(":")[0]||"unknown"}:n.startsWith("ace:")?{kind:"operator",...fu(n.slice(4))}:n.startsWith("teach:")?{kind:"teach",...fu(n.slice(6))}:n.startsWith("web:")?{kind:"web",url:n.slice(4)}:n.startsWith("url:")?{kind:"web",url:n.slice(4)}:n.startsWith("optimistic-extract:")?{kind:"optimisticExtract",name:n.slice(19)||"unknown"}:n.startsWith("extracted:")?{kind:"extracted",name:n.slice(10)||"unknown"}:n.startsWith("entailed:")?{kind:"entailed",rule:n.slice(9)}:n.startsWith("chat:")||n.startsWith("session:")||n.startsWith("operator")?{kind:"operator"}:null}function ub(e){let t=(e?.attributes||[]).find(s=>s.prop==="mgx:sourceReliability")?.value;if(t===void 0)return hu;let n=Number(t);return Number.isFinite(n)?Math.max(Vi,Math.min(bu,n)):hu}function db(e,t=Date.now(),n=cb){let s=Date.parse(e);if(!Number.isFinite(s))return 1;let o=Math.max(0,t-s);return mu+(1-mu)*Math.pow(.5,o/n)}function wu(e,t={},n={}){let s=typeof n.now=="number"?n.now:Date.now(),o=Array.isArray(e?.sourceIds)?e.sourceIds:[],r=new Set,i=[],a=[];for(let p of o){if(r.has(p))continue;r.add(p);let f=t[p],g=lb(f);if(!g)continue;i.push(g);let h=(gu[g]??0)*ub(f);a.push(Math.max(0,Math.min(1,h)))}let l=0,c=1;for(let p of a)c*=1-p;if(a.length&&(l=Math.min(1,1-c)),i.includes("entailed")&&Array.isArray(n.premiseTrusts)&&n.premiseTrusts.length){let p=typeof n.ruleConfidence=="number"?n.ruleConfidence:1;l=Math.max(0,Math.min(1,Math.min(...n.premiseTrusts)*p))}let u=db(e?.createdAt,s,n.halfLifeMs),d=Hi(Math.min(1,l*u)),m={sourceTypes:i.slice().sort(),corroboration:i.length,createdAt:e?.createdAt||"",recency:Hi(u)};return{score:d,inputs:m}}function yu({factsAsserted:e=0,factsContradicted:t=0}={}){let n=Math.max(0,Number(e)||0),s=Math.max(0,Number(t)||0),o=Math.max(-1,Math.min(1,(n-2*s)/Math.max(1,n))),r=n/(n+pb),i=(o*r+1)/2;return Hi(Vi+(bu-Vi)*i)}var Rr,Ki,Nt,$s,ib,ab,gu,cb,mu,Vi,bu,hu,Hi,lb,pb,Xs=L(()=>{Rr="mgx:trustScore",Ki="mgx:trustInputs",Nt="mgx:createdAt",$s="mgx:updatedAt";ib="wikipedia-live",ab=e=>e===ib?"referenceLive":"reference";gu=Object.freeze({operator:1,teach:.95,provider:.9,corpus:.7,reference:.6,corpusWeak:.55,referenceLive:.5,extracted:.45,web:.4,optimisticExtract:.35,entailed:.3}),cb=720*60*60*1e3,mu=.9,Vi=.5,bu=1.5,hu=1,Hi=(e,t=6)=>Number(e.toFixed(t)),lb=e=>(e?.attributes||[]).find(t=>t.prop==="mgx:sourceType")?.value||"";pb=19});var xs,Yi=L(()=>{xs=e=>/(^|\/)tests?\//.test(e)||/(^|\/)test_[^/]*\.py$/.test(e)||/\.tests(\.|$)/.test(e)});function Xi(e,t){return Math.log(1+e/(1+t))}var Fo=L(()=>{});var Tr={};Sn(Tr,{bfsLevels:()=>Ar,findActionPath:()=>Ji,findReachableSet:()=>Qi});function vu(e){return e&&typeof e=="object"?JSON.stringify(e):String(e)}function $u(e,t){let n=[];for(let{action:s,nextState:o}of t(e)||[])n.push({state:o,actions:[s],states:[e,o]});return n}function Ji(e,t,n,{maxDepth:s=50,stateKey:o=vu}={}){if(t(e))return{actions:[],states:[e]};let r=$u(e,n),i=new Set([o(e)]);for(let a=1;a<=s&&r.length;a+=1){for(let c of r)if(t(c.state))return{actions:c.actions,states:c.states};if(a===s)break;let l=[];for(let c of r){let u=o(c.state);if(!i.has(u)){i.add(u);for(let{action:d,nextState:m}of n(c.state)||[]){let p=o(m);i.has(p)||l.push({state:m,actions:[...c.actions,d],states:[...c.states,m]})}}}r=l}return null}function Qi(e,t,{maxDepth:n=50,stateKey:s=vu}={}){let o=$u(e,t),r=new Set([s(e)]),i=[];for(let a=1;a<=n&&o.length;a+=1){let l=[];for(let c of o){let u=s(c.state);if(!r.has(u)&&(r.add(u),i.push({node:c.state,path:{actions:c.actions,states:c.states}}),a!==n))for(let{action:d,nextState:m}of t(c.state)||[]){let p=s(m);r.has(p)||l.push({state:m,actions:[...c.actions,d],states:[...c.states,m]})}}o=l}return i}function*Ar(e,t,{maxDepth:n=8,keyOf:s=o=>o}={}){let o=new Set([e]),r=[e];for(let i=1;i<=n&&r.length;i+=1){let a=[],l=[];for(let c of r)for(let u of t(c)||[]){let d=s(u);o.has(d)||(o.add(d),a.push(u),l.push(d))}r=l,yield a}}var ks=L(()=>{});function Ir(e){let t=Array.isArray(e?.individuals)?e.individuals:[],n=new Map;for(let r of t)r&&r.id&&n.set(r.id,r);let s=(Array.isArray(e?.objectProperties)?e.objectProperties:[]).filter(r=>r&&(r.predicate||r.prop)).map(r=>{let i=(Array.isArray(r.examples)?r.examples:[]).filter(a=>a&&a.subject&&a.object);return{predicate:String(r.predicate||""),prop:r.prop||null,count:Number(r.count)||i.length,edges:i}}),o=s.filter(r=>r.count>r.edges.length).map(r=>({predicate:r.predicate,count:r.count,shown:r.edges.length}));return{individuals:t,byId:n,relations:s,truncated:o,generatedAt:e?.generated_at||null,proseIndex:e?.proseIndex||{}}}function oa(e){return!e||!Array.isArray(e.individuals)?0:e.individuals.filter(t=>(t.class||"")==="Module").length}function In(e){let t=String(e?.prop||"").toLowerCase();if(xu[t])return xu[t];let n=String(e?.predicate||"").toLowerCase();if(/symbol/.test(n)){if(/\b(call|invoke)/.test(n))return"callsSymbol";if(/(touch|chang|modif)/.test(n))return"touchesSymbol"}return/\bimport/.test(n)?"imports":/\b(call|invoke)/.test(n)?"calls":/\b(define|export|declare)/.test(n)?"defines":/\b(test|cover)/.test(n)?"tests":/\b(touch|chang|modif)/.test(n)?"touches":/\bcontain/.test(n)?"contains":/\b(inherit|subclass|extend|specializ)/.test(n)?"inherits":null}function Hn(e){return String(e||"").trim().toLowerCase().replace(/^\.\//,"").replace(/^\//,"")}function Zi(e){let t=Hn(e).split("/");return t[t.length-1]}function fb(e){return(e?.derived_from||[]).filter(Nu).length}function ku(e){return(e?.mentions||[]).reduce((n,s)=>n+(Number(s?.count)||0),0)+fb(e)}function qt(e,t){let n=Hn(t);if(!n)return{match:null,candidates:[]};let s=Zi(n),o=[];for(let r of e.individuals){let i=Hn(r.label),a=String(r.id||"").toLowerCase(),l=0;i===n||a===n?l=100:i.endsWith(`/${n}`)||Zi(i)===s||Zi(i).replace(/\.[a-z]+$/,"")===s?l=80:i.includes(n)&&(l=Math.max(10,50-(i.length-n.length))),l>0&&o.push({ind:r,score:l})}return o.sort((r,i)=>i.score-r.score||ku(i.ind)-ku(r.ind)||String(r.ind.label).length-String(i.ind.label).length),{match:o[0]?.ind||null,candidates:o.slice(1,5).map(r=>r.ind)}}function vt(e){let t=(e?.attributes||[]).find(s=>s.key==="site");if(!t)return null;let n=String(t.value).match(/^(.*):(\d+)(?:-(\d+))?$/);return n?{path:n[1],start:Number(n[2]),end:n[3]?Number(n[3]):Number(n[2])}:null}function mb(e,t){let n=[],s=[];for(let o of e.relations){let r=o.edges.filter(a=>a.subject===t),i=o.edges.filter(a=>a.object===t);r.length&&n.push({group:o,edges:r}),i.length&&s.push({group:o,edges:i})}return{out:n,incoming:s}}function Eu(e){return e.prop?`${e.predicate} [${e.prop}]`:e.predicate}function Cn(e){let t=e||"Entity",n=fn(t);return n.length<2?t:n.map(s=>s[0].toUpperCase()+s.slice(1)).join(" ")}function nt(e,t,n=", "){return e.length<=t?e.join(n):e.slice(0,t).join(n)+`, +${e.length-t} more`}function ra(e,t,{candidates:n=[]}={}){let s=[];s.push(`${t.label} \u2014 ${Cn(t.class)} (id: ${t.id})`);let o=(t.derived_from||[]).filter(Nu);o.length&&s.push(`attestation: touched by ${o.length} commit(s)`);for(let l of t.attributes||[])s.push(`attribute: ${l.key} = ${l.value}${l.prop?` [${l.prop}]`:""}`);let{out:r,incoming:i}=mb(e,t.id);if(!r.length&&!i.length)s.push("edges: none in the current artifact");else{s.push("edges:");for(let{group:l,edges:c}of r)s.push(` ${Eu(l)} (${c.length}) \u2192 ${nt(c.map(u=>u.objectLabel||u.object),Su)}`);for(let{group:l,edges:c}of i)s.push(` \u2190 ${Eu(l)} (${c.length}) by ${nt(c.map(u=>u.subjectLabel||u.subject),Su)}`)}let a=t.derived_from||[];return a.length&&s.push(`provenance: ${nt(a,hb)}`),n.length&&s.push(`other matches: ${n.map(l=>`${l.label} (${Cn(l.class)})`).join(", ")}`),e.truncated.length&&s.push(gb(e)),s.join(`
2
- `)}function gb(e){return`note: partial edge lists for: ${e.truncated.map(n=>`${n.predicate} (${n.shown}/${n.count})`).join(", ")}. Counts are complete; the lists are not.`}function Qs(e,t,{maxDepth:n=8}={}){let s=new Map,o=new Map,r=(a,l,c,u)=>{!a||!l||a===l||(s.has(a)||s.set(a,[]),s.get(a).push({id:l,label:c,via:u}))};for(let a of e.relations){let l=In(a);if(l==="imports"||l==="calls")for(let c of a.edges)r(c.object,c.subject,c.subjectLabel||c.subject,a.predicate);else if(l==="callsSymbol")for(let c of a.edges){let u=Tn(e,c.subject),d=Tn(e,c.object);if(!u||!d)continue;let m=e.byId.get(u)?.label||u;r(d,u,m,a.predicate),u!==d&&r(c.object,u,m,a.predicate)}else if(l==="tests")for(let c of a.edges)o.has(c.object)||o.set(c.object,[]),o.get(c.object).push(c.subjectLabel||c.subject)}let i=[];for(let a of Ar(t.id,l=>s.get(l)||[],{maxDepth:n,keyOf:l=>l.id})){if(!a.length)continue;let l=a.map(c=>({...c,tests:o.get(c.id)||[]})).sort((c,u)=>String(c.label).localeCompare(String(u.label)));i.push(l)}return i}function Mu(e,t,{maxDepth:n=8}={}){let s=Qs(e,t,{maxDepth:n}),o=[`Impact of changing ${t.label} (reverse closure over imports/calls edges, module- and function-level):`];s.length||o.push("no dependents found in the current artifact \u2014 nothing imports or calls it (or its edges are not in the extracted graph yet).");let r=s.reduce((a,l)=>a+l.length,0);s.length&&o.push(`total: ${r} dependent(s) across ${s.length} depth level(s) (lists capped for brevity).`),s.forEach((a,l)=>{if(l>=bb){o.push(`depth ${l+1}: ${a.length} more dependent(s) (not listed)`);return}o.push(l===0?`depth 1 (${a.length} direct dependents):`:`depth ${l+1} (${a.length}):`);for(let c of a.slice(0,ea)){let u=c.tests.length?`tests: ${nt(c.tests,wb)}`:"tests: none recorded",d=l===0?`${c.via} it`:"reaches it through an intermediary";o.push(` - ${c.label} (${d}) \u2014 ${u}`)}a.length>ea&&o.push(` \u2026+${a.length-ea} more at depth ${l+1}`)});let i=e.truncated.filter(a=>{let l=In({predicate:a.predicate});return l==="imports"||l==="calls"||l==="callsSymbol"||l==="tests"});return i.length&&o.push("warning: partial edge lists ("+i.map(a=>`${a.predicate}: ${a.shown}/${a.count}`).join(", ")+") \u2014 this closure may be missing edges. Cross-check critical results with a lexical search (/find <term>)."),o.join(`
3
- `)}function Pu(e){let t=new Map;for(let n of e.relations)if(In(n)==="defines")for(let s of n.edges)t.has(s.subject)||t.set(s.subject,[]),t.get(s.subject).push(s.objectLabel||s.object);return t}function _u(e){return new Set(String(e).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function Bu(e,t,n=null){let s=n||(i=>Tn(e,i)),o=new Map,r=(i,a)=>{!i||!a||i===a||(o.has(i)||o.set(i,new Set),o.has(a)||o.set(a,new Set),o.get(i).add(a),o.get(a).add(i))};for(let i of t)for(let a of Ee(e,i))r(s(a.subject),s(a.object));return o}function ew(e,t,n){if(t.length<2)return;let s=new Map(t.map(c=>[c.ind.id,c])),o=new Map(t.map(c=>[c.ind.id,c.score])),r=c=>{if(!c.size)return[[],[]];let u=0;for(let f of c.values())u=Math.max(u,f);let d=[...c.entries()].sort((f,g)=>g[1]-f[1]),m=[],p=[];for(let[f,g]of d)g>=u*qb&&m.length<n?m.push([f,g]):p.length<ju&&p.push([f,g]);return[m,p]},[i,a]=r(new Map(t.map(c=>[c.ind.id,c.score]))),l=new Set(i.map(([c])=>c));for(let c=0;c<Hb&&i.length;c++){let u=new Map,d=[];for(let m of Kb){let p=Bu(e,m),f=new Map;for(let[b,y]of i)for(let w of p.get(b)||[])o.has(w)&&f.set(w,Math.max(f.get(w)||0,y));let[g,h]=r(f);for(let[b,y]of g)u.set(b,Math.max(u.get(b)||0,y));d.push(...h)}a.push(...d);for(let[m,p]of u){if(l.has(m))continue;let f=s.get(m);f&&(f.score+=Math.min(p*Gb,f.score*Vb),l.add(m))}i=[...u.entries()],!i.length&&a.length&&(i=a.splice(0,ju).filter(([m])=>!l.has(m)))}}function tw(e,t=[],{depth:n=Du,q:s=Uu,nodeLimit:o=zu,kinds:r=Yb,classPredicate:i=u=>(u.class||"")==="Module",idNormalizer:a=null,seeds:l=null,hubDegree:c=1/0}={}){let u=new Map(t.map(j=>[j.ind.id,j])),d=0;for(let j of t)d=Math.max(d,j.score);let m=t.length>0&&d>0,p=new Set(l??u.keys());if(!p.size)return[];let f=Bu(e,r,a),g=j=>f.get(j)?.size||0,h=[],b=(j,C)=>j.hop!==C.hop?j.hop<C.hop:j.deg!==C.deg?j.deg<C.deg:j.id<C.id,y=(j,C)=>{let E=h[j];h[j]=h[C],h[C]=E},w=j=>{h.push(j);let C=h.length-1;for(;C>0;){let E=C-1>>1;if(b(h[C],h[E]))y(C,E),C=E;else break}},v=()=>{let j=h[0],C=h.pop();if(h.length){h[0]=C;let E=0;for(;;){let R=2*E+1,N=2*E+2,A=E;if(R<h.length&&b(h[R],h[A])&&(A=R),N<h.length&&b(h[N],h[A])&&(A=N),A===E)break;y(E,A),E=A}}return j},k=new Set(p);for(let j of p)w({id:j,hop:0,deg:g(j)});let $=null,T=0,S=[];for(;h.length&&T<o;){let j=v();if(S.push({id:j.id,hop:j.hop}),!p.has(j.id)){if(m){let R=d*Xb*Math.pow(Jb,j.hop-1),N=u.get(j.id);if(N)N.score+=Math.min(R*Qb,N.score*Zb);else{let A=e.byId?.get?.(j.id);if(A&&i(A)){$||($=Pu(e));let P=$.get(A.id)||[],V={ind:A,score:R,defineCount:P.length,matching:[],density:0};t.push(V),u.set(j.id,V)}}}T++}if(j.hop>=n||j.hop>0&&g(j.id)>c)continue;let C=[];for(let R of f.get(j.id)||[]){if(k.has(R))continue;let N=e.byId?.get?.(R);!N||!i(N)||C.push({id:R,deg:g(R)})}if(!C.length)continue;C.sort((R,N)=>R.deg-N.deg||(R.id<N.id?-1:R.id>N.id?1:0));let E=Math.max(1,Math.floor(s*C.length));for(let R=0;R<E;R++){let N=C[R];k.add(N.id),w({id:N.id,hop:j.hop+1,deg:N.deg})}}return S}function Wu(e,t,n={}){let{demoteNonProd:s=!1,callAdjacency:o=!1,implOfInterface:r=!1,beamSearch:i=!1,spiral:a=!1,proseBoost:l=!1,proseLayers:c=!1,literalMention:u=!1,rawQuery:d=""}=n,m=Number.isFinite(n.beamWidth)&&n.beamWidth>0?n.beamWidth:8,p=Pu(e),f=[];for(let v of e.individuals){if((v.class||"")!=="Module")continue;let k=String(v.label),$=k.toLowerCase(),T=p.get(v.id)||[],S=new Set(T.map(E=>E.toLowerCase())),j=new Set;for(let E of T)for(let R of _u(E))j.add(R);let C=u?String((v.attributes||[]).find(E=>E.key==="dotted")?.value||"").toLowerCase():"";f.push({ind:v,label:k,labelLc:$,defines:T,symSet:S,symComps:j,dotted:C})}let g=f.length||1,h=new Map,b=v=>{let k=0;for(let $ of f)($.labelLc.includes(v)||$.symComps.has(v)||$.symSet.has(v))&&k++;return k},y=v=>(h.has(v)||h.set(v,Xi(g,b(v))),h.get(v));for(let v of t)y(v);let w=[];for(let v of f){let k=0,$=0,T=0,S=[];for(let N of t){let A=h.get(N)||0;A&&(v.symSet.has(N)?(k+=A*Fu,T++):v.symComps.has(N)&&(S.push(A),T++),v.labelLc.includes(N)&&($+=A*vb))}S.sort((N,A)=>A-N);let j=0;for(let N=0;N<Math.min(S.length,xb);N++)j+=S[N]*$b;let C=k+$+j;if(!C)continue;s&&(xs(v.labelLc)||jb(v.labelLc))?C*=Sb:xs(v.labelLc)&&(C*=.4);let E=v.defines.filter(N=>{let A=N.toLowerCase(),P=_u(N);return t.some(V=>A===V||P.has(V))}),R=v.defines.length?T/v.defines.length:0;w.push({ind:v.ind,score:C,defineCount:v.defines.length,matching:E,density:R})}if(u&&d&&w.length){let v=String(d).toLowerCase(),k=j=>j!=null&&/[a-z0-9_./]/.test(j),$=j=>{for(let C=v.indexOf(j);C!==-1;C=v.indexOf(j,C+1))if(!k(v[C-1])&&!k(v[C+j.length]))return!0;return!1},T=new Map(f.map(j=>[j.ind.id,j])),S=0;for(let j of w)S=Math.max(S,j.score);for(let j of w){let C=T.get(j.ind.id);if(!C)continue;let E=0;for(let R of new Set([C.dotted,C.labelLc])){if(!R||R.split(/[./]+/).filter(Boolean).length<zb||!$(R))continue;let N=[...new Set(R.split(/[^a-z0-9_]+/).filter(Boolean))].map(y).sort((P,V)=>V-P),A=0;for(let P=0;P<Math.min(N.length,Ub);P++)A+=N[P]*Db;E=Math.max(E,A)}E&&(j.score+=Math.min(E*Bb,S*Wb))}}if(w.length>1){let v=new Map(w.map($=>[$.ind.id,$.score])),k=new Map;for(let $ of Ee(e,"imports"))!v.has($.subject)&&!v.has($.object)||(k.has($.subject)||k.set($.subject,new Set),k.has($.object)||k.set($.object,new Set),k.get($.subject).add($.object),k.get($.object).add($.subject));for(let $ of w){let T=0;for(let S of k.get($.ind.id)||[])T=Math.max(T,v.get(S)||0);$.score+=Math.min(T*kb,$.score*Eb)}}if(o&&w.length>1){let v=new Map(w.map($=>[$.ind.id,$.score])),k=new Map;for(let $ of["calls","callsSymbol"])for(let T of Ee(e,$)){let S=Tn(e,T.subject),j=Tn(e,T.object);!S||!j||S===j||!v.has(S)&&!v.has(j)||(k.has(S)||k.set(S,new Set),k.has(j)||k.set(j,new Set),k.get(S).add(j),k.get(j).add(S))}for(let $ of w){let T=0;for(let S of k.get($.ind.id)||[])T=Math.max(T,v.get(S)||0);$.score+=Math.min(T*_b,$.score*Rb)}}if(r&&w.length>1){let v=new Map(w.map($=>[$.ind.id,$.score])),k=new Map;for(let $ of e.individuals)($.class||"")==="Class"&&$.label&&k.set(String($.label),$);for(let $ of w){if(!Cb($.ind.label))continue;let T=0;for(let S of Ee(e,"inherits")){if(Tn(e,S.subject)!==$.ind.id||!Ib(S.objectLabel))continue;let C=Tn(e,S.object);if(!C){let E=k.get(String(S.objectLabel||""));E&&(C=mn(e,E))}C&&(T=Math.max(T,v.get(C)||0))}$.score+=Math.min(T*Ab,$.score*Tb)}}if(l&&w.length&&e.proseIndex){let v=vs(e.proseIndex,t.join(" "),{limit:Nb});if(v.length){let k=new Map;for(let{id:$,score:T}of v){let S=Tn(e,$);S&&k.set(S,(k.get(S)||0)+T)}for(let $ of w){let T=k.get($.ind.id)||0;T&&($.score+=Math.min(T*Ob,$.score*Lb))}}}if(c&&w.length&&e.proseIndex){let v=new Map(w.map(T=>[T.ind.id,T])),k=new Map(f.map(T=>[T.ind.id,T])),$=new Map;for(let T of new Set(t)){let S=h.get(T)||0;if(!S)continue;let{ids:j}=pu(e.proseIndex,T);if(!j.length)continue;let C=new Set;for(let E of j){let R=Tn(e,E);if(!R||C.has(R)||(C.add(R),!v.has(R)))continue;let N=k.get(R);N&&(N.symSet.has(T)||N.symComps.has(T)||N.labelLc.includes(T))||$.set(R,($.get(R)||0)+S*Fb)}}for(let T of w){let S=$.get(T.ind.id)||0;S&&(T.score+=Math.min(S*Mb,T.score*Pb))}}return i&&w.length>1&&ew(e,w,m),a&&w.length&&tw(e,w,{depth:Number.isFinite(n.spiralDepth)&&n.spiralDepth>0?n.spiralDepth:Du,q:Number.isFinite(n.mostDistinctiveBeams)&&n.mostDistinctiveBeams>0?n.mostDistinctiveBeams:Uu,nodeLimit:Number.isFinite(n.spiralNodeLimit)&&n.spiralNodeLimit>0?n.spiralNodeLimit:zu}),w.sort((v,k)=>k.score-v.score||k.density-v.density||v.defineCount-k.defineCount||String(v.ind.label).length-String(k.ind.label).length),w}function qu(e,t,n={}){let s=String(t||""),o=s.toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean);if(!o.length)return[];let r=n.literalMention?{...n,rawQuery:s}:n;return Wu(e,o,r).map(i=>({path:String(i.ind.label),score:i.score}))}function sw(e){let t=0,n=!1,s=!1,o=!1,r="",i=!1,a=()=>{t+=1,r===")"&&(n=!0),i=!0};for(let l=0;l<e.length;l++){let c=e[l];if(c==="\\"){let u=e[l+1]||"";!o&&u>="1"&&u<="9"&&(s=!0),l+=1,r="",i=!1;continue}if(o){c==="]"&&(o=!1,r="]",i=!1);continue}if(c==="["){o=!0,r="[",i=!1;continue}if(c==="?"&&(r==="("||i)){r="?",i=!1;continue}if(c==="*"||c==="+"||c==="?"){a(),r=c;continue}if(c==="{"){let u=e.indexOf("}",l),d=u===-1?"":e.slice(l+1,u);if(u!==-1&&/^\d+(,\d*)?$/.test(d)){a(),l=u,r="}";continue}r="{",i=!1;continue}r=c,i=!1}return{quantifiers:t,quantifiedGroup:n,backreference:s}}function ia(e,{now:t=Date.now}={}){let n=String(e);if(n.length>Ru)return{error:`name pattern is ${n.length} characters; the limit is ${Ru}.`};let{quantifiers:s,quantifiedGroup:o,backreference:r}=sw(n);if(o)return{error:`name pattern "${n}" quantifies a group, which can backtrack for minutes on one label. Quantify a character or a class instead.`};if(r)return{error:`name pattern "${n}" uses a back-reference, which can backtrack for minutes on one label.`};if(s>Au)return{error:`name pattern "${n}" has ${s} quantifiers; the limit is ${Au}.`};let i;try{i=new RegExp(n,"i")}catch{return{error:`invalid name pattern: ${n}`}}let a=null;return{test(l){if(a===null)a=t()+Tu;else if(t()>a)throw new Cr(`name pattern "${n}" exceeded its ${Tu}ms matching budget.`);return i.test(String(l).slice(0,nw))}}}function Gu(e,t,{limit:n=Or,kind:s="",decorator:o="",name:r=""}={}){let i=String(t||"").toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean),a=String(s||"").trim().toLowerCase(),l=String(o||"").trim().toLowerCase(),c=null;if(r){let p=ia(r);if(p.error)return p.error;c=p}if(a&&a!=="module")try{return cw(e,i,{limit:n,kind:a,decFilter:l,nameRe:c})}catch(p){if(p instanceof Cr)return p.message;throw p}if(!i.length&&!c&&!l)return"empty query";let u=Wu(e,i);if(!u.length)return`no module matches "${t}". Try broader keywords, or tmct_describe <path> if you know where it lives.`;let d=u.slice(0,n),m=[`${u.length} module(s) match "${t}" (top ${d.length}):`];for(let{ind:p,defineCount:f,matching:g}of d){let h=g.length?` \u2014 matching: ${nt([...new Set(g)],yb)}`:"";m.push(`- ${p.label} (defines ${f} symbol(s))${h}`)}return m.push("Then tmct_describe <path> for the full sibling list + typed edges, or tmct_impact <path> for dependents."),m.join(`
4
- `)}function Ee(e,t){let n=Cu.get(e);n||(n=new Map,Cu.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(In(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function Tn(e,t){let n=e.byId?.get?.(t);if(n)return mn(e,n);let s=String(t||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function mn(e,t){if((t?.class||"")==="Module")return t.id;let n=vt(t);if(n)return`mod:${n.path}`;let s=String(t?.id||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function aa(e){if(!e)return"";let t=e.end>e.start?`${e.start}-${e.end}`:`${e.start}`;return` [${e.path}:${t}]`}function Js(e){return(e?.attributes||[]).find(t=>t.key==="decorators")?.value||""}function Vu(e,t){let n=[`${t.label} \u2014 ${Cn(t.class)} (id: ${t.id})`],s=Ee(e,"contains").filter(i=>i.subject===t.id);if(!s.length)return n.push("members: none recorded (empty class, or members not in the extracted graph). Use tmct_describe for its edges."),n.join(`
5
- `);let o=[],r=[];for(let i of s){let a=e.byId.get(i.object),l=aa(a?vt(a):null),c=a?Js(a):"",u=`${i.objectLabel||i.object}${l}${c?` @${c}`:""}`;((a?.class||"")==="Attribute"?r:o).push(u)}return o.length&&n.push(`methods (${o.length}): ${nt(o,Iu)}`),r.length&&n.push(`attributes (${r.length}): ${nt(r,Iu)}`),n.push("Use tmct_snippet <Class.member> for an exact body."),n.join(`
6
- `)}function Hu(e,t){let n=vt(t),s=[`${t.label} \u2014 ${Cn(t.class)}${aa(n)}`],o=Me(t,"params"),r=Me(t,"returns");(o||r||(t.class||"")==="Method"||(t.class||"")==="Function")&&s.push(`signature: ${t.label}(${o})${r?` -> ${r}`:""}`);let i=[];Me(t,"isStatic")&&i.push("static"),Me(t,"isAbstract")&&i.push("abstract"),Me(t,"isConstant")&&i.push("constant");let a=Me(t,"visibility");a&&i.push(a),i.length&&s.push(`flags: ${i.join(", ")}`);let l=Js(t);l&&s.push(`decorators: @${l.split(", ").join(", @")}`);let c=Me(t,"raises");c&&s.push(`raises: ${c}`);let u=Me(t,"catches");u&&s.push(`catches: ${u}`);let d=Me(t,"self_fields");d&&s.push(`self fields: ${d}`);let m=Me(t,"value");m&&s.push(`value: ${m}`);let p=Me(t,"doc");return p&&s.push(`doc: ${p}`),s.length===1&&s.push("(no signature detail recorded for this symbol \u2014 likely a module or attribute; use tmct_snippet for its source.)"),s.push("Use tmct_snippet for the exact body."),s.join(`
7
- `)}function Ku(e,t){let n=Ee(e,"inherits"),s=n.filter(l=>l.subject===t.id).map(l=>l.objectLabel||l.object),o=new Map;for(let l of n)o.has(l.object)||o.set(l.object,[]),o.get(l.object).push({id:l.subject,label:l.subjectLabel||l.subject});let r=[`${t.label} \u2014 ${Cn(t.class)} (id: ${t.id})`];r.push(s.length?`extends: ${nt(s,Ou)}`:"extends: (no internal/recorded base classes)");let i=[];for(let l of Ar(t.id,c=>o.get(c)||[],{maxDepth:8,keyOf:c=>c.id}))l.length&&i.push(l.map(c=>c.label).sort((c,u)=>String(c).localeCompare(String(u))));let a=i.reduce((l,c)=>l+c.length,0);return a?(r.push(`subclasses: ${a} total across ${i.length} level(s).`),i.forEach((l,c)=>r.push(` depth ${c+1} (${l.length}): ${nt(l,Ou)}`))):r.push("subclasses: none recorded \u2014 nothing extends it in the extracted graph."),r.join(`
8
- `)}function Yu(e,{pkg:t=""}={}){let n=Hn(t),s=e.individuals.filter(u=>(u.class||"")==="Module"&&(!n||Hn(u.label).startsWith(n)));if(!s.length)return n?`no modules under "${t}".`:"no modules in the graph.";let o=new Map;for(let u of s){let d=u.label.includes("/")?u.label.slice(0,u.label.lastIndexOf("/")):"(root)";o.set(d,(o.get(d)||0)+1)}let r=new Map;for(let u of Ee(e,"imports"))r.set(u.object,(r.get(u.object)||0)+1);let i=new Set(s.map(u=>u.id)),a=[...r.entries()].filter(([u])=>i.has(u)).sort((u,d)=>d[1]-u[1]).slice(0,rw).map(([u,d])=>`${e.byId.get(u)?.label||u} (${d} importers)`),l=[...o.entries()].sort((u,d)=>d[1]-u[1]),c=[`Architecture${n?` of ${t}`:""}: ${s.length} module(s) in ${l.length} package(s).`];return c.push(`packages (by module count): ${nt(l.map(([u,d])=>`${u} (${d})`),ow)}`),c.push(a.length?`hub modules (most imported): ${a.join(", ")}`:"hub modules: none (no internal imports recorded)."),c.join(`
9
- `)}function Ju(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||vt(t)?.path||n,o=[...new Set(Ee(e,"tests").filter(a=>a.object===n).map(a=>a.subjectLabel||a.subject))],r=o.length>0,i=r?`covered by ${o.length} test module(s):
10
- ${nt(o,Xu,`
11
- `)}`:"no covering tests recorded (no test module imports it).";return n===t.id?`${s}: ${i}`:`${t.label} is defined in ${s}, which ${r?"is":"has"} ${i}
12
- ${iw}`}function Qu(e){let t=new Set,n=new Set;for(let o of Ee(e,"tests"))t.add(o.object),n.add(o.subject);let s=e.individuals.filter(o=>(o.class||"")==="Module"&&!n.has(o.id)&&!xs(String(o.label).toLowerCase())&&!t.has(o.id)).map(o=>o.label).sort();return s.length?`${s.length} source module(s) with no covering test module:
13
- ${nt(s,Xu,`
14
- `)}`:"every source module has at least one covering test module."}function Zu(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=Ee(e,"touches").filter(r=>r.object===n).map(r=>r.subjectLabel||r.subject);return o.length?`${s}: touched by ${o.length} recent commit(s): ${nt(o,Mt)}`:`${s}: no commit history recorded (outside the git-log window or unmodified).`}function td(e,t){if(ed.has(t.class)){let r=[...new Set(Ee(e,"callsSymbol").filter(i=>i.object===t.id).map(i=>i.subjectLabel||i.subject))];return r.length?`${t.label} \u2014 called by ${r.length} symbol(s):
15
- ${nt(r,Do,`
16
- `)}`:`${t.label}: no recorded callers (fine-grained call edges are conservative \u2014 absence is not proof). Try tmct_impact for the full reverse closure.`}let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=[...new Set(Ee(e,"calls").filter(r=>r.object===n).map(r=>r.subjectLabel||r.subject))];return o.length?`${s} \u2014 called by ${o.length} module(s):
17
- ${nt(o,Do,`
18
- `)}`:`${s}: no recorded callers (calls are coarse/import-backed \u2014 absence is not proof). Try tmct_impact for the full reverse closure.`}function nd(e,t){if(ed.has(t.class)){let r=[...new Set(Ee(e,"callsSymbol").filter(i=>i.subject===t.id).map(i=>i.objectLabel||i.object))];return r.length?`${t.label} \u2014 calls into ${r.length} symbol(s):
19
- ${nt(r,Do,`
20
- `)}`:`${t.label}: no recorded callees (calls only stdlib/external, or fine-grained call edges are not in the extracted graph).`}let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=[...new Set(Ee(e,"calls").filter(r=>r.subject===n).map(r=>r.objectLabel||r.object))];return o.length?`${s} \u2014 calls into ${o.length} module(s):
21
- ${nt(o,Do,`
22
- `)}`:`${s}: no recorded callees.`}function sd(e,t){let n=e.byId.get(t.object),s=n?vt(n):null;return`${t.objectLabel||n?.label||t.object}${s?` [${s.path}:${s.start}]`:""}`}function ca(e,t){if(!t?.id)return"";let n=Ee(e,"callsSymbol").filter(s=>s.subject===t.id);return n.length?`calls in-repo: ${nt(n.map(s=>sd(e,s)),aw)}`:""}function od(e,t){let n=Ee(e,"callsSymbol").filter(o=>o.subject===t.id);if(!n.length)return`${t.label} \u2014 ${Cn(t.class)}: no in-repo calls recorded (calls only stdlib/external, or fine-grained call edges are not in the extracted graph).`;let s=n.map(o=>sd(e,o));return`${t.label} \u2014 ${Cn(t.class)} calls ${n.length} in-repo symbol(s):
23
- ${nt(s,Do,`
24
- `)}`}function rd(e,t,n){let s=e.byId.get(t),o=s?.label||n||t,r=Me(s,"commitDate")||Me(s,"date"),i=Me(s,"commitAuthor")||Me(s,"author"),a=Me(s,"commitMessage")||Me(s,"message"),l=[o,r,i].filter(Boolean).join(" ");return a?`${l} \u2014 ${a}`:l}function id(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=Ee(e,"touches").filter(a=>a.object===n);if(!o.length)return`${s}: no commit history recorded (outside the git-log window or unmodified).`;let r=o.slice(0,Mt).map(a=>` ${rd(e,a.subject,a.subjectLabel)}`),i=o.length>Mt?`
1
+ (()=>{var ub=Object.defineProperty;var L=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(s){throw n=[s],s}};var En=(e,t)=>{for(var n in t)ub(e,n,{get:t[n],enumerable:!0})};var et,Qj,Zj,e_,t_,n_,s_,o_,r_,i_,a_,c_,l_,u_,d_,p_,f_,ee,$e,qt,ou,m_,h_,g_,De=L(()=>{et=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},Qj=et("createRequire"),Zj=et("readFileSync"),e_=et("access"),t_=et("readFile"),n_=et("writeFile"),s_=et("appendFile"),o_=et("mkdir"),r_=et("mkdtemp"),i_=et("rename"),a_=et("unlink"),c_=et("rm"),l_=et("stat"),u_=et("copyFile"),d_=et("readdir"),p_=et("createReadStream"),f_=et("createWriteStream"),ee=(...e)=>e.join("/"),$e=e=>String(e).replace(/\/[^/]*$/,""),qt=(...e)=>e.join("/"),ou="/",m_=et("randomBytes"),h_=et("spawnSync"),g_=et("createInterface")});var tt,w_,y_,ru,ze,Io,db,jn,pb,Tr,Ji,fb,mb,v_,hb,$_,x_,k_,S_,E_,vt=L(()=>{tt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},w_=tt("createRequire"),y_=tt("readFileSync"),ru=tt("access"),ze=tt("readFile"),Io=tt("writeFile"),db=tt("appendFile"),jn=tt("mkdir"),pb=tt("mkdtemp"),Tr=tt("rename"),Ji=tt("unlink"),fb=tt("rm"),mb=tt("stat"),v_=tt("copyFile"),hb=tt("readdir"),$_=tt("createReadStream"),x_=tt("createWriteStream"),k_=tt("randomBytes"),S_=tt("spawnSync"),E_=tt("createInterface")});function hs(e){return e.replace(gb,"").trim()}function Xt(e){let t=e;for(let n=0;n<2;n+=1){let s=t.replace(wb,"").trim();if(s=s.replace(vb,"").trim(),s===t)break;t=s}return t}var iu,Oo,Lo,Yt,au,rn,Qi,gb,bb,wb,yb,vb,de,No,$b,cu,Be,Gt,Gn,lu,Zi,ea,ta,uu,Mo,gs,du,pu,bs,_n,Rn,Ks,Ve,fu,ws,ys,Vn,pn,mu,Po,Ys,Cr,Xs,hu,An=L(()=>{iu=["is a superclass of","are a superclass of","is a parent class of","are a parent class of","superclass","superclasses"],Oo={imports:{bare:"import",comment:"Module -> Module: subject's import graph references object (usesComplexType).",verbs:["couples to","couple to","depends on","imports","import","relies on","rely on","requires","require","references","reference","pulls in","pull in","built on","builds on","build on","uses code from","grabs","grab","pulls from","pull from","leans on","lean on","is wired to","are wired to","is hooked up to","are hooked up to","importing"]},uses:{bare:"use",comment:"query-side union: imports (Module->Module) + calls (Module->Module) + callsSymbol (fn->fn).",verbs:["uses","use","makes use of","make use of","talks to","talk to","using"]},calls:{bare:"call",comment:"Function/Method -> Function/Class (symbol-grain) or Module -> Module (coarse): subject invokes object.",verbs:["invokes","invoke","calls","call","runs","run","executes","execute","hits","hit","triggers","trigger","fires","fire","kicks off","kick off","calling"]},defines:{bare:"define",comment:"Module -> top-level Function/Class/Method/Attribute: subject declares object.",verbs:["defines","define","declares","declare","has","have","holds","hold","defining"]},contains:{bare:"contain",comment:"Class -> Method/Attribute: subject's membership includes object.",verbs:["contains","contain","lives in","live in","is defined in","are defined in","is part of","are part of","sits in","sit in","sits inside","sit inside","containing"]},tests:{bare:"test",comment:"Module -> Module: subject is a test module importing/covering object.",verbs:["tests","test","covers","cover","verifies","verify","exercises","exercise","checks","check","makes sure of","make sure of","testing"]},inherits:{bare:"inherit from",comment:"Class -> Class: subject's declared base resolves to object (subclassOf).",verbs:["inherits from","inherit from","inherits","inherit","extends","extend","subclasses","subclass","derives from","derive from","is a subclass of","are a subclass of","is a kind of","are a kind of","is built off","are built off","is built on top of","are built on top of","extending","inheriting from","inheriting","subclassing","extends from",...iu]},touches:{bare:"touch",comment:"Commit -> Module (coarse) or Commit -> symbol (fine, touchesSymbol): a commit's changed-line-range intersects object.",verbs:["touched","touches","changed","change","modified","modifies","was changed in","were changed in","was edited in","were edited in","was modified by","were modified by","was tweaked in","were tweaked in","got changed in","got edited in","touch","changed in","landed in","land in","was in","were in","went into","included in","updated","edited","touching"]},cochange:{bare:"co-change with",comment:"Module -> Module: subject and object are frequently committed together (changeCoupledWith).",verbs:["changed with","co-changes with","co-change with","changes alongside","change alongside","shares commits with","share commits with","tends to change together with","tend to change together with","moves together with","move together with","changed together with","change together with","changes together with","changes with","change with","tends to change with","tend to change with","usually changes with"]},reexports:{bare:"re-export",comment:"Module -> exported symbol: subject's public API surface (__all__/export list).",verbs:["exports","export","re-exports","re-export","passes through","pass through","exposes","expose","exporting"]}},Lo=Object.freeze([...iu,"is the superclass of","are the superclass of","is the parent class of"]),Yt=Object.freeze(["defined","declared","located","implemented"]),au=Object.freeze(["now","currently","right now","at the moment","these days","today"]),rn=Object.freeze(["mentioned","referenced"]),Qi=Object.freeze(["in this graph","in the graph","in this codebase","in the codebase","in this repo","in the repo","here"]),gb=new RegExp(`\\s+(?:${Qi.join("|")})\\s*[?.!]*$`,"i");bb=Object.freeze(["then","though","too"]),wb=new RegExp(`\\s+(?:${bb.join("|")})\\s*[?.!]*$`,"i"),yb=Object.freeze(["please explain","explain"]),vb=new RegExp(`,\\s*(?:${yb.join("|")})\\s*[?.!]*$`,"i");de=Object.freeze(Object.fromEntries(Object.entries(Oo).flatMap(([e,{verbs:t}])=>t.map(n=>[n,e])))),No=Object.freeze(new Set(["has","have","holds","hold"])),$b=e=>!Lo.includes(e),cu=Object.freeze([...new Set(Object.keys(de).filter($b).map(e=>e.match(/^(?:is|are)\s+an?\s+(.+)$/i)).filter(Boolean).map(e=>e[1].toLowerCase()))]),Be=Object.freeze({function:"Function",functions:"Function",method:"Method",methods:"Method",class:"Class",classes:"Class",module:"Module",modules:"Module",mod:"Module",mods:"Module",file:"Module",files:"Module",attribute:"Attribute",attributes:"Attribute",field:"Attribute",fields:"Attribute",variable:"GlobalVariable",variables:"GlobalVariable",global:"GlobalVariable",globals:"GlobalVariable",change:"Change",changes:"Change",commit:"Commit",commits:"Commit"}),Gt=Object.freeze({explicitly:"direct",directly:"direct",transitively:"transitive",indirectly:"transitive"}),Gn=Object.freeze({imported:"imports",called:"calls",used:"uses",tested:"tests",covered:"tests",verified:"tests",exercised:"tests",checked:"tests",defined:"defines",declared:"defines",inherited:"inherits",extended:"inherits",subclassed:"inherits",contained:"contains",exported:"reexports","re-exported":"reexports",exposed:"reexports",touched:"touches",changed:"touches",modified:"touches",edited:"touches",updated:"touches"}),lu=Object.freeze({"inherited from":{kind:"inherits",role:"object"},"extended from":{kind:"inherits",role:"object"},"subclassed from":{kind:"inherits",role:"object"},"defined in":{kind:"defines",role:"agent"},"declared in":{kind:"defines",role:"agent"},"contained in":{kind:"contains",role:"agent"},"imported by":{kind:"imports",role:"agent"},"called by":{kind:"calls",role:"agent"},"used by":{kind:"uses",role:"agent"},"tested by":{kind:"tests",role:"agent"},"covered by":{kind:"tests",role:"agent"},"touched by":{kind:"touches",role:"agent"},"changed by":{kind:"touches",role:"agent"},"exported by":{kind:"reexports",role:"agent"}}),Zi=Object.freeze({"ain't":"is not",aint:"is not","isn't":"is not",isnt:"is not","aren't":"are not",arent:"are not","doesn't":"does not",doesnt:"does not","don't":"do not",dont:"do not","didn't":"did not",didnt:"did not","there's":"there is",theres:"there is","what's":"what is",whats:"what is","who's":"who is",whos:"who is",gonna:"going to",wanna:"want to",gotta:"got to",yer:"your",ur:"your",gimme:"give me"}),ea=Object.freeze({funtion:"function",funtions:"functions",fucntion:"function",fucntions:"functions",functoin:"function",functoins:"functions",calss:"class",calsses:"classes",classs:"class",clases:"classes",modul:"module",moduls:"modules",moduel:"module",moduels:"modules",moudle:"module",moudles:"modules",methdo:"method",methdos:"methods",mehtod:"method",mehtods:"methods",comit:"commit",comits:"commits",commmit:"commit",commmits:"commits",varaible:"variable",varaibles:"variables",varibale:"variable",varibales:"variables",atribute:"attribute",atributes:"attributes",improt:"import",improts:"imports",imoprt:"import",imoprts:"imports",inherts:"inherits",inheirts:"inherits",extands:"extends",extneds:"extends",depnds:"depends",touchs:"touches",tuoches:"touches",touhced:"touched",touchd:"touched",defned:"defined",chagned:"changed",chnaged:"changed",chagnes:"changes",chnages:"changes",calles:"calls",exprot:"export",exprots:"exports",tets:"tests",whcih:"which",wich:"which",whihc:"which",wehre:"where",whre:"where",waht:"what",wat:"what",dat:"that",dose:"does",doess:"does",teh:"the",manyn:"many",mnay:"many",amny:"many",mnany:"many",hwo:"how",coutn:"count",conut:"count",cuont:"count",ocunt:"count",numer:"number",nubmer:"number",numbr:"number",nmuber:"number",lst:"list",lsit:"list",ilst:"list",shwo:"show",hsow:"show",dispaly:"display",dsiplay:"display",funtcions:"functions",funciton:"function",funcitons:"functions"}),ta=Object.freeze({folder:"module",folders:"modules",directory:"module",directories:"modules",func:"function",funcs:"functions",changeset:"commit",changesets:"commits",revision:"commit",revisions:"commits",property:"attribute",properties:"attributes"}),uu=/\b([a-z]{3,})in'/gi,Mo=Object.freeze(["um","uh","erm","so","like","yo","hey","bru","bro","fam","mate","please","could you","can you","would you","tell me","i wonder","just wondering","quickly","real quick","kinda","sorta","btw","by the way","you","quick q"]),gs=Object.freeze(["this","it","that","here","this one","that one"]),du=Object.freeze([{re:/\bthere\s+is\s+not\s+(?:anything|nothing)\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\bthere\s+is\s+no\s+\S+\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\bis\s+not\s+there\s+(?:anything|nothing)\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\b(?:nobody|nothing|no one)\s+(\S.*?)(?:,?\s+does\s+it\??|,?\s+do\s+they\??)?$/i,to:e=>`what ${e[1]}`}]),pu=Object.freeze([{re:/^what\s+(?:is|was|were|are)\s+in\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`},{re:/^what\s+(?:went|got)\s+into\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`},{re:/^what\s+made\s+it\s+into\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`}]),bs=Object.freeze(["mean","means","stand for","stands for","signify","signifies","represent","represents","refer to","refers to"]),_n=Object.freeze(["that","which","who"]),Rn=Object.freeze(["something","anything","everything","somethings","things","thing","entities","entity","nodes","node","stuff","code","symbol","symbols"]),Ks=Object.freeze({"but do not":"difference","but does not":"difference","and do not":"difference","and does not":"difference","but not":"difference","and not":"difference",except:"difference",without:"difference",and:"intersection",plus:"intersection",but:"intersection",or:"union"}),Ve=Object.freeze({public:{via:"visibility",value:"public"},private:{via:"visibility",value:"private"},protected:{via:"visibility",value:"protected"},static:{via:"attr",attr:"isStatic"},abstract:{via:"attr",attr:"isAbstract"},constant:{via:"attr",attr:"isConstant"},exported:{via:"exported"},"re-exported":{via:"exported"},tested:{via:"tested",value:!0},covered:{via:"tested",value:!0},untested:{via:"tested",value:!1},uncovered:{via:"tested",value:!1}}),fu=Object.freeze(new Set(["tests","test","anything","something","anyone","someone","any"])),ws=Object.freeze(["how many","how much","how many of","number of","total number of","quantity of","tally of","sum of","total of","amount of","count","count up","count of","tot up"]),ys=Object.freeze(["list","show","show me","show us","display","print","print out","dump","enumerate","name","give me","get me","spit out","rattle off","run down","run through","ls","what are","which are"]),Vn=Object.freeze({most:"most",greatest:"most",highest:"most",biggest:"most",largest:"most","most-connected":"most","most connected":"most",fewest:"fewest",least:"fewest",smallest:"fewest",lowest:"fewest"}),pn=Object.freeze({imports:{kind:"imports",dir:"out"},dependencies:{kind:"imports",dir:"out"},importers:{kind:"imports",dir:"in"},dependents:{kind:"imports",dir:"in"},callers:{kind:"calls",dir:"in",sibling:"callsSymbol"},callees:{kind:"calls",dir:"out",sibling:"callsSymbol"},calls:{kind:"calls",dir:"out",sibling:"callsSymbol"},methods:{kind:"contains",dir:"out",filter:"Method"},members:{kind:"contains",dir:"out"},tests:{kind:"tests",dir:"in"},test:{kind:"tests",dir:"in"},subclasses:{kind:"inherits",dir:"in"},connections:{kind:"*",dir:"both"},edges:{kind:"*",dir:"both"},connected:{kind:"*",dir:"both"},imported:{kind:"imports",dir:"in"},"depended-on":{kind:"imports",dir:"in"},depended:{kind:"imports",dir:"in"},used:{kind:"imports",dir:"in",sibling:"callsSymbol"},called:{kind:"calls",dir:"in",sibling:"callsSymbol"}}),mu=Object.freeze({tests:"Module",test:"Module"}),Po=Object.freeze(["those","them","these"]),Ys=Object.freeze(["contains","defines"]),Cr=Object.freeze(["the","a","an","some","other","about","please","pls","plz","kindly","just","simply","maybe","perhaps","thanks","thank","ta","cheers","too","also","well","either","sorry","oops","actually","mean","meant","rather","hi","hello","hey","yo","hiya","howdy","ok","okay","matey","mate","buddy","pal","dude","man","bro","bru","fam","friend","sir","maam","folks","guys","everyone","dear","tmct","show","tell","give","list","find","me","us","lemme"]),Xs=Object.freeze({tally:"count",tallies:"count",sum:"count",total:"count",totals:"count"}),hu=Object.freeze(["help","help me","how do i ask","how do i use this","what can i ask","what can you ask","usage","commands","examples","syntax","options"])});var Jt,gu,bu,na,wu,A_,T_,yu=L(()=>{An();Jt=e=>({type:"object",required:["symbol"],properties:{symbol:{type:"string",description:e}}}),gu=e=>({type:"object",required:["module"],properties:{module:{type:"string",description:e}}}),bu=e=>({type:"object",required:["class"],properties:{class:{type:"string",description:e}}}),na=Object.freeze([{name:"tmct_context",tier:"hot",summary:"A sized edit bundle for one symbol \u2014 exemplar source, sibling signatures, registration anchor and the insertion region, in one call.",agentDescription:"START HERE to add/modify code: ONE call returns a sized edit bundle (exemplar source, sibling signatures, registration, insertion region) \u2014 then write directly, don't Read.",inputSchema:{type:"object",required:["symbol"],properties:{symbol:{type:"string",description:"Module path (e.g. path/to/module) or a sibling function/class name defined in it."},depth:{type:"string",enum:["min","auto","full"],default:"auto",description:"auto (sized to the task) | min (leanest) | full (every section)."}}},example:{symbol:"django/utils/text.py"}},{name:"tmct_snippet",tier:"hot",summary:"The exact source of one function, class or Class.method \u2014 its line span only, plus a one-line in-repo call hint.",agentDescription:"EXACT source of one function/class/Class.method by name (its line span only) + a one-line in-repo call hint. Prefer over Read for a single symbol.",inputSchema:{type:"object",required:["symbol"],properties:{symbol:{type:"string",description:"function/class name, Class.method, or fn:<path>#name."}}},example:{symbol:"Truncator.chars"}},{name:"tmct_ask",tier:"hot",summary:"A structural question in plain English, answered from the graph in one call \u2014 no model, and a clean miss instead of a guess.",agentDescription:'Ask a structural question in plain English: "which functions call X", "what uses X", "where is X defined", "when did X change". One call, no model. A clean miss beats a guess.',inputSchema:{type:"object",required:["query"],properties:{query:{type:"string",description:'A free-text question, e.g. "which functions explicitly couple to logging".'}}},example:{query:"which modules import src/core/model.mjs"},chat:{exampleRepo:"examples/mini-webapp",grammar:[{form:"which <things> <relation-verb> <entity>",example:"which modules import src/core/model.mjs",answers:"the imports edge, read forwards"},{form:"what is <relation-verb-passive> <entity>",example:"what is imported by src/core/store.mjs",answers:"the same edge, read backwards \u2014 a passive is the opposite direction, not a synonym"},{form:"what <relation-verb> <entity>",example:"what uses src/lib/http.mjs",answers:"the uses union: imports plus calls"},{form:"where is <entity> <where-marker>",example:"where is saveStore defined",answers:"the definition's file and line span"},{form:"when did <entity> change",example:"when did src/core/store.mjs change",answers:"the commits that touched it, newest first"}],whereMarkers:Yt}},{name:"tmct_describe",tier:"cold",summary:"Locate one symbol and list its typed edges (both directions) with provenance.",inputSchema:Jt("A module path, symbol name, or Class.method."),example:{symbol:"django/utils/text.py"}},{name:"tmct_signature",tier:"cold",summary:"One symbol's API surface (params, returns, raises/catches, flags, decorators, doc) without the body.",inputSchema:Jt("A function, method, or Class.method name."),example:{symbol:"Truncator.chars"}},{name:"tmct_impact",tier:"cold",summary:"Transitive reverse closure over imports/calls \u2014 what breaks if a module or symbol changes, by depth, with tests.",inputSchema:gu("The module (or a symbol it defines) whose dependents you want."),example:{module:"django/utils/text.py"}},{name:"tmct_search",tier:"cold",summary:"Free-text/ranked lookup over the code-map to find the right module or symbol.",inputSchema:{type:"object",required:[],properties:{query:{type:"string",description:"Free text to rank against the code-map. Required unless kind narrows the search on its own."},kind:{type:"string",description:"Restrict to an entity class, e.g. function, class, module."},decorator:{type:"string",description:"Restrict to definitions carrying this decorator."},name:{type:"string",description:"Restrict to definitions whose name matches."}}},example:{query:"template filters",kind:"function"}},{name:"tmct_members",tier:"cold",summary:"A class's methods + attributes (file:line, decorators) in one slice.",inputSchema:bu("The class whose members you want."),example:{class:"Truncator"}},{name:"tmct_subclasses",tier:"cold",summary:"A class's base classes plus the transitive set of classes that extend it.",inputSchema:bu("The class to walk the inheritance edges of."),example:{class:"Field"}},{name:"tmct_related",tier:"cold",summary:"A term's synonyms (skos:altLabel) and related concepts (skos:related), from the memory graph's relation facts.",inputSchema:{type:"object",required:["term"],properties:{term:{type:"string",description:"The term whose synonyms / related concepts you want."}}},example:{term:"sofa"}},{name:"tmct_architecture",tier:"cold",summary:"Package/module map + the most-imported hub modules (optionally scoped to a package).",inputSchema:{type:"object",required:[],properties:{package:{type:"string",description:"Scope the map to one package. Omit for the whole repository."}}},example:{package:"django/template"}},{name:"tmct_exports",tier:"cold",summary:"A module's public __all__ surface, each name resolved to the module that defines it.",inputSchema:gu("The module whose public API surface you want."),example:{module:"django/db/models/__init__.py"}},{name:"tmct_tests_for",tier:"cold",summary:"The test modules covering a symbol or module, from the typed test edges.",inputSchema:Jt("The symbol or module to find covering tests for."),example:{symbol:"django/utils/text.py"}},{name:"tmct_untested",tier:"cold",summary:"Source modules with no covering test module \u2014 a coverage-gap view (no arguments).",inputSchema:{type:"object",required:[],properties:{}},example:{}},{name:"tmct_history",tier:"cold",summary:"Recent commits that touched a symbol's module (newest first).",inputSchema:Jt("The symbol whose module's history you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_file_history",tier:"cold",summary:"Commits that touched a symbol's module, each with author / date / subject.",inputSchema:Jt("The symbol whose module's history you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_method_history",tier:"cold",summary:"Commits that touched a specific method symbol (fine-grained), with author / date / subject.",inputSchema:Jt("A Class.method name."),example:{symbol:"Truncator.chars"}},{name:"tmct_class_history",tier:"cold",summary:"Commits that touched a specific class symbol (fine-grained), with author / date / subject.",inputSchema:Jt("A class name."),example:{symbol:"Truncator"}},{name:"tmct_callers",tier:"cold",summary:"Modules that call into a symbol's module (one hop).",inputSchema:Jt("The symbol whose callers you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_callees",tier:"cold",summary:"Modules a symbol's module calls into (one hop).",inputSchema:Jt("The symbol whose callees you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_calls",tier:"cold",summary:"The in-repo symbols a function calls (fn\u2192fn), each with file:line.",inputSchema:Jt("The function whose in-repo call sites you want."),example:{symbol:"slugify"}},{name:"tmct_cochanges",tier:"cold",summary:"Modules that historically change in the same commit as a symbol's module (git co-change).",inputSchema:Jt("The symbol whose module's change-coupling you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_context_more",tier:"cold",summary:"The bundle sections a lean tmct_context omitted (siblings / tests / cochange / class members / re-exports).",inputSchema:Jt("The symbol a lean tmct_context bundle was built for."),example:{symbol:"django/utils/text.py"}},{name:"tmct_export",tier:"cold",summary:"Every stored memory fact as JSONL (subject/predicate/object/provenance) \u2014 the shape `tmct extract` emits, for backup or audit.",inputSchema:{type:"object",required:[],properties:{}},example:{}},{name:"tmct_ingest",tier:"cold",summary:"Ground plain text into memory facts with the same deterministic recognizer the chat teach lane uses \u2014 the strict tier, plus an optional lower-trust fuzzy tier \u2014 and report the canonical triples.",inputSchema:{type:"object",required:["text"],properties:{text:{type:"string",description:"The plain text to ground into facts."},optimistic:{type:"boolean",description:"Also run the lower-trust fuzzy tier over sentences the strict recognizer skips."}}},example:{text:"A kettle is a container. An otter is a mammal.",optimistic:!0}}]),wu=na.filter(e=>e.tier==="hot"),A_=na.filter(e=>e.tier==="cold"),T_=Object.freeze(na.map(e=>e.name))});var vu,Oe,Lt=L(()=>{De();vu=ee(".tmct","graph.json"),Oe=class extends Error{constructor(t){super(t),this.name="ToolError"}}});function xb(e){let t=new Set;for(let n of Array.isArray(e?.individuals)?e.individuals:[])n&&n.id&&t.add(n.id);return t}function $u(e){let t=(Array.isArray(e)?e:[]).map((l,c)=>({file:l?.file,payload:l?.payload||{},name:l?.name!=null&&String(l.name).length?String(l.name):String(c)})),n=t.map(({payload:l})=>xb(l)),s=new Map;for(let l of n)for(let c of l)s.set(c,(s.get(c)||0)+1);let o=new Set([...s.entries()].filter(([,l])=>l>1).map(([l])=>l)),i={generated_at:"",classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}},r="",a=t.length>0;for(let{payload:l,name:c}of t){a=a&&!!l.bootstrap,typeof l.generated_at=="string"&&l.generated_at>r&&(r=l.generated_at);let u=m=>o.has(m)?`${c}/${m}`:m;Array.isArray(l.classes)&&i.classes.push(...l.classes),Array.isArray(l.vocabulary)&&i.vocabulary.push(...l.vocabulary);for(let m of Array.isArray(l.individuals)?l.individuals:[]){if(!m)continue;let p={...m};p.id&&(p.id=u(p.id)),Array.isArray(p.derived_from)&&(p.derived_from=p.derived_from.map(f=>u(f))),Array.isArray(p.mentions)&&(p.mentions=p.mentions.map(f=>f&&f.id?{...f,id:u(f.id)}:f)),i.individuals.push(p)}for(let m of Array.isArray(l.objectProperties)?l.objectProperties:[]){if(!m)continue;let p={...m};Array.isArray(p.examples)&&(p.examples=p.examples.map(f=>{if(!f)return f;let g={...f};return g.subject&&(g.subject=u(g.subject)),g.object&&(g.object=u(g.object)),g})),i.objectProperties.push(p)}let d=l.proseIndex&&typeof l.proseIndex=="object"?l.proseIndex:{};for(let[m,p]of Object.entries(d)){let f=i.proseIndex[m]||(i.proseIndex[m]=[]);for(let g of Array.isArray(p)?p:[]){let h=u(g);f.includes(h)||f.push(h)}}}return i.generated_at=r,a&&(i.bootstrap=!0),i}var xu=L(()=>{});var Qs={};En(Qs,{clearCache:()=>kb,emptyEntities:()=>sa,fetchEntities:()=>_b,registerProvider:()=>Sb});function kb(){Js=null,Fo=null}function Sb(e){if(e!=null&&typeof e!="function")throw new TypeError("registerProvider expects a function (config) => entities payload, or null");let t=Ir;return Ir=e??null,Js=null,t}function sa(){return{generated_at:"",bootstrap:!0,classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}}}async function Eb(e){let t;try{t=await ze(e,"utf8")}catch(n){if(n?.code==="ENOENT")return sa();throw new Oe(`cannot read graph artifact at ${e} (${n?.code||n?.message||n})`)}try{return JSON.parse(t)}catch{throw new Oe(`graph artifact ${e} is not valid JSON`)}}async function jb(e){let t=e.graphFiles,n=[...t].map(String).sort().join("|");if(Fo&&Fo.key===n)return Fo.payload;let s=[];for(let i=0;i<t.length;i++){let r=await Eb(t[i]);s.push({file:t[i],payload:r,name:e.graphNames?.[i]})}let o=$u(s);return Fo={key:n,payload:o},o}async function _b(e){if(Ir){let s;try{s=await Ir(e)}catch(o){throw o instanceof Oe?o:new Oe(`graph provider failed (${o?.message||o})`)}if(!s||typeof s!="object")throw new Oe("graph provider returned no entities payload");return s}if(Array.isArray(e.graphFiles)&&e.graphFiles.length>1)return jb(e);if(Js&&Js.file===e.graphFile)return Js.payload;let t;try{t=await ze(e.graphFile,"utf8")}catch(s){if(s?.code==="ENOENT")return sa();throw new Oe(`cannot read graph artifact at ${e.graphFile} (${s?.code||s?.message||s})`)}let n;try{n=JSON.parse(t)}catch{throw new Oe(`graph artifact ${e.graphFile} is not valid JSON`)}return Js={file:e.graphFile,payload:n},n}var Js,Fo,Ir,Do=L(()=>{vt();Lt();xu();Js=null,Fo=null,Ir=null});function fn(e){if(!e)return[];let t=String(e).replace(/\.[A-Za-z0-9]+$/,"");return t=t.replace(/[/\\]/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").replace(/[_\-.]+/g," "),t.split(/\s+/).map(n=>n.toLowerCase()).filter(n=>n.length>1&&n.length<=ku)}function oa(e){if(!e)return[];let t=[],n=new Set;for(let s of String(e).toLowerCase().split(/[^a-z0-9]+/))if(!(s.length<2||s.length>ku||Rb.has(s))&&!n.has(s)&&(n.add(s),t.push(s),t.length>=Ab))break;return t}function Or({name:e,doc:t}={}){return[...new Set([...fn(e),...oa(t)])].sort()}function Su(e){let t=Object.create(null);for(let n of e){let s=(n.attributes||[]).find(o=>o.key==="prose_tokens");if(s?.value)for(let o of s.value.split(" "))t[o]||(t[o]=[]),t[o].push(n.id)}for(let n of Object.keys(t))t[n].sort();return t}function vs(e,t,{limit:n=10}={}){let s=[...new Set([...fn(t),...oa(t)])];if(!s.length)return[];let o=new Map;for(let i of s)for(let r of e?.[i]||[])o.set(r,(o.get(r)||0)+1);return[...o.entries()].sort((i,r)=>r[1]-i[1]||String(i[0]).localeCompare(r[0])).slice(0,n).map(([i,r])=>({id:i,score:r}))}function Eu(e,t){let n=e&&(e["tmct:layers"]?e:e.proseIndex),s=n&&n["tmct:layers"],o=String(t||"").toLowerCase(),i={ids:[],via:null};if(!o||!s||typeof s!="object")return i;let r=new Set,a=new Set;for(let l of Object.keys(s)){let c=s[l];if(!c||typeof c!="object")continue;let u=c[o],d=Array.isArray(u)?u:Array.isArray(u?.ids)?u.ids:null;if(d?.length){for(let m of d)r.add(m);a.add(l)}}return r.size?{ids:[...r].sort(),via:[...a].sort().join("+")}:i}var Rb,ku,Ab,Hn=L(()=>{Rb=new Set("a an and or but the of to in on at for with from by as is are was were be been being it its this that these those i you he she they we me my your our do does did not no yes if then else than so such can will would should could may might about into over under out up down off again more most some any all what which who whom whose when where why how".split(/\s+/)),ku=40,Ab=120});function ju(e){let t=e.indexOf("@"),n=t>=0?e.slice(0,t):e,s=t>=0?e.slice(t+1):"",o=n.indexOf(":"),i=o>=0?n.slice(o+1):"";return{createdAt:s,...i?{sessionId:i}:{}}}function zo(e){let t=String(e||"").trim();if(!t)return null;if(t.startsWith("reference:")){let s=t.slice(10),o=s.indexOf(":");if(o<0)return{kind:"reference",pack:s||"unknown",article:""};let i=s.slice(0,o)||"unknown";return{kind:Cb(i),pack:i,article:s.slice(o+1)}}if(t.startsWith("research:")){let s=t.slice(9),o=s.lastIndexOf("@");return{kind:"referenceLive",pack:"research",article:(o>=0?s.slice(0,o):s).trim()||"unknown"}}let n=t.split(/\s+/)[0];return n.startsWith("corpus-weak:")?{kind:"corpusWeak",name:n.slice(12)||"unknown"}:n.startsWith("corpus:")?{kind:"corpus",name:n.slice(7)||"unknown"}:n.startsWith("child:")?{kind:"corpus",name:n.slice(6).split(":")[0]||"unknown"}:n.startsWith("world:")?{kind:"corpus",name:n.slice(6).split(":")[0]||"unknown"}:n.startsWith("ace:")?{kind:"operator",...ju(n.slice(4))}:n.startsWith("teach:")?{kind:"teach",...ju(n.slice(6))}:n.startsWith("web:")?{kind:"web",url:n.slice(4)}:n.startsWith("url:")?{kind:"web",url:n.slice(4)}:n.startsWith("optimistic-extract:")?{kind:"optimisticExtract",name:n.slice(19)||"unknown"}:n.startsWith("extracted:")?{kind:"extracted",name:n.slice(10)||"unknown"}:n.startsWith("entailed:")?{kind:"entailed",rule:n.slice(9)}:n.startsWith("chat:")||n.startsWith("session:")||n.startsWith("operator")?{kind:"operator"}:null}function Lb(e){let t=(e?.attributes||[]).find(s=>s.prop==="mgx:sourceReliability")?.value;if(t===void 0)return Ru;let n=Number(t);return Number.isFinite(n)?Math.max(ra,Math.min(Au,n)):Ru}function Nb(e,t=Date.now(),n=Ib){let s=Date.parse(e);if(!Number.isFinite(s))return 1;let o=Math.max(0,t-s);return _u+(1-_u)*Math.pow(.5,o/n)}function Tu(e,t={},n={}){let s=typeof n.now=="number"?n.now:Date.now(),o=Array.isArray(e?.sourceIds)?e.sourceIds:[],i=new Set,r=[],a=[];for(let p of o){if(i.has(p))continue;i.add(p);let f=t[p],g=Ob(f);if(!g)continue;r.push(g);let h=(Bo[g]??0)*Lb(f);a.push(Math.max(0,Math.min(1,h)))}let l=0,c=1;for(let p of a)c*=1-p;if(a.length&&(l=Math.min(1,1-c)),r.includes("entailed")&&Array.isArray(n.premiseTrusts)&&n.premiseTrusts.length){let p=typeof n.ruleConfidence=="number"?n.ruleConfidence:1;l=Math.max(0,Math.min(1,Math.min(...n.premiseTrusts)*p))}let u=Nb(e?.createdAt,s,n.halfLifeMs),d=ia(Math.min(1,l*u)),m={sourceTypes:r.slice().sort(),corroboration:r.length,createdAt:e?.createdAt||"",recency:ia(u)};return{score:d,inputs:m}}function Cu({factsAsserted:e=0,factsContradicted:t=0}={}){let n=Math.max(0,Number(e)||0),s=Math.max(0,Number(t)||0),o=Math.max(-1,Math.min(1,(n-2*s)/Math.max(1,n))),i=n/(n+Mb),r=(o*i+1)/2;return ia(ra+(Au-ra)*r)}var Lr,aa,Nt,$s,Tb,Cb,Bo,Ib,_u,ra,Au,Ru,ia,Ob,Mb,xs=L(()=>{Lr="mgx:trustScore",aa="mgx:trustInputs",Nt="mgx:createdAt",$s="mgx:updatedAt";Tb="wikipedia-live",Cb=e=>e===Tb?"referenceLive":"reference";Bo=Object.freeze({operator:1,teach:.95,provider:.9,corpus:.7,reference:.6,corpusWeak:.55,referenceLive:.5,extracted:.45,web:.4,optimisticExtract:.35,entailed:.3}),Ib=720*60*60*1e3,_u=.9,ra=.5,Au=1.5,Ru=1,ia=(e,t=6)=>Number(e.toFixed(t)),Ob=e=>(e?.attributes||[]).find(t=>t.prop==="mgx:sourceType")?.value||"";Mb=19});var ks,ca=L(()=>{ks=e=>/(^|\/)tests?\//.test(e)||/(^|\/)test_[^/]*\.py$/.test(e)||/\.tests(\.|$)/.test(e)});function la(e,t){return Math.log(1+e/(1+t))}var Uo=L(()=>{});var Mr={};En(Mr,{bfsLevels:()=>Nr,findActionPath:()=>ua,findReachableSet:()=>da});function Iu(e){return e&&typeof e=="object"?JSON.stringify(e):String(e)}function Ou(e,t){let n=[];for(let{action:s,nextState:o}of t(e)||[])n.push({state:o,actions:[s],states:[e,o]});return n}function ua(e,t,n,{maxDepth:s=50,stateKey:o=Iu}={}){if(t(e))return{actions:[],states:[e]};let i=Ou(e,n),r=new Set([o(e)]);for(let a=1;a<=s&&i.length;a+=1){for(let c of i)if(t(c.state))return{actions:c.actions,states:c.states};if(a===s)break;let l=[];for(let c of i){let u=o(c.state);if(!r.has(u)){r.add(u);for(let{action:d,nextState:m}of n(c.state)||[]){let p=o(m);r.has(p)||l.push({state:m,actions:[...c.actions,d],states:[...c.states,m]})}}}i=l}return null}function da(e,t,{maxDepth:n=50,stateKey:s=Iu}={}){let o=Ou(e,t),i=new Set([s(e)]),r=[];for(let a=1;a<=n&&o.length;a+=1){let l=[];for(let c of o){let u=s(c.state);if(!i.has(u)&&(i.add(u),r.push({node:c.state,path:{actions:c.actions,states:c.states}}),a!==n))for(let{action:d,nextState:m}of t(c.state)||[]){let p=s(m);i.has(p)||l.push({state:m,actions:[...c.actions,d],states:[...c.states,m]})}}o=l}return r}function*Nr(e,t,{maxDepth:n=8,keyOf:s=o=>o}={}){let o=new Set([e]),i=[e];for(let r=1;r<=n&&i.length;r+=1){let a=[],l=[];for(let c of i)for(let u of t(c)||[]){let d=s(u);o.has(d)||(o.add(d),a.push(u),l.push(d))}i=l,yield a}}var Ss=L(()=>{});function Fr(e){let t=Array.isArray(e?.individuals)?e.individuals:[],n=new Map;for(let i of t)i&&i.id&&n.set(i.id,i);let s=(Array.isArray(e?.objectProperties)?e.objectProperties:[]).filter(i=>i&&(i.predicate||i.prop)).map(i=>{let r=(Array.isArray(i.examples)?i.examples:[]).filter(a=>a&&a.subject&&a.object);return{predicate:String(i.predicate||""),prop:i.prop||null,count:Number(i.count)||r.length,edges:r}}),o=s.filter(i=>i.count>i.edges.length).map(i=>({predicate:i.predicate,count:i.count,shown:i.edges.length}));return{individuals:t,byId:n,relations:s,truncated:o,generatedAt:e?.generated_at||null,proseIndex:e?.proseIndex||{}}}function ba(e){return!e||!Array.isArray(e.individuals)?0:e.individuals.filter(t=>(t.class||"")==="Module").length}function In(e){let t=String(e?.prop||"").toLowerCase();if(Lu[t])return Lu[t];let n=String(e?.predicate||"").toLowerCase();if(/symbol/.test(n)){if(/\b(call|invoke)/.test(n))return"callsSymbol";if(/(touch|chang|modif)/.test(n))return"touchesSymbol"}return/\bimport/.test(n)?"imports":/\b(call|invoke)/.test(n)?"calls":/\b(define|export|declare)/.test(n)?"defines":/\b(test|cover)/.test(n)?"tests":/\b(touch|chang|modif)/.test(n)?"touches":/\bcontain/.test(n)?"contains":/\b(inherit|subclass|extend|specializ)/.test(n)?"inherits":null}function Kn(e){return String(e||"").trim().toLowerCase().replace(/^\.\//,"").replace(/^\//,"")}function pa(e){let t=Kn(e).split("/");return t[t.length-1]}function Pb(e){return(e?.derived_from||[]).filter(Hu).length}function Nu(e){return(e?.mentions||[]).reduce((n,s)=>n+(Number(s?.count)||0),0)+Pb(e)}function Vt(e,t){let n=Kn(t);if(!n)return{match:null,candidates:[]};let s=pa(n),o=[];for(let i of e.individuals){let r=Kn(i.label),a=String(i.id||"").toLowerCase(),l=0;r===n||a===n?l=100:r.endsWith(`/${n}`)||pa(r)===s||pa(r).replace(/\.[a-z]+$/,"")===s?l=80:r.includes(n)&&(l=Math.max(10,50-(r.length-n.length))),l>0&&o.push({ind:i,score:l})}return o.sort((i,r)=>r.score-i.score||Nu(r.ind)-Nu(i.ind)||String(i.ind.label).length-String(r.ind.label).length),{match:o[0]?.ind||null,candidates:o.slice(1,5).map(i=>i.ind)}}function $t(e){let t=(e?.attributes||[]).find(s=>s.key==="site");if(!t)return null;let n=String(t.value).match(/^(.*):(\d+)(?:-(\d+))?$/);return n?{path:n[1],start:Number(n[2]),end:n[3]?Number(n[3]):Number(n[2])}:null}function Fb(e,t){let n=[],s=[];for(let o of e.relations){let i=o.edges.filter(a=>a.subject===t),r=o.edges.filter(a=>a.object===t);i.length&&n.push({group:o,edges:i}),r.length&&s.push({group:o,edges:r})}return{out:n,incoming:s}}function Mu(e){return e.prop?`${e.predicate} [${e.prop}]`:e.predicate}function Cn(e){let t=e||"Entity",n=fn(t);return n.length<2?t:n.map(s=>s[0].toUpperCase()+s.slice(1)).join(" ")}function nt(e,t,n=", "){return e.length<=t?e.join(n):e.slice(0,t).join(n)+`, +${e.length-t} more`}function wa(e,t,{candidates:n=[]}={}){let s=[];s.push(`${t.label} \u2014 ${Cn(t.class)} (id: ${t.id})`);let o=(t.derived_from||[]).filter(Hu);o.length&&s.push(`attestation: touched by ${o.length} commit(s)`);for(let l of t.attributes||[])s.push(`attribute: ${l.key} = ${l.value}${l.prop?` [${l.prop}]`:""}`);let{out:i,incoming:r}=Fb(e,t.id);if(!i.length&&!r.length)s.push("edges: none in the current artifact");else{s.push("edges:");for(let{group:l,edges:c}of i)s.push(` ${Mu(l)} (${c.length}) \u2192 ${nt(c.map(u=>u.objectLabel||u.object),Pu)}`);for(let{group:l,edges:c}of r)s.push(` \u2190 ${Mu(l)} (${c.length}) by ${nt(c.map(u=>u.subjectLabel||u.subject),Pu)}`)}let a=t.derived_from||[];return a.length&&s.push(`provenance: ${nt(a,Db)}`),n.length&&s.push(`other matches: ${n.map(l=>`${l.label} (${Cn(l.class)})`).join(", ")}`),e.truncated.length&&s.push(zb(e)),s.join(`
2
+ `)}function zb(e){return`note: partial edge lists for: ${e.truncated.map(n=>`${n.predicate} (${n.shown}/${n.count})`).join(", ")}. Counts are complete; the lists are not.`}function eo(e,t,{maxDepth:n=8}={}){let s=new Map,o=new Map,i=(a,l,c,u)=>{!a||!l||a===l||(s.has(a)||s.set(a,[]),s.get(a).push({id:l,label:c,via:u}))};for(let a of e.relations){let l=In(a);if(l==="imports"||l==="calls")for(let c of a.edges)i(c.object,c.subject,c.subjectLabel||c.subject,a.predicate);else if(l==="callsSymbol")for(let c of a.edges){let u=Tn(e,c.subject),d=Tn(e,c.object);if(!u||!d)continue;let m=e.byId.get(u)?.label||u;i(d,u,m,a.predicate),u!==d&&i(c.object,u,m,a.predicate)}else if(l==="tests")for(let c of a.edges)o.has(c.object)||o.set(c.object,[]),o.get(c.object).push(c.subjectLabel||c.subject)}let r=[];for(let a of Nr(t.id,l=>s.get(l)||[],{maxDepth:n,keyOf:l=>l.id})){if(!a.length)continue;let l=a.map(c=>({...c,tests:o.get(c.id)||[]})).sort((c,u)=>String(c.label).localeCompare(String(u.label)));r.push(l)}return r}function Ku(e,t,{maxDepth:n=8}={}){let s=eo(e,t,{maxDepth:n}),o=[`Impact of changing ${t.label} (reverse closure over imports/calls edges, module- and function-level):`];s.length||o.push("no dependents found in the current artifact \u2014 nothing imports or calls it (or its edges are not in the extracted graph yet).");let i=s.reduce((a,l)=>a+l.length,0);s.length&&o.push(`total: ${i} dependent(s) across ${s.length} depth level(s) (lists capped for brevity).`),s.forEach((a,l)=>{if(l>=Bb){o.push(`depth ${l+1}: ${a.length} more dependent(s) (not listed)`);return}o.push(l===0?`depth 1 (${a.length} direct dependents):`:`depth ${l+1} (${a.length}):`);for(let c of a.slice(0,fa)){let u=c.tests.length?`tests: ${nt(c.tests,Ub)}`:"tests: none recorded",d=l===0?`${c.via} it`:"reaches it through an intermediary";o.push(` - ${c.label} (${d}) \u2014 ${u}`)}a.length>fa&&o.push(` \u2026+${a.length-fa} more at depth ${l+1}`)});let r=e.truncated.filter(a=>{let l=In({predicate:a.predicate});return l==="imports"||l==="calls"||l==="callsSymbol"||l==="tests"});return r.length&&o.push("warning: partial edge lists ("+r.map(a=>`${a.predicate}: ${a.shown}/${a.count}`).join(", ")+") \u2014 this closure may be missing edges. Cross-check critical results with a lexical search (/find <term>)."),o.join(`
3
+ `)}function Yu(e){let t=new Map;for(let n of e.relations)if(In(n)==="defines")for(let s of n.edges)t.has(s.subject)||t.set(s.subject,[]),t.get(s.subject).push(s.objectLabel||s.object);return t}function Du(e){return new Set(String(e).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function ed(e,t,n=null){let s=n||(r=>Tn(e,r)),o=new Map,i=(r,a)=>{!r||!a||r===a||(o.has(r)||o.set(r,new Set),o.has(a)||o.set(a,new Set),o.get(r).add(a),o.get(a).add(r))};for(let r of t)for(let a of Se(e,r))i(s(a.subject),s(a.object));return o}function Sw(e,t,n){if(t.length<2)return;let s=new Map(t.map(c=>[c.ind.id,c])),o=new Map(t.map(c=>[c.ind.id,c.score])),i=c=>{if(!c.size)return[[],[]];let u=0;for(let f of c.values())u=Math.max(u,f);let d=[...c.entries()].sort((f,g)=>g[1]-f[1]),m=[],p=[];for(let[f,g]of d)g>=u*mw&&m.length<n?m.push([f,g]):p.length<Fu&&p.push([f,g]);return[m,p]},[r,a]=i(new Map(t.map(c=>[c.ind.id,c.score]))),l=new Set(r.map(([c])=>c));for(let c=0;c<bw&&r.length;c++){let u=new Map,d=[];for(let m of ww){let p=ed(e,m),f=new Map;for(let[b,w]of r)for(let v of p.get(b)||[])o.has(v)&&f.set(v,Math.max(f.get(v)||0,w));let[g,h]=i(f);for(let[b,w]of g)u.set(b,Math.max(u.get(b)||0,w));d.push(...h)}a.push(...d);for(let[m,p]of u){if(l.has(m))continue;let f=s.get(m);f&&(f.score+=Math.min(p*hw,f.score*gw),l.add(m))}r=[...u.entries()],!r.length&&a.length&&(r=a.splice(0,Fu).filter(([m])=>!l.has(m)))}}function Ew(e,t=[],{depth:n=Ju,q:s=Zu,nodeLimit:o=Qu,kinds:i=yw,classPredicate:r=u=>(u.class||"")==="Module",idNormalizer:a=null,seeds:l=null,hubDegree:c=1/0}={}){let u=new Map(t.map(_=>[_.ind.id,_])),d=0;for(let _ of t)d=Math.max(d,_.score);let m=t.length>0&&d>0,p=new Set(l??u.keys());if(!p.size)return[];let f=ed(e,i,a),g=_=>f.get(_)?.size||0,h=[],b=(_,R)=>_.hop!==R.hop?_.hop<R.hop:_.deg!==R.deg?_.deg<R.deg:_.id<R.id,w=(_,R)=>{let S=h[_];h[_]=h[R],h[R]=S},v=_=>{h.push(_);let R=h.length-1;for(;R>0;){let S=R-1>>1;if(b(h[R],h[S]))w(R,S),R=S;else break}},$=()=>{let _=h[0],R=h.pop();if(h.length){h[0]=R;let S=0;for(;;){let A=2*S+1,M=2*S+2,T=S;if(A<h.length&&b(h[A],h[T])&&(T=A),M<h.length&&b(h[M],h[T])&&(T=M),T===S)break;w(S,T),S=T}}return _},k=new Set(p);for(let _ of p)v({id:_,hop:0,deg:g(_)});let y=null,j=0,E=[];for(;h.length&&j<o;){let _=$();if(E.push({id:_.id,hop:_.hop}),!p.has(_.id)){if(m){let A=d*vw*Math.pow($w,_.hop-1),M=u.get(_.id);if(M)M.score+=Math.min(A*xw,M.score*kw);else{let T=e.byId?.get?.(_.id);if(T&&r(T)){y||(y=Yu(e));let P=y.get(T.id)||[],G={ind:T,score:A,defineCount:P.length,matching:[],density:0};t.push(G),u.set(_.id,G)}}}j++}if(_.hop>=n||_.hop>0&&g(_.id)>c)continue;let R=[];for(let A of f.get(_.id)||[]){if(k.has(A))continue;let M=e.byId?.get?.(A);!M||!r(M)||R.push({id:A,deg:g(A)})}if(!R.length)continue;R.sort((A,M)=>A.deg-M.deg||(A.id<M.id?-1:A.id>M.id?1:0));let S=Math.max(1,Math.floor(s*R.length));for(let A=0;A<S;A++){let M=R[A];k.add(M.id),v({id:M.id,hop:_.hop+1,deg:M.deg})}}return E}function td(e,t,n={}){let{demoteNonProd:s=!1,callAdjacency:o=!1,implOfInterface:i=!1,beamSearch:r=!1,spiral:a=!1,proseBoost:l=!1,proseLayers:c=!1,literalMention:u=!1,rawQuery:d=""}=n,m=Number.isFinite(n.beamWidth)&&n.beamWidth>0?n.beamWidth:8,p=Yu(e),f=[];for(let $ of e.individuals){if(($.class||"")!=="Module")continue;let k=String($.label),y=k.toLowerCase(),j=p.get($.id)||[],E=new Set(j.map(S=>S.toLowerCase())),_=new Set;for(let S of j)for(let A of Du(S))_.add(A);let R=u?String(($.attributes||[]).find(S=>S.key==="dotted")?.value||"").toLowerCase():"";f.push({ind:$,label:k,labelLc:y,defines:j,symSet:E,symComps:_,dotted:R})}let g=f.length||1,h=new Map,b=$=>{let k=0;for(let y of f)(y.labelLc.includes($)||y.symComps.has($)||y.symSet.has($))&&k++;return k},w=$=>(h.has($)||h.set($,la(g,b($))),h.get($));for(let $ of t)w($);let v=[];for(let $ of f){let k=0,y=0,j=0,E=[];for(let M of t){let T=h.get(M)||0;T&&($.symSet.has(M)?(k+=T*Xu,j++):$.symComps.has(M)&&(E.push(T),j++),$.labelLc.includes(M)&&(y+=T*qb))}E.sort((M,T)=>T-M);let _=0;for(let M=0;M<Math.min(E.length,Vb);M++)_+=E[M]*Gb;let R=k+y+_;if(!R)continue;s&&(ks($.labelLc)||Xb($.labelLc))?R*=Yb:ks($.labelLc)&&(R*=.4);let S=$.defines.filter(M=>{let T=M.toLowerCase(),P=Du(M);return t.some(G=>T===G||P.has(G))}),A=$.defines.length?j/$.defines.length:0;v.push({ind:$.ind,score:R,defineCount:$.defines.length,matching:S,density:A})}if(u&&d&&v.length){let $=String(d).toLowerCase(),k=_=>_!=null&&/[a-z0-9_./]/.test(_),y=_=>{for(let R=$.indexOf(_);R!==-1;R=$.indexOf(_,R+1))if(!k($[R-1])&&!k($[R+_.length]))return!0;return!1},j=new Map(f.map(_=>[_.ind.id,_])),E=0;for(let _ of v)E=Math.max(E,_.score);for(let _ of v){let R=j.get(_.ind.id);if(!R)continue;let S=0;for(let A of new Set([R.dotted,R.labelLc])){if(!A||A.split(/[./]+/).filter(Boolean).length<uw||!y(A))continue;let M=[...new Set(A.split(/[^a-z0-9_]+/).filter(Boolean))].map(w).sort((P,G)=>G-P),T=0;for(let P=0;P<Math.min(M.length,dw);P++)T+=M[P]*lw;S=Math.max(S,T)}S&&(_.score+=Math.min(S*pw,E*fw))}}if(v.length>1){let $=new Map(v.map(y=>[y.ind.id,y.score])),k=new Map;for(let y of Se(e,"imports"))!$.has(y.subject)&&!$.has(y.object)||(k.has(y.subject)||k.set(y.subject,new Set),k.has(y.object)||k.set(y.object,new Set),k.get(y.subject).add(y.object),k.get(y.object).add(y.subject));for(let y of v){let j=0;for(let E of k.get(y.ind.id)||[])j=Math.max(j,$.get(E)||0);y.score+=Math.min(j*Hb,y.score*Kb)}}if(o&&v.length>1){let $=new Map(v.map(y=>[y.ind.id,y.score])),k=new Map;for(let y of["calls","callsSymbol"])for(let j of Se(e,y)){let E=Tn(e,j.subject),_=Tn(e,j.object);!E||!_||E===_||!$.has(E)&&!$.has(_)||(k.has(E)||k.set(E,new Set),k.has(_)||k.set(_,new Set),k.get(E).add(_),k.get(_).add(E))}for(let y of v){let j=0;for(let E of k.get(y.ind.id)||[])j=Math.max(j,$.get(E)||0);y.score+=Math.min(j*Jb,y.score*Qb)}}if(i&&v.length>1){let $=new Map(v.map(y=>[y.ind.id,y.score])),k=new Map;for(let y of e.individuals)(y.class||"")==="Class"&&y.label&&k.set(String(y.label),y);for(let y of v){if(!tw(y.ind.label))continue;let j=0;for(let E of Se(e,"inherits")){if(Tn(e,E.subject)!==y.ind.id||!nw(E.objectLabel))continue;let R=Tn(e,E.object);if(!R){let S=k.get(String(E.objectLabel||""));S&&(R=mn(e,S))}R&&(j=Math.max(j,$.get(R)||0))}y.score+=Math.min(j*Zb,y.score*ew)}}if(l&&v.length&&e.proseIndex){let $=vs(e.proseIndex,t.join(" "),{limit:rw});if($.length){let k=new Map;for(let{id:y,score:j}of $){let E=Tn(e,y);E&&k.set(E,(k.get(E)||0)+j)}for(let y of v){let j=k.get(y.ind.id)||0;j&&(y.score+=Math.min(j*sw,y.score*ow))}}}if(c&&v.length&&e.proseIndex){let $=new Map(v.map(j=>[j.ind.id,j])),k=new Map(f.map(j=>[j.ind.id,j])),y=new Map;for(let j of new Set(t)){let E=h.get(j)||0;if(!E)continue;let{ids:_}=Eu(e.proseIndex,j);if(!_.length)continue;let R=new Set;for(let S of _){let A=Tn(e,S);if(!A||R.has(A)||(R.add(A),!$.has(A)))continue;let M=k.get(A);M&&(M.symSet.has(j)||M.symComps.has(j)||M.labelLc.includes(j))||y.set(A,(y.get(A)||0)+E*cw)}}for(let j of v){let E=y.get(j.ind.id)||0;E&&(j.score+=Math.min(E*iw,j.score*aw))}}return r&&v.length>1&&Sw(e,v,m),a&&v.length&&Ew(e,v,{depth:Number.isFinite(n.spiralDepth)&&n.spiralDepth>0?n.spiralDepth:Ju,q:Number.isFinite(n.mostDistinctiveBeams)&&n.mostDistinctiveBeams>0?n.mostDistinctiveBeams:Zu,nodeLimit:Number.isFinite(n.spiralNodeLimit)&&n.spiralNodeLimit>0?n.spiralNodeLimit:Qu}),v.sort(($,k)=>k.score-$.score||k.density-$.density||$.defineCount-k.defineCount||String($.ind.label).length-String(k.ind.label).length),v}function nd(e,t,n={}){let s=String(t||""),o=s.toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean);if(!o.length)return[];let i=n.literalMention?{...n,rawQuery:s}:n;return td(e,o,i).map(r=>({path:String(r.ind.label),score:r.score}))}function _w(e){let t=0,n=!1,s=!1,o=!1,i="",r=!1,a=()=>{t+=1,i===")"&&(n=!0),r=!0};for(let l=0;l<e.length;l++){let c=e[l];if(c==="\\"){let u=e[l+1]||"";!o&&u>="1"&&u<="9"&&(s=!0),l+=1,i="",r=!1;continue}if(o){c==="]"&&(o=!1,i="]",r=!1);continue}if(c==="["){o=!0,i="[",r=!1;continue}if(c==="?"&&(i==="("||r)){i="?",r=!1;continue}if(c==="*"||c==="+"||c==="?"){a(),i=c;continue}if(c==="{"){let u=e.indexOf("}",l),d=u===-1?"":e.slice(l+1,u);if(u!==-1&&/^\d+(,\d*)?$/.test(d)){a(),l=u,i="}";continue}i="{",r=!1;continue}i=c,r=!1}return{quantifiers:t,quantifiedGroup:n,backreference:s}}function ya(e,{now:t=Date.now}={}){let n=String(e);if(n.length>zu)return{error:`name pattern is ${n.length} characters; the limit is ${zu}.`};let{quantifiers:s,quantifiedGroup:o,backreference:i}=_w(n);if(o)return{error:`name pattern "${n}" quantifies a group, which can backtrack for minutes on one label. Quantify a character or a class instead.`};if(i)return{error:`name pattern "${n}" uses a back-reference, which can backtrack for minutes on one label.`};if(s>Bu)return{error:`name pattern "${n}" has ${s} quantifiers; the limit is ${Bu}.`};let r;try{r=new RegExp(n,"i")}catch{return{error:`invalid name pattern: ${n}`}}let a=null;return{test(l){if(a===null)a=t()+Uu;else if(t()>a)throw new Pr(`name pattern "${n}" exceeded its ${Uu}ms matching budget.`);return r.test(String(l).slice(0,jw))}}}function sd(e,t,{limit:n=Dr,kind:s="",decorator:o="",name:i=""}={}){let r=String(t||"").toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean),a=String(s||"").trim().toLowerCase(),l=String(o||"").trim().toLowerCase(),c=null;if(i){let p=ya(i);if(p.error)return p.error;c=p}if(a&&a!=="module")try{return Iw(e,r,{limit:n,kind:a,decFilter:l,nameRe:c})}catch(p){if(p instanceof Pr)return p.message;throw p}if(!r.length&&!c&&!l)return"empty query";let u=td(e,r);if(!u.length)return`no module matches "${t}". Try broader keywords, or tmct_describe <path> if you know where it lives.`;let d=u.slice(0,n),m=[`${u.length} module(s) match "${t}" (top ${d.length}):`];for(let{ind:p,defineCount:f,matching:g}of d){let h=g.length?` \u2014 matching: ${nt([...new Set(g)],Wb)}`:"";m.push(`- ${p.label} (defines ${f} symbol(s))${h}`)}return m.push("Then tmct_describe <path> for the full sibling list + typed edges, or tmct_impact <path> for dependents."),m.join(`
4
+ `)}function Se(e,t){let n=Wu.get(e);n||(n=new Map,Wu.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let i of e.relations)if(In(i)===t)for(let r of i.edges)o.push(r);return n.set(t,o),o}function Tn(e,t){let n=e.byId?.get?.(t);if(n)return mn(e,n);let s=String(t||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function mn(e,t){if((t?.class||"")==="Module")return t.id;let n=$t(t);if(n)return`mod:${n.path}`;let s=String(t?.id||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function va(e){if(!e)return"";let t=e.end>e.start?`${e.start}-${e.end}`:`${e.start}`;return` [${e.path}:${t}]`}function Zs(e){return(e?.attributes||[]).find(t=>t.key==="decorators")?.value||""}function od(e,t){let n=[`${t.label} \u2014 ${Cn(t.class)} (id: ${t.id})`],s=Se(e,"contains").filter(r=>r.subject===t.id);if(!s.length)return n.push("members: none recorded (empty class, or members not in the extracted graph). Use tmct_describe for its edges."),n.join(`
5
+ `);let o=[],i=[];for(let r of s){let a=e.byId.get(r.object),l=va(a?$t(a):null),c=a?Zs(a):"",u=`${r.objectLabel||r.object}${l}${c?` @${c}`:""}`;((a?.class||"")==="Attribute"?i:o).push(u)}return o.length&&n.push(`methods (${o.length}): ${nt(o,qu)}`),i.length&&n.push(`attributes (${i.length}): ${nt(i,qu)}`),n.push("Use tmct_snippet <Class.member> for an exact body."),n.join(`
6
+ `)}function rd(e,t){let n=$t(t),s=[`${t.label} \u2014 ${Cn(t.class)}${va(n)}`],o=Me(t,"params"),i=Me(t,"returns");(o||i||(t.class||"")==="Method"||(t.class||"")==="Function")&&s.push(`signature: ${t.label}(${o})${i?` -> ${i}`:""}`);let r=[];Me(t,"isStatic")&&r.push("static"),Me(t,"isAbstract")&&r.push("abstract"),Me(t,"isConstant")&&r.push("constant");let a=Me(t,"visibility");a&&r.push(a),r.length&&s.push(`flags: ${r.join(", ")}`);let l=Zs(t);l&&s.push(`decorators: @${l.split(", ").join(", @")}`);let c=Me(t,"raises");c&&s.push(`raises: ${c}`);let u=Me(t,"catches");u&&s.push(`catches: ${u}`);let d=Me(t,"self_fields");d&&s.push(`self fields: ${d}`);let m=Me(t,"value");m&&s.push(`value: ${m}`);let p=Me(t,"doc");return p&&s.push(`doc: ${p}`),s.length===1&&s.push("(no signature detail recorded for this symbol \u2014 likely a module or attribute; use tmct_snippet for its source.)"),s.push("Use tmct_snippet for the exact body."),s.join(`
7
+ `)}function id(e,t){let n=Se(e,"inherits"),s=n.filter(l=>l.subject===t.id).map(l=>l.objectLabel||l.object),o=new Map;for(let l of n)o.has(l.object)||o.set(l.object,[]),o.get(l.object).push({id:l.subject,label:l.subjectLabel||l.subject});let i=[`${t.label} \u2014 ${Cn(t.class)} (id: ${t.id})`];i.push(s.length?`extends: ${nt(s,Gu)}`:"extends: (no internal/recorded base classes)");let r=[];for(let l of Nr(t.id,c=>o.get(c)||[],{maxDepth:8,keyOf:c=>c.id}))l.length&&r.push(l.map(c=>c.label).sort((c,u)=>String(c).localeCompare(String(u))));let a=r.reduce((l,c)=>l+c.length,0);return a?(i.push(`subclasses: ${a} total across ${r.length} level(s).`),r.forEach((l,c)=>i.push(` depth ${c+1} (${l.length}): ${nt(l,Gu)}`))):i.push("subclasses: none recorded \u2014 nothing extends it in the extracted graph."),i.join(`
8
+ `)}function ad(e,{pkg:t=""}={}){let n=Kn(t),s=e.individuals.filter(u=>(u.class||"")==="Module"&&(!n||Kn(u.label).startsWith(n)));if(!s.length)return n?`no modules under "${t}".`:"no modules in the graph.";let o=new Map;for(let u of s){let d=u.label.includes("/")?u.label.slice(0,u.label.lastIndexOf("/")):"(root)";o.set(d,(o.get(d)||0)+1)}let i=new Map;for(let u of Se(e,"imports"))i.set(u.object,(i.get(u.object)||0)+1);let r=new Set(s.map(u=>u.id)),a=[...i.entries()].filter(([u])=>r.has(u)).sort((u,d)=>d[1]-u[1]).slice(0,Aw).map(([u,d])=>`${e.byId.get(u)?.label||u} (${d} importers)`),l=[...o.entries()].sort((u,d)=>d[1]-u[1]),c=[`Architecture${n?` of ${t}`:""}: ${s.length} module(s) in ${l.length} package(s).`];return c.push(`packages (by module count): ${nt(l.map(([u,d])=>`${u} (${d})`),Rw)}`),c.push(a.length?`hub modules (most imported): ${a.join(", ")}`:"hub modules: none (no internal imports recorded)."),c.join(`
9
+ `)}function ld(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||$t(t)?.path||n,o=[...new Set(Se(e,"tests").filter(a=>a.object===n).map(a=>a.subjectLabel||a.subject))],i=o.length>0,r=i?`covered by ${o.length} test module(s):
10
+ ${nt(o,cd,`
11
+ `)}`:"no covering tests recorded (no test module imports it).";return n===t.id?`${s}: ${r}`:`${t.label} is defined in ${s}, which ${i?"is":"has"} ${r}
12
+ ${Tw}`}function ud(e){let t=new Set,n=new Set;for(let o of Se(e,"tests"))t.add(o.object),n.add(o.subject);let s=e.individuals.filter(o=>(o.class||"")==="Module"&&!n.has(o.id)&&!ks(String(o.label).toLowerCase())&&!t.has(o.id)).map(o=>o.label).sort();return s.length?`${s.length} source module(s) with no covering test module:
13
+ ${nt(s,cd,`
14
+ `)}`:"every source module has at least one covering test module."}function dd(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=Se(e,"touches").filter(i=>i.object===n).map(i=>i.subjectLabel||i.subject);return o.length?`${s}: touched by ${o.length} recent commit(s): ${nt(o,Mt)}`:`${s}: no commit history recorded (outside the git-log window or unmodified).`}function fd(e,t){if(pd.has(t.class)){let i=[...new Set(Se(e,"callsSymbol").filter(r=>r.object===t.id).map(r=>r.subjectLabel||r.subject))];return i.length?`${t.label} \u2014 called by ${i.length} symbol(s):
15
+ ${nt(i,Wo,`
16
+ `)}`:`${t.label}: no recorded callers (fine-grained call edges are conservative \u2014 absence is not proof). Try tmct_impact for the full reverse closure.`}let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=[...new Set(Se(e,"calls").filter(i=>i.object===n).map(i=>i.subjectLabel||i.subject))];return o.length?`${s} \u2014 called by ${o.length} module(s):
17
+ ${nt(o,Wo,`
18
+ `)}`:`${s}: no recorded callers (calls are coarse/import-backed \u2014 absence is not proof). Try tmct_impact for the full reverse closure.`}function md(e,t){if(pd.has(t.class)){let i=[...new Set(Se(e,"callsSymbol").filter(r=>r.subject===t.id).map(r=>r.objectLabel||r.object))];return i.length?`${t.label} \u2014 calls into ${i.length} symbol(s):
19
+ ${nt(i,Wo,`
20
+ `)}`:`${t.label}: no recorded callees (calls only stdlib/external, or fine-grained call edges are not in the extracted graph).`}let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=[...new Set(Se(e,"calls").filter(i=>i.subject===n).map(i=>i.objectLabel||i.object))];return o.length?`${s} \u2014 calls into ${o.length} module(s):
21
+ ${nt(o,Wo,`
22
+ `)}`:`${s}: no recorded callees.`}function hd(e,t){let n=e.byId.get(t.object),s=n?$t(n):null;return`${t.objectLabel||n?.label||t.object}${s?` [${s.path}:${s.start}]`:""}`}function $a(e,t){if(!t?.id)return"";let n=Se(e,"callsSymbol").filter(s=>s.subject===t.id);return n.length?`calls in-repo: ${nt(n.map(s=>hd(e,s)),Cw)}`:""}function gd(e,t){let n=Se(e,"callsSymbol").filter(o=>o.subject===t.id);if(!n.length)return`${t.label} \u2014 ${Cn(t.class)}: no in-repo calls recorded (calls only stdlib/external, or fine-grained call edges are not in the extracted graph).`;let s=n.map(o=>hd(e,o));return`${t.label} \u2014 ${Cn(t.class)} calls ${n.length} in-repo symbol(s):
23
+ ${nt(s,Wo,`
24
+ `)}`}function bd(e,t,n){let s=e.byId.get(t),o=s?.label||n||t,i=Me(s,"commitDate")||Me(s,"date"),r=Me(s,"commitAuthor")||Me(s,"author"),a=Me(s,"commitMessage")||Me(s,"message"),l=[o,i,r].filter(Boolean).join(" ");return a?`${l} \u2014 ${a}`:l}function wd(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=Se(e,"touches").filter(a=>a.object===n);if(!o.length)return`${s}: no commit history recorded (outside the git-log window or unmodified).`;let i=o.slice(0,Mt).map(a=>` ${bd(e,a.subject,a.subjectLabel)}`),r=o.length>Mt?`
25
25
  \u2026+${o.length-Mt} more`:"";return`${s}: touched by ${o.length} recent commit(s):
26
- ${r.join(`
27
- `)}${i}`}function ad(e,t){let n=Ee(e,"touchesSymbol").filter(r=>r.object===t.id);if(!n.length)return`${t.label} \u2014 ${Cn(t.class)}: no symbol-level commit history recorded (outside the git-log window, or fine-grained history is not in the extracted graph).`;let s=n.slice(0,Mt).map(r=>` ${rd(e,r.subject,r.subjectLabel)}`),o=n.length>Mt?`
26
+ ${i.join(`
27
+ `)}${r}`}function yd(e,t){let n=Se(e,"touchesSymbol").filter(i=>i.object===t.id);if(!n.length)return`${t.label} \u2014 ${Cn(t.class)}: no symbol-level commit history recorded (outside the git-log window, or fine-grained history is not in the extracted graph).`;let s=n.slice(0,Mt).map(i=>` ${bd(e,i.subject,i.subjectLabel)}`),o=n.length>Mt?`
28
28
  \u2026+${n.length-Mt} more`:"";return`${t.label} \u2014 ${Cn(t.class)}: touched by ${n.length} commit(s):
29
29
  ${s.join(`
30
- `)}${o}`}function cd(e,t){return ad(e,t)}function ld(e,t){return ad(e,t)}function la(e,t,{kind:n,decFilter:s="",nameRe:o=null}={}){let r=ud[n];if(!r)return[];let i=[];for(let a of e.individuals){if((a.class||"")!==r||o&&!o.test(a.label)||s&&!Js(a).toLowerCase().includes(s))continue;let l=String(a.label).toLowerCase(),c=t.length?0:1;for(let u of t)l.includes(u)&&(c+=5);t.length&&!c||i.push({ind:a,score:c})}return i.sort((a,l)=>l.score-a.score||String(a.ind.label).length-String(l.ind.label).length),i}function cw(e,t,{limit:n=Or,kind:s,decFilter:o,nameRe:r}){if(!ud[s])return`unknown kind "${s}" (use function, class, method, attribute, or module).`;let a=la(e,t,{kind:s,decFilter:o,nameRe:r});if(!a.length)return`no ${s} matches the given filters.`;let l=a.slice(0,n),c=[`${a.length} ${s}(s) match (top ${l.length}):`];for(let{ind:u}of l)c.push(`- ${u.label}${aa(vt(u))}`);return c.push("Then tmct_snippet <name> for the exact body, or tmct_describe for its edges."),c.join(`
31
- `)}function ww(e){return{paramCount:Lr(e?.params),hasReturns:!!e?.returns,hasRaises:!!e?.raises,callees:e?.callees instanceof Set?e.callees:new Set}}function yw(e){if(!e.length)return{paramCount:0,hasReturns:!1,hasRaises:!1,callees:new Set};let t=e.map(i=>Lr(i.params)),n=e.filter(i=>!!i.returns).length,s=e.filter(i=>!!i.raises).length,o=new Map;for(let i of e)for(let a of i.callees||[])o.set(a,(o.get(a)||0)+1);let r=new Set([...o.entries()].filter(([,i])=>i>=2).map(([i])=>i));return{paramCount:bw(t),hasReturns:n*2>=e.length,hasRaises:s*2>=e.length,callees:r}}function vw(e,t){if(!t)return 0;let n=Math.max(0,4-Math.abs(Lr(e.params)-t.paramCount));!!e.returns===t.hasReturns&&(n+=2),!!e.raises===t.hasRaises&&(n+=2);let s=[...e.callees||[]].filter(o=>t.callees.has(o)).length;return n+Math.min(s,4)*2}function $w(e,{decorators:t="",label:n="",site:s=null}={},o=null){let r=new Map;for(let m of e)for(let p of ta(m.decorators))r.set(p,(r.get(p)||0)+1);let i="",a=1;for(let[m,p]of r)p>a&&(a=p,i=m);let l=new Set(ta(t)),c=l.size?l:new Set(i?[i]:[]),u=new Set(Lu(n)),d=s?.start??null;for(let m of e){let p=ta(m.decorators).some(b=>c.has(b))?1:0,f=Lu(m.label).filter(b=>u.has(b)).length,g=vw(m,o),h=d!=null&&m.site?1/(1+Math.abs(m.site.start-d)):0;m._score=p*1e3+f*50+g+h}return[...e].sort((m,p)=>p._score-m._score||(m.site?.start||0)-(p.site?.start||0))}function Zs(e,t){let n=mn(e,t),s=e.byId.get(n)?.label||String(n||"").replace(/^mod:/,""),o=Ee(e,"defines").filter(E=>E.subject===n),r=new Map;for(let E of Ee(e,"callsSymbol"))r.has(E.subject)||r.set(E.subject,new Set),r.get(E.subject).add(E.object);let i=[],a=[],l=0;for(let E of o){let R=e.byId.get(E.object);if(!R)continue;let N=R.class||"",A=vt(R);N==="GlobalVariable"?(a.push({label:R.label,value:(R.attributes||[]).find(P=>P.key==="value")?.value||"",site:A}),A&&(l=Math.max(l,A.end))):(N==="Function"||N==="Class")&&(i.push({id:R.id,label:R.label,class:N,site:A,decorators:Js(R),raises:Me(R,"raises"),doc:Me(R,"doc"),params:Me(R,"params"),returns:Me(R,"returns"),callees:r.get(R.id)||new Set}),A&&(l=Math.max(l,A.end)))}let c=vt(t),u=c&&(t.class||"")!=="Module"?{id:t.id,label:t.label,class:t.class||"",site:c,decorators:Js(t),raises:Me(t,"raises"),params:Me(t,"params"),returns:Me(t,"returns"),callees:r.get(t.id)||new Set}:null,d=i.length,m=u?ww(u):yw(i);i=$w(i,u||{label:t.label},m);let p=u?null:i.find(E=>E.site&&E.label!==t.label)||null,f=[...new Set(Ee(e,"tests").filter(E=>E.object===n).map(E=>E.subjectLabel||E.subject))].slice(0,pw),g=md(e,n).slice(0,dw),h=Ee(e,"reexports").filter(E=>E.subject===n).map(E=>E.objectLabel||E.object).slice(0,20),b=Me(e.byId.get(n),"all"),y=Ee(e,"contains"),w=null;(t.class||"")==="Class"?w=t.id:(t.class||"")==="Method"&&(w=y.find(E=>E.object===t.id)?.subject||null);let v=null;if(w){let E=e.byId.get(w),R=y.filter(N=>N.subject===w).map(N=>{let A=e.byId.get(N.object);return{label:N.objectLabel||A?.label||N.object,class:A?.class||"",site:A?vt(A):null,decorators:A?Js(A):"",params:A?Me(A,"params"):"",returns:A?Me(A,"returns"):"",raises:A?Me(A,"raises"):""}}).slice(0,uw);v={className:E?.label||String(w).replace(/^fn:.*#/,""),members:R,total:y.filter(N=>N.subject===w).length}}let k=null;for(let E of[...i,...a])E.site&&(!k||E.site.start>k.start)&&(k=E.site);let $=k?{start:k.start,end:k.end}:null,T=u||p,S=T?.id?e.byId.get(T.id):null,j=S?ca(e,S):"",C=[];if(T?.callees)for(let E of T.callees){let R=e.byId.get(E),N=R?vt(R):null;if(N&&C.push({label:R.label,site:N}),C.length>=gw)break}return{modId:n,moduleLabel:s,anchor:u,siblings:i,totalSiblings:d,exemplar:p,globals:a,tests:f,cochange:g,exports:h,allExports:b,classMembers:v,insertion:l,insertionRegion:$,calleeBodies:C,callHint:j,siblingCap:lw}}function Es(e){let t={anchor:!0,exemplar:!0,registration:!0,insertionRegion:!0,allExports:!0,classMembers:!0,siblings:!0,reexports:!0,tests:!0,cochange:!0,inlinedCallees:!1};return e==="TINY"?{...t,classMembers:!1,siblings:!1,reexports:!1,tests:!1,cochange:!1}:e==="LARGE"||e==="FULL"?{...t,inlinedCallees:!0}:t}function dd(e){return{...e,anchor:!1,exemplar:!1,inlinedCallees:!1,classMembers:!1,reexports:!1,tests:!1,cochange:!1,registration:!0,siblings:!0,insertionRegion:!0,allExports:!0}}function Nr(e,t,{untuned:n=!1}={}){let s=e.anchor||e.exemplar,o="TINY";if(e.anchor&&e.anchor.site||e.exemplar&&e.exemplar.site||(o="MID"),e.classMembers&&e.classMembers.members&&e.classMembers.members.length&&(o="MID"),s){let i=s.site?s.site.end-s.site.start+1:1/0,a=Lr(s.params);(i>fw||a>mw||s.raises)&&(o="MID");let l=!1;if(e.anchor)for(let u of s.callees||[]){let d=t.byId.get(u),m=d?vt(d):null;if(m&&m.path!==e.moduleLabel){l=!0;break}}let c=(e.anchor?.class||"")==="Method"&&Number(e.classMembers?.total||e.classMembers?.members?.length||0)>=hw;(l||c)&&(o="LARGE")}else o="MID";return{tier:o,mask:Es(o),topup:o!=="TINY"}}function pd(e){let t=[`Additional context for ${e.moduleLabel} (sections omitted from the lean bundle):`];if(e.classMembers&&e.classMembers.members.length){t.push(`
32
- ## members of ${e.classMembers.className}:`);for(let n of e.classMembers.members){let s=String(n.label).split(".").pop(),o=n.params!=null&&n.params!==""?`(${n.params})${n.returns?` -> ${n.returns}`:""}`:"",r=n.decorators?`@${n.decorators} `:"",i=n.raises?` raises=${n.raises}`:"";t.push(` ${n.class} ${s}${n.site?` :${n.site.start}`:""} ${r}${s}${o}${i}`)}}if(e.siblings.length){t.push(`
30
+ `)}${o}`}function vd(e,t){return yd(e,t)}function $d(e,t){return yd(e,t)}function xa(e,t,{kind:n,decFilter:s="",nameRe:o=null}={}){let i=xd[n];if(!i)return[];let r=[];for(let a of e.individuals){if((a.class||"")!==i||o&&!o.test(a.label)||s&&!Zs(a).toLowerCase().includes(s))continue;let l=String(a.label).toLowerCase(),c=t.length?0:1;for(let u of t)l.includes(u)&&(c+=5);t.length&&!c||r.push({ind:a,score:c})}return r.sort((a,l)=>l.score-a.score||String(a.ind.label).length-String(l.ind.label).length),r}function Iw(e,t,{limit:n=Dr,kind:s,decFilter:o,nameRe:i}){if(!xd[s])return`unknown kind "${s}" (use function, class, method, attribute, or module).`;let a=xa(e,t,{kind:s,decFilter:o,nameRe:i});if(!a.length)return`no ${s} matches the given filters.`;let l=a.slice(0,n),c=[`${a.length} ${s}(s) match (top ${l.length}):`];for(let{ind:u}of l)c.push(`- ${u.label}${va($t(u))}`);return c.push("Then tmct_snippet <name> for the exact body, or tmct_describe for its edges."),c.join(`
31
+ `)}function Uw(e){return{paramCount:zr(e?.params),hasReturns:!!e?.returns,hasRaises:!!e?.raises,callees:e?.callees instanceof Set?e.callees:new Set}}function Ww(e){if(!e.length)return{paramCount:0,hasReturns:!1,hasRaises:!1,callees:new Set};let t=e.map(r=>zr(r.params)),n=e.filter(r=>!!r.returns).length,s=e.filter(r=>!!r.raises).length,o=new Map;for(let r of e)for(let a of r.callees||[])o.set(a,(o.get(a)||0)+1);let i=new Set([...o.entries()].filter(([,r])=>r>=2).map(([r])=>r));return{paramCount:Bw(t),hasReturns:n*2>=e.length,hasRaises:s*2>=e.length,callees:i}}function qw(e,t){if(!t)return 0;let n=Math.max(0,4-Math.abs(zr(e.params)-t.paramCount));!!e.returns===t.hasReturns&&(n+=2),!!e.raises===t.hasRaises&&(n+=2);let s=[...e.callees||[]].filter(o=>t.callees.has(o)).length;return n+Math.min(s,4)*2}function Gw(e,{decorators:t="",label:n="",site:s=null}={},o=null){let i=new Map;for(let m of e)for(let p of ma(m.decorators))i.set(p,(i.get(p)||0)+1);let r="",a=1;for(let[m,p]of i)p>a&&(a=p,r=m);let l=new Set(ma(t)),c=l.size?l:new Set(r?[r]:[]),u=new Set(Vu(n)),d=s?.start??null;for(let m of e){let p=ma(m.decorators).some(b=>c.has(b))?1:0,f=Vu(m.label).filter(b=>u.has(b)).length,g=qw(m,o),h=d!=null&&m.site?1/(1+Math.abs(m.site.start-d)):0;m._score=p*1e3+f*50+g+h}return[...e].sort((m,p)=>p._score-m._score||(m.site?.start||0)-(p.site?.start||0))}function to(e,t){let n=mn(e,t),s=e.byId.get(n)?.label||String(n||"").replace(/^mod:/,""),o=Se(e,"defines").filter(S=>S.subject===n),i=new Map;for(let S of Se(e,"callsSymbol"))i.has(S.subject)||i.set(S.subject,new Set),i.get(S.subject).add(S.object);let r=[],a=[],l=0;for(let S of o){let A=e.byId.get(S.object);if(!A)continue;let M=A.class||"",T=$t(A);M==="GlobalVariable"?(a.push({label:A.label,value:(A.attributes||[]).find(P=>P.key==="value")?.value||"",site:T}),T&&(l=Math.max(l,T.end))):(M==="Function"||M==="Class")&&(r.push({id:A.id,label:A.label,class:M,site:T,decorators:Zs(A),raises:Me(A,"raises"),doc:Me(A,"doc"),params:Me(A,"params"),returns:Me(A,"returns"),callees:i.get(A.id)||new Set}),T&&(l=Math.max(l,T.end)))}let c=$t(t),u=c&&(t.class||"")!=="Module"?{id:t.id,label:t.label,class:t.class||"",site:c,decorators:Zs(t),raises:Me(t,"raises"),params:Me(t,"params"),returns:Me(t,"returns"),callees:i.get(t.id)||new Set}:null,d=r.length,m=u?Uw(u):Ww(r);r=Gw(r,u||{label:t.label},m);let p=u?null:r.find(S=>S.site&&S.label!==t.label)||null,f=[...new Set(Se(e,"tests").filter(S=>S.object===n).map(S=>S.subjectLabel||S.subject))].slice(0,Mw),g=jd(e,n).slice(0,Nw),h=Se(e,"reexports").filter(S=>S.subject===n).map(S=>S.objectLabel||S.object).slice(0,20),b=Me(e.byId.get(n),"all"),w=Se(e,"contains"),v=null;(t.class||"")==="Class"?v=t.id:(t.class||"")==="Method"&&(v=w.find(S=>S.object===t.id)?.subject||null);let $=null;if(v){let S=e.byId.get(v),A=w.filter(M=>M.subject===v).map(M=>{let T=e.byId.get(M.object);return{label:M.objectLabel||T?.label||M.object,class:T?.class||"",site:T?$t(T):null,decorators:T?Zs(T):"",params:T?Me(T,"params"):"",returns:T?Me(T,"returns"):"",raises:T?Me(T,"raises"):""}}).slice(0,Lw);$={className:S?.label||String(v).replace(/^fn:.*#/,""),members:A,total:w.filter(M=>M.subject===v).length}}let k=null;for(let S of[...r,...a])S.site&&(!k||S.site.start>k.start)&&(k=S.site);let y=k?{start:k.start,end:k.end}:null,j=u||p,E=j?.id?e.byId.get(j.id):null,_=E?$a(e,E):"",R=[];if(j?.callees)for(let S of j.callees){let A=e.byId.get(S),M=A?$t(A):null;if(M&&R.push({label:A.label,site:M}),R.length>=zw)break}return{modId:n,moduleLabel:s,anchor:u,siblings:r,totalSiblings:d,exemplar:p,globals:a,tests:f,cochange:g,exports:h,allExports:b,classMembers:$,insertion:l,insertionRegion:y,calleeBodies:R,callHint:_,siblingCap:Ow}}function Es(e){let t={anchor:!0,exemplar:!0,registration:!0,insertionRegion:!0,allExports:!0,classMembers:!0,siblings:!0,reexports:!0,tests:!0,cochange:!0,inlinedCallees:!1};return e==="TINY"?{...t,classMembers:!1,siblings:!1,reexports:!1,tests:!1,cochange:!1}:e==="LARGE"||e==="FULL"?{...t,inlinedCallees:!0}:t}function kd(e){return{...e,anchor:!1,exemplar:!1,inlinedCallees:!1,classMembers:!1,reexports:!1,tests:!1,cochange:!1,registration:!0,siblings:!0,insertionRegion:!0,allExports:!0}}function Br(e,t,{untuned:n=!1}={}){let s=e.anchor||e.exemplar,o="TINY";if(e.anchor&&e.anchor.site||e.exemplar&&e.exemplar.site||(o="MID"),e.classMembers&&e.classMembers.members&&e.classMembers.members.length&&(o="MID"),s){let r=s.site?s.site.end-s.site.start+1:1/0,a=zr(s.params);(r>Pw||a>Fw||s.raises)&&(o="MID");let l=!1;if(e.anchor)for(let u of s.callees||[]){let d=t.byId.get(u),m=d?$t(d):null;if(m&&m.path!==e.moduleLabel){l=!0;break}}let c=(e.anchor?.class||"")==="Method"&&Number(e.classMembers?.total||e.classMembers?.members?.length||0)>=Dw;(l||c)&&(o="LARGE")}else o="MID";return{tier:o,mask:Es(o),topup:o!=="TINY"}}function Sd(e){let t=[`Additional context for ${e.moduleLabel} (sections omitted from the lean bundle):`];if(e.classMembers&&e.classMembers.members.length){t.push(`
32
+ ## members of ${e.classMembers.className}:`);for(let n of e.classMembers.members){let s=String(n.label).split(".").pop(),o=n.params!=null&&n.params!==""?`(${n.params})${n.returns?` -> ${n.returns}`:""}`:"",i=n.decorators?`@${n.decorators} `:"",r=n.raises?` raises=${n.raises}`:"";t.push(` ${n.class} ${s}${n.site?` :${n.site.start}`:""} ${i}${s}${o}${r}`)}}if(e.siblings.length){t.push(`
33
33
  ## sibling symbols (most relevant first; ${e.siblings.length} total):`);for(let n of e.siblings.slice(0,e.siblingCap)){let s=n.decorators?`@${n.decorators} `:"",o=n.raises?` raises=${n.raises}`:"";t.push(` ${n.class} ${n.label}${n.site?` :${n.site.start}`:""} ${s}${o}`)}e.siblings.length>e.siblingCap&&t.push(` \u2026+${e.siblings.length-e.siblingCap} more`)}return e.allExports&&t.push(`
34
34
  ## module __all__: ${e.allExports}`),e.exports&&e.exports.length&&t.push(`
35
35
  ## re-exported symbols: ${e.exports.join(", ")}`),e.tests.length&&t.push(`
36
36
  ## covering tests: ${e.tests.join(", ")}`),e.cochange&&e.cochange.length&&t.push(`
37
37
  ## usually changed together: ${e.cochange.map(n=>`${n.label} (\xD7${n.weight})`).join(", ")}`),t.length===1&&t.push("(no omitted sections \u2014 the lean bundle already contained everything for this symbol.)"),t.join(`
38
- `)}function fd(e,t){let n=[`Edit context for ${e.moduleLabel} (graph-only bundle \u2014 siblings/registration/tests are real graph truth; no source body without a source-capable provider).`];if(t.registration&&e.globals.length){n.push(`
38
+ `)}function Ed(e,t){let n=[`Edit context for ${e.moduleLabel} (graph-only bundle \u2014 siblings/registration/tests are real graph truth; no source body without a source-capable provider).`];if(t.registration&&e.globals.length){n.push(`
39
39
  ## registration / module globals (replicate this pattern):`);for(let s of e.globals)n.push(` ${s.label} = ${s.value}${s.site?` [:${s.site.start}]`:""}`)}if(t.classMembers&&e.classMembers&&e.classMembers.members.length){n.push(`
40
- ## members of ${e.classMembers.className}:`);for(let s of e.classMembers.members){let o=String(s.label).split(".").pop(),r=s.params!=null&&s.params!==""?`(${s.params})${s.returns?` -> ${s.returns}`:""}`:"",i=s.decorators?`@${s.decorators} `:"",a=s.raises?` raises=${s.raises}`:"";n.push(` ${s.class} ${o}${s.site?` :${s.site.start}`:""} ${i}${o}${r}${a}`)}}if(t.siblings&&e.siblings.length){n.push(`
41
- ## sibling symbols to copy the style of (most relevant first; ${e.siblings.length} total):`);for(let s of e.siblings.slice(0,e.siblingCap)){let o=s.decorators?`@${s.decorators} `:"",r=s.raises?` raises=${s.raises}`:"";n.push(` ${s.class} ${s.label}${s.site?` :${s.site.start}`:""} ${o}${r}`)}e.siblings.length>e.siblingCap&&n.push(` \u2026+${e.siblings.length-e.siblingCap} more`)}return t.allExports&&e.allExports&&n.push(`
40
+ ## members of ${e.classMembers.className}:`);for(let s of e.classMembers.members){let o=String(s.label).split(".").pop(),i=s.params!=null&&s.params!==""?`(${s.params})${s.returns?` -> ${s.returns}`:""}`:"",r=s.decorators?`@${s.decorators} `:"",a=s.raises?` raises=${s.raises}`:"";n.push(` ${s.class} ${o}${s.site?` :${s.site.start}`:""} ${r}${o}${i}${a}`)}}if(t.siblings&&e.siblings.length){n.push(`
41
+ ## sibling symbols to copy the style of (most relevant first; ${e.siblings.length} total):`);for(let s of e.siblings.slice(0,e.siblingCap)){let o=s.decorators?`@${s.decorators} `:"",i=s.raises?` raises=${s.raises}`:"";n.push(` ${s.class} ${s.label}${s.site?` :${s.site.start}`:""} ${o}${i}`)}e.siblings.length>e.siblingCap&&n.push(` \u2026+${e.siblings.length-e.siblingCap} more`)}return t.allExports&&e.allExports&&n.push(`
42
42
  ## module __all__: ${e.allExports}`),t.reexports&&e.exports&&e.exports.length&&n.push(`
43
43
  ## re-exported symbols: ${e.exports.join(", ")}`),t.insertionRegion&&(e.insertionRegion?n.push(`
44
44
  ## insertion region starts at ${e.moduleLabel}:${e.insertionRegion.start} (write your new sibling here \u2014 no source body in this graph-only bundle).`):e.insertion&&n.push(`
45
45
  ## insert the new sibling after line ~${e.insertion} (end of the last top-level definition).`)),t.tests&&e.tests.length&&n.push(`
46
46
  ## covering tests: ${e.tests.join(", ")}`),t.cochange&&e.cochange&&e.cochange.length&&n.push(`
47
47
  ## usually changed together (consider editing these too): ${e.cochange.map(s=>`${s.label} (\xD7${s.weight})`).join(", ")}`),n.join(`
48
- `)}function md(e,t){let n=[];for(let s of Ee(e,"cochange"))s.subject===t?n.push({label:s.objectLabel||s.object,weight:s.weight||0}):s.object===t&&n.push({label:s.subjectLabel||s.subject,weight:s.weight||0});return n.sort((s,o)=>o.weight-s.weight)}function hd(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=md(e,n);if(!o.length)return`${s}: no change-coupling recorded (rarely co-committed, or outside the git-log window).`;let r=o.slice(0,na).map(i=>`${i.label} (\xD7${i.weight})`);return`${s} \u2014 usually changes together with ${o.length} module(s) (edit these too):
49
- ${r.join(`
50
- `)}`+(o.length>na?`
51
- \u2026+${o.length-na} more`:"")}function gd(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=Ee(e,"reexports").filter(i=>i.subject===n);if(!o.length)return`${s}: no public exports recorded (no export list / __all__ found, or none resolved).`;let r=o.slice(0,sa).map(i=>{let a=e.byId.get(i.object),l=a?vt(a):null,c=l?` \u2190 ${l.path}`:"";return`${i.objectLabel||i.object}${c}`});return`${s} \u2014 public API (${o.length} export(s)):
52
- ${r.join(`
53
- `)}`+(o.length>sa?`
54
- \u2026+${o.length-sa} more`:"")}var xu,Nu,Su,hb,bb,ea,wb,Or,yb,vb,$b,Fu,xb,kb,Eb,Sb,jb,_b,Rb,Ab,Tb,Cb,Ib,Ob,Lb,Nb,Mb,Pb,Fb,Db,zb,Ub,Bb,Wb,qb,Gb,Vb,ju,Hb,Kb,Du,zu,Uu,Yb,Xb,Jb,Qb,Zb,Ru,Au,nw,Tu,Cr,Cu,Iu,Ou,Do,Me,ow,rw,Xu,iw,Mt,ed,aw,ud,lw,uw,dw,pw,fw,mw,hw,gw,ta,Lu,Lr,bw,na,sa,Ce=L(()=>{Vn();Xs();Yi();Fo();ks();xu={"mgx:importsnamespace":"imports","mgx:callscoarse":"calls","seon:declaresmethod":"defines","mgx:testscoverage":"tests","mgx:touchedbycommit":"touches","seon:containscodeentity":"contains","seon:hassupertype":"inherits","mgx:changecoupledwith":"cochange","mgx:reexports":"reexports","mgx:touchessymbol":"touchesSymbol","mgx:callssymbol":"callsSymbol","seon:usescomplextype":"imports","seon:invokesmethod":"calls","seon:history":"touches","mgx:subclassof":"inherits","mg:imports":"imports","mg:calls":"calls","mg:defines":"defines","mg:tests":"tests","mg:touches":"touches","mgx:saidinsession":"saidInSession","mgx:inreplyto":"inReplyTo","mgx:statedby":"statedBy","mgx:canonicalisedfrom":"canonicalisedFrom"};Nu=e=>/^(git|turn):/.test(String(e||""));Su=30,hb=8;bb=2,ea=25,wb=3;Or=10,yb=8,vb=3,$b=2,Fu=5,xb=4,kb=.2,Eb=.35,Sb=.15,jb=e=>/(^|\/)(examples?|fixtures?|samples?|demos?|benchmarks?|test-[^/]+)(\/|$)/.test(e),_b=.2,Rb=.35,Ab=.2,Tb=.35,Cb=e=>/\.cs$/i.test(e),Ib=e=>/^I[A-Z]/.test(String(e||"")),Ob=.2,Lb=.35,Nb=50,Mb=.2,Pb=.35,Fb=.5,Db=Fu,zb=3,Ub=4,Bb=1,Wb=.9,qb=.5,Gb=.2,Vb=.35,ju=4,Hb=2,Kb=[["imports"],["calls","callsSymbol"],["inherits"],["cochange"]],Du=3,zu=12,Uu=.9,Yb=["imports","calls","callsSymbol","inherits"],Xb=.5,Jb=.6,Qb=.2,Zb=.35;Ru=128,Au=4,nw=64,Tu=250,Cr=class extends Error{};Cu=new WeakMap;Iu=40,Ou=40,Do=30;Me=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value||"";ow=25,rw=15;Xu=40,iw="tests edges are recorded module to module, so this is module-grain coverage.";Mt=15;ed=new Set(["Function","Method"]);aw=8;ud={function:"Function",class:"Class",method:"Method",attribute:"Attribute"};lw=8,uw=16,dw=4,pw=6,fw=12,mw=2,hw=8,gw=3,ta=e=>String(e||"").split(",").map(t=>t.trim()).filter(Boolean),Lu=e=>String(e||"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),Lr=e=>{let t=String(e||"").trim();return t?t.split(",").map(n=>n.trim()).filter(Boolean).length:0},bw=e=>{let t=new Map,n=e[0]??0,s=0;for(let o of e){let r=(t.get(o)||0)+1;t.set(o,r),r>s&&(s=r,n=o)}return n};na=20;sa=40});function Ve(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function kd(e){let t=String(e||"");return bd&&(t=t.replace(bd," ")),t.replace(/\s+/g," ").trim()}function Ed(e){let t=String(e||"");t=t.replace(Fw," ").replace(/\s+/g," ").trim();for(let n=0;n<3;n++){let s=t,o=t.match(Nw);if(o&&(t=o[1].trim()),o=t.match(Mw),o&&(t=o[1].trim()),o=t.match(wd),o&&(t=o[1].trim()),o=t.match(yd),o&&(t=o[1].trim()),o=t.match(vd),o&&(t=o[1].trim()),o=t.match(Pw),o&&(t=o[1].trim()),o=t.match($d),o&&(t=o[1].trim()),o=t.match(Dw),o&&(t=o[1].trim()),o=t.match(zw),o&&Kn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(Uw),o&&Kn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(Bw),o&&Kn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(Ww),o&&Kn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(qw),o&&Kn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(Gw),o&&Kn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(Vw),o&&(t=`what ${o[2].toLowerCase()} ${o[1].trim()}`),o=t.match(Hw),o&&(t=`what does ${o[1].trim()} mean`),o=t.match(Kw),o){let r=o[1].trim();Lw(r)||(t=Cw.test(r)||Kn.test(r)?r:`describe ${r}`)}if(o=t.match(Yw),o){let r=o[1].trim();(Kn.test(r)||Xw.test(r)||$d.test(r)||wd.test(r)||vd.test(r)||yd.test(r))&&(t=r)}if(t===s)break}return t}function Zw(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t,o=t.match(Jw);if(o&&(t=o[1].trim()),o=t.match(Qw),o&&(t=o[1].trim()),t===s)break}return t}function ty(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t.match(ey);if(!s)break;let o=s[1].trim();if(!o||o===t)break;t=o}return t}function oy(e){let t=String(e||""),n=t.match(sy);if(n){let o=jd[n[1].toLowerCase()],r=Sd[n[2].toLowerCase()];return`${o} ${r} ${n[3].trim()} and ${n[4].toLowerCase()}`}let s=t.match(_d);return s?`which modules transitively import ${s[1].trim()}`:t}function Mr(e){return String(e||"").replace(kw,t=>zi[t.toLowerCase()])}function Ss(e){let t=Mr(e);return t=t.replace(Ew,n=>Ui[n.toLowerCase()]),t=t.replace(Sw,n=>Bi[n.toLowerCase()]),t=t.replace(jw,"with"),t=t.replace(_w,(n,s)=>`${s} for`),t=t.replace(Rw,(n,s)=>`for ${s}`),t=t.replace(Aw,(n,s)=>s),t=t.replace(ry,"$1$2"),t=t.replace(Jl,"$1ing"),t=Ed(t),t=ty(t),t=Zw(t),t=oy(t),t=kd(t),t=Kt(t),t=t.replace(/\?{2,}\s*$/,"?"),t.replace(/\s+/g," ").trim()}function zo(e){for(let t of[...Zl,...Ql]){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function ua(e){for(let t of iy){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function Rd(e){let t=String(e||"").match(ay);if(!t)return null;let n=t[1].toLowerCase(),s=t[2].trim();return s?{entWord:n,predicate:s}:null}var xw,kw,xd,Ew,Sw,jw,_w,Rw,Aw,Tw,bd,Cw,Kn,Iw,Ow,Lw,Nw,Mw,wd,yd,vd,Pw,Fw,Dw,zw,Uw,Bw,Ww,qw,Gw,Vw,Hw,Kw,Yw,Xw,$d,Jw,Qw,ey,Sd,jd,ny,sy,_d,ry,iy,ay,st,Xt,ge,Yn=L(()=>{An();xw=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Ve).join("|")+")\\b","gi"),kw=xw(zi),xd=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Ve).join("|")+")\\b(?!\\.[a-z0-9])","gi"),Ew=xd(Ui),Sw=xd(Bi),jw=/(?<=^|\s)w\/(?=\s|$)/gi,_w=/\b(thx|thanks|thank\s+you|many\s+thanks|ty|cheers)\s+4\b/gi,Rw=/\b4\s+(example|instance)\b(?!\s*[a-z])/gi,Aw=/\b(this|that)\s+(class|module|function|method|attribute|variable|file|commit)\b/gi,Tw=Object.keys(pe).sort((e,t)=>t.length-e.length).map(Ve).join("|"),bd=Oo.length?new RegExp("\\b("+[...Oo].sort((e,t)=>t.length-e.length).map(Ve).join("|")+")\\b\\s*,?","gi"):null;Cw=new RegExp("\\b(?:"+Object.keys(pe).sort((e,t)=>t.length-e.length).map(Ve).join("|")+")\\b","i"),Kn=/^(?:which|what|who|whose|where|when|why|how)\b/i,Iw=new Set(["modules","files","functions","methods","classes","attributes","fields","properties","variables","globals","commits","changes","tests","members"]),Ow=/^(?:all\s+|the\s+)?(?:module|file|function|method|class|attribute|field|property|variable|global|commit|change|test|member)\??$/i,Lw=e=>{if(Ow.test(e))return!0;let t=e.replace(/\?+\s*$/,"").trim().split(/\s+/);return Iw.has((t[t.length-1]||"").toLowerCase())},Nw=/^(?:hi|hiya|hello|hey|yo|howdy|g'?day|yeah\s+nah|good\s+(?:morning|afternoon|evening|day)|greetings|salutations)(?:\s+(?:there|pardner|folks|friend|mate))?\s*[,.—–-]\s*(?:(?:just\s+a\s+)?quick\s+question\s*[,:—–-]?\s*)?(.+)$/i,Mw=/^(?:thanks|thank\s+you|many\s+thanks|thx|ty|cheers)(?:\s+(?:so\s+much|a\s+lot|very\s+much|a\s+bunch))?\s*[,—–-]\s*(?:(?:just\s+a\s+)?quick\s+question\s*[,:—–-]?\s*)?(.+)$/i,wd=/^(?:(?:ok(?:ay)?|aight|cool|alright|sure|right|fine|great|nice|got it|gotcha|sounds good|no worries|no problem|(?:just\s+)?(?:one|another)\s+more|another\s+one)[\s,]+)+(.+)$/i,yd=/^(?:just\s+(?:poking\s+around|looking\s+around|browsing|exploring|checking\s+(?:this|it)\s+out)|first\s+time\s+(?:trying\s+this\s+out|using\s+this|here)|i'?m\s+new\s+(?:here|around\s+here|to\s+(?:this|all\s+this)(?:\s+(?:repo|codebase|project|app|tool|thing))?))\s*[,.—–-]\s*(.+)$/i,vd=/^(?:(?:maybe|possibly|perhaps)\s+)+(.+)$/i,Pw=/^(?:please[\s,]+)+(.+)$/i,Fw=/,?\s*if\s+(?:it'?s|it\s+is|that'?s|that\s+is)\s+not\s+too\s+much\s+(?:trouble|bother|hassle)\s*,?\s*/i,Dw=/^(?:can|could|would|will)\s+you\s+(?:please\s+)?(.+?)(?:[,\s]+please)?\??$/i,zw=/^explain\s+(?:to\s+me\s+|please\s+)*(.+?)\??$/i,Uw=/^tell\s+me\s+(?:please\s+)?(.+?)\??$/i,Bw=/^(?:(?:would|do)\s+you\s+)?mind\s+telling\s+(?:me|us)\s+(?:please\s+)?(.+?)\??$/i,Ww=/^do\s+you\s+know\s+(.+?)\??$/i,qw=/^i(?:'d|\s+would)?\s+(?:(?:like|want|need)\s+to|wanna)\s+know\s+(.+?)\??$/i,Gw=/^i(?:\s+was|\s+am|'m)?\s+(?:just\s+)?(?:wonder(?:ing|ed)?|curious)(?:\s+(?:if|whether|about))?\s+(.+?)\??$/i,Vw=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+(is|are)\??$/i,Hw=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+means\??$/i,Kw=/^(?:show|give)\s+me\s+(?:the\s+)?(.+?)\??$/i,Yw=/^(?:and|also|so|then|now|but)\s+(.+)$/i,Xw=/^(?:does|do|did|is|are|was|were|has|have|had|can|could|will|would|should)\b/i,$d=/^(?:(?:actually|no\s+wait|wait|hold\s+on|never\s+mind|scratch\s+that|on\s+second\s+thought|i\s+mean(?:t)?)[\s,.]+)+(.+)$/i;Jw=/^(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+?,\s*(.+)$/i,Qw=/^(.+?),\s*(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+$/i;ey=/^.+?(?:\s*(?:--|—|-)\s*)?\b(?:sorry|i\s+mean)\b\s*(?:--|—|-|,|:)\s*(.+)$/i;Sd=Object.freeze({imports:"importing",calls:"calling",touches:"touching",tests:"testing",exports:"exporting",contains:"containing",defines:"defining",uses:"using","inherits from":"inheriting from"}),jd=Object.freeze({module:"modules",class:"classes",function:"functions",method:"methods",attribute:"attributes",variable:"variables",commit:"commits",file:"files"}),ny="public|private|protected|static|abstract|constant|re-?exported|exported|tested|covered|untested|uncovered",sy=new RegExp("^if\\s+(?:a|an|the)?\\s*("+Object.keys(jd).join("|")+")\\s+("+Object.keys(Sd).join("|")+")\\s+(.+?),\\s*(?:is|are)\\s+(?:it|that|they|this)\\s+("+ny+")\\??$","i"),_d=/^if\s+(.+?)\s+(?:were|was)\s+(?:deleted|removed),?\s*what\s+(?:would|might|could)\s+(?:break|fail|be\s+affected)\??$/i;ry=new RegExp(`^(where\\s+(?:is|are|was|were)\\s+.+?)\\s+(?:${Kl.map(Ve).join("|")})(\\s*[?.!]*)$`,"i");iy=Object.freeze([{re:/^what\s+(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:are|is)\s+(?:in|inside|within)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:does|do)\s+(.+?)\s+have\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+are\s+(?:the\s+)?(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:of|in|inside|within)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^(?:the\s+)?(?:members?|methods?|attributes?|contents)\s+of\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+is\s+(?:in|inside)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+else\s+is\s+(?:in|inside)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+(?:defined|declared)\s+(?:the\s+)?(?:function\s+|method\s+|class\s+|module\s+|variable\s+|constant\s+)?(.+?)\??$/i,to:e=>`where is ${e[1]} defined`},{re:/^where'?s\s+(?:the\s+)?(.+?)\s+(defined|declared|located|implemented)\??$/i,to:e=>`where is ${e[1]} ${e[2]}`},{re:/^were\s+is\s+(?:the\s+)?(.+?)\s+(defined|declared|located|implemented)\??$/i,to:e=>`where is ${e[1]} ${e[2]}`},{re:/^what\s+is\s+the\s+purpose\s+of\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\??$/i,to:e=>`what is a ${e[1]}`},{re:new RegExp(`^what\\s+does\\s+(?:the\\s+)?(?!(?:an?|it|this|that|these|those)\\s)(.+?)\\s+do\\s+(?:${Di.map(Ve).join("|")})\\??$`,"i"),to:e=>`what is a ${e[1]}`},{re:/^(?:which|what)\s+(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+(?:are|is)\s+(public|private|protected|static|abstract|constant|exported|re-?exported|tested|covered|untested|uncovered)\??$/i,to:e=>`${e[2].toLowerCase()} ${e[1].toLowerCase()}`},{re:/^what\s+(?:is|are)\s+(not\s+)?(tested|untested|covered|uncovered)\??$/i,to:e=>{let t=e[2].toLowerCase();return`${e[1]?t==="tested"?"untested":t==="covered"?"uncovered":t:t} modules`}},{re:/^what\s+does\s+(.+?)\s+changes?\s+together\s+with\??$/i,to:e=>`what co-changes with ${e[1]}`},{re:/^what\s+changes?\s+together\s+with\s+(.+?)\??$/i,to:e=>`what co-changes with ${e[1]}`},{re:/^how\s+many\s+commits\s+(?:are|were)\s+(?:recorded|logged)\s+(?:for|against)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`how many commits touched ${e[1]}`},{re:/^who\s+(?:wrote|authored)\s+(?:the\s+)?(?!(?:commit\s+)?[0-9a-f]{7,40}\??$)(.+?)\??$/i,to:e=>`who touched ${e[1]}`},{re:/^who\s+is\s+the\s+authors?\s+of\s+(?:the\s+)?(?!(?:commit\s+)?[0-9a-f]{7,40}\??$)(.+?)\??$/i,to:e=>`who touched ${e[1]}`},{re:/^(?:does|do)\s+(?!.*\bnot\b)(.+?)\s+have\s+(?:any\s+)?(?:tests?|test\s+coverage|coverage)\??$/i,to:e=>`what tests ${e[1]}`},{re:/^(?:is|are)\s+(?!.*\bnot\b)(.+?)\s+tested\??$/i,to:e=>`what tests ${e[1]}`},{re:/^what\s+needs\s+(?:to\s+be\s+)?(?:a\s+)?(?:tested|tests?|testing|coverage|covering)\??$/i,to:()=>"untested modules"},{re:/^(?:which|what|list|show(?:\s+me)?|find)?\s*(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+(?:(?:that|which)\s+)?(?:have|has|having|with)\s+no\s+tests?\??$/i,to:e=>`untested ${e[1].toLowerCase()}`},{re:/^(?:which|what|list|show(?:\s+me)?|find)?\s*(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+without\s+(?:any\s+)?tests?\??$/i,to:e=>`untested ${e[1].toLowerCase()}`},{re:new RegExp(`^(?:do|does)\\s+(.+?)\\s+(${Tw})\\s+(?:anything|something)(?:\\s+else)?\\??$`,"i"),to:e=>`what does ${e[1]} ${e[2]}`}]);ay=new RegExp("^(?:which|what|who|list|show(?:\\s+me)?|find|give\\s+me)?\\s*(?:the\\s+|all\\s+)?([a-z][a-z-]*)\\s+(?:(?:that|which|who)\\s+)?(?:(?:do|does|did|are|is|was|were|have|has|can|could|will|would|should)\\s+not|cannot|can't|won't|couldn't|shouldn't|wouldn't|not)\\s+(.+)$","i");st=new Set(["what","who","which","where","when","why","how","does","do","did","is","are","was","were","the","a","an","of","to","from","at","in","on","there","something","anything","nothing","one","any","anywhere","last","usually","typically","generally","normally","often","commonly","mostly","should","would","could","can","will","shall","might","must"]),Xt=e=>String(e).replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),ge=e=>e.flatMap(t=>String(t).toLowerCase().split(" "))});var Td,Ad=L(()=>{Td={source:"corpus/wordnet/*.jsonl lemmas, expanded through the regular -s/-ed/-ing inflections",generator:"scripts/generate-real-word-collisions.mjs",targets:["alongside","build","builds","built","call","calling","calls","change","changed","changes","check","checks","class","co-change","co-changes","code","commits","contain","containing","contains","couple","couples","cover","covers","declare","declares","define","defined","defines","defining","depends","derive","derives","directly","edited","execute","executes","exercise","exercises","explicitly","export","exporting","exports","expose","exposes","extend","extending","extends","fire","fires","from","grab","grabs","have","hits","hold","holds","hooked","import","importing","imports","included","indirectly","inherit","inheriting","inherits","inside","into","invoke","invokes","kick","kicks","kind","land","landed","lean","leans","live","lives","make","makes","modified","modifies","move","moves","parent","part","pass","passes","pull","pulls","re-export","re-exports","reference","references","relies","rely","require","requires","runs","share","shares","sits","subclass","subclasses","subclassing","superclass","superclasses","sure","talk","talks","tend","tends","test","testing","tests","through","together","touch","touched","touches","touching","transitively","trigger","triggers","tweaked","updated","uses","using","usually","verifies","verify","went","were","wired","with"],words:["aalging","aasing","aave","ablies","abling","aboves","absing","abuses","abusing","acauling","achinged","acolds","acquire","acquires","acyling","adelies","adenine","adenined","adenines","adenining","aditted","aerides","aerified","aerifies","aerify","affine","affined","affines","affining","afire","afires","afling","agalling","ailing","aired","airied","airies","airport","airporting","airports","airsed","airses","airted","alaing","alases","albing","alecks","aleves","aliaes","alikes","alines","alive","alives","allaing","allies","alling","alls","allying","alongsided","alongsides","alping","alting","altogether","amasses","amazes","amends","amorting","amorts","amuses","amusing","analling","anded","anoded","ansing","anuses","apart","aparts","apises","apparent","appends","appose","apposes","apsing","apsises","arab","arabis","arabs","ardent","argent","arpent","arrive","arrives","arsing","asaing","asding","aseans","ases","ashing","ashore","ashores","asing","asking","asping","asring","asses","assess","assets","assing","assure","attending","attest","attesting","attests","audited","aufing","auging","auking","aurifies","aurify","avouch","avouched","avouches","avouching","awaked","awakes","awared","awares","awling","awried","axling","baases","badded","bailed","bailing","baited","bake","bakeds","bakers","bakes","balded","balding","baling","balk","balking","balks","ball","balling","balls","ballsing","ballying","balming","band","banded","bandeds","bandied","bandsed","banked","banned","barded","barelies","barely","barses","bart","baseses","bashes","basing","basises","bass","bassed","basses","basset","bassets","bassos","bastes","basting","batses","bauded","baulks","bawded","bawling","bbsing","beaked","bean","beanos","beans","beasting","beasts","beating","beeting","begild","begilds","behave","behold","beholds","belied","belief","beliefs","belies","belikes","belizes","belles","bellies","belling","belting","bend","bended","bends","bent","benting","besets","besots","besses","bessing","best","besting","bests","beting","betting","bevies","bhanged","biered","bigger","biggers","billing","bind","binded","birded","birled","birles","biroed","birred","bising","bjsing","bladed","blanced","bland","blanda","blandaed","blanded","blands","blanked","blares","blases","blasts","bleaked","bleaks","blears","bleats","blended","blends","blesting","blests","blinded","blinds","blited","blites","bloked","blonded","bmuses","bnsing","boched","boches","boching","bocked","bode","bodilied","bodilies","boiled","boileds","bokked","bold","bolds","bolling","bonded","boners","bonked","boobed","booked","bookeds","bookend","booker","bookied","booksed","boomed","booned","boored","booted","boozed","borers","borough","bosked","bosses","botched","botches","botching","boucheed","bouchees","boucle","boucled","boucling","boughed","boughing","boules","boulle","boulles","bouses","bousing","bowers","boxers","bpsing","bragger","braggers","brakes","branded","brasses","breaked","bricks","brigged","brills","broked","brooked","bruins","brunts","brunus","bses","bsing","bugled","bugles","buhled","builders","buildups","bull","bulled","bullet","bulling","bulls","buns","bunses","bunsing","buried","burieds","burled","burleds","buses","bushes","bushing","busied","busies","busking","bussing","busying","buyied","buying","bypass","bypasses","caballing","cabals","cabbing","cabers","cabged","cabging","cables","cablin","cabling","cablins","caching","cackling","cadded","cadding","cadent","cadged","cadges","cadging","cadring","cafers","caffing","cafing","cagers","caging","cagying","caining","cajoling","cake","cakes","cakiling","caking","calcine","calean","caleans","caleying","caleys","calf","calfing","calfs","califs","calkin","calking","calkins","callaing","callas","callers","callinged","callings","callous","callowing","callows","calluna","callus","calm","calming","calmings","calmlying","calms","calquing","calvaing","calvas","calves","calving","calvings","calx","calxes","calxing","calycling","calyxing","camass","camelling","camels","camming","camoing","camping","canaing","canalling","canals","candid","candied","candled","candling","cangue","cangued","cangues","caning","canning","canoes","canting","cantling","capers","caping","caplin","caplins","capoing","capping","captain","captaining","captains","carded","carding","caring","carking","carlina","carline","carling","carlings","carlos","carning","caroling","carolling","carols","carping","carring","cart","carting","carver","carvers","carving","casaing","cashes","cashing","casking","cassies","castes","castling","casually","casuses","caters","catling","catlings","catses","catsing","catting","cattling","caul","cauline","cauling","caulking","cauls","cavaing","cave","caverns","cavilling","cavils","caving","cavying","cawing","caying","ceases","cecalling","cede","cedied","ceiling","cell","celling","celloing","cellos","cells","cellsing","cent","centing","cercises","cere","cerise","cerises","certain","certaining","certains","certifies","certify","certing","cfling","cgsing","chadded","chafed","chaffed","chafinged","chagaed","chagas","chagga","chaggaed","chaggas","chained","chainsed","chainses","chaired","chaise","chaised","chaises","chaited","chaits","chajaed","chalked","chalking","challis","champed","chanal","chanals","chanar","chanars","chance","chanced","chancels","chances","chancied","chancies","chancre","chancred","chancres","chancy","changers","channels","chanted","chanters","chanteys","chantied","chanties","chanty","chaosed","chaoses","chapped","charded","chards","charge","charged","chargers","charges","charied","charmed","charms","charred","charrs","charted","charts","chased","chasmed","chasms","chassed","chaste","chasted","chastes","chatted","chaunaed","chaused","chauses","chawed","cheaps","cheats","checkeds","checkers","checksum","checkups","cheek","cheeks","cheeps","chelas","chenned","cheops","cherts","chesting","chewas","chianed","chick","chicks","chigger","chiggers","chiling","chilling","chills","chinaed","chined","chines","chinked","chinks","chinned","chinoed","chirks","chits","chives","choanaed","chock","chocked","chocks","choked","choker","chokers","choler","cholers","chonned","choosed","chords","chores","chough","chuaned","chuck","chucks","chugged","chunga","chungaed","chungas","chunked","chunks","chyling","cialis","cicers","ciders","circed","circes","cive","cives","civies","cladded","claded","clades","clading","clads","claims","clamps","clams","clamses","clanged","clangers","clanks","clans","claps","clarks","claros","clash","clashes","clasp","clasps","classed","classic","classy","clast","clasts","clausa","clausas","clause","clauses","claver","clavers","clavus","clawing","claws","claying","clays","clean","cleans","cleanse","clerks","clever","clevers","cliing","climes","clinged","cloaks","clocks","closer","closers","closes","cloved","cloven","clovens","clover","clovers","clucks","cluing","clving","clxing","cnsing","coached","coaches","coaching","coaling","coasts","coaxer","coaxers","cobber","cobbers","cobble","cobbles","cocain","cocaining","cocains","cocked","cocker","cockers","cockle","cockles","coda","codaed","codded","coddles","coded","coders","codes","codex","codgers","codified","codifies","codling","cods","coed","coeurs","coffer","coffers","coggle","coggles","coheres","coiling","coiner","coiners","coired","coke","colaing","cold","colded","colding","colds","cole","coleus","coliing","coling","colling","collins","collying","colors","coltan","coltanning","coltans","colter","colters","colting","comalling","combats","comber","combers","come","comer","comers","comfies","comfit","comfits","comics","comints","comity","commas","comments","commes","commie","commied","commies","comming","commit","commix","commixes","commons","commute","commutes","compel","compels","compile","compiles","complies","comply","comport","comporting","comports","conched","conches","conching","concluded","cone","coneys","confer","confers","confining","confits","conged","conger","congers","conges","conjoin","conjoining","conjoins","conked","conker","conkers","constrain","constraining","constrains","contact","contacting","contacts","contadinoing","contadinos","contagion","contagioning","contagions","containeds","containers","contemn","contemning","contemns","continuing","contrail","contrailing","contrails","contriting","contriving","converse","converso","converts","convex","convey","conveys","convoke","convokes","cooked","cookeds","cookers","cookied","cooled","cooler","coolers","cooling","cooned","cooped","cooper","coopers","cooted","cooter","cooters","copalling","cope","copeck","copecks","copier","copiers","copies","copper","coppers","copses","copula","copulas","coralling","corded","core","coreference","coreferences","corer","corers","corked","corker","corkers","corner","corners","corpse","corpses","corvee","corvees","cosecs","cosher","coshers","cosmics","cosmids","cosses","costing","cotanning","cotans","cote","cotter","cotters","couch","couched","couches","couching","coude","couded","coue","coughed","coughing","coupe","coupes","coupleds","couplers","couplets","coupon","coupons","course","courses","couthed","couthing","coved","coven","covens","covereds","coverts","covet","covets","covey","coveys","cower","cowers","cowling","cowpie","cowpies","cozens","cpsing","crab","crabs","cracks","cradling","cragged","crakes","craned","cranes","cranked","cranned","crass","crasses","crawling","crawls","creaked","creaks","credited","creeks","cresting","crests","criers","cringe","cringed","cringes","crocks","crooked","crouch","crouched","crouches","crouching","croupe","croupes","crumple","crumples","cruses","crusing","cses","csing","ctened","ctenes","cubing","cuking","culling","culming","culting","cupalling","cupels","cupsing","cupule","cupules","cure","curing","curling","curses","cursing","curtain","curtaining","curtains","cusking","cusping","cussing","cuting","cutlass","cutses","cutsing","cxling","cxlving","cyanned","cyanoed","cycling","cyders","cymling","cysting","dadded","dahling","dailing","daises","daling","dall","dalliing","dalling","dallis","dalls","dallying","daloing","danced","dander","dandied","dandled","danked","dansed","danses","darded","darling","dart","dashes","dassed","dassies","dative","datives","dayses","ddsing","deafened","deafening","deafing","deaing","dean","deaned","deaning","deans","dearie","dearies","debiled","debiling","debone","deboned","debones","deboning","debrises","debted","debting","decade","decades","decalling","decease","deceases","deceive","deceives","decents","decided","deciding","deciled","deciling","declaim","declaims","declareds","declarers","declaw","declined","declining","decode","decouple","decouples","decries","deepens","deface","defaced","defaces","defacing","defame","defamed","defames","defaming","defang","defanged","defanging","defangs","defence","defenced","defences","defencing","defended","defending","defends","defensed","defenses","defensing","deference","deferences","deferenses","defiance","defianced","defiances","defiancing","defiant","defianted","defianting","defiants","defied","defies","defile","defiled","defilers","defiles","defiling","defininged","definings","definited","definites","definiting","deflate","deflates","deftness","defuse","defused","defuses","defusing","deglaze","deglazes","deicing","deified","deifying","deigned","deigning","deisted","deisting","deists","deitied","delfing","deliing","delivers","delling","demands","demised","demising","denied","denned","denning","dent","dented","dentine","dentined","dentines","denting","dentining","depart","depend","depended","deplane","deplanes","deplore","deplores","depone","deponed","deponing","depose","deposes","deprave","depraves","deprive","depriveds","deprives","derate","derates","derbies","deride","derides","deriding","derisive","derisives","deriveds","deriving","dermises","derpies","derrises","descends","designed","designing","desired","desiring","desking","desponds","dessing","destined","destines","destining","destiny","detained","detaining","detents","detest","detesting","detests","detinue","detinued","detinues","detinuing","deuses","deusing","deveined","deveining","deviced","devicing","deviled","devised","devising","dewied","dewiness","dewing","dexone","dexoned","dexones","dexoning","dhalling","dholed","dholes","dick","dicks","dieted","digger","diggers","dilling","dining","dinted","dire","direct","directed","director","directory","directs","dired","dires","dirged","dirges","dirked","disport","disporting","disports","disses","ditaed","ditted","dive","dives","divest","divine","divined","divines","divining","dmuses","docked","doleds","dolling","domine","domined","domines","domining","doobed","doomed","doored","dopeds","dories","dorked","dosing","dosses","double","doubles","douched","douches","douching","doughed","doughing","douses","dousing","dove","doves","dowers","dozers","drab","drabas","drabs","dragger","draggers","drained","draining","drakes","dranged","drecks","drilies","drive","drivels","drivens","drivers","drives","drover","drovers","drunks","druses","drusing","drylies","dses","dsing","dsling","dtsing","ducing","duding","dudses","dudsing","duking","dulies","dull","dulling","dulls","dulses","dulsing","duning","duns","duoing","duping","duples","during","dusking","eagling","earling","earses","easies","easing","easted","easting","eating","eatses","ebitted","ebooked","ebsing","echted","eclats","ecting","eddaed","eddied","eddoed","edgied","edibled","edicted","editeds","editor","editted","edsing","edtaed","educed","eduled","eelses","eerilies","eerily","effort","efforting","efforts","efting","egesting","egests","eidoses","eiraed","elan","eland","elanded","elanned","elans","elanus","elated","elegans","elided","elinted","elited","elling","elocute","elocutes","elopses","elsing","eluted","elvers","emending","emiled","emitted","emoted","emotes","emsing","enated","encode","endived","ends","energise","energises","enquire","enquires","ensile","ensure","entendring","ententing","enting","epopses","eposes","equally","equine","equines","erectly","eroses","ersing","ersted","ersting","erting","erudited","escort","escorting","escorts","eses","esing","esports","esportsing","espouse","espouses","esquire","esquires","esting","ests","eternise","eternises","ethoses","evicted","evoked","evokes","exceed","exceeding","exceeds","exchange","exchanged","exchanges","excite","excited","excites","excluded","execrate","execrates","executeds","executive","executives","executors","exegete","exegetes","exercisers","exerciseses","exerting","exerts","exhort","exhorting","exhorts","exiled","existed","exitted","exodes","exorcise","exorcisers","exorcises","exorcism","exorcisms","exorcist","exorcists","exorcize","exorcizes","expand","expanding","expands","expanse","expanses","expats","expatting","expect","expecting","expects","expend","expending","expendings","expends","expense","expenses","expensing","expert","experting","expertise","expertises","experts","expiating","expiring","expiry","expirying","explicit","explicits","explode","explodes","exploit","exploiting","exploits","exploring","expoing","exporters","exportinged","exportings","expos","exposeds","exposing","exposure","exposures","express","exsert","exserting","exserts","extant","extanting","extants","extendeds","extent","extented","extenting","extents","extern","externa","externaing","externas","externed","externing","externus","extort","extorting","extorts","extruding","fabling","fadded","failing","failling","faire","faires","fairies","faited","fake","fakers","fakes","fall","falling","fallings","falls","fallsing","falses","falsing","fanned","farces","fare","fares","fart","fasces","fassed","fasting","fawkes","fcsing","feasting","feasts","feating","fecalling","feeting","feined","feining","feisting","feists","felids","feline","felined","felining","felises","fellies","felling","felting","fend","fended","fends","feres","ferined","ferining","fesses","fessing","feting","fetting","fevers","fibers","fibre","fibres","fice","fices","fide","fides","fiends","fierce","fierces","fieries","fieris","fife","fifes","figure","figures","file","filers","files","filets","filles","filling","filses","find","finded","fine","finers","fines","fining","fiords","fireds","firm","firmas","firmers","firms","firmus","firsts","firths","fishes","fisting","fitses","fixe","fixeds","fixers","fixes","fizzes","flakes","flange","flanges","flanked","flanned","flasks","flecks","flicks","fliers","flirts","focalling","fold","folds","folies","folked","fonded","fooded","fooled","footed","forces","fore","fores","forest","forges","forked","form","fortes","fosses","fountain","fountaining","fountains","foyers","fpsing","freaked","frieds","friers","fries","frigged","frog","froms","frores","fros","frsing","fsbing","fshing","full","fulling","fulls","fuming","funded","funs","furies","furzes","fuseds","fusees","fusels","fuses","fusing","fussing","fuzing","fwsing","gabling","gabs","gadded","gaeling","gaited","galaing","galing","gall","galliing","gallina","galling","gallings","gallis","galls","gallus","gand","ganded","gander","gandied","ganked","gaoling","garb","garbs","garded","garment","garnet","gaseses","gashes","gassed","gassies","gatling","gauched","gauches","gauching","gauded","gauling","gausses","gcsing","gean","geans","gelids","gellies","gelling","gelting","genies","gent","genting","gestaing","gestes","gesting","getting","gilling","girded","girled","giroed","gisting","give","givens","gives","gladded","gladed","glanced","gland","glanded","glands","glandsed","glansed","glares","glass","glasses","glassy","gleams","glean","gleans","glides","glises","gofers","gold","golds","gonded","goners","gooded","goofed","gooked","gooned","gooped","goosed","gorals","gouached","gouaches","gouaching","governs","gpsing","graces","grad","grades","grads","graf","grafs","grafts","grails","grains","gram","gramas","gramps","grams","gran","granded","grands","grange","granged","granges","grans","grants","grapes","graphs","grases","grasps","grass","grasses","grassy","gratas","grates","gratis","graves","gravis","gray","grays","grazes","greats","grebes","greylies","greyly","groaks","groans","groats","grouch","grouched","grouches","grouching","groves","grub","grubs","grunts","gruses","gsaing","gsring","guesting","guests","guiing","guild","guilds","guiled","guiles","guilt","guilty","guises","guising","gull","gulling","gulls","guns","guses","gushes","gushing","gussing","gutses","gutsing","guying","gyrans","habits","hacked","hadded","hagged","haicks","haiked","hailing","haired","haje","hakeas","hakes","halals","hale","halfing","haling","hall","halling","halls","halming","haloing","halting","halve","halved","halves","halving","hame","hand","handed","handeds","handel","hander","handied","handled","handsed","hanged","hangers","harded","harems","hares","harked","harold","harolds","hart","harvey","hashes","hassles","hastes","hasting","hate","hats","hauling","haved","haven","havens","haves","hawked","hawses","haze","heating","heave","heaved","heaven","heaver","heaves","hectare","hectares","hefting","heired","heisting","held","helds","helixes","helling","helves","here","hets","hetting","hexine","hexined","hexines","hexining","hexose","hexoses","hhsing","hiatus","hick","hicked","hicks","hies","hilling","hilts","hind","hinded","hinged","hinges","hins","hints","hips","hire","hired","hirers","hires","hirtas","hiss","hisses","hives","hivs","hoards","hoared","hoaxed","hobbed","hoboed","hocced","hocked","hockey","hodded","hods","hoed","hogged","hoists","hokaed","holcus","holders","holdups","hole","holed","holes","holeys","holism","hollas","hollos","holm","holms","holy","homers","homied","homoed","honied","honked","honker","honkey","honkied","honored","hooches","hooching","hood","hooded","hoodeds","hoods","hooeyed","hoofed","hoofeds","hoofer","hookah","hookeds","hooker","hookeri","hookers","hookied","hookies","hooksed","hookses","hookup","hooped","hoopoed","hoopsed","hooted","hooter","hooved","hooveds","hoovers","hopers","hopied","hopped","hopple","hopples","hopsed","horded","hordes","horned","horsed","hosing","hosted","hosting","hotbed","hots","hotsed","hotted","hounds","houred","housed","houses","housing","hover","hovers","hoyaed","hrts","hses","hsing","hucked","huging","hulked","hull","hulling","hullos","hulls","hunged","hunked","huns","huoned","hushes","hushing","husked","husking","husoing","huts","hyoids","ictalling","idioted","idlies","iising","ileals","illing","images","impact","impacting","impacts","impart","imparting","impartings","imparts","impasses","impends","implore","implores","imploring","impoliting","important","importeds","importeeing","importees","importers","importinged","importings","importune","importuning","imposing","impost","imposting","imposts","improving","impure","impures","impuring","imputing","inbuilt","incise","incite","inclined","inclosed","include","includeds","includes","income","incomes","indied","indirect","indirected","indirects","indite","indited","indole","indoles","inerting","inerts","inference","inferences","infidel","influxed","info","inhabit","inhabits","inhere","inhered","inherent","inherenting","inherents","inheriteds","inheritinged","inheritings","inheritors","inheritting","inhibit","inhibits","initio","inkied","inland","inlanded","inline","inosine","inquire","inquires","insane","insert","inserting","inserts","insided","insider","insiders","insides","insist","insoles","inspire","insted","insting","intake","intakes","intending","interim","interims","intermit","intermits","inti","intied","intoed","intones","intos","intro","intron","intros","intruded","invades","invert","inverting","inverts","invites","invoice","invoices","involve","involves","iodide","ipsing","ired","ires","ironside","irsing","iruses","ises","isiing","ising","island","islanded","isling","isming","isning","isring","itsing","iuding","jailing","jakes","janned","jawses","jean","jeans","jellies","jelling","jest","jesting","jestings","jests","jetting","jigger","jiggers","jirded","jive","jives","jocked","jokers","jooked","josing","josses","joules","jove","joves","juking","julies","juning","jure","juring","juses","jussing","justes","juting","kailing","kakkes","kalaing","kaliing","kaling","kalkas","karens","karling","kelpies","kelting","kepting","kerite","kerited","kerites","khanned","kianged","kickers","kied","killing","kilned","kina","kinaed","kinda","kindas","kindle","kindly","kinds","kine","kined","king","kinged","kinked","kinks","kinned","kino","kinoed","kins","kiosks","kirk","kirked","kirks","kisses","kith","kleins","klick","klicks","knacks","knocks","knucks","koined","kooked","kookied","kuiing","kvasses","kweeked","kylies","labbed","lacced","lacied","lacked","ladded","ladder","laddied","laded","ladied","ladled","ladling","laed","lagans","lagend","lagended","lagged","lahhed","lahued","laiced","laid","laided","lairded","lake","lakes","lakhed","lallying","lamaed","lambed","lament","lammed","lamnaed","lamped","lanaied","lanated","lanced","lancer","lances","lancet","landaued","landeds","lander","landers","landler","lands","lane","lang","langed","langued","lank","lankaed","lanked","lankied","lanned","lansaed","lanseh","lanset","lapped","lapsed","lapses","lard","larded","larder","larged","laried","larked","larred","lashed","lashes","lassas","lasses","lassies","lassos","lasted","lasting","latent","latest","latesting","latests","lathed","latked","latkes","latsed","latses","latted","lauans","laud","lauded","lauder","laudes","launced","launder","lavaed","laves","lavved","lawsed","lawses","laxaed","lazied","lead","leaded","leaden","leadens","leads","leaf","leafs","leak","leaked","leaks","leal","leals","leaners","leap","leaps","learn","learns","leases","leasting","leaven","leavens","ledded","lefting","legals","legends","lemnas","lemons","lended","lender","lends","lenifies","lenify","lens","lensed","lent","lented","lenting","leon","leones","leons","lesses","lessing","letting","levants","levees","levels","levited","lewded","lianaed","lianas","liared","libels","libred","lice","lices","lick","licks","lidded","lieded","lieges","lies","life","lifers","lifes","ligand","liganded","ligans","ligers","lignes","like","likeds","likens","likes","limans","lime","limens","limes","limeys","linden","lindied","line","lineds","linens","liners","lines","linged","linied","linked","linoed","linted","liraed","lirred","lises","lisles","listes","listing","lite","liters","lites","lithes","litred","livedos","livens","livers","livias","livids","llanoed","llanos","loached","loaches","loaching","loaded","loan","loans","localling","loched","loches","loching","locked","lode","lohans","loired","lolling","loners","longed","looked","looker","looksed","loomed","looned","looped","loosed","looted","lorded","losers","losing","losses","losting","louched","louches","louching","louded","loughed","loughing","loupes","louses","lousing","louver","louvers","lover","lovers","lowans","lowers","lsding","lubing","lueses","luesing","luging","lull","lulling","lulls","lunaed","lundaed","lunged","lunned","luoing","lure","luring","lushes","lushing","luting","luxing","lynxed","mace","macers","maces","maches","mackems","mackle","mackles","madake","madakes","madded","made","mades","maes","magens","mahoes","maided","mailing","maines","maired","maizes","makers","makeups","mako","makos","male","maleos","males","maliing","maliks","maling","mall","malling","malls","malsing","malting","mameys","mandaed","manded","mane","maneds","manes","manied","manies","mankies","manned","mansed","manxed","manxes","maples","mapling","mare","mares","marges","maries","markeds","markers","markets","marling","mart","martes","masers","mases","maskeds","maskers","mass","massed","masseds","masses","masting","mate","mateds","maters","mates","mateys","mattes","mauling","maunded","maxes","maybes","maze","mazeds","mazers","mazes","mazies","mealies","mean","means","meating","mediaed","mediated","medicied","meeting","meined","meining","melees","melias","melics","melting","mend","mended","mends","mere","merelies","merely","merited","mesaing","meshing","mesning","messes","messing","meting","metrifies","metrify","mick","micks","mike","mikes","milling","mind","minded","minified","minifies","minkes","mire","mired","mires","miried","miries","miroed","mising","misses","misting","mitred","mitres","mlsing","mocked","models","modems","modes","modest","modifieded","modifiered","modifiers","modished","modishes","modisted","modistes","modses","mogens","mohaves","mohses","moired","mojave","mojaves","mold","molds","mole","moles","molest","molles","mollified","mollifies","molling","molvas","mommies","monded","mondes","monels","moneys","monked","monses","montan","montanning","montans","montes","mooched","mooches","mooching","mooded","mooned","moored","moosed","mooses","mooted","mope","mopeds","mopes","more","morels","mores","morses","mortified","mortifies","moses","moseys","moshes","mosting","mote","motels","motes","motets","motiffed","motive","motives","moue","moues","moulds","mountain","mountaining","mountains","mousing","mouthed","mouthing","moveds","movie","movies","moxies","mpsing","mrsing","msbing","mscing","mses","msging","mshing","msing","muanged","muched","muches","muching","muling","mull","mullas","mulling","mulls","mullus","muming","musaing","musding","musers","muses","mushes","mushing","musing","musings","musking","mussing","muting","mutually","myalling","myalls","myopes","nadded","nailing","naives","nakeds","nalline","nanaed","nanced","nand","nanded","nandued","nanned","narded","nashes","nasuses","nauched","nauches","nauching","nave","neating","nemine","nemined","nemines","nemining","nerves","nervies","nesses","nessing","nest","nesting","nestings","nestling","nests","netting","nevers","newlies","newting","nexted","nexting","nick","nicks","nigger","niggers","nilling","nisied","nisting","nitred","nitres","niveas","nivose","nivoses","nocked","node","noired","noires","nolling","nonuple","nonuples","nooked","nookied","nooksed","nooned","noosed","nosing","notched","notches","notching","notified","notifies","nouses","nousing","nsaing","nscing","nsfing","nsuing","nswing","nuding","nuited","nuking","null","nulling","nulls","nuns","nurses","nursing","nutses","nutsing","nuxing","oakens","oasing","oasises","oasting","oatses","obtain","obtaining","obtains","occluded","oceans","ochers","octalling","octuple","octuples","odisted","ogives","oilies","oising","olds","olefine","olefined","olefines","olefining","oleins","olive","olives","onlies","onto","onuses","opalling","opiated","oppose","opposes","opulus","opuses","oralling","orange","oranged","oranges","oses","osing","otuses","ouring","ousels","outclass","outclasses","outclassing","outdated","outing","outrigger","outriggers","ovalling","over","overs","overts","pacoses","pacs","pact","padded","padres","pads","paduses","paeans","pageant","pageses","paided","pailing","painses","paired","paks","palases","paliing","paling","palling","pallying","palming","palmses","paloing","pals","palsies","pandaed","pander","pangses","panned","pans","pansies","pant","panted","pantses","paps","para","parang","pare","parental","parented","parents","parers","pareve","pari","paries","paring","parises","parity","park","parr","parsec","parsecs","parsed","parsee","parsees","parser","parsers","parses","parted","parti","partis","partly","parts","partses","party","paruses","parvenu","parves","pasches","paso","pasoed","pasos","pasques","passages","passed","passeds","passee","passeed","passees","passel","passels","passer","passers","passims","passives","passkey","passkeys","passu","passued","passus","pasted","pasteds","pastel","pastels","paster","pasters","pastes","pasties","pasting","pastises","pasts","patases","patens","patent","patents","patient","pats","patsies","pauling","paulis","paused","pauses","pausing","pave","pavises","pawling","paws","payees","payment","pays","pbsing","peaked","pean","peans","peated","peating","pecans","pecses","pekans","pelling","pelting","pent","penting","percent","pere","pert","perting","perves","pesoing","pessed","pessing","pest","pesting","pestis","pestling","pestoing","pestos","pests","petited","petrifies","petrify","petting","phaged","pharos","pholis","phsing","pick","picks","piered","pigses","pill","pilling","pills","pinses","pinto","pintos","pisces","piss","pissed","pisseds","pisser","pissers","pisses","pistes","pisting","pith","pitses","plaided","planaed","planked","planned","planted","plashes","plated","pleads","pleats","plover","plovers","pmsing","poached","poaches","poaching","pocked","poises","pokers","polers","polies","poll","polling","pollos","polls","pommies","ponded","ponses","pooched","pooches","pooching","pooded","poofed","pooled","pooned","pooped","poored","pooved","pooves","porched","porches","porching","porked","port","portent","posers","poshes","posies","posing","posits","possed","posses","possess","posset","possets","postes","posting","potent","pouch","pouched","pouches","pouching","powers","praises","pranged","prat","prated","preference","preferences","prelims","premies","preses","presses","prexies","pricks","prigged","prises","prom","proses","proves","prunes","prunos","prunus","psaing","psas","pses","psiing","psing","pucing","puking","pula","pulas","pule","pules","puling","pullers","pullets","pulleys","pulling","pulp","pulps","pulsing","puns","pupals","pupated","pupils","pure","purelies","purely","purifies","purify","puring","purl","purls","pursing","puses","pushing","puss","pussed","pusses","pussies","pussing","pyrene","qianged","quaing","quakes","quares","quells","questing","quests","quicks","quiing","quilt","quired","quited","quoing","quolls","rabies","racies","radded","raided","railing","raises","rake","rakes","raling","rallies","rallying","ramies","ranaed","rand","randed","randied","raneed","ranges","ranied","ranked","ranted","rarelies","rarely","rarifies","rarify","rashes","rasing","rassed","rave","ravers","readies","realines","realise","realises","realizes","reallies","really","realties","realty","reaves","rebuild","rebuilds","reburies","recall","recalling","recalls","recces","reccies","recipes","recited","recites","reclines","recode","recommits","recover","recovers","redefine","redefined","redefines","redefining","redlines","reedies","reefies","reeves","referee","referees","referenceds","referent","refine","refined","refiners","refines","refining","refinings","refits","regias","regimes","regius","reined","reining","reited","reiting","rejigs","relaces","relates","relaxes","relay","relics","relict","relicts","relied","relief","reliefs","relieve","relieves","relievo","relievos","relines","relining","relish","relishes","relived","relives","remake","remakes","remise","remises","remiss","remits","remove","removes","rend","rended","rends","renins","renises","rent","rentes","renting","repands","repens","repents","repine","repined","repining","replay","replied","replies","reply","repose","reposes","requiems","requireds","requite","requites","requote","requotes","reruns","resets","reshes","reshing","reside","resides","resids","resiles","resins","resizes","respire","respires","ressing","rest","resting","restings","rests","retied","reties","reting","retire","retouch","retouched","retouches","retouching","retries","retting","reusing","reverence","reverences","revers","review","reviews","reviles","revise","revises","revive","revoke","revokes","revues","rewire","rewired","rhuses","rick","ricks","rigged","riggeds","rigger","riggers","rilling","rimies","rind","rinded","ringer","ringers","ringside","rising","risses","rive","rives","rivets","roached","roaches","roaching","rocked","rogers","roilies","rolling","rons","rooded","roofed","rooked","rookied","roomed","rooted","ropers","ropies","rosies","rosing","rouble","roubles","roughed","roughing","rounds","rouses","rousing","rove","rover","rovers","roves","rowers","rubens","rubies","rubing","rubins","rubs","rudelies","rudely","ruding","rues","rugger","ruggers","rugs","ruins","rulied","rulies","ruling","ruly","rumens","rums","rune","runes","rung","rungs","runics","runing","runt","runts","runups","ruses","rushes","rushing","rusing","rusking","russing","ruts","saales","saaling","saames","sabling","sabres","sadded","saided","sailing","saints","saises","sake","sakes","salals","saling","salk","salking","salks","salling","sallying","salols","salping","salting","salving","sand","sanded","sander","sandied","sandsed","sanned","sansed","sanses","sapling","sarded","sarees","sashes","sass","sassed","sasses","sassies","sats","saurel","save","savers","scalding","scalds","scaling","scalping","scalps","scalying","scapes","scarce","scarces","scare","scareds","scarers","scares","scarfs","scaries","scarps","scends","schick","schicks","scired","scoked","scolds","scorer","scorers","scores","scoter","scoters","scruple","scruples","sculling","seaport","seaporting","seaports","seareds","seases","seating","seaxes","secluded","secting","secure","sedans","seined","seines","seining","selling","semited","send","sended","sends","sent","senting","septing","sequine","sequines","serifs","serined","serining","serves","sesses","sessing","sets","setting","severs","sexies","sexpot","sexpots","sexpotting","sexted","sexting","shabus","shade","shadeds","shades","shadies","shafts","shagged","shake","shakens","shakers","shakes","shakies","shakos","shale","shales","shame","shameds","shames","shamus","shanged","shanked","shanks","shanned","shape","shapeds","shapers","shapes","shard","shards","shareds","sharers","shareses","sharias","shark","sharks","sharons","sharp","sharpens","sharpers","sharpie","sharpies","sharps","shart","sharts","shaveds","shavens","shavers","shaves","shawls","shawms","sheareds","shearers","shearses","sheers","sheiks","sherds","shines","shinto","shire","shires","shirks","shirrs","shited","shnooked","shocked","shocks","shoeds","shooed","shooked","shooted","shore","shoreas","shores","shorns","shorts","shotes","shover","shovers","shreds","shrews","shrive","shrives","shucks","sibs","sick","sicks","sics","sids","sieves","sifts","sights","silling","silts","sind","sinded","sing","sins","sips","sirced","sired","sirens","sires","sirred","sirs","sising","siss","sisses","sitars","site","sites","sitkas","sittas","situ","situs","sitz","sitzes","sixths","skates","skinks","skints","skirts","skits","skives","skulls","slander","slanted","slates","slices","slicks","slides","slimes","slits","slivers","slouch","slouched","slouches","slouching","slsing","smalling","smalls","smarms","smarts","smited","smites","smiths","smoked","snare","snarers","snares","snarfs","snarls","sneaked","snicks","snigger","sniggers","snits","snooked","snores","soaked","sobers","socked","solare","solares","sold","solds","solids","solling","solver","solvers","solves","sooned","sooted","sore","sorelies","sorely","sots","souchong","soughed","soughing","souked","soupies","source","soured","souses","sousing","southed","southing","sowers","spaces","spades","spalling","spanged","spare","sparers","spares","sparge","sparges","sparks","spasms","spated","spates","spazes","speaked","specks","spells","sphere","spheres","spicks","spills","spinto","spired","spirts","spited","spites","spits","splits","spoked","spooked","spores","sprigger","spriggers","sprits","spurge","squally","squares","squires","ssaing","sses","ssing","ssping","sssing","sswing","stacks","stages","stalk","stalks","stalling","standed","stands","stanks","stapes","stare","starers","stares","starets","starses","starts","starve","starves","states","staves","steads","steaked","steeds","stenting","stetting","sticks","stilts","stints","stoked","stores","stover","stovers","stoves","streaked","stringer","stringers","strive","strives","suaves","subclassed","suched","suches","suching","sucre","sucred","sudated","sudses","sudsing","suer","suered","sues","suiing","suing","suited","suites","suits","sullas","summits","sundated","sunglass","sunglasses","sunglassing","suns","superclassed","supergrass","supergrasses","sura","suraed","surd","surded","sured","surelies","sures","surety","surf","surfed","surfer","surge","surged","surges","suring","surrey","survey","suses","sussing","suture","swages","swales","swards","swarms","swarts","sweared","sweated","swerve","swifts","swined","swiped","swirled","switch","taaling","tables","tabling","tabses","tached","taches","taching","tack","tacks","tacting","tadded","taeling","tagger","taggers","tailing","tajiks","take","takens","takers","takes","tala","talaing","talas","talc","talcing","talcs","tale","talent","tales","taling","talkers","talkies","talking","talksed","talkses","talling","tallying","talons","talus","tandem","tank","tankas","tanked","tanks","tanned","taoses","tapses","tart","tarting","task","tasking","tasks","tassed","tassel","tassels","tasses","tasset","tassets","tassing","tasting","tastings","tastying","tatting","tauting","tawses","tdting","teached","teaches","teaching","teaing","teaked","teaking","tealed","tealing","teamed","teaming","teared","tearing","teased","teases","teasing","teasling","teat","teated","teating","teats","tebets","teccing","teched","teches","tectaing","tectas","tedding","teds","teed","teeing","teeming","teened","teening","teething","teeths","teffing","tegging","teiids","tejuing","tellies","temming","temping","tempting","tempts","tenched","tenches","tenching","tendeds","tenders","tendons","tenens","tenged","tenges","tenging","tenias","tenned","tenning","tennis","tennos","tenons","tenors","tensed","tenseds","tensing","tented","tenthing","tenting","tentings","tenuis","tepids","teraing","tercing","tereting","terming","terned","terning","terrifies","terrify","terses","tersing","teslaing","teslas","testaing","testas","testating","testeds","testeeing","testees","testers","testes","testied","testify","testily","testinged","testings","testis","testying","tether","tething","tetting","tevets","texans","text","texted","textes","texting","textings","texts","thaned","thanked","thanks","thanned","thecas","thefting","thefts","theist","theisting","theists","theres","thesis","thinged","tholed","tholes","thonged","thorough","thoroughs","thought","thrive","thrives","throng","throngs","throughed","throughs","thrush","thuses","ticalling","tick","ticks","tiered","tigers","tilling","tilting","tineds","tinting","tire","tired","tires","tiroed","titred","titres","titting","tnting","toasting","toasts","toeaed","toeses","toesing","togethers","told","tolds","tolling","tommies","tomtits","toneds","toners","tontining","tooled","tooned","tooted","toothed","toothing","tooting","topers","toposes","topple","topples","torch","torched","torches","torching","torting","toshed","toshes","tosked","tosking","tosses","tossing","toters","toting","totting","toucan","toucans","touchers","touchied","touchies","touchinged","touchingly","touchings","touchline","touchy","touchying","tough","toughed","toughens","toughied","toughies","toughing","toughying","touped","toupee","toupeed","touping","toured","touring","tousle","tousled","tousling","touted","towers","tracks","transitive","transitived","transitives","transitivity","treaded","treads","treated","treating","treats","treeds","trekked","trend","trends","trenting","tressing","trestling","triage","triaged","tricker","trickers","tricks","triers","trifler","triflers","trigged","trimer","trimers","trimmer","trimmers","tripper","trippers","trited","triting","troched","troches","troching","trough","troughed","troughing","troughs","troves","truced","truces","trucing","trucked","trucking","trudger","trudgers","trulies","trunks","trusting","trusts","truthed","truthing","trysting","trysts","tsetse","tsetsing","tubing","tucked","tucking","tufting","tugger","tuggers","tuling","tulles","tulling","tumses","tumsing","tuning","tuns","turing","tushed","tutting","tuxing","twanged","tweaks","tweeded","tweeds","tweeped","tweeted","tweeting","tweets","tweezed","twelved","twenty","twerked","twerped","twiced","twigged","twined","twirled","twirped","twisting","twists","twitch","ufoing","uglies","uhfing","uing","ukases","ukasing","ukes","uking","ulls","ulting","umaing","umping","unchanged","unclouded","uncouple","uncouples","uncover","uncovers","undated","undateds","undefined","unding","unedited","unhooked","uniated","uning","united","unkind","unlive","unlives","unmake","unmakes","unmated","unmodified","unqing","unsated","unsees","unsung","unsure","untouched","unusually","unwired","unyoke","unyokes","upbeated","upcasted","update","updates","updrafted","uphold","upholds","uping","upland","uplanded","upsets","upside","uptaked","upvoted","urated","urging","urling","urning","urns","ursine","uruses","usages","usaging","usaing","usas","usbegs","usbeks","uscbing","usdaed","usdaing","used","useds","user","users","ushers","usinged","usings","usmcing","usneas","usning","usns","usps","uspses","uspsing","usss","usssing","usualed","usuals","usurer","utaing","utcing","utes","uting","utning","uubing","uuhing","uuping","uuqing","uuting","uving","uziing","valiing","valing","valling","valses","valsing","valuing","valving","vandaed","vanned","varment","vasing","vassed","vasting","vedisted","vegans","veined","veines","veining","vend","vended","vends","vent","venting","verbified","verbifies","verbify","veridis","veridises","veried","verified","verifieds","verifier","verifiers","verited","veritied","verities","verity","versified","versifier","versifiers","versifies","versify","versting","versts","verting","verves","vest","vesting","vests","vetting","vianded","vilifies","vilify","vinifies","vinify","virens","vireos","vising","visits","visually","vitrifies","vitrify","vive","vives","vivifies","vivify","vivred","vocalling","vomers","vomits","voters","vouch","vouched","voucheed","vouchees","vouchers","vouches","vouching","vowers","wadded","wadses","waifed","wailed","wailing","wained","waived","waives","wake","wakens","wakers","wakes","waling","walk","walking","walks","wall","walling","wallings","walls","wallying","wand","wanded","wander","wanked","wanned","want","wanted","ware","wared","waried","warmed","warned","warped","warred","warsed","warses","wart","warted","washes","wassed","wastes","wasting","watses","wauling","wave","wavers","wawling","wayses","wbsing","weaked","weaken","wealed","wean","weaned","weans","wearer","weaved","weeked","weft","wefting","weirded","weired","wekaed","welling","welt","welting","wended","wends","wens","weres","westing","wests","wetting","whacks","whales","whanged","wharfs","whelks","whiled","whined","whirled","whirred","whists","whites","whits","wholed","wholes","whooped","whored","whores","wick","wicked","wicks","wided","width","widths","wifed","wified","wigged","wilded","wiled","wilied","wilies","willed","willing","wilted","wimped","winced","wind","wined","winged","winied","winked","winned","winoed","wiped","wipeds","wireds","wirer","wiried","wised","wisent","wish","wished","wising","wisped","witch","withal","withe","wither","withes","within","withs","withy","witsed","witted","wive","wived","wives","wizzed","wlanned","wokked","wold","wolds","wonked","wont","wooded","wooers","woofed","wooled","worded","worlds","wormed","worned","worsed","worted","woulds","wove","woves","wraith","wrasses","wreaked","wrecks","wresting","wrests","wricks","wried","wriggler","wrigglers","wringer","wringers","writhe","wswing","wussing","wyrded","xmases","yanaed","yanked","yarded","yawling","yawses","yearns","yeasting","yeasts","yelling","yessing","yetting","yolked","yorked","youthed","youthing","yuling","yuses","yussing","zaired","zaires","zanied","zend","zended","zends","zest","zesting","zests","zestying","zeuses","zeusing","zhuanged","zilling","zonked","zoomed","zooted"]}});function On(e,t,n){if(e===t)return 0;if(Math.abs(e.length-t.length)>n)return n+1;let s=null,o=Array.from({length:t.length+1},(r,i)=>i);for(let r=1;r<=e.length;r+=1){let i=[r],a=r;for(let l=1;l<=t.length;l+=1){let c=e[r-1]===t[l-1]?0:1,u=Math.min(o[l]+1,i[l-1]+1,o[l-1]+c);r>1&&l>1&&e[r-1]===t[l-2]&&e[r-2]===t[l-1]&&(u=Math.min(u,s[l-2]+c)),i[l]=u,u<a&&(a=u)}if(a>n)return n+1;s=o,o=i}return o[t.length]}function pa(e){return/^[a-z]+$/.test(e)&&!st.has(e)&&!da.has(e)}function Cd(e){return fy(e)?null:fa(e,dy,Xn(e))}function fa(e,t,n=Xn(e)){let s=n+1,o=null,r=!1;for(let i of t){let a=On(e,i,Math.min(s,n));a<s?(s=a,o=i,r=!1):a===s&&a<=n&&i!==o&&(r=!0)}return s<=n&&!r?o:null}var ly,Xn,da,uy,dy,py,fy,Uo=L(()=>{An();Ad();Yn();ly=["used"];Xn=e=>e.length<=5?1:2,da=new Set([...Object.keys(pe),...Object.keys(Ue),...Object.keys(Wt),...ly].flatMap(e=>e.split(" "))),uy=4,dy=[...new Set([...Object.keys(pe),...Object.keys(Wt)].flatMap(e=>e.split(" ")).filter(e=>e.length>=uy))],py=new Set(Td.words),fy=e=>py.has(e)});function eo(e){for(let t of by){let n=e.match(t.re);if(n){let s=t.build(n);if(s)return s}}return null}var Pr,my,hy,gy,ma,by,Id,Fr=L(()=>{An();Yn();Pr=Object.keys(pe).sort((e,t)=>t.length-e.length).map(Ve).join("|"),my=Object.keys(Ue).sort((e,t)=>t.length-e.length).map(Ve).join("|"),hy=Object.keys(Wt).sort((e,t)=>t.length-e.length).map(Ve).join("|"),gy=bs.slice().sort((e,t)=>t.length-e.length).map(Ve).join("|"),ma=(e,t)=>e==="defines"&&Io.has(t),by=[{name:"ask",re:new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+(${Pr})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=pe[t];if(ma(n,t))return null;let s=e[1].trim(),o=e[3].trim();return Co.includes(t)&&([s,o]=[o,s]),{shape:"ask",entityType:null,modifier:"direct",kind:n,subject:s,object:o}}},{name:"reverse",re:new RegExp(`^which\\s+(${my})\\s+(?:(${hy})\\s+)?(${Pr})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[3].toLowerCase(),n=pe[t];return ma(n,t)?null:{shape:"reverse",entityType:Ue[e[1].toLowerCase()],modifier:e[2]?Wt[e[2].toLowerCase()]:"direct",kind:n,object:e[4].trim()}}},{name:"forward",re:new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+(${Pr})\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=pe[t];return ma(n,t)?null:{shape:"forward",entityType:null,modifier:"direct",kind:n,object:e[1].trim()}}},{name:"meta-mean",re:new RegExp(`^what\\s+(?:does|do|is|are)\\s+(.+?)\\s+(?:${gy})\\??$`,"i"),build:e=>({shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:e[1].trim()})},{name:"meta-whatis",re:new RegExp("^what\\s+(?:is|are)\\s+(?:(an?|the)\\s+)?(.+?)\\??$","i"),build:e=>{let t=e[1]?e[1].toLowerCase():null,n=Kt(e[2].trim()),s=!/\s/.test(n);if(t==="the"&&!s||!t&&!Ue[n.toLowerCase()])return null;let o=n.toLowerCase();return t&&t!=="the"&&Yl.some(r=>o===r||o.startsWith(`${r} `))?null:{shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:hs(n)}}},{name:"mention",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)\\s+(?:${rn.map(Ve).join("|")})\\??$`,"i"),build:e=>({shape:"mentions",entityType:null,modifier:"direct",kind:"mentions",object:e[1].trim()})},{name:"where",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)(?:\\s+(?:${Ht.map(Ve).join("|")}))?\\??$`,"i"),build:e=>({shape:"where",entityType:null,modifier:"direct",kind:"where",object:e[1].trim()})},{name:"when",re:new RegExp(`^when\\s+(?:did|does|do|was|were|is)\\s+(.+?)\\s+(?:last\\s+)?(${Pr})\\??$`,"i"),build:e=>pe[e[2].toLowerCase()]==="touches"?{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:e[1].trim()}:null},{name:"commit-history",re:/^(?:the\s+)?commit\s+history\s+(?:of|for)\s+(.+?)\??$/i,build:e=>({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:e[1].trim()})},{name:"cochange-partners",re:/^co-?change\s+partners\s+(?:of|for|with)\s+(.+?)\??$/i,build:e=>({shape:"reverse",entityType:"Module",modifier:"direct",kind:"cochange",object:e[1].trim()})}];Id={id:"grammar",class:"graph-query",run(e){let t=eo(e);return t?{strategyId:"grammar",class:"graph-query",candidates:[{parsed:t,confidence:.9}]}:null}}});function $t(e,t,n=null){let s=Object.keys(t).sort((o,r)=>r.split(" ").length-o.split(" ").length);for(let o of s){let r=o.split(" ");for(let i=0;i<=e.length-r.length;i+=1)if(!(n&&r.some((a,l)=>n.has(i+l)))&&r.every((a,l)=>e[i+l]===a))return{kind:t[o],start:i,end:i+r.length}}return null}function Wo(e,t=null){let n=e.replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),s=n.map(S=>S.toLowerCase());if(s.includes("where")&&!$t(s,pe)){let S=s.some(E=>rn.includes(E)),j=new Set([...Ht,...rn]),C=n.filter((E,R)=>!st.has(s[R])&&!j.has(s[R])).join(" ").trim();if(C){let E=S?"mentions":"where";return{shape:E,entityType:null,modifier:"direct",kind:E,object:C}}}if(new Set(["has","have","had"]).has(s[0])){let S=s.length;for(;S>1&&(s[S-1]==="ever"||s[S-1]==="been");)S-=1;if((S>1?pe[s[S-1]]:null)==="touches"){let C=n.slice(1,S-1).filter((E,R)=>!st.has(s[1+R])).join(" ").trim();if(C)return{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:C}}}let r=s,i=$t(s,pe);if(!i&&t){let S=s.map(j=>{if(!pa(j))return j;let C=t.lemma(j);return da.has(C)?C:j});i=$t(S,pe),i&&(r=S)}let a=null;if(!i){let S=s.map(j=>j.length>=4&&pa(j)&&Cd(j)||j);if(i=$t(S,pe),i){r=S;let j=s.slice(i.start,i.end).findIndex((E,R)=>E!==S[i.start+R]),C=i.start+Math.max(j,0);a={from:s[C],to:S[C]}}}let l=!1;if(!i)for(let S=0;S<s.length;S+=1){let j=qn[s[S]];if(!(j&&s[S]==="used"&&s[S+1]==="for")&&j&&s.slice(0,S).some(C=>Bo.has(C))){i={kind:j,start:S,end:S+1},l=!0;break}}if(!i)return null;!l&&i.end-i.start===1&&qn[s[i.start]]&&s.slice(0,i.start).some(S=>Bo.has(S))&&(l=!0);let c=S=>a?{...S,fuzzyVerb:a}:S;if(t&&i.end-i.start===1){let S=i.start,j=s[S-1];if((j==="the"||j==="these"||j==="those")&&s[S+1]==="of"&&t.posTags(n)[S]==="NOUN"){let E=n.slice(S+2).filter((R,N)=>!st.has(s[S+2+N])).join(" ").trim();if(E)return c({shape:"forward",entityType:null,modifier:"direct",kind:i.kind,object:E})}}let u=new Set,d=S=>{if(S)for(let j=S.start;j<S.end;j+=1)u.add(j)};d(i);for(let[S,j]of Object.entries(pe)){if(j!==i.kind)continue;let C=S.split(" "),E=i.end;if(C.every((R,N)=>r[E+N]===R)){d({start:E,end:E+C.length});break}}let m=$t(r,Ue,u);d(m);let p=$t(r,Wt,u);d(p);let f=(S,j)=>n.slice(S,j).filter((C,E)=>!u.has(S+E)&&!st.has(s[S+E])).join(" ").trim(),g=f(0,i.start),h=f(i.end,n.length);l&&!s.includes("by")&&vy.has(h.toLowerCase())&&(h="");let b=i.kind,y=m?Ue[r.slice(m.start,m.end).join(" ")]:null,w=p?Wt[r.slice(p.start,p.end).join(" ")]:"direct";if(b==="touches"&&s.includes("when")){let S=g||h;if(S)return c({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:S})}if(b==="touches"&&s.includes("who")&&s.includes("last")){let S=g||h;if(S)return c({shape:"whoLast",entityType:null,modifier:"direct",kind:"touches",object:S})}let v=s.indexOf("by"),k=s.slice(0,i.start).findIndex(S=>Bo.has(S)),$=k>=0,T=$&&k>v;if(v>=0&&!u.has(v)&&$){let S=(E,R)=>n.slice(E,R).filter((N,A)=>{let P=E+A,V=s[P];return!u.has(P)&&!st.has(V)&&V!=="by"&&!Bo.has(V)&&!wy.has(V)&&!yy.has(V)}).join(" ").trim(),[j,C]=T?[S(k+1,n.length),S(v+1,k)]:[S(0,v),S(v+1,n.length)];if(j&&C)return b==="defines"&&Io.has(r.slice(i.start,i.end).join(" "))?null:c({shape:"ask",entityType:null,modifier:"direct",kind:b,subject:C,object:j});if(C)return c({shape:"forward",entityType:y,modifier:w,kind:b,object:C});if(j)return c({shape:"reverse",entityType:y,modifier:w,kind:b,object:j})}if(l&&v<0&&h&&s[i.start]==="called")return null;if(g&&h){let S=r.slice(i.start,i.end).join(" ");if(b==="defines"&&Io.has(S))return null;let j=g,C=h;return Co.includes(S)&&([j,C]=[C,j]),c({shape:"ask",entityType:null,modifier:"direct",kind:b,subject:j,object:C})}if(h){let S=m&&m.start>=i.end?null:y;return c({shape:"reverse",entityType:S,modifier:w,kind:b,object:h})}if(b==="inherits"&&!g&&m&&m.start===i.end){let S=r.slice(m.start,m.end).join(" ");if(S)return c({shape:"reverse",entityType:null,modifier:w,kind:b,object:S})}if(g&&!h&&$&&i.end-i.start===1&&qn[s[i.start]]){if(g.split(/\s+/).length>1)return null;if(b==="touches")return c({shape:"when",entityType:null,modifier:"direct",kind:b,object:g});let S=Bo.has(s[0]);return c({shape:"reverse",entityType:y,modifier:w,kind:b,object:g,...S?{polar:!0}:{}})}return g?c({shape:"forward",entityType:y,modifier:"direct",kind:b,object:g}):null}var Bo,wy,yy,vy,Od,Dr=L(()=>{An();Yn();Uo();Bo=new Set(["is","are","was","were","be","been","being","get","gets","got"]),wy=new Set(["which","what","who","whom","whose"]),yy=new Set(Rn.map(e=>e.toLowerCase())),vy=new Set(["recently","lately","yet","already","ever","again"]);Od={id:"keyword-spot",class:"graph-query",run(e,t={}){let n=Wo(e,t.nlp||null);return n?{strategyId:"keyword-spot",class:"graph-query",candidates:[{parsed:n,confidence:.7}]}:null}}});function xy(e,t,n){if(!n||typeof n.posTags!="function"||!t.length)return[];let s=new Set(t.map(i=>i.toLowerCase())),o;try{o=n.posTags(e)}catch{return[]}let r=[];for(let i=0;i<e.length;i+=1){let a=e[i],l=a.toLowerCase();!/^[a-z]+$/.test(a)||Ld.has(l)||!s.has(l)||o[i]==="VERB"&&r.push(l)}return r}function ky(e,t=null){let n=Xt(e),s=[],o=[];for(let i of n){let a=i.toLowerCase();/^[a-z]+$/.test(i)&&!Ld.has(a)&&($y.has(a)||t&&typeof t.isStopWord=="function"&&t.isStopWord(a))?o.push(i):s.push(i)}let r=xy(n,s,t);return{text:s.join(" "),dropped:o,maybeNoise:r}}var Ld,$y,Nd,Md=L(()=>{An();Yn();Fr();Dr();Ld=new Set([...st,...ge(gs),...ge(Object.keys(pe)),...ge(Object.keys(Ue)),...ge(Object.keys(Wt)),...ge(Object.keys(Ge)),...ge(ws),...ge(ys),...ge(Object.keys(Gn)),...ge(Object.keys(pn)),...ge(Object.keys(Gs)),...ge(Rn),...ge(Lo),...ge(bs),...ge(Ht),...ge(rn),...ge(_n),...ge(Object.keys(Hs))]),$y=new Set([...ge(Oo),...ge(Sr)]);Nd={id:"noise-strip",class:"noise-stripped",run(e,t={}){if(eo(e))return null;let{text:n,dropped:s,maybeNoise:o}=ky(e,t.nlp||null);if(!s.length||!n)return null;let r=eo(n)||Wo(n,t.nlp||null);if(!r)return null;if(o.length&&(r.shape==="where"||r.shape==="mentions")&&r.object){let i=r.object.split(/\s+/).filter(a=>!o.includes(a.toLowerCase())).join(" ").trim();i&&i!==r.object&&(r.altObject=i)}return{strategyId:"noise-strip",class:"noise-stripped",candidates:[{parsed:r,confidence:.75,note:`noise-stripped to "${n}"`}]}}}});var Pd=L(()=>{});var Fd=L(()=>{});function zd(e,t){return e.shape!==t.shape||e.kind!==t.kind?!1:e.shape==="ask"?to(e.subject)===to(t.subject)&&to(e.object)===to(t.object):to(e.object)===to(t.object)}function ha(e){let t=(e||[]).filter(c=>c&&Array.isArray(c.candidates)&&c.candidates.length);if(!t.length)return null;let n=[];for(let c of t)for(let u of c.candidates)!u||!u.parsed||n.push({parsed:u.parsed,confidence:typeof u.confidence=="number"?u.confidence:.5,note:u.note||null,via:u.via||null,strategyId:c.strategyId,class:c.class});if(n.some(c=>!Ud(c))&&(n=n.filter(c=>!Ud(c))),!n.length)return null;let s=new Map;for(let c of n)s.has(c.class)||s.set(c.class,[]),s.get(c.class).push(c);let o=[];for(let[c,u]of s){let d=[];for(let m of u){let p=d.find(f=>zd(f.parsed,m.parsed)&&f.via===m.via);if(p){p.agreed+=1,p.confidence=Math.max(p.confidence,m.confidence),Dd(m.parsed)<Dd(p.parsed)&&(p.parsed=m.parsed);continue}d.push({...m,agreed:1})}d.length&&o.push({class:c,candidates:d})}if(!o.length)return null;let r=c=>Math.max(...c.candidates.map(u=>u.confidence)),i=o[0];for(let c of o)r(c)>r(i)&&(i=c);let a=i.candidates.length===1?i.candidates[0].parsed:{ambiguousParse:!0,candidates:i.candidates.map(c=>c.parsed)},l=o.filter(c=>c!==i).map(c=>c.candidates[0]).filter(c=>!i.candidates.some(u=>zd(u.parsed,c.parsed)));return{class:i.class,parsed:a,winner:i.candidates[0],alternates:l}}function jy(e){if(!e)return"something else";if(e.ambiguousParse)return"one of several readings";let t=e.object??e.subject??"?";return`${e.kind} "${t}"`}function Bd(e,{describe:t=jy,answerFor:n=null}={}){return(e||[]).map(s=>{let o=s.note||t(s.parsed),r=n&&n(s)||"ask it that way";return`if you mean ${o} then ${r}`})}var to,Ey,Dd,Sy,Ud,ga=L(()=>{to=e=>String(e||"").trim().toLowerCase().replace(/\s+/g," ").replace(/^(?:the|a|an)\s+/,"").replace(/^commit\s+(?=[0-9a-f]{7,40}$)/,""),Ey=/^\s*(?:the|a|an)\s+/i,Dd=e=>[e?.subject,e?.object].filter(t=>Ey.test(String(t||""))).length;Sy=new Set(["fuzzy","lemma","spell"]),Ud=e=>Sy.has(e.via)});function zr(e){ba=e}function wa(){return typeof ba=="function"?ba():null}var ba,qo=L(()=>{ba=null});function Gd(e,t={},n=Ry){let s=[];for(let o of n)try{let r=o.run(e,t);r&&typeof r.then!="function"&&s.push(r)}catch{}return s}var _y,Ry,Vd=L(()=>{Yn();Fr();Dr();Md();Pd();Fd();ga();qo();_y=[...typeof void 0<"u"?[void 0]:[],...typeof void 0<"u"?[void 0]:[]],Ry=[Id,Od,Nd,..._y]});var Ur,Hd=L(()=>{Ur=(e,t,n)=>n});var Np={};Sn(Np,{DYNAMIC_TAIL_OK_RE:()=>Ua,applyNegationFrames:()=>zo,ask:()=>ts,classDisplayName:()=>Qn,degreeMetric:()=>jp,metaFallbackEntityAnswer:()=>yp,normalizeQuery:()=>Ss,parseQuery:()=>Ko,parseQueryFull:()=>Ta,render:()=>gn,rephraseHint:()=>Pa,resolveObject:()=>an,traverse:()=>Gt});function We(e,t){let n=Kd.get(e);n||(n=new Map,Kd.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(In(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function Fe(e,t){let[n,s]=cp[e]||["result","results"];return t===1?n:s}function Qn(e){let t=String(e||"");if(typeof fn=="function"){let n=fn(t).join(" ");if(n)return n}return t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase()}function js(e){return Ty[e]||e}function Ny(e){if(!e?.ambiguousParse||!Array.isArray(e.candidates)||e.candidates.length!==2)return e;let t=e.candidates.find(r=>r?.shape==="meta"),n=e.candidates.find(r=>r!==t);if(!t||!n)return e;let s=String(t.object||"").trim().toLowerCase();if(!s||Ly.has(s))return e;let o=String(n.object||"").trim().toLowerCase();return ge(bs).includes(o)?t:e}function Ko(e,{nlp:t=void 0}={}){return Ta(e,{nlp:t}).parsed}function Ta(e,{nlp:t=void 0}={}){let n=t===void 0?wa():t,s=String(e||"").trim().replace(/\s+/g," ");if(!s)return{parsed:null,alternates:[],class:null};let o=ua(zo(Ss(s)));if(!o)return{parsed:null,alternates:[],class:null};let r=Py(o,n);if(r)return{parsed:r,alternates:[],class:null};let i=ha(Gd(o,{nlp:n,raw:s}));return i?{parsed:Ny(i.parsed),alternates:i.alternates||[],class:i.class||null}:{parsed:null,alternates:[],class:null}}function Ea(e,t){return t.length&&up.has(t[0])?{bw:e.slice(1),blc:t.slice(1)}:{bw:e,blc:t}}function oo(e,t){return eo(e)||Wo(e,t)}function Py(e,t){let n=Xt(e),s=n.map(o=>o.toLowerCase());return sv(n,s)||rv(n,s)||Uy(n,s,t)||pp(e,t,0)||iv(n,s,t)||Wy(n,s,t)||Xy(n,s,t,0)||Qy(n,s)||tv(n,s,t)||av(n,s,t)||dv(n,s,t)||fv(n,s,t,0)||uv(n,s,t,0)||Ia(n,s,t,0)||Gy(n,s,t)||Dy(n,s)||bp(n,s,t,0)}function Dy(e,t){let n=0;Fy.has(t[n])&&(n+=1);let s=xt(t[n]);if(!s||s.placeholder||!s.entityType)return null;let o=s.entityType;n+=1;let r=f=>f+1<t.length?Xl[`${t[f]} ${t[f+1]}`]:void 0,i=r(n);if(!i)return null;let a=n+2,l=-1,c;for(let f=a;f+1<t.length;f+=1){let g=r(f);if(g){l=f,c=g;break}}if(l<0)return null;let u=e.slice(a,l).join(" ").trim(),d=e.slice(l+2).join(" ").trim();if(!u||!d)return null;let m=(f,g)=>f.role==="object"?{shape:"reverse",kind:f.kind,entityType:o,modifier:"direct",object:g}:{shape:"forward",kind:f.kind,modifier:"direct",object:g},p=m(i,u);return p.entityType=o,{node:"boolean",entityType:o,atoms:[{op:"seed",kind:"set",ast:{node:"clause",clause:p}},{op:"intersection",kind:"set",ast:{node:"clause",clause:m(c,d)}}]}}function Wr(e,t){return{node:"boolean",entityType:e,atoms:[{op:"seed",kind:"set",ast:{node:"allOfClass",entityType:e}},t]}}function Uy(e,t,n){if(!["do","does","did"].includes(t[0])||!zy.has(t[1]))return null;let s=xt(t[2]);if(!s||s.placeholder||!s.entityType)return null;let o=s.entityType;if(o==="Change")return{node:"miss",reason:`"${t[2]}" isn't an enumerable kind \u2014 a universal check needs a concrete kind (functions, classes, modules, \u2026)`};let r=t[2],i=e.slice(3),a=t.slice(3);if(!i.length)return null;let l=$t(a,pe);if(!l)return{node:"miss",reason:"a universal check needs a known relation verb (import, call, inherit from, test, \u2026)"};let u=i.filter((m,p)=>(p<l.start||p>=l.end)&&!st.has(a[p])&&a[p]!=="from").join(" ").trim();if(!u)return null;let d=ro(`which ${r} ${i.join(" ")}`,n,1);return!d||d.node==="miss"?{node:"miss",reason:d&&d.reason||"the universal clause didn't parse"}:{node:"universal",entityType:o,kind:l.kind,object:u,complement:Wr(o,{op:"difference",kind:"set",ast:d})}}function pp(e,t,n=0){let s=Rd(e);if(!s)return null;let o=xt(s.entWord);if(!o||o.placeholder||!o.entityType)return null;let r=o.entityType;if(r==="Change")return{node:"miss",reason:`"${s.entWord}" isn't an enumerable kind \u2014 a set complement needs a concrete kind (functions, classes, modules, \u2026)`};let i=Xt(s.predicate),a=i.map(d=>d.toLowerCase());if(a.length&&a.every(d=>Ge[d]))return Wr(r,{op:"difference",kind:"qual",filters:a});let l=$t(a,pe);if(!l)return{node:"miss",reason:"a negated set query needs a known relation verb (import, call, inherit from, test, \u2026)"};if(!i.filter((d,m)=>(m<l.start||m>=l.end)&&!st.has(a[m])&&a[m]!=="from").length)return Wr(r,{op:"difference",kind:"set",ast:{node:"existsEdge",entityType:r,kind:l.kind}});let u=ro(`which ${s.entWord} ${s.predicate}`,t,n+1);return!u||u.node==="miss"?{node:"miss",reason:u&&u.reason||"the negated clause didn't parse"}:Wr(r,{op:"difference",kind:"set",ast:u})}function Wy(e,t,n){let s=0;for(;s<t.length&&By.has(t[s]);)s+=1;if(!["do","does","did"].includes(t[s]))return null;s+=1;let o=e.slice(s),r=t.slice(s),i=r.indexOf("not");if(i<0)return null;let a=$t(r,pe);if(!a)return null;let c=o.filter((u,d)=>d!==i&&(d<a.start||d>=a.end)&&r[d]!=="from"&&!st.has(r[d])).join(" ").trim();return c?{node:"forwardComplement",kind:a.kind,subjectTerm:c}:null}function fp(e,t){let n=new Set;for(let s of t)for(let o of We(e,s)){let r=e.byId.get(o.object);r&&r.class&&n.add(r.class)}return n}function mp(e,t){let n=Rt(t),s=n.filter(r=>!ap.has(r)),o=fp(e,s.length?s:n);return o.size===1?[...o][0]:null}function ro(e,t,n){if(n>lp)return{node:"miss",reason:"too deep to resolve"};let s=pp(e,t,n);if(s)return s;let o=Xt(e),r=o.map(c=>c.toLowerCase()),i=Ia(o,r,t,n);if(i)return i;let a=bp(o,r,t,n);if(a)return a;let l=oo(e,t);return l?{node:"clause",clause:l}:null}function Ia(e,t,n,s){for(let o=1;o<t.length;o+=1){let r=_n.includes(t[o]),i=!r&&dp(t[o]);if(!r&&!i||r&&o+1>=t.length||!xt(t[o-1]))continue;let l=e.slice(0,o-1);if(!l.length||l.every(m=>Ge[m.toLowerCase()]))continue;let c=oo([...l,ka].join(" "),n);if(!c||c.shape!=="reverse"&&c.shape!=="forward"||c.modifier&&c.modifier!=="direct")continue;let u=`which ${t[o-1]} ${e.slice(r?o+1:o).join(" ")}`,d=ro(u,n,s+1);return!d||d.node==="miss"?d?{node:"miss",reason:d.reason||"inner clause didn't parse"}:{node:"miss",reason:"inner clause didn't parse"}:{node:c.shape==="reverse"?"reverseSet":"forwardSet",kind:c.kind,entityType:c.entityType,inner:d}}return null}function Gy(e,t,n){for(let s=0;s<t.length;s+=1){if(!qy.has(t[s])||t[s-1]==="of")continue;let o=s===t.length-1,r=s+1<t.length&&!!pe[t[s+1]];if(!o&&!r)continue;let i=[...e.slice(0,s),ka,...e.slice(s+1)],a=oo(i.join(" "),n);if(!(!a||a.shape!=="reverse"&&a.shape!=="forward")&&a.object===ka&&!(a.modifier&&a.modifier!=="direct"))return{node:a.shape==="reverse"?"reverseSet":"forwardSet",kind:a.kind,entityType:a.entityType,inner:{node:"prevSet"}}}return null}function Xy(e,t,n,s=0){if(t[0]!=="when")return null;let o=1;if(!Vy.has(t[o]))return null;o+=1;let r=-1;for(let d=t.length-1;d>=o;d-=1)if(Hy.has(t[d])){r=d;break}if(r<0)return null;let i=e.slice(o,r),a=t.slice(o,r);for(;a.length&&Ky.has(a[a.length-1]);)i=i.slice(0,-1),a=a.slice(0,-1);for(;a.length&&Yy.has(a[0]);)i=i.slice(1),a=a.slice(1);if(!i.length||!a.some(d=>_n.includes(d)))return null;let l=Ca.has(a[0])?i.join(" "):`which ${i.join(" ")}`,c=ro(l,n,s+1);if(!c||c.node==="miss")return c?{node:"miss",reason:c.reason||"the inner set of the temporal query didn't parse"}:{node:"miss",reason:"the inner set of the temporal query didn't parse"};let u=xt(a[0]);return{node:"temporal",inner:c,entityType:u&&u.entityType||null}}function Qy(e,t){if(t[0]!=="what"||t[1]!=="changed")return null;let n=2;if(t[n]==="ever"&&(n+=1),!Jy.has(t[n]))return null;let s=t[n],o=e.slice(n+1).join(" ").trim();return o?{node:"commitFilter",op:s,pivotRaw:o}:{node:"miss",reason:`"what changed ${s}" needs a date or commit afterward`}}function ev(e){let t=new Set,n=[];for(let s of e){if(!s||!Zy.test(s))continue;let o=s.toLowerCase();t.has(o)||(t.add(o),n.push(s))}return n}function tv(e,t,n){if(t.length===2&&t[0]==="which"&&(t[1]==="ones"||t[1]==="one"))return{node:"anaphora",mode:"list",filter:{type:"all"}};let s=-1,o=!1;for(let d=1;d<t.length;d+=1){if(!Lo.includes(t[d]))continue;if(t[d-1]==="of"){s=d,o=!0;break}let m=t.slice(0,d).join(" ");if(d===t.length-1&&(ws.includes(m)||ys.includes(m))){s=d;break}}if(s<0)return null;let r=(o?t.slice(0,s-1):t.slice(0,s)).join(" "),i=ws.includes(r)||/^(how many|how much|count|number|quantity|total)\b/.test(r)?"count":"list",a=nv(e.slice(s+1),n);if(a===void 0)return{node:"miss",reason:"the follow-up filter didn't parse"};let l=o?s-1:s,c=ev(e.slice(0,l)),u={node:"anaphora",mode:i,filter:a};return c.length>=2&&(u.candidateTerms=c),u}function nv(e,t){let n=0,s=e.map(a=>a.toLowerCase());for(;n<s.length&&My.has(s[n]);)n+=1;let o=e.slice(n),r=s.slice(n);if(!o.length)return{type:"all"};if(r.every(a=>Ge[a]))return{type:"qual",filters:r};if(o.length===1){let a=xt(r[0]);if(a&&!a.placeholder&&a.entityType)return{type:"entity",entityType:a.entityType}}let i=oo(`what ${o.join(" ")}`,t);if(i&&(i.shape==="reverse"||i.shape==="forward")&&i.object)return{type:"clause",clause:i}}function sv(e,t){let n;if(t[0]==="is"&&t[1]==="there")n=2;else if(t[0]==="are"&&t[1]==="there")n=2;else return null;let s=t[n];if(s==="a"||s==="an"||s==="any")n+=1;else return null;let o=n<t.length?xt(t[n]):null;if(!o||o.placeholder||!o.entityType)return null;let r=o.entityType;n+=1;let i=t.slice(n),a=e.slice(n);if(i.length&&i[i.length-1]==="anywhere"?(i=i.slice(0,-1),a=a.slice(0,-1)):i.length>=2&&i[i.length-2]==="at"&&i[i.length-1]==="all"&&(i=i.slice(0,-2),a=a.slice(0,-2)),!i.length)return{node:"exists",entityType:r,term:null,scopeModule:null};if(i[0]==="called"||i[0]==="named"){if(i.length<2)return{node:"miss",reason:`"${i[0]}" needs a name afterward`};let l=i.indexOf("in",1);if(l>0){let u=a.slice(1,l).join(" ").trim(),d=a.slice(l+1).join(" ").trim();return!u||!d?{node:"miss",reason:'a named existence check needs both a name and a module after "in"'}:{node:"exists",entityType:r,term:u,scopeModule:d}}let c=a.slice(1).join(" ").trim();return c?{node:"exists",entityType:r,term:c,scopeModule:null}:{node:"miss",reason:`"${i[0]}" needs a name afterward`}}if(i[0]==="in"){let l=a.slice(1).join(" ").trim();return l?{node:"exists",entityType:r,term:null,scopeModule:l}:{node:"miss",reason:'"in" needs a module afterward'}}return null}function ov(e,t){if(!t.length)return null;let n=`${e} ${t.join(" ")}`,s=hs(n).slice(e.length).trim(),o=Xt(s),r=o.findIndex(a=>a.toLowerCase()==="in");if(r<0)return null;let i=o.slice(r+1).join(" ").trim();return i?{scope:i}:{node:"miss",reason:'"in" needs a scope afterward'}}function rv(e,t){if(t[0]!=="is"&&t[0]!=="are"||t[1]==="there")return null;let n=-1,s=!1;for(let c=1;c<t.length;c+=1)if(Ge[t[c]]){n=c,s=t[c-1]==="not";break}if(n<0)return null;let o=t.indexOf("by",n+1);if(o>0&&qn[t[n]]){let c=o+1;for(;c<t.length&&(t[c]==="the"||t[c]==="a"||t[c]==="an");)c+=1;let u=t[c];if(u&&!eu.has(u))return null}let r=ov(t[n],e.slice(n+1));if(r?.node==="miss")return r;let i=1;t[i]==="the"&&(i+=1);let a=s?n-1:n;a>i&&(t[a-1]==="a"||t[a-1]==="an")&&(a-=1);let l=a>i?e.slice(i,a).join(" ").trim():"";return l?{node:"qualCheck",term:l,qualifier:t[n],negated:s,scope:r?.scope||null}:{node:"miss",reason:'"is/are <qualifier>" needs a named thing to check first'}}function iv(e,t,n){if(!["do","does","did","is","are","was","were"].includes(t[0]))return null;let s=t.indexOf("not",1);if(s<0)return null;let o=oo(e.filter((r,i)=>i!==s).join(" "),n);return!o||o.shape!=="ask"?null:{...o,negated:!0}}function av(e,t,n){let s=ws.find(d=>t.slice(0,d.split(" ").length).join(" ")===d);if(!s)return null;let o=s.split(" ").length;for(;o<t.length&&(t[o]==="the"||t[o]==="a"||t[o]==="all");)o+=1;let r=[];for(;o<t.length&&Ge[t[o]];)r.push(t[o]),o+=1;let i=o<t.length?xt(t[o]):null;if(!i)return{node:"miss",reason:"count needs a known entity kind (functions, classes, modules, \u2026)"};let a=t[o];o+=1;let l=e.slice(o),c=t.slice(o).some(d=>!st.has(d)&&!hp.has(d)),u;if(c){let d=ro(`which ${a} ${l.join(" ")}`,n,1);if(!d||d.node==="miss")return{node:"miss",reason:"the count restrictor didn't parse"};u=d}else u={node:"allOfClass",entityType:i.entityType};return r.length&&(u={node:"qualifier",filters:r,inner:u}),{node:"count",entityType:i.entityType,base:u}}function uv(e,t,n,s){let o=0,r=!1,i=null;for(let y of cv){let w=y.split(" ");if(t.slice(0,w.length).join(" ")===y){i=y,o=w.length;break}}if(!i)if(t[0]==="what"||t[0]==="which")r=!0,o=1;else return null;for(;o<t.length&&Oa.has(t[o]);)o+=1;let a=[];for(;o<t.length&&Ge[t[o]];)a.push(t[o]),o+=1;let l=o<t.length?xt(t[o]):null;if(!l||l.placeholder||l.entityType==="Change")return!r&&o<t.length&&o===t.length-1&&/^[a-z]+$/.test(t[o])&&!pe[t[o]]&&!Rn.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${gp}`}:null;let c=l.entityType,u=t[o];o+=1;let d=e.slice(o),m=t.slice(o).some(y=>!st.has(y)&&!hp.has(y)),p=t.slice(o),f=d;(p[0]==="is"||p[0]==="are")&&(p=p.slice(1),f=f.slice(1));let g=r&&lv.has(p[0]);if(r&&(m&&!g||d.length===0))return null;let h,b=!1;if(m){let y=g?f:d,w=ro(`which ${[...a,u,...y].join(" ")}`,n,(s||0)+1);if(!w||w.node==="miss")return{node:"miss",reason:w&&w.reason||"the list filter didn't parse"};h=w,b=!0}else h={node:"allOfClass",entityType:c},a.length&&(h={node:"qualifier",filters:a,inner:h});return{node:"list",entityType:c,base:h,scoped:b}}function dv(e,t,n){let s=null,o=-1;for(let f=0;f<t.length;f+=1){let g=t.slice(f,f+2).join(" ");if(Gn[g]){s=Gn[g],o=f;break}if(Gn[t[f]]){s=Gn[t[f]],o=f;break}}if(!s)return null;let r=null,i=null;for(let f=o;f<t.length;f+=1)if(pn[t[f]]){r=pn[t[f]],i=t[f];break}if(!r){for(let f=o-1;f>=0;f-=1)if(pn[t[f]]){r=pn[t[f]],i=t[f];break}}let a=t.includes("connected")||t.slice(o,o+2).join(" ")==="most connected"||["largest","biggest","smallest"].includes(t[o]),l=["important","significant","central","key","core","essential","critical","principal"],c=t.some(f=>l.includes(f));!r&&(a||c)&&(r=pn.connections,i="connections");let u,d=null;for(let f of t){let g=xt(f);if(g&&!g.placeholder){u=g.entityType,d=f;break}}if(!d&&(u=i?tu[i]:void 0,!u))return{node:"miss",reason:"a superlative needs an entity kind (module, class, function, \u2026)"};if(!r)return{node:"miss",reason:"name what to rank by (imports, callers, methods, tests, or connections)"};let m=["needs","need","needing","lacks","lack","lacking","misses","missing"],p=t.some(f=>m.includes(f))?s==="most"?"fewest":"most":s;return{node:"superlative",entityType:u,metric:r,metricNoun:i,extreme:p}}function fv(e,t,n,s){if(t[0]!=="find")return null;let o=1;for(;o<t.length&&Oa.has(t[o]);)o+=1;if(o>=t.length)return null;let r=xt(t[o]);if(r&&!r.placeholder&&r.entityType!=="Change"&&o+1<t.length&&pv.has(t[o+1])){let a=e.slice(o+2).join(" ").trim();if(a)return{node:"find",entityType:r.entityType,term:a}}let i=xt(t[t.length-1]);if(i&&!i.placeholder&&i.entityType!=="Change"){let a=e.slice(o,t.length-1).join(" ").trim();if(a)return{node:"find",entityType:i.entityType,term:a}}return t.some(a=>_n.includes(a))?null:o===t.length-1&&/^[a-z]+$/.test(t[o])&&!pe[t[o]]&&!Rn.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${gp}`}:null}function mv(e,t){if(t[0]!=="find")return null;let n=1;for(;n<t.length&&Oa.has(t[n]);)n+=1;let s=-1;for(let i=n+1;i<t.length;i+=1)if(_n.includes(t[i])){s=i;break}if(s<0)return null;let o=xt(t[s-1]);if(!o||o.placeholder||o.entityType==="Change")return null;let r=e.slice(n,s-1).join(" ").trim();return r?{entityType:o.entityType,term:r,relIdx:s}:null}function hv(e,t,n,s,o,r){let{branches:i,ops:a}=qr(n,s),l=null,c=[];for(let u=0;u<i.length;u+=1){let d=i[u],m=d.map(y=>y.toLowerCase()),p=u===0?"intersection":a[u-1],f=Ea(d,m);if(f.blc.length&&f.blc.every(y=>Ge[y])){c.push({op:p,kind:"qual",filters:f.blc});continue}if(m[0]==="of"||m[0]==="in"){c.push({op:p,kind:"set",ast:{node:"membership",entityType:e,term:d.slice(1).join(" ")}});continue}let g=d,h=$t(m,pe);h?l=d.slice(h.start,h.end):l&&(g=[...l,...d]);let b=wp(`${t} ${g.join(" ")}`,o,r);if(!b||b.node==="miss")return{miss:b&&b.reason||"a clause in the combination didn't parse"};c.push({op:p,kind:"set",ast:b})}return{atoms:c}}function bp(e,t,n,s){let o=mv(e,t);if(o){let{entityType:C,term:E,relIdx:R}=o,N=t.slice(R+1),A=e.slice(R+1);if(!N.length)return{node:"miss",reason:`a relative clause needs a predicate after "${t[R]}"`};let P=hv(C,`which ${t[R-1]}`,N,A,n,s+1);if(P.miss)return{node:"miss",reason:P.miss};let V=[{op:"seed",kind:"set",ast:{node:"find",entityType:C,term:E}},...P.atoms];return V.length===1?V[0].ast:{node:"boolean",entityType:C,atoms:V}}let r=0;for(;r<t.length&&Ca.has(t[r]);)r+=1;let i=r>0,a=[];for(;r<t.length&&Ge[t[r]];)a.push(t[r]),r+=1;let l=r<t.length?xt(t[r]):null;if(!l){let C=r+1<t.length?xt(t[r+1]):null;if(Yd.has(t[r])&&C&&C.entityType==="Commit"&&r+2===t.length)return{node:"recentCommits"};if(up.has(t[r])){let E=r+1;E<t.length&&(t[E]==="the"||t[E]==="a"||t[E]==="an")&&(E+=1);let R=E+1<t.length?xt(t[E+1]):null;if(Yd.has(t[E])&&R&&R.entityType==="Commit"&&E+2===t.length)return{node:"recentCommits"}}return(i||a.length)&&C&&/^[a-z]+$/.test(t[r])&&!pe[t[r]]&&!st.has(t[r])&&!za.has(t[r])?{node:"find",entityType:C.entityType,term:e[r]}:null}let c=l.entityType,u=t[r];r+=1;let d=t.slice(r),m=e.slice(r),p=!1;d.length&&_n.includes(d[0])&&(p=!0,d=d.slice(1),m=m.slice(1));let f=d[0]==="of"||d[0]==="in",g=d.length>0&&dp(d[0]),h=m.length>0&&qr(d,m).branches.some(C=>{let{blc:E}=Ea(C,C.map(R=>R.toLowerCase()));return E.length&&E.every(R=>Ge[R])}),b=m.length>0?qr(d,m).branches:[],y=!1;if(b.length>1){let C=b[0].map(R=>R.toLowerCase()),E=$t(C,pe);E&&E.start===0&&(y=b.slice(1).every(R=>{let N=R.map(P=>P.toLowerCase()),A=$t(N,pe);return A&&A.start===0?A.kind===E.kind:!A}))}let w=!1;if(b.length>1){let C=b[0].map(R=>R.toLowerCase()),E=$t(C,pe);E&&E.start===0&&(w=b.slice(1).every(R=>{let N=R.map(P=>P.toLowerCase()),A=$t(N,pe);return!!A&&A.start===0&&A.end-A.start===1}))}if(!(a.length||p||f||g||h||y||w))return null;if(!m.length){let C={node:"allOfClass",entityType:c};return a.length?{node:"qualifier",filters:a,inner:C,entityType:c}:{node:"miss",reason:"nothing to filter or traverse"}}let v=l.placeholder?"what":`which ${u}`,{branches:k,ops:$}=qr(d,m),T=null,S=[];for(let C=0;C<k.length;C+=1){let E=k[C],R=E.map(M=>M.toLowerCase()),N=C===0?"seed":$[C-1],A=Ea(E,R);if(A.blc.length&&A.blc.every(M=>Ge[M])){S.push({op:N,kind:"qual",filters:A.blc});continue}if(R[0]==="of"||R[0]==="in"){S.push({op:N,kind:"set",ast:{node:"membership",entityType:c,term:E.slice(1).join(" ")}});continue}let P=E,V=$t(R,pe);V?T=E.slice(V.start,V.end):T&&(P=[...T,...E]);let Y=wp(`${v} ${P.join(" ")}`,n,s+1);if(!Y||Y.node==="miss")return{node:"miss",reason:Y&&Y.reason||"a clause in the combination didn't parse"};S.push({op:N,kind:"set",ast:Y})}if(S[0].kind!=="set")return{node:"miss",reason:"start with a clause, then combine with and/or/but-not"};let j;return S.length===1?j=S[0].ast:j={node:"boolean",entityType:c,atoms:S},a.length&&(j={node:"qualifier",filters:a,inner:j,entityType:c}),j}function wp(e,t,n){if(n>lp)return{node:"miss",reason:"too deep to resolve"};let s=Xt(e),o=s.map(a=>a.toLowerCase()),r=Ia(s,o,t,n);if(r)return r;let i=oo(e,t);return i?{node:"clause",clause:i}:null}function qr(e,t){let n=Object.keys(Gs).sort((a,l)=>l.split(" ").length-a.split(" ").length),s=[],o=[],r=0,i=0;for(;i<e.length;){let a=null;for(let l of n){let c=l.split(" ");if(e.slice(i,i+c.length).join(" ")===l){a={c:l,len:c.length};break}}a&&i>r?(s.push(t.slice(r,i)),o.push(Gs[a.c]),i+=a.len,r=i):a?(i+=a.len,r=i):i+=1}return s.push(t.slice(r)),{branches:s,ops:o}}function La(e,t,n,s){let o=no[t];if(o&&es.has(n)){let u=We(e,o).filter(d=>s.has(d.object));return Nn(u.map(d=>e.byId.get(d.subject)).filter(d=>d&&d.class===n))}let a=(!!o&&[...s].some(u=>es.has(e.byId.get(u)?.class))?[...Rt(t),o]:Rt(t)).flatMap(u=>We(e,u)).filter(u=>s.has(u.object)),l=Nn(a.map(u=>e.byId.get(u.subject)).filter(Boolean));if(!n||n==="Change")return l;let c=l.filter(u=>u.class===n);return c.length?c:n!=="Module"&&l.some(u=>u.class==="Module")?Fa(e,new Set(l.filter(u=>u.class==="Module").map(u=>u.id)),n):[]}function bv(e,t){let n=new Set(La(e,"touches","Commit",t).map(s=>String(s.label||"").toLowerCase()));for(let s of t)for(let o of e.byId.get(s)?.derived_from||[]){let r=gv.exec(String(o||""));r&&n.add(r[1].toLowerCase())}return n.size}function Ho(e,t,n){let s=Rt(t).flatMap(o=>We(e,o)).filter(o=>n.has(o.subject));return Nn(s.map(o=>e.byId.get(o.object)).filter(Boolean))}function Nn(e){let t=new Set,n=[];for(let s of e)s&&!t.has(s.id)&&(t.add(s.id),n.push(s));return n}function wv(e,t){let n=Hn(t);if(!n)return[];let s=`${n}/`;return e.individuals.filter(o=>o.class==="Module"&&Hn(o.label).startsWith(s))}function Sa(e){let t=Xd.get(e);if(t)return t;let n=new Set;for(let i of We(e,"reexports")){n.add(String(i.object).toLowerCase());let a=e.byId.get(i.object);a&&n.add(String(a.label).toLowerCase())}let s=new Set,o=new Set;for(let i of We(e,"tests"))s.add(i.object),o.add(i.subject);let r=new Map;for(let i of We(e,"defines"))r.set(i.object,i.subject);return t={exported:n,testedModules:s,testModules:o,moduleOfSymbol:r},Xd.set(e,t),t}function so(e,t){return t?t.class==="Module"?t.id:Sa(e).moduleOfSymbol.get(t.id)||null:null}function yp(e,t){let n=String(t||"").trim().toLowerCase();if(!n)return null;let s=(e?.individuals||[]).filter(d=>yv.has(d.class)&&String(d.label).toLowerCase()===n);if(s.length!==1)return null;let o=s[0],r=so(e,o),i=r&&e.byId.get(r)?.label||String((o.attributes||[]).find(d=>d.key==="site")?.value||"").split(":")[0]||null,a=Fe(o.class,1),l=a==="attribute"?"an":"a",c=i?`, ${Ur("defined-in",o.id,"defined in")} ${i}`:"",u=o.class==="Class"?` or "which classes inherit from ${o.label}"`:"";return{text:`${o.label} is ${l} ${a} in this codebase${c} \u2014 try "describe ${o.label}"${u}.`,hit:o,modLabel:i}}function ja(e,t,n){let s=Nn(Vs.flatMap(o=>Ho(e,o,new Set([t]))));return n?s.filter(o=>o.class===n):s}function Na(e,t,n=null){let s=Ln(e,t,n);if(!(s.match&&s.tier===1)){let o=wv(e,t);if(o.length)return{kind:"dir",mods:o}}return s.match?{kind:"single",id:s.match.id,entityClass:s.match.class,label:s.match.label}:{kind:"miss"}}function vp(e,t,n,s,o){let r=o||(()=>!0),i=ja(e,t,s).filter(r);if(i.length||!xp(e,n))return{own:i,inherited:[],viaId:null,viaLabel:null};for(let a of $p(e,t)){let l=e.byId.get(a);if(!l)continue;let c=ja(e,a,s).filter(r);if(c.length)return{own:i,inherited:c,viaId:a,viaLabel:l.label}}return{own:i,inherited:[],viaId:null,viaLabel:null}}function _s(e,t,n){if(!n)return!1;switch(n.via){case"visibility":return String((t.attributes||[]).find(o=>o.key==="visibility")?.value||"public").toLowerCase()===n.value;case"attr":return!!(t.attributes||[]).find(s=>s.key===n.attr)?.value;case"exported":{let s=Sa(e).exported;return s.has(String(t.label).toLowerCase())||s.has(String(t.id).toLowerCase())}case"tested":{let s=so(e,t),o=Sa(e),r=s?e.byId?.get?.(s):null;return s&&(o.testModules.has(s)||r&&xs(String(r.label).toLowerCase()))?!1:(!!s&&o.testedModules.has(s))===n.value}default:return!1}}function Ma(e){return We(e,"inherits")}function _a(e,t){return Ma(e).filter(n=>n.object===t).map(n=>n.subject)}function Jd(e,t){return Ma(e).filter(n=>n.subject===t).map(n=>n.object)}function vv(e,t){let n=new Set,s=[..._a(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of _a(e,o))n.has(r)||s.push(r)}}return n}function $p(e,t){let n=new Set,s=[...Jd(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of Jd(e,o))n.has(r)||s.push(r)}}return n}function xp(e,t){let n=Qd.get(e);if(n||(n=new Map,Qd.set(e,n)),n.has(t))return n.get(t);let s=Ma(e).some(o=>{let r=e.byId.get(o.subject),i=e.byId.get(o.object);return!!r&&!!i&&r.class===t&&i.class===t});return n.set(t,s),s}function Zd(e,t){let n=String(e.label||"").toLowerCase();if(t.every(o=>n.includes(o)))return"label";let s=(e.attributes||[]).map(o=>String(o.value??"").toLowerCase());return t.every(o=>s.some(r=>r.includes(o)))?"attr":null}function tp(e){return e.slice().sort((t,n)=>ep[n.via]-ep[t.via]||String(t.ind.label).length-String(n.ind.label).length).map(t=>t.ind)}function np(e,t){let n=String(t||"").trim().toLowerCase();if(n.length<4)return!1;let s=Xn(n);if(On(String(e.label||"").toLowerCase(),n,s)<=s)return!0;for(let o of Rs(e.label))if(On(o,n,s)<=s)return!0;return!1}function kp(e,t,n){let s=e.individuals.filter(l=>l.class===t),o=[...Rs(n)];if(!o.length||!s.length)return{narrow:[],broad:[]};let r=xp(e,t),i=[];for(let l of s){let c=Zd(l,o);if(c){i.push({ind:l,via:c});continue}if(!r)continue;[...vv(e,l.id)].some(d=>{let m=e.byId.get(d);return!!m&&!!Zd(m,o)})&&i.push({ind:l,via:"chain"})}if(i.length||!r)return{narrow:tp(i),broad:[]};let a=new Map;for(let l of s)for(let c of $p(e,l.id)){if(!a.has(c)){let u=e.byId.get(c);u&&u.class===t&&np(u,n)&&a.set(c,{ind:u,via:"chain"})}for(let u of _a(e,c)){if(u===l.id||a.has(u))continue;let d=e.byId.get(u);d&&d.class===t&&np(d,n)&&a.set(u,{ind:d,via:"chain"})}}return{narrow:[],broad:tp([...a.values()])}}function Jt(e,t,n){switch(t.node){case"clause":return Gt(e,t.clause,n).matches||[];case"allOfClass":return e.individuals.filter(s=>s.class===t.entityType);case"find":{let{narrow:s,broad:o}=kp(e,t.entityType,t.term);return s.length?s:o}case"existsEdge":{let s=new Set(Rt(t.kind).flatMap(o=>We(e,o)).map(o=>o.subject));return e.individuals.filter(o=>s.has(o.id)&&(!t.entityType||o.class===t.entityType))}case"forwardComplement":{let s=Ln(e,t.subjectTerm,n&&n.contextId);if(!s.match)return[];let o=mp(e,t.kind);if(!o)return[];let r=new Set(Ho(e,t.kind,new Set([s.match.id])).map(i=>i.id));return e.individuals.filter(i=>i.class===o&&!r.has(i.id))}case"reverseSet":{let s=new Set(Jt(e,t.inner,n).map(o=>o.id));return La(e,t.kind,t.entityType,s)}case"forwardSet":{let s=new Set(Jt(e,t.inner,n).map(o=>o.id));return Ho(e,t.kind,s)}case"prevSet":{let s=n&&n.prev;return Array.isArray(s)?s.map(o=>e.byId.get(o)).filter(Boolean):[]}case"membership":{let s=Na(e,t.term,n&&n.contextId);if(s.kind==="dir"){if(!t.entityType||t.entityType==="Module")return s.mods;let i=new Set(s.mods.map(l=>l.id));return Nn(Vs.flatMap(l=>Ho(e,l,i))).filter(l=>l.class===t.entityType)}if(s.kind==="miss")return[];let{own:o,inherited:r}=vp(e,s.id,s.entityClass,t.entityType);return o.length?o:r}case"qualifier":return t.inner.node==="membership"?_p(e,t,n).matches:Jt(e,t.inner,n).filter(o=>t.filters.every(r=>_s(e,o,Ge[r])));case"boolean":return Ep(e,t,n);case"anaphora":return Sp(e,t,n).matches;default:return[]}}function Ep(e,t,n){let s=[];for(let o of t.atoms){if(o.op==="seed"){s=Jt(e,o.ast,n);continue}if(o.kind==="qual"){let i=l=>o.filters.every(c=>_s(e,l,Ge[c])),a=l=>o.filters.every(c=>{let u=$v(Ge[c]);return u?_s(e,l,u):!_s(e,l,Ge[c])});s=o.op==="difference"?s.filter(a):s.filter(i);continue}let r=new Set(Jt(e,o.ast,n).map(i=>i.id));if(o.op==="intersection")s=s.filter(i=>r.has(i.id));else if(o.op==="difference")s=s.filter(i=>!r.has(i.id));else if(o.op==="union"){let i=new Set(s.map(a=>a.id));for(let a of Jt(e,o.ast,n))i.has(a.id)||(i.add(a.id),s.push(a))}}return s}function xv(e,t){if(!Array.isArray(t)||t.length<2)return null;let n=new Set,s=[];for(let o of t){let r=an(e,o);r&&r.match&&!n.has(r.match.id)&&(n.add(r.match.id),s.push(r.match))}return s.length>=2?s:null}function Sp(e,t,n){let o=xv(e,t.candidateTerms);if(!o){let u=n&&n.prev;if(!Array.isArray(u)||!u.length)return{compositeMiss:!0,reason:"no-prev",matches:[]};o=u.map(d=>e.byId.get(d)).filter(Boolean)}let r=o,i=t.filter;if(i&&i.type==="qual")r=r.filter(u=>i.filters.every(d=>_s(e,u,Ge[d])));else if(i&&i.type==="entity")r=r.filter(u=>u.class===i.entityType);else if(i&&i.type==="clause"){let u=an(e,i.clause.object);if(!u.match)r=[];else{let d=no[i.clause.kind],m=[...Rt(i.clause.kind),...d?[d]:[]],p=new Set(m.flatMap(f=>We(e,f)).filter(f=>f.object===u.match.id).map(f=>f.subject));r=r.filter(f=>p.has(f.id))}}let a=u=>u.length&&u.every(d=>d.class===u[0].class)?u[0].class:null,l=i&&i.type==="entity"?i.entityType:a(o),c=r.length?a(r):l;return t.mode==="count"?{compositeKind:"count",count:r.length,entityType:c,matches:[]}:{compositeKind:"set",matches:r,entityType:c}}function jp(e,t,n){let s=n.kind==="*"?kv:[n.kind,...n.sibling?[n.sibling]:[]],o=0;for(let r of s)for(let i of We(e,r)){let a=i.subject===t.id,l=i.object===t.id;if(n.dir==="out"&&a){if(n.filter){let c=e.byId.get(i.object);if(!c||c.class!==n.filter)continue}o+=1}else(n.dir==="in"&&l||n.dir==="both"&&(a||l))&&(o+=1)}return o}function Ev(e){let t=e.individuals.filter(s=>s.class==="Commit"),n=s=>String((s.attributes||[]).find(o=>o.key==="date")?.value||"");return t.sort((s,o)=>n(o).localeCompare(n(s))),{compositeKind:"recentCommits",matches:t}}function jv(e,t){let{op:n,pivotRaw:s}=t,o=u=>String((u.attributes||[]).find(d=>d.key==="date")?.value||"").slice(0,10),r=null,i=null,a=null;if(Sv.test(s))r=s;else{let{match:u,ambiguous:d}=an(e,s,{expectedClass:"Commit"});u&&!d&&u.class==="Commit"&&o(u)&&(i=u.id,a=u.label,r=o(u))}if(!r)return{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotResolved:!1,matches:[]};let l=e.individuals.filter(u=>u.class==="Commit"&&u.id!==i&&o(u)).filter(u=>{let d=o(u);return n==="since"?d>=r:n==="before"?d<r:n==="after"?d>r:d===r}).sort((u,d)=>o(d).localeCompare(o(u))),c=[];return l.length&&c.push({kind:"set",class:"Commit",label:`${l.length} commit${l.length===1?"":"s"} ${n} ${s}`,ids:l.map(u=>u.id),attrs:{count:l.length,op:n,...i?{pivot:i}:{}},lane:"commitFilter"}),i&&c.push({kind:"event",class:"Commit",label:a,ids:[i],attrs:{date:r},lane:"commitFilter"}),{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotDate:r,pivotResolved:!0,matches:l,referents:c}}function _v(e,t,n){let s=Jt(e,t.inner,n),o=new Set(s.map(a=>a.id));if(!o.size)return{compositeKind:"temporal",matches:[],entityType:t.entityType,innerCount:0};let r=La(e,"touches","Commit",o),i=a=>String((a.attributes||[]).find(l=>l.key==="date")?.value||"");return r.sort((a,l)=>i(l).localeCompare(i(a))),{compositeKind:"temporal",matches:r,entityType:t.entityType,innerCount:s.length}}function Rv(e,t){let n=e.individuals.filter(i=>i.class===t.entityType);if(t.metric?.kind==="tests"&&t.entityType==="Module"){let i=new Set(We(e,"tests").map(a=>a.subject));n=n.filter(a=>!i.has(a.id)&&!xs(String(a.label).toLowerCase()))}let s=n.map(i=>({ind:i,score:jp(e,i,t.metric)})).sort((i,a)=>t.extreme==="most"?a.score-i.score:i.score-a.score);if(!s.length)return{compositeKind:"superlative",entityType:t.entityType,matches:[]};let o=s[0].score,r=s.filter(i=>i.score===o).map(i=>i.ind);return{compositeKind:"superlative",entityType:t.entityType,metricNoun:t.metricNoun,extreme:t.extreme,score:o,matches:r}}function _p(e,t,n){let s=t.node==="qualifier"&&t.inner.node==="membership"?t:null,o=s?s.inner:t,r=o.entityType,i=s?m=>s.filters.every(p=>_s(e,m,Ge[p])):null,a=Na(e,o.term,n&&n.contextId);if(a.kind==="dir"){let m;if(!r||r==="Module")m=a.mods;else{let p=new Set(a.mods.map(f=>f.id));m=Nn(Vs.flatMap(f=>Ho(e,f,p))).filter(f=>f.class===r)}return i&&(m=m.filter(i)),{compositeKind:"set",matches:m,entityType:r}}if(a.kind==="miss")return{compositeKind:"set",matches:[],entityType:r};let{own:l,inherited:c,viaLabel:u}=vp(e,a.id,a.entityClass,r,i),d=!l.length&&c.length>0;return{compositeKind:"membership",entityType:r,matches:d?c:l,inheritedNotOwn:d,viaLabel:u,ownerLabel:a.label}}function Av(e,t){let{entityType:n,term:s,scopeModule:o}=t,r=null;if(o){let a=an(e,o,{expectedClass:"Module"});if(!a.match)return{compositeKind:"exists",entityType:n,term:s,scopeModule:o,scopeMiss:!0,matches:[]};r=a.match}if(s){let a=an(e,s,{expectedClass:n}),l=!r||a.match&&so(e,a.match)===r.id,c=a.match&&l;return{compositeKind:"exists",entityType:n,term:s,scopeModule:o,scopeMatch:r,matches:c?[a.match]:[]}}let i=r?Fa(e,new Set([r.id]),n):e.individuals.filter(a=>a.class===n);return{compositeKind:"exists",entityType:n,term:null,scopeModule:o,scopeMatch:r,matches:i}}function Tv(e,t,n){let s=so(e,t);return n.kind==="dir"?n.mods.some(o=>o.id===t.id||o.id===s):s===n.id||ja(e,n.id).some(o=>o.id===t.id)}function Cv(e,t,n){let{term:s,qualifier:o,negated:r,scope:i}=t,a=Ln(e,s,n.contextId);if(a.unresolvedPronoun)return{compositeKind:"qualCheck",qualCheckMiss:"pronoun",term:s,matches:[]};if(!a.match)return{compositeKind:"qualCheck",qualCheckMiss:"unresolved",term:s,matches:[]};if(i){let u=Na(e,i,n.contextId);if(u.kind==="miss")return{compositeKind:"qualCheck",qualCheckMiss:"scope",term:s,scope:i,matches:[]};if(!Tv(e,a.match,u))return{compositeKind:"qualCheck",qualCheckMiss:"outsideScope",term:s,scope:i,subjectLabel:a.match.label,scopeLabel:u.kind==="dir"?i:u.label,matches:[]}}let l=_s(e,a.match,Ge[o]),c=r?!l:l;return{compositeKind:"qualCheck",subject:a.match,qualifier:o,negated:r,holds:c,matches:[a.match]}}function Iv(e,t,n){let s=an(e,t.object);if(!s||!s.match)return{compositeKind:"universal",universalMiss:"unresolved",object:t.object,matches:[]};let o=Jt(e,{node:"allOfClass",entityType:t.entityType},n),r=Ep(e,t.complement,n),i=r.length===0;return{compositeKind:"universal",entityType:t.entityType,kind:t.kind,object:s.match.label,holds:i,total:o.length,counter:r,matches:i?o:r}}function Ov(e,t,n){if(t.node==="reverseSet"&&t.kind==="touches"&&t.entityType==="Commit")return new Set(Jt(e,t.inner,n).map(s=>s.id));if(t.node==="clause"&&t.clause?.shape==="reverse"&&t.clause.kind==="touches"&&t.clause.entityType==="Commit"){let{objMatch:s,ambiguous:o}=Gt(e,t.clause,n);return s&&!o?new Set([s.id]):null}return null}function Lv(e,t,n={}){if(t.node==="miss")return{compositeMiss:!0,reason:t.reason||null,matches:[]};if(t.node==="exists")return Av(e,t);if(t.node==="qualCheck")return Cv(e,t,n);if(t.node==="universal")return Iv(e,t,n);if(t.node==="count"){let s=Ov(e,t.base,n);return s?{compositeKind:"count",count:bv(e,s),entityType:t.entityType,matches:[]}:{compositeKind:"count",count:Jt(e,t.base,n).length,entityType:t.entityType,matches:[]}}if(t.node==="list")return{compositeKind:"list",matches:Jt(e,t.base,n),entityType:t.entityType,scoped:t.scoped};if(t.node==="superlative")return Rv(e,t);if(t.node==="temporal")return _v(e,t,n);if(t.node==="recentCommits")return Ev(e);if(t.node==="commitFilter")return jv(e,t);if(t.node==="anaphora")return Sp(e,t,n);if(t.node==="membership"||t.node==="qualifier"&&t.inner.node==="membership")return _p(e,t,n);if(t.node==="find"){let{narrow:s,broad:o}=kp(e,t.entityType,t.term);return{compositeKind:"find",entityType:t.entityType,term:t.term,matches:s.length?s:o,broad:!s.length&&o.length>0}}return(t.node==="reverseSet"||t.node==="forwardSet")&&t.inner.node==="prevSet"&&!(Array.isArray(n.prev)&&n.prev.length)?{compositeMiss:!0,reason:"no-prev",matches:[]}:{compositeKind:"set",matches:Jt(e,t,n),entityType:t.entityType||null}}function Rp(){return'compositional queries also work: "which functions call X and call Y", "what calls something that imports X", "public methods of X", "list functions" / "show me the classes", "how many classes", "which module has the most imports", "find me the payment class", or (after a listing) "which of those are tested"'}function Nv(e){let t=["Function","Method"].includes(e.class)?`${e.label}()`:e.label;if(e.class==="Module")return t;let n=Yo(e);return n&&n!=="(unknown module)"?`${t} in ${n}`:t}function Mv(e,t,n){if(t.compositeMiss)return t.reason==="no-prev"?{content:'"those"/"them" needs a previous answer to refer to \u2014 ask a listing question first, then follow up.',miss:!0,ambiguous:!1}:{content:`couldn't compile this compositional question${t.reason?` (${t.reason})`:""}. ${Rp()}.`,miss:!0,ambiguous:!1};if(t.compositeKind==="exists"){if(t.scopeMiss)return{content:`no module matching "${t.scopeModule}" found in the index.`,miss:!0,ambiguous:!1};let s=Fe(t.entityType,1),o=Fe(t.entityType,2),r=t.scopeMatch?` in ${t.scopeMatch.label}`:"";if(t.term){if(!t.matches.length)return{content:`No \u2014 no ${s} named "${t.term}" found${r}.`,miss:!0,ambiguous:!1};let i=t.matches[0],a=Yo(i),l=i.class==="Module"?"":a&&a!=="(unknown module)"?`, ${Ur("defined-in",i.id,"defined in")} ${a}`:"";return{content:`Yes \u2014 ${i.label} is a ${s}${l}.`,miss:!1,ambiguous:!1,matches:t.matches}}return t.matches.length?{content:`Yes \u2014 ${Jn(t.matches)}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`No \u2014 no ${o} found${r}.`,miss:!0,ambiguous:!1}}if(t.compositeKind==="qualCheck"){if(t.qualCheckMiss==="pronoun")return{content:`"${t.term}" needs a selected node to refer to \u2014 click a node first, or name it directly.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="unresolved")return{content:`couldn't find "${t.term}" in the index to check.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="scope")return{content:`couldn't find "${t.scope}" in the index to check inside.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="outsideScope")return{content:`No \u2014 ${t.subjectLabel} isn't in ${t.scopeLabel}.`,miss:!0,ambiguous:!1};let s=t.subject.label,o=t.negated?`not ${t.qualifier}`:t.qualifier,r=t.negated?t.qualifier:`not ${t.qualifier}`;return{content:`${t.holds?"Yes":"No"} \u2014 ${s} is ${t.holds?o:r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="universal"){if(t.universalMiss==="unresolved")return{content:`couldn't find "${t.object}" in the index to check.`,miss:!0,ambiguous:!1,matches:[]};let s=Fe(t.entityType,t.total),o=Iy(t.kind);return t.holds?{content:`Yes \u2014 all ${t.total} ${s} ${o} ${t.object}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`No \u2014 ${t.counter.length} of ${t.total} ${s} do not ${o} ${t.object}: ${Jn(t.counter)}.`,miss:!1,ambiguous:!1,matches:t.counter}}if(t.compositeKind==="count"){let s=t.entityType?Fe(t.entityType,t.count):t.count===1?"result":"results";return{content:`${t.count} ${s}.`,miss:!1,ambiguous:!1,matches:[]}}if(t.compositeKind==="list"){if(!t.matches.length)return{content:`no ${Fe(t.entityType,2)} in this index.`,miss:!0,ambiguous:!1,matches:[]};let s=!["Module","Commit","Fact","Utterance","Session","Source","Rule"].includes(t.entityType),o=!t.scoped&&s&&t.matches.length>Be?` \u2014 narrow with "${Fe(t.entityType,2)} in <module>"`:"";return{content:`${Jn(t.matches)}${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="membership"){if(!t.matches.length)return{content:`nothing in the index matches that${t.entityType?` (${Fe(t.entityType,2)})`:""}. ${Zn(n)}`,miss:!0,ambiguous:!1,matches:[]};if(t.inheritedNotOwn){let s=Fe(t.entityType,2);return{content:`${t.ownerLabel?`${t.ownerLabel} has no own ${s}`:`no own ${s}`} \u2014 inherited from ${t.viaLabel}: ${Jn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches,inheritedNotOwn:!0}}return{content:`${Jn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="find"){let s=Fe(t.entityType,1);if(!t.matches.length)return{content:`no ${Fe(t.entityType,2)} found matching "${t.term}".`,miss:!0,ambiguous:!1,matches:[]};let o=t.matches.length===1?Nv(t.matches[0]):Jn(t.matches);return t.broad?{content:`no exact ${s} named "${t.term}", but found a related ${t.matches.length===1?s:Fe(t.entityType,2)}: ${o}.`,miss:!1,ambiguous:!1,matches:t.matches,relatedNotExact:!0}:{content:`${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="recentCommits"){if(!t.matches.length)return{content:"no commits recorded in this index.",miss:!0,ambiguous:!1,matches:[]};let s=i=>String((i.attributes||[]).find(a=>a.key==="date")?.value||""),o=t.matches.slice(0,Mt).map(i=>{let a=s(i).slice(0,10),l=(i.attributes||[]).find(c=>c.key==="message")?.value||"";return`${i.label}${a?` (${a})`:""}${l?` \u2014 ${l}`:""}`}),r=t.matches.length>Mt?` \u2026+${t.matches.length-Mt} more`:"";return{content:`${t.matches.length} recent commit(s): ${o.join(", ")}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="commitFilter"){if(!t.pivotResolved)return{content:`"${t.pivotRaw}" isn't a recognized date (yyyy-mm-dd) or a known commit \u2014 try "what changed since 2026-06-01" or "what changed before <commit>".`,miss:!0,ambiguous:!1,matches:[]};if(!t.matches.length)return{content:`no commits recorded ${t.op} ${t.pivotRaw}.`,miss:!0,ambiguous:!1,matches:[]};let s=i=>String((i.attributes||[]).find(a=>a.key==="date")?.value||""),o=t.matches.slice(0,Mt).map(i=>{let a=s(i).slice(0,10),l=(i.attributes||[]).find(c=>c.key==="message")?.value||"";return`${i.label}${a?` (${a})`:""}${l?` \u2014 ${l}`:""}`}),r=t.matches.length>Mt?` \u2026+${t.matches.length-Mt} more`:"";return{content:`${t.matches.length} commit(s) changed ${t.op} ${t.pivotRaw}: ${o.join(", ")}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="superlative"){if(!t.matches.length)return{content:`no ${Fe(t.entityType,2)} to rank in this index.`,miss:!0,ambiguous:!1};let s=t.extreme==="most"?"the most":"the fewest",o=t.matches.length>1?` (${t.matches.length}-way tie)`:"";return{content:`${Jn(t.matches)} \u2014 ${s} ${t.metricNoun} (${t.score})${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="temporal"){let s=t.innerCount||0,o=t.entityType?Fe(t.entityType,s||2):s===1?"entity":"entities",r=s===1?"was":"were";if(!s)return{content:`nothing in the index matches the inner set, so there is no change history to date. ${Zn(n)}`,miss:!0,ambiguous:!1,matches:[]};if(!t.matches.length)return{content:`no recorded commit touched the ${s} ${o} in that set in this index. ${Zn(n)}`,miss:!0,ambiguous:!1,matches:[]};let i=t.matches[0],a=(i.attributes||[]).find(d=>d.key==="date")?.value||"";if(!a)return{content:`the ${o} in that set ${r} last touched by commit ${i.label}, but this index records no commit dates \u2014 regenerate the graph to attach mgx:commitDate.`,miss:!0,ambiguous:!1,matches:t.matches};let l=(i.attributes||[]).find(d=>d.key==="message")?.value||"",c=String(a).slice(0,10),u=t.matches.length-1;return{content:`the ${o} in that set ${r} last touched by commit ${i.label} on ${c}${l?` ("${l}")`:""}${u?`; ${u} earlier commit${u===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}return t.matches.length?{content:`${Jn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`nothing in the index matches that${t.entityType?` (${Fe(t.entityType,2)})`:""}. ${Zn(n)}`,miss:!0,ambiguous:!1,matches:[]}}function Pa(){return`"which <functions|classes|modules> <imports|calls|uses|inherits from|tests> <name>" or "what does <name> <import|call|export>" or "what uses <name>" or "where is <name> defined" / "where is <name> mentioned" or "when did <name> change" or "which commits touched <name>" or "which changes touch commit <sha>"/"what did commit <sha> touch" (a commit's own changes) or plainly "what calls this" (about a selected node) or "what does <term> mean"/"what is a <ClassName>" (about the graph's own vocabulary). `+Rp()}function Zn(e=null){return e&&oa(e)===0?"This store holds no code index, so it records no modules or commits to look through.":`Try "who touched <a module that actually has commits>" or "/describe <module>" to see what's in the index.`}function Rs(e){return new Set(String(e).toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function Vr(e){if(e.length<5)return e;let t=e.replace(/(ing|ers|ors|er|or)$/,"");return t===e?e:t.length>=3&&t[t.length-1]===t[t.length-2]?t.slice(0,-1):t}function Ap(e){return String(e||"").replace(/\.[a-z0-9]+$/i,"").toLowerCase().replace(/[/\-_.]+/g,"")}function Pv(e){return String(e||"").trim().replace(/^(?:the|a|an)\s+/i,"").toLowerCase().replace(/[\s\-_]+/g,"")}function Go(e,t,{expectedClass:n=null}={}){let s=String(t||"").trim();if(!s)return{match:null,candidates:[],tier:null,ambiguous:!1};let o=s.toLowerCase(),r=n?e.individuals.filter(h=>h.class===n):e.individuals,i=o.match(/^(commit[:\s])?([0-9a-f]{7,40})$/);if(i){let h=i[2],b=r.filter(y=>y.class==="Commit"&&(String(y.id).toLowerCase().startsWith(`commit:${h}`)||String(y.label).toLowerCase().startsWith(h)));if(b.length===1)return{match:b[0],candidates:[],tier:1,ambiguous:!1};if(b.length>1)return{match:b[0],candidates:b.slice(1,5),tier:1,ambiguous:!0};if(i[1])return{match:null,candidates:[],tier:null,ambiguous:!1}}let a=r.find(h=>String(h.label).toLowerCase()===o||String(h.id).toLowerCase()===o);if(a)return{match:a,candidates:[],tier:1,ambiguous:!1};let l=`ext:${o}`,c=null;e:for(let h of e.relations)for(let b of h.edges)if(String(b.object).toLowerCase()===l){c=b.object;break e}if(c&&!n)return{match:{id:c,label:s,class:null},candidates:[],tier:2,ambiguous:!1};let u=s.split(/\s+and\s+/i).map(h=>h.trim()).filter(Boolean);if(u.length>1){let h=new Set;for(let b of u){let y=Go(e,b,{expectedClass:n});y.match&&!y.ambiguous&&h.add(y.match.id)}if(h.size>1)return{match:null,candidates:[],tier:null,ambiguous:!1}}let d=[],m=!o.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(o);if(m){let h=o.split(".").pop();for(let b of r){let y=String(b.label||"").toLowerCase();b.class==="Module"?y.split("/").pop()===o&&d.push({ind:b,score:1e3-Math.abs(y.length-o.length)}):y.includes(o)?d.push({ind:b,score:2e3-Math.abs(y.length-o.length)}):y.endsWith(`.${h}`)&&d.push({ind:b,score:1500-Math.abs(y.length-o.length)})}}else{let h=[...Rs(s)],b=o.split(/\s+/).find($=>$.includes("/")),y=b?b.split("/").pop().replace(/\.[a-z0-9]+$/,""):null,v=s.trim().replace(/^(?:the|a|an)\s+/i,"").trim().split(/\s+/).filter(Boolean).length>=2,k=v?Pv(s):null;for(let $ of r){let T=String($.label||"").toLowerCase(),S=T.split("/").pop().replace(/\.[a-z0-9]+$/,"");if(S===o){d.push({ind:$,score:5e3});continue}if(o.length>=4&&(S.startsWith(o)||S.endsWith(o))){d.push({ind:$,score:4e3-Math.abs(S.length-o.length)});continue}if(v){let E=Ap($.label);if(E&&E===k){d.push({ind:$,score:5e3});continue}let R=/[/_-]/.test($.label)||/\.[a-z0-9]+$/i.test(String($.label||""));if(E&&R&&k.length>=4&&E.includes(k)){d.push({ind:$,score:2e3-Math.abs(E.length-k.length)});continue}}if($.class==="Module"){let E=Vr(o);if(E!==o&&E===Vr(S)){let R=Xn(o);if(On(S,o,R)>R){d.push({ind:$,score:3e3-Math.abs(S.length-o.length)});continue}}}if(o.length>=4&&T.includes(o)){d.push({ind:$,score:1e3-Math.abs(T.length-o.length)});continue}let j=Rs($.label),C=h.filter(E=>j.has(E)).length;C>0&&(!y||j.has(y))&&d.push({ind:$,score:C/h.length*va})}}if(d.sort((h,b)=>b.score-h.score),d.length){let[h,...b]=d,y=b.filter(v=>v.score===h.score),w=h.score>=va?b.filter(v=>v.score>=va):b;return{match:h.ind,candidates:w.slice(0,4).map(v=>v.ind),tier:3,ambiguous:y.length>0}}let p=m||o.includes("/"),f=null,g=!p&&typeof vs=="function"?vs(e.proseIndex,s).filter(h=>!n||e.byId.get(h.id)?.class===n):[];if(g.length){let[h,...b]=g,y=e.byId.get(h.id);if(y){let w=b.filter(v=>v.score===h.score);if(f={match:y,candidates:b.slice(0,4).map(v=>e.byId.get(v.id)).filter(Boolean),tier:4,ambiguous:w.length>0,matchedVia:"prose"},!f.ambiguous&&h.via!=="spell")return f}}if(!i&&o.length>=4){let h=Xn(o),b=h+1,y=[];for(let w of r){let v=On(String(w.label||"").toLowerCase(),o,h);if(v>0)for(let k of Rs(w.label)){if(v<=0)break;v=Math.min(v,On(k,o,h))}v<b?(b=v,y=[w]):v===b&&v<=h&&y.push(w)}if(b<=h&&y.length===1)return{match:y[0],candidates:[],tier:5,ambiguous:!1,matchedVia:"fuzzy"};if(b<=h&&y.length>1&&!f){let[w,...v]=y;return{match:w,candidates:v.slice(0,4),tier:5,ambiguous:!0,matchedVia:"fuzzy"}}}return f||{match:null,candidates:[],tier:null,ambiguous:!1}}function $a(e,t){let n=Ap(t),s=[...Rs(t)],o=[];for(let r of Rs(e))n.includes(r)||s.some(i=>Vr(i)===Vr(r))||Gr.has(r)||Ip.has(r)||o.push(r);return o}function Br(e,t){if(!e?.match||e.tier!==3||e.matchedVia)return e;if(e.ambiguous){let s=[e.match,...e.candidates||[]],o=s.map(r=>new Set($a(t,r.label))).reduce((r,i)=>r.filter(a=>i.has(a)),$a(t,s[0].label));return o.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:o,nearestLabel:hn(s.slice(0,4).map(r=>r.label))}:e}let n=$a(t,e.match.label);return n.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:n,nearestLabel:e.match.label}:e}function an(e,t,n={}){let{expectedClass:s=null}=n;if(!s){let o=String(t||"").trim(),r=o.replace(Fv,"").trim(),i=r.match(Dv);if(i){let a=r.slice(0,i.index).trim(),l=Ue[i[1].toLowerCase()];if(a&&l){let c=Br(Go(e,a,{expectedClass:l}),a);if(c?.match?.id&&!c.ambiguous)return c}}if(r&&r!==o){let a=Br(Go(e,r,n),r);if(a?.match?.id&&!a.ambiguous)return a}return Br(Go(e,t,n),t)}return Br(Go(e,t,n),t)}function Ln(e,t,n){if(gs.includes(String(t||"").trim().toLowerCase())){if(!n)return{match:null,candidates:[],tier:null,ambiguous:!1,unresolvedPronoun:!0};let s=e.byId.get(n);return s?{match:s,candidates:[],tier:1,ambiguous:!1}:{match:null,candidates:[],tier:null,ambiguous:!1,unresolvedPronoun:!0}}return an(e,t)}function Fa(e,t,n){let s=[];for(let o of We(e,"defines")){if(!t.has(o.subject))continue;let r=e.byId.get(o.object);r&&r.class===n&&s.push(r)}return s}function zv(e,t,n,s={}){let o=!n||n==="Change"||n==="Commit",r=o||n==="Module",i=o||es.has(n),a=[...r?["touches"]:[],...i?["touchesSymbol"]:[]],l=a.flatMap(c=>We(e,c)).filter(c=>c.subject===t.id).map(c=>e.byId.get(c.object)).filter(Boolean);return n&&es.has(n)&&(l=l.filter(c=>c.class===n)),{matches:l,objMatch:t,commitSubject:!0,ambiguous:!1,candidates:[],traversal:`${a.join("+")} edges where subject = commit ${t.label}`,...s}}function qv(e,t){let n=new Set(String(t||"").toLowerCase().split(/[\s-]+/).filter(Boolean));return(e.individuals||[]).filter(s=>s.class==="Module"&&Da.has(sp(s.label))).map(s=>({ind:s,named:n.has(sp(s.label))?1:0,depth:String(s.label).split("/").length,fixture:Wv(s.label)?1:0})).sort((s,o)=>o.named-s.named||s.depth-o.depth||s.fixture-o.fixture||String(s.ind.label).localeCompare(String(o.ind.label))).map(s=>s.ind)}function Gv(e,t,n){return e==="reverse"&&(t==="imports"||t==="calls")&&(!n||n==="Module")}function Gt(e,t,{contextId:n=null,prev:s=null,pinnedObjMatch:o=null}={}){if(!t)return{matches:[],objMatch:null,candidates:[],traversal:null,ambiguous:!1};if(t.node)return Lv(e,t,{contextId:n,prev:s});if(t.ambiguousParse){let A=t.candidates.map(P=>{let V=Gt(e,P,{contextId:n,prev:s});return{parsed:P,result:V,rendered:gn(P,V,e)}});return{matches:[],objMatch:null,candidates:t.candidates,traversal:null,ambiguous:!0,branches:A}}let{shape:r,kind:i,entityType:a}=t;if(r==="meta"){let A=String(t.object||"").trim(),P=A.toLowerCase(),V=(e.individuals||[]).find(Y=>{if(Y.class!=="SchemaClass"&&Y.class!=="SchemaPredicate")return!1;if(String(Y.label).toLowerCase()===P)return!0;let M=(Y.attributes||[]).find(F=>F.key==="token")?.value;return M&&String(M).toLowerCase()===P});if(!V){let Y=yp(e,A);return Y?{matches:[Y.hit],objMatch:Y.hit,candidates:[],ambiguous:!1,metaCodeClass:!0,metaFallbackText:Y.text,traversal:`schema lookup for "${A}" (miss), then unique code-entity individual by label`}:{matches:[],objMatch:null,candidates:[],traversal:`schema lookup for "${A}"`,ambiguous:!1}}return{matches:[V],objMatch:V,candidates:[],traversal:`schema lookup for "${A}"`,ambiguous:!1}}if(r==="mentions"){let A=String(t.object||"").trim();return{matches:(typeof vs=="function"?vs(e.proseIndex,A):[]).map(Y=>e.byId.get(Y.id)).filter(Boolean),objMatch:null,candidates:[],ambiguous:!1,mentionsShape:!0,traversal:`proseIndex word lookup for "${A}"`}}if(r==="where"&&Uv.test(String(t.object||"").trim())){let A=qv(e,t.object);return{matches:A,objMatch:A[0]||null,candidates:A.slice(1,5),ambiguous:!1,entryPointShape:!0,traversal:`Module individuals with an entry-point basename (${[...Da].join("/")}), ranked query-named basename first, then shallower path, then non-test path`}}if(t.modifier&&t.modifier!=="direct"&&!Gv(r,i,a))return{matches:[],objMatch:null,candidates:[],ambiguous:!1,unsupportedModifier:!0,traversal:`modifier "${t.modifier}" requested for a "${i}" query \u2014 no closure traversal exists for this combination yet`};if(r==="ask"){let A=Ln(e,t.subject,n),P=Ln(e,t.object,n);if(!A.match||!P.match||A.ambiguous||P.ambiguous)return{matches:[],objMatch:P.match,candidates:P.candidates,traversal:null,ambiguous:!1,answer:null,unresolvedPronoun:!!(A.unresolvedPronoun||P.unresolvedPronoun)};let[V,Y]=[A.match,P.match];i==="touches"&&Y.class==="Commit"&&V.class!=="Commit"&&([V,Y]=[Y,V]);let M=no[i],F=[...new Set(M?[...Rt(i),M]:Rt(i))],W=F.flatMap(U=>We(e,U)).filter(U=>U.subject===V.id&&U.object===Y.id);return{matches:W,answer:t.negated?W.length===0:W.length>0,objMatch:P.match,subjMatch:A.match,candidates:[],traversal:`${F.join("+")} edge from ${V.label} to ${Y.label}`,ambiguous:!1}}let l;if(o)l={match:o,candidates:[],ambiguous:!1,matchedVia:null};else{if(l=Ln(e,t.object,n),t.altObject&&t.altObject!==t.object){let A=Ln(e,t.altObject,n),P=!!l.match&&!l.ambiguous,V=!!A.match&&!A.ambiguous;!P&&V?l=A:P&&V&&l.match.id!==A.match.id&&(l={...l,ambiguous:!0,candidates:[A.match,...l.candidates||[]]})}if(t.kind==="tests"&&l.match&&!l.ambiguous&&!String(t.object||"").includes("/")){let A=Y=>Y.replace(/\.(?:test|spec|tests)(?=\.[^.]+$)/,""),P=A(String(t.object||"").trim().toLowerCase()),V=(e.individuals||[]).find(Y=>{if(Y.class!=="Module"||Y.id===l.match.id)return!1;let M=String(Y.label||"").toLowerCase().split("/").pop();return M!==A(M)&&A(M)===P});V&&(l={...l,ambiguous:!0,candidates:[V,...l.candidates||[]]})}}let{match:c,candidates:u,ambiguous:d,unresolvedPronoun:m,matchedVia:p,unplacedWords:f,nearestLabel:g}=l;if(!c)return{matches:[],objMatch:null,candidates:u,traversal:null,ambiguous:!1,unresolvedPronoun:m,unplacedWords:f,nearestLabel:g};if(d){let P=Nn([c,...u||[]]).slice(0,Be).map(V=>{let Y=Gt(e,t,{contextId:n,prev:s,pinnedObjMatch:V});return{candidate:V,result:Y,rendered:gn(t,Y,e)}});return{matches:[],objMatch:c,candidates:u,traversal:null,ambiguous:!0,branches:P}}if(r==="where"){let A=(c.attributes||[]).find(P=>P.key==="site")?.value||null;return{matches:[c],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whereShape:!0,site:A,traversal:A?`site attribute of ${c.label}`:`class + defining module of ${c.label}`}}if(r==="when"){let A=V=>String((V.attributes||[]).find(Y=>Y.key==="date")?.value||""),P;if(c.class==="Commit")P=[c];else{let V=["touches","touchesSymbol"].flatMap(M=>We(e,M)).filter(M=>M.object===c.id),Y=new Set;P=[];for(let M of V){if(Y.has(M.subject))continue;Y.add(M.subject);let F=e.byId.get(M.subject);F&&F.class==="Commit"&&P.push(F)}P.sort((M,F)=>A(F).localeCompare(A(M)))}return{matches:P,objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whenShape:!0,traversal:`touches+touchesSymbol edges where object = ${c.label}, newest commit date first`}}if(r==="whoLast"){let A=M=>String((M.attributes||[]).find(F=>F.key==="date")?.value||""),P=["touches","touchesSymbol"].flatMap(M=>We(e,M)).filter(M=>M.object===c.id),V=new Set,Y=[];for(let M of P){if(V.has(M.subject))continue;V.add(M.subject);let F=e.byId.get(M.subject);F&&F.class==="Commit"&&Y.push(F)}return Y.sort((M,F)=>A(F).localeCompare(A(M))),{matches:Y,objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whoLastShape:!0,traversal:`touches+touchesSymbol edges where object = ${c.label}, newest commit's author`}}if(i==="touches"&&c.class==="Commit")return zv(e,c,a,{candidates:u,ambiguous:d,matchedVia:p});if(r==="forward"){let A=no[i],V=!!(A&&c.class&&es.has(c.class))?[...new Set([...Rt(i),A])]:Rt(i);if(a&&a!=="Change"){let B=fp(e,V),_=ya[a];if(B.size&&!B.has(a)&&!(_&&B.has(_)))return{matches:[],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,forwardGrainMiss:!0,wantClasses:[...B],traversal:`${V.join("+")} edges where subject = ${c.label} (grain mismatch: this "${i}" relation never targets a ${Qn(a)})`}}let M=V.flatMap(B=>We(e,B)).filter(B=>B.subject===c.id).map(B=>e.byId.get(B.object)).filter(Boolean),F=Nn(M),W=F,U="";if(a&&a!=="Change"){W=F.filter(_=>_.class===a);let B=ya[a];if(!W.length&&B){let _=F.filter(I=>I.class===B);_.length&&(W=_,U=`, widened to ${B} subjects (no ${a} recorded)`)}}return{matches:W,objMatch:c,candidates:u,traversal:`${V.join("+")} edges where subject = ${c.label}${U}`,ambiguous:d,matchedVia:p}}if(t.modifier==="transitive")return{matches:Qs(e,c,{maxDepth:op}).flat().map(V=>e.byId.get(V.id)).filter(Boolean),objMatch:c,candidates:u,ambiguous:d,matchedVia:p,traversal:`reverse dependency closure over imports+calls edges from ${c.label} (impactClosure, maxDepth=${op})`};let h=no[i]||Rt(i).find(A=>ap.has(A))||null,b=!!(c.class&&es.has(c.class));if(h&&(es.has(a)||b)){let A=We(e,h).filter(U=>U.object===c.id),P=Nn(A.map(U=>e.byId.get(U.subject)).filter(Boolean)),V=!a||a==="Change"?P:P.filter(U=>U.class===a),Y="",M=ya[a];if(!V.length&&M){let U=P.filter(B=>B.class===M);U.length&&(V=U,Y=`, widened to ${M} subjects (no ${a} recorded)`)}let F=(i==="touches"||i==="calls"||i==="uses")&&c.class==="Class"&&!We(e,"contains").some(U=>U.subject===c.id),W=F?e.byId.get(so(e,c)||""):null;if(V.length||!(F&&W))return{matches:V,objMatch:c,candidates:u,traversal:`${h} edges where object = ${c.label}${Y}`,ambiguous:d,matchedVia:p}}let y=c,w=u,v=d,k=p,$="",T=mp(e,i);if(T&&y.class&&y.class!==T){let A=an(e,t.object,{expectedClass:T});if(A.match&&!A.ambiguous)y=A.match,w=A.candidates,v=A.ambiguous,k=A.matchedVia;else if(T==="Module"){let P=so(e,y),V=P&&e.byId.get(P);if(V)$=`, refined from ${y.label} to its containing module`,y=V;else return{matches:[],objMatch:y,candidates:w,ambiguous:v,matchedVia:k,wrongGrainMiss:!0,wantClass:T,traversal:`"${t.object}" resolved to ${Qn(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${Qn(T)}, and no containing module could be found to refine to)`}}else return{matches:[],objMatch:y,candidates:w,ambiguous:v,matchedVia:k,wrongGrainMiss:!0,wantClass:T,traversal:`"${t.object}" resolved to ${Qn(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${Qn(T)})`}}let S=Rt(i).flatMap(A=>We(e,A)).filter(A=>A.object===y.id);i==="cochange"&&(S=S.concat(Rt(i).flatMap(A=>We(e,A)).filter(A=>A.subject===y.id).map(A=>({...A,subject:A.object,object:A.subject}))));let j="";if(!S.length&&y.class){let A=`ext:${String(y.label).toLowerCase()}`;S=Rt(i).flatMap(P=>We(e,P)).filter(P=>String(P.object).toLowerCase()===A),S.length&&(j=` (by name, via unresolved ${A} references)`)}let C=[],E=new Set;for(let A of S){let P=e.byId.get(A.subject);P&&!E.has(P.id)&&(E.add(P.id),C.push(P))}let R,N="";if(!a||a==="Change")R=C;else{let A=C.filter(P=>P.class===a);if(A.length)R=A;else if(a!=="Module"&&C.some(P=>P.class==="Module")){let P=new Set(C.filter(V=>V.class==="Module").map(V=>V.id));R=Fa(e,P,a),N=`, then ${Qn(a)} defined in the matched module(s)`}else R=[]}return{matches:R,objMatch:y,candidates:w,traversal:`${Rt(i).join("+")} edges where object = ${y.label}${j}${N}${$}`,ambiguous:v,matchedVia:k}}function Yo(e){if(e.class==="Module")return e.label;let t=(e.attributes||[]).find(s=>s.key==="site")?.value;if(t)return String(t).split(":")[0];let n=String(e.id||"").match(/^fn:(.+)#/);return n?n[1]:"(unknown module)"}function xa(e){let t=String(e.label||e.id||"");return["Function","Method"].includes(e.class)?`function ${t}()`:t}function Vv(e){let t=String(e.label||e.id||""),n=(e.attributes||[]).find(s=>s.key==="author")?.value;return n?`${t} (${n})`:t}function hn(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`:e[0]}function Vo(e){let t=e.object??e.subject??"?";return`${e.entityType?Fe(e.entityType,2)+" that ":""}${e.kind} "${t}"`}function Ra(e){return To[e]?.bare||e}function Hv(e){let t=Ra(e);return t.endsWith("e")?`${t}d`:`${t}ed`}function Kv(e){if(!Array.isArray(e.atoms)||e.atoms.length!==2)return null;let[t,n]=e.atoms;if(t.op!=="seed"||t.ast?.node!=="allOfClass"||n.op!=="difference")return null;let s=Fe(e.entityType,2);if(n.kind==="qual")return`${s} that are not ${n.filters.join(" and not ")}`;if(n.kind!=="set"||!n.ast)return null;if(n.ast.node==="existsEdge")return`${s} that do not ${Ra(n.ast.kind)} anything`;let o=n.ast.node==="clause"?n.ast.clause:n.ast;if(!o||o.node||!o.kind)return null;let r=o.object??o.subject;return r==null?null:`${s} that do not ${Ra(o.kind)} ${JSON.stringify(String(r))}`}function Tp(e){if(!e)return null;if(e.ambiguousParse)return{english:`ambiguous: ${e.candidates.map(Vo).join(" \u2014 or \u2014 ")}`,machine:`ambiguousParse(${e.candidates.map(r=>Tp(r)?.machine).join(", ")})`};if(e.node)return{english:(e.node==="boolean"?Kv(e):null)||`a compositional query (${e.node})`,machine:`composite(${e.node})`};let t=r=>JSON.stringify(String(r??"")),n=[];e.kind&&n.push(e.kind),e.negated&&n.push("negated"),e.entityType&&n.push(`entityType=${e.entityType}`),e.modifier&&e.modifier!=="direct"&&n.push(`modifier=${e.modifier}`),e.subject!=null&&n.push(`subject=${t(e.subject)}`),e.object!=null&&n.push(t(e.object));let s=`${e.shape}(${n.join(", ")})`,o;if(e.shape==="ask")o=`does "${e.subject}" ${e.negated?"not ":""}${js(e.kind)} "${e.object}"?`;else if(e.shape==="meta")o=`what does "${e.object}" mean, in this graph's own vocabulary?`;else if(e.shape==="mentions")o=`where is "${e.object}" mentioned?`;else if(e.shape==="where")o=`where is "${e.object}" defined?`;else{let r=e.entityType?Fe(e.entityType,2)+" that ":"";o=e.shape==="forward"?`what "${e.object}" itself ${js(e.kind)}`:`${r}${js(e.kind)} "${e.object}"`}return{english:o,machine:s}}function gn(e,t,n=null){let s=Cp(e,t,n);return t&&t.matchedVia==="fuzzy"&&t.objMatch&&!s.ambiguous&&(s.content=`assuming you meant ${t.objMatch.label}: ${s.content}`),s}function Cp(e,t,n){if(!e)return{content:`couldn't parse this as a graph question. Try: ${Pa()}`,miss:!0,ambiguous:!1};if(e.node)return Mv(e,t,n);if(e.ambiguousParse)return t.branches&&t.branches.length?{content:`this could mean more than one thing:
55
- ${t.branches.map((l,c)=>`${c+1}) as ${Vo(l.parsed)}: ${l.rendered.content}`).join(`
48
+ `)}function jd(e,t){let n=[];for(let s of Se(e,"cochange"))s.subject===t?n.push({label:s.objectLabel||s.object,weight:s.weight||0}):s.object===t&&n.push({label:s.subjectLabel||s.subject,weight:s.weight||0});return n.sort((s,o)=>o.weight-s.weight)}function _d(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=jd(e,n);if(!o.length)return`${s}: no change-coupling recorded (rarely co-committed, or outside the git-log window).`;let i=o.slice(0,ha).map(r=>`${r.label} (\xD7${r.weight})`);return`${s} \u2014 usually changes together with ${o.length} module(s) (edit these too):
49
+ ${i.join(`
50
+ `)}`+(o.length>ha?`
51
+ \u2026+${o.length-ha} more`:"")}function Rd(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=Se(e,"reexports").filter(r=>r.subject===n);if(!o.length)return`${s}: no public exports recorded (no export list / __all__ found, or none resolved).`;let i=o.slice(0,ga).map(r=>{let a=e.byId.get(r.object),l=a?$t(a):null,c=l?` \u2190 ${l.path}`:"";return`${r.objectLabel||r.object}${c}`});return`${s} \u2014 public API (${o.length} export(s)):
52
+ ${i.join(`
53
+ `)}`+(o.length>ga?`
54
+ \u2026+${o.length-ga} more`:"")}var Lu,Hu,Pu,Db,Bb,fa,Ub,Dr,Wb,qb,Gb,Xu,Vb,Hb,Kb,Yb,Xb,Jb,Qb,Zb,ew,tw,nw,sw,ow,rw,iw,aw,cw,lw,uw,dw,pw,fw,mw,hw,gw,Fu,bw,ww,Ju,Qu,Zu,yw,vw,$w,xw,kw,zu,Bu,jw,Uu,Pr,Wu,qu,Gu,Wo,Me,Rw,Aw,cd,Tw,Mt,pd,Cw,xd,Ow,Lw,Nw,Mw,Pw,Fw,Dw,zw,ma,Vu,zr,Bw,ha,ga,Ce=L(()=>{Hn();xs();ca();Uo();Ss();Lu={"mgx:importsnamespace":"imports","mgx:callscoarse":"calls","seon:declaresmethod":"defines","mgx:testscoverage":"tests","mgx:touchedbycommit":"touches","seon:containscodeentity":"contains","seon:hassupertype":"inherits","mgx:changecoupledwith":"cochange","mgx:reexports":"reexports","mgx:touchessymbol":"touchesSymbol","mgx:callssymbol":"callsSymbol","seon:usescomplextype":"imports","seon:invokesmethod":"calls","seon:history":"touches","mgx:subclassof":"inherits","mg:imports":"imports","mg:calls":"calls","mg:defines":"defines","mg:tests":"tests","mg:touches":"touches","mgx:saidinsession":"saidInSession","mgx:inreplyto":"inReplyTo","mgx:statedby":"statedBy","mgx:canonicalisedfrom":"canonicalisedFrom"};Hu=e=>/^(git|turn):/.test(String(e||""));Pu=30,Db=8;Bb=2,fa=25,Ub=3;Dr=10,Wb=8,qb=3,Gb=2,Xu=5,Vb=4,Hb=.2,Kb=.35,Yb=.15,Xb=e=>/(^|\/)(examples?|fixtures?|samples?|demos?|benchmarks?|test-[^/]+)(\/|$)/.test(e),Jb=.2,Qb=.35,Zb=.2,ew=.35,tw=e=>/\.cs$/i.test(e),nw=e=>/^I[A-Z]/.test(String(e||"")),sw=.2,ow=.35,rw=50,iw=.2,aw=.35,cw=.5,lw=Xu,uw=3,dw=4,pw=1,fw=.9,mw=.5,hw=.2,gw=.35,Fu=4,bw=2,ww=[["imports"],["calls","callsSymbol"],["inherits"],["cochange"]],Ju=3,Qu=12,Zu=.9,yw=["imports","calls","callsSymbol","inherits"],vw=.5,$w=.6,xw=.2,kw=.35;zu=128,Bu=4,jw=64,Uu=250,Pr=class extends Error{};Wu=new WeakMap;qu=40,Gu=40,Wo=30;Me=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value||"";Rw=25,Aw=15;cd=40,Tw="tests edges are recorded module to module, so this is module-grain coverage.";Mt=15;pd=new Set(["Function","Method"]);Cw=8;xd={function:"Function",class:"Class",method:"Method",attribute:"Attribute"};Ow=8,Lw=16,Nw=4,Mw=6,Pw=12,Fw=2,Dw=8,zw=3,ma=e=>String(e||"").split(",").map(t=>t.trim()).filter(Boolean),Vu=e=>String(e||"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),zr=e=>{let t=String(e||"").trim();return t?t.split(",").map(n=>n.trim()).filter(Boolean).length:0},Bw=e=>{let t=new Map,n=e[0]??0,s=0;for(let o of e){let i=(t.get(o)||0)+1;t.set(o,i),i>s&&(s=i,n=o)}return n};ha=20;ga=40});function He(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Nd(e){let t=String(e||"");return Ad&&(t=t.replace(Ad," ")),t.replace(/\s+/g," ").trim()}function Md(e){let t=String(e||"");t=t.replace(cy," ").replace(/\s+/g," ").trim();for(let n=0;n<3;n++){let s=t,o=t.match(ry);if(o&&(t=o[1].trim()),o=t.match(iy),o&&(t=o[1].trim()),o=t.match(Td),o&&(t=o[1].trim()),o=t.match(Cd),o&&(t=o[1].trim()),o=t.match(Id),o&&(t=o[1].trim()),o=t.match(ay),o&&(t=o[1].trim()),o=t.match(Od),o&&(t=o[1].trim()),o=t.match(ly),o&&(t=o[1].trim()),o=t.match(uy),o&&Yn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(dy),o&&Yn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(py),o&&Yn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(fy),o&&Yn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(my),o&&Yn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(hy),o&&Yn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(gy),o&&(t=`what ${o[2].toLowerCase()} ${o[1].trim()}`),o=t.match(by),o&&(t=`what does ${o[1].trim()} mean`),o=t.match(wy),o){let i=o[1].trim();oy(i)||(t=ty.test(i)||Yn.test(i)?i:`describe ${i}`)}if(o=t.match(yy),o){let i=o[1].trim();(Yn.test(i)||vy.test(i)||Od.test(i)||Td.test(i)||Id.test(i)||Cd.test(i))&&(t=i)}if(t===s)break}return t}function ky(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t,o=t.match($y);if(o&&(t=o[1].trim()),o=t.match(xy),o&&(t=o[1].trim()),t===s)break}return t}function Ey(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t.match(Sy);if(!s)break;let o=s[1].trim();if(!o||o===t)break;t=o}return t}function Ry(e){let t=String(e||""),n=t.match(_y);if(n){let o=Fd[n[1].toLowerCase()],i=Pd[n[2].toLowerCase()];return`${o} ${i} ${n[3].trim()} and ${n[4].toLowerCase()}`}let s=t.match(Dd);return s?`which modules transitively import ${s[1].trim()}`:t}function Ur(e){return String(e||"").replace(Hw,t=>Zi[t.toLowerCase()])}function js(e){let t=Ur(e);return t=t.replace(Kw,n=>ea[n.toLowerCase()]),t=t.replace(Yw,n=>ta[n.toLowerCase()]),t=t.replace(Xw,"with"),t=t.replace(Jw,(n,s)=>`${s} for`),t=t.replace(Qw,(n,s)=>`for ${s}`),t=t.replace(Zw,(n,s)=>s),t=t.replace(Ay,"$1$2"),t=t.replace(uu,"$1ing"),t=Md(t),t=Ey(t),t=ky(t),t=Ry(t),t=Nd(t),t=Xt(t),t=t.replace(/\?{2,}\s*$/,"?"),t.replace(/\s+/g," ").trim()}function qo(e){for(let t of[...pu,...du]){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function ka(e){for(let t of Ty){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function zd(e){let t=String(e||"").match(Cy);if(!t)return null;let n=t[1].toLowerCase(),s=t[2].trim();return s?{entWord:n,predicate:s}:null}var Vw,Hw,Ld,Kw,Yw,Xw,Jw,Qw,Zw,ey,Ad,ty,Yn,ny,sy,oy,ry,iy,Td,Cd,Id,ay,cy,ly,uy,dy,py,fy,my,hy,gy,by,wy,yy,vy,Od,$y,xy,Sy,Pd,Fd,jy,_y,Dd,Ay,Ty,Cy,st,Qt,me,Xn=L(()=>{An();Vw=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(He).join("|")+")\\b","gi"),Hw=Vw(Zi),Ld=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(He).join("|")+")\\b(?!\\.[a-z0-9])","gi"),Kw=Ld(ea),Yw=Ld(ta),Xw=/(?<=^|\s)w\/(?=\s|$)/gi,Jw=/\b(thx|thanks|thank\s+you|many\s+thanks|ty|cheers)\s+4\b/gi,Qw=/\b4\s+(example|instance)\b(?!\s*[a-z])/gi,Zw=/\b(this|that)\s+(class|module|function|method|attribute|variable|file|commit)\b/gi,ey=Object.keys(de).sort((e,t)=>t.length-e.length).map(He).join("|"),Ad=Mo.length?new RegExp("\\b("+[...Mo].sort((e,t)=>t.length-e.length).map(He).join("|")+")\\b\\s*,?","gi"):null;ty=new RegExp("\\b(?:"+Object.keys(de).sort((e,t)=>t.length-e.length).map(He).join("|")+")\\b","i"),Yn=/^(?:which|what|who|whose|where|when|why|how)\b/i,ny=new Set(["modules","files","functions","methods","classes","attributes","fields","properties","variables","globals","commits","changes","tests","members"]),sy=/^(?:all\s+|the\s+)?(?:module|file|function|method|class|attribute|field|property|variable|global|commit|change|test|member)\??$/i,oy=e=>{if(sy.test(e))return!0;let t=e.replace(/\?+\s*$/,"").trim().split(/\s+/);return ny.has((t[t.length-1]||"").toLowerCase())},ry=/^(?:hi|hiya|hello|hey|yo|howdy|g'?day|yeah\s+nah|good\s+(?:morning|afternoon|evening|day)|greetings|salutations)(?:\s+(?:there|pardner|folks|friend|mate))?\s*[,.—–-]\s*(?:(?:just\s+a\s+)?quick\s+question\s*[,:—–-]?\s*)?(.+)$/i,iy=/^(?:thanks|thank\s+you|many\s+thanks|thx|ty|cheers)(?:\s+(?:so\s+much|a\s+lot|very\s+much|a\s+bunch))?\s*[,—–-]\s*(?:(?:just\s+a\s+)?quick\s+question\s*[,:—–-]?\s*)?(.+)$/i,Td=/^(?:(?:ok(?:ay)?|aight|cool|alright|sure|right|fine|great|nice|got it|gotcha|sounds good|no worries|no problem|(?:just\s+)?(?:one|another)\s+more|another\s+one)[\s,]+)+(.+)$/i,Cd=/^(?:just\s+(?:poking\s+around|looking\s+around|browsing|exploring|checking\s+(?:this|it)\s+out)|first\s+time\s+(?:trying\s+this\s+out|using\s+this|here)|i'?m\s+new\s+(?:here|around\s+here|to\s+(?:this|all\s+this)(?:\s+(?:repo|codebase|project|app|tool|thing))?))\s*[,.—–-]\s*(.+)$/i,Id=/^(?:(?:maybe|possibly|perhaps)\s+)+(.+)$/i,ay=/^(?:please[\s,]+)+(.+)$/i,cy=/,?\s*if\s+(?:it'?s|it\s+is|that'?s|that\s+is)\s+not\s+too\s+much\s+(?:trouble|bother|hassle)\s*,?\s*/i,ly=/^(?:can|could|would|will)\s+you\s+(?:please\s+)?(.+?)(?:[,\s]+please)?\??$/i,uy=/^explain\s+(?:to\s+me\s+|please\s+)*(.+?)\??$/i,dy=/^tell\s+me\s+(?:please\s+)?(.+?)\??$/i,py=/^(?:(?:would|do)\s+you\s+)?mind\s+telling\s+(?:me|us)\s+(?:please\s+)?(.+?)\??$/i,fy=/^do\s+you\s+know\s+(.+?)\??$/i,my=/^i(?:'d|\s+would)?\s+(?:(?:like|want|need)\s+to|wanna)\s+know\s+(.+?)\??$/i,hy=/^i(?:\s+was|\s+am|'m)?\s+(?:just\s+)?(?:wonder(?:ing|ed)?|curious)(?:\s+(?:if|whether|about))?\s+(.+?)\??$/i,gy=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+(is|are)\??$/i,by=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+means\??$/i,wy=/^(?:show|give)\s+me\s+(?:the\s+)?(.+?)\??$/i,yy=/^(?:and|also|so|then|now|but)\s+(.+)$/i,vy=/^(?:does|do|did|is|are|was|were|has|have|had|can|could|will|would|should)\b/i,Od=/^(?:(?:actually|no\s+wait|wait|hold\s+on|never\s+mind|scratch\s+that|on\s+second\s+thought|i\s+mean(?:t)?)[\s,.]+)+(.+)$/i;$y=/^(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+?,\s*(.+)$/i,xy=/^(.+?),\s*(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+$/i;Sy=/^.+?(?:\s*(?:--|—|-)\s*)?\b(?:sorry|i\s+mean)\b\s*(?:--|—|-|,|:)\s*(.+)$/i;Pd=Object.freeze({imports:"importing",calls:"calling",touches:"touching",tests:"testing",exports:"exporting",contains:"containing",defines:"defining",uses:"using","inherits from":"inheriting from"}),Fd=Object.freeze({module:"modules",class:"classes",function:"functions",method:"methods",attribute:"attributes",variable:"variables",commit:"commits",file:"files"}),jy="public|private|protected|static|abstract|constant|re-?exported|exported|tested|covered|untested|uncovered",_y=new RegExp("^if\\s+(?:a|an|the)?\\s*("+Object.keys(Fd).join("|")+")\\s+("+Object.keys(Pd).join("|")+")\\s+(.+?),\\s*(?:is|are)\\s+(?:it|that|they|this)\\s+("+jy+")\\??$","i"),Dd=/^if\s+(.+?)\s+(?:were|was)\s+(?:deleted|removed),?\s*what\s+(?:would|might|could)\s+(?:break|fail|be\s+affected)\??$/i;Ay=new RegExp(`^(where\\s+(?:is|are|was|were)\\s+.+?)\\s+(?:${au.map(He).join("|")})(\\s*[?.!]*)$`,"i");Ty=Object.freeze([{re:/^what\s+(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:are|is)\s+(?:in|inside|within)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:does|do)\s+(.+?)\s+have\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+are\s+(?:the\s+)?(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:of|in|inside|within)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^(?:the\s+)?(?:members?|methods?|attributes?|contents)\s+of\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+is\s+(?:in|inside)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+else\s+is\s+(?:in|inside)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+(?:defined|declared)\s+(?:the\s+)?(?:function\s+|method\s+|class\s+|module\s+|variable\s+|constant\s+)?(.+?)\??$/i,to:e=>`where is ${e[1]} defined`},{re:/^where'?s\s+(?:the\s+)?(.+?)\s+(defined|declared|located|implemented)\??$/i,to:e=>`where is ${e[1]} ${e[2]}`},{re:/^were\s+is\s+(?:the\s+)?(.+?)\s+(defined|declared|located|implemented)\??$/i,to:e=>`where is ${e[1]} ${e[2]}`},{re:/^what\s+is\s+the\s+purpose\s+of\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\??$/i,to:e=>`what is a ${e[1]}`},{re:new RegExp(`^what\\s+does\\s+(?:the\\s+)?(?!(?:an?|it|this|that|these|those)\\s)(.+?)\\s+do\\s+(?:${Qi.map(He).join("|")})\\??$`,"i"),to:e=>`what is a ${e[1]}`},{re:/^(?:which|what)\s+(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+(?:are|is)\s+(public|private|protected|static|abstract|constant|exported|re-?exported|tested|covered|untested|uncovered)\??$/i,to:e=>`${e[2].toLowerCase()} ${e[1].toLowerCase()}`},{re:/^what\s+(?:is|are)\s+(not\s+)?(tested|untested|covered|uncovered)\??$/i,to:e=>{let t=e[2].toLowerCase();return`${e[1]?t==="tested"?"untested":t==="covered"?"uncovered":t:t} modules`}},{re:/^what\s+does\s+(.+?)\s+changes?\s+together\s+with\??$/i,to:e=>`what co-changes with ${e[1]}`},{re:/^what\s+changes?\s+together\s+with\s+(.+?)\??$/i,to:e=>`what co-changes with ${e[1]}`},{re:/^how\s+many\s+commits\s+(?:are|were)\s+(?:recorded|logged)\s+(?:for|against)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`how many commits touched ${e[1]}`},{re:/^who\s+(?:wrote|authored)\s+(?:the\s+)?(?!(?:commit\s+)?[0-9a-f]{7,40}\??$)(.+?)\??$/i,to:e=>`who touched ${e[1]}`},{re:/^who\s+is\s+the\s+authors?\s+of\s+(?:the\s+)?(?!(?:commit\s+)?[0-9a-f]{7,40}\??$)(.+?)\??$/i,to:e=>`who touched ${e[1]}`},{re:/^(?:does|do)\s+(?!.*\bnot\b)(.+?)\s+have\s+(?:any\s+)?(?:tests?|test\s+coverage|coverage)\??$/i,to:e=>`what tests ${e[1]}`},{re:/^(?:is|are)\s+(?!.*\bnot\b)(.+?)\s+tested\??$/i,to:e=>`what tests ${e[1]}`},{re:/^what\s+needs\s+(?:to\s+be\s+)?(?:a\s+)?(?:tested|tests?|testing|coverage|covering)\??$/i,to:()=>"untested modules"},{re:/^(?:which|what|list|show(?:\s+me)?|find)?\s*(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+(?:(?:that|which)\s+)?(?:have|has|having|with)\s+no\s+tests?\??$/i,to:e=>`untested ${e[1].toLowerCase()}`},{re:/^(?:which|what|list|show(?:\s+me)?|find)?\s*(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+without\s+(?:any\s+)?tests?\??$/i,to:e=>`untested ${e[1].toLowerCase()}`},{re:new RegExp(`^(?:do|does)\\s+(.+?)\\s+(${ey})\\s+(?:anything|something)(?:\\s+else)?\\??$`,"i"),to:e=>`what does ${e[1]} ${e[2]}`}]);Cy=new RegExp("^(?:which|what|who|list|show(?:\\s+me)?|find|give\\s+me)?\\s*(?:the\\s+|all\\s+)?([a-z][a-z-]*)\\s+(?:(?:that|which|who)\\s+)?(?:(?:do|does|did|are|is|was|were|have|has|can|could|will|would|should)\\s+not|cannot|can't|won't|couldn't|shouldn't|wouldn't|not)\\s+(.+)$","i");st=new Set(["what","who","which","where","when","why","how","does","do","did","is","are","was","were","the","a","an","of","to","from","at","in","on","there","something","anything","nothing","one","any","anywhere","last","usually","typically","generally","normally","often","commonly","mostly","should","would","could","can","will","shall","might","must"]),Qt=e=>String(e).replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),me=e=>e.flatMap(t=>String(t).toLowerCase().split(" "))});var Ud,Bd=L(()=>{Ud={source:"corpus/wordnet/*.jsonl lemmas, expanded through the regular -s/-ed/-ing inflections",generator:"scripts/generate-real-word-collisions.mjs",targets:["alongside","build","builds","built","call","calling","calls","change","changed","changes","check","checks","class","co-change","co-changes","code","commits","contain","containing","contains","couple","couples","cover","covers","declare","declares","define","defined","defines","defining","depends","derive","derives","directly","edited","execute","executes","exercise","exercises","explicitly","export","exporting","exports","expose","exposes","extend","extending","extends","fire","fires","from","grab","grabs","have","hits","hold","holds","hooked","import","importing","imports","included","indirectly","inherit","inheriting","inherits","inside","into","invoke","invokes","kick","kicks","kind","land","landed","lean","leans","live","lives","make","makes","modified","modifies","move","moves","parent","part","pass","passes","pull","pulls","re-export","re-exports","reference","references","relies","rely","require","requires","runs","share","shares","sits","subclass","subclasses","subclassing","superclass","superclasses","sure","talk","talks","tend","tends","test","testing","tests","through","together","touch","touched","touches","touching","transitively","trigger","triggers","tweaked","updated","uses","using","usually","verifies","verify","went","were","wired","with"],words:["aalging","aasing","aave","ablies","abling","aboves","absing","abuses","abusing","acauling","achinged","acolds","acquire","acquires","acyling","adelies","adenine","adenined","adenines","adenining","aditted","aerides","aerified","aerifies","aerify","affine","affined","affines","affining","afire","afires","afling","agalling","ailing","aired","airied","airies","airport","airporting","airports","airsed","airses","airted","alaing","alases","albing","alecks","aleves","aliaes","alikes","alines","alive","alives","allaing","allies","alling","alls","allying","alongsided","alongsides","alping","alting","altogether","amasses","amazes","amends","amorting","amorts","amuses","amusing","analling","anded","anoded","ansing","anuses","apart","aparts","apises","apparent","appends","appose","apposes","apsing","apsises","arab","arabis","arabs","ardent","argent","arpent","arrive","arrives","arsing","asaing","asding","aseans","ases","ashing","ashore","ashores","asing","asking","asping","asring","asses","assess","assets","assing","assure","attending","attest","attesting","attests","audited","aufing","auging","auking","aurifies","aurify","avouch","avouched","avouches","avouching","awaked","awakes","awared","awares","awling","awried","axling","baases","badded","bailed","bailing","baited","bake","bakeds","bakers","bakes","balded","balding","baling","balk","balking","balks","ball","balling","balls","ballsing","ballying","balming","band","banded","bandeds","bandied","bandsed","banked","banned","barded","barelies","barely","barses","bart","baseses","bashes","basing","basises","bass","bassed","basses","basset","bassets","bassos","bastes","basting","batses","bauded","baulks","bawded","bawling","bbsing","beaked","bean","beanos","beans","beasting","beasts","beating","beeting","begild","begilds","behave","behold","beholds","belied","belief","beliefs","belies","belikes","belizes","belles","bellies","belling","belting","bend","bended","bends","bent","benting","besets","besots","besses","bessing","best","besting","bests","beting","betting","bevies","bhanged","biered","bigger","biggers","billing","bind","binded","birded","birled","birles","biroed","birred","bising","bjsing","bladed","blanced","bland","blanda","blandaed","blanded","blands","blanked","blares","blases","blasts","bleaked","bleaks","blears","bleats","blended","blends","blesting","blests","blinded","blinds","blited","blites","bloked","blonded","bmuses","bnsing","boched","boches","boching","bocked","bode","bodilied","bodilies","boiled","boileds","bokked","bold","bolds","bolling","bonded","boners","bonked","boobed","booked","bookeds","bookend","booker","bookied","booksed","boomed","booned","boored","booted","boozed","borers","borough","bosked","bosses","botched","botches","botching","boucheed","bouchees","boucle","boucled","boucling","boughed","boughing","boules","boulle","boulles","bouses","bousing","bowers","boxers","bpsing","bragger","braggers","brakes","branded","brasses","breaked","bricks","brigged","brills","broked","brooked","bruins","brunts","brunus","bses","bsing","bugled","bugles","buhled","builders","buildups","bull","bulled","bullet","bulling","bulls","buns","bunses","bunsing","buried","burieds","burled","burleds","buses","bushes","bushing","busied","busies","busking","bussing","busying","buyied","buying","bypass","bypasses","caballing","cabals","cabbing","cabers","cabged","cabging","cables","cablin","cabling","cablins","caching","cackling","cadded","cadding","cadent","cadged","cadges","cadging","cadring","cafers","caffing","cafing","cagers","caging","cagying","caining","cajoling","cake","cakes","cakiling","caking","calcine","calean","caleans","caleying","caleys","calf","calfing","calfs","califs","calkin","calking","calkins","callaing","callas","callers","callinged","callings","callous","callowing","callows","calluna","callus","calm","calming","calmings","calmlying","calms","calquing","calvaing","calvas","calves","calving","calvings","calx","calxes","calxing","calycling","calyxing","camass","camelling","camels","camming","camoing","camping","canaing","canalling","canals","candid","candied","candled","candling","cangue","cangued","cangues","caning","canning","canoes","canting","cantling","capers","caping","caplin","caplins","capoing","capping","captain","captaining","captains","carded","carding","caring","carking","carlina","carline","carling","carlings","carlos","carning","caroling","carolling","carols","carping","carring","cart","carting","carver","carvers","carving","casaing","cashes","cashing","casking","cassies","castes","castling","casually","casuses","caters","catling","catlings","catses","catsing","catting","cattling","caul","cauline","cauling","caulking","cauls","cavaing","cave","caverns","cavilling","cavils","caving","cavying","cawing","caying","ceases","cecalling","cede","cedied","ceiling","cell","celling","celloing","cellos","cells","cellsing","cent","centing","cercises","cere","cerise","cerises","certain","certaining","certains","certifies","certify","certing","cfling","cgsing","chadded","chafed","chaffed","chafinged","chagaed","chagas","chagga","chaggaed","chaggas","chained","chainsed","chainses","chaired","chaise","chaised","chaises","chaited","chaits","chajaed","chalked","chalking","challis","champed","chanal","chanals","chanar","chanars","chance","chanced","chancels","chances","chancied","chancies","chancre","chancred","chancres","chancy","changers","channels","chanted","chanters","chanteys","chantied","chanties","chanty","chaosed","chaoses","chapped","charded","chards","charge","charged","chargers","charges","charied","charmed","charms","charred","charrs","charted","charts","chased","chasmed","chasms","chassed","chaste","chasted","chastes","chatted","chaunaed","chaused","chauses","chawed","cheaps","cheats","checkeds","checkers","checksum","checkups","cheek","cheeks","cheeps","chelas","chenned","cheops","cherts","chesting","chewas","chianed","chick","chicks","chigger","chiggers","chiling","chilling","chills","chinaed","chined","chines","chinked","chinks","chinned","chinoed","chirks","chits","chives","choanaed","chock","chocked","chocks","choked","choker","chokers","choler","cholers","chonned","choosed","chords","chores","chough","chuaned","chuck","chucks","chugged","chunga","chungaed","chungas","chunked","chunks","chyling","cialis","cicers","ciders","circed","circes","cive","cives","civies","cladded","claded","clades","clading","clads","claims","clamps","clams","clamses","clanged","clangers","clanks","clans","claps","clarks","claros","clash","clashes","clasp","clasps","classed","classic","classy","clast","clasts","clausa","clausas","clause","clauses","claver","clavers","clavus","clawing","claws","claying","clays","clean","cleans","cleanse","clerks","clever","clevers","cliing","climes","clinged","cloaks","clocks","closer","closers","closes","cloved","cloven","clovens","clover","clovers","clucks","cluing","clving","clxing","cnsing","coached","coaches","coaching","coaling","coasts","coaxer","coaxers","cobber","cobbers","cobble","cobbles","cocain","cocaining","cocains","cocked","cocker","cockers","cockle","cockles","coda","codaed","codded","coddles","coded","coders","codes","codex","codgers","codified","codifies","codling","cods","coed","coeurs","coffer","coffers","coggle","coggles","coheres","coiling","coiner","coiners","coired","coke","colaing","cold","colded","colding","colds","cole","coleus","coliing","coling","colling","collins","collying","colors","coltan","coltanning","coltans","colter","colters","colting","comalling","combats","comber","combers","come","comer","comers","comfies","comfit","comfits","comics","comints","comity","commas","comments","commes","commie","commied","commies","comming","commit","commix","commixes","commons","commute","commutes","compel","compels","compile","compiles","complies","comply","comport","comporting","comports","conched","conches","conching","concluded","cone","coneys","confer","confers","confining","confits","conged","conger","congers","conges","conjoin","conjoining","conjoins","conked","conker","conkers","constrain","constraining","constrains","contact","contacting","contacts","contadinoing","contadinos","contagion","contagioning","contagions","containeds","containers","contemn","contemning","contemns","continuing","contrail","contrailing","contrails","contriting","contriving","converse","converso","converts","convex","convey","conveys","convoke","convokes","cooked","cookeds","cookers","cookied","cooled","cooler","coolers","cooling","cooned","cooped","cooper","coopers","cooted","cooter","cooters","copalling","cope","copeck","copecks","copier","copiers","copies","copper","coppers","copses","copula","copulas","coralling","corded","core","coreference","coreferences","corer","corers","corked","corker","corkers","corner","corners","corpse","corpses","corvee","corvees","cosecs","cosher","coshers","cosmics","cosmids","cosses","costing","cotanning","cotans","cote","cotter","cotters","couch","couched","couches","couching","coude","couded","coue","coughed","coughing","coupe","coupes","coupleds","couplers","couplets","coupon","coupons","course","courses","couthed","couthing","coved","coven","covens","covereds","coverts","covet","covets","covey","coveys","cower","cowers","cowling","cowpie","cowpies","cozens","cpsing","crab","crabs","cracks","cradling","cragged","crakes","craned","cranes","cranked","cranned","crass","crasses","crawling","crawls","creaked","creaks","credited","creeks","cresting","crests","criers","cringe","cringed","cringes","crocks","crooked","crouch","crouched","crouches","crouching","croupe","croupes","crumple","crumples","cruses","crusing","cses","csing","ctened","ctenes","cubing","cuking","culling","culming","culting","cupalling","cupels","cupsing","cupule","cupules","cure","curing","curling","curses","cursing","curtain","curtaining","curtains","cusking","cusping","cussing","cuting","cutlass","cutses","cutsing","cxling","cxlving","cyanned","cyanoed","cycling","cyders","cymling","cysting","dadded","dahling","dailing","daises","daling","dall","dalliing","dalling","dallis","dalls","dallying","daloing","danced","dander","dandied","dandled","danked","dansed","danses","darded","darling","dart","dashes","dassed","dassies","dative","datives","dayses","ddsing","deafened","deafening","deafing","deaing","dean","deaned","deaning","deans","dearie","dearies","debiled","debiling","debone","deboned","debones","deboning","debrises","debted","debting","decade","decades","decalling","decease","deceases","deceive","deceives","decents","decided","deciding","deciled","deciling","declaim","declaims","declareds","declarers","declaw","declined","declining","decode","decouple","decouples","decries","deepens","deface","defaced","defaces","defacing","defame","defamed","defames","defaming","defang","defanged","defanging","defangs","defence","defenced","defences","defencing","defended","defending","defends","defensed","defenses","defensing","deference","deferences","deferenses","defiance","defianced","defiances","defiancing","defiant","defianted","defianting","defiants","defied","defies","defile","defiled","defilers","defiles","defiling","defininged","definings","definited","definites","definiting","deflate","deflates","deftness","defuse","defused","defuses","defusing","deglaze","deglazes","deicing","deified","deifying","deigned","deigning","deisted","deisting","deists","deitied","delfing","deliing","delivers","delling","demands","demised","demising","denied","denned","denning","dent","dented","dentine","dentined","dentines","denting","dentining","depart","depend","depended","deplane","deplanes","deplore","deplores","depone","deponed","deponing","depose","deposes","deprave","depraves","deprive","depriveds","deprives","derate","derates","derbies","deride","derides","deriding","derisive","derisives","deriveds","deriving","dermises","derpies","derrises","descends","designed","designing","desired","desiring","desking","desponds","dessing","destined","destines","destining","destiny","detained","detaining","detents","detest","detesting","detests","detinue","detinued","detinues","detinuing","deuses","deusing","deveined","deveining","deviced","devicing","deviled","devised","devising","dewied","dewiness","dewing","dexone","dexoned","dexones","dexoning","dhalling","dholed","dholes","dick","dicks","dieted","digger","diggers","dilling","dining","dinted","dire","direct","directed","director","directory","directs","dired","dires","dirged","dirges","dirked","disport","disporting","disports","disses","ditaed","ditted","dive","dives","divest","divine","divined","divines","divining","dmuses","docked","doleds","dolling","domine","domined","domines","domining","doobed","doomed","doored","dopeds","dories","dorked","dosing","dosses","double","doubles","douched","douches","douching","doughed","doughing","douses","dousing","dove","doves","dowers","dozers","drab","drabas","drabs","dragger","draggers","drained","draining","drakes","dranged","drecks","drilies","drive","drivels","drivens","drivers","drives","drover","drovers","drunks","druses","drusing","drylies","dses","dsing","dsling","dtsing","ducing","duding","dudses","dudsing","duking","dulies","dull","dulling","dulls","dulses","dulsing","duning","duns","duoing","duping","duples","during","dusking","eagling","earling","earses","easies","easing","easted","easting","eating","eatses","ebitted","ebooked","ebsing","echted","eclats","ecting","eddaed","eddied","eddoed","edgied","edibled","edicted","editeds","editor","editted","edsing","edtaed","educed","eduled","eelses","eerilies","eerily","effort","efforting","efforts","efting","egesting","egests","eidoses","eiraed","elan","eland","elanded","elanned","elans","elanus","elated","elegans","elided","elinted","elited","elling","elocute","elocutes","elopses","elsing","eluted","elvers","emending","emiled","emitted","emoted","emotes","emsing","enated","encode","endived","ends","energise","energises","enquire","enquires","ensile","ensure","entendring","ententing","enting","epopses","eposes","equally","equine","equines","erectly","eroses","ersing","ersted","ersting","erting","erudited","escort","escorting","escorts","eses","esing","esports","esportsing","espouse","espouses","esquire","esquires","esting","ests","eternise","eternises","ethoses","evicted","evoked","evokes","exceed","exceeding","exceeds","exchange","exchanged","exchanges","excite","excited","excites","excluded","execrate","execrates","executeds","executive","executives","executors","exegete","exegetes","exercisers","exerciseses","exerting","exerts","exhort","exhorting","exhorts","exiled","existed","exitted","exodes","exorcise","exorcisers","exorcises","exorcism","exorcisms","exorcist","exorcists","exorcize","exorcizes","expand","expanding","expands","expanse","expanses","expats","expatting","expect","expecting","expects","expend","expending","expendings","expends","expense","expenses","expensing","expert","experting","expertise","expertises","experts","expiating","expiring","expiry","expirying","explicit","explicits","explode","explodes","exploit","exploiting","exploits","exploring","expoing","exporters","exportinged","exportings","expos","exposeds","exposing","exposure","exposures","express","exsert","exserting","exserts","extant","extanting","extants","extendeds","extent","extented","extenting","extents","extern","externa","externaing","externas","externed","externing","externus","extort","extorting","extorts","extruding","fabling","fadded","failing","failling","faire","faires","fairies","faited","fake","fakers","fakes","fall","falling","fallings","falls","fallsing","falses","falsing","fanned","farces","fare","fares","fart","fasces","fassed","fasting","fawkes","fcsing","feasting","feasts","feating","fecalling","feeting","feined","feining","feisting","feists","felids","feline","felined","felining","felises","fellies","felling","felting","fend","fended","fends","feres","ferined","ferining","fesses","fessing","feting","fetting","fevers","fibers","fibre","fibres","fice","fices","fide","fides","fiends","fierce","fierces","fieries","fieris","fife","fifes","figure","figures","file","filers","files","filets","filles","filling","filses","find","finded","fine","finers","fines","fining","fiords","fireds","firm","firmas","firmers","firms","firmus","firsts","firths","fishes","fisting","fitses","fixe","fixeds","fixers","fixes","fizzes","flakes","flange","flanges","flanked","flanned","flasks","flecks","flicks","fliers","flirts","focalling","fold","folds","folies","folked","fonded","fooded","fooled","footed","forces","fore","fores","forest","forges","forked","form","fortes","fosses","fountain","fountaining","fountains","foyers","fpsing","freaked","frieds","friers","fries","frigged","frog","froms","frores","fros","frsing","fsbing","fshing","full","fulling","fulls","fuming","funded","funs","furies","furzes","fuseds","fusees","fusels","fuses","fusing","fussing","fuzing","fwsing","gabling","gabs","gadded","gaeling","gaited","galaing","galing","gall","galliing","gallina","galling","gallings","gallis","galls","gallus","gand","ganded","gander","gandied","ganked","gaoling","garb","garbs","garded","garment","garnet","gaseses","gashes","gassed","gassies","gatling","gauched","gauches","gauching","gauded","gauling","gausses","gcsing","gean","geans","gelids","gellies","gelling","gelting","genies","gent","genting","gestaing","gestes","gesting","getting","gilling","girded","girled","giroed","gisting","give","givens","gives","gladded","gladed","glanced","gland","glanded","glands","glandsed","glansed","glares","glass","glasses","glassy","gleams","glean","gleans","glides","glises","gofers","gold","golds","gonded","goners","gooded","goofed","gooked","gooned","gooped","goosed","gorals","gouached","gouaches","gouaching","governs","gpsing","graces","grad","grades","grads","graf","grafs","grafts","grails","grains","gram","gramas","gramps","grams","gran","granded","grands","grange","granged","granges","grans","grants","grapes","graphs","grases","grasps","grass","grasses","grassy","gratas","grates","gratis","graves","gravis","gray","grays","grazes","greats","grebes","greylies","greyly","groaks","groans","groats","grouch","grouched","grouches","grouching","groves","grub","grubs","grunts","gruses","gsaing","gsring","guesting","guests","guiing","guild","guilds","guiled","guiles","guilt","guilty","guises","guising","gull","gulling","gulls","guns","guses","gushes","gushing","gussing","gutses","gutsing","guying","gyrans","habits","hacked","hadded","hagged","haicks","haiked","hailing","haired","haje","hakeas","hakes","halals","hale","halfing","haling","hall","halling","halls","halming","haloing","halting","halve","halved","halves","halving","hame","hand","handed","handeds","handel","hander","handied","handled","handsed","hanged","hangers","harded","harems","hares","harked","harold","harolds","hart","harvey","hashes","hassles","hastes","hasting","hate","hats","hauling","haved","haven","havens","haves","hawked","hawses","haze","heating","heave","heaved","heaven","heaver","heaves","hectare","hectares","hefting","heired","heisting","held","helds","helixes","helling","helves","here","hets","hetting","hexine","hexined","hexines","hexining","hexose","hexoses","hhsing","hiatus","hick","hicked","hicks","hies","hilling","hilts","hind","hinded","hinged","hinges","hins","hints","hips","hire","hired","hirers","hires","hirtas","hiss","hisses","hives","hivs","hoards","hoared","hoaxed","hobbed","hoboed","hocced","hocked","hockey","hodded","hods","hoed","hogged","hoists","hokaed","holcus","holders","holdups","hole","holed","holes","holeys","holism","hollas","hollos","holm","holms","holy","homers","homied","homoed","honied","honked","honker","honkey","honkied","honored","hooches","hooching","hood","hooded","hoodeds","hoods","hooeyed","hoofed","hoofeds","hoofer","hookah","hookeds","hooker","hookeri","hookers","hookied","hookies","hooksed","hookses","hookup","hooped","hoopoed","hoopsed","hooted","hooter","hooved","hooveds","hoovers","hopers","hopied","hopped","hopple","hopples","hopsed","horded","hordes","horned","horsed","hosing","hosted","hosting","hotbed","hots","hotsed","hotted","hounds","houred","housed","houses","housing","hover","hovers","hoyaed","hrts","hses","hsing","hucked","huging","hulked","hull","hulling","hullos","hulls","hunged","hunked","huns","huoned","hushes","hushing","husked","husking","husoing","huts","hyoids","ictalling","idioted","idlies","iising","ileals","illing","images","impact","impacting","impacts","impart","imparting","impartings","imparts","impasses","impends","implore","implores","imploring","impoliting","important","importeds","importeeing","importees","importers","importinged","importings","importune","importuning","imposing","impost","imposting","imposts","improving","impure","impures","impuring","imputing","inbuilt","incise","incite","inclined","inclosed","include","includeds","includes","income","incomes","indied","indirect","indirected","indirects","indite","indited","indole","indoles","inerting","inerts","inference","inferences","infidel","influxed","info","inhabit","inhabits","inhere","inhered","inherent","inherenting","inherents","inheriteds","inheritinged","inheritings","inheritors","inheritting","inhibit","inhibits","initio","inkied","inland","inlanded","inline","inosine","inquire","inquires","insane","insert","inserting","inserts","insided","insider","insiders","insides","insist","insoles","inspire","insted","insting","intake","intakes","intending","interim","interims","intermit","intermits","inti","intied","intoed","intones","intos","intro","intron","intros","intruded","invades","invert","inverting","inverts","invites","invoice","invoices","involve","involves","iodide","ipsing","ired","ires","ironside","irsing","iruses","ises","isiing","ising","island","islanded","isling","isming","isning","isring","itsing","iuding","jailing","jakes","janned","jawses","jean","jeans","jellies","jelling","jest","jesting","jestings","jests","jetting","jigger","jiggers","jirded","jive","jives","jocked","jokers","jooked","josing","josses","joules","jove","joves","juking","julies","juning","jure","juring","juses","jussing","justes","juting","kailing","kakkes","kalaing","kaliing","kaling","kalkas","karens","karling","kelpies","kelting","kepting","kerite","kerited","kerites","khanned","kianged","kickers","kied","killing","kilned","kina","kinaed","kinda","kindas","kindle","kindly","kinds","kine","kined","king","kinged","kinked","kinks","kinned","kino","kinoed","kins","kiosks","kirk","kirked","kirks","kisses","kith","kleins","klick","klicks","knacks","knocks","knucks","koined","kooked","kookied","kuiing","kvasses","kweeked","kylies","labbed","lacced","lacied","lacked","ladded","ladder","laddied","laded","ladied","ladled","ladling","laed","lagans","lagend","lagended","lagged","lahhed","lahued","laiced","laid","laided","lairded","lake","lakes","lakhed","lallying","lamaed","lambed","lament","lammed","lamnaed","lamped","lanaied","lanated","lanced","lancer","lances","lancet","landaued","landeds","lander","landers","landler","lands","lane","lang","langed","langued","lank","lankaed","lanked","lankied","lanned","lansaed","lanseh","lanset","lapped","lapsed","lapses","lard","larded","larder","larged","laried","larked","larred","lashed","lashes","lassas","lasses","lassies","lassos","lasted","lasting","latent","latest","latesting","latests","lathed","latked","latkes","latsed","latses","latted","lauans","laud","lauded","lauder","laudes","launced","launder","lavaed","laves","lavved","lawsed","lawses","laxaed","lazied","lead","leaded","leaden","leadens","leads","leaf","leafs","leak","leaked","leaks","leal","leals","leaners","leap","leaps","learn","learns","leases","leasting","leaven","leavens","ledded","lefting","legals","legends","lemnas","lemons","lended","lender","lends","lenifies","lenify","lens","lensed","lent","lented","lenting","leon","leones","leons","lesses","lessing","letting","levants","levees","levels","levited","lewded","lianaed","lianas","liared","libels","libred","lice","lices","lick","licks","lidded","lieded","lieges","lies","life","lifers","lifes","ligand","liganded","ligans","ligers","lignes","like","likeds","likens","likes","limans","lime","limens","limes","limeys","linden","lindied","line","lineds","linens","liners","lines","linged","linied","linked","linoed","linted","liraed","lirred","lises","lisles","listes","listing","lite","liters","lites","lithes","litred","livedos","livens","livers","livias","livids","llanoed","llanos","loached","loaches","loaching","loaded","loan","loans","localling","loched","loches","loching","locked","lode","lohans","loired","lolling","loners","longed","looked","looker","looksed","loomed","looned","looped","loosed","looted","lorded","losers","losing","losses","losting","louched","louches","louching","louded","loughed","loughing","loupes","louses","lousing","louver","louvers","lover","lovers","lowans","lowers","lsding","lubing","lueses","luesing","luging","lull","lulling","lulls","lunaed","lundaed","lunged","lunned","luoing","lure","luring","lushes","lushing","luting","luxing","lynxed","mace","macers","maces","maches","mackems","mackle","mackles","madake","madakes","madded","made","mades","maes","magens","mahoes","maided","mailing","maines","maired","maizes","makers","makeups","mako","makos","male","maleos","males","maliing","maliks","maling","mall","malling","malls","malsing","malting","mameys","mandaed","manded","mane","maneds","manes","manied","manies","mankies","manned","mansed","manxed","manxes","maples","mapling","mare","mares","marges","maries","markeds","markers","markets","marling","mart","martes","masers","mases","maskeds","maskers","mass","massed","masseds","masses","masting","mate","mateds","maters","mates","mateys","mattes","mauling","maunded","maxes","maybes","maze","mazeds","mazers","mazes","mazies","mealies","mean","means","meating","mediaed","mediated","medicied","meeting","meined","meining","melees","melias","melics","melting","mend","mended","mends","mere","merelies","merely","merited","mesaing","meshing","mesning","messes","messing","meting","metrifies","metrify","mick","micks","mike","mikes","milling","mind","minded","minified","minifies","minkes","mire","mired","mires","miried","miries","miroed","mising","misses","misting","mitred","mitres","mlsing","mocked","models","modems","modes","modest","modifieded","modifiered","modifiers","modished","modishes","modisted","modistes","modses","mogens","mohaves","mohses","moired","mojave","mojaves","mold","molds","mole","moles","molest","molles","mollified","mollifies","molling","molvas","mommies","monded","mondes","monels","moneys","monked","monses","montan","montanning","montans","montes","mooched","mooches","mooching","mooded","mooned","moored","moosed","mooses","mooted","mope","mopeds","mopes","more","morels","mores","morses","mortified","mortifies","moses","moseys","moshes","mosting","mote","motels","motes","motets","motiffed","motive","motives","moue","moues","moulds","mountain","mountaining","mountains","mousing","mouthed","mouthing","moveds","movie","movies","moxies","mpsing","mrsing","msbing","mscing","mses","msging","mshing","msing","muanged","muched","muches","muching","muling","mull","mullas","mulling","mulls","mullus","muming","musaing","musding","musers","muses","mushes","mushing","musing","musings","musking","mussing","muting","mutually","myalling","myalls","myopes","nadded","nailing","naives","nakeds","nalline","nanaed","nanced","nand","nanded","nandued","nanned","narded","nashes","nasuses","nauched","nauches","nauching","nave","neating","nemine","nemined","nemines","nemining","nerves","nervies","nesses","nessing","nest","nesting","nestings","nestling","nests","netting","nevers","newlies","newting","nexted","nexting","nick","nicks","nigger","niggers","nilling","nisied","nisting","nitred","nitres","niveas","nivose","nivoses","nocked","node","noired","noires","nolling","nonuple","nonuples","nooked","nookied","nooksed","nooned","noosed","nosing","notched","notches","notching","notified","notifies","nouses","nousing","nsaing","nscing","nsfing","nsuing","nswing","nuding","nuited","nuking","null","nulling","nulls","nuns","nurses","nursing","nutses","nutsing","nuxing","oakens","oasing","oasises","oasting","oatses","obtain","obtaining","obtains","occluded","oceans","ochers","octalling","octuple","octuples","odisted","ogives","oilies","oising","olds","olefine","olefined","olefines","olefining","oleins","olive","olives","onlies","onto","onuses","opalling","opiated","oppose","opposes","opulus","opuses","oralling","orange","oranged","oranges","oses","osing","otuses","ouring","ousels","outclass","outclasses","outclassing","outdated","outing","outrigger","outriggers","ovalling","over","overs","overts","pacoses","pacs","pact","padded","padres","pads","paduses","paeans","pageant","pageses","paided","pailing","painses","paired","paks","palases","paliing","paling","palling","pallying","palming","palmses","paloing","pals","palsies","pandaed","pander","pangses","panned","pans","pansies","pant","panted","pantses","paps","para","parang","pare","parental","parented","parents","parers","pareve","pari","paries","paring","parises","parity","park","parr","parsec","parsecs","parsed","parsee","parsees","parser","parsers","parses","parted","parti","partis","partly","parts","partses","party","paruses","parvenu","parves","pasches","paso","pasoed","pasos","pasques","passages","passed","passeds","passee","passeed","passees","passel","passels","passer","passers","passims","passives","passkey","passkeys","passu","passued","passus","pasted","pasteds","pastel","pastels","paster","pasters","pastes","pasties","pasting","pastises","pasts","patases","patens","patent","patents","patient","pats","patsies","pauling","paulis","paused","pauses","pausing","pave","pavises","pawling","paws","payees","payment","pays","pbsing","peaked","pean","peans","peated","peating","pecans","pecses","pekans","pelling","pelting","pent","penting","percent","pere","pert","perting","perves","pesoing","pessed","pessing","pest","pesting","pestis","pestling","pestoing","pestos","pests","petited","petrifies","petrify","petting","phaged","pharos","pholis","phsing","pick","picks","piered","pigses","pill","pilling","pills","pinses","pinto","pintos","pisces","piss","pissed","pisseds","pisser","pissers","pisses","pistes","pisting","pith","pitses","plaided","planaed","planked","planned","planted","plashes","plated","pleads","pleats","plover","plovers","pmsing","poached","poaches","poaching","pocked","poises","pokers","polers","polies","poll","polling","pollos","polls","pommies","ponded","ponses","pooched","pooches","pooching","pooded","poofed","pooled","pooned","pooped","poored","pooved","pooves","porched","porches","porching","porked","port","portent","posers","poshes","posies","posing","posits","possed","posses","possess","posset","possets","postes","posting","potent","pouch","pouched","pouches","pouching","powers","praises","pranged","prat","prated","preference","preferences","prelims","premies","preses","presses","prexies","pricks","prigged","prises","prom","proses","proves","prunes","prunos","prunus","psaing","psas","pses","psiing","psing","pucing","puking","pula","pulas","pule","pules","puling","pullers","pullets","pulleys","pulling","pulp","pulps","pulsing","puns","pupals","pupated","pupils","pure","purelies","purely","purifies","purify","puring","purl","purls","pursing","puses","pushing","puss","pussed","pusses","pussies","pussing","pyrene","qianged","quaing","quakes","quares","quells","questing","quests","quicks","quiing","quilt","quired","quited","quoing","quolls","rabies","racies","radded","raided","railing","raises","rake","rakes","raling","rallies","rallying","ramies","ranaed","rand","randed","randied","raneed","ranges","ranied","ranked","ranted","rarelies","rarely","rarifies","rarify","rashes","rasing","rassed","rave","ravers","readies","realines","realise","realises","realizes","reallies","really","realties","realty","reaves","rebuild","rebuilds","reburies","recall","recalling","recalls","recces","reccies","recipes","recited","recites","reclines","recode","recommits","recover","recovers","redefine","redefined","redefines","redefining","redlines","reedies","reefies","reeves","referee","referees","referenceds","referent","refine","refined","refiners","refines","refining","refinings","refits","regias","regimes","regius","reined","reining","reited","reiting","rejigs","relaces","relates","relaxes","relay","relics","relict","relicts","relied","relief","reliefs","relieve","relieves","relievo","relievos","relines","relining","relish","relishes","relived","relives","remake","remakes","remise","remises","remiss","remits","remove","removes","rend","rended","rends","renins","renises","rent","rentes","renting","repands","repens","repents","repine","repined","repining","replay","replied","replies","reply","repose","reposes","requiems","requireds","requite","requites","requote","requotes","reruns","resets","reshes","reshing","reside","resides","resids","resiles","resins","resizes","respire","respires","ressing","rest","resting","restings","rests","retied","reties","reting","retire","retouch","retouched","retouches","retouching","retries","retting","reusing","reverence","reverences","revers","review","reviews","reviles","revise","revises","revive","revoke","revokes","revues","rewire","rewired","rhuses","rick","ricks","rigged","riggeds","rigger","riggers","rilling","rimies","rind","rinded","ringer","ringers","ringside","rising","risses","rive","rives","rivets","roached","roaches","roaching","rocked","rogers","roilies","rolling","rons","rooded","roofed","rooked","rookied","roomed","rooted","ropers","ropies","rosies","rosing","rouble","roubles","roughed","roughing","rounds","rouses","rousing","rove","rover","rovers","roves","rowers","rubens","rubies","rubing","rubins","rubs","rudelies","rudely","ruding","rues","rugger","ruggers","rugs","ruins","rulied","rulies","ruling","ruly","rumens","rums","rune","runes","rung","rungs","runics","runing","runt","runts","runups","ruses","rushes","rushing","rusing","rusking","russing","ruts","saales","saaling","saames","sabling","sabres","sadded","saided","sailing","saints","saises","sake","sakes","salals","saling","salk","salking","salks","salling","sallying","salols","salping","salting","salving","sand","sanded","sander","sandied","sandsed","sanned","sansed","sanses","sapling","sarded","sarees","sashes","sass","sassed","sasses","sassies","sats","saurel","save","savers","scalding","scalds","scaling","scalping","scalps","scalying","scapes","scarce","scarces","scare","scareds","scarers","scares","scarfs","scaries","scarps","scends","schick","schicks","scired","scoked","scolds","scorer","scorers","scores","scoter","scoters","scruple","scruples","sculling","seaport","seaporting","seaports","seareds","seases","seating","seaxes","secluded","secting","secure","sedans","seined","seines","seining","selling","semited","send","sended","sends","sent","senting","septing","sequine","sequines","serifs","serined","serining","serves","sesses","sessing","sets","setting","severs","sexies","sexpot","sexpots","sexpotting","sexted","sexting","shabus","shade","shadeds","shades","shadies","shafts","shagged","shake","shakens","shakers","shakes","shakies","shakos","shale","shales","shame","shameds","shames","shamus","shanged","shanked","shanks","shanned","shape","shapeds","shapers","shapes","shard","shards","shareds","sharers","shareses","sharias","shark","sharks","sharons","sharp","sharpens","sharpers","sharpie","sharpies","sharps","shart","sharts","shaveds","shavens","shavers","shaves","shawls","shawms","sheareds","shearers","shearses","sheers","sheiks","sherds","shines","shinto","shire","shires","shirks","shirrs","shited","shnooked","shocked","shocks","shoeds","shooed","shooked","shooted","shore","shoreas","shores","shorns","shorts","shotes","shover","shovers","shreds","shrews","shrive","shrives","shucks","sibs","sick","sicks","sics","sids","sieves","sifts","sights","silling","silts","sind","sinded","sing","sins","sips","sirced","sired","sirens","sires","sirred","sirs","sising","siss","sisses","sitars","site","sites","sitkas","sittas","situ","situs","sitz","sitzes","sixths","skates","skinks","skints","skirts","skits","skives","skulls","slander","slanted","slates","slices","slicks","slides","slimes","slits","slivers","slouch","slouched","slouches","slouching","slsing","smalling","smalls","smarms","smarts","smited","smites","smiths","smoked","snare","snarers","snares","snarfs","snarls","sneaked","snicks","snigger","sniggers","snits","snooked","snores","soaked","sobers","socked","solare","solares","sold","solds","solids","solling","solver","solvers","solves","sooned","sooted","sore","sorelies","sorely","sots","souchong","soughed","soughing","souked","soupies","source","soured","souses","sousing","southed","southing","sowers","spaces","spades","spalling","spanged","spare","sparers","spares","sparge","sparges","sparks","spasms","spated","spates","spazes","speaked","specks","spells","sphere","spheres","spicks","spills","spinto","spired","spirts","spited","spites","spits","splits","spoked","spooked","spores","sprigger","spriggers","sprits","spurge","squally","squares","squires","ssaing","sses","ssing","ssping","sssing","sswing","stacks","stages","stalk","stalks","stalling","standed","stands","stanks","stapes","stare","starers","stares","starets","starses","starts","starve","starves","states","staves","steads","steaked","steeds","stenting","stetting","sticks","stilts","stints","stoked","stores","stover","stovers","stoves","streaked","stringer","stringers","strive","strives","suaves","subclassed","suched","suches","suching","sucre","sucred","sudated","sudses","sudsing","suer","suered","sues","suiing","suing","suited","suites","suits","sullas","summits","sundated","sunglass","sunglasses","sunglassing","suns","superclassed","supergrass","supergrasses","sura","suraed","surd","surded","sured","surelies","sures","surety","surf","surfed","surfer","surge","surged","surges","suring","surrey","survey","suses","sussing","suture","swages","swales","swards","swarms","swarts","sweared","sweated","swerve","swifts","swined","swiped","swirled","switch","taaling","tables","tabling","tabses","tached","taches","taching","tack","tacks","tacting","tadded","taeling","tagger","taggers","tailing","tajiks","take","takens","takers","takes","tala","talaing","talas","talc","talcing","talcs","tale","talent","tales","taling","talkers","talkies","talking","talksed","talkses","talling","tallying","talons","talus","tandem","tank","tankas","tanked","tanks","tanned","taoses","tapses","tart","tarting","task","tasking","tasks","tassed","tassel","tassels","tasses","tasset","tassets","tassing","tasting","tastings","tastying","tatting","tauting","tawses","tdting","teached","teaches","teaching","teaing","teaked","teaking","tealed","tealing","teamed","teaming","teared","tearing","teased","teases","teasing","teasling","teat","teated","teating","teats","tebets","teccing","teched","teches","tectaing","tectas","tedding","teds","teed","teeing","teeming","teened","teening","teething","teeths","teffing","tegging","teiids","tejuing","tellies","temming","temping","tempting","tempts","tenched","tenches","tenching","tendeds","tenders","tendons","tenens","tenged","tenges","tenging","tenias","tenned","tenning","tennis","tennos","tenons","tenors","tensed","tenseds","tensing","tented","tenthing","tenting","tentings","tenuis","tepids","teraing","tercing","tereting","terming","terned","terning","terrifies","terrify","terses","tersing","teslaing","teslas","testaing","testas","testating","testeds","testeeing","testees","testers","testes","testied","testify","testily","testinged","testings","testis","testying","tether","tething","tetting","tevets","texans","text","texted","textes","texting","textings","texts","thaned","thanked","thanks","thanned","thecas","thefting","thefts","theist","theisting","theists","theres","thesis","thinged","tholed","tholes","thonged","thorough","thoroughs","thought","thrive","thrives","throng","throngs","throughed","throughs","thrush","thuses","ticalling","tick","ticks","tiered","tigers","tilling","tilting","tineds","tinting","tire","tired","tires","tiroed","titred","titres","titting","tnting","toasting","toasts","toeaed","toeses","toesing","togethers","told","tolds","tolling","tommies","tomtits","toneds","toners","tontining","tooled","tooned","tooted","toothed","toothing","tooting","topers","toposes","topple","topples","torch","torched","torches","torching","torting","toshed","toshes","tosked","tosking","tosses","tossing","toters","toting","totting","toucan","toucans","touchers","touchied","touchies","touchinged","touchingly","touchings","touchline","touchy","touchying","tough","toughed","toughens","toughied","toughies","toughing","toughying","touped","toupee","toupeed","touping","toured","touring","tousle","tousled","tousling","touted","towers","tracks","transitive","transitived","transitives","transitivity","treaded","treads","treated","treating","treats","treeds","trekked","trend","trends","trenting","tressing","trestling","triage","triaged","tricker","trickers","tricks","triers","trifler","triflers","trigged","trimer","trimers","trimmer","trimmers","tripper","trippers","trited","triting","troched","troches","troching","trough","troughed","troughing","troughs","troves","truced","truces","trucing","trucked","trucking","trudger","trudgers","trulies","trunks","trusting","trusts","truthed","truthing","trysting","trysts","tsetse","tsetsing","tubing","tucked","tucking","tufting","tugger","tuggers","tuling","tulles","tulling","tumses","tumsing","tuning","tuns","turing","tushed","tutting","tuxing","twanged","tweaks","tweeded","tweeds","tweeped","tweeted","tweeting","tweets","tweezed","twelved","twenty","twerked","twerped","twiced","twigged","twined","twirled","twirped","twisting","twists","twitch","ufoing","uglies","uhfing","uing","ukases","ukasing","ukes","uking","ulls","ulting","umaing","umping","unchanged","unclouded","uncouple","uncouples","uncover","uncovers","undated","undateds","undefined","unding","unedited","unhooked","uniated","uning","united","unkind","unlive","unlives","unmake","unmakes","unmated","unmodified","unqing","unsated","unsees","unsung","unsure","untouched","unusually","unwired","unyoke","unyokes","upbeated","upcasted","update","updates","updrafted","uphold","upholds","uping","upland","uplanded","upsets","upside","uptaked","upvoted","urated","urging","urling","urning","urns","ursine","uruses","usages","usaging","usaing","usas","usbegs","usbeks","uscbing","usdaed","usdaing","used","useds","user","users","ushers","usinged","usings","usmcing","usneas","usning","usns","usps","uspses","uspsing","usss","usssing","usualed","usuals","usurer","utaing","utcing","utes","uting","utning","uubing","uuhing","uuping","uuqing","uuting","uving","uziing","valiing","valing","valling","valses","valsing","valuing","valving","vandaed","vanned","varment","vasing","vassed","vasting","vedisted","vegans","veined","veines","veining","vend","vended","vends","vent","venting","verbified","verbifies","verbify","veridis","veridises","veried","verified","verifieds","verifier","verifiers","verited","veritied","verities","verity","versified","versifier","versifiers","versifies","versify","versting","versts","verting","verves","vest","vesting","vests","vetting","vianded","vilifies","vilify","vinifies","vinify","virens","vireos","vising","visits","visually","vitrifies","vitrify","vive","vives","vivifies","vivify","vivred","vocalling","vomers","vomits","voters","vouch","vouched","voucheed","vouchees","vouchers","vouches","vouching","vowers","wadded","wadses","waifed","wailed","wailing","wained","waived","waives","wake","wakens","wakers","wakes","waling","walk","walking","walks","wall","walling","wallings","walls","wallying","wand","wanded","wander","wanked","wanned","want","wanted","ware","wared","waried","warmed","warned","warped","warred","warsed","warses","wart","warted","washes","wassed","wastes","wasting","watses","wauling","wave","wavers","wawling","wayses","wbsing","weaked","weaken","wealed","wean","weaned","weans","wearer","weaved","weeked","weft","wefting","weirded","weired","wekaed","welling","welt","welting","wended","wends","wens","weres","westing","wests","wetting","whacks","whales","whanged","wharfs","whelks","whiled","whined","whirled","whirred","whists","whites","whits","wholed","wholes","whooped","whored","whores","wick","wicked","wicks","wided","width","widths","wifed","wified","wigged","wilded","wiled","wilied","wilies","willed","willing","wilted","wimped","winced","wind","wined","winged","winied","winked","winned","winoed","wiped","wipeds","wireds","wirer","wiried","wised","wisent","wish","wished","wising","wisped","witch","withal","withe","wither","withes","within","withs","withy","witsed","witted","wive","wived","wives","wizzed","wlanned","wokked","wold","wolds","wonked","wont","wooded","wooers","woofed","wooled","worded","worlds","wormed","worned","worsed","worted","woulds","wove","woves","wraith","wrasses","wreaked","wrecks","wresting","wrests","wricks","wried","wriggler","wrigglers","wringer","wringers","writhe","wswing","wussing","wyrded","xmases","yanaed","yanked","yarded","yawling","yawses","yearns","yeasting","yeasts","yelling","yessing","yetting","yolked","yorked","youthed","youthing","yuling","yuses","yussing","zaired","zaires","zanied","zend","zended","zends","zest","zesting","zests","zestying","zeuses","zeusing","zhuanged","zilling","zonked","zoomed","zooted"]}});function On(e,t,n){if(e===t)return 0;if(Math.abs(e.length-t.length)>n)return n+1;let s=null,o=Array.from({length:t.length+1},(i,r)=>r);for(let i=1;i<=e.length;i+=1){let r=[i],a=i;for(let l=1;l<=t.length;l+=1){let c=e[i-1]===t[l-1]?0:1,u=Math.min(o[l]+1,r[l-1]+1,o[l-1]+c);i>1&&l>1&&e[i-1]===t[l-2]&&e[i-2]===t[l-1]&&(u=Math.min(u,s[l-2]+c)),r[l]=u,u<a&&(a=u)}if(a>n)return n+1;s=o,o=r}return o[t.length]}function Ea(e){return/^[a-z]+$/.test(e)&&!st.has(e)&&!Sa.has(e)}function Wd(e){return Py(e)?null:ja(e,Ny,Jn(e))}function ja(e,t,n=Jn(e)){let s=n+1,o=null,i=!1;for(let r of t){let a=On(e,r,Math.min(s,n));a<s?(s=a,o=r,i=!1):a===s&&a<=n&&r!==o&&(i=!0)}return s<=n&&!i?o:null}var Oy,Jn,Sa,Ly,Ny,My,Py,Go=L(()=>{An();Bd();Xn();Oy=["used"];Jn=e=>e.length<=5?1:2,Sa=new Set([...Object.keys(de),...Object.keys(Be),...Object.keys(Gt),...Oy].flatMap(e=>e.split(" "))),Ly=4,Ny=[...new Set([...Object.keys(de),...Object.keys(Gt)].flatMap(e=>e.split(" ")).filter(e=>e.length>=Ly))],My=new Set(Ud.words),Py=e=>My.has(e)});function no(e){for(let t of By){let n=e.match(t.re);if(n){let s=t.build(n);if(s)return s}}return null}var Wr,Fy,Dy,zy,_a,By,qd,qr=L(()=>{An();Xn();Wr=Object.keys(de).sort((e,t)=>t.length-e.length).map(He).join("|"),Fy=Object.keys(Be).sort((e,t)=>t.length-e.length).map(He).join("|"),Dy=Object.keys(Gt).sort((e,t)=>t.length-e.length).map(He).join("|"),zy=bs.slice().sort((e,t)=>t.length-e.length).map(He).join("|"),_a=(e,t)=>e==="defines"&&No.has(t),By=[{name:"ask",re:new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+(${Wr})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=de[t];if(_a(n,t))return null;let s=e[1].trim(),o=e[3].trim();return Lo.includes(t)&&([s,o]=[o,s]),{shape:"ask",entityType:null,modifier:"direct",kind:n,subject:s,object:o}}},{name:"reverse",re:new RegExp(`^which\\s+(${Fy})\\s+(?:(${Dy})\\s+)?(${Wr})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[3].toLowerCase(),n=de[t];return _a(n,t)?null:{shape:"reverse",entityType:Be[e[1].toLowerCase()],modifier:e[2]?Gt[e[2].toLowerCase()]:"direct",kind:n,object:e[4].trim()}}},{name:"forward",re:new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+(${Wr})\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=de[t];return _a(n,t)?null:{shape:"forward",entityType:null,modifier:"direct",kind:n,object:e[1].trim()}}},{name:"meta-mean",re:new RegExp(`^what\\s+(?:does|do|is|are)\\s+(.+?)\\s+(?:${zy})\\??$`,"i"),build:e=>({shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:e[1].trim()})},{name:"meta-whatis",re:new RegExp("^what\\s+(?:is|are)\\s+(?:(an?|the)\\s+)?(.+?)\\??$","i"),build:e=>{let t=e[1]?e[1].toLowerCase():null,n=Xt(e[2].trim()),s=!/\s/.test(n);if(t==="the"&&!s||!t&&!Be[n.toLowerCase()])return null;let o=n.toLowerCase();return t&&t!=="the"&&cu.some(i=>o===i||o.startsWith(`${i} `))?null:{shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:hs(n)}}},{name:"mention",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)\\s+(?:${rn.map(He).join("|")})\\??$`,"i"),build:e=>({shape:"mentions",entityType:null,modifier:"direct",kind:"mentions",object:e[1].trim()})},{name:"where",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)(?:\\s+(?:${Yt.map(He).join("|")}))?\\??$`,"i"),build:e=>({shape:"where",entityType:null,modifier:"direct",kind:"where",object:e[1].trim()})},{name:"when",re:new RegExp(`^when\\s+(?:did|does|do|was|were|is)\\s+(.+?)\\s+(?:last\\s+)?(${Wr})\\??$`,"i"),build:e=>de[e[2].toLowerCase()]==="touches"?{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:e[1].trim()}:null},{name:"commit-history",re:/^(?:the\s+)?commit\s+history\s+(?:of|for)\s+(.+?)\??$/i,build:e=>({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:e[1].trim()})},{name:"cochange-partners",re:/^co-?change\s+partners\s+(?:of|for|with)\s+(.+?)\??$/i,build:e=>({shape:"reverse",entityType:"Module",modifier:"direct",kind:"cochange",object:e[1].trim()})}];qd={id:"grammar",class:"graph-query",run(e){let t=no(e);return t?{strategyId:"grammar",class:"graph-query",candidates:[{parsed:t,confidence:.9}]}:null}}});function xt(e,t,n=null){let s=Object.keys(t).sort((o,i)=>i.split(" ").length-o.split(" ").length);for(let o of s){let i=o.split(" ");for(let r=0;r<=e.length-i.length;r+=1)if(!(n&&i.some((a,l)=>n.has(r+l)))&&i.every((a,l)=>e[r+l]===a))return{kind:t[o],start:r,end:r+i.length}}return null}function Ho(e,t=null){let n=e.replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),s=n.map(E=>E.toLowerCase());if(s.includes("where")&&!xt(s,de)){let E=s.some(S=>rn.includes(S)),_=new Set([...Yt,...rn]),R=n.filter((S,A)=>!st.has(s[A])&&!_.has(s[A])).join(" ").trim();if(R){let S=E?"mentions":"where";return{shape:S,entityType:null,modifier:"direct",kind:S,object:R}}}if(new Set(["has","have","had"]).has(s[0])){let E=s.length;for(;E>1&&(s[E-1]==="ever"||s[E-1]==="been");)E-=1;if((E>1?de[s[E-1]]:null)==="touches"){let R=n.slice(1,E-1).filter((S,A)=>!st.has(s[1+A])).join(" ").trim();if(R)return{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:R}}}let i=s,r=xt(s,de);if(!r&&t){let E=s.map(_=>{if(!Ea(_))return _;let R=t.lemma(_);return Sa.has(R)?R:_});r=xt(E,de),r&&(i=E)}let a=null;if(!r){let E=s.map(_=>_.length>=4&&Ea(_)&&Wd(_)||_);if(r=xt(E,de),r){i=E;let _=s.slice(r.start,r.end).findIndex((S,A)=>S!==E[r.start+A]),R=r.start+Math.max(_,0);a={from:s[R],to:E[R]}}}let l=!1;if(!r)for(let E=0;E<s.length;E+=1){let _=Gn[s[E]];if(!(_&&s[E]==="used"&&s[E+1]==="for")&&_&&s.slice(0,E).some(R=>Vo.has(R))){r={kind:_,start:E,end:E+1},l=!0;break}}if(!r)return null;!l&&r.end-r.start===1&&Gn[s[r.start]]&&s.slice(0,r.start).some(E=>Vo.has(E))&&(l=!0);let c=E=>a?{...E,fuzzyVerb:a}:E;if(t&&r.end-r.start===1){let E=r.start,_=s[E-1];if((_==="the"||_==="these"||_==="those")&&s[E+1]==="of"&&t.posTags(n)[E]==="NOUN"){let S=n.slice(E+2).filter((A,M)=>!st.has(s[E+2+M])).join(" ").trim();if(S)return c({shape:"forward",entityType:null,modifier:"direct",kind:r.kind,object:S})}}let u=new Set,d=E=>{if(E)for(let _=E.start;_<E.end;_+=1)u.add(_)};d(r);for(let[E,_]of Object.entries(de)){if(_!==r.kind)continue;let R=E.split(" "),S=r.end;if(R.every((A,M)=>i[S+M]===A)){d({start:S,end:S+R.length});break}}let m=xt(i,Be,u);d(m);let p=xt(i,Gt,u);d(p);let f=(E,_)=>n.slice(E,_).filter((R,S)=>!u.has(E+S)&&!st.has(s[E+S])).join(" ").trim(),g=f(0,r.start),h=f(r.end,n.length);l&&!s.includes("by")&&qy.has(h.toLowerCase())&&(h="");let b=r.kind,w=m?Be[i.slice(m.start,m.end).join(" ")]:null,v=p?Gt[i.slice(p.start,p.end).join(" ")]:"direct";if(b==="touches"&&s.includes("when")){let E=g||h;if(E)return c({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:E})}if(b==="touches"&&s.includes("who")&&s.includes("last")){let E=g||h;if(E)return c({shape:"whoLast",entityType:null,modifier:"direct",kind:"touches",object:E})}let $=s.indexOf("by"),k=s.slice(0,r.start).findIndex(E=>Vo.has(E)),y=k>=0,j=y&&k>$;if($>=0&&!u.has($)&&y){let E=(S,A)=>n.slice(S,A).filter((M,T)=>{let P=S+T,G=s[P];return!u.has(P)&&!st.has(G)&&G!=="by"&&!Vo.has(G)&&!Uy.has(G)&&!Wy.has(G)}).join(" ").trim(),[_,R]=j?[E(k+1,n.length),E($+1,k)]:[E(0,$),E($+1,n.length)];if(_&&R)return b==="defines"&&No.has(i.slice(r.start,r.end).join(" "))?null:c({shape:"ask",entityType:null,modifier:"direct",kind:b,subject:R,object:_});if(R)return c({shape:"forward",entityType:w,modifier:v,kind:b,object:R});if(_)return c({shape:"reverse",entityType:w,modifier:v,kind:b,object:_})}if(l&&$<0&&h&&s[r.start]==="called")return null;if(g&&h){let E=i.slice(r.start,r.end).join(" ");if(b==="defines"&&No.has(E))return null;let _=g,R=h;return Lo.includes(E)&&([_,R]=[R,_]),c({shape:"ask",entityType:null,modifier:"direct",kind:b,subject:_,object:R})}if(h){let E=m&&m.start>=r.end?null:w;return c({shape:"reverse",entityType:E,modifier:v,kind:b,object:h})}if(b==="inherits"&&!g&&m&&m.start===r.end){let E=i.slice(m.start,m.end).join(" ");if(E)return c({shape:"reverse",entityType:null,modifier:v,kind:b,object:E})}if(g&&!h&&y&&r.end-r.start===1&&Gn[s[r.start]]){if(g.split(/\s+/).length>1)return null;if(b==="touches")return c({shape:"when",entityType:null,modifier:"direct",kind:b,object:g});let E=Vo.has(s[0]);return c({shape:"reverse",entityType:w,modifier:v,kind:b,object:g,...E?{polar:!0}:{}})}return g?c({shape:"forward",entityType:w,modifier:"direct",kind:b,object:g}):null}var Vo,Uy,Wy,qy,Gd,Gr=L(()=>{An();Xn();Go();Vo=new Set(["is","are","was","were","be","been","being","get","gets","got"]),Uy=new Set(["which","what","who","whom","whose"]),Wy=new Set(Rn.map(e=>e.toLowerCase())),qy=new Set(["recently","lately","yet","already","ever","again"]);Gd={id:"keyword-spot",class:"graph-query",run(e,t={}){let n=Ho(e,t.nlp||null);return n?{strategyId:"keyword-spot",class:"graph-query",candidates:[{parsed:n,confidence:.7}]}:null}}});function Vy(e,t,n){if(!n||typeof n.posTags!="function"||!t.length)return[];let s=new Set(t.map(r=>r.toLowerCase())),o;try{o=n.posTags(e)}catch{return[]}let i=[];for(let r=0;r<e.length;r+=1){let a=e[r],l=a.toLowerCase();!/^[a-z]+$/.test(a)||Vd.has(l)||!s.has(l)||o[r]==="VERB"&&i.push(l)}return i}function Hy(e,t=null){let n=Qt(e),s=[],o=[];for(let r of n){let a=r.toLowerCase();/^[a-z]+$/.test(r)&&!Vd.has(a)&&(Gy.has(a)||t&&typeof t.isStopWord=="function"&&t.isStopWord(a))?o.push(r):s.push(r)}let i=Vy(n,s,t);return{text:s.join(" "),dropped:o,maybeNoise:i}}var Vd,Gy,Hd,Kd=L(()=>{An();Xn();qr();Gr();Vd=new Set([...st,...me(gs),...me(Object.keys(de)),...me(Object.keys(Be)),...me(Object.keys(Gt)),...me(Object.keys(Ve)),...me(ws),...me(ys),...me(Object.keys(Vn)),...me(Object.keys(pn)),...me(Object.keys(Ks)),...me(Rn),...me(Po),...me(bs),...me(Yt),...me(rn),...me(_n),...me(Object.keys(Xs))]),Gy=new Set([...me(Mo),...me(Cr)]);Hd={id:"noise-strip",class:"noise-stripped",run(e,t={}){if(no(e))return null;let{text:n,dropped:s,maybeNoise:o}=Hy(e,t.nlp||null);if(!s.length||!n)return null;let i=no(n)||Ho(n,t.nlp||null);if(!i)return null;if(o.length&&(i.shape==="where"||i.shape==="mentions")&&i.object){let r=i.object.split(/\s+/).filter(a=>!o.includes(a.toLowerCase())).join(" ").trim();r&&r!==i.object&&(i.altObject=r)}return{strategyId:"noise-strip",class:"noise-stripped",candidates:[{parsed:i,confidence:.75,note:`noise-stripped to "${n}"`}]}}}});var Yd=L(()=>{});var Xd=L(()=>{});function Qd(e,t){return e.shape!==t.shape||e.kind!==t.kind?!1:e.shape==="ask"?so(e.subject)===so(t.subject)&&so(e.object)===so(t.object):so(e.object)===so(t.object)}function Ra(e){let t=(e||[]).filter(c=>c&&Array.isArray(c.candidates)&&c.candidates.length);if(!t.length)return null;let n=[];for(let c of t)for(let u of c.candidates)!u||!u.parsed||n.push({parsed:u.parsed,confidence:typeof u.confidence=="number"?u.confidence:.5,note:u.note||null,via:u.via||null,strategyId:c.strategyId,class:c.class});if(n.some(c=>!Zd(c))&&(n=n.filter(c=>!Zd(c))),!n.length)return null;let s=new Map;for(let c of n)s.has(c.class)||s.set(c.class,[]),s.get(c.class).push(c);let o=[];for(let[c,u]of s){let d=[];for(let m of u){let p=d.find(f=>Qd(f.parsed,m.parsed)&&f.via===m.via);if(p){p.agreed+=1,p.confidence=Math.max(p.confidence,m.confidence),Jd(m.parsed)<Jd(p.parsed)&&(p.parsed=m.parsed);continue}d.push({...m,agreed:1})}d.length&&o.push({class:c,candidates:d})}if(!o.length)return null;let i=c=>Math.max(...c.candidates.map(u=>u.confidence)),r=o[0];for(let c of o)i(c)>i(r)&&(r=c);let a=r.candidates.length===1?r.candidates[0].parsed:{ambiguousParse:!0,candidates:r.candidates.map(c=>c.parsed)},l=o.filter(c=>c!==r).map(c=>c.candidates[0]).filter(c=>!r.candidates.some(u=>Qd(u.parsed,c.parsed)));return{class:r.class,parsed:a,winner:r.candidates[0],alternates:l}}function Xy(e){if(!e)return"something else";if(e.ambiguousParse)return"one of several readings";let t=e.object??e.subject??"?";return`${e.kind} "${t}"`}function ep(e,{describe:t=Xy,answerFor:n=null}={}){return(e||[]).map(s=>{let o=s.note||t(s.parsed),i=n&&n(s)||"ask it that way";return`if you mean ${o} then ${i}`})}var so,Ky,Jd,Yy,Zd,Aa=L(()=>{so=e=>String(e||"").trim().toLowerCase().replace(/\s+/g," ").replace(/^(?:the|a|an)\s+/,"").replace(/^commit\s+(?=[0-9a-f]{7,40}$)/,""),Ky=/^\s*(?:the|a|an)\s+/i,Jd=e=>[e?.subject,e?.object].filter(t=>Ky.test(String(t||""))).length;Yy=new Set(["fuzzy","lemma","spell"]),Zd=e=>Yy.has(e.via)});function Vr(e){Ta=e}function Ca(){return typeof Ta=="function"?Ta():null}var Ta,Ko=L(()=>{Ta=null});function sp(e,t={},n=Qy){let s=[];for(let o of n)try{let i=o.run(e,t);i&&typeof i.then!="function"&&s.push(i)}catch{}return s}var Jy,Qy,op=L(()=>{Xn();qr();Gr();Kd();Yd();Xd();Aa();Ko();Jy=[...typeof void 0<"u"?[void 0]:[],...typeof void 0<"u"?[void 0]:[]],Qy=[qd,Gd,Hd,...Jy]});var Hr,rp=L(()=>{Hr=(e,t,n)=>n});var Hp={};En(Hp,{DYNAMIC_TAIL_OK_RE:()=>ec,applyNegationFrames:()=>qo,ask:()=>ns,classDisplayName:()=>Zn,degreeMetric:()=>Fp,metaFallbackEntityAnswer:()=>Cp,normalizeQuery:()=>js,parseQuery:()=>Qo,parseQueryFull:()=>Wa,render:()=>gn,rephraseHint:()=>Xa,resolveObject:()=>an,traverse:()=>Ht});function We(e,t){let n=ip.get(e);n||(n=new Map,ip.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let i of e.relations)if(In(i)===t)for(let r of i.edges)o.push(r);return n.set(t,o),o}function Fe(e,t){let[n,s]=vp[e]||["result","results"];return t===1?n:s}function Zn(e){let t=String(e||"");if(typeof fn=="function"){let n=fn(t).join(" ");if(n)return n}return t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase()}function _s(e){return ev[e]||e}function rv(e){if(!e?.ambiguousParse||!Array.isArray(e.candidates)||e.candidates.length!==2)return e;let t=e.candidates.find(i=>i?.shape==="meta"),n=e.candidates.find(i=>i!==t);if(!t||!n)return e;let s=String(t.object||"").trim().toLowerCase();if(!s||ov.has(s))return e;let o=String(n.object||"").trim().toLowerCase();return me(bs).includes(o)?t:e}function Qo(e,{nlp:t=void 0}={}){return Wa(e,{nlp:t}).parsed}function Wa(e,{nlp:t=void 0}={}){let n=t===void 0?Ca():t,s=String(e||"").trim().replace(/\s+/g," ");if(!s)return{parsed:null,alternates:[],class:null};let o=ka(qo(js(s)));if(!o)return{parsed:null,alternates:[],class:null};let i=av(o,n);if(i)return{parsed:i,alternates:[],class:null};let r=Ra(sp(o,{nlp:n,raw:s}));return r?{parsed:rv(r.parsed),alternates:r.alternates||[],class:r.class||null}:{parsed:null,alternates:[],class:null}}function Pa(e,t){return t.length&&xp.has(t[0])?{bw:e.slice(1),blc:t.slice(1)}:{bw:e,blc:t}}function io(e,t){return no(e)||Ho(e,t)}function av(e,t){let n=Qt(e),s=n.map(o=>o.toLowerCase());return _v(n,s)||Av(n,s)||dv(n,s,t)||Sp(e,t,0)||Tv(n,s,t)||fv(n,s,t)||vv(n,s,t,0)||xv(n,s)||Ev(n,s,t)||Cv(n,s,t)||Nv(n,s,t)||Pv(n,s,t,0)||Lv(n,s,t,0)||Ga(n,s,t,0)||hv(n,s,t)||lv(n,s)||Ap(n,s,t,0)}function lv(e,t){let n=0;cv.has(t[n])&&(n+=1);let s=kt(t[n]);if(!s||s.placeholder||!s.entityType)return null;let o=s.entityType;n+=1;let i=f=>f+1<t.length?lu[`${t[f]} ${t[f+1]}`]:void 0,r=i(n);if(!r)return null;let a=n+2,l=-1,c;for(let f=a;f+1<t.length;f+=1){let g=i(f);if(g){l=f,c=g;break}}if(l<0)return null;let u=e.slice(a,l).join(" ").trim(),d=e.slice(l+2).join(" ").trim();if(!u||!d)return null;let m=(f,g)=>f.role==="object"?{shape:"reverse",kind:f.kind,entityType:o,modifier:"direct",object:g}:{shape:"forward",kind:f.kind,modifier:"direct",object:g},p=m(r,u);return p.entityType=o,{node:"boolean",entityType:o,atoms:[{op:"seed",kind:"set",ast:{node:"clause",clause:p}},{op:"intersection",kind:"set",ast:{node:"clause",clause:m(c,d)}}]}}function Yr(e,t){return{node:"boolean",entityType:e,atoms:[{op:"seed",kind:"set",ast:{node:"allOfClass",entityType:e}},t]}}function dv(e,t,n){if(!["do","does","did"].includes(t[0])||!uv.has(t[1]))return null;let s=kt(t[2]);if(!s||s.placeholder||!s.entityType)return null;let o=s.entityType;if(o==="Change")return{node:"miss",reason:`"${t[2]}" isn't an enumerable kind \u2014 a universal check needs a concrete kind (functions, classes, modules, \u2026)`};let i=t[2],r=e.slice(3),a=t.slice(3);if(!r.length)return null;let l=xt(a,de);if(!l)return{node:"miss",reason:"a universal check needs a known relation verb (import, call, inherit from, test, \u2026)"};let u=r.filter((m,p)=>(p<l.start||p>=l.end)&&!st.has(a[p])&&a[p]!=="from").join(" ").trim();if(!u)return null;let d=ao(`which ${i} ${r.join(" ")}`,n,1);return!d||d.node==="miss"?{node:"miss",reason:d&&d.reason||"the universal clause didn't parse"}:{node:"universal",entityType:o,kind:l.kind,object:u,complement:Yr(o,{op:"difference",kind:"set",ast:d})}}function Sp(e,t,n=0){let s=zd(e);if(!s)return null;let o=kt(s.entWord);if(!o||o.placeholder||!o.entityType)return null;let i=o.entityType;if(i==="Change")return{node:"miss",reason:`"${s.entWord}" isn't an enumerable kind \u2014 a set complement needs a concrete kind (functions, classes, modules, \u2026)`};let r=Qt(s.predicate),a=r.map(d=>d.toLowerCase());if(a.length&&a.every(d=>Ve[d]))return Yr(i,{op:"difference",kind:"qual",filters:a});let l=xt(a,de);if(!l)return{node:"miss",reason:"a negated set query needs a known relation verb (import, call, inherit from, test, \u2026)"};if(!r.filter((d,m)=>(m<l.start||m>=l.end)&&!st.has(a[m])&&a[m]!=="from").length)return Yr(i,{op:"difference",kind:"set",ast:{node:"existsEdge",entityType:i,kind:l.kind}});let u=ao(`which ${s.entWord} ${s.predicate}`,t,n+1);return!u||u.node==="miss"?{node:"miss",reason:u&&u.reason||"the negated clause didn't parse"}:Yr(i,{op:"difference",kind:"set",ast:u})}function fv(e,t,n){let s=0;for(;s<t.length&&pv.has(t[s]);)s+=1;if(!["do","does","did"].includes(t[s]))return null;s+=1;let o=e.slice(s),i=t.slice(s),r=i.indexOf("not");if(r<0)return null;let a=xt(i,de);if(!a)return null;let c=o.filter((u,d)=>d!==r&&(d<a.start||d>=a.end)&&i[d]!=="from"&&!st.has(i[d])).join(" ").trim();return c?{node:"forwardComplement",kind:a.kind,subjectTerm:c}:null}function Ep(e,t){let n=new Set;for(let s of t)for(let o of We(e,s)){let i=e.byId.get(o.object);i&&i.class&&n.add(i.class)}return n}function jp(e,t){let n=Rt(t),s=n.filter(i=>!yp.has(i)),o=Ep(e,s.length?s:n);return o.size===1?[...o][0]:null}function ao(e,t,n){if(n>$p)return{node:"miss",reason:"too deep to resolve"};let s=Sp(e,t,n);if(s)return s;let o=Qt(e),i=o.map(c=>c.toLowerCase()),r=Ga(o,i,t,n);if(r)return r;let a=Ap(o,i,t,n);if(a)return a;let l=io(e,t);return l?{node:"clause",clause:l}:null}function Ga(e,t,n,s){for(let o=1;o<t.length;o+=1){let i=_n.includes(t[o]),r=!i&&kp(t[o]);if(!i&&!r||i&&o+1>=t.length||!kt(t[o-1]))continue;let l=e.slice(0,o-1);if(!l.length||l.every(m=>Ve[m.toLowerCase()]))continue;let c=io([...l,Ma].join(" "),n);if(!c||c.shape!=="reverse"&&c.shape!=="forward"||c.modifier&&c.modifier!=="direct")continue;let u=`which ${t[o-1]} ${e.slice(i?o+1:o).join(" ")}`,d=ao(u,n,s+1);return!d||d.node==="miss"?d?{node:"miss",reason:d.reason||"inner clause didn't parse"}:{node:"miss",reason:"inner clause didn't parse"}:{node:c.shape==="reverse"?"reverseSet":"forwardSet",kind:c.kind,entityType:c.entityType,inner:d}}return null}function hv(e,t,n){for(let s=0;s<t.length;s+=1){if(!mv.has(t[s])||t[s-1]==="of")continue;let o=s===t.length-1,i=s+1<t.length&&!!de[t[s+1]];if(!o&&!i)continue;let r=[...e.slice(0,s),Ma,...e.slice(s+1)],a=io(r.join(" "),n);if(!(!a||a.shape!=="reverse"&&a.shape!=="forward")&&a.object===Ma&&!(a.modifier&&a.modifier!=="direct"))return{node:a.shape==="reverse"?"reverseSet":"forwardSet",kind:a.kind,entityType:a.entityType,inner:{node:"prevSet"}}}return null}function vv(e,t,n,s=0){if(t[0]!=="when")return null;let o=1;if(!gv.has(t[o]))return null;o+=1;let i=-1;for(let d=t.length-1;d>=o;d-=1)if(bv.has(t[d])){i=d;break}if(i<0)return null;let r=e.slice(o,i),a=t.slice(o,i);for(;a.length&&wv.has(a[a.length-1]);)r=r.slice(0,-1),a=a.slice(0,-1);for(;a.length&&yv.has(a[0]);)r=r.slice(1),a=a.slice(1);if(!r.length||!a.some(d=>_n.includes(d)))return null;let l=qa.has(a[0])?r.join(" "):`which ${r.join(" ")}`,c=ao(l,n,s+1);if(!c||c.node==="miss")return c?{node:"miss",reason:c.reason||"the inner set of the temporal query didn't parse"}:{node:"miss",reason:"the inner set of the temporal query didn't parse"};let u=kt(a[0]);return{node:"temporal",inner:c,entityType:u&&u.entityType||null}}function xv(e,t){if(t[0]!=="what"||t[1]!=="changed")return null;let n=2;if(t[n]==="ever"&&(n+=1),!$v.has(t[n]))return null;let s=t[n],o=e.slice(n+1).join(" ").trim();return o?{node:"commitFilter",op:s,pivotRaw:o}:{node:"miss",reason:`"what changed ${s}" needs a date or commit afterward`}}function Sv(e){let t=new Set,n=[];for(let s of e){if(!s||!kv.test(s))continue;let o=s.toLowerCase();t.has(o)||(t.add(o),n.push(s))}return n}function Ev(e,t,n){if(t.length===2&&t[0]==="which"&&(t[1]==="ones"||t[1]==="one"))return{node:"anaphora",mode:"list",filter:{type:"all"}};let s=-1,o=!1;for(let d=1;d<t.length;d+=1){if(!Po.includes(t[d]))continue;if(t[d-1]==="of"){s=d,o=!0;break}let m=t.slice(0,d).join(" ");if(d===t.length-1&&(ws.includes(m)||ys.includes(m))){s=d;break}}if(s<0)return null;let i=(o?t.slice(0,s-1):t.slice(0,s)).join(" "),r=ws.includes(i)||/^(how many|how much|count|number|quantity|total)\b/.test(i)?"count":"list",a=jv(e.slice(s+1),n);if(a===void 0)return{node:"miss",reason:"the follow-up filter didn't parse"};let l=o?s-1:s,c=Sv(e.slice(0,l)),u={node:"anaphora",mode:r,filter:a};return c.length>=2&&(u.candidateTerms=c),u}function jv(e,t){let n=0,s=e.map(a=>a.toLowerCase());for(;n<s.length&&iv.has(s[n]);)n+=1;let o=e.slice(n),i=s.slice(n);if(!o.length)return{type:"all"};if(i.every(a=>Ve[a]))return{type:"qual",filters:i};if(o.length===1){let a=kt(i[0]);if(a&&!a.placeholder&&a.entityType)return{type:"entity",entityType:a.entityType}}let r=io(`what ${o.join(" ")}`,t);if(r&&(r.shape==="reverse"||r.shape==="forward")&&r.object)return{type:"clause",clause:r}}function _v(e,t){let n;if(t[0]==="is"&&t[1]==="there")n=2;else if(t[0]==="are"&&t[1]==="there")n=2;else return null;let s=t[n];if(s==="a"||s==="an"||s==="any")n+=1;else return null;let o=n<t.length?kt(t[n]):null;if(!o||o.placeholder||!o.entityType)return null;let i=o.entityType;n+=1;let r=t.slice(n),a=e.slice(n);if(r.length&&r[r.length-1]==="anywhere"?(r=r.slice(0,-1),a=a.slice(0,-1)):r.length>=2&&r[r.length-2]==="at"&&r[r.length-1]==="all"&&(r=r.slice(0,-2),a=a.slice(0,-2)),!r.length)return{node:"exists",entityType:i,term:null,scopeModule:null};if(r[0]==="called"||r[0]==="named"){if(r.length<2)return{node:"miss",reason:`"${r[0]}" needs a name afterward`};let l=r.indexOf("in",1);if(l>0){let u=a.slice(1,l).join(" ").trim(),d=a.slice(l+1).join(" ").trim();return!u||!d?{node:"miss",reason:'a named existence check needs both a name and a module after "in"'}:{node:"exists",entityType:i,term:u,scopeModule:d}}let c=a.slice(1).join(" ").trim();return c?{node:"exists",entityType:i,term:c,scopeModule:null}:{node:"miss",reason:`"${r[0]}" needs a name afterward`}}if(r[0]==="in"){let l=a.slice(1).join(" ").trim();return l?{node:"exists",entityType:i,term:null,scopeModule:l}:{node:"miss",reason:'"in" needs a module afterward'}}return null}function Rv(e,t){if(!t.length)return null;let n=`${e} ${t.join(" ")}`,s=hs(n).slice(e.length).trim(),o=Qt(s),i=o.findIndex(a=>a.toLowerCase()==="in");if(i<0)return null;let r=o.slice(i+1).join(" ").trim();return r?{scope:r}:{node:"miss",reason:'"in" needs a scope afterward'}}function Av(e,t){if(t[0]!=="is"&&t[0]!=="are"||t[1]==="there")return null;let n=-1,s=!1;for(let c=1;c<t.length;c+=1)if(Ve[t[c]]){n=c,s=t[c-1]==="not";break}if(n<0)return null;let o=t.indexOf("by",n+1);if(o>0&&Gn[t[n]]){let c=o+1;for(;c<t.length&&(t[c]==="the"||t[c]==="a"||t[c]==="an");)c+=1;let u=t[c];if(u&&!fu.has(u))return null}let i=Rv(t[n],e.slice(n+1));if(i?.node==="miss")return i;let r=1;t[r]==="the"&&(r+=1);let a=s?n-1:n;a>r&&(t[a-1]==="a"||t[a-1]==="an")&&(a-=1);let l=a>r?e.slice(r,a).join(" ").trim():"";return l?{node:"qualCheck",term:l,qualifier:t[n],negated:s,scope:i?.scope||null}:{node:"miss",reason:'"is/are <qualifier>" needs a named thing to check first'}}function Tv(e,t,n){if(!["do","does","did","is","are","was","were"].includes(t[0]))return null;let s=t.indexOf("not",1);if(s<0)return null;let o=io(e.filter((i,r)=>r!==s).join(" "),n);return!o||o.shape!=="ask"?null:{...o,negated:!0}}function Cv(e,t,n){let s=ws.find(d=>t.slice(0,d.split(" ").length).join(" ")===d);if(!s)return null;let o=s.split(" ").length;for(;o<t.length&&(t[o]==="the"||t[o]==="a"||t[o]==="all");)o+=1;let i=[];for(;o<t.length&&Ve[t[o]];)i.push(t[o]),o+=1;let r=o<t.length?kt(t[o]):null;if(!r)return{node:"miss",reason:"count needs a known entity kind (functions, classes, modules, \u2026)"};let a=t[o];o+=1;let l=e.slice(o),c=t.slice(o).some(d=>!st.has(d)&&!_p.has(d)),u;if(c){let d=ao(`which ${a} ${l.join(" ")}`,n,1);if(!d||d.node==="miss")return{node:"miss",reason:"the count restrictor didn't parse"};u=d}else u={node:"allOfClass",entityType:r.entityType};return i.length&&(u={node:"qualifier",filters:i,inner:u}),{node:"count",entityType:r.entityType,base:u}}function Lv(e,t,n,s){let o=0,i=!1,r=null;for(let w of Iv){let v=w.split(" ");if(t.slice(0,v.length).join(" ")===w){r=w,o=v.length;break}}if(!r)if(t[0]==="what"||t[0]==="which")i=!0,o=1;else return null;for(;o<t.length&&Va.has(t[o]);)o+=1;let a=[];for(;o<t.length&&Ve[t[o]];)a.push(t[o]),o+=1;let l=o<t.length?kt(t[o]):null;if(!l||l.placeholder||l.entityType==="Change")return!i&&o<t.length&&o===t.length-1&&/^[a-z]+$/.test(t[o])&&!de[t[o]]&&!Rn.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${Rp}`}:null;let c=l.entityType,u=t[o];o+=1;let d=e.slice(o),m=t.slice(o).some(w=>!st.has(w)&&!_p.has(w)),p=t.slice(o),f=d;(p[0]==="is"||p[0]==="are")&&(p=p.slice(1),f=f.slice(1));let g=i&&Ov.has(p[0]);if(i&&(m&&!g||d.length===0))return null;let h,b=!1;if(m){let w=g?f:d,v=ao(`which ${[...a,u,...w].join(" ")}`,n,(s||0)+1);if(!v||v.node==="miss")return{node:"miss",reason:v&&v.reason||"the list filter didn't parse"};h=v,b=!0}else h={node:"allOfClass",entityType:c},a.length&&(h={node:"qualifier",filters:a,inner:h});return{node:"list",entityType:c,base:h,scoped:b}}function Nv(e,t,n){let s=null,o=-1;for(let f=0;f<t.length;f+=1){let g=t.slice(f,f+2).join(" ");if(Vn[g]){s=Vn[g],o=f;break}if(Vn[t[f]]){s=Vn[t[f]],o=f;break}}if(!s)return null;let i=null,r=null;for(let f=o;f<t.length;f+=1)if(pn[t[f]]){i=pn[t[f]],r=t[f];break}if(!i){for(let f=o-1;f>=0;f-=1)if(pn[t[f]]){i=pn[t[f]],r=t[f];break}}let a=t.includes("connected")||t.slice(o,o+2).join(" ")==="most connected"||["largest","biggest","smallest"].includes(t[o]),l=["important","significant","central","key","core","essential","critical","principal"],c=t.some(f=>l.includes(f));!i&&(a||c)&&(i=pn.connections,r="connections");let u,d=null;for(let f of t){let g=kt(f);if(g&&!g.placeholder){u=g.entityType,d=f;break}}if(!d&&(u=r?mu[r]:void 0,!u))return{node:"miss",reason:"a superlative needs an entity kind (module, class, function, \u2026)"};if(!i)return{node:"miss",reason:"name what to rank by (imports, callers, methods, tests, or connections)"};let m=["needs","need","needing","lacks","lack","lacking","misses","missing"],p=t.some(f=>m.includes(f))?s==="most"?"fewest":"most":s;return{node:"superlative",entityType:u,metric:i,metricNoun:r,extreme:p}}function Pv(e,t,n,s){if(t[0]!=="find")return null;let o=1;for(;o<t.length&&Va.has(t[o]);)o+=1;if(o>=t.length)return null;let i=kt(t[o]);if(i&&!i.placeholder&&i.entityType!=="Change"&&o+1<t.length&&Mv.has(t[o+1])){let a=e.slice(o+2).join(" ").trim();if(a)return{node:"find",entityType:i.entityType,term:a}}let r=kt(t[t.length-1]);if(r&&!r.placeholder&&r.entityType!=="Change"){let a=e.slice(o,t.length-1).join(" ").trim();if(a)return{node:"find",entityType:r.entityType,term:a}}return t.some(a=>_n.includes(a))?null:o===t.length-1&&/^[a-z]+$/.test(t[o])&&!de[t[o]]&&!Rn.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${Rp}`}:null}function Fv(e,t){if(t[0]!=="find")return null;let n=1;for(;n<t.length&&Va.has(t[n]);)n+=1;let s=-1;for(let r=n+1;r<t.length;r+=1)if(_n.includes(t[r])){s=r;break}if(s<0)return null;let o=kt(t[s-1]);if(!o||o.placeholder||o.entityType==="Change")return null;let i=e.slice(n,s-1).join(" ").trim();return i?{entityType:o.entityType,term:i,relIdx:s}:null}function Dv(e,t,n,s,o,i){let{branches:r,ops:a}=Xr(n,s),l=null,c=[];for(let u=0;u<r.length;u+=1){let d=r[u],m=d.map(w=>w.toLowerCase()),p=u===0?"intersection":a[u-1],f=Pa(d,m);if(f.blc.length&&f.blc.every(w=>Ve[w])){c.push({op:p,kind:"qual",filters:f.blc});continue}if(m[0]==="of"||m[0]==="in"){c.push({op:p,kind:"set",ast:{node:"membership",entityType:e,term:d.slice(1).join(" ")}});continue}let g=d,h=xt(m,de);h?l=d.slice(h.start,h.end):l&&(g=[...l,...d]);let b=Tp(`${t} ${g.join(" ")}`,o,i);if(!b||b.node==="miss")return{miss:b&&b.reason||"a clause in the combination didn't parse"};c.push({op:p,kind:"set",ast:b})}return{atoms:c}}function Ap(e,t,n,s){let o=Fv(e,t);if(o){let{entityType:R,term:S,relIdx:A}=o,M=t.slice(A+1),T=e.slice(A+1);if(!M.length)return{node:"miss",reason:`a relative clause needs a predicate after "${t[A]}"`};let P=Dv(R,`which ${t[A-1]}`,M,T,n,s+1);if(P.miss)return{node:"miss",reason:P.miss};let G=[{op:"seed",kind:"set",ast:{node:"find",entityType:R,term:S}},...P.atoms];return G.length===1?G[0].ast:{node:"boolean",entityType:R,atoms:G}}let i=0;for(;i<t.length&&qa.has(t[i]);)i+=1;let r=i>0,a=[];for(;i<t.length&&Ve[t[i]];)a.push(t[i]),i+=1;let l=i<t.length?kt(t[i]):null;if(!l){let R=i+1<t.length?kt(t[i+1]):null;if(ap.has(t[i])&&R&&R.entityType==="Commit"&&i+2===t.length)return{node:"recentCommits"};if(xp.has(t[i])){let S=i+1;S<t.length&&(t[S]==="the"||t[S]==="a"||t[S]==="an")&&(S+=1);let A=S+1<t.length?kt(t[S+1]):null;if(ap.has(t[S])&&A&&A.entityType==="Commit"&&S+2===t.length)return{node:"recentCommits"}}return(r||a.length)&&R&&/^[a-z]+$/.test(t[i])&&!de[t[i]]&&!st.has(t[i])&&!Za.has(t[i])?{node:"find",entityType:R.entityType,term:e[i]}:null}let c=l.entityType,u=t[i];i+=1;let d=t.slice(i),m=e.slice(i),p=!1;d.length&&_n.includes(d[0])&&(p=!0,d=d.slice(1),m=m.slice(1));let f=d[0]==="of"||d[0]==="in",g=d.length>0&&kp(d[0]),h=m.length>0&&Xr(d,m).branches.some(R=>{let{blc:S}=Pa(R,R.map(A=>A.toLowerCase()));return S.length&&S.every(A=>Ve[A])}),b=m.length>0?Xr(d,m).branches:[],w=!1;if(b.length>1){let R=b[0].map(A=>A.toLowerCase()),S=xt(R,de);S&&S.start===0&&(w=b.slice(1).every(A=>{let M=A.map(P=>P.toLowerCase()),T=xt(M,de);return T&&T.start===0?T.kind===S.kind:!T}))}let v=!1;if(b.length>1){let R=b[0].map(A=>A.toLowerCase()),S=xt(R,de);S&&S.start===0&&(v=b.slice(1).every(A=>{let M=A.map(P=>P.toLowerCase()),T=xt(M,de);return!!T&&T.start===0&&T.end-T.start===1}))}if(!(a.length||p||f||g||h||w||v))return null;if(!m.length){let R={node:"allOfClass",entityType:c};return a.length?{node:"qualifier",filters:a,inner:R,entityType:c}:{node:"miss",reason:"nothing to filter or traverse"}}let $=l.placeholder?"what":`which ${u}`,{branches:k,ops:y}=Xr(d,m),j=null,E=[];for(let R=0;R<k.length;R+=1){let S=k[R],A=S.map(V=>V.toLowerCase()),M=R===0?"seed":y[R-1],T=Pa(S,A);if(T.blc.length&&T.blc.every(V=>Ve[V])){E.push({op:M,kind:"qual",filters:T.blc});continue}if(A[0]==="of"||A[0]==="in"){E.push({op:M,kind:"set",ast:{node:"membership",entityType:c,term:S.slice(1).join(" ")}});continue}let P=S,G=xt(A,de);G?j=S.slice(G.start,G.end):j&&(P=[...j,...S]);let Z=Tp(`${$} ${P.join(" ")}`,n,s+1);if(!Z||Z.node==="miss")return{node:"miss",reason:Z&&Z.reason||"a clause in the combination didn't parse"};E.push({op:M,kind:"set",ast:Z})}if(E[0].kind!=="set")return{node:"miss",reason:"start with a clause, then combine with and/or/but-not"};let _;return E.length===1?_=E[0].ast:_={node:"boolean",entityType:c,atoms:E},a.length&&(_={node:"qualifier",filters:a,inner:_,entityType:c}),_}function Tp(e,t,n){if(n>$p)return{node:"miss",reason:"too deep to resolve"};let s=Qt(e),o=s.map(a=>a.toLowerCase()),i=Ga(s,o,t,n);if(i)return i;let r=io(e,t);return r?{node:"clause",clause:r}:null}function Xr(e,t){let n=Object.keys(Ks).sort((a,l)=>l.split(" ").length-a.split(" ").length),s=[],o=[],i=0,r=0;for(;r<e.length;){let a=null;for(let l of n){let c=l.split(" ");if(e.slice(r,r+c.length).join(" ")===l){a={c:l,len:c.length};break}}a&&r>i?(s.push(t.slice(i,r)),o.push(Ks[a.c]),r+=a.len,i=r):a?(r+=a.len,i=r):r+=1}return s.push(t.slice(i)),{branches:s,ops:o}}function Ha(e,t,n,s){let o=oo[t];if(o&&ts.has(n)){let u=We(e,o).filter(d=>s.has(d.object));return Nn(u.map(d=>e.byId.get(d.subject)).filter(d=>d&&d.class===n))}let a=(!!o&&[...s].some(u=>ts.has(e.byId.get(u)?.class))?[...Rt(t),o]:Rt(t)).flatMap(u=>We(e,u)).filter(u=>s.has(u.object)),l=Nn(a.map(u=>e.byId.get(u.subject)).filter(Boolean));if(!n||n==="Change")return l;let c=l.filter(u=>u.class===n);return c.length?c:n!=="Module"&&l.some(u=>u.class==="Module")?Ja(e,new Set(l.filter(u=>u.class==="Module").map(u=>u.id)),n):[]}function Bv(e,t){let n=new Set(Ha(e,"touches","Commit",t).map(s=>String(s.label||"").toLowerCase()));for(let s of t)for(let o of e.byId.get(s)?.derived_from||[]){let i=zv.exec(String(o||""));i&&n.add(i[1].toLowerCase())}return n.size}function Jo(e,t,n){let s=Rt(t).flatMap(o=>We(e,o)).filter(o=>n.has(o.subject));return Nn(s.map(o=>e.byId.get(o.object)).filter(Boolean))}function Nn(e){let t=new Set,n=[];for(let s of e)s&&!t.has(s.id)&&(t.add(s.id),n.push(s));return n}function Uv(e,t){let n=Kn(t);if(!n)return[];let s=`${n}/`;return e.individuals.filter(o=>o.class==="Module"&&Kn(o.label).startsWith(s))}function Fa(e){let t=cp.get(e);if(t)return t;let n=new Set;for(let r of We(e,"reexports")){n.add(String(r.object).toLowerCase());let a=e.byId.get(r.object);a&&n.add(String(a.label).toLowerCase())}let s=new Set,o=new Set;for(let r of We(e,"tests"))s.add(r.object),o.add(r.subject);let i=new Map;for(let r of We(e,"defines"))i.set(r.object,r.subject);return t={exported:n,testedModules:s,testModules:o,moduleOfSymbol:i},cp.set(e,t),t}function ro(e,t){return t?t.class==="Module"?t.id:Fa(e).moduleOfSymbol.get(t.id)||null:null}function Cp(e,t){let n=String(t||"").trim().toLowerCase();if(!n)return null;let s=(e?.individuals||[]).filter(d=>Wv.has(d.class)&&String(d.label).toLowerCase()===n);if(s.length!==1)return null;let o=s[0],i=ro(e,o),r=i&&e.byId.get(i)?.label||String((o.attributes||[]).find(d=>d.key==="site")?.value||"").split(":")[0]||null,a=Fe(o.class,1),l=a==="attribute"?"an":"a",c=r?`, ${Hr("defined-in",o.id,"defined in")} ${r}`:"",u=o.class==="Class"?` or "which classes inherit from ${o.label}"`:"";return{text:`${o.label} is ${l} ${a} in this codebase${c} \u2014 try "describe ${o.label}"${u}.`,hit:o,modLabel:r}}function Da(e,t,n){let s=Nn(Ys.flatMap(o=>Jo(e,o,new Set([t]))));return n?s.filter(o=>o.class===n):s}function Ka(e,t,n=null){let s=Ln(e,t,n);if(!(s.match&&s.tier===1)){let o=Uv(e,t);if(o.length)return{kind:"dir",mods:o}}return s.match?{kind:"single",id:s.match.id,entityClass:s.match.class,label:s.match.label}:{kind:"miss"}}function Ip(e,t,n,s,o){let i=o||(()=>!0),r=Da(e,t,s).filter(i);if(r.length||!Lp(e,n))return{own:r,inherited:[],viaId:null,viaLabel:null};for(let a of Op(e,t)){let l=e.byId.get(a);if(!l)continue;let c=Da(e,a,s).filter(i);if(c.length)return{own:r,inherited:c,viaId:a,viaLabel:l.label}}return{own:r,inherited:[],viaId:null,viaLabel:null}}function Rs(e,t,n){if(!n)return!1;switch(n.via){case"visibility":return String((t.attributes||[]).find(o=>o.key==="visibility")?.value||"public").toLowerCase()===n.value;case"attr":return!!(t.attributes||[]).find(s=>s.key===n.attr)?.value;case"exported":{let s=Fa(e).exported;return s.has(String(t.label).toLowerCase())||s.has(String(t.id).toLowerCase())}case"tested":{let s=ro(e,t),o=Fa(e),i=s?e.byId?.get?.(s):null;return s&&(o.testModules.has(s)||i&&ks(String(i.label).toLowerCase()))?!1:(!!s&&o.testedModules.has(s))===n.value}default:return!1}}function Ya(e){return We(e,"inherits")}function za(e,t){return Ya(e).filter(n=>n.object===t).map(n=>n.subject)}function lp(e,t){return Ya(e).filter(n=>n.subject===t).map(n=>n.object)}function qv(e,t){let n=new Set,s=[...za(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let i of za(e,o))n.has(i)||s.push(i)}}return n}function Op(e,t){let n=new Set,s=[...lp(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let i of lp(e,o))n.has(i)||s.push(i)}}return n}function Lp(e,t){let n=up.get(e);if(n||(n=new Map,up.set(e,n)),n.has(t))return n.get(t);let s=Ya(e).some(o=>{let i=e.byId.get(o.subject),r=e.byId.get(o.object);return!!i&&!!r&&i.class===t&&r.class===t});return n.set(t,s),s}function dp(e,t){let n=String(e.label||"").toLowerCase();if(t.every(o=>n.includes(o)))return"label";let s=(e.attributes||[]).map(o=>String(o.value??"").toLowerCase());return t.every(o=>s.some(i=>i.includes(o)))?"attr":null}function fp(e){return e.slice().sort((t,n)=>pp[n.via]-pp[t.via]||String(t.ind.label).length-String(n.ind.label).length).map(t=>t.ind)}function mp(e,t){let n=String(t||"").trim().toLowerCase();if(n.length<4)return!1;let s=Jn(n);if(On(String(e.label||"").toLowerCase(),n,s)<=s)return!0;for(let o of As(e.label))if(On(o,n,s)<=s)return!0;return!1}function Np(e,t,n){let s=e.individuals.filter(l=>l.class===t),o=[...As(n)];if(!o.length||!s.length)return{narrow:[],broad:[]};let i=Lp(e,t),r=[];for(let l of s){let c=dp(l,o);if(c){r.push({ind:l,via:c});continue}if(!i)continue;[...qv(e,l.id)].some(d=>{let m=e.byId.get(d);return!!m&&!!dp(m,o)})&&r.push({ind:l,via:"chain"})}if(r.length||!i)return{narrow:fp(r),broad:[]};let a=new Map;for(let l of s)for(let c of Op(e,l.id)){if(!a.has(c)){let u=e.byId.get(c);u&&u.class===t&&mp(u,n)&&a.set(c,{ind:u,via:"chain"})}for(let u of za(e,c)){if(u===l.id||a.has(u))continue;let d=e.byId.get(u);d&&d.class===t&&mp(d,n)&&a.set(u,{ind:d,via:"chain"})}}return{narrow:[],broad:fp([...a.values()])}}function Zt(e,t,n){switch(t.node){case"clause":return Ht(e,t.clause,n).matches||[];case"allOfClass":return e.individuals.filter(s=>s.class===t.entityType);case"find":{let{narrow:s,broad:o}=Np(e,t.entityType,t.term);return s.length?s:o}case"existsEdge":{let s=new Set(Rt(t.kind).flatMap(o=>We(e,o)).map(o=>o.subject));return e.individuals.filter(o=>s.has(o.id)&&(!t.entityType||o.class===t.entityType))}case"forwardComplement":{let s=Ln(e,t.subjectTerm,n&&n.contextId);if(!s.match)return[];let o=jp(e,t.kind);if(!o)return[];let i=new Set(Jo(e,t.kind,new Set([s.match.id])).map(r=>r.id));return e.individuals.filter(r=>r.class===o&&!i.has(r.id))}case"reverseSet":{let s=new Set(Zt(e,t.inner,n).map(o=>o.id));return Ha(e,t.kind,t.entityType,s)}case"forwardSet":{let s=new Set(Zt(e,t.inner,n).map(o=>o.id));return Jo(e,t.kind,s)}case"prevSet":{let s=n&&n.prev;return Array.isArray(s)?s.map(o=>e.byId.get(o)).filter(Boolean):[]}case"membership":{let s=Ka(e,t.term,n&&n.contextId);if(s.kind==="dir"){if(!t.entityType||t.entityType==="Module")return s.mods;let r=new Set(s.mods.map(l=>l.id));return Nn(Ys.flatMap(l=>Jo(e,l,r))).filter(l=>l.class===t.entityType)}if(s.kind==="miss")return[];let{own:o,inherited:i}=Ip(e,s.id,s.entityClass,t.entityType);return o.length?o:i}case"qualifier":return t.inner.node==="membership"?Dp(e,t,n).matches:Zt(e,t.inner,n).filter(o=>t.filters.every(i=>Rs(e,o,Ve[i])));case"boolean":return Mp(e,t,n);case"anaphora":return Pp(e,t,n).matches;default:return[]}}function Mp(e,t,n){let s=[];for(let o of t.atoms){if(o.op==="seed"){s=Zt(e,o.ast,n);continue}if(o.kind==="qual"){let r=l=>o.filters.every(c=>Rs(e,l,Ve[c])),a=l=>o.filters.every(c=>{let u=Gv(Ve[c]);return u?Rs(e,l,u):!Rs(e,l,Ve[c])});s=o.op==="difference"?s.filter(a):s.filter(r);continue}let i=new Set(Zt(e,o.ast,n).map(r=>r.id));if(o.op==="intersection")s=s.filter(r=>i.has(r.id));else if(o.op==="difference")s=s.filter(r=>!i.has(r.id));else if(o.op==="union"){let r=new Set(s.map(a=>a.id));for(let a of Zt(e,o.ast,n))r.has(a.id)||(r.add(a.id),s.push(a))}}return s}function Vv(e,t){if(!Array.isArray(t)||t.length<2)return null;let n=new Set,s=[];for(let o of t){let i=an(e,o);i&&i.match&&!n.has(i.match.id)&&(n.add(i.match.id),s.push(i.match))}return s.length>=2?s:null}function Pp(e,t,n){let o=Vv(e,t.candidateTerms);if(!o){let u=n&&n.prev;if(!Array.isArray(u)||!u.length)return{compositeMiss:!0,reason:"no-prev",matches:[]};o=u.map(d=>e.byId.get(d)).filter(Boolean)}let i=o,r=t.filter;if(r&&r.type==="qual")i=i.filter(u=>r.filters.every(d=>Rs(e,u,Ve[d])));else if(r&&r.type==="entity")i=i.filter(u=>u.class===r.entityType);else if(r&&r.type==="clause"){let u=an(e,r.clause.object);if(!u.match)i=[];else{let d=oo[r.clause.kind],m=[...Rt(r.clause.kind),...d?[d]:[]],p=new Set(m.flatMap(f=>We(e,f)).filter(f=>f.object===u.match.id).map(f=>f.subject));i=i.filter(f=>p.has(f.id))}}let a=u=>u.length&&u.every(d=>d.class===u[0].class)?u[0].class:null,l=r&&r.type==="entity"?r.entityType:a(o),c=i.length?a(i):l;return t.mode==="count"?{compositeKind:"count",count:i.length,entityType:c,matches:[]}:{compositeKind:"set",matches:i,entityType:c}}function Fp(e,t,n){let s=n.kind==="*"?Hv:[n.kind,...n.sibling?[n.sibling]:[]],o=0;for(let i of s)for(let r of We(e,i)){let a=r.subject===t.id,l=r.object===t.id;if(n.dir==="out"&&a){if(n.filter){let c=e.byId.get(r.object);if(!c||c.class!==n.filter)continue}o+=1}else(n.dir==="in"&&l||n.dir==="both"&&(a||l))&&(o+=1)}return o}function Kv(e){let t=e.individuals.filter(s=>s.class==="Commit"),n=s=>String((s.attributes||[]).find(o=>o.key==="date")?.value||"");return t.sort((s,o)=>n(o).localeCompare(n(s))),{compositeKind:"recentCommits",matches:t}}function Xv(e,t){let{op:n,pivotRaw:s}=t,o=u=>String((u.attributes||[]).find(d=>d.key==="date")?.value||"").slice(0,10),i=null,r=null,a=null;if(Yv.test(s))i=s;else{let{match:u,ambiguous:d}=an(e,s,{expectedClass:"Commit"});u&&!d&&u.class==="Commit"&&o(u)&&(r=u.id,a=u.label,i=o(u))}if(!i)return{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotResolved:!1,matches:[]};let l=e.individuals.filter(u=>u.class==="Commit"&&u.id!==r&&o(u)).filter(u=>{let d=o(u);return n==="since"?d>=i:n==="before"?d<i:n==="after"?d>i:d===i}).sort((u,d)=>o(d).localeCompare(o(u))),c=[];return l.length&&c.push({kind:"set",class:"Commit",label:`${l.length} commit${l.length===1?"":"s"} ${n} ${s}`,ids:l.map(u=>u.id),attrs:{count:l.length,op:n,...r?{pivot:r}:{}},lane:"commitFilter"}),r&&c.push({kind:"event",class:"Commit",label:a,ids:[r],attrs:{date:i},lane:"commitFilter"}),{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotDate:i,pivotResolved:!0,matches:l,referents:c}}function Jv(e,t,n){let s=Zt(e,t.inner,n),o=new Set(s.map(a=>a.id));if(!o.size)return{compositeKind:"temporal",matches:[],entityType:t.entityType,innerCount:0};let i=Ha(e,"touches","Commit",o),r=a=>String((a.attributes||[]).find(l=>l.key==="date")?.value||"");return i.sort((a,l)=>r(l).localeCompare(r(a))),{compositeKind:"temporal",matches:i,entityType:t.entityType,innerCount:s.length}}function Qv(e,t){let n=e.individuals.filter(r=>r.class===t.entityType);if(t.metric?.kind==="tests"&&t.entityType==="Module"){let r=new Set(We(e,"tests").map(a=>a.subject));n=n.filter(a=>!r.has(a.id)&&!ks(String(a.label).toLowerCase()))}let s=n.map(r=>({ind:r,score:Fp(e,r,t.metric)})).sort((r,a)=>t.extreme==="most"?a.score-r.score:r.score-a.score);if(!s.length)return{compositeKind:"superlative",entityType:t.entityType,matches:[]};let o=s[0].score,i=s.filter(r=>r.score===o).map(r=>r.ind);return{compositeKind:"superlative",entityType:t.entityType,metricNoun:t.metricNoun,extreme:t.extreme,score:o,matches:i}}function Dp(e,t,n){let s=t.node==="qualifier"&&t.inner.node==="membership"?t:null,o=s?s.inner:t,i=o.entityType,r=s?m=>s.filters.every(p=>Rs(e,m,Ve[p])):null,a=Ka(e,o.term,n&&n.contextId);if(a.kind==="dir"){let m;if(!i||i==="Module")m=a.mods;else{let p=new Set(a.mods.map(f=>f.id));m=Nn(Ys.flatMap(f=>Jo(e,f,p))).filter(f=>f.class===i)}return r&&(m=m.filter(r)),{compositeKind:"set",matches:m,entityType:i}}if(a.kind==="miss")return{compositeKind:"set",matches:[],entityType:i};let{own:l,inherited:c,viaLabel:u}=Ip(e,a.id,a.entityClass,i,r),d=!l.length&&c.length>0;return{compositeKind:"membership",entityType:i,matches:d?c:l,inheritedNotOwn:d,viaLabel:u,ownerLabel:a.label}}function Zv(e,t){let{entityType:n,term:s,scopeModule:o}=t,i=null;if(o){let a=an(e,o,{expectedClass:"Module"});if(!a.match)return{compositeKind:"exists",entityType:n,term:s,scopeModule:o,scopeMiss:!0,matches:[]};i=a.match}if(s){let a=an(e,s,{expectedClass:n}),l=!i||a.match&&ro(e,a.match)===i.id,c=a.match&&l;return{compositeKind:"exists",entityType:n,term:s,scopeModule:o,scopeMatch:i,matches:c?[a.match]:[]}}let r=i?Ja(e,new Set([i.id]),n):e.individuals.filter(a=>a.class===n);return{compositeKind:"exists",entityType:n,term:null,scopeModule:o,scopeMatch:i,matches:r}}function e$(e,t,n){let s=ro(e,t);return n.kind==="dir"?n.mods.some(o=>o.id===t.id||o.id===s):s===n.id||Da(e,n.id).some(o=>o.id===t.id)}function t$(e,t,n){let{term:s,qualifier:o,negated:i,scope:r}=t,a=Ln(e,s,n.contextId);if(a.unresolvedPronoun)return{compositeKind:"qualCheck",qualCheckMiss:"pronoun",term:s,matches:[]};if(!a.match)return{compositeKind:"qualCheck",qualCheckMiss:"unresolved",term:s,matches:[]};if(r){let u=Ka(e,r,n.contextId);if(u.kind==="miss")return{compositeKind:"qualCheck",qualCheckMiss:"scope",term:s,scope:r,matches:[]};if(!e$(e,a.match,u))return{compositeKind:"qualCheck",qualCheckMiss:"outsideScope",term:s,scope:r,subjectLabel:a.match.label,scopeLabel:u.kind==="dir"?r:u.label,matches:[]}}let l=Rs(e,a.match,Ve[o]),c=i?!l:l;return{compositeKind:"qualCheck",subject:a.match,qualifier:o,negated:i,holds:c,matches:[a.match]}}function n$(e,t,n){let s=an(e,t.object);if(!s||!s.match)return{compositeKind:"universal",universalMiss:"unresolved",object:t.object,matches:[]};let o=Zt(e,{node:"allOfClass",entityType:t.entityType},n),i=Mp(e,t.complement,n),r=i.length===0;return{compositeKind:"universal",entityType:t.entityType,kind:t.kind,object:s.match.label,holds:r,total:o.length,counter:i,matches:r?o:i}}function s$(e,t,n){if(t.node==="reverseSet"&&t.kind==="touches"&&t.entityType==="Commit")return new Set(Zt(e,t.inner,n).map(s=>s.id));if(t.node==="clause"&&t.clause?.shape==="reverse"&&t.clause.kind==="touches"&&t.clause.entityType==="Commit"){let{objMatch:s,ambiguous:o}=Ht(e,t.clause,n);return s&&!o?new Set([s.id]):null}return null}function o$(e,t,n={}){if(t.node==="miss")return{compositeMiss:!0,reason:t.reason||null,matches:[]};if(t.node==="exists")return Zv(e,t);if(t.node==="qualCheck")return t$(e,t,n);if(t.node==="universal")return n$(e,t,n);if(t.node==="count"){let s=s$(e,t.base,n);return s?{compositeKind:"count",count:Bv(e,s),entityType:t.entityType,matches:[]}:{compositeKind:"count",count:Zt(e,t.base,n).length,entityType:t.entityType,matches:[]}}if(t.node==="list")return{compositeKind:"list",matches:Zt(e,t.base,n),entityType:t.entityType,scoped:t.scoped};if(t.node==="superlative")return Qv(e,t);if(t.node==="temporal")return Jv(e,t,n);if(t.node==="recentCommits")return Kv(e);if(t.node==="commitFilter")return Xv(e,t);if(t.node==="anaphora")return Pp(e,t,n);if(t.node==="membership"||t.node==="qualifier"&&t.inner.node==="membership")return Dp(e,t,n);if(t.node==="find"){let{narrow:s,broad:o}=Np(e,t.entityType,t.term);return{compositeKind:"find",entityType:t.entityType,term:t.term,matches:s.length?s:o,broad:!s.length&&o.length>0}}return(t.node==="reverseSet"||t.node==="forwardSet")&&t.inner.node==="prevSet"&&!(Array.isArray(n.prev)&&n.prev.length)?{compositeMiss:!0,reason:"no-prev",matches:[]}:{compositeKind:"set",matches:Zt(e,t,n),entityType:t.entityType||null}}function zp(){return'compositional queries also work: "which functions call X and call Y", "what calls something that imports X", "public methods of X", "list functions" / "show me the classes", "how many classes", "which module has the most imports", "find me the payment class", or (after a listing) "which of those are tested"'}function r$(e){let t=["Function","Method"].includes(e.class)?`${e.label}()`:e.label;if(e.class==="Module")return t;let n=Zo(e);return n&&n!=="(unknown module)"?`${t} in ${n}`:t}function i$(e,t,n){if(t.compositeMiss)return t.reason==="no-prev"?{content:'"those"/"them" needs a previous answer to refer to \u2014 ask a listing question first, then follow up.',miss:!0,ambiguous:!1}:{content:`couldn't compile this compositional question${t.reason?` (${t.reason})`:""}. ${zp()}.`,miss:!0,ambiguous:!1};if(t.compositeKind==="exists"){if(t.scopeMiss)return{content:`no module matching "${t.scopeModule}" found in the index.`,miss:!0,ambiguous:!1};let s=Fe(t.entityType,1),o=Fe(t.entityType,2),i=t.scopeMatch?` in ${t.scopeMatch.label}`:"";if(t.term){if(!t.matches.length)return{content:`No \u2014 no ${s} named "${t.term}" found${i}.`,miss:!0,ambiguous:!1};let r=t.matches[0],a=Zo(r),l=r.class==="Module"?"":a&&a!=="(unknown module)"?`, ${Hr("defined-in",r.id,"defined in")} ${a}`:"";return{content:`Yes \u2014 ${r.label} is a ${s}${l}.`,miss:!1,ambiguous:!1,matches:t.matches}}return t.matches.length?{content:`Yes \u2014 ${Qn(t.matches)}${i}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`No \u2014 no ${o} found${i}.`,miss:!0,ambiguous:!1}}if(t.compositeKind==="qualCheck"){if(t.qualCheckMiss==="pronoun")return{content:`"${t.term}" needs a selected node to refer to \u2014 click a node first, or name it directly.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="unresolved")return{content:`couldn't find "${t.term}" in the index to check.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="scope")return{content:`couldn't find "${t.scope}" in the index to check inside.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="outsideScope")return{content:`No \u2014 ${t.subjectLabel} isn't in ${t.scopeLabel}.`,miss:!0,ambiguous:!1};let s=t.subject.label,o=t.negated?`not ${t.qualifier}`:t.qualifier,i=t.negated?t.qualifier:`not ${t.qualifier}`;return{content:`${t.holds?"Yes":"No"} \u2014 ${s} is ${t.holds?o:i}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="universal"){if(t.universalMiss==="unresolved")return{content:`couldn't find "${t.object}" in the index to check.`,miss:!0,ambiguous:!1,matches:[]};let s=Fe(t.entityType,t.total),o=nv(t.kind);return t.holds?{content:`Yes \u2014 all ${t.total} ${s} ${o} ${t.object}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`No \u2014 ${t.counter.length} of ${t.total} ${s} do not ${o} ${t.object}: ${Qn(t.counter)}.`,miss:!1,ambiguous:!1,matches:t.counter}}if(t.compositeKind==="count"){let s=t.entityType?Fe(t.entityType,t.count):t.count===1?"result":"results";return{content:`${t.count} ${s}.`,miss:!1,ambiguous:!1,matches:[]}}if(t.compositeKind==="list"){if(!t.matches.length)return{content:`no ${Fe(t.entityType,2)} in this index.`,miss:!0,ambiguous:!1,matches:[]};let s=!["Module","Commit","Fact","Utterance","Session","Source","Rule"].includes(t.entityType),o=!t.scoped&&s&&t.matches.length>Ue?` \u2014 narrow with "${Fe(t.entityType,2)} in <module>"`:"";return{content:`${Qn(t.matches)}${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="membership"){if(!t.matches.length)return{content:`nothing in the index matches that${t.entityType?` (${Fe(t.entityType,2)})`:""}. ${es(n)}`,miss:!0,ambiguous:!1,matches:[]};if(t.inheritedNotOwn){let s=Fe(t.entityType,2);return{content:`${t.ownerLabel?`${t.ownerLabel} has no own ${s}`:`no own ${s}`} \u2014 inherited from ${t.viaLabel}: ${Qn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches,inheritedNotOwn:!0}}return{content:`${Qn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="find"){let s=Fe(t.entityType,1);if(!t.matches.length)return{content:`no ${Fe(t.entityType,2)} found matching "${t.term}".`,miss:!0,ambiguous:!1,matches:[]};let o=t.matches.length===1?r$(t.matches[0]):Qn(t.matches);return t.broad?{content:`no exact ${s} named "${t.term}", but found a related ${t.matches.length===1?s:Fe(t.entityType,2)}: ${o}.`,miss:!1,ambiguous:!1,matches:t.matches,relatedNotExact:!0}:{content:`${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="recentCommits"){if(!t.matches.length)return{content:"no commits recorded in this index.",miss:!0,ambiguous:!1,matches:[]};let s=r=>String((r.attributes||[]).find(a=>a.key==="date")?.value||""),o=t.matches.slice(0,Mt).map(r=>{let a=s(r).slice(0,10),l=(r.attributes||[]).find(c=>c.key==="message")?.value||"";return`${r.label}${a?` (${a})`:""}${l?` \u2014 ${l}`:""}`}),i=t.matches.length>Mt?` \u2026+${t.matches.length-Mt} more`:"";return{content:`${t.matches.length} recent commit(s): ${o.join(", ")}${i}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="commitFilter"){if(!t.pivotResolved)return{content:`"${t.pivotRaw}" isn't a recognized date (yyyy-mm-dd) or a known commit \u2014 try "what changed since 2026-06-01" or "what changed before <commit>".`,miss:!0,ambiguous:!1,matches:[]};if(!t.matches.length)return{content:`no commits recorded ${t.op} ${t.pivotRaw}.`,miss:!0,ambiguous:!1,matches:[]};let s=r=>String((r.attributes||[]).find(a=>a.key==="date")?.value||""),o=t.matches.slice(0,Mt).map(r=>{let a=s(r).slice(0,10),l=(r.attributes||[]).find(c=>c.key==="message")?.value||"";return`${r.label}${a?` (${a})`:""}${l?` \u2014 ${l}`:""}`}),i=t.matches.length>Mt?` \u2026+${t.matches.length-Mt} more`:"";return{content:`${t.matches.length} commit(s) changed ${t.op} ${t.pivotRaw}: ${o.join(", ")}${i}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="superlative"){if(!t.matches.length)return{content:`no ${Fe(t.entityType,2)} to rank in this index.`,miss:!0,ambiguous:!1};let s=t.extreme==="most"?"the most":"the fewest",o=t.matches.length>1?` (${t.matches.length}-way tie)`:"";return{content:`${Qn(t.matches)} \u2014 ${s} ${t.metricNoun} (${t.score})${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="temporal"){let s=t.innerCount||0,o=t.entityType?Fe(t.entityType,s||2):s===1?"entity":"entities",i=s===1?"was":"were";if(!s)return{content:`nothing in the index matches the inner set, so there is no change history to date. ${es(n)}`,miss:!0,ambiguous:!1,matches:[]};if(!t.matches.length)return{content:`no recorded commit touched the ${s} ${o} in that set in this index. ${es(n)}`,miss:!0,ambiguous:!1,matches:[]};let r=t.matches[0],a=(r.attributes||[]).find(d=>d.key==="date")?.value||"";if(!a)return{content:`the ${o} in that set ${i} last touched by commit ${r.label}, but this index records no commit dates \u2014 regenerate the graph to attach mgx:commitDate.`,miss:!0,ambiguous:!1,matches:t.matches};let l=(r.attributes||[]).find(d=>d.key==="message")?.value||"",c=String(a).slice(0,10),u=t.matches.length-1;return{content:`the ${o} in that set ${i} last touched by commit ${r.label} on ${c}${l?` ("${l}")`:""}${u?`; ${u} earlier commit${u===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}return t.matches.length?{content:`${Qn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`nothing in the index matches that${t.entityType?` (${Fe(t.entityType,2)})`:""}. ${es(n)}`,miss:!0,ambiguous:!1,matches:[]}}function Xa(){return`"which <functions|classes|modules> <imports|calls|uses|inherits from|tests> <name>" or "what does <name> <import|call|export>" or "what uses <name>" or "where is <name> defined" / "where is <name> mentioned" or "when did <name> change" or "which commits touched <name>" or "which changes touch commit <sha>"/"what did commit <sha> touch" (a commit's own changes) or plainly "what calls this" (about a selected node) or "what does <term> mean"/"what is a <ClassName>" (about the graph's own vocabulary). `+zp()}function es(e=null){return e&&ba(e)===0?"This store holds no code index, so it records no modules or commits to look through.":`Try "who touched <a module that actually has commits>" or "/describe <module>" to see what's in the index.`}function As(e){return new Set(String(e).toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function Qr(e){if(e.length<5)return e;let t=e.replace(/(ing|ers|ors|er|or)$/,"");return t===e?e:t.length>=3&&t[t.length-1]===t[t.length-2]?t.slice(0,-1):t}function Bp(e){return String(e||"").replace(/\.[a-z0-9]+$/i,"").toLowerCase().replace(/[/\-_.]+/g,"")}function a$(e){return String(e||"").trim().replace(/^(?:the|a|an)\s+/i,"").toLowerCase().replace(/[\s\-_]+/g,"")}function Yo(e,t,{expectedClass:n=null}={}){let s=String(t||"").trim();if(!s)return{match:null,candidates:[],tier:null,ambiguous:!1};let o=s.toLowerCase(),i=n?e.individuals.filter(h=>h.class===n):e.individuals,r=o.match(/^(commit[:\s])?([0-9a-f]{7,40})$/);if(r){let h=r[2],b=i.filter(w=>w.class==="Commit"&&(String(w.id).toLowerCase().startsWith(`commit:${h}`)||String(w.label).toLowerCase().startsWith(h)));if(b.length===1)return{match:b[0],candidates:[],tier:1,ambiguous:!1};if(b.length>1)return{match:b[0],candidates:b.slice(1,5),tier:1,ambiguous:!0};if(r[1])return{match:null,candidates:[],tier:null,ambiguous:!1}}let a=i.find(h=>String(h.label).toLowerCase()===o||String(h.id).toLowerCase()===o);if(a)return{match:a,candidates:[],tier:1,ambiguous:!1};let l=`ext:${o}`,c=null;e:for(let h of e.relations)for(let b of h.edges)if(String(b.object).toLowerCase()===l){c=b.object;break e}if(c&&!n)return{match:{id:c,label:s,class:null},candidates:[],tier:2,ambiguous:!1};let u=s.split(/\s+and\s+/i).map(h=>h.trim()).filter(Boolean);if(u.length>1){let h=new Set;for(let b of u){let w=Yo(e,b,{expectedClass:n});w.match&&!w.ambiguous&&h.add(w.match.id)}if(h.size>1)return{match:null,candidates:[],tier:null,ambiguous:!1}}let d=[],m=!o.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(o);if(m){let h=o.split(".").pop();for(let b of i){let w=String(b.label||"").toLowerCase();b.class==="Module"?w.split("/").pop()===o&&d.push({ind:b,score:1e3-Math.abs(w.length-o.length)}):w.includes(o)?d.push({ind:b,score:2e3-Math.abs(w.length-o.length)}):w.endsWith(`.${h}`)&&d.push({ind:b,score:1500-Math.abs(w.length-o.length)})}}else{let h=[...As(s)],b=o.split(/\s+/).find(y=>y.includes("/")),w=b?b.split("/").pop().replace(/\.[a-z0-9]+$/,""):null,$=s.trim().replace(/^(?:the|a|an)\s+/i,"").trim().split(/\s+/).filter(Boolean).length>=2,k=$?a$(s):null;for(let y of i){let j=String(y.label||"").toLowerCase(),E=j.split("/").pop().replace(/\.[a-z0-9]+$/,"");if(E===o){d.push({ind:y,score:5e3});continue}if(o.length>=4&&(E.startsWith(o)||E.endsWith(o))){d.push({ind:y,score:4e3-Math.abs(E.length-o.length)});continue}if($){let S=Bp(y.label);if(S&&S===k){d.push({ind:y,score:5e3});continue}let A=/[/_-]/.test(y.label)||/\.[a-z0-9]+$/i.test(String(y.label||""));if(S&&A&&k.length>=4&&S.includes(k)){d.push({ind:y,score:2e3-Math.abs(S.length-k.length)});continue}}if(y.class==="Module"){let S=Qr(o);if(S!==o&&S===Qr(E)){let A=Jn(o);if(On(E,o,A)>A){d.push({ind:y,score:3e3-Math.abs(E.length-o.length)});continue}}}if(o.length>=4&&j.includes(o)){d.push({ind:y,score:1e3-Math.abs(j.length-o.length)});continue}let _=As(y.label),R=h.filter(S=>_.has(S)).length;R>0&&(!w||_.has(w))&&d.push({ind:y,score:R/h.length*Oa})}}if(d.sort((h,b)=>b.score-h.score),d.length){let[h,...b]=d,w=b.filter($=>$.score===h.score),v=h.score>=Oa?b.filter($=>$.score>=Oa):b;return{match:h.ind,candidates:v.slice(0,4).map($=>$.ind),tier:3,ambiguous:w.length>0}}let p=m||o.includes("/"),f=null,g=!p&&typeof vs=="function"?vs(e.proseIndex,s).filter(h=>!n||e.byId.get(h.id)?.class===n):[];if(g.length){let[h,...b]=g,w=e.byId.get(h.id);if(w){let v=b.filter($=>$.score===h.score);if(f={match:w,candidates:b.slice(0,4).map($=>e.byId.get($.id)).filter(Boolean),tier:4,ambiguous:v.length>0,matchedVia:"prose"},!f.ambiguous&&h.via!=="spell")return f}}if(!r&&o.length>=4){let h=Jn(o),b=h+1,w=[];for(let v of i){let $=On(String(v.label||"").toLowerCase(),o,h);if($>0)for(let k of As(v.label)){if($<=0)break;$=Math.min($,On(k,o,h))}$<b?(b=$,w=[v]):$===b&&$<=h&&w.push(v)}if(b<=h&&w.length===1)return{match:w[0],candidates:[],tier:5,ambiguous:!1,matchedVia:"fuzzy"};if(b<=h&&w.length>1&&!f){let[v,...$]=w;return{match:v,candidates:$.slice(0,4),tier:5,ambiguous:!0,matchedVia:"fuzzy"}}}return f||{match:null,candidates:[],tier:null,ambiguous:!1}}function La(e,t){let n=Bp(t),s=[...As(t)],o=[];for(let i of As(e))n.includes(i)||s.some(r=>Qr(r)===Qr(i))||Jr.has(i)||qp.has(i)||o.push(i);return o}function Kr(e,t){if(!e?.match||e.tier!==3||e.matchedVia)return e;if(e.ambiguous){let s=[e.match,...e.candidates||[]],o=s.map(i=>new Set(La(t,i.label))).reduce((i,r)=>i.filter(a=>r.has(a)),La(t,s[0].label));return o.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:o,nearestLabel:hn(s.slice(0,4).map(i=>i.label))}:e}let n=La(t,e.match.label);return n.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:n,nearestLabel:e.match.label}:e}function an(e,t,n={}){let{expectedClass:s=null}=n;if(!s){let o=String(t||"").trim(),i=o.replace(c$,"").trim(),r=i.match(l$);if(r){let a=i.slice(0,r.index).trim(),l=Be[r[1].toLowerCase()];if(a&&l){let c=Kr(Yo(e,a,{expectedClass:l}),a);if(c?.match?.id&&!c.ambiguous)return c}}if(i&&i!==o){let a=Kr(Yo(e,i,n),i);if(a?.match?.id&&!a.ambiguous)return a}return Kr(Yo(e,t,n),t)}return Kr(Yo(e,t,n),t)}function Ln(e,t,n){if(gs.includes(String(t||"").trim().toLowerCase())){if(!n)return{match:null,candidates:[],tier:null,ambiguous:!1,unresolvedPronoun:!0};let s=e.byId.get(n);return s?{match:s,candidates:[],tier:1,ambiguous:!1}:{match:null,candidates:[],tier:null,ambiguous:!1,unresolvedPronoun:!0}}return an(e,t)}function Ja(e,t,n){let s=[];for(let o of We(e,"defines")){if(!t.has(o.subject))continue;let i=e.byId.get(o.object);i&&i.class===n&&s.push(i)}return s}function u$(e,t,n,s={}){let o=!n||n==="Change"||n==="Commit",i=o||n==="Module",r=o||ts.has(n),a=[...i?["touches"]:[],...r?["touchesSymbol"]:[]],l=a.flatMap(c=>We(e,c)).filter(c=>c.subject===t.id).map(c=>e.byId.get(c.object)).filter(Boolean);return n&&ts.has(n)&&(l=l.filter(c=>c.class===n)),{matches:l,objMatch:t,commitSubject:!0,ambiguous:!1,candidates:[],traversal:`${a.join("+")} edges where subject = commit ${t.label}`,...s}}function m$(e,t){let n=new Set(String(t||"").toLowerCase().split(/[\s-]+/).filter(Boolean));return(e.individuals||[]).filter(s=>s.class==="Module"&&Qa.has(hp(s.label))).map(s=>({ind:s,named:n.has(hp(s.label))?1:0,depth:String(s.label).split("/").length,fixture:f$(s.label)?1:0})).sort((s,o)=>o.named-s.named||s.depth-o.depth||s.fixture-o.fixture||String(s.ind.label).localeCompare(String(o.ind.label))).map(s=>s.ind)}function h$(e,t,n){return e==="reverse"&&(t==="imports"||t==="calls")&&(!n||n==="Module")}function Ht(e,t,{contextId:n=null,prev:s=null,pinnedObjMatch:o=null}={}){if(!t)return{matches:[],objMatch:null,candidates:[],traversal:null,ambiguous:!1};if(t.node)return o$(e,t,{contextId:n,prev:s});if(t.ambiguousParse){let T=t.candidates.map(P=>{let G=Ht(e,P,{contextId:n,prev:s});return{parsed:P,result:G,rendered:gn(P,G,e)}});return{matches:[],objMatch:null,candidates:t.candidates,traversal:null,ambiguous:!0,branches:T}}let{shape:i,kind:r,entityType:a}=t;if(i==="meta"){let T=String(t.object||"").trim(),P=T.toLowerCase(),G=(e.individuals||[]).find(Z=>{if(Z.class!=="SchemaClass"&&Z.class!=="SchemaPredicate")return!1;if(String(Z.label).toLowerCase()===P)return!0;let V=(Z.attributes||[]).find(F=>F.key==="token")?.value;return V&&String(V).toLowerCase()===P});if(!G){let Z=Cp(e,T);return Z?{matches:[Z.hit],objMatch:Z.hit,candidates:[],ambiguous:!1,metaCodeClass:!0,metaFallbackText:Z.text,traversal:`schema lookup for "${T}" (miss), then unique code-entity individual by label`}:{matches:[],objMatch:null,candidates:[],traversal:`schema lookup for "${T}"`,ambiguous:!1}}return{matches:[G],objMatch:G,candidates:[],traversal:`schema lookup for "${T}"`,ambiguous:!1}}if(i==="mentions"){let T=String(t.object||"").trim();return{matches:(typeof vs=="function"?vs(e.proseIndex,T):[]).map(Z=>e.byId.get(Z.id)).filter(Boolean),objMatch:null,candidates:[],ambiguous:!1,mentionsShape:!0,traversal:`proseIndex word lookup for "${T}"`}}if(i==="where"&&d$.test(String(t.object||"").trim())){let T=m$(e,t.object);return{matches:T,objMatch:T[0]||null,candidates:T.slice(1,5),ambiguous:!1,entryPointShape:!0,traversal:`Module individuals with an entry-point basename (${[...Qa].join("/")}), ranked query-named basename first, then shallower path, then non-test path`}}if(t.modifier&&t.modifier!=="direct"&&!h$(i,r,a))return{matches:[],objMatch:null,candidates:[],ambiguous:!1,unsupportedModifier:!0,traversal:`modifier "${t.modifier}" requested for a "${r}" query \u2014 no closure traversal exists for this combination yet`};if(i==="ask"){let T=Ln(e,t.subject,n),P=Ln(e,t.object,n);if(!T.match||!P.match||T.ambiguous||P.ambiguous)return{matches:[],objMatch:P.match,candidates:P.candidates,traversal:null,ambiguous:!1,answer:null,unresolvedPronoun:!!(T.unresolvedPronoun||P.unresolvedPronoun)};let[G,Z]=[T.match,P.match];r==="touches"&&Z.class==="Commit"&&G.class!=="Commit"&&([G,Z]=[Z,G]);let V=oo[r],F=[...new Set(V?[...Rt(r),V]:Rt(r))],z=F.flatMap(B=>We(e,B)).filter(B=>B.subject===G.id&&B.object===Z.id);return{matches:z,answer:t.negated?z.length===0:z.length>0,objMatch:P.match,subjMatch:T.match,candidates:[],traversal:`${F.join("+")} edge from ${G.label} to ${Z.label}`,ambiguous:!1}}let l;if(o)l={match:o,candidates:[],ambiguous:!1,matchedVia:null};else{if(l=Ln(e,t.object,n),t.altObject&&t.altObject!==t.object){let T=Ln(e,t.altObject,n),P=!!l.match&&!l.ambiguous,G=!!T.match&&!T.ambiguous;!P&&G?l=T:P&&G&&l.match.id!==T.match.id&&(l={...l,ambiguous:!0,candidates:[T.match,...l.candidates||[]]})}if(t.kind==="tests"&&l.match&&!l.ambiguous&&!String(t.object||"").includes("/")){let T=Z=>Z.replace(/\.(?:test|spec|tests)(?=\.[^.]+$)/,""),P=T(String(t.object||"").trim().toLowerCase()),G=(e.individuals||[]).find(Z=>{if(Z.class!=="Module"||Z.id===l.match.id)return!1;let V=String(Z.label||"").toLowerCase().split("/").pop();return V!==T(V)&&T(V)===P});G&&(l={...l,ambiguous:!0,candidates:[G,...l.candidates||[]]})}}let{match:c,candidates:u,ambiguous:d,unresolvedPronoun:m,matchedVia:p,unplacedWords:f,nearestLabel:g}=l;if(!c)return{matches:[],objMatch:null,candidates:u,traversal:null,ambiguous:!1,unresolvedPronoun:m,unplacedWords:f,nearestLabel:g};if(d){let P=Nn([c,...u||[]]).slice(0,Ue).map(G=>{let Z=Ht(e,t,{contextId:n,prev:s,pinnedObjMatch:G});return{candidate:G,result:Z,rendered:gn(t,Z,e)}});return{matches:[],objMatch:c,candidates:u,traversal:null,ambiguous:!0,branches:P}}if(i==="where"){let T=(c.attributes||[]).find(P=>P.key==="site")?.value||null;return{matches:[c],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whereShape:!0,site:T,traversal:T?`site attribute of ${c.label}`:`class + defining module of ${c.label}`}}if(i==="when"){let T=G=>String((G.attributes||[]).find(Z=>Z.key==="date")?.value||""),P;if(c.class==="Commit")P=[c];else{let G=["touches","touchesSymbol"].flatMap(V=>We(e,V)).filter(V=>V.object===c.id),Z=new Set;P=[];for(let V of G){if(Z.has(V.subject))continue;Z.add(V.subject);let F=e.byId.get(V.subject);F&&F.class==="Commit"&&P.push(F)}P.sort((V,F)=>T(F).localeCompare(T(V)))}return{matches:P,objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whenShape:!0,traversal:`touches+touchesSymbol edges where object = ${c.label}, newest commit date first`}}if(i==="whoLast"){let T=V=>String((V.attributes||[]).find(F=>F.key==="date")?.value||""),P=["touches","touchesSymbol"].flatMap(V=>We(e,V)).filter(V=>V.object===c.id),G=new Set,Z=[];for(let V of P){if(G.has(V.subject))continue;G.add(V.subject);let F=e.byId.get(V.subject);F&&F.class==="Commit"&&Z.push(F)}return Z.sort((V,F)=>T(F).localeCompare(T(V))),{matches:Z,objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whoLastShape:!0,traversal:`touches+touchesSymbol edges where object = ${c.label}, newest commit's author`}}if(r==="touches"&&c.class==="Commit")return u$(e,c,a,{candidates:u,ambiguous:d,matchedVia:p});if(i==="forward"){let T=oo[r],G=!!(T&&c.class&&ts.has(c.class))?[...new Set([...Rt(r),T])]:Rt(r);if(a&&a!=="Change"){let W=Ep(e,G),C=Ia[a];if(W.size&&!W.has(a)&&!(C&&W.has(C)))return{matches:[],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,forwardGrainMiss:!0,wantClasses:[...W],traversal:`${G.join("+")} edges where subject = ${c.label} (grain mismatch: this "${r}" relation never targets a ${Zn(a)})`}}let V=G.flatMap(W=>We(e,W)).filter(W=>W.subject===c.id).map(W=>e.byId.get(W.object)).filter(Boolean),F=Nn(V),z=F,B="";if(a&&a!=="Change"){z=F.filter(C=>C.class===a);let W=Ia[a];if(!z.length&&W){let C=F.filter(I=>I.class===W);C.length&&(z=C,B=`, widened to ${W} subjects (no ${a} recorded)`)}}return{matches:z,objMatch:c,candidates:u,traversal:`${G.join("+")} edges where subject = ${c.label}${B}`,ambiguous:d,matchedVia:p}}if(t.modifier==="transitive")return{matches:eo(e,c,{maxDepth:gp}).flat().map(G=>e.byId.get(G.id)).filter(Boolean),objMatch:c,candidates:u,ambiguous:d,matchedVia:p,traversal:`reverse dependency closure over imports+calls edges from ${c.label} (impactClosure, maxDepth=${gp})`};let h=oo[r]||Rt(r).find(T=>yp.has(T))||null,b=!!(c.class&&ts.has(c.class));if(h&&(ts.has(a)||b)){let T=We(e,h).filter(B=>B.object===c.id),P=Nn(T.map(B=>e.byId.get(B.subject)).filter(Boolean)),G=!a||a==="Change"?P:P.filter(B=>B.class===a),Z="",V=Ia[a];if(!G.length&&V){let B=P.filter(W=>W.class===V);B.length&&(G=B,Z=`, widened to ${V} subjects (no ${a} recorded)`)}let F=(r==="touches"||r==="calls"||r==="uses")&&c.class==="Class"&&!We(e,"contains").some(B=>B.subject===c.id),z=F?e.byId.get(ro(e,c)||""):null;if(G.length||!(F&&z))return{matches:G,objMatch:c,candidates:u,traversal:`${h} edges where object = ${c.label}${Z}`,ambiguous:d,matchedVia:p}}let w=c,v=u,$=d,k=p,y="",j=jp(e,r);if(j&&w.class&&w.class!==j){let T=an(e,t.object,{expectedClass:j});if(T.match&&!T.ambiguous)w=T.match,v=T.candidates,$=T.ambiguous,k=T.matchedVia;else if(j==="Module"){let P=ro(e,w),G=P&&e.byId.get(P);if(G)y=`, refined from ${w.label} to its containing module`,w=G;else return{matches:[],objMatch:w,candidates:v,ambiguous:$,matchedVia:k,wrongGrainMiss:!0,wantClass:j,traversal:`"${t.object}" resolved to ${Zn(w.class)} ${w.label} (grain mismatch: this "${r}" question needs a ${Zn(j)}, and no containing module could be found to refine to)`}}else return{matches:[],objMatch:w,candidates:v,ambiguous:$,matchedVia:k,wrongGrainMiss:!0,wantClass:j,traversal:`"${t.object}" resolved to ${Zn(w.class)} ${w.label} (grain mismatch: this "${r}" question needs a ${Zn(j)})`}}let E=Rt(r).flatMap(T=>We(e,T)).filter(T=>T.object===w.id);r==="cochange"&&(E=E.concat(Rt(r).flatMap(T=>We(e,T)).filter(T=>T.subject===w.id).map(T=>({...T,subject:T.object,object:T.subject}))));let _="";if(!E.length&&w.class){let T=`ext:${String(w.label).toLowerCase()}`;E=Rt(r).flatMap(P=>We(e,P)).filter(P=>String(P.object).toLowerCase()===T),E.length&&(_=` (by name, via unresolved ${T} references)`)}let R=[],S=new Set;for(let T of E){let P=e.byId.get(T.subject);P&&!S.has(P.id)&&(S.add(P.id),R.push(P))}let A,M="";if(!a||a==="Change")A=R;else{let T=R.filter(P=>P.class===a);if(T.length)A=T;else if(a!=="Module"&&R.some(P=>P.class==="Module")){let P=new Set(R.filter(G=>G.class==="Module").map(G=>G.id));A=Ja(e,P,a),M=`, then ${Zn(a)} defined in the matched module(s)`}else A=[]}return{matches:A,objMatch:w,candidates:v,traversal:`${Rt(r).join("+")} edges where object = ${w.label}${_}${M}${y}`,ambiguous:$,matchedVia:k}}function Zo(e){if(e.class==="Module")return e.label;let t=(e.attributes||[]).find(s=>s.key==="site")?.value;if(t)return String(t).split(":")[0];let n=String(e.id||"").match(/^fn:(.+)#/);return n?n[1]:"(unknown module)"}function Na(e){let t=String(e.label||e.id||"");return["Function","Method"].includes(e.class)?`function ${t}()`:t}function g$(e){let t=String(e.label||e.id||""),n=(e.attributes||[]).find(s=>s.key==="author")?.value;return n?`${t} (${n})`:t}function hn(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`:e[0]}function Xo(e){let t=e.object??e.subject??"?";return`${e.entityType?Fe(e.entityType,2)+" that ":""}${e.kind} "${t}"`}function Ba(e){return Oo[e]?.bare||e}function b$(e){let t=Ba(e);return t.endsWith("e")?`${t}d`:`${t}ed`}function w$(e){if(!Array.isArray(e.atoms)||e.atoms.length!==2)return null;let[t,n]=e.atoms;if(t.op!=="seed"||t.ast?.node!=="allOfClass"||n.op!=="difference")return null;let s=Fe(e.entityType,2);if(n.kind==="qual")return`${s} that are not ${n.filters.join(" and not ")}`;if(n.kind!=="set"||!n.ast)return null;if(n.ast.node==="existsEdge")return`${s} that do not ${Ba(n.ast.kind)} anything`;let o=n.ast.node==="clause"?n.ast.clause:n.ast;if(!o||o.node||!o.kind)return null;let i=o.object??o.subject;return i==null?null:`${s} that do not ${Ba(o.kind)} ${JSON.stringify(String(i))}`}function Up(e){if(!e)return null;if(e.ambiguousParse)return{english:`ambiguous: ${e.candidates.map(Xo).join(" \u2014 or \u2014 ")}`,machine:`ambiguousParse(${e.candidates.map(i=>Up(i)?.machine).join(", ")})`};if(e.node)return{english:(e.node==="boolean"?w$(e):null)||`a compositional query (${e.node})`,machine:`composite(${e.node})`};let t=i=>JSON.stringify(String(i??"")),n=[];e.kind&&n.push(e.kind),e.negated&&n.push("negated"),e.entityType&&n.push(`entityType=${e.entityType}`),e.modifier&&e.modifier!=="direct"&&n.push(`modifier=${e.modifier}`),e.subject!=null&&n.push(`subject=${t(e.subject)}`),e.object!=null&&n.push(t(e.object));let s=`${e.shape}(${n.join(", ")})`,o;if(e.shape==="ask")o=`does "${e.subject}" ${e.negated?"not ":""}${_s(e.kind)} "${e.object}"?`;else if(e.shape==="meta")o=`what does "${e.object}" mean, in this graph's own vocabulary?`;else if(e.shape==="mentions")o=`where is "${e.object}" mentioned?`;else if(e.shape==="where")o=`where is "${e.object}" defined?`;else{let i=e.entityType?Fe(e.entityType,2)+" that ":"";o=e.shape==="forward"?`what "${e.object}" itself ${_s(e.kind)}`:`${i}${_s(e.kind)} "${e.object}"`}return{english:o,machine:s}}function gn(e,t,n=null){let s=Wp(e,t,n);return t&&t.matchedVia==="fuzzy"&&t.objMatch&&!s.ambiguous&&(s.content=`assuming you meant ${t.objMatch.label}: ${s.content}`),s}function Wp(e,t,n){if(!e)return{content:`couldn't parse this as a graph question. Try: ${Xa()}`,miss:!0,ambiguous:!1};if(e.node)return i$(e,t,n);if(e.ambiguousParse)return t.branches&&t.branches.length?{content:`this could mean more than one thing:
55
+ ${t.branches.map((l,c)=>`${c+1}) as ${Xo(l.parsed)}: ${l.rendered.content}`).join(`
56
56
  `)}
57
- (ask one of these directly, or try rephrasing more specifically, to get just that reading)`,miss:!1,ambiguous:!0,candidates:e.candidates.map(Vo),candidateParses:e.candidates}:{content:`this could mean more than one thing: ${e.candidates.map((a,l)=>`${l+1}) ${Vo(a)}`).join(" or ")} \u2014 try rephrasing more specifically.`,miss:!1,ambiguous:!0,candidates:e.candidates.map(Vo),candidateParses:e.candidates};if(t.unresolvedPronoun)return{content:`"${e.object??e.subject}" needs a selected node to refer to \u2014 click a node first, or name it directly.`,miss:!0,ambiguous:!1};if(t.unsupportedModifier)return{content:`the "${e.modifier}" modifier isn't supported for "${e.kind}" queries yet \u2014 only imports/calls (module-level) have a transitive closure today.`,miss:!0,ambiguous:!1};if(t.wrongGrainMiss){let i=t.objMatch.class?Fe(t.objMatch.class,1):"term",a=Fe(t.wantClass,1);return{content:`"${e.object}" resolved to the ${i} ${t.objMatch.label}, but this question needs a ${a} \u2014 no ${a} named "${e.object}" was found in the index.`,miss:!0,ambiguous:!1}}if(t.forwardGrainMiss){let i=t.wantClasses.map(a=>Fe(a,2));return{content:`${t.objMatch.label}'s "${js(e.kind)}" relation in this index never produces ${Fe(e.entityType,2)} \u2014 only ${hn(i)}.`,miss:!0,ambiguous:!1}}if(e.shape==="meta"){if(!t.objMatch)return{content:`"${e.object}" isn't a term in this graph's own vocabulary (no matching class or predicate).`,miss:!0,ambiguous:!1};if(t.metaCodeClass)return{content:t.metaFallbackText,miss:!1,ambiguous:!1,matches:t.matches};let i=(t.objMatch.attributes||[]).find(l=>l.key==="doc")?.value||"",a=t.objMatch.class==="SchemaClass"?"a class in the graph's schema":"a predicate (relation) in the graph's schema";return{content:`${t.objMatch.label} is ${a}: ${i}`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.mentionsShape){if(!t.matches.length)return{content:`"${e.object}" is not mentioned in any indexed identifier or doc-comment prose.`,miss:!0,ambiguous:!1};let i=t.matches.slice(0,Be).map(l=>`${l.label} (${Fe(l.class,1)})`),a=t.matches.length>Be?`, \u2026and ${t.matches.length-Be} more`:"";return{content:`"${e.object}" is mentioned in the prose tokens of ${hn(i)}${a}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.entryPointShape){if(!t.matches.length)return{content:`no entry-point module found in the index \u2014 no module basename matches ${hn([...Da])}.`,miss:!0,ambiguous:!1,candidates:[]};let[i,...a]=t.matches,l=a.slice(0,Be).map(d=>d.label),c=a.length>Be?`, \u2026and ${a.length-Be} more`:"",u=a.length?` \u2014 also matched: ${hn(l)}${c}`:"";return{content:`ranked ${t.matches.length} entry-point match${t.matches.length===1?"":"es"}; top: ${i.label}${u}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(!t.objMatch&&(!t.candidates||t.candidates.length===0)&&e.shape!=="ask"){let i=String(e.object||"").trim(),a=e.entityType&&cp[e.entityType]?Fe(e.entityType,1):"module",l=/^(?:commit[:\s])?[0-9a-f]{7,40}$/i.test(i)?"commit":!i.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(i)?"symbol":a;if(t.unplacedWords?.length){let c=hn(t.unplacedWords.map(m=>`"${m}"`)),u=t.unplacedWords.length===1?"names":"name",d=t.nearestLabel?` Did you mean ${t.nearestLabel}?`:"";return{content:`no ${l} matching "${e.object}" found in the index. ${c} ${u} nothing here, and reading past ${t.unplacedWords.length===1?"it":"them"} would answer a different question.${d}`,miss:!0,ambiguous:!1,candidates:[]}}return{content:`no ${l} matching "${e.object}" found in the index. ${Zn(n)}`,miss:!0,ambiguous:!1,candidates:[]}}if(t.ambiguous){let i=[t.objMatch,...t.candidates||[]].filter(Boolean),a=t.branches;if(e.kind&&e.kind!=="touches"&&!i.every(h=>h.class==="Commit")){let h=y=>!["Commit","Session","Source","Utterance"].includes(y?.class),b=i.filter(h);b.length&&(i=b,a?.length&&(a=a.filter(y=>h(y.candidate))))}if(n&&!/[/.]/.test(String(e.object||""))){let h=String(e.object||"").toLowerCase(),b=new Set(fn(String(e.object||"")).filter($=>$.length>=3)),y=new Set(i.map($=>$.id)),w=null,v=0,k=1/0;if(b.size)for(let $ of n.individuals){if(!["Function","Method","Class","GlobalVariable","Attribute"].includes($.class)||y.has($.id))continue;let T=fn(String($.label)).filter(j=>b.has(j)).length;if(!T||T<v)continue;let S=On(String($.label).toLowerCase(),h,8);(T>v||S<k)&&(w=$,v=T,k=S)}if(w&&(i=[...i,w],a)){let $=Gt(n,e,{pinnedObjMatch:w});a=[...a,{candidate:w,result:$,rendered:gn(e,$,n)}]}}let l=i.length&&i.every(h=>h.class==="Commit")?"commit":"module",c=i.slice(0,Be).map(h=>h.label),u=i.length>Be?`, \u2026and ${i.length-Be} more`:"",d=`"${e.object}" matches more than one ${l} ambiguously \u2014 did you mean ${hn(c)}${u}? Try one of those. If you're not sure, narrow it to one name.`,m=String(e.object||""),p=m?new RegExp(`\\b${Ve(m)}\\b`,"gi"):null,f=h=>p?h.rendered.content.replace(p,h.candidate.label):h.rendered.content;return{content:a&&a.length?`${d}
57
+ (ask one of these directly, or try rephrasing more specifically, to get just that reading)`,miss:!1,ambiguous:!0,candidates:e.candidates.map(Xo),candidateParses:e.candidates}:{content:`this could mean more than one thing: ${e.candidates.map((a,l)=>`${l+1}) ${Xo(a)}`).join(" or ")} \u2014 try rephrasing more specifically.`,miss:!1,ambiguous:!0,candidates:e.candidates.map(Xo),candidateParses:e.candidates};if(t.unresolvedPronoun)return{content:`"${e.object??e.subject}" needs a selected node to refer to \u2014 click a node first, or name it directly.`,miss:!0,ambiguous:!1};if(t.unsupportedModifier)return{content:`the "${e.modifier}" modifier isn't supported for "${e.kind}" queries yet \u2014 only imports/calls (module-level) have a transitive closure today.`,miss:!0,ambiguous:!1};if(t.wrongGrainMiss){let r=t.objMatch.class?Fe(t.objMatch.class,1):"term",a=Fe(t.wantClass,1);return{content:`"${e.object}" resolved to the ${r} ${t.objMatch.label}, but this question needs a ${a} \u2014 no ${a} named "${e.object}" was found in the index.`,miss:!0,ambiguous:!1}}if(t.forwardGrainMiss){let r=t.wantClasses.map(a=>Fe(a,2));return{content:`${t.objMatch.label}'s "${_s(e.kind)}" relation in this index never produces ${Fe(e.entityType,2)} \u2014 only ${hn(r)}.`,miss:!0,ambiguous:!1}}if(e.shape==="meta"){if(!t.objMatch)return{content:`"${e.object}" isn't a term in this graph's own vocabulary (no matching class or predicate).`,miss:!0,ambiguous:!1};if(t.metaCodeClass)return{content:t.metaFallbackText,miss:!1,ambiguous:!1,matches:t.matches};let r=(t.objMatch.attributes||[]).find(l=>l.key==="doc")?.value||"",a=t.objMatch.class==="SchemaClass"?"a class in the graph's schema":"a predicate (relation) in the graph's schema";return{content:`${t.objMatch.label} is ${a}: ${r}`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.mentionsShape){if(!t.matches.length)return{content:`"${e.object}" is not mentioned in any indexed identifier or doc-comment prose.`,miss:!0,ambiguous:!1};let r=t.matches.slice(0,Ue).map(l=>`${l.label} (${Fe(l.class,1)})`),a=t.matches.length>Ue?`, \u2026and ${t.matches.length-Ue} more`:"";return{content:`"${e.object}" is mentioned in the prose tokens of ${hn(r)}${a}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.entryPointShape){if(!t.matches.length)return{content:`no entry-point module found in the index \u2014 no module basename matches ${hn([...Qa])}.`,miss:!0,ambiguous:!1,candidates:[]};let[r,...a]=t.matches,l=a.slice(0,Ue).map(d=>d.label),c=a.length>Ue?`, \u2026and ${a.length-Ue} more`:"",u=a.length?` \u2014 also matched: ${hn(l)}${c}`:"";return{content:`ranked ${t.matches.length} entry-point match${t.matches.length===1?"":"es"}; top: ${r.label}${u}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(!t.objMatch&&(!t.candidates||t.candidates.length===0)&&e.shape!=="ask"){let r=String(e.object||"").trim(),a=e.entityType&&vp[e.entityType]?Fe(e.entityType,1):"module",l=/^(?:commit[:\s])?[0-9a-f]{7,40}$/i.test(r)?"commit":!r.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(r)?"symbol":a;if(t.unplacedWords?.length){let c=hn(t.unplacedWords.map(m=>`"${m}"`)),u=t.unplacedWords.length===1?"names":"name",d=t.nearestLabel?` Did you mean ${t.nearestLabel}?`:"";return{content:`no ${l} matching "${e.object}" found in the index. ${c} ${u} nothing here, and reading past ${t.unplacedWords.length===1?"it":"them"} would answer a different question.${d}`,miss:!0,ambiguous:!1,candidates:[]}}return{content:`no ${l} matching "${e.object}" found in the index. ${es(n)}`,miss:!0,ambiguous:!1,candidates:[]}}if(t.ambiguous){let r=[t.objMatch,...t.candidates||[]].filter(Boolean),a=t.branches;if(e.kind&&e.kind!=="touches"&&!r.every(h=>h.class==="Commit")){let h=w=>!["Commit","Session","Source","Utterance"].includes(w?.class),b=r.filter(h);b.length&&(r=b,a?.length&&(a=a.filter(w=>h(w.candidate))))}if(n&&!/[/.]/.test(String(e.object||""))){let h=String(e.object||"").toLowerCase(),b=new Set(fn(String(e.object||"")).filter(y=>y.length>=3)),w=new Set(r.map(y=>y.id)),v=null,$=0,k=1/0;if(b.size)for(let y of n.individuals){if(!["Function","Method","Class","GlobalVariable","Attribute"].includes(y.class)||w.has(y.id))continue;let j=fn(String(y.label)).filter(_=>b.has(_)).length;if(!j||j<$)continue;let E=On(String(y.label).toLowerCase(),h,8);(j>$||E<k)&&(v=y,$=j,k=E)}if(v&&(r=[...r,v],a)){let y=Ht(n,e,{pinnedObjMatch:v});a=[...a,{candidate:v,result:y,rendered:gn(e,y,n)}]}}let l=r.length&&r.every(h=>h.class==="Commit")?"commit":"module",c=r.slice(0,Ue).map(h=>h.label),u=r.length>Ue?`, \u2026and ${r.length-Ue} more`:"",d=`"${e.object}" matches more than one ${l} ambiguously \u2014 did you mean ${hn(c)}${u}? Try one of those. If you're not sure, narrow it to one name.`,m=String(e.object||""),p=m?new RegExp(`\\b${He(m)}\\b`,"gi"):null,f=h=>p?h.rendered.content.replace(p,h.candidate.label):h.rendered.content;return{content:a&&a.length?`${d}
58
58
  ${a.map((h,b)=>`${b+1}) ${h.candidate.label}: ${f(h)}`).join(`
59
- `)}`:d,miss:!1,ambiguous:!0,candidates:i.map(h=>h.label)}}if(t.whereShape){let i=t.objMatch;if(i.class==="Module")return{content:`${i.label} is a module \u2014 the label is its repo path.`,miss:!1,ambiguous:!1,matches:t.matches};if(i.class==="Commit")return{content:`${i.label} is a commit, not a code location \u2014 try "what did commit ${i.label} touch".`,miss:!0,ambiguous:!1};let a=String(t.site||"").match(/^(.*):(\d+)(?:-(\d+))?$/);if(a){let l=a[3]&&a[3]!==a[2]?`lines ${a[2]}-${a[3]}`:`line ${a[2]}`;return{content:`${xa(i)} is defined in ${a[1]} at ${l}.`,miss:!1,ambiguous:!1,matches:t.matches}}return{content:`${xa(i)} is defined in ${Yo(i)} (no line span recorded in this index).`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.whenShape){let i=t.objMatch.label;if(!t.matches.length)return{content:`no recorded commit touches ${i} in this index. ${Zn(n)}`,miss:!0,ambiguous:!1};let a=t.matches[0],l=(a.attributes||[]).find(m=>m.key==="date")?.value||"";if(!l)return{content:`commit ${a.label} touched ${i}, but this index records no commit dates \u2014 regenerate the graph to attach mgx:commitDate.`,miss:!0,ambiguous:!1};let c=(a.attributes||[]).find(m=>m.key==="message")?.value||"",u=String(l).slice(0,10);if(a.id===t.objMatch.id)return{content:`commit ${a.label} ${Ur("is-dated",a.id,"is dated")} ${u}${c?` ("${c}")`:""}.`,miss:!1,ambiguous:!1,matches:t.matches};let d=t.matches.length-1;return{content:`${i} was last touched by commit ${a.label} on ${u}${c?` ("${c}")`:""}${d?`; ${d} earlier commit${d===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.whoLastShape){let i=t.objMatch.label;if(!t.matches.length)return{content:`no recorded commit touches ${i} in this index. ${Zn(n)}`,miss:!0,ambiguous:!1};let a=t.matches[0],l=(a.attributes||[]).find(u=>u.key==="author")?.value;if(!l)return{content:`commit ${a.label} last touched ${i}, but this index records no commit author \u2014 regenerate the graph to attach mgx:commitAuthor.`,miss:!0,ambiguous:!1};let c=t.matches.length-1;return{content:`${i} was last touched by ${l} (commit ${a.label})${c?`; ${c} earlier commit${c===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.commitSubject){let i=`commit ${t.objMatch.label}`;if(!t.matches.length)return{content:`${i} touched nothing recorded in the index.`,miss:!0,ambiguous:!1};let a=new Map;for(let u of t.matches.slice(0,Be)){let d=u.class||"Module";a.has(d)||a.set(d,[]),a.get(d).push(["Function","Method"].includes(d)?`${u.label}()`:u.label)}let l=[...a.entries()].map(([u,d])=>`${Fe(u,d.length)} ${hn(d)}`),c=t.matches.length>Be?`; \u2026and ${t.matches.length-Be} more`:"";return{content:`${i} touched ${l.join("; ")}${c}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(e.shape==="ask"){if(!t.objMatch||!t.subjMatch)return{content:"couldn't resolve one of the terms in this question.",miss:!0,ambiguous:!1};let i=`${t.traversal}.`,a=`no ${e.kind} edge found from ${t.subjMatch.label} to ${t.objMatch.label}.`,l=e.negated?a:i,c=e.negated?i:a;return{content:`${t.answer?"Yes":"No"} \u2014 ${t.answer?l:c}`,miss:!t.matches.length,ambiguous:!1}}if(!t.matches.length){if(e.shape==="forward"){if(Vs.includes(e.kind)&&n&&t.objMatch)for(let l of Vs){if(l===e.kind)continue;let c={...e,kind:l},u=Gt(n,c,{pinnedObjMatch:t.objMatch});if(u?.matches?.length&&!u.ambiguous)return Cp(c,u,n)}return{content:`${t.objMatch.label} has no ${js(e.kind)} edges in the index.`,miss:!0,ambiguous:!1}}if(e.kind==="tests"&&!e.entityType)return{content:`No tests cover ${String(e.object||"").replace(Oy,"").trim()||String(e.object||"").trim()}.`,miss:!0,ambiguous:!1};let i=Fe(e.entityType||"Module",2),a=t.objMatch&&gs.includes(String(e.object||"").toLowerCase())?t.objMatch.label:e.object;return{content:`No ${i} found whose module directly ${js(e.kind)} ${a}. ${Zn(n)}`,miss:!0,ambiguous:!1}}if(e.polar&&t.matches.length===1)return{content:`Yes \u2014 ${t.objMatch?.label||e.object} is ${Hv(e.kind)} by ${t.matches[0].label}.`,miss:!1,ambiguous:!1,matches:t.matches};if(e.shape==="forward"||e.entityType==="Module"||t.matches.every(i=>!es.has(i.class))){let i=t.matches.slice(0,Be).map(l=>l.class==="Commit"?Vv(l):l.label),a=t.matches.length>Be?`, \u2026and ${t.matches.length-Be} more`:"";return{content:i.join(" and ")+a+".",miss:!1,ambiguous:!1,matches:t.matches}}let s=new Map;for(let i of t.matches.slice(0,Be)){let a=Yo(i);s.has(a)||s.set(a,[]),s.get(a).push(xa(i))}let o=[...s.entries()].map(([i,a],l)=>{let c=hn(a);return l===0?`in ${i} there is ${c}`:`there is ${c} in ${i}`}),r=t.matches.length>Be?` \u2026and ${t.matches.length-Be} more`:"";return{content:o.join(" and ")+r+".",miss:!1,ambiguous:!1,matches:t.matches}}function Op(e){if(e.length<4||Jv.has(e))return null;let t=Xn(e),n=t+1,s=null,o=!1;for(let r of Xv){let i=On(e,r,Math.min(n,t));i<n?(n=i,s=r,o=!1):i===n&&i<=t&&r!==s&&(o=!0)}return n<=t&&!o?s:null}function rp(e,t){if(!e?.match||e.matchedVia!=="fuzzy"||e.ambiguous)return!1;let n=e.match.class;if(n!=="SchemaClass"&&n!=="SchemaPredicate")return!1;let s=String(t||"").trim().toLowerCase(),o=Op(s);return!!o&&o!==s&&!!Ue[o]}function Lp(e,t,n){if(!t)return!1;if(t.ambiguousParse)return"ambiguous";if(t.node)return t.node!=="miss";if(t.shape==="meta"||t.shape==="mentions")return!0;let s=Ln(e,t.object,n);if(s.unresolvedPronoun)return"pronoun";if(!s.match||rp(s,t.object))return!1;if(t.shape==="ask"){let o=Ln(e,t.subject,n);return o.unresolvedPronoun?"pronoun":!!(o.match&&!rp(o,t.subject))}return!0}function Qv(e){let t=String(e||"").trim().toLowerCase().replace(/[?.!\s]+$/,"");return nu.includes(t)}function Zv(e,t,{nlp:n=void 0,contextId:s=null,prev:o=null}={}){let r=zo(Ss(String(t||""))),i=Xt(r);if(!i.length)return null;let a=[],l=[],c=E=>{let R=an(e,E);return!!R.match&&R.tier!=null&&R.tier<=2},u=E=>{let R=an(e,E);return!!R.match&&R.tier!=null&&R.tier<=3},d=E=>{let R=String(E||"").trim().toLowerCase();return gs.includes(R)?!0:Xt(R).some(N=>{let A=N.toLowerCase();return!Gr.has(A)&&!Aa.has(A)})},m=new Set(["reverse","forward","where","when","ask"]),p=E=>{let R=E.join(" "),N=Ko(R,{nlp:n});return Lp(e,N,s)!==!0||N&&!N.node&&m.has(N.shape)&&(N.object!=null&&!d(N.object)||N.shape==="ask"&&N.subject!=null&&!d(N.subject))||gn(N,Gt(e,N,{contextId:s,prev:o}),e).miss?null:{parsed:N,text:R}},f=E=>({parsed:E.parsed,from:r,to:E.text,dropped:[...a],steps:l}),g=0,h=Math.max(i.length,1)+12;for(;g<h;g+=1){let E=-1;for(let A=0;A<i.length;A+=1){let P=i[A].toLowerCase();if(za.has(P)&&!Gr.has(P)&&!c(i[A])){E=A;break}}if(E<0)break;let R=i[E];i=i.filter((A,P)=>P!==E),a.push(R),l.push(`strip noise "${R}" \u2192 "${i.join(" ")}"`);let N=p(i);if(N)return f(N)}let b=Ko(i.join(" "),{nlp:n}),y=new Set;if(b&&!b.node&&m.has(b.shape))for(let E of[b.object,b.subject])for(let R of Xt(String(E||"").toLowerCase()))y.add(R);let w=[],v=[],k=[];for(let E of i){let R=E.toLowerCase();if(!/^[a-z]+$/.test(R)||Gr.has(R)||Aa.has(R)||u(E)){w.push(E);continue}let A=Op(R);if(A&&A!==R){w.push(A),k.push(`${E}\u2192${A}`);continue}if(y.has(R)){w.push(E);continue}v.push(E)}if((k.length||v.length)&&w.length){i=w,a.push(...v),k.length&&l.push(`fuzzy-correct ${JSON.stringify(k)} \u2192 "${i.join(" ")}"`),v.length&&l.push(`drop unmatched ${JSON.stringify(v)} \u2192 "${i.join(" ")}"`);let E=p(i);if(E)return f(E)}let $=!1,T=i.map(E=>{let R=E.toLowerCase();return Hs[R]&&!u(E)?($=!0,Hs[R]):E});if($){l.push(`normalise synonyms \u2192 "${T.join(" ")}"`);let E=p(T);if(E)return f(E)}let S=Xt(r).map(E=>E.toLowerCase()),j=[],C=[];for(let E of S){if(Ip.has(E))continue;let R=Ue[E];R&&R!=="Change"?j.push(E):C.push(E)}if(j.length===1&&C.length===0){let E=p(["count",j[0]]);if(E)return l.push(`bare kind "${j[0]}" \u2192 count`),f(E)}return null}function t$(e,t){let n=String(t||"");if(!e||!ip.test(n))return n;let s=e.individuals.filter(l=>l.class==="Commit");if(!s.length)return n;let o=l=>String((l.attributes||[]).find(c=>c.key==="date")?.value||""),r=[...s].sort((l,c)=>o(c).localeCompare(o(l)))[0];if(!r)return n;let i=n.replace(ip,`commit ${r.label}`),a=i.trim().replace(/[?.!]+$/,"");return e$.test(a)?`${a} touched`:i}function n$(e){let t=String(e||"").toLowerCase(),n=new Set([t]);return t.endsWith("ies")&&n.add(`${t.slice(0,-3)}y`),(t.endsWith("ses")||t.endsWith("es"))&&n.add(t.slice(0,-2)),t.endsWith("s")&&t.length>1&&n.add(t.slice(0,-1)),[...n]}function s$(e,t){let n=n$(t);for(let s of e?.individuals||[])if(s?.class&&n.includes(String(s.class).toLowerCase()))return s.class;return null}function i$(e,t){let n=String(t||"").trim(),s=n.match(o$),o=s?null:n.match(r$),r=s||o;if(!r||!Ua.test(r[2]||"")||Ue[r[1].toLowerCase()])return null;let i=s$(e,r[1]);if(!i)return null;let a={node:"allOfClass",entityType:i};return s?{node:"list",entityType:i,base:a,scoped:!1}:{node:"count",entityType:i,base:a}}function ts(e,t,{contextId:n=null,nlp:s=void 0,prev:o=null}={}){if(Qv(t))return{content:Pa(),tmct_ask:{mechanical:!0,parsed:null,canonical:null,matches:[],traversal:null,miss:!0,ambiguous:!1,matchedVia:null,help:!0,relaxed:null}};t=t$(e,t);let r=Ta(t,{nlp:s}),i=r.parsed,a=i,l=null;if(Lp(e,i,n)===!1){let m=Zv(e,t,{nlp:s,contextId:n,prev:o});m&&(a=m.parsed,l={from:m.from,to:m.to,dropped:m.dropped,steps:m.steps})}let c=Gt(e,a,{contextId:n,prev:o}),u=gn(a,c,e);if(u.miss&&!u.ambiguous){let m=i$(e,t);if(m){let p=Gt(e,m,{contextId:n,prev:o}),f=gn(m,p,e);f.miss||(a=m,c=p,u=f,l=null)}}if(a===null&&u.miss&&!u.ambiguous){let p=Mr(String(t||"")).trim().match(a$)?.[1]?.trim();if(p&&!/\s+(?:for|about)$/i.test(p)){let f=Ko(`what is a ${p}`,{nlp:s});f?.shape==="meta"&&(c=Gt(e,f,{contextId:n,prev:o}),u=gn(f,c,e))}}if(a===null&&u.miss&&!u.ambiguous){let p=Ss(String(t||"")).match(c$)?.[1]?.trim();if(p){let f=Ko(`what is a ${p}`,{nlp:s});if(f?.shape==="meta"){let g=Gt(e,f,{contextId:n,prev:o}),h=gn(f,g,e);!h.miss&&!h.ambiguous&&(c=g,u=h)}}}let d=l&&!u.miss&&l.to!==l.from?`read as "${l.to}" \u2014 ${u.content}`:u.content;if(!l&&!u.miss&&!u.ambiguous&&r.alternates.length){let m=r.alternates.map(p=>{let f=Gt(e,p.parsed,{contextId:n,prev:o}),g=gn(p.parsed,f,e);return g.miss?null:{a:p,text:g.content}}).filter(Boolean);if(m.length){let p=Bd(m.map(f=>f.a),{answerFor:f=>m.find(g=>g.a===f)?.text||null});d=`${d}
59
+ `)}`:d,miss:!1,ambiguous:!0,candidates:r.map(h=>h.label)}}if(t.whereShape){let r=t.objMatch;if(r.class==="Module")return{content:`${r.label} is a module \u2014 the label is its repo path.`,miss:!1,ambiguous:!1,matches:t.matches};if(r.class==="Commit")return{content:`${r.label} is a commit, not a code location \u2014 try "what did commit ${r.label} touch".`,miss:!0,ambiguous:!1};let a=String(t.site||"").match(/^(.*):(\d+)(?:-(\d+))?$/);if(a){let l=a[3]&&a[3]!==a[2]?`lines ${a[2]}-${a[3]}`:`line ${a[2]}`;return{content:`${Na(r)} is defined in ${a[1]} at ${l}.`,miss:!1,ambiguous:!1,matches:t.matches}}return{content:`${Na(r)} is defined in ${Zo(r)} (no line span recorded in this index).`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.whenShape){let r=t.objMatch.label;if(!t.matches.length)return{content:`no recorded commit touches ${r} in this index. ${es(n)}`,miss:!0,ambiguous:!1};let a=t.matches[0],l=(a.attributes||[]).find(m=>m.key==="date")?.value||"";if(!l)return{content:`commit ${a.label} touched ${r}, but this index records no commit dates \u2014 regenerate the graph to attach mgx:commitDate.`,miss:!0,ambiguous:!1};let c=(a.attributes||[]).find(m=>m.key==="message")?.value||"",u=String(l).slice(0,10);if(a.id===t.objMatch.id)return{content:`commit ${a.label} ${Hr("is-dated",a.id,"is dated")} ${u}${c?` ("${c}")`:""}.`,miss:!1,ambiguous:!1,matches:t.matches};let d=t.matches.length-1;return{content:`${r} was last touched by commit ${a.label} on ${u}${c?` ("${c}")`:""}${d?`; ${d} earlier commit${d===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.whoLastShape){let r=t.objMatch.label;if(!t.matches.length)return{content:`no recorded commit touches ${r} in this index. ${es(n)}`,miss:!0,ambiguous:!1};let a=t.matches[0],l=(a.attributes||[]).find(u=>u.key==="author")?.value;if(!l)return{content:`commit ${a.label} last touched ${r}, but this index records no commit author \u2014 regenerate the graph to attach mgx:commitAuthor.`,miss:!0,ambiguous:!1};let c=t.matches.length-1;return{content:`${r} was last touched by ${l} (commit ${a.label})${c?`; ${c} earlier commit${c===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.commitSubject){let r=`commit ${t.objMatch.label}`;if(!t.matches.length)return{content:`${r} touched nothing recorded in the index.`,miss:!0,ambiguous:!1};let a=new Map;for(let u of t.matches.slice(0,Ue)){let d=u.class||"Module";a.has(d)||a.set(d,[]),a.get(d).push(["Function","Method"].includes(d)?`${u.label}()`:u.label)}let l=[...a.entries()].map(([u,d])=>`${Fe(u,d.length)} ${hn(d)}`),c=t.matches.length>Ue?`; \u2026and ${t.matches.length-Ue} more`:"";return{content:`${r} touched ${l.join("; ")}${c}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(e.shape==="ask"){if(!t.objMatch||!t.subjMatch)return{content:"couldn't resolve one of the terms in this question.",miss:!0,ambiguous:!1};let r=`${t.traversal}.`,a=`no ${e.kind} edge found from ${t.subjMatch.label} to ${t.objMatch.label}.`,l=e.negated?a:r,c=e.negated?r:a;return{content:`${t.answer?"Yes":"No"} \u2014 ${t.answer?l:c}`,miss:!t.matches.length,ambiguous:!1}}if(!t.matches.length){if(e.shape==="forward"){if(Ys.includes(e.kind)&&n&&t.objMatch)for(let l of Ys){if(l===e.kind)continue;let c={...e,kind:l},u=Ht(n,c,{pinnedObjMatch:t.objMatch});if(u?.matches?.length&&!u.ambiguous)return Wp(c,u,n)}return{content:`${t.objMatch.label} has no ${_s(e.kind)} edges in the index.`,miss:!0,ambiguous:!1}}if(e.kind==="tests"&&!e.entityType)return{content:`No tests cover ${String(e.object||"").replace(sv,"").trim()||String(e.object||"").trim()}.`,miss:!0,ambiguous:!1};let r=Fe(e.entityType||"Module",2),a=t.objMatch&&gs.includes(String(e.object||"").toLowerCase())?t.objMatch.label:e.object;return{content:`No ${r} found whose module directly ${_s(e.kind)} ${a}. ${es(n)}`,miss:!0,ambiguous:!1}}if(e.polar&&t.matches.length===1)return{content:`Yes \u2014 ${t.objMatch?.label||e.object} is ${b$(e.kind)} by ${t.matches[0].label}.`,miss:!1,ambiguous:!1,matches:t.matches};if(e.shape==="forward"||e.entityType==="Module"||t.matches.every(r=>!ts.has(r.class))){let r=t.matches.slice(0,Ue).map(l=>l.class==="Commit"?g$(l):l.label),a=t.matches.length>Ue?`, \u2026and ${t.matches.length-Ue} more`:"";return{content:r.join(" and ")+a+".",miss:!1,ambiguous:!1,matches:t.matches}}let s=new Map;for(let r of t.matches.slice(0,Ue)){let a=Zo(r);s.has(a)||s.set(a,[]),s.get(a).push(Na(r))}let o=[...s.entries()].map(([r,a],l)=>{let c=hn(a);return l===0?`in ${r} there is ${c}`:`there is ${c} in ${r}`}),i=t.matches.length>Ue?` \u2026and ${t.matches.length-Ue} more`:"";return{content:o.join(" and ")+i+".",miss:!1,ambiguous:!1,matches:t.matches}}function Gp(e){if(e.length<4||$$.has(e))return null;let t=Jn(e),n=t+1,s=null,o=!1;for(let i of v$){let r=On(e,i,Math.min(n,t));r<n?(n=r,s=i,o=!1):r===n&&r<=t&&i!==s&&(o=!0)}return n<=t&&!o?s:null}function bp(e,t){if(!e?.match||e.matchedVia!=="fuzzy"||e.ambiguous)return!1;let n=e.match.class;if(n!=="SchemaClass"&&n!=="SchemaPredicate")return!1;let s=String(t||"").trim().toLowerCase(),o=Gp(s);return!!o&&o!==s&&!!Be[o]}function Vp(e,t,n){if(!t)return!1;if(t.ambiguousParse)return"ambiguous";if(t.node)return t.node!=="miss";if(t.shape==="meta"||t.shape==="mentions")return!0;let s=Ln(e,t.object,n);if(s.unresolvedPronoun)return"pronoun";if(!s.match||bp(s,t.object))return!1;if(t.shape==="ask"){let o=Ln(e,t.subject,n);return o.unresolvedPronoun?"pronoun":!!(o.match&&!bp(o,t.subject))}return!0}function x$(e){let t=String(e||"").trim().toLowerCase().replace(/[?.!\s]+$/,"");return hu.includes(t)}function k$(e,t,{nlp:n=void 0,contextId:s=null,prev:o=null}={}){let i=qo(js(String(t||""))),r=Qt(i);if(!r.length)return null;let a=[],l=[],c=S=>{let A=an(e,S);return!!A.match&&A.tier!=null&&A.tier<=2},u=S=>{let A=an(e,S);return!!A.match&&A.tier!=null&&A.tier<=3},d=S=>{let A=String(S||"").trim().toLowerCase();return gs.includes(A)?!0:Qt(A).some(M=>{let T=M.toLowerCase();return!Jr.has(T)&&!Ua.has(T)})},m=new Set(["reverse","forward","where","when","ask"]),p=S=>{let A=S.join(" "),M=Qo(A,{nlp:n});return Vp(e,M,s)!==!0||M&&!M.node&&m.has(M.shape)&&(M.object!=null&&!d(M.object)||M.shape==="ask"&&M.subject!=null&&!d(M.subject))||gn(M,Ht(e,M,{contextId:s,prev:o}),e).miss?null:{parsed:M,text:A}},f=S=>({parsed:S.parsed,from:i,to:S.text,dropped:[...a],steps:l}),g=0,h=Math.max(r.length,1)+12;for(;g<h;g+=1){let S=-1;for(let T=0;T<r.length;T+=1){let P=r[T].toLowerCase();if(Za.has(P)&&!Jr.has(P)&&!c(r[T])){S=T;break}}if(S<0)break;let A=r[S];r=r.filter((T,P)=>P!==S),a.push(A),l.push(`strip noise "${A}" \u2192 "${r.join(" ")}"`);let M=p(r);if(M)return f(M)}let b=Qo(r.join(" "),{nlp:n}),w=new Set;if(b&&!b.node&&m.has(b.shape))for(let S of[b.object,b.subject])for(let A of Qt(String(S||"").toLowerCase()))w.add(A);let v=[],$=[],k=[];for(let S of r){let A=S.toLowerCase();if(!/^[a-z]+$/.test(A)||Jr.has(A)||Ua.has(A)||u(S)){v.push(S);continue}let T=Gp(A);if(T&&T!==A){v.push(T),k.push(`${S}\u2192${T}`);continue}if(w.has(A)){v.push(S);continue}$.push(S)}if((k.length||$.length)&&v.length){r=v,a.push(...$),k.length&&l.push(`fuzzy-correct ${JSON.stringify(k)} \u2192 "${r.join(" ")}"`),$.length&&l.push(`drop unmatched ${JSON.stringify($)} \u2192 "${r.join(" ")}"`);let S=p(r);if(S)return f(S)}let y=!1,j=r.map(S=>{let A=S.toLowerCase();return Xs[A]&&!u(S)?(y=!0,Xs[A]):S});if(y){l.push(`normalise synonyms \u2192 "${j.join(" ")}"`);let S=p(j);if(S)return f(S)}let E=Qt(i).map(S=>S.toLowerCase()),_=[],R=[];for(let S of E){if(qp.has(S))continue;let A=Be[S];A&&A!=="Change"?_.push(S):R.push(S)}if(_.length===1&&R.length===0){let S=p(["count",_[0]]);if(S)return l.push(`bare kind "${_[0]}" \u2192 count`),f(S)}return null}function E$(e,t){let n=String(t||"");if(!e||!wp.test(n))return n;let s=e.individuals.filter(l=>l.class==="Commit");if(!s.length)return n;let o=l=>String((l.attributes||[]).find(c=>c.key==="date")?.value||""),i=[...s].sort((l,c)=>o(c).localeCompare(o(l)))[0];if(!i)return n;let r=n.replace(wp,`commit ${i.label}`),a=r.trim().replace(/[?.!]+$/,"");return S$.test(a)?`${a} touched`:r}function j$(e){let t=String(e||"").toLowerCase(),n=new Set([t]);return t.endsWith("ies")&&n.add(`${t.slice(0,-3)}y`),(t.endsWith("ses")||t.endsWith("es"))&&n.add(t.slice(0,-2)),t.endsWith("s")&&t.length>1&&n.add(t.slice(0,-1)),[...n]}function _$(e,t){let n=j$(t);for(let s of e?.individuals||[])if(s?.class&&n.includes(String(s.class).toLowerCase()))return s.class;return null}function T$(e,t){let n=String(t||"").trim(),s=n.match(R$),o=s?null:n.match(A$),i=s||o;if(!i||!ec.test(i[2]||"")||Be[i[1].toLowerCase()])return null;let r=_$(e,i[1]);if(!r)return null;let a={node:"allOfClass",entityType:r};return s?{node:"list",entityType:r,base:a,scoped:!1}:{node:"count",entityType:r,base:a}}function ns(e,t,{contextId:n=null,nlp:s=void 0,prev:o=null}={}){if(x$(t))return{content:Xa(),tmct_ask:{mechanical:!0,parsed:null,canonical:null,matches:[],traversal:null,miss:!0,ambiguous:!1,matchedVia:null,help:!0,relaxed:null}};t=E$(e,t);let i=Wa(t,{nlp:s}),r=i.parsed,a=r,l=null;if(Vp(e,r,n)===!1){let m=k$(e,t,{nlp:s,contextId:n,prev:o});m&&(a=m.parsed,l={from:m.from,to:m.to,dropped:m.dropped,steps:m.steps})}let c=Ht(e,a,{contextId:n,prev:o}),u=gn(a,c,e);if(u.miss&&!u.ambiguous){let m=T$(e,t);if(m){let p=Ht(e,m,{contextId:n,prev:o}),f=gn(m,p,e);f.miss||(a=m,c=p,u=f,l=null)}}if(a===null&&u.miss&&!u.ambiguous){let p=Ur(String(t||"")).trim().match(C$)?.[1]?.trim();if(p&&!/\s+(?:for|about)$/i.test(p)){let f=Qo(`what is a ${p}`,{nlp:s});f?.shape==="meta"&&(c=Ht(e,f,{contextId:n,prev:o}),u=gn(f,c,e))}}if(a===null&&u.miss&&!u.ambiguous){let p=js(String(t||"")).match(I$)?.[1]?.trim();if(p){let f=Qo(`what is a ${p}`,{nlp:s});if(f?.shape==="meta"){let g=Ht(e,f,{contextId:n,prev:o}),h=gn(f,g,e);!h.miss&&!h.ambiguous&&(c=g,u=h)}}}let d=l&&!u.miss&&l.to!==l.from?`read as "${l.to}" \u2014 ${u.content}`:u.content;if(!l&&!u.miss&&!u.ambiguous&&i.alternates.length){let m=i.alternates.map(p=>{let f=Ht(e,p.parsed,{contextId:n,prev:o}),g=gn(p.parsed,f,e);return g.miss?null:{a:p,text:g.content}}).filter(Boolean);if(m.length){let p=ep(m.map(f=>f.a),{answerFor:f=>m.find(g=>g.a===f)?.text||null});d=`${d}
60
60
  ${p.join(`
61
61
  `)}`}}if(!u.ambiguous&&c.objMatch&&Array.isArray(c.candidates)&&c.candidates.length){let m=new Set((c.matches||[]).map(f=>f&&f.id)),p=c.candidates.filter(f=>f&&f.id&&f.id!==c.objMatch.id&&!m.has(f.id));if(p.length){let f=p.slice(0,3).map(b=>b.label).filter(Boolean),g=p.length-f.length,h=f.join(", ")+(g>0?`, +${g} more`:"");d=`${d}
62
- (answering for ${c.objMatch.label} \u2014 ${p.length} other match${p.length===1?"":"es"}: ${h})`}}return{content:d,tmct_ask:{mechanical:!0,parsed:a&&!a.ambiguousParse?a:null,canonical:Tp(a),matches:(c.matches||[]).map(m=>({id:m.id,label:m.label,type:m.class,module:m.class?Yo(m):void 0})),traversal:c.traversal||null,miss:!!u.miss,ambiguous:!!u.ambiguous,relaxed:l,matchedVia:c.matchedVia||null,...Array.isArray(c.referents)&&c.referents.length?{discourse:c.referents}:{},...u.ambiguous?{candidates:u.candidates,candidateParses:u.candidateParses}:{}}}}var Kd,no,es,ya,Ay,Rt,ap,Be,cp,Ty,Cy,Iy,Oy,Ly,lp,ka,My,Ca,up,xt,dp,Fy,zy,By,qy,Vy,Hy,Ky,Yy,Jy,Zy,hp,Oa,cv,gp,lv,pv,Yd,gv,Xd,yv,Qd,ep,$v,kv,Sv,Jn,va,Fv,Dv,Uv,Da,Bv,sp,Wv,op,Gr,Aa,za,Ip,Yv,Xv,Jv,ip,e$,o$,r$,Ua,a$,c$,ns=L(()=>{Ce();Yi();An();Yn();Uo();Fr();Dr();Vd();ga();Vn();Hd();qo();Kd=new WeakMap;no={calls:"callsSymbol",touches:"touchesSymbol"},es=new Set(["Function","Method","Class","Attribute","GlobalVariable"]),ya={Function:"Method",Method:"Function"},Ay={uses:["imports","calls","callsSymbol"]},Rt=e=>Ay[e]||[e],ap=new Set(Object.values(no)),Be=12,cp={Function:["function","functions"],Method:["method","methods"],Class:["class","classes"],Module:["module","modules"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"],Change:["change","changes"],Fact:["fact","facts"],Utterance:["utterance","utterances"],Session:["session","sessions"],Source:["source","sources"],Rule:["rule","rules"]};Ty={cochange:"cochanges",reexports:"export"};Cy={imports:"import",calls:"call",callsSymbol:"call",inherits:"inherit from",contains:"contain",tests:"test",touches:"touch",cochange:"cochange",reexports:"export",uses:"use"},Iy=e=>Cy[e]||js(e),Oy=new RegExp(`^(?:${Object.keys(pe).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})(?:s|ing|ed)?\\s+`,"i"),Ly=new Set(["imports"]);lp=4,ka="zzinnerset",My=new Set(["that","which","who","are","is","was","were","do","does","also","still","both","and","then","though"]),Ca=new Set(["which","what","who","list","show","find","give","me","us","all"]),up=new Set(["are","is","was","were"]);xt=e=>Ue[e]?{entityType:Ue[e],placeholder:!1}:Rn.includes(e)?{entityType:null,placeholder:!0}:null,dp=e=>!!pe[e]&&e.endsWith("ing");Fy=new Set(["which","the","all"]);zy=new Set(["all","every","each"]);By=new Set(["what","which","thing","things","one","ones","stuff"]);qy=new Set(["those","them"]);Vy=new Set(["did","was","were","do","does","has","have","had"]),Hy=new Set(["change","changed","changes","update","updated","updates","modify","modified","modifies","touch","touched","touches","edit","edited","revise","revised"]),Ky=new Set(["last","recently","ever","get","got","been","then","now","already"]),Yy=new Set(["the","a","an","all","those","these","any"]);Jy=new Set(["since","before","after","on"]);Zy=/\b[\w-]+(?:[/.][\w-]+)+\b|\b[A-Z][A-Za-z0-9_]*\b|\b[a-z][a-z0-9]*[A-Z][A-Za-z0-9]*\b/;hp=new Set(["total","altogether","overall","exist","exists","existing","present","here","now","currently","graph","index","codebase","repo","repository","this","that"]);Oa=new Set(["the","a","an","all","me","us"]),cv=[...ys].sort((e,t)=>t.split(" ").length-e.split(" ").length),gp="functions, classes, methods, modules, attributes, variables, or commits",lv=new Set(["in","inside","under"]);pv=new Set(["called","named","about","like","containing","matching","with"]);Yd=new Set(["recent","latest","newest"]);gv=/^git:(.+)$/i;Xd=new WeakMap;yv=new Set(["Class","Function","Method","GlobalVariable","Attribute"]);Qd=new WeakMap;ep={label:3,chain:2,attr:1};$v=e=>e&&typeof e.value=="boolean"?{...e,value:!e.value}:null;kv=["imports","calls","callsSymbol","inherits","contains","tests"];Sv=/^\d{4}-\d{2}-\d{2}$/;Jn=e=>hn(e.slice(0,Be).map(t=>["Function","Method"].includes(t.class)?`${t.label}()`:t.label))+(e.length>Be?`, \u2026and ${e.length-Be} more`:"");va=10;Fv=/^(?:the|a|an)\s+/i,Dv=new RegExp(`\\s+(${Object.keys(Ue).join("|")})$`,"i");Uv=/^(?:the\s+)?(?:main\s+|primary\s+)?entry[\s-]?points?(?:\s+(?:of|to|for)\s+(?:this|the)\s+(?:codebase|code|repo|repository|project|app))?$/i,Da=new Set(["index","main","app","server","cli","__main__"]),Bv=new Set(["test","tests","__tests__","fixture","fixtures","spec","specs","testdata"]),sp=e=>String(e).toLowerCase().split("/").pop().replace(/\.[a-z0-9]+$/,""),Wv=e=>String(e).toLowerCase().split("/").slice(0,-1).some(t=>Bv.has(t));op=8;Gr=new Set([...ge(Object.keys(pe)),...ge(Object.keys(Ue)),...ge(Object.keys(Wt)),...ge(Object.keys(Ge)),...ge(ws),...ge(Object.keys(Gn)),...ge(Object.keys(pn)),...ge(Object.keys(Gs)),...ge(Rn),...ge(Lo),...ge(bs),...ge(Ht),...ge(rn),...ge(_n),...ge(Object.keys(Hs))]),Aa=new Set([...st,...Ca,...gs]),za=new Set(ge(Sr)),Ip=new Set([...za,...Aa]),Yv=["many","count","number","quantity","total","tally","list","show","display","print","dump","enumerate","name"],Xv=[...new Set([...ge(Object.keys(pe)),...Object.keys(Ue),...Yv])].filter(e=>/^[a-z]+$/.test(e)&&e.length>=4&&!st.has(e)),Jv=new Set(["impact","impacts","impacted"]);ip=/\b(?:the\s+)?(?:last|latest|most\s+recent)\s+commit\b/i,e$=/^when\s+(?:was|were|is|did|does|do)\s+commit\s+[0-9a-fA-F:]+$/i;o$=/^(?:list|show(?:\s+me)?)\s+(?:all\s+|the\s+)?([a-z][a-z'-]*)\s*(.*)$/i,r$=/^(?:how\s+many|number\s+of|count(?:\s+the)?)\s+([a-z][a-z'-]*)\s*(.*)$/i,Ua=/^(?:are there(?:\s+in\s+total)?|is there|do you know(?:\s+about)?|do you have|exist(?:s)?|are known|in (?:the |a )?(?:graph|memory)|you know(?:\s+about)?)?[?.!\s]*$/i;a$=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,c$=/^what\s+is\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\s+(?:used\s+)?for[?.!\s]*$/i});function ss(e,t,n,s){let o=Math.max(1,t),r=Math.min(e.length,n),i=!1;s!=null&&r-o+1>s&&(r=o+s-1,i=!0);let a=e.slice(o-1,r).map((l,c)=>`${o+c} ${l}`).join(`
63
- `);return{start:o,end:r,text:a,truncated:i}}async function Mn({readFile:e,repoRoot:t,path:n,start:s,end:o,maxLines:r}){let i=Bt(t),a=Bt(i,n);if(a!==i&&!a.startsWith(i+Gl))throw new Le(`refusing to read outside the repository root: ${n}`);let c=(await e(a,"utf8")).split(`
64
- `);return s==null||o==null?{lines:c}:{lines:c,...ss(c,s,o,r)}}var Hr=L(()=>{De();Lt()});function ht(e){return{ok:!0,value:e}}function gt(e,{detail:t="",term:n=null}={}){if(!Xe[e])throw new TypeError(`miss(): unknown reason "${e}" (not in MISS_REASONS)`);return{ok:!1,miss:{reason:e,detail:t,term:n}}}function wn(e){return!e||!e.id?null:{id:String(e.id),label:e.label!=null?String(e.label):String(e.id),class:e.class||"Entity",attributes:(Array.isArray(e.attributes)?e.attributes:[]).map(t=>({key:t.key,value:t.value,prop:t.prop||null}))}}function Kr(e,{predicate:t="",prop:n=null}={}){let s={subject:e.subject,object:e.object,predicate:t,prop:n||null};return e.subjectLabel!=null&&(s.subjectLabel=e.subjectLabel),e.objectLabel!=null&&(s.objectLabel=e.objectLabel),e.weight!=null&&(s.weight=e.weight),s}var Wa,l$,Xe,qa,tR,Mp,Ga,u$,bn,Ba,kt,nR,Pp=L(()=>{Wa="1.1.0",l$="urn:tmct:core",Xe=Object.freeze({UNRESOLVED_TERM:"UNRESOLVED_TERM",CAPABILITY_ABSENT:"CAPABILITY_ABSENT",TRUNCATED_GRAPH:"TRUNCATED_GRAPH",NO_SOURCE:"NO_SOURCE"}),qa=Object.freeze(["imports","calls","callsSymbol","defines","tests","touches","touchesSymbol","contains","inherits","cochange","reexports"]),tR=Object.freeze({imports:"tmct:imports",calls:"tmct:calls",callsSymbol:"tmct:calls",defines:"tmct:defines",tests:"tmct:covers",touches:"tmct:touches",touchesSymbol:"tmct:touches",contains:"tmct:contains",inherits:"tmct:extends",cochange:"tmct:dependsOn",reexports:"tmct:exports"}),Mp=Object.freeze({resolution:["resolve","describe","members","subclasses","exports","signature"],traversal:["edges","impact"],source:["snippet","context"],aggregate:["architecture","untested","stats"],temporal:["history"],search:["search","ask"]}),Ga=Object.freeze(Object.values(Mp).flat()),u$=Object.freeze(new Set(Mp.source));bn="Individual",Ba="Edge",kt="concurrent-safe: reads immutable graph truth; no shared mutable state",nR=Object.freeze({version:Wa,ontology:l$,missReasons:Object.values(Xe),edgeKinds:[...qa],types:{Individual:{fields:{id:"string (opaque provider id)",label:"string (human/display name)",class:"string \u2014 a tmct: class token (module|class|function|method|attribute|variable|commit|test|\u2026)",attributes:"Array<{ key: string, value: string, prop: string|null }> \u2014 prop is the SEON/mgx token grounding the value"}},Edge:{fields:{subject:"string (individual id)",object:"string (individual id)",predicate:"string \u2014 the relation predicate",prop:"string|null \u2014 the SEON/mgx property token; see edgeKinds \u2192 tmct: mapping",subjectLabel:"string? (additive)",objectLabel:"string? (additive)",weight:"number? (additive; e.g. cochange coupling)"}},Result:{shape:"{ ok: true, value: T } | { ok: false, miss: Miss }"},Miss:{shape:"{ reason: MISS_REASONS, detail: string, term: string|null }"}},capabilitiesModel:"A provider advertises `capabilities: string[]` (service names it implements). A service outside the set is negotiated away to miss(CAPABILITY_ABSENT) \u2014 never an error. snippet may be advertised yet answer miss(NO_SOURCE) when no working tree exists (it has nothing useful without fs); context is graph-only-capable since INTERFACE_VERSION 1.1.0 \u2014 it returns a real hit (graph-only bundle) for any resolvable symbol even with no working tree, only escalating NO_SOURCE-style behavior to richer body text when source-capable.",services:{resolve:{group:"resolution",args:{term:"string"},result:`{ match: ${bn}, candidates: ${bn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"The resolveSymbol seam: map a free term to an individual + runner-up candidates. Every id-taking service consumes a resolved id."},describe:{group:"resolution",args:{id:"string"},result:`{ individual: ${bn}, out: ${Ba}[], incoming: ${Ba}[] }`,misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"Full typed portrait of one individual: its attributes and its outgoing/incoming edges."},members:{group:"resolution",args:{classId:"string"},result:`{ methods: ${bn}[], attributes: ${bn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"A class's methods + attributes (via the contains relation) \u2014 replaces reading the class body."},subclasses:{group:"resolution",args:{classId:"string"},result:`{ bases: ${bn}[], subclasses: ${bn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"Forward bases + the transitive reverse inheritance closure (who extends this)."},exports:{group:"resolution",args:{moduleId:"string"},result:`{ exports: ${bn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"A module's curated public API (resolved __all__ / re-exports)."},signature:{group:"resolution",args:{id:"string"},result:"{ id, label, class, params, returns, raises, decorators, doc, selfFields, flags }",misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"The compact API surface of a symbol without its body."},edges:{group:"traversal",args:{id:"string",kind:"EDGE_KINDS member"},result:`{ kind: string, edges: ${Ba}[] }`,misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"Outgoing edges of one closed kind from an individual (an honest empty array is not a miss).",note:"An unknown kind (outside EDGE_KINDS) is a programming error and throws TypeError, not a miss."},impact:{group:"traversal",args:{moduleId:"string"},result:"{ total: number, levels: Array<Array<{ id, label, via, tests }>> }",misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"The transitive dependent closure the interpreter cannot compute without provider truth."},snippet:{group:"source",args:{id:"string"},result:"{ path: string, span: { start, end }, body: string|null } \u2014 Promise<Result>",misses:["UNRESOLVED_TERM","NO_SOURCE"],concurrency:kt,purpose:"The exact source span of a symbol. A provider with no working tree returns miss(NO_SOURCE) honestly \u2014 snippet has nothing useful without fs.",note:"ASYNC (returns Promise<Result>) \u2014 a real body read is inherently fs I/O; callers should always await it. A graph-only provider still resolves synchronously-in-spirit (the promise settles on the same tick) but the return type is uniformly a Promise regardless of sourceAccess."},context:{group:"source",args:{symbol:"string",depth:"min|auto|full?"},result:"{ text: string, tier: string } (a sized edit bundle) \u2014 Promise<Result>",misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"The composed edit bundle (exemplar, siblings, registration, insertion region). A graph-only provider returns the graph-only sections as a real hit; a source-capable provider (sourceAccess:true, repoRoot, readFile) additionally includes the anchor/exemplar/inlined-callee body text.",note:"ASYNC (returns Promise<Result>) \u2014 see snippet's note; source-capable rendering is fs I/O."},architecture:{group:"aggregate",args:{package:"string?"},result:"{ modules: number, packages: Array<[dir, count]>, hubs: Array<{ id, label, importers }> }",misses:[],concurrency:kt,purpose:"Package/module shape + the most-imported hub modules. Optional package prefix scopes it."},untested:{group:"aggregate",args:{},result:`{ modules: ${bn}[] }`,misses:[],concurrency:kt,purpose:"Modules with no covering test module (via the tests relation)."},stats:{group:"aggregate",args:{},result:"{ total: number, classes: Array<{ class: string, count: number }>, truncated: boolean }",misses:[],concurrency:kt,purpose:"Per-tmct:class individual counts, read straight from the payload."},history:{group:"temporal",args:{id:"string"},result:"{ commits: Array<{ id, label, author, date, message }> }",misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"The commits that touched an individual (tmct:commit individuals via tmct:touches)."},search:{group:"search",args:{query:"string",kind:"string?",name:"string?",decorator:"string?"},result:`{ results: ${bn}[] }`,misses:[],concurrency:kt,purpose:"Lexical, provider-local locate. An empty result set is honest, not a miss."},ask:{group:"search",args:{query:"string"},result:"{ content: string, tmct_ask: object } (the composed NL round-trip envelope)",misses:[],concurrency:kt,purpose:"The mechanical, zero-model NL query over the graph \u2014 tmct's whole reason to exist."}}})});function d$(e,t){let n=[],s=[];for(let o of e.relations)for(let r of o.edges)r.subject===t&&n.push(Kr(r,{predicate:o.predicate,prop:o.prop})),r.object===t&&s.push(Kr(r,{predicate:o.predicate,prop:o.prop}));return{out:n,incoming:s}}function p$(e,t){for(let n of e.relations)if(In(n)===t)return{predicate:n.predicate,prop:n.prop};return{predicate:t,prop:null}}async function m$(e,t,{readFile:n,repoRoot:s}){if(!e.moduleLabel)return"";let o=null;try{({lines:o}=await Mn({readFile:n,repoRoot:s,path:e.moduleLabel}))}catch{o=null}if(!o)return"";let r=[];if(t.anchor&&e.anchor?.site){let{start:i,end:a}=e.anchor.site;r.push(`
65
- ## anchor: ${e.anchor.label} (${e.anchor.class}) @ ${e.moduleLabel}:${i}-${a}`),r.push(ss(o,i,a,Va).text),e.callHint&&r.push(e.callHint)}if(t.exemplar&&e.exemplar?.site){let{start:i,end:a}=e.exemplar.site,l=e.exemplar.decorators?` @${e.exemplar.decorators}`:"";r.push(`
66
- ## closest example (full body) \u2014 copy this style: ${e.exemplar.label} (${e.exemplar.class})${l} @ ${e.moduleLabel}:${i}-${a}`),r.push(ss(o,i,a,Va).text),e.callHint&&r.push(e.callHint)}if(t.inlinedCallees&&e.calleeBodies.length){let i=f$;for(let a of e.calleeBodies){if(i<=0)break;let l=a.site.start,u=a.site.path===e.moduleLabel?o:null;if(!u)try{({lines:u}=await Mn({readFile:n,repoRoot:s,path:a.site.path}))}catch{u=null}if(!u)continue;let d=ss(u,l,a.site.end,i);r.push(`
67
- ## inlined callee body (depth-1 in-repo call): ${a.label} @ ${a.site.path}:${l}-${a.site.end}`),r.push(d.text),i-=d.end-l+1}}return r.join(`
68
- `)}function Yr(e,{sourceAccess:t=!1,repoRoot:n=null,readFile:s=null,tel:o=null,ask:r=null}={}){let i=e.byId;if(t&&(!n||typeof s!="function"))throw new TypeError("createGraphService({ sourceAccess: true }) requires both repoRoot and readFile \u2014 fs access is an injected capability, not an ambient import.");let a=c=>i.get(c)||null,l={version:Wa,capabilities:[...Ga],sourceAccess:!!t,graph:e,resolve(c){let{match:u,candidates:d}=qt(e,String(c??""));return u?ht({match:wn(u),candidates:d.map(wn)}):gt(Xe.UNRESOLVED_TERM,{term:String(c??"")})},describe(c){let u=a(c);if(!u)return gt(Xe.UNRESOLVED_TERM,{term:c});let{out:d,incoming:m}=d$(e,c);return ht({individual:wn(u),out:d,incoming:m})},members(c){if(!a(c))return gt(Xe.UNRESOLVED_TERM,{term:c});let d=Ee(e,"contains").filter(f=>f.subject===c),m=[],p=[];for(let f of d){let g=i.get(f.object),h=g?wn(g):{id:f.object,label:f.objectLabel||f.object,class:"Entity",attributes:[]};(g?.class||"")==="Attribute"?p.push(h):m.push(h)}return ht({methods:m,attributes:p})},subclasses(c){if(!a(c))return gt(Xe.UNRESOLVED_TERM,{term:c});let d=Ee(e,"inherits"),m=d.filter(b=>b.subject===c).map(b=>i.get(b.object)?wn(i.get(b.object)):{id:b.object,label:b.objectLabel||b.object,class:"Class",attributes:[]}),p=new Map;for(let b of d)p.has(b.object)||p.set(b.object,[]),p.get(b.object).push(b.subject);let f=new Set([c]),g=[],h=[c];for(let b=0;b<8&&h.length;b+=1){let y=[];for(let w of h)for(let v of p.get(w)||[]){if(f.has(v))continue;f.add(v);let k=i.get(v);g.push(k?wn(k):{id:v,label:v,class:"Class",attributes:[]}),y.push(v)}h=y}return ht({bases:m,subclasses:g})},exports(c){if(!a(c))return gt(Xe.UNRESOLVED_TERM,{term:c});let m=Ee(e,"reexports").filter(p=>p.subject===c).map(p=>i.get(p.object)?wn(i.get(p.object)):{id:p.object,label:p.objectLabel||p.object,class:"Entity",attributes:[]});return ht({exports:m})},signature(c){let u=a(c);if(!u)return gt(Xe.UNRESOLVED_TERM,{term:c});let d=[];for(let[p,f]of[["isStatic","static"],["isAbstract","abstract"],["isConstant","constant"]])Pt(u,p)&&d.push(f);let m=Pt(u,"visibility");return m&&d.push(m),ht({id:u.id,label:u.label,class:u.class||"Entity",params:Pt(u,"params"),returns:Pt(u,"returns"),raises:Pt(u,"raises"),decorators:Pt(u,"decorators"),doc:Pt(u,"doc"),selfFields:Pt(u,"self_fields"),flags:d})},edges(c,u,{limit:d,offset:m=0}={}){if(!qa.includes(u))throw new TypeError(`edges(): unknown kind "${u}" (not in EDGE_KINDS)`);if(!a(c))return gt(Xe.UNRESOLVED_TERM,{term:c});let f=p$(e,u),g=Ee(e,u).filter(h=>h.subject===c).map(h=>Kr(h,f));return g=d==null?g.slice(m):g.slice(m,m+d),ht({kind:u,edges:g})},impact(c,{maxDepth:u}={}){let d=a(c);if(!d)return gt(Xe.UNRESOLVED_TERM,{term:c});let m=u==null?Qs(e,d):Qs(e,d,{maxDepth:u}),p=m.reduce((f,g)=>f+g.length,0);return ht({total:p,levels:m})},async snippet(c){let u=a(c);if(!u)return gt(Xe.UNRESOLVED_TERM,{term:c});let d=vt(u);if(!l.sourceAccess)return gt(Xe.NO_SOURCE,{term:c,detail:d?`span is ${d.path}:${d.start}-${d.end}; this provider exposes no working tree`:"no source span in the graph"});if(!d)return gt(Xe.NO_SOURCE,{term:c,detail:"no source span in the graph (likely a module)"});try{let m=await Mn({readFile:s,repoRoot:n,path:d.path,start:d.start,end:d.end,maxLines:Va});return ht({path:d.path,span:{start:d.start,end:d.end},body:m.text})}catch(m){return gt(Xe.NO_SOURCE,{term:c,detail:`could not read ${d.path}: ${m?.message||m}`})}},async context(c,{depth:u="auto"}={}){let{match:d}=qt(e,String(c??""));if(!d)return gt(Xe.UNRESOLVED_TERM,{term:String(c??"")});let m=Zs(e,d),p=String(u||"auto").trim().toLowerCase(),f,g;p==="min"?(f="TINY",g=Es("TINY")):p==="full"?(f="FULL",g=Es("FULL")):{tier:f,mask:g}=Nr(m,e,{});let h=fd(m,g);if(!l.sourceAccess)return ht({text:h,tier:f});let b=await m$(m,g,{readFile:s,repoRoot:n});return ht({text:b?`${h}
69
- ${b}`:h,tier:f})},architecture({package:c=""}={}){let u=String(c||"").trim().toLowerCase().replace(/^\.?\//,""),d=e.individuals.filter(b=>(b.class||"")==="Module"&&(!u||String(b.label||"").toLowerCase().startsWith(u))),m=new Map;for(let b of d){let y=b.label.includes("/")?b.label.slice(0,b.label.lastIndexOf("/")):"(root)";m.set(y,(m.get(y)||0)+1)}let p=new Set(d.map(b=>b.id)),f=new Map;for(let b of Ee(e,"imports"))p.has(b.object)&&f.set(b.object,(f.get(b.object)||0)+1);let g=[...f.entries()].sort((b,y)=>y[1]-b[1]).map(([b,y])=>({id:b,label:i.get(b)?.label||b,importers:y})),h=[...m.entries()].sort((b,y)=>y[1]-b[1]);return ht({modules:d.length,packages:h,hubs:g})},untested(){let c=new Set(Ee(e,"tests").map(d=>d.object)),u=e.individuals.filter(d=>(d.class||"")==="Module"&&!c.has(d.id)&&!/\.test\./.test(d.label||"")).map(wn);return ht({modules:u})},stats(){let c=new Map;for(let d of e.individuals){let m=d.class||"Entity";c.set(m,(c.get(m)||0)+1)}let u=[...c.entries()].map(([d,m])=>({class:d,count:m})).sort((d,m)=>m.count-d.count||d.class.localeCompare(m.class));return ht({total:e.individuals.length,classes:u,truncated:(e.truncated||[]).length>0})},history(c){if(!a(c))return gt(Xe.UNRESOLVED_TERM,{term:c});let d=[...Ee(e,"touches"),...Ee(e,"touchesSymbol")].filter(f=>f.object===c),m=new Set,p=[];for(let f of d){if(m.has(f.subject))continue;m.add(f.subject);let g=i.get(f.subject);p.push({id:f.subject,label:f.subjectLabel||g?.label||f.subject,author:g?Pt(g,"author")??Pt(g,"commitAuthor"):null,date:g?Pt(g,"date")??Pt(g,"commitDate"):null,message:g?Pt(g,"message")??Pt(g,"commitMessage"):null})}return ht({commits:p})},search(c,{kind:u="",name:d="",decorator:m="",limit:p=Or,offset:f=0}={}){let g=String(c||""),h=String(u||"").trim().toLowerCase(),b=String(d||"").trim(),y=String(m||"").trim().toLowerCase(),w;if(h&&h!=="module"){let k=null;if(b){let T=ia(b);if(T.error)return gt(Xe.UNRESOLVED_TERM,{term:b,detail:T.error});k=T}let $=g.toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean);try{w=la(e,$,{kind:h,decFilter:y,nameRe:k}).map(T=>T.ind)}catch(T){return gt(Xe.UNRESOLVED_TERM,{term:b,detail:String(T?.message||T)})}}else{let k=new Map;for(let $ of e.individuals)($.class||"")==="Module"&&k.set($.label,$);w=qu(e,g).map(({path:$})=>k.get($)).filter(Boolean)}let v=w.slice(f,f+p).map(wn);return ht({results:v})},ask(c){if(typeof r!="function")return gt(Xe.CAPABILITY_ABSENT,"this provider was constructed without an ask answerer");let{content:u,tmct_ask:d}=r(e,String(c||""));return ht({content:u,tmct_ask:d})}};if(o)for(let c of Ga){let u=l[c];typeof u=="function"&&(l[c]=(...d)=>{let m=performance.now(),p=u.apply(l,d);return p&&typeof p.then=="function"?p.then(f=>(Fp(o,c,performance.now()-m,f),f)):(Fp(o,c,performance.now()-m,p),p)})}return l}function Fp(e,t,n,s){try{e.record({tool:`ri.${t}`,perf:{ms_total:n},response:h$(s)})}catch{}}function h$(e){if(!e||typeof e!="object"||e.ok!==!0)return{ok:!1,reason:e?.miss?.reason||null};let t=0,n=e.value;if(Array.isArray(n))t=n.length;else if(n&&typeof n=="object")for(let s of Object.values(n))Array.isArray(s)&&(t+=s.length);return{ok:!0,count:t}}var Pt,Va,f$,Xr=L(()=>{Ce();Hr();Pp();Pt=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value??null;Va=200,f$=120});async function Xo(e,t){let n=await t.fetchEntities(e),s=Ir(n);if(!s.individuals.length){let o=new Le(`the graph at ${e.graphFile} is empty \u2014 no entities to answer from yet (this repo starts with no graph; the chat session folds the conversation into one).`);throw o.emptyGraph=!0,o}return s}var Jr=L(()=>{Lt();Ce()});function ot(e,t){let n=String(e?.[t]||"").trim();if(!n)throw new Le(`${t} is required`);return n}function wt(e,t,n){let{match:s,candidates:o}=qt(e.graph,t);if(!s)throw new Le(`no entity matching ${n} "${t}" in the code-map graph. Try a repo-relative path (e.g. path/to/module), a basename, or tmct_search for a fuzzy lookup.`);return{match:s,candidates:o}}var Jo,Je,He=L(()=>{Lt();Ce();Jo=200;Je=e=>(t,{graph:n,svc:s})=>{let{match:o}=wt(s,ot(t,"symbol"),"symbol");return e(n,o)}});async function Dp(e,{config:t,source:n=Ys,trim:s=!1,tel:o=null}={}){let r=String(e?.symbol||"").trim();if(!r)throw new Le("symbol is required");let i=String(e?.depth||"auto").trim().toLowerCase(),a=!!e?.min,l=!!e?.untuned,c=!!e?.max,u=await Xo(t,n),d=$e($e(t.graphFile)),m=Yr(u,{sourceAccess:!0,repoRoot:d,readFile:ze,tel:o,ask:ts}),{match:p}=wt(m,r,"symbol"),f=Zs(u,p),g,h,b=!1;a||i==="min"?(g="TINY",h=Es("TINY")):c||i==="full"?(g="FULL",h=Es("FULL"),b=!0):{tier:g,mask:h,topup:b}=Nr(f,u,{untuned:l}),s&&!c&&(h=dd(h));let y=null;if(f.moduleLabel)try{({lines:y}=await Mn({readFile:ze,repoRoot:d,path:f.moduleLabel}))}catch{y=null}let w=$=>y&&y[$-1]!=null?y[$-1].trim():"",v=($,T)=>ss(y,$,T,Jo).text,k=[`Edit context for ${f.moduleLabel} [${g}${s?" secondary":""}] \u2014 assembled from the typed graph + that file. You do NOT need to Read it; write the new code directly after reviewing this.`];if(h.anchor&&f.anchor?.site&&y){let{start:$,end:T}=f.anchor.site;k.push(`
70
- ## anchor: ${f.anchor.label} (${f.anchor.class}) @ ${f.moduleLabel}:${$}-${T}`),k.push(v($,T)),f.callHint&&k.push(f.callHint)}if(h.registration&&f.globals.length){k.push(`
71
- ## registration / module globals (replicate this pattern):`);for(let $ of f.globals)k.push(` ${$.label} = ${$.value}${$.site?` [:${$.site.start}]`:""}`)}if(h.exemplar&&f.exemplar?.site&&y){let{start:$,end:T}=f.exemplar.site,S=f.exemplar.decorators?` @${f.exemplar.decorators}`:"";k.push(`
72
- ## closest example (full body) \u2014 copy this style: ${f.exemplar.label} (${f.exemplar.class})${S} @ ${f.moduleLabel}:${$}-${T}`),k.push(v($,T)),f.callHint&&k.push(f.callHint)}if(h.inlinedCallees&&f.calleeBodies.length&&y){let $=120;for(let T of f.calleeBodies){if($<=0)break;let S=T.site.start,C=T.site.path===f.moduleLabel&&y?y:await Mn({readFile:ze,repoRoot:d,path:T.site.path}).then(R=>R.lines).catch(()=>null);if(!C)continue;let E=ss(C,S,T.site.end,$);k.push(`
73
- ## inlined callee body (depth-1 in-repo call): ${T.label} @ ${T.site.path}:${S}-${T.site.end}`),k.push(E.text),$-=E.end-S+1}}if(h.classMembers&&f.classMembers&&f.classMembers.members.length){k.push(`
74
- ## members of ${f.classMembers.className} (the edit likely lives INSIDE this class \u2014 copy a member's shape, do not read the class body):`);for(let $ of f.classMembers.members){let T=String($.label).split(".").pop(),S=$.params!=null&&$.params!==""?`(${$.params})${$.returns?` -> ${$.returns}`:""}`:"",j=$.decorators?`@${$.decorators} `:"",C=$.raises?` raises=${$.raises}`:"";k.push(` ${$.class} ${T}${$.site?` :${$.site.start}`:""} ${j}${T}${S}${C}`)}}if(h.siblings&&f.siblings.length){k.push(`
75
- ## sibling symbols to copy the style of (most relevant first; ${f.siblings.length} total):`);for(let $ of f.siblings.slice(0,f.siblingCap)){let T=$.site?w($.site.start):"",S=$.decorators?`@${$.decorators} `:"",j=$.raises?` raises=${$.raises}`:"";k.push(` ${$.class} ${$.label}${$.site?` :${$.site.start}`:""} ${S}${T}${j}`)}f.siblings.length>f.siblingCap&&k.push(` \u2026+${f.siblings.length-f.siblingCap} more (use tmct_search kind=function or tmct_snippet <name> for any of them)`)}if(h.allExports&&f.allExports&&k.push(`
62
+ (answering for ${c.objMatch.label} \u2014 ${p.length} other match${p.length===1?"":"es"}: ${h})`}}return{content:d,tmct_ask:{mechanical:!0,parsed:a&&!a.ambiguousParse?a:null,canonical:Up(a),matches:(c.matches||[]).map(m=>({id:m.id,label:m.label,type:m.class,module:m.class?Zo(m):void 0})),traversal:c.traversal||null,miss:!!u.miss,ambiguous:!!u.ambiguous,relaxed:l,matchedVia:c.matchedVia||null,...Array.isArray(c.referents)&&c.referents.length?{discourse:c.referents}:{},...u.ambiguous?{candidates:u.candidates,candidateParses:u.candidateParses}:{}}}}var ip,oo,ts,Ia,Zy,Rt,yp,Ue,vp,ev,tv,nv,sv,ov,$p,Ma,iv,qa,xp,kt,kp,cv,uv,pv,mv,gv,bv,wv,yv,$v,kv,_p,Va,Iv,Rp,Ov,Mv,ap,zv,cp,Wv,up,pp,Gv,Hv,Yv,Qn,Oa,c$,l$,d$,Qa,p$,hp,f$,gp,Jr,Ua,Za,qp,y$,v$,$$,wp,S$,R$,A$,ec,C$,I$,ss=L(()=>{Ce();ca();An();Xn();Go();qr();Gr();op();Aa();Hn();rp();Ko();ip=new WeakMap;oo={calls:"callsSymbol",touches:"touchesSymbol"},ts=new Set(["Function","Method","Class","Attribute","GlobalVariable"]),Ia={Function:"Method",Method:"Function"},Zy={uses:["imports","calls","callsSymbol"]},Rt=e=>Zy[e]||[e],yp=new Set(Object.values(oo)),Ue=12,vp={Function:["function","functions"],Method:["method","methods"],Class:["class","classes"],Module:["module","modules"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"],Change:["change","changes"],Fact:["fact","facts"],Utterance:["utterance","utterances"],Session:["session","sessions"],Source:["source","sources"],Rule:["rule","rules"]};ev={cochange:"cochanges",reexports:"export"};tv={imports:"import",calls:"call",callsSymbol:"call",inherits:"inherit from",contains:"contain",tests:"test",touches:"touch",cochange:"cochange",reexports:"export",uses:"use"},nv=e=>tv[e]||_s(e),sv=new RegExp(`^(?:${Object.keys(de).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})(?:s|ing|ed)?\\s+`,"i"),ov=new Set(["imports"]);$p=4,Ma="zzinnerset",iv=new Set(["that","which","who","are","is","was","were","do","does","also","still","both","and","then","though"]),qa=new Set(["which","what","who","list","show","find","give","me","us","all"]),xp=new Set(["are","is","was","were"]);kt=e=>Be[e]?{entityType:Be[e],placeholder:!1}:Rn.includes(e)?{entityType:null,placeholder:!0}:null,kp=e=>!!de[e]&&e.endsWith("ing");cv=new Set(["which","the","all"]);uv=new Set(["all","every","each"]);pv=new Set(["what","which","thing","things","one","ones","stuff"]);mv=new Set(["those","them"]);gv=new Set(["did","was","were","do","does","has","have","had"]),bv=new Set(["change","changed","changes","update","updated","updates","modify","modified","modifies","touch","touched","touches","edit","edited","revise","revised"]),wv=new Set(["last","recently","ever","get","got","been","then","now","already"]),yv=new Set(["the","a","an","all","those","these","any"]);$v=new Set(["since","before","after","on"]);kv=/\b[\w-]+(?:[/.][\w-]+)+\b|\b[A-Z][A-Za-z0-9_]*\b|\b[a-z][a-z0-9]*[A-Z][A-Za-z0-9]*\b/;_p=new Set(["total","altogether","overall","exist","exists","existing","present","here","now","currently","graph","index","codebase","repo","repository","this","that"]);Va=new Set(["the","a","an","all","me","us"]),Iv=[...ys].sort((e,t)=>t.split(" ").length-e.split(" ").length),Rp="functions, classes, methods, modules, attributes, variables, or commits",Ov=new Set(["in","inside","under"]);Mv=new Set(["called","named","about","like","containing","matching","with"]);ap=new Set(["recent","latest","newest"]);zv=/^git:(.+)$/i;cp=new WeakMap;Wv=new Set(["Class","Function","Method","GlobalVariable","Attribute"]);up=new WeakMap;pp={label:3,chain:2,attr:1};Gv=e=>e&&typeof e.value=="boolean"?{...e,value:!e.value}:null;Hv=["imports","calls","callsSymbol","inherits","contains","tests"];Yv=/^\d{4}-\d{2}-\d{2}$/;Qn=e=>hn(e.slice(0,Ue).map(t=>["Function","Method"].includes(t.class)?`${t.label}()`:t.label))+(e.length>Ue?`, \u2026and ${e.length-Ue} more`:"");Oa=10;c$=/^(?:the|a|an)\s+/i,l$=new RegExp(`\\s+(${Object.keys(Be).join("|")})$`,"i");d$=/^(?:the\s+)?(?:main\s+|primary\s+)?entry[\s-]?points?(?:\s+(?:of|to|for)\s+(?:this|the)\s+(?:codebase|code|repo|repository|project|app))?$/i,Qa=new Set(["index","main","app","server","cli","__main__"]),p$=new Set(["test","tests","__tests__","fixture","fixtures","spec","specs","testdata"]),hp=e=>String(e).toLowerCase().split("/").pop().replace(/\.[a-z0-9]+$/,""),f$=e=>String(e).toLowerCase().split("/").slice(0,-1).some(t=>p$.has(t));gp=8;Jr=new Set([...me(Object.keys(de)),...me(Object.keys(Be)),...me(Object.keys(Gt)),...me(Object.keys(Ve)),...me(ws),...me(Object.keys(Vn)),...me(Object.keys(pn)),...me(Object.keys(Ks)),...me(Rn),...me(Po),...me(bs),...me(Yt),...me(rn),...me(_n),...me(Object.keys(Xs))]),Ua=new Set([...st,...qa,...gs]),Za=new Set(me(Cr)),qp=new Set([...Za,...Ua]),y$=["many","count","number","quantity","total","tally","list","show","display","print","dump","enumerate","name"],v$=[...new Set([...me(Object.keys(de)),...Object.keys(Be),...y$])].filter(e=>/^[a-z]+$/.test(e)&&e.length>=4&&!st.has(e)),$$=new Set(["impact","impacts","impacted"]);wp=/\b(?:the\s+)?(?:last|latest|most\s+recent)\s+commit\b/i,S$=/^when\s+(?:was|were|is|did|does|do)\s+commit\s+[0-9a-fA-F:]+$/i;R$=/^(?:list|show(?:\s+me)?)\s+(?:all\s+|the\s+)?([a-z][a-z'-]*)\s*(.*)$/i,A$=/^(?:how\s+many|number\s+of|count(?:\s+the)?)\s+([a-z][a-z'-]*)\s*(.*)$/i,ec=/^(?:are there(?:\s+in\s+total)?|is there|do you know(?:\s+about)?|do you have|exist(?:s)?|are known|in (?:the |a )?(?:graph|memory)|you know(?:\s+about)?)?[?.!\s]*$/i;C$=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,I$=/^what\s+is\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\s+(?:used\s+)?for[?.!\s]*$/i});function os(e,t,n,s){let o=Math.max(1,t),i=Math.min(e.length,n),r=!1;s!=null&&i-o+1>s&&(i=o+s-1,r=!0);let a=e.slice(o-1,i).map((l,c)=>`${o+c} ${l}`).join(`
63
+ `);return{start:o,end:i,text:a,truncated:r}}async function Mn({readFile:e,repoRoot:t,path:n,start:s,end:o,maxLines:i}){let r=qt(t),a=qt(r,n);if(a!==r&&!a.startsWith(r+ou))throw new Oe(`refusing to read outside the repository root: ${n}`);let c=(await e(a,"utf8")).split(`
64
+ `);return s==null||o==null?{lines:c}:{lines:c,...os(c,s,o,i)}}var Zr=L(()=>{De();Lt()});function ht(e){return{ok:!0,value:e}}function gt(e,{detail:t="",term:n=null}={}){if(!Xe[e])throw new TypeError(`miss(): unknown reason "${e}" (not in MISS_REASONS)`);return{ok:!1,miss:{reason:e,detail:t,term:n}}}function wn(e){return!e||!e.id?null:{id:String(e.id),label:e.label!=null?String(e.label):String(e.id),class:e.class||"Entity",attributes:(Array.isArray(e.attributes)?e.attributes:[]).map(t=>({key:t.key,value:t.value,prop:t.prop||null}))}}function ei(e,{predicate:t="",prop:n=null}={}){let s={subject:e.subject,object:e.object,predicate:t,prop:n||null};return e.subjectLabel!=null&&(s.subjectLabel=e.subjectLabel),e.objectLabel!=null&&(s.objectLabel=e.objectLabel),e.weight!=null&&(s.weight=e.weight),s}var nc,O$,Xe,sc,qR,Kp,oc,L$,bn,tc,St,GR,Yp=L(()=>{nc="1.1.0",O$="urn:tmct:core",Xe=Object.freeze({UNRESOLVED_TERM:"UNRESOLVED_TERM",CAPABILITY_ABSENT:"CAPABILITY_ABSENT",TRUNCATED_GRAPH:"TRUNCATED_GRAPH",NO_SOURCE:"NO_SOURCE"}),sc=Object.freeze(["imports","calls","callsSymbol","defines","tests","touches","touchesSymbol","contains","inherits","cochange","reexports"]),qR=Object.freeze({imports:"tmct:imports",calls:"tmct:calls",callsSymbol:"tmct:calls",defines:"tmct:defines",tests:"tmct:covers",touches:"tmct:touches",touchesSymbol:"tmct:touches",contains:"tmct:contains",inherits:"tmct:extends",cochange:"tmct:dependsOn",reexports:"tmct:exports"}),Kp=Object.freeze({resolution:["resolve","describe","members","subclasses","exports","signature"],traversal:["edges","impact"],source:["snippet","context"],aggregate:["architecture","untested","stats"],temporal:["history"],search:["search","ask"]}),oc=Object.freeze(Object.values(Kp).flat()),L$=Object.freeze(new Set(Kp.source));bn="Individual",tc="Edge",St="concurrent-safe: reads immutable graph truth; no shared mutable state",GR=Object.freeze({version:nc,ontology:O$,missReasons:Object.values(Xe),edgeKinds:[...sc],types:{Individual:{fields:{id:"string (opaque provider id)",label:"string (human/display name)",class:"string \u2014 a tmct: class token (module|class|function|method|attribute|variable|commit|test|\u2026)",attributes:"Array<{ key: string, value: string, prop: string|null }> \u2014 prop is the SEON/mgx token grounding the value"}},Edge:{fields:{subject:"string (individual id)",object:"string (individual id)",predicate:"string \u2014 the relation predicate",prop:"string|null \u2014 the SEON/mgx property token; see edgeKinds \u2192 tmct: mapping",subjectLabel:"string? (additive)",objectLabel:"string? (additive)",weight:"number? (additive; e.g. cochange coupling)"}},Result:{shape:"{ ok: true, value: T } | { ok: false, miss: Miss }"},Miss:{shape:"{ reason: MISS_REASONS, detail: string, term: string|null }"}},capabilitiesModel:"A provider advertises `capabilities: string[]` (service names it implements). A service outside the set is negotiated away to miss(CAPABILITY_ABSENT) \u2014 never an error. snippet may be advertised yet answer miss(NO_SOURCE) when no working tree exists (it has nothing useful without fs); context is graph-only-capable since INTERFACE_VERSION 1.1.0 \u2014 it returns a real hit (graph-only bundle) for any resolvable symbol even with no working tree, only escalating NO_SOURCE-style behavior to richer body text when source-capable.",services:{resolve:{group:"resolution",args:{term:"string"},result:`{ match: ${bn}, candidates: ${bn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:St,purpose:"The resolveSymbol seam: map a free term to an individual + runner-up candidates. Every id-taking service consumes a resolved id."},describe:{group:"resolution",args:{id:"string"},result:`{ individual: ${bn}, out: ${tc}[], incoming: ${tc}[] }`,misses:["UNRESOLVED_TERM"],concurrency:St,purpose:"Full typed portrait of one individual: its attributes and its outgoing/incoming edges."},members:{group:"resolution",args:{classId:"string"},result:`{ methods: ${bn}[], attributes: ${bn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:St,purpose:"A class's methods + attributes (via the contains relation) \u2014 replaces reading the class body."},subclasses:{group:"resolution",args:{classId:"string"},result:`{ bases: ${bn}[], subclasses: ${bn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:St,purpose:"Forward bases + the transitive reverse inheritance closure (who extends this)."},exports:{group:"resolution",args:{moduleId:"string"},result:`{ exports: ${bn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:St,purpose:"A module's curated public API (resolved __all__ / re-exports)."},signature:{group:"resolution",args:{id:"string"},result:"{ id, label, class, params, returns, raises, decorators, doc, selfFields, flags }",misses:["UNRESOLVED_TERM"],concurrency:St,purpose:"The compact API surface of a symbol without its body."},edges:{group:"traversal",args:{id:"string",kind:"EDGE_KINDS member"},result:`{ kind: string, edges: ${tc}[] }`,misses:["UNRESOLVED_TERM"],concurrency:St,purpose:"Outgoing edges of one closed kind from an individual (an honest empty array is not a miss).",note:"An unknown kind (outside EDGE_KINDS) is a programming error and throws TypeError, not a miss."},impact:{group:"traversal",args:{moduleId:"string"},result:"{ total: number, levels: Array<Array<{ id, label, via, tests }>> }",misses:["UNRESOLVED_TERM"],concurrency:St,purpose:"The transitive dependent closure the interpreter cannot compute without provider truth."},snippet:{group:"source",args:{id:"string"},result:"{ path: string, span: { start, end }, body: string|null } \u2014 Promise<Result>",misses:["UNRESOLVED_TERM","NO_SOURCE"],concurrency:St,purpose:"The exact source span of a symbol. A provider with no working tree returns miss(NO_SOURCE) honestly \u2014 snippet has nothing useful without fs.",note:"ASYNC (returns Promise<Result>) \u2014 a real body read is inherently fs I/O; callers should always await it. A graph-only provider still resolves synchronously-in-spirit (the promise settles on the same tick) but the return type is uniformly a Promise regardless of sourceAccess."},context:{group:"source",args:{symbol:"string",depth:"min|auto|full?"},result:"{ text: string, tier: string } (a sized edit bundle) \u2014 Promise<Result>",misses:["UNRESOLVED_TERM"],concurrency:St,purpose:"The composed edit bundle (exemplar, siblings, registration, insertion region). A graph-only provider returns the graph-only sections as a real hit; a source-capable provider (sourceAccess:true, repoRoot, readFile) additionally includes the anchor/exemplar/inlined-callee body text.",note:"ASYNC (returns Promise<Result>) \u2014 see snippet's note; source-capable rendering is fs I/O."},architecture:{group:"aggregate",args:{package:"string?"},result:"{ modules: number, packages: Array<[dir, count]>, hubs: Array<{ id, label, importers }> }",misses:[],concurrency:St,purpose:"Package/module shape + the most-imported hub modules. Optional package prefix scopes it."},untested:{group:"aggregate",args:{},result:`{ modules: ${bn}[] }`,misses:[],concurrency:St,purpose:"Modules with no covering test module (via the tests relation)."},stats:{group:"aggregate",args:{},result:"{ total: number, classes: Array<{ class: string, count: number }>, truncated: boolean }",misses:[],concurrency:St,purpose:"Per-tmct:class individual counts, read straight from the payload."},history:{group:"temporal",args:{id:"string"},result:"{ commits: Array<{ id, label, author, date, message }> }",misses:["UNRESOLVED_TERM"],concurrency:St,purpose:"The commits that touched an individual (tmct:commit individuals via tmct:touches)."},search:{group:"search",args:{query:"string",kind:"string?",name:"string?",decorator:"string?"},result:`{ results: ${bn}[] }`,misses:[],concurrency:St,purpose:"Lexical, provider-local locate. An empty result set is honest, not a miss."},ask:{group:"search",args:{query:"string"},result:"{ content: string, tmct_ask: object } (the composed NL round-trip envelope)",misses:[],concurrency:St,purpose:"The mechanical, zero-model NL query over the graph \u2014 tmct's whole reason to exist."}}})});function N$(e,t){let n=[],s=[];for(let o of e.relations)for(let i of o.edges)i.subject===t&&n.push(ei(i,{predicate:o.predicate,prop:o.prop})),i.object===t&&s.push(ei(i,{predicate:o.predicate,prop:o.prop}));return{out:n,incoming:s}}function M$(e,t){for(let n of e.relations)if(In(n)===t)return{predicate:n.predicate,prop:n.prop};return{predicate:t,prop:null}}async function F$(e,t,{readFile:n,repoRoot:s}){if(!e.moduleLabel)return"";let o=null;try{({lines:o}=await Mn({readFile:n,repoRoot:s,path:e.moduleLabel}))}catch{o=null}if(!o)return"";let i=[];if(t.anchor&&e.anchor?.site){let{start:r,end:a}=e.anchor.site;i.push(`
65
+ ## anchor: ${e.anchor.label} (${e.anchor.class}) @ ${e.moduleLabel}:${r}-${a}`),i.push(os(o,r,a,rc).text),e.callHint&&i.push(e.callHint)}if(t.exemplar&&e.exemplar?.site){let{start:r,end:a}=e.exemplar.site,l=e.exemplar.decorators?` @${e.exemplar.decorators}`:"";i.push(`
66
+ ## closest example (full body) \u2014 copy this style: ${e.exemplar.label} (${e.exemplar.class})${l} @ ${e.moduleLabel}:${r}-${a}`),i.push(os(o,r,a,rc).text),e.callHint&&i.push(e.callHint)}if(t.inlinedCallees&&e.calleeBodies.length){let r=P$;for(let a of e.calleeBodies){if(r<=0)break;let l=a.site.start,u=a.site.path===e.moduleLabel?o:null;if(!u)try{({lines:u}=await Mn({readFile:n,repoRoot:s,path:a.site.path}))}catch{u=null}if(!u)continue;let d=os(u,l,a.site.end,r);i.push(`
67
+ ## inlined callee body (depth-1 in-repo call): ${a.label} @ ${a.site.path}:${l}-${a.site.end}`),i.push(d.text),r-=d.end-l+1}}return i.join(`
68
+ `)}function ti(e,{sourceAccess:t=!1,repoRoot:n=null,readFile:s=null,tel:o=null,ask:i=null}={}){let r=e.byId;if(t&&(!n||typeof s!="function"))throw new TypeError("createGraphService({ sourceAccess: true }) requires both repoRoot and readFile \u2014 fs access is an injected capability, not an ambient import.");let a=c=>r.get(c)||null,l={version:nc,capabilities:[...oc],sourceAccess:!!t,graph:e,resolve(c){let{match:u,candidates:d}=Vt(e,String(c??""));return u?ht({match:wn(u),candidates:d.map(wn)}):gt(Xe.UNRESOLVED_TERM,{term:String(c??"")})},describe(c){let u=a(c);if(!u)return gt(Xe.UNRESOLVED_TERM,{term:c});let{out:d,incoming:m}=N$(e,c);return ht({individual:wn(u),out:d,incoming:m})},members(c){if(!a(c))return gt(Xe.UNRESOLVED_TERM,{term:c});let d=Se(e,"contains").filter(f=>f.subject===c),m=[],p=[];for(let f of d){let g=r.get(f.object),h=g?wn(g):{id:f.object,label:f.objectLabel||f.object,class:"Entity",attributes:[]};(g?.class||"")==="Attribute"?p.push(h):m.push(h)}return ht({methods:m,attributes:p})},subclasses(c){if(!a(c))return gt(Xe.UNRESOLVED_TERM,{term:c});let d=Se(e,"inherits"),m=d.filter(b=>b.subject===c).map(b=>r.get(b.object)?wn(r.get(b.object)):{id:b.object,label:b.objectLabel||b.object,class:"Class",attributes:[]}),p=new Map;for(let b of d)p.has(b.object)||p.set(b.object,[]),p.get(b.object).push(b.subject);let f=new Set([c]),g=[],h=[c];for(let b=0;b<8&&h.length;b+=1){let w=[];for(let v of h)for(let $ of p.get(v)||[]){if(f.has($))continue;f.add($);let k=r.get($);g.push(k?wn(k):{id:$,label:$,class:"Class",attributes:[]}),w.push($)}h=w}return ht({bases:m,subclasses:g})},exports(c){if(!a(c))return gt(Xe.UNRESOLVED_TERM,{term:c});let m=Se(e,"reexports").filter(p=>p.subject===c).map(p=>r.get(p.object)?wn(r.get(p.object)):{id:p.object,label:p.objectLabel||p.object,class:"Entity",attributes:[]});return ht({exports:m})},signature(c){let u=a(c);if(!u)return gt(Xe.UNRESOLVED_TERM,{term:c});let d=[];for(let[p,f]of[["isStatic","static"],["isAbstract","abstract"],["isConstant","constant"]])Pt(u,p)&&d.push(f);let m=Pt(u,"visibility");return m&&d.push(m),ht({id:u.id,label:u.label,class:u.class||"Entity",params:Pt(u,"params"),returns:Pt(u,"returns"),raises:Pt(u,"raises"),decorators:Pt(u,"decorators"),doc:Pt(u,"doc"),selfFields:Pt(u,"self_fields"),flags:d})},edges(c,u,{limit:d,offset:m=0}={}){if(!sc.includes(u))throw new TypeError(`edges(): unknown kind "${u}" (not in EDGE_KINDS)`);if(!a(c))return gt(Xe.UNRESOLVED_TERM,{term:c});let f=M$(e,u),g=Se(e,u).filter(h=>h.subject===c).map(h=>ei(h,f));return g=d==null?g.slice(m):g.slice(m,m+d),ht({kind:u,edges:g})},impact(c,{maxDepth:u}={}){let d=a(c);if(!d)return gt(Xe.UNRESOLVED_TERM,{term:c});let m=u==null?eo(e,d):eo(e,d,{maxDepth:u}),p=m.reduce((f,g)=>f+g.length,0);return ht({total:p,levels:m})},async snippet(c){let u=a(c);if(!u)return gt(Xe.UNRESOLVED_TERM,{term:c});let d=$t(u);if(!l.sourceAccess)return gt(Xe.NO_SOURCE,{term:c,detail:d?`span is ${d.path}:${d.start}-${d.end}; this provider exposes no working tree`:"no source span in the graph"});if(!d)return gt(Xe.NO_SOURCE,{term:c,detail:"no source span in the graph (likely a module)"});try{let m=await Mn({readFile:s,repoRoot:n,path:d.path,start:d.start,end:d.end,maxLines:rc});return ht({path:d.path,span:{start:d.start,end:d.end},body:m.text})}catch(m){return gt(Xe.NO_SOURCE,{term:c,detail:`could not read ${d.path}: ${m?.message||m}`})}},async context(c,{depth:u="auto"}={}){let{match:d}=Vt(e,String(c??""));if(!d)return gt(Xe.UNRESOLVED_TERM,{term:String(c??"")});let m=to(e,d),p=String(u||"auto").trim().toLowerCase(),f,g;p==="min"?(f="TINY",g=Es("TINY")):p==="full"?(f="FULL",g=Es("FULL")):{tier:f,mask:g}=Br(m,e,{});let h=Ed(m,g);if(!l.sourceAccess)return ht({text:h,tier:f});let b=await F$(m,g,{readFile:s,repoRoot:n});return ht({text:b?`${h}
69
+ ${b}`:h,tier:f})},architecture({package:c=""}={}){let u=String(c||"").trim().toLowerCase().replace(/^\.?\//,""),d=e.individuals.filter(b=>(b.class||"")==="Module"&&(!u||String(b.label||"").toLowerCase().startsWith(u))),m=new Map;for(let b of d){let w=b.label.includes("/")?b.label.slice(0,b.label.lastIndexOf("/")):"(root)";m.set(w,(m.get(w)||0)+1)}let p=new Set(d.map(b=>b.id)),f=new Map;for(let b of Se(e,"imports"))p.has(b.object)&&f.set(b.object,(f.get(b.object)||0)+1);let g=[...f.entries()].sort((b,w)=>w[1]-b[1]).map(([b,w])=>({id:b,label:r.get(b)?.label||b,importers:w})),h=[...m.entries()].sort((b,w)=>w[1]-b[1]);return ht({modules:d.length,packages:h,hubs:g})},untested(){let c=new Set(Se(e,"tests").map(d=>d.object)),u=e.individuals.filter(d=>(d.class||"")==="Module"&&!c.has(d.id)&&!/\.test\./.test(d.label||"")).map(wn);return ht({modules:u})},stats(){let c=new Map;for(let d of e.individuals){let m=d.class||"Entity";c.set(m,(c.get(m)||0)+1)}let u=[...c.entries()].map(([d,m])=>({class:d,count:m})).sort((d,m)=>m.count-d.count||d.class.localeCompare(m.class));return ht({total:e.individuals.length,classes:u,truncated:(e.truncated||[]).length>0})},history(c){if(!a(c))return gt(Xe.UNRESOLVED_TERM,{term:c});let d=[...Se(e,"touches"),...Se(e,"touchesSymbol")].filter(f=>f.object===c),m=new Set,p=[];for(let f of d){if(m.has(f.subject))continue;m.add(f.subject);let g=r.get(f.subject);p.push({id:f.subject,label:f.subjectLabel||g?.label||f.subject,author:g?Pt(g,"author")??Pt(g,"commitAuthor"):null,date:g?Pt(g,"date")??Pt(g,"commitDate"):null,message:g?Pt(g,"message")??Pt(g,"commitMessage"):null})}return ht({commits:p})},search(c,{kind:u="",name:d="",decorator:m="",limit:p=Dr,offset:f=0}={}){let g=String(c||""),h=String(u||"").trim().toLowerCase(),b=String(d||"").trim(),w=String(m||"").trim().toLowerCase(),v;if(h&&h!=="module"){let k=null;if(b){let j=ya(b);if(j.error)return gt(Xe.UNRESOLVED_TERM,{term:b,detail:j.error});k=j}let y=g.toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean);try{v=xa(e,y,{kind:h,decFilter:w,nameRe:k}).map(j=>j.ind)}catch(j){return gt(Xe.UNRESOLVED_TERM,{term:b,detail:String(j?.message||j)})}}else{let k=new Map;for(let y of e.individuals)(y.class||"")==="Module"&&k.set(y.label,y);v=nd(e,g).map(({path:y})=>k.get(y)).filter(Boolean)}let $=v.slice(f,f+p).map(wn);return ht({results:$})},ask(c){if(typeof i!="function")return gt(Xe.CAPABILITY_ABSENT,"this provider was constructed without an ask answerer");let{content:u,tmct_ask:d}=i(e,String(c||""));return ht({content:u,tmct_ask:d})}};if(o)for(let c of oc){let u=l[c];typeof u=="function"&&(l[c]=(...d)=>{let m=performance.now(),p=u.apply(l,d);return p&&typeof p.then=="function"?p.then(f=>(Xp(o,c,performance.now()-m,f),f)):(Xp(o,c,performance.now()-m,p),p)})}return l}function Xp(e,t,n,s){try{e.record({tool:`ri.${t}`,perf:{ms_total:n},response:D$(s)})}catch{}}function D$(e){if(!e||typeof e!="object"||e.ok!==!0)return{ok:!1,reason:e?.miss?.reason||null};let t=0,n=e.value;if(Array.isArray(n))t=n.length;else if(n&&typeof n=="object")for(let s of Object.values(n))Array.isArray(s)&&(t+=s.length);return{ok:!0,count:t}}var Pt,rc,P$,ni=L(()=>{Ce();Zr();Yp();Pt=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value??null;rc=200,P$=120});async function er(e,t){let n=await t.fetchEntities(e),s=Fr(n);if(!s.individuals.length){let o=new Oe(`the graph at ${e.graphFile} is empty \u2014 no entities to answer from yet (this repo starts with no graph; the chat session folds the conversation into one).`);throw o.emptyGraph=!0,o}return s}var si=L(()=>{Lt();Ce()});function ot(e,t){let n=String(e?.[t]||"").trim();if(!n)throw new Oe(`${t} is required`);return n}function yt(e,t,n){let{match:s,candidates:o}=Vt(e.graph,t);if(!s)throw new Oe(`no entity matching ${n} "${t}" in the code-map graph. Try a repo-relative path (e.g. path/to/module), a basename, or tmct_search for a fuzzy lookup.`);return{match:s,candidates:o}}var tr,Je,Ke=L(()=>{Lt();Ce();tr=200;Je=e=>(t,{graph:n,svc:s})=>{let{match:o}=yt(s,ot(t,"symbol"),"symbol");return e(n,o)}});async function Jp(e,{config:t,source:n=Qs,trim:s=!1,tel:o=null}={}){let i=String(e?.symbol||"").trim();if(!i)throw new Oe("symbol is required");let r=String(e?.depth||"auto").trim().toLowerCase(),a=!!e?.min,l=!!e?.untuned,c=!!e?.max,u=await er(t,n),d=$e($e(t.graphFile)),m=ti(u,{sourceAccess:!0,repoRoot:d,readFile:ze,tel:o,ask:ns}),{match:p}=yt(m,i,"symbol"),f=to(u,p),g,h,b=!1;a||r==="min"?(g="TINY",h=Es("TINY")):c||r==="full"?(g="FULL",h=Es("FULL"),b=!0):{tier:g,mask:h,topup:b}=Br(f,u,{untuned:l}),s&&!c&&(h=kd(h));let w=null;if(f.moduleLabel)try{({lines:w}=await Mn({readFile:ze,repoRoot:d,path:f.moduleLabel}))}catch{w=null}let v=y=>w&&w[y-1]!=null?w[y-1].trim():"",$=(y,j)=>os(w,y,j,tr).text,k=[`Edit context for ${f.moduleLabel} [${g}${s?" secondary":""}] \u2014 assembled from the typed graph + that file. You do NOT need to Read it; write the new code directly after reviewing this.`];if(h.anchor&&f.anchor?.site&&w){let{start:y,end:j}=f.anchor.site;k.push(`
70
+ ## anchor: ${f.anchor.label} (${f.anchor.class}) @ ${f.moduleLabel}:${y}-${j}`),k.push($(y,j)),f.callHint&&k.push(f.callHint)}if(h.registration&&f.globals.length){k.push(`
71
+ ## registration / module globals (replicate this pattern):`);for(let y of f.globals)k.push(` ${y.label} = ${y.value}${y.site?` [:${y.site.start}]`:""}`)}if(h.exemplar&&f.exemplar?.site&&w){let{start:y,end:j}=f.exemplar.site,E=f.exemplar.decorators?` @${f.exemplar.decorators}`:"";k.push(`
72
+ ## closest example (full body) \u2014 copy this style: ${f.exemplar.label} (${f.exemplar.class})${E} @ ${f.moduleLabel}:${y}-${j}`),k.push($(y,j)),f.callHint&&k.push(f.callHint)}if(h.inlinedCallees&&f.calleeBodies.length&&w){let y=120;for(let j of f.calleeBodies){if(y<=0)break;let E=j.site.start,R=j.site.path===f.moduleLabel&&w?w:await Mn({readFile:ze,repoRoot:d,path:j.site.path}).then(A=>A.lines).catch(()=>null);if(!R)continue;let S=os(R,E,j.site.end,y);k.push(`
73
+ ## inlined callee body (depth-1 in-repo call): ${j.label} @ ${j.site.path}:${E}-${j.site.end}`),k.push(S.text),y-=S.end-E+1}}if(h.classMembers&&f.classMembers&&f.classMembers.members.length){k.push(`
74
+ ## members of ${f.classMembers.className} (the edit likely lives INSIDE this class \u2014 copy a member's shape, do not read the class body):`);for(let y of f.classMembers.members){let j=String(y.label).split(".").pop(),E=y.params!=null&&y.params!==""?`(${y.params})${y.returns?` -> ${y.returns}`:""}`:"",_=y.decorators?`@${y.decorators} `:"",R=y.raises?` raises=${y.raises}`:"";k.push(` ${y.class} ${j}${y.site?` :${y.site.start}`:""} ${_}${j}${E}${R}`)}}if(h.siblings&&f.siblings.length){k.push(`
75
+ ## sibling symbols to copy the style of (most relevant first; ${f.siblings.length} total):`);for(let y of f.siblings.slice(0,f.siblingCap)){let j=y.site?v(y.site.start):"",E=y.decorators?`@${y.decorators} `:"",_=y.raises?` raises=${y.raises}`:"";k.push(` ${y.class} ${y.label}${y.site?` :${y.site.start}`:""} ${E}${j}${_}`)}f.siblings.length>f.siblingCap&&k.push(` \u2026+${f.siblings.length-f.siblingCap} more (use tmct_search kind=function or tmct_snippet <name> for any of them)`)}if(h.allExports&&f.allExports&&k.push(`
76
76
  ## module __all__ \u2014 this module curates its public API; ADD your new public symbol to this list so it is importable:
77
77
  ${f.allExports}`),h.reexports&&f.exports&&f.exports.length&&k.push(`
78
- ## re-exported symbols (resolved __all__ \u2192 defining module): ${f.exports.join(", ")}`),h.insertionRegion&&f.insertionRegion&&y){let $=f.insertionRegion.start,T=Math.min(y.length,$+40-1);k.push(`
79
- ## insertion region (write your new sibling here) \u2014 ${f.moduleLabel}:${$}-${T}`),k.push(y.slice($-1,T).map((S,j)=>`${$+j} ${S}`).join(`
78
+ ## re-exported symbols (resolved __all__ \u2192 defining module): ${f.exports.join(", ")}`),h.insertionRegion&&f.insertionRegion&&w){let y=f.insertionRegion.start,j=Math.min(w.length,y+40-1);k.push(`
79
+ ## insertion region (write your new sibling here) \u2014 ${f.moduleLabel}:${y}-${j}`),k.push(w.slice(y-1,j).map((E,_)=>`${y+_} ${E}`).join(`
80
80
  `))}else f.insertion&&k.push(`
81
81
  ## insert the new sibling after line ~${f.insertion} (end of the last top-level definition).`);return h.tests&&f.tests.length&&k.push(`
82
82
  ## covering tests: ${f.tests.join(", ")}`),h.cochange&&f.cochange&&f.cochange.length&&k.push(`
83
- ## usually changed together (consider editing these too): ${f.cochange.map($=>`${$.label} (\xD7${$.weight})`).join(", ")}`),k.push(`
84
- You now have the snippet, the sibling style, the registration anchor and the tests. Write the new code with Edit/Write \u2014 do NOT Read ${f.moduleLabel}.`),g!=="FULL"&&k.push(`(bundle tier ${g}; for any omitted sections run tmct_context_more {"symbol":"${r}"}, or tmct_context with depth="full".)`),{text:k.join(`
85
- `),tier:g,topup:b}}async function Ha(e,{config:t,source:n,tel:s}){return(await Dp(e,{config:t,source:n,tel:s})).text}var Ka=L(()=>{yt();De();Lt();Hr();Mo();Ce();ns();Xr();Jr();He();Ha.ownsGraphLoad=!0});function zp(e,{graph:t,svc:n}){let{match:s}=wt(n,ot(e,"symbol"),"symbol");return pd(Zs(t,s))}var Up=L(()=>{Ce();He()});function Bp(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Qo(e){return Bp(e).toString(16).padStart(8,"0")}function b$(e){let t=new TextEncoder().encode(String(e)),n=t.length*8,s=new Uint8Array((t.length+8>>6)+1<<6);s.set(t),s[t.length]=128;let o=new DataView(s.buffer);o.setUint32(s.length-8,Math.floor(n/4294967296)),o.setUint32(s.length-4,n>>>0);let r=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),i=new Uint32Array(64),a=(u,d)=>u>>>d|u<<32-d;for(let u=0;u<s.length;u+=64){for(let w=0;w<16;w+=1)i[w]=o.getUint32(u+w*4);for(let w=16;w<64;w+=1){let v=a(i[w-15],7)^a(i[w-15],18)^i[w-15]>>>3,k=a(i[w-2],17)^a(i[w-2],19)^i[w-2]>>>10;i[w]=i[w-16]+v+i[w-7]+k>>>0}let[d,m,p,f,g,h,b,y]=r;for(let w=0;w<64;w+=1){let v=a(g,6)^a(g,11)^a(g,25),k=g&h^~g&b,$=y+v+k+g$[w]+i[w]>>>0,T=a(d,2)^a(d,13)^a(d,22),S=d&m^d&p^m&p,j=T+S>>>0;y=b,b=h,h=g,g=f+$>>>0,f=p,p=m,m=d,d=$+j>>>0}r[0]=r[0]+d>>>0,r[1]=r[1]+m>>>0,r[2]=r[2]+p>>>0,r[3]=r[3]+f>>>0,r[4]=r[4]+g>>>0,r[5]=r[5]+h>>>0,r[6]=r[6]+b>>>0,r[7]=r[7]+y>>>0}let l=new Uint8Array(32),c=new DataView(l.buffer);for(let u=0;u<8;u+=1)c.setUint32(u*4,r[u]);return l}function w$(e,t){let n=b$(e),s="";for(let o=0;o<t;o+=1)s+=n[o].toString(16).padStart(2,"0");return s}function ee(e){let t=Pn(e);return t=t.replace(/^\/c\/[a-z]{2,3}\//i,""),t=t.replace(/^[a-z][\w.-]*:/i,""),t=t.replace(/_/g," ").replace(/\s+/g," ").trim(),t=t.replace(/^(?:the|an?)\s+/i,""),t.toLowerCase()}function Fn(e){let t=Pn(e);return v$.get(t)??t}function be(e,t,n){return Zo(ee(e),Fn(t),ee(n))}var g$,y$,Pn,v$,Zo,cn=L(()=>{g$=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);y$=2e3,Pn=e=>String(e??"").replace(/\s+/g," ").trim().slice(0,y$);v$=new Map([["mgx:cause","mgx:causes"],["mgx:desire","mgx:desires"],["mgx:want","mgx:desires"],["mgx:require","mgx:hasPrerequisite"],["mgx:involve","mgx:hasSubevent"]]);Zo=(e,t,n)=>`fact:${w$(`${e}\0${t}\0${n}`,8)}`});var Qt={};Sn(Qt,{CARDINALITY_RULE_CONFIDENCE:()=>_$,CAX_DW_RULE:()=>Xa,CAX_DW_RULE_CONFIDENCE:()=>Qa,CAX_MAXC0_RULE_CONFIDENCE:()=>A$,CLS_SVF1_RULE:()=>Za,CLS_SVF1_RULE_CONFIDENCE:()=>tc,DEFAULT_MAX_ENVIRONMENTS:()=>Qr,DISJOINT_PREDICATE:()=>io,ENTAILED_DISJOINT_PROVENANCE:()=>Ja,ENTAILED_PROVENANCE:()=>Gp,ENTAILED_SCM_SVF_PROVENANCE:()=>oc,ENTAILED_SVF1_PROVENANCE:()=>ec,ENTAILED_TYPE_PROVENANCE:()=>Hp,ON_PROPERTY_PREDICATE:()=>yn,SCM_SVF_RULE:()=>sc,SCM_SVF_RULE_CONFIDENCE:()=>rc,SOME_VALUES_FROM_PREDICATE:()=>vn,SUBCLASS_PREDICATE:()=>Pe,TYPE_PREDICATE:()=>At,buildCardinalityRestrictions:()=>j$,buildRelevanceFrontier:()=>Ya,deriveDisjointViolations:()=>Jp,deriveSomeValuesFromApplication:()=>Qp,deriveSomeValuesFromSubsumption:()=>Zp,deriveSubClassClosure:()=>Kp,deriveSubClassClosureDelta:()=>Yp,deriveTypePropagation:()=>Xp,entailedTrustFrom:()=>x$,findConsistencyViolations:()=>C$,findIsaChain:()=>ic,proveCardinalityAtLeast:()=>R$,proveMaxCardinalityZeroDenial:()=>T$,retractSubClassOf:()=>M$,syllogise:()=>I$});function Wp(e,t,n){for(let s of t)if(typeof e?.[s]!="function")throw new TypeError(`${n} needs a store option carrying { ${t.join(", ")} } (memory/core.mjs's read/write functions) \u2014 missing ${s}`);return e}function x$(e,t=1){let n=(Array.isArray(e)?e:[]).filter(o=>typeof o=="number");if(!n.length)return null;let s=Math.max(0,Math.min(1,Math.min(...n)*t));return Number(s.toFixed(6))}function Dn(e){if(!e)return null;let t=e instanceof Set?[...e]:Array.isArray(e)?e:[],n=new Set;for(let s of t){let o=ee(s);o&&n.add(o)}return n.size?n:null}function Kp(e,{depth:t=32,budget:n=50,focus:s=null}={}){let o=new Set,r=new Map;for(let[u,d]of e||[])!u||!d||u===d||(o.add(`${u}${Ie}${d}`),r.has(u)||r.set(u,new Set),r.get(u).add(d));let i=s instanceof Set?s.size?s:null:Dn(s),a=(u,d,m)=>!i||i.has(u)||i.has(d)||i.has(m),l=[],c=new Set;for(let u=0;u<t;u+=1){let d=[];for(let[p,f]of r)for(let g of f){let h=r.get(g);if(h)for(let b of h){if(p===b)continue;let y=`${p}${Ie}${b}`;o.has(y)||c.has(y)||a(p,g,b)&&d.push([p,g,b,y])}}if(!d.length)break;d.sort((p,f)=>p[0].localeCompare(f[0])||p[2].localeCompare(f[2])||p[1].localeCompare(f[1]));let m=!1;for(let[p,f,g,h]of d)if(!c.has(h)){if(l.length>=n)break;c.add(h),l.push({subject:p,object:g,via:f}),r.has(p)||r.set(p,new Set),r.get(p).add(g),m=!0}if(l.length>=n||!m)break}return l}function Yp(e,t,{depth:n=32,budget:s=50,focus:o=null}={}){let r=new Set,i=new Map,a=new Map;for(let[f,g]of e||[])!f||!g||f===g||(r.add(`${f}${Ie}${g}`),i.has(f)||i.set(f,new Set),i.get(f).add(g),a.has(g)||a.set(g,new Set),a.get(g).add(f));let l=[],c=new Set;for(let[f,g]of t||[]){if(!f||!g||f===g)continue;let h=`${f}${Ie}${g}`;c.has(h)||(c.add(h),l.push([f,g]))}let u=o instanceof Set?o.size?o:null:Dn(o),d=(f,g,h)=>!u||u.has(f)||u.has(g)||u.has(h),m=[],p=new Set;for(let f=0;f<n&&l.length;f+=1){let g=[],h=(w,v,k)=>{if(w===k)return;let $=`${w}${Ie}${k}`;r.has($)||p.has($)||d(w,v,k)&&g.push([w,v,k,$])};for(let[w,v]of l){for(let k of i.get(v)||[])h(w,v,k);for(let k of a.get(w)||[])h(k,w,v)}if(!g.length)break;g.sort((w,v)=>w[0].localeCompare(v[0])||w[2].localeCompare(v[2])||w[1].localeCompare(v[1]));let b=!1,y=[];for(let[w,v,k,$]of g)if(!p.has($)){if(m.length>=s)break;p.add($),m.push({subject:w,object:k,via:v}),i.has(w)||i.set(w,new Set),i.get(w).add(k),a.has(k)||a.set(k,new Set),a.get(k).add(w),y.push([w,k]),b=!0}if(m.length>=s||!b)break;l=y}return m}function $n(e){let t=new Map;for(let[s,o]of e||[])!s||!o||s===o||(t.has(s)||t.set(s,new Set),t.get(s).add(o));let n=new Map;return s=>{if(n.has(s))return n.get(s);let o=new Set,r=[...t.get(s)||[]];for(;r.length;){let i=r.pop();if(!o.has(i)){o.add(i);for(let a of t.get(i)||[])o.has(a)||r.push(a)}}return n.set(s,o),o}}function k$(e){return $n((e||[]).map(([t,n])=>[n,t]))}function Ya(e,t){let n=[],s=[],o=new Map,r=new Map;for(let c of e||[])!c||!c.subject||!c.predicate||!c.object||(os(c.predicate)?n.push([c.subject,c.object]):Ts(c.predicate)?s.push([c.subject,c.object]):ao(c.predicate)?o.set(c.subject,c.object):tr(c.predicate)&&r.set(c.subject,c.object));let i=k$(n),a=new Set;for(let c of t||[]){let u=ee(c);if(u){a.add(u);for(let d of i(u))a.add(d)}}let l=new Set(a);for(let[c,u]of s)a.has(u)&&l.add(c);for(let[c,u]of r)o.has(c)&&a.has(u)&&l.add(c);return l}function Xp(e,t,{budget:n=50,focus:s=null,presentTypeEdges:o=e}={}){let r=$n(t),i=new Set,a=new Set;for(let[p,f]of o||[])p&&f&&i.add(`${p}${Ie}${f}`);let l=s instanceof Set?s.size?s:null:Dn(s),c=(p,f,g)=>!l||l.has(p)||l.has(f)||l.has(g),u=[];for(let[p,f]of e||[]){if(!p||!f)continue;let g=`${p}${Ie}${f}`;if(!a.has(g)){a.add(g);for(let h of r(f)){if(h===f||h===p)continue;let b=`${p}${Ie}${h}`;i.has(b)||c(p,f,h)&&u.push([p,f,h,b])}}}u.sort((p,f)=>p[0].localeCompare(f[0])||p[2].localeCompare(f[2])||p[1].localeCompare(f[1]));let d=[],m=new Set;for(let[p,f,g,h]of u)if(!m.has(h)){if(d.length>=n)break;m.add(h),d.push({subject:p,object:g,via:f})}return d}function Jp(e,t,n,{budget:s=50,focus:o=null}={}){let r=$n(t),i=new Map,a=new Set;for(let[f,g]of n||[])!f||!g||f===g||(a.add(`${f}${Ie}${g}`),a.add(`${g}${Ie}${f}`),i.has(f)||i.set(f,new Set),i.get(f).add(g),i.has(g)||i.set(g,new Set),i.get(g).add(f));if(!i.size)return[];let l=new Set,c=o instanceof Set?o.size?o:null:Dn(o),u=(f,g,h)=>!c||c.has(f)||c.has(g)||c.has(h),d=[];for(let[f,g]of e||[]){if(!f||!g)continue;let h=`${f}${Ie}${g}`;if(!l.has(h)){l.add(h);for(let b of[g,...r(g)]){let y=i.get(b);if(y)for(let w of y){if(w===f)continue;let v=`${f}${Ie}${w}`;a.has(v)||u(f,g,w)&&d.push([f,g,b,w,v])}}}}d.sort((f,g)=>f[0].localeCompare(g[0])||f[3].localeCompare(g[3])||f[2].localeCompare(g[2])||f[1].localeCompare(g[1]));let m=[],p=new Set;for(let[f,g,h,b,y]of d)if(!p.has(y)){if(m.length>=s)break;p.add(y),m.push({subject:f,object:b,viaType:g,viaClass:h})}return m}function Qp(e,t,n,s,{budget:o=50,focus:r=null}={}){let i=$n(n),a=new Map;for(let h of s||[]){if(!h||!h.restriction||!h.property||!h.target)continue;let b=`${h.property}${Ie}${h.target}`;a.has(b)||a.set(b,new Set),a.get(b).add(h.restriction)}if(!a.size)return[];let l=new Set,c=new Map;for(let[h,b]of t||[])!h||!b||(l.add(`${h}${Ie}${b}`),c.has(h)||c.set(h,new Set),c.get(h).add(b));let u=r instanceof Set?r.size?r:null:Dn(r),d=(h,b,y)=>!u||u.has(h)||u.has(b)||u.has(y),m=new Set,p=[];for(let[h,b,y]of e||[]){if(!h||!b||!y)continue;let w=ee(b),v=`${h}${Ie}${w}${Ie}${y}`;if(m.has(v))continue;m.add(v);let k=c.get(y);if(k)for(let $ of k)for(let T of[$,...i($)]){let S=a.get(`${w}${Ie}${T}`);if(S)for(let j of S){if(h===j)continue;let C=`${h}${Ie}${j}`;l.has(C)||d(h,y,j)&&p.push([h,b,w,y,$,T,j,C])}}}p.sort((h,b)=>h[0].localeCompare(b[0])||h[6].localeCompare(b[6])||h[1].localeCompare(b[1])||h[3].localeCompare(b[3]));let f=[],g=new Set;for(let[h,b,y,w,v,k,$,T]of p)if(!g.has(T)){if(f.length>=o)break;g.add(T),f.push({subject:h,object:$,viaProperty:b,viaPropertyKey:y,viaValue:w,viaType:v,viaTarget:k})}return f}function j$(e){let t=new Map,n=new Map,s=new Map;for(let r of e||[])if(!(!r||!r.subject||!r.predicate))if(ao(r.predicate))t.set(r.subject,r.object);else if($$(r.predicate))s.set(r.subject,r.object);else{let i=S$[String(r.predicate).trim().toLowerCase()];if(!i)continue;let a=Number(r.object);Number.isFinite(a)&&n.set(r.subject,{kind:i,n:a})}let o=[];for(let[r,{kind:i,n:a}]of n){if(t.get(r)!==E$)continue;let l=s.get(r);l&&o.push({restriction:r,kind:i,n:a,onClass:l})}return o.sort((r,i)=>r.restriction.localeCompare(i.restriction)),o}function Zp(e,t,{budget:n=50,focus:s=null}={}){let o=$n(t),r=new Map;for(let m of e||[]){if(!m||!m.restriction||!m.property||!m.target)continue;let p=ee(m.property);r.has(p)||r.set(p,[]),r.get(p).push({restriction:m.restriction,target:m.target})}let i=new Set;for(let[m,p]of t||[])m&&p&&i.add(`${m}${Ie}${p}`);let a=s instanceof Set?s.size?s:null:Dn(s),l=(m,p)=>!a||a.has(m)||a.has(p),c=[];for(let[,m]of r)if(!(m.length<2))for(let p of m)for(let f of m){if(p.restriction===f.restriction||p.target===f.target||!o(p.target).has(f.target))continue;let g=`${p.restriction}${Ie}${f.restriction}`;i.has(g)||l(p.restriction,f.restriction)&&c.push([p.restriction,f.restriction,p.target,f.target,g])}c.sort((m,p)=>m[0].localeCompare(p[0])||m[1].localeCompare(p[1]));let u=[],d=new Set;for(let[m,p,f,g,h]of c)if(!d.has(h)){if(u.length>=n)break;d.add(h),u.push({subject:m,object:p,viaY1:f,viaY2:g})}return u}function ef(e,t,n,s,{budget:o=20,focus:r=null}={}){if(!n)return null;let i=$n(e),a=r instanceof Set?r.size?r:null:Dn(r),l=m=>!a||a.has(n)||a.has(m),c=new Map;for(let[m,p]of e||[])!m||!p||(c.has(m)||c.set(m,new Set),c.get(m).add(p));let u=new Map((t||[]).map(m=>[m.restriction,m])),d=0;for(let m of[n,...i(n)]){if(d>=o)break;if(d+=1,!!l(m))for(let p of c.get(m)||[]){let f=u.get(p);if(f&&s(f))return{viaClass:m,viaRestriction:p,record:f}}}return null}function R$(e,t,n,s,o,r={}){if(!s||!Number.isFinite(o))return null;let i=ef(e,t,n,a=>a.onClass===s&&(a.kind==="exactly"||a.kind==="min")&&a.n>=o,r);return i?{subject:n,object:s,m:o,n:i.record.n,kind:i.record.kind,viaClass:i.viaClass,viaRestriction:i.viaRestriction}:null}function T$(e,t,n,s,o={}){if(!s)return null;let r=ef(e,t,n,i=>i.onClass===s&&i.kind==="max"&&i.n===0,o);return r?{subject:n,object:s,viaClass:r.viaClass,viaRestriction:r.viaRestriction}:null}function C$(e,t,n,{budget:s=50,focus:o=null}={}){let r=$n(t),i=new Map;for(let[p,f]of n||[])!p||!f||p===f||(i.has(p)||i.set(p,new Set),i.get(p).add(f),i.has(f)||i.set(f,new Set),i.get(f).add(p));if(!i.size)return[];let a=new Map;for(let[p,f]of e||[])!p||!f||(a.has(p)||a.set(p,new Set),a.get(p).add(f));let l=o instanceof Set?o.size?o:null:Dn(o),c=p=>!l||l.has(p),u=[],d=new Set;for(let[p,f]of a){if(!c(p))continue;let g=[...f].sort();for(let h=0;h<g.length;h+=1)for(let b=h+1;b<g.length;b+=1){let[y,w]=[g[h],g[b]],v=[y,...r(y)],k=[w,...r(w)],$=null;for(let S of v){let j=i.get(S);if(j){for(let C of k)if(j.has(C)){$=[S,C];break}if($)break}}if(!$)continue;let T=`${p}${Ie}${y}${Ie}${w}`;d.has(T)||(d.add(T),u.push([p,y,w,$[0],$[1]]))}}u.sort((p,f)=>p[0].localeCompare(f[0])||p[1].localeCompare(f[1])||p[2].localeCompare(f[2]));let m=[];for(let[p,f,g,h,b]of u){if(m.length>=s)break;m.push({subject:p,classA:f,classB:g,viaA:h,viaB:b})}return m}async function I$(e,{depth:t=32,budget:n=50,focus:s=null,expandFocus:o=!1,maxEnvironments:r=Qr,full:i=!1,store:a}={}){let{loadMemory:l,readFactRows:c,appendFacts:u}=Wp(a,["loadMemory","readFactRows","appendFacts"],"syllogise"),d=typeof a?.loadSyllogiseState=="function"&&typeof a?.saveSyllogiseState=="function",m=await l(e),p=c(m),f=p.filter(x=>os(x.predicate)).map(x=>[x.subject,x.object]),g=p.filter(x=>Ts(x.predicate)).map(x=>[x.subject,x.object]),h=p.filter(x=>As(x.predicate)).map(x=>[x.subject,x.object]),b=new Map,y=new Map,w=[];for(let x of p){let de=String(x.predicate||"").trim().toLowerCase();ao(x.predicate)?b.set(x.subject,x.object):tr(x.predicate)?y.set(x.subject,x.object):nc.has(de)||w.push([x.subject,x.predicate,x.object])}let v=[];for(let[x,de]of b){let Re=y.get(x);Re&&v.push({restriction:x,property:de,target:Re})}let k=Dn(s),$=o&&k?Ya(p,[...k]):k,T=$===null&&d?await a.loadSyllogiseState(e):null,S=new Set(p.map(x=>x.id)),j=Array.isArray(T?.factIds)?T.factIds.filter(x=>!S.has(x)):[],C=T&&Array.isArray(T.factIds)&&!j.length&&!i?"delta":"full",E=C==="delta"?new Set(T.factIds):null,R=C==="delta"?p.filter(x=>!E.has(x.id)):p,N=R.length,A=new Map;for(let x of p)A.set(`${x.subject}${Ie}${x.predicate}${Ie}${x.object}`,x.trust);let P=(x,de,Re)=>A.get(`${x}${Ie}${de}${Ie}${Re}`),V=(x,de,Re)=>A.has(`${x}${Ie}${de}${Ie}${Re}`),Y=x=>x.filter(de=>typeof de=="number"),M=C==="delta"&&!R.length,F=C==="delta"?R.filter(x=>os(x.predicate)).map(x=>[x.subject,x.object]):[],W=C==="delta"?F.length?Yp(f,F,{depth:t,budget:n,focus:$}):[]:Kp(f,{depth:t,budget:n,focus:$}),U=f.concat(W.map(x=>[x.subject,x.object])),B=$,_=null;if(C==="delta"&&!M){let x=p.concat(W.map(Re=>({subject:Re.subject,predicate:Pe,object:Re.object}))),de=[];for(let Re of R)de.push(Re.subject,Re.object);_=Ya(x,de),B=_}let I=x=>!_||_.has(x),O=_?g.filter(([x,de])=>I(x)||I(de)):g,z=new Set;if(_)for(let x of R)As(x.predicate)&&(z.add(x.subject),z.add(x.object));let q=_&&z.size?$n(U):null,K=_?g.filter(([x,de])=>I(x)||I(de)||q&&[...q(de)].some(Re=>z.has(Re))):g,X=new Set;if(_){for(let x of R)if(ao(x.predicate)||tr(x.predicate)){let de=b.get(x.subject);de&&X.add(ee(de))}}let H=_?w.filter(([x,de,Re])=>I(x)||I(Re)||X.has(ee(de))):w,Q=Math.max(0,n-W.length),re=Q>0&&!M?Xp(O,U,{budget:Q,focus:B,presentTypeEdges:g}):[],ue=Math.max(0,n-W.length-re.length),te=ue>0&&!M?Jp(K,U,h,{budget:ue,focus:B}):[],ie=Math.max(0,n-W.length-re.length-te.length),ne=ie>0&&v.length&&!M?Qp(H,g,U,v,{budget:ie,focus:B}):[],Oe=Math.max(0,n-W.length-re.length-te.length-ne.length),oe=Oe>0&&v.length>1&&!M?Zp(v,U,{budget:Oe,focus:B}):[],ae=new Map(v.map(x=>[x.restriction,x])),xe=[...W.map(x=>({subject:x.subject,predicate:Pe,object:x.object,provenance:Gp,justification:[[be(x.subject,Pe,x.via),be(x.via,Pe,x.object)]]})),...re.map(x=>({subject:x.subject,predicate:At,object:x.object,provenance:Hp,justification:[[be(x.subject,At,x.via),be(x.via,Pe,x.object)]]})),...te.map(x=>{let de=V(x.viaClass,io,x.object),[Re,En]=de?[x.viaClass,x.object]:[x.object,x.viaClass],qs=Y([P(x.subject,At,x.viaType),P(Re,io,En),...x.viaClass!==x.viaType?[P(x.viaType,Pe,x.viaClass)]:[]]);return{subject:x.subject,predicate:io,object:x.object,provenance:Ja,justification:[[be(x.subject,At,x.viaType),be(Re,io,En),...x.viaClass!==x.viaType?[be(x.viaType,Pe,x.viaClass)]:[]]],...qs.length?{premiseTrusts:qs,ruleConfidence:Qa}:{}}}),...ne.map(x=>{let de=Y([P(x.subject,x.viaProperty,x.viaValue),P(x.viaValue,At,x.viaType),P(x.object,yn,x.viaPropertyKey),P(x.object,vn,x.viaTarget),...x.viaType!==x.viaTarget?[P(x.viaType,Pe,x.viaTarget)]:[]]);return{subject:x.subject,predicate:At,object:x.object,provenance:ec,justification:[[be(x.subject,x.viaProperty,x.viaValue),be(x.viaValue,At,x.viaType),be(x.object,yn,x.viaPropertyKey),be(x.object,vn,x.viaTarget),...x.viaType!==x.viaTarget?[be(x.viaType,Pe,x.viaTarget)]:[]]],...de.length?{premiseTrusts:de,ruleConfidence:tc}:{}}}),...oe.map(x=>{let de=ae.get(x.subject),Re=ae.get(x.object),En=Y([de&&P(x.subject,yn,de.property),P(x.subject,vn,x.viaY1),Re&&P(x.object,yn,Re.property),P(x.object,vn,x.viaY2),P(x.viaY1,Pe,x.viaY2)]);return{subject:x.subject,predicate:Pe,object:x.object,provenance:oc,justification:[[...de?[be(x.subject,yn,de.property)]:[],be(x.subject,vn,x.viaY1),...Re?[be(x.object,yn,Re.property)]:[],be(x.object,vn,x.viaY2),be(x.viaY1,Pe,x.viaY2)]],...En.length?{premiseTrusts:En,ruleConfidence:rc}:{}}})],Se=xe.map(x=>({id:be(x.subject,x.predicate,x.object),subject:x.subject,predicate:x.predicate,object:x.object,environments:x.justification,write:x})),G=nf(p.concat(Se.map(x=>({id:x.id,subject:x.subject,predicate:x.predicate,object:x.object})))),fe=new Map(p.map(x=>[x.id,x])),ce=x=>os(x)||Ts(x)||As(x),le=x=>C!=="delta"||_!==null&&(_.has(x.subject)||_.has(x.object)),me=p.filter(x=>ce(x.predicate)&&tf(x.provenance)&&er(x).length<r&&le(x)).map(x=>({id:x.id,subject:x.subject,predicate:x.predicate,object:x.object,environments:er(x),provenance:x.provenance})),jt=[...Se,...me].sort((x,de)=>x.subject.localeCompare(de.subject)||x.predicate.localeCompare(de.predicate)||x.object.localeCompare(de.object)),sn=0,Qe=!1,un=0;for(let x of jt){if(un>=n){Qe=!0;break}un+=1;let de=G(x,{maxEnvironments:r+1}),{kept:Re,truncated:En}=L$(x.environments,de,r);if(En&&(Qe=!0),!(Re.length<=x.environments.length)){if(sn+=Re.length-x.environments.length,x.write){x.write.justification=Re;continue}xe.push({subject:x.subject,predicate:x.predicate,object:x.object,justification:Re,...sf(x.provenance,Re,qs=>fe.get(qs)?.trust)||{}})}}let{ids:Vt}=await u(e,xe),zt=[],It=0;for(let x of W)zt.push({id:Vt[It],subject:x.subject,object:x.object,via:x.via,rule:qp}),It+=1;for(let x of re)zt.push({id:Vt[It],subject:x.subject,object:x.object,via:x.via,rule:Vp}),It+=1;for(let x of te)zt.push({id:Vt[It],subject:x.subject,object:x.object,via:x.viaClass,rule:Xa}),It+=1;for(let x of ne)zt.push({id:Vt[It],subject:x.subject,object:x.object,via:x.viaValue,rule:Za}),It+=1;for(let x of oe)zt.push({id:Vt[It],subject:x.subject,object:x.object,via:x.viaY1,rule:sc}),It+=1;let $r=zt.length>=n;if($===null&&d&&!$r){let x=new Set(S);for(let de of Vt)x.add(de);await a.saveSyllogiseState(e,{version:1,factIds:[...x].sort(),completedAt:new Date().toISOString()})}return{derived:zt,count:zt.length,budget:n,depth:t,truncated:$r,mode:C,deltaSize:N,environmentsAdded:sn,alternatesTruncated:Qe}}function tf(e){let t=String(e||"").split(" | ").filter(Boolean);return t.length>0&&t.every(n=>n.startsWith("entailed:"))}function O$(e){let t=[],n=new Map,s=new Map,o=new Map,r=new Map,i=new Map;for(let u of e){let d=String(u.predicate||"").trim().toLowerCase();os(u.predicate)?t.push([u.subject,u.object]):Ts(u.predicate)?(n.has(u.subject)||n.set(u.subject,new Set),n.get(u.subject).add(u.object)):As(u.predicate)?(s.has(u.subject)||s.set(u.subject,new Set),s.get(u.subject).add(u.object),s.has(u.object)||s.set(u.object,new Set),s.get(u.object).add(u.subject)):ao(u.predicate)?o.set(u.subject,u.object):tr(u.predicate)?r.set(u.subject,u.object):nc.has(d)||(i.has(u.subject)||i.set(u.subject,[]),i.get(u.subject).push([ee(u.predicate),u.object]))}let a=$n(t),l=(u,d)=>u!==d&&a(u).has(d),c=u=>{let d=o.get(u),m=r.get(u);return d&&m?{property:ee(d),target:m}:null};return u=>{if(os(u.predicate)){if(l(u.subject,u.object))return!0;let d=c(u.subject),m=c(u.object);return!!(d&&m&&d.property===m.property&&l(d.target,m.target))}if(Ts(u.predicate)){for(let m of n.get(u.subject)||[])if(l(m,u.object))return!0;let d=c(u.object);if(d){for(let[m,p]of i.get(u.subject)||[])if(m===d.property){for(let f of n.get(p)||[])if(f===d.target||l(f,d.target))return!0}}return!1}if(As(u.predicate)){for(let d of n.get(u.subject)||[])for(let m of[d,...a(d)])if(s.get(m)?.has(u.object))return!0;return!1}return!0}}function nf(e){let t=new Set,n=[],s=new Map,o=new Map,r=new Set,i=new Map,a=new Map,l=new Map,c=new Map;for(let p of e){if(!p||!p.subject||!p.predicate||!p.object)continue;p.id&&t.add(p.id);let f=String(p.predicate||"").trim().toLowerCase();os(p.predicate)?(n.push([p.subject,p.object]),s.has(p.subject)||s.set(p.subject,new Set),s.get(p.subject).add(p.object)):Ts(p.predicate)?(o.has(p.subject)||o.set(p.subject,new Set),o.get(p.subject).add(p.object)):As(p.predicate)?(r.add(`${p.subject}${Ie}${p.object}`),i.has(p.subject)||i.set(p.subject,new Set),i.get(p.subject).add(p.object),i.has(p.object)||i.set(p.object,new Set),i.get(p.object).add(p.subject)):ao(p.predicate)?a.set(p.subject,p.object):tr(p.predicate)?l.set(p.subject,p.object):nc.has(f)||(c.has(p.subject)||c.set(p.subject,[]),c.get(p.subject).push([p.predicate,p.object]))}let u=$n(n),d=p=>s.get(p)||new Set,m=p=>{let f=a.get(p),g=l.get(p);return f&&g?{property:f,propertyKey:ee(f),target:g}:null};return(p,{maxEnvironments:f=Qr}={})=>{let g=[],h=new Set,b=y=>{if(g.length>=f||p.id&&y.includes(p.id)||!y.every(v=>t.has(v)))return;let w=[...y].sort().join(" ");h.has(w)||(h.add(w),g.push(y))};if(os(p.predicate)){for(let y of[...d(p.subject)].sort()){if(g.length>=f)break;y===p.subject||y===p.object||d(y).has(p.object)&&b([be(p.subject,Pe,y),be(y,Pe,p.object)])}if(g.length<f){let y=m(p.subject),w=m(p.object);y&&w&&y.propertyKey===w.propertyKey&&y.target!==w.target&&d(y.target).has(w.target)&&b([be(p.subject,yn,y.property),be(p.subject,vn,y.target),be(p.object,yn,w.property),be(p.object,vn,w.target),be(y.target,Pe,w.target)])}return g}if(Ts(p.predicate)){for(let w of[...o.get(p.subject)||[]].sort()){if(g.length>=f)break;w!==p.object&&d(w).has(p.object)&&b([be(p.subject,At,w),be(w,Pe,p.object)])}let y=m(p.object);if(y){let w=[...c.get(p.subject)||[]].filter(([v])=>ee(v)===y.propertyKey).sort((v,k)=>v[0].localeCompare(k[0])||v[1].localeCompare(k[1]));for(let[v,k]of w){if(g.length>=f)break;for(let $ of[...o.get(k)||[]].sort()){if(g.length>=f)break;$!==y.target&&!d($).has(y.target)||b([be(p.subject,v,k),be(k,At,$),be(p.object,yn,y.propertyKey),be(p.object,vn,y.target),...$!==y.target?[be($,Pe,y.target)]:[]])}}}return g}if(As(p.predicate)){let y=[];for(let w of o.get(p.subject)||[])for(let v of[w,...u(w)])(i.get(v)||new Set).has(p.object)&&y.push([w,v]);y.sort((w,v)=>w[0].localeCompare(v[0])||w[1].localeCompare(v[1]));for(let[w,v]of y){if(g.length>=f)break;let k=r.has(`${v}${Ie}${p.object}`),[$,T]=k?[v,p.object]:[p.object,v];b([be(p.subject,At,w),be($,io,T),...v!==w?[be(w,Pe,v)]:[]])}return g}return g}}function L$(e,t,n){let s=[],o=new Set,r=!1;for(let i of[...e||[],...t||[]]){if(!Array.isArray(i)||!i.length)continue;let a=[...i].sort().join(" ");if(!o.has(a)){if(s.length>=n){r=!0;continue}o.add(a),s.push(i)}}return{kept:s,truncated:r}}function sf(e,t,n){let s;for(let i of String(e||"").split(" | ")){let a=N$.get(i);if(a!==void 0){s=a;break}}if(s===void 0)return null;let o=null,r=-1;for(let i of t||[]){let a=i.map(c=>n(c)).filter(c=>typeof c=="number");if(a.length!==i.length)continue;let l=Math.min(...a);l>r&&(r=l,o=a)}return o?{premiseTrusts:o,ruleConfidence:s}:null}async function M$(e,t,n,{budget:s=50,depth:o=32,maxEnvironments:r=Qr,store:i}={}){let{loadMemory:a,readFactRows:l,removeFacts:c}=Wp(i,["loadMemory","readFactRows","removeFacts"],"retractSubClassOf"),u=typeof i?.appendFacts=="function"?i.appendFacts:null,d=ee(t),m=ee(n),p=be(d,Pe,m),f=await a(e),g=l(f),h=new Map(g.map(C=>[C.id,C]));if(!h.has(p))return{retracted:[],count:0,budget:s,depth:o,truncated:!1,found:!1};let b=g.filter(C=>er(C).length&&tf(C.provenance)),y=new Map;for(let C of b)for(let E of er(C))for(let R of E)y.has(R)||y.set(R,new Set),y.get(R).add(C.id);let w=new Set([p]),v=[p],k=new Map,$=!1,T=0,S=[p];for(;T<o;T+=1){let C=new Set;for(let M of S)for(let F of y.get(M)||[])w.has(F)||C.add(F);let E=[...C].map(M=>h.get(M)).sort((M,F)=>M.subject.localeCompare(F.subject)||M.predicate.localeCompare(F.predicate)||M.object.localeCompare(F.object));if(!E.length)break;let R=g.filter(M=>!w.has(M.id)&&!C.has(M.id)),N=new Set(R.map(M=>M.id)),A=nf(R),P=O$(R),V=!1,Y=!1;S=[];for(let M of E){if(w.size>=s){Y=!0;break}let F=er(M),W=F.filter(B=>B.every(_=>N.has(_)));if(W.length){W.length!==F.length&&k.set(M.id,W);continue}let U=A(M,{maxEnvironments:r});if(U.length){k.set(M.id,U);continue}P(M)||(w.add(M.id),v.push(M.id),S.push(M.id),V=!0)}if(Y){$=!0;break}if(!V)break}!$&&T>=o&&($=b.some(C=>!w.has(C.id)&&C.justification.some(E=>w.has(E))));let{removed:j}=await c(e,v);if(u){let C=[...k.entries()].filter(([E])=>!w.has(E)).sort((E,R)=>E[0].localeCompare(R[0])).map(([E,R])=>{let N=h.get(E);return{subject:N.subject,predicate:N.predicate,object:N.object,justification:R,...sf(N.provenance,R,A=>h.get(A)?.trust)||{}}});C.length&&await u(e,C)}return{retracted:j,count:j.length,budget:s,depth:o,truncated:$,found:!0}}function ic(e,t,n,s,{maxHops:o=6}={}){let r=t instanceof Set?t:new Set(t||[]),i=new Map;for(let[c,u]of s||[])!c||!u||c===u||(i.has(c)||i.set(c,new Set),i.get(c).add(u));let a=[];for(let[c,u]of n||[])c===e&&u&&a.push({node:u,path:[{subject:c,predicate:At,object:u}]});for(let c of i.get(e)||[])a.push({node:c,path:[{subject:e,predicate:Pe,object:c}]});let l=new Set([e]);for(let c=1;c<=o&&a.length;c+=1){for(let{node:d,path:m}of a)if(r.has(d))return m;if(c===o)break;let u=[];for(let{node:d,path:m}of a)if(!l.has(d)){l.add(d);for(let p of i.get(d)||[])l.has(p)||u.push({node:p,path:[...m,{subject:d,predicate:Pe,object:p}]})}a=u}return null}var Pe,qp,Gp,At,Vp,Hp,io,Xa,Ja,Qa,yn,vn,Za,ec,tc,Qr,Ie,os,Ts,As,ao,tr,$$,nc,E$,S$,sc,oc,rc,_$,A$,er,N$,Ft=L(()=>{cn();Pe="rdfs:subClassOf",qp="subClassOf",Gp=`entailed:${qp}`,At="rdf:type",Vp="type",Hp=`entailed:${Vp}`,io="owl:disjointWith",Xa="disjointWith",Ja=`entailed:${Xa}`,Qa=.95,yn="owl:onProperty",vn="owl:someValuesFrom",Za="someValuesFrom",ec=`entailed:${Za}`,tc=.95,Qr=4,Ie="\u241F",os=e=>String(e||"").trim().toLowerCase()==="rdfs:subclassof",Ts=e=>String(e||"").trim().toLowerCase()==="rdf:type",As=e=>String(e||"").trim().toLowerCase()==="owl:disjointwith",ao=e=>String(e||"").trim().toLowerCase()==="owl:onproperty",tr=e=>String(e||"").trim().toLowerCase()==="owl:somevaluesfrom",$$=e=>String(e||"").trim().toLowerCase()==="owl:onclass",nc=new Set(["rdfs:subclassof","rdf:type","owl:disjointwith","owl:onproperty","owl:somevaluesfrom","owl:intersectionof"]);E$="has",S$={"owl:cardinality":"exactly","owl:mincardinality":"min","owl:maxcardinality":"max"};sc="someValuesFromSubsumption",oc=`entailed:${sc}`,rc=.95;_$=.95;A$=.95;er=e=>e.environments||(Array.isArray(e.justification)&&e.justification.length?[e.justification]:[]);N$=new Map([[Ja,Qa],[ec,tc],[oc,rc]])});function po(e){let t=String(e||""),n=of.get(t);return n||(t.startsWith(ac)?co+t.slice(ac.length):t)}function rf(e){let t=String(e||""),n=P$.get(t);return n||(t.startsWith(co)?ac+t.slice(co.length):null)}function lf(e,t,n,s,o){let r=null;for(let i of e){if(i===t)return[];let a=ic(i,new Set([t]),n,s,{maxHops:o});a&&(!r||a.length<r.length)&&(r=a)}return r}function ti(e,t,n,{maxHops:s=3}={}){let o=uo(e),r=uo(t),i=Array.isArray(n)?n:[],{typeEdges:a,subClassEdges:l}=cf(i),c=i.filter(b=>(b.predicate===ei||b.predicate===lo)&&r.has(b.object)),u=[];for(let b of c){let y=b.predicate===lo?"negative":"positive";if(o.has(b.subject)){u.push({fact:b,polarity:y,hops:0,chain:null});continue}let w=lf(o,b.subject,a,l,s);w&&w.length&&u.push({fact:b,polarity:y,hops:w.length,chain:w})}if(!u.length)return{verdict:"none",hops:0,positive:[],negative:[],chain:null,overrides:null,baseRate:lc(o,r,i,{maxHops:s})};u.sort((b,y)=>b.hops-y.hops||(y.fact.trust||0)-(b.fact.trust||0));let d=u[0].hops,m=u.filter(b=>b.hops===d),p=m.filter(b=>b.polarity==="positive").map(b=>b.fact),f=m.filter(b=>b.polarity==="negative").map(b=>b.fact),g=f.length&&!p.length?"negative":"positive",h=u.find(b=>b.hops>d&&b.polarity!==g)||null;return{verdict:p.length&&f.length?"both":f.length?"no":"yes",hops:d,positive:p,negative:f,chain:u[0].chain,overrides:h?{fact:h.fact,chain:h.chain}:null,baseRate:null}}function lc(e,t,n,{maxHops:s=3}={}){let o=uo(e),r=uo(t),i=Array.isArray(n)?n:[],a=i.filter(g=>g.predicate===Pe||g.predicate===At),l=a.filter(g=>o.has(g.subject)).map(g=>g.object);if(!l.length)return null;let c=l[0],u=[...new Set(a.filter(g=>g.object===c&&!o.has(g.subject)).map(g=>g.subject))],d=g=>{let h=i.find(b=>b.subject===g&&r.has(b.object)&&(b.predicate===ei||b.predicate===lo));return h?{name:g,polarity:h.predicate===lo?"negative":"positive",fact:h}:{name:g,polarity:"unknown",fact:null}},m=u.map(d),{typeEdges:p,subClassEdges:f}=cf(i);return{klass:c,kinds:u.length,positive:m.filter(g=>g.polarity==="positive"),negative:m.filter(g=>g.polarity==="negative"),unknown:m.filter(g=>g.polarity==="unknown"),chain:lf(o,c,p,f,s)}}function uc(e,t,{exclude:n=[],maxHops:s=3}={}){let o=uo(e),r=uo(n),i=Array.isArray(t)?t:[],a=new Set,l=[];for(let c of i)c.predicate!==ei||!o.has(c.object)||r.has(c.subject)||a.has(c.subject)||(a.add(c.subject),ti(new Set([c.subject]),o,i,{maxHops:s}).verdict==="yes"&&l.push(c));return l.sort(F$)}var co,ac,Zr,of,P$,af,ei,lo,cc,F$,uo,cf,dc=L(()=>{Ft();co="mgxneg:",ac="mgx:",Zr="mgxneg:subClassOf",of=new Map([[Pe,Zr]]),P$=new Map([...of].map(([e,t])=>[t,e]));af=e=>String(e||"").startsWith(co),ei="mgx:capableOf",lo=po(ei),cc=6,F$=(e,t)=>(t.trust||0)-(e.trust||0)||String(e.subject).localeCompare(String(t.subject)),uo=e=>e instanceof Set?e:new Set(Array.isArray(e)?e:[e]),cf=e=>({typeEdges:e.filter(t=>t.predicate===At).map(t=>[t.subject,t.object]),subClassEdges:e.filter(t=>t.predicate===Pe).map(t=>[t.subject,t.object])})});function fo(e,t){let n=(e?.attributes||[]).find(s=>s?.prop===t);return n?String(n.value??""):void 0}function B$(e,t){(!e?.class||!D$.has(e.class))&&t.push(`must have a class from the closed vocabulary Utterance | Fact | Session | Source | Rule (got ${JSON.stringify(e?.class)})`)}function W$(e,t){for(let s of["rdf:subject","rdf:predicate","rdf:object"])ni(fo(e,s))||t.push(`a Fact needs a non-empty ${s}`);for(let s of["rdf:subject","rdf:object"]){let o=fo(e,s);o!==void 0&&U$.test(o)&&t.push(`a Fact's ${s} must be a single term, not text spanning a sentence boundary (got ${JSON.stringify(o)})`)}let n=fo(e,"mgx:factProvenance");n!==void 0&&!ni(n)&&t.push("mgx:factProvenance, when present, must be non-empty")}function q$(e,t){ni(fo(e,"mgx:ruleName"))||t.push("a Rule needs a non-empty mgx:ruleName");let n=fo(e,"mgx:ruleKind");if(!n||!uf.has(n)){t.push(`a Rule's mgx:ruleKind must be one of ${[...uf].join(" | ")} (got ${JSON.stringify(n)})`);return}for(let s of z$[n])ni(fo(e,s))||t.push(`a ${n} Rule needs a non-empty ${s}`)}function G$(e){let t=[];return B$(e,t),e?.class==="Fact"&&W$(e,t),e?.class==="Rule"&&q$(e,t),{ok:t.length===0,violations:t}}function pc(e){let t=G$(e);if(!t.ok){let n=new Error(`SHACL validation failed for ${e?.class} "${e?.id}": ${t.violations.join(" | ")}`);throw n.violations=t.violations,n}}var D$,uf,z$,U$,ni,df=L(()=>{D$=new Set(["Utterance","Fact","Session","Source","Rule"]),uf=new Set(["compose2","filter","recursive","action-signature","action-precond","action-effect","action-constraint"]),z$={compose2:["mgx:ruleBase1","mgx:ruleBase2"],filter:["mgx:ruleBase1","mgx:ruleFilterProperty"],recursive:["mgx:ruleBaseCase","mgx:ruleRecStep"],"action-signature":["mgx:ruleActionSubjectClass","mgx:ruleActionTargetClass"],"action-precond":["mgx:ruleActionPrecondShape","mgx:ruleActionPrecondPredicate","mgx:ruleActionPrecondRole","mgx:ruleActionPrecondScope"],"action-effect":["mgx:ruleActionEffectPredicate","mgx:ruleActionEffectSubject"],"action-constraint":["mgx:ruleActionConstraintLeft","mgx:ruleActionConstraintRight","mgx:ruleActionConstraintGuard"]},U$=/[.!?]\s+\w/;ni=e=>typeof e=="string"&&e.trim().length>0});var pf={};Sn(pf,{access:()=>K$,appendFile:()=>J$,basename:()=>fx,copyFile:()=>ox,createInterface:()=>wx,createReadStream:()=>ix,createRequire:()=>V$,createWriteStream:()=>ax,default:()=>vx,dirname:()=>ux,existsSync:()=>cx,fileURLToPath:()=>hx,isAbsolute:()=>px,join:()=>lx,mkdir:()=>Q$,mkdtemp:()=>Z$,randomBytes:()=>gx,readFile:()=>Y$,readFileSync:()=>H$,readdir:()=>rx,rename:()=>ex,resolve:()=>dx,rm:()=>nx,sep:()=>mx,spawnSync:()=>bx,stat:()=>sx,tmpdir:()=>yx,unlink:()=>tx,writeFile:()=>X$});var rt,V$,H$,K$,Y$,X$,J$,Q$,Z$,ex,tx,nx,sx,ox,rx,ix,ax,cx,lx,ux,dx,px,fx,mx,hx,gx,bx,wx,yx,vx,ff=L(()=>{rt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},V$=rt("createRequire"),H$=rt("readFileSync"),K$=rt("access"),Y$=rt("readFile"),X$=rt("writeFile"),J$=rt("appendFile"),Q$=rt("mkdir"),Z$=rt("mkdtemp"),ex=rt("rename"),tx=rt("unlink"),nx=rt("rm"),sx=rt("stat"),ox=rt("copyFile"),rx=rt("readdir"),ix=rt("createReadStream"),ax=rt("createWriteStream"),cx=()=>!1,lx=(...e)=>e.join("/"),ux=e=>String(e).replace(/\/[^/]*$/,""),dx=(...e)=>e.join("/"),px=e=>String(e).startsWith("/"),fx=e=>String(e).split("/").pop(),mx="/",hx=e=>String(e),gx=rt("randomBytes"),bx=rt("spawnSync"),wx=rt("createInterface"),yx=()=>"/tmp",vx={}});var $x,nr,fc=L(()=>{$x=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,nr=class e extends Date{#t=!1;#n=!1;#e=null;constructor(t){let n=!0,s=!0,o="Z";if(typeof t=="string"){let r=t.match($x);r?(r[1]||(n=!1,t=`0000-01-01T${t}`),s=!!r[2],s&&t[10]===" "&&(t=t.replace(" ","T")),r[2]&&+r[2]>23?t="":(o=r[3]||null,t=t.toUpperCase(),!o&&s&&(t+="Z"))):t=""}super(t),isNaN(this.getTime())||(this.#t=n,this.#n=s,this.#e=o)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let t=super.toISOString();if(this.isDate())return t.slice(0,10);if(this.isTime())return t.slice(11,23);if(this.#e===null)return t.slice(0,-1);if(this.#e==="Z")return t;let n=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return n=this.#e[0]==="-"?n:-n,new Date(this.getTime()-n*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(t,n="Z"){let s=new e(t);return s.#e=n,s}static wrapAsLocalDateTime(t){let n=new e(t);return n.#e=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#n=!1,n.#e=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#t=!1,n.#e=null,n}}});function xx(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function kx(e,t,n){let s=e.split(/\r\n|\n|\r/g),o="",r=(Math.log10(t+1)|0)+1;for(let i=t-1;i<=t+1;i++){let a=s[i-1];a&&(o+=i.toString().padEnd(r," "),o+=": ",o+=a,o+=`
86
- `,i===t&&(o+=" ".repeat(r+n+2),o+=`^
87
- `))}return o}var he,Cs=L(()=>{he=class extends Error{line;column;codeblock;constructor(t,n){let[s,o]=xx(n.toml,n.ptr),r=kx(n.toml,s,o);super(`Invalid TOML document: ${t}
83
+ ## usually changed together (consider editing these too): ${f.cochange.map(y=>`${y.label} (\xD7${y.weight})`).join(", ")}`),k.push(`
84
+ You now have the snippet, the sibling style, the registration anchor and the tests. Write the new code with Edit/Write \u2014 do NOT Read ${f.moduleLabel}.`),g!=="FULL"&&k.push(`(bundle tier ${g}; for any omitted sections run tmct_context_more {"symbol":"${i}"}, or tmct_context with depth="full".)`),{text:k.join(`
85
+ `),tier:g,topup:b}}async function ic(e,{config:t,source:n,tel:s}){return(await Jp(e,{config:t,source:n,tel:s})).text}var ac=L(()=>{vt();De();Lt();Zr();Do();Ce();ss();ni();si();Ke();ic.ownsGraphLoad=!0});function Qp(e,{graph:t,svc:n}){let{match:s}=yt(n,ot(e,"symbol"),"symbol");return Sd(to(t,s))}var Zp=L(()=>{Ce();Ke()});function ef(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function nr(e){return ef(e).toString(16).padStart(8,"0")}function B$(e){let t=new TextEncoder().encode(String(e)),n=t.length*8,s=new Uint8Array((t.length+8>>6)+1<<6);s.set(t),s[t.length]=128;let o=new DataView(s.buffer);o.setUint32(s.length-8,Math.floor(n/4294967296)),o.setUint32(s.length-4,n>>>0);let i=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),r=new Uint32Array(64),a=(u,d)=>u>>>d|u<<32-d;for(let u=0;u<s.length;u+=64){for(let v=0;v<16;v+=1)r[v]=o.getUint32(u+v*4);for(let v=16;v<64;v+=1){let $=a(r[v-15],7)^a(r[v-15],18)^r[v-15]>>>3,k=a(r[v-2],17)^a(r[v-2],19)^r[v-2]>>>10;r[v]=r[v-16]+$+r[v-7]+k>>>0}let[d,m,p,f,g,h,b,w]=i;for(let v=0;v<64;v+=1){let $=a(g,6)^a(g,11)^a(g,25),k=g&h^~g&b,y=w+$+k+z$[v]+r[v]>>>0,j=a(d,2)^a(d,13)^a(d,22),E=d&m^d&p^m&p,_=j+E>>>0;w=b,b=h,h=g,g=f+y>>>0,f=p,p=m,m=d,d=y+_>>>0}i[0]=i[0]+d>>>0,i[1]=i[1]+m>>>0,i[2]=i[2]+p>>>0,i[3]=i[3]+f>>>0,i[4]=i[4]+g>>>0,i[5]=i[5]+h>>>0,i[6]=i[6]+b>>>0,i[7]=i[7]+w>>>0}let l=new Uint8Array(32),c=new DataView(l.buffer);for(let u=0;u<8;u+=1)c.setUint32(u*4,i[u]);return l}function U$(e,t){let n=B$(e),s="";for(let o=0;o<t;o+=1)s+=n[o].toString(16).padStart(2,"0");return s}function ne(e){let t=Pn(e);return t=t.replace(/^\/c\/[a-z]{2,3}\//i,""),t=t.replace(/^[a-z][\w.-]*:/i,""),t=t.replace(/_/g," ").replace(/\s+/g," ").trim(),t=t.replace(/^(?:the|an?)\s+/i,""),t.toLowerCase()}function Fn(e){let t=Pn(e);return q$.get(t)??t}function he(e,t,n){return sr(ne(e),Fn(t),ne(n))}var z$,W$,Pn,q$,sr,cn=L(()=>{z$=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);W$=2e3,Pn=e=>String(e??"").replace(/\s+/g," ").trim().slice(0,W$);q$=new Map([["mgx:cause","mgx:causes"],["mgx:desire","mgx:desires"],["mgx:want","mgx:desires"],["mgx:require","mgx:hasPrerequisite"],["mgx:involve","mgx:hasSubevent"],["mgx:used-for","mgx:usedFor"],["mgx:made-of","mgx:madeOf"]]);sr=(e,t,n)=>`fact:${U$(`${e}\0${t}\0${n}`,8)}`});var en={};En(en,{CARDINALITY_RULE_CONFIDENCE:()=>J$,CAX_DW_RULE:()=>lc,CAX_DW_RULE_CONFIDENCE:()=>dc,CAX_MAXC0_RULE_CONFIDENCE:()=>Z$,CLS_SVF1_RULE:()=>pc,CLS_SVF1_RULE_CONFIDENCE:()=>mc,DEFAULT_MAX_ENVIRONMENTS:()=>oi,DISJOINT_PREDICATE:()=>co,ENTAILED_DISJOINT_PROVENANCE:()=>uc,ENTAILED_PROVENANCE:()=>sf,ENTAILED_SCM_SVF_PROVENANCE:()=>bc,ENTAILED_SVF1_PROVENANCE:()=>fc,ENTAILED_TYPE_PROVENANCE:()=>rf,ON_PROPERTY_PREDICATE:()=>yn,SCM_SVF_RULE:()=>gc,SCM_SVF_RULE_CONFIDENCE:()=>wc,SOME_VALUES_FROM_PREDICATE:()=>vn,SUBCLASS_PREDICATE:()=>Pe,TYPE_PREDICATE:()=>At,buildCardinalityRestrictions:()=>X$,buildRelevanceFrontier:()=>cc,deriveDisjointViolations:()=>uf,deriveSomeValuesFromApplication:()=>df,deriveSomeValuesFromSubsumption:()=>pf,deriveSubClassClosure:()=>af,deriveSubClassClosureDelta:()=>cf,deriveTypePropagation:()=>lf,entailedTrustFrom:()=>V$,findConsistencyViolations:()=>tx,findIsaChain:()=>yc,proveCardinalityAtLeast:()=>Q$,proveMaxCardinalityZeroDenial:()=>ex,retractSubClassOf:()=>ix,syllogise:()=>nx});function tf(e,t,n){for(let s of t)if(typeof e?.[s]!="function")throw new TypeError(`${n} needs a store option carrying { ${t.join(", ")} } (memory/core.mjs's read/write functions) \u2014 missing ${s}`);return e}function V$(e,t=1){let n=(Array.isArray(e)?e:[]).filter(o=>typeof o=="number");if(!n.length)return null;let s=Math.max(0,Math.min(1,Math.min(...n)*t));return Number(s.toFixed(6))}function Dn(e){if(!e)return null;let t=e instanceof Set?[...e]:Array.isArray(e)?e:[],n=new Set;for(let s of t){let o=ne(s);o&&n.add(o)}return n.size?n:null}function af(e,{depth:t=32,budget:n=50,focus:s=null}={}){let o=new Set,i=new Map;for(let[u,d]of e||[])!u||!d||u===d||(o.add(`${u}${Ie}${d}`),i.has(u)||i.set(u,new Set),i.get(u).add(d));let r=s instanceof Set?s.size?s:null:Dn(s),a=(u,d,m)=>!r||r.has(u)||r.has(d)||r.has(m),l=[],c=new Set;for(let u=0;u<t;u+=1){let d=[];for(let[p,f]of i)for(let g of f){let h=i.get(g);if(h)for(let b of h){if(p===b)continue;let w=`${p}${Ie}${b}`;o.has(w)||c.has(w)||a(p,g,b)&&d.push([p,g,b,w])}}if(!d.length)break;d.sort((p,f)=>p[0].localeCompare(f[0])||p[2].localeCompare(f[2])||p[1].localeCompare(f[1]));let m=!1;for(let[p,f,g,h]of d)if(!c.has(h)){if(l.length>=n)break;c.add(h),l.push({subject:p,object:g,via:f}),i.has(p)||i.set(p,new Set),i.get(p).add(g),m=!0}if(l.length>=n||!m)break}return l}function cf(e,t,{depth:n=32,budget:s=50,focus:o=null}={}){let i=new Set,r=new Map,a=new Map;for(let[f,g]of e||[])!f||!g||f===g||(i.add(`${f}${Ie}${g}`),r.has(f)||r.set(f,new Set),r.get(f).add(g),a.has(g)||a.set(g,new Set),a.get(g).add(f));let l=[],c=new Set;for(let[f,g]of t||[]){if(!f||!g||f===g)continue;let h=`${f}${Ie}${g}`;c.has(h)||(c.add(h),l.push([f,g]))}let u=o instanceof Set?o.size?o:null:Dn(o),d=(f,g,h)=>!u||u.has(f)||u.has(g)||u.has(h),m=[],p=new Set;for(let f=0;f<n&&l.length;f+=1){let g=[],h=(v,$,k)=>{if(v===k)return;let y=`${v}${Ie}${k}`;i.has(y)||p.has(y)||d(v,$,k)&&g.push([v,$,k,y])};for(let[v,$]of l){for(let k of r.get($)||[])h(v,$,k);for(let k of a.get(v)||[])h(k,v,$)}if(!g.length)break;g.sort((v,$)=>v[0].localeCompare($[0])||v[2].localeCompare($[2])||v[1].localeCompare($[1]));let b=!1,w=[];for(let[v,$,k,y]of g)if(!p.has(y)){if(m.length>=s)break;p.add(y),m.push({subject:v,object:k,via:$}),r.has(v)||r.set(v,new Set),r.get(v).add(k),a.has(k)||a.set(k,new Set),a.get(k).add(v),w.push([v,k]),b=!0}if(m.length>=s||!b)break;l=w}return m}function $n(e){let t=new Map;for(let[s,o]of e||[])!s||!o||s===o||(t.has(s)||t.set(s,new Set),t.get(s).add(o));let n=new Map;return s=>{if(n.has(s))return n.get(s);let o=new Set,i=[...t.get(s)||[]];for(;i.length;){let r=i.pop();if(!o.has(r)){o.add(r);for(let a of t.get(r)||[])o.has(a)||i.push(a)}}return n.set(s,o),o}}function H$(e){return $n((e||[]).map(([t,n])=>[n,t]))}function cc(e,t){let n=[],s=[],o=new Map,i=new Map;for(let c of e||[])!c||!c.subject||!c.predicate||!c.object||(rs(c.predicate)?n.push([c.subject,c.object]):Cs(c.predicate)?s.push([c.subject,c.object]):lo(c.predicate)?o.set(c.subject,c.object):rr(c.predicate)&&i.set(c.subject,c.object));let r=H$(n),a=new Set;for(let c of t||[]){let u=ne(c);if(u){a.add(u);for(let d of r(u))a.add(d)}}let l=new Set(a);for(let[c,u]of s)a.has(u)&&l.add(c);for(let[c,u]of i)o.has(c)&&a.has(u)&&l.add(c);return l}function lf(e,t,{budget:n=50,focus:s=null,presentTypeEdges:o=e}={}){let i=$n(t),r=new Set,a=new Set;for(let[p,f]of o||[])p&&f&&r.add(`${p}${Ie}${f}`);let l=s instanceof Set?s.size?s:null:Dn(s),c=(p,f,g)=>!l||l.has(p)||l.has(f)||l.has(g),u=[];for(let[p,f]of e||[]){if(!p||!f)continue;let g=`${p}${Ie}${f}`;if(!a.has(g)){a.add(g);for(let h of i(f)){if(h===f||h===p)continue;let b=`${p}${Ie}${h}`;r.has(b)||c(p,f,h)&&u.push([p,f,h,b])}}}u.sort((p,f)=>p[0].localeCompare(f[0])||p[2].localeCompare(f[2])||p[1].localeCompare(f[1]));let d=[],m=new Set;for(let[p,f,g,h]of u)if(!m.has(h)){if(d.length>=n)break;m.add(h),d.push({subject:p,object:g,via:f})}return d}function uf(e,t,n,{budget:s=50,focus:o=null}={}){let i=$n(t),r=new Map,a=new Set;for(let[f,g]of n||[])!f||!g||f===g||(a.add(`${f}${Ie}${g}`),a.add(`${g}${Ie}${f}`),r.has(f)||r.set(f,new Set),r.get(f).add(g),r.has(g)||r.set(g,new Set),r.get(g).add(f));if(!r.size)return[];let l=new Set,c=o instanceof Set?o.size?o:null:Dn(o),u=(f,g,h)=>!c||c.has(f)||c.has(g)||c.has(h),d=[];for(let[f,g]of e||[]){if(!f||!g)continue;let h=`${f}${Ie}${g}`;if(!l.has(h)){l.add(h);for(let b of[g,...i(g)]){let w=r.get(b);if(w)for(let v of w){if(v===f)continue;let $=`${f}${Ie}${v}`;a.has($)||u(f,g,v)&&d.push([f,g,b,v,$])}}}}d.sort((f,g)=>f[0].localeCompare(g[0])||f[3].localeCompare(g[3])||f[2].localeCompare(g[2])||f[1].localeCompare(g[1]));let m=[],p=new Set;for(let[f,g,h,b,w]of d)if(!p.has(w)){if(m.length>=s)break;p.add(w),m.push({subject:f,object:b,viaType:g,viaClass:h})}return m}function df(e,t,n,s,{budget:o=50,focus:i=null}={}){let r=$n(n),a=new Map;for(let h of s||[]){if(!h||!h.restriction||!h.property||!h.target)continue;let b=`${h.property}${Ie}${h.target}`;a.has(b)||a.set(b,new Set),a.get(b).add(h.restriction)}if(!a.size)return[];let l=new Set,c=new Map;for(let[h,b]of t||[])!h||!b||(l.add(`${h}${Ie}${b}`),c.has(h)||c.set(h,new Set),c.get(h).add(b));let u=i instanceof Set?i.size?i:null:Dn(i),d=(h,b,w)=>!u||u.has(h)||u.has(b)||u.has(w),m=new Set,p=[];for(let[h,b,w]of e||[]){if(!h||!b||!w)continue;let v=ne(b),$=`${h}${Ie}${v}${Ie}${w}`;if(m.has($))continue;m.add($);let k=c.get(w);if(k)for(let y of k)for(let j of[y,...r(y)]){let E=a.get(`${v}${Ie}${j}`);if(E)for(let _ of E){if(h===_)continue;let R=`${h}${Ie}${_}`;l.has(R)||d(h,w,_)&&p.push([h,b,v,w,y,j,_,R])}}}p.sort((h,b)=>h[0].localeCompare(b[0])||h[6].localeCompare(b[6])||h[1].localeCompare(b[1])||h[3].localeCompare(b[3]));let f=[],g=new Set;for(let[h,b,w,v,$,k,y,j]of p)if(!g.has(j)){if(f.length>=o)break;g.add(j),f.push({subject:h,object:y,viaProperty:b,viaPropertyKey:w,viaValue:v,viaType:$,viaTarget:k})}return f}function X$(e){let t=new Map,n=new Map,s=new Map;for(let i of e||[])if(!(!i||!i.subject||!i.predicate))if(lo(i.predicate))t.set(i.subject,i.object);else if(G$(i.predicate))s.set(i.subject,i.object);else{let r=Y$[String(i.predicate).trim().toLowerCase()];if(!r)continue;let a=Number(i.object);Number.isFinite(a)&&n.set(i.subject,{kind:r,n:a})}let o=[];for(let[i,{kind:r,n:a}]of n){if(t.get(i)!==K$)continue;let l=s.get(i);l&&o.push({restriction:i,kind:r,n:a,onClass:l})}return o.sort((i,r)=>i.restriction.localeCompare(r.restriction)),o}function pf(e,t,{budget:n=50,focus:s=null}={}){let o=$n(t),i=new Map;for(let m of e||[]){if(!m||!m.restriction||!m.property||!m.target)continue;let p=ne(m.property);i.has(p)||i.set(p,[]),i.get(p).push({restriction:m.restriction,target:m.target})}let r=new Set;for(let[m,p]of t||[])m&&p&&r.add(`${m}${Ie}${p}`);let a=s instanceof Set?s.size?s:null:Dn(s),l=(m,p)=>!a||a.has(m)||a.has(p),c=[];for(let[,m]of i)if(!(m.length<2))for(let p of m)for(let f of m){if(p.restriction===f.restriction||p.target===f.target||!o(p.target).has(f.target))continue;let g=`${p.restriction}${Ie}${f.restriction}`;r.has(g)||l(p.restriction,f.restriction)&&c.push([p.restriction,f.restriction,p.target,f.target,g])}c.sort((m,p)=>m[0].localeCompare(p[0])||m[1].localeCompare(p[1]));let u=[],d=new Set;for(let[m,p,f,g,h]of c)if(!d.has(h)){if(u.length>=n)break;d.add(h),u.push({subject:m,object:p,viaY1:f,viaY2:g})}return u}function ff(e,t,n,s,{budget:o=20,focus:i=null}={}){if(!n)return null;let r=$n(e),a=i instanceof Set?i.size?i:null:Dn(i),l=m=>!a||a.has(n)||a.has(m),c=new Map;for(let[m,p]of e||[])!m||!p||(c.has(m)||c.set(m,new Set),c.get(m).add(p));let u=new Map((t||[]).map(m=>[m.restriction,m])),d=0;for(let m of[n,...r(n)]){if(d>=o)break;if(d+=1,!!l(m))for(let p of c.get(m)||[]){let f=u.get(p);if(f&&s(f))return{viaClass:m,viaRestriction:p,record:f}}}return null}function Q$(e,t,n,s,o,i={}){if(!s||!Number.isFinite(o))return null;let r=ff(e,t,n,a=>a.onClass===s&&(a.kind==="exactly"||a.kind==="min")&&a.n>=o,i);return r?{subject:n,object:s,m:o,n:r.record.n,kind:r.record.kind,viaClass:r.viaClass,viaRestriction:r.viaRestriction}:null}function ex(e,t,n,s,o={}){if(!s)return null;let i=ff(e,t,n,r=>r.onClass===s&&r.kind==="max"&&r.n===0,o);return i?{subject:n,object:s,viaClass:i.viaClass,viaRestriction:i.viaRestriction}:null}function tx(e,t,n,{budget:s=50,focus:o=null}={}){let i=$n(t),r=new Map;for(let[p,f]of n||[])!p||!f||p===f||(r.has(p)||r.set(p,new Set),r.get(p).add(f),r.has(f)||r.set(f,new Set),r.get(f).add(p));if(!r.size)return[];let a=new Map;for(let[p,f]of e||[])!p||!f||(a.has(p)||a.set(p,new Set),a.get(p).add(f));let l=o instanceof Set?o.size?o:null:Dn(o),c=p=>!l||l.has(p),u=[],d=new Set;for(let[p,f]of a){if(!c(p))continue;let g=[...f].sort();for(let h=0;h<g.length;h+=1)for(let b=h+1;b<g.length;b+=1){let[w,v]=[g[h],g[b]],$=[w,...i(w)],k=[v,...i(v)],y=null;for(let E of $){let _=r.get(E);if(_){for(let R of k)if(_.has(R)){y=[E,R];break}if(y)break}}if(!y)continue;let j=`${p}${Ie}${w}${Ie}${v}`;d.has(j)||(d.add(j),u.push([p,w,v,y[0],y[1]]))}}u.sort((p,f)=>p[0].localeCompare(f[0])||p[1].localeCompare(f[1])||p[2].localeCompare(f[2]));let m=[];for(let[p,f,g,h,b]of u){if(m.length>=s)break;m.push({subject:p,classA:f,classB:g,viaA:h,viaB:b})}return m}async function nx(e,{depth:t=32,budget:n=50,focus:s=null,expandFocus:o=!1,maxEnvironments:i=oi,full:r=!1,store:a}={}){let{loadMemory:l,readFactRows:c,appendFacts:u}=tf(a,["loadMemory","readFactRows","appendFacts"],"syllogise"),d=typeof a?.loadSyllogiseState=="function"&&typeof a?.saveSyllogiseState=="function",m=await l(e),p=c(m),f=p.filter(x=>rs(x.predicate)).map(x=>[x.subject,x.object]),g=p.filter(x=>Cs(x.predicate)).map(x=>[x.subject,x.object]),h=p.filter(x=>Ts(x.predicate)).map(x=>[x.subject,x.object]),b=new Map,w=new Map,v=[];for(let x of p){let ue=String(x.predicate||"").trim().toLowerCase();lo(x.predicate)?b.set(x.subject,x.object):rr(x.predicate)?w.set(x.subject,x.object):hc.has(ue)||v.push([x.subject,x.predicate,x.object])}let $=[];for(let[x,ue]of b){let Re=w.get(x);Re&&$.push({restriction:x,property:ue,target:Re})}let k=Dn(s),y=o&&k?cc(p,[...k]):k,j=y===null&&d?await a.loadSyllogiseState(e):null,E=new Set(p.map(x=>x.id)),_=Array.isArray(j?.factIds)?j.factIds.filter(x=>!E.has(x)):[],R=j&&Array.isArray(j.factIds)&&!_.length&&!r?"delta":"full",S=R==="delta"?new Set(j.factIds):null,A=R==="delta"?p.filter(x=>!S.has(x.id)):p,M=A.length,T=new Map;for(let x of p)T.set(`${x.subject}${Ie}${x.predicate}${Ie}${x.object}`,x.trust);let P=(x,ue,Re)=>T.get(`${x}${Ie}${ue}${Ie}${Re}`),G=(x,ue,Re)=>T.has(`${x}${Ie}${ue}${Ie}${Re}`),Z=x=>x.filter(ue=>typeof ue=="number"),V=R==="delta"&&!A.length,F=R==="delta"?A.filter(x=>rs(x.predicate)).map(x=>[x.subject,x.object]):[],z=R==="delta"?F.length?cf(f,F,{depth:t,budget:n,focus:y}):[]:af(f,{depth:t,budget:n,focus:y}),B=f.concat(z.map(x=>[x.subject,x.object])),W=y,C=null;if(R==="delta"&&!V){let x=p.concat(z.map(Re=>({subject:Re.subject,predicate:Pe,object:Re.object}))),ue=[];for(let Re of A)ue.push(Re.subject,Re.object);C=cc(x,ue),W=C}let I=x=>!C||C.has(x),O=C?g.filter(([x,ue])=>I(x)||I(ue)):g,N=new Set;if(C)for(let x of A)Ts(x.predicate)&&(N.add(x.subject),N.add(x.object));let q=C&&N.size?$n(B):null,U=C?g.filter(([x,ue])=>I(x)||I(ue)||q&&[...q(ue)].some(Re=>N.has(Re))):g,ie=new Set;if(C){for(let x of A)if(lo(x.predicate)||rr(x.predicate)){let ue=b.get(x.subject);ue&&ie.add(ne(ue))}}let se=C?v.filter(([x,ue,Re])=>I(x)||I(Re)||ie.has(ne(ue))):v,Y=Math.max(0,n-z.length),X=Y>0&&!V?lf(O,B,{budget:Y,focus:W,presentTypeEdges:g}):[],oe=Math.max(0,n-z.length-X.length),K=oe>0&&!V?uf(U,B,h,{budget:oe,focus:W}):[],le=Math.max(0,n-z.length-X.length-K.length),te=le>0&&$.length&&!V?df(se,g,B,$,{budget:le,focus:W}):[],_e=Math.max(0,n-z.length-X.length-K.length-te.length),Le=_e>0&&$.length>1&&!V?pf($,B,{budget:_e,focus:W}):[],J=new Map($.map(x=>[x.restriction,x])),xe=[...z.map(x=>({subject:x.subject,predicate:Pe,object:x.object,provenance:sf,justification:[[he(x.subject,Pe,x.via),he(x.via,Pe,x.object)]]})),...X.map(x=>({subject:x.subject,predicate:At,object:x.object,provenance:rf,justification:[[he(x.subject,At,x.via),he(x.via,Pe,x.object)]]})),...K.map(x=>{let ue=G(x.viaClass,co,x.object),[Re,Sn]=ue?[x.viaClass,x.object]:[x.object,x.viaClass],Hs=Z([P(x.subject,At,x.viaType),P(Re,co,Sn),...x.viaClass!==x.viaType?[P(x.viaType,Pe,x.viaClass)]:[]]);return{subject:x.subject,predicate:co,object:x.object,provenance:uc,justification:[[he(x.subject,At,x.viaType),he(Re,co,Sn),...x.viaClass!==x.viaType?[he(x.viaType,Pe,x.viaClass)]:[]]],...Hs.length?{premiseTrusts:Hs,ruleConfidence:dc}:{}}}),...te.map(x=>{let ue=Z([P(x.subject,x.viaProperty,x.viaValue),P(x.viaValue,At,x.viaType),P(x.object,yn,x.viaPropertyKey),P(x.object,vn,x.viaTarget),...x.viaType!==x.viaTarget?[P(x.viaType,Pe,x.viaTarget)]:[]]);return{subject:x.subject,predicate:At,object:x.object,provenance:fc,justification:[[he(x.subject,x.viaProperty,x.viaValue),he(x.viaValue,At,x.viaType),he(x.object,yn,x.viaPropertyKey),he(x.object,vn,x.viaTarget),...x.viaType!==x.viaTarget?[he(x.viaType,Pe,x.viaTarget)]:[]]],...ue.length?{premiseTrusts:ue,ruleConfidence:mc}:{}}}),...Le.map(x=>{let ue=J.get(x.subject),Re=J.get(x.object),Sn=Z([ue&&P(x.subject,yn,ue.property),P(x.subject,vn,x.viaY1),Re&&P(x.object,yn,Re.property),P(x.object,vn,x.viaY2),P(x.viaY1,Pe,x.viaY2)]);return{subject:x.subject,predicate:Pe,object:x.object,provenance:bc,justification:[[...ue?[he(x.subject,yn,ue.property)]:[],he(x.subject,vn,x.viaY1),...Re?[he(x.object,yn,Re.property)]:[],he(x.object,vn,x.viaY2),he(x.viaY1,Pe,x.viaY2)]],...Sn.length?{premiseTrusts:Sn,ruleConfidence:wc}:{}}})],ge=xe.map(x=>({id:he(x.subject,x.predicate,x.object),subject:x.subject,predicate:x.predicate,object:x.object,environments:x.justification,write:x})),ve=hf(p.concat(ge.map(x=>({id:x.id,subject:x.subject,predicate:x.predicate,object:x.object})))),H=new Map(p.map(x=>[x.id,x])),re=x=>rs(x)||Cs(x)||Ts(x),fe=x=>R!=="delta"||C!==null&&(C.has(x.subject)||C.has(x.object)),ce=p.filter(x=>re(x.predicate)&&mf(x.provenance)&&or(x).length<i&&fe(x)).map(x=>({id:x.id,subject:x.subject,predicate:x.predicate,object:x.object,environments:or(x),provenance:x.provenance})),wt=[...ge,...ce].sort((x,ue)=>x.subject.localeCompare(ue.subject)||x.predicate.localeCompare(ue.predicate)||x.object.localeCompare(ue.object)),Bt=0,Qe=!1,un=0;for(let x of wt){if(un>=n){Qe=!0;break}un+=1;let ue=ve(x,{maxEnvironments:i+1}),{kept:Re,truncated:Sn}=ox(x.environments,ue,i);if(Sn&&(Qe=!0),!(Re.length<=x.environments.length)){if(Bt+=Re.length-x.environments.length,x.write){x.write.justification=Re;continue}xe.push({subject:x.subject,predicate:x.predicate,object:x.object,justification:Re,...gf(x.provenance,Re,Hs=>H.get(Hs)?.trust)||{}})}}let{ids:Kt}=await u(e,xe),Ut=[],It=0;for(let x of z)Ut.push({id:Kt[It],subject:x.subject,object:x.object,via:x.via,rule:nf}),It+=1;for(let x of X)Ut.push({id:Kt[It],subject:x.subject,object:x.object,via:x.via,rule:of}),It+=1;for(let x of K)Ut.push({id:Kt[It],subject:x.subject,object:x.object,via:x.viaClass,rule:lc}),It+=1;for(let x of te)Ut.push({id:Kt[It],subject:x.subject,object:x.object,via:x.viaValue,rule:pc}),It+=1;for(let x of Le)Ut.push({id:Kt[It],subject:x.subject,object:x.object,via:x.viaY1,rule:gc}),It+=1;let _r=Ut.length>=n;if(y===null&&d&&!_r){let x=new Set(E);for(let ue of Kt)x.add(ue);await a.saveSyllogiseState(e,{version:1,factIds:[...x].sort(),completedAt:new Date().toISOString()})}return{derived:Ut,count:Ut.length,budget:n,depth:t,truncated:_r,mode:R,deltaSize:M,environmentsAdded:Bt,alternatesTruncated:Qe}}function mf(e){let t=String(e||"").split(" | ").filter(Boolean);return t.length>0&&t.every(n=>n.startsWith("entailed:"))}function sx(e){let t=[],n=new Map,s=new Map,o=new Map,i=new Map,r=new Map;for(let u of e){let d=String(u.predicate||"").trim().toLowerCase();rs(u.predicate)?t.push([u.subject,u.object]):Cs(u.predicate)?(n.has(u.subject)||n.set(u.subject,new Set),n.get(u.subject).add(u.object)):Ts(u.predicate)?(s.has(u.subject)||s.set(u.subject,new Set),s.get(u.subject).add(u.object),s.has(u.object)||s.set(u.object,new Set),s.get(u.object).add(u.subject)):lo(u.predicate)?o.set(u.subject,u.object):rr(u.predicate)?i.set(u.subject,u.object):hc.has(d)||(r.has(u.subject)||r.set(u.subject,[]),r.get(u.subject).push([ne(u.predicate),u.object]))}let a=$n(t),l=(u,d)=>u!==d&&a(u).has(d),c=u=>{let d=o.get(u),m=i.get(u);return d&&m?{property:ne(d),target:m}:null};return u=>{if(rs(u.predicate)){if(l(u.subject,u.object))return!0;let d=c(u.subject),m=c(u.object);return!!(d&&m&&d.property===m.property&&l(d.target,m.target))}if(Cs(u.predicate)){for(let m of n.get(u.subject)||[])if(l(m,u.object))return!0;let d=c(u.object);if(d){for(let[m,p]of r.get(u.subject)||[])if(m===d.property){for(let f of n.get(p)||[])if(f===d.target||l(f,d.target))return!0}}return!1}if(Ts(u.predicate)){for(let d of n.get(u.subject)||[])for(let m of[d,...a(d)])if(s.get(m)?.has(u.object))return!0;return!1}return!0}}function hf(e){let t=new Set,n=[],s=new Map,o=new Map,i=new Set,r=new Map,a=new Map,l=new Map,c=new Map;for(let p of e){if(!p||!p.subject||!p.predicate||!p.object)continue;p.id&&t.add(p.id);let f=String(p.predicate||"").trim().toLowerCase();rs(p.predicate)?(n.push([p.subject,p.object]),s.has(p.subject)||s.set(p.subject,new Set),s.get(p.subject).add(p.object)):Cs(p.predicate)?(o.has(p.subject)||o.set(p.subject,new Set),o.get(p.subject).add(p.object)):Ts(p.predicate)?(i.add(`${p.subject}${Ie}${p.object}`),r.has(p.subject)||r.set(p.subject,new Set),r.get(p.subject).add(p.object),r.has(p.object)||r.set(p.object,new Set),r.get(p.object).add(p.subject)):lo(p.predicate)?a.set(p.subject,p.object):rr(p.predicate)?l.set(p.subject,p.object):hc.has(f)||(c.has(p.subject)||c.set(p.subject,[]),c.get(p.subject).push([p.predicate,p.object]))}let u=$n(n),d=p=>s.get(p)||new Set,m=p=>{let f=a.get(p),g=l.get(p);return f&&g?{property:f,propertyKey:ne(f),target:g}:null};return(p,{maxEnvironments:f=oi}={})=>{let g=[],h=new Set,b=w=>{if(g.length>=f||p.id&&w.includes(p.id)||!w.every($=>t.has($)))return;let v=[...w].sort().join(" ");h.has(v)||(h.add(v),g.push(w))};if(rs(p.predicate)){for(let w of[...d(p.subject)].sort()){if(g.length>=f)break;w===p.subject||w===p.object||d(w).has(p.object)&&b([he(p.subject,Pe,w),he(w,Pe,p.object)])}if(g.length<f){let w=m(p.subject),v=m(p.object);w&&v&&w.propertyKey===v.propertyKey&&w.target!==v.target&&d(w.target).has(v.target)&&b([he(p.subject,yn,w.property),he(p.subject,vn,w.target),he(p.object,yn,v.property),he(p.object,vn,v.target),he(w.target,Pe,v.target)])}return g}if(Cs(p.predicate)){for(let v of[...o.get(p.subject)||[]].sort()){if(g.length>=f)break;v!==p.object&&d(v).has(p.object)&&b([he(p.subject,At,v),he(v,Pe,p.object)])}let w=m(p.object);if(w){let v=[...c.get(p.subject)||[]].filter(([$])=>ne($)===w.propertyKey).sort(($,k)=>$[0].localeCompare(k[0])||$[1].localeCompare(k[1]));for(let[$,k]of v){if(g.length>=f)break;for(let y of[...o.get(k)||[]].sort()){if(g.length>=f)break;y!==w.target&&!d(y).has(w.target)||b([he(p.subject,$,k),he(k,At,y),he(p.object,yn,w.propertyKey),he(p.object,vn,w.target),...y!==w.target?[he(y,Pe,w.target)]:[]])}}}return g}if(Ts(p.predicate)){let w=[];for(let v of o.get(p.subject)||[])for(let $ of[v,...u(v)])(r.get($)||new Set).has(p.object)&&w.push([v,$]);w.sort((v,$)=>v[0].localeCompare($[0])||v[1].localeCompare($[1]));for(let[v,$]of w){if(g.length>=f)break;let k=i.has(`${$}${Ie}${p.object}`),[y,j]=k?[$,p.object]:[p.object,$];b([he(p.subject,At,v),he(y,co,j),...$!==v?[he(v,Pe,$)]:[]])}return g}return g}}function ox(e,t,n){let s=[],o=new Set,i=!1;for(let r of[...e||[],...t||[]]){if(!Array.isArray(r)||!r.length)continue;let a=[...r].sort().join(" ");if(!o.has(a)){if(s.length>=n){i=!0;continue}o.add(a),s.push(r)}}return{kept:s,truncated:i}}function gf(e,t,n){let s;for(let r of String(e||"").split(" | ")){let a=rx.get(r);if(a!==void 0){s=a;break}}if(s===void 0)return null;let o=null,i=-1;for(let r of t||[]){let a=r.map(c=>n(c)).filter(c=>typeof c=="number");if(a.length!==r.length)continue;let l=Math.min(...a);l>i&&(i=l,o=a)}return o?{premiseTrusts:o,ruleConfidence:s}:null}async function ix(e,t,n,{budget:s=50,depth:o=32,maxEnvironments:i=oi,store:r}={}){let{loadMemory:a,readFactRows:l,removeFacts:c}=tf(r,["loadMemory","readFactRows","removeFacts"],"retractSubClassOf"),u=typeof r?.appendFacts=="function"?r.appendFacts:null,d=ne(t),m=ne(n),p=he(d,Pe,m),f=await a(e),g=l(f),h=new Map(g.map(R=>[R.id,R]));if(!h.has(p))return{retracted:[],count:0,budget:s,depth:o,truncated:!1,found:!1};let b=g.filter(R=>or(R).length&&mf(R.provenance)),w=new Map;for(let R of b)for(let S of or(R))for(let A of S)w.has(A)||w.set(A,new Set),w.get(A).add(R.id);let v=new Set([p]),$=[p],k=new Map,y=!1,j=0,E=[p];for(;j<o;j+=1){let R=new Set;for(let V of E)for(let F of w.get(V)||[])v.has(F)||R.add(F);let S=[...R].map(V=>h.get(V)).sort((V,F)=>V.subject.localeCompare(F.subject)||V.predicate.localeCompare(F.predicate)||V.object.localeCompare(F.object));if(!S.length)break;let A=g.filter(V=>!v.has(V.id)&&!R.has(V.id)),M=new Set(A.map(V=>V.id)),T=hf(A),P=sx(A),G=!1,Z=!1;E=[];for(let V of S){if(v.size>=s){Z=!0;break}let F=or(V),z=F.filter(W=>W.every(C=>M.has(C)));if(z.length){z.length!==F.length&&k.set(V.id,z);continue}let B=T(V,{maxEnvironments:i});if(B.length){k.set(V.id,B);continue}P(V)||(v.add(V.id),$.push(V.id),E.push(V.id),G=!0)}if(Z){y=!0;break}if(!G)break}!y&&j>=o&&(y=b.some(R=>!v.has(R.id)&&R.justification.some(S=>v.has(S))));let{removed:_}=await c(e,$);if(u){let R=[...k.entries()].filter(([S])=>!v.has(S)).sort((S,A)=>S[0].localeCompare(A[0])).map(([S,A])=>{let M=h.get(S);return{subject:M.subject,predicate:M.predicate,object:M.object,justification:A,...gf(M.provenance,A,T=>h.get(T)?.trust)||{}}});R.length&&await u(e,R)}return{retracted:_,count:_.length,budget:s,depth:o,truncated:y,found:!0}}function yc(e,t,n,s,{maxHops:o=6}={}){let i=t instanceof Set?t:new Set(t||[]),r=new Map;for(let[c,u]of s||[])!c||!u||c===u||(r.has(c)||r.set(c,new Set),r.get(c).add(u));let a=[];for(let[c,u]of n||[])c===e&&u&&a.push({node:u,path:[{subject:c,predicate:At,object:u}]});for(let c of r.get(e)||[])a.push({node:c,path:[{subject:e,predicate:Pe,object:c}]});let l=new Set([e]);for(let c=1;c<=o&&a.length;c+=1){for(let{node:d,path:m}of a)if(i.has(d))return m;if(c===o)break;let u=[];for(let{node:d,path:m}of a)if(!l.has(d)){l.add(d);for(let p of r.get(d)||[])l.has(p)||u.push({node:p,path:[...m,{subject:d,predicate:Pe,object:p}]})}a=u}return null}var Pe,nf,sf,At,of,rf,co,lc,uc,dc,yn,vn,pc,fc,mc,oi,Ie,rs,Cs,Ts,lo,rr,G$,hc,K$,Y$,gc,bc,wc,J$,Z$,or,rx,Ft=L(()=>{cn();Pe="rdfs:subClassOf",nf="subClassOf",sf=`entailed:${nf}`,At="rdf:type",of="type",rf=`entailed:${of}`,co="owl:disjointWith",lc="disjointWith",uc=`entailed:${lc}`,dc=.95,yn="owl:onProperty",vn="owl:someValuesFrom",pc="someValuesFrom",fc=`entailed:${pc}`,mc=.95,oi=4,Ie="\u241F",rs=e=>String(e||"").trim().toLowerCase()==="rdfs:subclassof",Cs=e=>String(e||"").trim().toLowerCase()==="rdf:type",Ts=e=>String(e||"").trim().toLowerCase()==="owl:disjointwith",lo=e=>String(e||"").trim().toLowerCase()==="owl:onproperty",rr=e=>String(e||"").trim().toLowerCase()==="owl:somevaluesfrom",G$=e=>String(e||"").trim().toLowerCase()==="owl:onclass",hc=new Set(["rdfs:subclassof","rdf:type","owl:disjointwith","owl:onproperty","owl:somevaluesfrom","owl:intersectionof"]);K$="has",Y$={"owl:cardinality":"exactly","owl:mincardinality":"min","owl:maxcardinality":"max"};gc="someValuesFromSubsumption",bc=`entailed:${gc}`,wc=.95;J$=.95;Z$=.95;or=e=>e.environments||(Array.isArray(e.justification)&&e.justification.length?[e.justification]:[]);rx=new Map([[uc,dc],[fc,mc],[bc,wc]])});function mo(e){let t=String(e||""),n=bf.get(t);return n||(t.startsWith(vc)?uo+t.slice(vc.length):t)}function wf(e){let t=String(e||""),n=ax.get(t);return n||(t.startsWith(uo)?vc+t.slice(uo.length):null)}function $f(e,t,n,s,o){let i=null;for(let r of e){if(r===t)return[];let a=yc(r,new Set([t]),n,s,{maxHops:o});a&&(!i||a.length<i.length)&&(i=a)}return i}function ai(e,t,n,{maxHops:s=3}={}){let o=fo(e),i=fo(t),r=Array.isArray(n)?n:[],{typeEdges:a,subClassEdges:l}=vf(r),c=r.filter(b=>(b.predicate===ii||b.predicate===po)&&i.has(b.object)),u=[];for(let b of c){let w=b.predicate===po?"negative":"positive";if(o.has(b.subject)){u.push({fact:b,polarity:w,hops:0,chain:null});continue}let v=$f(o,b.subject,a,l,s);v&&v.length&&u.push({fact:b,polarity:w,hops:v.length,chain:v})}if(!u.length)return{verdict:"none",hops:0,positive:[],negative:[],chain:null,overrides:null,baseRate:xc(o,i,r,{maxHops:s})};u.sort((b,w)=>b.hops-w.hops||(w.fact.trust||0)-(b.fact.trust||0));let d=u[0].hops,m=u.filter(b=>b.hops===d),p=m.filter(b=>b.polarity==="positive").map(b=>b.fact),f=m.filter(b=>b.polarity==="negative").map(b=>b.fact),g=f.length&&!p.length?"negative":"positive",h=u.find(b=>b.hops>d&&b.polarity!==g)||null;return{verdict:p.length&&f.length?"both":f.length?"no":"yes",hops:d,positive:p,negative:f,chain:u[0].chain,overrides:h?{fact:h.fact,chain:h.chain}:null,baseRate:null}}function xc(e,t,n,{maxHops:s=3}={}){let o=fo(e),i=fo(t),r=Array.isArray(n)?n:[],a=r.filter(g=>g.predicate===Pe||g.predicate===At),l=a.filter(g=>o.has(g.subject)).map(g=>g.object);if(!l.length)return null;let c=l[0],u=[...new Set(a.filter(g=>g.object===c&&!o.has(g.subject)).map(g=>g.subject))],d=g=>{let h=r.find(b=>b.subject===g&&i.has(b.object)&&(b.predicate===ii||b.predicate===po));return h?{name:g,polarity:h.predicate===po?"negative":"positive",fact:h}:{name:g,polarity:"unknown",fact:null}},m=u.map(d),{typeEdges:p,subClassEdges:f}=vf(r);return{klass:c,kinds:u.length,positive:m.filter(g=>g.polarity==="positive"),negative:m.filter(g=>g.polarity==="negative"),unknown:m.filter(g=>g.polarity==="unknown"),chain:$f(o,c,p,f,s)}}function kc(e,t,{exclude:n=[],maxHops:s=3}={}){let o=fo(e),i=fo(n),r=Array.isArray(t)?t:[],a=new Set,l=[];for(let c of r)c.predicate!==ii||!o.has(c.object)||i.has(c.subject)||a.has(c.subject)||(a.add(c.subject),ai(new Set([c.subject]),o,r,{maxHops:s}).verdict==="yes"&&l.push(c));return l.sort(cx)}var uo,vc,ri,bf,ax,yf,ii,po,$c,cx,fo,vf,Sc=L(()=>{Ft();uo="mgxneg:",vc="mgx:",ri="mgxneg:subClassOf",bf=new Map([[Pe,ri]]),ax=new Map([...bf].map(([e,t])=>[t,e]));yf=e=>String(e||"").startsWith(uo),ii="mgx:capableOf",po=mo(ii),$c=6,cx=(e,t)=>(t.trust||0)-(e.trust||0)||String(e.subject).localeCompare(String(t.subject)),fo=e=>e instanceof Set?e:new Set(Array.isArray(e)?e:[e]),vf=e=>({typeEdges:e.filter(t=>t.predicate===At).map(t=>[t.subject,t.object]),subClassEdges:e.filter(t=>t.predicate===Pe).map(t=>[t.subject,t.object])})});function ho(e,t){let n=(e?.attributes||[]).find(s=>s?.prop===t);return n?String(n.value??""):void 0}function px(e,t){(!e?.class||!lx.has(e.class))&&t.push(`must have a class from the closed vocabulary Utterance | Fact | Session | Source | Rule (got ${JSON.stringify(e?.class)})`)}function fx(e,t){for(let s of["rdf:subject","rdf:predicate","rdf:object"])ci(ho(e,s))||t.push(`a Fact needs a non-empty ${s}`);for(let s of["rdf:subject","rdf:object"]){let o=ho(e,s);o!==void 0&&dx.test(o)&&t.push(`a Fact's ${s} must be a single term, not text spanning a sentence boundary (got ${JSON.stringify(o)})`)}let n=ho(e,"mgx:factProvenance");n!==void 0&&!ci(n)&&t.push("mgx:factProvenance, when present, must be non-empty")}function mx(e,t){ci(ho(e,"mgx:ruleName"))||t.push("a Rule needs a non-empty mgx:ruleName");let n=ho(e,"mgx:ruleKind");if(!n||!xf.has(n)){t.push(`a Rule's mgx:ruleKind must be one of ${[...xf].join(" | ")} (got ${JSON.stringify(n)})`);return}for(let s of ux[n])ci(ho(e,s))||t.push(`a ${n} Rule needs a non-empty ${s}`)}function hx(e){let t=[];return px(e,t),e?.class==="Fact"&&fx(e,t),e?.class==="Rule"&&mx(e,t),{ok:t.length===0,violations:t}}function Ec(e){let t=hx(e);if(!t.ok){let n=new Error(`SHACL validation failed for ${e?.class} "${e?.id}": ${t.violations.join(" | ")}`);throw n.violations=t.violations,n}}var lx,xf,ux,dx,ci,kf=L(()=>{lx=new Set(["Utterance","Fact","Session","Source","Rule"]),xf=new Set(["compose2","filter","recursive","action-signature","action-precond","action-effect","action-constraint"]),ux={compose2:["mgx:ruleBase1","mgx:ruleBase2"],filter:["mgx:ruleBase1","mgx:ruleFilterProperty"],recursive:["mgx:ruleBaseCase","mgx:ruleRecStep"],"action-signature":["mgx:ruleActionSubjectClass","mgx:ruleActionTargetClass"],"action-precond":["mgx:ruleActionPrecondShape","mgx:ruleActionPrecondPredicate","mgx:ruleActionPrecondRole","mgx:ruleActionPrecondScope"],"action-effect":["mgx:ruleActionEffectPredicate","mgx:ruleActionEffectSubject"],"action-constraint":["mgx:ruleActionConstraintLeft","mgx:ruleActionConstraintRight","mgx:ruleActionConstraintGuard"]},dx=/[.!?]\s+\w/;ci=e=>typeof e=="string"&&e.trim().length>0});var Sf={};En(Sf,{access:()=>wx,appendFile:()=>$x,basename:()=>Px,copyFile:()=>Rx,createInterface:()=>Ux,createReadStream:()=>Tx,createRequire:()=>gx,createWriteStream:()=>Cx,default:()=>qx,dirname:()=>Lx,existsSync:()=>Ix,fileURLToPath:()=>Dx,isAbsolute:()=>Mx,join:()=>Ox,mkdir:()=>xx,mkdtemp:()=>kx,randomBytes:()=>zx,readFile:()=>yx,readFileSync:()=>bx,readdir:()=>Ax,rename:()=>Sx,resolve:()=>Nx,rm:()=>jx,sep:()=>Fx,spawnSync:()=>Bx,stat:()=>_x,tmpdir:()=>Wx,unlink:()=>Ex,writeFile:()=>vx});var rt,gx,bx,wx,yx,vx,$x,xx,kx,Sx,Ex,jx,_x,Rx,Ax,Tx,Cx,Ix,Ox,Lx,Nx,Mx,Px,Fx,Dx,zx,Bx,Ux,Wx,qx,Ef=L(()=>{rt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},gx=rt("createRequire"),bx=rt("readFileSync"),wx=rt("access"),yx=rt("readFile"),vx=rt("writeFile"),$x=rt("appendFile"),xx=rt("mkdir"),kx=rt("mkdtemp"),Sx=rt("rename"),Ex=rt("unlink"),jx=rt("rm"),_x=rt("stat"),Rx=rt("copyFile"),Ax=rt("readdir"),Tx=rt("createReadStream"),Cx=rt("createWriteStream"),Ix=()=>!1,Ox=(...e)=>e.join("/"),Lx=e=>String(e).replace(/\/[^/]*$/,""),Nx=(...e)=>e.join("/"),Mx=e=>String(e).startsWith("/"),Px=e=>String(e).split("/").pop(),Fx="/",Dx=e=>String(e),zx=rt("randomBytes"),Bx=rt("spawnSync"),Ux=rt("createInterface"),Wx=()=>"/tmp",qx={}});var Gx,ir,jc=L(()=>{Gx=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,ir=class e extends Date{#t=!1;#n=!1;#e=null;constructor(t){let n=!0,s=!0,o="Z";if(typeof t=="string"){let i=t.match(Gx);i?(i[1]||(n=!1,t=`0000-01-01T${t}`),s=!!i[2],s&&t[10]===" "&&(t=t.replace(" ","T")),i[2]&&+i[2]>23?t="":(o=i[3]||null,t=t.toUpperCase(),!o&&s&&(t+="Z"))):t=""}super(t),isNaN(this.getTime())||(this.#t=n,this.#n=s,this.#e=o)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let t=super.toISOString();if(this.isDate())return t.slice(0,10);if(this.isTime())return t.slice(11,23);if(this.#e===null)return t.slice(0,-1);if(this.#e==="Z")return t;let n=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return n=this.#e[0]==="-"?n:-n,new Date(this.getTime()-n*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(t,n="Z"){let s=new e(t);return s.#e=n,s}static wrapAsLocalDateTime(t){let n=new e(t);return n.#e=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#n=!1,n.#e=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#t=!1,n.#e=null,n}}});function Vx(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function Hx(e,t,n){let s=e.split(/\r\n|\n|\r/g),o="",i=(Math.log10(t+1)|0)+1;for(let r=t-1;r<=t+1;r++){let a=s[r-1];a&&(o+=r.toString().padEnd(i," "),o+=": ",o+=a,o+=`
86
+ `,r===t&&(o+=" ".repeat(i+n+2),o+=`^
87
+ `))}return o}var pe,Is=L(()=>{pe=class extends Error{line;column;codeblock;constructor(t,n){let[s,o]=Vx(n.toml,n.ptr),i=Hx(n.toml,s,o);super(`Invalid TOML document: ${t}
88
88
 
89
- ${r}`,n),this.line=s,this.column=o,this.codeblock=r}}});function si(e,t){let n=e[t++],s=n,o=n==="'",r=n===e[t]&&n===e[t+1];r&&(e[t+=2]===`
89
+ ${i}`,n),this.line=s,this.column=o,this.codeblock=i}}});function li(e,t){let n=e[t++],s=n,o=n==="'",i=n===e[t]&&n===e[t+1];i&&(e[t+=2]===`
90
90
  `?t++:e[t]==="\r"&&e[t+1]===`
91
- `&&(t+=2));let i="",a=t,l=0;for(let c=t;c<e.length;c++)if(n=e[c],r&&(n===`
91
+ `&&(t+=2));let r="",a=t,l=0;for(let c=t;c<e.length;c++)if(n=e[c],i&&(n===`
92
92
  `||n==="\r"&&e[c+1]===`
93
- `))l=l&&3;else{if(n<" "&&n!==" "||n==="\x7F")throw new he("control characters are not allowed in strings",{toml:e,ptr:c});if((!l||l===3)&&n===s&&(!r||e[c+1]===s&&e[c+2]===s))return r&&(e[c+3]===s&&c++,e[c+3]===s&&c++),[l?i:i+e.slice(a,c),c+(r?3:1)];if(!l)!o&&n==="\\"&&(i+=e.slice(a,a=c),l=1);else if(l===1)if(n==="x"||n==="u"||n==="U"){let u=0,d=n==="x"?2:n==="u"?4:8;for(let m=0;m<d;m++,c++){let p=e.charCodeAt(c+1),f=p>=48&&p<=57?p-48:p>=65&&p<=70?p-65+10:p>=97&&p<=102?p-97+10:-1;if(f<0)throw new he("invalid non-hex character in unicode escape",{toml:e,ptr:c+1});u=u<<4|f}if(u<0||u>1114111||u>=55296&&u<=57343)throw new he("invalid unicode escape",{toml:e,ptr:c});i+=String.fromCodePoint(u),a=c+1,l=0}else if(n===" "||n===" ")l=2;else{if(n==="b")i+="\b";else if(n==="t")i+=" ";else if(n==="n")i+=`
94
- `;else if(n==="f")i+="\f";else if(n==="r")i+="\r";else if(n==="e")i+="\x1B";else if(n==='"')i+='"';else if(n==="\\")i+="\\";else throw new he("unrecognized escape sequence",{toml:e,ptr:c});a=c+1,l=0}else if(n!==" "&&n!==" "){if(l===2)throw new he("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:a});l=!o&&n==="\\"?1:0,a=c}}throw new he("unfinished string",{toml:e,ptr:t})}function mf(e,t,n,s){if(e==="true")return!0;if(e==="false")return!1;if(e==="-inf")return-1/0;if(e==="inf"||e==="+inf")return 1/0;if(e==="nan"||e==="+nan"||e==="-nan")return NaN;if(e==="-0")return s?0n:0;let o=Ex.test(e);if(o||Sx.test(e)){if(jx.test(e))throw new he("leading zeroes are not allowed",{toml:t,ptr:n});e=e.replace(/_/g,"");let i=+e;if(isNaN(i))throw new he("invalid number",{toml:t,ptr:n});if(o){if((o=!Number.isSafeInteger(i))&&!s)throw new he("integer value cannot be represented losslessly",{toml:t,ptr:n});(o||s===!0)&&(i=BigInt(e))}return i}let r=new nr(e);if(!r.isValid())throw new he("invalid value",{toml:t,ptr:n});return r}var Ex,Sx,jx,mc=L(()=>{fc();Cs();Ex=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,Sx=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,jx=/^[+-]?0[0-9_]/});function oi(e,t=0,n=e.length){let s=e.indexOf(`
95
- `,t);return e[s-1]==="\r"&&s--,s<=n?s:-1}function mo(e,t){for(let n=t;n<e.length;n++){let s=e[n];if(s===`
93
+ `))l=l&&3;else{if(n<" "&&n!==" "||n==="\x7F")throw new pe("control characters are not allowed in strings",{toml:e,ptr:c});if((!l||l===3)&&n===s&&(!i||e[c+1]===s&&e[c+2]===s))return i&&(e[c+3]===s&&c++,e[c+3]===s&&c++),[l?r:r+e.slice(a,c),c+(i?3:1)];if(!l)!o&&n==="\\"&&(r+=e.slice(a,a=c),l=1);else if(l===1)if(n==="x"||n==="u"||n==="U"){let u=0,d=n==="x"?2:n==="u"?4:8;for(let m=0;m<d;m++,c++){let p=e.charCodeAt(c+1),f=p>=48&&p<=57?p-48:p>=65&&p<=70?p-65+10:p>=97&&p<=102?p-97+10:-1;if(f<0)throw new pe("invalid non-hex character in unicode escape",{toml:e,ptr:c+1});u=u<<4|f}if(u<0||u>1114111||u>=55296&&u<=57343)throw new pe("invalid unicode escape",{toml:e,ptr:c});r+=String.fromCodePoint(u),a=c+1,l=0}else if(n===" "||n===" ")l=2;else{if(n==="b")r+="\b";else if(n==="t")r+=" ";else if(n==="n")r+=`
94
+ `;else if(n==="f")r+="\f";else if(n==="r")r+="\r";else if(n==="e")r+="\x1B";else if(n==='"')r+='"';else if(n==="\\")r+="\\";else throw new pe("unrecognized escape sequence",{toml:e,ptr:c});a=c+1,l=0}else if(n!==" "&&n!==" "){if(l===2)throw new pe("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:a});l=!o&&n==="\\"?1:0,a=c}}throw new pe("unfinished string",{toml:e,ptr:t})}function jf(e,t,n,s){if(e==="true")return!0;if(e==="false")return!1;if(e==="-inf")return-1/0;if(e==="inf"||e==="+inf")return 1/0;if(e==="nan"||e==="+nan"||e==="-nan")return NaN;if(e==="-0")return s?0n:0;let o=Kx.test(e);if(o||Yx.test(e)){if(Xx.test(e))throw new pe("leading zeroes are not allowed",{toml:t,ptr:n});e=e.replace(/_/g,"");let r=+e;if(isNaN(r))throw new pe("invalid number",{toml:t,ptr:n});if(o){if((o=!Number.isSafeInteger(r))&&!s)throw new pe("integer value cannot be represented losslessly",{toml:t,ptr:n});(o||s===!0)&&(r=BigInt(e))}return r}let i=new ir(e);if(!i.isValid())throw new pe("invalid value",{toml:t,ptr:n});return i}var Kx,Yx,Xx,_c=L(()=>{jc();Is();Kx=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,Yx=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,Xx=/^[+-]?0[0-9_]/});function ui(e,t=0,n=e.length){let s=e.indexOf(`
95
+ `,t);return e[s-1]==="\r"&&s--,s<=n?s:-1}function go(e,t){for(let n=t;n<e.length;n++){let s=e[n];if(s===`
96
96
  `)return n;if(s==="\r"&&e[n+1]===`
97
- `)return n+1;if(s<" "&&s!==" "||s==="\x7F")throw new he("control characters are not allowed in comments",{toml:e,ptr:t})}return e.length}function xn(e,t,n,s){let o;for(;;){for(;(o=e[t])===" "||o===" "||!n&&(o===`
97
+ `)return n+1;if(s<" "&&s!==" "||s==="\x7F")throw new pe("control characters are not allowed in comments",{toml:e,ptr:t})}return e.length}function xn(e,t,n,s){let o;for(;;){for(;(o=e[t])===" "||o===" "||!n&&(o===`
98
98
  `||o==="\r"&&e[t+1]===`
99
- `);)t++;if(s||o!=="#")break;t=mo(e,t)}return t}function hf(e,t,n,s,o=!1){if(!s)return t=oi(e,t),t<0?e.length:t;for(let r=t;r<e.length;r++){let i=e[r];if(i==="#")r=oi(e,r);else{if(i===n)return r+1;if(i===s||o&&(i===`
100
- `||i==="\r"&&e[r+1]===`
101
- `))return r}}throw new he("cannot find end of structure",{toml:e,ptr:t})}var ri=L(()=>{Cs();});function _x(e,t,n){let s=e.slice(t,n),o=s.indexOf("#");return o>-1&&(mo(e,o),s=s.slice(0,o)),[s.trimEnd(),o]}function sr(e,t,n,s,o){if(s===0)throw new he("document contains excessively nested structures. aborting.",{toml:e,ptr:t});let r=e[t];if(r==="["||r==="{"){let[l,c]=r==="["?bf(e,t,s,o):gf(e,t,s,o);if(n){if(c=xn(e,c),e[c]===",")c++;else if(e[c]!==n)throw new he("expected comma or end of structure",{toml:e,ptr:c})}return[l,c]}if(r==='"'||r==="'"){let[l,c]=si(e,t);if(n){if(c=xn(e,c),e[c]&&e[c]!==","&&e[c]!==n&&e[c]!==`
102
- `&&e[c]!=="\r")throw new he("unexpected character encountered",{toml:e,ptr:c});e[c]===","&&c++}return[l,c]}let i=hf(e,t,",",n),a=_x(e,t,i-(e[i-1]===","?1:0));if(!a[0])throw new he("incomplete key-value declaration: no value specified",{toml:e,ptr:t});return n&&a[1]>-1&&(i=xn(e,t+a[1]),e[i]===","&&i++),[mf(a[0],e,t,o),i]}var hc=L(()=>{mc();gc();ri();Cs();});function ii(e,t,n="="){let s=t-1,o=[],r=e.indexOf(n,t);if(r<0)throw new he("incomplete key-value: cannot find end of key",{toml:e,ptr:t});do{let i=e[t=++s];if(i!==" "&&i!==" ")if(i==='"'||i==="'"){if(i===e[t+1]&&i===e[t+2])throw new he("multiline strings are not allowed in keys",{toml:e,ptr:t});let[a,l]=si(e,t);s=e.indexOf(".",l);let c=e.slice(l,s<0||s>r?r:s),u=oi(c);if(u>-1)throw new he("newlines are not allowed in keys",{toml:e,ptr:t+s+u});if(c.trimStart())throw new he("found extra tokens after the string part",{toml:e,ptr:l});if(r<l&&(r=e.indexOf(n,l),r<0))throw new he("incomplete key-value: cannot find end of key",{toml:e,ptr:t});o.push(a)}else{s=e.indexOf(".",t);let a=e.slice(t,s<0||s>r?r:s);if(!Rx.test(a))throw new he("only letter, numbers, dashes and underscores are allowed in keys",{toml:e,ptr:t});o.push(a.trimEnd())}}while(s+1&&s<r);return[o,xn(e,r+1,!0,!0)]}function gf(e,t,n,s){let o={},r=new Set,i;for(t++;(i=e[t++])!=="}"&&i;){if(i===",")throw new he("expected value, found comma",{toml:e,ptr:t-1});if(i==="#")t=mo(e,t);else if(i!==" "&&i!==" "&&i!==`
103
- `&&i!=="\r"){let a,l=o,c=!1,[u,d]=ii(e,t-1);for(let f=0;f<u.length;f++){if(f&&(l=c?l[a]:l[a]={}),a=u[f],(c=Object.hasOwn(l,a))&&(typeof l[a]!="object"||r.has(l[a])))throw new he("trying to redefine an already defined value",{toml:e,ptr:t});!c&&a==="__proto__"&&Object.defineProperty(l,a,{enumerable:!0,configurable:!0,writable:!0})}if(c)throw new he("trying to redefine an already defined value",{toml:e,ptr:t});let[m,p]=sr(e,d,"}",n-1,s);r.add(m),l[a]=m,t=p}}if(!i)throw new he("unfinished table encountered",{toml:e,ptr:t});return[o,t]}function bf(e,t,n,s){let o=[],r;for(t++;(r=e[t++])!=="]"&&r;){if(r===",")throw new he("expected value, found comma",{toml:e,ptr:t-1});if(r==="#")t=mo(e,t);else if(r!==" "&&r!==" "&&r!==`
104
- `&&r!=="\r"){let i=sr(e,t-1,"]",n-1,s);o.push(i[0]),t=i[1]}}if(!r)throw new he("unfinished array encountered",{toml:e,ptr:t});return[o,t]}var Rx,gc=L(()=>{mc();hc();ri();Cs();Rx=/^[a-zA-Z0-9-_]+[ \t]*$/});function wf(e,t,n,s){let o=t,r=n,i,a=!1,l;for(let c=0;c<e.length;c++){if(c){if(o=a?o[i]:o[i]={},r=(l=r[i]).c,s===0&&(l.t===1||l.t===2))return null;if(l.t===2){let u=o.length-1;o=o[u],r=r[u].c}}if(i=e[c],(a=Object.hasOwn(o,i))&&r[i]?.t===0&&r[i]?.d)return null;a||(i==="__proto__"&&(Object.defineProperty(o,i,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(r,i,{enumerable:!0,configurable:!0,writable:!0})),r[i]={t:c<e.length-1&&s===2?3:s,d:!1,i:0,c:{}})}if(l=r[i],l.t!==s&&!(s===1&&l.t===3)||(s===2&&(l.d||(l.d=!0,o[i]=[]),o[i].push(o={}),l.c[l.i++]=l={t:1,d:!1,i:0,c:{}}),l.d))return null;if(l.d=!0,s===1)o=a?o[i]:o[i]={};else if(s===0&&a)return null;return[i,o,l.c]}function ho(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let s={},o={},r=s,i=o;for(let a=xn(e,0);a<e.length;){if(e[a]==="["){let l=e[++a]==="[",c=ii(e,a+=+l,"]");if(l){if(e[c[1]-1]!=="]")throw new he("expected end of table declaration",{toml:e,ptr:c[1]-1});c[1]++}let u=wf(c[0],s,o,l?2:1);if(!u)throw new he("trying to redefine an already defined table or value",{toml:e,ptr:a});i=u[2],r=u[1],a=c[1]}else{let l=ii(e,a),c=wf(l[0],r,i,0);if(!c)throw new he("trying to redefine an already defined table or value",{toml:e,ptr:a});let u=sr(e,l[1],void 0,t,n);c[1][c[0]]=u[0],a=u[1]}if(a=xn(e,a,!0),e[a]&&e[a]!==`
105
- `&&e[a]!=="\r")throw new he("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:a});a=xn(e,a)}return s}var yf=L(()=>{gc();hc();ri();Cs();});var vf=L(()=>{});var ai=L(()=>{yf();vf();fc();Cs();});var kf={};Sn(kf,{CONFIG_FILE:()=>li,loadTomlConfig:()=>bc,mergeEffective:()=>xf,normalizeConfig:()=>$f});async function bc(e,{file:t}={}){let n=t||Z(e,li),s;try{s=await ze(n,"utf8")}catch(o){if(o&&o.code==="ENOENT")return null;throw o}try{return ho(s)}catch(o){throw new Error(`Invalid ${li} at ${n}: ${o&&o.message?o.message:o}`)}}async function Ax(e,t){let n;if(Array.isArray(e))n=e;else{let o=Bt(t,String(e));n=(await ze(o,"utf8")).split(`
106
- `)}let s=[];for(let o of n){let r=String(o).trim();!r||r.startsWith("#")||s.push(Bt(t,r))}return s}async function $f(e,{configDir:t}={}){let n=e||{},s=t||process.cwd(),o={};if(n.repositories!==void 0&&(o.repositories=await Ax(n.repositories,s)),n.out_root!==void 0&&(o.outRoot=Bt(s,String(n.out_root))),n.graph_file!==void 0&&(o.graphFile=Bt(s,String(n.graph_file))),n.graph_files!==void 0){let w=Array.isArray(n.graph_files)?n.graph_files:[n.graph_files];o.graphFiles=w.map(v=>Bt(s,String(v)))}let r=n.graph||{};r.read_only!==void 0&&(o.graph={readOnly:r.read_only});let i=n.corpus||{};i.tier!==void 0&&(o.corpus={tier:i.tier});let a=n.seed||{},l={};a.enabled!==void 0&&(l.enabled=a.enabled),a.limit!==void 0&&(l.limit=a.limit),a.capture_unknown_context!==void 0&&(l.captureUnknownContext=a.capture_unknown_context),a.unknown_context_limit!==void 0&&(l.unknownContextLimit=a.unknown_context_limit),Object.keys(l).length&&(o.seed=l),n.extensions!==void 0&&(o.extensions=n.extensions),n.bias!==void 0&&(o.bias=n.bias),n.games!==void 0&&(o.games=n.games),n.planning!==void 0&&(o.planning=n.planning),n.research!==void 0&&(o.research=n.research),n.discourse!==void 0&&(o.discourse=n.discourse);let c=n.index||{},u={};c.languages!==void 0&&(u.languages=c.languages),c.exclude!==void 0&&(u.exclude=c.exclude),c.secret_exclude!==void 0&&(u.secretExclude=c.secret_exclude),c.history_depth!==void 0&&(u.historyDepth=c.history_depth),c.include_text!==void 0&&(u.includeText=c.include_text),c.include_structure!==void 0&&(u.includeStructure=c.include_structure),c.respect_gitignore!==void 0&&(u.respectGitignore=c.respect_gitignore),c.markdown_sections!==void 0&&(u.markdownSections=c.markdown_sections),c.vue!==void 0&&(u.vue=c.vue),Object.keys(u).length&&(o.index=u);let d=n.tune||{},m={};d.score_gap_k!==void 0&&(m.scoreGapK=d.score_gap_k),d.literal_mention!==void 0&&(m.literalMention=d.literal_mention),d.demote_non_prod!==void 0&&(m.demoteNonProd=d.demote_non_prod),d.call_adjacency!==void 0&&(m.callAdjacency=d.call_adjacency),d.impl_of_interface!==void 0&&(m.implOfInterface=d.impl_of_interface),d.beam_search!==void 0&&(m.beamSearch=d.beam_search),d.beam_width!==void 0&&(m.beamWidth=d.beam_width),d.prose_layers!==void 0&&(m.proseLayers=d.prose_layers);let p=d.expansion||{},f={};p.strategy!==void 0&&(f.strategy=p.strategy),p.nodes!==void 0&&(f.nodes=p.nodes),p.q!==void 0&&(f.q=p.q),p.depth!==void 0&&(f.depth=p.depth),Object.keys(f).length&&(m.expansion=f),Object.keys(m).length&&(o.tune=m);let g=n.telemetry||{};g.enabled!==void 0&&(o.telemetry={enabled:g.enabled});let h=n.memory||{},b={};h.retention_versions!==void 0&&(b.retentionVersions=h.retention_versions),h.backend!==void 0&&(b.backend=h.backend),Object.keys(b).length&&(o.memory=b);let y=[];for(let[w,v]of Tx)n[w]&&n[w][v]!==void 0&&y.push(`${w}.${v}`);return o.unwired=y,o}function ci(e,t="",n={}){for(let[s,o]of Object.entries(e||{})){if(o==null)continue;let r=t?`${t}.${s}`:s;Array.isArray(o)||typeof o!="object"?n[r]=o:ci(o,r,n)}return n}function xf({args:e={},toml:t=null,defaults:n={}}={}){let s=ci(n),o=null;if(t){let{unwired:u,...d}=t;o=d}let r=o?ci(o):{},i=ci(e),a=[...new Set([...Object.keys(s),...Object.keys(r),...Object.keys(i)])].sort(),l={},c={};for(let u of a)u in i?(l[u]=i[u],c[u]="arg"):u in r?(l[u]=r[u],c[u]="tmct.toml"):(l[u]=s[u],c[u]="default");return{effective:l,sources:c}}var li,Tx,ui=L(()=>{yt();De();ai();li="tmct.toml";Tx=[["index","include_text"],["index","include_structure"],["index","respect_gitignore"],["index","markdown_sections"],["index","vue"]]});var as={};Sn(as,{CANONICALISED_FROM_PROP:()=>Rc,CAPABLE_OF_PREDICATE:()=>zf,CREATED_AT_PROP:()=>Nt,DEFAULT_RETENTION:()=>$c,FACT_CLASS:()=>rs,HAS_A_PREDICATE:()=>Ms,IN_REPLY_TO_PROP:()=>_c,MEMORY_DIR_REL:()=>ir,MEMORY_GRAPH_REL:()=>kc,MEMORY_MANIFEST_REL:()=>If,MEMORY_SESSION_CLASS:()=>Sc,MULTI_VALUED_PREDICATES:()=>Uf,OPERATOR_SOURCE_ID:()=>di,RULE_CLASS:()=>bo,RULE_KIND_ACTION_CONSTRAINT:()=>Nc,RULE_KIND_ACTION_EFFECT:()=>fr,RULE_KIND_ACTION_PRECOND:()=>bi,RULE_KIND_ACTION_SIGNATURE:()=>Lc,RULE_KIND_COMPOSE2:()=>dr,RULE_KIND_FILTER:()=>pr,RULE_KIND_PROP:()=>yo,RULE_KIND_RECURSIVE:()=>Oc,SAID_IN_SESSION_PROP:()=>jc,SOURCE_CLASS:()=>go,SOURCE_RELIABILITY_PROP:()=>jf,STATED_BY_PROP:()=>Un,SYLLOGISE_STATE_REL:()=>Ic,UPDATED_AT_PROP:()=>$s,UTTERANCE_CLASS:()=>Ec,appendCanonicalisedFromEdges:()=>uk,appendFact:()=>dk,appendFacts:()=>ur,appendRule:()=>Mc,appendUtterance:()=>lk,appendUtterances:()=>Pf,closeSqliteMemoryStore:()=>Af,createInMemoryStore:()=>mi,createSqliteMemoryStore:()=>Rf,emptyMemory:()=>ar,factIdForTriple:()=>be,findContradictions:()=>Bf,findRuleByName:()=>Pc,findRulesByName:()=>gk,isMemoryOrSqliteHandle:()=>Tc,loadMemory:()=>Zt,loadSyllogiseState:()=>Xx,normFactPredicate:()=>Fn,normFactTerm:()=>ee,openConfiguredMemoryBackend:()=>is,openMemoryBackend:()=>Tf,provSourceClassFor:()=>tk,provenanceTagToSource:()=>Po,readFactRows:()=>en,readRuleRows:()=>Fc,removeFacts:()=>bk,resolveMemoryGraphFile:()=>or,resolveRelationChase:()=>Dc,resolveRelationChaseReverse:()=>Df,saveSyllogiseState:()=>Jx,snapshotMemory:()=>Hx});function ar(){return{generated_at:"",memory:!0,prefixes:{owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",mgx:"urn:tmct:mgx#",mgxneg:"urn:tmct:mgxneg#"},vocabulary:Ox.map(e=>({...e})),classes:[],objectProperties:[],individuals:[],proseIndex:{}}}function or(e,t=null){if(wo(e)||Is(e))throw new Error("resolveMemoryGraphFile: dir is a memory/sqlite handle, not a file path (Backend A only)");return t===null?Z(e,kc):Z(e,ir,`graph.v${t}.json`)}function wo(e){return!!e&&typeof e=="object"&&e.backend===Ac}function Is(e){return!!e&&typeof e=="object"&&e.backend===_f}function Tc(e){return wo(e)||Is(e)}function mi(){return{backend:Ac,payload:ar()}}function Mx(){if(Sf)return;Sf=!0;let e=process.listeners("warning").slice();process.removeAllListeners("warning"),process.on("warning",t=>{if(!(t?.name==="ExperimentalWarning"&&/sqlite/i.test(String(t?.message))))if(e.length)for(let n of e)n(t);else console.error(t.stack||String(t))})}async function Rf(e){Mx();let{DatabaseSync:t}=await Promise.resolve().then(()=>(ff(),pf)),n=new t(e);return n.exec("PRAGMA journal_mode = WAL"),n.exec("PRAGMA synchronous = NORMAL"),n.exec(Lx),{backend:_f,db:n,dbPath:e}}function Af(e){Is(e)&&e.db.close()}async function Tf(e,t){if(t===Ac)return{dir:mi(),close:async()=>{}};let n=Z(e,".tmct","memory","graph.sqlite"),s=r=>Vl(r).then(()=>!0,()=>!1);!await s(n)&&await s(Z(e,kc))&&process.stderr.write(`found .tmct/memory/graph.json \u2014 the flat-file memory backend is retired; starting a fresh sqlite store (the old file is left untouched)
107
- `),await jn($e(n),{recursive:!0});let o=await Rf(n);return{dir:o,close:async()=>Af(o)}}async function is(e,t=process.env){let n=String(t?.TMCT_MEMORY_BACKEND||"").trim().toLowerCase();if(!n)try{let{loadTomlConfig:s}=await Promise.resolve().then(()=>(ui(),kf));n=String((await s(e))?.memory?.backend||"").trim().toLowerCase()}catch{n=""}return Tf(e,n)}function Px(e){let t=e.db.prepare("PRAGMA data_version").get()?.data_version;return e.cachedPayload&&e.cachedDataVersion!==t&&(e.cachedPayload=null),e.cachedPayload||(e.cachedPayload=Fx(e),e.cachedDataVersion=t),zn(e.cachedPayload)}function Fx(e){let t=e.db,n=ar(),s=(a,l)=>{let c=t.prepare("SELECT v FROM meta WHERE k = ?").get(a);return c?JSON.parse(c.v):l},o=t.prepare("SELECT json FROM individuals ORDER BY ord").all().map(a=>JSON.parse(a.json)),r=t.prepare("SELECT subject, object, subject_label, object_label, extra FROM edges WHERE prop = ? ORDER BY rowid"),i=t.prepare("SELECT prop, predicate, count FROM relations ORDER BY ord").all().map(a=>({predicate:a.predicate,prop:a.prop,count:a.count,examples:r.all(a.prop).map(l=>{let c={subject:l.subject,object:l.object,subjectLabel:l.subject_label,objectLabel:l.object_label};return l.extra&&Object.assign(c,JSON.parse(l.extra)),c})}));return{generated_at:s("generated_at",n.generated_at),memory:s("memory",n.memory),prefixes:s("prefixes",n.prefixes),vocabulary:s("vocabulary",n.vocabulary),classes:s("classes",n.classes),objectProperties:i,individuals:o,proseIndex:s("proseIndex",n.proseIndex)}}function Dx(e,t){let n=zn(t),s=e.individuals.findIndex(o=>o?.id===t.id);s>=0?e.individuals[s]=n:e.individuals.push(n)}function zx(e,t){e.individuals=e.individuals.filter(n=>t.has(n?.id))}function Ux(e,t){let n=e.objectProperties.find(s=>s?.prop===t);return n||(n={predicate:null,prop:t,count:0,examples:[]},e.objectProperties.push(n)),n}function Bx(e,t,n){let s=`${t.subject}\0${t.object}`;e.examples=e.examples.filter(r=>`${r.subject}\0${r.object}`!==s);let o={subject:t.subject,object:t.object,subjectLabel:t.subjectLabel??null,objectLabel:t.objectLabel??null};n.length&&Object.assign(o,zn(Object.fromEntries(n.map(r=>[r,t[r]])))),e.examples.push(o)}function Wx(e,t){e.examples=e.examples.filter(n=>t.has(`${n.subject}\0${n.object}`))}function qx(e,t){e.objectProperties=e.objectProperties.filter(n=>t.has(n?.prop))}function Gx(e,t){let n=e.db,s=ar(),o=e.cachedPayload||null;n.exec("BEGIN IMMEDIATE");try{let r=n.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)");r.run("generated_at",JSON.stringify(t.generated_at??s.generated_at)),r.run("memory",JSON.stringify(t.memory??s.memory)),r.run("prefixes",JSON.stringify(t.prefixes??s.prefixes)),r.run("vocabulary",JSON.stringify(t.vocabulary??s.vocabulary)),r.run("classes",JSON.stringify(t.classes??s.classes)),r.run("proseIndex",JSON.stringify(t.proseIndex??s.proseIndex)),o&&(o.generated_at=zn(t.generated_at??s.generated_at),o.memory=zn(t.memory??s.memory),o.prefixes=zn(t.prefixes??s.prefixes),o.vocabulary=zn(t.vocabulary??s.vocabulary),o.classes=zn(t.classes??s.classes),o.proseIndex=zn(t.proseIndex??s.proseIndex));let i=n.prepare("SELECT ord, json FROM individuals WHERE id = ?"),l=n.prepare("SELECT COALESCE(MAX(ord), -1) AS m FROM individuals").get().m+1,c=n.prepare("INSERT OR REPLACE INTO individuals(id, ord, class, label, json) VALUES (?, ?, ?, ?, ?)"),u=new Set;for(let v of t.individuals||[]){u.add(v.id);let k=JSON.stringify(v),$=i.get(v.id);if($&&$.json===k)continue;let T=$?$.ord:l++;c.run(v.id,T,v.class??null,v.label??null,k),o&&Dx(o,v)}let d=n.prepare("DELETE FROM individuals WHERE id = ?");for(let v of n.prepare("SELECT id FROM individuals").all())u.has(v.id)||d.run(v.id);o&&zx(o,u);let m=n.prepare("SELECT ord FROM relations WHERE prop = ?"),f=n.prepare("SELECT COALESCE(MAX(ord), -1) AS m FROM relations").get().m+1,g=n.prepare("INSERT OR REPLACE INTO relations(prop, ord, predicate, count) VALUES (?, ?, ?, ?)"),h=n.prepare("SELECT subject, object, subject_label, object_label, extra FROM edges WHERE prop = ?"),b=n.prepare("INSERT OR REPLACE INTO edges(prop, subject, object, subject_label, object_label, extra) VALUES (?, ?, ?, ?, ?, ?)"),y=n.prepare("DELETE FROM edges WHERE prop = ? AND subject = ? AND object = ?"),w=new Set;for(let v of t.objectProperties||[]){w.add(v.prop);let k=h.all(v.prop),$=new Map(k.map(E=>[`${E.subject}\0${E.object}`,E])),T=new Set,S=o?Ux(o,v.prop):null;for(let E of v.examples||[]){let R=`${E.subject}\0${E.object}`;T.add(R);let N=Object.keys(E).filter(Y=>!Nx.has(Y)),A=N.length?JSON.stringify(Object.fromEntries(N.map(Y=>[Y,E[Y]]))):null,P=$.get(R);P&&(P.subject_label??null)===(E.subjectLabel??null)&&(P.object_label??null)===(E.objectLabel??null)&&(P.extra??null)===(A??null)||(b.run(v.prop,E.subject,E.object,E.subjectLabel??null,E.objectLabel??null,A),S&&Bx(S,E,N))}for(let E of $.keys()){if(T.has(E))continue;let[R,N]=E.split("\0");y.run(v.prop,R,N)}S&&Wx(S,T);let j=Number.isFinite(v.count)?v.count:(v.examples||[]).length,C=m.get(v.prop)?.ord??f++;g.run(v.prop,C,v.predicate??null,j),S&&(S.predicate=v.predicate??null,S.count=j)}for(let v of n.prepare("SELECT prop FROM relations").all())w.has(v.prop)||(n.prepare("DELETE FROM edges WHERE prop = ?").run(v.prop),n.prepare("DELETE FROM relations WHERE prop = ?").run(v.prop));o&&qx(o,w),n.exec("COMMIT")}catch(r){throw n.exec("ROLLBACK"),e.cachedPayload=void 0,r}}async function Cf(e,t){let n=`${e}.tmp-${process.pid}-${Math.random().toString(36).slice(2,10)}`;await Ao(n,t),await Er(n,e)}async function Cc(e,t){await Cf(e,JSON.stringify(t))}async function Hx(e,{retentionVersions:t}={}){if(Tc(e))throw new Error("snapshotMemory only supports the flat-JSON backend (Backend A) \u2014 a memory/sqlite handle has no on-disk graph.json to snapshot");let n=or(e),s;try{s=await ze(n,"utf8")}catch(u){if(u?.code==="ENOENT")return{skipped:!0,version:null,prunedVersion:null};throw u}let o=Vx(e),r;try{r=JSON.parse(await ze(o,"utf8"))}catch(u){if(u?.code!=="ENOENT")throw u;r={version:0,retentionVersions:t??$c}}Number.isInteger(r.version)||(r.version=0),Number.isInteger(r.retentionVersions)||(r.retentionVersions=t??$c);let i=r.version,a=or(e,i);await jn($e(a),{recursive:!0}),await Cf(a,s),r.version=i+1;let l=null,c=i-r.retentionVersions;if(c>=0)try{await Fi(or(e,c)),l=c}catch(u){if(u?.code!=="ENOENT")throw u}return await Cc(o,r),{skipped:!1,version:i,prunedVersion:l}}async function Zt(e){if(wo(e))return wc(e.payload);if(Is(e))return wc(Px(e));let t;try{t=await ze(vc(e),"utf8")}catch(n){if(n?.code==="ENOENT")return ar();throw n}return wc(JSON.parse(t))}function wc(e){if(!Array.isArray(e?.individuals))return e;let t=new Map;for(let s of e.individuals){if(s?.class!==rs||!Kx.test(s.id||""))continue;let o=i=>(s.attributes||[]).find(a=>a?.key===i)?.value||"",r=Zo(o("subject"),o("predicate"),o("object"));r!==s.id&&(t.set(s.id,r),s.id=r)}if(!t.size)return e;let n=s=>t.get(s)||s;for(let s of e.objectProperties||[])for(let o of s.examples||[])o&&(t.has(o.subject)&&(o.subject=t.get(o.subject)),t.has(o.object)&&(o.object=t.get(o.object)));for(let s of e.individuals){Array.isArray(s?.derived_from)&&s.derived_from.length&&(s.derived_from=s.derived_from.map(n));let o=(s?.attributes||[]).find(r=>r?.prop==="mgx:factJustification");o?.value&&(o.value=o.value.split(" | ").map(r=>r.split(" ").filter(Boolean).map(n).join(" ")).filter(Boolean).join(" | "))}return e}async function Yx(e,t){if(wo(e)){e.payload=t;return}if(Is(e)){Gx(e,t);return}await jn($e(vc(e)),{recursive:!0}),await Cc(vc(e),t)}async function Xx(e){if(wo(e))return e.syllogiseState?structuredClone(e.syllogiseState):null;if(Is(e)){let t=e.db.prepare("SELECT v FROM meta WHERE k = ?").get(Of);return t?.v?JSON.parse(t.v):null}try{return JSON.parse(await ze(Z(e,Ic),"utf8"))}catch(t){if(t?.code==="ENOENT")return null;throw t}}async function Jx(e,t){if(wo(e)){e.syllogiseState=structuredClone(t);return}if(Is(e)){e.db.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)").run(Of,JSON.stringify(t));return}let n=Z(e,Ic);await jn($e(n),{recursive:!0}),await Cc(n,t)}function Qx(e){let t=new Map,n=new Map,s=new Map;for(let r of e.individuals||[])r?.id&&(t.set(r.id,r),r.class===go&&n.set(r.id,r));let o=(e.objectProperties||[]).find(r=>r?.prop===Un);for(let r of o?.examples||[]){if(!r?.subject)continue;let i=s.get(r.subject);i?i.push(r.object):s.set(r.subject,[r.object])}return e[xc]={individualsById:t,sourcesById:n,statedByBySubject:s},e[xc]}async function Ls(e,t){let n=await Zt(e);Qx(n);let s=await t(n)??n;return rk(s),ak(s),s.proseIndex=du(s.individuals),await Yx(e,s),s}function cr(e,t){return e?.attributes?.find(n=>n?.prop===Nt)?.value||t||pi()}function rr(e,t,n,s){e.attributes=(e.attributes||[]).filter(o=>o?.prop!==t),e.attributes.push({prop:t,key:n,value:s})}function Zx(e){switch(e?.kind){case"operator":return{id:e.sessionId?`${di}:${e.sessionId}`:di,type:"operator"};case"teach":return{id:e.sessionId?`${yc}:${e.sessionId}`:yc,type:"teach"};case"provider":return{id:`src:provider:${e.name}`,type:"provider"};case"corpus":return{id:`src:corpus:${e.name}`,type:"corpus"};case"corpusWeak":return{id:`src:corpus-weak:${e.name}`,type:"corpusWeak"};case"reference":return{id:`src:reference:${e.pack}:${e.article}`,type:"reference"};case"referenceLive":return{id:`src:reference:${e.pack}:${e.article}`,type:"referenceLive"};case"extracted":return{id:`src:extracted:${e.name}`,type:"extracted"};case"optimisticExtract":return{id:`src:optimistic-extract:${e.name}`,type:"optimisticExtract"};case"web":return{id:`src:learned:web:${Qo(String(e.url||""))}`,type:"web",url:String(e.url||"")};case"entailed":return{id:`src:entailed:${e.rule}`,type:"entailed",rule:String(e.rule||"")};default:return null}}function tk(e){return ek[e]||null}function nk(e,t,n){let s=Zx(t);if(!s)return null;let o=Os(e),r=o?o.individualsById.get(s.id):e.individuals.find(c=>c?.id===s.id),i=cr(r,t?.createdAt||n),a={id:s.id,label:Lf(s.id),class:go,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:sourceType",key:"sourceType",value:s.type},{prop:Nt,key:"createdAt",value:i},...s.url?[{prop:"mgx:sourceUrl",key:"sourceUrl",value:s.url}]:[],...s.rule?[{prop:"mgx:sourceRule",key:"sourceRule",value:s.rule}]:[]]},l=lr(e,a);return o&&o.sourcesById.set(s.id,l),s.id}function sk(e){let t=Os(e),n={};if(t){for(let[s,o]of t.sourcesById)n[s]=o;return n}for(let s of e.individuals)s?.class===go&&(n[s.id]=s);return n}function ok(e,t){let n=Os(e);return n?(n.statedByBySubject.get(t)||[]).slice():(e.objectProperties.find(o=>o?.prop===Un)?.examples||[]).filter(o=>o?.subject===t).map(o=>o.object)}function Nf(e,t,n=Date.now(),s={}){let o=ok(e,t.id),r=(t.attributes||[]).find(l=>l?.prop===Nt)?.value||"",{score:i,inputs:a}=wu({sourceIds:o,createdAt:r},sk(e),{now:n,...Array.isArray(s?.premiseTrusts)?{premiseTrusts:s.premiseTrusts}:{},...typeof s?.ruleConfidence=="number"?{ruleConfidence:s.ruleConfidence}:{}});rr(t,Rr,"trustScore",String(i)),rr(t,Ki,"trustInputs",JSON.stringify(a)),rr(t,$s,"updatedAt",new Date(n).toISOString())}function gi(e,t,n=Date.now(),s={}){let o=(t.attributes||[]).find(i=>i?.prop==="mgx:factProvenance")?.value||"",r=(t.attributes||[]).find(i=>i?.prop===Nt)?.value||new Date(n).toISOString();for(let i of o.split(" | ").filter(Boolean)){let a=Po(i);if(!a)continue;let l=nk(e,a,r);l&&fi(e,{predicate:"statedBy",prop:Un},{subject:t.id,object:l,subjectLabel:t.label,objectLabel:Lf(l)})}Nf(e,t,n,s)}function rk(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=e.objectProperties.find(r=>r?.prop===Un),n=new Set((t?.examples||[]).map(r=>r.subject)),s=!1,o=Date.now();for(let r of e.individuals)r?.class!==rs||n.has(r.id)||!(r.attributes||[]).find(a=>a?.prop==="mgx:factProvenance")?.value||(gi(e,r,o),s=!0);s&&Ns(e)}function ak(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=en(e),n=new Set;for(let a of Bf(e))for(let l of a)n.add(l.id);let s=new Map;for(let a of t)for(let l of a.sourceIds){if(!ik(l))continue;let c=s.get(l)||{factsAsserted:0,factsContradicted:0};c.factsAsserted+=1,n.has(a.id)&&(c.factsContradicted+=1),s.set(l,c)}if(!s.size)return;let o=Os(e);for(let[a,l]of s){let c=o?o.individualsById.get(a):e.individuals.find(u=>u?.id===a);c&&(rr(c,jf,"sourceReliability",String(yu(l))),rr(c,$s,"updatedAt",new Date().toISOString()))}let r=e.objectProperties.find(a=>a?.prop===Un),i=new Set;for(let a of r?.examples||[])s.has(a?.object)&&i.add(a.subject);for(let a of i){let l=o?o.individualsById.get(a):e.individuals.find(c=>c?.id===a);l&&Nf(e,l)}}function lr(e,t){let n=Os(e);if(n){let o=n.individualsById.get(t.id);return o?(Object.assign(o,t),o):(e.individuals.push(t),n.individualsById.set(t.id,t),t)}let s=e.individuals.findIndex(o=>o?.id===t.id);return s>=0?(e.individuals[s]=t,t):(e.individuals.push(t),t)}function fi(e,{predicate:t,prop:n},s){let o=e.objectProperties.find(l=>l?.prop===n);o||(o={predicate:t,prop:n,count:0,examples:[]},e.objectProperties.push(o));let r=n===Un?Os(e):null;if(r){let l=r.statedByBySubject.get(s.subject);if(!l||!l.includes(s.object)){o.examples.push({...s,createdAt:s.createdAt||pi()}),o.count=o.examples.length,l?l.push(s.object):r.statedByBySubject.set(s.subject,[s.object]);return}}let a=(o.examples||[]).find(l=>l?.subject===s.subject&&l?.object===s.object)?.createdAt||s.createdAt||pi();if(o.examples=(o.examples||[]).filter(l=>!(l?.subject===s.subject&&l?.object===s.object)),o.examples.push({...s,createdAt:a}),o.count=o.examples.length,r){let l=r.statedByBySubject.get(s.subject)||[];l.includes(s.object)||l.push(s.object),r.statedByBySubject.set(s.subject,l)}}function Ns(e){let t=[Sc,Ec,rs,go,bo];e.classes=e.classes.filter(n=>!t.includes(n?.name));for(let n of t){let s=e.individuals.filter(o=>o?.class===n);s.length&&e.classes.push({name:n,count:s.length,sample:s.slice(0,3).map(o=>o.label)})}}function ck(e,t,n=""){let s=`session:${t}`;return e.individuals.some(o=>o?.id===s)||e.individuals.push({id:s,label:String(t).slice(0,8),class:Sc,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:Nt,key:"createdAt",value:n||pi()},...n?[{prop:"mgx:sessionStarted",key:"started",value:n}]:[]]}),s}function Mf(e,{role:t,text:n,ts:s,sessionId:o,sessionStarted:r="",parsed:i=null,replyTo:a=null,createdAt:l=""}){if(!Ix.has(t))throw new Error(`utterance role must be "visitor" or "tmct", got ${JSON.stringify(t)}`);if(!o)throw new Error("utterance needs a sessionId");let c=String(s||""),u=Pn(n),d=`utt:${o}#${c}#${t}`,m=hi(u)||(t==="visitor"?"a-visitor-said":"a-tmct-said"),p=_r({doc:u}),f=e.individuals.find(y=>y?.id===d),g=cr(f,l||c),h={id:d,label:m,class:Ec,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:utteranceRole",key:"role",value:t},{prop:"mgx:utteranceText",key:"text",value:u},{prop:"mgx:utteranceTs",key:"ts",value:c},{prop:Nt,key:"createdAt",value:g},...i!=null?[{prop:"mgx:utteranceParsed",key:"parsed",value:JSON.stringify(i)}]:[],...p.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:p.join(" ")}]:[]]};lr(e,h);let b=ck(e,o,r);if(fi(e,{predicate:"saidInSession",prop:jc},{subject:d,object:b,subjectLabel:m,objectLabel:String(o).slice(0,8)}),a){let y=e.individuals.find(w=>w?.id===a);y&&fi(e,{predicate:"inReplyTo",prop:_c},{subject:d,object:a,subjectLabel:m,objectLabel:y.label})}return c&&c>String(e.generated_at||"")&&(e.generated_at=c),d}async function lk(e,t){let n;return await Ls(e,s=>{n=Mf(s,t),Ns(s)}),{id:n}}async function Pf(e,t){let n=[];return t?.length?(await Ls(e,s=>{for(let o of t)n.push(Mf(s,o));Ns(s)}),{ids:n}):{ids:n}}async function uk(e,t){t?.length&&await Ls(e,n=>{for(let s of t)fi(n,{predicate:"canonicalisedFrom",prop:Rc},{subject:s.factId,object:s.uttId,subjectLabel:s.factLabel,objectLabel:s.uttLabel})})}async function dk(e,{subject:t,predicate:n,object:s,provenance:o="",createdAt:r="",quantifier:i="",premiseTrusts:a,ruleConfidence:l}={}){let c=ee(t),u=Fn(n),d=ee(s);if(!c||!u||!d)throw new Error("a fact needs subject, predicate and object");let m=Zo(c,u,d),p=`${c} ${u} ${d}`,f=_r({doc:p}),g=Pn(i);return await Ls(e,async h=>{let b=h.individuals.find(S=>S?.id===m),y=b?.attributes?.find(S=>S?.prop==="mgx:factProvenance")?.value||"",w=[...new Set([...y.split(" | "),Pn(o)].filter(Boolean))],v=cr(b,r),k=b?.attributes?.find(S=>S?.prop==="mgx:factQuantifier")?.value||"",$=g||k,T={id:m,label:hi(p),class:rs,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"rdf:Statement"},{prop:"rdf:subject",key:"subject",value:c},{prop:"rdf:predicate",key:"predicate",value:u},{prop:"rdf:object",key:"object",value:d},{prop:Nt,key:"createdAt",value:v},...w.length?[{prop:"mgx:factProvenance",key:"provenance",value:w.join(" | ")}]:[],...f.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:f.join(" ")}]:[],...$?[{prop:"mgx:factQuantifier",key:"quantifier",value:$}]:[]]};await pc(T),lr(h,T),gi(h,h.individuals.find(S=>S?.id===m),void 0,{premiseTrusts:a,ruleConfidence:l}),Ns(h)}),{id:m}}function pk(e){if(!Array.isArray(e))return;let t=e.some(Array.isArray)?e.filter(Array.isArray):[e],n=[],s=new Set;for(let o of t){let r=o.filter(a=>typeof a=="string"&&a);if(!r.length)continue;let i=[...r].sort().join(" ");s.has(i)||(s.add(i),n.push(r))}return n.length?n:void 0}async function ur(e,t){let n=[],s=0;for(let r of t||[]){let i=ee(r?.subject),a=Fn(r?.predicate),l=ee(r?.object);if(!i||!a||!l){s+=1;continue}let c=`${i} ${a} ${l}`;n.push({id:Zo(i,a,l),s:i,p:a,o:l,text:c,tokens:_r({doc:c}),provenance:Pn(r?.provenance),createdAt:r?.createdAt||"",quantifier:Pn(r?.quantifier),premiseTrusts:Array.isArray(r?.premiseTrusts)?r.premiseTrusts:void 0,ruleConfidence:typeof r?.ruleConfidence=="number"?r.ruleConfidence:void 0,environments:pk(r?.justification)})}let o=[];return n.length?(await Ls(e,r=>{let i=Os(r),a=i?i.individualsById:new Map(r.individuals.map(d=>[d?.id,d])),l=[],c=new Set,u=new Map;for(let d of n){let m=a.get(d.id),p=m?.attributes?.find(v=>v?.prop==="mgx:factProvenance")?.value||"",f=[...new Set([...p.split(" | "),d.provenance].filter(Boolean))],g=cr(m,d.createdAt),h=m?.attributes?.find(v=>v?.prop==="mgx:factQuantifier")?.value||"",b=d.quantifier||h,y={id:d.id,label:hi(d.text),class:rs,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"rdf:Statement"},{prop:"rdf:subject",key:"subject",value:d.s},{prop:"rdf:predicate",key:"predicate",value:d.p},{prop:"rdf:object",key:"object",value:d.o},{prop:Nt,key:"createdAt",value:g},...f.length?[{prop:"mgx:factProvenance",key:"provenance",value:f.join(" | ")}]:[],...d.tokens.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:d.tokens.join(" ")}]:[],...b?[{prop:"mgx:factQuantifier",key:"quantifier",value:b}]:[],...d.environments?[{prop:"mgx:factJustification",key:"justification",value:d.environments.map(v=>v.join(" ")).join(" | ")}]:[]]},w=lr(r,y);a.set(d.id,w),o.push(d.id),c.has(d.id)||(c.add(d.id),l.push(d.id)),(d.premiseTrusts!==void 0||d.ruleConfidence!==void 0)&&u.set(d.id,{premiseTrusts:d.premiseTrusts,ruleConfidence:d.ruleConfidence})}for(let d of l)gi(r,a.get(d),void 0,u.get(d));Ns(r)}),{ids:o,appended:o.length,skipped:s}):{ids:o,appended:0,skipped:s}}async function Mc(e,{name:t,kind:n,slots:s,provenance:o="",createdAt:r=""}={}){let i=Ff[n];if(!i)throw new Error(`a rule kind must be one of ${fk.join(", ")}, got ${JSON.stringify(n)}`);let a=ee(t);if(!a)throw new Error("a rule needs a name");let l=mk[n]||new Set,c=i.map(([p])=>ee(s?.[p])),u=i.filter(([p],f)=>!l.has(p)&&!c[f]);if(u.length)throw new Error(`a ${n} rule needs ${u.map(([p])=>p).join(" + ")}`);if(n===fr){let p=c[i.findIndex(([g])=>g==="objectRole")],f=c[i.findIndex(([g])=>g==="value")];if(!p&&!f)throw new Error(`a ${n} rule needs an objectRole or a value`)}let d=hk(n,a,c),m=hi(`${a} = ${n}(${c.join(", ")})`);return await Ls(e,async p=>{let f=p.individuals.find(w=>w?.id===d),g=f?.attributes?.find(w=>w?.prop==="mgx:factProvenance")?.value||"",h=[...new Set([...g.split(" | "),Pn(o)].filter(Boolean))],b=cr(f,r),y={id:d,label:m,class:bo,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:wi,key:"ruleName",value:a},{prop:yo,key:"ruleKind",value:n},...i.map(([w,v],k)=>({prop:v,key:w,value:c[k],skip:!c[k]&&l.has(w)})).filter(w=>!w.skip).map(({skip:w,...v})=>v),{prop:Nt,key:"createdAt",value:b},...h.length?[{prop:"mgx:factProvenance",key:"provenance",value:h.join(" | ")}]:[]]};await pc(y),lr(p,y),gi(p,p.individuals.find(w=>w?.id===d)),Ns(p)}),{id:d}}function Pc(e,t){let n=ee(t);return(e?.individuals||[]).find(s=>s?.class===bo&&(s.attributes||[]).find(o=>o?.prop===wi)?.value===n)}function gk(e,t){let n=ee(t),s=o=>(o.attributes||[]).find(r=>r?.prop===yo)?.value||"";return(e?.individuals||[]).filter(o=>o?.class===bo&&(o.attributes||[]).find(r=>r?.prop===wi)?.value===n).sort((o,r)=>s(o).localeCompare(s(r))||String(o.id).localeCompare(String(r.id)))}function Fc(e){let t=[];for(let n of e?.individuals||[]){if(n?.class!==bo)continue;let s=a=>(n.attributes||[]).find(l=>l?.prop===a)?.value,o=s(yo),r=Ff[o];if(!r)continue;let i={};for(let[a,l]of r)i[a]=s(l)??"";t.push({id:n.id,name:s(wi)||"",kind:o,slots:i,provenance:s("mgx:factProvenance")||""})}return t.sort((n,s)=>n.name.localeCompare(s.name)||n.kind.localeCompare(s.kind)||String(n.id).localeCompare(String(s.id))),t}async function Dc(e,t,n,s,o){let{relationFactsFor:r,renderFactLine:i,factPhrase:a,factTermVariants:l,byTrust:c,rows:u,HAS_PROPERTY_PREDICATE:d,findActionPath:m}=o,p=String(t||"").trim().toLowerCase(),f=l(ee,n),g=l(ee,s),h=r(p).filter(w=>f.has(w.fact.subject)&&g.has(w.fact.object));if(h.length){let w=h.slice().sort((v,k)=>c(v.fact,k.fact))[0];return{citation:[i(w.fact),...w.aliasFacts.map(v=>`${a(v)}${v.provenance?` (source: ${v.provenance})`:""}`)]}}let b=Pc(e,p),y=b?.attributes?.find(w=>w.prop===yo)?.value;if(b&&y===dr){let w=b.attributes.find(N=>N.prop==="mgx:ruleBase1")?.value,v=b.attributes.find(N=>N.prop==="mgx:ruleBase2")?.value,k=ee(n),$=ee(s);if(!w||!v||!k||!$)return null;let C=m({entity:k,hopsTaken:0},N=>N.hopsTaken===2&&N.entity===$,N=>{if(N.hopsTaken>=2)return[];let A=N.hopsTaken===0?w:v;return r(A).filter(P=>P.fact.subject===N.entity).map(P=>({action:P,nextState:{entity:P.fact.object,hopsTaken:N.hopsTaken+1}}))},{maxDepth:2,stateKey:N=>`${N.entity}#${N.hopsTaken}`});if(!C)return null;let E=new Set,R=[];for(let N of C.actions){R.push(i(N.fact));for(let A of N.aliasFacts){let P=A.id||`${A.subject}|${A.predicate}|${A.object}`;E.has(P)||(E.add(P),R.push(`${a(A)}${A.provenance?` (source: ${A.provenance})`:""}`))}}return{citation:R}}if(b&&y===pr){let w=b.attributes.find(j=>j.prop==="mgx:ruleBase1")?.value,v=b.attributes.find(j=>j.prop==="mgx:ruleFilterProperty")?.value;if(!w||!v)return null;let k=await Dc(e,w,n,s,o);if(!k)return null;let $=ee(n),T=ee(v),S=u.find(j=>j.predicate===d&&j.subject===$&&ee(j.object)===T);return S?{citation:[...k.citation,i(S)]}:null}return null}async function Df(e,t,n,s){let{relationFactsFor:o,renderFactLine:r,factPhrase:i,factTermVariants:a,byTrust:l,rows:c,HAS_PROPERTY_PREDICATE:u,findReachableSet:d}=s,m=String(t||"").trim().toLowerCase(),p=a(ee,n),f=o(m).filter(b=>p.has(b.fact.object));if(f.length){let b=new Map;for(let y of f)b.has(y.fact.subject)||b.set(y.fact.subject,[]),b.get(y.fact.subject).push(y);return[...b.entries()].map(([y,w])=>{let v=w.slice().sort((k,$)=>l(k.fact,$.fact))[0];return{subject:y,citation:[r(v.fact),...v.aliasFacts.map(k=>`${i(k)}${k.provenance?` (source: ${k.provenance})`:""}`)]}})}let g=Pc(e,m),h=g?.attributes?.find(b=>b.prop===yo)?.value;if(g&&h===dr){let b=g.attributes.find(T=>T.prop==="mgx:ruleBase1")?.value,y=g.attributes.find(T=>T.prop==="mgx:ruleBase2")?.value,w=ee(n);return!b||!y||!w?[]:d({entity:w,hopsTaken:0},T=>{if(T.hopsTaken>=2)return[];let S=T.hopsTaken===0?y:b;return o(S).filter(j=>j.fact.object===T.entity).map(j=>({action:j,nextState:{entity:j.fact.subject,hopsTaken:T.hopsTaken+1}}))},{maxDepth:2,stateKey:T=>`${T.entity}#${T.hopsTaken}`}).filter(T=>T.node.hopsTaken===2).map(({node:T,path:S})=>{let j=new Set,C=[];for(let E of S.actions.slice().reverse()){C.push(r(E.fact));for(let R of E.aliasFacts){let N=R.id||`${R.subject}|${R.predicate}|${R.object}`;j.has(N)||(j.add(N),C.push(`${i(R)}${R.provenance?` (source: ${R.provenance})`:""}`))}}return{subject:T.entity,citation:C}})}if(g&&h===pr){let b=g.attributes.find($=>$.prop==="mgx:ruleBase1")?.value,y=g.attributes.find($=>$.prop==="mgx:ruleFilterProperty")?.value;if(!b||!y)return[];let w=await Df(e,b,n,s),v=ee(y),k=[];for(let $ of w){let T=ee($.subject),S=c.find(j=>j.predicate===u&&j.subject===T&&ee(j.object)===v);S&&k.push({subject:$.subject,citation:[...$.citation,r(S)]})}return k}return[]}function en(e){let t=e?.individuals||[],n=new Map(t.filter(i=>i?.class===go).map(i=>[i.id,i])),s=(e?.objectProperties||[]).find(i=>i?.prop===Un),o=new Map;for(let i of s?.examples||[])o.has(i.subject)||o.set(i.subject,[]),o.get(i.subject).push(i.object);let r=[];for(let i of t){if(i?.class!==rs)continue;let a=f=>(i.attributes||[]).find(g=>g?.key===f)?.value||"",l=o.get(i.id)||[],c=l.map(f=>(n.get(f)?.attributes||[]).find(g=>g?.prop==="mgx:sourceType")?.value).filter(Boolean),u=a("justification"),d=[];if(u)for(let f of u.split(" | ")){let g=f.split(" ").filter(Boolean);g.length&&d.push(g)}let m=[],p=new Set;for(let f of d)for(let g of f)p.has(g)||(p.add(g),m.push(g));r.push({id:i.id,subject:a("subject"),predicate:a("predicate"),object:a("object"),provenance:a("provenance"),quantifier:a("quantifier"),sourceIds:l,sourceTypes:c,trust:Number((i.attributes||[]).find(f=>f?.prop===Rr)?.value)||0,environments:d,justification:m})}return r}async function bk(e,t){let n=new Set((t||[]).filter(Boolean)),s=[];return n.size?(await Ls(e,o=>{if(o.individuals=(o.individuals||[]).filter(i=>i?.class===rs&&n.has(i.id)?(s.push(i.id),!1):!0),!s.length)return;let r=new Set(s);for(let i of o.objectProperties||[]){let a=i.examples||[];i.examples=a.filter(l=>!r.has(l?.subject)&&!r.has(l?.object)),i.count=i.examples.length}Ns(o)}),{removed:s}):{removed:s}}function Bf(e,{floor:t=wk}={}){let n=en(e).filter(r=>r.trust>=t),s=new Map;for(let r of n){if(Uf.has(r.predicate))continue;let i=`${r.subject} ${r.predicate}`;s.has(i)||s.set(i,[]),s.get(i).push(r)}let o=[];for(let r of s.values())new Set(r.map(i=>i.object)).size>1&&o.push(r.slice().sort((i,a)=>a.trust-i.trust||i.object.localeCompare(a.object)));return o.sort((r,i)=>`${r[0].subject} ${r[0].predicate}`.localeCompare(`${i[0].subject} ${i[0].predicate}`))}var ir,kc,Ec,rs,Sc,go,bo,jc,_c,Cx,Un,Rc,jf,di,yc,Ix,Ef,Ox,vc,Ac,_f,Lx,Nx,Sf,zn,If,$c,Vx,Kx,Ic,Of,xc,Os,hi,pi,Lf,ek,ik,dr,pr,Oc,Lc,bi,fr,Nc,fk,wi,yo,Ff,mk,hk,wk,Ms,zf,Uf,Ke=L(()=>{yt();De();Vn();cn();cn();Xs();Xs();dc();df();ir=Z(".tmct","memory"),kc=Z(ir,"graph.json"),Ec="Utterance",rs="Fact",Sc="Session",go="Source",bo="Rule",jc="mgx:saidInSession",_c="mgx:inReplyTo",Cx="mgx:derivedFrom",Un="mgx:statedBy",Rc="mgx:canonicalisedFrom",jf="mgx:sourceReliability",di="src:operator-chat",yc="src:teach-chat",Ix=new Set(["visitor","tmct"]),Ef=48,Ox=[{prop:"rdf:type",note:"rdf-ish typing attribute: owl:NamedIndividual (utterances/sessions) or rdf:Statement (reified facts)"},{prop:"mgx:utteranceRole",note:"who said it: visitor (an a-visitor-said item) or tmct (the response alongside it)"},{prop:"mgx:utteranceText",note:"the utterance's normalized text (capped)"},{prop:"mgx:utteranceTs",note:"when it was said, ISO-8601 (the chat turn timestamp)"},{prop:"mgx:utteranceParsed",note:"optional JSON of the parse the interpretation pipeline produced for this request"},{prop:jc,predicate:"saidInSession",note:"Utterance \u2192 Session it was said in; runtime observation, owned (no SEON term)"},{prop:_c,predicate:"inReplyTo",note:"tmct Utterance \u2192 the visitor Utterance it answers (the Q/A pairing)"},{prop:"rdf:subject",note:"reified fact: the triple's subject term"},{prop:"rdf:predicate",note:"reified fact: the triple's predicate term"},{prop:"rdf:object",note:"reified fact: the triple's object term"},{prop:"mgx:factProvenance",note:"LEGACY COMPAT SHIM: the ' | '-joined provenance tag string a fact came from; the source-of-truth is now the mgx:statedBy edges derived from it"},{prop:"mgx:factQuantifier",note:"OPTIONAL: the quantifier word a plural class-membership teach used ('every'/'some'/'a few'), for literal recall by 'how many Xs are Ys' \u2014 never real cardinality counting"},{prop:"mgx:factJustification",note:"an entailed Fact's supporting premise fact ids: ' | '-separated environments, one space-separated premise-id list per independent derivation, capped by syllogise's maxEnvironments knob; a value with no ' | ' is a single environment"},{prop:"mgx:ruleName",note:"a taught Rule's own name (e.g. 'grandparent') \u2014 the query-dispatcher's lookup key, PLAN_TAUGHT_RELATIONS.md \xA72/\xA73"},{prop:"mgx:ruleKind",note:"a taught Rule's SHAPE tag \u2014 the closed vocabulary compose2 | filter | recursive (structural, like 'Fact'/'Rule' themselves, never a domain word)"},{prop:"mgx:ruleBase1",note:"compose2: the first hop's base relation name; filter: the base rule/relation being filtered (same 'base relation' role in both kinds, so the name is shared)"},{prop:"mgx:ruleBase2",note:"compose2 only: the second hop's base relation name"},{prop:"mgx:ruleFilterProperty",note:"filter only: the property literal candidates are filtered by (an mgx:hasProperty-shaped Fact lookup)"},{prop:"mgx:ruleBaseCase",note:"recursive only: the base-case relation name (hop zero)"},{prop:"mgx:ruleRecStep",note:"recursive only: the self-referential recursive-step relation name"},{prop:Nt,note:"when an individual was FIRST written, ISO-8601 (first-write-wins on upsert); the audit 'when', the recency input to trust, the novelty signal"},{prop:$s,note:"an audit / last-modified stamp: when an individual's OWN attributes were last mutated in place (upsertSession, recomputeFactTrust, recomputeSourceReliability) \u2014 most individuals never carry it at all. NOT transaction time: a mutable stamp cannot record when the previous version stopped being current, so tmct is not bitemporal"},{prop:Cx,predicate:"derivedFrom",note:"umbrella: a Fact derived from a Source (or another Fact). ext ref prov:wasDerivedFrom (UNVERIFIED-pending-web-check)"},{prop:Un,predicate:"statedBy",note:"subPropertyOf derivedFrom: a Source directly asserts this Fact (one edge per independent source \u2014 replaces the factProvenance union)"},{prop:Rc,predicate:"canonicalisedFrom",note:"subPropertyOf derivedFrom: a canonical Fact cleaned from a raw Block/Source, never replacing it"},{prop:"mgx:sourceType",note:"a Source's kind: operator | teach | provider | corpus | corpusWeak | reference | referenceLive | extracted | optimisticExtract | web | entailed (the trust-prior key)"},{prop:"mgx:sourceUrl",note:"a web Source's URL"},{prop:"mgx:sourceRule",note:"an entailed Source's rule id"},{prop:"mgx:sourceReliability",note:"actor-level (session-scoped) trust nudge in [0.5,1.5], neutral 1.0 when absent \u2014 materialised by recomputeSourceReliability from a session's asserted-vs-contradicted track record (memory/trust.mjs's sessionReliabilityFrom); folds into computeTrust's per-source prior"},{prop:Rr,note:"materialised trust cache in [0,1] \u2014 pure function of a fact's Sources + createdAt (memory/trust.mjs); invalidated when a statedBy edge is added"},{prop:Ki,note:"JSON of the inputs the trust score was computed from (source-type multiset, corroboration count, createdAt, recency) \u2014 makes the score auditable"},{prop:"mgx:hasProseTokens",note:"prose tokens (prose.mjs tokenizer) backing the payload's proseIndex"},{prop:"mgx:sessionStarted",note:"session anchor: when the session started, ISO-8601"},{prop:"rdf:predicate",prefix:co,note:"a reified fact's predicate carries its POLARITY: mgxneg:capableOf is the negative twin of mgx:capableOf ('a penguin cannot fly'). Polarity cannot be a separate property \u2014 the fact id hashes (subject, predicate, object), so both polarities would share one id and union their statedBy edges (memory/capability.mjs)"}];vc=e=>or(e),Ac="memory",_f="sqlite";Lx=`
99
+ `);)t++;if(s||o!=="#")break;t=go(e,t)}return t}function _f(e,t,n,s,o=!1){if(!s)return t=ui(e,t),t<0?e.length:t;for(let i=t;i<e.length;i++){let r=e[i];if(r==="#")i=ui(e,i);else{if(r===n)return i+1;if(r===s||o&&(r===`
100
+ `||r==="\r"&&e[i+1]===`
101
+ `))return i}}throw new pe("cannot find end of structure",{toml:e,ptr:t})}var di=L(()=>{Is();});function Jx(e,t,n){let s=e.slice(t,n),o=s.indexOf("#");return o>-1&&(go(e,o),s=s.slice(0,o)),[s.trimEnd(),o]}function ar(e,t,n,s,o){if(s===0)throw new pe("document contains excessively nested structures. aborting.",{toml:e,ptr:t});let i=e[t];if(i==="["||i==="{"){let[l,c]=i==="["?Af(e,t,s,o):Rf(e,t,s,o);if(n){if(c=xn(e,c),e[c]===",")c++;else if(e[c]!==n)throw new pe("expected comma or end of structure",{toml:e,ptr:c})}return[l,c]}if(i==='"'||i==="'"){let[l,c]=li(e,t);if(n){if(c=xn(e,c),e[c]&&e[c]!==","&&e[c]!==n&&e[c]!==`
102
+ `&&e[c]!=="\r")throw new pe("unexpected character encountered",{toml:e,ptr:c});e[c]===","&&c++}return[l,c]}let r=_f(e,t,",",n),a=Jx(e,t,r-(e[r-1]===","?1:0));if(!a[0])throw new pe("incomplete key-value declaration: no value specified",{toml:e,ptr:t});return n&&a[1]>-1&&(r=xn(e,t+a[1]),e[r]===","&&r++),[jf(a[0],e,t,o),r]}var Rc=L(()=>{_c();Ac();di();Is();});function pi(e,t,n="="){let s=t-1,o=[],i=e.indexOf(n,t);if(i<0)throw new pe("incomplete key-value: cannot find end of key",{toml:e,ptr:t});do{let r=e[t=++s];if(r!==" "&&r!==" ")if(r==='"'||r==="'"){if(r===e[t+1]&&r===e[t+2])throw new pe("multiline strings are not allowed in keys",{toml:e,ptr:t});let[a,l]=li(e,t);s=e.indexOf(".",l);let c=e.slice(l,s<0||s>i?i:s),u=ui(c);if(u>-1)throw new pe("newlines are not allowed in keys",{toml:e,ptr:t+s+u});if(c.trimStart())throw new pe("found extra tokens after the string part",{toml:e,ptr:l});if(i<l&&(i=e.indexOf(n,l),i<0))throw new pe("incomplete key-value: cannot find end of key",{toml:e,ptr:t});o.push(a)}else{s=e.indexOf(".",t);let a=e.slice(t,s<0||s>i?i:s);if(!Qx.test(a))throw new pe("only letter, numbers, dashes and underscores are allowed in keys",{toml:e,ptr:t});o.push(a.trimEnd())}}while(s+1&&s<i);return[o,xn(e,i+1,!0,!0)]}function Rf(e,t,n,s){let o={},i=new Set,r;for(t++;(r=e[t++])!=="}"&&r;){if(r===",")throw new pe("expected value, found comma",{toml:e,ptr:t-1});if(r==="#")t=go(e,t);else if(r!==" "&&r!==" "&&r!==`
103
+ `&&r!=="\r"){let a,l=o,c=!1,[u,d]=pi(e,t-1);for(let f=0;f<u.length;f++){if(f&&(l=c?l[a]:l[a]={}),a=u[f],(c=Object.hasOwn(l,a))&&(typeof l[a]!="object"||i.has(l[a])))throw new pe("trying to redefine an already defined value",{toml:e,ptr:t});!c&&a==="__proto__"&&Object.defineProperty(l,a,{enumerable:!0,configurable:!0,writable:!0})}if(c)throw new pe("trying to redefine an already defined value",{toml:e,ptr:t});let[m,p]=ar(e,d,"}",n-1,s);i.add(m),l[a]=m,t=p}}if(!r)throw new pe("unfinished table encountered",{toml:e,ptr:t});return[o,t]}function Af(e,t,n,s){let o=[],i;for(t++;(i=e[t++])!=="]"&&i;){if(i===",")throw new pe("expected value, found comma",{toml:e,ptr:t-1});if(i==="#")t=go(e,t);else if(i!==" "&&i!==" "&&i!==`
104
+ `&&i!=="\r"){let r=ar(e,t-1,"]",n-1,s);o.push(r[0]),t=r[1]}}if(!i)throw new pe("unfinished array encountered",{toml:e,ptr:t});return[o,t]}var Qx,Ac=L(()=>{_c();Rc();di();Is();Qx=/^[a-zA-Z0-9-_]+[ \t]*$/});function Tf(e,t,n,s){let o=t,i=n,r,a=!1,l;for(let c=0;c<e.length;c++){if(c){if(o=a?o[r]:o[r]={},i=(l=i[r]).c,s===0&&(l.t===1||l.t===2))return null;if(l.t===2){let u=o.length-1;o=o[u],i=i[u].c}}if(r=e[c],(a=Object.hasOwn(o,r))&&i[r]?.t===0&&i[r]?.d)return null;a||(r==="__proto__"&&(Object.defineProperty(o,r,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,r,{enumerable:!0,configurable:!0,writable:!0})),i[r]={t:c<e.length-1&&s===2?3:s,d:!1,i:0,c:{}})}if(l=i[r],l.t!==s&&!(s===1&&l.t===3)||(s===2&&(l.d||(l.d=!0,o[r]=[]),o[r].push(o={}),l.c[l.i++]=l={t:1,d:!1,i:0,c:{}}),l.d))return null;if(l.d=!0,s===1)o=a?o[r]:o[r]={};else if(s===0&&a)return null;return[r,o,l.c]}function bo(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let s={},o={},i=s,r=o;for(let a=xn(e,0);a<e.length;){if(e[a]==="["){let l=e[++a]==="[",c=pi(e,a+=+l,"]");if(l){if(e[c[1]-1]!=="]")throw new pe("expected end of table declaration",{toml:e,ptr:c[1]-1});c[1]++}let u=Tf(c[0],s,o,l?2:1);if(!u)throw new pe("trying to redefine an already defined table or value",{toml:e,ptr:a});r=u[2],i=u[1],a=c[1]}else{let l=pi(e,a),c=Tf(l[0],i,r,0);if(!c)throw new pe("trying to redefine an already defined table or value",{toml:e,ptr:a});let u=ar(e,l[1],void 0,t,n);c[1][c[0]]=u[0],a=u[1]}if(a=xn(e,a,!0),e[a]&&e[a]!==`
105
+ `&&e[a]!=="\r")throw new pe("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:a});a=xn(e,a)}return s}var Cf=L(()=>{Ac();Rc();di();Is();});var If=L(()=>{});var fi=L(()=>{Cf();If();jc();Is();});var Nf={};En(Nf,{CONFIG_FILE:()=>hi,loadTomlConfig:()=>Tc,mergeEffective:()=>Lf,normalizeConfig:()=>Of});async function Tc(e,{file:t}={}){let n=t||ee(e,hi),s;try{s=await ze(n,"utf8")}catch(o){if(o&&o.code==="ENOENT")return null;throw o}try{return bo(s)}catch(o){throw new Error(`Invalid ${hi} at ${n}: ${o&&o.message?o.message:o}`)}}async function Zx(e,t){let n;if(Array.isArray(e))n=e;else{let o=qt(t,String(e));n=(await ze(o,"utf8")).split(`
106
+ `)}let s=[];for(let o of n){let i=String(o).trim();!i||i.startsWith("#")||s.push(qt(t,i))}return s}async function Of(e,{configDir:t}={}){let n=e||{},s=t||process.cwd(),o={};if(n.repositories!==void 0&&(o.repositories=await Zx(n.repositories,s)),n.out_root!==void 0&&(o.outRoot=qt(s,String(n.out_root))),n.graph_file!==void 0&&(o.graphFile=qt(s,String(n.graph_file))),n.graph_files!==void 0){let v=Array.isArray(n.graph_files)?n.graph_files:[n.graph_files];o.graphFiles=v.map($=>qt(s,String($)))}let i=n.graph||{};i.read_only!==void 0&&(o.graph={readOnly:i.read_only});let r=n.corpus||{};r.tier!==void 0&&(o.corpus={tier:r.tier});let a=n.seed||{},l={};a.enabled!==void 0&&(l.enabled=a.enabled),a.limit!==void 0&&(l.limit=a.limit),a.capture_unknown_context!==void 0&&(l.captureUnknownContext=a.capture_unknown_context),a.unknown_context_limit!==void 0&&(l.unknownContextLimit=a.unknown_context_limit),Object.keys(l).length&&(o.seed=l),n.extensions!==void 0&&(o.extensions=n.extensions),n.bias!==void 0&&(o.bias=n.bias),n.games!==void 0&&(o.games=n.games),n.planning!==void 0&&(o.planning=n.planning),n.research!==void 0&&(o.research=n.research),n.discourse!==void 0&&(o.discourse=n.discourse);let c=n.index||{},u={};c.languages!==void 0&&(u.languages=c.languages),c.exclude!==void 0&&(u.exclude=c.exclude),c.secret_exclude!==void 0&&(u.secretExclude=c.secret_exclude),c.history_depth!==void 0&&(u.historyDepth=c.history_depth),c.include_text!==void 0&&(u.includeText=c.include_text),c.include_structure!==void 0&&(u.includeStructure=c.include_structure),c.respect_gitignore!==void 0&&(u.respectGitignore=c.respect_gitignore),c.markdown_sections!==void 0&&(u.markdownSections=c.markdown_sections),c.vue!==void 0&&(u.vue=c.vue),Object.keys(u).length&&(o.index=u);let d=n.tune||{},m={};d.score_gap_k!==void 0&&(m.scoreGapK=d.score_gap_k),d.literal_mention!==void 0&&(m.literalMention=d.literal_mention),d.demote_non_prod!==void 0&&(m.demoteNonProd=d.demote_non_prod),d.call_adjacency!==void 0&&(m.callAdjacency=d.call_adjacency),d.impl_of_interface!==void 0&&(m.implOfInterface=d.impl_of_interface),d.beam_search!==void 0&&(m.beamSearch=d.beam_search),d.beam_width!==void 0&&(m.beamWidth=d.beam_width),d.prose_layers!==void 0&&(m.proseLayers=d.prose_layers);let p=d.expansion||{},f={};p.strategy!==void 0&&(f.strategy=p.strategy),p.nodes!==void 0&&(f.nodes=p.nodes),p.q!==void 0&&(f.q=p.q),p.depth!==void 0&&(f.depth=p.depth),Object.keys(f).length&&(m.expansion=f),Object.keys(m).length&&(o.tune=m);let g=n.telemetry||{};g.enabled!==void 0&&(o.telemetry={enabled:g.enabled});let h=n.memory||{},b={};h.retention_versions!==void 0&&(b.retentionVersions=h.retention_versions),h.backend!==void 0&&(b.backend=h.backend),Object.keys(b).length&&(o.memory=b);let w=[];for(let[v,$]of ek)n[v]&&n[v][$]!==void 0&&w.push(`${v}.${$}`);return o.unwired=w,o}function mi(e,t="",n={}){for(let[s,o]of Object.entries(e||{})){if(o==null)continue;let i=t?`${t}.${s}`:s;Array.isArray(o)||typeof o!="object"?n[i]=o:mi(o,i,n)}return n}function Lf({args:e={},toml:t=null,defaults:n={}}={}){let s=mi(n),o=null;if(t){let{unwired:u,...d}=t;o=d}let i=o?mi(o):{},r=mi(e),a=[...new Set([...Object.keys(s),...Object.keys(i),...Object.keys(r)])].sort(),l={},c={};for(let u of a)u in r?(l[u]=r[u],c[u]="arg"):u in i?(l[u]=i[u],c[u]="tmct.toml"):(l[u]=s[u],c[u]="default");return{effective:l,sources:c}}var hi,ek,gi=L(()=>{vt();De();fi();hi="tmct.toml";ek=[["index","include_text"],["index","include_structure"],["index","respect_gitignore"],["index","markdown_sections"],["index","vue"]]});var cs={};En(cs,{CANONICALISED_FROM_PROP:()=>Bc,CAPABLE_OF_PREDICATE:()=>Qf,CREATED_AT_PROP:()=>Nt,DEFAULT_RETENTION:()=>Lc,FACT_CLASS:()=>is,HAS_A_PREDICATE:()=>Ps,IN_REPLY_TO_PROP:()=>zc,MEMORY_DIR_REL:()=>ur,MEMORY_GRAPH_REL:()=>Mc,MEMORY_MANIFEST_REL:()=>qf,MEMORY_SESSION_CLASS:()=>Fc,MULTI_VALUED_PREDICATES:()=>Zf,OPERATOR_SOURCE_ID:()=>bi,RULE_CLASS:()=>yo,RULE_KIND_ACTION_CONSTRAINT:()=>Kc,RULE_KIND_ACTION_EFFECT:()=>br,RULE_KIND_ACTION_PRECOND:()=>ki,RULE_KIND_ACTION_SIGNATURE:()=>Hc,RULE_KIND_COMPOSE2:()=>hr,RULE_KIND_FILTER:()=>gr,RULE_KIND_PROP:()=>$o,RULE_KIND_RECURSIVE:()=>Vc,SAID_IN_SESSION_PROP:()=>Dc,SOURCE_CLASS:()=>wo,SOURCE_RELIABILITY_PROP:()=>Ff,STATED_BY_PROP:()=>Bn,SYLLOGISE_STATE_REL:()=>Gc,UPDATED_AT_PROP:()=>$s,UTTERANCE_CLASS:()=>Pc,appendCanonicalisedFromEdges:()=>Lk,appendFact:()=>Nk,appendFacts:()=>mr,appendRule:()=>Yc,appendUtterance:()=>Ok,appendUtterances:()=>Yf,closeSqliteMemoryStore:()=>Bf,createInMemoryStore:()=>vi,createSqliteMemoryStore:()=>zf,emptyMemory:()=>dr,factIdForTriple:()=>he,findContradictions:()=>em,findRuleByName:()=>Xc,findRulesByName:()=>zk,isMemoryOrSqliteHandle:()=>Wc,loadMemory:()=>tn,loadSyllogiseState:()=>vk,normFactPredicate:()=>Fn,normFactTerm:()=>ne,openConfiguredMemoryBackend:()=>as,openMemoryBackend:()=>Uf,provSourceClassFor:()=>Ek,provenanceTagToSource:()=>zo,readFactRows:()=>Dt,readRuleRows:()=>Jc,removeFacts:()=>Bk,resolveMemoryGraphFile:()=>cr,resolveRelationChase:()=>Qc,resolveRelationChaseReverse:()=>Jf,saveSyllogiseState:()=>$k,snapshotMemory:()=>bk});function dr(){return{generated_at:"",memory:!0,prefixes:{owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",mgx:"urn:tmct:mgx#",mgxneg:"urn:tmct:mgxneg#"},vocabulary:sk.map(e=>({...e})),classes:[],objectProperties:[],individuals:[],proseIndex:{}}}function cr(e,t=null){if(vo(e)||Os(e))throw new Error("resolveMemoryGraphFile: dir is a memory/sqlite handle, not a file path (Backend A only)");return t===null?ee(e,Mc):ee(e,ur,`graph.v${t}.json`)}function vo(e){return!!e&&typeof e=="object"&&e.backend===Uc}function Os(e){return!!e&&typeof e=="object"&&e.backend===Df}function Wc(e){return vo(e)||Os(e)}function vi(){return{backend:Uc,payload:dr()}}function ik(){if(Pf)return;Pf=!0;let e=process.listeners("warning").slice();process.removeAllListeners("warning"),process.on("warning",t=>{if(!(t?.name==="ExperimentalWarning"&&/sqlite/i.test(String(t?.message))))if(e.length)for(let n of e)n(t);else console.error(t.stack||String(t))})}async function zf(e){ik();let{DatabaseSync:t}=await Promise.resolve().then(()=>(Ef(),Sf)),n=new t(e);return n.exec("PRAGMA journal_mode = WAL"),n.exec("PRAGMA synchronous = NORMAL"),n.exec(ok),{backend:Df,db:n,dbPath:e}}function Bf(e){Os(e)&&e.db.close()}async function Uf(e,t){if(t===Uc)return{dir:vi(),close:async()=>{}};let n=ee(e,".tmct","memory","graph.sqlite"),s=i=>ru(i).then(()=>!0,()=>!1);!await s(n)&&await s(ee(e,Mc))&&process.stderr.write(`found .tmct/memory/graph.json \u2014 the flat-file memory backend is retired; starting a fresh sqlite store (the old file is left untouched)
107
+ `),await jn($e(n),{recursive:!0});let o=await zf(n);return{dir:o,close:async()=>Bf(o)}}async function as(e,t=process.env){let n=String(t?.TMCT_MEMORY_BACKEND||"").trim().toLowerCase();if(!n)try{let{loadTomlConfig:s}=await Promise.resolve().then(()=>(gi(),Nf));n=String((await s(e))?.memory?.backend||"").trim().toLowerCase()}catch{n=""}return Uf(e,n)}function ak(e){let t=e.db.prepare("PRAGMA data_version").get()?.data_version;return e.cachedPayload&&e.cachedDataVersion!==t&&(e.cachedPayload=null),e.cachedPayload||(e.cachedPayload=ck(e),e.cachedDataVersion=t),zn(e.cachedPayload)}function ck(e){let t=e.db,n=dr(),s=(a,l)=>{let c=t.prepare("SELECT v FROM meta WHERE k = ?").get(a);return c?JSON.parse(c.v):l},o=t.prepare("SELECT json FROM individuals ORDER BY ord").all().map(a=>JSON.parse(a.json)),i=t.prepare("SELECT subject, object, subject_label, object_label, extra FROM edges WHERE prop = ? ORDER BY rowid"),r=t.prepare("SELECT prop, predicate, count FROM relations ORDER BY ord").all().map(a=>({predicate:a.predicate,prop:a.prop,count:a.count,examples:i.all(a.prop).map(l=>{let c={subject:l.subject,object:l.object,subjectLabel:l.subject_label,objectLabel:l.object_label};return l.extra&&Object.assign(c,JSON.parse(l.extra)),c})}));return{generated_at:s("generated_at",n.generated_at),memory:s("memory",n.memory),prefixes:s("prefixes",n.prefixes),vocabulary:s("vocabulary",n.vocabulary),classes:s("classes",n.classes),objectProperties:r,individuals:o,proseIndex:s("proseIndex",n.proseIndex)}}function lk(e,t){let n=zn(t),s=e.individuals.findIndex(o=>o?.id===t.id);s>=0?e.individuals[s]=n:e.individuals.push(n)}function uk(e,t){e.individuals=e.individuals.filter(n=>t.has(n?.id))}function dk(e,t){let n=e.objectProperties.find(s=>s?.prop===t);return n||(n={predicate:null,prop:t,count:0,examples:[]},e.objectProperties.push(n)),n}function pk(e,t,n){let s=`${t.subject}\0${t.object}`;e.examples=e.examples.filter(i=>`${i.subject}\0${i.object}`!==s);let o={subject:t.subject,object:t.object,subjectLabel:t.subjectLabel??null,objectLabel:t.objectLabel??null};n.length&&Object.assign(o,zn(Object.fromEntries(n.map(i=>[i,t[i]])))),e.examples.push(o)}function fk(e,t){e.examples=e.examples.filter(n=>t.has(`${n.subject}\0${n.object}`))}function mk(e,t){e.objectProperties=e.objectProperties.filter(n=>t.has(n?.prop))}function hk(e,t){let n=e.db,s=dr(),o=e.cachedPayload||null;n.exec("BEGIN IMMEDIATE");try{let i=n.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)");i.run("generated_at",JSON.stringify(t.generated_at??s.generated_at)),i.run("memory",JSON.stringify(t.memory??s.memory)),i.run("prefixes",JSON.stringify(t.prefixes??s.prefixes)),i.run("vocabulary",JSON.stringify(t.vocabulary??s.vocabulary)),i.run("classes",JSON.stringify(t.classes??s.classes)),i.run("proseIndex",JSON.stringify(t.proseIndex??s.proseIndex)),o&&(o.generated_at=zn(t.generated_at??s.generated_at),o.memory=zn(t.memory??s.memory),o.prefixes=zn(t.prefixes??s.prefixes),o.vocabulary=zn(t.vocabulary??s.vocabulary),o.classes=zn(t.classes??s.classes),o.proseIndex=zn(t.proseIndex??s.proseIndex));let r=n.prepare("SELECT ord, json FROM individuals WHERE id = ?"),l=n.prepare("SELECT COALESCE(MAX(ord), -1) AS m FROM individuals").get().m+1,c=n.prepare("INSERT OR REPLACE INTO individuals(id, ord, class, label, json) VALUES (?, ?, ?, ?, ?)"),u=new Set;for(let $ of t.individuals||[]){u.add($.id);let k=JSON.stringify($),y=r.get($.id);if(y&&y.json===k)continue;let j=y?y.ord:l++;c.run($.id,j,$.class??null,$.label??null,k),o&&lk(o,$)}let d=n.prepare("DELETE FROM individuals WHERE id = ?");for(let $ of n.prepare("SELECT id FROM individuals").all())u.has($.id)||d.run($.id);o&&uk(o,u);let m=n.prepare("SELECT ord FROM relations WHERE prop = ?"),f=n.prepare("SELECT COALESCE(MAX(ord), -1) AS m FROM relations").get().m+1,g=n.prepare("INSERT OR REPLACE INTO relations(prop, ord, predicate, count) VALUES (?, ?, ?, ?)"),h=n.prepare("SELECT subject, object, subject_label, object_label, extra FROM edges WHERE prop = ?"),b=n.prepare("INSERT OR REPLACE INTO edges(prop, subject, object, subject_label, object_label, extra) VALUES (?, ?, ?, ?, ?, ?)"),w=n.prepare("DELETE FROM edges WHERE prop = ? AND subject = ? AND object = ?"),v=new Set;for(let $ of t.objectProperties||[]){v.add($.prop);let k=h.all($.prop),y=new Map(k.map(S=>[`${S.subject}\0${S.object}`,S])),j=new Set,E=o?dk(o,$.prop):null;for(let S of $.examples||[]){let A=`${S.subject}\0${S.object}`;j.add(A);let M=Object.keys(S).filter(Z=>!rk.has(Z)),T=M.length?JSON.stringify(Object.fromEntries(M.map(Z=>[Z,S[Z]]))):null,P=y.get(A);P&&(P.subject_label??null)===(S.subjectLabel??null)&&(P.object_label??null)===(S.objectLabel??null)&&(P.extra??null)===(T??null)||(b.run($.prop,S.subject,S.object,S.subjectLabel??null,S.objectLabel??null,T),E&&pk(E,S,M))}for(let S of y.keys()){if(j.has(S))continue;let[A,M]=S.split("\0");w.run($.prop,A,M)}E&&fk(E,j);let _=Number.isFinite($.count)?$.count:($.examples||[]).length,R=m.get($.prop)?.ord??f++;g.run($.prop,R,$.predicate??null,_),E&&(E.predicate=$.predicate??null,E.count=_)}for(let $ of n.prepare("SELECT prop FROM relations").all())v.has($.prop)||(n.prepare("DELETE FROM edges WHERE prop = ?").run($.prop),n.prepare("DELETE FROM relations WHERE prop = ?").run($.prop));o&&mk(o,v),n.exec("COMMIT")}catch(i){throw n.exec("ROLLBACK"),e.cachedPayload=void 0,i}}async function Wf(e,t){let n=`${e}.tmp-${process.pid}-${Math.random().toString(36).slice(2,10)}`;await Io(n,t),await Tr(n,e)}async function qc(e,t){await Wf(e,JSON.stringify(t))}async function bk(e,{retentionVersions:t}={}){if(Wc(e))throw new Error("snapshotMemory only supports the flat-JSON backend (Backend A) \u2014 a memory/sqlite handle has no on-disk graph.json to snapshot");let n=cr(e),s;try{s=await ze(n,"utf8")}catch(u){if(u?.code==="ENOENT")return{skipped:!0,version:null,prunedVersion:null};throw u}let o=gk(e),i;try{i=JSON.parse(await ze(o,"utf8"))}catch(u){if(u?.code!=="ENOENT")throw u;i={version:0,retentionVersions:t??Lc}}Number.isInteger(i.version)||(i.version=0),Number.isInteger(i.retentionVersions)||(i.retentionVersions=t??Lc);let r=i.version,a=cr(e,r);await jn($e(a),{recursive:!0}),await Wf(a,s),i.version=r+1;let l=null,c=r-i.retentionVersions;if(c>=0)try{await Ji(cr(e,c)),l=c}catch(u){if(u?.code!=="ENOENT")throw u}return await qc(o,i),{skipped:!1,version:r,prunedVersion:l}}async function tn(e){if(vo(e))return Cc(e.payload);if(Os(e))return Cc(ak(e));let t;try{t=await ze(Oc(e),"utf8")}catch(n){if(n?.code==="ENOENT")return dr();throw n}return Cc(JSON.parse(t))}function Cc(e){if(!Array.isArray(e?.individuals))return e;let t=new Map;for(let s of e.individuals){if(s?.class!==is||!wk.test(s.id||""))continue;let o=r=>(s.attributes||[]).find(a=>a?.key===r)?.value||"",i=sr(o("subject"),o("predicate"),o("object"));i!==s.id&&(t.set(s.id,i),s.id=i)}if(!t.size)return e;let n=s=>t.get(s)||s;for(let s of e.objectProperties||[])for(let o of s.examples||[])o&&(t.has(o.subject)&&(o.subject=t.get(o.subject)),t.has(o.object)&&(o.object=t.get(o.object)));for(let s of e.individuals){Array.isArray(s?.derived_from)&&s.derived_from.length&&(s.derived_from=s.derived_from.map(n));let o=(s?.attributes||[]).find(i=>i?.prop==="mgx:factJustification");o?.value&&(o.value=o.value.split(" | ").map(i=>i.split(" ").filter(Boolean).map(n).join(" ")).filter(Boolean).join(" | "))}return e}async function yk(e,t){if(vo(e)){e.payload=t;return}if(Os(e)){hk(e,t);return}await jn($e(Oc(e)),{recursive:!0}),await qc(Oc(e),t)}async function vk(e){if(vo(e))return e.syllogiseState?structuredClone(e.syllogiseState):null;if(Os(e)){let t=e.db.prepare("SELECT v FROM meta WHERE k = ?").get(Gf);return t?.v?JSON.parse(t.v):null}try{return JSON.parse(await ze(ee(e,Gc),"utf8"))}catch(t){if(t?.code==="ENOENT")return null;throw t}}async function $k(e,t){if(vo(e)){e.syllogiseState=structuredClone(t);return}if(Os(e)){e.db.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)").run(Gf,JSON.stringify(t));return}let n=ee(e,Gc);await jn($e(n),{recursive:!0}),await qc(n,t)}function xk(e){let t=new Map,n=new Map,s=new Map;for(let i of e.individuals||[])i?.id&&(t.set(i.id,i),i.class===wo&&n.set(i.id,i));let o=(e.objectProperties||[]).find(i=>i?.prop===Bn);for(let i of o?.examples||[]){if(!i?.subject)continue;let r=s.get(i.subject);r?r.push(i.object):s.set(i.subject,[i.object])}return e[Nc]={individualsById:t,sourcesById:n,statedByBySubject:s},e[Nc]}async function Ns(e,t){let n=await tn(e);xk(n);let s=await t(n)??n;return Ak(s),Ck(s),s.proseIndex=Su(s.individuals),await yk(e,s),s}function pr(e,t){return e?.attributes?.find(n=>n?.prop===Nt)?.value||t||wi()}function lr(e,t,n,s){e.attributes=(e.attributes||[]).filter(o=>o?.prop!==t),e.attributes.push({prop:t,key:n,value:s})}function kk(e){switch(e?.kind){case"operator":return{id:e.sessionId?`${bi}:${e.sessionId}`:bi,type:"operator"};case"teach":return{id:e.sessionId?`${Ic}:${e.sessionId}`:Ic,type:"teach"};case"provider":return{id:`src:provider:${e.name}`,type:"provider"};case"corpus":return{id:`src:corpus:${e.name}`,type:"corpus"};case"corpusWeak":return{id:`src:corpus-weak:${e.name}`,type:"corpusWeak"};case"reference":return{id:`src:reference:${e.pack}:${e.article}`,type:"reference"};case"referenceLive":return{id:`src:reference:${e.pack}:${e.article}`,type:"referenceLive"};case"extracted":return{id:`src:extracted:${e.name}`,type:"extracted"};case"optimisticExtract":return{id:`src:optimistic-extract:${e.name}`,type:"optimisticExtract"};case"web":return{id:`src:learned:web:${nr(String(e.url||""))}`,type:"web",url:String(e.url||"")};case"entailed":return{id:`src:entailed:${e.rule}`,type:"entailed",rule:String(e.rule||"")};default:return null}}function Ek(e){return Sk[e]||null}function jk(e,t,n){let s=kk(t);if(!s)return null;let o=Ls(e),i=o?o.individualsById.get(s.id):e.individuals.find(c=>c?.id===s.id),r=pr(i,t?.createdAt||n),a={id:s.id,label:Vf(s.id),class:wo,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:sourceType",key:"sourceType",value:s.type},{prop:Nt,key:"createdAt",value:r},...s.url?[{prop:"mgx:sourceUrl",key:"sourceUrl",value:s.url}]:[],...s.rule?[{prop:"mgx:sourceRule",key:"sourceRule",value:s.rule}]:[]]},l=fr(e,a);return o&&o.sourcesById.set(s.id,l),s.id}function _k(e){let t=Ls(e),n={};if(t){for(let[s,o]of t.sourcesById)n[s]=o;return n}for(let s of e.individuals)s?.class===wo&&(n[s.id]=s);return n}function Rk(e,t){let n=Ls(e);return n?(n.statedByBySubject.get(t)||[]).slice():(e.objectProperties.find(o=>o?.prop===Bn)?.examples||[]).filter(o=>o?.subject===t).map(o=>o.object)}function Hf(e,t,n=Date.now(),s={}){let o=Rk(e,t.id),i=(t.attributes||[]).find(l=>l?.prop===Nt)?.value||"",{score:r,inputs:a}=Tu({sourceIds:o,createdAt:i},_k(e),{now:n,...Array.isArray(s?.premiseTrusts)?{premiseTrusts:s.premiseTrusts}:{},...typeof s?.ruleConfidence=="number"?{ruleConfidence:s.ruleConfidence}:{}});lr(t,Lr,"trustScore",String(r)),lr(t,aa,"trustInputs",JSON.stringify(a)),lr(t,$s,"updatedAt",new Date(n).toISOString())}function xi(e,t,n=Date.now(),s={}){let o=(t.attributes||[]).find(r=>r?.prop==="mgx:factProvenance")?.value||"",i=(t.attributes||[]).find(r=>r?.prop===Nt)?.value||new Date(n).toISOString();for(let r of o.split(" | ").filter(Boolean)){let a=zo(r);if(!a)continue;let l=jk(e,a,i);l&&yi(e,{predicate:"statedBy",prop:Bn},{subject:t.id,object:l,subjectLabel:t.label,objectLabel:Vf(l)})}Hf(e,t,n,s)}function Ak(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=e.objectProperties.find(i=>i?.prop===Bn),n=new Set((t?.examples||[]).map(i=>i.subject)),s=!1,o=Date.now();for(let i of e.individuals)i?.class!==is||n.has(i.id)||!(i.attributes||[]).find(a=>a?.prop==="mgx:factProvenance")?.value||(xi(e,i,o),s=!0);s&&Ms(e)}function Ck(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=Dt(e),n=new Set;for(let a of em(e))for(let l of a)n.add(l.id);let s=new Map;for(let a of t)for(let l of a.sourceIds){if(!Tk(l))continue;let c=s.get(l)||{factsAsserted:0,factsContradicted:0};c.factsAsserted+=1,n.has(a.id)&&(c.factsContradicted+=1),s.set(l,c)}if(!s.size)return;let o=Ls(e);for(let[a,l]of s){let c=o?o.individualsById.get(a):e.individuals.find(u=>u?.id===a);c&&(lr(c,Ff,"sourceReliability",String(Cu(l))),lr(c,$s,"updatedAt",new Date().toISOString()))}let i=e.objectProperties.find(a=>a?.prop===Bn),r=new Set;for(let a of i?.examples||[])s.has(a?.object)&&r.add(a.subject);for(let a of r){let l=o?o.individualsById.get(a):e.individuals.find(c=>c?.id===a);l&&Hf(e,l)}}function fr(e,t){let n=Ls(e);if(n){let o=n.individualsById.get(t.id);return o?(Object.assign(o,t),o):(e.individuals.push(t),n.individualsById.set(t.id,t),t)}let s=e.individuals.findIndex(o=>o?.id===t.id);return s>=0?(e.individuals[s]=t,t):(e.individuals.push(t),t)}function yi(e,{predicate:t,prop:n},s){let o=e.objectProperties.find(l=>l?.prop===n);o||(o={predicate:t,prop:n,count:0,examples:[]},e.objectProperties.push(o));let i=n===Bn?Ls(e):null;if(i){let l=i.statedByBySubject.get(s.subject);if(!l||!l.includes(s.object)){o.examples.push({...s,createdAt:s.createdAt||wi()}),o.count=o.examples.length,l?l.push(s.object):i.statedByBySubject.set(s.subject,[s.object]);return}}let a=(o.examples||[]).find(l=>l?.subject===s.subject&&l?.object===s.object)?.createdAt||s.createdAt||wi();if(o.examples=(o.examples||[]).filter(l=>!(l?.subject===s.subject&&l?.object===s.object)),o.examples.push({...s,createdAt:a}),o.count=o.examples.length,i){let l=i.statedByBySubject.get(s.subject)||[];l.includes(s.object)||l.push(s.object),i.statedByBySubject.set(s.subject,l)}}function Ms(e){let t=[Fc,Pc,is,wo,yo];e.classes=e.classes.filter(n=>!t.includes(n?.name));for(let n of t){let s=e.individuals.filter(o=>o?.class===n);s.length&&e.classes.push({name:n,count:s.length,sample:s.slice(0,3).map(o=>o.label)})}}function Ik(e,t,n=""){let s=`session:${t}`;return e.individuals.some(o=>o?.id===s)||e.individuals.push({id:s,label:String(t).slice(0,8),class:Fc,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:Nt,key:"createdAt",value:n||wi()},...n?[{prop:"mgx:sessionStarted",key:"started",value:n}]:[]]}),s}function Kf(e,{role:t,text:n,ts:s,sessionId:o,sessionStarted:i="",parsed:r=null,replyTo:a=null,createdAt:l=""}){if(!nk.has(t))throw new Error(`utterance role must be "visitor" or "tmct", got ${JSON.stringify(t)}`);if(!o)throw new Error("utterance needs a sessionId");let c=String(s||""),u=Pn(n),d=`utt:${o}#${c}#${t}`,m=$i(u)||(t==="visitor"?"a-visitor-said":"a-tmct-said"),p=Or({doc:u}),f=e.individuals.find(w=>w?.id===d),g=pr(f,l||c),h={id:d,label:m,class:Pc,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:utteranceRole",key:"role",value:t},{prop:"mgx:utteranceText",key:"text",value:u},{prop:"mgx:utteranceTs",key:"ts",value:c},{prop:Nt,key:"createdAt",value:g},...r!=null?[{prop:"mgx:utteranceParsed",key:"parsed",value:JSON.stringify(r)}]:[],...p.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:p.join(" ")}]:[]]};fr(e,h);let b=Ik(e,o,i);if(yi(e,{predicate:"saidInSession",prop:Dc},{subject:d,object:b,subjectLabel:m,objectLabel:String(o).slice(0,8)}),a){let w=e.individuals.find(v=>v?.id===a);w&&yi(e,{predicate:"inReplyTo",prop:zc},{subject:d,object:a,subjectLabel:m,objectLabel:w.label})}return c&&c>String(e.generated_at||"")&&(e.generated_at=c),d}async function Ok(e,t){let n;return await Ns(e,s=>{n=Kf(s,t),Ms(s)}),{id:n}}async function Yf(e,t){let n=[];return t?.length?(await Ns(e,s=>{for(let o of t)n.push(Kf(s,o));Ms(s)}),{ids:n}):{ids:n}}async function Lk(e,t){t?.length&&await Ns(e,n=>{for(let s of t)yi(n,{predicate:"canonicalisedFrom",prop:Bc},{subject:s.factId,object:s.uttId,subjectLabel:s.factLabel,objectLabel:s.uttLabel})})}async function Nk(e,{subject:t,predicate:n,object:s,provenance:o="",createdAt:i="",quantifier:r="",premiseTrusts:a,ruleConfidence:l}={}){let c=ne(t),u=Fn(n),d=ne(s);if(!c||!u||!d)throw new Error("a fact needs subject, predicate and object");let m=sr(c,u,d),p=`${c} ${u} ${d}`,f=Or({doc:p}),g=Pn(r);return await Ns(e,async h=>{let b=h.individuals.find(E=>E?.id===m),w=b?.attributes?.find(E=>E?.prop==="mgx:factProvenance")?.value||"",v=[...new Set([...w.split(" | "),Pn(o)].filter(Boolean))],$=pr(b,i),k=b?.attributes?.find(E=>E?.prop==="mgx:factQuantifier")?.value||"",y=g||k,j={id:m,label:$i(p),class:is,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"rdf:Statement"},{prop:"rdf:subject",key:"subject",value:c},{prop:"rdf:predicate",key:"predicate",value:u},{prop:"rdf:object",key:"object",value:d},{prop:Nt,key:"createdAt",value:$},...v.length?[{prop:"mgx:factProvenance",key:"provenance",value:v.join(" | ")}]:[],...f.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:f.join(" ")}]:[],...y?[{prop:"mgx:factQuantifier",key:"quantifier",value:y}]:[]]};await Ec(j),fr(h,j),xi(h,h.individuals.find(E=>E?.id===m),void 0,{premiseTrusts:a,ruleConfidence:l}),Ms(h)}),{id:m}}function Mk(e){if(!Array.isArray(e))return;let t=e.some(Array.isArray)?e.filter(Array.isArray):[e],n=[],s=new Set;for(let o of t){let i=o.filter(a=>typeof a=="string"&&a);if(!i.length)continue;let r=[...i].sort().join(" ");s.has(r)||(s.add(r),n.push(i))}return n.length?n:void 0}async function mr(e,t){let n=[],s=0;for(let i of t||[]){let r=ne(i?.subject),a=Fn(i?.predicate),l=ne(i?.object);if(!r||!a||!l){s+=1;continue}let c=`${r} ${a} ${l}`;n.push({id:sr(r,a,l),s:r,p:a,o:l,text:c,tokens:Or({doc:c}),provenance:Pn(i?.provenance),createdAt:i?.createdAt||"",quantifier:Pn(i?.quantifier),premiseTrusts:Array.isArray(i?.premiseTrusts)?i.premiseTrusts:void 0,ruleConfidence:typeof i?.ruleConfidence=="number"?i.ruleConfidence:void 0,environments:Mk(i?.justification)})}let o=[];return n.length?(await Ns(e,i=>{let r=Ls(i),a=r?r.individualsById:new Map(i.individuals.map(d=>[d?.id,d])),l=[],c=new Set,u=new Map;for(let d of n){let m=a.get(d.id),p=m?.attributes?.find($=>$?.prop==="mgx:factProvenance")?.value||"",f=[...new Set([...p.split(" | "),d.provenance].filter(Boolean))],g=pr(m,d.createdAt),h=m?.attributes?.find($=>$?.prop==="mgx:factQuantifier")?.value||"",b=d.quantifier||h,w={id:d.id,label:$i(d.text),class:is,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"rdf:Statement"},{prop:"rdf:subject",key:"subject",value:d.s},{prop:"rdf:predicate",key:"predicate",value:d.p},{prop:"rdf:object",key:"object",value:d.o},{prop:Nt,key:"createdAt",value:g},...f.length?[{prop:"mgx:factProvenance",key:"provenance",value:f.join(" | ")}]:[],...d.tokens.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:d.tokens.join(" ")}]:[],...b?[{prop:"mgx:factQuantifier",key:"quantifier",value:b}]:[],...d.environments?[{prop:"mgx:factJustification",key:"justification",value:d.environments.map($=>$.join(" ")).join(" | ")}]:[]]},v=fr(i,w);a.set(d.id,v),o.push(d.id),c.has(d.id)||(c.add(d.id),l.push(d.id)),(d.premiseTrusts!==void 0||d.ruleConfidence!==void 0)&&u.set(d.id,{premiseTrusts:d.premiseTrusts,ruleConfidence:d.ruleConfidence})}for(let d of l)xi(i,a.get(d),void 0,u.get(d));Ms(i)}),{ids:o,appended:o.length,skipped:s}):{ids:o,appended:0,skipped:s}}async function Yc(e,{name:t,kind:n,slots:s,provenance:o="",createdAt:i=""}={}){let r=Xf[n];if(!r)throw new Error(`a rule kind must be one of ${Pk.join(", ")}, got ${JSON.stringify(n)}`);let a=ne(t);if(!a)throw new Error("a rule needs a name");let l=Fk[n]||new Set,c=r.map(([p])=>ne(s?.[p])),u=r.filter(([p],f)=>!l.has(p)&&!c[f]);if(u.length)throw new Error(`a ${n} rule needs ${u.map(([p])=>p).join(" + ")}`);if(n===br){let p=c[r.findIndex(([g])=>g==="objectRole")],f=c[r.findIndex(([g])=>g==="value")];if(!p&&!f)throw new Error(`a ${n} rule needs an objectRole or a value`)}let d=Dk(n,a,c),m=$i(`${a} = ${n}(${c.join(", ")})`);return await Ns(e,async p=>{let f=p.individuals.find(v=>v?.id===d),g=f?.attributes?.find(v=>v?.prop==="mgx:factProvenance")?.value||"",h=[...new Set([...g.split(" | "),Pn(o)].filter(Boolean))],b=pr(f,i),w={id:d,label:m,class:yo,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:Si,key:"ruleName",value:a},{prop:$o,key:"ruleKind",value:n},...r.map(([v,$],k)=>({prop:$,key:v,value:c[k],skip:!c[k]&&l.has(v)})).filter(v=>!v.skip).map(({skip:v,...$})=>$),{prop:Nt,key:"createdAt",value:b},...h.length?[{prop:"mgx:factProvenance",key:"provenance",value:h.join(" | ")}]:[]]};await Ec(w),fr(p,w),xi(p,p.individuals.find(v=>v?.id===d)),Ms(p)}),{id:d}}function Xc(e,t){let n=ne(t);return(e?.individuals||[]).find(s=>s?.class===yo&&(s.attributes||[]).find(o=>o?.prop===Si)?.value===n)}function zk(e,t){let n=ne(t),s=o=>(o.attributes||[]).find(i=>i?.prop===$o)?.value||"";return(e?.individuals||[]).filter(o=>o?.class===yo&&(o.attributes||[]).find(i=>i?.prop===Si)?.value===n).sort((o,i)=>s(o).localeCompare(s(i))||String(o.id).localeCompare(String(i.id)))}function Jc(e){let t=[];for(let n of e?.individuals||[]){if(n?.class!==yo)continue;let s=a=>(n.attributes||[]).find(l=>l?.prop===a)?.value,o=s($o),i=Xf[o];if(!i)continue;let r={};for(let[a,l]of i)r[a]=s(l)??"";t.push({id:n.id,name:s(Si)||"",kind:o,slots:r,provenance:s("mgx:factProvenance")||""})}return t.sort((n,s)=>n.name.localeCompare(s.name)||n.kind.localeCompare(s.kind)||String(n.id).localeCompare(String(s.id))),t}async function Qc(e,t,n,s,o){let{relationFactsFor:i,renderFactLine:r,factPhrase:a,factTermVariants:l,byTrust:c,rows:u,HAS_PROPERTY_PREDICATE:d,findActionPath:m}=o,p=String(t||"").trim().toLowerCase(),f=l(ne,n),g=l(ne,s),h=i(p).filter(v=>f.has(v.fact.subject)&&g.has(v.fact.object));if(h.length){let v=h.slice().sort(($,k)=>c($.fact,k.fact))[0];return{citation:[r(v.fact),...v.aliasFacts.map($=>`${a($)}${$.provenance?` (source: ${$.provenance})`:""}`)]}}let b=Xc(e,p),w=b?.attributes?.find(v=>v.prop===$o)?.value;if(b&&w===hr){let v=b.attributes.find(M=>M.prop==="mgx:ruleBase1")?.value,$=b.attributes.find(M=>M.prop==="mgx:ruleBase2")?.value,k=ne(n),y=ne(s);if(!v||!$||!k||!y)return null;let R=m({entity:k,hopsTaken:0},M=>M.hopsTaken===2&&M.entity===y,M=>{if(M.hopsTaken>=2)return[];let T=M.hopsTaken===0?v:$;return i(T).filter(P=>P.fact.subject===M.entity).map(P=>({action:P,nextState:{entity:P.fact.object,hopsTaken:M.hopsTaken+1}}))},{maxDepth:2,stateKey:M=>`${M.entity}#${M.hopsTaken}`});if(!R)return null;let S=new Set,A=[];for(let M of R.actions){A.push(r(M.fact));for(let T of M.aliasFacts){let P=T.id||`${T.subject}|${T.predicate}|${T.object}`;S.has(P)||(S.add(P),A.push(`${a(T)}${T.provenance?` (source: ${T.provenance})`:""}`))}}return{citation:A}}if(b&&w===gr){let v=b.attributes.find(_=>_.prop==="mgx:ruleBase1")?.value,$=b.attributes.find(_=>_.prop==="mgx:ruleFilterProperty")?.value;if(!v||!$)return null;let k=await Qc(e,v,n,s,o);if(!k)return null;let y=ne(n),j=ne($),E=u.find(_=>_.predicate===d&&_.subject===y&&ne(_.object)===j);return E?{citation:[...k.citation,r(E)]}:null}return null}async function Jf(e,t,n,s){let{relationFactsFor:o,renderFactLine:i,factPhrase:r,factTermVariants:a,byTrust:l,rows:c,HAS_PROPERTY_PREDICATE:u,findReachableSet:d}=s,m=String(t||"").trim().toLowerCase(),p=a(ne,n),f=o(m).filter(b=>p.has(b.fact.object));if(f.length){let b=new Map;for(let w of f)b.has(w.fact.subject)||b.set(w.fact.subject,[]),b.get(w.fact.subject).push(w);return[...b.entries()].map(([w,v])=>{let $=v.slice().sort((k,y)=>l(k.fact,y.fact))[0];return{subject:w,citation:[i($.fact),...$.aliasFacts.map(k=>`${r(k)}${k.provenance?` (source: ${k.provenance})`:""}`)]}})}let g=Xc(e,m),h=g?.attributes?.find(b=>b.prop===$o)?.value;if(g&&h===hr){let b=g.attributes.find(j=>j.prop==="mgx:ruleBase1")?.value,w=g.attributes.find(j=>j.prop==="mgx:ruleBase2")?.value,v=ne(n);return!b||!w||!v?[]:d({entity:v,hopsTaken:0},j=>{if(j.hopsTaken>=2)return[];let E=j.hopsTaken===0?w:b;return o(E).filter(_=>_.fact.object===j.entity).map(_=>({action:_,nextState:{entity:_.fact.subject,hopsTaken:j.hopsTaken+1}}))},{maxDepth:2,stateKey:j=>`${j.entity}#${j.hopsTaken}`}).filter(j=>j.node.hopsTaken===2).map(({node:j,path:E})=>{let _=new Set,R=[];for(let S of E.actions.slice().reverse()){R.push(i(S.fact));for(let A of S.aliasFacts){let M=A.id||`${A.subject}|${A.predicate}|${A.object}`;_.has(M)||(_.add(M),R.push(`${r(A)}${A.provenance?` (source: ${A.provenance})`:""}`))}}return{subject:j.entity,citation:R}})}if(g&&h===gr){let b=g.attributes.find(y=>y.prop==="mgx:ruleBase1")?.value,w=g.attributes.find(y=>y.prop==="mgx:ruleFilterProperty")?.value;if(!b||!w)return[];let v=await Jf(e,b,n,s),$=ne(w),k=[];for(let y of v){let j=ne(y.subject),E=c.find(_=>_.predicate===u&&_.subject===j&&ne(_.object)===$);E&&k.push({subject:y.subject,citation:[...y.citation,i(E)]})}return k}return[]}function Dt(e){let t=e?.individuals||[],n=new Map(t.filter(r=>r?.class===wo).map(r=>[r.id,r])),s=(e?.objectProperties||[]).find(r=>r?.prop===Bn),o=new Map;for(let r of s?.examples||[])o.has(r.subject)||o.set(r.subject,[]),o.get(r.subject).push(r.object);let i=[];for(let r of t){if(r?.class!==is)continue;let a=f=>(r.attributes||[]).find(g=>g?.key===f)?.value||"",l=o.get(r.id)||[],c=l.map(f=>(n.get(f)?.attributes||[]).find(g=>g?.prop==="mgx:sourceType")?.value).filter(Boolean),u=a("justification"),d=[];if(u)for(let f of u.split(" | ")){let g=f.split(" ").filter(Boolean);g.length&&d.push(g)}let m=[],p=new Set;for(let f of d)for(let g of f)p.has(g)||(p.add(g),m.push(g));i.push({id:r.id,subject:a("subject"),predicate:a("predicate"),object:a("object"),provenance:a("provenance"),quantifier:a("quantifier"),sourceIds:l,sourceTypes:c,trust:Number((r.attributes||[]).find(f=>f?.prop===Lr)?.value)||0,environments:d,justification:m})}return i}async function Bk(e,t){let n=new Set((t||[]).filter(Boolean)),s=[];return n.size?(await Ns(e,o=>{if(o.individuals=(o.individuals||[]).filter(r=>r?.class===is&&n.has(r.id)?(s.push(r.id),!1):!0),!s.length)return;let i=new Set(s);for(let r of o.objectProperties||[]){let a=r.examples||[];r.examples=a.filter(l=>!i.has(l?.subject)&&!i.has(l?.object)),r.count=r.examples.length}Ms(o)}),{removed:s}):{removed:s}}function em(e,{floor:t=Uk}={}){let n=Dt(e).filter(i=>i.trust>=t),s=new Map;for(let i of n){if(Zf.has(i.predicate))continue;let r=`${i.subject} ${i.predicate}`;s.has(r)||s.set(r,[]),s.get(r).push(i)}let o=[];for(let i of s.values())new Set(i.map(r=>r.object)).size>1&&o.push(i.slice().sort((r,a)=>a.trust-r.trust||r.object.localeCompare(a.object)));return o.sort((i,r)=>`${i[0].subject} ${i[0].predicate}`.localeCompare(`${r[0].subject} ${r[0].predicate}`))}var ur,Mc,Pc,is,Fc,wo,yo,Dc,zc,tk,Bn,Bc,Ff,bi,Ic,nk,Mf,sk,Oc,Uc,Df,ok,rk,Pf,zn,qf,Lc,gk,wk,Gc,Gf,Nc,Ls,$i,wi,Vf,Sk,Tk,hr,gr,Vc,Hc,ki,br,Kc,Pk,Si,$o,Xf,Fk,Dk,Uk,Ps,Qf,Zf,Ge=L(()=>{vt();De();Hn();cn();cn();xs();xs();Sc();kf();ur=ee(".tmct","memory"),Mc=ee(ur,"graph.json"),Pc="Utterance",is="Fact",Fc="Session",wo="Source",yo="Rule",Dc="mgx:saidInSession",zc="mgx:inReplyTo",tk="mgx:derivedFrom",Bn="mgx:statedBy",Bc="mgx:canonicalisedFrom",Ff="mgx:sourceReliability",bi="src:operator-chat",Ic="src:teach-chat",nk=new Set(["visitor","tmct"]),Mf=48,sk=[{prop:"rdf:type",note:"rdf-ish typing attribute: owl:NamedIndividual (utterances/sessions) or rdf:Statement (reified facts)"},{prop:"mgx:utteranceRole",note:"who said it: visitor (an a-visitor-said item) or tmct (the response alongside it)"},{prop:"mgx:utteranceText",note:"the utterance's normalized text (capped)"},{prop:"mgx:utteranceTs",note:"when it was said, ISO-8601 (the chat turn timestamp)"},{prop:"mgx:utteranceParsed",note:"optional JSON of the parse the interpretation pipeline produced for this request"},{prop:Dc,predicate:"saidInSession",note:"Utterance \u2192 Session it was said in; runtime observation, owned (no SEON term)"},{prop:zc,predicate:"inReplyTo",note:"tmct Utterance \u2192 the visitor Utterance it answers (the Q/A pairing)"},{prop:"rdf:subject",note:"reified fact: the triple's subject term"},{prop:"rdf:predicate",note:"reified fact: the triple's predicate term"},{prop:"rdf:object",note:"reified fact: the triple's object term"},{prop:"mgx:factProvenance",note:"LEGACY COMPAT SHIM: the ' | '-joined provenance tag string a fact came from; the source-of-truth is now the mgx:statedBy edges derived from it"},{prop:"mgx:factQuantifier",note:"OPTIONAL: the quantifier word a plural class-membership teach used ('every'/'some'/'a few'), for literal recall by 'how many Xs are Ys' \u2014 never real cardinality counting"},{prop:"mgx:factJustification",note:"an entailed Fact's supporting premise fact ids: ' | '-separated environments, one space-separated premise-id list per independent derivation, capped by syllogise's maxEnvironments knob; a value with no ' | ' is a single environment"},{prop:"mgx:ruleName",note:"a taught Rule's own name (e.g. 'grandparent') \u2014 the query-dispatcher's lookup key, PLAN_TAUGHT_RELATIONS.md \xA72/\xA73"},{prop:"mgx:ruleKind",note:"a taught Rule's SHAPE tag \u2014 the closed vocabulary compose2 | filter | recursive (structural, like 'Fact'/'Rule' themselves, never a domain word)"},{prop:"mgx:ruleBase1",note:"compose2: the first hop's base relation name; filter: the base rule/relation being filtered (same 'base relation' role in both kinds, so the name is shared)"},{prop:"mgx:ruleBase2",note:"compose2 only: the second hop's base relation name"},{prop:"mgx:ruleFilterProperty",note:"filter only: the property literal candidates are filtered by (an mgx:hasProperty-shaped Fact lookup)"},{prop:"mgx:ruleBaseCase",note:"recursive only: the base-case relation name (hop zero)"},{prop:"mgx:ruleRecStep",note:"recursive only: the self-referential recursive-step relation name"},{prop:Nt,note:"when an individual was FIRST written, ISO-8601 (first-write-wins on upsert); the audit 'when', the recency input to trust, the novelty signal"},{prop:$s,note:"an audit / last-modified stamp: when an individual's OWN attributes were last mutated in place (upsertSession, recomputeFactTrust, recomputeSourceReliability) \u2014 most individuals never carry it at all. NOT transaction time: a mutable stamp cannot record when the previous version stopped being current, so tmct is not bitemporal"},{prop:tk,predicate:"derivedFrom",note:"umbrella: a Fact derived from a Source (or another Fact). ext ref prov:wasDerivedFrom (UNVERIFIED-pending-web-check)"},{prop:Bn,predicate:"statedBy",note:"subPropertyOf derivedFrom: a Source directly asserts this Fact (one edge per independent source \u2014 replaces the factProvenance union)"},{prop:Bc,predicate:"canonicalisedFrom",note:"subPropertyOf derivedFrom: a canonical Fact cleaned from a raw Block/Source, never replacing it"},{prop:"mgx:sourceType",note:"a Source's kind: operator | teach | provider | corpus | corpusWeak | reference | referenceLive | extracted | optimisticExtract | web | entailed (the trust-prior key)"},{prop:"mgx:sourceUrl",note:"a web Source's URL"},{prop:"mgx:sourceRule",note:"an entailed Source's rule id"},{prop:"mgx:sourceReliability",note:"actor-level (session-scoped) trust nudge in [0.5,1.5], neutral 1.0 when absent \u2014 materialised by recomputeSourceReliability from a session's asserted-vs-contradicted track record (memory/trust.mjs's sessionReliabilityFrom); folds into computeTrust's per-source prior"},{prop:Lr,note:"materialised trust cache in [0,1] \u2014 pure function of a fact's Sources + createdAt (memory/trust.mjs); invalidated when a statedBy edge is added"},{prop:aa,note:"JSON of the inputs the trust score was computed from (source-type multiset, corroboration count, createdAt, recency) \u2014 makes the score auditable"},{prop:"mgx:hasProseTokens",note:"prose tokens (prose.mjs tokenizer) backing the payload's proseIndex"},{prop:"mgx:sessionStarted",note:"session anchor: when the session started, ISO-8601"},{prop:"rdf:predicate",prefix:uo,note:"a reified fact's predicate carries its POLARITY: mgxneg:capableOf is the negative twin of mgx:capableOf ('a penguin cannot fly'). Polarity cannot be a separate property \u2014 the fact id hashes (subject, predicate, object), so both polarities would share one id and union their statedBy edges (memory/capability.mjs)"}];Oc=e=>cr(e),Uc="memory",Df="sqlite";ok=`
108
108
  CREATE TABLE IF NOT EXISTS meta (k TEXT PRIMARY KEY, v TEXT NOT NULL);
109
109
  CREATE TABLE IF NOT EXISTS individuals (id TEXT PRIMARY KEY, ord INTEGER NOT NULL, class TEXT, label TEXT, json TEXT NOT NULL);
110
110
  CREATE TABLE IF NOT EXISTS relations (prop TEXT PRIMARY KEY, ord INTEGER NOT NULL, predicate TEXT, count INTEGER);
111
111
  CREATE TABLE IF NOT EXISTS edges (prop TEXT NOT NULL, subject TEXT NOT NULL, object TEXT NOT NULL, subject_label TEXT, object_label TEXT, extra TEXT, PRIMARY KEY (prop, subject, object));
112
112
  CREATE INDEX IF NOT EXISTS edges_by_prop ON edges(prop);
113
- `,Nx=new Set(["subject","object","subjectLabel","objectLabel"]),Sf=!1;zn=e=>e===void 0?e:structuredClone(e);If=Z(ir,"manifest.json"),$c=5,Vx=e=>Z(e,If);Kx=/^fact:[0-9a-f]{8}$/;Ic=Z(ir,"syllogise-state.json"),Of="syllogiseState";xc=Symbol("mutateMemory lookup index");Os=e=>e?.[xc]||null;hi=e=>e.length>Ef?e.slice(0,Ef-1)+"\u2026":e,pi=()=>new Date().toISOString();Lf=e=>String(e).replace(/^src:/,""),ek=Object.freeze({operator:{subClass:"tmct:AgentSource",prov:"prov:Agent"},teach:{subClass:"tmct:AgentSource",prov:"prov:Agent"},provider:{subClass:"tmct:AgentSource",prov:"prov:Agent"},corpus:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},corpusWeak:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},reference:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},referenceLive:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},web:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},extracted:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},optimisticExtract:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},entailed:{subClass:"tmct:ActivitySource",prov:"prov:Activity"}});ik=e=>typeof e=="string"&&(e.startsWith(`${di}:`)||e.startsWith(`${yc}:`));dr="compose2",pr="filter",Oc="recursive",Lc="action-signature",bi="action-precond",fr="action-effect",Nc="action-constraint",fk=Object.freeze([dr,pr,Oc,Lc,bi,fr,Nc]),wi="mgx:ruleName",yo="mgx:ruleKind",Ff={[dr]:[["base1","mgx:ruleBase1"],["base2","mgx:ruleBase2"]],[pr]:[["base","mgx:ruleBase1"],["property","mgx:ruleFilterProperty"]],[Oc]:[["baseCase","mgx:ruleBaseCase"],["recStep","mgx:ruleRecStep"]],[Lc]:[["subjectClass","mgx:ruleActionSubjectClass"],["targetClass","mgx:ruleActionTargetClass"]],[bi]:[["shape","mgx:ruleActionPrecondShape"],["predicate","mgx:ruleActionPrecondPredicate"],["role","mgx:ruleActionPrecondRole"],["scope","mgx:ruleActionPrecondScope"],["value","mgx:ruleActionPrecondValue"],["negate","mgx:ruleActionPrecondNegate"]],[fr]:[["predicate","mgx:ruleActionEffectPredicate"],["subjectRole","mgx:ruleActionEffectSubject"],["objectRole","mgx:ruleActionEffectObject"],["value","mgx:ruleActionEffectValue"]],[Nc]:[["left","mgx:ruleActionConstraintLeft"],["right","mgx:ruleActionConstraintRight"],["guard","mgx:ruleActionConstraintGuard"]]},mk={[bi]:new Set(["value","negate"]),[fr]:new Set(["objectRole","value"])},hk=(e,t,n)=>`rule:${Qo([e,t,...n].join("\0"))}`;wk=.5,Ms="mgx:hasA",zf="mgx:capableOf",Uf=new Set([Ms,zf].flatMap(e=>[e,po(e)]))});async function kn(e){try{let{dir:t,close:n}=await is($e($e(e.graphFile)));try{return en(await Zt(t))}finally{await n()}}catch{return[]}}function qf(e){let t=[...new Set(e.map(s=>s.provenance).filter(Boolean))];return t.length?`provenance: ${t.slice(0,2).join("; ")}${t.length>2?`, +${t.length-2} more source(s)`:""}`:"provenance: memory/corpus facts"}function yi(e,t){let n=ee(t),s=e.filter(a=>Wf.has(a.predicate)&&a.object===n);if(!s.length)return null;let o=[...new Set(s.map(a=>a.subject))].sort(),r=o.slice(0,Ps),i=o.length>Ps?`
114
- \u2026+${o.length-Ps} more`:"";return`"${t}" is not a code-map entity \u2014 answering from memory/corpus facts. ${o.length} known subclass(es):
115
- ${r.join(`
116
- `)}${i}
117
- (${qf(s)})`}function vi(e,t){let n=ee(t),s=e.filter(a=>Wf.has(a.predicate)&&(a.subject===n||a.object===n));if(!s.length)return null;let o=[...new Set(s.filter(a=>a.subject===n).map(a=>a.object))],r=[...new Set(s.filter(a=>a.object===n).map(a=>a.subject))].sort(),i=[`"${t}" is not a code-map entity \u2014 answering from memory/corpus facts.`];if(o.length&&i.push(`is a: ${o.slice(0,Ps).join(", ")}`),r.length){let a=r.length>Ps?`, +${r.length-Ps} more`:"";i.push(`known subclasses (${r.length}): ${r.slice(0,Ps).join(", ")}${a}`)}return i.push(`(${qf(s)})`),i.join(`
118
- `)}var Wf,Ps,vo=L(()=>{De();Ke();Wf=new Set(["rdfs:subClassOf","rdf:type"]),Ps=40});async function Gf(e,{graph:t,svc:n,config:s}){let o=ot(e,"symbol"),{match:r,candidates:i}=qt(n.graph,o);if(r)return ra(t,r,{candidates:i});let a=vi(await kn(s),o);if(a)return a;wt(n,o,"symbol")}var Vf=L(()=>{Ce();vo();He()});async function Hf(e,{graph:t,svc:n,repoRoot:s}){let o=ot(e,"symbol"),{match:r,candidates:i}=wt(n,o,"symbol"),a=vt(r);if(!a)throw new Le(`"${r.label}" (${r.class||"Entity"}) has no source span in the graph \u2014 it is likely a module. Use tmct_describe for its contents, then tmct_snippet one of the functions/classes it defines.`);let l;try{l=await Mn({readFile:ze,repoRoot:s,path:a.path,start:a.start,end:a.end,maxLines:Jo})}catch(h){throw h instanceof Le?h:new Le(`could not read ${a.path} (${h?.code||h?.message||h})`)}let{text:c,truncated:u}=l,d=a.end>a.start?`${a.start}-${a.end}`:`${a.start}`,m=`${r.label} \u2014 ${r.class||"Entity"} @ ${a.path}:${d}`,p=u?`
119
- \u2026 (truncated to ${Jo} lines; full span ${d})`:"",f=i.length?`
120
- (other matches: ${i.map(h=>h.label).join(", ")})`:"",g=ca(t,r);return`${m}
113
+ `,rk=new Set(["subject","object","subjectLabel","objectLabel"]),Pf=!1;zn=e=>e===void 0?e:structuredClone(e);qf=ee(ur,"manifest.json"),Lc=5,gk=e=>ee(e,qf);wk=/^fact:[0-9a-f]{8}$/;Gc=ee(ur,"syllogise-state.json"),Gf="syllogiseState";Nc=Symbol("mutateMemory lookup index");Ls=e=>e?.[Nc]||null;$i=e=>e.length>Mf?e.slice(0,Mf-1)+"\u2026":e,wi=()=>new Date().toISOString();Vf=e=>String(e).replace(/^src:/,""),Sk=Object.freeze({operator:{subClass:"tmct:AgentSource",prov:"prov:Agent"},teach:{subClass:"tmct:AgentSource",prov:"prov:Agent"},provider:{subClass:"tmct:AgentSource",prov:"prov:Agent"},corpus:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},corpusWeak:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},reference:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},referenceLive:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},web:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},extracted:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},optimisticExtract:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},entailed:{subClass:"tmct:ActivitySource",prov:"prov:Activity"}});Tk=e=>typeof e=="string"&&(e.startsWith(`${bi}:`)||e.startsWith(`${Ic}:`));hr="compose2",gr="filter",Vc="recursive",Hc="action-signature",ki="action-precond",br="action-effect",Kc="action-constraint",Pk=Object.freeze([hr,gr,Vc,Hc,ki,br,Kc]),Si="mgx:ruleName",$o="mgx:ruleKind",Xf={[hr]:[["base1","mgx:ruleBase1"],["base2","mgx:ruleBase2"]],[gr]:[["base","mgx:ruleBase1"],["property","mgx:ruleFilterProperty"]],[Vc]:[["baseCase","mgx:ruleBaseCase"],["recStep","mgx:ruleRecStep"]],[Hc]:[["subjectClass","mgx:ruleActionSubjectClass"],["targetClass","mgx:ruleActionTargetClass"]],[ki]:[["shape","mgx:ruleActionPrecondShape"],["predicate","mgx:ruleActionPrecondPredicate"],["role","mgx:ruleActionPrecondRole"],["scope","mgx:ruleActionPrecondScope"],["value","mgx:ruleActionPrecondValue"],["negate","mgx:ruleActionPrecondNegate"]],[br]:[["predicate","mgx:ruleActionEffectPredicate"],["subjectRole","mgx:ruleActionEffectSubject"],["objectRole","mgx:ruleActionEffectObject"],["value","mgx:ruleActionEffectValue"]],[Kc]:[["left","mgx:ruleActionConstraintLeft"],["right","mgx:ruleActionConstraintRight"],["guard","mgx:ruleActionConstraintGuard"]]},Fk={[ki]:new Set(["value","negate"]),[br]:new Set(["objectRole","value"])},Dk=(e,t,n)=>`rule:${nr([e,t,...n].join("\0"))}`;Uk=.5,Ps="mgx:hasA",Qf="mgx:capableOf",Zf=new Set([Ps,Qf].flatMap(e=>[e,mo(e)]))});async function kn(e){try{let{dir:t,close:n}=await as($e($e(e.graphFile)));try{return Dt(await tn(t))}finally{await n()}}catch{return[]}}function nm(e){let t=[...new Set(e.map(s=>s.provenance).filter(Boolean))];return t.length?`provenance: ${t.slice(0,2).join("; ")}${t.length>2?`, +${t.length-2} more source(s)`:""}`:"provenance: memory/corpus facts"}function Ei(e,t){let n=ne(t),s=e.filter(a=>tm.has(a.predicate)&&a.object===n);if(!s.length)return null;let o=[...new Set(s.map(a=>a.subject))].sort(),i=o.slice(0,Fs),r=o.length>Fs?`
114
+ \u2026+${o.length-Fs} more`:"";return`"${t}" is not a code-map entity \u2014 answering from memory/corpus facts. ${o.length} known subclass(es):
115
+ ${i.join(`
116
+ `)}${r}
117
+ (${nm(s)})`}function ji(e,t){let n=ne(t),s=e.filter(a=>tm.has(a.predicate)&&(a.subject===n||a.object===n));if(!s.length)return null;let o=[...new Set(s.filter(a=>a.subject===n).map(a=>a.object))],i=[...new Set(s.filter(a=>a.object===n).map(a=>a.subject))].sort(),r=[`"${t}" is not a code-map entity \u2014 answering from memory/corpus facts.`];if(o.length&&r.push(`is a: ${o.slice(0,Fs).join(", ")}`),i.length){let a=i.length>Fs?`, +${i.length-Fs} more`:"";r.push(`known subclasses (${i.length}): ${i.slice(0,Fs).join(", ")}${a}`)}return r.push(`(${nm(s)})`),r.join(`
118
+ `)}var tm,Fs,xo=L(()=>{De();Ge();tm=new Set(["rdfs:subClassOf","rdf:type"]),Fs=40});async function sm(e,{graph:t,svc:n,config:s}){let o=ot(e,"symbol"),{match:i,candidates:r}=Vt(n.graph,o);if(i)return wa(t,i,{candidates:r});let a=ji(await kn(s),o);if(a)return a;yt(n,o,"symbol")}var om=L(()=>{Ce();xo();Ke()});async function rm(e,{graph:t,svc:n,repoRoot:s}){let o=ot(e,"symbol"),{match:i,candidates:r}=yt(n,o,"symbol"),a=$t(i);if(!a)throw new Oe(`"${i.label}" (${i.class||"Entity"}) has no source span in the graph \u2014 it is likely a module. Use tmct_describe for its contents, then tmct_snippet one of the functions/classes it defines.`);let l;try{l=await Mn({readFile:ze,repoRoot:s,path:a.path,start:a.start,end:a.end,maxLines:tr})}catch(h){throw h instanceof Oe?h:new Oe(`could not read ${a.path} (${h?.code||h?.message||h})`)}let{text:c,truncated:u}=l,d=a.end>a.start?`${a.start}-${a.end}`:`${a.start}`,m=`${i.label} \u2014 ${i.class||"Entity"} @ ${a.path}:${d}`,p=u?`
119
+ \u2026 (truncated to ${tr} lines; full span ${d})`:"",f=r.length?`
120
+ (other matches: ${r.map(h=>h.label).join(", ")})`:"",g=$a(t,i);return`${m}
121
121
  ${c}${p}${g?`
122
- ${g}`:""}${f}`}var Kf=L(()=>{yt();Lt();Hr();Ce();He()});var Yf,Xf=L(()=>{Ce();He();Yf=Je(Hu)});function Jf(e,{graph:t,svc:n}){let{match:s}=wt(n,ot(e,"module"),"module");return Mu(t,s)}var Qf=L(()=>{Ce();He()});async function Zf(e,{graph:t,config:n}){let s=String(e?.query||"").trim(),o=String(e?.kind||"").trim();if(!s&&!o)throw new Le("query is required");let r=Gu(t,s,{kind:o,decorator:String(e?.decorator||"").trim(),name:String(e?.name||"").trim()});if(!o&&/^no module matches/.test(r)){let i=vi(await kn(n),s);if(i)return i}return r}var em=L(()=>{Lt();Ce();vo()});async function tm(e,{graph:t,svc:n,config:s}){let o=ot(e,"class"),{match:r}=qt(n.graph,o);if(r)return Vu(t,r);let i=yi(await kn(s),o);if(i)return i;wt(n,o,"class")}var nm=L(()=>{Ce();vo();He()});async function sm(e,{graph:t,svc:n,config:s}){let o=ot(e,"class"),{match:r}=qt(n.graph,o);if(r)return Ku(t,r);let i=yi(await kn(s),o);if(i)return i;wt(n,o,"class")}var om=L(()=>{Ce();vo();He()});function $k(e,{conceptBase:t="concept:",relationMap:n=vk}={}){let s=new Set(n.synonym||[]),o=new Set(n.related||[]),r=new Map,i=h=>{r.has(h)||r.set(h,h)},a=h=>{let b=h;for(;r.get(b)!==b;)b=r.get(b);for(;r.get(h)!==b;){let y=r.get(h);r.set(h,b),h=y}return b},l=(h,b)=>{let y=a(h),w=a(b);y!==w&&(y<w?r.set(w,y):r.set(y,w))},c=[];for(let h of e){let b=h.predicate;if(!s.has(b)&&!o.has(b))continue;let y=ee(h.subject),w=ee(h.object);!y||!w||(i(y),i(w),s.has(b)?l(y,w):c.push({s:y,o:w}))}let u=h=>t+h.replace(/ /g,"_"),d=new Map;for(let h of r.keys()){let b=a(h);d.has(b)||d.set(b,new Set),d.get(b).add(h)}let m=[];for(let[h,b]of d){let y=[...b].sort();m.push({id:u(h),prefLabel:h,altLabels:y.filter(w=>w!==h)})}m.sort((h,b)=>h.id<b.id?-1:h.id>b.id?1:0);let p=new Set,f=[];for(let{s:h,o:b}of c){let y=u(a(h)),w=u(a(b));if(y===w)continue;let v=y<w?`${y}\0${w}`:`${w}\0${y}`;p.has(v)||(p.add(v),f.push({subject:y,object:w}))}return f.sort((h,b)=>`${h.subject}${h.object}`<`${b.subject}${b.object}`?-1:1),{concepts:m,related:f,conceptIdForTerm:h=>{let b=ee(h);return r.has(b)?u(a(b)):null},namespace:yk}}function zc(e,t,n={}){let s=$k(e,n),o=s.conceptIdForTerm(t);if(!o)return null;let r=new Map(s.concepts.map(u=>[u.id,u])),i=r.get(o),a=ee(t),l=[i.prefLabel,...i.altLabels].filter(u=>u!==a),c=s.related.filter(u=>u.subject===o||u.object===o).map(u=>r.get(u.subject===o?u.object:u.subject)).filter(Boolean);return{conceptId:o,prefLabel:i.prefLabel,altLabels:i.altLabels,synonyms:l,related:c}}var yk,vk,Uc=L(()=>{cn();yk="http://www.w3.org/2004/02/skos/core#",vk={synonym:["mgx:synonym"],related:["mgx:relatedTo","mgx:similarTo"]}});async function Bc(e,{config:t}){let n=ot(e,"term"),s=zc(await kn(t),n);if(!s)throw new Le(`no synonym or related facts for "${n}" in the memory graph. This view answers where the store holds mgx:synonym / mgx:relatedTo facts (a corpus import seeds them).`);let o=[`${s.prefLabel} [${s.conceptId}]`];return s.synonyms.length&&o.push(`synonyms (skos:altLabel): ${s.synonyms.join(", ")}`),s.related.length&&o.push(`related (skos:related): ${s.related.map(r=>r.prefLabel).join(", ")}`),o.push("(from the memory graph's mgx:synonym / mgx:relatedTo / mgx:similarTo facts)"),o.join(`
123
- `)}var rm=L(()=>{Lt();Uc();vo();He();Bc.ownsGraphLoad=!0});function im(e,{graph:t}){return Yu(t,{pkg:String(e?.package||"").trim()})}var am=L(()=>{Ce()});function cm(e,{graph:t,svc:n}){let{match:s}=wt(n,ot(e,"module"),"module");return gd(t,s)}var lm=L(()=>{Ce();He()});function um(e,{graph:t}){return Qu(t)}var dm=L(()=>{Ce()});function pm(e,{graph:t}){let{content:n,tmct_ask:s}=ts(t,ot(e,"query"));return`${n}
122
+ ${g}`:""}${f}`}var im=L(()=>{vt();Lt();Zr();Ce();Ke()});var am,cm=L(()=>{Ce();Ke();am=Je(rd)});function lm(e,{graph:t,svc:n}){let{match:s}=yt(n,ot(e,"module"),"module");return Ku(t,s)}var um=L(()=>{Ce();Ke()});async function dm(e,{graph:t,config:n}){let s=String(e?.query||"").trim(),o=String(e?.kind||"").trim();if(!s&&!o)throw new Oe("query is required");let i=sd(t,s,{kind:o,decorator:String(e?.decorator||"").trim(),name:String(e?.name||"").trim()});if(!o&&/^no module matches/.test(i)){let r=ji(await kn(n),s);if(r)return r}return i}var pm=L(()=>{Lt();Ce();xo()});async function fm(e,{graph:t,svc:n,config:s}){let o=ot(e,"class"),{match:i}=Vt(n.graph,o);if(i)return od(t,i);let r=Ei(await kn(s),o);if(r)return r;yt(n,o,"class")}var mm=L(()=>{Ce();xo();Ke()});async function hm(e,{graph:t,svc:n,config:s}){let o=ot(e,"class"),{match:i}=Vt(n.graph,o);if(i)return id(t,i);let r=Ei(await kn(s),o);if(r)return r;yt(n,o,"class")}var gm=L(()=>{Ce();xo();Ke()});function Gk(e,{conceptBase:t="concept:",relationMap:n=qk}={}){let s=new Set(n.synonym||[]),o=new Set(n.related||[]),i=new Map,r=h=>{i.has(h)||i.set(h,h)},a=h=>{let b=h;for(;i.get(b)!==b;)b=i.get(b);for(;i.get(h)!==b;){let w=i.get(h);i.set(h,b),h=w}return b},l=(h,b)=>{let w=a(h),v=a(b);w!==v&&(w<v?i.set(v,w):i.set(w,v))},c=[];for(let h of e){let b=h.predicate;if(!s.has(b)&&!o.has(b))continue;let w=ne(h.subject),v=ne(h.object);!w||!v||(r(w),r(v),s.has(b)?l(w,v):c.push({s:w,o:v}))}let u=h=>t+h.replace(/ /g,"_"),d=new Map;for(let h of i.keys()){let b=a(h);d.has(b)||d.set(b,new Set),d.get(b).add(h)}let m=[];for(let[h,b]of d){let w=[...b].sort();m.push({id:u(h),prefLabel:h,altLabels:w.filter(v=>v!==h)})}m.sort((h,b)=>h.id<b.id?-1:h.id>b.id?1:0);let p=new Set,f=[];for(let{s:h,o:b}of c){let w=u(a(h)),v=u(a(b));if(w===v)continue;let $=w<v?`${w}\0${v}`:`${v}\0${w}`;p.has($)||(p.add($),f.push({subject:w,object:v}))}return f.sort((h,b)=>`${h.subject}${h.object}`<`${b.subject}${b.object}`?-1:1),{concepts:m,related:f,conceptIdForTerm:h=>{let b=ne(h);return i.has(b)?u(a(b)):null},namespace:Wk}}function Zc(e,t,n={}){let s=Gk(e,n),o=s.conceptIdForTerm(t);if(!o)return null;let i=new Map(s.concepts.map(u=>[u.id,u])),r=i.get(o),a=ne(t),l=[r.prefLabel,...r.altLabels].filter(u=>u!==a),c=s.related.filter(u=>u.subject===o||u.object===o).map(u=>i.get(u.subject===o?u.object:u.subject)).filter(Boolean);return{conceptId:o,prefLabel:r.prefLabel,altLabels:r.altLabels,synonyms:l,related:c}}var Wk,qk,el=L(()=>{cn();Wk="http://www.w3.org/2004/02/skos/core#",qk={synonym:["mgx:synonym"],related:["mgx:relatedTo","mgx:similarTo"]}});async function tl(e,{config:t}){let n=ot(e,"term"),s=Zc(await kn(t),n);if(!s)throw new Oe(`no synonym or related facts for "${n}" in the memory graph. This view answers where the store holds mgx:synonym / mgx:relatedTo facts (a corpus import seeds them).`);let o=[`${s.prefLabel} [${s.conceptId}]`];return s.synonyms.length&&o.push(`synonyms (skos:altLabel): ${s.synonyms.join(", ")}`),s.related.length&&o.push(`related (skos:related): ${s.related.map(i=>i.prefLabel).join(", ")}`),o.push("(from the memory graph's mgx:synonym / mgx:relatedTo / mgx:similarTo facts)"),o.join(`
123
+ `)}var bm=L(()=>{Lt();el();xo();Ke();tl.ownsGraphLoad=!0});function wm(e,{graph:t}){return ad(t,{pkg:String(e?.package||"").trim()})}var ym=L(()=>{Ce()});function vm(e,{graph:t,svc:n}){let{match:s}=yt(n,ot(e,"module"),"module");return Rd(t,s)}var $m=L(()=>{Ce();Ke()});function xm(e,{graph:t}){return ud(t)}var km=L(()=>{Ce()});function Sm(e,{graph:t}){let{content:n,tmct_ask:s}=ns(t,ot(e,"query"));return`${n}
124
124
 
125
125
  ---tmct_ask---
126
- ${JSON.stringify(s,null,2)}`}var fm=L(()=>{Lt();ns();He()});var mm,hm=L(()=>{Ce();He();mm=Je(Ju)});var gm,bm=L(()=>{Ce();He();gm=Je(Zu)});var wm,ym=L(()=>{Ce();He();wm=Je(id)});var vm,$m=L(()=>{Ce();He();vm=Je(cd)});var xm,km=L(()=>{Ce();He();xm=Je(ld)});var Em,Sm=L(()=>{Ce();He();Em=Je(td)});var jm,_m=L(()=>{Ce();He();jm=Je(nd)});var Rm,Am=L(()=>{Ce();He();Rm=Je(od)});var Tm,Cm=L(()=>{Ce();He();Tm=Je(hd)});function xk(e){let t={subject:e.subject,predicate:e.predicate,object:e.object,provenance:e.provenance||""};return e.quantifier&&(t.quantifier=e.quantifier),t}function kk(e){let t=(e||[]).map(xk);return t.map(n=>JSON.stringify(n)).join(`
126
+ ${JSON.stringify(s,null,2)}`}var Em=L(()=>{Lt();ss();Ke()});var jm,_m=L(()=>{Ce();Ke();jm=Je(ld)});var Rm,Am=L(()=>{Ce();Ke();Rm=Je(dd)});var Tm,Cm=L(()=>{Ce();Ke();Tm=Je(wd)});var Im,Om=L(()=>{Ce();Ke();Im=Je(vd)});var Lm,Nm=L(()=>{Ce();Ke();Lm=Je($d)});var Mm,Pm=L(()=>{Ce();Ke();Mm=Je(fd)});var Fm,Dm=L(()=>{Ce();Ke();Fm=Je(md)});var zm,Bm=L(()=>{Ce();Ke();zm=Je(gd)});var Um,Wm=L(()=>{Ce();Ke();Um=Je(_d)});function Vk(e){let t={subject:e.subject,predicate:e.predicate,object:e.object,provenance:e.provenance||""};return e.quantifier&&(t.quantifier=e.quantifier),t}function Hk(e){let t=(e||[]).map(Vk);return t.map(n=>JSON.stringify(n)).join(`
127
127
  `)+(t.length?`
128
- `:"")}function Im(e){return kk(en(e))}var Om=L(()=>{Ke()});async function Wc(e,{config:t}){let{dir:n,close:s}=await is($e($e(t.graphFile)));try{return Im(await Zt(n))||"(the memory store holds no facts to export)"}finally{await s()}}var Lm=L(()=>{Om();De();Ke();Wc.ownsGraphLoad=!0});async function qc(e,{config:t,ingest:n}){let s=String(e?.text??"");if(!s.trim())return"(nothing to ingest \u2014 pass some text)";if(typeof n!="function")return"(ingest isn't wired into this context \u2014 invoke tmct_ingest through the CLI `cli` route or the chat surface)";let o=e?.optimistic===!0,{dir:r,close:i}=await is($e($e(t.graphFile)));try{let a=await n(s,{memoryDir:r,config:t,sourceTag:"tool",optimistic:o,canonical:!0}),l=a.extracted.length+a.optimistic.length,c=`${a.sentences} sentence(s), ${a.recognized} recognized`+(o?`, ${a.optimistic.length} optimistic candidate(s)`:"")+`, ${a.skipped} skipped \u2014 ${l} fact(s) grounded.`;return l?`${c}
128
+ `:"")}function qm(e){return Hk(Dt(e))}var Gm=L(()=>{Ge()});async function nl(e,{config:t}){let{dir:n,close:s}=await as($e($e(t.graphFile)));try{return qm(await tn(n))||"(the memory store holds no facts to export)"}finally{await s()}}var Vm=L(()=>{Gm();De();Ge();nl.ownsGraphLoad=!0});async function sl(e,{config:t,ingest:n}){let s=String(e?.text??"");if(!s.trim())return"(nothing to ingest \u2014 pass some text)";if(typeof n!="function")return"(ingest isn't wired into this context \u2014 invoke tmct_ingest through the CLI `cli` route or the chat surface)";let o=e?.optimistic===!0,{dir:i,close:r}=await as($e($e(t.graphFile)));try{let a=await n(s,{memoryDir:i,config:t,sourceTag:"tool",optimistic:o,canonical:!0}),l=a.extracted.length+a.optimistic.length,c=`${a.sentences} sentence(s), ${a.recognized} recognized`+(o?`, ${a.optimistic.length} optimistic candidate(s)`:"")+`, ${a.skipped} skipped \u2014 ${l} fact(s) grounded.`;return l?`${c}
129
129
  ${a.canonical.join(`
130
- `)}`:c}finally{await i()}}var Nm=L(()=>{De();Ke();qc.ownsGraphLoad=!0});var Ek,Mm=L(()=>{Ka();Up();Vf();Kf();Xf();Qf();em();nm();om();rm();am();lm();dm();fm();hm();bm();ym();$m();km();Sm();_m();Am();Cm();Lm();Nm();Ek=Object.freeze({tmct_context:Ha,tmct_context_more:zp,tmct_describe:Gf,tmct_snippet:Hf,tmct_signature:Yf,tmct_impact:Jf,tmct_search:Zf,tmct_members:tm,tmct_subclasses:sm,tmct_related:Bc,tmct_architecture:im,tmct_exports:cm,tmct_untested:um,tmct_ask:pm,tmct_tests_for:mm,tmct_history:gm,tmct_file_history:wm,tmct_method_history:vm,tmct_class_history:xm,tmct_callers:Em,tmct_callees:jm,tmct_calls:Rm,tmct_cochanges:Tm,tmct_export:Wc,tmct_ingest:qc})});var $i,Gc=L(()=>{$i=()=>{}});var Vc=L(()=>{});var xi,Hc=L(()=>{xi=()=>({relations:[],constructions:[]})});var Pm,Fm=L(()=>{yt();De();iu();Lt();Mo();ns();Xr();Jr();Mm();qo();Gc();Vc();Hc();Jr();Ka();zr(void 0);$i(xi);Pm=ru.map(({name:e,agentDescription:t,inputSchema:n})=>({name:e,description:t,inputSchema:n}))});var BC,WC,qC,Yc=L(()=>{BC=Object.freeze(["entity","set","event","measure"]),WC=Object.freeze(["date","count","op","pivot","metric","kind","provenance"]),qC=Object.freeze({it:Object.freeze(["entity","event","measure"]),this:Object.freeze(["entity","event","measure"]),that:Object.freeze(["entity","event","measure"]),"this one":Object.freeze(["entity","event","measure"]),"that one":Object.freeze(["entity","event","measure"]),those:Object.freeze(["set"]),them:Object.freeze(["set"]),these:Object.freeze(["set"]),here:Object.freeze(["entity"])})});var it,VC,HC,KC,YC,XC,JC,QC,ZC,eI,tI,nI,sI,oI,rI,iI,aI,Sk,cI,lI,Dm=L(()=>{it=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},VC=it("createRequire"),HC=it("readFileSync"),KC=it("access"),YC=it("readFile"),XC=it("writeFile"),JC=it("appendFile"),QC=it("mkdir"),ZC=it("mkdtemp"),eI=it("rename"),tI=it("unlink"),nI=it("rm"),sI=it("stat"),oI=it("copyFile"),rI=it("readdir"),iI=it("createReadStream"),aI=it("createWriteStream"),Sk=it("randomBytes"),cI=it("spawnSync"),lI=it("createInterface")});var ki=L(()=>{Dm()});var at,fI,mI,hI,gI,bI,wI,yI,vI,$I,xI,kI,EI,SI,jI,_I,RI,Dt,AI,TI,CI,cs=L(()=>{at=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},fI=at("createRequire"),mI=at("readFileSync"),hI=at("access"),gI=at("readFile"),bI=at("writeFile"),wI=at("appendFile"),yI=at("mkdir"),vI=at("mkdtemp"),$I=at("rename"),xI=at("unlink"),kI=at("rm"),EI=at("stat"),SI=at("copyFile"),jI=at("readdir"),_I=at("createReadStream"),RI=at("createWriteStream"),Dt=e=>String(e),AI=at("randomBytes"),TI=at("spawnSync"),CI=at("createInterface")});var jk,zm,MI,PI,FI,Xc=L(()=>{yt();cs();De();jk={},zm=Z($e(Dt(jk.url)),"..","..",".."),MI=Z(zm,"data","templates","responses.jsonl"),PI=Z(zm,"data","phrasebook","software-phrases.txt"),FI=Object.freeze(new Set(["subject","count","noun","scope","comparison","metric","unit","superlative","provenance"]))});function Rk(e,t={}){let n=_k.exec(String(e||""));if(!n)return 1;let s=t?.[n[1]];return typeof s=="number"&&Number.isFinite(s)?s:1}function Ak(e,t={}){let n=Array.isArray(e?.sourceIds)?e.sourceIds:[];return n.length?Math.max(...n.map(s=>Rk(s,t))):1}function Ye(e,t={}){return(Array.isArray(e)?e:[]).map((s,o)=>({row:s,index:o,bias:Ak(s,t)})).sort((s,o)=>o.bias-s.bias||(o.row?.trust??0)-(s.row?.trust??0)||s.index-o.index).map(s=>s.row)}var _k,Um=L(()=>{_k=/^src:corpus:(.+)$/});var ct,UI,$o,BI,WI,qI,GI,VI,HI,KI,YI,XI,JI,QI,ZI,Tk,Ck,eO,tO,nO,Fs=L(()=>{ct=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},UI=ct("createRequire"),$o=ct("readFileSync"),BI=ct("access"),WI=ct("readFile"),qI=ct("writeFile"),GI=ct("appendFile"),VI=ct("mkdir"),HI=ct("mkdtemp"),KI=ct("rename"),YI=ct("unlink"),XI=ct("rm"),JI=ct("stat"),QI=ct("copyFile"),ZI=ct("readdir"),Tk=ct("createReadStream"),Ck=ct("createWriteStream"),eO=ct("randomBytes"),tO=ct("spawnSync"),nO=ct("createInterface")});function Bm(e,t){let n=String(e).toLowerCase().replace(/^[^a-z]+/,"");if(!n)return null;for(let o of t.vowel_sound_consonants||[])if(n.startsWith(o))return!0;for(let o of t.consonant_sound_vowels||[])if(n.startsWith(o))return!1;let s=n[0];return"aeiou".includes(s)?!0:/[a-z]/.test(s)?!1:null}function Nk(e=Ok){let t=ho($o(e,"utf8"));return Array.isArray(t.rule)?t.rule:[]}function Jc(){if(Ei===null)try{Ei=Nk()}catch{Ei=[]}return Ei}var Mk,Ik,Ok,Lk,uO,Ei,Qc=L(()=>{Fs();cs();De();ai();Xc();Mk={},Ik=$e(Dt(Mk.url)),Ok=Z(Ik,"..","..","data","templates","grammar-rules.toml"),Lk=Object.freeze(["prose","entity","path","number","code","provenance","receipt"]),uO=Object.freeze(new Set(Lk.filter(e=>e!=="prose")));Ei=null});var lt,Wm,pO,fO,mO,hO,gO,bO,wO,yO,vO,$O,xO,kO,EO,SO,jO,_O,RO,AO,qm=L(()=>{lt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},Wm=lt("createRequire"),pO=lt("readFileSync"),fO=lt("access"),mO=lt("readFile"),hO=lt("writeFile"),gO=lt("appendFile"),bO=lt("mkdir"),wO=lt("mkdtemp"),yO=lt("rename"),vO=lt("unlink"),$O=lt("rm"),xO=lt("stat"),kO=lt("copyFile"),EO=lt("readdir"),SO=lt("createReadStream"),jO=lt("createWriteStream"),_O=lt("randomBytes"),RO=lt("spawnSync"),AO=lt("createInterface")});function Pk(){if(mr!==void 0)return mr;try{let e=Gm?Gm():Fk();mr=e&&e.winkNLP&&e.model?e:null}catch{mr=null}return mr}function Fk(){let e=Wm(Dk.url);return{winkNLP:e("wink-nlp"),model:e("wink-eng-lite-web-model")}}function Zc(){if(xo!==void 0)return xo;let e=Pk();if(!e)return xo=null,null;try{xo=e.winkNLP(e.model)}catch{xo=null}return xo}var Dk,Gm,mr,xo,el=L(()=>{qm();Dk={}});var Vm=L(()=>{el()});var Km,Hm=L(()=>{Km={comment:"tmct's starter lexicon, now covering BOTH the original software domain and the default 'human-world' persona's everyday people/places/objects/nature/time/body/mind vocabulary. Every word the ACE-OWL sub-fragment parser (src/domain/grammar/ace.mjs) is allowed to understand is DECLARED here \u2014 tmct never guesses a word's category. Nouns may declare a possessive property typing ('data' or 'object', pattern 7) or an irregular 'plural' (WordNet-sourced human nouns like 'man'/'child' need this \u2014 the morphology fold only handles regular -s/-ies/-es endings); adjectives MUST declare a type ('subclass' forms a class, 'data' asserts a boolean-ish datatype property, pattern 8); verbs may declare a preposition ('depend' + 'on' \u2192 dependsOn). The human-domain additions are flat and simple (breadth over depth \u2014 no gender/kinship taxonomy, no formal role hierarchy), matching corpus/tier2/generate.mjs's CORPUSES.human.lexicon sub-key, which --verify drift-checks against. Extend via loadLexicon(extra) with this same shape.",nouns:{module:{},class:{},function:{},method:{},attribute:{},variable:{},constant:{},test:{},suite:{},service:{},repository:{},branch:{},commit:{},tag:{},release:{},package:{},library:{},framework:{},api:{},endpoint:{},route:{},handler:{},controller:{},model:{},view:{},template:{},component:{},interface:{},type:{},category:{},kind:{},artifact:{},routine:{},part:{},helper:{},operation:{},change:{},schema:{},database:{},table:{},query:{},index:{plural:"indices"},cache:{},queue:{},worker:{},job:{},task:{},bug:{},defect:{},issue:{},ticket:{},feature:{},requirement:{},specification:{},document:{},developer:{},engineer:{},user:{},visitor:{},team:{},project:{},codebase:{},file:{},directory:{},folder:{},line:{},symbol:{},identifier:{},comment:{},docstring:{},string:{},number:{},list:{},array:{},graph:{},node:{},edge:{},triple:{},fact:{},ontology:{},lexicon:{},grammar:{},sentence:{},utterance:{},session:{},response:{},request:{},question:{},answer:{},error:{},exception:{},warning:{},log:{},metric:{},benchmark:{},pipeline:{},build:{},deployment:{},environment:{},config:{},configuration:{},setting:{},option:{},flag:{},argument:{},parameter:{},value:{},result:{},output:{},input:{},server:{},client:{},protocol:{},message:{},event:{},hook:{},plugin:{},script:{},tool:{},command:{},prompt:{},token:{},parser:{},compiler:{},linter:{},formatter:{},runtime:{},process:{},thread:{},loop:{},statement:{},expression:{},keyword:{},scope:{},callback:{},promise:{},iterator:{},generator:{},unit:{},risk:{},prototype:{},milestone:{},sprint:{},backlog:{},roadmap:{},phase:{},pattern:{},smell:{},coverage:{},mock:{},stub:{},fixture:{},assertion:{},snapshot:{},regression:{},migration:{},refactor:{},review:{},merge:{},license:{property:"data"},version:{property:"data"},name:{property:"data"},path:{property:"data"},size:{property:"data"},status:{property:"data"},language:{property:"data"},extension:{property:"data"},churn:{property:"data"},impact:{property:"data"},complexity:{property:"data"},latency:{property:"data"},duration:{property:"data"},frequency:{property:"data"},severity:{property:"data"},owner:{property:"object"},maintainer:{property:"object"},author:{property:"object"},reviewer:{property:"object"},parent:{property:"object"},dependency:{property:"object"},man:{plural:"men"},woman:{plural:"women"},person:{plural:"people"},child:{plural:"children"},boy:{},girl:{},baby:{},adult:{},friend:{},neighbor:{},stranger:{},guest:{},doctor:{},teacher:{},nurse:{},student:{},farmer:{},mother:{},father:{},brother:{},sister:{},family:{},king:{},queen:{},soldier:{},artist:{},writer:{},cook:{},group:{},crowd:{},audience:{},club:{},president:{},human:{},lawyer:{},driver:{},manager:{},officer:{},judge:{},priest:{},servant:{},butler:{},housekeeper:{},gardener:{},employee:{},boss:{},husband:{},wife:{plural:"wives"},son:{},daughter:{},grandmother:{},grandfather:{},citizen:{},customer:{},leader:{},champion:{},volunteer:{},resident:{},place:{},city:{},town:{},village:{},country:{},house:{},home:{},room:{},kitchen:{},bedroom:{},bathroom:{},school:{},hospital:{},shop:{},market:{},church:{},park:{},garden:{},street:{},road:{},bridge:{},farm:{},office:{},factory:{},museum:{},hotel:{},airport:{},castle:{},beach:{},forest:{},mountain:{},hat:{},shirt:{},coat:{},shoe:{},dress:{},clothing:{},chair:{},desk:{},lamp:{},portrait:{},bed:{},door:{},window:{},wall:{},roof:{},pen:{},paper:{},key:{},lock:{},box:{},car:{},bicycle:{},boat:{},train:{},wheel:{},knife:{plural:"knives"},spoon:{},fork:{},plate:{},cup:{},bottle:{},bag:{},money:{},coin:{},toy:{},machine:{},clock:{},phone:{},book:{},letter:{},umbrella:{},glove:{},sock:{},ring:{},watch:{},mirror:{},candle:{},ladder:{},hammer:{},basket:{},wallet:{},dog:{},cat:{},horse:{},cow:{},pig:{},sheep:{},bird:{},fish:{},mouse:{plural:"mice"},rabbit:{},bear:{},lion:{},tiger:{},elephant:{},snake:{},tree:{},flower:{},grass:{},leaf:{plural:"leaves"},root:{},seed:{},fruit:{},water:{},air:{},fire:{},earth:{},stone:{},sand:{},gold:{},iron:{},rain:{},snow:{},wind:{},cloud:{},sun:{},moon:{},star:{},owl:{},wolf:{plural:"wolves"},frog:{},bee:{},ant:{},butterfly:{},spider:{},river:{},ocean:{},time:{},day:{},night:{},morning:{},evening:{},week:{},month:{},year:{},hour:{},minute:{},second:{},moment:{},season:{},spring:{},summer:{},winter:{},wedding:{},race:{},dozen:{},half:{plural:"halves"},amount:{},meeting:{},game:{},war:{},trip:{},birthday:{},holiday:{},autumn:{},century:{},body:{},head:{},hand:{},arm:{},leg:{},foot:{plural:"feet"},eye:{},ear:{},mouth:{},nose:{},hair:{},heart:{},blood:{},bone:{},skin:{},face:{},food:{},bread:{},meat:{},milk:{},egg:{},cheese:{},vegetable:{},meal:{},breakfast:{},dinner:{},drink:{},wine:{},tea:{},coffee:{},tongue:{},tooth:{plural:"teeth"},finger:{},toe:{},shoulder:{},knee:{},brain:{},lung:{},sugar:{},salt:{},word:{},story:{},news:{},idea:{},thought:{},mind:{},memory:{},dream:{},belief:{},love:{},hate:{},fear:{},joy:{},anger:{},hope:{},surprise:{},pride:{},song:{},music:{},sound:{},voice:{},picture:{},art:{},knowledge:{},opinion:{},reason:{},imagination:{},laughter:{},tear:{},smile:{},silence:{},object:{},location:{},quantity:{},organization:{},animal:{},plant:{},furniture:{},vehicle:{},insect:{},emotion:{},metal:{},liquid:{},weather:{},planet:{},jewelry:{},cutlery:{},government:{},material:{},draw:{},set:{},heavy:{},stand:{},free:{},pack:{},dead:{},pick:{},double:{},straight:{},cast:{},dry:{},bank:{},stamp:{},tender:{},fair:{},active:{},regular:{},blue:{},hack:{},band:{},brush:{},guard:{},master:{},transfer:{},firm:{},side:{},bull:{},mate:{},rank:{},board:{},brace:{},grade:{},better:{},course:{},natural:{},butt:{},camp:{},crop:{},date:{},fold:{},help:{},hunt:{},count:{},court:{},crush:{},major:{},march:{},tease:{},tough:{},flight:{},forward:{},division:{},commission:{},jam:{},rat:{},gray:{},hood:{},jerk:{},miss:{},pile:{},pool:{},rear:{},whip:{},bench:{},chain:{},cycle:{},grind:{},guide:{},stiff:{},troll:{},union:{},circle:{},carrier:{},defence:{},defense:{},radical:{},reserve:{},intimate:{},opposite:{},superior:{},grey:{},host:{},knot:{},left:{},lost:{},blind:{},crank:{},panel:{},rally:{},state:{},tramp:{},waver:{},clutch:{},living:{},runner:{},steady:{},stream:{},combine:{},company:{},convert:{},general:{},moderate:{},alternate:{},ace:{},crab:{},flop:{},fund:{},pair:{},rake:{},rock:{},sick:{},blade:{},cheat:{},sport:{},caller:{},column:{},couple:{},divine:{},pledge:{},simple:{},sponge:{},system:{},wanton:{},sleeper:{},business:{},associate:{},instrument:{},substitute:{},gun:{},sum:{},alto:{},best:{},buff:{},dear:{},mass:{},cream:{},creep:{},giant:{},labor:{},pilot:{},sneak:{},stack:{},staff:{},world:{},gutter:{},jumper:{},labour:{},lather:{},picket:{},reader:{},savage:{},captain:{},culture:{},monitor:{},neutral:{},unknown:{},utility:{},inferior:{},initiate:{},innocent:{},national:{},transpose:{},association:{},professional:{},bum:{},fan:{},law:{},deck:{},fool:{},join:{},kink:{},page:{},pink:{},stud:{},twin:{},clump:{},coach:{},dance:{},drone:{},extra:{},feast:{},fence:{},fleet:{},flock:{},ghost:{},clear:{},right:{},open:{},beat:{},back:{},block:{},see:{},keep:{},square:{},pitch:{},center:{},centre:{},top:{},post:{},field:{},spot:{},bar:{},end:{},frame:{},rough:{},address:{},quarter:{},position:{},land:{},bound:{},range:{},seat:{},dark:{},rail:{},cross:{},section:{},tip:{},plug:{},port:{},stall:{},corner:{},outside:{},dig:{},way:{},front:{},joint:{},patch:{},reach:{},thick:{},medium:{plural:"media"},dock:{},ruin:{},tack:{},floor:{},bottom:{},puddle:{},compound:{},retreat:{},mat:{},belt:{},dump:{},scene:{},space:{},border:{},common:{},cradle:{},inside:{},surface:{},lie:{},boot:{},clog:{},coil:{},nest:{},wire:{},yard:{},forge:{},limit:{},lodge:{},buffer:{},middle:{},capital:{},overhead:{},preserve:{},terminal:{},direction:{},hall:{},loft:{},plot:{},tape:{},grate:{},stoop:{},fringe:{},circuit:{},distance:{},derivation:{},bent:{},gate:{},mill:{},safe:{},sail:{},hedge:{},paint:{},parcel:{},sphere:{},bearing:{},profile:{},shelter:{},crossing:{},interior:{},reservation:{},area:{},bush:{},cork:{},dive:{},limb:{},raft:{},shed:{},zone:{},chase:{},cut:{},light:{},charge:{},check:{},work:{},stock:{},stick:{},flat:{},crack:{},press:{},settle:{},spread:{},wash:{},well:{},swing:{},fly:{},tap:{},stretch:{},shot:{},black:{},strip:{},separate:{},tie:{},rack:{},match:{},piece:{},shell:{},still:{},present:{},trim:{},spike:{},split:{},white:{},yield:{},squeeze:{},bolt:{},fret:{},choke:{},float:{},track:{},low:{},crown:{},screen:{},die:{plural:"dice"},pin:{},chip:{},mold:{},seal:{},draft:{},shade:{},shaft:{},stuff:{},switch:{},balance:{},reverse:{},subject:{},approach:{},beam:{},bill:{},card:{},link:{},sack:{},sink:{},trap:{},spare:{},credit:{},counter:{},express:{},positive:{},net:{},pay:{},ball:{},bond:{},bowl:{},horn:{},pole:{},wing:{},glass:{},grant:{},smack:{},collar:{},record:{},ruffle:{},silver:{},negative:{},cap:{},lap:{},pad:{},rag:{},rig:{},bend:{},clip:{},fine:{},flap:{},heel:{},pall:{},pump:{},gauge:{},image:{},plain:{},print:{},slick:{},spoil:{},clinch:{},gather:{},offset:{},pocket:{},relief:{},channel:{},whistle:{},irregular:{},transport:{},bat:{},ice:{},peg:{},pot:{},bust:{},grip:{},hole:{},nail:{},poke:{},slug:{},spat:{},stem:{},suit:{},yoke:{},flood:{},grand:{},gross:{},perch:{},slip:{},down:{},shoot:{},ground:{},discharge:{},solid:{},kill:{},slack:{},waste:{},rush:{},grain:{},shake:{},pit:{},mould:{},colour:{},render:{},mount:{},cutting:{},fill:{},flux:{},tail:{},plaster:{},swallow:{},concentrate:{},bay:{},gum:{},ray:{},slop:{},spur:{},extract:{},fat:{},hop:{},corn:{},rust:{},smut:{},label:{},stain:{},composition:{},gas:{},pip:{},duck:{},gall:{},lime:{},mint:{},tick:{},stalk:{},whiff:{},cement:{},rubber:{},conjugate:{},preparation:{},dun:{},dust:{},jade:{},mire:{},pulp:{},snag:{},bloom:{},caper:{},crude:{},fluid:{},frost:{},paste:{},rinse:{},steam:{},straw:{},corona:{},poison:{},refuse:{},savory:{},feather:{},ferment:{},organic:{},chestnut:{},mushroom:{},percolate:{},sublimate:{},synthetic:{},suspension:{},precipitate:{},cod:{},pet:{},rod:{},bunt:{},crow:{},hide:{},punk:{},vein:{},assay:{},goose:{plural:"geese"},olive:{},stray:{},trash:{},ginger:{},pepper:{},permit:{},polish:{},sorrel:{},blister:{},bristle:{},complex:{},filling:{},flicker:{},harvest:{},scollop:{},whiting:{},anteater:{},snowball:{},tincture:{},repellent:{},ink:{},lip:{},nag:{},rue:{},wad:{},acid:{},beak:{},bean:{},coal:{},dirt:{},fawn:{},fuel:{},lark:{},ling:{},mash:{},palm:{},pelt:{},plum:{},pony:{},pout:{},soil:{},stag:{},bream:{},brier:{},chalk:{},coral:{},fiber:{},fall:{},pass:{},lift:{},go:{},roll:{},drop:{},blow:{},return:{},strike:{},rise:{},snap:{},shift:{},twist:{},case:{},deal:{},start:{},deep:{},jump:{},step:{},stop:{},pound:{},advance:{},pop:{},flash:{},rest:{},crash:{},score:{},figure:{},leave:{},smash:{},stroke:{},first:{},sweep:{},even:{},flow:{},kick:{},heave:{},trace:{},opening:{},full:{},gain:{},jack:{},spin:{},wave:{},splash:{},bob:{},bang:{},dash:{},flick:{},hitch:{},prime:{},proof:{},passing:{},bit:{},click:{},knock:{},swell:{},trouble:{},collapse:{},movement:{},standard:{},variation:{},rap:{},boom:{},bump:{},clap:{},pace:{},peck:{},zero:{},blaze:{},speed:{},spell:{},treat:{},bounce:{},factor:{},little:{},plunge:{},scrape:{},single:{},ban:{},mix:{},one:{},mesh:{},roar:{},tilt:{},climb:{},flip:{},puff:{},bite:{},feed:{},bitter:{},chop:{},sour:{},special:{},crisp:{},tonic:{},scallop:{},mess:{},quick:{},smear:{},fillet:{},curl:{},malt:{},glaze:{},souse:{},breast:{},humour:{},draught:{},delicacy:{},dressing:{},transplant:{},hip:{},sop:{},kiss:{},mush:{},neck:{},belly:{},frank:{},jumble:{},junket:{},trifle:{},stomach:{},clot:{},shin:{},stew:{},tart:{},cheek:{},graft:{},molar:{},roast:{},spice:{},stout:{},sweat:{},groove:{},region:{},savoury:{},western:{},backbone:{},conserve:{},dominant:{},macerate:{},melancholy:{},cake:{},lens:{},loaf:{plural:"loaves"},menu:{},must:{},peel:{},pore:{},suds:{},butch:{},cling:{},curry:{},drool:{},honey:{},jerky:{},juice:{},mince:{},nasal:{},nerve:{},sauce:{},tract:{},dainty:{},entree:{},facial:{},relish:{},squash:{},brittle:{},caramel:{},cordial:{},fissure:{},oblique:{},adhesion:{},turnover:{},nonpareil:{},posterior:{},vegetation:{},ail:{},orb:{},pap:{},rum:{},brew:{},chew:{},hash:{},lard:{},rump:{},brine:{},dowdy:{},farce:{},flour:{},fudge:{},halal:{},icing:{},lunch:{},play:{},make:{},hold:{},close:{},mark:{},form:{},order:{},support:{},rule:{},sign:{},hang:{},drag:{},feel:{},find:{},shock:{},mean:{},offer:{},study:{},show:{},tone:{},flare:{},attack:{},act:{},life:{plural:"lives"},stay:{},think:{},secret:{},account:{},hurt:{},note:{},taste:{},report:{},measure:{},condition:{},cry:{},focus:{plural:"foci"},style:{},thing:{},title:{},recall:{},average:{},contract:{},dissolve:{},so:{},aim:{},bind:{},heat:{},know:{},stir:{},claim:{},power:{},demand:{},design:{},notice:{},source:{},upgrade:{},resolution:{},bid:{},skim:{},brand:{},curve:{},sight:{},smoke:{},digest:{},regard:{},passage:{},program:{},exposure:{},interest:{},character:{},projection:{},lay:{},curse:{},favor:{},remit:{},sense:{},slash:{},wedge:{},bubble:{},excuse:{},favour:{},invite:{},mantle:{},salute:{},stress:{},survey:{},temper:{},comfort:{},neglect:{},resolve:{},respect:{},torment:{},conflict:{},dispatch:{},standing:{},challenge:{},programme:{},background:{},conclusion:{},impression:{},particular:{},withdrawal:{},cite:{},echo:{},hail:{},rip:{},lot:{},great:{},relay:{},tenor:{},browse:{},bundle:{},chorus:{},cypher:{},fellow:{},litter:{},marine:{},native:{},occult:{},plague:{},rocker:{},scheme:{},series:{plural:"series"},social:{},streak:{},sucker:{},teaser:{},antique:{},battery:{},bracket:{},founder:{},gallery:{},liberal:{},starter:{},turnout:{},witness:{},diagonal:{},familiar:{},ordinary:{},prospect:{},sequence:{},aggregate:{},authority:{},community:{},dependent:{},desperate:{},patronage:{},primitive:{},principal:{},complement:{},engagement:{},foundation:{},generation:{},settlement:{},combination:{},lightweight:{},steamroller:{},subordinate:{},organisation:{},establishment:{},representative:{},con:{},fox:{},kid:{},pod:{},red:{},sex:{},spy:{},vet:{},aged:{},bore:{},diet:{},fare:{},gown:{},hawk:{},heap:{},herd:{},hive:{},lump:{},romp:{},sort:{},agent:{},alien:{},beard:{},brave:{},breed:{},brood:{},canon:{},craft:{},crazy:{},devil:{},dummy:{},equal:{},flake:{},groom:{},mound:{},organ:{},scrub:{},toast:{},troop:{},youth:{},colony:{},copper:{},cutter:{},escort:{},feeder:{},junior:{},maroon:{},matrix:{plural:"matrices"},modern:{},muscle:{},people:{},sector:{},shrink:{},tinker:{},topper:{},booster:{},gallant:{},hostile:{},marshal:{},network:{},nucleus:{plural:"nuclei"},premier:{},scourge:{},secular:{},sitting:{},snapper:{},suspect:{},swagger:{},traffic:{},variant:{},cardinal:{},derelict:{},domestic:{},favorite:{},finisher:{},graduate:{},humanist:{},infernal:{},magazine:{},manifold:{},minister:{},palatine:{},presence:{},receiver:{},relation:{},favourite:{},following:{},goldbrick:{},operative:{},sensitive:{},syndicate:{},complexion:{},mouthpiece:{},withdrawer:{},appointment:{},conjugation:{},constituent:{},heavyweight:{},incompetent:{},independent:{},replacement:{},underground:{},untouchable:{},conservative:{},administration:{},ape:{},gem:{},hob:{},sap:{},van:{},axis:{plural:"axes"},chap:{},char:{},crew:{},cult:{},duet:{},gang:{},hero:{},hire:{},lamb:{},lame:{},mute:{},nude:{},pawn:{},pill:{},sage:{},soul:{},tout:{},trio:{},ward:{},worm:{},bunch:{},crimp:{},dwarf:{},elect:{},flank:{},ideal:{},noble:{},octet:{},quack:{},saint:{},scrag:{},shark:{},shoal:{},silly:{},skunk:{},super:{},witch:{},zombi:{},agency:{},anchor:{},backup:{},batter:{},buster:{},canary:{},circus:{},dealer:{},domain:{},doomed:{},genius:{},gossip:{},herald:{},hoodoo:{},hopper:{},immune:{},jockey:{},legion:{},member:{},nature:{},orphan:{},parade:{},peanut:{},pillar:{},pirate:{},player:{},porter:{},pusher:{},putter:{},senior:{},septet:{},sestet:{},sextet:{},surety:{},tapper:{},tiller:{},zombie:{},adjunct:{},butcher:{},captive:{},cascade:{},chapter:{},charity:{},checker:{},chicane:{},chicken:{},climber:{},cognate:{},consort:{},cracker:{},dresser:{},gentile:{},invalid:{},knocker:{},lineage:{},mission:{},mixture:{},monster:{},offence:{},partner:{},pioneer:{},pitcher:{},quartet:{},quintet:{},recruit:{},referee:{},shooter:{},spoiler:{},sponsor:{},stemmer:{},steward:{},striker:{},terrace:{},alliance:{},castrate:{},designer:{},director:{},ensemble:{},faithful:{},friendly:{},mandarin:{},operator:{},romantic:{},accessory:{},annoyance:{},attendant:{},bourgeois:{},precedent:{},quadruple:{},reception:{},recession:{},religious:{},reprobate:{},satellite:{},selection:{},sensation:{},supporter:{},contingent:{},convention:{},expedition:{},incendiary:{},individual:{},masquerade:{},population:{},sweetheart:{},tubercular:{},confederate:{},cooperative:{},subdivision:{},territorial:{},transcriber:{},intelligence:{},registration:{},sophisticate:{},welterweight:{},revolutionary:{},ex:{},ass:{},cog:{},cub:{},den:{},dud:{},duo:{},ham:{},hog:{},mob:{},pro:{},deaf:{},dove:{},fate:{},five:{},folk:{},gull:{},jinx:{},mime:{},nark:{},nine:{},pest:{},prey:{},quad:{},rash:{},scab:{},sire:{},wisp:{},wood:{},zany:{},armor:{},batch:{},bogey:{},caste:{},chief:{},choir:{},clone:{},divan:{},drunk:{},elder:{},enemy:{},exile:{},faith:{},flirt:{},grunt:{},joker:{},lobby:{},louse:{plural:"lice"},pagan:{},pivot:{},racer:{},rebel:{},scout:{},siren:{},slave:{},swarm:{},timid:{},triad:{},tribe:{},armour:{},bearer:{},censor:{},choker:{},convoy:{},covert:{},damned:{},deputy:{},empire:{},goffer:{},gopher:{},huddle:{},killer:{},league:{},martyr:{},muster:{},mystic:{},outfit:{},packet:{},palace:{},passer:{},patrol:{},potter:{},quarry:{},rigger:{},ringer:{},rustic:{},scribe:{},sitter:{},slider:{},slouch:{},squire:{},squirt:{},stupid:{},summit:{},tailor:{},tenant:{},terror:{},tracer:{},turkey:{},turner:{},venter:{},voider:{},voodoo:{},walker:{},worthy:{},academy:{},agonist:{},amateur:{},ancient:{},banquet:{},cabinet:{},cashier:{},classic:{},commune:{},courser:{},crammer:{},current:{},divider:{},economy:{},edition:{},emperor:{},entrant:{},fireman:{},lookout:{},octette:{},orderly:{},painter:{},pervert:{},plotter:{},plunger:{},roaster:{},sampler:{},scanner:{},sellout:{},skimmer:{},skipper:{},society:{},soprano:{},spastic:{},spotter:{},stratum:{plural:"strata"},trimmer:{},tripper:{},trooper:{},tumbler:{},upstart:{},veteran:{},wheeler:{},academic:{},agnostic:{},aviation:{},backstop:{},baritone:{},calendar:{},casualty:{},colonial:{},divinity:{},fireball:{},homeless:{},huckster:{},marriage:{},militant:{},military:{},ministry:{},modifier:{},partisan:{},pedigree:{},possible:{},recorder:{},regiment:{},renegade:{},repeater:{},revenant:{},septette:{},sextette:{},shepherd:{},stalwart:{},stringer:{},stripper:{},whistler:{},affiliate:{},ascendant:{},bacchanal:{},canvasser:{},cockscomb:{},collector:{},comforter:{},commander:{},companion:{},conductor:{},crossover:{},eccentric:{},executive:{},fledgling:{},franchise:{},freelance:{},incumbent:{},mercenary:{},moderator:{},neighbour:{},newspaper:{},patriarch:{},patrician:{},portfolio:{},quartette:{},quintette:{},repertory:{},secretary:{},segregate:{},spearhead:{},stigmatic:{},summation:{},transient:{},trumpeter:{},voluntary:{},absolutism:{},anthropoid:{},apparition:{},assemblage:{},collective:{},contractor:{},delinquent:{},episcopate:{},exaltation:{},exposition:{},illiterate:{},judicature:{},leadership:{},lieutenant:{},minimalist:{},percussion:{},profligate:{},provincial:{},rendezvous:{},brotherhood:{},determinant:{},distributor:{},interpreter:{},stipendiary:{},analphabetic:{},antediluvian:{},civilisation:{},civilization:{},commonwealth:{},conglomerate:{},contemporary:{},cosmopolitan:{},humanitarian:{},neighborhood:{},thoroughbred:{},ultramontane:{},concatenation:{},featherweight:{},superordinate:{},classification:{},fundamentalist:{},cop:{},don:{},eon:{},gal:{},gob:{},god:{},hoe:{},kin:{},nan:{},pup:{},wag:{},wit:{},aeon:{},ally:{},bard:{},chum:{},clew:{},dean:{},fink:{},flak:{},geek:{},goof:{},hulk:{},idol:{},lady:{},loon:{},mace:{},para:{},ruck:{},seer:{},self:{plural:"selves"},adder:{},angel:{},augur:{},baron:{},blond:{},brick:{},brute:{},cabal:{},champ:{},comic:{},crier:{},decoy:{},demon:{},diner:{},diver:{},diwan:{},drove:{},envoy:{},fiend:{},flack:{},flier:{},flyer:{},freak:{},gaudy:{},harpy:{},horde:{},indie:{},jewel:{},leech:{},levee:{},liege:{},locus:{},loser:{},mimic:{},needy:{},nymph:{},oiler:{},poser:{},pupil:{},riser:{},roper:{},rummy:{},scold:{},squad:{},timer:{},tutor:{},usher:{},vicar:{},whale:{},wiper:{},affine:{},albino:{},angler:{},badass:{},baster:{},beggar:{},blonde:{},bomber:{},bowler:{},butter:{},carver:{},caster:{},chichi:{},clinic:{},closer:{},cohort:{},coiner:{},comber:{},cookie:{},cordon:{},corpus:{},cotter:{},cowboy:{},coyote:{},critic:{},dragon:{},drawer:{},drudge:{},eleven:{},ensign:{},estate:{},ethnic:{},exarch:{},finder:{},fodder:{},gaffer:{},gainer:{},galaxy:{},granny:{},hacker:{},hedger:{},heller:{},holder:{},honker:{},hooker:{},hotdog:{},inmate:{},intern:{},jungle:{},knight:{},kvetch:{},lineup:{},lovely:{},magpie:{},maiden:{},mailer:{},maniac:{},matron:{},miller:{},muller:{},nation:{},opener:{},ouster:{},packer:{},parrot:{},patron:{},peeler:{},peeper:{},polity:{},poster:{},powwow:{},punter:{},puppet:{},purdah:{},racist:{},rafter:{},ramrod:{},redact:{},regent:{},rusher:{},sailor:{},scorer:{},seeder:{},shaver:{},slaver:{},slicer:{},smoker:{},snitch:{},syntax:{},tacker:{},tagger:{},tanker:{},tartar:{},teller:{},thrush:{},trigon:{},troika:{},truant:{},tucker:{},tyrant:{},umpire:{},undoer:{},vestal:{},virgin:{},votary:{},warren:{},washer:{},wetter:{},winder:{},winner:{},wizard:{},admirer:{},amnesic:{},analyst:{},anomaly:{},aphasic:{},armorer:{},arrival:{},ascetic:{},auditor:{},baggage:{},bastion:{},biology:{},boarder:{},brahman:{},brahmin:{},breaker:{},caravan:{},clapper:{},cluster:{},coaster:{},cobbler:{},college:{},convict:{},council:{},counsel:{},coxcomb:{},crawler:{},creeper:{},crewman:{},crimper:{},darling:{},destiny:{},dragoon:{},dreamer:{},duality:{},echelon:{},ejector:{},fiddler:{},fighter:{},flasher:{},forbear:{},harrier:{},holdout:{},hostess:{},incubus:{},ingenue:{},justice:{},kachina:{},kindred:{},kingpin:{},macumba:{},manikin:{},marcher:{},married:{},newborn:{},notable:{},nursing:{},outpost:{},parvenu:{},patient:{},payroll:{},peasant:{},phalanx:{},phantom:{},planter:{},platoon:{},plodder:{},poacher:{},printer:{},prodigy:{},puncher:{},realist:{},redhead:{},revival:{},runaway:{},scholar:{},sharpie:{},skidder:{},slicker:{},slogger:{},smasher:{},snorter:{},snuffer:{},spinner:{},splicer:{},stalker:{},stamper:{},standby:{},stepper:{},striper:{},sweeper:{},thrower:{},triplet:{},utopian:{},utterer:{},voucher:{},washout:{},watcher:{},wiggler:{},wrecker:{},affluent:{},armourer:{},attender:{},bacchant:{},bachelor:{},bankrupt:{},bisexual:{},bondsman:{},cautious:{},congress:{},corporal:{},creature:{},decadent:{},defeated:{},delegate:{},diabetic:{},dictator:{},dyslexic:{},effector:{},exponent:{},flagging:{},freshman:{},fugitive:{},futurist:{},garrison:{},greyback:{},hangover:{},humanism:{},immortal:{},juvenile:{},lapidary:{},mainstay:{},mannikin:{},maverick:{},mechanic:{},minority:{},minstrel:{},mistress:{},monotype:{},mutation:{},nativist:{},neophyte:{},neurotic:{},newsroom:{},nobility:{},opponent:{},pacifier:{},pantheon:{},planting:{},probable:{},producer:{},recusant:{},referral:{},reminder:{},retainer:{},ruralism:{},scalawag:{},scrubber:{},searcher:{},sergeant:{},sociable:{},songster:{},splitter:{},squadron:{},straggle:{},strawman:{},survivor:{},taxonomy:{},treasury:{},vanguard:{},virtuoso:{},walloper:{},warhorse:{},yearling:{},alcoholic:{},anorectic:{},artificer:{},artillery:{},attracter:{},attractor:{},automaton:{},auxiliary:{},barbarian:{},bombshell:{},brokerage:{},coalition:{},concourse:{},contralto:{},counselor:{},crewwoman:{},cyberpunk:{},defaulter:{},deliverer:{},democracy:{},dependant:{},descender:{},dissident:{},dyspeptic:{},feudatory:{},firewoman:{},flyweight:{},incurable:{},institute:{},insurgent:{},intellect:{},introvert:{},mandatory:{},mendicant:{},middleman:{},navigator:{},organiser:{},organizer:{},pluralism:{},pluralist:{},pothunter:{},precursor:{},predictor:{},presenter:{},pretender:{},processor:{},proconsul:{},publisher:{},quintuple:{},registrar:{},regulator:{},scallywag:{},scavenger:{},scrambler:{},scratcher:{},serration:{},singleton:{},stargazer:{},stockpile:{},successor:{},surrogate:{},symbolism:{},temporary:{},throwback:{},trickster:{},warrantee:{},womanhood:{},antagonist:{},attendance:{},blackguard:{},bondswoman:{},chancellor:{},classifier:{},conference:{},conformist:{},counsellor:{},crossroads:{},descendant:{},descendent:{},doorkeeper:{},embodiment:{},expatriate:{},federation:{},fellowship:{},filibuster:{},forerunner:{},fratricide:{},grandstand:{},mastermind:{},minstrelsy:{},missionary:{},ordination:{},plantation:{},powerhouse:{},quadruplet:{},quintuplet:{},repatriate:{},republican:{},respondent:{},rubberneck:{},salamander:{},scholastic:{},separatism:{},sisterhood:{},subscriber:{},subsidiary:{},supplicant:{},suppresser:{},suppressor:{},timekeeper:{},translator:{},university:{},wallflower:{},abomination:{},academician:{},agriculture:{},anachronism:{},antiquarian:{},beneficiary:{},bureaucracy:{},clairvoyant:{},conditioner:{},confederacy:{},consumptive:{},deification:{},enlightened:{},incarnation:{},lilliputian:{},middlewoman:{},narcoleptic:{},nationalist:{},partnership:{},peacekeeper:{},peripatetic:{},pontificate:{},progression:{},prosecution:{},quarterback:{},recessional:{},romanticist:{},shipbuilder:{},transmitter:{},transsexual:{},underwriter:{},undesirable:{},utilitarian:{},acquaintance:{},bantamweight:{},collaborator:{},congregation:{},conservatory:{},countertenor:{},demonstrator:{},denomination:{},headquarters:{},illegitimate:{},investigator:{},metropolitan:{},middleweight:{},noncombatant:{},philharmonic:{},schoolmaster:{},sharpshooter:{},totalitarian:{},authoritarian:{},confederation:{},correspondent:{},reincarnation:{},schizophrenic:{},supernumerary:{},categorization:{},tatterdemalion:{},instrumentality:{},internationalist:{},bey:{},cox:{},cur:{},few:{},foe:{},hag:{},lad:{},mod:{},obi:{},sib:{},aide:{},amah:{},anti:{},army:{},beau:{},bevy:{},bogy:{},chit:{},clod:{},coon:{},czar:{},dada:{},dame:{},derp:{},dodo:{},dude:{},duke:{},dupe:{},gild:{},giro:{},goat:{},goon:{},grad:{},guru:{},heir:{},hobo:{},hunk:{},jilt:{},jock:{},jury:{},khan:{},maid:{},naif:{},navy:{},nerd:{},peri:{},pimp:{},putz:{},sect:{},suer:{},swot:{},tuft:{},adept:{},baker:{},basso:{},beast:{},bride:{},bunny:{},cadre:{},comer:{},cooky:{},corps:{},covey:{},deist:{},edger:{},elite:{},emcee:{},enate:{},faery:{},fatty:{},fauna:{},felon:{},filer:{},flora:{},folks:{},forum:{},genus:{plural:"genera"},ghoul:{},gipsy:{},giver:{},gnome:{},grove:{},gypsy:{},hajji:{},hakim:{},junky:{},knave:{},lefty:{},leper:{},loony:{},macho:{},madam:{},magus:{},medic:{},mezzo:{},miler:{},mooch:{},mufti:{},nabob:{},nexus:{},ninja:{},obeah:{},parer:{},pigmy:{},poilu:{},ponce:{},prior:{},proxy:{},puppy:{},pygmy:{},quint:{},raver:{},rover:{},satyr:{},scamp:{},sheik:{},shill:{},shrew:{},sibyl:{},sissy:{},slain:{},smith:{},snoop:{},sprog:{},stoic:{},sylph:{},taker:{},thane:{},toady:{},totem:{},trier:{},tryst:{},tuner:{},twirp:{},uncle:{},valet:{},vegan:{},vixen:{},waker:{},widow:{},wight:{},wirer:{},yenta:{},agnate:{},alexic:{},amazon:{},audile:{},avatar:{},avower:{},bagger:{},bagman:{},banker:{},barber:{},barker:{},bather:{},bawler:{},beater:{},beldam:{},bidder:{},boater:{},brewer:{},broker:{},brunet:{},bureau:{},caddie:{},camper:{},cantor:{},caucus:{},chaser:{},cherub:{},chosen:{},coeval:{},cooper:{},coquet:{},cottar:{},craven:{},cubist:{},daemon:{},deacon:{},digger:{},dodger:{},dowser:{},duette:{},dunker:{},egoist:{},eldest:{},eparch:{},erotic:{},eyeful:{},faller:{},fitter:{},flunky:{},forger:{},framer:{},gaggle:{},gagman:{},gamine:{},gasbag:{},gillie:{},goalie:{},gouger:{},grouch:{},gunman:{},gunner:{},hamlet:{},hanger:{},hawker:{},heaver:{},hermit:{},hitter:{},hummer:{},iceman:{},joiner:{},junkie:{},jurist:{},keeper:{},kelpie:{},kisser:{},lackey:{},lector:{},lifter:{},lister:{},lizard:{},loader:{},loaner:{},logjam:{},longer:{},lubber:{},lumper:{},lyceum:{},madcap:{},maenad:{},maimed:{},masher:{},medico:{},menial:{},midden:{},midget:{},minder:{},moiety:{},motile:{},nester:{},oblate:{},oilman:{},parish:{},paster:{},pelter:{},phylum:{},picker:{},plenum:{},police:{},pruner:{},psyche:{},puller:{},python:{},rabble:{},raider:{},raiser:{},ranger:{},ranker:{},rapper:{},reaper:{},redcap:{},reeler:{},regime:{},renter:{},rifler:{},romper:{},sachem:{},salter:{},sawyer:{},sealer:{},seeker:{},sender:{},sexist:{},shaker:{},shaper:{},sharpy:{},signer:{},silvan:{},sleuth:{},smiler:{},sorter:{},sphinx:{},stager:{},stater:{},supper:{},sylvan:{},talent:{},tanner:{},tester:{},theist:{},throng:{},tilter:{},tipper:{},toller:{},tosser:{},tourer:{},townie:{},trusty:{},varlet:{},vermin:{},vestry:{},victor:{},virago:{},voicer:{},waster:{},weasel:{},weaver:{},weeder:{},weeper:{},weirdo:{},whaler:{},winker:{},wraith:{},wretch:{},yakuza:{},yeoman:{},adapter:{},admiral:{},airhead:{},amalgam:{},animist:{},aphakic:{},applier:{},arbiter:{},armiger:{},atheist:{},attache:{},babbler:{},baffled:{},beldame:{},beloved:{},berserk:{},bondman:{},bounder:{},brigade:{},browser:{},buffoon:{},bulimic:{},burgher:{},caitiff:{},carload:{},catcher:{},cavalry:{},chachka:{},changer:{},charmer:{},chemist:{},cocotte:{},collage:{},compere:{},shadow:{},layer:{},north:{},orbit:{},trend:{},truss:{},vault:{},bunker:{},harbor:{},orient:{},origin:{},resort:{},safety:{},target:{},chamber:{},extreme:{},harbour:{},kingdom:{},mandate:{},outline:{},station:{},blockade:{},darkness:{},overlook:{},landscape:{},northeast:{},northwest:{},partition:{},southeast:{},southwest:{},structure:{},atmosphere:{},lug:{},tee:{},balk:{},burr:{},cage:{},drip:{},east:{},fort:{},hoop:{},west:{},cleat:{},fluke:{},scour:{},south:{},beacon:{},closet:{},duplex:{},radius:{plural:"radii"},vacuum:{},wattle:{},canteen:{},grounds:{},cloister:{},pinnacle:{},property:{},surround:{},terminus:{},anchorage:{},barricade:{},honeycomb:{},turnaround:{},institution:{},termination:{},cab:{},dam:{},brim:{},calk:{},dome:{},goal:{},hill:{},hull:{},knob:{},prop:{},seam:{},site:{},turf:{},apron:{},arena:{},baulk:{},cabin:{},grill:{},groin:{},haunt:{},lever:{},niche:{},privy:{},works:{},airway:{},barren:{},corral:{},dugout:{},fender:{},galley:{},hurdle:{},lounge:{},outlet:{},refuge:{},sconce:{},sprawl:{},temple:{},toilet:{},wicket:{},barrack:{},bulwark:{},buttery:{},cornice:{},grating:{},landing:{},leeward:{},maximum:{},pasture:{},salient:{},shingle:{},squinch:{},surgery:{},building:{},cylinder:{},downtown:{},fountain:{},landmark:{},munition:{},quadrant:{},rearward:{},sideline:{},windward:{},homestead:{},multiplex:{},perfumery:{},residence:{},stretcher:{},substrate:{},excavation:{},silhouette:{},convenience:{},culmination:{},declination:{},architecture:{},spa:{},aery:{},brow:{},bung:{},dike:{},flue:{},hell:{},tent:{},abbey:{},aisle:{},arbor:{},attic:{},booth:{},brink:{},disco:{},oxbow:{},oxeye:{},quoin:{},realm:{},salon:{},villa:{},whorl:{},barony:{},barrow:{},bazaar:{},billet:{},bustle:{},canton:{},casing:{},cellar:{},cooler:{},garage:{},ghetto:{},grille:{},hearth:{},locker:{},midway:{},muffle:{},oracle:{},remise:{},saloon:{},stocks:{},studio:{},tiptop:{},uptown:{},volute:{},arsenal:{},chassis:{},cockpit:{},commons:{},cubicle:{},dockage:{},fairway:{},fencing:{},gondola:{},heading:{},hotspot:{},lattice:{},lodging:{},minimum:{},moorage:{},pannier:{},rattrap:{},rootage:{},stowage:{},theater:{},theatre:{},vacuity:{},baseline:{},butchery:{},buttress:{},clearing:{},crosscut:{},domicile:{},erection:{},exterior:{},fanlight:{},fastness:{},firewall:{},foothold:{},frontier:{},lavatory:{},memorial:{},monument:{},mortuary:{},overhang:{},pedestal:{},scenario:{},solitude:{},sprocket:{},stockade:{},stoppage:{},vaulting:{},bombproof:{},cathedral:{},fundament:{},hindrance:{},panhandle:{},proximity:{},resonator:{},sanctuary:{},territory:{},watershed:{},confluence:{},department:{},encampment:{},flashpoint:{},groundwork:{},hinderance:{},quartering:{},substratum:{},underbelly:{},breadbasket:{},columbarium:{},destination:{},engineering:{},equinoctial:{},planetarium:{},penitentiary:{},circumference:{},confectionery:{},fortification:{},hub:{},hut:{},lee:{},sty:{},acme:{},apex:{},barn:{},brig:{},coop:{},digs:{},holy:{},jail:{},jook:{},juke:{},loge:{},mall:{},nook:{},pave:{},sash:{},silo:{},slum:{},tope:{},weir:{},abode:{},aerie:{},altar:{},bazar:{},detox:{},haven:{},heath:{},hutch:{},kraal:{},lager:{},manor:{},manse:{},navel:{},oasis:{plural:"oases"},opera:{},paddy:{},plaza:{},pylon:{},rodeo:{},shire:{},spile:{},sprag:{},venue:{},visor:{},apogee:{},arcade:{},ashram:{},asylum:{},atrium:{},bagnio:{},bailey:{},barrio:{},belfry:{},boards:{},casino:{},chapel:{},county:{},creche:{},cupola:{},deckle:{},fraise:{},haymow:{},hostel:{},kennel:{},lancet:{},larder:{},lockup:{},mihrab:{},parlor:{},plaque:{},prefab:{},prison:{},spigot:{},stacks:{},tampon:{},turret:{},vertex:{},zodiac:{},automat:{},balcony:{},batwing:{},benthos:{},borough:{},bubbler:{},bullpen:{},cabaret:{},caboose:{},chantry:{},convent:{},deanery:{},demesne:{},derrick:{},desktop:{},drydock:{},dukedom:{},dungeon:{},earldom:{},earplug:{},embassy:{},emirate:{},eparchy:{},equinox:{},fiefdom:{},florist:{},flyover:{},framing:{},funfair:{},grocery:{},hayrack:{},hospice:{},khanate:{},lunette:{},mansion:{},marquee:{},masonry:{},matting:{},midland:{},mooring:{},narthex:{},nirvana:{},obelisk:{},outback:{},parapet:{},parlour:{},pinhead:{},railing:{},rathole:{},redoubt:{},ribbing:{},rotunda:{},sanctum:{},sawmill:{},shipway:{},shoebox:{},stopple:{},tambour:{},transom:{},trellis:{},trestle:{},tribune:{},vantage:{},abutment:{},airspace:{},ambiance:{},ambience:{},backside:{},ballpark:{},basement:{},basilica:{},bioscope:{},bodywork:{},brattice:{},diggings:{},doghouse:{},dominion:{},entrepot:{},environs:{},extremum:{},farmland:{},fireside:{},hacienda:{},hideaway:{},imperium:{},jalousie:{},littoral:{},mantelet:{},mounting:{},nailhead:{},outdoors:{},palisade:{},pharmacy:{},porthole:{},province:{},revolver:{},seascape:{},sidewall:{},steerage:{},stopover:{},suburbia:{},sudatory:{},sweatbox:{},tailgate:{},turnpike:{},wellhead:{},backwater:{},bailiwick:{},beachhead:{},belvedere:{},caliphate:{},caparison:{},cellarage:{},chandlery:{},cloakroom:{},colonnade:{},cookhouse:{},couchette:{},crematory:{},crownwork:{},cubbyhole:{},dollhouse:{},dormitory:{},dripstone:{},fieldwork:{},fireguard:{},forefront:{},guardroom:{},hatchback:{},isoclinal:{},lazaretto:{},lineation:{},mezzanine:{},millinery:{},orphanage:{},outfitter:{},pleasance:{},princedom:{},revetment:{},roadblock:{},scrapheap:{},shrubbery:{},viewpoint:{},viscounty:{},workhouse:{},architrave:{},birthplace:{},borderline:{},bridgehead:{},brownstone:{},chokepoint:{},commissary:{},courthouse:{},escarpment:{},greenhouse:{},ironmonger:{},justiciary:{},laboratory:{},lamination:{},maisonette:{},metropolis:{},obstructor:{},panopticon:{},playground:{},prefecture:{},proscenium:{},quadrangle:{},rotisserie:{},sanatorium:{},suzerainty:{},tenderloin:{},triclinium:{},wellspring:{},wheelhouse:{},condominium:{},conventicle:{},crematorium:{},crenelation:{},demarcation:{},maisonnette:{},observatory:{},reformatory:{},superstrate:{},tobacconist:{},trusteeship:{},wainscoting:{},amphitheater:{},amphitheatre:{},chapterhouse:{},clotheshorse:{},delicatessen:{},fountainhead:{},haberdashery:{},municipality:{},packinghouse:{},patriarchate:{},retrenchment:{},substructure:{},superstratum:{},surroundings:{},wainscotting:{},juxtaposition:{},infrastructure:{},dec:{},inn:{},loo:{},pub:{},burg:{},cafe:{},deli:{},dorm:{},hank:{},iglu:{},kirk:{},lair:{},lawn:{},mart:{},nave:{},oast:{},rink:{},souk:{},tine:{},tipi:{},veld:{},ways:{},wold:{},yurt:{},apsis:{},burgh:{},condo:{},cubby:{},cuddy:{},dacha:{},duchy:{},duomo:{},eaves:{},flies:{},gable:{},glade:{},gulag:{},harem:{},hogan:{},igloo:{},lanai:{},layby:{},mecca:{},midst:{},motel:{},oriel:{},parts:{},patio:{},polls:{},qibla:{},roads:{},rooms:{},sauna:{},skein:{},socle:{},soddy:{},sodom:{},spire:{},stoep:{},stupa:{},tenon:{},tepee:{},tupek:{},tupik:{},veldt:{},weald:{},abatis:{},abbacy:{},alcove:{},apiary:{},arbour:{},aviary:{},bedsit:{},bethel:{},bodega:{},bounds:{},bowels:{},cabana:{},calkin:{},campus:{},carrel:{},casbah:{},casern:{},chalet:{},depths:{},dolmen:{},donjon:{},dormer:{},durbar:{},eatery:{},escarp:{},fipple:{},flange:{},flyway:{},friary:{},furket:{},gantry:{},garret:{},hangar:{},hareem:{},hayrig:{},imaret:{},isobar:{},isohel:{},isolex:{},kasbah:{},laager:{},locale:{},loggia:{},marina:{},masjid:{},meadow:{},medina:{},menhir:{},merlon:{},midair:{},morgue:{},mosque:{},mudhif:{},musjid:{},pagoda:{},paling:{},pantry:{},parvis:{},pelmet:{},piazza:{},pigsty:{},plinth:{},priory:{},pueblo:{},radome:{},setoff:{},skybox:{},skyway:{},stalls:{},storey:{},suburb:{},tenter:{},upside:{},volary:{},wigwam:{},wikiup:{},winery:{},abattis:{},airdock:{},airlock:{},alcazar:{},antapex:{},apadana:{},apojove:{},apolune:{},athanor:{},barroom:{},bascule:{},bedside:{},beeline:{},borstal:{},boudoir:{},brewery:{},brewpub:{},brothel:{},campong:{},cannery:{},capitol:{},carport:{},carrell:{},chancel:{},chateau:{},citadel:{},coaming:{},corncob:{},cottage:{},cowbarn:{},cowshed:{},cowtown:{},crinion:{},dinette:{},diocese:{},earshot:{},edifice:{},enclave:{},exurbia:{},eyeshot:{},fantail:{},feedlot:{},firebox:{},screw:{},share:{},sheet:{},slice:{},slide:{},spill:{},stage:{},stake:{},tread:{},paddle:{},weight:{},canvass:{},compact:{},undercut:{},representation:{},fin:{},gag:{},jet:{},tug:{},bark:{},bunk:{},drum:{},mask:{},pipe:{},reel:{},scan:{},blank:{},drill:{},plumb:{},plume:{},shank:{},sling:{},spray:{},pickup:{},saddle:{},trench:{},capsule:{},security:{},sacrifice:{},technical:{},can:{},jar:{},map:{},ply:{},rib:{},rim:{},web:{},bell:{},buck:{},claw:{},comb:{},copy:{},crib:{},dish:{},fake:{},foil:{},grab:{},kite:{},ramp:{},rent:{},slot:{},spit:{},tank:{},bosom:{},cable:{},charm:{},drain:{},grave:{},price:{},skirt:{},stool:{},strap:{},stump:{},trail:{},access:{},cannon:{},fiddle:{},formal:{},insert:{},launch:{},purple:{},reward:{},strand:{},tackle:{},display:{},floater:{},incline:{},limited:{},portion:{},torpedo:{},overcast:{},puncture:{},broadside:{},duplicate:{},submarine:{},surcharge:{},production:{},interchange:{},bus:{},due:{},gap:{},jaw:{},lag:{},nut:{},tin:{},win:{},arch:{},bail:{},cell:{},dope:{},fell:{},film:{},lace:{},lash:{},mail:{},pale:{},purl:{},rate:{},skid:{},sole:{},spar:{},tuck:{},vamp:{},vent:{},vest:{},brake:{},brass:{},chuck:{},cramp:{},crest:{},drape:{},elbow:{},habit:{},lease:{},lower:{},prize:{},roach:{},royal:{},scrap:{},slate:{},snare:{},snuff:{},total:{},trump:{},beaver:{},canvas:{},future:{},handle:{},header:{},jacket:{},motley:{},muzzle:{},quiver:{},rocket:{},roller:{},staple:{},wrench:{},compass:{},element:{},exhaust:{},frontal:{},thunder:{},transit:{},upstage:{},traverse:{},accession:{},allowance:{},guarantee:{},promenade:{},shipwreck:{},attachment:{},protection:{},perpendicular:{},aid:{},gig:{},gin:{},nap:{},oil:{},ram:{},bead:{},bulb:{},curb:{},dart:{},daub:{},dial:{},dose:{},exit:{},fuse:{},goad:{},item:{},knit:{},plan:{},rein:{},swag:{},veil:{},alarm:{},chart:{},cinch:{},clasp:{},eagle:{},entry:{},fluff:{},gouge:{},lance:{},meter:{},miter:{},pouch:{},probe:{},punch:{},purse:{},sable:{},scuff:{},shear:{},stern:{},taper:{},thumb:{},wharf:{},whisk:{},barrel:{},beetle:{},bronze:{},burden:{},congee:{},fleece:{},glossy:{},halter:{},limber:{},margin:{},mobile:{},needle:{},remote:{},shroud:{},sketch:{},splice:{},stripe:{},toggle:{},trough:{},volume:{},ballast:{},binding:{},blanket:{},costume:{},crackle:{},crystal:{},diamond:{},fitting:{},graphic:{},harness:{},premium:{},product:{},pyramid:{},sandbag:{},squelch:{},trammel:{},uniform:{},venture:{},warrant:{},wildcat:{},working:{},assembly:{},charcoal:{},discount:{},envelope:{},imperial:{},ligature:{},original:{},specific:{},treasure:{},vertical:{},deduction:{},distemper:{},inventory:{},objective:{},reversion:{},whitewash:{},supplement:{},contrivance:{},convertible:{},inspiration:{},intersection:{},counterbalance:{},bet:{},gel:{},gut:{},jag:{},jig:{},pan:{},pry:{},tab:{},tax:{},zip:{},bait:{},barb:{},bomb:{},cone:{},cuff:{},dado:{},disk:{},gear:{},gore:{},grid:{},harp:{},loom:{},main:{},pant:{},pike:{},prod:{},reef:{},ruff:{},sham:{},tare:{},tidy:{},tire:{},toll:{},award:{},basic:{},basin:{},baton:{},birch:{},braid:{},broom:{},clack:{},cloak:{},clout:{},crock:{},fagot:{},ferry:{},filet:{},forte:{},found:{},frail:{},jolly:{},motor:{},pedal:{},potty:{},radio:{},rivet:{},scarf:{},shore:{},shunt:{},sieve:{},splat:{},splay:{},stave:{},steal:{},steel:{},thong:{},tithe:{},torch:{},trunk:{},twine:{},upper:{},valve:{},weave:{},bridle:{},buckle:{},buffet:{},carpet:{},cotton:{},custom:{},devise:{},enamel:{},entail:{},furrow:{},girdle:{},hobble:{},mangle:{},mosaic:{},motive:{},pallet:{},pencil:{},pinion:{},powder:{},radial:{},rattle:{},rebate:{},rumble:{},shield:{},shimmy:{},shovel:{},sledge:{},sluice:{},tablet:{},throne:{},timber:{},tinsel:{},uplift:{},benefit:{},bombard:{},bootleg:{},console:{},default:{},forfeit:{},freight:{},gantlet:{},generic:{},grapple:{},journal:{},loading:{},molding:{},overlap:{},pigment:{},plastic:{},salvage:{},scooter:{},scuffle:{},spindle:{},steamer:{},stopper:{},upright:{},carriage:{},catapult:{},facility:{},laminate:{},medicine:{},offstage:{},overload:{},plastron:{},railroad:{},retrofit:{},strickle:{},throttle:{},whipping:{},wireless:{},automatic:{},blackjack:{},blackwash:{},foliation:{},interlock:{},roughcast:{},threshold:{},antiseptic:{},camouflage:{},incidental:{},intangible:{},preventive:{},reversible:{},watercolor:{},maintenance:{},watercolour:{},differential:{},prescription:{},preventative:{},prophylactic:{},reproduction:{},transcription:{},transportation:{},fob:{},guy:{},hem:{},jug:{},kit:{},saw:{},cane:{},cart:{},clam:{},coif:{},cosy:{},cozy:{},disc:{},felt:{},gash:{},hone:{},hose:{},keel:{},loot:{},luff:{},lure:{},mast:{},mend:{},mine:{},muff:{},nuke:{},plow:{},robe:{},ruby:{},snip:{},soap:{},spud:{},swab:{},tile:{},till:{},tram:{},vane:{},wand:{},weed:{},weld:{},welt:{},audio:{},audit:{},baste:{},bilge:{},brail:{},bugle:{},canal:{},chest:{},chock:{},conge:{},couch:{},crape:{},crepe:{},crook:{},flute:{},frill:{},frock:{},fusee:{},hoist:{},inset:{},kitty:{},leash:{},liner:{},mixer:{},noose:{},novel:{},pearl:{},piano:{},plait:{},quill:{},reset:{},roost:{},saber:{},sabre:{},scull:{},spear:{},squab:{},stilt:{},sulky:{},video:{},vomit:{},wagon:{},aerial:{},armory:{},baffle:{},banner:{},batten:{},binder:{},bodkin:{},bypass:{},canopy:{},chisel:{},clench:{},dollar:{},dredge:{},drogue:{},duster:{},engine:{},excise:{},facing:{},funnel:{},garner:{},hamper:{},joggle:{},kettle:{},lining:{},livery:{},lumber:{},marble:{},mortar:{},mousse:{},nickel:{},ocular:{},payoff:{},pestle:{},piping:{},pommel:{},profit:{},puzzle:{},ransom:{},ration:{},rental:{},ribbon:{},rotary:{},runway:{},saucer:{},seesaw:{},siphon:{},suture:{},tattoo:{},thatch:{},throat:{},tunnel:{},turtle:{},wealth:{},acrylic:{},armoury:{},balloon:{},bargain:{},beehive:{},blinker:{},bolster:{},caisson:{},casting:{},ceiling:{},chariot:{},chopper:{},clarion:{},clinker:{},clipper:{},cowhide:{},earnest:{},elastic:{},expense:{},festoon:{},fortune:{},garnish:{},gravure:{},grinder:{},killing:{},linkage:{},novelty:{},overall:{},overlay:{},pallium:{},perfume:{},pillory:{},pointer:{},ringlet:{},rosette:{},segment:{},shuttle:{},staging:{},trailer:{},trumpet:{},unction:{},barbecue:{},barbeque:{},disguise:{},electric:{},elevated:{},fraction:{},gauntlet:{},gossamer:{},heritage:{},homespun:{},ironclad:{},lifeline:{},lighting:{},mackinaw:{},moulding:{},pinpoint:{},pinwheel:{},poundage:{},sanguine:{},sapphire:{},scribble:{},triangle:{},underlay:{},upstairs:{},virginal:{},admission:{},amphibian:{},backstage:{},capillary:{},cartridge:{},cartwheel:{},cathartic:{},condenser:{},damascene:{},depiction:{},diaphragm:{},medallion:{},overdrive:{},pacemaker:{},reservoir:{},screening:{},sectional:{},solitaire:{},spotlight:{},undercoat:{},assessment:{},bottleneck:{},equatorial:{},overburden:{},pigeonhole:{},pocketbook:{},pontifical:{},refractory:{},reparation:{},roundabout:{},simulation:{},waterproof:{},accelerator:{},certificate:{},inheritance:{},installment:{},restorative:{},ventilation:{},modification:{},subscription:{},hospitalization:{},instrumentation:{},ax:{},axe:{},bib:{},bin:{},bur:{},cot:{},fee:{},fur:{},jib:{},lid:{},six:{},ten:{},tub:{},two:{},bath:{},bike:{},cash:{},coke:{},cope:{},cowl:{},cusp:{},darn:{},debt:{},dice:{},dory:{},duct:{},fore:{},four:{},gaff:{},gage:{},gong:{},helm:{},hemp:{},icon:{},iris:{},junk:{},kern:{},loan:{},maul:{},mink:{},pane:{},pier:{},quid:{},reed:{},rook:{},scum:{},semi:{},sump:{},swob:{},taxi:{},vice:{},ware:{},wool:{},yarn:{},yawl:{},annex:{},atlas:{},barge:{},bevel:{},chaff:{},chute:{},clamp:{},crane:{},crate:{},cubeb:{},dandy:{},dicky:{},dinky:{},dolly:{},dower:{},eight:{},fifty:{},flail:{},floss:{},folio:{},fuzee:{},genre:{},girth:{},gourd:{},grape:{},hinge:{},hobby:{},inlay:{},japan:{},ladle:{},latch:{},linen:{},means:{},mitre:{},motif:{},mulct:{},pique:{},quilt:{},quirk:{},quota:{},rifle:{},rotor:{},setup:{},seven:{},shred:{},skate:{},spade:{},spool:{},spout:{},strut:{},three:{},toner:{},trawl:{},truck:{},twill:{},virtu:{},alpaca:{},anklet:{},argyle:{},argyll:{},arnica:{},balsam:{},bender:{},birdie:{},bishop:{},blower:{},blowup:{},bolero:{},bonnet:{},bounty:{},budget:{},bullet:{},cachet:{},carbon:{},casket:{},castor:{},claxon:{},cobble:{},cobweb:{},collet:{},crenel:{},cutoff:{},cutout:{},damask:{},damper:{},dibble:{},dickey:{},dipper:{},domino:{},douche:{},dragee:{},equity:{},eyelet:{},fetish:{},foible:{},fresco:{},gaiter:{},gibbet:{},gusset:{},heckle:{},hooter:{},horror:{},hunter:{},intake:{},jigger:{},lacing:{},lappet:{},makeup:{},making:{},mallet:{},marker:{},patina:{},paving:{},platen:{},plough:{},poleax:{},portal:{},primer:{},rabbet:{},rattan:{},refill:{},retort:{},revere:{},screed:{},sheath:{},sinker:{},socket:{},splint:{},stereo:{},syphon:{},tamper:{},tandem:{},tarmac:{},tenure:{},ticker:{},trepan:{},twenty:{},velvet:{},veneer:{},vessel:{},vicuna:{},backing:{},bandage:{},bobsled:{},carving:{},central:{},chamfer:{},chequer:{},cistern:{},cleaner:{},cleanup:{},coinage:{},crochet:{},cruiser:{},curtain:{},dilator:{},distaff:{},emerald:{},etching:{},flannel:{},flounce:{},footing:{},gangway:{},garbage:{},garland:{},gauffer:{},gelatin:{},grizzle:{},hanging:{},haywire:{},lamella:{},laniard:{},lanyard:{},lashing:{},lockage:{},lounger:{},manakin:{},masking:{},meshing:{},mileage:{},mintage:{},mortice:{},mortise:{},movable:{},muffler:{},palette:{},pendant:{},pendent:{},pennant:{},pillbox:{},poleaxe:{},portage:{},pottery:{},priming:{},quarrel:{},readout:{},retread:{},roundel:{},rubbing:{},scupper:{},scuttle:{},serpent:{},shampoo:{},shellac:{},shutter:{},snaffle:{},snorkel:{},spangle:{},spouter:{},stabile:{},stinker:{},tankage:{},toehold:{},tracing:{},treadle:{},trefoil:{},truckle:{},trundle:{},vesture:{},webbing:{},whipsaw:{},wrapper:{},additive:{},adjuvant:{},aperture:{},aquatint:{},backdoor:{},basilisk:{},blowback:{},bludgeon:{},breakage:{},causeway:{},checkout:{},clincher:{},compress:{},corduroy:{},coupling:{},crossbar:{},currency:{},detector:{},dividend:{},dogtooth:{},downcast:{},followup:{},frontage:{},giveaway:{},goodwill:{},hardware:{},headgear:{},headshot:{},hypnotic:{},ignition:{},inhalant:{},lipstick:{},masthead:{},meniscus:{},metallic:{},modeling:{},nautilus:{},neckband:{},nightcap:{},ornament:{},outboard:{},partizan:{},pavement:{},pectoral:{},planking:{},plumbing:{},portable:{},pressing:{},radiator:{},remittal:{},residual:{},resource:{},roulette:{},scaffold:{},scapular:{},scissors:{plural:"scissors"},scrabble:{},springer:{},sunburst:{},tapestry:{},taxation:{},thrasher:{},tomahawk:{},totality:{},tympanum:{},valuable:{},vignette:{},wardrobe:{},widening:{},admixture:{},antiquity:{},aquaplane:{},bagatelle:{},bastinado:{},blindfold:{},blueprint:{},boomerang:{},carpetbag:{},crinoline:{},depressor:{},detergent:{},doodlebug:{},downstage:{},emergency:{},endowment:{},equalizer:{},exemption:{},extortion:{},extractor:{},facsimile:{},freewheel:{},gabardine:{},grotesque:{},hemstitch:{},horseshoe:{},invention:{},jackknife:{},microwave:{},millstone:{},miniature:{},modernism:{},nosepiece:{},ownership:{},packaging:{},pargeting:{},patchwork:{},pinstripe:{},polyester:{},potpourri:{},recording:{},refresher:{},semaphore:{},semblance:{},shielding:{},sideboard:{},skyrocket:{},slapstick:{},soporific:{},spectacle:{},starboard:{},telephone:{},telescope:{},treadmill:{},turntable:{},verdigris:{},videotape:{},whirligig:{},allocation:{},ambulatory:{},anesthetic:{},assistance:{},astringent:{},automation:{},cantilever:{},chinchilla:{},concertina:{},constraint:{},deductible:{},depilatory:{},disposable:{},elongation:{},escutcheon:{},featherbed:{},foreground:{},forfeiture:{},guillotine:{},hammerhead:{},hydroplane:{},innovation:{},intoxicant:{},knockabout:{},lithograph:{},monochrome:{},nonpayment:{},nutcracker:{},pargetting:{},peripheral:{},polychrome:{},redemption:{},stabilizer:{},stenograph:{},subvention:{},sustenance:{},technology:{},television:{},waterspout:{},anaesthetic:{},anamorphism:{},concealment:{},containment:{},copperplate:{},cornerstone:{},counterfeit:{},countersink:{},cryptograph:{},delineation:{},delinquency:{},encumbrance:{},fingerboard:{},fluorescent:{},incumbrance:{},perforation:{},pyrotechnic:{},retribution:{},subsistence:{},tensiometer:{},transporter:{},undercharge:{},withholding:{},dispensation:{},electrolytic:{},encrustation:{},inclinometer:{},incrustation:{},installation:{},intermixture:{},photogravure:{},straightaway:{},transparency:{},appropriation:{},embellishment:{},improvisation:{},merchandising:{},mystification:{},quadruplicate:{},semiautomatic:{},pharmaceutical:{},superannuation:{},aba:{},boa:{},dag:{},fax:{},gad:{},keg:{},nib:{},nog:{},pix:{},pyx:{},rep:{},ski:{},taw:{},urn:{},ante:{},arms:{},bale:{},berm:{},bier:{},bitt:{},bola:{},bolo:{},brad:{},cape:{},cask:{},cent:{},coax:{},coca:{},cosh:{},dime:{},dole:{},doll:{},garb:{},gilt:{},gyro:{},hasp:{},hypo:{},ikon:{},juju:{},lane:{},lint:{},luge:{},lute:{},maxi:{},maze:{},mini:{},mitt:{},mule:{},pail:{},perk:{},plat:{},pork:{},pouf:{},rung:{},scow:{},silk:{},sill:{},skep:{},sled:{},tamp:{},tapa:{},topi:{},trey:{},vape:{},wale:{},wick:{},adobe:{},aegis:{},aglet:{},album:{},alley:{},anode:{},anvil:{},arrow:{},auger:{},batik:{},bogie:{},bolus:{},bongo:{},borer:{},bribe:{},bulla:{},caddy:{},canoe:{},chime:{},coign:{},debit:{},denim:{},depot:{},diary:{},diode:{},drier:{},flask:{},flume:{},fount:{},frier:{},fryer:{},gauze:{},globe:{},golem:{},hijab:{},inlet:{},jimmy:{},jorum:{},kayak:{},khaki:{},lasso:{},latex:{},lisle:{},lorry:{},lucre:{},manta:{},mimeo:{},mizen:{},moire:{},mulch:{},newel:{},nylon:{},penny:{},piste:{},plush:{},poker:{},prism:{},pyxis:{},ranch:{},razor:{},relic:{},rouge:{},ruler:{},sabot:{},scape:{},sedan:{},seine:{},servo:{},shelf:{plural:"shelves"},slops:{},spoke:{},sprig:{},stele:{},steps:{},stoup:{},stove:{},strop:{},suede:{},swage:{},tammy:{},tanka:{},tappa:{},teddy:{},terms:{},toque:{},torus:{},towel:{},tunic:{},tweed:{},usury:{},verso:{},vizor:{},waist:{},winch:{},withe:{},xerox:{},yacht:{},abacus:{},afghan:{},aiglet:{},alidad:{},amends:{},arctic:{},artery:{},avenue:{},banger:{},bangle:{},banian:{},banyan:{},bauble:{},beaker:{},bicorn:{},blazon:{},boiler:{},bracer:{},broach:{},bumper:{},burner:{},buzzer:{},caftan:{},calash:{},camera:{},camion:{},camlet:{},capote:{},carton:{},casein:{},catgut:{},chaise:{},cheque:{},chiton:{},chukka:{},cither:{},cloaca:{},cloche:{},coffer:{},coffin:{},coigne:{},colors:{},corbel:{},corker:{},corset:{},crayon:{},crutch:{},dagger:{},daybed:{},detour:{},diaper:{},dickie:{},dipole:{},dirndl:{},discus:{},dogleg:{},dolman:{},dosage:{},duffel:{},duffle:{},eyecup:{},fabric:{},facade:{},falsie:{},fanjet:{},fascia:{},fetter:{},firkin:{},fizgig:{},floppy:{},frieze:{},garter:{},gimlet:{},goblet:{},guimpe:{},guinea:{},gunnel:{},harrow:{},helmet:{},hookup:{},hotbed:{},impost:{},instep:{},iodine:{},island:{},jersey:{},jetsam:{},jigsaw:{},juicer:{},kaftan:{},kibble:{},kirtle:{},lateen:{},laurel:{},ledger:{},linage:{},lunula:{},magnet:{},markup:{},miotic:{},mizzen:{},myotic:{},nipple:{},nozzle:{},onager:{},pajama:{},pavage:{},pellet:{},pennon:{},peplum:{},peyote:{},pincer:{},pipage:{},pomade:{},pompon:{},popper:{},pyjama:{},ragbag:{},reamer:{},remake:{},reseau:{},rudder:{},russet:{},scythe:{},settee:{},shades:{},shorts:{},siding:{},sleeve:{},sleigh:{},spinet:{},spline:{},stoker:{},stylus:{},sublet:{},subway:{},surtax:{},swathe:{},swivel:{},syrinx:{},taenia:{},talcum:{},tariff:{},teacup:{},teeter:{},tenner:{},tether:{},thwart:{},tocsin:{},trophy:{},trowel:{},turban:{},viewer:{},waggon:{},wampum:{},wherry:{},wicker:{},willow:{},wiring:{},woolen:{},yarder:{},zipper:{},acetate:{},aerosol:{},airline:{},alidade:{},ampulla:{},android:{},aneroid:{},annulet:{},anodyne:{},apanage:{},apparel:{},archive:{},armband:{},armilla:{},arrears:{},banding:{},basting:{},batting:{},bayonet:{},beading:{},bedding:{},bladder:{},blocker:{},blusher:{},bollock:{},bouquet:{},bracing:{},brocade:{},broiler:{},bullion:{},bunting:{},burthen:{},bushing:{},caleche:{},caliper:{},cathode:{},catwalk:{},cautery:{},charger:{},charnel:{},chemise:{},chevron:{},chimney:{},chlamys:{},circlet:{},colours:{},commode:{},cooling:{},cordage:{},coronet:{},corsair:{},crampon:{},cutaway:{},daybook:{},deadeye:{},decoder:{},diagram:{},doeskin:{},dogsled:{},doormat:{},dragger:{},dragnet:{},drapery:{},drawers:{},dustpan:{},escheat:{},eyehole:{},fixings:{},flatbed:{},flattop:{},flipper:{},foghorn:{},foliage:{},footage:{},foretop:{},forgery:{},frigate:{},funding:{},furring:{},fustian:{},garment:{},garotte:{},garrote:{},gouache:{},grapnel:{},griddle:{},hackney:{},hammock:{},harpoon:{},hassock:{},hatchel:{},hatchet:{},heating:{},hedging:{},hibachi:{},hobnail:{},holding:{},holster:{},hydrant:{},iceboat:{},igniter:{},impasse:{},ironing:{},jackpot:{},javelin:{},joinery:{},fibre:{},hazel:{},lemon:{},peach:{},plank:{},raven:{},snipe:{},spine:{},steer:{},stint:{},stunt:{},bleach:{},breath:{},callus:{},cherry:{},dimple:{},entire:{},ferret:{},filler:{},hybrid:{},jackal:{},marrow:{},orange:{},radish:{},spruce:{},stifle:{},winkle:{},endemic:{},vanilla:{},beefwood:{},calabash:{},concrete:{},emission:{},kingfish:{},solution:{},volatile:{},partridge:{},repellant:{},derivative:{},thickening:{},ash:{},bud:{},cob:{},hen:{},mew:{},mud:{},mum:{},paw:{},roe:{},sow:{},soy:{},wax:{},yam:{},beef:{},burl:{},calf:{plural:"calves"},chat:{},fowl:{},fuzz:{},gill:{},grub:{},hock:{},hoof:{},lobe:{},rose:{},scup:{},soup:{},swan:{},tint:{},tuna:{},tusk:{},alloy:{},briar:{},clove:{},coney:{},ebony:{},ether:{},filth:{},flesh:{},gumbo:{},homer:{},jelly:{},matte:{},mocha:{},reeve:{},wrack:{},annual:{},canine:{},carrot:{},cereal:{},cockle:{},feeler:{},fennel:{},flimsy:{},gargle:{},gravel:{},grouse:{},indigo:{},mammee:{},medlar:{},monkey:{},nebula:{},oyster:{},salmon:{plural:"salmon"},shiner:{},shrimp:{},sprout:{},stigma:{},blossom:{},blubber:{},buffalo:{},cabbage:{},calamus:{},catfish:{},caudate:{},caustic:{},chelate:{},chicory:{},ciliate:{},essence:{},griffon:{},hemlock:{},hydrate:{},incense:{},lighter:{},remount:{},sardine:{},stinger:{},vitriol:{},ambrosia:{},billfish:{},blackcap:{},crawfish:{},crayfish:{},earthnut:{},escallop:{},filament:{},flounder:{},infusion:{},ironwood:{},quandong:{},relative:{},ringtail:{},screamer:{},sycamore:{},alabaster:{},algarroba:{},broadbill:{},composite:{},fulminate:{},perennial:{},tangerine:{},bladderpod:{},granadilla:{},heartsease:{},periwinkle:{},tumbleweed:{},agglomerate:{},bittersweet:{},intermediate:{},dye:{},elk:{},fig:{},haw:{},oka:{},pea:{},pee:{},rye:{},sac:{},tar:{},yak:{},carp:{},clay:{},coma:{},cony:{},crud:{},cusk:{},dung:{},fang:{},foam:{},germ:{},glue:{},hare:{},hind:{},husk:{},kiwi:{},lake:{},mung:{},okra:{},pine:{},pith:{},puke:{},rice:{},roan:{},sloe:{},taro:{},teal:{},titi:{},twig:{},amber:{},anime:{},berry:{},boxer:{},carob:{},cedar:{},chine:{},guava:{},hound:{},husky:{},kauri:{},lemma:{},monad:{},ocher:{},ochre:{},onion:{},ounce:{},pansy:{},pecan:{},pewit:{},prawn:{},quail:{},shuck:{},sloth:{},slush:{},smelt:{},snail:{},snout:{},spawn:{},swift:{},tabby:{},thorn:{},topaz:{},umber:{},virus:{},wafer:{},wahoo:{},wheat:{},whelk:{},badger:{},bonito:{},broody:{},chrome:{},cirrus:{},cocoon:{},cowpea:{},cuckoo:{},elixir:{},grease:{},grubby:{},howler:{},jabiru:{},jargon:{},jujube:{},kernel:{},leaven:{},lentil:{},liquor:{},locust:{},manioc:{},mastic:{},mentum:{},mildew:{},mimosa:{},mullet:{},muscat:{},mutant:{},nectar:{},nettle:{},nodule:{},pawpaw:{},pecker:{},plasma:{},ruddle:{},sallow:{},shoddy:{},squill:{},starch:{},stroma:{},stucco:{},sunray:{},thorax:{},tissue:{},violet:{},walnut:{},warble:{},amyloid:{},antenna:{plural:"antennae"},apricot:{},aquatic:{},asphalt:{},avocado:{},beebalm:{},bobtail:{},builder:{},bulldog:{},caltrop:{},cayenne:{},chinook:{},coconut:{},cricket:{},cudweed:{},currant:{},cuticle:{},dasheen:{},gallfly:{},juniper:{},lacquer:{},leaflet:{},lettuce:{},macadam:{},mordant:{},mustard:{},packing:{},panther:{},papilla:{},papyrus:{},parsnip:{},pigweed:{},pollard:{},redfish:{},redwood:{},rubbish:{},saffron:{},salsify:{},shallot:{},slating:{},solvate:{},solvent:{},soybean:{},sunfish:{},truffle:{},whisker:{},abrasive:{},allspice:{},angelica:{},biennial:{},bilberry:{},bluebell:{},chickpea:{},cinnabar:{},cinnamon:{},congener:{},creosote:{},demerara:{},duckbill:{},firebird:{},fleabane:{},humanity:{},lavender:{},mahogany:{},monkfish:{},paraffin:{},peduncle:{},peroxide:{},plantain:{},rockfish:{},sandarac:{},sandwort:{},scammony:{},shamrock:{},skipjack:{},skullcap:{},snowbird:{},suckling:{},tubercle:{},alligator:{},angelfish:{},arachnoid:{},arrowroot:{},bearberry:{},blackfish:{},buckthorn:{},capitulum:{},carbonate:{},carnation:{},celluloid:{},chemistry:{},coriander:{},corrosive:{},crabapple:{},devilfish:{},emanation:{},groundnut:{},horseback:{},horsemint:{},injection:{},matchwood:{},mistletoe:{},offspring:{plural:"offspring"},pyrethrum:{},raspberry:{},razorback:{},satinwood:{},sheepskin:{},tomatillo:{},waxflower:{},whitefish:{},ammunition:{},bitterwood:{},blackberry:{},butterfish:{},chinquapin:{},coneflower:{},flagellate:{},flamboyant:{},fledgeling:{},insulation:{},peppermint:{},receptacle:{},strawberry:{},watercress:{},chittamwood:{},everlasting:{},fomentation:{},helleborine:{},honeysuckle:{},horseradish:{},huckleberry:{},salmonberry:{},shittimwood:{},strawflower:{},ultramarine:{},whitethroat:{},wintergreen:{},helmetflower:{},impregnation:{},quintessence:{},sternutatory:{},thimbleberry:{},contamination:{},extravasation:{},leatherjacket:{},pulverisation:{},pulverization:{},tortoiseshell:{},ti:{},ala:{},asp:{},eel:{},elm:{},fir:{},gar:{},neb:{},nit:{},oak:{},oat:{},sol:{},tom:{},yew:{},agar:{},akee:{},anil:{},atom:{},balm:{},bast:{},beet:{},boar:{},bole:{},bran:{},brit:{},cere:{},cero:{},chow:{},coho:{},dahl:{},dill:{},flax:{},foal:{},glop:{},gnat:{},hake:{},herb:{},hoar:{},homo:{},kaki:{},kino:{},leek:{},loin:{},mite:{},musk:{},parr:{},pear:{},poon:{},puka:{},rhea:{},saki:{},seta:{},shad:{},silt:{},slag:{},soda:{},soma:{},soot:{},soya:{},talc:{},teak:{},tufa:{},unai:{},unau:{},whey:{},woad:{},wort:{},yolk:{},zinc:{},abaca:{},alder:{},alula:{},amino:{},anise:{},apple:{},aroid:{},aster:{},balsa:{},basil:{},beech:{},betel:{},biddy:{},billy:{},biped:{},booby:{},britt:{},bruin:{},cairn:{},capon:{},caulk:{},chard:{},chess:{},chick:{},cisco:{},cohoe:{},comma:{},croup:{},cumin:{},dross:{},elver:{},epoxy:{},ergot:{},falls:{},flint:{},fossa:{},genip:{},grout:{},grume:{},henna:{},hilum:{},humus:{},hydra:{},icaco:{},ilama:{},imago:{},ivory:{},kapok:{},kenaf:{},lapin:{},larch:{},lilac:{},lotus:{},luffa:{},mahoe:{},maize:{},mamey:{},mango:{},manna:{},melon:{},moong:{},naiad:{},nanny:{},nopal:{},orris:{},osier:{},otter:{},ovary:{},ovule:{},pacer:{},panda:{},papaw:{},piggy:{},pilus:{},pinna:{},pixie:{},polyp:{},potto:{},putty:{},quira:{},robin:{},roble:{},rosin:{},scrod:{},sepia:{},sisal:{},slime:{},sorus:{},sprat:{},squid:{},stoma:{},sumac:{},swede:{},theca:{},thyme:{},trout:{plural:"trout"},tunny:{},vapor:{},velum:{},venom:{},vinyl:{},whelp:{},yeast:{},acetum:{},acinus:{},acumen:{},adduct:{},agaric:{},alkali:{},almond:{},anuran:{},archil:{},argent:{},balata:{},bamboo:{},bantam:{},barley:{},basset:{},beluga:{},bennet:{},bluing:{},bonduc:{},borage:{},capsid:{},cashew:{},cassia:{},caudex:{},celery:{},chives:{},cilium:{},citron:{},cobnut:{},cocker:{},cosmos:{},cowage:{},croton:{},cupule:{},cushaw:{},darter:{},dentin:{},dobson:{},dodder:{},donkey:{},durian:{},embryo:{},endive:{},ermine:{},falcon:{},feijoa:{},feline:{},fisher:{},fucoid:{},gadfly:{},garlic:{},glycol:{},hackle:{},haunch:{},herpes:{},hyssop:{},kaffir:{},kitten:{},lichee:{},limpet:{},linden:{},linnet:{},litchi:{},loofah:{},loquat:{},lovage:{},lupine:{},madder:{},maguey:{},manure:{},marang:{},mescal:{},mocker:{},mombin:{},mucoid:{},mudcat:{},munggo:{},murine:{},mussel:{},myrtle:{},nipper:{},nutmeg:{},obeche:{},orchil:{},orchis:{},oriole:{},padauk:{},paigle:{},papaya:{},parget:{},pasang:{},peewee:{},peewit:{},phenol:{},plaice:{},pomelo:{},poplar:{},possum:{},potato:{},pothos:{},pouter:{},puffer:{},pullet:{},pumice:{},pyrene:{},quahog:{},quartz:{},quince:{},rachis:{},raffia:{},ratter:{},relict:{},sabicu:{},saline:{},sapote:{},saurel:{},schrod:{},senega:{},septum:{},setter:{},sierra:{},simian:{},sludge:{},solder:{},spirea:{},stevia:{},sulfur:{},thrift:{},toetoe:{},tomato:{},tophus:{},triton:{},tupelo:{},turbot:{},turnip:{},vapour:{},vellum:{},wapiti:{},wasabi:{},acerola:{},actinon:{},aculeus:{},adamant:{},albumen:{},alewife:{},alfalfa:{},amboyna:{},anchovy:{},anemone:{},anionic:{},annelid:{},annulus:{},antacid:{},antlion:{},arsenic:{},aurochs:{},babbitt:{},barilla:{},beeswax:{},bimetal:{},biomass:{},bloomer:{},blotter:{},bluefin:{},blueing:{},boneset:{},boxwood:{},bracken:{},brocket:{},bromide:{},buckeye:{},bugbane:{},bugloss:{},bullock:{},bulrush:{},buzzard:{},cackler:{},cacodyl:{},caliche:{},calycle:{},cambium:{},capulin:{},caraway:{},cardoon:{},catbird:{},catechu:{},celtuce:{},ceriman:{},chalaza:{},chamois:{},chervil:{},chigger:{},citrate:{},cocoyam:{},codfish:{},comfrey:{},compost:{},cowslip:{},crappie:{},crawdad:{},crinoid:{},cyanide:{},cypress:{},dabbler:{},denizen:{},diploid:{},dogfish:{},dogwood:{},echidna:{},eelpout:{},enation:{},fallout:{},ferrite:{},fetlock:{},filaria:{},filbert:{},firebug:{},firefly:{},frijole:{},fuchsia:{},gamboge:{},ginseng:{},girasol:{},glutton:{},gobbler:{},grackle:{},grampus:{},granite:{},grizzly:{},grouper:{},grunter:{},gudgeon:{},haddock:{},halibut:{},haploid:{},haricot:{},heather:{},hepatic:{},herring:{},hickory:{},hogfish:{},honesty:{},hyaline:{},ignitor:{},inducer:{},jackass:{},jewfish:{},jonquil:{},kestrel:{},kingcup:{},kumquat:{},lactate:{},langsat:{},lanolin:{},lingcod:{},lobster:{},logwood:{},mahagua:{},majagua:{},malacca:{},mammoth:{},marabou:{},marasca:{},menthol:{},mercury:{},monarch:{},moneran:{},mongrel:{},moorhen:{},morello:{},muskrat:{},nervure:{},nitrate:{},octopus:{},oldwife:{},opossum:{},oregano:{},ostrich:{},oxheart:{},parsley:{},peacock:{},pigfish:{},pimento:{},piranha:{},plumcot:{},pollack:{},pollock:{},pompano:{},popcorn:{},poultry:{},pricket:{},puccoon:{},pulasan:{},pyrogen:{},quahaug:{},quassia:{},quetzal:{},raccoon:{},ragweed:{},ragwort:{},rattler:{},redbird:{},redpoll:{},redtail:{},reducer:{},redwing:{},remover:{},residue:{},retinal:{},rhubarb:{},rosebud:{},rostrum:{},satsuma:{},saurian:{},sequoia:{},seriema:{},skylark:{},sockeye:{},soursop:{},sparrow:{},spinach:{},spiraea:{},stentor:{},steroid:{},stubble:{},sulfate:{},sulphur:{},tangelo:{},taproot:{},tarweed:{},tarwood:{},tattler:{},taurine:{},teargas:{},timothy:{},tobacco:{},topknot:{},tortrix:{},trotter:{},varmint:{},verdure:{},viceroy:{},vinegar:{},viscose:{},vulture:{},walleye:{},waratah:{},warbler:{},waxwork:{},whooper:{},wilding:{},witloof:{},wryneck:{},abradant:{},absinthe:{},acceptor:{},actinoid:{},adhesive:{},adjutant:{},ageratum:{},agueweed:{},albacore:{},amarelle:{},amethyst:{},ammoniac:{},argonaut:{},armyworm:{},auricula:{},balancer:{},baldpate:{},barnacle:{},basswood:{},bayberry:{},bearskin:{},beetroot:{},birdlime:{},blackfly:{},blacktop:{},bluebird:{},bluefish:{},boarfish:{},bocconia:{},boxberry:{},brisling:{},broccoli:{},buckskin:{},bullhead:{},bullrush:{},canistel:{},capuchin:{},carangid:{},carbonyl:{},carboxyl:{},cardamom:{},cardamon:{},carinate:{},carnauba:{},carotene:{},cashmere:{},catalyst:{},catchfly:{},celeriac:{},cetacean:{},chimaera:{},chloride:{},cilantro:{},cinchona:{},citrange:{},cockspur:{},conodont:{},costmary:{},cowberry:{},cucumber:{},deadwood:{},detritus:{},dewberry:{},dilution:{},dolomite:{},duckling:{},ectozoan:{},eelgrass:{},effluent:{},eggplant:{},emulsion:{},estragon:{},filtrate:{},fireweed:{},flathead:{},flooring:{},forelock:{},galangal:{},garbanzo:{},grayback:{},guaiacum:{},hardtack:{},harebell:{},hawkweed:{},hazelnut:{},hedgehog:{},hepatica:{},hookworm:{},hornwort:{},horsefly:{},hyacinth:{},impurity:{},iodoform:{},jalapeno:{},jamberry:{},japonica:{},keurboom:{},kindling:{},kingwood:{},kinkajou:{},kohlrabi:{},labdanum:{},lambskin:{},locoweed:{},lovebird:{},magnolia:{},mahimahi:{},mandrake:{},margarin:{},marjoram:{},medusoid:{},mephitis:{},migrator:{},molecule:{},moonfish:{},mucilage:{},mulberry:{},nestling:{},omnivore:{},ovenbird:{},pandanus:{},pickerel:{},pilchard:{},pimiento:{},pitahaya:{},placenta:{},plumbago:{},predator:{},ptomaine:{},puffball:{},pulassan:{},purebred:{},pyrectic:{},quandang:{},quickset:{},rambotan:{},rambutan:{},redberry:{},redstart:{},reedbird:{},ricebird:{},richweed:{},ringdove:{},rockrose:{},rosefish:{},rosemary:{},rosewood:{},ruminant:{},rutabaga:{},sailfish:{},salsilla:{},saltwort:{},sandfish:{},scallion:{},seahorse:{},sealskin:{},sewerage:{},shoveler:{},siderite:{},silkworm:{},sparling:{},squealer:{},squirrel:{},stearate:{},stinkpot:{},superbug:{},surffish:{},sweetsop:{},tamarind:{},tarragon:{},teaberry:{},thresher:{},throstle:{},tilefish:{},tomentum:{},toxicant:{},turmeric:{},ungulate:{},univalve:{},urochord:{},vesicant:{},warragal:{},warrigal:{},watchdog:{},waxberry:{},weakfish:{},wolffish:{},woodbine:{},woodruff:{},wormcast:{},wriggler:{},zucchini:{},absorbent:{},adsorbate:{},adsorbent:{},albatross:{},almandine:{},andromeda:{},antiknock:{},apophysis:{},archangel:{},arsenical:{},artichoke:{},asparagus:{},aubergine:{},bacteroid:{},blackbird:{},blindworm:{},bluegrass:{},bluepoint:{},broadtail:{},brooklime:{},brookweed:{},brushwood:{},buckwheat:{},bugleweed:{},buteonine:{},butternut:{},caecilian:{},calyculus:{},candlenut:{},cantaloup:{},carambola:{},carbonado:{},carbuncle:{},cardboard:{},carnivore:{},catamount:{},celandine:{},chameleon:{},chatterer:{},chelonian:{},cherimoya:{},chickweed:{},chlamydia:{},clamshell:{},clapboard:{},coachwhip:{},cochineal:{},cocklebur:{},cocozelle:{},coltsfoot:{},commensal:{},courgette:{},crackling:{},cupflower:{},cyanamide:{},digestive:{},digitalis:{},driftfish:{},ecrevisse:{},ectoplasm:{},eiderdown:{},ephemeral:{},eutherian:{},evergreen:{},excretion:{},exudation:{},fenugreek:{},firebrand:{},firestone:{},flagellum:{},frostweed:{},funiculus:{},gladiolus:{},glasswort:{},goldeneye:{},goldfinch:{},grapevine:{},grenadier:{},hackberry:{},hamadryad:{},heartleaf:{},hellebore:{},hollyhock:{},horehound:{},horsebean:{},horsehair:{},horseweed:{},hortensia:{},hydroxide:{},jackfruit:{},jacksnipe:{},jellyfish:{},juneberry:{},lancewood:{},langouste:{},leavening:{},lemonwood:{},mammalian:{},manzanita:{},maravilla:{},marihuana:{},marijuana:{},moosewood:{},muscadine:{},muskmelon:{},nakedwood:{},nectarine:{},nighthawk:{},pasturage:{},patchouli:{},patchouly:{},pelecypod:{},pellitory:{},peregrine:{},peristome:{},persimmon:{},phosphate:{},pimpernel:{},pinchbeck:{},pineapple:{},pistachio:{},polyploid:{},probiotic:{},proboscis:{},protozoan:{},pureblood:{},quadruped:{},rauwolfia:{},recycling:{},reptilian:{},reticulum:{},rockcress:{},rootstock:{},rosinweed:{},sandpaper:{},sapodilla:{},sassafras:{},sheldrake:{},shingling:{},shoveller:{},siccative:{},sicklepod:{},snakeroot:{},snowflake:{},sourdough:{},spicebush:{},spirillum:{},stainless:{},stiffener:{},strangler:{},strawworm:{},sugarcane:{},swordfish:{},tamarindo:{},tarantula:{},topminnow:{},tulipwood:{},turquoise:{},twayblade:{},twinberry:{},wallpaper:{},whitebait:{},whiteface:{},wineberry:{},wolverine:{},workhorse:{},adulterant:{},amygdaloid:{},anopheline:{},aquamarine:{},belladonna:{},bellwether:{},bitterweed:{},blacksnake:{},blackthorn:{},bluebonnet:{},bluebottle:{},bottlenose:{},brachiopod:{},brazilwood:{},breadfruit:{},butterball:{},butterweed:{},candelilla:{},cantaloupe:{},catarrhine:{},cellulosic:{},chatterbox:{},chinaberry:{},cinquefoil:{},citronwood:{},clementine:{},condensate:{},copperhead:{},coralberry:{},cornflower:{},cottonweed:{},cottonwood:{},crossbreed:{},crustacean:{},deathwatch:{},demoiselle:{},dollarfish:{},elderberry:{},exhalation:{},feathertop:{},fetterbush:{},fiddlehead:{},flycatcher:{},fritillary:{},garambulla:{},goldenbush:{},gooseberry:{},grapefruit:{},jaboticaba:{},jackrabbit:{},ketembilla:{},kitembilla:{},lemongrass:{},littleneck:{},loganberry:{},loggerhead:{},mangosteen:{},marblewood:{},marguerite:{},massasauga:{},meerschaum:{},monoclonal:{},nasturtium:{},needlefish:{},nonstarter:{},ornamental:{},pacesetter:{},parenchyma:{},pennyroyal:{},pepperwort:{},plasmodium:{},princewood:{},propellant:{},propellent:{},pufferfish:{},pyrimidine:{},quercitron:{},restharrow:{},restrainer:{},ribbonfish:{},ribbonwood:{},rudderfish:{},sapphirine:{},scorzonera:{},sidewinder:{},silverbush:{},silverfish:{},silverweed:{},spiceberry:{},sticktight:{},sugarberry:{},superoxide:{},tarmacadam:{},turpentine:{},turtledove:{},velvetleaf:{},vertebrate:{},vesicatory:{},wandflower:{},watermelon:{},windowpane:{},witchgrass:{},yellowbird:{},yellowtail:{},yellowwood:{},adulterator:{},arthrospore:{},artiodactyl:{},bactericide:{},boysenberry:{},branchiopod:{},buffalofish:{},butcherbird:{},cauliflower:{},cherrystone:{},chittimwood:{},chokecherry:{},combustible:{},conspecific:{},digitigrade:{},dolphinfish:{},flameflower:{},gillyflower:{},groundberry:{},groundcover:{},heterocycle:{},honeyflower:{},insectivore:{},leatherleaf:{},leatherwood:{},lingonberry:{},liquidambar:{},loosestrife:{},muskellunge:{},plantigrade:{},platyrrhine:{},pomegranate:{},precipitant:{},prickleback:{},quicksilver:{},recombinant:{},refrigerant:{},shellflower:{},silversides:{},sleuthhound:{},swallowwort:{},unguiculate:{},waldmeister:{},archosaurian:{},distillation:{},heterocyclic:{},honeycreeper:{},instillation:{},invertebrate:{},nonsteroidal:{},placentation:{},sarsaparilla:{},serviceberry:{},squirrelfish:{},transudation:{},weatherboard:{},whortleberry:{},yellowhammer:{},branchiopodan:{},inflorescence:{},platyrrhinian:{},semiconductor:{},transactinide:{},vitrification:{},fructification:{},aa:{},ai:{},ani:{},auk:{},awn:{},bot:{},dak:{},daw:{},dew:{},doe:{},dug:{},eft:{},ern:{},ewe:{},gib:{},gnu:{},goo:{},ivy:{},jay:{},kea:{},kob:{},lac:{},lye:{},may:{},mei:{},moa:{},oca:{},ola:{},olm:{},pia:{},pug:{},teg:{},tup:{},acyl:{},agua:{},aloe:{},amyl:{},anoa:{},apar:{},aril:{},arui:{},atar:{},axil:{},barm:{},baya:{},bine:{},boll:{},bufo:{},buna:{},calx:{},cavy:{},chub:{},cleg:{},coco:{},colt:{},coot:{},corm:{},cows:{},craw:{},culm:{},cyme:{},dace:{},dalo:{},deer:{plural:"deer"},derv:{},dhak:{},dhal:{},dika:{},diol:{},disa:{},dita:{},dogy:{},doob:{},dopa:{},enol:{},erne:{},eyas:{},fern:{},fice:{},floc:{},fuji:{},gean:{},goby:{},guan:{},guar:{},guib:{},haem:{},halm:{},hart:{},heme:{},hogg:{},hops:{},hoya:{},ibex:{},ibis:{},inga:{},jird:{},jute:{},kali:{},kelp:{},kola:{},kudu:{},lily:{},lino:{},liza:{},loam:{},loir:{},lory:{},lynx:{},mako:{},mamo:{},mara:{},marl:{},merl:{},mica:{},milo:{},miro:{},mola:{},moss:{},munj:{},mutt:{},myna:{},nagi:{},napa:{},napu:{},neem:{},neon:{},olla:{},ombu:{},onyx:{},opah:{},opal:{},orca:{},oryx:{},paca:{},peat:{},peba:{},pika:{},pome:{},puku:{},puma:{},pupa:{},ragi:{},rimu:{},rudd:{},sago:{},salp:{},sang:{},sard:{},scut:{},sial:{},sika:{},sild:{},sima:{},skua:{},smew:{},sugi:{},tatu:{},teff:{},teju:{},tern:{},tipu:{},toad:{},tody:{},tolu:{},tuff:{},tung:{},urea:{},urus:{},vole:{},wasp:{},weka:{},blast:{},dinar:{},lapse:{},lurch:{},whirl:{},travel:{},capacity:{},encounter:{},conversion:{},separation:{},age:{},nip:{},now:{},halt:{},leap:{},mile:{},peak:{},peso:{},slam:{},term:{},wake:{},faint:{},scoop:{},surge:{},third:{},trick:{},bother:{},cackle:{},motion:{},chatter:{},reversal:{},elevation:{},experience:{},dab:{},pat:{},cube:{},howl:{},over:{},peep:{},span:{},cause:{},death:{},plump:{},plunk:{},poise:{},pulse:{},shame:{},spark:{},twang:{},wound:{},cipher:{},crunch:{},damage:{},fusion:{},period:{},racket:{},repeat:{},supply:{},wallow:{},wonder:{},dribble:{},failure:{},outrage:{},sparkle:{},backfire:{},campaign:{},delivery:{},increase:{},variance:{},explosion:{},correction:{},disturbance:{},translation:{},displacement:{},transposition:{},hum:{},mug:{},buzz:{},cord:{},dawn:{},fuss:{},hint:{},hiss:{},much:{},past:{},ping:{},rout:{},seek:{},tide:{},warp:{},birth:{},blend:{},crumb:{},delay:{},rupee:{},worst:{},climax:{},deluge:{},dirham:{},recoil:{},replay:{},rhythm:{},rising:{},descent:{},grumble:{},impulse:{},respite:{},scruple:{},triumph:{},addition:{},dogfight:{},eruption:{},occasion:{},progress:{},reprieve:{},shilling:{},stampede:{},accretion:{},induction:{},appearance:{},suggestion:{},circulation:{},irradiation:{},accommodation:{},precipitation:{},in:{},ebb:{},mil:{},zap:{},gush:{},honk:{},lull:{},plop:{},rave:{},ream:{},slap:{},then:{},zoom:{},fifth:{},final:{},gleam:{},reign:{},swash:{},throb:{},thump:{},tweet:{},wreck:{},wring:{},billow:{},breach:{},ending:{},fourth:{},gurgle:{},injury:{},nibble:{},parity:{},sunset:{},billion:{},history:{},instant:{},spatter:{},blackout:{},creation:{},decision:{},downhill:{},entrance:{},rational:{},trillion:{},hereafter:{},immersion:{},intrusion:{},millenary:{},remainder:{},saltation:{},adjustment:{},antecedent:{},dedication:{},deflection:{},impairment:{},limitation:{},outpouring:{},refinement:{},scattering:{},devastation:{},elaboration:{},fundamental:{},prohibition:{},retardation:{},interference:{},transmission:{},manifestation:{},scintillation:{},mi:{},kip:{},wee:{},yaw:{},bout:{},bray:{},doom:{},harm:{},haul:{},jolt:{},none:{},ooze:{},pity:{},sigh:{},surf:{},thaw:{},tour:{},alpha:{},carom:{},chunk:{},clink:{},colon:{},deuce:{},drama:{},glint:{},going:{},shtik:{},sixth:{},spurt:{},thrum:{},tinge:{},today:{},waltz:{},worth:{},bucket:{},egress:{},fathom:{},mutter:{},patter:{},picnic:{},quaver:{},ripple:{},rustle:{},shtick:{},sizzle:{},squawk:{},stride:{},tremor:{},whoosh:{},wobble:{},absence:{},allegro:{},andante:{},deficit:{},episode:{},heaving:{},raising:{},rebirth:{},roaring:{},rupture:{},screech:{},scrunch:{},seventh:{},success:{},sunrise:{},takeoff:{},trample:{},twinkle:{},cracking:{},deletion:{},incident:{},interval:{},isometry:{},overflow:{},rattling:{},skeleton:{},splatter:{},striking:{},twilight:{},upheaval:{},advantage:{},alignment:{},deflexion:{},diffusion:{},emergence:{},inflation:{},normality:{},remission:{},resultant:{},ruination:{},shakedown:{},vibration:{},yesterday:{},allegretto:{},conception:{},concoction:{},concretion:{},disruption:{},divergence:{},graduation:{},inflection:{},initiation:{},moderation:{},sprinkling:{},approaching:{},biquadratic:{},competition:{},compression:{},contraction:{},humiliation:{},permutation:{},constriction:{},ramification:{},accompaniment:{},embarrassment:{},mortification:{},rectification:{},coo:{},eve:{},gee:{},par:{},sea:{},sec:{},tot:{},won:{},yen:{},bash:{},beep:{},ding:{},dram:{},fete:{},gait:{},inch:{},lira:{},peal:{},pint:{},purr:{},rial:{},ting:{},toot:{},whiz:{},blare:{},bleat:{},brawl:{},cease:{},digit:{},dying:{},epoch:{},gravy:{},idyll:{},knell:{},metre:{},minim:{},ninth:{},plash:{},plonk:{},quake:{},quart:{},ravel:{},salvo:{},skirl:{},snore:{},spate:{},spirt:{},swish:{},tenth:{},unity:{},whack:{},whirr:{},years:{},ascent:{},bushel:{},curfew:{},drachm:{},eighth:{},enough:{},finale:{},fizzle:{},footer:{},gobble:{},jingle:{},marvel:{},myriad:{},octave:{},ravage:{},smudge:{},spritz:{},squeak:{},squeal:{},squish:{},swerve:{},tierce:{},usance:{},waxing:{},atrophy:{},banging:{},bending:{},blowout:{},centner:{},clangor:{},debacle:{},decimal:{},eclipse:{},glitter:{},kickoff:{},midterm:{},million:{},misfire:{},modulus:{},monsoon:{},ordinal:{},outflow:{},ringing:{},shimmer:{},sinking:{},smolder:{},torrent:{},twelfth:{},backwash:{},bouncing:{},downfall:{},dripping:{},drumbeat:{},eighties:{},eternity:{},exigency:{},footstep:{},furlough:{},gleaming:{},grinding:{},hardship:{},instance:{},invasion:{},majority:{},maturity:{},nineties:{},overtime:{},overture:{},pandemic:{},pounding:{},receding:{},recovery:{},rustling:{},scraping:{},sixtieth:{},smoulder:{},spoilage:{},spraying:{},tomorrow:{},touching:{},amplitude:{},ascension:{},athletics:{},avalanche:{},billionth:{},checkmate:{},clearance:{},collision:{},commotion:{},contagion:{},departure:{},fertility:{},formality:{},gestation:{},heartbeat:{},honeymoon:{},hundredth:{},interlude:{},irruption:{},lactation:{},millionth:{},multitude:{},onslaught:{},outgrowth:{},plurality:{},probation:{},pulsation:{},shrinkage:{},sixteenth:{},spreading:{},stalemate:{},throbbing:{},whistling:{},withering:{},affliction:{},alteration:{},betterment:{},dispersion:{},enervation:{},expiration:{},foreboding:{},incubation:{},incumbency:{},inevitable:{},irrational:{},jubilation:{},levitation:{},millennium:{plural:"millennia"},procession:{},repetition:{},revolution:{},sabbatical:{},solubility:{},subsidence:{},thousandth:{},undulation:{},visitation:{},accelerando:{},catastrophe:{},celebration:{},coincidence:{},consequence:{},continuance:{},deformation:{},dislocation:{},dissipation:{},expansivity:{},fluctuation:{},gravitation:{},oscillation:{},preliminary:{},punctuation:{},sufficiency:{},acceleration:{},augmentation:{},championship:{},commencement:{},conservation:{},deceleration:{},degeneration:{},encroachment:{},interlocking:{},reflectivity:{},consolidation:{},hundredweight:{},magnetisation:{},magnetization:{},regurgitation:{},sheepshearing:{},transmutation:{},conglomeration:{},materialisation:{},optic:{},patty:{},prune:{},saute:{},scalp:{},sinus:{},swill:{},bubbly:{},burgoo:{},choler:{},claret:{},cortex:{},crotch:{},drivel:{},frappe:{},hiatus:{},kosher:{},legume:{},macula:{},phlegm:{},pickle:{},stemma:{},thenar:{},tiptoe:{},adrenal:{},anatomy:{},confect:{},freckle:{},jugular:{},knuckle:{},mastoid:{},medulla:{},pudding:{},takeout:{},thyroid:{},tonsure:{},wassail:{},anterior:{},coloring:{},julienne:{},libation:{},rhomboid:{},sandwich:{},takeaway:{},appendage:{},chocolate:{},colouring:{},endocrine:{},hamstring:{},moonshine:{},permanent:{},recessive:{},turbinate:{},confection:{},hemisphere:{},ingredient:{},spatchcock:{},sweetening:{},convolution:{},pneumogastric:{},os:{},cos:{},cud:{},sup:{},caul:{},chaw:{},chin:{},chou:{},curd:{},cyst:{},fizz:{},jowl:{},mane:{},milt:{},perm:{},snot:{},sorb:{},sura:{},taco:{},booze:{},broth:{},caput:{},chili:{},cocoa:{},costa:{},cress:{},dough:{},eater:{},fanny:{},fondu:{},hyoid:{},loins:{},lolly:{},lumen:{},mamma:{},mummy:{},pasta:{},plasm:{},porgy:{},puree:{},quaff:{},quark:{},sinew:{},thigh:{},tripe:{},tummy:{},areola:{},banana:{},booger:{},bowleg:{},brunch:{},carpal:{},cervix:{},citrus:{},comfit:{},dactyl:{},dorsum:{},edible:{},flitch:{},fondue:{},fornix:{},gammon:{},herbal:{},lambda:{},malted:{},marcel:{},millet:{},monggo:{},noodle:{},paring:{},pastry:{},pelvis:{},simnel:{},spleen:{},tarsal:{},tensor:{},tipple:{},waffle:{},wonton:{},abdomen:{},adenoid:{},auricle:{},biscuit:{},brownie:{},clabber:{},criollo:{},croaker:{},cubitus:{},deltoid:{},dentine:{},dietary:{},eyeball:{},fistula:{},forearm:{},fritter:{},gherkin:{},haircut:{},headful:{},hyaloid:{},iceberg:{},isthmus:{},kneecap:{},lacteal:{},lasagna:{},lasagne:{},lozenge:{},marmite:{},midriff:{},oatmeal:{},ocellus:{},pageboy:{},paprika:{},pathway:{},pottage:{},prepuce:{},pumpkin:{},ramekin:{},ratafia:{},roulade:{},sausage:{},seltzer:{},serving:{},sidecar:{},slobber:{},sorghum:{},stirrup:{},sultana:{},teacake:{},timbale:{},toenail:{},topping:{},tostada:{},trachea:{},treacle:{},twister:{},vintage:{},abducent:{},abductor:{},afferent:{},alveolus:{},appendix:{plural:"appendices"},astragal:{},bicuspid:{},blowfish:{},blowhole:{},bouffant:{},capitate:{},chowchow:{},cobblers:{},cocktail:{},coquille:{},couscous:{},doughboy:{},doughnut:{},dumpling:{},efferent:{},eminence:{},exocrine:{},fascicle:{},flatfish:{},flatfoot:{},flummery:{},forehead:{},foreskin:{},hairline:{},honeydew:{},licorice:{},ligament:{},lollipop:{},macaroni:{},mackerel:{},marinade:{},membrane:{},monstera:{},mouthful:{},muscatel:{},pheasant:{},physique:{},potation:{},prostate:{},ramequin:{},receptor:{},sillabub:{},sinusoid:{},smoothie:{},specimen:{},streusel:{},stuffing:{},syllabub:{},teardrop:{},venation:{},windfall:{},abdominal:{},apparatus:{},blueberry:{},casserole:{},corpuscle:{},cranberry:{},demitasse:{},dentition:{},drinkable:{},drumstick:{},epiphysis:{},flageolet:{},fricassee:{},hamburger:{},labyrinth:{},lifeblood:{},lineament:{},liquorice:{},mastoidal:{},maxillary:{},navicular:{},pituitary:{},pompadour:{},provender:{},purulence:{},shellfish:{},spaghetti:{},spareribs:{},splayfoot:{},spoilable:{},sundowner:{},sweetener:{},trapezium:{},trapezoid:{},umbilical:{},ventricle:{},vestibule:{},zygomatic:{},applesauce:{},autoplasty:{},blackheart:{},breadstuff:{},cheesecake:{},comestible:{},gastronomy:{},hotchpotch:{},interstice:{},jawbreaker:{},kitambilla:{},maraschino:{},metacarpal:{},metatarsal:{},passageway:{},perishable:{},salmagundi:{},shortening:{},articulator:{},excrescence:{},grasshopper:{},griddlecake:{},intercostal:{},longanberry:{},nourishment:{},screwdriver:{},smorgasbord:{},spindlelegs:{},checkerberry:{},perspiration:{},spindleshanks:{},parasympathetic:{},ab:{},ade:{},ale:{},bap:{},bun:{},jak:{},lat:{},lox:{},pes:{},pie:{},poi:{},pud:{},pus:{},tum:{},vas:{},veg:{},anus:{},arak:{},axon:{},baba:{},bile:{},bleb:{},bleu:{},bock:{},bosc:{},choc:{},clit:{},cola:{},coxa:{},crus:{},cuke:{},duff:{},dura:{},edda:{},eggs:{},fist:{},flab:{},flan:{},fugu:{},genu:{},ghee:{},glia:{},grog:{},isaw:{},java:{},kava:{},marc:{},mayo:{},mead:{},miso:{},mons:{},naan:{},nape:{},nipa:{},oleo:{},orzo:{},ouzo:{},ovum:{},pecs:{},pita:{},pone:{},pons:{},porc:{},rete:{},rima:{},rind:{},roux:{},ruga:{},rusk:{},slaw:{},sops:{},suet:{},tofu:{},ugli:{},ulna:{},umbo:{},uvea:{},veal:{},veau:{},vena:{},vino:{},womb:{},ziti:{},zona:{},ackee:{},adobo:{},aioli:{},anjou:{},ankle:{},annon:{},aorta:{},arcus:{},aspic:{},atole:{},axone:{},babka:{},bacon:{},bagel:{},bialy:{},bigos:{},bitok:{},blanc:{},blini:{},bliny:{},boeuf:{},borsh:{},bowel:{},bursa:{},butty:{},cauda:{},cavum:{},cecum:{},celom:{},chips:{},chyle:{},cider:{},congo:{},copra:{},cornu:{},cuppa:{},cutis:{},cyder:{},cytol:{},decaf:{},donut:{},facia:{},femur:{},filum:{},flews:{},fovea:{},fries:{},gigot:{},gland:{},glans:{},gleet:{},glogg:{},glute:{},gonad:{},goody:{},grist:{},grits:{},gruel:{},gyrus:{},hilus:{},hoagy:{},hooch:{},hooks:{},hymen:{},hyson:{},ileum:{},ilium:{},incus:{},inion:{},jello:{},julep:{},kabob:{},kasha:{},kebab:{},knish:{},kumis:{},kvass:{},lansa:{},latke:{},latte:{},lichi:{},limpa:{},lymph:{},macon:{},manus:{},matzo:{},mucus:{},nacho:{},naris:{},nates:{},negus:{},offal:{},ootid:{},pekoe:{},penis:{},penne:{},perry:{},pesto:{},pilaf:{},pinky:{},pizza:{},plica:{},porta:{},pruno:{},psoas:{},pubis:{},quiff:{},raita:{},ramus:{},raphe:{},salmi:{},salsa:{},savoy:{},sebum:{},serum:{},sirup:{},skull:{},sperm:{},steak:{},sudor:{},sushi:{},taffy:{},tamal:{},tater:{},teeth:{},teres:{},tibia:{},titty:{},toddy:{},toffy:{},torso:{},torte:{},tress:{},uvula:{},vagus:{},viand:{},vodka:{},vomer:{},vulva:{},wrist:{},adnexa:{},afters:{},agnail:{},ananas:{},anlage:{},annexa:{},annona:{},antrum:{},armpit:{},arrack:{},axilla:{},baguet:{},beigel:{},biceps:{},bisque:{},blintz:{},bonbon:{},borsch:{},brazil:{},bregma:{},bulgur:{},burger:{},cachou:{},caecum:{},canape:{},canola:{},cardia:{},carina:{},carpus:{},casaba:{},catsup:{},caviar:{},chevre:{},chiasm:{},chilli:{},choana:{},coccyx:{},coelom:{},comedo:{},concha:{},confit:{},congou:{},corium:{},corpse:{},cupper:{},cuspid:{},cutlet:{},damson:{},danish:{},dermis:{},dewlap:{},dolmas:{},eclair:{},eggnog:{},eschar:{},eyelid:{},farina:{},fauces:{},fibula:{},finnan:{},flexor:{},fundus:{},gateau:{},geneva:{},giblet:{},glossa:{},gluten:{},goatee:{},gobbet:{},gonion:{},goober:{},graham:{},grappa:{},groats:{},gulyas:{},haggis:{},hairdo:{},hallah:{},hallux:{},hamate:{},haslet:{},hoagie:{},hominy:{},hommos:{},hootch:{},hotpot:{},huitre:{},hummus:{},inguen:{},intima:{},jambon:{},jugale:{},jumbal:{},karyon:{},kencur:{},kidney:{},kipper:{},kirsch:{},kishke:{},korlan:{},kummel:{},labium:{},lamina:{},lanseh:{},lanugo:{},larynx:{},lekvar:{},limbus:{},lingua:{},lobule:{},lochia:{},locule:{},lunule:{},matzoh:{},meatus:{},meninx:{},milium:{},mohawk:{},mouton:{},mucosa:{},muesli:{},muffin:{},murphy:{},mutton:{},nasion:{},nervus:{},neuron:{},nougat:{},oculus:{},omelet:{},onyxis:{},oocyte:{},oolong:{},operon:{},organs:{},paczki:{},paella:{},palate:{},paries:{},pastis:{},paunch:{},pectus:{},phyllo:{},pilaff:{},pinkie:{},pinole:{},pirogi:{},pleura:{},plexus:{},pollex:{},polony:{},posset:{},potage:{},poteen:{},potion:{},potpie:{},poulet:{},premix:{},pulque:{},purloo:{},quiche:{},rectum:{},rectus:{},repast:{},retina:{},rhaphe:{},ribier:{},rickey:{},rotgut:{},sacrum:{},salami:{},saliva:{},samosa:{},sapota:{},scampi:{},scampo:{},sclera:{},scruff:{},seckel:{},serosa:{},shandy:{},sherry:{},silage:{},skilly:{},smegma:{},soleus:{},sorbet:{},sputum:{},stapes:{},stodge:{},succus:{},sulcus:{},sundae:{},sutura:{},tahini:{},tamale:{},tarsus:{},tendon:{},testis:{},thymus:{},tidbit:{},tiffin:{},tisane:{},titbit:{},toffee:{},tonsil:{},tragus:{},troche:{},tubule:{},tunica:{},unguis:{},ureter:{},uterus:{},vagina:{},veggie:{},venula:{},venule:{},vermis:{},vesica:{},viscus:{},vitals:{},waters:{},whisky:{},wiener:{},yogurt:{},zaatar:{},zonula:{},zonule:{},zygoma:{},zygote:{},absinth:{},akvavit:{},aniseed:{},aquavit:{},arteria:{},ashcake:{},baklava:{},bannock:{},beignet:{},keen:{},rage:{},wish:{},aside:{},chafe:{},gloss:{},tense:{},whole:{},worry:{},effect:{},reject:{},riddle:{},snatch:{},speech:{},closure:{},collect:{},romance:{},flourish:{},classical:{},influence:{},substance:{},reflection:{},inclination:{},recognition:{},dot:{},nod:{},blur:{},itch:{},slur:{},solo:{},wink:{},abuse:{},acute:{},alert:{},angle:{},bluff:{},cheer:{},honor:{},humor:{},lyric:{},snarl:{},tally:{},accent:{},degree:{},detail:{},indent:{},matter:{},patent:{},rubric:{},thrill:{},abandon:{},bluster:{},concern:{},concord:{},formula:{plural:"formulae"},imprint:{},nominal:{},quality:{},reading:{},sputter:{},torture:{},wrinkle:{},contrast:{},estimate:{},harmonic:{},judgment:{},reaction:{},sanction:{},singular:{},straddle:{},construct:{},judgement:{},reflexion:{},rendering:{},universal:{},acceptance:{},discipline:{},irritation:{},regulation:{},relaxation:{},submission:{},application:{},replication:{},construction:{},introduction:{},presentation:{},cant:{},code:{},joke:{},pain:{},stab:{},trot:{},will:{},blame:{},brief:{},dodge:{},fancy:{},glide:{},grasp:{},guess:{},quote:{},scent:{},slant:{},snort:{},swoop:{},theme:{},trial:{},vocal:{},accord:{},affect:{},cancel:{},debate:{},desire:{},heroic:{},murmur:{},phrase:{},resume:{},scream:{},serial:{},tangle:{},closing:{},dissent:{},drawing:{},example:{},exhibit:{},fatigue:{},feeling:{},mention:{},partial:{},posture:{},protest:{},regress:{},telling:{},welcome:{},absolute:{},analysis:{plural:"analyses"},distress:{},pastoral:{},platform:{},temporal:{},agreement:{},attention:{},beginning:{},closeness:{},connexion:{},dimension:{},discourse:{},lightness:{},principle:{},surrender:{},assignment:{},coordinate:{},involution:{},abstraction:{},arrangement:{},conjunction:{},declaration:{},penetration:{},proposition:{},realisation:{},realization:{},condensation:{},consideration:{},no:{},cue:{},fun:{},rub:{},bias:{},gift:{},hoot:{},jazz:{},oral:{},snub:{},text:{},tune:{},urge:{},coast:{},craze:{},daily:{},debut:{},dowse:{},funny:{},logic:{},mercy:{},peace:{},rerun:{},samba:{},slang:{},taboo:{},verse:{},whine:{},words:{},aspect:{},babble:{},canker:{},choice:{},clamor:{},denial:{},device:{},esteem:{},format:{},lament:{},manual:{},menace:{},normal:{},pardon:{},regret:{},skinny:{},sorrow:{},tickle:{},twinge:{},vision:{},warmth:{},caution:{},charter:{},conceit:{},cunning:{},delight:{},dictate:{},discord:{},finance:{},harmony:{},keynote:{},knowing:{},leaning:{},lecture:{},mistake:{},musical:{},offense:{},palaver:{},preempt:{},purpose:{},pyrrhic:{},realism:{},sharing:{},texture:{},worship:{},writing:{},aspirate:{},biweekly:{},blessing:{},citation:{},despatch:{},dullness:{},feminine:{},flatness:{},geminate:{},manifest:{},personal:{},pleasure:{},politics:{},singsong:{},yielding:{},agitation:{},attrition:{},bimonthly:{},broadcast:{},confusion:{},deviation:{},disregard:{},education:{},faintness:{},heaviness:{},imitation:{},indenture:{},interview:{},isolation:{},isometric:{},minuscule:{},portrayal:{},predicate:{},provision:{},screaming:{},signature:{},spiritual:{},throwaway:{},tightness:{},accounting:{},aggression:{},assumption:{},attraction:{},commercial:{},compromise:{},confession:{},confidence:{},conformity:{},conveyance:{},detachment:{},difference:{},discretion:{},imperative:{},mellowness:{},modulation:{},tenderness:{},uneasiness:{},awkwardness:{},discernment:{},elimination:{},endorsement:{},examination:{},fabrication:{},familiarity:{},implication:{},indorsement:{},involvement:{},observation:{},obstruction:{},performance:{},requisition:{},sensitivity:{},testimonial:{},appreciation:{},articulation:{},condemnation:{},confirmation:{},deliberation:{},intervention:{},satisfaction:{},confrontation:{},decomposition:{},determination:{},reinforcement:{},understanding:{},characteristic:{},correspondence:{},sophistication:{},transformation:{},rationalisation:{},rationalization:{},dub:{},fog:{},bold:{},buoy:{},dare:{},daze:{},envy:{},gape:{},okay:{},plus:{},rasp:{},rime:{},role:{},tabu:{},yell:{},above:{},affix:{},agape:{},chord:{},croak:{},doubt:{},email:{},essay:{},folly:{},idiom:{},laugh:{},modal:{},panic:{},posit:{},rhyme:{},rider:{},rumba:{},scare:{},scorn:{},sneer:{},trill:{},truth:{},wince:{},adagio:{},binary:{},daring:{},defeat:{},dismay:{},docket:{},filing:{},flavor:{},giving:{},gospel:{},lesson:{},median:{},neuter:{},notion:{},parody:{},parole:{},plight:{},rebuff:{},rhumba:{},sample:{},shiver:{},solace:{},trance:{},unseen:{},vanity:{},vector:{},amnesty:{},anguish:{},arousal:{},bucolic:{},caption:{},catalog:{},contour:{},descant:{},disdain:{},dispute:{},fantasy:{},flavour:{},glimpse:{},insight:{},languor:{},licence:{},marking:{},overbid:{},prelude:{},probate:{},purport:{},pursuit:{},reality:{},receipt:{},recital:{},riposte:{},splurge:{},sticker:{},summons:{},wrangle:{},approval:{},buoyancy:{},converse:{},coolness:{},covenant:{},crotchet:{},devotion:{},dialogue:{},emphasis:{},esthetic:{},excision:{},fairness:{},fixation:{},forecast:{},hieratic:{},identity:{},illusion:{},integral:{},monotone:{},offering:{},paradigm:{},premiere:{},printing:{},referent:{},rescript:{},research:{},rhetoric:{},schedule:{},skimming:{},sleeping:{},speaking:{},splutter:{},streamer:{},tendency:{},topology:{},vexation:{},wildness:{},adjective:{},aesthetic:{},assurance:{},burlesque:{},catalogue:{},correlate:{},detection:{},discovery:{},dismissal:{},exclusion:{},exclusive:{},expansion:{},impromptu:{},inaugural:{},indicator:{},intensive:{},interdict:{},largeness:{},masculine:{},paragraph:{},partitive:{},pragmatic:{},prevision:{},quarterly:{},quotation:{},readiness:{},rendition:{},reverence:{},roundness:{},safeguard:{},suspicion:{},sweetness:{},thickness:{},trademark:{},antagonism:{},aspiration:{},bitterness:{},coarseness:{},collection:{},conjecture:{},deposition:{},estimation:{},excitement:{},gloominess:{},impossible:{},incitement:{},invocation:{},inwardness:{},literature:{},morphology:{},narrowness:{},nominative:{},observance:{},possessive:{},postmortem:{},preemption:{},preference:{},profession:{},profundity:{},recitation:{},redundancy:{},abnormality:{},acquisition:{},affirmation:{},affirmative:{},alternative:{},bombardment:{},commutation:{},concurrence:{},convergence:{},countenance:{},disposition:{},distinction:{},distraction:{},enlargement:{},expectation:{},fingerprint:{},indentation:{},instruction:{},nationalism:{},possibility:{},presumption:{},publication:{},spectacular:{},speculation:{},substantive:{},superlative:{},unconscious:{},unitisation:{},unitization:{},anticipation:{},apprehension:{},circumstance:{},continuation:{},coordination:{},countercheck:{},distribution:{},hieroglyphic:{},illustration:{},intimidation:{},misdirection:{},overestimate:{},precondition:{},renunciation:{},approximation:{},authorisation:{},authorization:{},certification:{},falsification:{},interrogative:{},nonconformity:{},reduplication:{},sensitiveness:{},sequestration:{},superposition:{},underestimate:{},capitalisation:{},capitalization:{},generalisation:{},generalization:{},perceptiveness:{},recapitulation:{},sensationalism:{},awe:{},bop:{},ego:{},hex:{},jot:{},lit:{},nub:{},vow:{},beta:{},brag:{},clue:{},cull:{},elan:{},epic:{},funk:{},fury:{},gibe:{},hymn:{},jibe:{},leer:{},lust:{},mood:{},oath:{},pang:{},plea:{},quip:{},rant:{},riff:{},visa:{},zeal:{},zest:{},alibi:{},badge:{},basis:{plural:"bases"},bravo:{},carol:{},chant:{},chaos:{},conga:{},delta:{},demur:{},dread:{},fable:{},flair:{},fugue:{},given:{},gloat:{},gloom:{},hunch:{},infix:{},irony:{},largo:{},least:{},libel:{},magic:{},moral:{},polka:{},reply:{},sally:{},spiel:{},spook:{},stymy:{},tango:{},usage:{},velar:{},vigil:{},whoop:{},affair:{},airing:{},ardour:{},ballot:{},bathos:{},beauty:{},bellow:{},bowing:{},curtsy:{},deceit:{},dental:{},dialog:{},gambit:{},gibber:{},grudge:{},halloo:{},insult:{},intent:{},italic:{},kowtow:{},labial:{},latest:{},manner:{},mumble:{},naming:{},outcry:{},pathos:{},piffle:{},plural:{},policy:{},praise:{},raving:{},rehash:{},revise:{},scalar:{},scroll:{},seeing:{},shriek:{},sonnet:{},stymie:{},tattle:{},theory:{},tingle:{},tumult:{},upbeat:{},urging:{},wangle:{},weekly:{},wheeze:{},yearly:{},acclaim:{},acidity:{},airmail:{},analogy:{},apology:{},barrage:{},barrier:{},bidding:{},bonding:{},buildup:{},cadence:{},cartoon:{},censure:{},clutter:{},concert:{},cruelty:{},despair:{},disgust:{},dodging:{},earmark:{},embargo:{},enquiry:{},erasure:{},eristic:{},fluency:{},gradual:{},gravity:{},initial:{},inquiry:{},lingual:{},loyalty:{},mastery:{},mimesis:{},monthly:{},numeral:{},omnibus:{},outlook:{},palatal:{},placard:{},polemic:{},posting:{},presage:{},preview:{},quibble:{},refrain:{},reissue:{},reorder:{},reprint:{},rewrite:{},roundup:{},singing:{},slander:{},sorting:{},tasting:{},tribute:{},turmoil:{},whisper:{},ablative:{},acridity:{},allegory:{},alveolar:{},ambition:{},ascender:{},audition:{},binomial:{},brandish:{},brooding:{},bundling:{},calculus:{},circular:{},clipping:{},coldness:{},courtesy:{},critique:{},daydream:{},defiance:{},delusion:{},demurrer:{},disfavor:{},disquiet:{},dynamism:{},easiness:{},equation:{},fondness:{},grasping:{},grouping:{},guidance:{},guttural:{},hornpipe:{},hysteria:{},idealism:{},intimacy:{},mistrust:{},monition:{},negation:{},nickname:{},nihilism:{},notation:{},ordinate:{},outburst:{},particle:{},passport:{},pedagogy:{},petition:{},phantasy:{},planning:{},playbook:{},proposal:{},revision:{},rhapsody:{},ridicule:{},sampling:{},serenade:{},slowness:{},sourness:{},subtitle:{},suspense:{},sympathy:{},tartness:{},teaching:{},theology:{},travesty:{},universe:{},acuteness:{},addiction:{},adoration:{},attending:{},autograph:{},constancy:{},crispness:{},cuneiform:{},deception:{},defensive:{},denseness:{},dialectic:{},dictation:{},digestion:{},diplomacy:{},disfavour:{},editorial:{},emulation:{},enactment:{},evocation:{},fecundity:{},footprint:{},formalism:{},formative:{},gradation:{},grievance:{},grumbling:{},guideline:{},immediacy:{},insurance:{},intention:{},intercept:{},invariant:{},itinerary:{},lassitude:{},majuscule:{},misgiving:{},monologue:{},morbidity:{},murmuring:{},narration:{},nutrition:{},ordinance:{},oversight:{},pictorial:{},pizzicato:{},prejudice:{},quadratic:{},quickness:{},quickstep:{},reckoning:{},reflexive:{},rejoicing:{},repulsion:{},retention:{},retrieval:{},revealing:{},saltiness:{},schooling:{},sentience:{},sulkiness:{},synthesis:{},testament:{},testimony:{},underline:{},undertone:{},accidental:{},accusative:{},adaptation:{},admiration:{},affixation:{},allurement:{},anatomical:{},antiphonal:{},asceticism:{},belittling:{},brightness:{},brilliance:{},chronology:{},classified:{},cleverness:{},clumsiness:{},cognizance:{},compliment:{},concession:{},conscience:{},conspiracy:{},contention:{},continuity:{},decoration:{},determiner:{},deterrence:{},digression:{},diminution:{},discontent:{},dissection:{},dissonance:{},divination:{},empiricism:{},enthusiasm:{},enticement:{},equivalent:{},execration:{},fortissimo:{},grogginess:{},hesitation:{},humbleness:{},hypostasis:{},hypothesis:{plural:"hypotheses"},impatience:{},infliction:{},insistence:{},instalment:{},intermezzo:{},jocularity:{},loneliness:{},neutrality:{},nomination:{},oppression:{},perfection:{},pestilence:{},philosophy:{},precaution:{},pretension:{},propensity:{},refutation:{},reputation:{},revelation:{},rumination:{},salutation:{},semiweekly:{},stigmatism:{},theatrical:{},triviality:{},underscore:{},unfairness:{},vernacular:{},vocabulary:{},whispering:{},acceptation:{},advancement:{},aggravation:{},appellative:{},benevolence:{},calculation:{},comparative:{},concordance:{},conjunctive:{},conjuration:{},correlation:{},correlative:{},countersign:{},denigration:{},designation:{},discourtesy:{},documentary:{},electricity:{},enchantment:{},engrossment:{},exclamation:{},explanation:{},exploration:{},foolishness:{},frustration:{},imperialism:{},infatuation:{},inscription:{},jactitation:{},obfuscation:{},outwardness:{},peculiarity:{},playfulness:{},presentment:{},propagation:{},provocation:{},rationalism:{},regionalism:{},repudiation:{},resignation:{},rotogravure:{},semimonthly:{},sensibility:{},seriousness:{},stipulation:{},strangeness:{},subcontract:{},supposition:{},syncopation:{},titillation:{},tranquility:{},unorthodoxy:{},unsoundness:{},valedictory:{},breakthrough:{},choreography:{},conciliation:{},constitution:{},consultation:{},counterpoint:{},covetousness:{},depreciation:{},faultfinding:{},heedlessness:{},helplessness:{},idealisation:{},idealization:{},impertinence:{},intoxication:{},irritability:{},mercifulness:{},notification:{},pacification:{},processional:{},promulgation:{},proportional:{},recollection:{},retroflexion:{},retroversion:{},significance:{},solicitation:{},spiritualism:{},stupefaction:{},supplication:{},transference:{},acculturation:{},attentiveness:{},communication:{},comprehensive:{},condescension:{},contradiction:{},demonstrative:{},determinative:{},documentation:{},hallucination:{},impersonation:{},individualism:{},interpolation:{},orchestration:{},preoccupation:{},prevarication:{},qualification:{},retentiveness:{},retroflection:{},structuralism:{},symbolisation:{},symbolization:{},versification:{},aggressiveness:{},categorisation:{},demoralisation:{},demoralization:{},farsightedness:{},predisposition:{},recommendation:{},reconstruction:{},sesquipedalian:{},simplification:{},traditionalism:{},conventionality:{},crystallization:{},personification:{},prognostication:{},characterization:{},predetermination:{},pi:{},xi:{},boo:{},bye:{},dit:{},fib:{},ire:{},ken:{},nay:{},pic:{},psi:{},pun:{},wai:{},woe:{},yea:{},blip:{},blog:{},deed:{},demo:{},epos:{},gist:{},grin:{},heed:{},idyl:{},iota:{},jive:{},moan:{},muse:{},norm:{},noun:{},nous:{},odor:{},pean:{},ploy:{},pomp:{},quiz:{},sass:{},sext:{},spam:{},sulk:{},surd:{},tale:{},trig:{},vlog:{},whim:{},yack:{},yoga:{},agony:{},alias:{},aroma:{},axiom:{},bebop:{},blues:{},bonus:{},canto:{},codex:{},creed:{},ditto:{},dogma:{},drawl:{},edict:{},ethic:{},facet:{},fever:{},frown:{},gamma:{},gamut:{},grief:{},groan:{},guilt:{},intro:{},kotow:{},macro:{},odour:{},omega:{},paean:{},pavan:{},peeve:{},prate:{},primo:{},prose:{},psalm:{},qualm:{},retro:{},rumor:{},savvy:{},scowl:{},shrug:{},skill:{},smirk:{},danger:{},push:{},refusal:{},tooling:{}},verbs:{import:{},call:{},test:{},contain:{},extend:{},use:{},depend:{prep:"on"},rely:{prep:"on"},inherit:{prep:"from"},belong:{prep:"to"},point:{prep:"to"},implement:{},override:{},export:{},define:{},declare:{},reference:{},invoke:{},wrap:{},mock:{},cover:{},document:{},describe:{},modify:{},touch:{},fix:{},break:{},introduce:{},deprecate:{},replace:{},own:{},maintain:{},review:{},merge:{},revert:{},deploy:{},run:{},execute:{},load:{},parse:{},emit:{},validate:{},log:{},throw:{},catch:{},create:{},delete:{},update:{},expose:{},consume:{},produce:{},generate:{},configure:{},install:{},publish:{},release:{},ship:{},watch:{},trigger:{},build:{},write:{},read:{},have:{},like:{},want:{},need:{},believe:{},trust:{},love:{},hate:{},fear:{},hope:{},teach:{},learn:{},drive:{},cook:{},sing:{},visit:{},care:{},grow:{},marry:{},wear:{},eat:{},sleep:{},walk:{},buy:{},sell:{},give:{},take:{},meet:{},ride:{},speak:{},duck:{}},adjectives:{legacy:{type:"subclass"},mock:{type:"subclass"},senior:{type:"subclass"},internal:{type:"subclass"},external:{type:"subclass"},public:{type:"subclass"},private:{type:"subclass"},abstract:{type:"subclass"},static:{type:"subclass"},async:{type:"subclass"},experimental:{type:"subclass"},stable:{type:"subclass"},core:{type:"subclass"},shared:{type:"subclass"},global:{type:"subclass"},local:{type:"subclass"},generated:{type:"subclass"},standalone:{type:"subclass"},primary:{type:"subclass"},secondary:{type:"subclass"},deprecated:{type:"data"},fast:{type:"data"},slow:{type:"data"},large:{type:"data"},small:{type:"data"},flaky:{type:"data"},tested:{type:"data"},documented:{type:"data"},buggy:{type:"data"},broken:{type:"data"},green:{type:"data"},deterministic:{type:"data"},pure:{type:"data"},empty:{type:"data"},stale:{type:"data"},male:{type:"data"},female:{type:"data"},young:{type:"data"},old:{type:"data"},hot:{type:"data"},cold:{type:"data"},sweet:{type:"data"},salty:{type:"data"},sharp:{type:"data"},round:{type:"data"},tall:{type:"data"},short:{type:"data"},happy:{type:"data"},sad:{type:"data"},angry:{type:"data"},afraid:{type:"data"},strong:{type:"data"},weak:{type:"data"},rich:{type:"data"},poor:{type:"data"},hard:{type:"data"},soft:{type:"data"},wild:{type:"data"},gentle:{type:"data"},colorful:{type:"data"},legitimate:{type:"data"},ranked:{type:"data"},related:{type:"data"},sacred:{type:"data"},unaffected:{type:"data"}},properNames:["tmct","Node","npm","JavaScript","TypeScript","Python","Java","Git","GitHub","GitLab","ESLint","Linux","macOS","Windows","Polycode","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]}});function Bk(e){let t=String(e),n=[t];return t.length>4&&/[a-z]ies$/.test(t)&&n.push(`${t.slice(0,-3)}y`),/(ses|xes|zes|ches|shes)$/.test(t)&&n.push(t.slice(0,-2)),/[a-z]s$/.test(t)&&!/ss$/.test(t)&&n.push(t.slice(0,-1)),t==="has"&&n.push("have"),n}function Ym(e,t={}){for(let[n,s]of Object.entries(t.nouns||{})){let o={lemma:n,...s||{}};if(o.property&&!Wk.has(o.property))throw new Error(`lexicon noun "${n}": property must be "data" or "object", got ${JSON.stringify(o.property)}`);e.nouns.set(n,o),o.plural&&e.nounPlurals.set(o.plural,n)}for(let[n,s]of Object.entries(t.verbs||{}))e.verbs.set(n,{lemma:n,...s||{}});for(let[n,s]of Object.entries(t.adjectives||{})){let o={lemma:n,...s||{}};if(!qk.has(o.type))throw new Error(`lexicon adjective "${n}": type must be "subclass" or "data", got ${JSON.stringify(o.type)}`);e.adjectives.set(n,o)}for(let n of t.properNames||[])e.properNames.set(String(n).toLowerCase(),String(n))}function Ds(e,t=Uk){if(!e&&tl.has(t))return tl.get(t);let n=Km,s={nouns:new Map,nounPlurals:new Map,verbs:new Map,adjectives:new Map,properNames:new Map,ns:t};return Ym(s,n),e?(Ym(s,e),s):(tl.set(t,s),s)}function hr(e,t,n={}){return Gk(e,t,n)[0]??null}function Gk(e,t,n={}){let s=String(t??"").toLowerCase(),o=e.nouns.get(s),r=e.nounPlurals.get(s),i=[],a=new Set,l=c=>{c&&!a.has(c.lemma)&&(a.add(c.lemma),i.push(c))};if(r){let c=e.nouns.get(r)??null;return n.singularOnly&&o?(l(o),l(c)):(l(c),l(o)),i}for(let c of Bk(s))l(e.nouns.get(c));return i}var Uk,PO,FO,DO,Wk,qk,tl,ko=L(()=>{Hm();Uk="tmct:",PO=Object.freeze({every:"universal",a:"indefinite",an:"indefinite",the:"definite",no:"negative"}),FO=Object.freeze({"at least":"owl:minCardinality","at most":"owl:maxCardinality",exactly:"owl:cardinality"}),DO=Object.freeze({one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10});Wk=new Set(["data","object"]),qk=new Set(["subclass","data"]);tl=new Map});var Xm=L(()=>{});var qO,GO,VO,Vk,HO,KO,YO,Jm=L(()=>{ns();Ce();qO=Object.freeze({class:"Class",module:"Module",function:"Function",method:"Method",attribute:"Attribute",variable:"GlobalVariable",constant:"GlobalVariable",commit:"Commit"}),GO=Object.freeze({Class:["class","classes"],Module:["module","modules"],Function:["function","functions"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"]}),VO=Object.freeze({Class:[e=>`which classes inherit from ${e}`,e=>`what does ${e} contain`,e=>`where is ${e} defined`],Module:[e=>`what does ${e} import`,e=>`which modules import ${e}`,e=>`where is ${e} defined`],Function:[e=>`what calls ${e}`,e=>`what does ${e} call`,e=>`where is ${e} defined`],Method:[e=>`which class contains ${e}`,e=>`what calls ${e}`,e=>`where is ${e} defined`],Attribute:[e=>`which class contains ${e}`,e=>`where is ${e} defined`],GlobalVariable:[e=>`where is ${e} defined`,e=>`where is ${e} mentioned`],Commit:[e=>`what did commit ${e} touch`,e=>`when did ${e} change`]}),Vk=Object.freeze({import:"imports",imports:"imports",importing:"imports",imported:"imports",call:"calls",calls:"calls",calling:"calls",called:"calls",invoke:"calls",invokes:"calls",invoking:"calls",contain:"contains",contains:"contains",containing:"contains",containment:"contains",member:"contains",members:"contains",inherit:"inherits",inherits:"inherits",inheriting:"inherits",inheritance:"inherits",extend:"inherits",extends:"inherits",extending:"inherits",subclass:"inherits",subclasses:"inherits",subclassing:"inherits",test:"tests",tests:"tests",testing:"tests",tested:"tests",coverage:"tests",define:"defines",defines:"defines",defining:"defines",defined:"defines",definition:"defines",definitions:"defines",declaration:"defines",touch:"touches",touches:"touches",touching:"touches",touched:"touches",cochange:"cochange","co-change":"cochange","change-coupling":"cochange",coupled:"cochange",export:"reexports",exports:"reexports",exporting:"reexports",exported:"reexports",reexport:"reexports",reexports:"reexports",reexporting:"reexports","re-export":"reexports","re-exports":"reexports","re-exporting":"reexports"}),HO=Object.freeze({imports:["imports"],calls:["calls","callsSymbol"],contains:["contains"],inherits:["inherits"],tests:["tests"],defines:["defines"],touches:["touches","touchesSymbol"],cochange:["cochange"],reexports:["reexports"]}),KO=Object.freeze({imports:{verb:"imports",edgeNoun:"import"},calls:{verb:"calls",edgeNoun:"call"},contains:{verb:"contains",edgeNoun:"containment"},inherits:{verb:"inherits from",edgeNoun:"inheritance"},tests:{verb:"tests",edgeNoun:"test"},defines:{verb:"defines",edgeNoun:"definition"},touches:{verb:"touches",edgeNoun:"touch"},cochange:{verb:"changes together with",edgeNoun:"change-coupling"},reexports:{verb:"re-exports",edgeNoun:"re-export"}}),YO=Object.freeze({imports:[{side:"obj",make:e=>`which modules import ${e}`},{side:"subj",make:e=>`what does ${e} import`}],calls:[{side:"obj",make:e=>`what calls ${e}`},{side:"subj",make:e=>`what does ${e} call`}],contains:[{side:"subj",make:e=>`what does ${e} contain`},{side:"obj",make:e=>`which class contains ${e}`}],inherits:[{side:"obj",make:e=>`which classes inherit from ${e}`},{side:"subj",make:e=>`where is ${e} defined`}],tests:[{side:"obj",make:e=>`what tests ${e}`},{side:"obj",make:e=>`where is ${e} defined`}],defines:[{side:"obj",make:e=>`where is ${e} defined`},{side:"subj",make:e=>`what does ${e} contain`}],touches:[{side:"obj",make:e=>`when did ${e} change`},{side:"subj",make:e=>`what did commit ${e} touch`}],cochange:[{side:"obj",make:e=>`where is ${e} defined`},{side:"subj",make:e=>`which modules import ${e}`}],reexports:[{side:"subj",make:e=>`what does ${e} export`},{side:"obj",make:e=>`where is ${e} defined`}]})});var Si=L(()=>{cn();ko();Jm()});var ji,_i=L(()=>{ji=()=>{throw new Error("gunzipSync unavailable in a browser bundle")}});var Kk,cL,Qm=L(()=>{Fs();_i();cs();De();Si();Kk={},cL=Z($e(Dt(Kk.url)),"..","..","..")});var Zm=L(()=>{cn();ko();Si()});var Yk,nl=L(()=>{cn();ko();Yk=Object.freeze({fanoutLimit:5,maxDepth:1,maxTopics:12,minIntervalMs:2e3})});var eh=L(()=>{yt();De()});var sl=L(()=>{cn()});var Xk,OL,th=L(()=>{Fs();_i();cs();De();sl();cn();Xk={},OL=Z($e(Dt(Xk.url)),"..","..","..")});var NL,ML,PL,nh=L(()=>{NL=Object.freeze(["task","autoFeedback","alloFeedback","turnManagement","timeManagement","discourseStructuring","ownCommunicationManagement","partnerCommunicationManagement","socialObligationsManagement","contactManagement"]),ML=Object.freeze({propositionalQuestion:Object.freeze({dimension:"task",gloss:"a yes/no question about whether a proposition holds ('does X import Y?')"}),checkQuestion:Object.freeze({dimension:"task",gloss:"a yes/no question whose asker already expects the answer yes ('..., right?')"}),setQuestion:Object.freeze({dimension:"task",gloss:"a wh-question asking for the members of a set ('what does X import?')"}),choiceQuestion:Object.freeze({dimension:"task",gloss:"a question asking which of the listed alternatives holds ('is X a module or a class?')"}),inform:Object.freeze({dimension:"task",gloss:"a declarative telling the addressee something (a teach turn; also tmct explaining its own function)"}),answer:Object.freeze({dimension:"task",gloss:"an inform that discharges a question just asked (an answer grounded in the graph)"}),confirm:Object.freeze({dimension:"task",gloss:"an answer 'yes' to a check question"}),disconfirm:Object.freeze({dimension:"task",gloss:"an answer 'no' to a check question"}),agreement:Object.freeze({dimension:"task",gloss:"an inform stating that the speaker holds what the addressee just stated to be true"}),disagreement:Object.freeze({dimension:"task",gloss:"an inform stating that the speaker holds what the addressee just stated to be false"}),correction:Object.freeze({dimension:"task",gloss:"a disagreement that also supplies the replacement ('no, I meant Y')"}),request:Object.freeze({dimension:"task",gloss:"asks the addressee to perform an action ('solve it' \u2014 a goal turn)"}),instruct:Object.freeze({dimension:"task",gloss:"a request the addressee is expected to carry out without negotiation (a bare imperative)"}),suggestion:Object.freeze({dimension:"task",gloss:"puts an action forward as advisable without claiming authority over the addressee"}),offer:Object.freeze({dimension:"task",gloss:"commits the speaker to an action, conditional on the addressee wanting it"}),autoPositive:Object.freeze({dimension:"autoFeedback",gloss:"the sender reports its own processing of the previous turn succeeded (an acknowledgement)"}),autoNegative:Object.freeze({dimension:"autoFeedback",gloss:"the sender reports its own processing of the previous turn failed \u2014 tmct's honest miss"}),initialGreeting:Object.freeze({dimension:"socialObligationsManagement",gloss:"opens an exchange of greetings ('hi')"}),returnGreeting:Object.freeze({dimension:"socialObligationsManagement",gloss:"answers a greeting with a greeting"}),thanking:Object.freeze({dimension:"socialObligationsManagement",gloss:"expresses gratitude for something the addressee did"}),apology:Object.freeze({dimension:"socialObligationsManagement",gloss:"expresses regret for something the speaker did"})}),PL=Object.freeze({teach:"inform","ask-set":"setQuestion","ask-propositional":"propositionalQuestion",goal:"request",imperative:"instruct","honest-miss":"autoNegative",greeting:"initialGreeting",thanks:"thanking",help:"inform","game-answer":"answer","game-inform":"inform"})});function ol(e){let t=new Map;for(let[n,s]of e||[])!n||!s||n===s||(t.has(n)||t.set(n,new Set),t.get(n).add(s));return t}function oh(e,t,{cap:n=6}={}){let s=[e],o=new Set([e]),r=e;for(;s.length<n;){let i=[...t.get(r)||[]].filter(a=>!o.has(a)).sort();if(!i.length)break;r=i[0],o.add(r),s.push(r)}return s}function sh(e,t,{cap:n=64}={}){let s=new Set([e]),o=[e];for(;o.length&&s.size<n;){let r=o.shift();for(let i of t.get(r)||[])s.has(i)||(s.add(i),o.push(i))}return s}function rl(e,t,n,s){if(n.has(e))return n.get(e);if(s.has(e))return 1;s.add(e);let o=t.get(e),r=1;if(o&&o.size){let i=0;for(let a of o)i=Math.max(i,rl(a,t,n,s));r=i+1}return s.delete(e),n.set(e,r),r}function Jk(e){let t=new Map;for(let[n,s]of e||[])!n||!s||(t.has(n)||t.set(n,new Set),t.get(n).add(s),t.has(s)||t.set(s,new Set),t.get(s).add(n));return t}function Qk(e,t,n,s,o,{threshold:r,rootDepth:i,icByTerm:a}){let l=sh(e,n),c=sh(t,n);if(l.has(t)||c.has(e))return{distinct:!1,reason:"subsumes",lcs:l.has(t)?t:e};if(s.size)for(let g of l){let h=s.get(g);if(h){for(let b of c)if(h.has(b))return{distinct:!0,reason:"disjoint",lcs:null}}}let u=[...l].filter(g=>c.has(g));if(!u.length)return l.size<2||c.size<2?{distinct:!1,reason:"inconclusive",lcs:null}:{distinct:!0,reason:"non-intersecting",lcs:null};let d=g=>rl(g,n,o,new Set),m=u[0],p=d(m);for(let g of u){let h=d(g);(h>p||h===p&&g<m)&&(m=g,p=h)}if(p<=i)return{distinct:!0,reason:"root-subsumer",lcs:m};if(a){let g=a.get(m);return typeof g=="number"&&g<r?{distinct:!0,reason:"low-ic",lcs:m}:{distinct:!1,reason:"shared-lineage",lcs:m}}return 2*p/(d(e)+d(t))<r?{distinct:!0,reason:"shallow-subsumer",lcs:m}:{distinct:!1,reason:"shared-lineage",lcs:m}}function rh(e,{subClassEdges:t=[],parents:n=null,disjointEdges:s=[],threshold:o=.5,rootDepth:r=1,icByTerm:i=null}={}){let a=[...new Set((e||[]).filter(Boolean))],l=n||ol(t),c=Jk(s),u=new Map,d=new Map(a.map(y=>[y,y])),m=y=>{for(;d.get(y)!==y;)d.set(y,d.get(d.get(y))),y=d.get(y);return y},p=(y,w)=>{let v=m(y),k=m(w);v!==k&&d.set(v<k?k:v,v<k?v:k)},f=[];for(let y=0;y<a.length;y+=1)for(let w=y+1;w<a.length;w+=1){let v=Qk(a[y],a[w],l,c,u,{threshold:o,rootDepth:r,icByTerm:i});f.push({a:a[y],b:a[w],...v}),v.distinct||p(a[y],a[w])}let g=new Map;for(let y of a){let w=m(y);g.has(w)||g.set(w,[]),g.get(w).push(y)}let h=y=>rl(y,l,u,new Set),b=[...g.values()].map(y=>{let w=[...y].sort(),v=w[0],k=h(v);for(let $ of w){let T=h($);T>k&&(k=T,v=$)}return{objects:w,label:v}}).sort((y,w)=>y.label.localeCompare(w.label));return{split:b.length>1,clusters:b,pairs:f}}var ih=L(()=>{Ft()});function il(e){return typeof e=="string"&&Zk.test(e)}function ah(e){return!!e&&typeof e=="object"&&zs(e.s)}function al(e){return!!e&&typeof e=="object"&&e.kind==="fact"&&il(e.world)&&zs(e.subject)&&zs(e.predicate)&&zs(e.object)}function cl(e){if(!e||typeof e!="object"||e.kind!=="rule"||!il(e.world)||!zs(e.name)||!tE.has(e.ruleKind)||!e.slots||typeof e.slots!="object"||Array.isArray(e.slots))return!1;let t=Object.values(e.slots);return t.length>0&&t.every(zs)}function ll(e){return!!e&&typeof e=="object"&&e.kind==="meta"&&il(e.world)&&zs(e.opening)}function ch(e){return al(e)||cl(e)||ll(e)}function lh(e){let t=e||[],n=t.filter(c=>c.predicate===nE).sort((c,u)=>`${c.subject}\0${c.object}`.localeCompare(`${u.subject}\0${u.object}`));if(!n.length)return t;let s=new Set(t.filter(c=>c.predicate==="rdf:type").map(c=>c.subject)),o=new Map;for(let c of t)c.predicate==="mgx:located-in"&&o.set(c.subject,c.object);let r=(c,u)=>t.some(d=>d.predicate==="rdf:type"&&d.object===c&&o.get(d.subject)===u),i=t.find(c=>typeof c.world=="string"&&c.kind==="fact"),a=(c,u,d)=>({...i?{world:i.world,kind:"fact"}:{},subject:c,predicate:u,object:d}),l=[];for(let c of n){let u=c.subject,d=c.object;if(r(d,u))continue;let m=d,p=1;for(;s.has(m);)p+=1,m=`${d}-${p}`;s.add(m),l.push(a(m,"rdf:type",d)),l.push(a(m,"rdf:type","portable")),l.push(a(m,"mgx:located-in",u))}return l.length?[...t,...l]:t}var Zk,eE,tE,zs,nE,gr=L(()=>{Zk=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,eE=Object.freeze(["action-signature","action-precond","action-effect","action-constraint"]),tE=new Set(eE),zs=e=>typeof e=="string"&&e.trim()!=="";nE="mgx:default-contains"});var sE,oE,rE,iE,aE,cE,lE,uE,dE,XL,pE,uh,JL,QL,dh=L(()=>{ko();Uo();sE="subClassOf",oE="typeAssertion",rE="relation",iE="someValuesFrom",aE="cardinality",cE="disjointWith",lE="possessive",uE="adjective",dE="capability",XL=Object.freeze([sE,oE,rE,iE,aE,cE,lE,uE,dE]),pE=new Set(["go","take","drop","open","unlock","close","give","look","talk","examine"]),uh=new Map([["pick up","take"],["pick","take"],["grab","take"],["put down","drop"],["set down","drop"],["leave","drop"],["talk to","talk"],["speak to","talk"],["speak with","talk"],["talk","talk"],["speak","talk"],["chat with","talk"],["converse with","talk"],["look at","examine"],["examine","examine"],["inspect","examine"],["have a look at","examine"],["take a look at","examine"],["check out","examine"],["shut","close"]]),JL=Math.max(...[...uh.keys()].map(e=>e.split(" ").length)),QL=[...new Set([...pE,...[...uh.keys()].map(e=>e.split(" ")[0])])]});var Us=L(()=>{});var ul=L(()=>{Ce();ns();Us()});function St({name:e,label:t,question:n,params:s=[],preconditions:o=[],add:r=[],del:i=[]}){return Object.freeze({type:ls.Capability,name:e,label:t,question:n,readOnly:!0,parameters:Object.freeze(s),preconditions:Object.freeze(o),effects:Object.freeze({add:Object.freeze(r),del:Object.freeze(i)})})}var fE,ls,Ae,wr,bt,Tt,tn,mE,hE,Et,gE,bE,ph,rN,iN,aN,fh=L(()=>{fE=Object.freeze({cap:"urn:tmct:cap#",taught:"urn:tmct:taught#",mgx:"urn:tmct:mgx#",seon:"http://se-on.org/ontologies/seon.owl#"}),ls=Object.freeze({Capability:"cap:Capability",Parameter:"cap:Parameter",Precondition:"cap:Precondition",Effect:"cap:Effect"}),Ae=Object.freeze({Symbol:"seon:CodeEntity",Module:"mgx:Module",Class:"seon:ClassType",Query:"cap:FreeText",Kind:"cap:KindFilter",Package:"cap:PackageName"}),wr=Object.freeze({graphLoaded:"cap:graph-loaded",resolves:"cap:resolves",anyPresent:"cap:any-present",memoryFacts:"cap:memory-facts"}),bt=(e,t,{arg:n=e,required:s=!0,note:o=""}={})=>Object.freeze({type:ls.Parameter,name:e,kind:t,arg:n,required:s,note:o}),Tt=()=>Object.freeze({type:ls.Precondition,pred:wr.graphLoaded}),tn=(e,t)=>Object.freeze({type:ls.Precondition,pred:wr.resolves,param:e,as:t}),mE=e=>Object.freeze({type:ls.Precondition,pred:wr.anyPresent,params:Object.freeze([...e])}),hE=()=>Object.freeze({type:ls.Precondition,pred:wr.memoryFacts}),Et=(e,t=null)=>Object.freeze({type:ls.Effect,pred:"cap:knows",topic:e,of:t?`?${t}`:null});gE=Object.freeze([St({name:"tmct_search",label:"search",question:"lexical search across the graph",params:[bt("query",Ae.Query,{required:!1,note:"required unless a kind filter is given"}),bt("kind",Ae.Kind,{required:!1}),bt("name",Ae.Query,{required:!1}),bt("decorator",Ae.Query,{required:!1})],preconditions:[Tt(),mE(["query","kind"])],add:[Et("matches","query")]}),St({name:"tmct_describe",label:"describe",question:"a symbol's definition, kind and relations",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),tn("symbol",Ae.Symbol)],add:[Et("description","symbol")]}),St({name:"tmct_signature",label:"signature",question:"a symbol's signature only",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),tn("symbol",Ae.Symbol)],add:[Et("signature","symbol")]}),St({name:"tmct_impact",label:"impact",question:"what a change to this module or symbol reaches (impact closure)",params:[bt("module",Ae.Symbol,{note:"a Module, or any sited symbol \u2014 a fine-grained seed walks callsSymbol dependents and coarsens them to module grain"})],preconditions:[Tt(),tn("module",Ae.Symbol)],add:[Et("impact","module")]}),St({name:"tmct_members",label:"members",question:"the methods/attributes of a class",params:[bt("class",Ae.Class,{arg:"class"})],preconditions:[Tt(),tn("class",Ae.Class)],add:[Et("members","class")]}),St({name:"tmct_subclasses",label:"subclasses",question:"the subclasses of a class",params:[bt("class",Ae.Class,{arg:"class"})],preconditions:[Tt(),tn("class",Ae.Class)],add:[Et("subclasses","class")]}),St({name:"tmct_exports",label:"exports",question:"a module's public exports",params:[bt("module",Ae.Module)],preconditions:[Tt(),tn("module",Ae.Module)],add:[Et("exports","module")]}),St({name:"tmct_callers",label:"callers",question:"functions that call this symbol",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),tn("symbol",Ae.Symbol)],add:[Et("callers","symbol")]}),St({name:"tmct_callees",label:"callees",question:"functions this symbol calls",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),tn("symbol",Ae.Symbol)],add:[Et("callees","symbol")]}),St({name:"tmct_calls",label:"calls",question:"the call edges out of this symbol/module",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),tn("symbol",Ae.Symbol)],add:[Et("calls","symbol")]}),St({name:"tmct_tests_for",label:"tests",question:"the tests covering this symbol",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),tn("symbol",Ae.Symbol)],add:[Et("tests","symbol")]}),St({name:"tmct_untested",label:"untested",question:"symbols with no covering test",params:[],preconditions:[Tt()],add:[Et("untested",null)]}),St({name:"tmct_history",label:"history",question:"the commit history of this symbol",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),tn("symbol",Ae.Symbol)],add:[Et("history","symbol")]}),St({name:"tmct_cochanges",label:"cochanges",question:"symbols that change together with this one",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),tn("symbol",Ae.Symbol)],add:[Et("cochanges","symbol")]}),St({name:"tmct_architecture",label:"arch",question:"the architecture overview (optional package filter)",params:[bt("package",Ae.Package,{required:!1})],preconditions:[Tt()],add:[Et("architecture","package")]}),St({name:"tmct_related",label:"related",question:"a term's synonyms and related concepts (the SKOS view over the conversational-memory graph)",params:[bt("term",Ae.Query,{note:"a concept term, matched against memory relation facts rather than resolved in the code graph"})],preconditions:[hE()],add:[Et("related","term")]})]),bE=e=>Object.freeze(e.reduce((t,n)=>(t[n.name]=n,t),Object.create(null))),ph=gE,rN=bE(ph),iN=Object.freeze({tmct_context:"unbounded edit-context bundle (multi-file); needs a size/budget precondition",tmct_context_more:"unbounded context continuation; same as tmct_context",tmct_snippet:"raw source-file read (reads the filesystem); needs a file-read + span precondition",tmct_ask:"the plain-English question entry point itself \u2014 calls ask.mjs directly and bypasses the capability planner; not one of the planner's operators",tmct_export:"reads the memory store's whole fact set with no discriminating param and no resolver goal frame; needs NL-reachability wiring before it can join",tmct_ingest:"writes into the memory store (grounds facts); capability() only models read-only operators, so a write path needs its own precondition/effect design first",tmct_file_history:"a module-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet",tmct_method_history:"a method-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet",tmct_class_history:"a class-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet"}),aN=Object.freeze({prefixes:fE,vocab:ls,kinds:Ae,precond:wr,get capabilities(){return ph}})});var mh=L(()=>{fh()});var hh=L(()=>{Xs()});function yE(e=process.env){return e?.TMCT_WORLDS_PACK_DIR||Z(wE,"corpus","worlds")}function gh(e){try{return ji($o(e))}catch{return null}}function bh(e){if(dl.has(e))return dl.get(e);let t=null,n=gh(Z(e,"index.json.gz"));if(n)try{let s=JSON.parse(n.toString("utf8"));s&&typeof s=="object"&&!Array.isArray(s)&&(t=s)}catch{}return dl.set(e,t),t}function vE(e,t){let n=bh(e);if(!n)return null;let s=n[String(t??"")];if(!ah(s))return null;let o=`${e}\0${t}`;if(pl.has(o))return pl.get(o);let r=null,i=gh(Z(e,"shards",`${s.s}.jsonl.gz`));if(i){let a=[],l=[],c=null;for(let u of i.toString("utf8").split(`
131
- `))if(u.trim())try{let d=JSON.parse(u);if(!ch(d)||d.world!==t)continue;al(d)?a.push(d):cl(d)?l.push(d):ll(d)&&!c&&(c=d)}catch{}(a.length||l.length||c)&&(r={name:t,facts:lh(a),rules:l,meta:c})}return pl.set(o,r),r}var xE,wE,dl,pl,$E,vN,fl=L(()=>{Fs();_i();cs();De();gr();xE={},wE=Z($e(Dt(xE.url)),"..","..","..");dl=new Map,pl=new Map;$E=e=>({list:async()=>{let t=bh(e());return t?Object.keys(t).sort():null},load:async t=>vE(e(),t)}),vN=$E(()=>yE())});var AN,wh=L(()=>{yt();De();Vn();Fo();Xs();Ke();AN=Z(".tmct","memory","blocks")});var yh=L(()=>{Us()});var $h=L(()=>{Vn();Fo();Us()});var ml=L(()=>{Vn();Fo();Us()});var xh=L(()=>{ml();Vn();ks();Us()});var kh=L(()=>{});var Eh=L(()=>{yh();$h();ml();xh();kh();Us()});var Sh=L(()=>{wh();Ke();Xr();Qc();Eh();ul()});var _h=L(()=>{gr();dh();ul();mh();hh();fl();Ke();Sh()});var Ri,P0,F0,D0,Eo=L(()=>{Ri=Object.freeze({spiderFly:Object.freeze({spiderInitialMass:15,spiderMassDecrementPerTurn:.5,flyInitialMass:10,flyMassDecrementPerTurn:1,spiderVisionRadius:4,flyVisionRadius:4,eggHatchDelayTurns:3,flySpawnIntervalTurns:3,eggLayMassThreshold:25,eggHatchCount:2,minHatchlingMass:3,webDurationTurns:10}),guessNumber:Object.freeze({defaultLo:1,defaultHi:100,maxBound:1e9}),planning:Object.freeze({maxDepth:300})}),P0=Object.freeze({spider_initial_mass:"spiderInitialMass",spider_mass_decrement_per_turn:"spiderMassDecrementPerTurn",fly_initial_mass:"flyInitialMass",fly_mass_decrement_per_turn:"flyMassDecrementPerTurn",spider_vision_radius:"spiderVisionRadius",fly_vision_radius:"flyVisionRadius",egg_hatch_delay_turns:"eggHatchDelayTurns",fly_spawn_interval_turns:"flySpawnIntervalTurns",egg_lay_mass_threshold:"eggLayMassThreshold",egg_hatch_count:"eggHatchCount",min_hatchling_mass:"minHatchlingMass",web_duration_turns:"webDurationTurns"}),F0=Object.freeze({default_lo:"defaultLo",default_hi:"defaultHi",max_bound:"maxBound"}),D0=Object.freeze({max_depth:"maxDepth"})});var _E,Rh,B0,hl=L(()=>{Eo();_E=Object.freeze({x:2,y:2}),Rh=Object.freeze({north:Object.freeze({dx:0,dy:-1}),south:Object.freeze({dx:0,dy:1}),east:Object.freeze({dx:1,dy:0}),west:Object.freeze({dx:-1,dy:0})}),B0=Object.freeze([Object.freeze(["poodle","dog"]),Object.freeze(["sheepdog","dog"]),Object.freeze(["dog","animal"]),Object.freeze(["spider","arachnid"]),Object.freeze(["arachnid","animal"]),Object.freeze(["fly","insect"]),Object.freeze(["insect","animal"])])});var Ah=L(()=>{});var Th=L(()=>{hl();ks();Ke();gr();Ah();cn();Eo()});var b1,Ch=L(()=>{hl();Th();gr();fl();Ke();Eo();b1=new RegExp("^@(spider|fly)(?:-(\\d+))?[,:]?\\s+the\\s+(spider|fly)(?:-(\\d+))?\\s+is\\s+(?:(north|south|east|west)|at\\s+(cell-\\d+-\\d+))[.!?\\s]*$","i")});var ut,y1,v1,$1,x1,k1,E1,S1,j1,_1,R1,A1,T1,C1,I1,O1,L1,N1,M1,P1,Ih=L(()=>{ut=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},y1=ut("createRequire"),v1=ut("readFileSync"),$1=ut("access"),x1=ut("readFile"),k1=ut("writeFile"),E1=ut("appendFile"),S1=ut("mkdir"),j1=ut("mkdtemp"),_1=ut("rename"),R1=ut("unlink"),A1=ut("rm"),T1=ut("stat"),C1=ut("copyFile"),I1=ut("readdir"),O1=ut("createReadStream"),L1=ut("createWriteStream"),N1=ut("randomBytes"),M1=ut("spawnSync"),P1=ut("createInterface")});var dt,D1,z1,U1,B1,W1,q1,G1,V1,H1,K1,Y1,X1,J1,Q1,Z1,eM,tM,nM,OE,Oh=L(()=>{dt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},D1=dt("createRequire"),z1=dt("readFileSync"),U1=dt("access"),B1=dt("readFile"),W1=dt("writeFile"),q1=dt("appendFile"),G1=dt("mkdir"),V1=dt("mkdtemp"),H1=dt("rename"),K1=dt("unlink"),Y1=dt("rm"),X1=dt("stat"),J1=dt("copyFile"),Q1=dt("readdir"),Z1=dt("createReadStream"),eM=dt("createWriteStream"),tM=dt("randomBytes"),nM=dt("spawnSync"),OE=dt("createInterface")});var pt,oM,rM,iM,aM,cM,lM,uM,dM,pM,fM,mM,hM,gM,bM,wM,yM,vM,Lh,$M,gl=L(()=>{pt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},oM=pt("createRequire"),rM=pt("readFileSync"),iM=pt("access"),aM=pt("readFile"),cM=pt("writeFile"),lM=pt("appendFile"),uM=pt("mkdir"),dM=pt("mkdtemp"),pM=pt("rename"),fM=pt("unlink"),mM=pt("rm"),hM=pt("stat"),gM=pt("copyFile"),bM=pt("readdir"),wM=pt("createReadStream"),yM=pt("createWriteStream"),vM=pt("randomBytes"),Lh=pt("spawnSync"),$M=pt("createInterface")});var Nh=L(()=>{gl();De();yt();De();ui();Lt()});var Mh=L(()=>{});var LE,Ph=L(()=>{yt();De();Ke();Mh();LE=Z(".tmct","sessions")});var Dh=L(()=>{yt();De();ki()});var ft,BM,WM,qM,GM,VM,HM,KM,YM,XM,JM,QM,ZM,eP,tP,nP,sP,oP,rP,NE,zh=L(()=>{ft=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},BM=ft("createRequire"),WM=ft("readFileSync"),qM=ft("access"),GM=ft("readFile"),VM=ft("writeFile"),HM=ft("appendFile"),KM=ft("mkdir"),YM=ft("mkdtemp"),XM=ft("rename"),JM=ft("unlink"),QM=ft("rm"),ZM=ft("stat"),eP=ft("copyFile"),tP=ft("readdir"),nP=ft("createReadStream"),sP=ft("createWriteStream"),oP=ft("randomBytes"),rP=ft("spawnSync"),NE=ft("createInterface")});var PE,So,Uh,ME,Bh,mP,Bn,hP,Ai,gP,Wh=L(()=>{Fs();yt();zh();cs();De();ai();Ke();PE={},So=Z($e(Dt(PE.url)),"..","..",".."),Uh=Z(So,"corpus","conceptnet","slice.jsonl"),ME=Z(So,"src","adapters","corpus","conceptnet-map.toml"),Bh=Z(So,"corpus","seon","concepts.jsonl"),mP=Z(So,"corpus","seon","definitions.jsonl"),Bn=Z(So,"corpus","tier2"),hP=Z(Bn,"manifest.json"),Ai=Z(So,"corpus","wordnet"),gP=Z(Ai,"manifest.json")});function zE(){return{seon:{kind:"corpus",active:!1,corpusPath:Bh,provenancePrefix:"corpus:seon"},conceptnet:{kind:"corpus",active:!1,corpusPath:Uh,provenancePrefix:"corpus:conceptnet",limit:void 0,prefer:DE},human:{kind:"corpus",active:!0,corpusPath:Z(Bn,"human.jsonl"),provenancePrefix:"corpus:human"},"human-medium":{kind:"corpus",active:!1,corpusPath:Z(Bn,"human-medium.jsonl"),provenancePrefix:"corpus:human-medium"},"human-large":{kind:"corpus",active:!1,corpusPath:Z(Bn,"human-large.jsonl"),provenancePrefix:"corpus:human-large"},"tier2-aws":{kind:"corpus",active:!1,corpusPath:Z(Bn,"aws.jsonl"),provenancePrefix:"corpus:tier2-aws"},"tier2-python":{kind:"corpus",active:!1,corpusPath:Z(Bn,"python.jsonl"),provenancePrefix:"corpus:tier2-python"},"tier2-java":{kind:"corpus",active:!1,corpusPath:Z(Bn,"java.jsonl"),provenancePrefix:"corpus:tier2-java"},"tier2-general":{kind:"corpus",active:!1,corpusPath:Z(Bn,"general.jsonl"),provenancePrefix:"corpus:tier2-general"},"wordnet-xl":{kind:"corpus",active:!1,corpusPath:Z(Ai,"wordnet-xl.jsonl"),provenancePrefix:"corpus:wordnet-xl"},"wordnet-full":{kind:"corpus",active:!1,corpusPath:Z(Ai,"wordnet-full.jsonl"),provenancePrefix:"corpus:wordnet-full"},namenet:{kind:"corpus",active:!1,corpusPath:Z(FE,"namenet.jsonl"),provenancePrefix:"corpus:namenet"}}}var UE,FE,_P,DE,RP,qh=L(()=>{De();yt();cs();ui();Wh();UE={},FE=Z($e(Dt(UE.url)),"..","..","corpus","namenet"),_P=Object.freeze(["corpus","lexicon","templates","pack","ontology"]),DE=["rdfs:subClassOf","rdf:type","mgx:usedFor","mgx:partOf","mgx:capableOf"];RP=Object.freeze(zE())});var Gh=L(()=>{});var Vh=L(()=>{De();Fs();yt();Ih();Oh();gl();Lt();Nh();Ce();Ph();ki();Dh();Mo();qh();bl();Eo();Yc();nl();Gh()});var Hh={};Sn(Hh,{proseLemma:()=>WE});function WE(){if(Bs!==void 0)return Bs;try{let e=Zc();if(!e)return Bs=null,Bs;let t=e.its,n=new Map;Bs=s=>{let o=String(s||"");if(n.has(o))return n.get(o);let r;try{r=String(e.readDoc(o).tokens().out(t.lemma)[0]||o).toLowerCase()}catch{r=o.toLowerCase()}return n.set(o,r),r}}catch{Bs=null}return Bs}var Bs,Kh=L(()=>{el()});var Yh={};Sn(Yh,{digestTermFromRows:()=>VE,loadDigestStructureTable:()=>GE,readDigestStructures:()=>qE});var qE,GE,VE,Xh=L(()=>{qE=()=>null,GE=()=>null,VE=()=>null});function Rl(e){if(!e)return null;let{node:t,shape:n,kind:s}=e;if(t==="find")return`locate a specific named entity ("${e.term}")`;if(t==="count")return`get a count of ${Ti(e.entityType)}`;if(t==="list")return`list/enumerate ${Ti(e.entityType)} matching a condition`;if(t==="superlative")return`rank/compare ${Ti(e.entityType)} by ${e.metricNoun||e.metric||"a metric"}`;if(t==="anaphora")return"follow up on the previous answer's result set (discourse anaphora)";if(t==="membership")return`understand "${e.term||"an entity"}"'s membership/relationship`;if(t==="clause")return Rl(e.clause);if(t==="miss")return null;if(t==="boolean"||t==="qualifier"||t==="reverseSet"||t==="forwardSet"||t==="allOfClass"||t==="temporal"){let o=s||e.inner?.kind;return o&&nn[o]?nn[o]:`filter/traverse ${Ti(e.entityType)} by a relationship`}return n==="meta"?`understand a vocabulary/definition term ("${e.object}")`:n==="where"?`locate where something is defined ("${e.object}")`:n==="when"?"understand when something last changed (history)":n==="whoLast"?"find who most recently touched something (history)":n==="mentions"?`find where something is mentioned in prose ("${e.object}")`:n==="ask"?s&&nn[s]||"check a specific subject/object relationship":(n==="reverse"||n==="forward")&&s?nn[s]||`understand a "${s}" relationship`:"understand a graph relationship"}function Ll(e){let t=new Map;for(let n of e)t.has(Zh(n))||t.set(Zh(n),n);return t}function vl(e,t=vr){let n=[],s=[];for(let o of e)o.predicate===t&&(s.push([o.subject,o.object]),Ws(o)&&n.push([o.subject,o.object]));return{strictEdges:n,broadEdges:s}}function $l(e,t,n,s,o){return e(t,n,[],s.strictEdges,o)||e(t,n,[],s.broadEdges,o)}function Ml(e){let t=String(e||"").trim();return/[a-z]ies$/i.test(t)?`${t.slice(0,-3)}y`:/(ses|xes|zes|ches|shes)$/i.test(t)?t.slice(0,-2):/[a-z]s$/i.test(t)&&!/(?:ss|ous)$/i.test(t)?t.slice(0,-1):t}async function El(e){let t=String(e||"").toLowerCase();if(t==="has"||t==="have")return Ms;if(t==="can")return"mgx:capableOf";try{let{proseLemma:n}=await Promise.resolve().then(()=>(Kh(),Hh)),s=n(),o=s?s(t):t;return o==="have"?Ms:Fn(`mgx:${o}`)}catch{return Fn(`mgx:${t}`)}}function sS(e,t){let n=String(t||"").match(nS);return n&&/^mgx:[a-z]+$/.test(e)?{predicate:`${e}-${n[1].toLowerCase()}`,object:n[2].trim()}:{predicate:e,object:String(t||"").trim()}}async function yr(e,t){if(!e||!t)return null;try{let{resolveObject:n}=await Promise.resolve().then(()=>(ns(),Np)),s=n(e,t);if(s?.match?.id&&!s.ambiguous)return{id:s.match.id,label:s.match.label}}catch{}return null}function iS(e){let t=String(e||"");return/^have$/i.test(t)?"has":/[a-z]y$/i.test(t)&&!/[aeiou]y$/i.test(t)?`${t.slice(0,-1)}ies`:/(?:s|x|z|ch|sh|o)$/i.test(t)?`${t}es`:`${t}s`}function Sg(e){let t=String(e||"");return/^has$/i.test(t)?"have":/[a-z]ies$/i.test(t)&&!/[aeiou]ies$/i.test(t)?`${t.slice(0,-3)}y`:/(?:s|x|z|ch|sh|o)es$/i.test(t)?t.slice(0,-2):t.replace(/s$/i,"")}function jg(e){if(_o[e])return _o[e];let t=String(e||""),n=rf(t);if(n){let a=jg(n);if(a==="can")return"cannot";if(a==="can be")return"cannot be";if(a==="is"||a.startsWith("is "))return`is not${a.slice(2)}`;let[l,...c]=a.split(" ");return["does not",Sg(l),...c].join(" ")}let s=/^mgx:([a-z]+(?:-[a-z]+)*)-than$/i.exec(t);if(s)return`is ${s[1].replace(/-/g," ")} than`;let o=new RegExp(`^mgx:(${Pl})-([a-z]+)$`,"i").exec(t);if(o)return`is ${o[1].toLowerCase()} ${o[2].toLowerCase()}`;let r=/^mgx:same-([a-z]+)-as$/i.exec(t);if(r)return`has the same ${r[1].toLowerCase()} as`;let i=/^mgx:([a-z]+)(?:-([a-z]+))?$/i.exec(t);return i?`${iS(i[1])}${i[2]?` ${i[2]}`:""}`:e}function jl(e){let t=/^mgx:([a-z][\w-]*)$/i.exec(String(e||""));return t?t[1].toLowerCase():null}function cS(e){let t=String(e||"").trim(),n=t.toLowerCase();for(let{marker:s,predicate:o}of aS)if(n!==s&&n.endsWith(` ${s}`)){let r=t.slice(0,t.length-s.length).trim();if(r)return{subject:r,predicate:o}}return{subject:t,predicate:null}}function se(e){let t=e.provenance?` (source: ${e.provenance})`:"";return e.provenance.includes("ace:chat")||e.provenance.includes("teach:chat")?`you told me: ${Ct(e)}${t}`:e.provenance.includes("corpus-weak:")?`possibly: ${Ct(e)}${t}`:e.provenance.includes("corpus:")?`${Ct(e)}${t}`:e.provenance.includes("reference:")?`${Ct(e)}${t}`:`i learned: ${Ct(e)}${t}`}function ng(e,t,n){let s=se(e);if(!Wn.has(e.predicate)||!n.has(e.subject))return s;let o=oh(e.object,t,{cap:6});if(o.length<=1)return s;let r=` \u2192 ${o.slice(1).join(" \u2192 ")}`,i=s.match(lS);return i?s.slice(0,i.index)+r+i[0]:s+r}function sg(e,t,n,{indent:s=""}={}){let o=t.filter(k=>k.predicate===vr).map(k=>[k.subject,k.object]),r=ol(o),i=e.map(k=>`${s}${ng(k,r,n)}`),a=e.filter(k=>Wn.has(k.predicate)&&n.has(k.subject)),l=[...new Set(a.map(k=>k.object))];if(l.length<2)return{lines:i,grouped:null};let c=t.filter(k=>k.predicate==="owl:disjointWith").map(k=>[k.subject,k.object]),{split:u,clusters:d}=rh(l,{parents:r,disjointEdges:c});if(!u)return{lines:i,grouped:null};let m=a[0].subject,p=new Map;for(let k of d)for(let $ of k.objects)p.set($,k);let f=e.filter(k=>!(Wn.has(k.predicate)&&n.has(k.subject))),g=[],h=[],b=0,y=k=>{let $=ng(k,r,n);return b<_e?(b+=1,`${s}${$}`):(h.push($),null)};for(let k of d){let $=a.filter(T=>p.get(T.object)===k).map(y).filter(Boolean);$.length&&g.push(`${s}${m}, the ${k.label}:
132
- ${$.join(`
133
- `)}`)}if(f.length){let k=f.map(y).filter(Boolean);k.length&&g.push(`${s}also about ${m}:
130
+ `)}`:c}finally{await r()}}var Hm=L(()=>{De();Ge();sl.ownsGraphLoad=!0});var Kk,Km=L(()=>{ac();Zp();om();im();cm();um();pm();mm();gm();bm();ym();$m();km();Em();_m();Am();Cm();Om();Nm();Pm();Dm();Bm();Wm();Vm();Hm();Kk=Object.freeze({tmct_context:ic,tmct_context_more:Qp,tmct_describe:sm,tmct_snippet:rm,tmct_signature:am,tmct_impact:lm,tmct_search:dm,tmct_members:fm,tmct_subclasses:hm,tmct_related:tl,tmct_architecture:wm,tmct_exports:vm,tmct_untested:xm,tmct_ask:Sm,tmct_tests_for:jm,tmct_history:Rm,tmct_file_history:Tm,tmct_method_history:Im,tmct_class_history:Lm,tmct_callers:Mm,tmct_callees:Fm,tmct_calls:zm,tmct_cochanges:Um,tmct_export:nl,tmct_ingest:sl})});var _i,ol=L(()=>{_i=()=>{}});var rl=L(()=>{});var Ri,il=L(()=>{Ri=()=>({relations:[],constructions:[]})});var Ym,Xm=L(()=>{vt();De();yu();Lt();Do();ss();ni();si();Km();Ko();ol();rl();il();si();ac();Vr(void 0);_i(Ri);Ym=wu.map(({name:e,agentDescription:t,inputSchema:n})=>({name:e,description:t,inputSchema:n}))});var CI,II,OI,cl=L(()=>{CI=Object.freeze(["entity","set","event","measure"]),II=Object.freeze(["date","count","op","pivot","metric","kind","provenance"]),OI=Object.freeze({it:Object.freeze(["entity","event","measure"]),this:Object.freeze(["entity","event","measure"]),that:Object.freeze(["entity","event","measure"]),"this one":Object.freeze(["entity","event","measure"]),"that one":Object.freeze(["entity","event","measure"]),those:Object.freeze(["set"]),them:Object.freeze(["set"]),these:Object.freeze(["set"]),here:Object.freeze(["entity"])})});var it,NI,MI,PI,FI,DI,zI,BI,UI,WI,qI,GI,VI,HI,KI,YI,XI,Yk,JI,QI,Jm=L(()=>{it=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},NI=it("createRequire"),MI=it("readFileSync"),PI=it("access"),FI=it("readFile"),DI=it("writeFile"),zI=it("appendFile"),BI=it("mkdir"),UI=it("mkdtemp"),WI=it("rename"),qI=it("unlink"),GI=it("rm"),VI=it("stat"),HI=it("copyFile"),KI=it("readdir"),YI=it("createReadStream"),XI=it("createWriteStream"),Yk=it("randomBytes"),JI=it("spawnSync"),QI=it("createInterface")});var Ai=L(()=>{Jm()});var at,nO,sO,oO,rO,iO,aO,cO,lO,uO,dO,pO,fO,mO,hO,gO,bO,zt,wO,yO,vO,ls=L(()=>{at=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},nO=at("createRequire"),sO=at("readFileSync"),oO=at("access"),rO=at("readFile"),iO=at("writeFile"),aO=at("appendFile"),cO=at("mkdir"),lO=at("mkdtemp"),uO=at("rename"),dO=at("unlink"),pO=at("rm"),fO=at("stat"),mO=at("copyFile"),hO=at("readdir"),gO=at("createReadStream"),bO=at("createWriteStream"),zt=e=>String(e),wO=at("randomBytes"),yO=at("spawnSync"),vO=at("createInterface")});var Xk,Qm,EO,jO,_O,ll=L(()=>{vt();ls();De();Xk={},Qm=ee($e(zt(Xk.url)),"..","..",".."),EO=ee(Qm,"data","templates","responses.jsonl"),jO=ee(Qm,"data","phrasebook","software-phrases.txt"),_O=Object.freeze(new Set(["subject","count","noun","scope","comparison","metric","unit","superlative","provenance"]))});function Qk(e,t={}){let n=Jk.exec(String(e||""));if(!n)return 1;let s=t?.[n[1]];return typeof s=="number"&&Number.isFinite(s)?s:1}function Zk(e,t={}){let n=Array.isArray(e?.sourceIds)?e.sourceIds:[];return n.length?Math.max(...n.map(s=>Qk(s,t))):1}function Ye(e,t={}){return(Array.isArray(e)?e:[]).map((s,o)=>({row:s,index:o,bias:Zk(s,t)})).sort((s,o)=>o.bias-s.bias||(o.row?.trust??0)-(s.row?.trust??0)||s.index-o.index).map(s=>s.row)}var Jk,Zm=L(()=>{Jk=/^src:corpus:(.+)$/});var ct,TO,ko,CO,IO,OO,LO,NO,MO,PO,FO,DO,zO,BO,UO,eS,tS,WO,qO,GO,Ds=L(()=>{ct=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},TO=ct("createRequire"),ko=ct("readFileSync"),CO=ct("access"),IO=ct("readFile"),OO=ct("writeFile"),LO=ct("appendFile"),NO=ct("mkdir"),MO=ct("mkdtemp"),PO=ct("rename"),FO=ct("unlink"),DO=ct("rm"),zO=ct("stat"),BO=ct("copyFile"),UO=ct("readdir"),eS=ct("createReadStream"),tS=ct("createWriteStream"),WO=ct("randomBytes"),qO=ct("spawnSync"),GO=ct("createInterface")});function eh(e,t){let n=String(e).toLowerCase().replace(/^[^a-z]+/,"");if(!n)return null;for(let o of t.vowel_sound_consonants||[])if(n.startsWith(o))return!0;for(let o of t.consonant_sound_vowels||[])if(n.startsWith(o))return!1;let s=n[0];return"aeiou".includes(s)?!0:/[a-z]/.test(s)?!1:null}function rS(e=sS){let t=bo(ko(e,"utf8"));return Array.isArray(t.rule)?t.rule:[]}function ul(){if(Ti===null)try{Ti=rS()}catch{Ti=[]}return Ti}var iS,nS,sS,oS,ZO,Ti,dl=L(()=>{Ds();ls();De();fi();ll();iS={},nS=$e(zt(iS.url)),sS=ee(nS,"..","..","data","templates","grammar-rules.toml"),oS=Object.freeze(["prose","entity","path","number","code","provenance","receipt"]),ZO=Object.freeze(new Set(oS.filter(e=>e!=="prose")));Ti=null});var lt,th,tL,nL,sL,oL,rL,iL,aL,cL,lL,uL,dL,pL,fL,mL,hL,gL,bL,wL,nh=L(()=>{lt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},th=lt("createRequire"),tL=lt("readFileSync"),nL=lt("access"),sL=lt("readFile"),oL=lt("writeFile"),rL=lt("appendFile"),iL=lt("mkdir"),aL=lt("mkdtemp"),cL=lt("rename"),lL=lt("unlink"),uL=lt("rm"),dL=lt("stat"),pL=lt("copyFile"),fL=lt("readdir"),mL=lt("createReadStream"),hL=lt("createWriteStream"),gL=lt("randomBytes"),bL=lt("spawnSync"),wL=lt("createInterface")});function aS(){if(wr!==void 0)return wr;try{let e=sh?sh():cS();wr=e&&e.winkNLP&&e.model?e:null}catch{wr=null}return wr}function cS(){let e=th(lS.url);return{winkNLP:e("wink-nlp"),model:e("wink-eng-lite-web-model")}}function pl(){if(So!==void 0)return So;let e=aS();if(!e)return So=null,null;try{So=e.winkNLP(e.model)}catch{So=null}return So}var lS,sh,wr,So,fl=L(()=>{nh();lS={}});var oh=L(()=>{fl()});var ih,rh=L(()=>{ih={comment:"tmct's starter lexicon, now covering BOTH the original software domain and the default 'human-world' persona's everyday people/places/objects/nature/time/body/mind vocabulary. Every word the ACE-OWL sub-fragment parser (src/domain/grammar/ace.mjs) is allowed to understand is DECLARED here \u2014 tmct never guesses a word's category. Nouns may declare a possessive property typing ('data' or 'object', pattern 7) or an irregular 'plural' (WordNet-sourced human nouns like 'man'/'child' need this \u2014 the morphology fold only handles regular -s/-ies/-es endings); adjectives MUST declare a type ('subclass' forms a class, 'data' asserts a boolean-ish datatype property, pattern 8); verbs may declare a preposition ('depend' + 'on' \u2192 dependsOn). The human-domain additions are flat and simple (breadth over depth \u2014 no gender/kinship taxonomy, no formal role hierarchy), matching corpus/tier2/generate.mjs's CORPUSES.human.lexicon sub-key, which --verify drift-checks against. Extend via loadLexicon(extra) with this same shape.",nouns:{module:{},class:{},function:{},method:{},attribute:{},variable:{},constant:{},test:{},suite:{},service:{},repository:{},branch:{},commit:{},tag:{},release:{},package:{},library:{},framework:{},api:{},endpoint:{},route:{},handler:{},controller:{},model:{},view:{},template:{},component:{},interface:{},type:{},category:{},kind:{},artifact:{},routine:{},part:{},helper:{},operation:{},change:{},schema:{},database:{},table:{},query:{},index:{plural:"indices"},cache:{},queue:{},worker:{},job:{},task:{},bug:{},defect:{},issue:{},ticket:{},feature:{},requirement:{},specification:{},document:{},developer:{},engineer:{},user:{},visitor:{},team:{},project:{},codebase:{},file:{},directory:{},folder:{},line:{},symbol:{},identifier:{},comment:{},docstring:{},string:{},number:{},list:{},array:{},graph:{},node:{},edge:{},triple:{},fact:{},ontology:{},lexicon:{},grammar:{},sentence:{},utterance:{},session:{},response:{},request:{},question:{},answer:{},error:{},exception:{},warning:{},log:{},metric:{},benchmark:{},pipeline:{},build:{},deployment:{},environment:{},config:{},configuration:{},setting:{},option:{},flag:{},argument:{},parameter:{},value:{},result:{},output:{},input:{},server:{},client:{},protocol:{},message:{},event:{},hook:{},plugin:{},script:{},tool:{},command:{},prompt:{},token:{},parser:{},compiler:{},linter:{},formatter:{},runtime:{},process:{},thread:{},loop:{},statement:{},expression:{},keyword:{},scope:{},callback:{},promise:{},iterator:{},generator:{},unit:{},risk:{},prototype:{},milestone:{},sprint:{},backlog:{},roadmap:{},phase:{},pattern:{},smell:{},coverage:{},mock:{},stub:{},fixture:{},assertion:{},snapshot:{},regression:{},migration:{},refactor:{},review:{},merge:{},license:{property:"data"},version:{property:"data"},name:{property:"data"},path:{property:"data"},size:{property:"data"},status:{property:"data"},language:{property:"data"},extension:{property:"data"},churn:{property:"data"},impact:{property:"data"},complexity:{property:"data"},latency:{property:"data"},duration:{property:"data"},frequency:{property:"data"},severity:{property:"data"},owner:{property:"object"},maintainer:{property:"object"},author:{property:"object"},reviewer:{property:"object"},parent:{property:"object"},dependency:{property:"object"},man:{plural:"men"},woman:{plural:"women"},person:{plural:"people"},child:{plural:"children"},boy:{},girl:{},baby:{},adult:{},friend:{},neighbor:{},stranger:{},guest:{},doctor:{},teacher:{},nurse:{},student:{},farmer:{},mother:{},father:{},brother:{},sister:{},family:{},king:{},queen:{},soldier:{},artist:{},writer:{},cook:{},group:{},crowd:{},audience:{},club:{},president:{},human:{},lawyer:{},driver:{},manager:{},officer:{},judge:{},priest:{},servant:{},butler:{},housekeeper:{},gardener:{},employee:{},boss:{},husband:{},wife:{plural:"wives"},son:{},daughter:{},grandmother:{},grandfather:{},citizen:{},customer:{},leader:{},champion:{},volunteer:{},resident:{},place:{},city:{},town:{},village:{},country:{},house:{},home:{},room:{},kitchen:{},bedroom:{},bathroom:{},school:{},hospital:{},shop:{},market:{},church:{},park:{},garden:{},street:{},road:{},bridge:{},farm:{},office:{},factory:{},museum:{},hotel:{},airport:{},castle:{},beach:{},forest:{},mountain:{},hat:{},shirt:{},coat:{},shoe:{},dress:{},clothing:{},chair:{},desk:{},lamp:{},portrait:{},bed:{},door:{},window:{},wall:{},roof:{},pen:{},paper:{},key:{},lock:{},box:{},car:{},bicycle:{},boat:{},train:{},wheel:{},knife:{plural:"knives"},spoon:{},fork:{},plate:{},cup:{},bottle:{},bag:{},money:{},coin:{},toy:{},machine:{},clock:{},phone:{},book:{},letter:{},umbrella:{},glove:{},sock:{},ring:{},watch:{},mirror:{},candle:{},ladder:{},hammer:{},basket:{},wallet:{},dog:{},cat:{},horse:{},cow:{},pig:{},sheep:{},bird:{},fish:{},mouse:{plural:"mice"},rabbit:{},bear:{},lion:{},tiger:{},elephant:{},snake:{},tree:{},flower:{},grass:{},leaf:{plural:"leaves"},root:{},seed:{},fruit:{},water:{},air:{},fire:{},earth:{},stone:{},sand:{},gold:{},iron:{},rain:{},snow:{},wind:{},cloud:{},sun:{},moon:{},star:{},owl:{},wolf:{plural:"wolves"},frog:{},bee:{},ant:{},butterfly:{},spider:{},river:{},ocean:{},time:{},day:{},night:{},morning:{},evening:{},week:{},month:{},year:{},hour:{},minute:{},second:{},moment:{},season:{},spring:{},summer:{},winter:{},wedding:{},race:{},dozen:{},half:{plural:"halves"},amount:{},meeting:{},game:{},war:{},trip:{},birthday:{},holiday:{},autumn:{},century:{},body:{},head:{},hand:{},arm:{},leg:{},foot:{plural:"feet"},eye:{},ear:{},mouth:{},nose:{},hair:{},heart:{},blood:{},bone:{},skin:{},face:{},food:{},bread:{},meat:{},milk:{},egg:{},cheese:{},vegetable:{},meal:{},breakfast:{},dinner:{},drink:{},wine:{},tea:{},coffee:{},tongue:{},tooth:{plural:"teeth"},finger:{},toe:{},shoulder:{},knee:{},brain:{},lung:{},sugar:{},salt:{},word:{},story:{},news:{},idea:{},thought:{},mind:{},memory:{},dream:{},belief:{},love:{},hate:{},fear:{},joy:{},anger:{},hope:{},surprise:{},pride:{},song:{},music:{},sound:{},voice:{},picture:{},art:{},knowledge:{},opinion:{},reason:{},imagination:{},laughter:{},tear:{},smile:{},silence:{},object:{},location:{},quantity:{},organization:{},animal:{},plant:{},furniture:{},vehicle:{},insect:{},emotion:{},metal:{},liquid:{},weather:{},planet:{},jewelry:{},cutlery:{},government:{},material:{},draw:{},set:{},heavy:{},stand:{},free:{},pack:{},dead:{},pick:{},double:{},straight:{},cast:{},dry:{},bank:{},stamp:{},tender:{},fair:{},active:{},regular:{},blue:{},hack:{},band:{},brush:{},guard:{},master:{},transfer:{},firm:{},side:{},bull:{},mate:{},rank:{},board:{},brace:{},grade:{},better:{},course:{},natural:{},butt:{},camp:{},crop:{},date:{},fold:{},help:{},hunt:{},count:{},court:{},crush:{},major:{},march:{},tease:{},tough:{},flight:{},forward:{},division:{},commission:{},jam:{},rat:{},gray:{},hood:{},jerk:{},miss:{},pile:{},pool:{},rear:{},whip:{},bench:{},chain:{},cycle:{},grind:{},guide:{},stiff:{},troll:{},union:{},circle:{},carrier:{},defence:{},defense:{},radical:{},reserve:{},intimate:{},opposite:{},superior:{},grey:{},host:{},knot:{},left:{},lost:{},blind:{},crank:{},panel:{},rally:{},state:{},tramp:{},waver:{},clutch:{},living:{},runner:{},steady:{},stream:{},combine:{},company:{},convert:{},general:{},moderate:{},alternate:{},ace:{},crab:{},flop:{},fund:{},pair:{},rake:{},rock:{},sick:{},blade:{},cheat:{},sport:{},caller:{},column:{},couple:{},divine:{},pledge:{},simple:{},sponge:{},system:{},wanton:{},sleeper:{},business:{},associate:{},instrument:{},substitute:{},gun:{},sum:{},alto:{},best:{},buff:{},dear:{},mass:{},cream:{},creep:{},giant:{},labor:{},pilot:{},sneak:{},stack:{},staff:{},world:{},gutter:{},jumper:{},labour:{},lather:{},picket:{},reader:{},savage:{},captain:{},culture:{},monitor:{},neutral:{},unknown:{},utility:{},inferior:{},initiate:{},innocent:{},national:{},transpose:{},association:{},professional:{},bum:{},fan:{},law:{},deck:{},fool:{},join:{},kink:{},page:{},pink:{},stud:{},twin:{},clump:{},coach:{},dance:{},drone:{},extra:{},feast:{},fence:{},fleet:{},flock:{},ghost:{},clear:{},right:{},open:{},beat:{},back:{},block:{},see:{},keep:{},square:{},pitch:{},center:{},centre:{},top:{},post:{},field:{},spot:{},bar:{},end:{},frame:{},rough:{},address:{},quarter:{},position:{},land:{},bound:{},range:{},seat:{},dark:{},rail:{},cross:{},section:{},tip:{},plug:{},port:{},stall:{},corner:{},outside:{},dig:{},way:{},front:{},joint:{},patch:{},reach:{},thick:{},medium:{plural:"media"},dock:{},ruin:{},tack:{},floor:{},bottom:{},puddle:{},compound:{},retreat:{},mat:{},belt:{},dump:{},scene:{},space:{},border:{},common:{},cradle:{},inside:{},surface:{},lie:{},boot:{},clog:{},coil:{},nest:{},wire:{},yard:{},forge:{},limit:{},lodge:{},buffer:{},middle:{},capital:{},overhead:{},preserve:{},terminal:{},direction:{},hall:{},loft:{},plot:{},tape:{},grate:{},stoop:{},fringe:{},circuit:{},distance:{},derivation:{},bent:{},gate:{},mill:{},safe:{},sail:{},hedge:{},paint:{},parcel:{},sphere:{},bearing:{},profile:{},shelter:{},crossing:{},interior:{},reservation:{},area:{},bush:{},cork:{},dive:{},limb:{},raft:{},shed:{},zone:{},chase:{},cut:{},light:{},charge:{},check:{},work:{},stock:{},stick:{},flat:{},crack:{},press:{},settle:{},spread:{},wash:{},well:{},swing:{},fly:{},tap:{},stretch:{},shot:{},black:{},strip:{},separate:{},tie:{},rack:{},match:{},piece:{},shell:{},still:{},present:{},trim:{},spike:{},split:{},white:{},yield:{},squeeze:{},bolt:{},fret:{},choke:{},float:{},track:{},low:{},crown:{},screen:{},die:{plural:"dice"},pin:{},chip:{},mold:{},seal:{},draft:{},shade:{},shaft:{},stuff:{},switch:{},balance:{},reverse:{},subject:{},approach:{},beam:{},bill:{},card:{},link:{},sack:{},sink:{},trap:{},spare:{},credit:{},counter:{},express:{},positive:{},net:{},pay:{},ball:{},bond:{},bowl:{},horn:{},pole:{},wing:{},glass:{},grant:{},smack:{},collar:{},record:{},ruffle:{},silver:{},negative:{},cap:{},lap:{},pad:{},rag:{},rig:{},bend:{},clip:{},fine:{},flap:{},heel:{},pall:{},pump:{},gauge:{},image:{},plain:{},print:{},slick:{},spoil:{},clinch:{},gather:{},offset:{},pocket:{},relief:{},channel:{},whistle:{},irregular:{},transport:{},bat:{},ice:{},peg:{},pot:{},bust:{},grip:{},hole:{},nail:{},poke:{},slug:{},spat:{},stem:{},suit:{},yoke:{},flood:{},grand:{},gross:{},perch:{},slip:{},down:{},shoot:{},ground:{},discharge:{},solid:{},kill:{},slack:{},waste:{},rush:{},grain:{},shake:{},pit:{},mould:{},colour:{},render:{},mount:{},cutting:{},fill:{},flux:{},tail:{},plaster:{},swallow:{},concentrate:{},bay:{},gum:{},ray:{},slop:{},spur:{},extract:{},fat:{},hop:{},corn:{},rust:{},smut:{},label:{},stain:{},composition:{},gas:{},pip:{},duck:{},gall:{},lime:{},mint:{},tick:{},stalk:{},whiff:{},cement:{},rubber:{},conjugate:{},preparation:{},dun:{},dust:{},jade:{},mire:{},pulp:{},snag:{},bloom:{},caper:{},crude:{},fluid:{},frost:{},paste:{},rinse:{},steam:{},straw:{},corona:{},poison:{},refuse:{},savory:{},feather:{},ferment:{},organic:{},chestnut:{},mushroom:{},percolate:{},sublimate:{},synthetic:{},suspension:{},precipitate:{},cod:{},pet:{},rod:{},bunt:{},crow:{},hide:{},punk:{},vein:{},assay:{},goose:{plural:"geese"},olive:{},stray:{},trash:{},ginger:{},pepper:{},permit:{},polish:{},sorrel:{},blister:{},bristle:{},complex:{},filling:{},flicker:{},harvest:{},scollop:{},whiting:{},anteater:{},snowball:{},tincture:{},repellent:{},ink:{},lip:{},nag:{},rue:{},wad:{},acid:{},beak:{},bean:{},coal:{},dirt:{},fawn:{},fuel:{},lark:{},ling:{},mash:{},palm:{},pelt:{},plum:{},pony:{},pout:{},soil:{},stag:{},bream:{},brier:{},chalk:{},coral:{},fiber:{},fall:{},pass:{},lift:{},go:{},roll:{},drop:{},blow:{},return:{},strike:{},rise:{},snap:{},shift:{},twist:{},case:{},deal:{},start:{},deep:{},jump:{},step:{},stop:{},pound:{},advance:{},pop:{},flash:{},rest:{},crash:{},score:{},figure:{},leave:{},smash:{},stroke:{},first:{},sweep:{},even:{},flow:{},kick:{},heave:{},trace:{},opening:{},full:{},gain:{},jack:{},spin:{},wave:{},splash:{},bob:{},bang:{},dash:{},flick:{},hitch:{},prime:{},proof:{},passing:{},bit:{},click:{},knock:{},swell:{},trouble:{},collapse:{},movement:{},standard:{},variation:{},rap:{},boom:{},bump:{},clap:{},pace:{},peck:{},zero:{},blaze:{},speed:{},spell:{},treat:{},bounce:{},factor:{},little:{},plunge:{},scrape:{},single:{},ban:{},mix:{},one:{},mesh:{},roar:{},tilt:{},climb:{},flip:{},puff:{},bite:{},feed:{},bitter:{},chop:{},sour:{},special:{},crisp:{},tonic:{},scallop:{},mess:{},quick:{},smear:{},fillet:{},curl:{},malt:{},glaze:{},souse:{},breast:{},humour:{},draught:{},delicacy:{},dressing:{},transplant:{},hip:{},sop:{},kiss:{},mush:{},neck:{},belly:{},frank:{},jumble:{},junket:{},trifle:{},stomach:{},clot:{},shin:{},stew:{},tart:{},cheek:{},graft:{},molar:{},roast:{},spice:{},stout:{},sweat:{},groove:{},region:{},savoury:{},western:{},backbone:{},conserve:{},dominant:{},macerate:{},melancholy:{},cake:{},lens:{},loaf:{plural:"loaves"},menu:{},must:{},peel:{},pore:{},suds:{},butch:{},cling:{},curry:{},drool:{},honey:{},jerky:{},juice:{},mince:{},nasal:{},nerve:{},sauce:{},tract:{},dainty:{},entree:{},facial:{},relish:{},squash:{},brittle:{},caramel:{},cordial:{},fissure:{},oblique:{},adhesion:{},turnover:{},nonpareil:{},posterior:{},vegetation:{},ail:{},orb:{},pap:{},rum:{},brew:{},chew:{},hash:{},lard:{},rump:{},brine:{},dowdy:{},farce:{},flour:{},fudge:{},halal:{},icing:{},lunch:{},play:{},make:{},hold:{},close:{},mark:{},form:{},order:{},support:{},rule:{},sign:{},hang:{},drag:{},feel:{},find:{},shock:{},mean:{},offer:{},study:{},show:{},tone:{},flare:{},attack:{},act:{},life:{plural:"lives"},stay:{},think:{},secret:{},account:{},hurt:{},note:{},taste:{},report:{},measure:{},condition:{},cry:{},focus:{plural:"foci"},style:{},thing:{},title:{},recall:{},average:{},contract:{},dissolve:{},so:{},aim:{},bind:{},heat:{},know:{},stir:{},claim:{},power:{},demand:{},design:{},notice:{},source:{},upgrade:{},resolution:{},bid:{},skim:{},brand:{},curve:{},sight:{},smoke:{},digest:{},regard:{},passage:{},program:{},exposure:{},interest:{},character:{},projection:{},lay:{},curse:{},favor:{},remit:{},sense:{},slash:{},wedge:{},bubble:{},excuse:{},favour:{},invite:{},mantle:{},salute:{},stress:{},survey:{},temper:{},comfort:{},neglect:{},resolve:{},respect:{},torment:{},conflict:{},dispatch:{},standing:{},challenge:{},programme:{},background:{},conclusion:{},impression:{},particular:{},withdrawal:{},cite:{},echo:{},hail:{},rip:{},lot:{},great:{},relay:{},tenor:{},browse:{},bundle:{},chorus:{},cypher:{},fellow:{},litter:{},marine:{},native:{},occult:{},plague:{},rocker:{},scheme:{},series:{plural:"series"},social:{},streak:{},sucker:{},teaser:{},antique:{},battery:{},bracket:{},founder:{},gallery:{},liberal:{},starter:{},turnout:{},witness:{},diagonal:{},familiar:{},ordinary:{},prospect:{},sequence:{},aggregate:{},authority:{},community:{},dependent:{},desperate:{},patronage:{},primitive:{},principal:{},complement:{},engagement:{},foundation:{},generation:{},settlement:{},combination:{},lightweight:{},steamroller:{},subordinate:{},organisation:{},establishment:{},representative:{},con:{},fox:{},kid:{},pod:{},red:{},sex:{},spy:{},vet:{},aged:{},bore:{},diet:{},fare:{},gown:{},hawk:{},heap:{},herd:{},hive:{},lump:{},romp:{},sort:{},agent:{},alien:{},beard:{},brave:{},breed:{},brood:{},canon:{},craft:{},crazy:{},devil:{},dummy:{},equal:{},flake:{},groom:{},mound:{},organ:{},scrub:{},toast:{},troop:{},youth:{},colony:{},copper:{},cutter:{},escort:{},feeder:{},junior:{},maroon:{},matrix:{plural:"matrices"},modern:{},muscle:{},people:{},sector:{},shrink:{},tinker:{},topper:{},booster:{},gallant:{},hostile:{},marshal:{},network:{},nucleus:{plural:"nuclei"},premier:{},scourge:{},secular:{},sitting:{},snapper:{},suspect:{},swagger:{},traffic:{},variant:{},cardinal:{},derelict:{},domestic:{},favorite:{},finisher:{},graduate:{},humanist:{},infernal:{},magazine:{},manifold:{},minister:{},palatine:{},presence:{},receiver:{},relation:{},favourite:{},following:{},goldbrick:{},operative:{},sensitive:{},syndicate:{},complexion:{},mouthpiece:{},withdrawer:{},appointment:{},conjugation:{},constituent:{},heavyweight:{},incompetent:{},independent:{},replacement:{},underground:{},untouchable:{},conservative:{},administration:{},ape:{},gem:{},hob:{},sap:{},van:{},axis:{plural:"axes"},chap:{},char:{},crew:{},cult:{},duet:{},gang:{},hero:{},hire:{},lamb:{},lame:{},mute:{},nude:{},pawn:{},pill:{},sage:{},soul:{},tout:{},trio:{},ward:{},worm:{},bunch:{},crimp:{},dwarf:{},elect:{},flank:{},ideal:{},noble:{},octet:{},quack:{},saint:{},scrag:{},shark:{},shoal:{},silly:{},skunk:{},super:{},witch:{},zombi:{},agency:{},anchor:{},backup:{},batter:{},buster:{},canary:{},circus:{},dealer:{},domain:{},doomed:{},genius:{},gossip:{},herald:{},hoodoo:{},hopper:{},immune:{},jockey:{},legion:{},member:{},nature:{},orphan:{},parade:{},peanut:{},pillar:{},pirate:{},player:{},porter:{},pusher:{},putter:{},senior:{},septet:{},sestet:{},sextet:{},surety:{},tapper:{},tiller:{},zombie:{},adjunct:{},butcher:{},captive:{},cascade:{},chapter:{},charity:{},checker:{},chicane:{},chicken:{},climber:{},cognate:{},consort:{},cracker:{},dresser:{},gentile:{},invalid:{},knocker:{},lineage:{},mission:{},mixture:{},monster:{},offence:{},partner:{},pioneer:{},pitcher:{},quartet:{},quintet:{},recruit:{},referee:{},shooter:{},spoiler:{},sponsor:{},stemmer:{},steward:{},striker:{},terrace:{},alliance:{},castrate:{},designer:{},director:{},ensemble:{},faithful:{},friendly:{},mandarin:{},operator:{},romantic:{},accessory:{},annoyance:{},attendant:{},bourgeois:{},precedent:{},quadruple:{},reception:{},recession:{},religious:{},reprobate:{},satellite:{},selection:{},sensation:{},supporter:{},contingent:{},convention:{},expedition:{},incendiary:{},individual:{},masquerade:{},population:{},sweetheart:{},tubercular:{},confederate:{},cooperative:{},subdivision:{},territorial:{},transcriber:{},intelligence:{},registration:{},sophisticate:{},welterweight:{},revolutionary:{},ex:{},ass:{},cog:{},cub:{},den:{},dud:{},duo:{},ham:{},hog:{},mob:{},pro:{},deaf:{},dove:{},fate:{},five:{},folk:{},gull:{},jinx:{},mime:{},nark:{},nine:{},pest:{},prey:{},quad:{},rash:{},scab:{},sire:{},wisp:{},wood:{},zany:{},armor:{},batch:{},bogey:{},caste:{},chief:{},choir:{},clone:{},divan:{},drunk:{},elder:{},enemy:{},exile:{},faith:{},flirt:{},grunt:{},joker:{},lobby:{},louse:{plural:"lice"},pagan:{},pivot:{},racer:{},rebel:{},scout:{},siren:{},slave:{},swarm:{},timid:{},triad:{},tribe:{},armour:{},bearer:{},censor:{},choker:{},convoy:{},covert:{},damned:{},deputy:{},empire:{},goffer:{},gopher:{},huddle:{},killer:{},league:{},martyr:{},muster:{},mystic:{},outfit:{},packet:{},palace:{},passer:{},patrol:{},potter:{},quarry:{},rigger:{},ringer:{},rustic:{},scribe:{},sitter:{},slider:{},slouch:{},squire:{},squirt:{},stupid:{},summit:{},tailor:{},tenant:{},terror:{},tracer:{},turkey:{},turner:{},venter:{},voider:{},voodoo:{},walker:{},worthy:{},academy:{},agonist:{},amateur:{},ancient:{},banquet:{},cabinet:{},cashier:{},classic:{},commune:{},courser:{},crammer:{},current:{},divider:{},economy:{},edition:{},emperor:{},entrant:{},fireman:{},lookout:{},octette:{},orderly:{},painter:{},pervert:{},plotter:{},plunger:{},roaster:{},sampler:{},scanner:{},sellout:{},skimmer:{},skipper:{},society:{},soprano:{},spastic:{},spotter:{},stratum:{plural:"strata"},trimmer:{},tripper:{},trooper:{},tumbler:{},upstart:{},veteran:{},wheeler:{},academic:{},agnostic:{},aviation:{},backstop:{},baritone:{},calendar:{},casualty:{},colonial:{},divinity:{},fireball:{},homeless:{},huckster:{},marriage:{},militant:{},military:{},ministry:{},modifier:{},partisan:{},pedigree:{},possible:{},recorder:{},regiment:{},renegade:{},repeater:{},revenant:{},septette:{},sextette:{},shepherd:{},stalwart:{},stringer:{},stripper:{},whistler:{},affiliate:{},ascendant:{},bacchanal:{},canvasser:{},cockscomb:{},collector:{},comforter:{},commander:{},companion:{},conductor:{},crossover:{},eccentric:{},executive:{},fledgling:{},franchise:{},freelance:{},incumbent:{},mercenary:{},moderator:{},neighbour:{},newspaper:{},patriarch:{},patrician:{},portfolio:{},quartette:{},quintette:{},repertory:{},secretary:{},segregate:{},spearhead:{},stigmatic:{},summation:{},transient:{},trumpeter:{},voluntary:{},absolutism:{},anthropoid:{},apparition:{},assemblage:{},collective:{},contractor:{},delinquent:{},episcopate:{},exaltation:{},exposition:{},illiterate:{},judicature:{},leadership:{},lieutenant:{},minimalist:{},percussion:{},profligate:{},provincial:{},rendezvous:{},brotherhood:{},determinant:{},distributor:{},interpreter:{},stipendiary:{},analphabetic:{},antediluvian:{},civilisation:{},civilization:{},commonwealth:{},conglomerate:{},contemporary:{},cosmopolitan:{},humanitarian:{},neighborhood:{},thoroughbred:{},ultramontane:{},concatenation:{},featherweight:{},superordinate:{},classification:{},fundamentalist:{},cop:{},don:{},eon:{},gal:{},gob:{},god:{},hoe:{},kin:{},nan:{},pup:{},wag:{},wit:{},aeon:{},ally:{},bard:{},chum:{},clew:{},dean:{},fink:{},flak:{},geek:{},goof:{},hulk:{},idol:{},lady:{},loon:{},mace:{},para:{},ruck:{},seer:{},self:{plural:"selves"},adder:{},angel:{},augur:{},baron:{},blond:{},brick:{},brute:{},cabal:{},champ:{},comic:{},crier:{},decoy:{},demon:{},diner:{},diver:{},diwan:{},drove:{},envoy:{},fiend:{},flack:{},flier:{},flyer:{},freak:{},gaudy:{},harpy:{},horde:{},indie:{},jewel:{},leech:{},levee:{},liege:{},locus:{},loser:{},mimic:{},needy:{},nymph:{},oiler:{},poser:{},pupil:{},riser:{},roper:{},rummy:{},scold:{},squad:{},timer:{},tutor:{},usher:{},vicar:{},whale:{},wiper:{},affine:{},albino:{},angler:{},badass:{},baster:{},beggar:{},blonde:{},bomber:{},bowler:{},butter:{},carver:{},caster:{},chichi:{},clinic:{},closer:{},cohort:{},coiner:{},comber:{},cookie:{},cordon:{},corpus:{},cotter:{},cowboy:{},coyote:{},critic:{},dragon:{},drawer:{},drudge:{},eleven:{},ensign:{},estate:{},ethnic:{},exarch:{},finder:{},fodder:{},gaffer:{},gainer:{},galaxy:{},granny:{},hacker:{},hedger:{},heller:{},holder:{},honker:{},hooker:{},hotdog:{},inmate:{},intern:{},jungle:{},knight:{},kvetch:{},lineup:{},lovely:{},magpie:{},maiden:{},mailer:{},maniac:{},matron:{},miller:{},muller:{},nation:{},opener:{},ouster:{},packer:{},parrot:{},patron:{},peeler:{},peeper:{},polity:{},poster:{},powwow:{},punter:{},puppet:{},purdah:{},racist:{},rafter:{},ramrod:{},redact:{},regent:{},rusher:{},sailor:{},scorer:{},seeder:{},shaver:{},slaver:{},slicer:{},smoker:{},snitch:{},syntax:{},tacker:{},tagger:{},tanker:{},tartar:{},teller:{},thrush:{},trigon:{},troika:{},truant:{},tucker:{},tyrant:{},umpire:{},undoer:{},vestal:{},virgin:{},votary:{},warren:{},washer:{},wetter:{},winder:{},winner:{},wizard:{},admirer:{},amnesic:{},analyst:{},anomaly:{},aphasic:{},armorer:{},arrival:{},ascetic:{},auditor:{},baggage:{},bastion:{},biology:{},boarder:{},brahman:{},brahmin:{},breaker:{},caravan:{},clapper:{},cluster:{},coaster:{},cobbler:{},college:{},convict:{},council:{},counsel:{},coxcomb:{},crawler:{},creeper:{},crewman:{},crimper:{},darling:{},destiny:{},dragoon:{},dreamer:{},duality:{},echelon:{},ejector:{},fiddler:{},fighter:{},flasher:{},forbear:{},harrier:{},holdout:{},hostess:{},incubus:{},ingenue:{},justice:{},kachina:{},kindred:{},kingpin:{},macumba:{},manikin:{},marcher:{},married:{},newborn:{},notable:{},nursing:{},outpost:{},parvenu:{},patient:{},payroll:{},peasant:{},phalanx:{},phantom:{},planter:{},platoon:{},plodder:{},poacher:{},printer:{},prodigy:{},puncher:{},realist:{},redhead:{},revival:{},runaway:{},scholar:{},sharpie:{},skidder:{},slicker:{},slogger:{},smasher:{},snorter:{},snuffer:{},spinner:{},splicer:{},stalker:{},stamper:{},standby:{},stepper:{},striper:{},sweeper:{},thrower:{},triplet:{},utopian:{},utterer:{},voucher:{},washout:{},watcher:{},wiggler:{},wrecker:{},affluent:{},armourer:{},attender:{},bacchant:{},bachelor:{},bankrupt:{},bisexual:{},bondsman:{},cautious:{},congress:{},corporal:{},creature:{},decadent:{},defeated:{},delegate:{},diabetic:{},dictator:{},dyslexic:{},effector:{},exponent:{},flagging:{},freshman:{},fugitive:{},futurist:{},garrison:{},greyback:{},hangover:{},humanism:{},immortal:{},juvenile:{},lapidary:{},mainstay:{},mannikin:{},maverick:{},mechanic:{},minority:{},minstrel:{},mistress:{},monotype:{},mutation:{},nativist:{},neophyte:{},neurotic:{},newsroom:{},nobility:{},opponent:{},pacifier:{},pantheon:{},planting:{},probable:{},producer:{},recusant:{},referral:{},reminder:{},retainer:{},ruralism:{},scalawag:{},scrubber:{},searcher:{},sergeant:{},sociable:{},songster:{},splitter:{},squadron:{},straggle:{},strawman:{},survivor:{},taxonomy:{},treasury:{},vanguard:{},virtuoso:{},walloper:{},warhorse:{},yearling:{},alcoholic:{},anorectic:{},artificer:{},artillery:{},attracter:{},attractor:{},automaton:{},auxiliary:{},barbarian:{},bombshell:{},brokerage:{},coalition:{},concourse:{},contralto:{},counselor:{},crewwoman:{},cyberpunk:{},defaulter:{},deliverer:{},democracy:{},dependant:{},descender:{},dissident:{},dyspeptic:{},feudatory:{},firewoman:{},flyweight:{},incurable:{},institute:{},insurgent:{},intellect:{},introvert:{},mandatory:{},mendicant:{},middleman:{},navigator:{},organiser:{},organizer:{},pluralism:{},pluralist:{},pothunter:{},precursor:{},predictor:{},presenter:{},pretender:{},processor:{},proconsul:{},publisher:{},quintuple:{},registrar:{},regulator:{},scallywag:{},scavenger:{},scrambler:{},scratcher:{},serration:{},singleton:{},stargazer:{},stockpile:{},successor:{},surrogate:{},symbolism:{},temporary:{},throwback:{},trickster:{},warrantee:{},womanhood:{},antagonist:{},attendance:{},blackguard:{},bondswoman:{},chancellor:{},classifier:{},conference:{},conformist:{},counsellor:{},crossroads:{},descendant:{},descendent:{},doorkeeper:{},embodiment:{},expatriate:{},federation:{},fellowship:{},filibuster:{},forerunner:{},fratricide:{},grandstand:{},mastermind:{},minstrelsy:{},missionary:{},ordination:{},plantation:{},powerhouse:{},quadruplet:{},quintuplet:{},repatriate:{},republican:{},respondent:{},rubberneck:{},salamander:{},scholastic:{},separatism:{},sisterhood:{},subscriber:{},subsidiary:{},supplicant:{},suppresser:{},suppressor:{},timekeeper:{},translator:{},university:{},wallflower:{},abomination:{},academician:{},agriculture:{},anachronism:{},antiquarian:{},beneficiary:{},bureaucracy:{},clairvoyant:{},conditioner:{},confederacy:{},consumptive:{},deification:{},enlightened:{},incarnation:{},lilliputian:{},middlewoman:{},narcoleptic:{},nationalist:{},partnership:{},peacekeeper:{},peripatetic:{},pontificate:{},progression:{},prosecution:{},quarterback:{},recessional:{},romanticist:{},shipbuilder:{},transmitter:{},transsexual:{},underwriter:{},undesirable:{},utilitarian:{},acquaintance:{},bantamweight:{},collaborator:{},congregation:{},conservatory:{},countertenor:{},demonstrator:{},denomination:{},headquarters:{},illegitimate:{},investigator:{},metropolitan:{},middleweight:{},noncombatant:{},philharmonic:{},schoolmaster:{},sharpshooter:{},totalitarian:{},authoritarian:{},confederation:{},correspondent:{},reincarnation:{},schizophrenic:{},supernumerary:{},categorization:{},tatterdemalion:{},instrumentality:{},internationalist:{},bey:{},cox:{},cur:{},few:{},foe:{},hag:{},lad:{},mod:{},obi:{},sib:{},aide:{},amah:{},anti:{},army:{},beau:{},bevy:{},bogy:{},chit:{},clod:{},coon:{},czar:{},dada:{},dame:{},derp:{},dodo:{},dude:{},duke:{},dupe:{},gild:{},giro:{},goat:{},goon:{},grad:{},guru:{},heir:{},hobo:{},hunk:{},jilt:{},jock:{},jury:{},khan:{},maid:{},naif:{},navy:{},nerd:{},peri:{},pimp:{},putz:{},sect:{},suer:{},swot:{},tuft:{},adept:{},baker:{},basso:{},beast:{},bride:{},bunny:{},cadre:{},comer:{},cooky:{},corps:{},covey:{},deist:{},edger:{},elite:{},emcee:{},enate:{},faery:{},fatty:{},fauna:{},felon:{},filer:{},flora:{},folks:{},forum:{},genus:{plural:"genera"},ghoul:{},gipsy:{},giver:{},gnome:{},grove:{},gypsy:{},hajji:{},hakim:{},junky:{},knave:{},lefty:{},leper:{},loony:{},macho:{},madam:{},magus:{},medic:{},mezzo:{},miler:{},mooch:{},mufti:{},nabob:{},nexus:{},ninja:{},obeah:{},parer:{},pigmy:{},poilu:{},ponce:{},prior:{},proxy:{},puppy:{},pygmy:{},quint:{},raver:{},rover:{},satyr:{},scamp:{},sheik:{},shill:{},shrew:{},sibyl:{},sissy:{},slain:{},smith:{},snoop:{},sprog:{},stoic:{},sylph:{},taker:{},thane:{},toady:{},totem:{},trier:{},tryst:{},tuner:{},twirp:{},uncle:{},valet:{},vegan:{},vixen:{},waker:{},widow:{},wight:{},wirer:{},yenta:{},agnate:{},alexic:{},amazon:{},audile:{},avatar:{},avower:{},bagger:{},bagman:{},banker:{},barber:{},barker:{},bather:{},bawler:{},beater:{},beldam:{},bidder:{},boater:{},brewer:{},broker:{},brunet:{},bureau:{},caddie:{},camper:{},cantor:{},caucus:{},chaser:{},cherub:{},chosen:{},coeval:{},cooper:{},coquet:{},cottar:{},craven:{},cubist:{},daemon:{},deacon:{},digger:{},dodger:{},dowser:{},duette:{},dunker:{},egoist:{},eldest:{},eparch:{},erotic:{},eyeful:{},faller:{},fitter:{},flunky:{},forger:{},framer:{},gaggle:{},gagman:{},gamine:{},gasbag:{},gillie:{},goalie:{},gouger:{},grouch:{},gunman:{},gunner:{},hamlet:{},hanger:{},hawker:{},heaver:{},hermit:{},hitter:{},hummer:{},iceman:{},joiner:{},junkie:{},jurist:{},keeper:{},kelpie:{},kisser:{},lackey:{},lector:{},lifter:{},lister:{},lizard:{},loader:{},loaner:{},logjam:{},longer:{},lubber:{},lumper:{},lyceum:{},madcap:{},maenad:{},maimed:{},masher:{},medico:{},menial:{},midden:{},midget:{},minder:{},moiety:{},motile:{},nester:{},oblate:{},oilman:{},parish:{},paster:{},pelter:{},phylum:{},picker:{},plenum:{},police:{},pruner:{},psyche:{},puller:{},python:{},rabble:{},raider:{},raiser:{},ranger:{},ranker:{},rapper:{},reaper:{},redcap:{},reeler:{},regime:{},renter:{},rifler:{},romper:{},sachem:{},salter:{},sawyer:{},sealer:{},seeker:{},sender:{},sexist:{},shaker:{},shaper:{},sharpy:{},signer:{},silvan:{},sleuth:{},smiler:{},sorter:{},sphinx:{},stager:{},stater:{},supper:{},sylvan:{},talent:{},tanner:{},tester:{},theist:{},throng:{},tilter:{},tipper:{},toller:{},tosser:{},tourer:{},townie:{},trusty:{},varlet:{},vermin:{},vestry:{},victor:{},virago:{},voicer:{},waster:{},weasel:{},weaver:{},weeder:{},weeper:{},weirdo:{},whaler:{},winker:{},wraith:{},wretch:{},yakuza:{},yeoman:{},adapter:{},admiral:{},airhead:{},amalgam:{},animist:{},aphakic:{},applier:{},arbiter:{},armiger:{},atheist:{},attache:{},babbler:{},baffled:{},beldame:{},beloved:{},berserk:{},bondman:{},bounder:{},brigade:{},browser:{},buffoon:{},bulimic:{},burgher:{},caitiff:{},carload:{},catcher:{},cavalry:{},chachka:{},changer:{},charmer:{},chemist:{},cocotte:{},collage:{},compere:{},shadow:{},layer:{},north:{},orbit:{},trend:{},truss:{},vault:{},bunker:{},harbor:{},orient:{},origin:{},resort:{},safety:{},target:{},chamber:{},extreme:{},harbour:{},kingdom:{},mandate:{},outline:{},station:{},blockade:{},darkness:{},overlook:{},landscape:{},northeast:{},northwest:{},partition:{},southeast:{},southwest:{},structure:{},atmosphere:{},lug:{},tee:{},balk:{},burr:{},cage:{},drip:{},east:{},fort:{},hoop:{},west:{},cleat:{},fluke:{},scour:{},south:{},beacon:{},closet:{},duplex:{},radius:{plural:"radii"},vacuum:{},wattle:{},canteen:{},grounds:{},cloister:{},pinnacle:{},property:{},surround:{},terminus:{},anchorage:{},barricade:{},honeycomb:{},turnaround:{},institution:{},termination:{},cab:{},dam:{},brim:{},calk:{},dome:{},goal:{},hill:{},hull:{},knob:{},prop:{},seam:{},site:{},turf:{},apron:{},arena:{},baulk:{},cabin:{},grill:{},groin:{},haunt:{},lever:{},niche:{},privy:{},works:{},airway:{},barren:{},corral:{},dugout:{},fender:{},galley:{},hurdle:{},lounge:{},outlet:{},refuge:{},sconce:{},sprawl:{},temple:{},toilet:{},wicket:{},barrack:{},bulwark:{},buttery:{},cornice:{},grating:{},landing:{},leeward:{},maximum:{},pasture:{},salient:{},shingle:{},squinch:{},surgery:{},building:{},cylinder:{},downtown:{},fountain:{},landmark:{},munition:{},quadrant:{},rearward:{},sideline:{},windward:{},homestead:{},multiplex:{},perfumery:{},residence:{},stretcher:{},substrate:{},excavation:{},silhouette:{},convenience:{},culmination:{},declination:{},architecture:{},spa:{},aery:{},brow:{},bung:{},dike:{},flue:{},hell:{},tent:{},abbey:{},aisle:{},arbor:{},attic:{},booth:{},brink:{},disco:{},oxbow:{},oxeye:{},quoin:{},realm:{},salon:{},villa:{},whorl:{},barony:{},barrow:{},bazaar:{},billet:{},bustle:{},canton:{},casing:{},cellar:{},cooler:{},garage:{},ghetto:{},grille:{},hearth:{},locker:{},midway:{},muffle:{},oracle:{},remise:{},saloon:{},stocks:{},studio:{},tiptop:{},uptown:{},volute:{},arsenal:{},chassis:{},cockpit:{},commons:{},cubicle:{},dockage:{},fairway:{},fencing:{},gondola:{},heading:{},hotspot:{},lattice:{},lodging:{},minimum:{},moorage:{},pannier:{},rattrap:{},rootage:{},stowage:{},theater:{},theatre:{},vacuity:{},baseline:{},butchery:{},buttress:{},clearing:{},crosscut:{},domicile:{},erection:{},exterior:{},fanlight:{},fastness:{},firewall:{},foothold:{},frontier:{},lavatory:{},memorial:{},monument:{},mortuary:{},overhang:{},pedestal:{},scenario:{},solitude:{},sprocket:{},stockade:{},stoppage:{},vaulting:{},bombproof:{},cathedral:{},fundament:{},hindrance:{},panhandle:{},proximity:{},resonator:{},sanctuary:{},territory:{},watershed:{},confluence:{},department:{},encampment:{},flashpoint:{},groundwork:{},hinderance:{},quartering:{},substratum:{},underbelly:{},breadbasket:{},columbarium:{},destination:{},engineering:{},equinoctial:{},planetarium:{},penitentiary:{},circumference:{},confectionery:{},fortification:{},hub:{},hut:{},lee:{},sty:{},acme:{},apex:{},barn:{},brig:{},coop:{},digs:{},holy:{},jail:{},jook:{},juke:{},loge:{},mall:{},nook:{},pave:{},sash:{},silo:{},slum:{},tope:{},weir:{},abode:{},aerie:{},altar:{},bazar:{},detox:{},haven:{},heath:{},hutch:{},kraal:{},lager:{},manor:{},manse:{},navel:{},oasis:{plural:"oases"},opera:{},paddy:{},plaza:{},pylon:{},rodeo:{},shire:{},spile:{},sprag:{},venue:{},visor:{},apogee:{},arcade:{},ashram:{},asylum:{},atrium:{},bagnio:{},bailey:{},barrio:{},belfry:{},boards:{},casino:{},chapel:{},county:{},creche:{},cupola:{},deckle:{},fraise:{},haymow:{},hostel:{},kennel:{},lancet:{},larder:{},lockup:{},mihrab:{},parlor:{},plaque:{},prefab:{},prison:{},spigot:{},stacks:{},tampon:{},turret:{},vertex:{},zodiac:{},automat:{},balcony:{},batwing:{},benthos:{},borough:{},bubbler:{},bullpen:{},cabaret:{},caboose:{},chantry:{},convent:{},deanery:{},demesne:{},derrick:{},desktop:{},drydock:{},dukedom:{},dungeon:{},earldom:{},earplug:{},embassy:{},emirate:{},eparchy:{},equinox:{},fiefdom:{},florist:{},flyover:{},framing:{},funfair:{},grocery:{},hayrack:{},hospice:{},khanate:{},lunette:{},mansion:{},marquee:{},masonry:{},matting:{},midland:{},mooring:{},narthex:{},nirvana:{},obelisk:{},outback:{},parapet:{},parlour:{},pinhead:{},railing:{},rathole:{},redoubt:{},ribbing:{},rotunda:{},sanctum:{},sawmill:{},shipway:{},shoebox:{},stopple:{},tambour:{},transom:{},trellis:{},trestle:{},tribune:{},vantage:{},abutment:{},airspace:{},ambiance:{},ambience:{},backside:{},ballpark:{},basement:{},basilica:{},bioscope:{},bodywork:{},brattice:{},diggings:{},doghouse:{},dominion:{},entrepot:{},environs:{},extremum:{},farmland:{},fireside:{},hacienda:{},hideaway:{},imperium:{},jalousie:{},littoral:{},mantelet:{},mounting:{},nailhead:{},outdoors:{},palisade:{},pharmacy:{},porthole:{},province:{},revolver:{},seascape:{},sidewall:{},steerage:{},stopover:{},suburbia:{},sudatory:{},sweatbox:{},tailgate:{},turnpike:{},wellhead:{},backwater:{},bailiwick:{},beachhead:{},belvedere:{},caliphate:{},caparison:{},cellarage:{},chandlery:{},cloakroom:{},colonnade:{},cookhouse:{},couchette:{},crematory:{},crownwork:{},cubbyhole:{},dollhouse:{},dormitory:{},dripstone:{},fieldwork:{},fireguard:{},forefront:{},guardroom:{},hatchback:{},isoclinal:{},lazaretto:{},lineation:{},mezzanine:{},millinery:{},orphanage:{},outfitter:{},pleasance:{},princedom:{},revetment:{},roadblock:{},scrapheap:{},shrubbery:{},viewpoint:{},viscounty:{},workhouse:{},architrave:{},birthplace:{},borderline:{},bridgehead:{},brownstone:{},chokepoint:{},commissary:{},courthouse:{},escarpment:{},greenhouse:{},ironmonger:{},justiciary:{},laboratory:{},lamination:{},maisonette:{},metropolis:{},obstructor:{},panopticon:{},playground:{},prefecture:{},proscenium:{},quadrangle:{},rotisserie:{},sanatorium:{},suzerainty:{},tenderloin:{},triclinium:{},wellspring:{},wheelhouse:{},condominium:{},conventicle:{},crematorium:{},crenelation:{},demarcation:{},maisonnette:{},observatory:{},reformatory:{},superstrate:{},tobacconist:{},trusteeship:{},wainscoting:{},amphitheater:{},amphitheatre:{},chapterhouse:{},clotheshorse:{},delicatessen:{},fountainhead:{},haberdashery:{},municipality:{},packinghouse:{},patriarchate:{},retrenchment:{},substructure:{},superstratum:{},surroundings:{},wainscotting:{},juxtaposition:{},infrastructure:{},dec:{},inn:{},loo:{},pub:{},burg:{},cafe:{},deli:{},dorm:{},hank:{},iglu:{},kirk:{},lair:{},lawn:{},mart:{},nave:{},oast:{},rink:{},souk:{},tine:{},tipi:{},veld:{},ways:{},wold:{},yurt:{},apsis:{},burgh:{},condo:{},cubby:{},cuddy:{},dacha:{},duchy:{},duomo:{},eaves:{},flies:{},gable:{},glade:{},gulag:{},harem:{},hogan:{},igloo:{},lanai:{},layby:{},mecca:{},midst:{},motel:{},oriel:{},parts:{},patio:{},polls:{},qibla:{},roads:{},rooms:{},sauna:{},skein:{},socle:{},soddy:{},sodom:{},spire:{},stoep:{},stupa:{},tenon:{},tepee:{},tupek:{},tupik:{},veldt:{},weald:{},abatis:{},abbacy:{},alcove:{},apiary:{},arbour:{},aviary:{},bedsit:{},bethel:{},bodega:{},bounds:{},bowels:{},cabana:{},calkin:{},campus:{},carrel:{},casbah:{},casern:{},chalet:{},depths:{},dolmen:{},donjon:{},dormer:{},durbar:{},eatery:{},escarp:{},fipple:{},flange:{},flyway:{},friary:{},furket:{},gantry:{},garret:{},hangar:{},hareem:{},hayrig:{},imaret:{},isobar:{},isohel:{},isolex:{},kasbah:{},laager:{},locale:{},loggia:{},marina:{},masjid:{},meadow:{},medina:{},menhir:{},merlon:{},midair:{},morgue:{},mosque:{},mudhif:{},musjid:{},pagoda:{},paling:{},pantry:{},parvis:{},pelmet:{},piazza:{},pigsty:{},plinth:{},priory:{},pueblo:{},radome:{},setoff:{},skybox:{},skyway:{},stalls:{},storey:{},suburb:{},tenter:{},upside:{},volary:{},wigwam:{},wikiup:{},winery:{},abattis:{},airdock:{},airlock:{},alcazar:{},antapex:{},apadana:{},apojove:{},apolune:{},athanor:{},barroom:{},bascule:{},bedside:{},beeline:{},borstal:{},boudoir:{},brewery:{},brewpub:{},brothel:{},campong:{},cannery:{},capitol:{},carport:{},carrell:{},chancel:{},chateau:{},citadel:{},coaming:{},corncob:{},cottage:{},cowbarn:{},cowshed:{},cowtown:{},crinion:{},dinette:{},diocese:{},earshot:{},edifice:{},enclave:{},exurbia:{},eyeshot:{},fantail:{},feedlot:{},firebox:{},screw:{},share:{},sheet:{},slice:{},slide:{},spill:{},stage:{},stake:{},tread:{},paddle:{},weight:{},canvass:{},compact:{},undercut:{},representation:{},fin:{},gag:{},jet:{},tug:{},bark:{},bunk:{},drum:{},mask:{},pipe:{},reel:{},scan:{},blank:{},drill:{},plumb:{},plume:{},shank:{},sling:{},spray:{},pickup:{},saddle:{},trench:{},capsule:{},security:{},sacrifice:{},technical:{},can:{},jar:{},map:{},ply:{},rib:{},rim:{},web:{},bell:{},buck:{},claw:{},comb:{},copy:{},crib:{},dish:{},fake:{},foil:{},grab:{},kite:{},ramp:{},rent:{},slot:{},spit:{},tank:{},bosom:{},cable:{},charm:{},drain:{},grave:{},price:{},skirt:{},stool:{},strap:{},stump:{},trail:{},access:{},cannon:{},fiddle:{},formal:{},insert:{},launch:{},purple:{},reward:{},strand:{},tackle:{},display:{},floater:{},incline:{},limited:{},portion:{},torpedo:{},overcast:{},puncture:{},broadside:{},duplicate:{},submarine:{},surcharge:{},production:{},interchange:{},bus:{},due:{},gap:{},jaw:{},lag:{},nut:{},tin:{},win:{},arch:{},bail:{},cell:{},dope:{},fell:{},film:{},lace:{},lash:{},mail:{},pale:{},purl:{},rate:{},skid:{},sole:{},spar:{},tuck:{},vamp:{},vent:{},vest:{},brake:{},brass:{},chuck:{},cramp:{},crest:{},drape:{},elbow:{},habit:{},lease:{},lower:{},prize:{},roach:{},royal:{},scrap:{},slate:{},snare:{},snuff:{},total:{},trump:{},beaver:{},canvas:{},future:{},handle:{},header:{},jacket:{},motley:{},muzzle:{},quiver:{},rocket:{},roller:{},staple:{},wrench:{},compass:{},element:{},exhaust:{},frontal:{},thunder:{},transit:{},upstage:{},traverse:{},accession:{},allowance:{},guarantee:{},promenade:{},shipwreck:{},attachment:{},protection:{},perpendicular:{},aid:{},gig:{},gin:{},nap:{},oil:{},ram:{},bead:{},bulb:{},curb:{},dart:{},daub:{},dial:{},dose:{},exit:{},fuse:{},goad:{},item:{},knit:{},plan:{},rein:{},swag:{},veil:{},alarm:{},chart:{},cinch:{},clasp:{},eagle:{},entry:{},fluff:{},gouge:{},lance:{},meter:{},miter:{},pouch:{},probe:{},punch:{},purse:{},sable:{},scuff:{},shear:{},stern:{},taper:{},thumb:{},wharf:{},whisk:{},barrel:{},beetle:{},bronze:{},burden:{},congee:{},fleece:{},glossy:{},halter:{},limber:{},margin:{},mobile:{},needle:{},remote:{},shroud:{},sketch:{},splice:{},stripe:{},toggle:{},trough:{},volume:{},ballast:{},binding:{},blanket:{},costume:{},crackle:{},crystal:{},diamond:{},fitting:{},graphic:{},harness:{},premium:{},product:{},pyramid:{},sandbag:{},squelch:{},trammel:{},uniform:{},venture:{},warrant:{},wildcat:{},working:{},assembly:{},charcoal:{},discount:{},envelope:{},imperial:{},ligature:{},original:{},specific:{},treasure:{},vertical:{},deduction:{},distemper:{},inventory:{},objective:{},reversion:{},whitewash:{},supplement:{},contrivance:{},convertible:{},inspiration:{},intersection:{},counterbalance:{},bet:{},gel:{},gut:{},jag:{},jig:{},pan:{},pry:{},tab:{},tax:{},zip:{},bait:{},barb:{},bomb:{},cone:{},cuff:{},dado:{},disk:{},gear:{},gore:{},grid:{},harp:{},loom:{},main:{},pant:{},pike:{},prod:{},reef:{},ruff:{},sham:{},tare:{},tidy:{},tire:{},toll:{},award:{},basic:{},basin:{},baton:{},birch:{},braid:{},broom:{},clack:{},cloak:{},clout:{},crock:{},fagot:{},ferry:{},filet:{},forte:{},found:{},frail:{},jolly:{},motor:{},pedal:{},potty:{},radio:{},rivet:{},scarf:{},shore:{},shunt:{},sieve:{},splat:{},splay:{},stave:{},steal:{},steel:{},thong:{},tithe:{},torch:{},trunk:{},twine:{},upper:{},valve:{},weave:{},bridle:{},buckle:{},buffet:{},carpet:{},cotton:{},custom:{},devise:{},enamel:{},entail:{},furrow:{},girdle:{},hobble:{},mangle:{},mosaic:{},motive:{},pallet:{},pencil:{},pinion:{},powder:{},radial:{},rattle:{},rebate:{},rumble:{},shield:{},shimmy:{},shovel:{},sledge:{},sluice:{},tablet:{},throne:{},timber:{},tinsel:{},uplift:{},benefit:{},bombard:{},bootleg:{},console:{},default:{},forfeit:{},freight:{},gantlet:{},generic:{},grapple:{},journal:{},loading:{},molding:{},overlap:{},pigment:{},plastic:{},salvage:{},scooter:{},scuffle:{},spindle:{},steamer:{},stopper:{},upright:{},carriage:{},catapult:{},facility:{},laminate:{},medicine:{},offstage:{},overload:{},plastron:{},railroad:{},retrofit:{},strickle:{},throttle:{},whipping:{},wireless:{},automatic:{},blackjack:{},blackwash:{},foliation:{},interlock:{},roughcast:{},threshold:{},antiseptic:{},camouflage:{},incidental:{},intangible:{},preventive:{},reversible:{},watercolor:{},maintenance:{},watercolour:{},differential:{},prescription:{},preventative:{},prophylactic:{},reproduction:{},transcription:{},transportation:{},fob:{},guy:{},hem:{},jug:{},kit:{},saw:{},cane:{},cart:{},clam:{},coif:{},cosy:{},cozy:{},disc:{},felt:{},gash:{},hone:{},hose:{},keel:{},loot:{},luff:{},lure:{},mast:{},mend:{},mine:{},muff:{},nuke:{},plow:{},robe:{},ruby:{},snip:{},soap:{},spud:{},swab:{},tile:{},till:{},tram:{},vane:{},wand:{},weed:{},weld:{},welt:{},audio:{},audit:{},baste:{},bilge:{},brail:{},bugle:{},canal:{},chest:{},chock:{},conge:{},couch:{},crape:{},crepe:{},crook:{},flute:{},frill:{},frock:{},fusee:{},hoist:{},inset:{},kitty:{},leash:{},liner:{},mixer:{},noose:{},novel:{},pearl:{},piano:{},plait:{},quill:{},reset:{},roost:{},saber:{},sabre:{},scull:{},spear:{},squab:{},stilt:{},sulky:{},video:{},vomit:{},wagon:{},aerial:{},armory:{},baffle:{},banner:{},batten:{},binder:{},bodkin:{},bypass:{},canopy:{},chisel:{},clench:{},dollar:{},dredge:{},drogue:{},duster:{},engine:{},excise:{},facing:{},funnel:{},garner:{},hamper:{},joggle:{},kettle:{},lining:{},livery:{},lumber:{},marble:{},mortar:{},mousse:{},nickel:{},ocular:{},payoff:{},pestle:{},piping:{},pommel:{},profit:{},puzzle:{},ransom:{},ration:{},rental:{},ribbon:{},rotary:{},runway:{},saucer:{},seesaw:{},siphon:{},suture:{},tattoo:{},thatch:{},throat:{},tunnel:{},turtle:{},wealth:{},acrylic:{},armoury:{},balloon:{},bargain:{},beehive:{},blinker:{},bolster:{},caisson:{},casting:{},ceiling:{},chariot:{},chopper:{},clarion:{},clinker:{},clipper:{},cowhide:{},earnest:{},elastic:{},expense:{},festoon:{},fortune:{},garnish:{},gravure:{},grinder:{},killing:{},linkage:{},novelty:{},overall:{},overlay:{},pallium:{},perfume:{},pillory:{},pointer:{},ringlet:{},rosette:{},segment:{},shuttle:{},staging:{},trailer:{},trumpet:{},unction:{},barbecue:{},barbeque:{},disguise:{},electric:{},elevated:{},fraction:{},gauntlet:{},gossamer:{},heritage:{},homespun:{},ironclad:{},lifeline:{},lighting:{},mackinaw:{},moulding:{},pinpoint:{},pinwheel:{},poundage:{},sanguine:{},sapphire:{},scribble:{},triangle:{},underlay:{},upstairs:{},virginal:{},admission:{},amphibian:{},backstage:{},capillary:{},cartridge:{},cartwheel:{},cathartic:{},condenser:{},damascene:{},depiction:{},diaphragm:{},medallion:{},overdrive:{},pacemaker:{},reservoir:{},screening:{},sectional:{},solitaire:{},spotlight:{},undercoat:{},assessment:{},bottleneck:{},equatorial:{},overburden:{},pigeonhole:{},pocketbook:{},pontifical:{},refractory:{},reparation:{},roundabout:{},simulation:{},waterproof:{},accelerator:{},certificate:{},inheritance:{},installment:{},restorative:{},ventilation:{},modification:{},subscription:{},hospitalization:{},instrumentation:{},ax:{},axe:{},bib:{},bin:{},bur:{},cot:{},fee:{},fur:{},jib:{},lid:{},six:{},ten:{},tub:{},two:{},bath:{},bike:{},cash:{},coke:{},cope:{},cowl:{},cusp:{},darn:{},debt:{},dice:{},dory:{},duct:{},fore:{},four:{},gaff:{},gage:{},gong:{},helm:{},hemp:{},icon:{},iris:{},junk:{},kern:{},loan:{},maul:{},mink:{},pane:{},pier:{},quid:{},reed:{},rook:{},scum:{},semi:{},sump:{},swob:{},taxi:{},vice:{},ware:{},wool:{},yarn:{},yawl:{},annex:{},atlas:{},barge:{},bevel:{},chaff:{},chute:{},clamp:{},crane:{},crate:{},cubeb:{},dandy:{},dicky:{},dinky:{},dolly:{},dower:{},eight:{},fifty:{},flail:{},floss:{},folio:{},fuzee:{},genre:{},girth:{},gourd:{},grape:{},hinge:{},hobby:{},inlay:{},japan:{},ladle:{},latch:{},linen:{},means:{},mitre:{},motif:{},mulct:{},pique:{},quilt:{},quirk:{},quota:{},rifle:{},rotor:{},setup:{},seven:{},shred:{},skate:{},spade:{},spool:{},spout:{},strut:{},three:{},toner:{},trawl:{},truck:{},twill:{},virtu:{},alpaca:{},anklet:{},argyle:{},argyll:{},arnica:{},balsam:{},bender:{},birdie:{},bishop:{},blower:{},blowup:{},bolero:{},bonnet:{},bounty:{},budget:{},bullet:{},cachet:{},carbon:{},casket:{},castor:{},claxon:{},cobble:{},cobweb:{},collet:{},crenel:{},cutoff:{},cutout:{},damask:{},damper:{},dibble:{},dickey:{},dipper:{},domino:{},douche:{},dragee:{},equity:{},eyelet:{},fetish:{},foible:{},fresco:{},gaiter:{},gibbet:{},gusset:{},heckle:{},hooter:{},horror:{},hunter:{},intake:{},jigger:{},lacing:{},lappet:{},makeup:{},making:{},mallet:{},marker:{},patina:{},paving:{},platen:{},plough:{},poleax:{},portal:{},primer:{},rabbet:{},rattan:{},refill:{},retort:{},revere:{},screed:{},sheath:{},sinker:{},socket:{},splint:{},stereo:{},syphon:{},tamper:{},tandem:{},tarmac:{},tenure:{},ticker:{},trepan:{},twenty:{},velvet:{},veneer:{},vessel:{},vicuna:{},backing:{},bandage:{},bobsled:{},carving:{},central:{},chamfer:{},chequer:{},cistern:{},cleaner:{},cleanup:{},coinage:{},crochet:{},cruiser:{},curtain:{},dilator:{},distaff:{},emerald:{},etching:{},flannel:{},flounce:{},footing:{},gangway:{},garbage:{},garland:{},gauffer:{},gelatin:{},grizzle:{},hanging:{},haywire:{},lamella:{},laniard:{},lanyard:{},lashing:{},lockage:{},lounger:{},manakin:{},masking:{},meshing:{},mileage:{},mintage:{},mortice:{},mortise:{},movable:{},muffler:{},palette:{},pendant:{},pendent:{},pennant:{},pillbox:{},poleaxe:{},portage:{},pottery:{},priming:{},quarrel:{},readout:{},retread:{},roundel:{},rubbing:{},scupper:{},scuttle:{},serpent:{},shampoo:{},shellac:{},shutter:{},snaffle:{},snorkel:{},spangle:{},spouter:{},stabile:{},stinker:{},tankage:{},toehold:{},tracing:{},treadle:{},trefoil:{},truckle:{},trundle:{},vesture:{},webbing:{},whipsaw:{},wrapper:{},additive:{},adjuvant:{},aperture:{},aquatint:{},backdoor:{},basilisk:{},blowback:{},bludgeon:{},breakage:{},causeway:{},checkout:{},clincher:{},compress:{},corduroy:{},coupling:{},crossbar:{},currency:{},detector:{},dividend:{},dogtooth:{},downcast:{},followup:{},frontage:{},giveaway:{},goodwill:{},hardware:{},headgear:{},headshot:{},hypnotic:{},ignition:{},inhalant:{},lipstick:{},masthead:{},meniscus:{},metallic:{},modeling:{},nautilus:{},neckband:{},nightcap:{},ornament:{},outboard:{},partizan:{},pavement:{},pectoral:{},planking:{},plumbing:{},portable:{},pressing:{},radiator:{},remittal:{},residual:{},resource:{},roulette:{},scaffold:{},scapular:{},scissors:{plural:"scissors"},scrabble:{},springer:{},sunburst:{},tapestry:{},taxation:{},thrasher:{},tomahawk:{},totality:{},tympanum:{},valuable:{},vignette:{},wardrobe:{},widening:{},admixture:{},antiquity:{},aquaplane:{},bagatelle:{},bastinado:{},blindfold:{},blueprint:{},boomerang:{},carpetbag:{},crinoline:{},depressor:{},detergent:{},doodlebug:{},downstage:{},emergency:{},endowment:{},equalizer:{},exemption:{},extortion:{},extractor:{},facsimile:{},freewheel:{},gabardine:{},grotesque:{},hemstitch:{},horseshoe:{},invention:{},jackknife:{},microwave:{},millstone:{},miniature:{},modernism:{},nosepiece:{},ownership:{},packaging:{},pargeting:{},patchwork:{},pinstripe:{},polyester:{},potpourri:{},recording:{},refresher:{},semaphore:{},semblance:{},shielding:{},sideboard:{},skyrocket:{},slapstick:{},soporific:{},spectacle:{},starboard:{},telephone:{},telescope:{},treadmill:{},turntable:{},verdigris:{},videotape:{},whirligig:{},allocation:{},ambulatory:{},anesthetic:{},assistance:{},astringent:{},automation:{},cantilever:{},chinchilla:{},concertina:{},constraint:{},deductible:{},depilatory:{},disposable:{},elongation:{},escutcheon:{},featherbed:{},foreground:{},forfeiture:{},guillotine:{},hammerhead:{},hydroplane:{},innovation:{},intoxicant:{},knockabout:{},lithograph:{},monochrome:{},nonpayment:{},nutcracker:{},pargetting:{},peripheral:{},polychrome:{},redemption:{},stabilizer:{},stenograph:{},subvention:{},sustenance:{},technology:{},television:{},waterspout:{},anaesthetic:{},anamorphism:{},concealment:{},containment:{},copperplate:{},cornerstone:{},counterfeit:{},countersink:{},cryptograph:{},delineation:{},delinquency:{},encumbrance:{},fingerboard:{},fluorescent:{},incumbrance:{},perforation:{},pyrotechnic:{},retribution:{},subsistence:{},tensiometer:{},transporter:{},undercharge:{},withholding:{},dispensation:{},electrolytic:{},encrustation:{},inclinometer:{},incrustation:{},installation:{},intermixture:{},photogravure:{},straightaway:{},transparency:{},appropriation:{},embellishment:{},improvisation:{},merchandising:{},mystification:{},quadruplicate:{},semiautomatic:{},pharmaceutical:{},superannuation:{},aba:{},boa:{},dag:{},fax:{},gad:{},keg:{},nib:{},nog:{},pix:{},pyx:{},rep:{},ski:{},taw:{},urn:{},ante:{},arms:{},bale:{},berm:{},bier:{},bitt:{},bola:{},bolo:{},brad:{},cape:{},cask:{},cent:{},coax:{},coca:{},cosh:{},dime:{},dole:{},doll:{},garb:{},gilt:{},gyro:{},hasp:{},hypo:{},ikon:{},juju:{},lane:{},lint:{},luge:{},lute:{},maxi:{},maze:{},mini:{},mitt:{},mule:{},pail:{},perk:{},plat:{},pork:{},pouf:{},rung:{},scow:{},silk:{},sill:{},skep:{},sled:{},tamp:{},tapa:{},topi:{},trey:{},vape:{},wale:{},wick:{},adobe:{},aegis:{},aglet:{},album:{},alley:{},anode:{},anvil:{},arrow:{},auger:{},batik:{},bogie:{},bolus:{},bongo:{},borer:{},bribe:{},bulla:{},caddy:{},canoe:{},chime:{},coign:{},debit:{},denim:{},depot:{},diary:{},diode:{},drier:{},flask:{},flume:{},fount:{},frier:{},fryer:{},gauze:{},globe:{},golem:{},hijab:{},inlet:{},jimmy:{},jorum:{},kayak:{},khaki:{},lasso:{},latex:{},lisle:{},lorry:{},lucre:{},manta:{},mimeo:{},mizen:{},moire:{},mulch:{},newel:{},nylon:{},penny:{},piste:{},plush:{},poker:{},prism:{},pyxis:{},ranch:{},razor:{},relic:{},rouge:{},ruler:{},sabot:{},scape:{},sedan:{},seine:{},servo:{},shelf:{plural:"shelves"},slops:{},spoke:{},sprig:{},stele:{},steps:{},stoup:{},stove:{},strop:{},suede:{},swage:{},tammy:{},tanka:{},tappa:{},teddy:{},terms:{},toque:{},torus:{},towel:{},tunic:{},tweed:{},usury:{},verso:{},vizor:{},waist:{},winch:{},withe:{},xerox:{},yacht:{},abacus:{},afghan:{},aiglet:{},alidad:{},amends:{},arctic:{},artery:{},avenue:{},banger:{},bangle:{},banian:{},banyan:{},bauble:{},beaker:{},bicorn:{},blazon:{},boiler:{},bracer:{},broach:{},bumper:{},burner:{},buzzer:{},caftan:{},calash:{},camera:{},camion:{},camlet:{},capote:{},carton:{},casein:{},catgut:{},chaise:{},cheque:{},chiton:{},chukka:{},cither:{},cloaca:{},cloche:{},coffer:{},coffin:{},coigne:{},colors:{},corbel:{},corker:{},corset:{},crayon:{},crutch:{},dagger:{},daybed:{},detour:{},diaper:{},dickie:{},dipole:{},dirndl:{},discus:{},dogleg:{},dolman:{},dosage:{},duffel:{},duffle:{},eyecup:{},fabric:{},facade:{},falsie:{},fanjet:{},fascia:{},fetter:{},firkin:{},fizgig:{},floppy:{},frieze:{},garter:{},gimlet:{},goblet:{},guimpe:{},guinea:{},gunnel:{},harrow:{},helmet:{},hookup:{},hotbed:{},impost:{},instep:{},iodine:{},island:{},jersey:{},jetsam:{},jigsaw:{},juicer:{},kaftan:{},kibble:{},kirtle:{},lateen:{},laurel:{},ledger:{},linage:{},lunula:{},magnet:{},markup:{},miotic:{},mizzen:{},myotic:{},nipple:{},nozzle:{},onager:{},pajama:{},pavage:{},pellet:{},pennon:{},peplum:{},peyote:{},pincer:{},pipage:{},pomade:{},pompon:{},popper:{},pyjama:{},ragbag:{},reamer:{},remake:{},reseau:{},rudder:{},russet:{},scythe:{},settee:{},shades:{},shorts:{},siding:{},sleeve:{},sleigh:{},spinet:{},spline:{},stoker:{},stylus:{},sublet:{},subway:{},surtax:{},swathe:{},swivel:{},syrinx:{},taenia:{},talcum:{},tariff:{},teacup:{},teeter:{},tenner:{},tether:{},thwart:{},tocsin:{},trophy:{},trowel:{},turban:{},viewer:{},waggon:{},wampum:{},wherry:{},wicker:{},willow:{},wiring:{},woolen:{},yarder:{},zipper:{},acetate:{},aerosol:{},airline:{},alidade:{},ampulla:{},android:{},aneroid:{},annulet:{},anodyne:{},apanage:{},apparel:{},archive:{},armband:{},armilla:{},arrears:{},banding:{},basting:{},batting:{},bayonet:{},beading:{},bedding:{},bladder:{},blocker:{},blusher:{},bollock:{},bouquet:{},bracing:{},brocade:{},broiler:{},bullion:{},bunting:{},burthen:{},bushing:{},caleche:{},caliper:{},cathode:{},catwalk:{},cautery:{},charger:{},charnel:{},chemise:{},chevron:{},chimney:{},chlamys:{},circlet:{},colours:{},commode:{},cooling:{},cordage:{},coronet:{},corsair:{},crampon:{},cutaway:{},daybook:{},deadeye:{},decoder:{},diagram:{},doeskin:{},dogsled:{},doormat:{},dragger:{},dragnet:{},drapery:{},drawers:{},dustpan:{},escheat:{},eyehole:{},fixings:{},flatbed:{},flattop:{},flipper:{},foghorn:{},foliage:{},footage:{},foretop:{},forgery:{},frigate:{},funding:{},furring:{},fustian:{},garment:{},garotte:{},garrote:{},gouache:{},grapnel:{},griddle:{},hackney:{},hammock:{},harpoon:{},hassock:{},hatchel:{},hatchet:{},heating:{},hedging:{},hibachi:{},hobnail:{},holding:{},holster:{},hydrant:{},iceboat:{},igniter:{},impasse:{},ironing:{},jackpot:{},javelin:{},joinery:{},fibre:{},hazel:{},lemon:{},peach:{},plank:{},raven:{},snipe:{},spine:{},steer:{},stint:{},stunt:{},bleach:{},breath:{},callus:{},cherry:{},dimple:{},entire:{},ferret:{},filler:{},hybrid:{},jackal:{},marrow:{},orange:{},radish:{},spruce:{},stifle:{},winkle:{},endemic:{},vanilla:{},beefwood:{},calabash:{},concrete:{},emission:{},kingfish:{},solution:{},volatile:{},partridge:{},repellant:{},derivative:{},thickening:{},ash:{},bud:{},cob:{},hen:{},mew:{},mud:{},mum:{},paw:{},roe:{},sow:{},soy:{},wax:{},yam:{},beef:{},burl:{},calf:{plural:"calves"},chat:{},fowl:{},fuzz:{},gill:{},grub:{},hock:{},hoof:{},lobe:{},rose:{},scup:{},soup:{},swan:{},tint:{},tuna:{},tusk:{},alloy:{},briar:{},clove:{},coney:{},ebony:{},ether:{},filth:{},flesh:{},gumbo:{},homer:{},jelly:{},matte:{},mocha:{},reeve:{},wrack:{},annual:{},canine:{},carrot:{},cereal:{},cockle:{},feeler:{},fennel:{},flimsy:{},gargle:{},gravel:{},grouse:{},indigo:{},mammee:{},medlar:{},monkey:{},nebula:{},oyster:{},salmon:{plural:"salmon"},shiner:{},shrimp:{},sprout:{},stigma:{},blossom:{},blubber:{},buffalo:{},cabbage:{},calamus:{},catfish:{},caudate:{},caustic:{},chelate:{},chicory:{},ciliate:{},essence:{},griffon:{},hemlock:{},hydrate:{},incense:{},lighter:{},remount:{},sardine:{},stinger:{},vitriol:{},ambrosia:{},billfish:{},blackcap:{},crawfish:{},crayfish:{},earthnut:{},escallop:{},filament:{},flounder:{},infusion:{},ironwood:{},quandong:{},relative:{},ringtail:{},screamer:{},sycamore:{},alabaster:{},algarroba:{},broadbill:{},composite:{},fulminate:{},perennial:{},tangerine:{},bladderpod:{},granadilla:{},heartsease:{},periwinkle:{},tumbleweed:{},agglomerate:{},bittersweet:{},intermediate:{},dye:{},elk:{},fig:{},haw:{},oka:{},pea:{},pee:{},rye:{},sac:{},tar:{},yak:{},carp:{},clay:{},coma:{},cony:{},crud:{},cusk:{},dung:{},fang:{},foam:{},germ:{},glue:{},hare:{},hind:{},husk:{},kiwi:{},lake:{},mung:{},okra:{},pine:{},pith:{},puke:{},rice:{},roan:{},sloe:{},taro:{},teal:{},titi:{},twig:{},amber:{},anime:{},berry:{},boxer:{},carob:{},cedar:{},chine:{},guava:{},hound:{},husky:{},kauri:{},lemma:{},monad:{},ocher:{},ochre:{},onion:{},ounce:{},pansy:{},pecan:{},pewit:{},prawn:{},quail:{},shuck:{},sloth:{},slush:{},smelt:{},snail:{},snout:{},spawn:{},swift:{},tabby:{},thorn:{},topaz:{},umber:{},virus:{},wafer:{},wahoo:{},wheat:{},whelk:{},badger:{},bonito:{},broody:{},chrome:{},cirrus:{},cocoon:{},cowpea:{},cuckoo:{},elixir:{},grease:{},grubby:{},howler:{},jabiru:{},jargon:{},jujube:{},kernel:{},leaven:{},lentil:{},liquor:{},locust:{},manioc:{},mastic:{},mentum:{},mildew:{},mimosa:{},mullet:{},muscat:{},mutant:{},nectar:{},nettle:{},nodule:{},pawpaw:{},pecker:{},plasma:{},ruddle:{},sallow:{},shoddy:{},squill:{},starch:{},stroma:{},stucco:{},sunray:{},thorax:{},tissue:{},violet:{},walnut:{},warble:{},amyloid:{},antenna:{plural:"antennae"},apricot:{},aquatic:{},asphalt:{},avocado:{},beebalm:{},bobtail:{},builder:{},bulldog:{},caltrop:{},cayenne:{},chinook:{},coconut:{},cricket:{},cudweed:{},currant:{},cuticle:{},dasheen:{},gallfly:{},juniper:{},lacquer:{},leaflet:{},lettuce:{},macadam:{},mordant:{},mustard:{},packing:{},panther:{},papilla:{},papyrus:{},parsnip:{},pigweed:{},pollard:{},redfish:{},redwood:{},rubbish:{},saffron:{},salsify:{},shallot:{},slating:{},solvate:{},solvent:{},soybean:{},sunfish:{},truffle:{},whisker:{},abrasive:{},allspice:{},angelica:{},biennial:{},bilberry:{},bluebell:{},chickpea:{},cinnabar:{},cinnamon:{},congener:{},creosote:{},demerara:{},duckbill:{},firebird:{},fleabane:{},humanity:{},lavender:{},mahogany:{},monkfish:{},paraffin:{},peduncle:{},peroxide:{},plantain:{},rockfish:{},sandarac:{},sandwort:{},scammony:{},shamrock:{},skipjack:{},skullcap:{},snowbird:{},suckling:{},tubercle:{},alligator:{},angelfish:{},arachnoid:{},arrowroot:{},bearberry:{},blackfish:{},buckthorn:{},capitulum:{},carbonate:{},carnation:{},celluloid:{},chemistry:{},coriander:{},corrosive:{},crabapple:{},devilfish:{},emanation:{},groundnut:{},horseback:{},horsemint:{},injection:{},matchwood:{},mistletoe:{},offspring:{plural:"offspring"},pyrethrum:{},raspberry:{},razorback:{},satinwood:{},sheepskin:{},tomatillo:{},waxflower:{},whitefish:{},ammunition:{},bitterwood:{},blackberry:{},butterfish:{},chinquapin:{},coneflower:{},flagellate:{},flamboyant:{},fledgeling:{},insulation:{},peppermint:{},receptacle:{},strawberry:{},watercress:{},chittamwood:{},everlasting:{},fomentation:{},helleborine:{},honeysuckle:{},horseradish:{},huckleberry:{},salmonberry:{},shittimwood:{},strawflower:{},ultramarine:{},whitethroat:{},wintergreen:{},helmetflower:{},impregnation:{},quintessence:{},sternutatory:{},thimbleberry:{},contamination:{},extravasation:{},leatherjacket:{},pulverisation:{},pulverization:{},tortoiseshell:{},ti:{},ala:{},asp:{},eel:{},elm:{},fir:{},gar:{},neb:{},nit:{},oak:{},oat:{},sol:{},tom:{},yew:{},agar:{},akee:{},anil:{},atom:{},balm:{},bast:{},beet:{},boar:{},bole:{},bran:{},brit:{},cere:{},cero:{},chow:{},coho:{},dahl:{},dill:{},flax:{},foal:{},glop:{},gnat:{},hake:{},herb:{},hoar:{},homo:{},kaki:{},kino:{},leek:{},loin:{},mite:{},musk:{},parr:{},pear:{},poon:{},puka:{},rhea:{},saki:{},seta:{},shad:{},silt:{},slag:{},soda:{},soma:{},soot:{},soya:{},talc:{},teak:{},tufa:{},unai:{},unau:{},whey:{},woad:{},wort:{},yolk:{},zinc:{},abaca:{},alder:{},alula:{},amino:{},anise:{},apple:{},aroid:{},aster:{},balsa:{},basil:{},beech:{},betel:{},biddy:{},billy:{},biped:{},booby:{},britt:{},bruin:{},cairn:{},capon:{},caulk:{},chard:{},chess:{},chick:{},cisco:{},cohoe:{},comma:{},croup:{},cumin:{},dross:{},elver:{},epoxy:{},ergot:{},falls:{},flint:{},fossa:{},genip:{},grout:{},grume:{},henna:{},hilum:{},humus:{},hydra:{},icaco:{},ilama:{},imago:{},ivory:{},kapok:{},kenaf:{},lapin:{},larch:{},lilac:{},lotus:{},luffa:{},mahoe:{},maize:{},mamey:{},mango:{},manna:{},melon:{},moong:{},naiad:{},nanny:{},nopal:{},orris:{},osier:{},otter:{},ovary:{},ovule:{},pacer:{},panda:{},papaw:{},piggy:{},pilus:{},pinna:{},pixie:{},polyp:{},potto:{},putty:{},quira:{},robin:{},roble:{},rosin:{},scrod:{},sepia:{},sisal:{},slime:{},sorus:{},sprat:{},squid:{},stoma:{},sumac:{},swede:{},theca:{},thyme:{},trout:{plural:"trout"},tunny:{},vapor:{},velum:{},venom:{},vinyl:{},whelp:{},yeast:{},acetum:{},acinus:{},acumen:{},adduct:{},agaric:{},alkali:{},almond:{},anuran:{},archil:{},argent:{},balata:{},bamboo:{},bantam:{},barley:{},basset:{},beluga:{},bennet:{},bluing:{},bonduc:{},borage:{},capsid:{},cashew:{},cassia:{},caudex:{},celery:{},chives:{},cilium:{},citron:{},cobnut:{},cocker:{},cosmos:{},cowage:{},croton:{},cupule:{},cushaw:{},darter:{},dentin:{},dobson:{},dodder:{},donkey:{},durian:{},embryo:{},endive:{},ermine:{},falcon:{},feijoa:{},feline:{},fisher:{},fucoid:{},gadfly:{},garlic:{},glycol:{},hackle:{},haunch:{},herpes:{},hyssop:{},kaffir:{},kitten:{},lichee:{},limpet:{},linden:{},linnet:{},litchi:{},loofah:{},loquat:{},lovage:{},lupine:{},madder:{},maguey:{},manure:{},marang:{},mescal:{},mocker:{},mombin:{},mucoid:{},mudcat:{},munggo:{},murine:{},mussel:{},myrtle:{},nipper:{},nutmeg:{},obeche:{},orchil:{},orchis:{},oriole:{},padauk:{},paigle:{},papaya:{},parget:{},pasang:{},peewee:{},peewit:{},phenol:{},plaice:{},pomelo:{},poplar:{},possum:{},potato:{},pothos:{},pouter:{},puffer:{},pullet:{},pumice:{},pyrene:{},quahog:{},quartz:{},quince:{},rachis:{},raffia:{},ratter:{},relict:{},sabicu:{},saline:{},sapote:{},saurel:{},schrod:{},senega:{},septum:{},setter:{},sierra:{},simian:{},sludge:{},solder:{},spirea:{},stevia:{},sulfur:{},thrift:{},toetoe:{},tomato:{},tophus:{},triton:{},tupelo:{},turbot:{},turnip:{},vapour:{},vellum:{},wapiti:{},wasabi:{},acerola:{},actinon:{},aculeus:{},adamant:{},albumen:{},alewife:{},alfalfa:{},amboyna:{},anchovy:{},anemone:{},anionic:{},annelid:{},annulus:{},antacid:{},antlion:{},arsenic:{},aurochs:{},babbitt:{},barilla:{},beeswax:{},bimetal:{},biomass:{},bloomer:{},blotter:{},bluefin:{},blueing:{},boneset:{},boxwood:{},bracken:{},brocket:{},bromide:{},buckeye:{},bugbane:{},bugloss:{},bullock:{},bulrush:{},buzzard:{},cackler:{},cacodyl:{},caliche:{},calycle:{},cambium:{},capulin:{},caraway:{},cardoon:{},catbird:{},catechu:{},celtuce:{},ceriman:{},chalaza:{},chamois:{},chervil:{},chigger:{},citrate:{},cocoyam:{},codfish:{},comfrey:{},compost:{},cowslip:{},crappie:{},crawdad:{},crinoid:{},cyanide:{},cypress:{},dabbler:{},denizen:{},diploid:{},dogfish:{},dogwood:{},echidna:{},eelpout:{},enation:{},fallout:{},ferrite:{},fetlock:{},filaria:{},filbert:{},firebug:{},firefly:{},frijole:{},fuchsia:{},gamboge:{},ginseng:{},girasol:{},glutton:{},gobbler:{},grackle:{},grampus:{},granite:{},grizzly:{},grouper:{},grunter:{},gudgeon:{},haddock:{},halibut:{},haploid:{},haricot:{},heather:{},hepatic:{},herring:{},hickory:{},hogfish:{},honesty:{},hyaline:{},ignitor:{},inducer:{},jackass:{},jewfish:{},jonquil:{},kestrel:{},kingcup:{},kumquat:{},lactate:{},langsat:{},lanolin:{},lingcod:{},lobster:{},logwood:{},mahagua:{},majagua:{},malacca:{},mammoth:{},marabou:{},marasca:{},menthol:{},mercury:{},monarch:{},moneran:{},mongrel:{},moorhen:{},morello:{},muskrat:{},nervure:{},nitrate:{},octopus:{},oldwife:{},opossum:{},oregano:{},ostrich:{},oxheart:{},parsley:{},peacock:{},pigfish:{},pimento:{},piranha:{},plumcot:{},pollack:{},pollock:{},pompano:{},popcorn:{},poultry:{},pricket:{},puccoon:{},pulasan:{},pyrogen:{},quahaug:{},quassia:{},quetzal:{},raccoon:{},ragweed:{},ragwort:{},rattler:{},redbird:{},redpoll:{},redtail:{},reducer:{},redwing:{},remover:{},residue:{},retinal:{},rhubarb:{},rosebud:{},rostrum:{},satsuma:{},saurian:{},sequoia:{},seriema:{},skylark:{},sockeye:{},soursop:{},sparrow:{},spinach:{},spiraea:{},stentor:{},steroid:{},stubble:{},sulfate:{},sulphur:{},tangelo:{},taproot:{},tarweed:{},tarwood:{},tattler:{},taurine:{},teargas:{},timothy:{},tobacco:{},topknot:{},tortrix:{},trotter:{},varmint:{},verdure:{},viceroy:{},vinegar:{},viscose:{},vulture:{},walleye:{},waratah:{},warbler:{},waxwork:{},whooper:{},wilding:{},witloof:{},wryneck:{},abradant:{},absinthe:{},acceptor:{},actinoid:{},adhesive:{},adjutant:{},ageratum:{},agueweed:{},albacore:{},amarelle:{},amethyst:{},ammoniac:{},argonaut:{},armyworm:{},auricula:{},balancer:{},baldpate:{},barnacle:{},basswood:{},bayberry:{},bearskin:{},beetroot:{},birdlime:{},blackfly:{},blacktop:{},bluebird:{},bluefish:{},boarfish:{},bocconia:{},boxberry:{},brisling:{},broccoli:{},buckskin:{},bullhead:{},bullrush:{},canistel:{},capuchin:{},carangid:{},carbonyl:{},carboxyl:{},cardamom:{},cardamon:{},carinate:{},carnauba:{},carotene:{},cashmere:{},catalyst:{},catchfly:{},celeriac:{},cetacean:{},chimaera:{},chloride:{},cilantro:{},cinchona:{},citrange:{},cockspur:{},conodont:{},costmary:{},cowberry:{},cucumber:{},deadwood:{},detritus:{},dewberry:{},dilution:{},dolomite:{},duckling:{},ectozoan:{},eelgrass:{},effluent:{},eggplant:{},emulsion:{},estragon:{},filtrate:{},fireweed:{},flathead:{},flooring:{},forelock:{},galangal:{},garbanzo:{},grayback:{},guaiacum:{},hardtack:{},harebell:{},hawkweed:{},hazelnut:{},hedgehog:{},hepatica:{},hookworm:{},hornwort:{},horsefly:{},hyacinth:{},impurity:{},iodoform:{},jalapeno:{},jamberry:{},japonica:{},keurboom:{},kindling:{},kingwood:{},kinkajou:{},kohlrabi:{},labdanum:{},lambskin:{},locoweed:{},lovebird:{},magnolia:{},mahimahi:{},mandrake:{},margarin:{},marjoram:{},medusoid:{},mephitis:{},migrator:{},molecule:{},moonfish:{},mucilage:{},mulberry:{},nestling:{},omnivore:{},ovenbird:{},pandanus:{},pickerel:{},pilchard:{},pimiento:{},pitahaya:{},placenta:{},plumbago:{},predator:{},ptomaine:{},puffball:{},pulassan:{},purebred:{},pyrectic:{},quandang:{},quickset:{},rambotan:{},rambutan:{},redberry:{},redstart:{},reedbird:{},ricebird:{},richweed:{},ringdove:{},rockrose:{},rosefish:{},rosemary:{},rosewood:{},ruminant:{},rutabaga:{},sailfish:{},salsilla:{},saltwort:{},sandfish:{},scallion:{},seahorse:{},sealskin:{},sewerage:{},shoveler:{},siderite:{},silkworm:{},sparling:{},squealer:{},squirrel:{},stearate:{},stinkpot:{},superbug:{},surffish:{},sweetsop:{},tamarind:{},tarragon:{},teaberry:{},thresher:{},throstle:{},tilefish:{},tomentum:{},toxicant:{},turmeric:{},ungulate:{},univalve:{},urochord:{},vesicant:{},warragal:{},warrigal:{},watchdog:{},waxberry:{},weakfish:{},wolffish:{},woodbine:{},woodruff:{},wormcast:{},wriggler:{},zucchini:{},absorbent:{},adsorbate:{},adsorbent:{},albatross:{},almandine:{},andromeda:{},antiknock:{},apophysis:{},archangel:{},arsenical:{},artichoke:{},asparagus:{},aubergine:{},bacteroid:{},blackbird:{},blindworm:{},bluegrass:{},bluepoint:{},broadtail:{},brooklime:{},brookweed:{},brushwood:{},buckwheat:{},bugleweed:{},buteonine:{},butternut:{},caecilian:{},calyculus:{},candlenut:{},cantaloup:{},carambola:{},carbonado:{},carbuncle:{},cardboard:{},carnivore:{},catamount:{},celandine:{},chameleon:{},chatterer:{},chelonian:{},cherimoya:{},chickweed:{},chlamydia:{},clamshell:{},clapboard:{},coachwhip:{},cochineal:{},cocklebur:{},cocozelle:{},coltsfoot:{},commensal:{},courgette:{},crackling:{},cupflower:{},cyanamide:{},digestive:{},digitalis:{},driftfish:{},ecrevisse:{},ectoplasm:{},eiderdown:{},ephemeral:{},eutherian:{},evergreen:{},excretion:{},exudation:{},fenugreek:{},firebrand:{},firestone:{},flagellum:{},frostweed:{},funiculus:{},gladiolus:{},glasswort:{},goldeneye:{},goldfinch:{},grapevine:{},grenadier:{},hackberry:{},hamadryad:{},heartleaf:{},hellebore:{},hollyhock:{},horehound:{},horsebean:{},horsehair:{},horseweed:{},hortensia:{},hydroxide:{},jackfruit:{},jacksnipe:{},jellyfish:{},juneberry:{},lancewood:{},langouste:{},leavening:{},lemonwood:{},mammalian:{},manzanita:{},maravilla:{},marihuana:{},marijuana:{},moosewood:{},muscadine:{},muskmelon:{},nakedwood:{},nectarine:{},nighthawk:{},pasturage:{},patchouli:{},patchouly:{},pelecypod:{},pellitory:{},peregrine:{},peristome:{},persimmon:{},phosphate:{},pimpernel:{},pinchbeck:{},pineapple:{},pistachio:{},polyploid:{},probiotic:{},proboscis:{},protozoan:{},pureblood:{},quadruped:{},rauwolfia:{},recycling:{},reptilian:{},reticulum:{},rockcress:{},rootstock:{},rosinweed:{},sandpaper:{},sapodilla:{},sassafras:{},sheldrake:{},shingling:{},shoveller:{},siccative:{},sicklepod:{},snakeroot:{},snowflake:{},sourdough:{},spicebush:{},spirillum:{},stainless:{},stiffener:{},strangler:{},strawworm:{},sugarcane:{},swordfish:{},tamarindo:{},tarantula:{},topminnow:{},tulipwood:{},turquoise:{},twayblade:{},twinberry:{},wallpaper:{},whitebait:{},whiteface:{},wineberry:{},wolverine:{},workhorse:{},adulterant:{},amygdaloid:{},anopheline:{},aquamarine:{},belladonna:{},bellwether:{},bitterweed:{},blacksnake:{},blackthorn:{},bluebonnet:{},bluebottle:{},bottlenose:{},brachiopod:{},brazilwood:{},breadfruit:{},butterball:{},butterweed:{},candelilla:{},cantaloupe:{},catarrhine:{},cellulosic:{},chatterbox:{},chinaberry:{},cinquefoil:{},citronwood:{},clementine:{},condensate:{},copperhead:{},coralberry:{},cornflower:{},cottonweed:{},cottonwood:{},crossbreed:{},crustacean:{},deathwatch:{},demoiselle:{},dollarfish:{},elderberry:{},exhalation:{},feathertop:{},fetterbush:{},fiddlehead:{},flycatcher:{},fritillary:{},garambulla:{},goldenbush:{},gooseberry:{},grapefruit:{},jaboticaba:{},jackrabbit:{},ketembilla:{},kitembilla:{},lemongrass:{},littleneck:{},loganberry:{},loggerhead:{},mangosteen:{},marblewood:{},marguerite:{},massasauga:{},meerschaum:{},monoclonal:{},nasturtium:{},needlefish:{},nonstarter:{},ornamental:{},pacesetter:{},parenchyma:{},pennyroyal:{},pepperwort:{},plasmodium:{},princewood:{},propellant:{},propellent:{},pufferfish:{},pyrimidine:{},quercitron:{},restharrow:{},restrainer:{},ribbonfish:{},ribbonwood:{},rudderfish:{},sapphirine:{},scorzonera:{},sidewinder:{},silverbush:{},silverfish:{},silverweed:{},spiceberry:{},sticktight:{},sugarberry:{},superoxide:{},tarmacadam:{},turpentine:{},turtledove:{},velvetleaf:{},vertebrate:{},vesicatory:{},wandflower:{},watermelon:{},windowpane:{},witchgrass:{},yellowbird:{},yellowtail:{},yellowwood:{},adulterator:{},arthrospore:{},artiodactyl:{},bactericide:{},boysenberry:{},branchiopod:{},buffalofish:{},butcherbird:{},cauliflower:{},cherrystone:{},chittimwood:{},chokecherry:{},combustible:{},conspecific:{},digitigrade:{},dolphinfish:{},flameflower:{},gillyflower:{},groundberry:{},groundcover:{},heterocycle:{},honeyflower:{},insectivore:{},leatherleaf:{},leatherwood:{},lingonberry:{},liquidambar:{},loosestrife:{},muskellunge:{},plantigrade:{},platyrrhine:{},pomegranate:{},precipitant:{},prickleback:{},quicksilver:{},recombinant:{},refrigerant:{},shellflower:{},silversides:{},sleuthhound:{},swallowwort:{},unguiculate:{},waldmeister:{},archosaurian:{},distillation:{},heterocyclic:{},honeycreeper:{},instillation:{},invertebrate:{},nonsteroidal:{},placentation:{},sarsaparilla:{},serviceberry:{},squirrelfish:{},transudation:{},weatherboard:{},whortleberry:{},yellowhammer:{},branchiopodan:{},inflorescence:{},platyrrhinian:{},semiconductor:{},transactinide:{},vitrification:{},fructification:{},aa:{},ai:{},ani:{},auk:{},awn:{},bot:{},dak:{},daw:{},dew:{},doe:{},dug:{},eft:{},ern:{},ewe:{},gib:{},gnu:{},goo:{},ivy:{},jay:{},kea:{},kob:{},lac:{},lye:{},may:{},mei:{},moa:{},oca:{},ola:{},olm:{},pia:{},pug:{},teg:{},tup:{},acyl:{},agua:{},aloe:{},amyl:{},anoa:{},apar:{},aril:{},arui:{},atar:{},axil:{},barm:{},baya:{},bine:{},boll:{},bufo:{},buna:{},calx:{},cavy:{},chub:{},cleg:{},coco:{},colt:{},coot:{},corm:{},cows:{},craw:{},culm:{},cyme:{},dace:{},dalo:{},deer:{plural:"deer"},derv:{},dhak:{},dhal:{},dika:{},diol:{},disa:{},dita:{},dogy:{},doob:{},dopa:{},enol:{},erne:{},eyas:{},fern:{},fice:{},floc:{},fuji:{},gean:{},goby:{},guan:{},guar:{},guib:{},haem:{},halm:{},hart:{},heme:{},hogg:{},hops:{},hoya:{},ibex:{},ibis:{},inga:{},jird:{},jute:{},kali:{},kelp:{},kola:{},kudu:{},lily:{},lino:{},liza:{},loam:{},loir:{},lory:{},lynx:{},mako:{},mamo:{},mara:{},marl:{},merl:{},mica:{},milo:{},miro:{},mola:{},moss:{},munj:{},mutt:{},myna:{},nagi:{},napa:{},napu:{},neem:{},neon:{},olla:{},ombu:{},onyx:{},opah:{},opal:{},orca:{},oryx:{},paca:{},peat:{},peba:{},pika:{},pome:{},puku:{},puma:{},pupa:{},ragi:{},rimu:{},rudd:{},sago:{},salp:{},sang:{},sard:{},scut:{},sial:{},sika:{},sild:{},sima:{},skua:{},smew:{},sugi:{},tatu:{},teff:{},teju:{},tern:{},tipu:{},toad:{},tody:{},tolu:{},tuff:{},tung:{},urea:{},urus:{},vole:{},wasp:{},weka:{},blast:{},dinar:{},lapse:{},lurch:{},whirl:{},travel:{},capacity:{},encounter:{},conversion:{},separation:{},age:{},nip:{},now:{},halt:{},leap:{},mile:{},peak:{},peso:{},slam:{},term:{},wake:{},faint:{},scoop:{},surge:{},third:{},trick:{},bother:{},cackle:{},motion:{},chatter:{},reversal:{},elevation:{},experience:{},dab:{},pat:{},cube:{},howl:{},over:{},peep:{},span:{},cause:{},death:{},plump:{},plunk:{},poise:{},pulse:{},shame:{},spark:{},twang:{},wound:{},cipher:{},crunch:{},damage:{},fusion:{},period:{},racket:{},repeat:{},supply:{},wallow:{},wonder:{},dribble:{},failure:{},outrage:{},sparkle:{},backfire:{},campaign:{},delivery:{},increase:{},variance:{},explosion:{},correction:{},disturbance:{},translation:{},displacement:{},transposition:{},hum:{},mug:{},buzz:{},cord:{},dawn:{},fuss:{},hint:{},hiss:{},much:{},past:{},ping:{},rout:{},seek:{},tide:{},warp:{},birth:{},blend:{},crumb:{},delay:{},rupee:{},worst:{},climax:{},deluge:{},dirham:{},recoil:{},replay:{},rhythm:{},rising:{},descent:{},grumble:{},impulse:{},respite:{},scruple:{},triumph:{},addition:{},dogfight:{},eruption:{},occasion:{},progress:{},reprieve:{},shilling:{},stampede:{},accretion:{},induction:{},appearance:{},suggestion:{},circulation:{},irradiation:{},accommodation:{},precipitation:{},in:{},ebb:{},mil:{},zap:{},gush:{},honk:{},lull:{},plop:{},rave:{},ream:{},slap:{},then:{},zoom:{},fifth:{},final:{},gleam:{},reign:{},swash:{},throb:{},thump:{},tweet:{},wreck:{},wring:{},billow:{},breach:{},ending:{},fourth:{},gurgle:{},injury:{},nibble:{},parity:{},sunset:{},billion:{},history:{},instant:{},spatter:{},blackout:{},creation:{},decision:{},downhill:{},entrance:{},rational:{},trillion:{},hereafter:{},immersion:{},intrusion:{},millenary:{},remainder:{},saltation:{},adjustment:{},antecedent:{},dedication:{},deflection:{},impairment:{},limitation:{},outpouring:{},refinement:{},scattering:{},devastation:{},elaboration:{},fundamental:{},prohibition:{},retardation:{},interference:{},transmission:{},manifestation:{},scintillation:{},mi:{},kip:{},wee:{},yaw:{},bout:{},bray:{},doom:{},harm:{},haul:{},jolt:{},none:{},ooze:{},pity:{},sigh:{},surf:{},thaw:{},tour:{},alpha:{},carom:{},chunk:{},clink:{},colon:{},deuce:{},drama:{},glint:{},going:{},shtik:{},sixth:{},spurt:{},thrum:{},tinge:{},today:{},waltz:{},worth:{},bucket:{},egress:{},fathom:{},mutter:{},patter:{},picnic:{},quaver:{},ripple:{},rustle:{},shtick:{},sizzle:{},squawk:{},stride:{},tremor:{},whoosh:{},wobble:{},absence:{},allegro:{},andante:{},deficit:{},episode:{},heaving:{},raising:{},rebirth:{},roaring:{},rupture:{},screech:{},scrunch:{},seventh:{},success:{},sunrise:{},takeoff:{},trample:{},twinkle:{},cracking:{},deletion:{},incident:{},interval:{},isometry:{},overflow:{},rattling:{},skeleton:{},splatter:{},striking:{},twilight:{},upheaval:{},advantage:{},alignment:{},deflexion:{},diffusion:{},emergence:{},inflation:{},normality:{},remission:{},resultant:{},ruination:{},shakedown:{},vibration:{},yesterday:{},allegretto:{},conception:{},concoction:{},concretion:{},disruption:{},divergence:{},graduation:{},inflection:{},initiation:{},moderation:{},sprinkling:{},approaching:{},biquadratic:{},competition:{},compression:{},contraction:{},humiliation:{},permutation:{},constriction:{},ramification:{},accompaniment:{},embarrassment:{},mortification:{},rectification:{},coo:{},eve:{},gee:{},par:{},sea:{},sec:{},tot:{},won:{},yen:{},bash:{},beep:{},ding:{},dram:{},fete:{},gait:{},inch:{},lira:{},peal:{},pint:{},purr:{},rial:{},ting:{},toot:{},whiz:{},blare:{},bleat:{},brawl:{},cease:{},digit:{},dying:{},epoch:{},gravy:{},idyll:{},knell:{},metre:{},minim:{},ninth:{},plash:{},plonk:{},quake:{},quart:{},ravel:{},salvo:{},skirl:{},snore:{},spate:{},spirt:{},swish:{},tenth:{},unity:{},whack:{},whirr:{},years:{},ascent:{},bushel:{},curfew:{},drachm:{},eighth:{},enough:{},finale:{},fizzle:{},footer:{},gobble:{},jingle:{},marvel:{},myriad:{},octave:{},ravage:{},smudge:{},spritz:{},squeak:{},squeal:{},squish:{},swerve:{},tierce:{},usance:{},waxing:{},atrophy:{},banging:{},bending:{},blowout:{},centner:{},clangor:{},debacle:{},decimal:{},eclipse:{},glitter:{},kickoff:{},midterm:{},million:{},misfire:{},modulus:{},monsoon:{},ordinal:{},outflow:{},ringing:{},shimmer:{},sinking:{},smolder:{},torrent:{},twelfth:{},backwash:{},bouncing:{},downfall:{},dripping:{},drumbeat:{},eighties:{},eternity:{},exigency:{},footstep:{},furlough:{},gleaming:{},grinding:{},hardship:{},instance:{},invasion:{},majority:{},maturity:{},nineties:{},overtime:{},overture:{},pandemic:{},pounding:{},receding:{},recovery:{},rustling:{},scraping:{},sixtieth:{},smoulder:{},spoilage:{},spraying:{},tomorrow:{},touching:{},amplitude:{},ascension:{},athletics:{},avalanche:{},billionth:{},checkmate:{},clearance:{},collision:{},commotion:{},contagion:{},departure:{},fertility:{},formality:{},gestation:{},heartbeat:{},honeymoon:{},hundredth:{},interlude:{},irruption:{},lactation:{},millionth:{},multitude:{},onslaught:{},outgrowth:{},plurality:{},probation:{},pulsation:{},shrinkage:{},sixteenth:{},spreading:{},stalemate:{},throbbing:{},whistling:{},withering:{},affliction:{},alteration:{},betterment:{},dispersion:{},enervation:{},expiration:{},foreboding:{},incubation:{},incumbency:{},inevitable:{},irrational:{},jubilation:{},levitation:{},millennium:{plural:"millennia"},procession:{},repetition:{},revolution:{},sabbatical:{},solubility:{},subsidence:{},thousandth:{},undulation:{},visitation:{},accelerando:{},catastrophe:{},celebration:{},coincidence:{},consequence:{},continuance:{},deformation:{},dislocation:{},dissipation:{},expansivity:{},fluctuation:{},gravitation:{},oscillation:{},preliminary:{},punctuation:{},sufficiency:{},acceleration:{},augmentation:{},championship:{},commencement:{},conservation:{},deceleration:{},degeneration:{},encroachment:{},interlocking:{},reflectivity:{},consolidation:{},hundredweight:{},magnetisation:{},magnetization:{},regurgitation:{},sheepshearing:{},transmutation:{},conglomeration:{},materialisation:{},optic:{},patty:{},prune:{},saute:{},scalp:{},sinus:{},swill:{},bubbly:{},burgoo:{},choler:{},claret:{},cortex:{},crotch:{},drivel:{},frappe:{},hiatus:{},kosher:{},legume:{},macula:{},phlegm:{},pickle:{},stemma:{},thenar:{},tiptoe:{},adrenal:{},anatomy:{},confect:{},freckle:{},jugular:{},knuckle:{},mastoid:{},medulla:{},pudding:{},takeout:{},thyroid:{},tonsure:{},wassail:{},anterior:{},coloring:{},julienne:{},libation:{},rhomboid:{},sandwich:{},takeaway:{},appendage:{},chocolate:{},colouring:{},endocrine:{},hamstring:{},moonshine:{},permanent:{},recessive:{},turbinate:{},confection:{},hemisphere:{},ingredient:{},spatchcock:{},sweetening:{},convolution:{},pneumogastric:{},os:{},cos:{},cud:{},sup:{},caul:{},chaw:{},chin:{},chou:{},curd:{},cyst:{},fizz:{},jowl:{},mane:{},milt:{},perm:{},snot:{},sorb:{},sura:{},taco:{},booze:{},broth:{},caput:{},chili:{},cocoa:{},costa:{},cress:{},dough:{},eater:{},fanny:{},fondu:{},hyoid:{},loins:{},lolly:{},lumen:{},mamma:{},mummy:{},pasta:{},plasm:{},porgy:{},puree:{},quaff:{},quark:{},sinew:{},thigh:{},tripe:{},tummy:{},areola:{},banana:{},booger:{},bowleg:{},brunch:{},carpal:{},cervix:{},citrus:{},comfit:{},dactyl:{},dorsum:{},edible:{},flitch:{},fondue:{},fornix:{},gammon:{},herbal:{},lambda:{},malted:{},marcel:{},millet:{},monggo:{},noodle:{},paring:{},pastry:{},pelvis:{},simnel:{},spleen:{},tarsal:{},tensor:{},tipple:{},waffle:{},wonton:{},abdomen:{},adenoid:{},auricle:{},biscuit:{},brownie:{},clabber:{},criollo:{},croaker:{},cubitus:{},deltoid:{},dentine:{},dietary:{},eyeball:{},fistula:{},forearm:{},fritter:{},gherkin:{},haircut:{},headful:{},hyaloid:{},iceberg:{},isthmus:{},kneecap:{},lacteal:{},lasagna:{},lasagne:{},lozenge:{},marmite:{},midriff:{},oatmeal:{},ocellus:{},pageboy:{},paprika:{},pathway:{},pottage:{},prepuce:{},pumpkin:{},ramekin:{},ratafia:{},roulade:{},sausage:{},seltzer:{},serving:{},sidecar:{},slobber:{},sorghum:{},stirrup:{},sultana:{},teacake:{},timbale:{},toenail:{},topping:{},tostada:{},trachea:{},treacle:{},twister:{},vintage:{},abducent:{},abductor:{},afferent:{},alveolus:{},appendix:{plural:"appendices"},astragal:{},bicuspid:{},blowfish:{},blowhole:{},bouffant:{},capitate:{},chowchow:{},cobblers:{},cocktail:{},coquille:{},couscous:{},doughboy:{},doughnut:{},dumpling:{},efferent:{},eminence:{},exocrine:{},fascicle:{},flatfish:{},flatfoot:{},flummery:{},forehead:{},foreskin:{},hairline:{},honeydew:{},licorice:{},ligament:{},lollipop:{},macaroni:{},mackerel:{},marinade:{},membrane:{},monstera:{},mouthful:{},muscatel:{},pheasant:{},physique:{},potation:{},prostate:{},ramequin:{},receptor:{},sillabub:{},sinusoid:{},smoothie:{},specimen:{},streusel:{},stuffing:{},syllabub:{},teardrop:{},venation:{},windfall:{},abdominal:{},apparatus:{},blueberry:{},casserole:{},corpuscle:{},cranberry:{},demitasse:{},dentition:{},drinkable:{},drumstick:{},epiphysis:{},flageolet:{},fricassee:{},hamburger:{},labyrinth:{},lifeblood:{},lineament:{},liquorice:{},mastoidal:{},maxillary:{},navicular:{},pituitary:{},pompadour:{},provender:{},purulence:{},shellfish:{},spaghetti:{},spareribs:{},splayfoot:{},spoilable:{},sundowner:{},sweetener:{},trapezium:{},trapezoid:{},umbilical:{},ventricle:{},vestibule:{},zygomatic:{},applesauce:{},autoplasty:{},blackheart:{},breadstuff:{},cheesecake:{},comestible:{},gastronomy:{},hotchpotch:{},interstice:{},jawbreaker:{},kitambilla:{},maraschino:{},metacarpal:{},metatarsal:{},passageway:{},perishable:{},salmagundi:{},shortening:{},articulator:{},excrescence:{},grasshopper:{},griddlecake:{},intercostal:{},longanberry:{},nourishment:{},screwdriver:{},smorgasbord:{},spindlelegs:{},checkerberry:{},perspiration:{},spindleshanks:{},parasympathetic:{},ab:{},ade:{},ale:{},bap:{},bun:{},jak:{},lat:{},lox:{},pes:{},pie:{},poi:{},pud:{},pus:{},tum:{},vas:{},veg:{},anus:{},arak:{},axon:{},baba:{},bile:{},bleb:{},bleu:{},bock:{},bosc:{},choc:{},clit:{},cola:{},coxa:{},crus:{},cuke:{},duff:{},dura:{},edda:{},eggs:{},fist:{},flab:{},flan:{},fugu:{},genu:{},ghee:{},glia:{},grog:{},isaw:{},java:{},kava:{},marc:{},mayo:{},mead:{},miso:{},mons:{},naan:{},nape:{},nipa:{},oleo:{},orzo:{},ouzo:{},ovum:{},pecs:{},pita:{},pone:{},pons:{},porc:{},rete:{},rima:{},rind:{},roux:{},ruga:{},rusk:{},slaw:{},sops:{},suet:{},tofu:{},ugli:{},ulna:{},umbo:{},uvea:{},veal:{},veau:{},vena:{},vino:{},womb:{},ziti:{},zona:{},ackee:{},adobo:{},aioli:{},anjou:{},ankle:{},annon:{},aorta:{},arcus:{},aspic:{},atole:{},axone:{},babka:{},bacon:{},bagel:{},bialy:{},bigos:{},bitok:{},blanc:{},blini:{},bliny:{},boeuf:{},borsh:{},bowel:{},bursa:{},butty:{},cauda:{},cavum:{},cecum:{},celom:{},chips:{},chyle:{},cider:{},congo:{},copra:{},cornu:{},cuppa:{},cutis:{},cyder:{},cytol:{},decaf:{},donut:{},facia:{},femur:{},filum:{},flews:{},fovea:{},fries:{},gigot:{},gland:{},glans:{},gleet:{},glogg:{},glute:{},gonad:{},goody:{},grist:{},grits:{},gruel:{},gyrus:{},hilus:{},hoagy:{},hooch:{},hooks:{},hymen:{},hyson:{},ileum:{},ilium:{},incus:{},inion:{},jello:{},julep:{},kabob:{},kasha:{},kebab:{},knish:{},kumis:{},kvass:{},lansa:{},latke:{},latte:{},lichi:{},limpa:{},lymph:{},macon:{},manus:{},matzo:{},mucus:{},nacho:{},naris:{},nates:{},negus:{},offal:{},ootid:{},pekoe:{},penis:{},penne:{},perry:{},pesto:{},pilaf:{},pinky:{},pizza:{},plica:{},porta:{},pruno:{},psoas:{},pubis:{},quiff:{},raita:{},ramus:{},raphe:{},salmi:{},salsa:{},savoy:{},sebum:{},serum:{},sirup:{},skull:{},sperm:{},steak:{},sudor:{},sushi:{},taffy:{},tamal:{},tater:{},teeth:{},teres:{},tibia:{},titty:{},toddy:{},toffy:{},torso:{},torte:{},tress:{},uvula:{},vagus:{},viand:{},vodka:{},vomer:{},vulva:{},wrist:{},adnexa:{},afters:{},agnail:{},ananas:{},anlage:{},annexa:{},annona:{},antrum:{},armpit:{},arrack:{},axilla:{},baguet:{},beigel:{},biceps:{},bisque:{},blintz:{},bonbon:{},borsch:{},brazil:{},bregma:{},bulgur:{},burger:{},cachou:{},caecum:{},canape:{},canola:{},cardia:{},carina:{},carpus:{},casaba:{},catsup:{},caviar:{},chevre:{},chiasm:{},chilli:{},choana:{},coccyx:{},coelom:{},comedo:{},concha:{},confit:{},congou:{},corium:{},corpse:{},cupper:{},cuspid:{},cutlet:{},damson:{},danish:{},dermis:{},dewlap:{},dolmas:{},eclair:{},eggnog:{},eschar:{},eyelid:{},farina:{},fauces:{},fibula:{},finnan:{},flexor:{},fundus:{},gateau:{},geneva:{},giblet:{},glossa:{},gluten:{},goatee:{},gobbet:{},gonion:{},goober:{},graham:{},grappa:{},groats:{},gulyas:{},haggis:{},hairdo:{},hallah:{},hallux:{},hamate:{},haslet:{},hoagie:{},hominy:{},hommos:{},hootch:{},hotpot:{},huitre:{},hummus:{},inguen:{},intima:{},jambon:{},jugale:{},jumbal:{},karyon:{},kencur:{},kidney:{},kipper:{},kirsch:{},kishke:{},korlan:{},kummel:{},labium:{},lamina:{},lanseh:{},lanugo:{},larynx:{},lekvar:{},limbus:{},lingua:{},lobule:{},lochia:{},locule:{},lunule:{},matzoh:{},meatus:{},meninx:{},milium:{},mohawk:{},mouton:{},mucosa:{},muesli:{},muffin:{},murphy:{},mutton:{},nasion:{},nervus:{},neuron:{},nougat:{},oculus:{},omelet:{},onyxis:{},oocyte:{},oolong:{},operon:{},organs:{},paczki:{},paella:{},palate:{},paries:{},pastis:{},paunch:{},pectus:{},phyllo:{},pilaff:{},pinkie:{},pinole:{},pirogi:{},pleura:{},plexus:{},pollex:{},polony:{},posset:{},potage:{},poteen:{},potion:{},potpie:{},poulet:{},premix:{},pulque:{},purloo:{},quiche:{},rectum:{},rectus:{},repast:{},retina:{},rhaphe:{},ribier:{},rickey:{},rotgut:{},sacrum:{},salami:{},saliva:{},samosa:{},sapota:{},scampi:{},scampo:{},sclera:{},scruff:{},seckel:{},serosa:{},shandy:{},sherry:{},silage:{},skilly:{},smegma:{},soleus:{},sorbet:{},sputum:{},stapes:{},stodge:{},succus:{},sulcus:{},sundae:{},sutura:{},tahini:{},tamale:{},tarsus:{},tendon:{},testis:{},thymus:{},tidbit:{},tiffin:{},tisane:{},titbit:{},toffee:{},tonsil:{},tragus:{},troche:{},tubule:{},tunica:{},unguis:{},ureter:{},uterus:{},vagina:{},veggie:{},venula:{},venule:{},vermis:{},vesica:{},viscus:{},vitals:{},waters:{},whisky:{},wiener:{},yogurt:{},zaatar:{},zonula:{},zonule:{},zygoma:{},zygote:{},absinth:{},akvavit:{},aniseed:{},aquavit:{},arteria:{},ashcake:{},baklava:{},bannock:{},beignet:{},keen:{},rage:{},wish:{},aside:{},chafe:{},gloss:{},tense:{},whole:{},worry:{},effect:{},reject:{},riddle:{},snatch:{},speech:{},closure:{},collect:{},romance:{},flourish:{},classical:{},influence:{},substance:{},reflection:{},inclination:{},recognition:{},dot:{},nod:{},blur:{},itch:{},slur:{},solo:{},wink:{},abuse:{},acute:{},alert:{},angle:{},bluff:{},cheer:{},honor:{},humor:{},lyric:{},snarl:{},tally:{},accent:{},degree:{},detail:{},indent:{},matter:{},patent:{},rubric:{},thrill:{},abandon:{},bluster:{},concern:{},concord:{},formula:{plural:"formulae"},imprint:{},nominal:{},quality:{},reading:{},sputter:{},torture:{},wrinkle:{},contrast:{},estimate:{},harmonic:{},judgment:{},reaction:{},sanction:{},singular:{},straddle:{},construct:{},judgement:{},reflexion:{},rendering:{},universal:{},acceptance:{},discipline:{},irritation:{},regulation:{},relaxation:{},submission:{},application:{},replication:{},construction:{},introduction:{},presentation:{},cant:{},code:{},joke:{},pain:{},stab:{},trot:{},will:{},blame:{},brief:{},dodge:{},fancy:{},glide:{},grasp:{},guess:{},quote:{},scent:{},slant:{},snort:{},swoop:{},theme:{},trial:{},vocal:{},accord:{},affect:{},cancel:{},debate:{},desire:{},heroic:{},murmur:{},phrase:{},resume:{},scream:{},serial:{},tangle:{},closing:{},dissent:{},drawing:{},example:{},exhibit:{},fatigue:{},feeling:{},mention:{},partial:{},posture:{},protest:{},regress:{},telling:{},welcome:{},absolute:{},analysis:{plural:"analyses"},distress:{},pastoral:{},platform:{},temporal:{},agreement:{},attention:{},beginning:{},closeness:{},connexion:{},dimension:{},discourse:{},lightness:{},principle:{},surrender:{},assignment:{},coordinate:{},involution:{},abstraction:{},arrangement:{},conjunction:{},declaration:{},penetration:{},proposition:{},realisation:{},realization:{},condensation:{},consideration:{},no:{},cue:{},fun:{},rub:{},bias:{},gift:{},hoot:{},jazz:{},oral:{},snub:{},text:{},tune:{},urge:{},coast:{},craze:{},daily:{},debut:{},dowse:{},funny:{},logic:{},mercy:{},peace:{},rerun:{},samba:{},slang:{},taboo:{},verse:{},whine:{},words:{},aspect:{},babble:{},canker:{},choice:{},clamor:{},denial:{},device:{},esteem:{},format:{},lament:{},manual:{},menace:{},normal:{},pardon:{},regret:{},skinny:{},sorrow:{},tickle:{},twinge:{},vision:{},warmth:{},caution:{},charter:{},conceit:{},cunning:{},delight:{},dictate:{},discord:{},finance:{},harmony:{},keynote:{},knowing:{},leaning:{},lecture:{},mistake:{},musical:{},offense:{},palaver:{},preempt:{},purpose:{},pyrrhic:{},realism:{},sharing:{},texture:{},worship:{},writing:{},aspirate:{},biweekly:{},blessing:{},citation:{},despatch:{},dullness:{},feminine:{},flatness:{},geminate:{},manifest:{},personal:{},pleasure:{},politics:{},singsong:{},yielding:{},agitation:{},attrition:{},bimonthly:{},broadcast:{},confusion:{},deviation:{},disregard:{},education:{},faintness:{},heaviness:{},imitation:{},indenture:{},interview:{},isolation:{},isometric:{},minuscule:{},portrayal:{},predicate:{},provision:{},screaming:{},signature:{},spiritual:{},throwaway:{},tightness:{},accounting:{},aggression:{},assumption:{},attraction:{},commercial:{},compromise:{},confession:{},confidence:{},conformity:{},conveyance:{},detachment:{},difference:{},discretion:{},imperative:{},mellowness:{},modulation:{},tenderness:{},uneasiness:{},awkwardness:{},discernment:{},elimination:{},endorsement:{},examination:{},fabrication:{},familiarity:{},implication:{},indorsement:{},involvement:{},observation:{},obstruction:{},performance:{},requisition:{},sensitivity:{},testimonial:{},appreciation:{},articulation:{},condemnation:{},confirmation:{},deliberation:{},intervention:{},satisfaction:{},confrontation:{},decomposition:{},determination:{},reinforcement:{},understanding:{},characteristic:{},correspondence:{},sophistication:{},transformation:{},rationalisation:{},rationalization:{},dub:{},fog:{},bold:{},buoy:{},dare:{},daze:{},envy:{},gape:{},okay:{},plus:{},rasp:{},rime:{},role:{},tabu:{},yell:{},above:{},affix:{},agape:{},chord:{},croak:{},doubt:{},email:{},essay:{},folly:{},idiom:{},laugh:{},modal:{},panic:{},posit:{},rhyme:{},rider:{},rumba:{},scare:{},scorn:{},sneer:{},trill:{},truth:{},wince:{},adagio:{},binary:{},daring:{},defeat:{},dismay:{},docket:{},filing:{},flavor:{},giving:{},gospel:{},lesson:{},median:{},neuter:{},notion:{},parody:{},parole:{},plight:{},rebuff:{},rhumba:{},sample:{},shiver:{},solace:{},trance:{},unseen:{},vanity:{},vector:{},amnesty:{},anguish:{},arousal:{},bucolic:{},caption:{},catalog:{},contour:{},descant:{},disdain:{},dispute:{},fantasy:{},flavour:{},glimpse:{},insight:{},languor:{},licence:{},marking:{},overbid:{},prelude:{},probate:{},purport:{},pursuit:{},reality:{},receipt:{},recital:{},riposte:{},splurge:{},sticker:{},summons:{},wrangle:{},approval:{},buoyancy:{},converse:{},coolness:{},covenant:{},crotchet:{},devotion:{},dialogue:{},emphasis:{},esthetic:{},excision:{},fairness:{},fixation:{},forecast:{},hieratic:{},identity:{},illusion:{},integral:{},monotone:{},offering:{},paradigm:{},premiere:{},printing:{},referent:{},rescript:{},research:{},rhetoric:{},schedule:{},skimming:{},sleeping:{},speaking:{},splutter:{},streamer:{},tendency:{},topology:{},vexation:{},wildness:{},adjective:{},aesthetic:{},assurance:{},burlesque:{},catalogue:{},correlate:{},detection:{},discovery:{},dismissal:{},exclusion:{},exclusive:{},expansion:{},impromptu:{},inaugural:{},indicator:{},intensive:{},interdict:{},largeness:{},masculine:{},paragraph:{},partitive:{},pragmatic:{},prevision:{},quarterly:{},quotation:{},readiness:{},rendition:{},reverence:{},roundness:{},safeguard:{},suspicion:{},sweetness:{},thickness:{},trademark:{},antagonism:{},aspiration:{},bitterness:{},coarseness:{},collection:{},conjecture:{},deposition:{},estimation:{},excitement:{},gloominess:{},impossible:{},incitement:{},invocation:{},inwardness:{},literature:{},morphology:{},narrowness:{},nominative:{},observance:{},possessive:{},postmortem:{},preemption:{},preference:{},profession:{},profundity:{},recitation:{},redundancy:{},abnormality:{},acquisition:{},affirmation:{},affirmative:{},alternative:{},bombardment:{},commutation:{},concurrence:{},convergence:{},countenance:{},disposition:{},distinction:{},distraction:{},enlargement:{},expectation:{},fingerprint:{},indentation:{},instruction:{},nationalism:{},possibility:{},presumption:{},publication:{},spectacular:{},speculation:{},substantive:{},superlative:{},unconscious:{},unitisation:{},unitization:{},anticipation:{},apprehension:{},circumstance:{},continuation:{},coordination:{},countercheck:{},distribution:{},hieroglyphic:{},illustration:{},intimidation:{},misdirection:{},overestimate:{},precondition:{},renunciation:{},approximation:{},authorisation:{},authorization:{},certification:{},falsification:{},interrogative:{},nonconformity:{},reduplication:{},sensitiveness:{},sequestration:{},superposition:{},underestimate:{},capitalisation:{},capitalization:{},generalisation:{},generalization:{},perceptiveness:{},recapitulation:{},sensationalism:{},awe:{},bop:{},ego:{},hex:{},jot:{},lit:{},nub:{},vow:{},beta:{},brag:{},clue:{},cull:{},elan:{},epic:{},funk:{},fury:{},gibe:{},hymn:{},jibe:{},leer:{},lust:{},mood:{},oath:{},pang:{},plea:{},quip:{},rant:{},riff:{},visa:{},zeal:{},zest:{},alibi:{},badge:{},basis:{plural:"bases"},bravo:{},carol:{},chant:{},chaos:{},conga:{},delta:{},demur:{},dread:{},fable:{},flair:{},fugue:{},given:{},gloat:{},gloom:{},hunch:{},infix:{},irony:{},largo:{},least:{},libel:{},magic:{},moral:{},polka:{},reply:{},sally:{},spiel:{},spook:{},stymy:{},tango:{},usage:{},velar:{},vigil:{},whoop:{},affair:{},airing:{},ardour:{},ballot:{},bathos:{},beauty:{},bellow:{},bowing:{},curtsy:{},deceit:{},dental:{},dialog:{},gambit:{},gibber:{},grudge:{},halloo:{},insult:{},intent:{},italic:{},kowtow:{},labial:{},latest:{},manner:{},mumble:{},naming:{},outcry:{},pathos:{},piffle:{},plural:{},policy:{},praise:{},raving:{},rehash:{},revise:{},scalar:{},scroll:{},seeing:{},shriek:{},sonnet:{},stymie:{},tattle:{},theory:{},tingle:{},tumult:{},upbeat:{},urging:{},wangle:{},weekly:{},wheeze:{},yearly:{},acclaim:{},acidity:{},airmail:{},analogy:{},apology:{},barrage:{},barrier:{},bidding:{},bonding:{},buildup:{},cadence:{},cartoon:{},censure:{},clutter:{},concert:{},cruelty:{},despair:{},disgust:{},dodging:{},earmark:{},embargo:{},enquiry:{},erasure:{},eristic:{},fluency:{},gradual:{},gravity:{},initial:{},inquiry:{},lingual:{},loyalty:{},mastery:{},mimesis:{},monthly:{},numeral:{},omnibus:{},outlook:{},palatal:{},placard:{},polemic:{},posting:{},presage:{},preview:{},quibble:{},refrain:{},reissue:{},reorder:{},reprint:{},rewrite:{},roundup:{},singing:{},slander:{},sorting:{},tasting:{},tribute:{},turmoil:{},whisper:{},ablative:{},acridity:{},allegory:{},alveolar:{},ambition:{},ascender:{},audition:{},binomial:{},brandish:{},brooding:{},bundling:{},calculus:{},circular:{},clipping:{},coldness:{},courtesy:{},critique:{},daydream:{},defiance:{},delusion:{},demurrer:{},disfavor:{},disquiet:{},dynamism:{},easiness:{},equation:{},fondness:{},grasping:{},grouping:{},guidance:{},guttural:{},hornpipe:{},hysteria:{},idealism:{},intimacy:{},mistrust:{},monition:{},negation:{},nickname:{},nihilism:{},notation:{},ordinate:{},outburst:{},particle:{},passport:{},pedagogy:{},petition:{},phantasy:{},planning:{},playbook:{},proposal:{},revision:{},rhapsody:{},ridicule:{},sampling:{},serenade:{},slowness:{},sourness:{},subtitle:{},suspense:{},sympathy:{},tartness:{},teaching:{},theology:{},travesty:{},universe:{},acuteness:{},addiction:{},adoration:{},attending:{},autograph:{},constancy:{},crispness:{},cuneiform:{},deception:{},defensive:{},denseness:{},dialectic:{},dictation:{},digestion:{},diplomacy:{},disfavour:{},editorial:{},emulation:{},enactment:{},evocation:{},fecundity:{},footprint:{},formalism:{},formative:{},gradation:{},grievance:{},grumbling:{},guideline:{},immediacy:{},insurance:{},intention:{},intercept:{},invariant:{},itinerary:{},lassitude:{},majuscule:{},misgiving:{},monologue:{},morbidity:{},murmuring:{},narration:{},nutrition:{},ordinance:{},oversight:{},pictorial:{},pizzicato:{},prejudice:{},quadratic:{},quickness:{},quickstep:{},reckoning:{},reflexive:{},rejoicing:{},repulsion:{},retention:{},retrieval:{},revealing:{},saltiness:{},schooling:{},sentience:{},sulkiness:{},synthesis:{},testament:{},testimony:{},underline:{},undertone:{},accidental:{},accusative:{},adaptation:{},admiration:{},affixation:{},allurement:{},anatomical:{},antiphonal:{},asceticism:{},belittling:{},brightness:{},brilliance:{},chronology:{},classified:{},cleverness:{},clumsiness:{},cognizance:{},compliment:{},concession:{},conscience:{},conspiracy:{},contention:{},continuity:{},decoration:{},determiner:{},deterrence:{},digression:{},diminution:{},discontent:{},dissection:{},dissonance:{},divination:{},empiricism:{},enthusiasm:{},enticement:{},equivalent:{},execration:{},fortissimo:{},grogginess:{},hesitation:{},humbleness:{},hypostasis:{},hypothesis:{plural:"hypotheses"},impatience:{},infliction:{},insistence:{},instalment:{},intermezzo:{},jocularity:{},loneliness:{},neutrality:{},nomination:{},oppression:{},perfection:{},pestilence:{},philosophy:{},precaution:{},pretension:{},propensity:{},refutation:{},reputation:{},revelation:{},rumination:{},salutation:{},semiweekly:{},stigmatism:{},theatrical:{},triviality:{},underscore:{},unfairness:{},vernacular:{},vocabulary:{},whispering:{},acceptation:{},advancement:{},aggravation:{},appellative:{},benevolence:{},calculation:{},comparative:{},concordance:{},conjunctive:{},conjuration:{},correlation:{},correlative:{},countersign:{},denigration:{},designation:{},discourtesy:{},documentary:{},electricity:{},enchantment:{},engrossment:{},exclamation:{},explanation:{},exploration:{},foolishness:{},frustration:{},imperialism:{},infatuation:{},inscription:{},jactitation:{},obfuscation:{},outwardness:{},peculiarity:{},playfulness:{},presentment:{},propagation:{},provocation:{},rationalism:{},regionalism:{},repudiation:{},resignation:{},rotogravure:{},semimonthly:{},sensibility:{},seriousness:{},stipulation:{},strangeness:{},subcontract:{},supposition:{},syncopation:{},titillation:{},tranquility:{},unorthodoxy:{},unsoundness:{},valedictory:{},breakthrough:{},choreography:{},conciliation:{},constitution:{},consultation:{},counterpoint:{},covetousness:{},depreciation:{},faultfinding:{},heedlessness:{},helplessness:{},idealisation:{},idealization:{},impertinence:{},intoxication:{},irritability:{},mercifulness:{},notification:{},pacification:{},processional:{},promulgation:{},proportional:{},recollection:{},retroflexion:{},retroversion:{},significance:{},solicitation:{},spiritualism:{},stupefaction:{},supplication:{},transference:{},acculturation:{},attentiveness:{},communication:{},comprehensive:{},condescension:{},contradiction:{},demonstrative:{},determinative:{},documentation:{},hallucination:{},impersonation:{},individualism:{},interpolation:{},orchestration:{},preoccupation:{},prevarication:{},qualification:{},retentiveness:{},retroflection:{},structuralism:{},symbolisation:{},symbolization:{},versification:{},aggressiveness:{},categorisation:{},demoralisation:{},demoralization:{},farsightedness:{},predisposition:{},recommendation:{},reconstruction:{},sesquipedalian:{},simplification:{},traditionalism:{},conventionality:{},crystallization:{},personification:{},prognostication:{},characterization:{},predetermination:{},pi:{},xi:{},boo:{},bye:{},dit:{},fib:{},ire:{},ken:{},nay:{},pic:{},psi:{},pun:{},wai:{},woe:{},yea:{},blip:{},blog:{},deed:{},demo:{},epos:{},gist:{},grin:{},heed:{},idyl:{},iota:{},jive:{},moan:{},muse:{},norm:{},noun:{},nous:{},odor:{},pean:{},ploy:{},pomp:{},quiz:{},sass:{},sext:{},spam:{},sulk:{},surd:{},tale:{},trig:{},vlog:{},whim:{},yack:{},yoga:{},agony:{},alias:{},aroma:{},axiom:{},bebop:{},blues:{},bonus:{},canto:{},codex:{},creed:{},ditto:{},dogma:{},drawl:{},edict:{},ethic:{},facet:{},fever:{},frown:{},gamma:{},gamut:{},grief:{},groan:{},guilt:{},intro:{},kotow:{},macro:{},odour:{},omega:{},paean:{},pavan:{},peeve:{},prate:{},primo:{},prose:{},psalm:{},qualm:{},retro:{},rumor:{},savvy:{},scowl:{},shrug:{},skill:{},smirk:{},danger:{},push:{},refusal:{},tooling:{}},verbs:{import:{},call:{},test:{},contain:{},extend:{},use:{},depend:{prep:"on"},rely:{prep:"on"},inherit:{prep:"from"},belong:{prep:"to"},point:{prep:"to"},implement:{},override:{},export:{},define:{},declare:{},reference:{},invoke:{},wrap:{},mock:{},cover:{},document:{},describe:{},modify:{},touch:{},fix:{},break:{},introduce:{},deprecate:{},replace:{},own:{},maintain:{},review:{},merge:{},revert:{},deploy:{},run:{},execute:{},load:{},parse:{},emit:{},validate:{},log:{},throw:{},catch:{},create:{},delete:{},update:{},expose:{},consume:{},produce:{},generate:{},configure:{},install:{},publish:{},release:{},ship:{},watch:{},trigger:{},build:{},write:{},read:{},have:{},like:{},want:{},need:{},believe:{},trust:{},love:{},hate:{},fear:{},hope:{},teach:{},learn:{},drive:{},cook:{},sing:{},visit:{},care:{},grow:{},marry:{},wear:{},eat:{},sleep:{},walk:{},buy:{},sell:{},give:{},take:{},meet:{},ride:{},speak:{},duck:{}},adjectives:{legacy:{type:"subclass"},mock:{type:"subclass"},senior:{type:"subclass"},internal:{type:"subclass"},external:{type:"subclass"},public:{type:"subclass"},private:{type:"subclass"},abstract:{type:"subclass"},static:{type:"subclass"},async:{type:"subclass"},experimental:{type:"subclass"},stable:{type:"subclass"},core:{type:"subclass"},shared:{type:"subclass"},global:{type:"subclass"},local:{type:"subclass"},generated:{type:"subclass"},standalone:{type:"subclass"},primary:{type:"subclass"},secondary:{type:"subclass"},deprecated:{type:"data"},fast:{type:"data"},slow:{type:"data"},large:{type:"data"},small:{type:"data"},flaky:{type:"data"},tested:{type:"data"},documented:{type:"data"},buggy:{type:"data"},broken:{type:"data"},green:{type:"data"},deterministic:{type:"data"},pure:{type:"data"},empty:{type:"data"},stale:{type:"data"},male:{type:"data"},female:{type:"data"},young:{type:"data"},old:{type:"data"},hot:{type:"data"},cold:{type:"data"},sweet:{type:"data"},salty:{type:"data"},sharp:{type:"data"},round:{type:"data"},tall:{type:"data"},short:{type:"data"},happy:{type:"data"},sad:{type:"data"},angry:{type:"data"},afraid:{type:"data"},strong:{type:"data"},weak:{type:"data"},rich:{type:"data"},poor:{type:"data"},hard:{type:"data"},soft:{type:"data"},wild:{type:"data"},gentle:{type:"data"},colorful:{type:"data"},legitimate:{type:"data"},ranked:{type:"data"},related:{type:"data"},sacred:{type:"data"},unaffected:{type:"data"}},properNames:["tmct","Node","npm","JavaScript","TypeScript","Python","Java","Git","GitHub","GitLab","ESLint","Linux","macOS","Windows","Polycode","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]}});function pS(e){let t=String(e),n=[t];return t.length>4&&/[a-z]ies$/.test(t)&&n.push(`${t.slice(0,-3)}y`),/(ses|xes|zes|ches|shes)$/.test(t)&&n.push(t.slice(0,-2)),/[a-z]s$/.test(t)&&!/ss$/.test(t)&&n.push(t.slice(0,-1)),t==="has"&&n.push("have"),n}function ah(e,t={}){for(let[n,s]of Object.entries(t.nouns||{})){let o={lemma:n,...s||{}};if(o.property&&!fS.has(o.property))throw new Error(`lexicon noun "${n}": property must be "data" or "object", got ${JSON.stringify(o.property)}`);e.nouns.set(n,o),o.plural&&e.nounPlurals.set(o.plural,n)}for(let[n,s]of Object.entries(t.verbs||{}))e.verbs.set(n,{lemma:n,...s||{}});for(let[n,s]of Object.entries(t.adjectives||{})){let o={lemma:n,...s||{}};if(!mS.has(o.type))throw new Error(`lexicon adjective "${n}": type must be "subclass" or "data", got ${JSON.stringify(o.type)}`);e.adjectives.set(n,o)}for(let n of t.properNames||[])e.properNames.set(String(n).toLowerCase(),String(n))}function zs(e,t=dS){if(!e&&ml.has(t))return ml.get(t);let n=ih,s={nouns:new Map,nounPlurals:new Map,verbs:new Map,adjectives:new Map,properNames:new Map,ns:t};return ah(s,n),e?(ah(s,e),s):(ml.set(t,s),s)}function yr(e,t,n={}){return hS(e,t,n)[0]??null}function hS(e,t,n={}){let s=String(t??"").toLowerCase(),o=e.nouns.get(s),i=e.nounPlurals.get(s),r=[],a=new Set,l=c=>{c&&!a.has(c.lemma)&&(a.add(c.lemma),r.push(c))};if(i){let c=e.nouns.get(i)??null;return n.singularOnly&&o?(l(o),l(c)):(l(c),l(o)),r}for(let c of pS(s))l(e.nouns.get(c));return r}var dS,jL,_L,RL,fS,mS,ml,Eo=L(()=>{rh();dS="tmct:",jL=Object.freeze({every:"universal",a:"indefinite",an:"indefinite",the:"definite",no:"negative"}),_L=Object.freeze({"at least":"owl:minCardinality","at most":"owl:maxCardinality",exactly:"owl:cardinality"}),RL=Object.freeze({one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10});fS=new Set(["data","object"]),mS=new Set(["subclass","data"]);ml=new Map});var ch=L(()=>{});var OL,LL,NL,gS,ML,PL,FL,lh=L(()=>{ss();Ce();OL=Object.freeze({class:"Class",module:"Module",function:"Function",method:"Method",attribute:"Attribute",variable:"GlobalVariable",constant:"GlobalVariable",commit:"Commit"}),LL=Object.freeze({Class:["class","classes"],Module:["module","modules"],Function:["function","functions"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"]}),NL=Object.freeze({Class:[e=>`which classes inherit from ${e}`,e=>`what does ${e} contain`,e=>`where is ${e} defined`],Module:[e=>`what does ${e} import`,e=>`which modules import ${e}`,e=>`where is ${e} defined`],Function:[e=>`what calls ${e}`,e=>`what does ${e} call`,e=>`where is ${e} defined`],Method:[e=>`which class contains ${e}`,e=>`what calls ${e}`,e=>`where is ${e} defined`],Attribute:[e=>`which class contains ${e}`,e=>`where is ${e} defined`],GlobalVariable:[e=>`where is ${e} defined`,e=>`where is ${e} mentioned`],Commit:[e=>`what did commit ${e} touch`,e=>`when did ${e} change`]}),gS=Object.freeze({import:"imports",imports:"imports",importing:"imports",imported:"imports",call:"calls",calls:"calls",calling:"calls",called:"calls",invoke:"calls",invokes:"calls",invoking:"calls",contain:"contains",contains:"contains",containing:"contains",containment:"contains",member:"contains",members:"contains",inherit:"inherits",inherits:"inherits",inheriting:"inherits",inheritance:"inherits",extend:"inherits",extends:"inherits",extending:"inherits",subclass:"inherits",subclasses:"inherits",subclassing:"inherits",test:"tests",tests:"tests",testing:"tests",tested:"tests",coverage:"tests",define:"defines",defines:"defines",defining:"defines",defined:"defines",definition:"defines",definitions:"defines",declaration:"defines",touch:"touches",touches:"touches",touching:"touches",touched:"touches",cochange:"cochange","co-change":"cochange","change-coupling":"cochange",coupled:"cochange",export:"reexports",exports:"reexports",exporting:"reexports",exported:"reexports",reexport:"reexports",reexports:"reexports",reexporting:"reexports","re-export":"reexports","re-exports":"reexports","re-exporting":"reexports"}),ML=Object.freeze({imports:["imports"],calls:["calls","callsSymbol"],contains:["contains"],inherits:["inherits"],tests:["tests"],defines:["defines"],touches:["touches","touchesSymbol"],cochange:["cochange"],reexports:["reexports"]}),PL=Object.freeze({imports:{verb:"imports",edgeNoun:"import"},calls:{verb:"calls",edgeNoun:"call"},contains:{verb:"contains",edgeNoun:"containment"},inherits:{verb:"inherits from",edgeNoun:"inheritance"},tests:{verb:"tests",edgeNoun:"test"},defines:{verb:"defines",edgeNoun:"definition"},touches:{verb:"touches",edgeNoun:"touch"},cochange:{verb:"changes together with",edgeNoun:"change-coupling"},reexports:{verb:"re-exports",edgeNoun:"re-export"}}),FL=Object.freeze({imports:[{side:"obj",make:e=>`which modules import ${e}`},{side:"subj",make:e=>`what does ${e} import`}],calls:[{side:"obj",make:e=>`what calls ${e}`},{side:"subj",make:e=>`what does ${e} call`}],contains:[{side:"subj",make:e=>`what does ${e} contain`},{side:"obj",make:e=>`which class contains ${e}`}],inherits:[{side:"obj",make:e=>`which classes inherit from ${e}`},{side:"subj",make:e=>`where is ${e} defined`}],tests:[{side:"obj",make:e=>`what tests ${e}`},{side:"obj",make:e=>`where is ${e} defined`}],defines:[{side:"obj",make:e=>`where is ${e} defined`},{side:"subj",make:e=>`what does ${e} contain`}],touches:[{side:"obj",make:e=>`when did ${e} change`},{side:"subj",make:e=>`what did commit ${e} touch`}],cochange:[{side:"obj",make:e=>`where is ${e} defined`},{side:"subj",make:e=>`which modules import ${e}`}],reexports:[{side:"subj",make:e=>`what does ${e} export`},{side:"obj",make:e=>`where is ${e} defined`}]})});var Ci=L(()=>{cn();Eo();lh()});var Ii,Oi=L(()=>{Ii=()=>{throw new Error("gunzipSync unavailable in a browser bundle")}});var wS,JL,uh=L(()=>{Ds();Oi();ls();De();Ci();wS={},JL=ee($e(zt(wS.url)),"..","..","..")});var dh=L(()=>{cn();Eo();Ci()});var yS,hl=L(()=>{cn();Eo();yS=Object.freeze({fanoutLimit:5,maxDepth:1,maxTopics:12,minIntervalMs:2e3})});var ph=L(()=>{vt();De()});var gl=L(()=>{cn()});var vS,xN,fh=L(()=>{Ds();Oi();ls();De();gl();cn();vS={},xN=ee($e(zt(vS.url)),"..","..","..")});var SN,EN,jN,mh=L(()=>{SN=Object.freeze(["task","autoFeedback","alloFeedback","turnManagement","timeManagement","discourseStructuring","ownCommunicationManagement","partnerCommunicationManagement","socialObligationsManagement","contactManagement"]),EN=Object.freeze({propositionalQuestion:Object.freeze({dimension:"task",gloss:"a yes/no question about whether a proposition holds ('does X import Y?')"}),checkQuestion:Object.freeze({dimension:"task",gloss:"a yes/no question whose asker already expects the answer yes ('..., right?')"}),setQuestion:Object.freeze({dimension:"task",gloss:"a wh-question asking for the members of a set ('what does X import?')"}),choiceQuestion:Object.freeze({dimension:"task",gloss:"a question asking which of the listed alternatives holds ('is X a module or a class?')"}),inform:Object.freeze({dimension:"task",gloss:"a declarative telling the addressee something (a teach turn; also tmct explaining its own function)"}),answer:Object.freeze({dimension:"task",gloss:"an inform that discharges a question just asked (an answer grounded in the graph)"}),confirm:Object.freeze({dimension:"task",gloss:"an answer 'yes' to a check question"}),disconfirm:Object.freeze({dimension:"task",gloss:"an answer 'no' to a check question"}),agreement:Object.freeze({dimension:"task",gloss:"an inform stating that the speaker holds what the addressee just stated to be true"}),disagreement:Object.freeze({dimension:"task",gloss:"an inform stating that the speaker holds what the addressee just stated to be false"}),correction:Object.freeze({dimension:"task",gloss:"a disagreement that also supplies the replacement ('no, I meant Y')"}),request:Object.freeze({dimension:"task",gloss:"asks the addressee to perform an action ('solve it' \u2014 a goal turn)"}),instruct:Object.freeze({dimension:"task",gloss:"a request the addressee is expected to carry out without negotiation (a bare imperative)"}),suggestion:Object.freeze({dimension:"task",gloss:"puts an action forward as advisable without claiming authority over the addressee"}),offer:Object.freeze({dimension:"task",gloss:"commits the speaker to an action, conditional on the addressee wanting it"}),autoPositive:Object.freeze({dimension:"autoFeedback",gloss:"the sender reports its own processing of the previous turn succeeded (an acknowledgement)"}),autoNegative:Object.freeze({dimension:"autoFeedback",gloss:"the sender reports its own processing of the previous turn failed \u2014 tmct's honest miss"}),initialGreeting:Object.freeze({dimension:"socialObligationsManagement",gloss:"opens an exchange of greetings ('hi')"}),returnGreeting:Object.freeze({dimension:"socialObligationsManagement",gloss:"answers a greeting with a greeting"}),thanking:Object.freeze({dimension:"socialObligationsManagement",gloss:"expresses gratitude for something the addressee did"}),apology:Object.freeze({dimension:"socialObligationsManagement",gloss:"expresses regret for something the speaker did"})}),jN=Object.freeze({teach:"inform","ask-set":"setQuestion","ask-propositional":"propositionalQuestion",goal:"request",imperative:"instruct","honest-miss":"autoNegative",greeting:"initialGreeting",thanks:"thanking",help:"inform","game-answer":"answer","game-inform":"inform"})});function vr(e){let t=new Map;for(let[n,s]of e||[])!n||!s||n===s||(t.has(n)||t.set(n,new Set),t.get(n).add(s));return t}function Li(e,t,{cap:n=6}={}){let s=[e],o=new Set([e]),i=e;for(;s.length<n;){let r=[...t.get(i)||[]].filter(a=>!o.has(a)).sort();if(!r.length)break;i=r[0],o.add(i),s.push(i)}return s}function hh(e,t,{cap:n=64}={}){let s=new Set([e]),o=[e];for(;o.length&&s.size<n;){let i=o.shift();for(let r of t.get(i)||[])s.has(r)||(s.add(r),o.push(r))}return s}function bl(e,t,n,s){if(n.has(e))return n.get(e);if(s.has(e))return 1;s.add(e);let o=t.get(e),i=1;if(o&&o.size){let r=0;for(let a of o)r=Math.max(r,bl(a,t,n,s));i=r+1}return s.delete(e),n.set(e,i),i}function $S(e){let t=new Map;for(let[n,s]of e||[])!n||!s||(t.has(n)||t.set(n,new Set),t.get(n).add(s),t.has(s)||t.set(s,new Set),t.get(s).add(n));return t}function xS(e,t,n,s,o,{threshold:i,rootDepth:r,icByTerm:a}){let l=hh(e,n),c=hh(t,n);if(l.has(t)||c.has(e))return{distinct:!1,reason:"subsumes",lcs:l.has(t)?t:e};if(s.size)for(let g of l){let h=s.get(g);if(h){for(let b of c)if(h.has(b))return{distinct:!0,reason:"disjoint",lcs:null}}}let u=[...l].filter(g=>c.has(g));if(!u.length)return l.size<2||c.size<2?{distinct:!1,reason:"inconclusive",lcs:null}:{distinct:!0,reason:"non-intersecting",lcs:null};let d=g=>bl(g,n,o,new Set),m=u[0],p=d(m);for(let g of u){let h=d(g);(h>p||h===p&&g<m)&&(m=g,p=h)}if(p<=r)return{distinct:!0,reason:"root-subsumer",lcs:m};if(a){let g=a.get(m);return typeof g=="number"&&g<i?{distinct:!0,reason:"low-ic",lcs:m}:{distinct:!1,reason:"shared-lineage",lcs:m}}return 2*p/(d(e)+d(t))<i?{distinct:!0,reason:"shallow-subsumer",lcs:m}:{distinct:!1,reason:"shared-lineage",lcs:m}}function Ni(e,{subClassEdges:t=[],parents:n=null,disjointEdges:s=[],threshold:o=.5,rootDepth:i=1,icByTerm:r=null}={}){let a=[...new Set((e||[]).filter(Boolean))],l=n||vr(t),c=$S(s),u=new Map,d=new Map(a.map(w=>[w,w])),m=w=>{for(;d.get(w)!==w;)d.set(w,d.get(d.get(w))),w=d.get(w);return w},p=(w,v)=>{let $=m(w),k=m(v);$!==k&&d.set($<k?k:$,$<k?$:k)},f=[];for(let w=0;w<a.length;w+=1)for(let v=w+1;v<a.length;v+=1){let $=xS(a[w],a[v],l,c,u,{threshold:o,rootDepth:i,icByTerm:r});f.push({a:a[w],b:a[v],...$}),$.distinct||p(a[w],a[v])}let g=new Map;for(let w of a){let v=m(w);g.has(v)||g.set(v,[]),g.get(v).push(w)}let h=w=>bl(w,l,u,new Set),b=[...g.values()].map(w=>{let v=[...w].sort(),$=v[0],k=h($);for(let y of v){let j=h(y);j>k&&(k=j,$=y)}return{objects:v,label:$}}).sort((w,v)=>w.label.localeCompare(v.label));return{split:b.length>1,clusters:b,pairs:f}}var Mi=L(()=>{Ft()});function wl(e){return typeof e=="string"&&kS.test(e)}function gh(e){return!!e&&typeof e=="object"&&Bs(e.s)}function yl(e){return!!e&&typeof e=="object"&&e.kind==="fact"&&wl(e.world)&&Bs(e.subject)&&Bs(e.predicate)&&Bs(e.object)}function vl(e){if(!e||typeof e!="object"||e.kind!=="rule"||!wl(e.world)||!Bs(e.name)||!ES.has(e.ruleKind)||!e.slots||typeof e.slots!="object"||Array.isArray(e.slots))return!1;let t=Object.values(e.slots);return t.length>0&&t.every(Bs)}function $l(e){return!!e&&typeof e=="object"&&e.kind==="meta"&&wl(e.world)&&Bs(e.opening)}function bh(e){return yl(e)||vl(e)||$l(e)}function wh(e){let t=e||[],n=t.filter(c=>c.predicate===jS).sort((c,u)=>`${c.subject}\0${c.object}`.localeCompare(`${u.subject}\0${u.object}`));if(!n.length)return t;let s=new Set(t.filter(c=>c.predicate==="rdf:type").map(c=>c.subject)),o=new Map;for(let c of t)c.predicate==="mgx:located-in"&&o.set(c.subject,c.object);let i=(c,u)=>t.some(d=>d.predicate==="rdf:type"&&d.object===c&&o.get(d.subject)===u),r=t.find(c=>typeof c.world=="string"&&c.kind==="fact"),a=(c,u,d)=>({...r?{world:r.world,kind:"fact"}:{},subject:c,predicate:u,object:d}),l=[];for(let c of n){let u=c.subject,d=c.object;if(i(d,u))continue;let m=d,p=1;for(;s.has(m);)p+=1,m=`${d}-${p}`;s.add(m),l.push(a(m,"rdf:type",d)),l.push(a(m,"rdf:type","portable")),l.push(a(m,"mgx:located-in",u))}return l.length?[...t,...l]:t}var kS,SS,ES,Bs,jS,$r=L(()=>{kS=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,SS=Object.freeze(["action-signature","action-precond","action-effect","action-constraint"]),ES=new Set(SS),Bs=e=>typeof e=="string"&&e.trim()!=="";jS="mgx:default-contains"});var _S,RS,AS,TS,CS,IS,OS,LS,NS,DN,MS,yh,zN,BN,vh=L(()=>{Eo();Go();_S="subClassOf",RS="typeAssertion",AS="relation",TS="someValuesFrom",CS="cardinality",IS="disjointWith",OS="possessive",LS="adjective",NS="capability",DN=Object.freeze([_S,RS,AS,TS,CS,IS,OS,LS,NS]),MS=new Set(["go","take","drop","open","unlock","close","give","look","talk","examine"]),yh=new Map([["pick up","take"],["pick","take"],["grab","take"],["put down","drop"],["set down","drop"],["leave","drop"],["talk to","talk"],["speak to","talk"],["speak with","talk"],["talk","talk"],["speak","talk"],["chat with","talk"],["converse with","talk"],["look at","examine"],["examine","examine"],["inspect","examine"],["have a look at","examine"],["take a look at","examine"],["check out","examine"],["shut","close"]]),zN=Math.max(...[...yh.keys()].map(e=>e.split(" ").length)),BN=[...new Set([...MS,...[...yh.keys()].map(e=>e.split(" ")[0])])]});var Us=L(()=>{});var xl=L(()=>{Ce();ss();Us()});function jt({name:e,label:t,question:n,params:s=[],preconditions:o=[],add:i=[],del:r=[]}){return Object.freeze({type:us.Capability,name:e,label:t,question:n,readOnly:!0,parameters:Object.freeze(s),preconditions:Object.freeze(o),effects:Object.freeze({add:Object.freeze(i),del:Object.freeze(r)})})}var PS,us,Ae,kr,bt,Tt,nn,FS,DS,Et,zS,BS,$h,KN,YN,XN,xh=L(()=>{PS=Object.freeze({cap:"urn:tmct:cap#",taught:"urn:tmct:taught#",mgx:"urn:tmct:mgx#",seon:"http://se-on.org/ontologies/seon.owl#"}),us=Object.freeze({Capability:"cap:Capability",Parameter:"cap:Parameter",Precondition:"cap:Precondition",Effect:"cap:Effect"}),Ae=Object.freeze({Symbol:"seon:CodeEntity",Module:"mgx:Module",Class:"seon:ClassType",Query:"cap:FreeText",Kind:"cap:KindFilter",Package:"cap:PackageName"}),kr=Object.freeze({graphLoaded:"cap:graph-loaded",resolves:"cap:resolves",anyPresent:"cap:any-present",memoryFacts:"cap:memory-facts"}),bt=(e,t,{arg:n=e,required:s=!0,note:o=""}={})=>Object.freeze({type:us.Parameter,name:e,kind:t,arg:n,required:s,note:o}),Tt=()=>Object.freeze({type:us.Precondition,pred:kr.graphLoaded}),nn=(e,t)=>Object.freeze({type:us.Precondition,pred:kr.resolves,param:e,as:t}),FS=e=>Object.freeze({type:us.Precondition,pred:kr.anyPresent,params:Object.freeze([...e])}),DS=()=>Object.freeze({type:us.Precondition,pred:kr.memoryFacts}),Et=(e,t=null)=>Object.freeze({type:us.Effect,pred:"cap:knows",topic:e,of:t?`?${t}`:null});zS=Object.freeze([jt({name:"tmct_search",label:"search",question:"lexical search across the graph",params:[bt("query",Ae.Query,{required:!1,note:"required unless a kind filter is given"}),bt("kind",Ae.Kind,{required:!1}),bt("name",Ae.Query,{required:!1}),bt("decorator",Ae.Query,{required:!1})],preconditions:[Tt(),FS(["query","kind"])],add:[Et("matches","query")]}),jt({name:"tmct_describe",label:"describe",question:"a symbol's definition, kind and relations",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),nn("symbol",Ae.Symbol)],add:[Et("description","symbol")]}),jt({name:"tmct_signature",label:"signature",question:"a symbol's signature only",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),nn("symbol",Ae.Symbol)],add:[Et("signature","symbol")]}),jt({name:"tmct_impact",label:"impact",question:"what a change to this module or symbol reaches (impact closure)",params:[bt("module",Ae.Symbol,{note:"a Module, or any sited symbol \u2014 a fine-grained seed walks callsSymbol dependents and coarsens them to module grain"})],preconditions:[Tt(),nn("module",Ae.Symbol)],add:[Et("impact","module")]}),jt({name:"tmct_members",label:"members",question:"the methods/attributes of a class",params:[bt("class",Ae.Class,{arg:"class"})],preconditions:[Tt(),nn("class",Ae.Class)],add:[Et("members","class")]}),jt({name:"tmct_subclasses",label:"subclasses",question:"the subclasses of a class",params:[bt("class",Ae.Class,{arg:"class"})],preconditions:[Tt(),nn("class",Ae.Class)],add:[Et("subclasses","class")]}),jt({name:"tmct_exports",label:"exports",question:"a module's public exports",params:[bt("module",Ae.Module)],preconditions:[Tt(),nn("module",Ae.Module)],add:[Et("exports","module")]}),jt({name:"tmct_callers",label:"callers",question:"functions that call this symbol",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),nn("symbol",Ae.Symbol)],add:[Et("callers","symbol")]}),jt({name:"tmct_callees",label:"callees",question:"functions this symbol calls",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),nn("symbol",Ae.Symbol)],add:[Et("callees","symbol")]}),jt({name:"tmct_calls",label:"calls",question:"the call edges out of this symbol/module",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),nn("symbol",Ae.Symbol)],add:[Et("calls","symbol")]}),jt({name:"tmct_tests_for",label:"tests",question:"the tests covering this symbol",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),nn("symbol",Ae.Symbol)],add:[Et("tests","symbol")]}),jt({name:"tmct_untested",label:"untested",question:"symbols with no covering test",params:[],preconditions:[Tt()],add:[Et("untested",null)]}),jt({name:"tmct_history",label:"history",question:"the commit history of this symbol",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),nn("symbol",Ae.Symbol)],add:[Et("history","symbol")]}),jt({name:"tmct_cochanges",label:"cochanges",question:"symbols that change together with this one",params:[bt("symbol",Ae.Symbol)],preconditions:[Tt(),nn("symbol",Ae.Symbol)],add:[Et("cochanges","symbol")]}),jt({name:"tmct_architecture",label:"arch",question:"the architecture overview (optional package filter)",params:[bt("package",Ae.Package,{required:!1})],preconditions:[Tt()],add:[Et("architecture","package")]}),jt({name:"tmct_related",label:"related",question:"a term's synonyms and related concepts (the SKOS view over the conversational-memory graph)",params:[bt("term",Ae.Query,{note:"a concept term, matched against memory relation facts rather than resolved in the code graph"})],preconditions:[DS()],add:[Et("related","term")]})]),BS=e=>Object.freeze(e.reduce((t,n)=>(t[n.name]=n,t),Object.create(null))),$h=zS,KN=BS($h),YN=Object.freeze({tmct_context:"unbounded edit-context bundle (multi-file); needs a size/budget precondition",tmct_context_more:"unbounded context continuation; same as tmct_context",tmct_snippet:"raw source-file read (reads the filesystem); needs a file-read + span precondition",tmct_ask:"the plain-English question entry point itself \u2014 calls ask.mjs directly and bypasses the capability planner; not one of the planner's operators",tmct_export:"reads the memory store's whole fact set with no discriminating param and no resolver goal frame; needs NL-reachability wiring before it can join",tmct_ingest:"writes into the memory store (grounds facts); capability() only models read-only operators, so a write path needs its own precondition/effect design first",tmct_file_history:"a module-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet",tmct_method_history:"a method-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet",tmct_class_history:"a class-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet"}),XN=Object.freeze({prefixes:PS,vocab:us,kinds:Ae,precond:kr,get capabilities(){return $h}})});var kh=L(()=>{xh()});var Sh=L(()=>{xs()});function WS(e=process.env){return e?.TMCT_WORLDS_PACK_DIR||ee(US,"corpus","worlds")}function Eh(e){try{return Ii(ko(e))}catch{return null}}function jh(e){if(kl.has(e))return kl.get(e);let t=null,n=Eh(ee(e,"index.json.gz"));if(n)try{let s=JSON.parse(n.toString("utf8"));s&&typeof s=="object"&&!Array.isArray(s)&&(t=s)}catch{}return kl.set(e,t),t}function qS(e,t){let n=jh(e);if(!n)return null;let s=n[String(t??"")];if(!gh(s))return null;let o=`${e}\0${t}`;if(Sl.has(o))return Sl.get(o);let i=null,r=Eh(ee(e,"shards",`${s.s}.jsonl.gz`));if(r){let a=[],l=[],c=null;for(let u of r.toString("utf8").split(`
131
+ `))if(u.trim())try{let d=JSON.parse(u);if(!bh(d)||d.world!==t)continue;yl(d)?a.push(d):vl(d)?l.push(d):$l(d)&&!c&&(c=d)}catch{}(a.length||l.length||c)&&(i={name:t,facts:wh(a),rules:l,meta:c})}return Sl.set(o,i),i}var VS,US,kl,Sl,GS,l0,El=L(()=>{Ds();Oi();ls();De();$r();VS={},US=ee($e(zt(VS.url)),"..","..","..");kl=new Map,Sl=new Map;GS=e=>({list:async()=>{let t=jh(e());return t?Object.keys(t).sort():null},load:async t=>qS(e(),t)}),l0=GS(()=>WS())});var w0,_h=L(()=>{vt();De();Hn();Uo();xs();Ge();w0=ee(".tmct","memory","blocks")});var Rh=L(()=>{Us()});var Th=L(()=>{Hn();Uo();Us()});var jl=L(()=>{Hn();Uo();Us()});var Ch=L(()=>{jl();Hn();Ss();Us()});var Ih=L(()=>{});var Oh=L(()=>{Rh();Th();jl();Ch();Ih();Us()});var Lh=L(()=>{_h();Ge();ni();dl();Oh();xl()});var Mh=L(()=>{$r();vh();xl();kh();Sh();El();Ge();Lh()});var Pi,j1,_1,R1,jo=L(()=>{Pi=Object.freeze({spiderFly:Object.freeze({spiderInitialMass:15,spiderMassDecrementPerTurn:.5,flyInitialMass:10,flyMassDecrementPerTurn:1,spiderVisionRadius:4,flyVisionRadius:4,eggHatchDelayTurns:3,flySpawnIntervalTurns:3,eggLayMassThreshold:25,eggHatchCount:2,minHatchlingMass:3,webDurationTurns:10}),guessNumber:Object.freeze({defaultLo:1,defaultHi:100,maxBound:1e9}),planning:Object.freeze({maxDepth:300})}),j1=Object.freeze({spider_initial_mass:"spiderInitialMass",spider_mass_decrement_per_turn:"spiderMassDecrementPerTurn",fly_initial_mass:"flyInitialMass",fly_mass_decrement_per_turn:"flyMassDecrementPerTurn",spider_vision_radius:"spiderVisionRadius",fly_vision_radius:"flyVisionRadius",egg_hatch_delay_turns:"eggHatchDelayTurns",fly_spawn_interval_turns:"flySpawnIntervalTurns",egg_lay_mass_threshold:"eggLayMassThreshold",egg_hatch_count:"eggHatchCount",min_hatchling_mass:"minHatchlingMass",web_duration_turns:"webDurationTurns"}),_1=Object.freeze({default_lo:"defaultLo",default_hi:"defaultHi",max_bound:"maxBound"}),R1=Object.freeze({max_depth:"maxDepth"})});var JS,Ph,C1,_l=L(()=>{jo();JS=Object.freeze({x:2,y:2}),Ph=Object.freeze({north:Object.freeze({dx:0,dy:-1}),south:Object.freeze({dx:0,dy:1}),east:Object.freeze({dx:1,dy:0}),west:Object.freeze({dx:-1,dy:0})}),C1=Object.freeze([Object.freeze(["poodle","dog"]),Object.freeze(["sheepdog","dog"]),Object.freeze(["dog","animal"]),Object.freeze(["spider","arachnid"]),Object.freeze(["arachnid","animal"]),Object.freeze(["fly","insect"]),Object.freeze(["insect","animal"])])});var Fh=L(()=>{});var Dh=L(()=>{_l();Ss();Ge();$r();Fh();cn();jo()});var iM,zh=L(()=>{_l();Dh();$r();El();Ge();jo();iM=new RegExp("^@(spider|fly)(?:-(\\d+))?[,:]?\\s+the\\s+(spider|fly)(?:-(\\d+))?\\s+is\\s+(?:(north|south|east|west)|at\\s+(cell-\\d+-\\d+))[.!?\\s]*$","i")});var ut,cM,lM,uM,dM,pM,fM,mM,hM,gM,bM,wM,yM,vM,$M,xM,kM,SM,EM,jM,Bh=L(()=>{ut=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},cM=ut("createRequire"),lM=ut("readFileSync"),uM=ut("access"),dM=ut("readFile"),pM=ut("writeFile"),fM=ut("appendFile"),mM=ut("mkdir"),hM=ut("mkdtemp"),gM=ut("rename"),bM=ut("unlink"),wM=ut("rm"),yM=ut("stat"),vM=ut("copyFile"),$M=ut("readdir"),xM=ut("createReadStream"),kM=ut("createWriteStream"),SM=ut("randomBytes"),EM=ut("spawnSync"),jM=ut("createInterface")});var dt,RM,AM,TM,CM,IM,OM,LM,NM,MM,PM,FM,DM,zM,BM,UM,WM,qM,GM,sE,Uh=L(()=>{dt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},RM=dt("createRequire"),AM=dt("readFileSync"),TM=dt("access"),CM=dt("readFile"),IM=dt("writeFile"),OM=dt("appendFile"),LM=dt("mkdir"),NM=dt("mkdtemp"),MM=dt("rename"),PM=dt("unlink"),FM=dt("rm"),DM=dt("stat"),zM=dt("copyFile"),BM=dt("readdir"),UM=dt("createReadStream"),WM=dt("createWriteStream"),qM=dt("randomBytes"),GM=dt("spawnSync"),sE=dt("createInterface")});var pt,HM,KM,YM,XM,JM,QM,ZM,eP,tP,nP,sP,oP,rP,iP,aP,cP,lP,Wh,uP,Rl=L(()=>{pt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},HM=pt("createRequire"),KM=pt("readFileSync"),YM=pt("access"),XM=pt("readFile"),JM=pt("writeFile"),QM=pt("appendFile"),ZM=pt("mkdir"),eP=pt("mkdtemp"),tP=pt("rename"),nP=pt("unlink"),sP=pt("rm"),oP=pt("stat"),rP=pt("copyFile"),iP=pt("readdir"),aP=pt("createReadStream"),cP=pt("createWriteStream"),lP=pt("randomBytes"),Wh=pt("spawnSync"),uP=pt("createInterface")});var qh=L(()=>{Rl();De();vt();De();gi();Lt()});var Gh=L(()=>{});var oE,Vh=L(()=>{vt();De();Ge();Gh();oE=ee(".tmct","sessions")});var Kh=L(()=>{vt();De();Ai()});var ft,CP,IP,OP,LP,NP,MP,PP,FP,DP,zP,BP,UP,WP,qP,GP,VP,HP,KP,rE,Yh=L(()=>{ft=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},CP=ft("createRequire"),IP=ft("readFileSync"),OP=ft("access"),LP=ft("readFile"),NP=ft("writeFile"),MP=ft("appendFile"),PP=ft("mkdir"),FP=ft("mkdtemp"),DP=ft("rename"),zP=ft("unlink"),BP=ft("rm"),UP=ft("stat"),WP=ft("copyFile"),qP=ft("readdir"),GP=ft("createReadStream"),VP=ft("createWriteStream"),HP=ft("randomBytes"),KP=ft("spawnSync"),rE=ft("createInterface")});var aE,_o,Xh,iE,Jh,sF,Un,oF,Fi,rF,Qh=L(()=>{Ds();vt();Yh();ls();De();fi();Ge();aE={},_o=ee($e(zt(aE.url)),"..","..",".."),Xh=ee(_o,"corpus","conceptnet","slice.jsonl"),iE=ee(_o,"src","adapters","corpus","conceptnet-map.toml"),Jh=ee(_o,"corpus","seon","concepts.jsonl"),sF=ee(_o,"corpus","seon","definitions.jsonl"),Un=ee(_o,"corpus","tier2"),oF=ee(Un,"manifest.json"),Fi=ee(_o,"corpus","wordnet"),rF=ee(Fi,"manifest.json")});function uE(){return{seon:{kind:"corpus",active:!1,corpusPath:Jh,provenancePrefix:"corpus:seon"},conceptnet:{kind:"corpus",active:!1,corpusPath:Xh,provenancePrefix:"corpus:conceptnet",limit:void 0,prefer:lE},human:{kind:"corpus",active:!0,corpusPath:ee(Un,"human.jsonl"),provenancePrefix:"corpus:human"},"human-medium":{kind:"corpus",active:!1,corpusPath:ee(Un,"human-medium.jsonl"),provenancePrefix:"corpus:human-medium"},"human-large":{kind:"corpus",active:!1,corpusPath:ee(Un,"human-large.jsonl"),provenancePrefix:"corpus:human-large"},"tier2-aws":{kind:"corpus",active:!1,corpusPath:ee(Un,"aws.jsonl"),provenancePrefix:"corpus:tier2-aws"},"tier2-python":{kind:"corpus",active:!1,corpusPath:ee(Un,"python.jsonl"),provenancePrefix:"corpus:tier2-python"},"tier2-java":{kind:"corpus",active:!1,corpusPath:ee(Un,"java.jsonl"),provenancePrefix:"corpus:tier2-java"},"tier2-general":{kind:"corpus",active:!1,corpusPath:ee(Un,"general.jsonl"),provenancePrefix:"corpus:tier2-general"},"wordnet-xl":{kind:"corpus",active:!1,corpusPath:ee(Fi,"wordnet-xl.jsonl"),provenancePrefix:"corpus:wordnet-xl"},"wordnet-full":{kind:"corpus",active:!1,corpusPath:ee(Fi,"wordnet-full.jsonl"),provenancePrefix:"corpus:wordnet-full"},namenet:{kind:"corpus",active:!1,corpusPath:ee(cE,"namenet.jsonl"),provenancePrefix:"corpus:namenet"}}}var dE,cE,gF,lE,bF,Zh=L(()=>{De();vt();ls();gi();Qh();dE={},cE=ee($e(zt(dE.url)),"..","..","corpus","namenet"),gF=Object.freeze(["corpus","lexicon","templates","pack","ontology"]),lE=["rdfs:subClassOf","rdf:type","mgx:usedFor","mgx:partOf","mgx:capableOf"];bF=Object.freeze(uE())});var eg=L(()=>{});var tg=L(()=>{De();Ds();vt();Bh();Uh();Rl();Lt();qh();Ce();Vh();Ai();Kh();Do();Zh();Al();jo();cl();hl();eg()});var ng={};En(ng,{proseLemma:()=>fE});function fE(){if(Ws!==void 0)return Ws;try{let e=pl();if(!e)return Ws=null,Ws;let t=e.its,n=new Map;Ws=s=>{let o=String(s||"");if(n.has(o))return n.get(o);let i;try{i=String(e.readDoc(o).tokens().out(t.lemma)[0]||o).toLowerCase()}catch{i=o.toLowerCase()}return n.set(o,i),i}}catch{Ws=null}return Ws}var Ws,sg=L(()=>{fl()});var og={};En(og,{digestTermFromRows:()=>gE,loadDigestStructureTable:()=>hE,readDigestStructures:()=>mE});var mE,hE,gE,rg=L(()=>{mE=()=>null,hE=()=>null,gE=()=>null});function zl(e){if(!e)return null;let{node:t,shape:n,kind:s}=e;if(t==="find")return`locate a specific named entity ("${e.term}")`;if(t==="count")return`get a count of ${Di(e.entityType)}`;if(t==="list")return`list/enumerate ${Di(e.entityType)} matching a condition`;if(t==="superlative")return`rank/compare ${Di(e.entityType)} by ${e.metricNoun||e.metric||"a metric"}`;if(t==="anaphora")return"follow up on the previous answer's result set (discourse anaphora)";if(t==="membership")return`understand "${e.term||"an entity"}"'s membership/relationship`;if(t==="clause")return zl(e.clause);if(t==="miss")return null;if(t==="boolean"||t==="qualifier"||t==="reverseSet"||t==="forwardSet"||t==="allOfClass"||t==="temporal"){let o=s||e.inner?.kind;return o&&sn[o]?sn[o]:`filter/traverse ${Di(e.entityType)} by a relationship`}return n==="meta"?`understand a vocabulary/definition term ("${e.object}")`:n==="where"?`locate where something is defined ("${e.object}")`:n==="when"?"understand when something last changed (history)":n==="whoLast"?"find who most recently touched something (history)":n==="mentions"?`find where something is mentioned in prose ("${e.object}")`:n==="ask"?s&&sn[s]||"check a specific subject/object relationship":(n==="reverse"||n==="forward")&&s?sn[s]||`understand a "${s}" relationship`:"understand a graph relationship"}function Vl(e){let t=new Map;for(let n of e)t.has(cg(n))||t.set(cg(n),n);return t}function Il(e,t=Er){let n=[],s=[];for(let o of e)o.predicate===t&&(s.push([o.subject,o.object]),qs(o)&&n.push([o.subject,o.object]));return{strictEdges:n,broadEdges:s}}function Ol(e,t,n,s,o){return e(t,n,[],s.strictEdges,o)||e(t,n,[],s.broadEdges,o)}function Kl(e){let t=String(e||"").trim();return/[a-z]ies$/i.test(t)?`${t.slice(0,-3)}y`:/(ses|xes|zes|ches|shes)$/i.test(t)?t.slice(0,-2):/[a-z]s$/i.test(t)&&!/(?:ss|ous)$/i.test(t)?t.slice(0,-1):t}async function Ml(e){let t=String(e||"").toLowerCase();if(t==="has"||t==="have")return Ps;if(t==="can")return"mgx:capableOf";try{let{proseLemma:n}=await Promise.resolve().then(()=>(sg(),ng)),s=n(),o=s?s(t):t;return o==="have"?Ps:Fn(`mgx:${o}`)}catch{return Fn(`mgx:${t}`)}}function _E(e,t){let n=String(t||"").match(jE);return n&&/^mgx:[a-z]+$/.test(e)?{predicate:`${e}-${n[1].toLowerCase()}`,object:n[2].trim()}:{predicate:e,object:String(t||"").trim()}}async function Sr(e,t){if(!e||!t)return null;try{let{resolveObject:n}=await Promise.resolve().then(()=>(ss(),Hp)),s=n(e,t);if(s?.match?.id&&!s.ambiguous)return{id:s.match.id,label:s.match.label}}catch{}return null}function TE(e){let t=String(e||"");return/^have$/i.test(t)?"has":/[a-z]y$/i.test(t)&&!/[aeiou]y$/i.test(t)?`${t.slice(0,-1)}ies`:/(?:s|x|z|ch|sh|o)$/i.test(t)?`${t}es`:`${t}s`}function Ng(e){let t=String(e||"");return/^has$/i.test(t)?"have":/[a-z]ies$/i.test(t)&&!/[aeiou]ies$/i.test(t)?`${t.slice(0,-3)}y`:/(?:s|x|z|ch|sh|o)es$/i.test(t)?t.slice(0,-2):t.replace(/s$/i,"")}function Mg(e){if(Gs[e])return Gs[e];let t=String(e||""),n=wf(t);if(n){let a=Mg(n);if(a==="can")return"cannot";if(a==="can be")return"cannot be";if(a==="is"||a.startsWith("is "))return`is not${a.slice(2)}`;let[l,...c]=a.split(" ");return["does not",Ng(l),...c].join(" ")}let s=/^mgx:([a-z]+(?:-[a-z]+)*)-than$/i.exec(t);if(s)return`is ${s[1].replace(/-/g," ")} than`;let o=new RegExp(`^mgx:(${Yl})-([a-z]+)$`,"i").exec(t);if(o)return`is ${o[1].toLowerCase()} ${o[2].toLowerCase()}`;let i=/^mgx:same-([a-z]+)-as$/i.exec(t);if(i)return`has the same ${i[1].toLowerCase()} as`;let r=/^mgx:([a-z]+)(?:-([a-z]+))?$/i.exec(t);return r?`${TE(r[1])}${r[2]?` ${r[2]}`:""}`:e}function Fl(e){let t=/^mgx:([a-z][\w-]*)$/i.exec(String(e||""));return t?t[1].toLowerCase():null}function IE(e){let t=String(e||"").trim(),n=t.toLowerCase();for(let{marker:s,predicate:o}of CE)if(n!==s&&n.endsWith(` ${s}`)){let i=t.slice(0,t.length-s.length).trim();if(i)return{subject:i,predicate:o}}return{subject:t,predicate:null}}function ae(e){let t=e.provenance?` (source: ${e.provenance})`:"";return e.provenance.includes("ace:chat")||e.provenance.includes("teach:chat")?`you told me: ${Ct(e)}${t}`:e.provenance.includes("corpus-weak:")?`possibly: ${Ct(e)}${t}`:e.provenance.includes("corpus:")?`${Ct(e)}${t}`:e.provenance.includes("reference:")?`${Ct(e)}${t}`:`i learned: ${Ct(e)}${t}`}function dg(e,t,n){let s=ae(e);if(!qn.has(e.predicate)||!n.has(e.subject))return s;let o=Li(e.object,t,{cap:6});if(o.length<=1)return s;let i=` \u2192 ${o.slice(1).join(" \u2192 ")}`,r=s.match(OE);return r?s.slice(0,r.index)+i+r[0]:s+i}function pg(e,t,n,{indent:s=""}={}){let o=t.filter(k=>k.predicate===Er).map(k=>[k.subject,k.object]),i=vr(o),r=e.map(k=>`${s}${dg(k,i,n)}`),a=e.filter(k=>qn.has(k.predicate)&&n.has(k.subject)),l=[...new Set(a.map(k=>k.object))];if(l.length<2)return{lines:r,grouped:null};let c=t.filter(k=>k.predicate==="owl:disjointWith").map(k=>[k.subject,k.object]),{split:u,clusters:d}=Ni(l,{parents:i,disjointEdges:c});if(!u)return{lines:r,grouped:null};let m=a[0].subject,p=new Map;for(let k of d)for(let y of k.objects)p.set(y,k);let f=e.filter(k=>!(qn.has(k.predicate)&&n.has(k.subject))),g=[],h=[],b=0,w=k=>{let y=dg(k,i,n);return b<je?(b+=1,`${s}${y}`):(h.push(y),null)};for(let k of d){let y=a.filter(j=>p.get(j.object)===k).map(w).filter(Boolean);y.length&&g.push(`${s}${m}, the ${k.label}:
132
+ ${y.join(`
133
+ `)}`)}if(f.length){let k=f.map(w).filter(Boolean);k.length&&g.push(`${s}also about ${m}:
134
134
  ${k.join(`
135
- `)}`)}let w=h.length?`
136
- ${s}\u2026and ${h.length} more \u2014 say 'more' to see them.`:"",v={text:g.join(`
137
- `)+w,replace:!0,...h.length?{pending:{items:h,noun:"facts"}}:{}};return{lines:i,grouped:v}}async function dS(e,t,n,s){let o;try{({digestTermFromRows:o}=await Promise.resolve().then(()=>(Xh(),Yh)))}catch{return null}let r;try{r=o(e,t,n)}catch{return null}if(!r||!r.paragraphs.length)return null;let i=[...new Set((r.sources||[]).map(u=>u.provenance).filter(Boolean))],a=i.length?`(sources: ${i.join("; ")})
138
- `:"",l=`Say 'show the facts' for all ${s.length} stored facts.`;return{text:`${r.paragraphs.join(`
135
+ `)}`)}let v=h.length?`
136
+ ${s}\u2026and ${h.length} more \u2014 say 'more' to see them.`:"",$={text:g.join(`
137
+ `)+v,replace:!0,...h.length?{pending:{items:h,noun:"facts"}}:{}};return{lines:r,grouped:$}}async function NE(e,t,n,s){let o;try{({digestTermFromRows:o}=await Promise.resolve().then(()=>(rg(),og)))}catch{return null}let i;try{i=o(e,t,n)}catch{return null}if(!i||!i.paragraphs.length)return null;let r=[...new Set((i.sources||[]).map(u=>u.provenance).filter(Boolean))],a=r.length?`(sources: ${r.join("; ")})
138
+ `:"",l=`Say 'show the facts' for all ${s.length} stored facts.`;return{text:`${i.paragraphs.join(`
139
139
 
140
140
  `)}
141
141
 
142
- ${a}${l}`,pending:{items:s,noun:"facts"}}}function jo(e){let t=Jc().find(n=>n.kind==="article");return t&&Bm(String(e||""),t)?"an":"a"}function _g(e,t){return e&&t?{text:`you've told me both, and I won't pick between them \u2014 ${se(e)}; ${se(t)}. To settle it, say "forget that ${e.subject} is ${jo(e.object)} ${e.object}".`,replace:!0}:t?{text:`no \u2014 ${se(t)}`,replace:!0}:e?{text:`yes \u2014 ${se(e)}`,replace:!0}:null}function pS(e,t){let n=s=>`${Ct(s)}${s.provenance?` (source: ${s.provenance})`:""}`;return{text:`you've told me both ${n(e)} and ${n(t)} \u2014 together those contradict, and I won't derive an answer from an inconsistency. To settle it, say "forget that ${e.subject} is ${jo(e.object)} ${e.object}".`,replace:!0}}function Ci(e){let t=o=>`${Ct(o)}${o.provenance?` (source: ${o.provenance})`:""}`,n=e[0],s=e[e.length-1];return`${e.map(t).join("; ")}; so ${n.subject} is a ${s.object}`}async function _l(e){try{let{loadMemory:t}=await Promise.resolve().then(()=>(Ke(),as)),n=await t(e),s=[];for(let o of n.individuals||[]){if(o?.class!=="Fact")continue;let r=i=>(o.attributes||[]).find(a=>a.key===i)?.value||"";s.push({subject:r("subject"),predicate:r("predicate"),object:r("object"),provenance:r("provenance")})}return s}catch{return[]}}async function mt(e,t=null){if(t?.rows)return t.rows;try{let{loadMemory:n,readFactRows:s}=await Promise.resolve().then(()=>(Ke(),as)),o=s(await n(e));return t&&(t.rows=o,t.reloads=(t.reloads||0)+1),o}catch{return[]}}function fS(e){if(!Ii)try{Ii=Ds().nounPlurals}catch{Ii=new Map}return Ii.get(e)??null}function Li(e){let t=String(e||"").trim().toLowerCase();if(!t||/\s/.test(t))return t;try{return hr(Ds(),t)?.lemma||t}catch{return t}}function mS(e){let t=String(e||"").trim().match(/^(?:all|every|each|both|most|some)\s+([\w-]+)$/i);if(!t)return Li(e);let n=Li(Ml(t[1]));return`${jo(n)} ${n}`}function J(e,t){let n=e(t),s=new Set,o=new Set([n]),r=n.replace(hS,"").trim();r&&r!==n&&o.add(r);for(let i of o){s.add(i),i.endsWith("es")&&s.add(i.slice(0,-2)),i.endsWith("s")&&s.add(i.slice(0,-1));let a=fS(i);a&&s.add(e(a))}return s}function og(e,t,n){for(let s of e)for(let o of t){let r=n(s,o);if(r)return r}return null}function Tg(e,t=null){let n=Ni(e),s=n.match(gS);if(s)return[s[0],s[2],s[1]];if(!t)return null;let o=n.match(wS);return o&&t(o[1])?[o[0],o[2],o[1]]:null}function Tl(e){let t=String(e||"").replace($S,"");if(t!==e){let s=t.match(ds);if(s)return s}let n=String(e||"").match(xS);return n?`is ${n[1].trim()} a ${n[2].trim()}`.match(ds):null}function Il(e){return String(e||"").replace(/^(?:can't|cannot|can not|cant)\s+/i,"can ").replace(/^(?:doesn't|does not)\s+/i,"does ").replace(/^(?:don't|do not)\s+/i,"do ").replace(/^(?:didn't|did not)\s+/i,"did ").replace(/\s+(?:not|never)\s+/i," ").replace(/\s+/g," ").trim()}function ag(e){let t=String(e.text||"").replace(/^(?:yes|no) — /i,"");return t===e.text?e:{...e,text:t}}function NS(e,t){let n=(e||[]).map(s=>t.find(o=>o.predicate===s.predicate&&o.subject===s.subject&&o.object===s.object));return!n.length||!n.every(Boolean)?null:n.map(s=>`${Ct(s)}${s.provenance?` (source: ${s.provenance})`:""}`).join("; ")}function lg(e,t,n,{maxHops:s=3}={}){let o=J(ee,e),r=J(ee,t),i=ti(o,r,n,{maxHops:s}),a=l=>{let c=l&&l.length?NS(l,n):null;return c?` \u2014 via: ${c}`:""};if(i.verdict==="both")return{text:`I have both, at the same level of detail \u2014 my sources disagree, so I won't pick:
143
- ${[...i.negative,...i.positive].map(se).join(`
144
- `)}`,replace:!0,miss:!0};if(i.verdict==="yes"||i.verdict==="no"){let l=i.verdict==="no"?i.negative[0]:i.positive[0],c=`${i.verdict} \u2014 ${se(l)}${a(i.chain)}`;return i.overrides&&(c+=`. That overrides what I know about ${i.overrides.fact.subject} generally: ${se(i.overrides.fact)}`),{text:c,replace:!0}}return null}function ug(e,t,n,{maxHops:s=3}={}){let o=J(ee,e),r=J(ee,t),i=lc(o,r,n,{maxHops:s});if(!i)return null;let a=`${e} is a kind of ${i.klass}`,l=`I don't know if ${e} can ${t}.`;if(i.positive.length||i.negative.length){let u=[`${i.positive.length} can ${t}`,`${i.negative.length} cannot`,`${i.unknown.length} I have nothing on`].join(", "),d=[...i.positive,...i.negative].slice(0,cc).map(m=>se(m.fact));return{text:`${l} ${a}, and of the ${i.kinds} kind${i.kinds===1?"":"s"} of ${i.klass} I know, ${u}.
142
+ ${a}${l}`,pending:{items:s,noun:"facts"}}}function Ro(e){let t=ul().find(n=>n.kind==="article");return t&&eh(String(e||""),t)?"an":"a"}function Pg(e,t){return e&&t?{text:`you've told me both, and I won't pick between them \u2014 ${ae(e)}; ${ae(t)}. To settle it, say "forget that ${e.subject} is ${Ro(e.object)} ${e.object}".`,replace:!0}:t?{text:`no \u2014 ${ae(t)}`,replace:!0}:e?{text:`yes \u2014 ${ae(e)}`,replace:!0}:null}function ME(e,t){let n=s=>`${Ct(s)}${s.provenance?` (source: ${s.provenance})`:""}`;return{text:`you've told me both ${n(e)} and ${n(t)} \u2014 together those contradict, and I won't derive an answer from an inconsistency. To settle it, say "forget that ${e.subject} is ${Ro(e.object)} ${e.object}".`,replace:!0}}function zi(e){let t=o=>`${Ct(o)}${o.provenance?` (source: ${o.provenance})`:""}`,n=e[0],s=e[e.length-1];return`${e.map(t).join("; ")}; so ${n.subject} is a ${s.object}`}async function Dl(e){try{let{loadMemory:t}=await Promise.resolve().then(()=>(Ge(),cs)),n=await t(e),s=[];for(let o of n.individuals||[]){if(o?.class!=="Fact")continue;let i=r=>(o.attributes||[]).find(a=>a.key===r)?.value||"";s.push({subject:i("subject"),predicate:i("predicate"),object:i("object"),provenance:i("provenance")})}return s}catch{return[]}}async function mt(e,t=null){if(t?.rows)return t.rows;try{let{loadMemory:n,readFactRows:s}=await Promise.resolve().then(()=>(Ge(),cs)),o=s(await n(e));return t&&(t.rows=o,t.reloads=(t.reloads||0)+1),o}catch{return[]}}function PE(e){if(!Bi)try{Bi=zs().nounPlurals}catch{Bi=new Map}return Bi.get(e)??null}function Wi(e){let t=String(e||"").trim().toLowerCase();if(!t||/\s/.test(t))return t;try{return yr(zs(),t)?.lemma||t}catch{return t}}function FE(e){let t=String(e||"").trim().match(/^(?:all|every|each|both|most|some)\s+([\w-]+)$/i);if(!t)return Wi(e);let n=Wi(Kl(t[1]));return`${Ro(n)} ${n}`}function Q(e,t){let n=e(t),s=new Set,o=new Set([n]),i=n.replace(DE,"").trim();i&&i!==n&&o.add(i);for(let r of o){s.add(r),r.endsWith("es")&&s.add(r.slice(0,-2)),r.endsWith("s")&&s.add(r.slice(0,-1));let a=PE(r);a&&s.add(e(a))}return s}function fg(e,t,n){for(let s of e)for(let o of t){let i=n(s,o);if(i)return i}return null}function zg(e,t=null){let n=qi(e),s=n.match(zE);if(s)return[s[0],s[2],s[1]];if(!t)return null;let o=n.match(UE);return o&&t(o[1])?[o[0],o[2],o[1]]:null}function Ul(e){let t=String(e||"").replace(GE,"");if(t!==e){let s=t.match(ds);if(s)return s}let n=String(e||"").match(VE);return n?`is ${n[1].trim()} a ${n[2].trim()}`.match(ds):null}function ql(e){return String(e||"").replace(/^(?:can't|cannot|can not|cant)\s+/i,"can ").replace(/^(?:doesn't|does not)\s+/i,"does ").replace(/^(?:don't|do not)\s+/i,"do ").replace(/^(?:didn't|did not)\s+/i,"did ").replace(/\s+(?:not|never)\s+/i," ").replace(/\s+/g," ").trim()}function gg(e){let t=String(e.text||"").replace(/^(?:yes|no) — /i,"");return t===e.text?e:{...e,text:t}}function rj(e,t){let n=(e||[]).map(s=>t.find(o=>o.predicate===s.predicate&&o.subject===s.subject&&o.object===s.object));return!n.length||!n.every(Boolean)?null:n.map(s=>`${Ct(s)}${s.provenance?` (source: ${s.provenance})`:""}`).join("; ")}function wg(e,t,n,{maxHops:s=3}={}){let o=Q(ne,e),i=Q(ne,t),r=ai(o,i,n,{maxHops:s}),a=l=>{let c=l&&l.length?rj(l,n):null;return c?` \u2014 via: ${c}`:""};if(r.verdict==="both")return{text:`I have both, at the same level of detail \u2014 my sources disagree, so I won't pick:
143
+ ${[...r.negative,...r.positive].map(ae).join(`
144
+ `)}`,replace:!0,miss:!0};if(r.verdict==="yes"||r.verdict==="no"){let l=r.verdict==="no"?r.negative[0]:r.positive[0],c=`${r.verdict} \u2014 ${ae(l)}${a(r.chain)}`;return r.overrides&&(c+=`. That overrides what I know about ${r.overrides.fact.subject} generally: ${ae(r.overrides.fact)}`),{text:c,replace:!0}}return null}function yg(e,t,n,{maxHops:s=3}={}){let o=Q(ne,e),i=Q(ne,t),r=xc(o,i,n,{maxHops:s});if(!r)return null;let a=`${e} is a kind of ${r.klass}`,l=`I don't know if ${e} can ${t}.`;if(r.positive.length||r.negative.length){let u=[`${r.positive.length} can ${t}`,`${r.negative.length} cannot`,`${r.unknown.length} I have nothing on`].join(", "),d=[...r.positive,...r.negative].slice(0,$c).map(m=>ae(m.fact));return{text:`${l} ${a}, and of the ${r.kinds} kind${r.kinds===1?"":"s"} of ${r.klass} I know, ${u}.
145
145
  ${d.join(`
146
- `)}`,replace:!0,miss:!0}}let c=uc(r,n,{exclude:new Set([...o,i.klass])});if(c.length){let u=c.slice(0,cc),d=c.slice(u.length);return{text:`${l} ${a}, and nothing I know about ${i.klass} says whether one can ${t}. I do know ${c.length} thing${c.length===1?"":"s"} that can ${t}${d.length?` (first ${u.length} shown)`:""}:
147
- ${u.map(se).join(`
148
- `)}`,replace:!0,miss:!0,...d.length?{pending:{items:d.map(se),noun:"facts"}}:{}}}return{text:`${l} ${a}, but nothing I remember says whether any kind of ${i.klass} can ${t}.`,replace:!0,miss:!0}}function FS(e){let t=String(e||"").toLowerCase().trim().replace(/\s+/g," ");if(t==="best")return"better";if(t==="worst")return"worse";let n=t.match(/^(most|least)\s+([a-z][\w-]*)$/);return n?`${n[1]==="most"?"more":"less"} ${n[2]}`:/[a-z]est$/.test(t)&&t.length>4?`${t.slice(0,-3)}er`:null}function ln(e){let t=new Set,n=[];for(let s of e){let o=`${s.subject}|${s.predicate}|${s.object}`;t.has(o)||(t.add(o),n.push(s))}return n}async function Ig(e,t,n,s,o={},r=null,i=null){return Og(await qS(e,t,n,s,o,r,i),n,t)}function Og(e,t,n){if(!e||e.goal!==void 0)return e;let s=String(n||"").trim(),o=Rl(t?.parsed);if(!o&&e.generalVerbQuery&&(o=Jh),!o){let r=s.match(Al),i=r?null:Ni(s).match(Ag)||Tg(s),a=r?r[2]:i?i[1]:null;a&&!Cl.has(a.toLowerCase())&&(o=Jh)}if(!o){let r=s.match(Ng);r&&(o=Rl({shape:"meta",object:r[1]}))}return o?{...e,goal:o}:e}async function qS(e,t,n,s,o={},r=null,i=null){let a;try{({normFactTerm:a}=await Promise.resolve().then(()=>(Ke(),as)))}catch{return null}let l=String(t).trim(),c=l.match(RS);if(c){let M=J(a,c[1]),F=(await mt(e,r)).filter(W=>W.predicate==="mgx:usedFor"&&M.has(W.object));if(F.length){let U=Ye(ln(F),o).map(se),B=U.slice(0,_e),_=U.slice(_e),I=_.length?`
149
- \u2026and ${_.length} more \u2014 say 'more' to see them.`:"";return{text:B.join(`
150
- `)+I,replace:!0,..._.length?{pending:{items:_,noun:"facts"}}:{}}}}for(let{predicate:M,re:F}of zS){let W=l.match(F);if(!W)continue;let U=J(a,W[1]),B=(await mt(e,r)).filter(K=>K.predicate===M&&U.has(K.object));if(!B.length)continue;let I=Ye(ln(B),o).map(se),O=I.slice(0,_e),z=I.slice(_e),q=z.length?`
151
- \u2026and ${z.length} more \u2014 say 'more' to see them.`:"";return{text:O.join(`
152
- `)+q,replace:!0,...z.length?{pending:{items:z,noun:"facts"}}:{}}}let u=l.match(MS),d=u?null:l.match(PS),m=u?u[1]:d?.[2],p=u?u[2]:d?.[1],f=m&&p?FS(p):null;if(f){let M=`mgx:${f.replace(/\s+/g,"-")}-than`,F=await mt(e,r),W=J(a,m),U=[...W].sort((I,O)=>I.length-O.length)[0],B=I=>W.has(I)||I.startsWith(`${U}-`)||I.startsWith(`${U} `)||F.some(O=>Wn.has(O.predicate)&&O.subject===I&&W.has(O.object)),_=ln(F.filter(I=>I.predicate===M&&Ws(I))).filter(I=>I.subject!==I.object&&B(I.subject)&&B(I.object));if(_.length){let I=new Set,O=new Map;for(let H of _)I.add(H.subject),I.add(H.object),O.set(H.object,(O.get(H.object)||0)+1),O.has(H.subject)||O.set(H.subject,O.get(H.subject)||0);let z=new Map(O),q=[],K=null;for(;z.size;){let H=[...z.keys()].filter(re=>z.get(re)===0);if(H.length!==1){K=H.length===0?{text:`I can't order the ${U}s \u2014 the "${f} than" facts I have loop back on themselves, so no ${p} exists. /memory to inspect them.`,replace:!0,miss:!0}:{text:`I can't pick the ${p} ${U} from what I know \u2014 nothing compares ${H[0]} and ${H[1]}. Teach me, e.g. "${H[0]} is ${f} than ${H[1]}".`,replace:!0,miss:!0};break}let Q=H[0];q.push(Q),z.delete(Q);for(let re of _)re.subject===Q&&z.has(re.object)&&z.set(re.object,z.get(re.object)-1)}if(K)return K;let X=q.slice(0,-1).map((H,Q)=>_.find(re=>re.subject===H&&re.object===q[Q+1]));if(X.every(Boolean)){let H=X.map(Q=>`${Ct(Q)}${Q.provenance?` (source: ${Q.provenance})`:""}`).join("; ");return{text:`${q[0]} \u2014 ${H}; so ${q[0]} is the ${p} ${U}`,replace:!0}}}}let g=s?l.match(AS):null;if(g){let M=J(a,g[1]),F=(await mt(e,r)).filter(W=>ig.test(W.predicate)&&M.has(W.subject));if(F.length){let U=Ye(ln(F),o).map(se),B=U.slice(0,_e),_=U.slice(_e),I=_.length?`
153
- \u2026and ${_.length} more \u2014 say 'more' to see them.`:"";return{text:B.join(`
154
- `)+I,replace:!0,..._.length?{pending:{items:_,noun:"facts"}}:{}}}}let h=l.match(TS);if(h){let M=h[1].toLowerCase(),F=J(a,h[2].replace(/^(?:an?|the)\s+/i,"").trim()),W=(await mt(e,r)).filter(U=>ig.test(U.predicate)&&U.predicate.endsWith(`-${M}`)&&F.has(U.object));if(W.length){let B=Ye(ln(W),o).map(se),_=B.slice(0,_e),I=B.slice(_e),O=I.length?`
155
- \u2026and ${I.length} more \u2014 say 'more' to see them.`:"";return{text:_.join(`
156
- `)+O,replace:!0,...I.length?{pending:{items:I,noun:"facts"}}:{}}}}let b=n?.parsed?.shape==="meta"?n.parsed.object:null,y=n?.parsed&&n.parsed.node!=="miss";if(!b&&s&&!y&&!dg.test(l)){let M=l.match(Ng)||l.match(/^what\s+(?:does|do)\s+(.+?)\s+means?[?.!\s]*$/i);M&&(b=hs(M[1]))}if(!b&&n?.ambiguous&&Array.isArray(n.candidateParses)){let M=n.candidateParses.find(F=>F?.shape==="meta"&&F.object);M&&(b=hs(String(M.object)))}if(b){let{subject:M,predicate:F}=cS(b),W=J(a,M),U=(await mt(e,r)).filter(H=>W.has(H.subject)&&!tg.has(H.predicate)),B=F?U.filter(H=>H.predicate===F):U;if(!B.length){if(F&&U.length)return{text:`I don't have any "${_o[F]}" facts about ${M}.`,replace:s};if(!F){let H=Ye((await mt(e,r)).filter(Q=>W.has(Q.object)),o);if(H.length){let Q=H.map(se),re=Q.slice(0,_e),ue=Q.slice(_e),te=ue.length?`
157
- \u2026and ${ue.length} more \u2014 say 'more' to see them.`:"";return{text:re.join(`
158
- `)+te,replace:s,...ue.length?{pending:{items:ue,noun:"facts"}}:{}}}}return null}B=Ye(B,o);let _=await mt(e,r),{lines:I,grouped:O}=sg(B,_,W),z=!F&&I.length>uS?await dS(M,B,_,I):null;if(z)return{...z,replace:s};if(O)return{...O,replace:s};let q=I.slice(0,_e),K=I.slice(_e),X=K.length?`
159
- \u2026and ${K.length} more \u2014 say 'more' to see them.`:"";return{text:q.join(`
160
- `)+X,replace:s,...K.length?{pending:{items:K,noun:"facts"}}:{}}}if(!s)return null;let w=l.match(XE);if(w){let F=`mgx:${w[2].toLowerCase().replace(/\s+/g,"-")}-than`,W=await _l(e),U=X=>{let H=X.replace(/^(?:an?|the)\s+/i,"").trim();return i&&us.test(H)?i:H},B=U(w[1]),_=U(w[3]),I=J(a,B),O=J(a,_),z=W.find(X=>X.predicate===F&&I.has(X.subject)&&O.has(X.object));if(z){let X=W.find(Q=>Q.predicate===F&&I.has(Q.object)&&O.has(Q.subject)),H=X?` \u2014 though you also told me the opposite: ${se(X)}. Both are stored; I won't silently pick one.`:"";return{text:`yes \u2014 ${se(z)}${H}`,replace:!0}}let q=W.filter(X=>X.predicate===F&&(I.has(X.subject)||I.has(X.object)));return{text:`I can't confirm that \u2014 nothing I remember compares them that way.${q.length?` I do know: ${q.slice(0,3).map(se).join("; ")}.`:""} If it's true, teach me: "${B} is ${w[2].toLowerCase()} than ${_}".`,replace:!0,miss:!0}}for(let{predicate:M,phrase:F,re:W}of BS){let U=l.match(W);if(!U)continue;let B=await _l(e),_=J(a,U[1]),I=J(a,U[2]),O=B.find(q=>q.predicate===M&&_.has(q.subject)&&I.has(q.object));if(O)return{text:`yes \u2014 ${se(O)}`,replace:!0};let z=B.filter(q=>q.predicate===M&&_.has(q.subject));if(z.length){let q=z.slice(0,3).map(se).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${U[1]} ${F} ${U[2]}. I do know: ${q}.`,replace:!0,miss:!0}}if(!n?.parsed&&B.some(q=>_.has(q.subject)))return{text:`I can't confirm that \u2014 nothing I remember says ${U[1]} ${F} ${U[2]}.`,replace:!0,miss:!0};break}let v=l.match(ds)||Tl(l);if(v){let M=J(a,v[1]),F=J(a,v[2]),W=await mt(e,r),U=O=>M.has(O.subject)&&F.has(O.object),{DISJOINT_PREDICATE:B}=await Promise.resolve().then(()=>(Ft(),Qt)),_=O=>M.has(O.subject)||M.has(O.object)||F.has(O.subject)||F.has(O.object);return W.some(O=>O.predicate===B&&Ws(O)&&_(O))?null:_g(W.find(O=>Wn.has(O.predicate)&&U(O)),W.find(O=>O.predicate===Zr&&U(O)))}let k=Il(l),$=k.match(ES);if($){let M=await mt(e,r),F=$[1],W=lg($[2],$[3],M);if(W&&k!==cg(l)&&(W=ag(W)),W&&F)return{text:`I can't speak for ${F.trim()} ${$[2]} \u2014 what I remember is generic, not universal. ${W.text}.`,replace:!0};if(W)return W;let U=J(a,$[2]),B=M.filter(_=>_.predicate==="mgx:capableOf"&&U.has(_.subject));if(B.length){let _=B.slice(0,3).map(se).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${$[2]} can ${$[3]}. I do know: ${_}. If it's true, teach me: "a ${B[0].subject} can ${$[3]}".`,replace:!0,miss:!0}}return ug($[2],$[3],M)}let T=l.match(SS);if(T){let M=J(a,T[1]),F=J(a,T[2]),W=new Set(["mgx:hasA","tmct:has"]),U=await _l(e),B=z=>U.find(q=>W.has(q.predicate)&&z.has(q.subject)&&F.has(q.object)),_=B(M);if(_)return{text:`yes \u2014 ${se(_)}`,replace:!0};let I=[{terms:M,chain:[]}],O=new Set;for(let z=0;z<4;z+=1){let q=[];for(let{terms:K,chain:X}of I){let H=U.filter(Q=>Wn.has(Q.predicate)&&K.has(Q.subject)&&!O.has(Q.object));for(let Q of H){if(O.has(Q.object))continue;O.add(Q.object);let re=[...X,Q],ue=B(J(a,Q.object));if(ue)return{text:`yes \u2014 ${[...re.map(se),se(ue)].join("; ")}`,replace:!0};q.push({terms:J(a,Q.object),chain:re})}}if(!q.length)break;I=q}return null}let S=Il(l),j=S.match(CS);if(j){let M=await mt(e,r),F=!!j[1],W=J(a,j[2]),U=J(a,j[3]),B=lg(j[2],j[3],M);if(B&&S!==cg(l)&&(B=ag(B)),B&&F)return{text:`I can't speak for ${j[1].trim()} ${j[2]} \u2014 what I remember is generic, not universal. ${B.text}.`,replace:!0};if(B)return B;if(s){let _=M.filter(O=>O.predicate==="mgx:capableOf"&&W.has(O.subject));if(_.length){let O=_.slice(0,3).map(se).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${j[2]} can ${j[3]}. I do know: ${O}. If it's true, teach me: "a ${_[0].subject} can ${j[3]}".`,replace:!0,miss:!0}}let I=ug(j[2],j[3],M);if(I)return I;if(!/\s/.test(j[2].trim())&&!M.some(O=>W.has(O.subject)||W.has(O.object))){let O=Ml(Li(j[2]));return{text:`I can't confirm that \u2014 I don't know anything about "${j[2]}" yet. Teach me "a ${O} can ${j[3]}" (or "a ${O} cannot ${j[3]}") and I'll remember it.`,replace:!0,miss:!0}}}}let C=l.match(jS);if(C){let M=J(a,C[1]),F=(await mt(e,r)).filter(O=>(O.predicate==="mgx:capableOf"||O.predicate===lo)&&M.has(O.subject));if(!F.length)return null;let U=Ye(ln(F),o).map(se),B=U.slice(0,_e),_=U.slice(_e),I=_.length?`
161
- \u2026and ${_.length} more \u2014 say 'more' to see them.`:"";return{text:B.join(`
162
- `)+I,replace:!0,..._.length?{pending:{items:_,noun:"facts"}}:{}}}let E=l.match(LS);if(E){let M=J(a,E[1]),F=J(a,E[2]),W=await mt(e,r),U=ln(W.filter(B=>B.predicate==="mgx:capableOf"&&F.has(B.object))).filter(B=>ti(new Set([B.subject]),F,W).verdict==="yes");if(U.length){let{findIsaChain:B,SUBCLASS_PREDICATE:_,TYPE_PREDICATE:I}=await Promise.resolve().then(()=>(Ft(),Qt)),O=W.filter(oe=>oe.predicate===_),z=W.filter(oe=>oe.predicate===I),q=O.map(oe=>[oe.subject,oe.object]),K=z.map(oe=>[oe.subject,oe.object]),X=oe=>(oe.predicate===_?O:z).find(ae=>ae.subject===oe.subject&&ae.object===oe.object),H=new Map,Q=U.filter(oe=>M.has(oe.subject)?!0:(H.has(oe.subject)||H.set(oe.subject,B(oe.subject,M,K,q,{maxHops:3})),!!H.get(oe.subject))),ue=Ye(Q.length?Q:U,o).map(oe=>{let ae=Q.length?H.get(oe.subject):null;if(!ae||ae.length<2)return se(oe);let xe=ae.map(X);if(!xe.every(Boolean))return se(oe);let Se=xe.map(G=>`${Ct(G)}${G.provenance?` (source: ${G.provenance})`:""}`).join("; ");return`${se(oe)} \u2014 via: ${Se}`}),te=ue.slice(0,_e),ie=ue.slice(_e),ne=ie.length?`
163
- \u2026and ${ie.length} more \u2014 say 'more' to see them.`:"";return{text:(Q.length?"":`nothing I remember ties these to "${E[1]}", but:
164
- `)+te.join(`
165
- `)+ne,replace:!0,...ie.length?{pending:{items:ie,noun:"facts"}}:{}}}}let R=l.match(OS);if(R&&R[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let M=J(a,R[1]),F=(await mt(e,r)).filter(W=>W.predicate==="mgxneg:capableOf"&&M.has(W.object));if(F.length){let U=Ye(ln(F),o).map(se),B=U.slice(0,_e),_=U.slice(_e),I=_.length?`
166
- \u2026and ${_.length} more \u2014 say 'more' to see them.`:"";return{text:B.join(`
167
- `)+I,replace:!0,..._.length?{pending:{items:_,noun:"facts"}}:{}}}return{text:`nothing I remember says anything cannot ${R[1].trim()}.`,replace:!0,miss:!0}}let N=l.match(IS);if(N&&N[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let M=J(a,N[1]),F=uc(M,await mt(e,r));if(F.length){let U=Ye(ln(F),o).map(se),B=U.slice(0,_e),_=U.slice(_e),I=_.length?`
168
- \u2026and ${_.length} more \u2014 say 'more' to see them.`:"";return{text:B.join(`
169
- `)+I,replace:!0,..._.length?{pending:{items:_,noun:"facts"}}:{}}}}let A=l.match(_S);if(A&&!WS.has(A[1].trim().split(/\s+/)[0]?.toLowerCase())){let M=J(a,A[1]),F=(await mt(e,r)).filter(O=>O.predicate==="mgx:hasA"&&M.has(O.object));if(!F.length)return null;let U=Ye(ln(F),o).map(se),B=U.slice(0,_e),_=U.slice(_e),I=_.length?`
170
- \u2026and ${_.length} more \u2014 say 'more' to see them.`:"";return{text:B.join(`
171
- `)+I,replace:!0,..._.length?{pending:{items:_,noun:"facts"}}:{}}}let P=l.match(dg),V=n?.parsed?.shape==="reverse"&&n.parsed.kind==="inherits"?n.parsed.object:P?.[1];if(V){let M=J(a,V),F=(await mt(e,r)).filter(O=>Wn.has(O.predicate)&&M.has(O.object));if(!F.length)return null;let U=Ye(ln(F),o).map(se),B=U.slice(0,_e),_=U.slice(_e),I=_.length?`
172
- \u2026and ${_.length} more \u2014 say 'more' to see them.`:"";return{text:B.join(`
173
- `)+I,replace:!0,..._.length?{pending:{items:_,noun:"facts"}}:{}}}let Y=l.match(kS);if(Y){let M=J(a,Y[1]),F=await mt(e,r),W=G=>!String(G.provenance||"").includes("corpus:")&&!String(G.provenance||"").includes("web:"),U=F.filter(G=>Wn.has(G.predicate)&&W(G)),B=new Set,_=M;for(let G=0;G<8&&_.size;G+=1){let fe=new Set;for(let le of U)_.has(le.object)&&!B.has(le.subject)&&fe.add(le.subject);if(!fe.size)break;for(let le of fe)B.add(le);let ce=new Set;for(let le of fe)for(let me of J(a,le))ce.add(me);_=ce}let I=F.filter(G=>M.has(G.subject)||M.has(G.object)||B.has(G.subject));if(!I.length){let G=a(Y[1]).split(/\s+/).filter(fe=>fe.length>=4&&!Rg.has(fe));if(G.length){let fe=le=>new Set(String(le||"").split(/\s+/)),ce=le=>{let me=fe(le);return G.some(jt=>me.has(jt))};I=F.filter(le=>ce(le.subject)||ce(le.object))}}if(I=I.filter(G=>!tg.has(G.predicate)),!I.length)return null;let{findConsistencyViolations:O,TYPE_PREDICATE:z,SUBCLASS_PREDICATE:q,DISJOINT_PREDICATE:K}=await Promise.resolve().then(()=>(Ft(),Qt)),X=G=>!G.provenance?.includes("corpus:")&&!G.provenance?.includes("web:"),H=F.filter(G=>G.predicate===z&&X(G)).map(G=>[G.subject,G.object]),Q=F.filter(G=>G.predicate===q&&X(G)).map(G=>[G.subject,G.object]),re=F.filter(G=>G.predicate===K&&X(G)).map(G=>[G.subject,G.object]);if(re.length){let fe=O(H,Q,re,{focus:M,budget:5}).find(ce=>M.has(ce.subject));if(fe)return{text:`I can't answer that \u2014 what I've been told about ${fe.subject} is inconsistent: it's taught to be both ${fe.classA} and ${fe.classB}, but ${fe.viaA} and ${fe.viaB} are disjoint (${fe.viaA} owl:disjointWith ${fe.viaB}). I'd need one of those retracted before I can answer honestly.`,replace:!0}}let ue=I.find(G=>M.has(G.subject)||M.has(G.object)),te=ue?M.has(ue.subject)?ue.subject:ue.object:Y[1].trim(),ie=I.some(G=>B.has(G.subject)&&!M.has(G.subject)&&!M.has(G.object));I=Ye(I,o);let ne=`${I.length} remembered fact${I.length===1?"":"s"} about ${te}${ie?" (including its known subtypes)":""}:`,{lines:Oe,grouped:oe}=sg(I,F,M,{indent:" "});if(oe)return{...oe,text:`${ne}
174
- ${oe.text}`};let ae=Oe.slice(0,_e),xe=Oe.slice(_e),Se=xe.length?`
175
- \u2026and ${xe.length} more \u2014 say 'more' to see them.`:"";return{text:`${ne}
176
- ${ae.join(`
177
- `)}${Se}`,replace:!0,...xe.length?{pending:{items:xe.map(G=>G.trim()),noun:"facts"}}:{}}}return null}async function tj(e,t){let n=await yr(e,t);if(!n)return null;let s=(e?.byId?.get?.(n.id)||(e?.individuals||[]).find(o=>o?.id===n.id))?.class;return s&&Qh[s]?Qh[s][0]:null}function Oi(e,t){let n=[];if(!e||!t)return n;let s=new Set([t]),o=t;for(let r=0;r<sj;r+=1){let i=null;for(let a of e.relations||[])if(nj.test(`${a?.prop||""} ${a?.predicate||""}`)&&(i=(a.edges||[]).find(l=>l?.subject===o)||null,i))break;if(!i||s.has(i.object))break;s.add(i.object),n.push({id:i.object,label:i.objectLabel||i.object}),o=i.object}return n}async function Lg(e,t,n,s,o=null,r=null,i={},a=null){return Og(await oj(e,t,n,s,o,r,i,a),n,t)}async function oj(e,t,n,s,o=null,r=null,i={},a=null){if(!s)return null;let l;try{({normFactTerm:l}=await Promise.resolve().then(()=>(Ke(),as)))}catch{return null}let c=String(t).trim();if(o){let _=c.match(ds);if(_){let I=await yr(o,_[1]);if(I){let O=J(l,Kt(_[2])),z=Oi(o,I.id).find(K=>[...J(l,K.label)].some(X=>O.has(X)));if(z)return{text:`yes \u2014 the code graph says ${I.label} inherits ${z.label}.`,replace:!0};let q=await yr(o,Kt(_[2]));if(q&&Oi(o,q.id).some(K=>K.id===I.id))return{text:`I can't confirm that \u2014 the code graph's stored direction runs the other way: ${q.label} inherits ${I.label}. An inheritance doesn't reverse.`,replace:!0,miss:!0}}}}let u=c.replace(/^(?:actually|really|honestly|yeah\s+nah)\s*,?\s+/i,""),d=await mt(e,a);if(!d.length){if(!ds.test(u)&&!Al.test(u)){let I=u.match(fg);if(I){let O=I[1].trim(),z=us.test(O)?r||null:O;if(z&&!/^there\b/i.test(z)&&!n?.parsed&&!mg.test(O)&&!eg.test(I[2].trim()))return hg(z,I[2].trim().toLowerCase())}}let _=u.match(ds)||Tl(c);if(!(_&&!/^there\b/i.test(_[1].trim())||rg.test(c)))return null}let m=d.filter(_=>Wn.has(_.predicate)),p=(_,I)=>I.trust-_.trust,f=_=>{let I=_.map(se),O=I.slice(0,_e),z=I.slice(_e),q=z.length?`
178
- \u2026and ${z.length} more \u2014 say 'more' to see them.`:"";return{text:O.join(`
179
- `)+q,replace:!0,...z.length?{pending:{items:z,noun:"facts"}}:{}}};if(ej.test(c)){let _=Ye(m.length?m:d,i);return _.length?f(_):null}let g=u.match(Al);if(g){let _=g[1].trim(),I=us.test(_)?r||null:_,O=g[2].trim().toLowerCase(),z=g[3].trim();if(I&&!Cl.has(O)){let q=vl(d),{findIsaChain:K}=await Promise.resolve().then(()=>(Ft(),Qt)),X=oe=>{let ae=String(oe||"").trim().toLowerCase(),xe=[];for(let Se of d){let G=jl(Se.predicate);if(!G)continue;if(G===ae){xe.push({fact:Se,aliasFacts:[]});continue}let fe=$l(K,G,new Set([ae]),q,{maxHops:2});if(!fe)continue;let ce=fe.map(le=>d.find(me=>me.predicate===vr&&me.subject===le.subject&&me.object===le.object));ce.every(Boolean)&&xe.push({fact:Se,aliasFacts:ce})}return xe},{loadMemory:H,findRuleByName:Q,resolveRelationChase:re}=await Promise.resolve().then(()=>(Ke(),as)),{findActionPath:ue}=await Promise.resolve().then(()=>(ks(),Tr)),te=await H(e),ne=await re(te,O,I,z,{relationFactsFor:X,renderFactLine:se,factPhrase:Ct,factTermVariants:J,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:yl,findActionPath:ue});return ne?{text:`yes \u2014 ${ne.citation.join("; ")}`,replace:!0}:X(O).length>0||!!Q(te,O)?{text:`I know the '${O}' relation, but I can't confirm ${I} is the ${O} of ${z} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${O}' yet.`,replace:!0}}}let h=Ni(u).match(Ag)||Tg(u,_=>{let I=J(l,_);return d.some(O=>I.has(O.subject)||I.has(O.object))});if(h){let _=h[1].trim().toLowerCase(),I=h[2].trim(),O=us.test(I)?r||null:I;if(O&&!Cl.has(_)){let z=vl(d),{findIsaChain:q}=await Promise.resolve().then(()=>(Ft(),Qt)),K=oe=>{let ae=String(oe||"").trim().toLowerCase(),xe=[];for(let Se of d){let G=jl(Se.predicate);if(!G)continue;if(G===ae){xe.push({fact:Se,aliasFacts:[]});continue}let fe=$l(q,G,new Set([ae]),z,{maxHops:2});if(!fe)continue;let ce=fe.map(le=>d.find(me=>me.predicate===vr&&me.subject===le.subject&&me.object===le.object));ce.every(Boolean)&&xe.push({fact:Se,aliasFacts:ce})}return xe},{loadMemory:X,findRuleByName:H,resolveRelationChaseReverse:Q}=await Promise.resolve().then(()=>(Ke(),as)),re=await X(e),{findReachableSet:ue}=await Promise.resolve().then(()=>(ks(),Tr)),ie=await Q(re,_,O,{relationFactsFor:K,renderFactLine:se,factPhrase:Ct,factTermVariants:J,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:yl,findReachableSet:ue});return ie.length?{text:ie.map(ae=>`${ae.subject} \u2014 ${ae.citation.join("; ")}`).join(`
180
- `),replace:!0}:K(_).length>0||!!H(re,_)?{text:/^what\b/i.test(Ni(u))?`I don't know what the ${_} of ${O} is from what you've told me.`:`I don't know anyone who is the ${_} of ${O} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${_}' yet.`,replace:!0}}}{let _=u.match(rj);if(_){let I=J(l,_[1]),O=Ye(d.filter(z=>I.has(z.subject)||I.has(z.object)),i);if(O.length){let z=O.map(se),q=z.slice(0,_e),K=z.slice(_e),X=K.length?`
181
- \u2026and ${K.length} more \u2014 say 'more' to see them.`:"";return{text:q.join(`
182
- `)+X,replace:!0,...K.length?{pending:{items:K,noun:"facts"}}:{}}}}}let b=u.match(yS);if(b){let _=Ml(b[1].trim().toLowerCase()),I=b[2].trim(),O=us.test(I)?r||null:I;if(O){let{loadMemory:z,findRuleByName:q,RULE_KIND_PROP:K,RULE_KIND_RECURSIVE:X}=await Promise.resolve().then(()=>(Ke(),as)),H=await z(e),Q=q(H,_),re=Q?.attributes?.find(ue=>ue.prop===K)?.value;if(Q&&re===X){let ue=Q.attributes.find(ne=>ne.prop==="mgx:ruleBaseCase")?.value,te=Q.attributes.find(ne=>ne.prop==="mgx:ruleRecStep")?.value,ie=l(O);if(ue&&te&&ie){let ne=vl(d),{findIsaChain:Oe}=await Promise.resolve().then(()=>(Ft(),Qt)),oe=fe=>{let ce=String(fe||"").trim().toLowerCase(),le=[];for(let me of d){let jt=jl(me.predicate);if(!jt)continue;if(jt===ce){le.push({fact:me,aliasFacts:[]});continue}let sn=$l(Oe,jt,new Set([ce]),ne,{maxHops:2});if(!sn)continue;let Qe=sn.map(un=>d.find(Vt=>Vt.predicate===vr&&Vt.subject===un.subject&&Vt.object===un.object));Qe.every(Boolean)&&le.push({fact:me,aliasFacts:Qe})}return le},{findReachableSet:ae}=await Promise.resolve().then(()=>(ks(),Tr)),G=ae({entity:ie,hop:0},fe=>{let ce=fe.hop===0?ue:te;return oe(ce).filter(le=>le.fact.subject===fe.entity).map(le=>({action:le,nextState:{entity:le.fact.object,hop:fe.hop+1}}))},{maxDepth:20,stateKey:fe=>fe.entity});if(G.length)return{text:G.map(({node:ce,path:le})=>{let me=new Set,jt=[];for(let sn of le.actions){jt.push(se(sn.fact));for(let Qe of sn.aliasFacts){let un=Qe.id||`${Qe.subject}|${Qe.predicate}|${Qe.object}`;me.has(un)||(me.add(un),jt.push(`${Ct(Qe)}${Qe.provenance?` (source: ${Qe.provenance})`:""}`))}}return`${ce.entity} \u2014 ${jt.join("; ")}`}).join(`
183
- `),replace:!0}}}return null}}let y=c.match(rg),w=c.match(ds)||Tl(c)||y&&`is ${y[1].trim()} a ${y[2].trim()}`.match(ds);if(w){let _=J(l,Kt(w[2])),I=r&&us.test(w[1].trim())?r:w[1],O=new Set(J(l,I));if([...O].some(D=>_.has(D))){let D=Kt(w[2]).trim();return{text:`yes \u2014 ${jo(D)} ${D} is ${jo(D)} ${D}, trivially: every kind is a kind of itself.`,replace:!0}}let z=await tj(o,I);if(z)for(let D of J(l,z))O.add(D);let{findIsaChain:q,deriveDisjointViolations:K,SUBCLASS_PREDICATE:X,TYPE_PREDICATE:H,DISJOINT_PREDICATE:Q}=await Promise.resolve().then(()=>(Ft(),Qt)),re=Ws,ue=m.filter(D=>D.predicate===X&&re(D)),te=m.filter(D=>D.predicate===H&&re(D)),ie=ue.map(D=>[D.subject,D.object]),ne=te.map(D=>[D.subject,D.object]),Oe=m.filter(D=>D.predicate===X),oe=m.filter(D=>D.predicate===H),ae=oe.map(D=>[D.subject,D.object]),xe=Oe.map(D=>[D.subject,D.object]),Se=d.filter(D=>D.predicate===Q&&re(D)),G=Se.map(D=>[D.subject,D.object]),fe=Se.length?K(ae.concat(xe),xe,G,{budget:20,focus:new Set([...O,..._])}):[],ce=D=>{let we=fe.find(Ne=>Ne.subject===D&&_.has(Ne.object));if(!we)return null;let ye=m.filter(Ne=>_.has(Ne.object)&&(Ne.subject===we.viaClass||Ne.subject===we.subject)).sort(p)[0],je=Se.find(Ne=>Ne.subject===we.viaClass&&Ne.object===we.object||Ne.subject===we.object&&Ne.object===we.viaClass);return!ye||!je?null:pS(ye,je)},le=m.filter(D=>O.has(D.subject)&&_.has(D.object)).sort(p)[0],me=d.filter(D=>D.predicate===Zr&&O.has(D.subject)&&_.has(D.object)).sort(p)[0],jt=Se.find(D=>O.has(D.subject)&&_.has(D.object)||O.has(D.object)&&_.has(D.subject));if(le&&!me){let D=ce(le.subject);if(D)return D}let sn=_g(le,me||jt);if(sn)return sn;if(Se.length){let D=je=>{let Ne=new Set(je),_t=new Set(je);for(let Te=0;Te<8&&_t.size;Te+=1){let ve=new Set;for(let[Ze,fs]of xe)_t.has(Ze)&&!Ne.has(fs)&&ve.add(fs);if(!ve.size)break;for(let Ze of ve)Ne.add(Ze);_t=ve}return Ne},we=D(_),ye=fe.find(je=>O.has(je.subject)&&we.has(je.object)&&!D([je.viaClass]).has(je.object)&&!D([je.object]).has(je.viaClass));if(ye){let je=m.filter(ve=>O.has(ve.subject)&&ve.object===ye.viaClass).sort(p)[0],Ne=Se.find(ve=>ve.subject===ye.viaClass&&ve.object===ye.object||ve.subject===ye.object&&ve.object===ye.viaClass),_t=!_.has(ye.object),Te=_t?m.filter(ve=>_.has(ve.subject)&&ve.object===ye.object).sort(p)[0]:null;if(je&&Ne&&(!_t||Te)){let ve=Kt(w[2]).trim();return{text:`no \u2014 ${[je,...Te?[Te]:[]].map(se).join("; ")}; and ${Ct(Ne)}${Ne.provenance?` (source: ${Ne.provenance})`:""} \u2014 so ${I} can never be ${jo(ve)} ${ve}.`,replace:!0}}}}let Qe=await yr(o,I);if(Qe){let D=new Map;for(let ye of Oi(o,Qe.id))for(let je of J(l,ye.label))!O.has(je)&&!D.has(je)&&D.set(je,ye.label);let we=m.filter(ye=>D.has(ye.subject)&&_.has(ye.object)).sort(p)[0];if(we)return{text:`yes \u2014 the code graph says ${Qe.label} inherits ${D.get(we.subject)}, and ${se(we)}`,replace:!0}}let un=D=>(D.predicate===X?ue:te).find(we=>we.subject===D.subject&&we.object===D.object);for(let D of O){let we=q(D,_,ne,ie,{maxHops:2});if(!we)continue;let ye=ce(D);if(ye)return ye;let je=we.map(un);if(je.every(Boolean))return{text:`yes \u2014 ${Ci(je)}`,replace:!0}}let Vt=D=>(D.predicate===X?Oe:oe).find(we=>we.subject===D.subject&&we.object===D.object);for(let D of O){let we=q(D,_,ae,xe,{maxHops:2});if(!we)continue;let ye=ce(D);if(ye)return ye;let je=we.map(Vt);if(je.every(Boolean)&&je.some(re))return{text:`yes \u2014 ${Ci(je)}`,replace:!0}}let zt=I.match(/^(.*\S)\s+not$/i),It=zt&&[zt[0],r&&us.test(zt[1].trim())?r:zt[1]];if(It){let D=J(l,It[1]),we=_,ye=m.filter(Te=>D.has(Te.subject)&&we.has(Te.object)).sort(p)[0];if(ye)return{text:`no \u2014 ${se(ye)}`,replace:!0};let je=Se.find(Te=>D.has(Te.subject)&&we.has(Te.object)||D.has(Te.object)&&we.has(Te.subject));if(je)return{text:`yes \u2014 ${se(je)}`,replace:!0};let Ne=It[1].trim(),_t=Kt(w[2]).trim();return{text:`I can't confirm that either way \u2014 nothing I remember links ${Ne} and ${_t}. If no ${Ne} is a ${_t}, teach me: "no ${Ne} is a ${_t}".`,replace:!0,miss:!0}}if(Se.length){let D=K(ne.concat(ie),ie,G,{budget:10});for(let we of O){let ye=D.find(Te=>Te.subject===we&&_.has(Te.object));if(!ye)continue;let je=te.concat(ue).find(Te=>Te.subject===ye.subject&&Te.object===ye.viaType),Ne=Se.find(Te=>Te.subject===ye.viaClass&&Te.object===ye.object||Te.subject===ye.object&&Te.object===ye.viaClass),_t=[je,Ne].filter(Boolean).map(se);return{text:`no \u2014 ${_t.length?_t.join("; "):`${ye.viaClass} and ${ye.object} are disjoint.`}`,replace:!0}}}let{deriveSomeValuesFromApplication:$r,ON_PROPERTY_PREDICATE:x,SOME_VALUES_FROM_PREDICATE:de,deriveSomeValuesFromSubsumption:Re,ENTAILED_SCM_SVF_PROVENANCE:En,SCM_SVF_RULE_CONFIDENCE:qs,entailedTrustFrom:zl}=await Promise.resolve().then(()=>(Ft(),Qt)),Ul=d.filter(D=>D.predicate===x&&re(D)),Bl=d.filter(D=>D.predicate===de&&re(D));if(Ul.length&&Bl.length){let D=new Map(Bl.map(ve=>[ve.subject,ve.object])),we=Ul.map(ve=>({restriction:ve.subject,property:ve.object,target:D.get(ve.subject)})).filter(ve=>ve.target),ye=new Set([X,H,Q,x,de,"owl:intersectionOf"]),je=d.filter(ve=>re(ve)&&!ye.has(ve.predicate)),Ne=je.map(ve=>[ve.subject,ve.predicate,ve.object]),_t=$r(Ne,ne,ie,we,{budget:10});for(let ve of O){let Ze=_t.find(on=>on.subject===ve&&_.has(on.object));if(!Ze)continue;let fs=je.find(on=>on.subject===Ze.subject&&on.predicate===Ze.viaProperty&&on.object===Ze.viaValue),ms=te.find(on=>on.subject===Ze.viaValue&&on.object===Ze.viaType),Ro=[fs,ms].filter(Boolean).map(se);return{text:`yes \u2014 ${Ro.length?Ro.join("; "):`${Ze.subject} ${Ze.viaProperty} ${Ze.viaValue}, and ${Ze.viaValue} is a ${Ze.viaType}.`}`,replace:!0}}let Te=we.length>1?Re(we,ie,{budget:10}):[];if(Te.length){let ve=ie.concat(Te.map(ke=>[ke.subject,ke.object])),Ze=new Map(we.map(ke=>[ke.restriction,ke])),fs=new Map;for(let ke of d)fs.set(`${ke.subject}\0${ke.predicate}\0${ke.object}`,ke.trust);let ms=(ke,dn,Ot)=>fs.get(`${ke}\0${dn}\0${Ot}`),Ro=new Map;for(let ke of Te){let dn=Ze.get(ke.subject),Ot=Ze.get(ke.object),Ut=[dn&&ms(ke.subject,x,dn.property),ms(ke.subject,de,ke.viaY1),Ot&&ms(ke.object,x,Ot.property),ms(ke.object,de,ke.viaY2),ms(ke.viaY1,X,ke.viaY2)].filter(Dg=>typeof Dg=="number"),kr=zl(Ut,qs);kr!==null&&Ro.set(`${ke.subject}\0${ke.object}`,kr)}let on=ke=>{if(ke.predicate!==X)return te.find(Ut=>Ut.subject===ke.subject&&Ut.object===ke.object);let dn=ue.find(Ut=>Ut.subject===ke.subject&&Ut.object===ke.object);if(dn)return dn;let Ot=Te.find(Ut=>Ut.subject===ke.subject&&Ut.object===ke.object);return Ot?{subject:Ot.subject,predicate:X,object:Ot.object,provenance:En,trust:Ro.get(`${Ot.subject}\0${Ot.object}`)}:void 0};for(let ke of O){let dn=q(ke,_,ne,ve,{maxHops:3});if(!dn)continue;let Ot=dn.map(on);if(Ot.every(Boolean)){let Ut=zl(Ot.map(kr=>kr.trust),1);return{text:`yes \u2014 ${Ci(Ot)}`,replace:!0,...Ut!==null?{trust:Ut}:{}}}}}}let Pg=J(l,I),Wl=m.filter(D=>Pg.has(D.subject)).sort(p),ps=I.trim(),xr=Kt(w[2]).trim(),Fg=[...O].some(D=>q(D,_,ne,ie,{maxHops:vS}));if(Wl.length){let D=Wl.slice(0,3).map(se).join("; "),we=Fg?`The facts to settle it are here, but the chain is longer than I follow while answering. Run "/syllogise ${ps}", then ask me again.`:`If it's true, teach me: "${ps} is a kind of ${xr}".`;return{text:`I can't confirm that \u2014 nothing I remember says ${ps} is a ${xr}. I do know: ${D}. ${we}`,replace:!0,miss:!0}}let ql=m.filter(D=>O.has(D.object)&&_.has(D.subject)).sort(p)[0];return ql?{text:`I can't confirm that \u2014 what I know runs the other way: ${se(ql)}. A kind doesn't reverse. If it's true, teach me: "every ${ps} is a ${xr}".`,replace:!0,miss:!0}:!Qe&&!z&&!HE(ps)&&!d.some(D=>O.has(D.subject)||O.has(D.object))?{text:`I can't confirm that \u2014 I don't know "${ps}" at all yet. If it's true, teach me: "${ps} is a kind of ${xr}".`,replace:!0,miss:!0}:null}let v=c.match(HS);if(v){let[,_,I,O]=v,{SUBCLASS_PREDICATE:z,ON_PROPERTY_PREDICATE:q,buildCardinalityRestrictions:K,proveCardinalityAtLeast:X,CARDINALITY_RULE_CONFIDENCE:H,entailedTrustFrom:Q}=await Promise.resolve().then(()=>(Ft(),Qt)),re=Ws,ue=m.filter(ne=>ne.predicate===z&&re(ne)).map(ne=>[ne.subject,ne.object]),te=d.filter(ne=>(ne.predicate===q||pg.has(ne.predicate))&&re(ne)),ie=K(te);if(ie.length){let ne=J(l,_.trim()),Oe=J(l,O.trim()),oe=Number(I),ae=og(ne,Oe,(xe,Se)=>X(ue,ie,xe,Se,oe,{}));if(ae){let xe=d.find(me=>me.predicate===z&&me.subject===ae.viaClass&&me.object===ae.viaRestriction),Se=xe?.provenance?` (source: ${xe.provenance})`:"",G=ae.kind==="exactly"?"exactly":"at least",fe=(me,jt)=>`${me}${jt===1?"":"s"}`,ce=[xe?.trust,...te.filter(me=>me.subject===ae.viaRestriction).map(me=>me.trust),...ae.viaClass!==ae.subject?[m.find(me=>me.predicate===z&&me.subject===ae.subject&&me.object===ae.viaClass)?.trust]:[]].filter(me=>typeof me=="number"),le=Q(ce,H);return{text:`yes \u2014 every ${ae.viaClass} has ${G} ${ae.n} ${fe(ae.object,ae.n)}${Se}, so at least ${oe} follows.`,replace:!0,...le!==null?{trust:le}:{}}}}}let k=c.match(KS);if(k){let[,_,I]=k,{SUBCLASS_PREDICATE:O,ON_PROPERTY_PREDICATE:z,buildCardinalityRestrictions:q,proveMaxCardinalityZeroDenial:K,CAX_MAXC0_RULE_CONFIDENCE:X,entailedTrustFrom:H}=await Promise.resolve().then(()=>(Ft(),Qt)),Q=Ws,re=m.filter(ie=>ie.predicate===O&&Q(ie)).map(ie=>[ie.subject,ie.object]),ue=d.filter(ie=>(ie.predicate===z||pg.has(ie.predicate))&&Q(ie)),te=q(ue);if(te.length){let ie=J(l,_.trim()),ne=J(l,I.trim()),Oe=og(ie,ne,(oe,ae)=>K(re,te,oe,ae,{}));if(Oe){let oe=d.find(G=>G.predicate===O&&G.subject===Oe.viaClass&&G.object===Oe.viaRestriction),ae=oe?.provenance?` (source: ${oe.provenance})`:"",xe=[oe?.trust,...ue.filter(G=>G.subject===Oe.viaRestriction).map(G=>G.trust),...Oe.viaClass!==Oe.subject?[m.find(G=>G.predicate===O&&G.subject===Oe.subject&&G.object===Oe.viaClass)?.trust]:[]].filter(G=>typeof G=="number"),Se=H(xe,X);return{text:`no \u2014 every ${Oe.viaClass} has at most 0 ${Oe.object}${ae}.`,replace:!0,...Se!==null?{trust:Se}:{}}}}}let $=c.match(YS);if($){let _=J(l,$[1]),I=d.filter(O=>O.predicate===wl&&_.has(O.subject)).sort(p);return I.length?f(I):null}let T=u.match(XS);if(T){let[,_,I]=T,O=J(l,_.trim()),z=J(l,I.replace(/^an?\s+/i,"").trim()),q=d.filter(K=>K.predicate===wl&&z.has(K.subject)&&O.has(K.object)).sort(p)[0];return q?{text:`yes \u2014 ${se(q)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${_.trim().toLowerCase()} owns/maintains ${I.trim()}.`,replace:!0}}let S=u.match(JS);if(S){let[,_,I]=S,O=J(l,_.replace(/^an?\s+/i,"").trim()),z=J(l,I.trim()),q=d.filter(K=>K.predicate===wl&&O.has(K.subject)&&z.has(K.object)).sort(p)[0];return q?{text:`yes \u2014 ${se(q)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${_.trim().toLowerCase()} is owned by ${I.trim()}.`,replace:!0}}let j=u.match(QS);if(j){let[,_,I]=j,O=J(l,_.trim()),z=J(l,`${I.trim()} method`),q=d.filter(K=>K.predicate===Ms&&O.has(K.subject)&&z.has(K.object)).sort(p)[0];return q?{text:`yes \u2014 ${se(q)}`,replace:!0}:null}let C=u.match(ZS);if(C){let _=J(l,C[1].trim()),I=d.filter(O=>O.predicate===Ms&&_.has(O.subject)&&/ method$/.test(O.object)).sort(p);return I.length?f(I):null}let E=u.match(fg);if(E){let _=E[1].trim(),I=mg.test(_)?null:us.test(_)?r||null:_,O=E[2].trim().toLowerCase();if(I){let z=J(l,I),q=new Map,K=null;if(o){let te=await yr(o,I);if(K=te,te)for(let ie of Oi(o,te.id))for(let ne of J(l,ie.label))!z.has(ne)&&!q.has(ne)&&q.set(ne,ie.label),z.add(ne)}let X=te=>te.predicate===yl&&l(te.object)===O||te.predicate===`tmct:${O}`&&te.object==="true",H=l(I).split(/\s+/).filter(te=>te.length>=4&&!Rg.has(te)),Q=te=>H.some(ie=>new Set(String(te.subject||"").split(/\s+/)).has(ie)),re=te=>z.has(te.subject)||H.length&&Q(te),ue=d.filter(te=>re(te)&&X(te)).sort(p)[0];if(ue){let te=q.get(ue.subject);return{text:te?`yes \u2014 the code graph says ${K.label} inherits ${te}, and ${se(ue)}`:`yes \u2014 ${se(ue)}`,replace:!0}}{let{findIsaChain:te,SUBCLASS_PREDICATE:ie,TYPE_PREDICATE:ne}=await Promise.resolve().then(()=>(Ft(),Qt)),Oe=Ws,oe=d.filter(ce=>ce.predicate===ie&&Oe(ce)),ae=d.filter(ce=>ce.predicate===ne&&Oe(ce)),xe=oe.map(ce=>[ce.subject,ce.object]),Se=ae.map(ce=>[ce.subject,ce.object]),G=ce=>(ce.predicate===ie?oe:ae).find(le=>le.subject===ce.subject&&le.object===ce.object),fe=J(l,O);for(let ce of z){let le=te(ce,fe,Se,xe,{maxHops:2});if(!le)continue;let me=le.map(G);if(me.every(Boolean))return{text:`yes \u2014 ${Ci(me)}`,replace:!0}}}if(d.some(re)&&!n?.parsed)return{text:`I don't have a fact saying ${mS(I)} is ${O}.`,replace:!0};if(!n?.parsed&&!eg.test(O))return hg(I,O)}}let R=Il(c).match(eS);if(R&&!kl.test(c)){let[,_,I,O]=R,z=I.toLowerCase();if(!xl.test(z)&&!Sl.test(z)){let q=_.trim(),K=sS(await El(z),O),X=K.object.replace(/^an?\s+/i,"").trim();if(q&&X){let H=K.predicate,Q=J(l,q),re=J(l,X),ue=[H,po(H)],te=d.filter(ne=>ue.includes(ne.predicate)&&Q.has(ne.subject)&&re.has(ne.object)).sort(p)[0];if(te)return{text:`${af(te.predicate)?"no":"yes"} \u2014 ${se(te)}`,replace:!0,generalVerbQuery:!0};let ie=d.filter(ne=>ue.includes(ne.predicate)&&Q.has(ne.subject));if(ie.length){let ne=ie.slice(0,3).map(se).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${Ct({subject:q,predicate:H,object:X})}. I do know: ${ne}.`,replace:!0,miss:!0}}return null}}}let N=c.match(tS);if(N&&!kl.test(c)){let[,_,I]=N,[O,z]=I.toLowerCase().split(/\s+/);if(!xl.test(O)&&!Sl.test(O)){let q=_.trim();if(q){let K=await El(O);z&&/^mgx:[a-z]+$/.test(K)&&(K=`${K}-${z}`);let X=J(l,q),H=[K,po(K)],Q=Ye(d.filter(re=>H.includes(re.predicate)&&X.has(re.subject)),i);if(Q.length)return{...f(Q),generalVerbQuery:!0}}}}let A=c.match(/^(?:what|who)\s+([a-z]+)\s+(on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside)\s+(.+?)[?.!\s]*$/i);if(A&&!kl.test(c)){let[,_,I,O]=A,z=_.toLowerCase();if(!xl.test(z)&&!Sl.test(z)&&!ZE.test(z)){let q=await El(z);/^mgx:[a-z]+$/.test(q)&&(q=`${q}-${I.toLowerCase()}`);let K=J(l,O.replace(/^(?:an?|the)\s+/i,"").trim()),X=Ye(d.filter(H=>H.predicate===q&&K.has(H.object)),i);if(X.length)return{...f(X),generalVerbQuery:!0}}}let P=c.match(GS);if(P){let _=J(l,P[1]),I=Ye(d.filter(H=>_.has(H.subject)||_.has(H.object)),i);if(!I.length)return null;let O=_.has(I[0].subject)?I[0].subject:I[0].object,z=I.map(H=>` ${se(H)}`),q=z.slice(0,_e),K=z.slice(_e),X=K.length?`
184
- \u2026and ${K.length} more \u2014 say 'more' to see them.`:"";return{text:`${I.length} remembered fact${I.length===1?"":"s"} about ${O}:
146
+ `)}`,replace:!0,miss:!0}}let c=kc(i,n,{exclude:new Set([...o,r.klass])});if(c.length){let u=c.slice(0,$c),d=c.slice(u.length);return{text:`${l} ${a}, and nothing I know about ${r.klass} says whether one can ${t}. I do know ${c.length} thing${c.length===1?"":"s"} that can ${t}${d.length?` (first ${u.length} shown)`:""}:
147
+ ${u.map(ae).join(`
148
+ `)}`,replace:!0,miss:!0,...d.length?{pending:{items:d.map(ae),noun:"facts"}}:{}}}return{text:`${l} ${a}, but nothing I remember says whether any kind of ${r.klass} can ${t}.`,replace:!0,miss:!0}}function cj(e){let t=String(e||"").toLowerCase().trim().replace(/\s+/g," ");if(t==="best")return"better";if(t==="worst")return"worse";let n=t.match(/^(most|least)\s+([a-z][\w-]*)$/);return n?`${n[1]==="most"?"more":"less"} ${n[2]}`:/[a-z]est$/.test(t)&&t.length>4?`${t.slice(0,-3)}er`:null}function ln(e){let t=new Set,n=[];for(let s of e){let o=`${s.subject}|${s.predicate}|${s.object}`;t.has(o)||(t.add(o),n.push(s))}return n}async function Ug(e,t,n,s,o={},i=null,r=null){return Wg(await mj(e,t,n,s,o,i,r),n,t)}function Wg(e,t,n){if(!e||e.goal!==void 0)return e;let s=String(n||"").trim(),o=zl(t?.parsed);if(!o&&e.generalVerbQuery&&(o=ig),!o){let i=s.match(Bl),r=i?null:qi(s).match(Dg)||zg(s),a=i?i[2]:r?r[1]:null;a&&!Wl.has(a.toLowerCase())&&(o=ig)}if(!o){let i=s.match(Gg);i&&(o=zl({shape:"meta",object:i[1]}))}return o?{...e,goal:o}:e}async function mj(e,t,n,s,o={},i=null,r=null){let a,l;try{({normFactTerm:a,normFactPredicate:l}=await Promise.resolve().then(()=>(Ge(),cs)))}catch{return null}let c=String(t).trim(),u=c.match(QE);if(u){let F=Q(a,u[1]),z=(await mt(e,i)).filter(B=>B.predicate==="mgx:usedFor"&&F.has(B.object));if(z.length){let W=Ye(ln(z),o).map(ae),C=W.slice(0,je),I=W.slice(je),O=I.length?`
149
+ \u2026and ${I.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
150
+ `)+O,replace:!0,...I.length?{pending:{items:I,noun:"facts"}}:{}}}}for(let{predicate:F,re:z}of uj){let B=c.match(z);if(!B)continue;let W=Q(a,B[1]),C=(await mt(e,i)).filter(ie=>ie.predicate===F&&W.has(ie.object));if(!C.length)continue;let O=Ye(ln(C),o).map(ae),N=O.slice(0,je),q=O.slice(je),U=q.length?`
151
+ \u2026and ${q.length} more \u2014 say 'more' to see them.`:"";return{text:N.join(`
152
+ `)+U,replace:!0,...q.length?{pending:{items:q,noun:"facts"}}:{}}}let d=c.match(ij),m=d?null:c.match(aj),p=d?d[1]:m?.[2],f=d?d[2]:m?.[1],g=p&&f?cj(f):null;if(g){let F=`mgx:${g.replace(/\s+/g,"-")}-than`,z=await mt(e,i),B=Q(a,p),W=[...B].sort((O,N)=>O.length-N.length)[0],C=O=>B.has(O)||O.startsWith(`${W}-`)||O.startsWith(`${W} `)||z.some(N=>qn.has(N.predicate)&&N.subject===O&&B.has(N.object)),I=ln(z.filter(O=>O.predicate===F&&qs(O))).filter(O=>O.subject!==O.object&&C(O.subject)&&C(O.object));if(I.length){let O=new Set,N=new Map;for(let Y of I)O.add(Y.subject),O.add(Y.object),N.set(Y.object,(N.get(Y.object)||0)+1),N.has(Y.subject)||N.set(Y.subject,N.get(Y.subject)||0);let q=new Map(N),U=[],ie=null;for(;q.size;){let Y=[...q.keys()].filter(oe=>q.get(oe)===0);if(Y.length!==1){ie=Y.length===0?{text:`I can't order the ${W}s \u2014 the "${g} than" facts I have loop back on themselves, so no ${f} exists. /memory to inspect them.`,replace:!0,miss:!0}:{text:`I can't pick the ${f} ${W} from what I know \u2014 nothing compares ${Y[0]} and ${Y[1]}. Teach me, e.g. "${Y[0]} is ${g} than ${Y[1]}".`,replace:!0,miss:!0};break}let X=Y[0];U.push(X),q.delete(X);for(let oe of I)oe.subject===X&&q.has(oe.object)&&q.set(oe.object,q.get(oe.object)-1)}if(ie)return ie;let se=U.slice(0,-1).map((Y,X)=>I.find(oe=>oe.subject===Y&&oe.object===U[X+1]));if(se.every(Boolean)){let Y=se.map(X=>`${Ct(X)}${X.provenance?` (source: ${X.provenance})`:""}`).join("; ");return{text:`${U[0]} \u2014 ${Y}; so ${U[0]} is the ${f} ${W}`,replace:!0}}}}let h=s?c.match(ZE):null;if(h){let F=Q(a,h[1]),z=(await mt(e,i)).filter(B=>hg.test(B.predicate)&&F.has(B.subject));if(z.length){let W=Ye(ln(z),o).map(ae),C=W.slice(0,je),I=W.slice(je),O=I.length?`
153
+ \u2026and ${I.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
154
+ `)+O,replace:!0,...I.length?{pending:{items:I,noun:"facts"}}:{}}}}let b=c.match(ej);if(b){let F=b[1].toLowerCase(),z=Q(a,b[2].replace(/^(?:an?|the)\s+/i,"").trim()),B=(await mt(e,i)).filter(W=>hg.test(W.predicate)&&W.predicate.endsWith(`-${F}`)&&z.has(W.object));if(B.length){let C=Ye(ln(B),o).map(ae),I=C.slice(0,je),O=C.slice(je),N=O.length?`
155
+ \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:I.join(`
156
+ `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}let w=n?.parsed?.shape==="meta"?n.parsed.object:null,v=n?.parsed&&n.parsed.node!=="miss";if(!w&&s&&!v&&!vg.test(c)){let F=c.match(Gg)||c.match(/^what\s+(?:does|do)\s+(.+?)\s+means?[?.!\s]*$/i);F&&(w=hs(F[1]))}if(!w&&n?.ambiguous&&Array.isArray(n.candidateParses)){let F=n.candidateParses.find(z=>z?.shape==="meta"&&z.object);F&&(w=hs(String(F.object)))}if(w){let F=IE(w),{predicate:z}=F,B=F.subject.replace(/^(?:the|an?)\s+/i,"").trim()||F.subject,W=!1;if(z&&Wn.test(B)){if(!r){let oe=String(Gs[z]||"").replace(/^(?:is|are)\s+/,"");return{text:`not sure what "${B.toLowerCase()}" refers to yet \u2014 name the subject directly, e.g. "what is a <name>${oe?` ${oe}`:""}".`,replace:s,miss:!0,selfContainedMiss:!0}}B=r,W=!0}let C=Q(a,B),I=(await mt(e,i)).filter(oe=>C.has(oe.subject)&&!ug.has(oe.predicate)),O=z?I.filter(oe=>l(oe.predicate)===z):I;if(!O.length){if(z&&(I.length||W))return{text:`I don't have any "${Gs[z]}" facts about ${B}.`,replace:s,...I.length?{}:{miss:!0}};if(!z){let oe=Ye((await mt(e,i)).filter(K=>C.has(K.object)),o);if(oe.length){let K=oe.map(ae),le=K.slice(0,je),te=K.slice(je),_e=te.length?`
157
+ \u2026and ${te.length} more \u2014 say 'more' to see them.`:"";return{text:le.join(`
158
+ `)+_e,replace:s,...te.length?{pending:{items:te,noun:"facts"}}:{}}}}return null}O=Ye(O,o);let N=await mt(e,i),{lines:q,grouped:U}=pg(O,N,C),ie=!z&&q.length>LE?await NE(B,O,N,q):null;if(ie)return{...ie,replace:s};if(U)return{...U,replace:s};let se=q.slice(0,je),Y=q.slice(je),X=Y.length?`
159
+ \u2026and ${Y.length} more \u2014 say 'more' to see them.`:"";return{text:se.join(`
160
+ `)+X,replace:s,...Y.length?{pending:{items:Y,noun:"facts"}}:{}}}if(!s)return null;let $=c.match(vE);if($){let z=`mgx:${$[2].toLowerCase().replace(/\s+/g,"-")}-than`,B=await Dl(e),W=se=>{let Y=se.replace(/^(?:an?|the)\s+/i,"").trim();return r&&Wn.test(Y)?r:Y},C=W($[1]),I=W($[3]),O=Q(a,C),N=Q(a,I),q=B.find(se=>se.predicate===z&&O.has(se.subject)&&N.has(se.object));if(q){let se=B.find(X=>X.predicate===z&&O.has(X.object)&&N.has(X.subject)),Y=se?` \u2014 though you also told me the opposite: ${ae(se)}. Both are stored; I won't silently pick one.`:"";return{text:`yes \u2014 ${ae(q)}${Y}`,replace:!0}}let U=B.filter(se=>se.predicate===z&&(O.has(se.subject)||O.has(se.object)));return{text:`I can't confirm that \u2014 nothing I remember compares them that way.${U.length?` I do know: ${U.slice(0,3).map(ae).join("; ")}.`:""} If it's true, teach me: "${C} is ${$[2].toLowerCase()} than ${I}".`,replace:!0,miss:!0}}for(let{predicate:F,phrase:z,re:B}of pj){let W=c.match(B);if(!W)continue;let C=await Dl(e),I=Q(a,W[1]),O=Q(a,W[2]),N=C.find(U=>U.predicate===F&&I.has(U.subject)&&O.has(U.object));if(N)return{text:`yes \u2014 ${ae(N)}`,replace:!0};let q=C.filter(U=>U.predicate===F&&I.has(U.subject));if(q.length){let U=q.slice(0,3).map(ae).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${W[1]} ${z} ${W[2]}. I do know: ${U}.`,replace:!0,miss:!0}}if(!n?.parsed&&C.some(U=>I.has(U.subject)))return{text:`I can't confirm that \u2014 nothing I remember says ${W[1]} ${z} ${W[2]}.`,replace:!0,miss:!0};break}let k=c.match(ds)||Ul(c);if(k){let F=Q(a,k[1]),z=Q(a,k[2]),B=await mt(e,i),W=N=>F.has(N.subject)&&z.has(N.object),{DISJOINT_PREDICATE:C}=await Promise.resolve().then(()=>(Ft(),en)),I=N=>F.has(N.subject)||F.has(N.object)||z.has(N.subject)||z.has(N.object);return B.some(N=>N.predicate===C&&qs(N)&&I(N))?null:Pg(B.find(N=>qn.has(N.predicate)&&W(N)),B.find(N=>N.predicate===ri&&W(N)))}let y=ql(c),j=y.match(KE);if(j){let F=await mt(e,i),z=j[1],B=wg(j[2],j[3],F);if(B&&y!==bg(c)&&(B=gg(B)),B&&z)return{text:`I can't speak for ${z.trim()} ${j[2]} \u2014 what I remember is generic, not universal. ${B.text}.`,replace:!0};if(B)return B;let W=Q(a,j[2]),C=F.filter(I=>I.predicate==="mgx:capableOf"&&W.has(I.subject));if(C.length){let I=C.slice(0,3).map(ae).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${j[2]} can ${j[3]}. I do know: ${I}. If it's true, teach me: "a ${C[0].subject} can ${j[3]}".`,replace:!0,miss:!0}}return yg(j[2],j[3],F)}let E=c.match(YE);if(E){let F=Q(a,E[1]),z=Q(a,E[2]),B=new Set(["mgx:hasA","tmct:has"]),W=await Dl(e),C=q=>W.find(U=>B.has(U.predicate)&&q.has(U.subject)&&z.has(U.object)),I=C(F);if(I)return{text:`yes \u2014 ${ae(I)}`,replace:!0};let O=[{terms:F,chain:[]}],N=new Set;for(let q=0;q<4;q+=1){let U=[];for(let{terms:ie,chain:se}of O){let Y=W.filter(X=>qn.has(X.predicate)&&ie.has(X.subject)&&!N.has(X.object));for(let X of Y){if(N.has(X.object))continue;N.add(X.object);let oe=[...se,X],K=C(Q(a,X.object));if(K)return{text:`yes \u2014 ${[...oe.map(ae),ae(K)].join("; ")}`,replace:!0};U.push({terms:Q(a,X.object),chain:oe})}}if(!U.length)break;O=U}return null}let _=ql(c),R=_.match(tj);if(R){let F=await mt(e,i),z=!!R[1],B=Q(a,R[2]),W=Q(a,R[3]),C=wg(R[2],R[3],F);if(C&&_!==bg(c)&&(C=gg(C)),C&&z)return{text:`I can't speak for ${R[1].trim()} ${R[2]} \u2014 what I remember is generic, not universal. ${C.text}.`,replace:!0};if(C)return C;if(s){let I=F.filter(N=>N.predicate==="mgx:capableOf"&&B.has(N.subject));if(I.length){let N=I.slice(0,3).map(ae).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${R[2]} can ${R[3]}. I do know: ${N}. If it's true, teach me: "a ${I[0].subject} can ${R[3]}".`,replace:!0,miss:!0}}let O=yg(R[2],R[3],F);if(O)return O;if(!/\s/.test(R[2].trim())&&!F.some(N=>B.has(N.subject)||B.has(N.object))){let N=Kl(Wi(R[2]));return{text:`I can't confirm that \u2014 I don't know anything about "${R[2]}" yet. Teach me "a ${N} can ${R[3]}" (or "a ${N} cannot ${R[3]}") and I'll remember it.`,replace:!0,miss:!0}}}}let S=c.match(XE);if(S){let F=Q(a,S[1]),z=(await mt(e,i)).filter(N=>(N.predicate==="mgx:capableOf"||N.predicate===po)&&F.has(N.subject));if(!z.length)return null;let W=Ye(ln(z),o).map(ae),C=W.slice(0,je),I=W.slice(je),O=I.length?`
161
+ \u2026and ${I.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
162
+ `)+O,replace:!0,...I.length?{pending:{items:I,noun:"facts"}}:{}}}let A=c.match(oj);if(A){let F=Q(a,A[1]),z=Q(a,A[2]),B=await mt(e,i),W=ln(B.filter(C=>C.predicate==="mgx:capableOf"&&z.has(C.object))).filter(C=>ai(new Set([C.subject]),z,B).verdict==="yes");if(W.length){let{findIsaChain:C,SUBCLASS_PREDICATE:I,TYPE_PREDICATE:O}=await Promise.resolve().then(()=>(Ft(),en)),N=B.filter(J=>J.predicate===I),q=B.filter(J=>J.predicate===O),U=N.map(J=>[J.subject,J.object]),ie=q.map(J=>[J.subject,J.object]),se=J=>(J.predicate===I?N:q).find(xe=>xe.subject===J.subject&&xe.object===J.object),Y=new Map,X=W.filter(J=>F.has(J.subject)?!0:(Y.has(J.subject)||Y.set(J.subject,C(J.subject,F,ie,U,{maxHops:3})),!!Y.get(J.subject))),K=Ye(X.length?X:W,o).map(J=>{let xe=X.length?Y.get(J.subject):null;if(!xe||xe.length<2)return ae(J);let ge=xe.map(se);if(!ge.every(Boolean))return ae(J);let ve=ge.map(H=>`${Ct(H)}${H.provenance?` (source: ${H.provenance})`:""}`).join("; ");return`${ae(J)} \u2014 via: ${ve}`}),le=K.slice(0,je),te=K.slice(je),_e=te.length?`
163
+ \u2026and ${te.length} more \u2014 say 'more' to see them.`:"";return{text:(X.length?"":`nothing I remember ties these to "${A[1]}", but:
164
+ `)+le.join(`
165
+ `)+_e,replace:!0,...te.length?{pending:{items:te,noun:"facts"}}:{}}}}let M=c.match(sj);if(M&&M[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let F=Q(a,M[1]),z=(await mt(e,i)).filter(B=>B.predicate==="mgxneg:capableOf"&&F.has(B.object));if(z.length){let W=Ye(ln(z),o).map(ae),C=W.slice(0,je),I=W.slice(je),O=I.length?`
166
+ \u2026and ${I.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
167
+ `)+O,replace:!0,...I.length?{pending:{items:I,noun:"facts"}}:{}}}return{text:`nothing I remember says anything cannot ${M[1].trim()}.`,replace:!0,miss:!0}}let T=c.match(nj);if(T&&T[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let F=Q(a,T[1]),z=kc(F,await mt(e,i));if(z.length){let W=Ye(ln(z),o).map(ae),C=W.slice(0,je),I=W.slice(je),O=I.length?`
168
+ \u2026and ${I.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
169
+ `)+O,replace:!0,...I.length?{pending:{items:I,noun:"facts"}}:{}}}}let P=c.match(JE);if(P&&!fj.has(P[1].trim().split(/\s+/)[0]?.toLowerCase())){let F=Q(a,P[1]),z=(await mt(e,i)).filter(N=>N.predicate==="mgx:hasA"&&F.has(N.object));if(!z.length)return null;let W=Ye(ln(z),o).map(ae),C=W.slice(0,je),I=W.slice(je),O=I.length?`
170
+ \u2026and ${I.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
171
+ `)+O,replace:!0,...I.length?{pending:{items:I,noun:"facts"}}:{}}}let G=c.match(vg),Z=n?.parsed?.shape==="reverse"&&n.parsed.kind==="inherits"?n.parsed.object:G?.[1];if(Z){let F=Q(a,Z),z=(await mt(e,i)).filter(N=>qn.has(N.predicate)&&F.has(N.object));if(!z.length)return null;let W=Ye(ln(z),o).map(ae),C=W.slice(0,je),I=W.slice(je),O=I.length?`
172
+ \u2026and ${I.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
173
+ `)+O,replace:!0,...I.length?{pending:{items:I,noun:"facts"}}:{}}}let V=c.match(HE);if(V){let F=Q(a,V[1]),z=await mt(e,i),B=H=>!String(H.provenance||"").includes("corpus:")&&!String(H.provenance||"").includes("web:"),W=z.filter(H=>qn.has(H.predicate)&&B(H)),C=new Set,I=F;for(let H=0;H<8&&I.size;H+=1){let re=new Set;for(let ce of W)I.has(ce.object)&&!C.has(ce.subject)&&re.add(ce.subject);if(!re.size)break;for(let ce of re)C.add(ce);let fe=new Set;for(let ce of re)for(let wt of Q(a,ce))fe.add(wt);I=fe}let O=z.filter(H=>F.has(H.subject)||F.has(H.object)||C.has(H.subject));if(!O.length){let H=a(V[1]).split(/\s+/).filter(re=>re.length>=4&&!Fg.has(re));if(H.length){let re=ce=>new Set(String(ce||"").split(/\s+/)),fe=ce=>{let wt=re(ce);return H.some(Bt=>wt.has(Bt))};O=z.filter(ce=>fe(ce.subject)||fe(ce.object))}}if(O=O.filter(H=>!ug.has(H.predicate)),!O.length)return null;let{findConsistencyViolations:N,TYPE_PREDICATE:q,SUBCLASS_PREDICATE:U,DISJOINT_PREDICATE:ie}=await Promise.resolve().then(()=>(Ft(),en)),se=H=>!H.provenance?.includes("corpus:")&&!H.provenance?.includes("web:"),Y=z.filter(H=>H.predicate===q&&se(H)).map(H=>[H.subject,H.object]),X=z.filter(H=>H.predicate===U&&se(H)).map(H=>[H.subject,H.object]),oe=z.filter(H=>H.predicate===ie&&se(H)).map(H=>[H.subject,H.object]);if(oe.length){let re=N(Y,X,oe,{focus:F,budget:5}).find(fe=>F.has(fe.subject));if(re)return{text:`I can't answer that \u2014 what I've been told about ${re.subject} is inconsistent: it's taught to be both ${re.classA} and ${re.classB}, but ${re.viaA} and ${re.viaB} are disjoint (${re.viaA} owl:disjointWith ${re.viaB}). I'd need one of those retracted before I can answer honestly.`,replace:!0}}let K=O.find(H=>F.has(H.subject)||F.has(H.object)),le=K?F.has(K.subject)?K.subject:K.object:V[1].trim(),te=O.some(H=>C.has(H.subject)&&!F.has(H.subject)&&!F.has(H.object));O=Ye(O,o);let _e=`${O.length} remembered fact${O.length===1?"":"s"} about ${le}${te?" (including its known subtypes)":""}:`,{lines:Le,grouped:J}=pg(O,z,F,{indent:" "});if(J)return{...J,text:`${_e}
174
+ ${J.text}`};let xe=Le.slice(0,je),ge=Le.slice(je),ve=ge.length?`
175
+ \u2026and ${ge.length} more \u2014 say 'more' to see them.`:"";return{text:`${_e}
176
+ ${xe.join(`
177
+ `)}${ve}`,replace:!0,...ge.length?{pending:{items:ge.map(H=>H.trim()),noun:"facts"}}:{}}}return null}async function Ej(e,t){let n=await Sr(e,t);if(!n)return null;let s=(e?.byId?.get?.(n.id)||(e?.individuals||[]).find(o=>o?.id===n.id))?.class;return s&&ag[s]?ag[s][0]:null}function Ui(e,t){let n=[];if(!e||!t)return n;let s=new Set([t]),o=t;for(let i=0;i<_j;i+=1){let r=null;for(let a of e.relations||[])if(jj.test(`${a?.prop||""} ${a?.predicate||""}`)&&(r=(a.edges||[]).find(l=>l?.subject===o)||null,r))break;if(!r||s.has(r.object))break;s.add(r.object),n.push({id:r.object,label:r.objectLabel||r.object}),o=r.object}return n}async function qg(e,t,n,s,o=null,i=null,r={},a=null){return Wg(await Rj(e,t,n,s,o,i,r,a),n,t)}async function Rj(e,t,n,s,o=null,i=null,r={},a=null){if(!s)return null;let l;try{({normFactTerm:l}=await Promise.resolve().then(()=>(Ge(),cs)))}catch{return null}let c=String(t).trim();if(o){let C=c.match(ds);if(C){let I=await Sr(o,C[1]);if(I){let O=Q(l,Xt(C[2])),N=Ui(o,I.id).find(U=>[...Q(l,U.label)].some(ie=>O.has(ie)));if(N)return{text:`yes \u2014 the code graph says ${I.label} inherits ${N.label}.`,replace:!0};let q=await Sr(o,Xt(C[2]));if(q&&Ui(o,q.id).some(U=>U.id===I.id))return{text:`I can't confirm that \u2014 the code graph's stored direction runs the other way: ${q.label} inherits ${I.label}. An inheritance doesn't reverse.`,replace:!0,miss:!0}}}}let u=c.replace(/^(?:actually|really|honestly|yeah\s+nah)\s*,?\s+/i,""),d=await mt(e,a);if(!d.length){if(!ds.test(u)&&!Bl.test(u)){let I=u.match(xg);if(I){let O=I[1].trim(),N=Wn.test(O)?i||null:O;if(N&&!/^there\b/i.test(N)&&!n?.parsed&&!Sg.test(O)&&!kg.test(O)&&!lg.test(I[2].trim()))return Eg(N,I[2].trim().toLowerCase())}}let C=u.match(ds)||Ul(c);if(!(C&&!/^there\b/i.test(C[1].trim())||mg.test(c)))return null}let m=d.filter(C=>qn.has(C.predicate)),p=(C,I)=>I.trust-C.trust,f=C=>{let I=C.map(ae),O=I.slice(0,je),N=I.slice(je),q=N.length?`
178
+ \u2026and ${N.length} more \u2014 say 'more' to see them.`:"";return{text:O.join(`
179
+ `)+q,replace:!0,...N.length?{pending:{items:N,noun:"facts"}}:{}}};if(Sj.test(c)){let C=Ye(m.length?m:d,r);return C.length?f(C):null}let g=u.match(Bl);if(g){let C=g[1].trim(),I=Wn.test(C)?i||null:C,O=g[2].trim().toLowerCase(),N=g[3].trim();if(I&&!Wl.has(O)){let q=Il(d),{findIsaChain:U}=await Promise.resolve().then(()=>(Ft(),en)),ie=Le=>{let J=String(Le||"").trim().toLowerCase(),xe=[];for(let ge of d){let ve=Fl(ge.predicate);if(!ve)continue;if(ve===J){xe.push({fact:ge,aliasFacts:[]});continue}let H=Ol(U,ve,new Set([J]),q,{maxHops:2});if(!H)continue;let re=H.map(fe=>d.find(ce=>ce.predicate===Er&&ce.subject===fe.subject&&ce.object===fe.object));re.every(Boolean)&&xe.push({fact:ge,aliasFacts:re})}return xe},{loadMemory:se,findRuleByName:Y,resolveRelationChase:X}=await Promise.resolve().then(()=>(Ge(),cs)),{findActionPath:oe}=await Promise.resolve().then(()=>(Ss(),Mr)),K=await se(e),te=await X(K,O,I,N,{relationFactsFor:ie,renderFactLine:ae,factPhrase:Ct,factTermVariants:Q,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:Cl,findActionPath:oe});return te?{text:`yes \u2014 ${te.citation.join("; ")}`,replace:!0}:ie(O).length>0||!!Y(K,O)?{text:`I know the '${O}' relation, but I can't confirm ${I} is the ${O} of ${N} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${O}' yet.`,replace:!0}}}let h=qi(u).match(Dg)||zg(u,C=>{let I=Q(l,C);return d.some(O=>I.has(O.subject)||I.has(O.object))});if(h){let C=h[1].trim().toLowerCase(),I=h[2].trim(),O=Wn.test(I)?i||null:I;if(O&&!Wl.has(C)){let N=Il(d),{findIsaChain:q}=await Promise.resolve().then(()=>(Ft(),en)),U=Le=>{let J=String(Le||"").trim().toLowerCase(),xe=[];for(let ge of d){let ve=Fl(ge.predicate);if(!ve)continue;if(ve===J){xe.push({fact:ge,aliasFacts:[]});continue}let H=Ol(q,ve,new Set([J]),N,{maxHops:2});if(!H)continue;let re=H.map(fe=>d.find(ce=>ce.predicate===Er&&ce.subject===fe.subject&&ce.object===fe.object));re.every(Boolean)&&xe.push({fact:ge,aliasFacts:re})}return xe},{loadMemory:ie,findRuleByName:se,resolveRelationChaseReverse:Y}=await Promise.resolve().then(()=>(Ge(),cs)),X=await ie(e),{findReachableSet:oe}=await Promise.resolve().then(()=>(Ss(),Mr)),le=await Y(X,C,O,{relationFactsFor:U,renderFactLine:ae,factPhrase:Ct,factTermVariants:Q,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:Cl,findReachableSet:oe});return le.length?{text:le.map(J=>`${J.subject} \u2014 ${J.citation.join("; ")}`).join(`
180
+ `),replace:!0}:U(C).length>0||!!se(X,C)?{text:/^what\b/i.test(qi(u))?`I don't know what the ${C} of ${O} is from what you've told me.`:`I don't know anyone who is the ${C} of ${O} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${C}' yet.`,replace:!0}}}{let C=u.match(Aj);if(C){let I=Q(l,C[1]),O=Ye(d.filter(N=>I.has(N.subject)||I.has(N.object)),r);if(O.length){let N=O.map(ae),q=N.slice(0,je),U=N.slice(je),ie=U.length?`
181
+ \u2026and ${U.length} more \u2014 say 'more' to see them.`:"";return{text:q.join(`
182
+ `)+ie,replace:!0,...U.length?{pending:{items:U,noun:"facts"}}:{}}}}}let b=u.match(WE);if(b){let C=Kl(b[1].trim().toLowerCase()),I=b[2].trim(),O=Wn.test(I)?i||null:I;if(O){let{loadMemory:N,findRuleByName:q,RULE_KIND_PROP:U,RULE_KIND_RECURSIVE:ie}=await Promise.resolve().then(()=>(Ge(),cs)),se=await N(e),Y=q(se,C),X=Y?.attributes?.find(oe=>oe.prop===U)?.value;if(Y&&X===ie){let oe=Y.attributes.find(te=>te.prop==="mgx:ruleBaseCase")?.value,K=Y.attributes.find(te=>te.prop==="mgx:ruleRecStep")?.value,le=l(O);if(oe&&K&&le){let te=Il(d),{findIsaChain:_e}=await Promise.resolve().then(()=>(Ft(),en)),Le=H=>{let re=String(H||"").trim().toLowerCase(),fe=[];for(let ce of d){let wt=Fl(ce.predicate);if(!wt)continue;if(wt===re){fe.push({fact:ce,aliasFacts:[]});continue}let Bt=Ol(_e,wt,new Set([re]),te,{maxHops:2});if(!Bt)continue;let Qe=Bt.map(un=>d.find(Kt=>Kt.predicate===Er&&Kt.subject===un.subject&&Kt.object===un.object));Qe.every(Boolean)&&fe.push({fact:ce,aliasFacts:Qe})}return fe},{findReachableSet:J}=await Promise.resolve().then(()=>(Ss(),Mr)),ve=J({entity:le,hop:0},H=>{let re=H.hop===0?oe:K;return Le(re).filter(fe=>fe.fact.subject===H.entity).map(fe=>({action:fe,nextState:{entity:fe.fact.object,hop:H.hop+1}}))},{maxDepth:20,stateKey:H=>H.entity});if(ve.length)return{text:ve.map(({node:re,path:fe})=>{let ce=new Set,wt=[];for(let Bt of fe.actions){wt.push(ae(Bt.fact));for(let Qe of Bt.aliasFacts){let un=Qe.id||`${Qe.subject}|${Qe.predicate}|${Qe.object}`;ce.has(un)||(ce.add(un),wt.push(`${Ct(Qe)}${Qe.provenance?` (source: ${Qe.provenance})`:""}`))}}return`${re.entity} \u2014 ${wt.join("; ")}`}).join(`
183
+ `),replace:!0}}}return null}}let w=c.match(mg),v=c.match(ds)||Ul(c)||w&&`is ${w[1].trim()} a ${w[2].trim()}`.match(ds);if(v){let C=Q(l,Xt(v[2])),I=i&&Wn.test(v[1].trim())?i:v[1],O=new Set(Q(l,I));if([...O].some(D=>C.has(D))){let D=Xt(v[2]).trim();return{text:`yes \u2014 ${Ro(D)} ${D} is ${Ro(D)} ${D}, trivially: every kind is a kind of itself.`,replace:!0}}let N=await Ej(o,I);if(N)for(let D of Q(l,N))O.add(D);let{findIsaChain:q,deriveDisjointViolations:U,SUBCLASS_PREDICATE:ie,TYPE_PREDICATE:se,DISJOINT_PREDICATE:Y}=await Promise.resolve().then(()=>(Ft(),en)),X=qs,oe=m.filter(D=>D.predicate===ie&&X(D)),K=m.filter(D=>D.predicate===se&&X(D)),le=oe.map(D=>[D.subject,D.object]),te=K.map(D=>[D.subject,D.object]),_e=m.filter(D=>D.predicate===ie),Le=m.filter(D=>D.predicate===se),J=Le.map(D=>[D.subject,D.object]),xe=_e.map(D=>[D.subject,D.object]),ge=d.filter(D=>D.predicate===Y&&X(D)),ve=ge.map(D=>[D.subject,D.object]),H=ge.length?U(J.concat(xe),xe,ve,{budget:20,focus:new Set([...O,...C])}):[],re=D=>{let be=H.find(Ne=>Ne.subject===D&&C.has(Ne.object));if(!be)return null;let we=m.filter(Ne=>C.has(Ne.object)&&(Ne.subject===be.viaClass||Ne.subject===be.subject)).sort(p)[0],Ee=ge.find(Ne=>Ne.subject===be.viaClass&&Ne.object===be.object||Ne.subject===be.object&&Ne.object===be.viaClass);return!we||!Ee?null:ME(we,Ee)},fe=m.filter(D=>O.has(D.subject)&&C.has(D.object)).sort(p)[0],ce=d.filter(D=>D.predicate===ri&&O.has(D.subject)&&C.has(D.object)).sort(p)[0],wt=ge.find(D=>O.has(D.subject)&&C.has(D.object)||O.has(D.object)&&C.has(D.subject));if(fe&&!ce){let D=re(fe.subject);if(D)return D}let Bt=Pg(fe,ce||wt);if(Bt)return Bt;if(ge.length){let D=Ee=>{let Ne=new Set(Ee),_t=new Set(Ee);for(let Te=0;Te<8&&_t.size;Te+=1){let ye=new Set;for(let[Ze,fs]of xe)_t.has(Ze)&&!Ne.has(fs)&&ye.add(fs);if(!ye.size)break;for(let Ze of ye)Ne.add(Ze);_t=ye}return Ne},be=D(C),we=H.find(Ee=>O.has(Ee.subject)&&be.has(Ee.object)&&!D([Ee.viaClass]).has(Ee.object)&&!D([Ee.object]).has(Ee.viaClass));if(we){let Ee=m.filter(ye=>O.has(ye.subject)&&ye.object===we.viaClass).sort(p)[0],Ne=ge.find(ye=>ye.subject===we.viaClass&&ye.object===we.object||ye.subject===we.object&&ye.object===we.viaClass),_t=!C.has(we.object),Te=_t?m.filter(ye=>C.has(ye.subject)&&ye.object===we.object).sort(p)[0]:null;if(Ee&&Ne&&(!_t||Te)){let ye=Xt(v[2]).trim();return{text:`no \u2014 ${[Ee,...Te?[Te]:[]].map(ae).join("; ")}; and ${Ct(Ne)}${Ne.provenance?` (source: ${Ne.provenance})`:""} \u2014 so ${I} can never be ${Ro(ye)} ${ye}.`,replace:!0}}}}let Qe=await Sr(o,I);if(Qe){let D=new Map;for(let we of Ui(o,Qe.id))for(let Ee of Q(l,we.label))!O.has(Ee)&&!D.has(Ee)&&D.set(Ee,we.label);let be=m.filter(we=>D.has(we.subject)&&C.has(we.object)).sort(p)[0];if(be)return{text:`yes \u2014 the code graph says ${Qe.label} inherits ${D.get(be.subject)}, and ${ae(be)}`,replace:!0}}let un=D=>(D.predicate===ie?oe:K).find(be=>be.subject===D.subject&&be.object===D.object);for(let D of O){let be=q(D,C,te,le,{maxHops:2});if(!be)continue;let we=re(D);if(we)return we;let Ee=be.map(un);if(Ee.every(Boolean))return{text:`yes \u2014 ${zi(Ee)}`,replace:!0}}let Kt=D=>(D.predicate===ie?_e:Le).find(be=>be.subject===D.subject&&be.object===D.object);for(let D of O){let be=q(D,C,J,xe,{maxHops:2});if(!be)continue;let we=re(D);if(we)return we;let Ee=be.map(Kt);if(Ee.every(Boolean)&&Ee.some(X))return{text:`yes \u2014 ${zi(Ee)}`,replace:!0}}let Ut=I.match(/^(.*\S)\s+not$/i),It=Ut&&[Ut[0],i&&Wn.test(Ut[1].trim())?i:Ut[1]];if(It){let D=Q(l,It[1]),be=C,we=m.filter(Te=>D.has(Te.subject)&&be.has(Te.object)).sort(p)[0];if(we)return{text:`no \u2014 ${ae(we)}`,replace:!0};let Ee=ge.find(Te=>D.has(Te.subject)&&be.has(Te.object)||D.has(Te.object)&&be.has(Te.subject));if(Ee)return{text:`yes \u2014 ${ae(Ee)}`,replace:!0};let Ne=It[1].trim(),_t=Xt(v[2]).trim();return{text:`I can't confirm that either way \u2014 nothing I remember links ${Ne} and ${_t}. If no ${Ne} is a ${_t}, teach me: "no ${Ne} is a ${_t}".`,replace:!0,miss:!0}}if(ge.length){let D=U(te.concat(le),le,ve,{budget:10});for(let be of O){let we=D.find(Te=>Te.subject===be&&C.has(Te.object));if(!we)continue;let Ee=K.concat(oe).find(Te=>Te.subject===we.subject&&Te.object===we.viaType),Ne=ge.find(Te=>Te.subject===we.viaClass&&Te.object===we.object||Te.subject===we.object&&Te.object===we.viaClass),_t=[Ee,Ne].filter(Boolean).map(ae);return{text:`no \u2014 ${_t.length?_t.join("; "):`${we.viaClass} and ${we.object} are disjoint.`}`,replace:!0}}}let{deriveSomeValuesFromApplication:_r,ON_PROPERTY_PREDICATE:x,SOME_VALUES_FROM_PREDICATE:ue,deriveSomeValuesFromSubsumption:Re,ENTAILED_SCM_SVF_PROVENANCE:Sn,SCM_SVF_RULE_CONFIDENCE:Hs,entailedTrustFrom:Zl}=await Promise.resolve().then(()=>(Ft(),en)),eu=d.filter(D=>D.predicate===x&&X(D)),tu=d.filter(D=>D.predicate===ue&&X(D));if(eu.length&&tu.length){let D=new Map(tu.map(ye=>[ye.subject,ye.object])),be=eu.map(ye=>({restriction:ye.subject,property:ye.object,target:D.get(ye.subject)})).filter(ye=>ye.target),we=new Set([ie,se,Y,x,ue,"owl:intersectionOf"]),Ee=d.filter(ye=>X(ye)&&!we.has(ye.predicate)),Ne=Ee.map(ye=>[ye.subject,ye.predicate,ye.object]),_t=_r(Ne,te,le,be,{budget:10});for(let ye of O){let Ze=_t.find(on=>on.subject===ye&&C.has(on.object));if(!Ze)continue;let fs=Ee.find(on=>on.subject===Ze.subject&&on.predicate===Ze.viaProperty&&on.object===Ze.viaValue),ms=K.find(on=>on.subject===Ze.viaValue&&on.object===Ze.viaType),Co=[fs,ms].filter(Boolean).map(ae);return{text:`yes \u2014 ${Co.length?Co.join("; "):`${Ze.subject} ${Ze.viaProperty} ${Ze.viaValue}, and ${Ze.viaValue} is a ${Ze.viaType}.`}`,replace:!0}}let Te=be.length>1?Re(be,le,{budget:10}):[];if(Te.length){let ye=le.concat(Te.map(ke=>[ke.subject,ke.object])),Ze=new Map(be.map(ke=>[ke.restriction,ke])),fs=new Map;for(let ke of d)fs.set(`${ke.subject}\0${ke.predicate}\0${ke.object}`,ke.trust);let ms=(ke,dn,Ot)=>fs.get(`${ke}\0${dn}\0${Ot}`),Co=new Map;for(let ke of Te){let dn=Ze.get(ke.subject),Ot=Ze.get(ke.object),Wt=[dn&&ms(ke.subject,x,dn.property),ms(ke.subject,ue,ke.viaY1),Ot&&ms(ke.object,x,Ot.property),ms(ke.object,ue,ke.viaY2),ms(ke.viaY1,ie,ke.viaY2)].filter(lb=>typeof lb=="number"),Ar=Zl(Wt,Hs);Ar!==null&&Co.set(`${ke.subject}\0${ke.object}`,Ar)}let on=ke=>{if(ke.predicate!==ie)return K.find(Wt=>Wt.subject===ke.subject&&Wt.object===ke.object);let dn=oe.find(Wt=>Wt.subject===ke.subject&&Wt.object===ke.object);if(dn)return dn;let Ot=Te.find(Wt=>Wt.subject===ke.subject&&Wt.object===ke.object);return Ot?{subject:Ot.subject,predicate:ie,object:Ot.object,provenance:Sn,trust:Co.get(`${Ot.subject}\0${Ot.object}`)}:void 0};for(let ke of O){let dn=q(ke,C,te,ye,{maxHops:3});if(!dn)continue;let Ot=dn.map(on);if(Ot.every(Boolean)){let Wt=Zl(Ot.map(Ar=>Ar.trust),1);return{text:`yes \u2014 ${zi(Ot)}`,replace:!0,...Wt!==null?{trust:Wt}:{}}}}}}let ab=Q(l,I),nu=m.filter(D=>ab.has(D.subject)).sort(p),ps=I.trim(),Rr=Xt(v[2]).trim(),cb=[...O].some(D=>q(D,C,te,le,{maxHops:qE}));if(nu.length){let D=nu.slice(0,3).map(ae).join("; "),be=cb?`The facts to settle it are here, but the chain is longer than I follow while answering. Run "/syllogise ${ps}", then ask me again.`:`If it's true, teach me: "${ps} is a kind of ${Rr}".`;return{text:`I can't confirm that \u2014 nothing I remember says ${ps} is a ${Rr}. I do know: ${D}. ${be}`,replace:!0,miss:!0}}let su=m.filter(D=>O.has(D.object)&&C.has(D.subject)).sort(p)[0];return su?{text:`I can't confirm that \u2014 what I know runs the other way: ${ae(su)}. A kind doesn't reverse. If it's true, teach me: "every ${ps} is a ${Rr}".`,replace:!0,miss:!0}:!Qe&&!N&&!bE(ps)&&!d.some(D=>O.has(D.subject)||O.has(D.object))?{text:`I can't confirm that \u2014 I don't know "${ps}" at all yet. If it's true, teach me: "${ps} is a kind of ${Rr}".`,replace:!0,miss:!0}:null}let $=c.match(bj);if($){let[,C,I,O]=$,{SUBCLASS_PREDICATE:N,ON_PROPERTY_PREDICATE:q,buildCardinalityRestrictions:U,proveCardinalityAtLeast:ie,CARDINALITY_RULE_CONFIDENCE:se,entailedTrustFrom:Y}=await Promise.resolve().then(()=>(Ft(),en)),X=qs,oe=m.filter(te=>te.predicate===N&&X(te)).map(te=>[te.subject,te.object]),K=d.filter(te=>(te.predicate===q||$g.has(te.predicate))&&X(te)),le=U(K);if(le.length){let te=Q(l,C.trim()),_e=Q(l,O.trim()),Le=Number(I),J=fg(te,_e,(xe,ge)=>ie(oe,le,xe,ge,Le,{}));if(J){let xe=d.find(ce=>ce.predicate===N&&ce.subject===J.viaClass&&ce.object===J.viaRestriction),ge=xe?.provenance?` (source: ${xe.provenance})`:"",ve=J.kind==="exactly"?"exactly":"at least",H=(ce,wt)=>`${ce}${wt===1?"":"s"}`,re=[xe?.trust,...K.filter(ce=>ce.subject===J.viaRestriction).map(ce=>ce.trust),...J.viaClass!==J.subject?[m.find(ce=>ce.predicate===N&&ce.subject===J.subject&&ce.object===J.viaClass)?.trust]:[]].filter(ce=>typeof ce=="number"),fe=Y(re,se);return{text:`yes \u2014 every ${J.viaClass} has ${ve} ${J.n} ${H(J.object,J.n)}${ge}, so at least ${Le} follows.`,replace:!0,...fe!==null?{trust:fe}:{}}}}}let k=c.match(wj);if(k){let[,C,I]=k,{SUBCLASS_PREDICATE:O,ON_PROPERTY_PREDICATE:N,buildCardinalityRestrictions:q,proveMaxCardinalityZeroDenial:U,CAX_MAXC0_RULE_CONFIDENCE:ie,entailedTrustFrom:se}=await Promise.resolve().then(()=>(Ft(),en)),Y=qs,X=m.filter(le=>le.predicate===O&&Y(le)).map(le=>[le.subject,le.object]),oe=d.filter(le=>(le.predicate===N||$g.has(le.predicate))&&Y(le)),K=q(oe);if(K.length){let le=Q(l,C.trim()),te=Q(l,I.trim()),_e=fg(le,te,(Le,J)=>U(X,K,Le,J,{}));if(_e){let Le=d.find(ve=>ve.predicate===O&&ve.subject===_e.viaClass&&ve.object===_e.viaRestriction),J=Le?.provenance?` (source: ${Le.provenance})`:"",xe=[Le?.trust,...oe.filter(ve=>ve.subject===_e.viaRestriction).map(ve=>ve.trust),..._e.viaClass!==_e.subject?[m.find(ve=>ve.predicate===O&&ve.subject===_e.subject&&ve.object===_e.viaClass)?.trust]:[]].filter(ve=>typeof ve=="number"),ge=se(xe,ie);return{text:`no \u2014 every ${_e.viaClass} has at most 0 ${_e.object}${J}.`,replace:!0,...ge!==null?{trust:ge}:{}}}}}let y=c.match(yj);if(y){let C=Q(l,y[1]),I=d.filter(O=>O.predicate===Tl&&C.has(O.subject)).sort(p);return I.length?f(I):null}let j=u.match(vj);if(j){let[,C,I]=j,O=Q(l,C.trim()),N=Q(l,I.replace(/^an?\s+/i,"").trim()),q=d.filter(U=>U.predicate===Tl&&N.has(U.subject)&&O.has(U.object)).sort(p)[0];return q?{text:`yes \u2014 ${ae(q)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${C.trim().toLowerCase()} owns/maintains ${I.trim()}.`,replace:!0}}let E=u.match($j);if(E){let[,C,I]=E,O=Q(l,C.replace(/^an?\s+/i,"").trim()),N=Q(l,I.trim()),q=d.filter(U=>U.predicate===Tl&&O.has(U.subject)&&N.has(U.object)).sort(p)[0];return q?{text:`yes \u2014 ${ae(q)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${C.trim().toLowerCase()} is owned by ${I.trim()}.`,replace:!0}}let _=u.match(xj);if(_){let[,C,I]=_,O=Q(l,C.trim()),N=Q(l,`${I.trim()} method`),q=d.filter(U=>U.predicate===Ps&&O.has(U.subject)&&N.has(U.object)).sort(p)[0];return q?{text:`yes \u2014 ${ae(q)}`,replace:!0}:null}let R=u.match(kj);if(R){let C=Q(l,R[1].trim()),I=d.filter(O=>O.predicate===Ps&&C.has(O.subject)&&/ method$/.test(O.object)).sort(p);return I.length?f(I):null}let S=u.match(xg);if(S){let C=S[1].trim(),I=Sg.test(C)||kg.test(C)?null:Wn.test(C)?i||null:C,O=S[2].trim().toLowerCase();if(I){let N=Q(l,I),q=new Map,U=null;if(o){let K=await Sr(o,I);if(U=K,K)for(let le of Ui(o,K.id))for(let te of Q(l,le.label))!N.has(te)&&!q.has(te)&&q.set(te,le.label),N.add(te)}let ie=K=>K.predicate===Cl&&l(K.object)===O||K.predicate===`tmct:${O}`&&K.object==="true",se=l(I).split(/\s+/).filter(K=>K.length>=4&&!Fg.has(K)),Y=K=>se.some(le=>new Set(String(K.subject||"").split(/\s+/)).has(le)),X=K=>N.has(K.subject)||se.length&&Y(K),oe=d.filter(K=>X(K)&&ie(K)).sort(p)[0];if(oe){let K=q.get(oe.subject);return{text:K?`yes \u2014 the code graph says ${U.label} inherits ${K}, and ${ae(oe)}`:`yes \u2014 ${ae(oe)}`,replace:!0}}{let{findIsaChain:K,SUBCLASS_PREDICATE:le,TYPE_PREDICATE:te}=await Promise.resolve().then(()=>(Ft(),en)),_e=qs,Le=d.filter(re=>re.predicate===le&&_e(re)),J=d.filter(re=>re.predicate===te&&_e(re)),xe=Le.map(re=>[re.subject,re.object]),ge=J.map(re=>[re.subject,re.object]),ve=re=>(re.predicate===le?Le:J).find(fe=>fe.subject===re.subject&&fe.object===re.object),H=Q(l,O);for(let re of N){let fe=K(re,H,ge,xe,{maxHops:2});if(!fe)continue;let ce=fe.map(ve);if(ce.every(Boolean))return{text:`yes \u2014 ${zi(ce)}`,replace:!0}}}if(d.some(X)&&!n?.parsed)return{text:`I don't have a fact saying ${FE(I)} is ${O}.`,replace:!0};if(!n?.parsed&&!lg.test(O))return Eg(I,O)}}let A=ql(c).match(SE);if(A&&!Nl.test(c)){let[,C,I,O]=A,N=I.toLowerCase();if(!Ll.test(N)&&!Pl.test(N)){let q=C.trim(),U=_E(await Ml(N),O),ie=U.object.replace(/^an?\s+/i,"").trim();if(q&&ie){let se=U.predicate,Y=Q(l,q),X=Q(l,ie),oe=[se,mo(se)],K=d.filter(te=>oe.includes(te.predicate)&&Y.has(te.subject)&&X.has(te.object)).sort(p)[0];if(K)return{text:`${yf(K.predicate)?"no":"yes"} \u2014 ${ae(K)}`,replace:!0,generalVerbQuery:!0};let le=d.filter(te=>oe.includes(te.predicate)&&Y.has(te.subject));if(le.length){let te=le.slice(0,3).map(ae).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${Ct({subject:q,predicate:se,object:ie})}. I do know: ${te}.`,replace:!0,miss:!0}}return null}}}let M=c.match(EE);if(M&&!Nl.test(c)){let[,C,I]=M,[O,N]=I.toLowerCase().split(/\s+/);if(!Ll.test(O)&&!Pl.test(O)){let q=C.trim();if(q){let U=await Ml(O);N&&/^mgx:[a-z]+$/.test(U)&&(U=`${U}-${N}`);let ie=Q(l,q),se=[U,mo(U)],Y=Ye(d.filter(X=>se.includes(X.predicate)&&ie.has(X.subject)),r);if(Y.length)return{...f(Y),generalVerbQuery:!0}}}}let T=c.match(/^(?:what|who)\s+([a-z]+)\s+(on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside)\s+(.+?)[?.!\s]*$/i);if(T&&!Nl.test(c)){let[,C,I,O]=T,N=C.toLowerCase();if(!Ll.test(N)&&!Pl.test(N)&&!kE.test(N)){let q=await Ml(N);/^mgx:[a-z]+$/.test(q)&&(q=`${q}-${I.toLowerCase()}`);let U=Q(l,O.replace(/^(?:an?|the)\s+/i,"").trim()),ie=Ye(d.filter(se=>se.predicate===q&&U.has(se.object)),r);if(ie.length)return{...f(ie),generalVerbQuery:!0}}}let P=c.match(hj);if(P){let C=Q(l,P[1]),I=Ye(d.filter(se=>C.has(se.subject)||C.has(se.object)),r);if(!I.length)return null;let O=C.has(I[0].subject)?I[0].subject:I[0].object,N=I.map(se=>` ${ae(se)}`),q=N.slice(0,je),U=N.slice(je),ie=U.length?`
184
+ \u2026and ${U.length} more \u2014 say 'more' to see them.`:"";return{text:`${I.length} remembered fact${I.length===1?"":"s"} about ${O}:
185
185
  ${q.join(`
186
- `)}${X}`,replace:!0,...K.length?{pending:{items:K.map(H=>H.trim()),noun:"facts"}}:{}}}let V=n?.parsed?.shape==="meta"?n.parsed.object:null,Y=!1,M=c.match(VS);if(M)V=M[1],Y=!0;else if(!V&&!n?.parsed){let _=c.match(/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i);_&&(V=_[1])}if(!V)return null;let F=J(l,V),W=Ye(m.filter(_=>F.has(_.subject)),i),U=Ye(m.filter(_=>F.has(_.object)),i),B=Y?W.length?W:U:U.length?U:W;return B.length?f(B):null}var Ol,HE,nn,Ti,Jh,bg,FD,Qh,KE,DD,zD,wg,yg,vg,YE,Zh,UD,BD,WD,qD,GD,Nl,VD,XE,qe,wl,yl,vr,JE,Ws,HD,KD,YD,XD,JD,QD,ZD,ez,tz,nz,sz,oz,rz,iz,az,eg,Mi,QE,cz,lz,Pl,$g,uz,dz,pz,xl,kl,ZE,fz,eS,tS,Sl,nS,xg,kg,oS,mz,hz,gz,bz,Fl,wz,yz,vz,Eg,$z,xz,rS,kz,Ez,Sz,_o,tg,Dl,Ct,aS,lS,uS,Ii,hS,Rg,jz,Al,Ag,gS,bS,Ni,wS,yS,ds,Wn,vS,$S,xS,Cl,rg,kS,_e,ES,SS,jS,_S,RS,AS,ig,TS,CS,IS,OS,LS,cg,Cg,MS,PS,DS,zS,US,BS,dg,WS,GS,VS,HS,KS,pg,YS,XS,JS,QS,ZS,fg,us,mg,hg,ej,nj,sj,_z,Ng,rj,Rz,gg,ij,Az,Tz,Mg,Cz,Iz,Oz,Lz,Nz,Pi,Mz,Pz,Fz,Dz,aj,zz,Uz,bl=L(()=>{De();Fm();Lt();Ce();ns();Yc();ki();Mo();Xc();Um();Ke();dc();Qc();Vm();An();Yn();qo();Gc();Vc();Hc();Uo();ko();Xm();Si();Qm();Zm();nl();eh();sl();th();nh();ih();Uc();_h();Ch();Eo();Vh();zr(void 0);$i(xi);Ol=new Set(["it","this","that","here"]),HE=e=>Ol.has(String(e||"").trim().toLowerCase()),nn={imports:"understand a dependency/import relationship",uses:"understand a dependency/usage relationship (imports and/or calls)",calls:"understand a call relationship",callsSymbol:"understand a call relationship",defines:"locate what a module/class defines",contains:"understand class membership (methods/attributes)",tests:"assess test coverage",inherits:"understand a class hierarchy/inheritance relationship",touches:"understand commit/change history",touchesSymbol:"understand commit/change history",cochange:"understand change-coupling between modules",reexports:"understand a module's public exports/API surface"},Ti=e=>e?`${String(e).toLowerCase()}(s)`:"entities",Jh="look up a taught fact about a subject/verb/object";bg={find:{tool:"tmct_search",arg:"query",help:"lexical search across the graph"},search:{tool:"tmct_search",arg:"query",help:"alias of /find"},context:{tool:"tmct_context",arg:"symbol",help:"the sized edit bundle for a symbol (start here to change code)"},snippet:{tool:"tmct_snippet",arg:"symbol",help:"exact source of one function/class/method"},describe:{tool:"tmct_describe",arg:"symbol",help:"a symbol's definition, kind and relations"},signature:{tool:"tmct_signature",arg:"symbol",help:"a symbol's signature only"},members:{tool:"tmct_members",arg:"class",help:"the methods/attributes of a class"},subclasses:{tool:"tmct_subclasses",arg:"class",help:"the subclasses of a class"},impact:{tool:"tmct_impact",arg:"module",help:"what a change to this module or symbol reaches (impact closure)"},callers:{tool:"tmct_callers",arg:"symbol",help:"functions that call this symbol"},callees:{tool:"tmct_callees",arg:"symbol",help:"functions this symbol calls"},tests:{tool:"tmct_tests_for",arg:"symbol",help:"the tests covering this symbol"},untested:{tool:"tmct_untested",arg:null,help:"symbols with no covering test"},history:{tool:"tmct_history",arg:"symbol",help:"the commit history of this symbol"},exports:{tool:"tmct_exports",arg:"module",help:"a module's public exports"},arch:{tool:"tmct_architecture",arg:"package",help:"the architecture overview (optional package filter)",optional:!0}},FD=new Set(["stats","memory","focus",...Object.keys(bg)]),Qh={Class:["class","classes"],Function:["function","functions"],Module:["module","modules"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"],Session:["session","sessions"]},KE=new Set(["have","has","holds","hold"]),DD=new RegExp(`\\b(?:${[...Object.keys(pe),...Object.keys(qn)].filter(e=>!KE.has(e)).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})\\b`,"i"),zD=new Set([...Pm.map(e=>e.name),...Object.values(bg).map(e=>e.tool)]),wg=new Set(["hi","hello","hey","yo","hiya","howdy","sup","greetings","g'day","gday","hey there","hi there","hello there","good morning","good afternoon","good evening","morning","alright","you alright","alright mate","morning all","yeah nah","hey y'all","howdy there","hiya there","good day","good day to you","salutations","good to meet you","pleased to meet you","yo yo","ayy","wassup","sup fam","heya","hiya!","gm","ge"]),yg=new Set(["thanks","thank you","thankyou","thx","ty","ta","cheers","nice one","much appreciated","cool thanks","many thanks","much obliged","ta very much","cheers mate","cheers for that","tks","sweet thanks","nice","brilliant","ta for that","cheers, that's everything for now, thanks","that's everything for now, thanks","that's all for now, thanks"]),vg=new Set(["bye","goodbye","quit","exit","see ya","see you","cya","later","farewell","peace","peace out","im off","i'm off","gtg","gotta go","catch you later","farewell then","gtg thx"]),YE=new Set(["ok","okay","cool","aight","fair enough","got it","gotcha","noted","sounds good","sure","cool cool","right","haha ok fair enough"]),Zh=e=>e.replace(/(.)\1+/g,"$1");UD=Ll(wg),BD=Ll(yg),WD=Ll(vg),qD=new RegExp(`^(?:${[...YE].map(Ve).join("|")})\\s+(.+)$`,"i"),GD=[...wg,...yg,...vg,"what can you do","what do you do","help","how do you work","who are you","what are you","what is your name"],Nl="(?:[a-z]+er|better|worse|(?:more|less)\\s+[a-z]+)",VD=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are)\\s+(${Nl})\\s+than\\s+(.+)$`,"i"),XE=new RegExp(`^(?:is|are)\\s+(.+?)\\s+(${Nl})\\s+than\\s+(.+?)[?.!\\s]*$`,"i"),qe="on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside",wl="mgx:ownedBy",yl="mgx:hasProperty",vr="rdfs:subClassOf",JE=new Set(["operator","teach","entailed"]),Ws=e=>!!e.sourceTypes?.some(t=>JE.has(t));HD=new RegExp(`^you\\s+(?:can|may)\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),KD=new RegExp(`^an?\\s+([a-z][\\w-]*)\\s+(?:can|may)\\s+be\\s+([a-z]+)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),YD=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*nothing\\s+may\\s+([a-z]+)\\s+(${qe})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),XD=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+must\\s+be\\s+(${Nl})\\s+than\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),JD=new RegExp(`^([a-z]+ing)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)\\s+makes\\s+(?:it|the\\s+([a-z][\\w-]*))\\s+([a-z]+)\\s+(${qe})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),QD=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+may\\s+not\\s+be\\s+with\\s+the\\s+([a-z][\\w-]*)\\s+without\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),ZD=new RegExp(`^the\\s+goal\\s+is\\s+that\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${qe})\\s+([\\w-]+)[.!?]*$`,"i"),ez=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+to\\s+([a-z]+)\\s+(${qe})\\s+([\\w-]+)[.!?]*$`,"i"),tz=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+(${qe})\\s+([\\w-]+)[.!?]*$`,"i"),nz=new RegExp(`^(?:can|could)\\s+you\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)[?.!]*$`,"i"),sz=new RegExp(`^(?:get|put|place|stack)\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${qe})\\s+([\\w-]+)[?.!]*$`,"i"),oz=new RegExp(`^the\\s+goal\\s+is\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${qe})\\s+([\\w-]+)[?.!]*$`,"i"),rz=new RegExp(`^(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${qe})\\s+([\\w-]+)$`,"i"),iz=new RegExp(`^(?:what|who)\\s+([a-z']+)\\s+(${qe})\\s+(.+?)[?.!\\s]*$`,"i"),az=new RegExp(`^what\\s+(?:does|do|is)\\s+([\\w-]+)\\s+([a-z]+)(?:\\s+(${qe}))?[?.!\\s]*$`,"i"),eg=/^(?:anywhere|everywhere|nowhere|somewhere)$/i;Mi="(?:(?:usually|often|sometimes|rarely|always|typically|generally|occasionally|frequently|normally|regularly|commonly|mostly|currently|still|also|really|actually|closely|strongly|directly)\\s+)?",QE="(?:cannot|can't|can not|does not|doesn't|do not|don't|never)",cz=new RegExp(`^(.+?)\\s+(${QE})\\s+(.+)$`,"i"),lz=new RegExp(`^([\\w'-]+)\\s+${Mi}([a-z]+)\\s+(.+?)[.!?]*$`,"i"),Pl="connected|related|associated|linked|based|derived|composed|made|used|known|located|found|involved|concerned",$g="with|to|from|by|of|in|on|for|as|about|into",uz=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are|was|were)\\s+${Mi}(${Pl})\\s+(${$g})\\s+(.+)$`,"i"),dz=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(is|are|was|were)\\s+(?:an?\\s+)?([\\w'-]+)\\s+(${Pl})\\s+(${$g})\\s+(.+)$`,"i"),pz=new RegExp(`^(?:the\\s+|an?\\s+)([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+([a-z]+)\\s+(${qe})\\s+(.+?)[.!?]*$`,"i"),xl=/^(?:is|are|am|owns|maintains)$/i,kl=/\b(?:is|are|am|owns|maintains)\b/i,ZE=new RegExp("^(?:i|me|you|he|him|she|her|it|we|us|they|them|my|your|his|its|our|their|mine|yours|hers|ours|theirs|this|that|these|those|a|an|the|every|each|all|some|any|no|both|either|neither|in|on|at|to|from|by|with|for|of|about|into|onto|over|under|near|before|after|during|through|up|down|off|out|above|below|between|among|against|without|within|along|across|behind|beyond|upon|toward|towards|per|and|but|or|if|because|although|though|while|when|since|unless|until|whether|so|nor|than|as|what|who|whom|whose|which|where|why|how)$","i"),fz=new RegExp(`^(?:${ys.filter(e=>!/\s/.test(e)).join("|")})$`,"i");eS=new RegExp(`^(?:does|did)\\s+([\\w'-]+)\\s+${Mi}([a-z]+)\\s+(.+?)[?.!\\s]*$`,"i"),tS=new RegExp(`^what\\s+(?:does|did)\\s+([\\w'-]+)\\s+${Mi}([a-z]+(?:\\s+(?:${qe}))?)[?.!\\s]*$`,"i"),Sl=/^(?:be|own|maintain)$/i,nS=new RegExp(`^(${qe})\\s+(.+)$`,"i");xg=Object.freeze(["you","i","it","they","he","she","we"]),kg=Object.freeze(["you're","i'm","it's","they're","he's","she's","we're"]),oS=Object.freeze([...kg,...xg]),mz=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(${oS.join("|")})\\s+\\S+`,"i"),hz=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(?:(${xg.join("|")})\\s+(?:is|are|am|was|were)|(${kg.join("|")}))\\s+(?:an?\\s+)?[\\w'-]+[.!?]*$`,"i"),gz=new RegExp(`^([\\w-]+)\\s+([a-z]+)s\\s+(${qe})\\s+([\\w-]+)$`,"i"),bz=new RegExp(`^forget\\s+(?:that\\s+)?([\\w-]+)\\s+([a-z]+)s\\s+(${qe})\\s+([\\w-]+)$`,"i"),Fl="(?:\\s+(?:exactly|really|actually|anyway))?",wz=new RegExp(`^what\\s+does\\s+(.+?)\\s+do${Fl}\\??$`,"i"),yz=new RegExp(`^what\\s+(.+?)\\s+does${Fl}\\??$`,"i"),vz=new RegExp(`^what(?:'s|s|\\s+is)\\s+(.+?)\\s+do${Fl}\\??$`,"i"),Eg="([A-Za-z][\\w'.-]*(?:\\s+[A-Za-z][\\w'.-]*){0,3})",$z=new RegExp(`^who\\s+(?:is|was)\\s+${Eg}$`,"i"),xz=new RegExp(`^what\\s+(?:did|has)\\s+${Eg}\\s+(?:touch(?:ed)?|chang(?:e|ed)|work(?:ed)?\\s+on|commit(?:ted)?)$`,"i"),rS="(?:good|bad|clean|messy|ugly|nice|great|terrible|awful|solid|elegant|readable|maintainable|well[- ]written|well[- ]structured|spaghetti|ok|okay|decent|healthy)",kz=new RegExp(`^is\\s+(?:this|the)\\s+code(?:base)?\\s+(?:any\\s+)?${rS}\\b`,"i"),Ez=new RegExp("^(?:what\\s+time\\s+is\\s+it(?:\\s+(?:now|right\\s+now))?|what(?:'s|s|\\s+is)\\s+the\\s+time(?:\\s+(?:now|right\\s+now))?|what\\s+day\\s+is\\s+it(?:\\s+today)?|what(?:'s|s|\\s+is)\\s+(?:the\\s+)?(?:day|date)(?:\\s+today)?|what(?:'s|s|\\s+is)\\s+today'?s\\s+date|what(?:'s|s|\\s+is)\\s+the\\s+weather(?:\\s+like)?(?:\\s+(?:today|outside))?|how'?s\\s+the\\s+weather(?:\\s+like)?(?:\\s+(?:today|outside))?)\\??$","i");Sz=new Set([...Object.keys(pe).flatMap(e=>e.split(/[\s-]+/)),...Ht,...rn,"owns","maintains"].filter(e=>e.length>=3)),_o={"rdfs:subClassOf":"is a kind of","mgxneg:subClassOf":"is not a kind of","rdf:type":"is a","owl:disjointWith":"is not a","mgx:partOf":"is part of","mgx:hasA":"has","mgx:usedFor":"is used for","mgx:capableOf":"can","mgx:atLocation":"is found in","mgx:causes":"causes","mgx:hasProperty":"is","mgx:madeOf":"is made of","mgx:receivesAction":"can be","mgx:createdBy":"is created by","mgx:mannerOf":"is a way to","mgx:desires":"wants","mgx:locatedNear":"is typically near","mgx:motivatedByGoal":"is motivated by","mgx:obstructedBy":"can be prevented by","mgx:causesDesire":"makes you want to","mgx:hasSubevent":"involves","mgx:hasFirstSubevent":"begins with","mgx:hasLastSubevent":"ends with","mgx:hasPrerequisite":"requires","mgx:ownedBy":"is owned by","mgx:rendersAs":"renders as","mgx:synonym":"means the same as","mgx:antonym":"is the opposite of","mgx:similarTo":"is similar to","mgx:relatedTo":"is related to","mgx:symbolOf":"is a symbol of","mgx:currently-in":"is in","mgx:located-in":"is in","mgx:fixed-in":"is fixed in","mgx:stands-locked-in":"stands locked in","mgx:works-in":"works in"},tg=new Set(["mgx:hidden-in","mgx:is-objective","mgx:unlocks-with","mgx:is-npc","mgx:acts-on-turn","mgx:acts-toward","mgx:is-container","mgx:is-open"]),Dl=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:works-in"]);Ct=e=>`${e.subject} ${jg(e.predicate)} ${e.object}`;aS=Object.entries(_o).filter(([e])=>!Dl.has(e)).map(([e,t])=>{let n=/^(?:is|are)\s+(.+)$/i.exec(t);return n?{predicate:e,marker:n[1].trim().toLowerCase()}:null}).filter(e=>e&&e.marker.length>1).sort((e,t)=>t.marker.length-e.marker.length);lS=/ \(source: [^)]*\)$/;uS=8;Ii=null;hS=/^(?:every|each|all|any)\s+/i;Rg=new Set(["module","modules","class","classes","function","functions","method","methods","handler","handlers","controller","controllers","service","services","component","components","flow","flows","thing","things","item","items","object","objects","commit","commits"]),jz=new Set([["interpreter","compiler"],["string","thread"],["heart","kernel"],["battalion","heap"],["bash","sock"],["command","skill"],["docker","longshoreman"],["name","list"],["list","number"]].map(([e,t])=>[e,t].sort().join("|"))),Al=/^(?:is|are|was|were)\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,Ag=/^(?:who|what)\s+(?:is|are)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,gS=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]+(?:\s+[A-Z][\w-]*)?)'s\s+([a-z][\w-]*)[?.!\s]*$/i,bS=/^(who|what)'?s\s+/i,Ni=e=>String(e).replace(bS,(t,n)=>`${n} is `),wS=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]{2,}?)s\s+([a-z][\w-]*)[?.!\s]*$/i;yS=/^list\s+(?:the\s+|all\s+)?([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,ds=/^(?:is|are)\s+(?:an?\s+)?(.+?)\s+(?:a\s+kind\s+of|a\s+type\s+of|an?)\s+(.+?)[?.!\s]*$/i,Wn=new Set(["rdfs:subClassOf","rdf:type"]),vS=6,$S=/^why\s+(?=(?:is|are)\b)/i,xS=/^explain\s+how\s+you\s+know\s+(?:that\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i;Cl=new Set(["kind","sort","type","subclass","superclass"]),rg=/^(?:so\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)\s*,?\s*(?:now\s+)?(?:right|correct|yeah)\??$/i,kS=/^(?:what\s+do\s+you\s+know\s+about|what(?:'s|s|\s+is)\s+in\s+your\s+memory\s+about|what\s+do\s+you\s+remember\s+about)\s+(.+?)[?.!\s]*$/i,_e=32,ES=/^(?:can|could)\s+(all\s+|every\s+)?(?:an?\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z]+)[?.!\s]*$/i,SS=/^(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+have\s+(?:an?\s+|the\s+)?(.+?)[?.!\s]*$/i,jS=/^what\s+can\s+(?:an?\s+)?(.+?)\s+do[?.!\s]*$/i,_S=/^what\s+has\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,RS=/^what\s+(?:(?:can\s+be|is)\s+used\s+for|is\s+for)\s+(.+?)[?.!\s]*$/i,AS=/^where(?:'s|\s+is|\s+are)\s+(.+?)(?:\s+now)?\s*[?.!]*$/i,ig=/^mgx:[a-z]+-(?:on|in|at|inside|under|below|above|near|beside|behind|by)$/,TS=new RegExp(`^what(?:'s|\\s+is|\\s+are)\\s+(${qe})\\s+(.+?)\\s*[?.!]*$`,"i"),CS=/^(?:do|does)\s+(all\s+|every\s+)?(?:an?\s+|the\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z-]+)[?.!\s]*$/i,IS=/^what\s+can\s+(?!be\s)(.+?)[?.!\s]*$/i,OS=/^what\s+(?:cannot|can't|cant|can\s+not)\s+(.+?)[?.!\s]*$/i,LS=/^(?:which|what)\s+([\w'-]+(?:\s+[\w'-]+)*?)\s+can\s+(.+?)[?.!\s]*$/i;cg=e=>String(e||"").replace(/\s+/g," ").trim();Cg="(?:most|least)\\s+[a-z][\\w-]*|[a-z][\\w-]*est|best|worst",MS=new RegExp(`^which\\s+([\\w'-]+)\\s+(?:is|are)\\s+(?:the\\s+)?(${Cg})[?.!\\s]*$`,"i"),PS=new RegExp(`^what(?:'s|s|\\s+is)\\s+the\\s+(${Cg})\\s+([\\w'-]+)[?.!\\s]*$`,"i");DS=new Set(["rdfs:subClassOf","rdf:type","mgx:hasA","mgx:capableOf","mgx:usedFor","mgx:ownedBy","owl:disjointWith","mgx:hasProperty","mgx:receivesAction"]),zS=Object.entries(_o).filter(([e])=>!DS.has(e)&&!Dl.has(e)).map(([e,t])=>({predicate:e,re:new RegExp(`^what\\s+${Ve(t)}\\s+(.+?)[?.!\\s]*$`,"i")})).sort((e,t)=>t.re.source.length-e.re.source.length),US=new Set(["rdfs:subClassOf","rdf:type","owl:disjointWith","mgx:hasProperty","mgx:hasA","mgx:capableOf","mgx:ownedBy"]),BS=Object.entries(_o).filter(([e])=>!US.has(e)&&!Dl.has(e)).map(([e,t])=>{let n;if(t==="can be")n=new RegExp("^can\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+be\\s+(.+?)[?.!\\s]*$","i");else if(t.startsWith("is ")){let s=Ve(t.slice(3));n=new RegExp(`^(?:is|are)\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+${s}\\s+(?:an?\\s+|the\\s+)?(.+?)[?.!\\s]*$`,"i")}else{let[s,...o]=t.split(" "),r=[Sg(s),...o].map(Ve).join("\\s+");n=new RegExp(`^(?:does|do)\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+${r}\\s+(?:an?\\s+|the\\s+)?(.+?)[?.!\\s]*$`,"i")}return{predicate:e,phrase:t,re:n}}).sort((e,t)=>t.re.source.length-e.re.source.length),dg=/^what\s+(?:inherits?\s+(?:from\s+)?(?:an?\s+)?|is\s+(?:an?\s+)?(?:kind|sort|type)\s+of\s+|is\s+(?:an?\s+)?subclass\s+of\s+)(.+?)[?.!\s]*$/i,WS=new Set(["changed","change","changes","updated","modified","happened","occurred"]);GS=/^what\s+(?:did|have)\s+(?:i|we|you)\s+(?:told|tell|said|say)\s+(?:you|me|us)?\s*about\s+(.+?)[?.!\s]*$/i,VS=/^what\s+kind\s+of\s+(?:thing|class|type|category|entity)?\s*(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,HS=/^does\s+every\s+(.+?)\s+have\s+at\s+least\s+(\d+)\s+(.+?)[?.!\s]*$/i,KS=/^does\s+an?\s+(.+?)\s+have\s+an?\s+(.+?)[?.!\s]*$/i,pg=new Set(["owl:cardinality","owl:minCardinality","owl:maxCardinality","owl:onClass"]),YS=/^who\s+(?:owns|maintains)\s+(.+?)[?.!\s]*$/i,XS=/^(?:does|did)\s+([\w'-]+)\s+(?:owns?|maintains?)\s+(.+?)[?.!\s]*$/i,JS=/^(?:is|are|was|were)\s+(.+?)\s+owned\s+by\s+([A-Za-z][\w'-]*(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,QS=/^(?:does|did)\s+([\w'-]+)\s+(?:has|have)\s+an?\s+([a-z][\w-]*)\s+method[?.!\s]*$/i,ZS=/^what\s+methods\s+does\s+([\w'-]+)\s+have[?.!\s]*$/i,fg=/^(?:is|are|was|were)\s+(.+?)\s+([A-Za-z][\w-]*)[?.!\s]*$/i,us=/^(?:it|this|that)$/i,mg=/^(?:you|i|they|he|she|we)\b/i,hg=(e,t)=>({text:`I don't know anything about "${e}" yet \u2014 teach me directly, e.g. "remember that ${Li(e)} is ${t}".`,replace:!0}),ej=/^(?:what\s+(?:did|have)\s+(?:i|we)\s+(?:told?|tell|said?|say)\s+(?:you|me|us)?(?:\s+(?:last\s+time|before|earlier|previously|already))?|what\s+facts?\s+do\s+you\s+(?:know|have|remember)|what\s+do\s+you\s+(?:know|remember)|what\s+have\s+you\s+(?:learned|learnt|remembered))[?.!\s]*$/i;nj=/inherit|supertype|subclass|extend|specializ/i,sj=8;_z=new RegExp(`\\b(?:${[...Ol].join("|")})\\b`,"i"),Ng=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,rj=/^who\s+(?:is|are|was|were)\s+(?:an?\s+|the\s+)?([\w'-]+)[?.!\s]*$/i,Rz=new RegExp(`^(?:(?:the|a|an)\\s+)?(.+?)\\s+(${Object.keys(Ue).join("|")})$`,"i"),gg="(?:(?:can|could|would)\\s+you\\s+(?:please\\s+)?)?(?:(?:show|give)\\s+(?:me|us)\\s+|describe\\s+|explain\\s+|what(?:'s|s|\\s+is)\\s+)?",ij="(?:\\s+(?:of|for)\\s+(?:this|the)\\s+(?:app|codebase|repo|repository|project|code))?",Az=[new RegExp(`^${gg}the\\s+architecture(?:\\s+(?:overview|map|diagram))?${ij}(?:\\s+here)?\\??$`,"i"),new RegExp(`^${gg}architecture\\s+(?:(?:of|for)\\s+(?:this|the)\\s+(?:app|codebase|repo|repository|project|code)|overview|map|diagram)\\??$`,"i")],Tz={find:"locate a specific named entity",search:"locate a specific named entity",context:"gather the sized edit bundle for a symbol before changing code",snippet:"view a symbol's exact source",describe:"look up a symbol's definition and relations",signature:"view a symbol's signature",members:nn.contains,subclasses:nn.inherits,impact:"understand what a change to this module would reach (impact closure)",callers:nn.calls,callees:nn.calls,tests:nn.tests,untested:nn.tests,history:nn.touches,exports:nn.reexports,arch:"understand the overall architecture (package/module boundaries)",capabilities:"see what /plan can plan over \u2014 built-in query tools and taught actions",syllogise:"materialize the entailed facts that follow from what's remembered about one term",wiki:"toggle the live Wikipedia supplement for questions nothing local can answer",export:"write the memory store to a file, in the standard JSONL shape",ingest:"read a local text file and store every fact the recognizer grounds from it"},Mg="(?:changed?|modif(?:y|ied)|edits?|edited|touch(?:es|ed)?|updates?|updated|alters?|altered|deletes?|deleted|removes?|removed|drops?|dropped)",Cz=new RegExp(`^what\\s+(?:would|will|might|could|does|do)?\\s*(?:breaks?|fails?|happens?|stops?\\s+working|is\\s+affected|are\\s+affected|gets?\\s+affected|be\\s+affected|is\\s+impacted|be\\s+impacted)\\s+if\\s+(?:i|we|you|one|someone)\\s+${Mg}\\s+(?:the\\s+)?(.+?)[?.!\\s]*$`,"i"),Iz=new RegExp(`^if\\s+(?:i|we|you|one|someone)\\s+${Mg}\\s+(?:the\\s+)?(.+?),?\\s+what\\s+(?:would\\s+|will\\s+|might\\s+|could\\s+|does\\s+|do\\s+)?(?:breaks?|fails?|happens?|stops?\\s+working|is\\s+affected|are\\s+affected|gets?\\s+affected|be\\s+affected|would\\s+break|will\\s+break)[?.!\\s]*$`,"i"),Oz=new RegExp("^what\\s+(?:is|are|gets?|would\\s+be|will\\s+be)\\s+(?:affected|impacted|broken)\\s+(?:by|when|if)\\s+(?:i\\s+|we\\s+|you\\s+)?(?:chang(?:e|es|ing)|edit(?:s|ing)?|modif(?:y|ies|ying)|touch(?:es|ing)?|updat(?:e|es|ing)|delet(?:e|es|ing)|remov(?:e|es|ing)|a\\s+change\\s+to)\\s+(?:the\\s+)?(.+?)[?.!\\s]*$","i"),Lz=new RegExp("^(?:(?:can|could)\\s+(?:i|we|you|one|someone)\\s+safely|is\\s+it\\s+safe\\s+to)\\s+(?:change|edit|modify|touch|update|alter|delete|remove|drop)\\s+(?:the\\s+)?(.+?)[?.!\\s]*$","i"),Nz=new RegExp("^(?:what(?:'s|\\s+is)\\s+the\\s+)?(?:blast\\s+radius|impact)\\s+(?:of|for)\\s+(?:chang(?:ing|es)\\s+|editing\\s+|modifying\\s+|touching\\s+|updating\\s+|deleting\\s+|removing\\s+)?(?:the\\s+)?(.+?)[?.!\\s]*$","i"),Pi="as\\s+(?:its|the|an?)?\\s*(?:base\\s+class|parent\\s+class|base|parent)",Mz=new RegExp(`^(.+?)\\s+uses?\\s+(?:which\\s+[\\w'-]+|what)\\s+${Pi}\\s*\\??$`,"i"),Pz=new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+uses?\\s+${Pi}\\s*\\??$`,"i"),Fz=new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+uses?\\s+(.+?)\\s+${Pi}\\s*\\??$`,"i"),Dz=new RegExp(`^(.+?)\\s+uses?\\s+(.+?)\\s+${Pi}\\s*[.!]*$`,"i"),aj=Object.freeze([...Ol].filter(e=>e!=="here").concat("they")),zz=new RegExp(`^((?:is|are|can|could|does|do)\\s+|what\\s+(?:is|are)\\s+)(${aj.join("|")})\\b(\\s+\\S.*)?$`,"i"),Uz=Z(".tmct","memory","corpus-seed.json")});bl();Ke();globalThis.tmctMemoryAsk={factAnswer:Ig,factReadBack:Lg,createInMemoryStore:mi,normFactTerm:ee};})();
186
+ `)}${ie}`,replace:!0,...U.length?{pending:{items:U.map(se=>se.trim()),noun:"facts"}}:{}}}let G=n?.parsed?.shape==="meta"?n.parsed.object:null,Z=!1,V=c.match(gj);if(V)G=V[1],Z=!0;else if(!G&&!n?.parsed){let C=c.match(/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i);C&&(G=C[1])}if(!G)return null;let F=Q(l,G),z=Ye(m.filter(C=>F.has(C.subject)),r),B=Ye(m.filter(C=>F.has(C.object)),r),W=Z?z.length?z:B:B.length?B:z;return W.length?f(W):null}var Gl,bE,sn,Di,ig,_g,_z,ag,wE,Rz,Az,Rg,Ag,Tg,yE,cg,Tz,Cz,Iz,Oz,Lz,Hl,Nz,vE,qe,Tl,Cl,Er,$E,qs,Mz,Pz,Fz,Dz,zz,Bz,Uz,Wz,qz,Gz,Vz,Hz,Kz,Yz,Xz,lg,Gi,xE,Jz,Qz,Yl,Cg,Zz,eB,tB,Ll,Nl,kE,nB,SE,EE,Pl,jE,Ig,Og,RE,sB,oB,rB,iB,Xl,aB,cB,lB,Lg,uB,dB,AE,pB,fB,mB,Gs,ug,Jl,Ct,CE,OE,LE,Bi,DE,Fg,hB,Bl,Dg,zE,BE,qi,UE,WE,ds,qn,qE,GE,VE,Wl,mg,HE,je,KE,YE,XE,JE,QE,ZE,hg,ej,tj,nj,sj,oj,bg,Bg,ij,aj,lj,uj,dj,pj,vg,fj,hj,gj,bj,wj,$g,yj,vj,$j,xj,kj,xg,Wn,kg,Sg,Eg,Sj,jj,_j,gB,Gg,Aj,bB,jg,Tj,wB,yB,Vg,vB,$B,xB,kB,SB,Vi,EB,jB,_B,RB,Cj,AB,TB,Al=L(()=>{De();Xm();Lt();Ce();ss();cl();Ai();Do();ll();Zm();Ge();Sc();dl();oh();An();Xn();Ko();ol();rl();il();Go();Eo();ch();Ci();uh();dh();hl();ph();gl();fh();mh();Mi();el();Mh();zh();jo();tg();Vr(void 0);_i(Ri);Gl=new Set(["it","this","that","here"]),bE=e=>Gl.has(String(e||"").trim().toLowerCase()),sn={imports:"understand a dependency/import relationship",uses:"understand a dependency/usage relationship (imports and/or calls)",calls:"understand a call relationship",callsSymbol:"understand a call relationship",defines:"locate what a module/class defines",contains:"understand class membership (methods/attributes)",tests:"assess test coverage",inherits:"understand a class hierarchy/inheritance relationship",touches:"understand commit/change history",touchesSymbol:"understand commit/change history",cochange:"understand change-coupling between modules",reexports:"understand a module's public exports/API surface"},Di=e=>e?`${String(e).toLowerCase()}(s)`:"entities",ig="look up a taught fact about a subject/verb/object";_g={find:{tool:"tmct_search",arg:"query",help:"lexical search across the graph"},search:{tool:"tmct_search",arg:"query",help:"alias of /find"},context:{tool:"tmct_context",arg:"symbol",help:"the sized edit bundle for a symbol (start here to change code)"},snippet:{tool:"tmct_snippet",arg:"symbol",help:"exact source of one function/class/method"},describe:{tool:"tmct_describe",arg:"symbol",help:"a symbol's definition, kind and relations"},signature:{tool:"tmct_signature",arg:"symbol",help:"a symbol's signature only"},members:{tool:"tmct_members",arg:"class",help:"the methods/attributes of a class"},subclasses:{tool:"tmct_subclasses",arg:"class",help:"the subclasses of a class"},impact:{tool:"tmct_impact",arg:"module",help:"what a change to this module or symbol reaches (impact closure)"},callers:{tool:"tmct_callers",arg:"symbol",help:"functions that call this symbol"},callees:{tool:"tmct_callees",arg:"symbol",help:"functions this symbol calls"},tests:{tool:"tmct_tests_for",arg:"symbol",help:"the tests covering this symbol"},untested:{tool:"tmct_untested",arg:null,help:"symbols with no covering test"},history:{tool:"tmct_history",arg:"symbol",help:"the commit history of this symbol"},exports:{tool:"tmct_exports",arg:"module",help:"a module's public exports"},arch:{tool:"tmct_architecture",arg:"package",help:"the architecture overview (optional package filter)",optional:!0}},_z=new Set(["stats","memory","focus",...Object.keys(_g)]),ag={Class:["class","classes"],Function:["function","functions"],Module:["module","modules"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"],Session:["session","sessions"]},wE=new Set(["have","has","holds","hold"]),Rz=new RegExp(`\\b(?:${[...Object.keys(de),...Object.keys(Gn)].filter(e=>!wE.has(e)).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})\\b`,"i"),Az=new Set([...Ym.map(e=>e.name),...Object.values(_g).map(e=>e.tool)]),Rg=new Set(["hi","hello","hey","yo","hiya","howdy","sup","greetings","g'day","gday","hey there","hi there","hello there","good morning","good afternoon","good evening","morning","alright","you alright","alright mate","morning all","yeah nah","hey y'all","howdy there","hiya there","good day","good day to you","salutations","good to meet you","pleased to meet you","yo yo","ayy","wassup","sup fam","heya","hiya!","gm","ge"]),Ag=new Set(["thanks","thank you","thankyou","thx","ty","ta","cheers","nice one","much appreciated","cool thanks","many thanks","much obliged","ta very much","cheers mate","cheers for that","tks","sweet thanks","nice","brilliant","ta for that","cheers, that's everything for now, thanks","that's everything for now, thanks","that's all for now, thanks"]),Tg=new Set(["bye","goodbye","quit","exit","see ya","see you","cya","later","farewell","peace","peace out","im off","i'm off","gtg","gotta go","catch you later","farewell then","gtg thx"]),yE=new Set(["ok","okay","cool","aight","fair enough","got it","gotcha","noted","sounds good","sure","cool cool","right","haha ok fair enough"]),cg=e=>e.replace(/(.)\1+/g,"$1");Tz=Vl(Rg),Cz=Vl(Ag),Iz=Vl(Tg),Oz=new RegExp(`^(?:${[...yE].map(He).join("|")})\\s+(.+)$`,"i"),Lz=[...Rg,...Ag,...Tg,"what can you do","what do you do","help","how do you work","who are you","what are you","what is your name"],Hl="(?:[a-z]+er|better|worse|(?:more|less)\\s+[a-z]+)",Nz=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are)\\s+(${Hl})\\s+than\\s+(.+)$`,"i"),vE=new RegExp(`^(?:is|are)\\s+(.+?)\\s+(${Hl})\\s+than\\s+(.+?)[?.!\\s]*$`,"i"),qe="on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside",Tl="mgx:ownedBy",Cl="mgx:hasProperty",Er="rdfs:subClassOf",$E=new Set(["operator","teach","entailed"]),qs=e=>!!e.sourceTypes?.some(t=>$E.has(t));Mz=new RegExp(`^you\\s+(?:can|may)\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Pz=new RegExp(`^an?\\s+([a-z][\\w-]*)\\s+(?:can|may)\\s+be\\s+([a-z]+)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Fz=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*nothing\\s+may\\s+([a-z]+)\\s+(${qe})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Dz=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+must\\s+be\\s+(${Hl})\\s+than\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),zz=new RegExp(`^([a-z]+ing)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)\\s+makes\\s+(?:it|the\\s+([a-z][\\w-]*))\\s+([a-z]+)\\s+(${qe})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Bz=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+may\\s+not\\s+be\\s+with\\s+the\\s+([a-z][\\w-]*)\\s+without\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Uz=new RegExp(`^the\\s+goal\\s+is\\s+that\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${qe})\\s+([\\w-]+)[.!?]*$`,"i"),Wz=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+to\\s+([a-z]+)\\s+(${qe})\\s+([\\w-]+)[.!?]*$`,"i"),qz=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+(${qe})\\s+([\\w-]+)[.!?]*$`,"i"),Gz=new RegExp(`^(?:can|could)\\s+you\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)[?.!]*$`,"i"),Vz=new RegExp(`^(?:get|put|place|stack)\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${qe})\\s+([\\w-]+)[?.!]*$`,"i"),Hz=new RegExp(`^the\\s+goal\\s+is\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${qe})\\s+([\\w-]+)[?.!]*$`,"i"),Kz=new RegExp(`^(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${qe})\\s+([\\w-]+)$`,"i"),Yz=new RegExp(`^(?:what|who)\\s+([a-z']+)\\s+(${qe})\\s+(.+?)[?.!\\s]*$`,"i"),Xz=new RegExp(`^what\\s+(?:does|do|is)\\s+([\\w-]+)\\s+([a-z]+)(?:\\s+(${qe}))?[?.!\\s]*$`,"i"),lg=/^(?:anywhere|everywhere|nowhere|somewhere)$/i;Gi="(?:(?:usually|often|sometimes|rarely|always|typically|generally|occasionally|frequently|normally|regularly|commonly|mostly|currently|still|also|really|actually|closely|strongly|directly)\\s+)?",xE="(?:cannot|can't|can not|does not|doesn't|do not|don't|never)",Jz=new RegExp(`^(.+?)\\s+(${xE})\\s+(.+)$`,"i"),Qz=new RegExp(`^([\\w'-]+)\\s+${Gi}([a-z]+)\\s+(.+?)[.!?]*$`,"i"),Yl="connected|related|associated|linked|based|derived|composed|made|used|known|located|found|involved|concerned",Cg="with|to|from|by|of|in|on|for|as|about|into",Zz=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are|was|were)\\s+${Gi}(${Yl})\\s+(${Cg})\\s+(.+)$`,"i"),eB=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(is|are|was|were)\\s+(?:an?\\s+)?([\\w'-]+)\\s+(${Yl})\\s+(${Cg})\\s+(.+)$`,"i"),tB=new RegExp(`^(?:the\\s+|an?\\s+)([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+([a-z]+)\\s+(${qe})\\s+(.+?)[.!?]*$`,"i"),Ll=/^(?:is|are|am|owns|maintains)$/i,Nl=/\b(?:is|are|am|owns|maintains)\b/i,kE=new RegExp("^(?:i|me|you|he|him|she|her|it|we|us|they|them|my|your|his|its|our|their|mine|yours|hers|ours|theirs|this|that|these|those|a|an|the|every|each|all|some|any|no|both|either|neither|in|on|at|to|from|by|with|for|of|about|into|onto|over|under|near|before|after|during|through|up|down|off|out|above|below|between|among|against|without|within|along|across|behind|beyond|upon|toward|towards|per|and|but|or|if|because|although|though|while|when|since|unless|until|whether|so|nor|than|as|what|who|whom|whose|which|where|why|how)$","i"),nB=new RegExp(`^(?:${ys.filter(e=>!/\s/.test(e)).join("|")})$`,"i");SE=new RegExp(`^(?:does|did)\\s+([\\w'-]+)\\s+${Gi}([a-z]+)\\s+(.+?)[?.!\\s]*$`,"i"),EE=new RegExp(`^what\\s+(?:does|did)\\s+([\\w'-]+)\\s+${Gi}([a-z]+(?:\\s+(?:${qe}))?)[?.!\\s]*$`,"i"),Pl=/^(?:be|own|maintain)$/i,jE=new RegExp(`^(${qe})\\s+(.+)$`,"i");Ig=Object.freeze(["you","i","it","they","he","she","we"]),Og=Object.freeze(["you're","i'm","it's","they're","he's","she's","we're"]),RE=Object.freeze([...Og,...Ig]),sB=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(${RE.join("|")})\\s+\\S+`,"i"),oB=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(?:(${Ig.join("|")})\\s+(?:is|are|am|was|were)|(${Og.join("|")}))\\s+(?:an?\\s+)?[\\w'-]+[.!?]*$`,"i"),rB=new RegExp(`^([\\w-]+)\\s+([a-z]+)s\\s+(${qe})\\s+([\\w-]+)$`,"i"),iB=new RegExp(`^forget\\s+(?:that\\s+)?([\\w-]+)\\s+([a-z]+)s\\s+(${qe})\\s+([\\w-]+)$`,"i"),Xl="(?:\\s+(?:exactly|really|actually|anyway))?",aB=new RegExp(`^what\\s+does\\s+(.+?)\\s+do${Xl}\\??$`,"i"),cB=new RegExp(`^what\\s+(.+?)\\s+does${Xl}\\??$`,"i"),lB=new RegExp(`^what(?:'s|s|\\s+is)\\s+(.+?)\\s+do${Xl}\\??$`,"i"),Lg="([A-Za-z][\\w'.-]*(?:\\s+[A-Za-z][\\w'.-]*){0,3})",uB=new RegExp(`^who\\s+(?:is|was)\\s+${Lg}$`,"i"),dB=new RegExp(`^what\\s+(?:did|has)\\s+${Lg}\\s+(?:touch(?:ed)?|chang(?:e|ed)|work(?:ed)?\\s+on|commit(?:ted)?)$`,"i"),AE="(?:good|bad|clean|messy|ugly|nice|great|terrible|awful|solid|elegant|readable|maintainable|well[- ]written|well[- ]structured|spaghetti|ok|okay|decent|healthy)",pB=new RegExp(`^is\\s+(?:this|the)\\s+code(?:base)?\\s+(?:any\\s+)?${AE}\\b`,"i"),fB=new RegExp("^(?:what\\s+time\\s+is\\s+it(?:\\s+(?:now|right\\s+now))?|what(?:'s|s|\\s+is)\\s+the\\s+time(?:\\s+(?:now|right\\s+now))?|what\\s+day\\s+is\\s+it(?:\\s+today)?|what(?:'s|s|\\s+is)\\s+(?:the\\s+)?(?:day|date)(?:\\s+today)?|what(?:'s|s|\\s+is)\\s+today'?s\\s+date|what(?:'s|s|\\s+is)\\s+the\\s+weather(?:\\s+like)?(?:\\s+(?:today|outside))?|how'?s\\s+the\\s+weather(?:\\s+like)?(?:\\s+(?:today|outside))?)\\??$","i");mB=new Set([...Object.keys(de).flatMap(e=>e.split(/[\s-]+/)),...Yt,...rn,"owns","maintains"].filter(e=>e.length>=3)),Gs={"rdfs:subClassOf":"is a kind of","mgxneg:subClassOf":"is not a kind of","rdf:type":"is a","owl:disjointWith":"is not a","mgx:partOf":"is part of","mgx:hasA":"has","mgx:usedFor":"is used for","mgx:capableOf":"can","mgx:atLocation":"is found in","mgx:causes":"causes","mgx:hasProperty":"is","mgx:madeOf":"is made of","mgx:receivesAction":"can be","mgx:createdBy":"is created by","mgx:mannerOf":"is a way to","mgx:desires":"wants","mgx:locatedNear":"is typically near","mgx:motivatedByGoal":"is motivated by","mgx:obstructedBy":"can be prevented by","mgx:causesDesire":"makes you want to","mgx:hasSubevent":"involves","mgx:hasFirstSubevent":"begins with","mgx:hasLastSubevent":"ends with","mgx:hasPrerequisite":"requires","mgx:ownedBy":"is owned by","mgx:rendersAs":"renders as","mgx:synonym":"means the same as","mgx:antonym":"is the opposite of","mgx:similarTo":"is similar to","mgx:relatedTo":"is related to","mgx:symbolOf":"is a symbol of","mgx:currently-in":"is in","mgx:located-in":"is in","mgx:fixed-in":"is fixed in","mgx:stands-locked-in":"stands locked in","mgx:works-in":"works in"},ug=new Set(["mgx:hidden-in","mgx:is-objective","mgx:unlocks-with","mgx:is-npc","mgx:acts-on-turn","mgx:acts-toward","mgx:is-container","mgx:is-open"]),Jl=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:works-in"]);Ct=e=>`${e.subject} ${Mg(e.predicate)} ${e.object}`;CE=Object.entries(Gs).filter(([e])=>!Jl.has(e)).map(([e,t])=>{let n=/^(?:is|are)\s+(.+)$/i.exec(t);return n?{predicate:e,marker:n[1].trim().toLowerCase()}:null}).filter(e=>e&&e.marker.length>1).sort((e,t)=>t.marker.length-e.marker.length);OE=/ \(source: [^)]*\)$/;LE=8;Bi=null;DE=/^(?:every|each|all|any)\s+/i;Fg=new Set(["module","modules","class","classes","function","functions","method","methods","handler","handlers","controller","controllers","service","services","component","components","flow","flows","thing","things","item","items","object","objects","commit","commits"]),hB=new Set([["interpreter","compiler"],["string","thread"],["heart","kernel"],["battalion","heap"],["bash","sock"],["command","skill"],["docker","longshoreman"],["name","list"],["list","number"]].map(([e,t])=>[e,t].sort().join("|"))),Bl=/^(?:is|are|was|were)\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,Dg=/^(?:who|what)\s+(?:is|are)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,zE=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]+(?:\s+[A-Z][\w-]*)?)'s\s+([a-z][\w-]*)[?.!\s]*$/i,BE=/^(who|what)'?s\s+/i,qi=e=>String(e).replace(BE,(t,n)=>`${n} is `),UE=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]{2,}?)s\s+([a-z][\w-]*)[?.!\s]*$/i;WE=/^list\s+(?:the\s+|all\s+)?([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,ds=/^(?:is|are)\s+(?:an?\s+)?(.+?)\s+(?:a\s+kind\s+of|a\s+type\s+of|an?)\s+(.+?)[?.!\s]*$/i,qn=new Set(["rdfs:subClassOf","rdf:type"]),qE=6,GE=/^why\s+(?=(?:is|are)\b)/i,VE=/^explain\s+how\s+you\s+know\s+(?:that\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i;Wl=new Set(["kind","sort","type","subclass","superclass"]),mg=/^(?:so\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)\s*,?\s*(?:now\s+)?(?:right|correct|yeah)\??$/i,HE=/^(?:what\s+do\s+you\s+know\s+about|what(?:'s|s|\s+is)\s+in\s+your\s+memory\s+about|what\s+do\s+you\s+remember\s+about)\s+(.+?)[?.!\s]*$/i,je=32,KE=/^(?:can|could)\s+(all\s+|every\s+)?(?:an?\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z]+)[?.!\s]*$/i,YE=/^(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+have\s+(?:an?\s+|the\s+)?(.+?)[?.!\s]*$/i,XE=/^what\s+can\s+(?:an?\s+)?(.+?)\s+do[?.!\s]*$/i,JE=/^what\s+has\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,QE=/^what\s+(?:(?:can\s+be|is)\s+used\s+for|is\s+for)\s+(.+?)[?.!\s]*$/i,ZE=/^where(?:'s|\s+is|\s+are)\s+(.+?)(?:\s+now)?\s*[?.!]*$/i,hg=/^mgx:[a-z]+-(?:on|in|at|inside|under|below|above|near|beside|behind|by)$/,ej=new RegExp(`^what(?:'s|\\s+is|\\s+are)\\s+(${qe})\\s+(.+?)\\s*[?.!]*$`,"i"),tj=/^(?:do|does)\s+(all\s+|every\s+)?(?:an?\s+|the\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z-]+)[?.!\s]*$/i,nj=/^what\s+can\s+(?!be\s)(.+?)[?.!\s]*$/i,sj=/^what\s+(?:cannot|can't|cant|can\s+not)\s+(.+?)[?.!\s]*$/i,oj=/^(?:which|what)\s+([\w'-]+(?:\s+[\w'-]+)*?)\s+can\s+(.+?)[?.!\s]*$/i;bg=e=>String(e||"").replace(/\s+/g," ").trim();Bg="(?:most|least)\\s+[a-z][\\w-]*|[a-z][\\w-]*est|best|worst",ij=new RegExp(`^which\\s+([\\w'-]+)\\s+(?:is|are)\\s+(?:the\\s+)?(${Bg})[?.!\\s]*$`,"i"),aj=new RegExp(`^what(?:'s|s|\\s+is)\\s+the\\s+(${Bg})\\s+([\\w'-]+)[?.!\\s]*$`,"i");lj=new Set(["rdfs:subClassOf","rdf:type","mgx:hasA","mgx:capableOf","mgx:usedFor","mgx:ownedBy","owl:disjointWith","mgx:hasProperty","mgx:receivesAction"]),uj=Object.entries(Gs).filter(([e])=>!lj.has(e)&&!Jl.has(e)).map(([e,t])=>({predicate:e,re:new RegExp(`^what\\s+${He(t)}\\s+(.+?)[?.!\\s]*$`,"i")})).sort((e,t)=>t.re.source.length-e.re.source.length),dj=new Set(["rdfs:subClassOf","rdf:type","owl:disjointWith","mgx:hasProperty","mgx:hasA","mgx:capableOf","mgx:ownedBy"]),pj=Object.entries(Gs).filter(([e])=>!dj.has(e)&&!Jl.has(e)).map(([e,t])=>{let n;if(t==="can be")n=new RegExp("^can\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+be\\s+(.+?)[?.!\\s]*$","i");else if(t.startsWith("is ")){let s=He(t.slice(3));n=new RegExp(`^(?:is|are)\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+${s}\\s+(?:an?\\s+|the\\s+)?(.+?)[?.!\\s]*$`,"i")}else{let[s,...o]=t.split(" "),i=[Ng(s),...o].map(He).join("\\s+");n=new RegExp(`^(?:does|do)\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+${i}\\s+(?:an?\\s+|the\\s+)?(.+?)[?.!\\s]*$`,"i")}return{predicate:e,phrase:t,re:n}}).sort((e,t)=>t.re.source.length-e.re.source.length),vg=/^what\s+(?:inherits?\s+(?:from\s+)?(?:an?\s+)?|is\s+(?:an?\s+)?(?:kind|sort|type)\s+of\s+|is\s+(?:an?\s+)?subclass\s+of\s+)(.+?)[?.!\s]*$/i,fj=new Set(["changed","change","changes","updated","modified","happened","occurred"]);hj=/^what\s+(?:did|have)\s+(?:i|we|you)\s+(?:told|tell|said|say)\s+(?:you|me|us)?\s*about\s+(.+?)[?.!\s]*$/i,gj=/^what\s+kind\s+of\s+(?:thing|class|type|category|entity)?\s*(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,bj=/^does\s+every\s+(.+?)\s+have\s+at\s+least\s+(\d+)\s+(.+?)[?.!\s]*$/i,wj=/^does\s+an?\s+(.+?)\s+have\s+an?\s+(.+?)[?.!\s]*$/i,$g=new Set(["owl:cardinality","owl:minCardinality","owl:maxCardinality","owl:onClass"]),yj=/^who\s+(?:owns|maintains)\s+(.+?)[?.!\s]*$/i,vj=/^(?:does|did)\s+([\w'-]+)\s+(?:owns?|maintains?)\s+(.+?)[?.!\s]*$/i,$j=/^(?:is|are|was|were)\s+(.+?)\s+owned\s+by\s+([A-Za-z][\w'-]*(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,xj=/^(?:does|did)\s+([\w'-]+)\s+(?:has|have)\s+an?\s+([a-z][\w-]*)\s+method[?.!\s]*$/i,kj=/^what\s+methods\s+does\s+([\w'-]+)\s+have[?.!\s]*$/i,xg=/^(?:is|are|was|were)\s+(.+?)\s+([A-Za-z][\w-]*)[?.!\s]*$/i,Wn=/^(?:it|this|that)$/i,kg=/^(?:it|this|that)(?:\s+one)?\s+(?:before|after)\b/i,Sg=/^(?:you|i|they|he|she|we)\b/i,Eg=(e,t)=>({text:`I don't know anything about "${e}" yet \u2014 teach me directly, e.g. "remember that ${Wi(e)} is ${t}".`,replace:!0}),Sj=/^(?:what\s+(?:did|have)\s+(?:i|we)\s+(?:told?|tell|said?|say)\s+(?:you|me|us)?(?:\s+(?:last\s+time|before|earlier|previously|already))?|what\s+facts?\s+do\s+you\s+(?:know|have|remember)|what\s+do\s+you\s+(?:know|remember)|what\s+have\s+you\s+(?:learned|learnt|remembered))[?.!\s]*$/i;jj=/inherit|supertype|subclass|extend|specializ/i,_j=8;gB=new RegExp(`\\b(?:${[...Gl].join("|")})\\b`,"i"),Gg=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,Aj=/^who\s+(?:is|are|was|were)\s+(?:an?\s+|the\s+)?([\w'-]+)[?.!\s]*$/i,bB=new RegExp(`^(?:(?:the|a|an)\\s+)?(.+?)\\s+(${Object.keys(Be).join("|")})$`,"i"),jg="(?:(?:can|could|would)\\s+you\\s+(?:please\\s+)?)?(?:(?:show|give)\\s+(?:me|us)\\s+|describe\\s+|explain\\s+|what(?:'s|s|\\s+is)\\s+)?",Tj="(?:\\s+(?:of|for)\\s+(?:this|the)\\s+(?:app|codebase|repo|repository|project|code))?",wB=[new RegExp(`^${jg}the\\s+architecture(?:\\s+(?:overview|map|diagram))?${Tj}(?:\\s+here)?\\??$`,"i"),new RegExp(`^${jg}architecture\\s+(?:(?:of|for)\\s+(?:this|the)\\s+(?:app|codebase|repo|repository|project|code)|overview|map|diagram)\\??$`,"i")],yB={find:"locate a specific named entity",search:"locate a specific named entity",context:"gather the sized edit bundle for a symbol before changing code",snippet:"view a symbol's exact source",describe:"look up a symbol's definition and relations",signature:"view a symbol's signature",members:sn.contains,subclasses:sn.inherits,impact:"understand what a change to this module would reach (impact closure)",callers:sn.calls,callees:sn.calls,tests:sn.tests,untested:sn.tests,history:sn.touches,exports:sn.reexports,arch:"understand the overall architecture (package/module boundaries)",capabilities:"see what /plan can plan over \u2014 built-in query tools and taught actions",syllogise:"materialize the entailed facts that follow from what's remembered about one term",wiki:"toggle the live Wikipedia supplement for questions nothing local can answer",export:"write the memory store to a file, in the standard JSONL shape",ingest:"read a local text file and store every fact the recognizer grounds from it"},Vg="(?:changed?|modif(?:y|ied)|edits?|edited|touch(?:es|ed)?|updates?|updated|alters?|altered|deletes?|deleted|removes?|removed|drops?|dropped)",vB=new RegExp(`^what\\s+(?:would|will|might|could|does|do)?\\s*(?:breaks?|fails?|happens?|stops?\\s+working|is\\s+affected|are\\s+affected|gets?\\s+affected|be\\s+affected|is\\s+impacted|be\\s+impacted)\\s+if\\s+(?:i|we|you|one|someone)\\s+${Vg}\\s+(?:the\\s+)?(.+?)[?.!\\s]*$`,"i"),$B=new RegExp(`^if\\s+(?:i|we|you|one|someone)\\s+${Vg}\\s+(?:the\\s+)?(.+?),?\\s+what\\s+(?:would\\s+|will\\s+|might\\s+|could\\s+|does\\s+|do\\s+)?(?:breaks?|fails?|happens?|stops?\\s+working|is\\s+affected|are\\s+affected|gets?\\s+affected|be\\s+affected|would\\s+break|will\\s+break)[?.!\\s]*$`,"i"),xB=new RegExp("^what\\s+(?:is|are|gets?|would\\s+be|will\\s+be)\\s+(?:affected|impacted|broken)\\s+(?:by|when|if)\\s+(?:i\\s+|we\\s+|you\\s+)?(?:chang(?:e|es|ing)|edit(?:s|ing)?|modif(?:y|ies|ying)|touch(?:es|ing)?|updat(?:e|es|ing)|delet(?:e|es|ing)|remov(?:e|es|ing)|a\\s+change\\s+to)\\s+(?:the\\s+)?(.+?)[?.!\\s]*$","i"),kB=new RegExp("^(?:(?:can|could)\\s+(?:i|we|you|one|someone)\\s+safely|is\\s+it\\s+safe\\s+to)\\s+(?:change|edit|modify|touch|update|alter|delete|remove|drop)\\s+(?:the\\s+)?(.+?)[?.!\\s]*$","i"),SB=new RegExp("^(?:what(?:'s|\\s+is)\\s+the\\s+)?(?:blast\\s+radius|impact)\\s+(?:of|for)\\s+(?:chang(?:ing|es)\\s+|editing\\s+|modifying\\s+|touching\\s+|updating\\s+|deleting\\s+|removing\\s+)?(?:the\\s+)?(.+?)[?.!\\s]*$","i"),Vi="as\\s+(?:its|the|an?)?\\s*(?:base\\s+class|parent\\s+class|base|parent)",EB=new RegExp(`^(.+?)\\s+uses?\\s+(?:which\\s+[\\w'-]+|what)\\s+${Vi}\\s*\\??$`,"i"),jB=new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+uses?\\s+${Vi}\\s*\\??$`,"i"),_B=new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+uses?\\s+(.+?)\\s+${Vi}\\s*\\??$`,"i"),RB=new RegExp(`^(.+?)\\s+uses?\\s+(.+?)\\s+${Vi}\\s*[.!]*$`,"i"),Cj=Object.freeze([...Gl].filter(e=>e!=="here").concat("they")),AB=new RegExp(`^((?:is|are|can|could|does|do)\\s+|what\\s+(?:is|are)\\s+)(${Cj.join("|")})\\b(\\s+\\S.*)?$`,"i"),TB=ee(".tmct","memory","corpus-seed.json")});Al();Ge();xs();Mi();var Hg={uninformativeClassMaxShare:.35,uninformativeClassMinSubjects:12,entailedDepthPenalty:.2,minoritySensePenalty:.5,minScore:.05,budget:{chatReply:5,researchPanel:10,cliDigest:12,ledgerTerm:8}};var Xg=Object.freeze({"rdfs:subClassOf":"isa","rdf:type":"isa","mgx:atLocation":"location","mgx:locatedNear":"location","mgx:partOf":"partOf","mgx:capableOf":"capableOf","mgx:usedFor":"usedFor"}),Vs=Object.freeze(["isa","location","partOf","capableOf","usedFor","other"]),Hi=e=>Xg[e]||"other",Oj=e=>Math.max(0,Math.min(1,e));function Kg(e){let t=(e.sourceTypes||[]).map(n=>Bo[n]??0);return t.length?Math.max(...t):typeof e.trust=="number"&&e.trust>0?e.trust:Bo.entailed}function Lj(e){return Array.isArray(e.environments)&&e.environments.length?!0:(e.sourceTypes||[]).includes("entailed")}function Yg(e,t){let n=Number(t?.totalSubjects)||0;return n<=0?0:(Number(t?.classSubjectCounts?.[e])||0)/n}function Jg(e,t,n={},s={}){let o={...Hg,...s.config||{}},i=Number.isInteger(s.budget)?s.budget:o.budget.chatReply,r=(t||[]).filter(y=>y&&y.object&&y.object!==e),a=[],l=(Number(n?.totalSubjects)||0)>=o.uninformativeClassMinSubjects,c=[];for(let y of r){if(Hi(y.predicate)==="isa"){let j=Yg(y.object,n);if(l&&j>o.uninformativeClassMaxShare){a.push({row:y,family:"isa",reason:"uninformative-class",share:j});continue}}c.push(y)}let u=c.filter(y=>Hi(y.predicate)==="isa").map(y=>y.object),d=Ni(u,{subClassEdges:n.subClassEdges||[],disjointEdges:n.disjointEdges||[]}),m=new Map,p=new Map;for(let y of d.clusters){let j=0;for(let E of y.objects){p.set(E,y.label);let _=c.find(R=>R.object===E&&Hi(R.predicate)==="isa");j+=_?Kg(_):0}m.set(y.label,j)}let f=null,g=-1;for(let[y,j]of[...m].sort((E,_)=>E[0].localeCompare(_[0])))j>g&&(g=j,f=y);let h=[];for(let y of c){let j=Hi(y.predicate),E=Kg(y),_={provenance:E};if(Lj(y)&&(E-=o.entailedDepthPenalty,_.entailed=!0),j==="isa"){let S=.6+.4*(1-Yg(y.object,n));E*=S,_.informativeness=S;let A=p.get(y.object);f&&A&&A!==f&&(E-=o.minoritySensePenalty,_.minoritySense=A)}E=Oj(E),h.push({row:y,family:j,score:E,reasons:_})}let b=[];for(let y of h)y.score<o.minScore?a.push({row:y.row,family:y.family,reason:"below-floor",score:y.score}):b.push(y);let w=new Map;for(let y of b)w.has(y.family)||w.set(y.family,[]),w.get(y.family).push(y);for(let y of w.values())y.sort((j,E)=>E.score-j.score||j.row.object.localeCompare(E.row.object));let v=Vs.filter(y=>w.has(y)).concat([...w.keys()].filter(y=>!Vs.includes(y)).sort()),$=[],k=!1;for(;$.length<i&&!k;){k=!0;for(let y of v){let j=w.get(y);if(j&&j.length&&($.push(j.shift()),k=!1,$.length>=i))break}}for(let y of v)for(let j of w.get(y)||[])a.push({row:j.row,family:j.family,reason:"over-budget",score:j.score});return $.sort((y,j)=>{let E=Vs.indexOf(y.family),_=Vs.indexOf(j.family);return E-_||j.score-y.score||y.row.object.localeCompare(j.row.object)}),{term:e,selected:$,cut:a,senses:{split:d.split,clusters:d.clusters,dominantLabel:f}}}var Nj=/^[aeiou]/i;function Ki(e){return Nj.test(String(e||"").trim())?"an":"a"}function Yi(e){let t=String(e||"").trim();return t&&(/(?:s|x|z|ch|sh)$/.test(t)?`${t}es`:/[^aeiou]y$/.test(t)?`${t.slice(0,-1)}ies`:`${t}s`)}function Ao(e){let t=String(e||"");return t&&t[0].toUpperCase()+t.slice(1)}function jr(e){let t=(e||[]).map(n=>String(n||"").trim()).filter(Boolean);return t.length===0?"":t.length===1?t[0]:t.length===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(", ")}, and ${t[t.length-1]}`}var Mj=new Set(["isa","location","partOf","capableOf","usedFor"]),Pj=new Set(["single","several","chained"]),Qg=(e,t)=>`${e}:${t}`;function Ql(e){let t=new Map;for(let n of e||[]){if(!n||typeof n.family!="string"||!Mj.has(n.family)||typeof n.form!="string"||!Pj.has(n.form)||typeof n.template!="string"||!n.template.trim())continue;let s=Qg(n.family,n.form);t.has(s)||t.set(s,{family:n.family,form:n.form,template:n.template})}return t}var To=e=>`${Ki(e)} ${e}`;function Fj(e){let t=(e||[]).map(o=>String(o||"").trim()).filter(Boolean);if(!t.length)return"";let n=To(t[0]),s=t.slice(1);return s.length?`${n}, and so ${jr(s.map(To))}`:n}function Dj(e,t,n){let s=String(e||"").trim(),o=(t||[]).map(r=>String(r||"").trim()).filter(Boolean),i=o[0]||"";return{TERM:s,TERM_CAP:Ao(s),A_TERM:To(s),A_TERM_CAP:Ao(To(s)),TERMS:Yi(s),TERMS_CAP:Ao(Yi(s)),PRONOUN:"it",PRONOUN_CAP:"It",OBJECT:i,A_OBJECT:i?To(i):"",OBJECTS_A:jr(o.map(To)),OBJECTS_PLURAL:jr(o.map(Yi)),OBJECTS_RAW:jr(o),CHAIN:Fj(n&&n.length?n:o.slice(0,1))}}function zj(e,t){return String(e).replace(/\{([A-Z_]+)\}/g,(n,s)=>s in t?t[s]:"").replace(/\s+/g," ").replace(/\s+([.,;])/g,"$1").trim()}function Xi(e,t,n,s={}){let o=(n||[]).filter(Boolean);if(!o.length)return null;let i=s.term??o[0].subject??"",r=s.form||(o.length>1?"several":"single"),a=e instanceof Map?e.get(Qg(t,r)):null;if(!a)return null;let l=o.map(u=>u.object),c=zj(a.template,Dj(i,l,s.chain));return c?{text:c,rows:o,family:t,form:r}:null}var Bj=Vs.filter(e=>e!=="isa"&&e!=="other");function Uj(e){let t=new Map;for(let n of e||[])t.has(n.family)||t.set(n.family,[]),t.get(n.family).push(n.row);return t}function Wj(e,t){if(!e.length)return;let n=e[0];if(/\bnames-term\b/.test(n.role))return;let s=Ao(`${Ki(t)} ${t}`);n.text=n.text.replace(/^It\b/,s),n.role="names-term"}function qj(e,t){let n=[],s=null,o=null;for(let i of e)(!s||i.paragraph!==o||s.length>=t)&&(s=[],o=i.paragraph,n.push(s)),s.push(i);return n.map(i=>({sentences:i,text:i.map(r=>r.text).join(" ")}))}function Zg(e,t,n={}){let s=e?.term||"",o=Number.isInteger(n.maxSentencesPerParagraph)?n.maxSentencesPerParagraph:3,i=n.chains||{},r=Uj(e?.selected||[]),a=[],l=r.get("isa")||[];if(l.length){let u=l.length===1?i[l[0].object]:null,d=u&&u.length>1?"chained":l.length>1?"several":"single",m=Xi(t,"isa",l,{term:s,form:d,chain:u});m&&a.push({...m,role:"names-term",paragraph:"definition"})}for(let u of Bj){let d=r.get(u);if(!d||!d.length)continue;let m=Xi(t,u,d,{term:s});m&&a.push({...m,role:"describes",paragraph:"description"})}Wj(a,s);let c=new Map;for(let u of a)for(let d of u.rows)c.has(d.id)||c.set(d.id,d);return{term:s,sentences:a,paragraphs:qj(a,o),provenanceRows:[...c.values()]}}var Gj=e=>({subject:e.subject,predicate:e.predicate,object:e.object,sourceTypes:e.sourceTypes||[],provenance:e.provenance||""});function Vj(e){let t=new Set,n=[];for(let s of e||[]){let o=s.provenance||(s.sourceTypes||[]).join(",");!o||t.has(o)||(t.add(o),n.push({provenance:s.provenance||"",sourceTypes:s.sourceTypes||[]}))}return n}var Hj=Object.freeze({facts:"show the facts",chains:"show the chains"});function Kj(e,t){let n=[...(e?.selected||[]).map(o=>o.row),...(e?.cut||[]).map(o=>o.row)].filter(Boolean),s=Object.entries(t||{}).filter(([,o])=>Array.isArray(o)&&o.length>1).map(([o,i])=>({object:o,chain:i}));return{escapes:Hj,facts:n.map(Gj),factCount:n.length,chains:s}}function eb(e,t,n={}){let s=t?.term||e?.term||"";return{kind:"term-article",term:s,headline:s,paragraphs:(t?.paragraphs||[]).map(o=>o.text).filter(Boolean),body:t?.paragraphs||[],sources:Vj(t?.provenanceRows||[]),detail:Kj(e,n.chains),provenanceRows:t?.provenanceRows||[]}}function tb(e,t,n={},s=new Map,o={}){let i=Jg(e,t,n,o),r=Zg(i,s,o);return eb(i,r,o)}Mi();var nb=new Set(["rdfs:subClassOf","rdf:type"]);function sb(e){let t=new Map,n=new Set,s=[],o=[];for(let r of e||[])!r||!r.predicate||(nb.has(r.predicate)?(n.add(r.subject),t.has(r.object)||t.set(r.object,new Set),t.get(r.object).add(r.subject),s.push([r.subject,r.object])):r.predicate==="owl:disjointWith"&&o.push([r.subject,r.object]));let i={};for(let[r,a]of t)i[r]=a.size;return{classSubjectCounts:i,totalSubjects:n.size,subClassEdges:s,disjointEdges:o}}function ob(e,t,n=6){let s=vr(e||[]),o={};for(let i of t||[]){if(i in o)continue;let r=Li(i,s,{cap:n});r.length>1&&(o[i]=r)}return o}function rb(e){let t=[],n=new Set;for(let s of e||[])!s||!nb.has(s.predicate)||n.has(s.object)||(n.add(s.object),t.push(s.object));return t}Ge();function Yj(e,t,n,s,o={}){let i=Ql(s||[]);if(!i||i.size===0)return null;let r=t||[],a=sb(n||r),l=ob(a.subClassEdges,rb(r));return tb(e,r,a,i,{...o,chains:l})}function ib(e,t,n,s={}){let o=Dt(e||{individuals:[],objectProperties:[]}),i=o.filter(a=>a.subject===t);if(!i.length)return null;let r=Yj(t,i,o,n,s);return Xj(r)}function Xj(e){if(!e||!Array.isArray(e.paragraphs)||!e.paragraphs.length)return null;let t=e.detail&&Array.isArray(e.detail.facts)?e.detail.facts:[];return{term:e.term||"",paragraphs:e.paragraphs.slice(),sources:[...new Set((e.sources||[]).map(n=>n.provenance).filter(Boolean))],facts:t,factCount:e.detail&&Number.isInteger(e.detail.factCount)?e.detail.factCount:t.length}}globalThis.tmctMemoryAsk={factAnswer:Ug,factReadBack:qg,createInMemoryStore:vi,normFactTerm:ne,digestTermFromPayloadBrowser:ib};})();