@polycode-projects/the-mechanical-code-talker 2.10.1 → 2.10.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,41 +1,41 @@
1
- (()=>{var th=Object.defineProperty;var K=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(s){throw n=[s],s}};var Dn=(e,t)=>{for(var n in t)th(e,n,{get:t[n],enumerable:!0})};var Qe,Qk,Zk,eS,tS,nS,sS,oS,rS,iS,aS,cS,lS,uS,dS,pS,mS,X,ke,Dt,ml,fS,hS,gS,Be=K(()=>{Qe=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},Qk=Qe("createRequire"),Zk=Qe("readFileSync"),eS=Qe("access"),tS=Qe("readFile"),nS=Qe("writeFile"),sS=Qe("appendFile"),oS=Qe("mkdir"),rS=Qe("mkdtemp"),iS=Qe("rename"),aS=Qe("unlink"),cS=Qe("rm"),lS=Qe("stat"),uS=Qe("copyFile"),dS=Qe("readdir"),pS=Qe("createReadStream"),mS=Qe("createWriteStream"),X=(...e)=>e.join("/"),ke=e=>String(e).replace(/\/[^/]*$/,""),Dt=(...e)=>e.join("/"),ml="/",fS=Qe("randomBytes"),hS=Qe("spawnSync"),gS=Qe("createInterface")});var Ze,wS,yS,fl,ze,fr,nh,Bn,sh,hr,hl,oh,rh,vS,ih,$S,xS,kS,SS,ES,St=K(()=>{Ze=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},wS=Ze("createRequire"),yS=Ze("readFileSync"),fl=Ze("access"),ze=Ze("readFile"),fr=Ze("writeFile"),nh=Ze("appendFile"),Bn=Ze("mkdir"),sh=Ze("mkdtemp"),hr=Ze("rename"),hl=Ze("unlink"),oh=Ze("rm"),rh=Ze("stat"),vS=Ze("copyFile"),ih=Ze("readdir"),$S=Ze("createReadStream"),xS=Ze("createWriteStream"),kS=Ze("randomBytes"),SS=Ze("spawnSync"),ES=Ze("createInterface")});function ls(e){return e.replace(ah,"").trim()}function Vt(e){let t=e;for(let n=0;n<2;n+=1){let s=t.replace(lh,"").trim();if(s=s.replace(dh,"").trim(),s===t)break;t=s}return t}var gl,Eo,jo,qt,bl,sn,ji,ah,ch,lh,uh,dh,ae,ph,wl,De,Bt,us,_i,Ri,Ai,yl,_o,Ds,vl,$l,ds,Sn,En,Bs,qe,xl,ps,ms,Un,ln,kl,Ro,Us,gr,Gs,Sl,jn=K(()=>{gl=["is a superclass of","are a superclass of","is a parent class of","are a parent class of","superclass","superclasses"],Eo={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",...gl]},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"]}},jo=Object.freeze([...gl,"is the superclass of","are the superclass of","is the parent class of"]),qt=Object.freeze(["defined","declared","located","implemented"]),bl=Object.freeze(["now","currently","right now","at the moment","these days","today"]),sn=Object.freeze(["mentioned","referenced"]),ji=Object.freeze(["in this graph","in the graph","in this codebase","in the codebase","in this repo","in the repo","here"]),ah=new RegExp(`\\s+(?:${ji.join("|")})\\s*[?.!]*$`,"i");ch=Object.freeze(["then","though","too"]),lh=new RegExp(`\\s+(?:${ch.join("|")})\\s*[?.!]*$`,"i"),uh=Object.freeze(["please explain","explain"]),dh=new RegExp(`,\\s*(?:${uh.join("|")})\\s*[?.!]*$`,"i");ae=Object.freeze(Object.fromEntries(Object.entries(Eo).flatMap(([e,{verbs:t}])=>t.map(n=>[n,e])))),ph=e=>!jo.includes(e),wl=Object.freeze([...new Set(Object.keys(ae).filter(ph).map(e=>e.match(/^(?:is|are)\s+an?\s+(.+)$/i)).filter(Boolean).map(e=>e[1].toLowerCase()))]),De=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"}),Bt=Object.freeze({explicitly:"direct",directly:"direct",transitively:"transitive",indirectly:"transitive"}),us=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"}),_i=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"}),Ri=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"}),Ai=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"}),yl=/\b([a-z]{3,})in'/gi,_o=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"]),Ds=Object.freeze(["this","it","that","here","this one","that one"]),vl=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]}`}]),$l=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`}]),ds=Object.freeze(["mean","means","stand for","stands for","signify","signifies","represent","represents","refer to","refers to"]),Sn=Object.freeze(["that","which","who"]),En=Object.freeze(["something","anything","everything","somethings","things","thing","entities","entity","nodes","node","stuff","code","symbol","symbols"]),Bs=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"}),qe=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}}),xl=Object.freeze(new Set(["tests","test","anything","something","anyone","someone","any"])),ps=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"]),ms=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"]),Un=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"}),ln=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"}}),kl=Object.freeze({tests:"Module",test:"Module"}),Ro=Object.freeze(["those","them","these"]),Us=Object.freeze(["contains","defines"]),gr=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"]),Gs=Object.freeze({tally:"count",tallies:"count",sum:"count",total:"count",totals:"count"}),Sl=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 Rl,Ie,Ct=K(()=>{Be();Rl=X(".tmct","graph.json"),Ie=class extends Error{constructor(t){super(t),this.name="ToolError"}}});function un(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<=Tl)}function Ii(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>Tl||yh.has(s))&&!n.has(s)&&(n.add(s),t.push(s),t.length>=vh))break;return t}function wr({name:e,doc:t}={}){return[...new Set([...un(e),...Ii(t)])].sort()}function Cl(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 fs(e,t,{limit:n=10}={}){let s=[...new Set([...un(t),...Ii(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 Il(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 yh,Tl,vh,Gn=K(()=>{yh=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+/)),Tl=40,vh=120});function Ol(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 vr(e){let t=String(e||"").trim();if(!t)return null;if(t.startsWith("reference:")){let s=t.slice(10),o=s.indexOf(":");return o<0?{kind:"reference",pack:s||"unknown",article:""}:{kind:"reference",pack:s.slice(0,o)||"unknown",article:s.slice(o+1)}}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",...Ol(n.slice(4))}:n.startsWith("teach:")?{kind:"teach",...Ol(n.slice(6))}:n.startsWith("web:")?{kind:"web",url:n.slice(4)}:n.startsWith("url:")?{kind:"web",url:n.slice(4)}: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 kh(e){let t=(e?.attributes||[]).find(s=>s.prop==="mgx:sourceReliability")?.value;if(t===void 0)return Nl;let n=Number(t);return Number.isFinite(n)?Math.max(Oi,Math.min(Pl,n)):Nl}function Sh(e,t=Date.now(),n=$h){let s=Date.parse(e);if(!Number.isFinite(s))return 1;let o=Math.max(0,t-s);return Ll+(1-Ll)*Math.pow(.5,o/n)}function Fl(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],b=xh(f);if(!b)continue;i.push(b);let h=(Ml[b]??0)*kh(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=Sh(e?.createdAt,s,n.halfLifeMs),d=Li(Math.min(1,l*u)),m={sourceTypes:i.slice().sort(),corroboration:i.length,createdAt:e?.createdAt||"",recency:Li(u)};return{score:d,inputs:m}}function zl({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+Eh),i=(o*r+1)/2;return Li(Oi+(Pl-Oi)*i)}var yr,Ni,It,hs,Ml,$h,Ll,Oi,Pl,Nl,Li,xh,Eh,To=K(()=>{yr="mgx:trustScore",Ni="mgx:trustInputs",It="mgx:createdAt",hs="mgx:updatedAt";Ml=Object.freeze({operator:1,teach:.95,provider:.9,corpus:.7,reference:.6,corpusWeak:.55,web:.4,extracted:.45,entailed:.3}),$h=720*60*60*1e3,Ll=.9,Oi=.5,Pl=1.5,Nl=1,Li=(e,t=6)=>Number(e.toFixed(t)),xh=e=>(e?.attributes||[]).find(t=>t.prop==="mgx:sourceType")?.value||"";Eh=19});var gs,Mi=K(()=>{gs=e=>/(^|\/)tests?\//.test(e)||/(^|\/)test_[^/]*\.py$/.test(e)||/\.tests(\.|$)/.test(e)});function Pi(e,t){return Math.log(1+e/(1+t))}var Co=K(()=>{});var xr={};Dn(xr,{bfsLevels:()=>$r,findActionPath:()=>Fi,findReachableSet:()=>zi});function Dl(e){return e&&typeof e=="object"?JSON.stringify(e):String(e)}function Bl(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 Fi(e,t,n,{maxDepth:s=50,stateKey:o=Dl}={}){if(t(e))return{actions:[],states:[e]};let r=Bl(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 zi(e,t,{maxDepth:n=50,stateKey:s=Dl}={}){let o=Bl(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*$r(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 bs=K(()=>{});function Sr(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 qi(e){return!e||!Array.isArray(e.individuals)?0:e.individuals.filter(t=>(t.class||"")==="Module").length}function An(e){let t=String(e?.prop||"").toLowerCase();if(Ul[t])return Ul[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 Wn(e){return String(e||"").trim().toLowerCase().replace(/^\.\//,"").replace(/^\//,"")}function Di(e){let t=Wn(e).split("/");return t[t.length-1]}function jh(e){return(e?.derived_from||[]).filter(tu).length}function Gl(e){return(e?.mentions||[]).reduce((n,s)=>n+(Number(s?.count)||0),0)+jh(e)}function Ut(e,t){let n=Wn(t);if(!n)return{match:null,candidates:[]};let s=Di(n),o=[];for(let r of e.individuals){let i=Wn(r.label),a=String(r.id||"").toLowerCase(),l=0;i===n||a===n?l=100:i.endsWith(`/${n}`)||Di(i)===s||Di(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||Gl(i.ind)-Gl(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 bt(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 _h(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 Wl(e){return e.prop?`${e.predicate} [${e.prop}]`:e.predicate}function Rn(e){let t=e||"Entity",n=un(t);return n.length<2?t:n.map(s=>s[0].toUpperCase()+s.slice(1)).join(" ")}function et(e,t,n=", "){return e.length<=t?e.join(n):e.slice(0,t).join(n)+`, +${e.length-t} more`}function Vi(e,t,{candidates:n=[]}={}){let s=[];s.push(`${t.label} \u2014 ${Rn(t.class)} (id: ${t.id})`);let o=(t.derived_from||[]).filter(tu);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}=_h(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(` ${Wl(l)} (${c.length}) \u2192 ${et(c.map(u=>u.objectLabel||u.object),ql)}`);for(let{group:l,edges:c}of i)s.push(` \u2190 ${Wl(l)} (${c.length}) by ${et(c.map(u=>u.subjectLabel||u.subject),ql)}`)}let a=t.derived_from||[];return a.length&&s.push(`provenance: ${et(a,Rh)}`),n.length&&s.push(`other matches: ${n.map(l=>`${l.label} (${Rn(l.class)})`).join(", ")}`),e.truncated.length&&s.push(Ah(e)),s.join(`
2
- `)}function Ah(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 Hs(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=An(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=_n(e,c.subject),d=_n(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 $r(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 nu(e,t,{maxDepth:n=8}={}){let s=Hs(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>=Th){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,Bi)){let u=c.tests.length?`tests: ${et(c.tests,Ch)}`:"tests: none recorded",d=l===0?`${c.via} it`:"reaches it through an intermediary";o.push(` - ${c.label} (${d}) \u2014 ${u}`)}a.length>Bi&&o.push(` \u2026+${a.length-Bi} more at depth ${l+1}`)});let i=e.truncated.filter(a=>{let l=An({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 su(e){let t=new Map;for(let n of e.relations)if(An(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 Hl(e){return new Set(String(e).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function cu(e,t,n=null){let s=n||(i=>_n(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 ve(e,i))r(s(a.subject),s(a.object));return o}function mg(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,b)=>b[1]-f[1]),m=[],p=[];for(let[f,b]of d)b>=u*sg&&m.length<n?m.push([f,b]):p.length<Vl&&p.push([f,b]);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<ig&&i.length;c++){let u=new Map,d=[];for(let m of ag){let p=cu(e,m),f=new Map;for(let[g,y]of i)for(let w of p.get(g)||[])o.has(w)&&f.set(w,Math.max(f.get(w)||0,y));let[b,h]=r(f);for(let[g,y]of b)u.set(g,Math.max(u.get(g)||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*og,f.score*rg),l.add(m))}i=[...u.entries()],!i.length&&a.length&&(i=a.splice(0,Vl).filter(([m])=>!l.has(m)))}}function fg(e,t=[],{depth:n=ru,q:s=au,nodeLimit:o=iu,kinds:r=cg,classPredicate:i=u=>(u.class||"")==="Module",idNormalizer:a=null,seeds:l=null,hubDegree:c=1/0}={}){let u=new Map(t.map(T=>[T.ind.id,T])),d=0;for(let T of t)d=Math.max(d,T.score);let m=t.length>0&&d>0,p=new Set(l??u.keys());if(!p.size)return[];let f=cu(e,r,a),b=T=>f.get(T)?.size||0,h=[],g=(T,C)=>T.hop!==C.hop?T.hop<C.hop:T.deg!==C.deg?T.deg<C.deg:T.id<C.id,y=(T,C)=>{let S=h[T];h[T]=h[C],h[C]=S},w=T=>{h.push(T);let C=h.length-1;for(;C>0;){let S=C-1>>1;if(g(h[C],h[S]))y(C,S),C=S;else break}},k=()=>{let T=h[0],C=h.pop();if(h.length){h[0]=C;let S=0;for(;;){let R=2*S+1,N=2*S+2,j=S;if(R<h.length&&g(h[R],h[j])&&(j=R),N<h.length&&g(h[N],h[j])&&(j=N),j===S)break;y(S,j),S=j}}return T},E=new Set(p);for(let T of p)w({id:T,hop:0,deg:b(T)});let $=null,v=0,A=[];for(;h.length&&v<o;){let T=k();if(A.push({id:T.id,hop:T.hop}),!p.has(T.id)){if(m){let R=d*lg*Math.pow(ug,T.hop-1),N=u.get(T.id);if(N)N.score+=Math.min(R*dg,N.score*pg);else{let j=e.byId?.get?.(T.id);if(j&&i(j)){$||($=su(e));let _=$.get(j.id)||[],O={ind:j,score:R,defineCount:_.length,matching:[],density:0};t.push(O),u.set(T.id,O)}}}v++}if(T.hop>=n||T.hop>0&&b(T.id)>c)continue;let C=[];for(let R of f.get(T.id)||[]){if(E.has(R))continue;let N=e.byId?.get?.(R);!N||!i(N)||C.push({id:R,deg:b(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 S=Math.max(1,Math.floor(s*C.length));for(let R=0;R<S;R++){let N=C[R];E.add(N.id),w({id:N.id,hop:T.hop+1,deg:N.deg})}}return A}function lu(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=su(e),f=[];for(let k of e.individuals){if((k.class||"")!=="Module")continue;let E=String(k.label),$=E.toLowerCase(),v=p.get(k.id)||[],A=new Set(v.map(S=>S.toLowerCase())),T=new Set;for(let S of v)for(let R of Hl(S))T.add(R);let C=u?String((k.attributes||[]).find(S=>S.key==="dotted")?.value||"").toLowerCase():"";f.push({ind:k,label:E,labelLc:$,defines:v,symSet:A,symComps:T,dotted:C})}let b=f.length||1,h=new Map,g=k=>{let E=0;for(let $ of f)($.labelLc.includes(k)||$.symComps.has(k)||$.symSet.has(k))&&E++;return E},y=k=>(h.has(k)||h.set(k,Pi(b,g(k))),h.get(k));for(let k of t)y(k);let w=[];for(let k of f){let E=0,$=0,v=0,A=[];for(let N of t){let j=h.get(N)||0;j&&(k.symSet.has(N)?(E+=j*ou,v++):k.symComps.has(N)&&(A.push(j),v++),k.labelLc.includes(N)&&($+=j*Oh))}A.sort((N,j)=>j-N);let T=0;for(let N=0;N<Math.min(A.length,Nh);N++)T+=A[N]*Lh;let C=E+$+T;if(!C)continue;s&&(gs(k.labelLc)||zh(k.labelLc))?C*=Fh:gs(k.labelLc)&&(C*=.4);let S=k.defines.filter(N=>{let j=N.toLowerCase(),_=Hl(N);return t.some(O=>j===O||_.has(O))}),R=k.defines.length?v/k.defines.length:0;w.push({ind:k.ind,score:C,defineCount:k.defines.length,matching:S,density:R})}if(u&&d&&w.length){let k=String(d).toLowerCase(),E=T=>T!=null&&/[a-z0-9_./]/.test(T),$=T=>{for(let C=k.indexOf(T);C!==-1;C=k.indexOf(T,C+1))if(!E(k[C-1])&&!E(k[C+T.length]))return!0;return!1},v=new Map(f.map(T=>[T.ind.id,T])),A=0;for(let T of w)A=Math.max(A,T.score);for(let T of w){let C=v.get(T.ind.id);if(!C)continue;let S=0;for(let R of new Set([C.dotted,C.labelLc])){if(!R||R.split(/[./]+/).filter(Boolean).length<Zh||!$(R))continue;let N=[...new Set(R.split(/[^a-z0-9_]+/).filter(Boolean))].map(y).sort((_,O)=>O-_),j=0;for(let _=0;_<Math.min(N.length,eg);_++)j+=N[_]*Qh;S=Math.max(S,j)}S&&(T.score+=Math.min(S*tg,A*ng))}}if(w.length>1){let k=new Map(w.map($=>[$.ind.id,$.score])),E=new Map;for(let $ of ve(e,"imports"))!k.has($.subject)&&!k.has($.object)||(E.has($.subject)||E.set($.subject,new Set),E.has($.object)||E.set($.object,new Set),E.get($.subject).add($.object),E.get($.object).add($.subject));for(let $ of w){let v=0;for(let A of E.get($.ind.id)||[])v=Math.max(v,k.get(A)||0);$.score+=Math.min(v*Mh,$.score*Ph)}}if(o&&w.length>1){let k=new Map(w.map($=>[$.ind.id,$.score])),E=new Map;for(let $ of["calls","callsSymbol"])for(let v of ve(e,$)){let A=_n(e,v.subject),T=_n(e,v.object);!A||!T||A===T||!k.has(A)&&!k.has(T)||(E.has(A)||E.set(A,new Set),E.has(T)||E.set(T,new Set),E.get(A).add(T),E.get(T).add(A))}for(let $ of w){let v=0;for(let A of E.get($.ind.id)||[])v=Math.max(v,k.get(A)||0);$.score+=Math.min(v*Dh,$.score*Bh)}}if(r&&w.length>1){let k=new Map(w.map($=>[$.ind.id,$.score])),E=new Map;for(let $ of e.individuals)($.class||"")==="Class"&&$.label&&E.set(String($.label),$);for(let $ of w){if(!Wh($.ind.label))continue;let v=0;for(let A of ve(e,"inherits")){if(_n(e,A.subject)!==$.ind.id||!qh(A.objectLabel))continue;let C=_n(e,A.object);if(!C){let S=E.get(String(A.objectLabel||""));S&&(C=dn(e,S))}C&&(v=Math.max(v,k.get(C)||0))}$.score+=Math.min(v*Uh,$.score*Gh)}}if(l&&w.length&&e.proseIndex){let k=fs(e.proseIndex,t.join(" "),{limit:Kh});if(k.length){let E=new Map;for(let{id:$,score:v}of k){let A=_n(e,$);A&&E.set(A,(E.get(A)||0)+v)}for(let $ of w){let v=E.get($.ind.id)||0;v&&($.score+=Math.min(v*Vh,$.score*Hh))}}}if(c&&w.length&&e.proseIndex){let k=new Map(w.map(v=>[v.ind.id,v])),E=new Map(f.map(v=>[v.ind.id,v])),$=new Map;for(let v of new Set(t)){let A=h.get(v)||0;if(!A)continue;let{ids:T}=Il(e.proseIndex,v);if(!T.length)continue;let C=new Set;for(let S of T){let R=_n(e,S);if(!R||C.has(R)||(C.add(R),!k.has(R)))continue;let N=E.get(R);N&&(N.symSet.has(v)||N.symComps.has(v)||N.labelLc.includes(v))||$.set(R,($.get(R)||0)+A*Jh)}}for(let v of w){let A=$.get(v.ind.id)||0;A&&(v.score+=Math.min(A*Yh,v.score*Xh))}}return i&&w.length>1&&mg(e,w,m),a&&w.length&&fg(e,w,{depth:Number.isFinite(n.spiralDepth)&&n.spiralDepth>0?n.spiralDepth:ru,q:Number.isFinite(n.mostDistinctiveBeams)&&n.mostDistinctiveBeams>0?n.mostDistinctiveBeams:au,nodeLimit:Number.isFinite(n.spiralNodeLimit)&&n.spiralNodeLimit>0?n.spiralNodeLimit:iu}),w.sort((k,E)=>E.score-k.score||E.density-k.density||k.defineCount-E.defineCount||String(k.ind.label).length-String(E.ind.label).length),w}function uu(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 lu(e,o,r).map(i=>({path:String(i.ind.label),score:i.score}))}function gg(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 Hi(e,{now:t=Date.now}={}){let n=String(e);if(n.length>Kl)return{error:`name pattern is ${n.length} characters; the limit is ${Kl}.`};let{quantifiers:s,quantifiedGroup:o,backreference:r}=gg(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>Yl)return{error:`name pattern "${n}" has ${s} quantifiers; the limit is ${Yl}.`};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()+Xl;else if(t()>a)throw new kr(`name pattern "${n}" exceeded its ${Xl}ms matching budget.`);return i.test(String(l).slice(0,hg))}}}function du(e,t,{limit:n=Er,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=Hi(r);if(p.error)return p.error;c=p}if(a&&a!=="module")try{return $g(e,i,{limit:n,kind:a,decFilter:l,nameRe:c})}catch(p){if(p instanceof kr)return p.message;throw p}if(!i.length&&!c&&!l)return"empty query";let u=lu(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:b}of d){let h=b.length?` \u2014 matching: ${et([...new Set(b)],Ih)}`:"";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 ve(e,t){let n=Jl.get(e);n||(n=new Map,Jl.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(An(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function _n(e,t){let n=e.byId?.get?.(t);if(n)return dn(e,n);let s=String(t||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function dn(e,t){if((t?.class||"")==="Module")return t.id;let n=bt(t);if(n)return`mod:${n.path}`;let s=String(t?.id||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function Ki(e){if(!e)return"";let t=e.end>e.start?`${e.start}-${e.end}`:`${e.start}`;return` [${e.path}:${t}]`}function Vs(e){return(e?.attributes||[]).find(t=>t.key==="decorators")?.value||""}function pu(e,t){let n=[`${t.label} \u2014 ${Rn(t.class)} (id: ${t.id})`],s=ve(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=Ki(a?bt(a):null),c=a?Vs(a):"",u=`${i.objectLabel||i.object}${l}${c?` @${c}`:""}`;((a?.class||"")==="Attribute"?r:o).push(u)}return o.length&&n.push(`methods (${o.length}): ${et(o,Ql)}`),r.length&&n.push(`attributes (${r.length}): ${et(r,Ql)}`),n.push("Use tmct_snippet <Class.member> for an exact body."),n.join(`
6
- `)}function mu(e,t){let n=bt(t),s=[`${t.label} \u2014 ${Rn(t.class)}${Ki(n)}`],o=Le(t,"params"),r=Le(t,"returns");(o||r||(t.class||"")==="Method"||(t.class||"")==="Function")&&s.push(`signature: ${t.label}(${o})${r?` -> ${r}`:""}`);let i=[];Le(t,"isStatic")&&i.push("static"),Le(t,"isAbstract")&&i.push("abstract"),Le(t,"isConstant")&&i.push("constant");let a=Le(t,"visibility");a&&i.push(a),i.length&&s.push(`flags: ${i.join(", ")}`);let l=Vs(t);l&&s.push(`decorators: @${l.split(", ").join(", @")}`);let c=Le(t,"raises");c&&s.push(`raises: ${c}`);let u=Le(t,"catches");u&&s.push(`catches: ${u}`);let d=Le(t,"self_fields");d&&s.push(`self fields: ${d}`);let m=Le(t,"value");m&&s.push(`value: ${m}`);let p=Le(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 fu(e,t){let n=ve(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 ${Rn(t.class)} (id: ${t.id})`];r.push(s.length?`extends: ${et(s,Zl)}`:"extends: (no internal/recorded base classes)");let i=[];for(let l of $r(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}): ${et(l,Zl)}`))):r.push("subclasses: none recorded \u2014 nothing extends it in the extracted graph."),r.join(`
8
- `)}function hu(e,{pkg:t=""}={}){let n=Wn(t),s=e.individuals.filter(u=>(u.class||"")==="Module"&&(!n||Wn(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 ve(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,wg).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): ${et(l.map(([u,d])=>`${u} (${d})`),bg)}`),c.push(a.length?`hub modules (most imported): ${a.join(", ")}`:"hub modules: none (no internal imports recorded)."),c.join(`
9
- `)}function bu(e,t){let n=dn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||bt(t)?.path||n,o=[...new Set(ve(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
- ${et(o,gu,`
1
+ (()=>{var sh=Object.defineProperty;var K=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(s){throw n=[s],s}};var zn=(e,t)=>{for(var n in t)sh(e,n,{get:t[n],enumerable:!0})};var Ze,tE,nE,sE,oE,rE,iE,aE,cE,lE,uE,dE,pE,mE,fE,hE,gE,J,ke,zt,fl,bE,wE,yE,Be=K(()=>{Ze=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},tE=Ze("createRequire"),nE=Ze("readFileSync"),sE=Ze("access"),oE=Ze("readFile"),rE=Ze("writeFile"),iE=Ze("appendFile"),aE=Ze("mkdir"),cE=Ze("mkdtemp"),lE=Ze("rename"),uE=Ze("unlink"),dE=Ze("rm"),pE=Ze("stat"),mE=Ze("copyFile"),fE=Ze("readdir"),hE=Ze("createReadStream"),gE=Ze("createWriteStream"),J=(...e)=>e.join("/"),ke=e=>String(e).replace(/\/[^/]*$/,""),zt=(...e)=>e.join("/"),fl="/",bE=Ze("randomBytes"),wE=Ze("spawnSync"),yE=Ze("createInterface")});var et,$E,xE,hl,De,hr,oh,Bn,rh,gr,gl,ih,ah,kE,ch,EE,SE,jE,_E,RE,Et=K(()=>{et=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},$E=et("createRequire"),xE=et("readFileSync"),hl=et("access"),De=et("readFile"),hr=et("writeFile"),oh=et("appendFile"),Bn=et("mkdir"),rh=et("mkdtemp"),gr=et("rename"),gl=et("unlink"),ih=et("rm"),ah=et("stat"),kE=et("copyFile"),ch=et("readdir"),EE=et("createReadStream"),SE=et("createWriteStream"),jE=et("randomBytes"),_E=et("spawnSync"),RE=et("createInterface")});function ls(e){return e.replace(lh,"").trim()}function Vt(e){let t=e;for(let n=0;n<2;n+=1){let s=t.replace(dh,"").trim();if(s=s.replace(mh,"").trim(),s===t)break;t=s}return t}var bl,jo,_o,qt,wl,sn,ji,lh,uh,dh,ph,mh,ae,fh,yl,ze,Bt,us,_i,Ri,Ai,vl,Ro,zs,$l,xl,ds,En,Sn,Bs,qe,kl,ps,ms,Un,ln,El,Ao,Us,br,Ws,Sl,jn=K(()=>{bl=["is a superclass of","are a superclass of","is a parent class of","are a parent class of","superclass","superclasses"],jo={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",...bl]},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"]}},_o=Object.freeze([...bl,"is the superclass of","are the superclass of","is the parent class of"]),qt=Object.freeze(["defined","declared","located","implemented"]),wl=Object.freeze(["now","currently","right now","at the moment","these days","today"]),sn=Object.freeze(["mentioned","referenced"]),ji=Object.freeze(["in this graph","in the graph","in this codebase","in the codebase","in this repo","in the repo","here"]),lh=new RegExp(`\\s+(?:${ji.join("|")})\\s*[?.!]*$`,"i");uh=Object.freeze(["then","though","too"]),dh=new RegExp(`\\s+(?:${uh.join("|")})\\s*[?.!]*$`,"i"),ph=Object.freeze(["please explain","explain"]),mh=new RegExp(`,\\s*(?:${ph.join("|")})\\s*[?.!]*$`,"i");ae=Object.freeze(Object.fromEntries(Object.entries(jo).flatMap(([e,{verbs:t}])=>t.map(n=>[n,e])))),fh=e=>!_o.includes(e),yl=Object.freeze([...new Set(Object.keys(ae).filter(fh).map(e=>e.match(/^(?:is|are)\s+an?\s+(.+)$/i)).filter(Boolean).map(e=>e[1].toLowerCase()))]),ze=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"}),Bt=Object.freeze({explicitly:"direct",directly:"direct",transitively:"transitive",indirectly:"transitive"}),us=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"}),_i=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"}),Ri=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"}),Ai=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"}),vl=/\b([a-z]{3,})in'/gi,Ro=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"]),zs=Object.freeze(["this","it","that","here","this one","that one"]),$l=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]}`}]),xl=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`}]),ds=Object.freeze(["mean","means","stand for","stands for","signify","signifies","represent","represents","refer to","refers to"]),En=Object.freeze(["that","which","who"]),Sn=Object.freeze(["something","anything","everything","somethings","things","thing","entities","entity","nodes","node","stuff","code","symbol","symbols"]),Bs=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"}),qe=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}}),kl=Object.freeze(new Set(["tests","test","anything","something","anyone","someone","any"])),ps=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"]),ms=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"]),Un=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"}),ln=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"}}),El=Object.freeze({tests:"Module",test:"Module"}),Ao=Object.freeze(["those","them","these"]),Us=Object.freeze(["contains","defines"]),br=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"]),Ws=Object.freeze({tally:"count",tallies:"count",sum:"count",total:"count",totals:"count"}),Sl=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 Al,Oe,Ct=K(()=>{Be();Al=J(".tmct","graph.json"),Oe=class extends Error{constructor(t){super(t),this.name="ToolError"}}});function un(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<=Cl)}function Ii(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>Cl||$h.has(s))&&!n.has(s)&&(n.add(s),t.push(s),t.length>=xh))break;return t}function yr({name:e,doc:t}={}){return[...new Set([...un(e),...Ii(t)])].sort()}function Il(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 fs(e,t,{limit:n=10}={}){let s=[...new Set([...un(t),...Ii(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 Ol(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 f of d)i.add(f);a.add(l)}}return i.size?{ids:[...i].sort(),via:[...a].sort().join("+")}:r}var $h,Cl,xh,Wn=K(()=>{$h=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+/)),Cl=40,xh=120});function Ll(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 Co(e){let t=String(e||"").trim();if(!t)return null;if(t.startsWith("reference:")){let s=t.slice(10),o=s.indexOf(":");return o<0?{kind:"reference",pack:s||"unknown",article:""}:{kind:"reference",pack:s.slice(0,o)||"unknown",article:s.slice(o+1)}}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",...Ll(n.slice(4))}:n.startsWith("teach:")?{kind:"teach",...Ll(n.slice(6))}:n.startsWith("web:")?{kind:"web",url:n.slice(4)}:n.startsWith("url:")?{kind:"web",url:n.slice(4)}: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 Sh(e){let t=(e?.attributes||[]).find(s=>s.prop==="mgx:sourceReliability")?.value;if(t===void 0)return Ml;let n=Number(t);return Number.isFinite(n)?Math.max(Oi,Math.min(Fl,n)):Ml}function jh(e,t=Date.now(),n=kh){let s=Date.parse(e);if(!Number.isFinite(s))return 1;let o=Math.max(0,t-s);return Nl+(1-Nl)*Math.pow(.5,o/n)}function Dl(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 m=t[p],b=Eh(m);if(!b)continue;i.push(b);let h=(Pl[b]??0)*Sh(m);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=jh(e?.createdAt,s,n.halfLifeMs),d=Li(Math.min(1,l*u)),f={sourceTypes:i.slice().sort(),corroboration:i.length,createdAt:e?.createdAt||"",recency:Li(u)};return{score:d,inputs:f}}function zl({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+_h),i=(o*r+1)/2;return Li(Oi+(Fl-Oi)*i)}var vr,Ni,It,hs,Pl,kh,Nl,Oi,Fl,Ml,Li,Eh,_h,Vs=K(()=>{vr="mgx:trustScore",Ni="mgx:trustInputs",It="mgx:createdAt",hs="mgx:updatedAt";Pl=Object.freeze({operator:1,teach:.95,provider:.9,corpus:.7,reference:.6,corpusWeak:.55,web:.4,extracted:.45,entailed:.3}),kh=720*60*60*1e3,Nl=.9,Oi=.5,Fl=1.5,Ml=1,Li=(e,t=6)=>Number(e.toFixed(t)),Eh=e=>(e?.attributes||[]).find(t=>t.prop==="mgx:sourceType")?.value||"";_h=19});var gs,Mi=K(()=>{gs=e=>/(^|\/)tests?\//.test(e)||/(^|\/)test_[^/]*\.py$/.test(e)||/\.tests(\.|$)/.test(e)});function Pi(e,t){return Math.log(1+e/(1+t))}var Io=K(()=>{});var xr={};zn(xr,{bfsLevels:()=>$r,findActionPath:()=>Fi,findReachableSet:()=>Di});function Bl(e){return e&&typeof e=="object"?JSON.stringify(e):String(e)}function Ul(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 Fi(e,t,n,{maxDepth:s=50,stateKey:o=Bl}={}){if(t(e))return{actions:[],states:[e]};let r=Ul(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:f}of n(c.state)||[]){let p=o(f);i.has(p)||l.push({state:f,actions:[...c.actions,d],states:[...c.states,f]})}}}r=l}return null}function Di(e,t,{maxDepth:n=50,stateKey:s=Bl}={}){let o=Ul(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:f}of t(c.state)||[]){let p=s(f);r.has(p)||l.push({state:f,actions:[...c.actions,d],states:[...c.states,f]})}}o=l}return i}function*$r(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 bs=K(()=>{});function Er(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 qi(e){return!e||!Array.isArray(e.individuals)?0:e.individuals.filter(t=>(t.class||"")==="Module").length}function An(e){let t=String(e?.prop||"").toLowerCase();if(Wl[t])return Wl[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 Gn(e){return String(e||"").trim().toLowerCase().replace(/^\.\//,"").replace(/^\//,"")}function zi(e){let t=Gn(e).split("/");return t[t.length-1]}function Rh(e){return(e?.derived_from||[]).filter(nu).length}function Gl(e){return(e?.mentions||[]).reduce((n,s)=>n+(Number(s?.count)||0),0)+Rh(e)}function Ut(e,t){let n=Gn(t);if(!n)return{match:null,candidates:[]};let s=zi(n),o=[];for(let r of e.individuals){let i=Gn(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||Gl(i.ind)-Gl(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 wt(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 Ah(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 ql(e){return e.prop?`${e.predicate} [${e.prop}]`:e.predicate}function Rn(e){let t=e||"Entity",n=un(t);return n.length<2?t:n.map(s=>s[0].toUpperCase()+s.slice(1)).join(" ")}function tt(e,t,n=", "){return e.length<=t?e.join(n):e.slice(0,t).join(n)+`, +${e.length-t} more`}function Vi(e,t,{candidates:n=[]}={}){let s=[];s.push(`${t.label} \u2014 ${Rn(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}=Ah(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(` ${ql(l)} (${c.length}) \u2192 ${tt(c.map(u=>u.objectLabel||u.object),Vl)}`);for(let{group:l,edges:c}of i)s.push(` \u2190 ${ql(l)} (${c.length}) by ${tt(c.map(u=>u.subjectLabel||u.subject),Vl)}`)}let a=t.derived_from||[];return a.length&&s.push(`provenance: ${tt(a,Th)}`),n.length&&s.push(`other matches: ${n.map(l=>`${l.label} (${Rn(l.class)})`).join(", ")}`),e.truncated.length&&s.push(Ch(e)),s.join(`
2
+ `)}function Ch(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 Ks(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=An(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=_n(e,c.subject),d=_n(e,c.object);if(!u||!d)continue;let f=e.byId.get(u)?.label||u;r(d,u,f,a.predicate),u!==d&&r(c.object,u,f,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 $r(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 su(e,t,{maxDepth:n=8}={}){let s=Ks(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>=Ih){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,Bi)){let u=c.tests.length?`tests: ${tt(c.tests,Oh)}`:"tests: none recorded",d=l===0?`${c.via} it`:"reaches it through an intermediary";o.push(` - ${c.label} (${d}) \u2014 ${u}`)}a.length>Bi&&o.push(` \u2026+${a.length-Bi} more at depth ${l+1}`)});let i=e.truncated.filter(a=>{let l=An({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 ou(e){let t=new Map;for(let n of e.relations)if(An(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 Kl(e){return new Set(String(e).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function lu(e,t,n=null){let s=n||(i=>_n(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 ve(e,i))r(s(a.subject),s(a.object));return o}function hg(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 m of c.values())u=Math.max(u,m);let d=[...c.entries()].sort((m,b)=>b[1]-m[1]),f=[],p=[];for(let[m,b]of d)b>=u*rg&&f.length<n?f.push([m,b]):p.length<Hl&&p.push([m,b]);return[f,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<cg&&i.length;c++){let u=new Map,d=[];for(let f of lg){let p=lu(e,f),m=new Map;for(let[g,y]of i)for(let w of p.get(g)||[])o.has(w)&&m.set(w,Math.max(m.get(w)||0,y));let[b,h]=r(m);for(let[g,y]of b)u.set(g,Math.max(u.get(g)||0,y));d.push(...h)}a.push(...d);for(let[f,p]of u){if(l.has(f))continue;let m=s.get(f);m&&(m.score+=Math.min(p*ig,m.score*ag),l.add(f))}i=[...u.entries()],!i.length&&a.length&&(i=a.splice(0,Hl).filter(([f])=>!l.has(f)))}}function gg(e,t=[],{depth:n=iu,q:s=cu,nodeLimit:o=au,kinds:r=ug,classPredicate:i=u=>(u.class||"")==="Module",idNormalizer:a=null,seeds:l=null,hubDegree:c=1/0}={}){let u=new Map(t.map(T=>[T.ind.id,T])),d=0;for(let T of t)d=Math.max(d,T.score);let f=t.length>0&&d>0,p=new Set(l??u.keys());if(!p.size)return[];let m=lu(e,r,a),b=T=>m.get(T)?.size||0,h=[],g=(T,C)=>T.hop!==C.hop?T.hop<C.hop:T.deg!==C.deg?T.deg<C.deg:T.id<C.id,y=(T,C)=>{let E=h[T];h[T]=h[C],h[C]=E},w=T=>{h.push(T);let C=h.length-1;for(;C>0;){let E=C-1>>1;if(g(h[C],h[E]))y(C,E),C=E;else break}},k=()=>{let T=h[0],C=h.pop();if(h.length){h[0]=C;let E=0;for(;;){let R=2*E+1,N=2*E+2,j=E;if(R<h.length&&g(h[R],h[j])&&(j=R),N<h.length&&g(h[N],h[j])&&(j=N),j===E)break;y(E,j),E=j}}return T},S=new Set(p);for(let T of p)w({id:T,hop:0,deg:b(T)});let $=null,v=0,A=[];for(;h.length&&v<o;){let T=k();if(A.push({id:T.id,hop:T.hop}),!p.has(T.id)){if(f){let R=d*dg*Math.pow(pg,T.hop-1),N=u.get(T.id);if(N)N.score+=Math.min(R*mg,N.score*fg);else{let j=e.byId?.get?.(T.id);if(j&&i(j)){$||($=ou(e));let _=$.get(j.id)||[],O={ind:j,score:R,defineCount:_.length,matching:[],density:0};t.push(O),u.set(T.id,O)}}}v++}if(T.hop>=n||T.hop>0&&b(T.id)>c)continue;let C=[];for(let R of m.get(T.id)||[]){if(S.has(R))continue;let N=e.byId?.get?.(R);!N||!i(N)||C.push({id:R,deg:b(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];S.add(N.id),w({id:N.id,hop:T.hop+1,deg:N.deg})}}return A}function uu(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,f=Number.isFinite(n.beamWidth)&&n.beamWidth>0?n.beamWidth:8,p=ou(e),m=[];for(let k of e.individuals){if((k.class||"")!=="Module")continue;let S=String(k.label),$=S.toLowerCase(),v=p.get(k.id)||[],A=new Set(v.map(E=>E.toLowerCase())),T=new Set;for(let E of v)for(let R of Kl(E))T.add(R);let C=u?String((k.attributes||[]).find(E=>E.key==="dotted")?.value||"").toLowerCase():"";m.push({ind:k,label:S,labelLc:$,defines:v,symSet:A,symComps:T,dotted:C})}let b=m.length||1,h=new Map,g=k=>{let S=0;for(let $ of m)($.labelLc.includes(k)||$.symComps.has(k)||$.symSet.has(k))&&S++;return S},y=k=>(h.has(k)||h.set(k,Pi(b,g(k))),h.get(k));for(let k of t)y(k);let w=[];for(let k of m){let S=0,$=0,v=0,A=[];for(let N of t){let j=h.get(N)||0;j&&(k.symSet.has(N)?(S+=j*ru,v++):k.symComps.has(N)&&(A.push(j),v++),k.labelLc.includes(N)&&($+=j*Nh))}A.sort((N,j)=>j-N);let T=0;for(let N=0;N<Math.min(A.length,Ph);N++)T+=A[N]*Mh;let C=S+$+T;if(!C)continue;s&&(gs(k.labelLc)||Bh(k.labelLc))?C*=zh:gs(k.labelLc)&&(C*=.4);let E=k.defines.filter(N=>{let j=N.toLowerCase(),_=Kl(N);return t.some(O=>j===O||_.has(O))}),R=k.defines.length?v/k.defines.length:0;w.push({ind:k.ind,score:C,defineCount:k.defines.length,matching:E,density:R})}if(u&&d&&w.length){let k=String(d).toLowerCase(),S=T=>T!=null&&/[a-z0-9_./]/.test(T),$=T=>{for(let C=k.indexOf(T);C!==-1;C=k.indexOf(T,C+1))if(!S(k[C-1])&&!S(k[C+T.length]))return!0;return!1},v=new Map(m.map(T=>[T.ind.id,T])),A=0;for(let T of w)A=Math.max(A,T.score);for(let T of w){let C=v.get(T.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<tg||!$(R))continue;let N=[...new Set(R.split(/[^a-z0-9_]+/).filter(Boolean))].map(y).sort((_,O)=>O-_),j=0;for(let _=0;_<Math.min(N.length,ng);_++)j+=N[_]*eg;E=Math.max(E,j)}E&&(T.score+=Math.min(E*sg,A*og))}}if(w.length>1){let k=new Map(w.map($=>[$.ind.id,$.score])),S=new Map;for(let $ of ve(e,"imports"))!k.has($.subject)&&!k.has($.object)||(S.has($.subject)||S.set($.subject,new Set),S.has($.object)||S.set($.object,new Set),S.get($.subject).add($.object),S.get($.object).add($.subject));for(let $ of w){let v=0;for(let A of S.get($.ind.id)||[])v=Math.max(v,k.get(A)||0);$.score+=Math.min(v*Fh,$.score*Dh)}}if(o&&w.length>1){let k=new Map(w.map($=>[$.ind.id,$.score])),S=new Map;for(let $ of["calls","callsSymbol"])for(let v of ve(e,$)){let A=_n(e,v.subject),T=_n(e,v.object);!A||!T||A===T||!k.has(A)&&!k.has(T)||(S.has(A)||S.set(A,new Set),S.has(T)||S.set(T,new Set),S.get(A).add(T),S.get(T).add(A))}for(let $ of w){let v=0;for(let A of S.get($.ind.id)||[])v=Math.max(v,k.get(A)||0);$.score+=Math.min(v*Uh,$.score*Wh)}}if(r&&w.length>1){let k=new Map(w.map($=>[$.ind.id,$.score])),S=new Map;for(let $ of e.individuals)($.class||"")==="Class"&&$.label&&S.set(String($.label),$);for(let $ of w){if(!Vh($.ind.label))continue;let v=0;for(let A of ve(e,"inherits")){if(_n(e,A.subject)!==$.ind.id||!Hh(A.objectLabel))continue;let C=_n(e,A.object);if(!C){let E=S.get(String(A.objectLabel||""));E&&(C=dn(e,E))}C&&(v=Math.max(v,k.get(C)||0))}$.score+=Math.min(v*Gh,$.score*qh)}}if(l&&w.length&&e.proseIndex){let k=fs(e.proseIndex,t.join(" "),{limit:Xh});if(k.length){let S=new Map;for(let{id:$,score:v}of k){let A=_n(e,$);A&&S.set(A,(S.get(A)||0)+v)}for(let $ of w){let v=S.get($.ind.id)||0;v&&($.score+=Math.min(v*Kh,$.score*Yh))}}}if(c&&w.length&&e.proseIndex){let k=new Map(w.map(v=>[v.ind.id,v])),S=new Map(m.map(v=>[v.ind.id,v])),$=new Map;for(let v of new Set(t)){let A=h.get(v)||0;if(!A)continue;let{ids:T}=Ol(e.proseIndex,v);if(!T.length)continue;let C=new Set;for(let E of T){let R=_n(e,E);if(!R||C.has(R)||(C.add(R),!k.has(R)))continue;let N=S.get(R);N&&(N.symSet.has(v)||N.symComps.has(v)||N.labelLc.includes(v))||$.set(R,($.get(R)||0)+A*Zh)}}for(let v of w){let A=$.get(v.ind.id)||0;A&&(v.score+=Math.min(A*Jh,v.score*Qh))}}return i&&w.length>1&&hg(e,w,f),a&&w.length&&gg(e,w,{depth:Number.isFinite(n.spiralDepth)&&n.spiralDepth>0?n.spiralDepth:iu,q:Number.isFinite(n.mostDistinctiveBeams)&&n.mostDistinctiveBeams>0?n.mostDistinctiveBeams:cu,nodeLimit:Number.isFinite(n.spiralNodeLimit)&&n.spiralNodeLimit>0?n.spiralNodeLimit:au}),w.sort((k,S)=>S.score-k.score||S.density-k.density||k.defineCount-S.defineCount||String(k.ind.label).length-String(S.ind.label).length),w}function du(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 uu(e,o,r).map(i=>({path:String(i.ind.label),score:i.score}))}function wg(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 Hi(e,{now:t=Date.now}={}){let n=String(e);if(n.length>Yl)return{error:`name pattern is ${n.length} characters; the limit is ${Yl}.`};let{quantifiers:s,quantifiedGroup:o,backreference:r}=wg(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>Xl)return{error:`name pattern "${n}" has ${s} quantifiers; the limit is ${Xl}.`};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()+Jl;else if(t()>a)throw new kr(`name pattern "${n}" exceeded its ${Jl}ms matching budget.`);return i.test(String(l).slice(0,bg))}}}function pu(e,t,{limit:n=Sr,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=Hi(r);if(p.error)return p.error;c=p}if(a&&a!=="module")try{return kg(e,i,{limit:n,kind:a,decFilter:l,nameRe:c})}catch(p){if(p instanceof kr)return p.message;throw p}if(!i.length&&!c&&!l)return"empty query";let u=uu(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),f=[`${u.length} module(s) match "${t}" (top ${d.length}):`];for(let{ind:p,defineCount:m,matching:b}of d){let h=b.length?` \u2014 matching: ${tt([...new Set(b)],Lh)}`:"";f.push(`- ${p.label} (defines ${m} symbol(s))${h}`)}return f.push("Then tmct_describe <path> for the full sibling list + typed edges, or tmct_impact <path> for dependents."),f.join(`
4
+ `)}function ve(e,t){let n=Ql.get(e);n||(n=new Map,Ql.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(An(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function _n(e,t){let n=e.byId?.get?.(t);if(n)return dn(e,n);let s=String(t||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function dn(e,t){if((t?.class||"")==="Module")return t.id;let n=wt(t);if(n)return`mod:${n.path}`;let s=String(t?.id||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function Ki(e){if(!e)return"";let t=e.end>e.start?`${e.start}-${e.end}`:`${e.start}`;return` [${e.path}:${t}]`}function Hs(e){return(e?.attributes||[]).find(t=>t.key==="decorators")?.value||""}function mu(e,t){let n=[`${t.label} \u2014 ${Rn(t.class)} (id: ${t.id})`],s=ve(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=Ki(a?wt(a):null),c=a?Hs(a):"",u=`${i.objectLabel||i.object}${l}${c?` @${c}`:""}`;((a?.class||"")==="Attribute"?r:o).push(u)}return o.length&&n.push(`methods (${o.length}): ${tt(o,Zl)}`),r.length&&n.push(`attributes (${r.length}): ${tt(r,Zl)}`),n.push("Use tmct_snippet <Class.member> for an exact body."),n.join(`
6
+ `)}function fu(e,t){let n=wt(t),s=[`${t.label} \u2014 ${Rn(t.class)}${Ki(n)}`],o=Ne(t,"params"),r=Ne(t,"returns");(o||r||(t.class||"")==="Method"||(t.class||"")==="Function")&&s.push(`signature: ${t.label}(${o})${r?` -> ${r}`:""}`);let i=[];Ne(t,"isStatic")&&i.push("static"),Ne(t,"isAbstract")&&i.push("abstract"),Ne(t,"isConstant")&&i.push("constant");let a=Ne(t,"visibility");a&&i.push(a),i.length&&s.push(`flags: ${i.join(", ")}`);let l=Hs(t);l&&s.push(`decorators: @${l.split(", ").join(", @")}`);let c=Ne(t,"raises");c&&s.push(`raises: ${c}`);let u=Ne(t,"catches");u&&s.push(`catches: ${u}`);let d=Ne(t,"self_fields");d&&s.push(`self fields: ${d}`);let f=Ne(t,"value");f&&s.push(`value: ${f}`);let p=Ne(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 hu(e,t){let n=ve(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 ${Rn(t.class)} (id: ${t.id})`];r.push(s.length?`extends: ${tt(s,eu)}`:"extends: (no internal/recorded base classes)");let i=[];for(let l of $r(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}): ${tt(l,eu)}`))):r.push("subclasses: none recorded \u2014 nothing extends it in the extracted graph."),r.join(`
8
+ `)}function gu(e,{pkg:t=""}={}){let n=Gn(t),s=e.individuals.filter(u=>(u.class||"")==="Module"&&(!n||Gn(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 ve(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,vg).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): ${tt(l.map(([u,d])=>`${u} (${d})`),yg)}`),c.push(a.length?`hub modules (most imported): ${a.join(", ")}`:"hub modules: none (no internal imports recorded)."),c.join(`
9
+ `)}function wu(e,t){let n=dn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||wt(t)?.path||n,o=[...new Set(ve(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
+ ${tt(o,bu,`
11
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
- ${yg}`}function wu(e){let t=new Set,n=new Set;for(let o of ve(e,"tests"))t.add(o.object),n.add(o.subject);let s=e.individuals.filter(o=>(o.class||"")==="Module"&&!n.has(o.id)&&!gs(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
- ${et(s,gu,`
14
- `)}`:"every source module has at least one covering test module."}function yu(e,t){let n=dn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ve(e,"touches").filter(r=>r.object===n).map(r=>r.subjectLabel||r.subject);return o.length?`${s}: touched by ${o.length} recent commit(s): ${et(o,Ot)}`:`${s}: no commit history recorded (outside the git-log window or unmodified).`}function $u(e,t){if(vu.has(t.class)){let r=[...new Set(ve(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
- ${et(r,Io,`
12
+ ${$g}`}function yu(e){let t=new Set,n=new Set;for(let o of ve(e,"tests"))t.add(o.object),n.add(o.subject);let s=e.individuals.filter(o=>(o.class||"")==="Module"&&!n.has(o.id)&&!gs(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
+ ${tt(s,bu,`
14
+ `)}`:"every source module has at least one covering test module."}function vu(e,t){let n=dn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ve(e,"touches").filter(r=>r.object===n).map(r=>r.subjectLabel||r.subject);return o.length?`${s}: touched by ${o.length} recent commit(s): ${tt(o,Ot)}`:`${s}: no commit history recorded (outside the git-log window or unmodified).`}function xu(e,t){if($u.has(t.class)){let r=[...new Set(ve(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
+ ${tt(r,Oo,`
16
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=dn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=[...new Set(ve(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
- ${et(o,Io,`
18
- `)}`:`${s}: no recorded callers (calls are coarse/import-backed \u2014 absence is not proof). Try tmct_impact for the full reverse closure.`}function xu(e,t){if(vu.has(t.class)){let r=[...new Set(ve(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
- ${et(r,Io,`
17
+ ${tt(o,Oo,`
18
+ `)}`:`${s}: no recorded callers (calls are coarse/import-backed \u2014 absence is not proof). Try tmct_impact for the full reverse closure.`}function ku(e,t){if($u.has(t.class)){let r=[...new Set(ve(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
+ ${tt(r,Oo,`
20
20
  `)}`:`${t.label}: no recorded callees (calls only stdlib/external, or fine-grained call edges are not in the extracted graph).`}let n=dn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=[...new Set(ve(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
- ${et(o,Io,`
22
- `)}`:`${s}: no recorded callees.`}function ku(e,t){let n=e.byId.get(t.object),s=n?bt(n):null;return`${t.objectLabel||n?.label||t.object}${s?` [${s.path}:${s.start}]`:""}`}function Yi(e,t){if(!t?.id)return"";let n=ve(e,"callsSymbol").filter(s=>s.subject===t.id);return n.length?`calls in-repo: ${et(n.map(s=>ku(e,s)),vg)}`:""}function Su(e,t){let n=ve(e,"callsSymbol").filter(o=>o.subject===t.id);if(!n.length)return`${t.label} \u2014 ${Rn(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=>ku(e,o));return`${t.label} \u2014 ${Rn(t.class)} calls ${n.length} in-repo symbol(s):
23
- ${et(s,Io,`
24
- `)}`}function Eu(e,t,n){let s=e.byId.get(t),o=s?.label||n||t,r=Le(s,"commitDate")||Le(s,"date"),i=Le(s,"commitAuthor")||Le(s,"author"),a=Le(s,"commitMessage")||Le(s,"message"),l=[o,r,i].filter(Boolean).join(" ");return a?`${l} \u2014 ${a}`:l}function ju(e,t){let n=dn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ve(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,Ot).map(a=>` ${Eu(e,a.subject,a.subjectLabel)}`),i=o.length>Ot?`
21
+ ${tt(o,Oo,`
22
+ `)}`:`${s}: no recorded callees.`}function Eu(e,t){let n=e.byId.get(t.object),s=n?wt(n):null;return`${t.objectLabel||n?.label||t.object}${s?` [${s.path}:${s.start}]`:""}`}function Yi(e,t){if(!t?.id)return"";let n=ve(e,"callsSymbol").filter(s=>s.subject===t.id);return n.length?`calls in-repo: ${tt(n.map(s=>Eu(e,s)),xg)}`:""}function Su(e,t){let n=ve(e,"callsSymbol").filter(o=>o.subject===t.id);if(!n.length)return`${t.label} \u2014 ${Rn(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=>Eu(e,o));return`${t.label} \u2014 ${Rn(t.class)} calls ${n.length} in-repo symbol(s):
23
+ ${tt(s,Oo,`
24
+ `)}`}function ju(e,t,n){let s=e.byId.get(t),o=s?.label||n||t,r=Ne(s,"commitDate")||Ne(s,"date"),i=Ne(s,"commitAuthor")||Ne(s,"author"),a=Ne(s,"commitMessage")||Ne(s,"message"),l=[o,r,i].filter(Boolean).join(" ");return a?`${l} \u2014 ${a}`:l}function _u(e,t){let n=dn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ve(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,Ot).map(a=>` ${ju(e,a.subject,a.subjectLabel)}`),i=o.length>Ot?`
25
25
  \u2026+${o.length-Ot} more`:"";return`${s}: touched by ${o.length} recent commit(s):
26
26
  ${r.join(`
27
- `)}${i}`}function _u(e,t){let n=ve(e,"touchesSymbol").filter(r=>r.object===t.id);if(!n.length)return`${t.label} \u2014 ${Rn(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,Ot).map(r=>` ${Eu(e,r.subject,r.subjectLabel)}`),o=n.length>Ot?`
27
+ `)}${i}`}function Ru(e,t){let n=ve(e,"touchesSymbol").filter(r=>r.object===t.id);if(!n.length)return`${t.label} \u2014 ${Rn(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,Ot).map(r=>` ${ju(e,r.subject,r.subjectLabel)}`),o=n.length>Ot?`
28
28
  \u2026+${n.length-Ot} more`:"";return`${t.label} \u2014 ${Rn(t.class)}: touched by ${n.length} commit(s):
29
29
  ${s.join(`
30
- `)}${o}`}function Ru(e,t){return _u(e,t)}function Au(e,t){return _u(e,t)}function Xi(e,t,{kind:n,decFilter:s="",nameRe:o=null}={}){let r=Tu[n];if(!r)return[];let i=[];for(let a of e.individuals){if((a.class||"")!==r||o&&!o.test(a.label)||s&&!Vs(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 $g(e,t,{limit:n=Er,kind:s,decFilter:o,nameRe:r}){if(!Tu[s])return`unknown kind "${s}" (use function, class, method, attribute, or module).`;let a=Xi(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}${Ki(bt(u))}`);return c.push("Then tmct_snippet <name> for the exact body, or tmct_describe for its edges."),c.join(`
31
- `)}function Cg(e){return{paramCount:jr(e?.params),hasReturns:!!e?.returns,hasRaises:!!e?.raises,callees:e?.callees instanceof Set?e.callees:new Set}}function Ig(e){if(!e.length)return{paramCount:0,hasReturns:!1,hasRaises:!1,callees:new Set};let t=e.map(i=>jr(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:Tg(t),hasReturns:n*2>=e.length,hasRaises:s*2>=e.length,callees:r}}function Og(e,t){if(!t)return 0;let n=Math.max(0,4-Math.abs(jr(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 Lg(e,{decorators:t="",label:n="",site:s=null}={},o=null){let r=new Map;for(let m of e)for(let p of Ui(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(Ui(t)),c=l.size?l:new Set(i?[i]:[]),u=new Set(eu(n)),d=s?.start??null;for(let m of e){let p=Ui(m.decorators).some(g=>c.has(g))?1:0,f=eu(m.label).filter(g=>u.has(g)).length,b=Og(m,o),h=d!=null&&m.site?1/(1+Math.abs(m.site.start-d)):0;m._score=p*1e3+f*50+b+h}return[...e].sort((m,p)=>p._score-m._score||(m.site?.start||0)-(p.site?.start||0))}function Ks(e,t){let n=dn(e,t),s=e.byId.get(n)?.label||String(n||"").replace(/^mod:/,""),o=ve(e,"defines").filter(S=>S.subject===n),r=new Map;for(let S of ve(e,"callsSymbol"))r.has(S.subject)||r.set(S.subject,new Set),r.get(S.subject).add(S.object);let i=[],a=[],l=0;for(let S of o){let R=e.byId.get(S.object);if(!R)continue;let N=R.class||"",j=bt(R);N==="GlobalVariable"?(a.push({label:R.label,value:(R.attributes||[]).find(_=>_.key==="value")?.value||"",site:j}),j&&(l=Math.max(l,j.end))):(N==="Function"||N==="Class")&&(i.push({id:R.id,label:R.label,class:N,site:j,decorators:Vs(R),raises:Le(R,"raises"),doc:Le(R,"doc"),params:Le(R,"params"),returns:Le(R,"returns"),callees:r.get(R.id)||new Set}),j&&(l=Math.max(l,j.end)))}let c=bt(t),u=c&&(t.class||"")!=="Module"?{id:t.id,label:t.label,class:t.class||"",site:c,decorators:Vs(t),raises:Le(t,"raises"),params:Le(t,"params"),returns:Le(t,"returns"),callees:r.get(t.id)||new Set}:null,d=i.length,m=u?Cg(u):Ig(i);i=Lg(i,u||{label:t.label},m);let p=u?null:i.find(S=>S.site&&S.label!==t.label)||null,f=[...new Set(ve(e,"tests").filter(S=>S.object===n).map(S=>S.subjectLabel||S.subject))].slice(0,Eg),b=Lu(e,n).slice(0,Sg),h=ve(e,"reexports").filter(S=>S.subject===n).map(S=>S.objectLabel||S.object).slice(0,20),g=Le(e.byId.get(n),"all"),y=ve(e,"contains"),w=null;(t.class||"")==="Class"?w=t.id:(t.class||"")==="Method"&&(w=y.find(S=>S.object===t.id)?.subject||null);let k=null;if(w){let S=e.byId.get(w),R=y.filter(N=>N.subject===w).map(N=>{let j=e.byId.get(N.object);return{label:N.objectLabel||j?.label||N.object,class:j?.class||"",site:j?bt(j):null,decorators:j?Vs(j):"",params:j?Le(j,"params"):"",returns:j?Le(j,"returns"):"",raises:j?Le(j,"raises"):""}}).slice(0,kg);k={className:S?.label||String(w).replace(/^fn:.*#/,""),members:R,total:y.filter(N=>N.subject===w).length}}let E=null;for(let S of[...i,...a])S.site&&(!E||S.site.start>E.start)&&(E=S.site);let $=E?{start:E.start,end:E.end}:null,v=u||p,A=v?.id?e.byId.get(v.id):null,T=A?Yi(e,A):"",C=[];if(v?.callees)for(let S of v.callees){let R=e.byId.get(S),N=R?bt(R):null;if(N&&C.push({label:R.label,site:N}),C.length>=Ag)break}return{modId:n,moduleLabel:s,anchor:u,siblings:i,totalSiblings:d,exemplar:p,globals:a,tests:f,cochange:b,exports:h,allExports:g,classMembers:k,insertion:l,insertionRegion:$,calleeBodies:C,callHint:T,siblingCap:xg}}function ws(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 Cu(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 _r(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=jr(s.params);(i>jg||a>_g||s.raises)&&(o="MID");let l=!1;if(e.anchor)for(let u of s.callees||[]){let d=t.byId.get(u),m=d?bt(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)>=Rg;(l||c)&&(o="LARGE")}else o="MID";return{tier:o,mask:ws(o),topup:o!=="TINY"}}function Iu(e){let t=[`Additional context for ${e.moduleLabel} (sections omitted from the lean bundle):`];if(e.classMembers&&e.classMembers.members.length){t.push(`
30
+ `)}${o}`}function Au(e,t){return Ru(e,t)}function Tu(e,t){return Ru(e,t)}function Xi(e,t,{kind:n,decFilter:s="",nameRe:o=null}={}){let r=Cu[n];if(!r)return[];let i=[];for(let a of e.individuals){if((a.class||"")!==r||o&&!o.test(a.label)||s&&!Hs(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 kg(e,t,{limit:n=Sr,kind:s,decFilter:o,nameRe:r}){if(!Cu[s])return`unknown kind "${s}" (use function, class, method, attribute, or module).`;let a=Xi(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}${Ki(wt(u))}`);return c.push("Then tmct_snippet <name> for the exact body, or tmct_describe for its edges."),c.join(`
31
+ `)}function Og(e){return{paramCount:jr(e?.params),hasReturns:!!e?.returns,hasRaises:!!e?.raises,callees:e?.callees instanceof Set?e.callees:new Set}}function Lg(e){if(!e.length)return{paramCount:0,hasReturns:!1,hasRaises:!1,callees:new Set};let t=e.map(i=>jr(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:Ig(t),hasReturns:n*2>=e.length,hasRaises:s*2>=e.length,callees:r}}function Ng(e,t){if(!t)return 0;let n=Math.max(0,4-Math.abs(jr(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 Mg(e,{decorators:t="",label:n="",site:s=null}={},o=null){let r=new Map;for(let f of e)for(let p of Ui(f.decorators))r.set(p,(r.get(p)||0)+1);let i="",a=1;for(let[f,p]of r)p>a&&(a=p,i=f);let l=new Set(Ui(t)),c=l.size?l:new Set(i?[i]:[]),u=new Set(tu(n)),d=s?.start??null;for(let f of e){let p=Ui(f.decorators).some(g=>c.has(g))?1:0,m=tu(f.label).filter(g=>u.has(g)).length,b=Ng(f,o),h=d!=null&&f.site?1/(1+Math.abs(f.site.start-d)):0;f._score=p*1e3+m*50+b+h}return[...e].sort((f,p)=>p._score-f._score||(f.site?.start||0)-(p.site?.start||0))}function Ys(e,t){let n=dn(e,t),s=e.byId.get(n)?.label||String(n||"").replace(/^mod:/,""),o=ve(e,"defines").filter(E=>E.subject===n),r=new Map;for(let E of ve(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||"",j=wt(R);N==="GlobalVariable"?(a.push({label:R.label,value:(R.attributes||[]).find(_=>_.key==="value")?.value||"",site:j}),j&&(l=Math.max(l,j.end))):(N==="Function"||N==="Class")&&(i.push({id:R.id,label:R.label,class:N,site:j,decorators:Hs(R),raises:Ne(R,"raises"),doc:Ne(R,"doc"),params:Ne(R,"params"),returns:Ne(R,"returns"),callees:r.get(R.id)||new Set}),j&&(l=Math.max(l,j.end)))}let c=wt(t),u=c&&(t.class||"")!=="Module"?{id:t.id,label:t.label,class:t.class||"",site:c,decorators:Hs(t),raises:Ne(t,"raises"),params:Ne(t,"params"),returns:Ne(t,"returns"),callees:r.get(t.id)||new Set}:null,d=i.length,f=u?Og(u):Lg(i);i=Mg(i,u||{label:t.label},f);let p=u?null:i.find(E=>E.site&&E.label!==t.label)||null,m=[...new Set(ve(e,"tests").filter(E=>E.object===n).map(E=>E.subjectLabel||E.subject))].slice(0,_g),b=Nu(e,n).slice(0,jg),h=ve(e,"reexports").filter(E=>E.subject===n).map(E=>E.objectLabel||E.object).slice(0,20),g=Ne(e.byId.get(n),"all"),y=ve(e,"contains"),w=null;(t.class||"")==="Class"?w=t.id:(t.class||"")==="Method"&&(w=y.find(E=>E.object===t.id)?.subject||null);let k=null;if(w){let E=e.byId.get(w),R=y.filter(N=>N.subject===w).map(N=>{let j=e.byId.get(N.object);return{label:N.objectLabel||j?.label||N.object,class:j?.class||"",site:j?wt(j):null,decorators:j?Hs(j):"",params:j?Ne(j,"params"):"",returns:j?Ne(j,"returns"):"",raises:j?Ne(j,"raises"):""}}).slice(0,Sg);k={className:E?.label||String(w).replace(/^fn:.*#/,""),members:R,total:y.filter(N=>N.subject===w).length}}let S=null;for(let E of[...i,...a])E.site&&(!S||E.site.start>S.start)&&(S=E.site);let $=S?{start:S.start,end:S.end}:null,v=u||p,A=v?.id?e.byId.get(v.id):null,T=A?Yi(e,A):"",C=[];if(v?.callees)for(let E of v.callees){let R=e.byId.get(E),N=R?wt(R):null;if(N&&C.push({label:R.label,site:N}),C.length>=Cg)break}return{modId:n,moduleLabel:s,anchor:u,siblings:i,totalSiblings:d,exemplar:p,globals:a,tests:m,cochange:b,exports:h,allExports:g,classMembers:k,insertion:l,insertionRegion:$,calleeBodies:C,callHint:T,siblingCap:Eg}}function ws(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 Iu(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 _r(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=jr(s.params);(i>Rg||a>Ag||s.raises)&&(o="MID");let l=!1;if(e.anchor)for(let u of s.callees||[]){let d=t.byId.get(u),f=d?wt(d):null;if(f&&f.path!==e.moduleLabel){l=!0;break}}let c=(e.anchor?.class||"")==="Method"&&Number(e.classMembers?.total||e.classMembers?.members?.length||0)>=Tg;(l||c)&&(o="LARGE")}else o="MID";return{tier:o,mask:ws(o),topup:o!=="TINY"}}function Ou(e){let t=[`Additional context for ${e.moduleLabel} (sections omitted from the lean bundle):`];if(e.classMembers&&e.classMembers.members.length){t.push(`
32
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(`
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 Ou(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 Lu(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
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
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(`
@@ -45,121 +45,126 @@ ${s.join(`
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 Lu(e,t){let n=[];for(let s of ve(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 Nu(e,t){let n=dn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=Lu(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,Gi).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>Gi?`
51
- \u2026+${o.length-Gi} more`:"")}function Mu(e,t){let n=dn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ve(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,Wi).map(i=>{let a=e.byId.get(i.object),l=a?bt(a):null,c=l?` \u2190 ${l.path}`:"";return`${i.objectLabel||i.object}${c}`});return`${s} \u2014 public API (${o.length} export(s)):
48
+ `)}function Nu(e,t){let n=[];for(let s of ve(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 Mu(e,t){let n=dn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=Nu(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,Wi).map(i=>`${i.label} (\xD7${i.weight})`);return`${s} \u2014 usually changes together with ${o.length} module(s) (edit these too):
52
49
  ${r.join(`
53
50
  `)}`+(o.length>Wi?`
54
- \u2026+${o.length-Wi} more`:"")}var Ul,tu,ql,Rh,Th,Bi,Ch,Er,Ih,Oh,Lh,ou,Nh,Mh,Ph,Fh,zh,Dh,Bh,Uh,Gh,Wh,qh,Vh,Hh,Kh,Yh,Xh,Jh,Qh,Zh,eg,tg,ng,sg,og,rg,Vl,ig,ag,ru,iu,au,cg,lg,ug,dg,pg,Kl,Yl,hg,Xl,kr,Jl,Ql,Zl,Io,Le,bg,wg,gu,yg,Ot,vu,vg,Tu,xg,kg,Sg,Eg,jg,_g,Rg,Ag,Ui,eu,jr,Tg,Gi,Wi,Ae=K(()=>{Gn();To();Mi();Co();bs();Ul={"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"};tu=e=>/^(git|turn):/.test(String(e||""));ql=30,Rh=8;Th=2,Bi=25,Ch=3;Er=10,Ih=8,Oh=3,Lh=2,ou=5,Nh=4,Mh=.2,Ph=.35,Fh=.15,zh=e=>/(^|\/)(examples?|fixtures?|samples?|demos?|benchmarks?|test-[^/]+)(\/|$)/.test(e),Dh=.2,Bh=.35,Uh=.2,Gh=.35,Wh=e=>/\.cs$/i.test(e),qh=e=>/^I[A-Z]/.test(String(e||"")),Vh=.2,Hh=.35,Kh=50,Yh=.2,Xh=.35,Jh=.5,Qh=ou,Zh=3,eg=4,tg=1,ng=.9,sg=.5,og=.2,rg=.35,Vl=4,ig=2,ag=[["imports"],["calls","callsSymbol"],["inherits"],["cochange"]],ru=3,iu=12,au=.9,cg=["imports","calls","callsSymbol","inherits"],lg=.5,ug=.6,dg=.2,pg=.35;Kl=128,Yl=4,hg=64,Xl=250,kr=class extends Error{};Jl=new WeakMap;Ql=40,Zl=40,Io=30;Le=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value||"";bg=25,wg=15;gu=40,yg="tests edges are recorded module to module, so this is module-grain coverage.";Ot=15;vu=new Set(["Function","Method"]);vg=8;Tu={function:"Function",class:"Class",method:"Method",attribute:"Attribute"};xg=8,kg=16,Sg=4,Eg=6,jg=12,_g=2,Rg=8,Ag=3,Ui=e=>String(e||"").split(",").map(t=>t.trim()).filter(Boolean),eu=e=>String(e||"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),jr=e=>{let t=String(e||"").trim();return t?t.split(",").map(n=>n.trim()).filter(Boolean).length:0},Tg=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};Gi=20;Wi=40});function Ve(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Gu(e){let t=String(e||"");return Pu&&(t=t.replace(Pu," ")),t.replace(/\s+/g," ").trim()}function Wu(e){let t=String(e||"");t=t.replace(Xg," ").replace(/\s+/g," ").trim();for(let n=0;n<3;n++){let s=t,o=t.match(Kg);if(o&&(t=o[1].trim()),o=t.match(Yg),o&&(t=o[1].trim()),o=t.match(Fu),o&&(t=o[1].trim()),o=t.match(zu),o&&(t=o[1].trim()),o=t.match(Du),o&&(t=o[1].trim()),o=t.match(Bu),o&&(t=o[1].trim()),o=t.match(Jg),o&&(t=o[1].trim()),o=t.match(Qg),o&&ys.test(o[1].trim())&&(t=o[1].trim()),o=t.match(Zg),o&&ys.test(o[1].trim())&&(t=o[1].trim()),o=t.match(eb),o&&ys.test(o[1].trim())&&(t=o[1].trim()),o=t.match(tb),o&&ys.test(o[1].trim())&&(t=o[1].trim()),o=t.match(nb),o&&ys.test(o[1].trim())&&(t=o[1].trim()),o=t.match(sb),o&&(t=`what ${o[2].toLowerCase()} ${o[1].trim()}`),o=t.match(ob),o&&(t=`what does ${o[1].trim()} mean`),o=t.match(rb),o){let r=o[1].trim();Hg(r)||(t=Wg.test(r)||ys.test(r)?r:`describe ${r}`)}if(o=t.match(ib),o){let r=o[1].trim();(ys.test(r)||ab.test(r)||Bu.test(r)||Fu.test(r)||Du.test(r)||zu.test(r))&&(t=r)}if(t===s)break}return t}function ub(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t,o=t.match(cb);if(o&&(t=o[1].trim()),o=t.match(lb),o&&(t=o[1].trim()),t===s)break}return t}function pb(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t.match(db);if(!s)break;let o=s[1].trim();if(!o||o===t)break;t=o}return t}function hb(e){let t=String(e||""),n=t.match(fb);if(n){let o=Vu[n[1].toLowerCase()],r=qu[n[2].toLowerCase()];return`${o} ${r} ${n[3].trim()} and ${n[4].toLowerCase()}`}let s=t.match(Hu);return s?`which modules transitively import ${s[1].trim()}`:t}function Rr(e){return String(e||"").replace(Mg,t=>_i[t.toLowerCase()])}function vs(e){let t=Rr(e);return t=t.replace(Pg,n=>Ri[n.toLowerCase()]),t=t.replace(Fg,n=>Ai[n.toLowerCase()]),t=t.replace(zg,"with"),t=t.replace(Dg,(n,s)=>`${s} for`),t=t.replace(Bg,(n,s)=>`for ${s}`),t=t.replace(Ug,(n,s)=>s),t=t.replace(gb,"$1$2"),t=t.replace(yl,"$1ing"),t=Wu(t),t=pb(t),t=ub(t),t=hb(t),t=Gu(t),t=Vt(t),t=t.replace(/\?{2,}\s*$/,"?"),t.replace(/\s+/g," ").trim()}function Oo(e){for(let t of[...$l,...vl]){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function Ji(e){for(let t of bb){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function Ku(e){let t=String(e||"").match(wb);if(!t)return null;let n=t[1].toLowerCase(),s=t[2].trim();return s?{entWord:n,predicate:s}:null}var Ng,Mg,Uu,Pg,Fg,zg,Dg,Bg,Ug,Gg,Pu,Wg,ys,qg,Vg,Hg,Kg,Yg,Fu,zu,Du,Xg,Jg,Qg,Zg,eb,tb,nb,sb,ob,rb,ib,ab,Bu,cb,lb,db,qu,Vu,mb,fb,Hu,gb,bb,wb,tt,Kt,ue,qn=K(()=>{jn();Ng=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Ve).join("|")+")\\b","gi"),Mg=Ng(_i),Uu=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Ve).join("|")+")\\b(?!\\.[a-z0-9])","gi"),Pg=Uu(Ri),Fg=Uu(Ai),zg=/(?<=^|\s)w\/(?=\s|$)/gi,Dg=/\b(thx|thanks|thank\s+you|many\s+thanks|ty|cheers)\s+4\b/gi,Bg=/\b4\s+(example|instance)\b(?!\s*[a-z])/gi,Ug=/\b(this|that)\s+(class|module|function|method|attribute|variable|file|commit)\b/gi,Gg=Object.keys(ae).sort((e,t)=>t.length-e.length).map(Ve).join("|"),Pu=_o.length?new RegExp("\\b("+[..._o].sort((e,t)=>t.length-e.length).map(Ve).join("|")+")\\b\\s*,?","gi"):null;Wg=new RegExp("\\b(?:"+Object.keys(ae).sort((e,t)=>t.length-e.length).map(Ve).join("|")+")\\b","i"),ys=/^(?:which|what|who|whose|where|when|why|how)\b/i,qg=new Set(["modules","files","functions","methods","classes","attributes","fields","properties","variables","globals","commits","changes","tests","members"]),Vg=/^(?:all\s+|the\s+)?(?:module|file|function|method|class|attribute|field|property|variable|global|commit|change|test|member)\??$/i,Hg=e=>{if(Vg.test(e))return!0;let t=e.replace(/\?+\s*$/,"").trim().split(/\s+/);return qg.has((t[t.length-1]||"").toLowerCase())},Kg=/^(?: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,Yg=/^(?: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,Fu=/^(?:(?:ok(?:ay)?|aight|cool|alright|sure|right|fine|great|nice|got it|gotcha|sounds good|no worries|no problem)[\s,]+)+(.+)$/i,zu=/^(?: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,Du=/^(?:(?:maybe|possibly|perhaps)\s+)+(.+)$/i,Xg=/,?\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,Jg=/^(?:can|could|would|will)\s+you\s+(?:please\s+)?(.+?)(?:[,\s]+please)?\??$/i,Qg=/^explain\s+(?:to\s+me\s+|please\s+)*(.+?)\??$/i,Zg=/^tell\s+me\s+(.+?)\??$/i,eb=/^do\s+you\s+know\s+(.+?)\??$/i,tb=/^i(?:'d|\s+would)?\s+(?:(?:like|want|need)\s+to|wanna)\s+know\s+(.+?)\??$/i,nb=/^i(?:\s+was|\s+am|'m)?\s+(?:just\s+)?(?:wonder(?:ing|ed)?|curious)(?:\s+(?:if|whether|about))?\s+(.+?)\??$/i,sb=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+(is|are)\??$/i,ob=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+means\??$/i,rb=/^(?:show|give)\s+me\s+(?:the\s+)?(.+?)\??$/i,ib=/^(?:and|also|so|then|now|but)\s+(.+)$/i,ab=/^(?:does|do|did|is|are|was|were|has|have|had|can|could|will|would|should)\b/i,Bu=/^(?:(?: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;cb=/^(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+?,\s*(.+)$/i,lb=/^(.+?),\s*(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+$/i;db=/^.+?(?:\s*(?:--|—|-)\s*)?\b(?:sorry|i\s+mean)\b\s*(?:--|—|-|,|:)\s*(.+)$/i;qu=Object.freeze({imports:"importing",calls:"calling",touches:"touching",tests:"testing",exports:"exporting",contains:"containing",defines:"defining",uses:"using","inherits from":"inheriting from"}),Vu=Object.freeze({module:"modules",class:"classes",function:"functions",method:"methods",attribute:"attributes",variable:"variables",commit:"commits",file:"files"}),mb="public|private|protected|static|abstract|constant|re-?exported|exported|tested|covered|untested|uncovered",fb=new RegExp("^if\\s+(?:a|an|the)?\\s*("+Object.keys(Vu).join("|")+")\\s+("+Object.keys(qu).join("|")+")\\s+(.+?),\\s*(?:is|are)\\s+(?:it|that|they|this)\\s+("+mb+")\\??$","i"),Hu=/^if\s+(.+?)\s+(?:were|was)\s+(?:deleted|removed),?\s*what\s+(?:would|might|could)\s+(?:break|fail|be\s+affected)\??$/i;gb=new RegExp(`^(where\\s+(?:is|are|was|were)\\s+.+?)\\s+(?:${bl.map(Ve).join("|")})(\\s*[?.!]*)$`,"i");bb=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+(?:${ji.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+(${Gg})\\s+(?:anything|something)(?:\\s+else)?\\??$`,"i"),to:e=>`what does ${e[1]} ${e[2]}`}]);wb=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");tt=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"]),Kt=e=>String(e).replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),ue=e=>e.flatMap(t=>String(t).toLowerCase().split(" "))});var Xu,Yu=K(()=>{Xu={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 Tn(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 Zi(e){return/^[a-z]+$/.test(e)&&!tt.has(e)&&!Qi.has(e)}function Ju(e){return Sb(e)?null:ea(e,xb,Vn(e))}function ea(e,t,n=Vn(e)){let s=n+1,o=null,r=!1;for(let i of t){let a=Tn(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 vb,Vn,Qi,$b,xb,kb,Sb,Lo=K(()=>{jn();Yu();qn();vb=["used"];Vn=e=>e.length<=5?1:2,Qi=new Set([...Object.keys(ae),...Object.keys(De),...Object.keys(Bt),...vb].flatMap(e=>e.split(" "))),$b=4,xb=[...new Set([...Object.keys(ae),...Object.keys(Bt)].flatMap(e=>e.split(" ")).filter(e=>e.length>=$b))],kb=new Set(Xu.words),Sb=e=>kb.has(e)});function Ys(e){for(let t of Rb){let n=e.match(t.re);if(n){let s=t.build(n);if(s)return s}}return null}var Ar,Eb,jb,_b,Rb,Qu,Tr=K(()=>{jn();qn();Ar=Object.keys(ae).sort((e,t)=>t.length-e.length).map(Ve).join("|"),Eb=Object.keys(De).sort((e,t)=>t.length-e.length).map(Ve).join("|"),jb=Object.keys(Bt).sort((e,t)=>t.length-e.length).map(Ve).join("|"),_b=ds.slice().sort((e,t)=>t.length-e.length).map(Ve).join("|"),Rb=[{name:"ask",re:new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+(${Ar})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=ae[t],s=e[1].trim(),o=e[3].trim();return jo.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+(${Eb})\\s+(?:(${jb})\\s+)?(${Ar})\\s+(.+?)\\??$`,"i"),build:e=>({shape:"reverse",entityType:De[e[1].toLowerCase()],modifier:e[2]?Bt[e[2].toLowerCase()]:"direct",kind:ae[e[3].toLowerCase()],object:e[4].trim()})},{name:"forward",re:new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+(${Ar})\\??$`,"i"),build:e=>({shape:"forward",entityType:null,modifier:"direct",kind:ae[e[2].toLowerCase()],object:e[1].trim()})},{name:"meta-mean",re:new RegExp(`^what\\s+(?:does|do|is|are)\\s+(.+?)\\s+(?:${_b})\\??$`,"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?)\\s+)?(.+?)\\??$","i"),build:e=>{let t=Vt(e[2].trim());if(!e[1]&&!De[t.toLowerCase()])return null;let n=t.toLowerCase();return e[1]&&wl.some(s=>n===s||n.startsWith(`${s} `))?null:{shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:ls(t)}}},{name:"mention",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)\\s+(?:${sn.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+(?:${qt.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+)?(${Ar})\\??$`,"i"),build:e=>ae[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()})}];Qu={id:"grammar",class:"graph-query",run(e){let t=Ys(e);return t?{strategyId:"grammar",class:"graph-query",candidates:[{parsed:t,confidence:.9}]}:null}}});function wt(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 No(e,t=null){let n=e.replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),s=n.map(v=>v.toLowerCase());if(s.includes("where")&&!wt(s,ae)){let v=s.some(C=>sn.includes(C)),A=new Set([...qt,...sn]),T=n.filter((C,S)=>!tt.has(s[S])&&!A.has(s[S])).join(" ").trim();if(T){let C=v?"mentions":"where";return{shape:C,entityType:null,modifier:"direct",kind:C,object:T}}}if(new Set(["has","have","had"]).has(s[0])){let v=s.length;for(;v>1&&(s[v-1]==="ever"||s[v-1]==="been");)v-=1;if((v>1?ae[s[v-1]]:null)==="touches"){let T=n.slice(1,v-1).filter((C,S)=>!tt.has(s[1+S])).join(" ").trim();if(T)return{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:T}}}let r=s,i=wt(s,ae);if(!i&&t){let v=s.map(A=>{if(!Zi(A))return A;let T=t.lemma(A);return Qi.has(T)?T:A});i=wt(v,ae),i&&(r=v)}let a=null;if(!i){let v=s.map(A=>A.length>=4&&Zi(A)&&Ju(A)||A);if(i=wt(v,ae),i){r=v;let A=s.slice(i.start,i.end).findIndex((C,S)=>C!==v[i.start+S]),T=i.start+Math.max(A,0);a={from:s[T],to:v[T]}}}if(!i)for(let v=0;v<s.length;v+=1){let A=us[s[v]];if(!(A&&s[v]==="used"&&s[v+1]==="for")&&A&&s.slice(0,v).some(T=>ta.has(T))){i={kind:A,start:v,end:v+1};break}}if(!i)return null;let l=v=>a?{...v,fuzzyVerb:a}:v;if(t&&i.end-i.start===1){let v=i.start,A=s[v-1];if((A==="the"||A==="these"||A==="those")&&s[v+1]==="of"&&t.posTags(n)[v]==="NOUN"){let C=n.slice(v+2).filter((S,R)=>!tt.has(s[v+2+R])).join(" ").trim();if(C)return l({shape:"forward",entityType:null,modifier:"direct",kind:i.kind,object:C})}}let c=new Set,u=v=>{if(v)for(let A=v.start;A<v.end;A+=1)c.add(A)};u(i);for(let[v,A]of Object.entries(ae)){if(A!==i.kind)continue;let T=v.split(" "),C=i.end;if(T.every((S,R)=>r[C+R]===S)){u({start:C,end:C+T.length});break}}let d=wt(r,De,c);u(d);let m=wt(r,Bt,c);u(m);let p=(v,A)=>n.slice(v,A).filter((T,C)=>!c.has(v+C)&&!tt.has(s[v+C])).join(" ").trim(),f=p(0,i.start),b=p(i.end,n.length),h=i.kind,g=d?De[r.slice(d.start,d.end).join(" ")]:null,y=m?Bt[r.slice(m.start,m.end).join(" ")]:"direct";if(h==="touches"&&s.includes("when")){let v=f||b;if(v)return l({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:v})}if(h==="touches"&&s.includes("who")&&s.includes("last")){let v=f||b;if(v)return l({shape:"whoLast",entityType:null,modifier:"direct",kind:"touches",object:v})}let w=s.indexOf("by"),k=s.slice(0,i.start).findIndex(v=>ta.has(v)),E=k>=0,$=E&&k>w;if(w>=0&&!c.has(w)&&E){let v=(C,S)=>n.slice(C,S).filter((R,N)=>{let j=C+N,_=s[j];return!c.has(j)&&!tt.has(_)&&_!=="by"&&!ta.has(_)&&!Ab.has(_)&&!Tb.has(_)}).join(" ").trim(),[A,T]=$?[v(k+1,n.length),v(w+1,k)]:[v(0,w),v(w+1,n.length)];if(A&&T)return l({shape:"ask",entityType:null,modifier:"direct",kind:h,subject:T,object:A});if(T)return l({shape:"forward",entityType:g,modifier:y,kind:h,object:T});if(A)return l({shape:"reverse",entityType:g,modifier:y,kind:h,object:A})}if(f&&b){let v=r.slice(i.start,i.end).join(" "),A=f,T=b;return jo.includes(v)&&([A,T]=[T,A]),l({shape:"ask",entityType:null,modifier:"direct",kind:h,subject:A,object:T})}if(b){let v=d&&d.start>=i.end?null:g;return l({shape:"reverse",entityType:v,modifier:y,kind:h,object:b})}if(h==="inherits"&&!f&&d&&d.start===i.end){let v=r.slice(d.start,d.end).join(" ");if(v)return l({shape:"reverse",entityType:null,modifier:y,kind:h,object:v})}return f&&!b&&E&&i.end-i.start===1&&us[s[i.start]]?f.split(/\s+/).length>1?null:l(h==="touches"?{shape:"when",entityType:null,modifier:"direct",kind:h,object:f}:{shape:"reverse",entityType:g,modifier:y,kind:h,object:f}):f?l({shape:"forward",entityType:g,modifier:"direct",kind:h,object:f}):null}var ta,Ab,Tb,Zu,Cr=K(()=>{jn();qn();Lo();ta=new Set(["is","are","was","were","be","been","being","get","gets","got"]),Ab=new Set(["which","what","who","whom","whose"]),Tb=new Set(En.map(e=>e.toLowerCase()));Zu={id:"keyword-spot",class:"graph-query",run(e,t={}){let n=No(e,t.nlp||null);return n?{strategyId:"keyword-spot",class:"graph-query",candidates:[{parsed:n,confidence:.7}]}:null}}});function Ib(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)||ed.has(l)||!s.has(l)||o[i]==="VERB"&&r.push(l)}return r}function Ob(e,t=null){let n=Kt(e),s=[],o=[];for(let i of n){let a=i.toLowerCase();/^[a-z]+$/.test(i)&&!ed.has(a)&&(Cb.has(a)||t&&typeof t.isStopWord=="function"&&t.isStopWord(a))?o.push(i):s.push(i)}let r=Ib(n,s,t);return{text:s.join(" "),dropped:o,maybeNoise:r}}var ed,Cb,td,nd=K(()=>{jn();qn();Tr();Cr();ed=new Set([...tt,...ue(Ds),...ue(Object.keys(ae)),...ue(Object.keys(De)),...ue(Object.keys(Bt)),...ue(Object.keys(qe)),...ue(ps),...ue(ms),...ue(Object.keys(Un)),...ue(Object.keys(ln)),...ue(Object.keys(Bs)),...ue(En),...ue(Ro),...ue(ds),...ue(qt),...ue(sn),...ue(Sn),...ue(Object.keys(Gs))]),Cb=new Set([...ue(_o),...ue(gr)]);td={id:"noise-strip",class:"noise-stripped",run(e,t={}){if(Ys(e))return null;let{text:n,dropped:s,maybeNoise:o}=Ob(e,t.nlp||null);if(!s.length||!n)return null;let r=Ys(n)||No(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 sd=K(()=>{});var od=K(()=>{});function id(e,t){return e.shape!==t.shape||e.kind!==t.kind?!1:e.shape==="ask"?Xs(e.subject)===Xs(t.subject)&&Xs(e.object)===Xs(t.object):Xs(e.object)===Xs(t.object)}function na(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=>!ad(c))&&(n=n.filter(c=>!ad(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=>id(f.parsed,m.parsed)&&f.via===m.via);if(p){p.agreed+=1,p.confidence=Math.max(p.confidence,m.confidence),rd(m.parsed)<rd(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=>id(u.parsed,c.parsed)));return{class:i.class,parsed:a,winner:i.candidates[0],alternates:l}}function Mb(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 cd(e,{describe:t=Mb,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 Xs,Lb,rd,Nb,ad,sa=K(()=>{Xs=e=>String(e||"").trim().toLowerCase().replace(/\s+/g," ").replace(/^(?:the|a|an)\s+/,"").replace(/^commit\s+(?=[0-9a-f]{7,40}$)/,""),Lb=/^\s*(?:the|a|an)\s+/i,rd=e=>[e?.subject,e?.object].filter(t=>Lb.test(String(t||""))).length;Nb=new Set(["fuzzy","lemma","spell"]),ad=e=>Nb.has(e.via)});function Ir(e){oa=e}function ra(){return typeof oa=="function"?oa():null}var oa,Mo=K(()=>{oa=null});function dd(e,t={},n=Fb){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 Pb,Fb,pd=K(()=>{qn();Tr();Cr();nd();sd();od();sa();Mo();Pb=[...typeof void 0<"u"?[void 0]:[],...typeof void 0<"u"?[void 0]:[]],Fb=[Qu,Zu,td,...Pb]});var Or,md=K(()=>{Or=(e,t,n)=>n});var sp={};Dn(sp,{DYNAMIC_TAIL_OK_RE:()=>Ea,applyNegationFrames:()=>Oo,ask:()=>Jn,classDisplayName:()=>Kn,degreeMetric:()=>Kd,metaFallbackEntityAnswer:()=>Bd,normalizeQuery:()=>vs,parseQuery:()=>Do,parseQueryFull:()=>ha,render:()=>mn,rephraseHint:()=>$a,resolveObject:()=>rn,traverse:()=>Yt});function Ge(e,t){let n=fd.get(e);n||(n=new Map,fd.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(An(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function Ne(e,t){let[n,s]=Ad[e]||["result","results"];return t===1?n:s}function Kn(e){let t=String(e||"");if(typeof un=="function"){let n=un(t).join(" ");if(n)return n}return t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase()}function $s(e){return Db[e]||e}function qb(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||Wb.has(s))return e;let o=String(n.object||"").trim().toLowerCase();return ue(ds).includes(o)?t:e}function Do(e,{nlp:t=void 0}={}){return ha(e,{nlp:t}).parsed}function ha(e,{nlp:t=void 0}={}){let n=t===void 0?ra():t,s=String(e||"").trim().replace(/\s+/g," ");if(!s)return{parsed:null,alternates:[],class:null};let o=Ji(Oo(vs(s)));if(!o)return{parsed:null,alternates:[],class:null};let r=Hb(o,n);if(r)return{parsed:r,alternates:[],class:null};let i=na(dd(o,{nlp:n,raw:s}));return i?{parsed:qb(i.parsed),alternates:i.alternates||[],class:i.class||null}:{parsed:null,alternates:[],class:null}}function ua(e,t){return t.length&&Cd.has(t[0])?{bw:e.slice(1),blc:t.slice(1)}:{bw:e,blc:t}}function Zs(e,t){return Ys(e)||No(e,t)}function Hb(e,t){let n=Kt(e),s=n.map(o=>o.toLowerCase());return dw(n,s)||mw(n,s)||Yb(n,s,t)||Od(e,t,0)||fw(n,s,t)||Jb(n,s,t)||ow(n,s,t,0)||iw(n,s)||lw(n,s,t)||hw(n,s,t)||yw(n,s,t)||$w(n,s,t,0)||ww(n,s,t,0)||ba(n,s,t,0)||Zb(n,s,t)||Fd(n,s,t,0)}function Nr(e,t){return{node:"boolean",entityType:e,atoms:[{op:"seed",kind:"set",ast:{node:"allOfClass",entityType:e}},t]}}function Yb(e,t,n){if(!["do","does","did"].includes(t[0])||!Kb.has(t[1]))return null;let s=Lt(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=wt(a,ae);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)&&!tt.has(a[p])&&a[p]!=="from").join(" ").trim();if(!u)return null;let d=eo(`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:Nr(o,{op:"difference",kind:"set",ast:d})}}function Od(e,t,n=0){let s=Ku(e);if(!s)return null;let o=Lt(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=Kt(s.predicate),a=i.map(d=>d.toLowerCase());if(a.length&&a.every(d=>qe[d]))return Nr(r,{op:"difference",kind:"qual",filters:a});let l=wt(a,ae);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)&&!tt.has(a[m])&&a[m]!=="from").length)return Nr(r,{op:"difference",kind:"set",ast:{node:"existsEdge",entityType:r,kind:l.kind}});let u=eo(`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"}:Nr(r,{op:"difference",kind:"set",ast:u})}function Jb(e,t,n){let s=0;for(;s<t.length&&Xb.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=wt(r,ae);if(!a)return null;let c=o.filter((u,d)=>d!==i&&(d<a.start||d>=a.end)&&r[d]!=="from"&&!tt.has(r[d])).join(" ").trim();return c?{node:"forwardComplement",kind:a.kind,subjectTerm:c}:null}function Ld(e,t){let n=new Set;for(let s of t)for(let o of Ge(e,s)){let r=e.byId.get(o.object);r&&r.class&&n.add(r.class)}return n}function Nd(e,t){let n=Et(t),s=n.filter(r=>!Rd.has(r)),o=Ld(e,s.length?s:n);return o.size===1?[...o][0]:null}function eo(e,t,n){if(n>Td)return{node:"miss",reason:"too deep to resolve"};let s=Od(e,t,n);if(s)return s;let o=Kt(e),r=o.map(c=>c.toLowerCase()),i=ba(o,r,t,n);if(i)return i;let a=Fd(o,r,t,n);if(a)return a;let l=Zs(e,t);return l?{node:"clause",clause:l}:null}function ba(e,t,n,s){for(let o=1;o<t.length;o+=1){let r=Sn.includes(t[o]),i=!r&&Id(t[o]);if(!r&&!i||r&&o+1>=t.length||!Lt(t[o-1]))continue;let l=e.slice(0,o-1);if(!l.length||l.every(m=>qe[m.toLowerCase()]))continue;let c=Zs([...l,la].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=eo(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 Zb(e,t,n){for(let s=0;s<t.length;s+=1){if(!Qb.has(t[s])||t[s-1]==="of")continue;let o=s===t.length-1,r=s+1<t.length&&!!ae[t[s+1]];if(!o&&!r)continue;let i=[...e.slice(0,s),la,...e.slice(s+1)],a=Zs(i.join(" "),n);if(!(!a||a.shape!=="reverse"&&a.shape!=="forward")&&a.object===la&&!(a.modifier&&a.modifier!=="direct"))return{node:a.shape==="reverse"?"reverseSet":"forwardSet",kind:a.kind,entityType:a.entityType,inner:{node:"prevSet"}}}return null}function ow(e,t,n,s=0){if(t[0]!=="when")return null;let o=1;if(!ew.has(t[o]))return null;o+=1;let r=-1;for(let d=t.length-1;d>=o;d-=1)if(tw.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&&nw.has(a[a.length-1]);)i=i.slice(0,-1),a=a.slice(0,-1);for(;a.length&&sw.has(a[0]);)i=i.slice(1),a=a.slice(1);if(!i.length||!a.some(d=>Sn.includes(d)))return null;let l=ga.has(a[0])?i.join(" "):`which ${i.join(" ")}`,c=eo(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=Lt(a[0]);return{node:"temporal",inner:c,entityType:u&&u.entityType||null}}function iw(e,t){if(t[0]!=="what"||t[1]!=="changed")return null;let n=2;if(t[n]==="ever"&&(n+=1),!rw.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 cw(e){let t=new Set,n=[];for(let s of e){if(!s||!aw.test(s))continue;let o=s.toLowerCase();t.has(o)||(t.add(o),n.push(s))}return n}function lw(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(!Ro.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&&(ps.includes(m)||ms.includes(m))){s=d;break}}if(s<0)return null;let r=(o?t.slice(0,s-1):t.slice(0,s)).join(" "),i=ps.includes(r)||/^(how many|how much|count|number|quantity|total)\b/.test(r)?"count":"list",a=uw(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=cw(e.slice(0,l)),u={node:"anaphora",mode:i,filter:a};return c.length>=2&&(u.candidateTerms=c),u}function uw(e,t){let n=0,s=e.map(a=>a.toLowerCase());for(;n<s.length&&Vb.has(s[n]);)n+=1;let o=e.slice(n),r=s.slice(n);if(!o.length)return{type:"all"};if(r.every(a=>qe[a]))return{type:"qual",filters:r};let i=Zs(`what ${o.join(" ")}`,t);if(i&&(i.shape==="reverse"||i.shape==="forward")&&i.object)return{type:"clause",clause:i}}function dw(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?Lt(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 pw(e,t){if(!t.length)return null;let n=`${e} ${t.join(" ")}`,s=ls(n).slice(e.length).trim(),o=Kt(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 mw(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(qe[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&&us[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&&!xl.has(u))return null}let r=pw(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 fw(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=Zs(e.filter((r,i)=>i!==s).join(" "),n);return!o||o.shape!=="ask"?null:{...o,negated:!0}}function hw(e,t,n){let s=ps.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&&qe[t[o]];)r.push(t[o]),o+=1;let i=o<t.length?Lt(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=>!tt.has(d)&&!Md.has(d)),u;if(c){let d=eo(`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 ww(e,t,n,s){let o=0,r=!1,i=null;for(let y of gw){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&&wa.has(t[o]);)o+=1;let a=[];for(;o<t.length&&qe[t[o]];)a.push(t[o]),o+=1;let l=o<t.length?Lt(t[o]):null;if(!l||l.placeholder||l.entityType==="Change")return!r&&o<t.length&&o===t.length-1&&/^[a-z]+$/.test(t[o])&&!ae[t[o]]&&!En.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${Pd}`}:null;let c=l.entityType,u=t[o];o+=1;let d=e.slice(o),m=t.slice(o).some(y=>!tt.has(y)&&!Md.has(y)),p=t.slice(o),f=d;(p[0]==="is"||p[0]==="are")&&(p=p.slice(1),f=f.slice(1));let b=r&&bw.has(p[0]);if(r&&(m&&!b||d.length===0))return null;let h,g=!1;if(m){let y=b?f:d,w=eo(`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,g=!0}else h={node:"allOfClass",entityType:c},a.length&&(h={node:"qualifier",filters:a,inner:h});return{node:"list",entityType:c,base:h,scoped:g}}function yw(e,t,n){let s=null,o=-1;for(let m=0;m<t.length;m+=1){let p=t.slice(m,m+2).join(" ");if(Un[p]){s=Un[p],o=m;break}if(Un[t[m]]){s=Un[t[m]],o=m;break}}if(!s)return null;let r=null,i=null;for(let m=o;m<t.length;m+=1)if(ln[t[m]]){r=ln[t[m]],i=t[m];break}if(!r){for(let m=o-1;m>=0;m-=1)if(ln[t[m]]){r=ln[t[m]],i=t[m];break}}let a=t.includes("connected")||t.slice(o,o+2).join(" ")==="most connected"||["largest","biggest","smallest"].includes(t[o]);!r&&a&&(r=ln.connections,i="connections");let l,c=null;for(let m of t){let p=Lt(m);if(p&&!p.placeholder){l=p.entityType,c=m;break}}if(!c&&(l=i?kl[i]:void 0,!l))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 u=["needs","need","needing","lacks","lack","lacking","misses","missing"],d=t.some(m=>u.includes(m))?s==="most"?"fewest":"most":s;return{node:"superlative",entityType:l,metric:r,metricNoun:i,extreme:d}}function $w(e,t,n,s){if(t[0]!=="find")return null;let o=1;for(;o<t.length&&wa.has(t[o]);)o+=1;if(o>=t.length)return null;let r=Lt(t[o]);if(r&&!r.placeholder&&r.entityType!=="Change"&&o+1<t.length&&vw.has(t[o+1])){let a=e.slice(o+2).join(" ").trim();if(a)return{node:"find",entityType:r.entityType,term:a}}let i=Lt(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=>Sn.includes(a))?null:o===t.length-1&&/^[a-z]+$/.test(t[o])&&!ae[t[o]]&&!En.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${Pd}`}:null}function xw(e,t){if(t[0]!=="find")return null;let n=1;for(;n<t.length&&wa.has(t[n]);)n+=1;let s=-1;for(let i=n+1;i<t.length;i+=1)if(Sn.includes(t[i])){s=i;break}if(s<0)return null;let o=Lt(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 kw(e,t,n,s,o,r){let{branches:i,ops:a}=Mr(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=ua(d,m);if(f.blc.length&&f.blc.every(y=>qe[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 b=d,h=wt(m,ae);h?l=d.slice(h.start,h.end):l&&(b=[...l,...d]);let g=zd(`${t} ${b.join(" ")}`,o,r);if(!g||g.node==="miss")return{miss:g&&g.reason||"a clause in the combination didn't parse"};c.push({op:p,kind:"set",ast:g})}return{atoms:c}}function Fd(e,t,n,s){let o=xw(e,t);if(o){let{entityType:C,term:S,relIdx:R}=o,N=t.slice(R+1),j=e.slice(R+1);if(!N.length)return{node:"miss",reason:`a relative clause needs a predicate after "${t[R]}"`};let _=kw(C,`which ${t[R-1]}`,N,j,n,s+1);if(_.miss)return{node:"miss",reason:_.miss};let O=[{op:"seed",kind:"set",ast:{node:"find",entityType:C,term:S}},..._.atoms];return O.length===1?O[0].ast:{node:"boolean",entityType:C,atoms:O}}let r=0;for(;r<t.length&&ga.has(t[r]);)r+=1;let i=r>0,a=[];for(;r<t.length&&qe[t[r]];)a.push(t[r]),r+=1;let l=r<t.length?Lt(t[r]):null;if(!l){let C=r+1<t.length?Lt(t[r+1]):null;if(hd.has(t[r])&&C&&C.entityType==="Commit"&&r+2===t.length)return{node:"recentCommits"};if(Cd.has(t[r])){let S=r+1;S<t.length&&(t[S]==="the"||t[S]==="a"||t[S]==="an")&&(S+=1);let R=S+1<t.length?Lt(t[S+1]):null;if(hd.has(t[S])&&R&&R.entityType==="Commit"&&S+2===t.length)return{node:"recentCommits"}}return(i||a.length)&&C&&/^[a-z]+$/.test(t[r])&&!ae[t[r]]&&!tt.has(t[r])&&!Sa.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&&Sn.includes(d[0])&&(p=!0,d=d.slice(1),m=m.slice(1));let f=d[0]==="of"||d[0]==="in",b=d.length>0&&Id(d[0]),h=m.length>0&&Mr(d,m).branches.some(C=>{let{blc:S}=ua(C,C.map(R=>R.toLowerCase()));return S.length&&S.every(R=>qe[R])}),g=m.length>0?Mr(d,m).branches:[],y=!1;if(g.length>1){let C=g[0].map(R=>R.toLowerCase()),S=wt(C,ae);S&&S.start===0&&(y=g.slice(1).every(R=>{let N=R.map(_=>_.toLowerCase()),j=wt(N,ae);return j&&j.start===0?j.kind===S.kind:!j}))}let w=!1;if(g.length>1){let C=g[0].map(R=>R.toLowerCase()),S=wt(C,ae);S&&S.start===0&&(w=g.slice(1).every(R=>{let N=R.map(_=>_.toLowerCase()),j=wt(N,ae);return!!j&&j.start===0&&j.end-j.start===1}))}if(!(a.length||p||f||b||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 k=l.placeholder?"what":`which ${u}`,{branches:E,ops:$}=Mr(d,m),v=null,A=[];for(let C=0;C<E.length;C+=1){let S=E[C],R=S.map(L=>L.toLowerCase()),N=C===0?"seed":$[C-1],j=ua(S,R);if(j.blc.length&&j.blc.every(L=>qe[L])){A.push({op:N,kind:"qual",filters:j.blc});continue}if(R[0]==="of"||R[0]==="in"){A.push({op:N,kind:"set",ast:{node:"membership",entityType:c,term:S.slice(1).join(" ")}});continue}let _=S,O=wt(R,ae);O?v=S.slice(O.start,O.end):v&&(_=[...v,...S]);let P=zd(`${k} ${_.join(" ")}`,n,s+1);if(!P||P.node==="miss")return{node:"miss",reason:P&&P.reason||"a clause in the combination didn't parse"};A.push({op:N,kind:"set",ast:P})}if(A[0].kind!=="set")return{node:"miss",reason:"start with a clause, then combine with and/or/but-not"};let T;return A.length===1?T=A[0].ast:T={node:"boolean",entityType:c,atoms:A},a.length&&(T={node:"qualifier",filters:a,inner:T,entityType:c}),T}function zd(e,t,n){if(n>Td)return{node:"miss",reason:"too deep to resolve"};let s=Kt(e),o=s.map(a=>a.toLowerCase()),r=ba(s,o,t,n);if(r)return r;let i=Zs(e,t);return i?{node:"clause",clause:i}:null}function Mr(e,t){let n=Object.keys(Bs).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(Bs[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 Dd(e,t,n,s){let o=Js[t];if(o&&Xn.has(n)){let u=Ge(e,o).filter(d=>s.has(d.object));return In(u.map(d=>e.byId.get(d.subject)).filter(d=>d&&d.class===n))}let a=(!!o&&[...s].some(u=>Xn.has(e.byId.get(u)?.class))?[...Et(t),o]:Et(t)).flatMap(u=>Ge(e,u)).filter(u=>s.has(u.object)),l=In(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")?xa(e,new Set(l.filter(u=>u.class==="Module").map(u=>u.id)),n):[]}function zo(e,t,n){let s=Et(t).flatMap(o=>Ge(e,o)).filter(o=>n.has(o.subject));return In(s.map(o=>e.byId.get(o.object)).filter(Boolean))}function In(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 Sw(e,t){let n=Wn(t);if(!n)return[];let s=`${n}/`;return e.individuals.filter(o=>o.class==="Module"&&Wn(o.label).startsWith(s))}function da(e){let t=gd.get(e);if(t)return t;let n=new Set;for(let i of Ge(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 Ge(e,"tests"))s.add(i.object),o.add(i.subject);let r=new Map;for(let i of Ge(e,"defines"))r.set(i.object,i.subject);return t={exported:n,testedModules:s,testModules:o,moduleOfSymbol:r},gd.set(e,t),t}function Qs(e,t){return t?t.class==="Module"?t.id:da(e).moduleOfSymbol.get(t.id)||null:null}function Bd(e,t){let n=String(t||"").trim().toLowerCase();if(!n)return null;let s=(e?.individuals||[]).filter(d=>Ew.has(d.class)&&String(d.label).toLowerCase()===n);if(s.length!==1)return null;let o=s[0],r=Qs(e,o),i=r&&e.byId.get(r)?.label||String((o.attributes||[]).find(d=>d.key==="site")?.value||"").split(":")[0]||null,a=Ne(o.class,1),l=a==="attribute"?"an":"a",c=i?`, ${Or("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 pa(e,t,n){let s=In(Us.flatMap(o=>zo(e,o,new Set([t]))));return n?s.filter(o=>o.class===n):s}function ya(e,t,n=null){let s=Cn(e,t,n);if(!(s.match&&s.tier===1)){let o=Sw(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 Ud(e,t,n,s,o){let r=o||(()=>!0),i=pa(e,t,s).filter(r);if(i.length||!Wd(e,n))return{own:i,inherited:[],viaId:null,viaLabel:null};for(let a of Gd(e,t)){let l=e.byId.get(a);if(!l)continue;let c=pa(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 xs(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=da(e).exported;return s.has(String(t.label).toLowerCase())||s.has(String(t.id).toLowerCase())}case"tested":{let s=Qs(e,t),o=da(e),r=s?e.byId?.get?.(s):null;return s&&(o.testModules.has(s)||r&&gs(String(r.label).toLowerCase()))?!1:(!!s&&o.testedModules.has(s))===n.value}default:return!1}}function va(e){return Ge(e,"inherits")}function ma(e,t){return va(e).filter(n=>n.object===t).map(n=>n.subject)}function bd(e,t){return va(e).filter(n=>n.subject===t).map(n=>n.object)}function jw(e,t){let n=new Set,s=[...ma(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of ma(e,o))n.has(r)||s.push(r)}}return n}function Gd(e,t){let n=new Set,s=[...bd(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of bd(e,o))n.has(r)||s.push(r)}}return n}function Wd(e,t){let n=wd.get(e);if(n||(n=new Map,wd.set(e,n)),n.has(t))return n.get(t);let s=va(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 yd(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 $d(e){return e.slice().sort((t,n)=>vd[n.via]-vd[t.via]||String(t.ind.label).length-String(n.ind.label).length).map(t=>t.ind)}function xd(e,t){let n=String(t||"").trim().toLowerCase();if(n.length<4)return!1;let s=Vn(n);if(Tn(String(e.label||"").toLowerCase(),n,s)<=s)return!0;for(let o of ks(e.label))if(Tn(o,n,s)<=s)return!0;return!1}function qd(e,t,n){let s=e.individuals.filter(l=>l.class===t),o=[...ks(n)];if(!o.length||!s.length)return{narrow:[],broad:[]};let r=Wd(e,t),i=[];for(let l of s){let c=yd(l,o);if(c){i.push({ind:l,via:c});continue}if(!r)continue;[...jw(e,l.id)].some(d=>{let m=e.byId.get(d);return!!m&&!!yd(m,o)})&&i.push({ind:l,via:"chain"})}if(i.length||!r)return{narrow:$d(i),broad:[]};let a=new Map;for(let l of s)for(let c of Gd(e,l.id)){if(!a.has(c)){let u=e.byId.get(c);u&&u.class===t&&xd(u,n)&&a.set(c,{ind:u,via:"chain"})}for(let u of ma(e,c)){if(u===l.id||a.has(u))continue;let d=e.byId.get(u);d&&d.class===t&&xd(d,n)&&a.set(u,{ind:d,via:"chain"})}}return{narrow:[],broad:$d([...a.values()])}}function on(e,t,n){switch(t.node){case"clause":return Yt(e,t.clause,n).matches||[];case"allOfClass":return e.individuals.filter(s=>s.class===t.entityType);case"find":{let{narrow:s,broad:o}=qd(e,t.entityType,t.term);return s.length?s:o}case"existsEdge":{let s=new Set(Et(t.kind).flatMap(o=>Ge(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=Cn(e,t.subjectTerm,n&&n.contextId);if(!s.match)return[];let o=Nd(e,t.kind);if(!o)return[];let r=new Set(zo(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(on(e,t.inner,n).map(o=>o.id));return Dd(e,t.kind,t.entityType,s)}case"forwardSet":{let s=new Set(on(e,t.inner,n).map(o=>o.id));return zo(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=ya(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 In(Us.flatMap(l=>zo(e,l,i))).filter(l=>l.class===t.entityType)}if(s.kind==="miss")return[];let{own:o,inherited:r}=Ud(e,s.id,s.entityClass,t.entityType);return o.length?o:r}case"qualifier":return t.inner.node==="membership"?Yd(e,t,n).matches:on(e,t.inner,n).filter(o=>t.filters.every(r=>xs(e,o,qe[r])));case"boolean":return Vd(e,t,n);case"anaphora":return Hd(e,t,n).matches;default:return[]}}function Vd(e,t,n){let s=[];for(let o of t.atoms){if(o.op==="seed"){s=on(e,o.ast,n);continue}if(o.kind==="qual"){let i=l=>o.filters.every(c=>xs(e,l,qe[c])),a=l=>o.filters.every(c=>{let u=_w(qe[c]);return u?xs(e,l,u):!xs(e,l,qe[c])});s=o.op==="difference"?s.filter(a):s.filter(i);continue}let r=new Set(on(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 on(e,o.ast,n))i.has(a.id)||(i.add(a.id),s.push(a))}}return s}function Rw(e,t){if(!Array.isArray(t)||t.length<2)return null;let n=new Set,s=[];for(let o of t){let r=rn(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 Hd(e,t,n){let o=Rw(e,t.candidateTerms);if(!o){let c=n&&n.prev;if(!Array.isArray(c)||!c.length)return{compositeMiss:!0,reason:"no-prev",matches:[]};o=c.map(u=>e.byId.get(u)).filter(Boolean)}let r=o,i=t.filter;if(i&&i.type==="qual")r=r.filter(c=>i.filters.every(u=>xs(e,c,qe[u])));else if(i&&i.type==="clause"){let c=rn(e,i.clause.object);if(!c.match)r=[];else{let u=Js[i.clause.kind],d=[...Et(i.clause.kind),...u?[u]:[]],m=new Set(d.flatMap(p=>Ge(e,p)).filter(p=>p.object===c.match.id).map(p=>p.subject));r=r.filter(p=>m.has(p.id))}}let a=c=>c.length&&c.every(u=>u.class===c[0].class)?c[0].class:null,l=r.length?a(r):a(o);return t.mode==="count"?{compositeKind:"count",count:r.length,entityType:l,matches:[]}:{compositeKind:"set",matches:r,entityType:l}}function Kd(e,t,n){let s=n.kind==="*"?Aw:[n.kind,...n.sibling?[n.sibling]:[]],o=0;for(let r of s)for(let i of Ge(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 Tw(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 Iw(e,t){let{op:n,pivotRaw:s}=t,o=l=>String((l.attributes||[]).find(c=>c.key==="date")?.value||"").slice(0,10),r=null,i=null;if(Cw.test(s))r=s;else{let{match:l,ambiguous:c}=rn(e,s,{expectedClass:"Commit"});l&&!c&&l.class==="Commit"&&o(l)&&(i=l.id,r=o(l))}if(!r)return{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotResolved:!1,matches:[]};let a=e.individuals.filter(l=>l.class==="Commit"&&l.id!==i&&o(l)).filter(l=>{let c=o(l);return n==="since"?c>=r:n==="before"?c<r:n==="after"?c>r:c===r}).sort((l,c)=>o(c).localeCompare(o(l)));return{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotDate:r,pivotResolved:!0,matches:a}}function Ow(e,t,n){let s=on(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=Dd(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 Lw(e,t){let n=e.individuals.filter(i=>i.class===t.entityType);if(t.metric?.kind==="tests"&&t.entityType==="Module"){let i=new Set(Ge(e,"tests").map(a=>a.subject));n=n.filter(a=>!i.has(a.id)&&!gs(String(a.label).toLowerCase()))}let s=n.map(i=>({ind:i,score:Kd(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 Yd(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=>xs(e,m,qe[p])):null,a=ya(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=In(Us.flatMap(f=>zo(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}=Ud(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 Nw(e,t){let{entityType:n,term:s,scopeModule:o}=t,r=null;if(o){let a=rn(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=rn(e,s,{expectedClass:n}),l=!r||a.match&&Qs(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?xa(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 Mw(e,t,n){let s=Qs(e,t);return n.kind==="dir"?n.mods.some(o=>o.id===t.id||o.id===s):s===n.id||pa(e,n.id).some(o=>o.id===t.id)}function Pw(e,t,n){let{term:s,qualifier:o,negated:r,scope:i}=t,a=Cn(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=ya(e,i,n.contextId);if(u.kind==="miss")return{compositeKind:"qualCheck",qualCheckMiss:"scope",term:s,scope:i,matches:[]};if(!Mw(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=xs(e,a.match,qe[o]),c=r?!l:l;return{compositeKind:"qualCheck",subject:a.match,qualifier:o,negated:r,holds:c,matches:[a.match]}}function Fw(e,t,n){let s=rn(e,t.object);if(!s||!s.match)return{compositeKind:"universal",universalMiss:"unresolved",object:t.object,matches:[]};let o=on(e,{node:"allOfClass",entityType:t.entityType},n),r=Vd(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 zw(e,t,n={}){if(t.node==="miss")return{compositeMiss:!0,reason:t.reason||null,matches:[]};if(t.node==="exists")return Nw(e,t);if(t.node==="qualCheck")return Pw(e,t,n);if(t.node==="universal")return Fw(e,t,n);if(t.node==="count")return{compositeKind:"count",count:on(e,t.base,n).length,entityType:t.entityType,matches:[]};if(t.node==="list")return{compositeKind:"list",matches:on(e,t.base,n),entityType:t.entityType,scoped:t.scoped};if(t.node==="superlative")return Lw(e,t);if(t.node==="temporal")return Ow(e,t,n);if(t.node==="recentCommits")return Tw(e);if(t.node==="commitFilter")return Iw(e,t);if(t.node==="anaphora")return Hd(e,t,n);if(t.node==="membership"||t.node==="qualifier"&&t.inner.node==="membership")return Yd(e,t,n);if(t.node==="find"){let{narrow:s,broad:o}=qd(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:on(e,t,n),entityType:t.entityType||null}}function Xd(){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 Dw(e){let t=["Function","Method"].includes(e.class)?`${e.label}()`:e.label;if(e.class==="Module")return t;let n=Bo(e);return n&&n!=="(unknown module)"?`${t} in ${n}`:t}function Bw(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})`:""}. ${Xd()}.`,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=Ne(t.entityType,1),o=Ne(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=Bo(i),l=i.class==="Module"?"":a&&a!=="(unknown module)"?`, ${Or("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 ${Hn(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=Ne(t.entityType,t.total),o=Ub(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}: ${Hn(t.counter)}.`,miss:!1,ambiguous:!1,matches:t.counter}}if(t.compositeKind==="count"){let s=t.entityType?Ne(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 ${Ne(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 "${Ne(t.entityType,2)} in <module>"`:"";return{content:`${Hn(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?` (${Ne(t.entityType,2)})`:""}. ${Yn(n)}`,miss:!0,ambiguous:!1,matches:[]};if(t.inheritedNotOwn){let s=Ne(t.entityType,2);return{content:`${t.ownerLabel?`${t.ownerLabel} has no own ${s}`:`no own ${s}`} \u2014 inherited from ${t.viaLabel}: ${Hn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches,inheritedNotOwn:!0}}return{content:`${Hn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="find"){let s=Ne(t.entityType,1);if(!t.matches.length)return{content:`no ${Ne(t.entityType,2)} found matching "${t.term}".`,miss:!0,ambiguous:!1,matches:[]};let o=t.matches.length===1?Dw(t.matches[0]):Hn(t.matches);return t.broad?{content:`no exact ${s} named "${t.term}", but found a related ${t.matches.length===1?s:Ne(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,Ot).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>Ot?` \u2026+${t.matches.length-Ot} 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,Ot).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>Ot?` \u2026+${t.matches.length-Ot} 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 ${Ne(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:`${Hn(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?Ne(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. ${Yn(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. ${Yn(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:`${Hn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`nothing in the index matches that${t.entityType?` (${Ne(t.entityType,2)})`:""}. ${Yn(n)}`,miss:!0,ambiguous:!1,matches:[]}}function $a(){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). `+Xd()}function Yn(e=null){return e&&qi(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 ks(e){return new Set(String(e).toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function Fr(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 Jd(e){return String(e||"").replace(/\.[a-z0-9]+$/i,"").toLowerCase().replace(/[/\-_.]+/g,"")}function Uw(e){return String(e||"").trim().replace(/^(?:the|a|an)\s+/i,"").toLowerCase().replace(/[\s\-_]+/g,"")}function Po(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],g=r.filter(y=>y.class==="Commit"&&(String(y.id).toLowerCase().startsWith(`commit:${h}`)||String(y.label).toLowerCase().startsWith(h)));if(g.length===1)return{match:g[0],candidates:[],tier:1,ambiguous:!1};if(g.length>1)return{match:g[0],candidates:g.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 g of h.edges)if(String(g.object).toLowerCase()===l){c=g.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 g of u){let y=Po(e,g,{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 g of r){let y=String(g.label||"").toLowerCase();g.class==="Module"?y.split("/").pop()===o&&d.push({ind:g,score:1e3-Math.abs(y.length-o.length)}):y.includes(o)?d.push({ind:g,score:2e3-Math.abs(y.length-o.length)}):y.endsWith(`.${h}`)&&d.push({ind:g,score:1500-Math.abs(y.length-o.length)})}}else{let h=[...ks(s)],g=o.split(/\s+/).find($=>$.includes("/")),y=g?g.split("/").pop().replace(/\.[a-z0-9]+$/,""):null,k=s.trim().replace(/^(?:the|a|an)\s+/i,"").trim().split(/\s+/).filter(Boolean).length>=2,E=k?Uw(s):null;for(let $ of r){let v=String($.label||"").toLowerCase(),A=v.split("/").pop().replace(/\.[a-z0-9]+$/,"");if(A===o){d.push({ind:$,score:5e3});continue}if(o.length>=4&&(A.startsWith(o)||A.endsWith(o))){d.push({ind:$,score:4e3-Math.abs(A.length-o.length)});continue}if(k){let S=Jd($.label);if(S&&S===E){d.push({ind:$,score:5e3});continue}let R=/[/_-]/.test($.label)||/\.[a-z0-9]+$/i.test(String($.label||""));if(S&&R&&E.length>=4&&S.includes(E)){d.push({ind:$,score:2e3-Math.abs(S.length-E.length)});continue}}if($.class==="Module"){let S=Fr(o);if(S!==o&&S===Fr(A)){let R=Vn(o);if(Tn(A,o,R)>R){d.push({ind:$,score:3e3-Math.abs(A.length-o.length)});continue}}}if(o.length>=4&&v.includes(o)){d.push({ind:$,score:1e3-Math.abs(v.length-o.length)});continue}let T=ks($.label),C=h.filter(S=>T.has(S)).length;C>0&&(!y||T.has(y))&&d.push({ind:$,score:C/h.length*10})}}if(d.sort((h,g)=>g.score-h.score),d.length){let[h,...g]=d,y=g.filter(w=>w.score===h.score);return{match:h.ind,candidates:g.slice(0,4).map(w=>w.ind),tier:3,ambiguous:y.length>0}}let p=m||o.includes("/"),f=null,b=!p&&typeof fs=="function"?fs(e.proseIndex,s).filter(h=>!n||e.byId.get(h.id)?.class===n):[];if(b.length){let[h,...g]=b,y=e.byId.get(h.id);if(y){let w=g.filter(k=>k.score===h.score);if(f={match:y,candidates:g.slice(0,4).map(k=>e.byId.get(k.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=Vn(o),g=h+1,y=[];for(let w of r){let k=Tn(String(w.label||"").toLowerCase(),o,h);if(k>0)for(let E of ks(w.label)){if(k<=0)break;k=Math.min(k,Tn(E,o,h))}k<g?(g=k,y=[w]):k===g&&k<=h&&y.push(w)}if(g<=h&&y.length===1)return{match:y[0],candidates:[],tier:5,ambiguous:!1,matchedVia:"fuzzy"};if(g<=h&&y.length>1&&!f){let[w,...k]=y;return{match:w,candidates:k.slice(0,4),tier:5,ambiguous:!0,matchedVia:"fuzzy"}}}return f||{match:null,candidates:[],tier:null,ambiguous:!1}}function aa(e,t){let n=Jd(t),s=[...ks(t)],o=[];for(let r of ks(e))n.includes(r)||s.some(i=>Fr(i)===Fr(r))||Pr.has(r)||ep.has(r)||o.push(r);return o}function Lr(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(aa(t,r.label))).reduce((r,i)=>r.filter(a=>i.has(a)),aa(t,s[0].label));return o.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:o,nearestLabel:pn(s.slice(0,4).map(r=>r.label))}:e}let n=aa(t,e.match.label);return n.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:n,nearestLabel:e.match.label}:e}function rn(e,t,n={}){let{expectedClass:s=null}=n;if(!s){let o=String(t||"").trim(),r=o.replace(Gw,"").trim(),i=r.match(Ww);if(i){let a=r.slice(0,i.index).trim(),l=De[i[1].toLowerCase()];if(a&&l){let c=Lr(Po(e,a,{expectedClass:l}),a);if(c?.match?.id&&!c.ambiguous)return c}}if(r&&r!==o){let a=Lr(Po(e,r,n),r);if(a?.match?.id&&!a.ambiguous)return a}return Lr(Po(e,t,n),t)}return Lr(Po(e,t,n),t)}function Cn(e,t,n){if(Ds.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 rn(e,t)}function xa(e,t,n){let s=[];for(let o of Ge(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 qw(e,t,n,s={}){let o=!n||n==="Change"||n==="Commit",r=o||n==="Module",i=o||Xn.has(n),a=[...r?["touches"]:[],...i?["touchesSymbol"]:[]],l=a.flatMap(c=>Ge(e,c)).filter(c=>c.subject===t.id).map(c=>e.byId.get(c.object)).filter(Boolean);return n&&Xn.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 Yw(e,t){let n=new Set(String(t||"").toLowerCase().split(/[\s-]+/).filter(Boolean));return(e.individuals||[]).filter(s=>s.class==="Module"&&ka.has(kd(s.label))).map(s=>({ind:s,named:n.has(kd(s.label))?1:0,depth:String(s.label).split("/").length,fixture:Kw(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 Xw(e,t,n){return e==="reverse"&&(t==="imports"||t==="calls")&&(!n||n==="Module")}function Yt(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 zw(e,t,{contextId:n,prev:s});if(t.ambiguousParse){let j=t.candidates.map(_=>{let O=Yt(e,_,{contextId:n,prev:s});return{parsed:_,result:O,rendered:mn(_,O,e)}});return{matches:[],objMatch:null,candidates:t.candidates,traversal:null,ambiguous:!0,branches:j}}let{shape:r,kind:i,entityType:a}=t;if(r==="meta"){let j=String(t.object||"").trim(),_=j.toLowerCase(),O=(e.individuals||[]).find(P=>{if(P.class!=="SchemaClass"&&P.class!=="SchemaPredicate")return!1;if(String(P.label).toLowerCase()===_)return!0;let L=(P.attributes||[]).find(D=>D.key==="token")?.value;return L&&String(L).toLowerCase()===_});if(!O){let P=Bd(e,j);return P?{matches:[P.hit],objMatch:P.hit,candidates:[],ambiguous:!1,metaCodeClass:!0,metaFallbackText:P.text,traversal:`schema lookup for "${j}" (miss), then unique code-entity individual by label`}:{matches:[],objMatch:null,candidates:[],traversal:`schema lookup for "${j}"`,ambiguous:!1}}return{matches:[O],objMatch:O,candidates:[],traversal:`schema lookup for "${j}"`,ambiguous:!1}}if(r==="mentions"){let j=String(t.object||"").trim();return{matches:(typeof fs=="function"?fs(e.proseIndex,j):[]).map(P=>e.byId.get(P.id)).filter(Boolean),objMatch:null,candidates:[],ambiguous:!1,mentionsShape:!0,traversal:`proseIndex word lookup for "${j}"`}}if(r==="where"&&Vw.test(String(t.object||"").trim())){let j=Yw(e,t.object);return{matches:j,objMatch:j[0]||null,candidates:j.slice(1,5),ambiguous:!1,entryPointShape:!0,traversal:`Module individuals with an entry-point basename (${[...ka].join("/")}), ranked query-named basename first, then shallower path, then non-test path`}}if(t.modifier&&t.modifier!=="direct"&&!Xw(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 j=Cn(e,t.subject,n),_=Cn(e,t.object,n);if(!j.match||!_.match||j.ambiguous||_.ambiguous)return{matches:[],objMatch:_.match,candidates:_.candidates,traversal:null,ambiguous:!1,answer:null,unresolvedPronoun:!!(j.unresolvedPronoun||_.unresolvedPronoun)};let[O,P]=[j.match,_.match];i==="touches"&&P.class==="Commit"&&O.class!=="Commit"&&([O,P]=[P,O]);let L=Js[i],D=[...new Set(L?[...Et(i),L]:Et(i))],G=D.flatMap(B=>Ge(e,B)).filter(B=>B.subject===O.id&&B.object===P.id);return{matches:G,answer:t.negated?G.length===0:G.length>0,objMatch:_.match,subjMatch:j.match,candidates:[],traversal:`${D.join("+")} edge from ${O.label} to ${P.label}`,ambiguous:!1}}let l;if(o)l={match:o,candidates:[],ambiguous:!1,matchedVia:null};else{if(l=Cn(e,t.object,n),t.altObject&&t.altObject!==t.object){let j=Cn(e,t.altObject,n),_=!!l.match&&!l.ambiguous,O=!!j.match&&!j.ambiguous;!_&&O?l=j:_&&O&&l.match.id!==j.match.id&&(l={...l,ambiguous:!0,candidates:[j.match,...l.candidates||[]]})}if(t.kind==="tests"&&l.match&&!l.ambiguous&&!String(t.object||"").includes("/")){let j=P=>P.replace(/\.(?:test|spec|tests)(?=\.[^.]+$)/,""),_=j(String(t.object||"").trim().toLowerCase()),O=(e.individuals||[]).find(P=>{if(P.class!=="Module"||P.id===l.match.id)return!1;let L=String(P.label||"").toLowerCase().split("/").pop();return L!==j(L)&&j(L)===_});O&&(l={...l,ambiguous:!0,candidates:[O,...l.candidates||[]]})}}let{match:c,candidates:u,ambiguous:d,unresolvedPronoun:m,matchedVia:p,unplacedWords:f,nearestLabel:b}=l;if(!c)return{matches:[],objMatch:null,candidates:u,traversal:null,ambiguous:!1,unresolvedPronoun:m,unplacedWords:f,nearestLabel:b};if(d){let _=In([c,...u||[]]).slice(0,Ue).map(O=>{let P=Yt(e,t,{contextId:n,prev:s,pinnedObjMatch:O});return{candidate:O,result:P,rendered:mn(t,P,e)}});return{matches:[],objMatch:c,candidates:u,traversal:null,ambiguous:!0,branches:_}}if(r==="where"){let j=(c.attributes||[]).find(_=>_.key==="site")?.value||null;return{matches:[c],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whereShape:!0,site:j,traversal:j?`site attribute of ${c.label}`:`class + defining module of ${c.label}`}}if(r==="when"){let j=O=>String((O.attributes||[]).find(P=>P.key==="date")?.value||""),_;if(c.class==="Commit")_=[c];else{let O=["touches","touchesSymbol"].flatMap(L=>Ge(e,L)).filter(L=>L.object===c.id),P=new Set;_=[];for(let L of O){if(P.has(L.subject))continue;P.add(L.subject);let D=e.byId.get(L.subject);D&&D.class==="Commit"&&_.push(D)}_.sort((L,D)=>j(D).localeCompare(j(L)))}return{matches:_,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 j=L=>String((L.attributes||[]).find(D=>D.key==="date")?.value||""),_=["touches","touchesSymbol"].flatMap(L=>Ge(e,L)).filter(L=>L.object===c.id),O=new Set,P=[];for(let L of _){if(O.has(L.subject))continue;O.add(L.subject);let D=e.byId.get(L.subject);D&&D.class==="Commit"&&P.push(D)}return P.sort((L,D)=>j(D).localeCompare(j(L))),{matches:P,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 qw(e,c,a,{candidates:u,ambiguous:d,matchedVia:p});if(r==="forward"){let j=Js[i],O=!!(j&&c.class&&Xn.has(c.class))?[...new Set([...Et(i),j])]:Et(i);if(a&&a!=="Change"){let F=Ld(e,O),I=ia[a];if(F.size&&!F.has(a)&&!(I&&F.has(I)))return{matches:[],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,forwardGrainMiss:!0,wantClasses:[...F],traversal:`${O.join("+")} edges where subject = ${c.label} (grain mismatch: this "${i}" relation never targets a ${Kn(a)})`}}let L=O.flatMap(F=>Ge(e,F)).filter(F=>F.subject===c.id).map(F=>e.byId.get(F.object)).filter(Boolean),D=In(L),G=D,B="";if(a&&a!=="Change"){G=D.filter(I=>I.class===a);let F=ia[a];if(!G.length&&F){let I=D.filter(M=>M.class===F);I.length&&(G=I,B=`, widened to ${F} subjects (no ${a} recorded)`)}}return{matches:G,objMatch:c,candidates:u,traversal:`${O.join("+")} edges where subject = ${c.label}${B}`,ambiguous:d,matchedVia:p}}if(t.modifier==="transitive")return{matches:Hs(e,c,{maxDepth:Sd}).flat().map(O=>e.byId.get(O.id)).filter(Boolean),objMatch:c,candidates:u,ambiguous:d,matchedVia:p,traversal:`reverse dependency closure over imports+calls edges from ${c.label} (impactClosure, maxDepth=${Sd})`};let h=Js[i]||Et(i).find(j=>Rd.has(j))||null,g=!!(c.class&&Xn.has(c.class));if(h&&(Xn.has(a)||g)){let j=Ge(e,h).filter(B=>B.object===c.id),_=In(j.map(B=>e.byId.get(B.subject)).filter(Boolean)),O=!a||a==="Change"?_:_.filter(B=>B.class===a),P="",L=ia[a];if(!O.length&&L){let B=_.filter(F=>F.class===L);B.length&&(O=B,P=`, widened to ${L} subjects (no ${a} recorded)`)}let D=(i==="touches"||i==="calls"||i==="uses")&&c.class==="Class"&&!Ge(e,"contains").some(B=>B.subject===c.id),G=D?e.byId.get(Qs(e,c)||""):null;if(O.length||!(D&&G))return{matches:O,objMatch:c,candidates:u,traversal:`${h} edges where object = ${c.label}${P}`,ambiguous:d,matchedVia:p}}let y=c,w=u,k=d,E=p,$="",v=Nd(e,i);if(v&&y.class&&y.class!==v){let j=rn(e,t.object,{expectedClass:v});if(j.match&&!j.ambiguous)y=j.match,w=j.candidates,k=j.ambiguous,E=j.matchedVia;else if(v==="Module"){let _=Qs(e,y),O=_&&e.byId.get(_);if(O)$=`, refined from ${y.label} to its containing module`,y=O;else return{matches:[],objMatch:y,candidates:w,ambiguous:k,matchedVia:E,wrongGrainMiss:!0,wantClass:v,traversal:`"${t.object}" resolved to ${Kn(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${Kn(v)}, and no containing module could be found to refine to)`}}else return{matches:[],objMatch:y,candidates:w,ambiguous:k,matchedVia:E,wrongGrainMiss:!0,wantClass:v,traversal:`"${t.object}" resolved to ${Kn(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${Kn(v)})`}}let A=Et(i).flatMap(j=>Ge(e,j)).filter(j=>j.object===y.id);i==="cochange"&&(A=A.concat(Et(i).flatMap(j=>Ge(e,j)).filter(j=>j.subject===y.id).map(j=>({...j,subject:j.object,object:j.subject}))));let T="";if(!A.length&&y.class){let j=`ext:${String(y.label).toLowerCase()}`;A=Et(i).flatMap(_=>Ge(e,_)).filter(_=>String(_.object).toLowerCase()===j),A.length&&(T=` (by name, via unresolved ${j} references)`)}let C=[],S=new Set;for(let j of A){let _=e.byId.get(j.subject);_&&!S.has(_.id)&&(S.add(_.id),C.push(_))}let R,N="";if(!a||a==="Change")R=C;else{let j=C.filter(_=>_.class===a);if(j.length)R=j;else if(a!=="Module"&&C.some(_=>_.class==="Module")){let _=new Set(C.filter(O=>O.class==="Module").map(O=>O.id));R=xa(e,_,a),N=`, then ${Kn(a)} defined in the matched module(s)`}else R=[]}return{matches:R,objMatch:y,candidates:w,traversal:`${Et(i).join("+")} edges where object = ${y.label}${T}${N}${$}`,ambiguous:k,matchedVia:E}}function Bo(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 ca(e){let t=String(e.label||e.id||"");return["Function","Method"].includes(e.class)?`function ${t}()`:t}function Jw(e){let t=String(e.label||e.id||""),n=(e.attributes||[]).find(s=>s.key==="author")?.value;return n?`${t} (${n})`:t}function pn(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`:e[0]}function Fo(e){let t=e.object??e.subject??"?";return`${e.entityType?Ne(e.entityType,2)+" that ":""}${e.kind} "${t}"`}function Ed(e){return Eo[e]?.bare||e}function Qw(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=Ne(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 ${Ed(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 ${Ed(o.kind)} ${JSON.stringify(String(r))}`}function Qd(e){if(!e)return null;if(e.ambiguousParse)return{english:`ambiguous: ${e.candidates.map(Fo).join(" \u2014 or \u2014 ")}`,machine:`ambiguousParse(${e.candidates.map(r=>Qd(r)?.machine).join(", ")})`};if(e.node)return{english:(e.node==="boolean"?Qw(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 ":""}${$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 r=e.entityType?Ne(e.entityType,2)+" that ":"";o=e.shape==="forward"?`what "${e.object}" itself ${$s(e.kind)}`:`${r}${$s(e.kind)} "${e.object}"`}return{english:o,machine:s}}function mn(e,t,n=null){let s=Zd(e,t,n);return t&&t.matchedVia==="fuzzy"&&t.objMatch&&!s.ambiguous&&(s.content=`assuming you meant ${t.objMatch.label}: ${s.content}`),s}function Zd(e,t,n){if(!e)return{content:`couldn't parse this as a graph question. Try: ${$a()}`,miss:!0,ambiguous:!1};if(e.node)return Bw(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 ${Fo(l.parsed)}: ${l.rendered.content}`).join(`
51
+ \u2026+${o.length-Wi} more`:"")}function Pu(e,t){let n=dn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ve(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,Gi).map(i=>{let a=e.byId.get(i.object),l=a?wt(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>Gi?`
54
+ \u2026+${o.length-Gi} more`:"")}var Wl,nu,Vl,Th,Ih,Bi,Oh,Sr,Lh,Nh,Mh,ru,Ph,Fh,Dh,zh,Bh,Uh,Wh,Gh,qh,Vh,Hh,Kh,Yh,Xh,Jh,Qh,Zh,eg,tg,ng,sg,og,rg,ig,ag,Hl,cg,lg,iu,au,cu,ug,dg,pg,mg,fg,Yl,Xl,bg,Jl,kr,Ql,Zl,eu,Oo,Ne,yg,vg,bu,$g,Ot,$u,xg,Cu,Eg,Sg,jg,_g,Rg,Ag,Tg,Cg,Ui,tu,jr,Ig,Wi,Gi,Ae=K(()=>{Wn();Vs();Mi();Io();bs();Wl={"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||""));Vl=30,Th=8;Ih=2,Bi=25,Oh=3;Sr=10,Lh=8,Nh=3,Mh=2,ru=5,Ph=4,Fh=.2,Dh=.35,zh=.15,Bh=e=>/(^|\/)(examples?|fixtures?|samples?|demos?|benchmarks?|test-[^/]+)(\/|$)/.test(e),Uh=.2,Wh=.35,Gh=.2,qh=.35,Vh=e=>/\.cs$/i.test(e),Hh=e=>/^I[A-Z]/.test(String(e||"")),Kh=.2,Yh=.35,Xh=50,Jh=.2,Qh=.35,Zh=.5,eg=ru,tg=3,ng=4,sg=1,og=.9,rg=.5,ig=.2,ag=.35,Hl=4,cg=2,lg=[["imports"],["calls","callsSymbol"],["inherits"],["cochange"]],iu=3,au=12,cu=.9,ug=["imports","calls","callsSymbol","inherits"],dg=.5,pg=.6,mg=.2,fg=.35;Yl=128,Xl=4,bg=64,Jl=250,kr=class extends Error{};Ql=new WeakMap;Zl=40,eu=40,Oo=30;Ne=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value||"";yg=25,vg=15;bu=40,$g="tests edges are recorded module to module, so this is module-grain coverage.";Ot=15;$u=new Set(["Function","Method"]);xg=8;Cu={function:"Function",class:"Class",method:"Method",attribute:"Attribute"};Eg=8,Sg=16,jg=4,_g=6,Rg=12,Ag=2,Tg=8,Cg=3,Ui=e=>String(e||"").split(",").map(t=>t.trim()).filter(Boolean),tu=e=>String(e||"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),jr=e=>{let t=String(e||"").trim();return t?t.split(",").map(n=>n.trim()).filter(Boolean).length:0},Ig=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};Wi=20;Gi=40});function Ve(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Gu(e){let t=String(e||"");return Fu&&(t=t.replace(Fu," ")),t.replace(/\s+/g," ").trim()}function qu(e){let t=String(e||"");t=t.replace(Qg," ").replace(/\s+/g," ").trim();for(let n=0;n<3;n++){let s=t,o=t.match(Xg);if(o&&(t=o[1].trim()),o=t.match(Jg),o&&(t=o[1].trim()),o=t.match(Du),o&&(t=o[1].trim()),o=t.match(zu),o&&(t=o[1].trim()),o=t.match(Bu),o&&(t=o[1].trim()),o=t.match(Uu),o&&(t=o[1].trim()),o=t.match(Zg),o&&(t=o[1].trim()),o=t.match(eb),o&&ys.test(o[1].trim())&&(t=o[1].trim()),o=t.match(tb),o&&ys.test(o[1].trim())&&(t=o[1].trim()),o=t.match(nb),o&&ys.test(o[1].trim())&&(t=o[1].trim()),o=t.match(sb),o&&ys.test(o[1].trim())&&(t=o[1].trim()),o=t.match(ob),o&&ys.test(o[1].trim())&&(t=o[1].trim()),o=t.match(rb),o&&(t=`what ${o[2].toLowerCase()} ${o[1].trim()}`),o=t.match(ib),o&&(t=`what does ${o[1].trim()} mean`),o=t.match(ab),o){let r=o[1].trim();Yg(r)||(t=Vg.test(r)||ys.test(r)?r:`describe ${r}`)}if(o=t.match(cb),o){let r=o[1].trim();(ys.test(r)||lb.test(r)||Uu.test(r)||Du.test(r)||Bu.test(r)||zu.test(r))&&(t=r)}if(t===s)break}return t}function pb(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t,o=t.match(ub);if(o&&(t=o[1].trim()),o=t.match(db),o&&(t=o[1].trim()),t===s)break}return t}function fb(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t.match(mb);if(!s)break;let o=s[1].trim();if(!o||o===t)break;t=o}return t}function bb(e){let t=String(e||""),n=t.match(gb);if(n){let o=Hu[n[1].toLowerCase()],r=Vu[n[2].toLowerCase()];return`${o} ${r} ${n[3].trim()} and ${n[4].toLowerCase()}`}let s=t.match(Ku);return s?`which modules transitively import ${s[1].trim()}`:t}function Rr(e){return String(e||"").replace(Fg,t=>_i[t.toLowerCase()])}function vs(e){let t=Rr(e);return t=t.replace(Dg,n=>Ri[n.toLowerCase()]),t=t.replace(zg,n=>Ai[n.toLowerCase()]),t=t.replace(Bg,"with"),t=t.replace(Ug,(n,s)=>`${s} for`),t=t.replace(Wg,(n,s)=>`for ${s}`),t=t.replace(Gg,(n,s)=>s),t=t.replace(wb,"$1$2"),t=t.replace(vl,"$1ing"),t=qu(t),t=fb(t),t=pb(t),t=bb(t),t=Gu(t),t=Vt(t),t=t.replace(/\?{2,}\s*$/,"?"),t.replace(/\s+/g," ").trim()}function Lo(e){for(let t of[...xl,...$l]){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function Ji(e){for(let t of yb){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function Yu(e){let t=String(e||"").match(vb);if(!t)return null;let n=t[1].toLowerCase(),s=t[2].trim();return s?{entWord:n,predicate:s}:null}var Pg,Fg,Wu,Dg,zg,Bg,Ug,Wg,Gg,qg,Fu,Vg,ys,Hg,Kg,Yg,Xg,Jg,Du,zu,Bu,Qg,Zg,eb,tb,nb,sb,ob,rb,ib,ab,cb,lb,Uu,ub,db,mb,Vu,Hu,hb,gb,Ku,wb,yb,vb,nt,Kt,ue,qn=K(()=>{jn();Pg=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Ve).join("|")+")\\b","gi"),Fg=Pg(_i),Wu=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Ve).join("|")+")\\b(?!\\.[a-z0-9])","gi"),Dg=Wu(Ri),zg=Wu(Ai),Bg=/(?<=^|\s)w\/(?=\s|$)/gi,Ug=/\b(thx|thanks|thank\s+you|many\s+thanks|ty|cheers)\s+4\b/gi,Wg=/\b4\s+(example|instance)\b(?!\s*[a-z])/gi,Gg=/\b(this|that)\s+(class|module|function|method|attribute|variable|file|commit)\b/gi,qg=Object.keys(ae).sort((e,t)=>t.length-e.length).map(Ve).join("|"),Fu=Ro.length?new RegExp("\\b("+[...Ro].sort((e,t)=>t.length-e.length).map(Ve).join("|")+")\\b\\s*,?","gi"):null;Vg=new RegExp("\\b(?:"+Object.keys(ae).sort((e,t)=>t.length-e.length).map(Ve).join("|")+")\\b","i"),ys=/^(?:which|what|who|whose|where|when|why|how)\b/i,Hg=new Set(["modules","files","functions","methods","classes","attributes","fields","properties","variables","globals","commits","changes","tests","members"]),Kg=/^(?:all\s+|the\s+)?(?:module|file|function|method|class|attribute|field|property|variable|global|commit|change|test|member)\??$/i,Yg=e=>{if(Kg.test(e))return!0;let t=e.replace(/\?+\s*$/,"").trim().split(/\s+/);return Hg.has((t[t.length-1]||"").toLowerCase())},Xg=/^(?: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,Jg=/^(?: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,Du=/^(?:(?:ok(?:ay)?|aight|cool|alright|sure|right|fine|great|nice|got it|gotcha|sounds good|no worries|no problem)[\s,]+)+(.+)$/i,zu=/^(?: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,Bu=/^(?:(?:maybe|possibly|perhaps)\s+)+(.+)$/i,Qg=/,?\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,Zg=/^(?:can|could|would|will)\s+you\s+(?:please\s+)?(.+?)(?:[,\s]+please)?\??$/i,eb=/^explain\s+(?:to\s+me\s+|please\s+)*(.+?)\??$/i,tb=/^tell\s+me\s+(.+?)\??$/i,nb=/^do\s+you\s+know\s+(.+?)\??$/i,sb=/^i(?:'d|\s+would)?\s+(?:(?:like|want|need)\s+to|wanna)\s+know\s+(.+?)\??$/i,ob=/^i(?:\s+was|\s+am|'m)?\s+(?:just\s+)?(?:wonder(?:ing|ed)?|curious)(?:\s+(?:if|whether|about))?\s+(.+?)\??$/i,rb=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+(is|are)\??$/i,ib=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+means\??$/i,ab=/^(?:show|give)\s+me\s+(?:the\s+)?(.+?)\??$/i,cb=/^(?:and|also|so|then|now|but)\s+(.+)$/i,lb=/^(?:does|do|did|is|are|was|were|has|have|had|can|could|will|would|should)\b/i,Uu=/^(?:(?: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;ub=/^(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+?,\s*(.+)$/i,db=/^(.+?),\s*(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+$/i;mb=/^.+?(?:\s*(?:--|—|-)\s*)?\b(?:sorry|i\s+mean)\b\s*(?:--|—|-|,|:)\s*(.+)$/i;Vu=Object.freeze({imports:"importing",calls:"calling",touches:"touching",tests:"testing",exports:"exporting",contains:"containing",defines:"defining",uses:"using","inherits from":"inheriting from"}),Hu=Object.freeze({module:"modules",class:"classes",function:"functions",method:"methods",attribute:"attributes",variable:"variables",commit:"commits",file:"files"}),hb="public|private|protected|static|abstract|constant|re-?exported|exported|tested|covered|untested|uncovered",gb=new RegExp("^if\\s+(?:a|an|the)?\\s*("+Object.keys(Hu).join("|")+")\\s+("+Object.keys(Vu).join("|")+")\\s+(.+?),\\s*(?:is|are)\\s+(?:it|that|they|this)\\s+("+hb+")\\??$","i"),Ku=/^if\s+(.+?)\s+(?:were|was)\s+(?:deleted|removed),?\s*what\s+(?:would|might|could)\s+(?:break|fail|be\s+affected)\??$/i;wb=new RegExp(`^(where\\s+(?:is|are|was|were)\\s+.+?)\\s+(?:${wl.map(Ve).join("|")})(\\s*[?.!]*)$`,"i");yb=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+(?:${ji.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+(${qg})\\s+(?:anything|something)(?:\\s+else)?\\??$`,"i"),to:e=>`what does ${e[1]} ${e[2]}`}]);vb=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");nt=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"]),Kt=e=>String(e).replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),ue=e=>e.flatMap(t=>String(t).toLowerCase().split(" "))});var Ju,Xu=K(()=>{Ju={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 Tn(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 Zi(e){return/^[a-z]+$/.test(e)&&!nt.has(e)&&!Qi.has(e)}function Qu(e){return jb(e)?null:ea(e,Eb,Vn(e))}function ea(e,t,n=Vn(e)){let s=n+1,o=null,r=!1;for(let i of t){let a=Tn(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 xb,Vn,Qi,kb,Eb,Sb,jb,No=K(()=>{jn();Xu();qn();xb=["used"];Vn=e=>e.length<=5?1:2,Qi=new Set([...Object.keys(ae),...Object.keys(ze),...Object.keys(Bt),...xb].flatMap(e=>e.split(" "))),kb=4,Eb=[...new Set([...Object.keys(ae),...Object.keys(Bt)].flatMap(e=>e.split(" ")).filter(e=>e.length>=kb))],Sb=new Set(Ju.words),jb=e=>Sb.has(e)});function Xs(e){for(let t of Tb){let n=e.match(t.re);if(n){let s=t.build(n);if(s)return s}}return null}var Ar,_b,Rb,Ab,Tb,Zu,Tr=K(()=>{jn();qn();Ar=Object.keys(ae).sort((e,t)=>t.length-e.length).map(Ve).join("|"),_b=Object.keys(ze).sort((e,t)=>t.length-e.length).map(Ve).join("|"),Rb=Object.keys(Bt).sort((e,t)=>t.length-e.length).map(Ve).join("|"),Ab=ds.slice().sort((e,t)=>t.length-e.length).map(Ve).join("|"),Tb=[{name:"ask",re:new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+(${Ar})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=ae[t],s=e[1].trim(),o=e[3].trim();return _o.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+(${_b})\\s+(?:(${Rb})\\s+)?(${Ar})\\s+(.+?)\\??$`,"i"),build:e=>({shape:"reverse",entityType:ze[e[1].toLowerCase()],modifier:e[2]?Bt[e[2].toLowerCase()]:"direct",kind:ae[e[3].toLowerCase()],object:e[4].trim()})},{name:"forward",re:new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+(${Ar})\\??$`,"i"),build:e=>({shape:"forward",entityType:null,modifier:"direct",kind:ae[e[2].toLowerCase()],object:e[1].trim()})},{name:"meta-mean",re:new RegExp(`^what\\s+(?:does|do|is|are)\\s+(.+?)\\s+(?:${Ab})\\??$`,"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?)\\s+)?(.+?)\\??$","i"),build:e=>{let t=Vt(e[2].trim());if(!e[1]&&!ze[t.toLowerCase()])return null;let n=t.toLowerCase();return e[1]&&yl.some(s=>n===s||n.startsWith(`${s} `))?null:{shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:ls(t)}}},{name:"mention",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)\\s+(?:${sn.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+(?:${qt.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+)?(${Ar})\\??$`,"i"),build:e=>ae[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()})}];Zu={id:"grammar",class:"graph-query",run(e){let t=Xs(e);return t?{strategyId:"grammar",class:"graph-query",candidates:[{parsed:t,confidence:.9}]}:null}}});function yt(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 Mo(e,t=null){let n=e.replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),s=n.map(v=>v.toLowerCase());if(s.includes("where")&&!yt(s,ae)){let v=s.some(C=>sn.includes(C)),A=new Set([...qt,...sn]),T=n.filter((C,E)=>!nt.has(s[E])&&!A.has(s[E])).join(" ").trim();if(T){let C=v?"mentions":"where";return{shape:C,entityType:null,modifier:"direct",kind:C,object:T}}}if(new Set(["has","have","had"]).has(s[0])){let v=s.length;for(;v>1&&(s[v-1]==="ever"||s[v-1]==="been");)v-=1;if((v>1?ae[s[v-1]]:null)==="touches"){let T=n.slice(1,v-1).filter((C,E)=>!nt.has(s[1+E])).join(" ").trim();if(T)return{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:T}}}let r=s,i=yt(s,ae);if(!i&&t){let v=s.map(A=>{if(!Zi(A))return A;let T=t.lemma(A);return Qi.has(T)?T:A});i=yt(v,ae),i&&(r=v)}let a=null;if(!i){let v=s.map(A=>A.length>=4&&Zi(A)&&Qu(A)||A);if(i=yt(v,ae),i){r=v;let A=s.slice(i.start,i.end).findIndex((C,E)=>C!==v[i.start+E]),T=i.start+Math.max(A,0);a={from:s[T],to:v[T]}}}if(!i)for(let v=0;v<s.length;v+=1){let A=us[s[v]];if(!(A&&s[v]==="used"&&s[v+1]==="for")&&A&&s.slice(0,v).some(T=>ta.has(T))){i={kind:A,start:v,end:v+1};break}}if(!i)return null;let l=v=>a?{...v,fuzzyVerb:a}:v;if(t&&i.end-i.start===1){let v=i.start,A=s[v-1];if((A==="the"||A==="these"||A==="those")&&s[v+1]==="of"&&t.posTags(n)[v]==="NOUN"){let C=n.slice(v+2).filter((E,R)=>!nt.has(s[v+2+R])).join(" ").trim();if(C)return l({shape:"forward",entityType:null,modifier:"direct",kind:i.kind,object:C})}}let c=new Set,u=v=>{if(v)for(let A=v.start;A<v.end;A+=1)c.add(A)};u(i);for(let[v,A]of Object.entries(ae)){if(A!==i.kind)continue;let T=v.split(" "),C=i.end;if(T.every((E,R)=>r[C+R]===E)){u({start:C,end:C+T.length});break}}let d=yt(r,ze,c);u(d);let f=yt(r,Bt,c);u(f);let p=(v,A)=>n.slice(v,A).filter((T,C)=>!c.has(v+C)&&!nt.has(s[v+C])).join(" ").trim(),m=p(0,i.start),b=p(i.end,n.length),h=i.kind,g=d?ze[r.slice(d.start,d.end).join(" ")]:null,y=f?Bt[r.slice(f.start,f.end).join(" ")]:"direct";if(h==="touches"&&s.includes("when")){let v=m||b;if(v)return l({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:v})}if(h==="touches"&&s.includes("who")&&s.includes("last")){let v=m||b;if(v)return l({shape:"whoLast",entityType:null,modifier:"direct",kind:"touches",object:v})}let w=s.indexOf("by"),k=s.slice(0,i.start).findIndex(v=>ta.has(v)),S=k>=0,$=S&&k>w;if(w>=0&&!c.has(w)&&S){let v=(C,E)=>n.slice(C,E).filter((R,N)=>{let j=C+N,_=s[j];return!c.has(j)&&!nt.has(_)&&_!=="by"&&!ta.has(_)&&!Cb.has(_)&&!Ib.has(_)}).join(" ").trim(),[A,T]=$?[v(k+1,n.length),v(w+1,k)]:[v(0,w),v(w+1,n.length)];if(A&&T)return l({shape:"ask",entityType:null,modifier:"direct",kind:h,subject:T,object:A});if(T)return l({shape:"forward",entityType:g,modifier:y,kind:h,object:T});if(A)return l({shape:"reverse",entityType:g,modifier:y,kind:h,object:A})}if(m&&b){let v=r.slice(i.start,i.end).join(" "),A=m,T=b;return _o.includes(v)&&([A,T]=[T,A]),l({shape:"ask",entityType:null,modifier:"direct",kind:h,subject:A,object:T})}if(b){let v=d&&d.start>=i.end?null:g;return l({shape:"reverse",entityType:v,modifier:y,kind:h,object:b})}if(h==="inherits"&&!m&&d&&d.start===i.end){let v=r.slice(d.start,d.end).join(" ");if(v)return l({shape:"reverse",entityType:null,modifier:y,kind:h,object:v})}return m&&!b&&S&&i.end-i.start===1&&us[s[i.start]]?m.split(/\s+/).length>1?null:l(h==="touches"?{shape:"when",entityType:null,modifier:"direct",kind:h,object:m}:{shape:"reverse",entityType:g,modifier:y,kind:h,object:m}):m?l({shape:"forward",entityType:g,modifier:"direct",kind:h,object:m}):null}var ta,Cb,Ib,ed,Cr=K(()=>{jn();qn();No();ta=new Set(["is","are","was","were","be","been","being","get","gets","got"]),Cb=new Set(["which","what","who","whom","whose"]),Ib=new Set(Sn.map(e=>e.toLowerCase()));ed={id:"keyword-spot",class:"graph-query",run(e,t={}){let n=Mo(e,t.nlp||null);return n?{strategyId:"keyword-spot",class:"graph-query",candidates:[{parsed:n,confidence:.7}]}:null}}});function Lb(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)||td.has(l)||!s.has(l)||o[i]==="VERB"&&r.push(l)}return r}function Nb(e,t=null){let n=Kt(e),s=[],o=[];for(let i of n){let a=i.toLowerCase();/^[a-z]+$/.test(i)&&!td.has(a)&&(Ob.has(a)||t&&typeof t.isStopWord=="function"&&t.isStopWord(a))?o.push(i):s.push(i)}let r=Lb(n,s,t);return{text:s.join(" "),dropped:o,maybeNoise:r}}var td,Ob,nd,sd=K(()=>{jn();qn();Tr();Cr();td=new Set([...nt,...ue(zs),...ue(Object.keys(ae)),...ue(Object.keys(ze)),...ue(Object.keys(Bt)),...ue(Object.keys(qe)),...ue(ps),...ue(ms),...ue(Object.keys(Un)),...ue(Object.keys(ln)),...ue(Object.keys(Bs)),...ue(Sn),...ue(Ao),...ue(ds),...ue(qt),...ue(sn),...ue(En),...ue(Object.keys(Ws))]),Ob=new Set([...ue(Ro),...ue(br)]);nd={id:"noise-strip",class:"noise-stripped",run(e,t={}){if(Xs(e))return null;let{text:n,dropped:s,maybeNoise:o}=Nb(e,t.nlp||null);if(!s.length||!n)return null;let r=Xs(n)||Mo(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 od=K(()=>{});var rd=K(()=>{});function ad(e,t){return e.shape!==t.shape||e.kind!==t.kind?!1:e.shape==="ask"?Js(e.subject)===Js(t.subject)&&Js(e.object)===Js(t.object):Js(e.object)===Js(t.object)}function na(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=>!cd(c))&&(n=n.filter(c=>!cd(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 f of u){let p=d.find(m=>ad(m.parsed,f.parsed)&&m.via===f.via);if(p){p.agreed+=1,p.confidence=Math.max(p.confidence,f.confidence),id(f.parsed)<id(p.parsed)&&(p.parsed=f.parsed);continue}d.push({...f,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=>ad(u.parsed,c.parsed)));return{class:i.class,parsed:a,winner:i.candidates[0],alternates:l}}function Fb(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 ld(e,{describe:t=Fb,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 Js,Mb,id,Pb,cd,sa=K(()=>{Js=e=>String(e||"").trim().toLowerCase().replace(/\s+/g," ").replace(/^(?:the|a|an)\s+/,"").replace(/^commit\s+(?=[0-9a-f]{7,40}$)/,""),Mb=/^\s*(?:the|a|an)\s+/i,id=e=>[e?.subject,e?.object].filter(t=>Mb.test(String(t||""))).length;Pb=new Set(["fuzzy","lemma","spell"]),cd=e=>Pb.has(e.via)});function Ir(e){oa=e}function ra(){return typeof oa=="function"?oa():null}var oa,Po=K(()=>{oa=null});function pd(e,t={},n=zb){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 Db,zb,md=K(()=>{qn();Tr();Cr();sd();od();rd();sa();Po();Db=[...typeof void 0<"u"?[void 0]:[],...typeof void 0<"u"?[void 0]:[]],zb=[Zu,ed,nd,...Db]});var Or,fd=K(()=>{Or=(e,t,n)=>n});var op={};zn(op,{DYNAMIC_TAIL_OK_RE:()=>Sa,applyNegationFrames:()=>Lo,ask:()=>Jn,classDisplayName:()=>Kn,degreeMetric:()=>Yd,metaFallbackEntityAnswer:()=>Ud,normalizeQuery:()=>vs,parseQuery:()=>Bo,parseQueryFull:()=>ha,render:()=>mn,rephraseHint:()=>$a,resolveObject:()=>rn,traverse:()=>Yt});function We(e,t){let n=hd.get(e);n||(n=new Map,hd.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(An(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function Me(e,t){let[n,s]=Td[e]||["result","results"];return t===1?n:s}function Kn(e){let t=String(e||"");if(typeof un=="function"){let n=un(t).join(" ");if(n)return n}return t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase()}function $s(e){return Ub[e]||e}function Hb(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||Vb.has(s))return e;let o=String(n.object||"").trim().toLowerCase();return ue(ds).includes(o)?t:e}function Bo(e,{nlp:t=void 0}={}){return ha(e,{nlp:t}).parsed}function ha(e,{nlp:t=void 0}={}){let n=t===void 0?ra():t,s=String(e||"").trim().replace(/\s+/g," ");if(!s)return{parsed:null,alternates:[],class:null};let o=Ji(Lo(vs(s)));if(!o)return{parsed:null,alternates:[],class:null};let r=Yb(o,n);if(r)return{parsed:r,alternates:[],class:null};let i=na(pd(o,{nlp:n,raw:s}));return i?{parsed:Hb(i.parsed),alternates:i.alternates||[],class:i.class||null}:{parsed:null,alternates:[],class:null}}function ua(e,t){return t.length&&Id.has(t[0])?{bw:e.slice(1),blc:t.slice(1)}:{bw:e,blc:t}}function eo(e,t){return Xs(e)||Mo(e,t)}function Yb(e,t){let n=Kt(e),s=n.map(o=>o.toLowerCase());return mw(n,s)||hw(n,s)||Jb(n,s,t)||Ld(e,t,0)||gw(n,s,t)||Zb(n,s,t)||iw(n,s,t,0)||cw(n,s)||dw(n,s,t)||bw(n,s,t)||$w(n,s,t)||kw(n,s,t,0)||vw(n,s,t,0)||ba(n,s,t,0)||tw(n,s,t)||Dd(n,s,t,0)}function Nr(e,t){return{node:"boolean",entityType:e,atoms:[{op:"seed",kind:"set",ast:{node:"allOfClass",entityType:e}},t]}}function Jb(e,t,n){if(!["do","does","did"].includes(t[0])||!Xb.has(t[1]))return null;let s=Lt(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=yt(a,ae);if(!l)return{node:"miss",reason:"a universal check needs a known relation verb (import, call, inherit from, test, \u2026)"};let u=i.filter((f,p)=>(p<l.start||p>=l.end)&&!nt.has(a[p])&&a[p]!=="from").join(" ").trim();if(!u)return null;let d=to(`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:Nr(o,{op:"difference",kind:"set",ast:d})}}function Ld(e,t,n=0){let s=Yu(e);if(!s)return null;let o=Lt(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=Kt(s.predicate),a=i.map(d=>d.toLowerCase());if(a.length&&a.every(d=>qe[d]))return Nr(r,{op:"difference",kind:"qual",filters:a});let l=yt(a,ae);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,f)=>(f<l.start||f>=l.end)&&!nt.has(a[f])&&a[f]!=="from").length)return Nr(r,{op:"difference",kind:"set",ast:{node:"existsEdge",entityType:r,kind:l.kind}});let u=to(`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"}:Nr(r,{op:"difference",kind:"set",ast:u})}function Zb(e,t,n){let s=0;for(;s<t.length&&Qb.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=yt(r,ae);if(!a)return null;let c=o.filter((u,d)=>d!==i&&(d<a.start||d>=a.end)&&r[d]!=="from"&&!nt.has(r[d])).join(" ").trim();return c?{node:"forwardComplement",kind:a.kind,subjectTerm:c}:null}function Nd(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 Md(e,t){let n=St(t),s=n.filter(r=>!Ad.has(r)),o=Nd(e,s.length?s:n);return o.size===1?[...o][0]:null}function to(e,t,n){if(n>Cd)return{node:"miss",reason:"too deep to resolve"};let s=Ld(e,t,n);if(s)return s;let o=Kt(e),r=o.map(c=>c.toLowerCase()),i=ba(o,r,t,n);if(i)return i;let a=Dd(o,r,t,n);if(a)return a;let l=eo(e,t);return l?{node:"clause",clause:l}:null}function ba(e,t,n,s){for(let o=1;o<t.length;o+=1){let r=En.includes(t[o]),i=!r&&Od(t[o]);if(!r&&!i||r&&o+1>=t.length||!Lt(t[o-1]))continue;let l=e.slice(0,o-1);if(!l.length||l.every(f=>qe[f.toLowerCase()]))continue;let c=eo([...l,la].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=to(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 tw(e,t,n){for(let s=0;s<t.length;s+=1){if(!ew.has(t[s])||t[s-1]==="of")continue;let o=s===t.length-1,r=s+1<t.length&&!!ae[t[s+1]];if(!o&&!r)continue;let i=[...e.slice(0,s),la,...e.slice(s+1)],a=eo(i.join(" "),n);if(!(!a||a.shape!=="reverse"&&a.shape!=="forward")&&a.object===la&&!(a.modifier&&a.modifier!=="direct"))return{node:a.shape==="reverse"?"reverseSet":"forwardSet",kind:a.kind,entityType:a.entityType,inner:{node:"prevSet"}}}return null}function iw(e,t,n,s=0){if(t[0]!=="when")return null;let o=1;if(!nw.has(t[o]))return null;o+=1;let r=-1;for(let d=t.length-1;d>=o;d-=1)if(sw.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&&ow.has(a[a.length-1]);)i=i.slice(0,-1),a=a.slice(0,-1);for(;a.length&&rw.has(a[0]);)i=i.slice(1),a=a.slice(1);if(!i.length||!a.some(d=>En.includes(d)))return null;let l=ga.has(a[0])?i.join(" "):`which ${i.join(" ")}`,c=to(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=Lt(a[0]);return{node:"temporal",inner:c,entityType:u&&u.entityType||null}}function cw(e,t){if(t[0]!=="what"||t[1]!=="changed")return null;let n=2;if(t[n]==="ever"&&(n+=1),!aw.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 uw(e){let t=new Set,n=[];for(let s of e){if(!s||!lw.test(s))continue;let o=s.toLowerCase();t.has(o)||(t.add(o),n.push(s))}return n}function dw(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(!Ao.includes(t[d]))continue;if(t[d-1]==="of"){s=d,o=!0;break}let f=t.slice(0,d).join(" ");if(d===t.length-1&&(ps.includes(f)||ms.includes(f))){s=d;break}}if(s<0)return null;let r=(o?t.slice(0,s-1):t.slice(0,s)).join(" "),i=ps.includes(r)||/^(how many|how much|count|number|quantity|total)\b/.test(r)?"count":"list",a=pw(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=uw(e.slice(0,l)),u={node:"anaphora",mode:i,filter:a};return c.length>=2&&(u.candidateTerms=c),u}function pw(e,t){let n=0,s=e.map(a=>a.toLowerCase());for(;n<s.length&&Kb.has(s[n]);)n+=1;let o=e.slice(n),r=s.slice(n);if(!o.length)return{type:"all"};if(r.every(a=>qe[a]))return{type:"qual",filters:r};let i=eo(`what ${o.join(" ")}`,t);if(i&&(i.shape==="reverse"||i.shape==="forward")&&i.object)return{type:"clause",clause:i}}function mw(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?Lt(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 fw(e,t){if(!t.length)return null;let n=`${e} ${t.join(" ")}`,s=ls(n).slice(e.length).trim(),o=Kt(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 hw(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(qe[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&&us[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&&!kl.has(u))return null}let r=fw(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 gw(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=eo(e.filter((r,i)=>i!==s).join(" "),n);return!o||o.shape!=="ask"?null:{...o,negated:!0}}function bw(e,t,n){let s=ps.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&&qe[t[o]];)r.push(t[o]),o+=1;let i=o<t.length?Lt(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=>!nt.has(d)&&!Pd.has(d)),u;if(c){let d=to(`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 vw(e,t,n,s){let o=0,r=!1,i=null;for(let y of ww){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&&wa.has(t[o]);)o+=1;let a=[];for(;o<t.length&&qe[t[o]];)a.push(t[o]),o+=1;let l=o<t.length?Lt(t[o]):null;if(!l||l.placeholder||l.entityType==="Change")return!r&&o<t.length&&o===t.length-1&&/^[a-z]+$/.test(t[o])&&!ae[t[o]]&&!Sn.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${Fd}`}:null;let c=l.entityType,u=t[o];o+=1;let d=e.slice(o),f=t.slice(o).some(y=>!nt.has(y)&&!Pd.has(y)),p=t.slice(o),m=d;(p[0]==="is"||p[0]==="are")&&(p=p.slice(1),m=m.slice(1));let b=r&&yw.has(p[0]);if(r&&(f&&!b||d.length===0))return null;let h,g=!1;if(f){let y=b?m:d,w=to(`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,g=!0}else h={node:"allOfClass",entityType:c},a.length&&(h={node:"qualifier",filters:a,inner:h});return{node:"list",entityType:c,base:h,scoped:g}}function $w(e,t,n){let s=null,o=-1;for(let m=0;m<t.length;m+=1){let b=t.slice(m,m+2).join(" ");if(Un[b]){s=Un[b],o=m;break}if(Un[t[m]]){s=Un[t[m]],o=m;break}}if(!s)return null;let r=null,i=null;for(let m=o;m<t.length;m+=1)if(ln[t[m]]){r=ln[t[m]],i=t[m];break}if(!r){for(let m=o-1;m>=0;m-=1)if(ln[t[m]]){r=ln[t[m]],i=t[m];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(m=>l.includes(m));!r&&(a||c)&&(r=ln.connections,i="connections");let u,d=null;for(let m of t){let b=Lt(m);if(b&&!b.placeholder){u=b.entityType,d=m;break}}if(!d&&(u=i?El[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 f=["needs","need","needing","lacks","lack","lacking","misses","missing"],p=t.some(m=>f.includes(m))?s==="most"?"fewest":"most":s;return{node:"superlative",entityType:u,metric:r,metricNoun:i,extreme:p}}function kw(e,t,n,s){if(t[0]!=="find")return null;let o=1;for(;o<t.length&&wa.has(t[o]);)o+=1;if(o>=t.length)return null;let r=Lt(t[o]);if(r&&!r.placeholder&&r.entityType!=="Change"&&o+1<t.length&&xw.has(t[o+1])){let a=e.slice(o+2).join(" ").trim();if(a)return{node:"find",entityType:r.entityType,term:a}}let i=Lt(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=>En.includes(a))?null:o===t.length-1&&/^[a-z]+$/.test(t[o])&&!ae[t[o]]&&!Sn.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${Fd}`}:null}function Ew(e,t){if(t[0]!=="find")return null;let n=1;for(;n<t.length&&wa.has(t[n]);)n+=1;let s=-1;for(let i=n+1;i<t.length;i+=1)if(En.includes(t[i])){s=i;break}if(s<0)return null;let o=Lt(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 Sw(e,t,n,s,o,r){let{branches:i,ops:a}=Mr(n,s),l=null,c=[];for(let u=0;u<i.length;u+=1){let d=i[u],f=d.map(y=>y.toLowerCase()),p=u===0?"intersection":a[u-1],m=ua(d,f);if(m.blc.length&&m.blc.every(y=>qe[y])){c.push({op:p,kind:"qual",filters:m.blc});continue}if(f[0]==="of"||f[0]==="in"){c.push({op:p,kind:"set",ast:{node:"membership",entityType:e,term:d.slice(1).join(" ")}});continue}let b=d,h=yt(f,ae);h?l=d.slice(h.start,h.end):l&&(b=[...l,...d]);let g=zd(`${t} ${b.join(" ")}`,o,r);if(!g||g.node==="miss")return{miss:g&&g.reason||"a clause in the combination didn't parse"};c.push({op:p,kind:"set",ast:g})}return{atoms:c}}function Dd(e,t,n,s){let o=Ew(e,t);if(o){let{entityType:C,term:E,relIdx:R}=o,N=t.slice(R+1),j=e.slice(R+1);if(!N.length)return{node:"miss",reason:`a relative clause needs a predicate after "${t[R]}"`};let _=Sw(C,`which ${t[R-1]}`,N,j,n,s+1);if(_.miss)return{node:"miss",reason:_.miss};let O=[{op:"seed",kind:"set",ast:{node:"find",entityType:C,term:E}},..._.atoms];return O.length===1?O[0].ast:{node:"boolean",entityType:C,atoms:O}}let r=0;for(;r<t.length&&ga.has(t[r]);)r+=1;let i=r>0,a=[];for(;r<t.length&&qe[t[r]];)a.push(t[r]),r+=1;let l=r<t.length?Lt(t[r]):null;if(!l){let C=r+1<t.length?Lt(t[r+1]):null;if(gd.has(t[r])&&C&&C.entityType==="Commit"&&r+2===t.length)return{node:"recentCommits"};if(Id.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?Lt(t[E+1]):null;if(gd.has(t[E])&&R&&R.entityType==="Commit"&&E+2===t.length)return{node:"recentCommits"}}return(i||a.length)&&C&&/^[a-z]+$/.test(t[r])&&!ae[t[r]]&&!nt.has(t[r])&&!Ea.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),f=e.slice(r),p=!1;d.length&&En.includes(d[0])&&(p=!0,d=d.slice(1),f=f.slice(1));let m=d[0]==="of"||d[0]==="in",b=d.length>0&&Od(d[0]),h=f.length>0&&Mr(d,f).branches.some(C=>{let{blc:E}=ua(C,C.map(R=>R.toLowerCase()));return E.length&&E.every(R=>qe[R])}),g=f.length>0?Mr(d,f).branches:[],y=!1;if(g.length>1){let C=g[0].map(R=>R.toLowerCase()),E=yt(C,ae);E&&E.start===0&&(y=g.slice(1).every(R=>{let N=R.map(_=>_.toLowerCase()),j=yt(N,ae);return j&&j.start===0?j.kind===E.kind:!j}))}let w=!1;if(g.length>1){let C=g[0].map(R=>R.toLowerCase()),E=yt(C,ae);E&&E.start===0&&(w=g.slice(1).every(R=>{let N=R.map(_=>_.toLowerCase()),j=yt(N,ae);return!!j&&j.start===0&&j.end-j.start===1}))}if(!(a.length||p||m||b||h||y||w))return null;if(!f.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 k=l.placeholder?"what":`which ${u}`,{branches:S,ops:$}=Mr(d,f),v=null,A=[];for(let C=0;C<S.length;C+=1){let E=S[C],R=E.map(L=>L.toLowerCase()),N=C===0?"seed":$[C-1],j=ua(E,R);if(j.blc.length&&j.blc.every(L=>qe[L])){A.push({op:N,kind:"qual",filters:j.blc});continue}if(R[0]==="of"||R[0]==="in"){A.push({op:N,kind:"set",ast:{node:"membership",entityType:c,term:E.slice(1).join(" ")}});continue}let _=E,O=yt(R,ae);O?v=E.slice(O.start,O.end):v&&(_=[...v,...E]);let P=zd(`${k} ${_.join(" ")}`,n,s+1);if(!P||P.node==="miss")return{node:"miss",reason:P&&P.reason||"a clause in the combination didn't parse"};A.push({op:N,kind:"set",ast:P})}if(A[0].kind!=="set")return{node:"miss",reason:"start with a clause, then combine with and/or/but-not"};let T;return A.length===1?T=A[0].ast:T={node:"boolean",entityType:c,atoms:A},a.length&&(T={node:"qualifier",filters:a,inner:T,entityType:c}),T}function zd(e,t,n){if(n>Cd)return{node:"miss",reason:"too deep to resolve"};let s=Kt(e),o=s.map(a=>a.toLowerCase()),r=ba(s,o,t,n);if(r)return r;let i=eo(e,t);return i?{node:"clause",clause:i}:null}function Mr(e,t){let n=Object.keys(Bs).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(Bs[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 Bd(e,t,n,s){let o=Qs[t];if(o&&Xn.has(n)){let u=We(e,o).filter(d=>s.has(d.object));return In(u.map(d=>e.byId.get(d.subject)).filter(d=>d&&d.class===n))}let a=(!!o&&[...s].some(u=>Xn.has(e.byId.get(u)?.class))?[...St(t),o]:St(t)).flatMap(u=>We(e,u)).filter(u=>s.has(u.object)),l=In(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")?xa(e,new Set(l.filter(u=>u.class==="Module").map(u=>u.id)),n):[]}function zo(e,t,n){let s=St(t).flatMap(o=>We(e,o)).filter(o=>n.has(o.subject));return In(s.map(o=>e.byId.get(o.object)).filter(Boolean))}function In(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 jw(e,t){let n=Gn(t);if(!n)return[];let s=`${n}/`;return e.individuals.filter(o=>o.class==="Module"&&Gn(o.label).startsWith(s))}function da(e){let t=bd.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},bd.set(e,t),t}function Zs(e,t){return t?t.class==="Module"?t.id:da(e).moduleOfSymbol.get(t.id)||null:null}function Ud(e,t){let n=String(t||"").trim().toLowerCase();if(!n)return null;let s=(e?.individuals||[]).filter(d=>_w.has(d.class)&&String(d.label).toLowerCase()===n);if(s.length!==1)return null;let o=s[0],r=Zs(e,o),i=r&&e.byId.get(r)?.label||String((o.attributes||[]).find(d=>d.key==="site")?.value||"").split(":")[0]||null,a=Me(o.class,1),l=a==="attribute"?"an":"a",c=i?`, ${Or("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 pa(e,t,n){let s=In(Us.flatMap(o=>zo(e,o,new Set([t]))));return n?s.filter(o=>o.class===n):s}function ya(e,t,n=null){let s=Cn(e,t,n);if(!(s.match&&s.tier===1)){let o=jw(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 Wd(e,t,n,s,o){let r=o||(()=>!0),i=pa(e,t,s).filter(r);if(i.length||!qd(e,n))return{own:i,inherited:[],viaId:null,viaLabel:null};for(let a of Gd(e,t)){let l=e.byId.get(a);if(!l)continue;let c=pa(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 xs(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=da(e).exported;return s.has(String(t.label).toLowerCase())||s.has(String(t.id).toLowerCase())}case"tested":{let s=Zs(e,t),o=da(e),r=s?e.byId?.get?.(s):null;return s&&(o.testModules.has(s)||r&&gs(String(r.label).toLowerCase()))?!1:(!!s&&o.testedModules.has(s))===n.value}default:return!1}}function va(e){return We(e,"inherits")}function ma(e,t){return va(e).filter(n=>n.object===t).map(n=>n.subject)}function wd(e,t){return va(e).filter(n=>n.subject===t).map(n=>n.object)}function Rw(e,t){let n=new Set,s=[...ma(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of ma(e,o))n.has(r)||s.push(r)}}return n}function Gd(e,t){let n=new Set,s=[...wd(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of wd(e,o))n.has(r)||s.push(r)}}return n}function qd(e,t){let n=yd.get(e);if(n||(n=new Map,yd.set(e,n)),n.has(t))return n.get(t);let s=va(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 vd(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 xd(e){return e.slice().sort((t,n)=>$d[n.via]-$d[t.via]||String(t.ind.label).length-String(n.ind.label).length).map(t=>t.ind)}function kd(e,t){let n=String(t||"").trim().toLowerCase();if(n.length<4)return!1;let s=Vn(n);if(Tn(String(e.label||"").toLowerCase(),n,s)<=s)return!0;for(let o of ks(e.label))if(Tn(o,n,s)<=s)return!0;return!1}function Vd(e,t,n){let s=e.individuals.filter(l=>l.class===t),o=[...ks(n)];if(!o.length||!s.length)return{narrow:[],broad:[]};let r=qd(e,t),i=[];for(let l of s){let c=vd(l,o);if(c){i.push({ind:l,via:c});continue}if(!r)continue;[...Rw(e,l.id)].some(d=>{let f=e.byId.get(d);return!!f&&!!vd(f,o)})&&i.push({ind:l,via:"chain"})}if(i.length||!r)return{narrow:xd(i),broad:[]};let a=new Map;for(let l of s)for(let c of Gd(e,l.id)){if(!a.has(c)){let u=e.byId.get(c);u&&u.class===t&&kd(u,n)&&a.set(c,{ind:u,via:"chain"})}for(let u of ma(e,c)){if(u===l.id||a.has(u))continue;let d=e.byId.get(u);d&&d.class===t&&kd(d,n)&&a.set(u,{ind:d,via:"chain"})}}return{narrow:[],broad:xd([...a.values()])}}function on(e,t,n){switch(t.node){case"clause":return Yt(e,t.clause,n).matches||[];case"allOfClass":return e.individuals.filter(s=>s.class===t.entityType);case"find":{let{narrow:s,broad:o}=Vd(e,t.entityType,t.term);return s.length?s:o}case"existsEdge":{let s=new Set(St(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=Cn(e,t.subjectTerm,n&&n.contextId);if(!s.match)return[];let o=Md(e,t.kind);if(!o)return[];let r=new Set(zo(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(on(e,t.inner,n).map(o=>o.id));return Bd(e,t.kind,t.entityType,s)}case"forwardSet":{let s=new Set(on(e,t.inner,n).map(o=>o.id));return zo(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=ya(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 In(Us.flatMap(l=>zo(e,l,i))).filter(l=>l.class===t.entityType)}if(s.kind==="miss")return[];let{own:o,inherited:r}=Wd(e,s.id,s.entityClass,t.entityType);return o.length?o:r}case"qualifier":return t.inner.node==="membership"?Xd(e,t,n).matches:on(e,t.inner,n).filter(o=>t.filters.every(r=>xs(e,o,qe[r])));case"boolean":return Hd(e,t,n);case"anaphora":return Kd(e,t,n).matches;default:return[]}}function Hd(e,t,n){let s=[];for(let o of t.atoms){if(o.op==="seed"){s=on(e,o.ast,n);continue}if(o.kind==="qual"){let i=l=>o.filters.every(c=>xs(e,l,qe[c])),a=l=>o.filters.every(c=>{let u=Aw(qe[c]);return u?xs(e,l,u):!xs(e,l,qe[c])});s=o.op==="difference"?s.filter(a):s.filter(i);continue}let r=new Set(on(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 on(e,o.ast,n))i.has(a.id)||(i.add(a.id),s.push(a))}}return s}function Tw(e,t){if(!Array.isArray(t)||t.length<2)return null;let n=new Set,s=[];for(let o of t){let r=rn(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 Kd(e,t,n){let o=Tw(e,t.candidateTerms);if(!o){let c=n&&n.prev;if(!Array.isArray(c)||!c.length)return{compositeMiss:!0,reason:"no-prev",matches:[]};o=c.map(u=>e.byId.get(u)).filter(Boolean)}let r=o,i=t.filter;if(i&&i.type==="qual")r=r.filter(c=>i.filters.every(u=>xs(e,c,qe[u])));else if(i&&i.type==="clause"){let c=rn(e,i.clause.object);if(!c.match)r=[];else{let u=Qs[i.clause.kind],d=[...St(i.clause.kind),...u?[u]:[]],f=new Set(d.flatMap(p=>We(e,p)).filter(p=>p.object===c.match.id).map(p=>p.subject));r=r.filter(p=>f.has(p.id))}}let a=c=>c.length&&c.every(u=>u.class===c[0].class)?c[0].class:null,l=r.length?a(r):a(o);return t.mode==="count"?{compositeKind:"count",count:r.length,entityType:l,matches:[]}:{compositeKind:"set",matches:r,entityType:l}}function Yd(e,t,n){let s=n.kind==="*"?Cw:[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 Iw(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 Lw(e,t){let{op:n,pivotRaw:s}=t,o=l=>String((l.attributes||[]).find(c=>c.key==="date")?.value||"").slice(0,10),r=null,i=null;if(Ow.test(s))r=s;else{let{match:l,ambiguous:c}=rn(e,s,{expectedClass:"Commit"});l&&!c&&l.class==="Commit"&&o(l)&&(i=l.id,r=o(l))}if(!r)return{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotResolved:!1,matches:[]};let a=e.individuals.filter(l=>l.class==="Commit"&&l.id!==i&&o(l)).filter(l=>{let c=o(l);return n==="since"?c>=r:n==="before"?c<r:n==="after"?c>r:c===r}).sort((l,c)=>o(c).localeCompare(o(l)));return{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotDate:r,pivotResolved:!0,matches:a}}function Nw(e,t,n){let s=on(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=Bd(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 Mw(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)&&!gs(String(a.label).toLowerCase()))}let s=n.map(i=>({ind:i,score:Yd(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 Xd(e,t,n){let s=t.node==="qualifier"&&t.inner.node==="membership"?t:null,o=s?s.inner:t,r=o.entityType,i=s?f=>s.filters.every(p=>xs(e,f,qe[p])):null,a=ya(e,o.term,n&&n.contextId);if(a.kind==="dir"){let f;if(!r||r==="Module")f=a.mods;else{let p=new Set(a.mods.map(m=>m.id));f=In(Us.flatMap(m=>zo(e,m,p))).filter(m=>m.class===r)}return i&&(f=f.filter(i)),{compositeKind:"set",matches:f,entityType:r}}if(a.kind==="miss")return{compositeKind:"set",matches:[],entityType:r};let{own:l,inherited:c,viaLabel:u}=Wd(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 Pw(e,t){let{entityType:n,term:s,scopeModule:o}=t,r=null;if(o){let a=rn(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=rn(e,s,{expectedClass:n}),l=!r||a.match&&Zs(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?xa(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 Fw(e,t,n){let s=Zs(e,t);return n.kind==="dir"?n.mods.some(o=>o.id===t.id||o.id===s):s===n.id||pa(e,n.id).some(o=>o.id===t.id)}function Dw(e,t,n){let{term:s,qualifier:o,negated:r,scope:i}=t,a=Cn(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=ya(e,i,n.contextId);if(u.kind==="miss")return{compositeKind:"qualCheck",qualCheckMiss:"scope",term:s,scope:i,matches:[]};if(!Fw(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=xs(e,a.match,qe[o]),c=r?!l:l;return{compositeKind:"qualCheck",subject:a.match,qualifier:o,negated:r,holds:c,matches:[a.match]}}function zw(e,t,n){let s=rn(e,t.object);if(!s||!s.match)return{compositeKind:"universal",universalMiss:"unresolved",object:t.object,matches:[]};let o=on(e,{node:"allOfClass",entityType:t.entityType},n),r=Hd(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 Bw(e,t,n={}){if(t.node==="miss")return{compositeMiss:!0,reason:t.reason||null,matches:[]};if(t.node==="exists")return Pw(e,t);if(t.node==="qualCheck")return Dw(e,t,n);if(t.node==="universal")return zw(e,t,n);if(t.node==="count")return{compositeKind:"count",count:on(e,t.base,n).length,entityType:t.entityType,matches:[]};if(t.node==="list")return{compositeKind:"list",matches:on(e,t.base,n),entityType:t.entityType,scoped:t.scoped};if(t.node==="superlative")return Mw(e,t);if(t.node==="temporal")return Nw(e,t,n);if(t.node==="recentCommits")return Iw(e);if(t.node==="commitFilter")return Lw(e,t);if(t.node==="anaphora")return Kd(e,t,n);if(t.node==="membership"||t.node==="qualifier"&&t.inner.node==="membership")return Xd(e,t,n);if(t.node==="find"){let{narrow:s,broad:o}=Vd(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:on(e,t,n),entityType:t.entityType||null}}function Jd(){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 Uw(e){let t=["Function","Method"].includes(e.class)?`${e.label}()`:e.label;if(e.class==="Module")return t;let n=Uo(e);return n&&n!=="(unknown module)"?`${t} in ${n}`:t}function Ww(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})`:""}. ${Jd()}.`,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=Me(t.entityType,1),o=Me(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=Uo(i),l=i.class==="Module"?"":a&&a!=="(unknown module)"?`, ${Or("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 ${Hn(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=Me(t.entityType,t.total),o=Gb(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}: ${Hn(t.counter)}.`,miss:!1,ambiguous:!1,matches:t.counter}}if(t.compositeKind==="count"){let s=t.entityType?Me(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 ${Me(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 "${Me(t.entityType,2)} in <module>"`:"";return{content:`${Hn(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?` (${Me(t.entityType,2)})`:""}. ${Yn(n)}`,miss:!0,ambiguous:!1,matches:[]};if(t.inheritedNotOwn){let s=Me(t.entityType,2);return{content:`${t.ownerLabel?`${t.ownerLabel} has no own ${s}`:`no own ${s}`} \u2014 inherited from ${t.viaLabel}: ${Hn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches,inheritedNotOwn:!0}}return{content:`${Hn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="find"){let s=Me(t.entityType,1);if(!t.matches.length)return{content:`no ${Me(t.entityType,2)} found matching "${t.term}".`,miss:!0,ambiguous:!1,matches:[]};let o=t.matches.length===1?Uw(t.matches[0]):Hn(t.matches);return t.broad?{content:`no exact ${s} named "${t.term}", but found a related ${t.matches.length===1?s:Me(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,Ot).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>Ot?` \u2026+${t.matches.length-Ot} 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,Ot).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>Ot?` \u2026+${t.matches.length-Ot} 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 ${Me(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:`${Hn(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?Me(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. ${Yn(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. ${Yn(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:`${Hn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`nothing in the index matches that${t.entityType?` (${Me(t.entityType,2)})`:""}. ${Yn(n)}`,miss:!0,ambiguous:!1,matches:[]}}function $a(){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). `+Jd()}function Yn(e=null){return e&&qi(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 ks(e){return new Set(String(e).toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function Fr(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 Qd(e){return String(e||"").replace(/\.[a-z0-9]+$/i,"").toLowerCase().replace(/[/\-_.]+/g,"")}function Gw(e){return String(e||"").trim().replace(/^(?:the|a|an)\s+/i,"").toLowerCase().replace(/[\s\-_]+/g,"")}function Fo(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],g=r.filter(y=>y.class==="Commit"&&(String(y.id).toLowerCase().startsWith(`commit:${h}`)||String(y.label).toLowerCase().startsWith(h)));if(g.length===1)return{match:g[0],candidates:[],tier:1,ambiguous:!1};if(g.length>1)return{match:g[0],candidates:g.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 g of h.edges)if(String(g.object).toLowerCase()===l){c=g.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 g of u){let y=Fo(e,g,{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=[],f=!o.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(o);if(f){let h=o.split(".").pop();for(let g of r){let y=String(g.label||"").toLowerCase();g.class==="Module"?y.split("/").pop()===o&&d.push({ind:g,score:1e3-Math.abs(y.length-o.length)}):y.includes(o)?d.push({ind:g,score:2e3-Math.abs(y.length-o.length)}):y.endsWith(`.${h}`)&&d.push({ind:g,score:1500-Math.abs(y.length-o.length)})}}else{let h=[...ks(s)],g=o.split(/\s+/).find($=>$.includes("/")),y=g?g.split("/").pop().replace(/\.[a-z0-9]+$/,""):null,k=s.trim().replace(/^(?:the|a|an)\s+/i,"").trim().split(/\s+/).filter(Boolean).length>=2,S=k?Gw(s):null;for(let $ of r){let v=String($.label||"").toLowerCase(),A=v.split("/").pop().replace(/\.[a-z0-9]+$/,"");if(A===o){d.push({ind:$,score:5e3});continue}if(o.length>=4&&(A.startsWith(o)||A.endsWith(o))){d.push({ind:$,score:4e3-Math.abs(A.length-o.length)});continue}if(k){let E=Qd($.label);if(E&&E===S){d.push({ind:$,score:5e3});continue}let R=/[/_-]/.test($.label)||/\.[a-z0-9]+$/i.test(String($.label||""));if(E&&R&&S.length>=4&&E.includes(S)){d.push({ind:$,score:2e3-Math.abs(E.length-S.length)});continue}}if($.class==="Module"){let E=Fr(o);if(E!==o&&E===Fr(A)){let R=Vn(o);if(Tn(A,o,R)>R){d.push({ind:$,score:3e3-Math.abs(A.length-o.length)});continue}}}if(o.length>=4&&v.includes(o)){d.push({ind:$,score:1e3-Math.abs(v.length-o.length)});continue}let T=ks($.label),C=h.filter(E=>T.has(E)).length;C>0&&(!y||T.has(y))&&d.push({ind:$,score:C/h.length*10})}}if(d.sort((h,g)=>g.score-h.score),d.length){let[h,...g]=d,y=g.filter(w=>w.score===h.score);return{match:h.ind,candidates:g.slice(0,4).map(w=>w.ind),tier:3,ambiguous:y.length>0}}let p=f||o.includes("/"),m=null,b=!p&&typeof fs=="function"?fs(e.proseIndex,s).filter(h=>!n||e.byId.get(h.id)?.class===n):[];if(b.length){let[h,...g]=b,y=e.byId.get(h.id);if(y){let w=g.filter(k=>k.score===h.score);if(m={match:y,candidates:g.slice(0,4).map(k=>e.byId.get(k.id)).filter(Boolean),tier:4,ambiguous:w.length>0,matchedVia:"prose"},!m.ambiguous&&h.via!=="spell")return m}}if(!i&&o.length>=4){let h=Vn(o),g=h+1,y=[];for(let w of r){let k=Tn(String(w.label||"").toLowerCase(),o,h);if(k>0)for(let S of ks(w.label)){if(k<=0)break;k=Math.min(k,Tn(S,o,h))}k<g?(g=k,y=[w]):k===g&&k<=h&&y.push(w)}if(g<=h&&y.length===1)return{match:y[0],candidates:[],tier:5,ambiguous:!1,matchedVia:"fuzzy"};if(g<=h&&y.length>1&&!m){let[w,...k]=y;return{match:w,candidates:k.slice(0,4),tier:5,ambiguous:!0,matchedVia:"fuzzy"}}}return m||{match:null,candidates:[],tier:null,ambiguous:!1}}function aa(e,t){let n=Qd(t),s=[...ks(t)],o=[];for(let r of ks(e))n.includes(r)||s.some(i=>Fr(i)===Fr(r))||Pr.has(r)||tp.has(r)||o.push(r);return o}function Lr(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(aa(t,r.label))).reduce((r,i)=>r.filter(a=>i.has(a)),aa(t,s[0].label));return o.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:o,nearestLabel:pn(s.slice(0,4).map(r=>r.label))}:e}let n=aa(t,e.match.label);return n.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:n,nearestLabel:e.match.label}:e}function rn(e,t,n={}){let{expectedClass:s=null}=n;if(!s){let o=String(t||"").trim(),r=o.replace(qw,"").trim(),i=r.match(Vw);if(i){let a=r.slice(0,i.index).trim(),l=ze[i[1].toLowerCase()];if(a&&l){let c=Lr(Fo(e,a,{expectedClass:l}),a);if(c?.match?.id&&!c.ambiguous)return c}}if(r&&r!==o){let a=Lr(Fo(e,r,n),r);if(a?.match?.id&&!a.ambiguous)return a}return Lr(Fo(e,t,n),t)}return Lr(Fo(e,t,n),t)}function Cn(e,t,n){if(zs.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 rn(e,t)}function xa(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 Hw(e,t,n,s={}){let o=!n||n==="Change"||n==="Commit",r=o||n==="Module",i=o||Xn.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&&Xn.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 Jw(e,t){let n=new Set(String(t||"").toLowerCase().split(/[\s-]+/).filter(Boolean));return(e.individuals||[]).filter(s=>s.class==="Module"&&ka.has(Ed(s.label))).map(s=>({ind:s,named:n.has(Ed(s.label))?1:0,depth:String(s.label).split("/").length,fixture:Xw(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 Qw(e,t,n){return e==="reverse"&&(t==="imports"||t==="calls")&&(!n||n==="Module")}function Yt(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 Bw(e,t,{contextId:n,prev:s});if(t.ambiguousParse){let j=t.candidates.map(_=>{let O=Yt(e,_,{contextId:n,prev:s});return{parsed:_,result:O,rendered:mn(_,O,e)}});return{matches:[],objMatch:null,candidates:t.candidates,traversal:null,ambiguous:!0,branches:j}}let{shape:r,kind:i,entityType:a}=t;if(r==="meta"){let j=String(t.object||"").trim(),_=j.toLowerCase(),O=(e.individuals||[]).find(P=>{if(P.class!=="SchemaClass"&&P.class!=="SchemaPredicate")return!1;if(String(P.label).toLowerCase()===_)return!0;let L=(P.attributes||[]).find(B=>B.key==="token")?.value;return L&&String(L).toLowerCase()===_});if(!O){let P=Ud(e,j);return P?{matches:[P.hit],objMatch:P.hit,candidates:[],ambiguous:!1,metaCodeClass:!0,metaFallbackText:P.text,traversal:`schema lookup for "${j}" (miss), then unique code-entity individual by label`}:{matches:[],objMatch:null,candidates:[],traversal:`schema lookup for "${j}"`,ambiguous:!1}}return{matches:[O],objMatch:O,candidates:[],traversal:`schema lookup for "${j}"`,ambiguous:!1}}if(r==="mentions"){let j=String(t.object||"").trim();return{matches:(typeof fs=="function"?fs(e.proseIndex,j):[]).map(P=>e.byId.get(P.id)).filter(Boolean),objMatch:null,candidates:[],ambiguous:!1,mentionsShape:!0,traversal:`proseIndex word lookup for "${j}"`}}if(r==="where"&&Kw.test(String(t.object||"").trim())){let j=Jw(e,t.object);return{matches:j,objMatch:j[0]||null,candidates:j.slice(1,5),ambiguous:!1,entryPointShape:!0,traversal:`Module individuals with an entry-point basename (${[...ka].join("/")}), ranked query-named basename first, then shallower path, then non-test path`}}if(t.modifier&&t.modifier!=="direct"&&!Qw(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 j=Cn(e,t.subject,n),_=Cn(e,t.object,n);if(!j.match||!_.match||j.ambiguous||_.ambiguous)return{matches:[],objMatch:_.match,candidates:_.candidates,traversal:null,ambiguous:!1,answer:null,unresolvedPronoun:!!(j.unresolvedPronoun||_.unresolvedPronoun)};let[O,P]=[j.match,_.match];i==="touches"&&P.class==="Commit"&&O.class!=="Commit"&&([O,P]=[P,O]);let L=Qs[i],B=[...new Set(L?[...St(i),L]:St(i))],W=B.flatMap(U=>We(e,U)).filter(U=>U.subject===O.id&&U.object===P.id);return{matches:W,answer:t.negated?W.length===0:W.length>0,objMatch:_.match,subjMatch:j.match,candidates:[],traversal:`${B.join("+")} edge from ${O.label} to ${P.label}`,ambiguous:!1}}let l;if(o)l={match:o,candidates:[],ambiguous:!1,matchedVia:null};else{if(l=Cn(e,t.object,n),t.altObject&&t.altObject!==t.object){let j=Cn(e,t.altObject,n),_=!!l.match&&!l.ambiguous,O=!!j.match&&!j.ambiguous;!_&&O?l=j:_&&O&&l.match.id!==j.match.id&&(l={...l,ambiguous:!0,candidates:[j.match,...l.candidates||[]]})}if(t.kind==="tests"&&l.match&&!l.ambiguous&&!String(t.object||"").includes("/")){let j=P=>P.replace(/\.(?:test|spec|tests)(?=\.[^.]+$)/,""),_=j(String(t.object||"").trim().toLowerCase()),O=(e.individuals||[]).find(P=>{if(P.class!=="Module"||P.id===l.match.id)return!1;let L=String(P.label||"").toLowerCase().split("/").pop();return L!==j(L)&&j(L)===_});O&&(l={...l,ambiguous:!0,candidates:[O,...l.candidates||[]]})}}let{match:c,candidates:u,ambiguous:d,unresolvedPronoun:f,matchedVia:p,unplacedWords:m,nearestLabel:b}=l;if(!c)return{matches:[],objMatch:null,candidates:u,traversal:null,ambiguous:!1,unresolvedPronoun:f,unplacedWords:m,nearestLabel:b};if(d){let _=In([c,...u||[]]).slice(0,Ue).map(O=>{let P=Yt(e,t,{contextId:n,prev:s,pinnedObjMatch:O});return{candidate:O,result:P,rendered:mn(t,P,e)}});return{matches:[],objMatch:c,candidates:u,traversal:null,ambiguous:!0,branches:_}}if(r==="where"){let j=(c.attributes||[]).find(_=>_.key==="site")?.value||null;return{matches:[c],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whereShape:!0,site:j,traversal:j?`site attribute of ${c.label}`:`class + defining module of ${c.label}`}}if(r==="when"){let j=O=>String((O.attributes||[]).find(P=>P.key==="date")?.value||""),_;if(c.class==="Commit")_=[c];else{let O=["touches","touchesSymbol"].flatMap(L=>We(e,L)).filter(L=>L.object===c.id),P=new Set;_=[];for(let L of O){if(P.has(L.subject))continue;P.add(L.subject);let B=e.byId.get(L.subject);B&&B.class==="Commit"&&_.push(B)}_.sort((L,B)=>j(B).localeCompare(j(L)))}return{matches:_,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 j=L=>String((L.attributes||[]).find(B=>B.key==="date")?.value||""),_=["touches","touchesSymbol"].flatMap(L=>We(e,L)).filter(L=>L.object===c.id),O=new Set,P=[];for(let L of _){if(O.has(L.subject))continue;O.add(L.subject);let B=e.byId.get(L.subject);B&&B.class==="Commit"&&P.push(B)}return P.sort((L,B)=>j(B).localeCompare(j(L))),{matches:P,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 Hw(e,c,a,{candidates:u,ambiguous:d,matchedVia:p});if(r==="forward"){let j=Qs[i],O=!!(j&&c.class&&Xn.has(c.class))?[...new Set([...St(i),j])]:St(i);if(a&&a!=="Change"){let F=Nd(e,O),I=ia[a];if(F.size&&!F.has(a)&&!(I&&F.has(I)))return{matches:[],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,forwardGrainMiss:!0,wantClasses:[...F],traversal:`${O.join("+")} edges where subject = ${c.label} (grain mismatch: this "${i}" relation never targets a ${Kn(a)})`}}let L=O.flatMap(F=>We(e,F)).filter(F=>F.subject===c.id).map(F=>e.byId.get(F.object)).filter(Boolean),B=In(L),W=B,U="";if(a&&a!=="Change"){W=B.filter(I=>I.class===a);let F=ia[a];if(!W.length&&F){let I=B.filter(M=>M.class===F);I.length&&(W=I,U=`, widened to ${F} subjects (no ${a} recorded)`)}}return{matches:W,objMatch:c,candidates:u,traversal:`${O.join("+")} edges where subject = ${c.label}${U}`,ambiguous:d,matchedVia:p}}if(t.modifier==="transitive")return{matches:Ks(e,c,{maxDepth:Sd}).flat().map(O=>e.byId.get(O.id)).filter(Boolean),objMatch:c,candidates:u,ambiguous:d,matchedVia:p,traversal:`reverse dependency closure over imports+calls edges from ${c.label} (impactClosure, maxDepth=${Sd})`};let h=Qs[i]||St(i).find(j=>Ad.has(j))||null,g=!!(c.class&&Xn.has(c.class));if(h&&(Xn.has(a)||g)){let j=We(e,h).filter(U=>U.object===c.id),_=In(j.map(U=>e.byId.get(U.subject)).filter(Boolean)),O=!a||a==="Change"?_:_.filter(U=>U.class===a),P="",L=ia[a];if(!O.length&&L){let U=_.filter(F=>F.class===L);U.length&&(O=U,P=`, widened to ${L} subjects (no ${a} recorded)`)}let B=(i==="touches"||i==="calls"||i==="uses")&&c.class==="Class"&&!We(e,"contains").some(U=>U.subject===c.id),W=B?e.byId.get(Zs(e,c)||""):null;if(O.length||!(B&&W))return{matches:O,objMatch:c,candidates:u,traversal:`${h} edges where object = ${c.label}${P}`,ambiguous:d,matchedVia:p}}let y=c,w=u,k=d,S=p,$="",v=Md(e,i);if(v&&y.class&&y.class!==v){let j=rn(e,t.object,{expectedClass:v});if(j.match&&!j.ambiguous)y=j.match,w=j.candidates,k=j.ambiguous,S=j.matchedVia;else if(v==="Module"){let _=Zs(e,y),O=_&&e.byId.get(_);if(O)$=`, refined from ${y.label} to its containing module`,y=O;else return{matches:[],objMatch:y,candidates:w,ambiguous:k,matchedVia:S,wrongGrainMiss:!0,wantClass:v,traversal:`"${t.object}" resolved to ${Kn(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${Kn(v)}, and no containing module could be found to refine to)`}}else return{matches:[],objMatch:y,candidates:w,ambiguous:k,matchedVia:S,wrongGrainMiss:!0,wantClass:v,traversal:`"${t.object}" resolved to ${Kn(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${Kn(v)})`}}let A=St(i).flatMap(j=>We(e,j)).filter(j=>j.object===y.id);i==="cochange"&&(A=A.concat(St(i).flatMap(j=>We(e,j)).filter(j=>j.subject===y.id).map(j=>({...j,subject:j.object,object:j.subject}))));let T="";if(!A.length&&y.class){let j=`ext:${String(y.label).toLowerCase()}`;A=St(i).flatMap(_=>We(e,_)).filter(_=>String(_.object).toLowerCase()===j),A.length&&(T=` (by name, via unresolved ${j} references)`)}let C=[],E=new Set;for(let j of A){let _=e.byId.get(j.subject);_&&!E.has(_.id)&&(E.add(_.id),C.push(_))}let R,N="";if(!a||a==="Change")R=C;else{let j=C.filter(_=>_.class===a);if(j.length)R=j;else if(a!=="Module"&&C.some(_=>_.class==="Module")){let _=new Set(C.filter(O=>O.class==="Module").map(O=>O.id));R=xa(e,_,a),N=`, then ${Kn(a)} defined in the matched module(s)`}else R=[]}return{matches:R,objMatch:y,candidates:w,traversal:`${St(i).join("+")} edges where object = ${y.label}${T}${N}${$}`,ambiguous:k,matchedVia:S}}function Uo(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 ca(e){let t=String(e.label||e.id||"");return["Function","Method"].includes(e.class)?`function ${t}()`:t}function Zw(e){let t=String(e.label||e.id||""),n=(e.attributes||[]).find(s=>s.key==="author")?.value;return n?`${t} (${n})`:t}function pn(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`:e[0]}function Do(e){let t=e.object??e.subject??"?";return`${e.entityType?Me(e.entityType,2)+" that ":""}${e.kind} "${t}"`}function jd(e){return jo[e]?.bare||e}function ey(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=Me(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 ${jd(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 ${jd(o.kind)} ${JSON.stringify(String(r))}`}function Zd(e){if(!e)return null;if(e.ambiguousParse)return{english:`ambiguous: ${e.candidates.map(Do).join(" \u2014 or \u2014 ")}`,machine:`ambiguousParse(${e.candidates.map(r=>Zd(r)?.machine).join(", ")})`};if(e.node)return{english:(e.node==="boolean"?ey(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 ":""}${$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 r=e.entityType?Me(e.entityType,2)+" that ":"";o=e.shape==="forward"?`what "${e.object}" itself ${$s(e.kind)}`:`${r}${$s(e.kind)} "${e.object}"`}return{english:o,machine:s}}function mn(e,t,n=null){let s=ep(e,t,n);return t&&t.matchedVia==="fuzzy"&&t.objMatch&&!s.ambiguous&&(s.content=`assuming you meant ${t.objMatch.label}: ${s.content}`),s}function ep(e,t,n){if(!e)return{content:`couldn't parse this as a graph question. Try: ${$a()}`,miss:!0,ambiguous:!1};if(e.node)return Ww(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 ${Do(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(Fo),candidateParses:e.candidates}:{content:`this could mean more than one thing: ${e.candidates.map((a,l)=>`${l+1}) ${Fo(a)}`).join(" or ")} \u2014 try rephrasing more specifically.`,miss:!1,ambiguous:!0,candidates:e.candidates.map(Fo),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?Ne(t.objMatch.class,1):"term",a=Ne(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=>Ne(a,2));return{content:`${t.objMatch.label}'s "${$s(e.kind)}" relation in this index never produces ${Ne(e.entityType,2)} \u2014 only ${pn(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,Ue).map(l=>`${l.label} (${Ne(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 ${pn(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 ${pn([...ka])}.`,miss:!0,ambiguous:!1,candidates:[]};let[i,...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: ${pn(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&&Ad[e.entityType]?Ne(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=pn(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. ${Yn(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),g=i.filter(h);g.length&&(i=g,a?.length&&(a=a.filter(y=>h(y.candidate))))}if(n&&!/[/.]/.test(String(e.object||""))){let h=String(e.object||"").toLowerCase(),g=new Set(un(String(e.object||"")).filter($=>$.length>=3)),y=new Set(i.map($=>$.id)),w=null,k=0,E=1/0;if(g.size)for(let $ of n.individuals){if(!["Function","Method","Class","GlobalVariable","Attribute"].includes($.class)||y.has($.id))continue;let v=un(String($.label)).filter(T=>g.has(T)).length;if(!v||v<k)continue;let A=Tn(String($.label).toLowerCase(),h,8);(v>k||A<E)&&(w=$,k=v,E=A)}if(w&&(i=[...i,w],a)){let $=Yt(n,e,{pinnedObjMatch:w});a=[...a,{candidate:w,result:$,rendered:mn(e,$,n)}]}}let l=i.length&&i.every(h=>h.class==="Commit")?"commit":"module",c=i.slice(0,Ue).map(h=>h.label),u=i.length>Ue?`, \u2026and ${i.length-Ue} more`:"",d=`"${e.object}" matches more than one ${l} ambiguously \u2014 did you mean ${pn(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}
58
- ${a.map((h,g)=>`${g+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:`${ca(i)} is defined in ${a[1]} at ${l}.`,miss:!1,ambiguous:!1,matches:t.matches}}return{content:`${ca(i)} is defined in ${Bo(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. ${Yn(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} ${Or("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. ${Yn(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,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])=>`${Ne(u,d.length)} ${pn(d)}`),c=t.matches.length>Ue?`; \u2026and ${t.matches.length-Ue} 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(Us.includes(e.kind)&&n&&t.objMatch)for(let a of Us){if(a===e.kind)continue;let l={...e,kind:a},c=Yt(n,l,{pinnedObjMatch:t.objMatch});if(c?.matches?.length&&!c.ambiguous)return Zd(l,c,n)}return{content:`${t.objMatch.label} has no ${$s(e.kind)} edges in the index.`,miss:!0,ambiguous:!1}}return e.kind==="tests"&&!e.entityType?{content:`No tests cover ${String(e.object||"").replace(Gb,"").trim()||String(e.object||"").trim()}.`,miss:!0,ambiguous:!1}:{content:`No ${Ne(e.entityType||"Module",2)} found whose module directly ${$s(e.kind)} ${e.object}. ${Yn(n)}`,miss:!0,ambiguous:!1}}if(e.shape==="forward"||e.entityType==="Module"||t.matches.every(i=>!Xn.has(i.class))){let i=t.matches.slice(0,Ue).map(l=>l.class==="Commit"?Jw(l):l.label),a=t.matches.length>Ue?`, \u2026and ${t.matches.length-Ue} 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,Ue)){let a=Bo(i);s.has(a)||s.set(a,[]),s.get(a).push(ca(i))}let o=[...s.entries()].map(([i,a],l)=>{let c=pn(a);return l===0?`in ${i} there is ${c}`:`there is ${c} in ${i}`}),r=t.matches.length>Ue?` \u2026and ${t.matches.length-Ue} more`:"";return{content:o.join(" and ")+r+".",miss:!1,ambiguous:!1,matches:t.matches}}function tp(e){if(e.length<4||ty.has(e))return null;let t=Vn(e),n=t+1,s=null,o=!1;for(let r of ey){let i=Tn(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 jd(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=tp(s);return!!o&&o!==s&&!!De[o]}function np(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=Cn(e,t.object,n);if(s.unresolvedPronoun)return"pronoun";if(!s.match||jd(s,t.object))return!1;if(t.shape==="ask"){let o=Cn(e,t.subject,n);return o.unresolvedPronoun?"pronoun":!!(o.match&&!jd(o,t.subject))}return!0}function ny(e){let t=String(e||"").trim().toLowerCase().replace(/[?.!\s]+$/,"");return Sl.includes(t)}function sy(e,t,{nlp:n=void 0,contextId:s=null,prev:o=null}={}){let r=Oo(vs(String(t||""))),i=Kt(r);if(!i.length)return null;let a=[],l=[],c=S=>{let R=rn(e,S);return!!R.match&&R.tier!=null&&R.tier<=2},u=S=>{let R=rn(e,S);return!!R.match&&R.tier!=null&&R.tier<=3},d=S=>{let R=String(S||"").trim().toLowerCase();return Ds.includes(R)?!0:Kt(R).some(N=>{let j=N.toLowerCase();return!Pr.has(j)&&!fa.has(j)})},m=new Set(["reverse","forward","where","when","ask"]),p=S=>{let R=S.join(" "),N=Do(R,{nlp:n});return np(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))||mn(N,Yt(e,N,{contextId:s,prev:o}),e).miss?null:{parsed:N,text:R}},f=S=>({parsed:S.parsed,from:r,to:S.text,dropped:[...a],steps:l}),b=0,h=Math.max(i.length,1)+12;for(;b<h;b+=1){let S=-1;for(let j=0;j<i.length;j+=1){let _=i[j].toLowerCase();if(Sa.has(_)&&!Pr.has(_)&&!c(i[j])){S=j;break}}if(S<0)break;let R=i[S];i=i.filter((j,_)=>_!==S),a.push(R),l.push(`strip noise "${R}" \u2192 "${i.join(" ")}"`);let N=p(i);if(N)return f(N)}let g=Do(i.join(" "),{nlp:n}),y=new Set;if(g&&!g.node&&m.has(g.shape))for(let S of[g.object,g.subject])for(let R of Kt(String(S||"").toLowerCase()))y.add(R);let w=[],k=[],E=[];for(let S of i){let R=S.toLowerCase();if(!/^[a-z]+$/.test(R)||Pr.has(R)||fa.has(R)||u(S)){w.push(S);continue}let j=tp(R);if(j&&j!==R){w.push(j),E.push(`${S}\u2192${j}`);continue}if(y.has(R)){w.push(S);continue}k.push(S)}if((E.length||k.length)&&w.length){i=w,a.push(...k),E.length&&l.push(`fuzzy-correct ${JSON.stringify(E)} \u2192 "${i.join(" ")}"`),k.length&&l.push(`drop unmatched ${JSON.stringify(k)} \u2192 "${i.join(" ")}"`);let S=p(i);if(S)return f(S)}let $=!1,v=i.map(S=>{let R=S.toLowerCase();return Gs[R]&&!u(S)?($=!0,Gs[R]):S});if($){l.push(`normalise synonyms \u2192 "${v.join(" ")}"`);let S=p(v);if(S)return f(S)}let A=Kt(r).map(S=>S.toLowerCase()),T=[],C=[];for(let S of A){if(ep.has(S))continue;let R=De[S];R&&R!=="Change"?T.push(S):C.push(S)}if(T.length===1&&C.length===0){let S=p(["count",T[0]]);if(S)return l.push(`bare kind "${T[0]}" \u2192 count`),f(S)}return null}function ry(e,t){let n=String(t||"");if(!e||!_d.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(_d,`commit ${r.label}`),a=i.trim().replace(/[?.!]+$/,"");return oy.test(a)?`${a} touched`:i}function iy(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 ay(e,t){let n=iy(t);for(let s of e?.individuals||[])if(s?.class&&n.includes(String(s.class).toLowerCase()))return s.class;return null}function uy(e,t){let n=String(t||"").trim(),s=n.match(cy),o=s?null:n.match(ly),r=s||o;if(!r||!Ea.test(r[2]||"")||De[r[1].toLowerCase()])return null;let i=ay(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 Jn(e,t,{contextId:n=null,nlp:s=void 0,prev:o=null}={}){if(ny(t))return{content:$a(),tmct_ask:{mechanical:!0,parsed:null,canonical:null,matches:[],traversal:null,miss:!0,ambiguous:!1,matchedVia:null,help:!0,relaxed:null}};t=ry(e,t);let r=ha(t,{nlp:s}),i=r.parsed,a=i,l=null;if(np(e,i,n)===!1){let m=sy(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=Yt(e,a,{contextId:n,prev:o}),u=mn(a,c,e);if(u.miss&&!u.ambiguous){let m=uy(e,t);if(m){let p=Yt(e,m,{contextId:n,prev:o}),f=mn(m,p,e);f.miss||(a=m,c=p,u=f,l=null)}}if(a===null&&u.miss&&!u.ambiguous){let p=Rr(String(t||"")).trim().match(dy)?.[1]?.trim();if(p&&!/\s+(?:for|about)$/i.test(p)){let f=Do(`what is a ${p}`,{nlp:s});f?.shape==="meta"&&(c=Yt(e,f,{contextId:n,prev:o}),u=mn(f,c,e))}}if(a===null&&u.miss&&!u.ambiguous){let p=vs(String(t||"")).match(py)?.[1]?.trim();if(p){let f=Do(`what is a ${p}`,{nlp:s});if(f?.shape==="meta"){let b=Yt(e,f,{contextId:n,prev:o}),h=mn(f,b,e);!h.miss&&!h.ambiguous&&(c=b,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=Yt(e,p.parsed,{contextId:n,prev:o}),b=mn(p.parsed,f,e);return b.miss?null:{a:p,text:b.content}}).filter(Boolean);if(m.length){let p=cd(m.map(f=>f.a),{answerFor:f=>m.find(b=>b.a===f)?.text||null});d=`${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(Do),candidateParses:e.candidates}:{content:`this could mean more than one thing: ${e.candidates.map((a,l)=>`${l+1}) ${Do(a)}`).join(" or ")} \u2014 try rephrasing more specifically.`,miss:!1,ambiguous:!0,candidates:e.candidates.map(Do),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?Me(t.objMatch.class,1):"term",a=Me(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=>Me(a,2));return{content:`${t.objMatch.label}'s "${$s(e.kind)}" relation in this index never produces ${Me(e.entityType,2)} \u2014 only ${pn(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,Ue).map(l=>`${l.label} (${Me(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 ${pn(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 ${pn([...ka])}.`,miss:!0,ambiguous:!1,candidates:[]};let[i,...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: ${pn(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&&Td[e.entityType]?Me(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=pn(t.unplacedWords.map(f=>`"${f}"`)),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. ${Yn(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),g=i.filter(h);g.length&&(i=g,a?.length&&(a=a.filter(y=>h(y.candidate))))}if(n&&!/[/.]/.test(String(e.object||""))){let h=String(e.object||"").toLowerCase(),g=new Set(un(String(e.object||"")).filter($=>$.length>=3)),y=new Set(i.map($=>$.id)),w=null,k=0,S=1/0;if(g.size)for(let $ of n.individuals){if(!["Function","Method","Class","GlobalVariable","Attribute"].includes($.class)||y.has($.id))continue;let v=un(String($.label)).filter(T=>g.has(T)).length;if(!v||v<k)continue;let A=Tn(String($.label).toLowerCase(),h,8);(v>k||A<S)&&(w=$,k=v,S=A)}if(w&&(i=[...i,w],a)){let $=Yt(n,e,{pinnedObjMatch:w});a=[...a,{candidate:w,result:$,rendered:mn(e,$,n)}]}}let l=i.length&&i.every(h=>h.class==="Commit")?"commit":"module",c=i.slice(0,Ue).map(h=>h.label),u=i.length>Ue?`, \u2026and ${i.length-Ue} more`:"",d=`"${e.object}" matches more than one ${l} ambiguously \u2014 did you mean ${pn(c)}${u}? Try one of those. If you're not sure, narrow it to one name.`,f=String(e.object||""),p=f?new RegExp(`\\b${Ve(f)}\\b`,"gi"):null,m=h=>p?h.rendered.content.replace(p,h.candidate.label):h.rendered.content;return{content:a&&a.length?`${d}
58
+ ${a.map((h,g)=>`${g+1}) ${h.candidate.label}: ${m(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:`${ca(i)} is defined in ${a[1]} at ${l}.`,miss:!1,ambiguous:!1,matches:t.matches}}return{content:`${ca(i)} is defined in ${Uo(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. ${Yn(n)}`,miss:!0,ambiguous:!1};let a=t.matches[0],l=(a.attributes||[]).find(f=>f.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(f=>f.key==="message")?.value||"",u=String(l).slice(0,10);if(a.id===t.objMatch.id)return{content:`commit ${a.label} ${Or("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. ${Yn(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,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])=>`${Me(u,d.length)} ${pn(d)}`),c=t.matches.length>Ue?`; \u2026and ${t.matches.length-Ue} 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(Us.includes(e.kind)&&n&&t.objMatch)for(let a of Us){if(a===e.kind)continue;let l={...e,kind:a},c=Yt(n,l,{pinnedObjMatch:t.objMatch});if(c?.matches?.length&&!c.ambiguous)return ep(l,c,n)}return{content:`${t.objMatch.label} has no ${$s(e.kind)} edges in the index.`,miss:!0,ambiguous:!1}}return e.kind==="tests"&&!e.entityType?{content:`No tests cover ${String(e.object||"").replace(qb,"").trim()||String(e.object||"").trim()}.`,miss:!0,ambiguous:!1}:{content:`No ${Me(e.entityType||"Module",2)} found whose module directly ${$s(e.kind)} ${e.object}. ${Yn(n)}`,miss:!0,ambiguous:!1}}if(e.shape==="forward"||e.entityType==="Module"||t.matches.every(i=>!Xn.has(i.class))){let i=t.matches.slice(0,Ue).map(l=>l.class==="Commit"?Zw(l):l.label),a=t.matches.length>Ue?`, \u2026and ${t.matches.length-Ue} 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,Ue)){let a=Uo(i);s.has(a)||s.set(a,[]),s.get(a).push(ca(i))}let o=[...s.entries()].map(([i,a],l)=>{let c=pn(a);return l===0?`in ${i} there is ${c}`:`there is ${c} in ${i}`}),r=t.matches.length>Ue?` \u2026and ${t.matches.length-Ue} more`:"";return{content:o.join(" and ")+r+".",miss:!1,ambiguous:!1,matches:t.matches}}function np(e){if(e.length<4||sy.has(e))return null;let t=Vn(e),n=t+1,s=null,o=!1;for(let r of ny){let i=Tn(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 _d(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=np(s);return!!o&&o!==s&&!!ze[o]}function sp(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=Cn(e,t.object,n);if(s.unresolvedPronoun)return"pronoun";if(!s.match||_d(s,t.object))return!1;if(t.shape==="ask"){let o=Cn(e,t.subject,n);return o.unresolvedPronoun?"pronoun":!!(o.match&&!_d(o,t.subject))}return!0}function oy(e){let t=String(e||"").trim().toLowerCase().replace(/[?.!\s]+$/,"");return Sl.includes(t)}function ry(e,t,{nlp:n=void 0,contextId:s=null,prev:o=null}={}){let r=Lo(vs(String(t||""))),i=Kt(r);if(!i.length)return null;let a=[],l=[],c=E=>{let R=rn(e,E);return!!R.match&&R.tier!=null&&R.tier<=2},u=E=>{let R=rn(e,E);return!!R.match&&R.tier!=null&&R.tier<=3},d=E=>{let R=String(E||"").trim().toLowerCase();return zs.includes(R)?!0:Kt(R).some(N=>{let j=N.toLowerCase();return!Pr.has(j)&&!fa.has(j)})},f=new Set(["reverse","forward","where","when","ask"]),p=E=>{let R=E.join(" "),N=Bo(R,{nlp:n});return sp(e,N,s)!==!0||N&&!N.node&&f.has(N.shape)&&(N.object!=null&&!d(N.object)||N.shape==="ask"&&N.subject!=null&&!d(N.subject))||mn(N,Yt(e,N,{contextId:s,prev:o}),e).miss?null:{parsed:N,text:R}},m=E=>({parsed:E.parsed,from:r,to:E.text,dropped:[...a],steps:l}),b=0,h=Math.max(i.length,1)+12;for(;b<h;b+=1){let E=-1;for(let j=0;j<i.length;j+=1){let _=i[j].toLowerCase();if(Ea.has(_)&&!Pr.has(_)&&!c(i[j])){E=j;break}}if(E<0)break;let R=i[E];i=i.filter((j,_)=>_!==E),a.push(R),l.push(`strip noise "${R}" \u2192 "${i.join(" ")}"`);let N=p(i);if(N)return m(N)}let g=Bo(i.join(" "),{nlp:n}),y=new Set;if(g&&!g.node&&f.has(g.shape))for(let E of[g.object,g.subject])for(let R of Kt(String(E||"").toLowerCase()))y.add(R);let w=[],k=[],S=[];for(let E of i){let R=E.toLowerCase();if(!/^[a-z]+$/.test(R)||Pr.has(R)||fa.has(R)||u(E)){w.push(E);continue}let j=np(R);if(j&&j!==R){w.push(j),S.push(`${E}\u2192${j}`);continue}if(y.has(R)){w.push(E);continue}k.push(E)}if((S.length||k.length)&&w.length){i=w,a.push(...k),S.length&&l.push(`fuzzy-correct ${JSON.stringify(S)} \u2192 "${i.join(" ")}"`),k.length&&l.push(`drop unmatched ${JSON.stringify(k)} \u2192 "${i.join(" ")}"`);let E=p(i);if(E)return m(E)}let $=!1,v=i.map(E=>{let R=E.toLowerCase();return Ws[R]&&!u(E)?($=!0,Ws[R]):E});if($){l.push(`normalise synonyms \u2192 "${v.join(" ")}"`);let E=p(v);if(E)return m(E)}let A=Kt(r).map(E=>E.toLowerCase()),T=[],C=[];for(let E of A){if(tp.has(E))continue;let R=ze[E];R&&R!=="Change"?T.push(E):C.push(E)}if(T.length===1&&C.length===0){let E=p(["count",T[0]]);if(E)return l.push(`bare kind "${T[0]}" \u2192 count`),m(E)}return null}function ay(e,t){let n=String(t||"");if(!e||!Rd.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(Rd,`commit ${r.label}`),a=i.trim().replace(/[?.!]+$/,"");return iy.test(a)?`${a} touched`:i}function cy(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 ly(e,t){let n=cy(t);for(let s of e?.individuals||[])if(s?.class&&n.includes(String(s.class).toLowerCase()))return s.class;return null}function py(e,t){let n=String(t||"").trim(),s=n.match(uy),o=s?null:n.match(dy),r=s||o;if(!r||!Sa.test(r[2]||"")||ze[r[1].toLowerCase()])return null;let i=ly(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 Jn(e,t,{contextId:n=null,nlp:s=void 0,prev:o=null}={}){if(oy(t))return{content:$a(),tmct_ask:{mechanical:!0,parsed:null,canonical:null,matches:[],traversal:null,miss:!0,ambiguous:!1,matchedVia:null,help:!0,relaxed:null}};t=ay(e,t);let r=ha(t,{nlp:s}),i=r.parsed,a=i,l=null;if(sp(e,i,n)===!1){let f=ry(e,t,{nlp:s,contextId:n,prev:o});f&&(a=f.parsed,l={from:f.from,to:f.to,dropped:f.dropped,steps:f.steps})}let c=Yt(e,a,{contextId:n,prev:o}),u=mn(a,c,e);if(u.miss&&!u.ambiguous){let f=py(e,t);if(f){let p=Yt(e,f,{contextId:n,prev:o}),m=mn(f,p,e);m.miss||(a=f,c=p,u=m,l=null)}}if(a===null&&u.miss&&!u.ambiguous){let p=Rr(String(t||"")).trim().match(my)?.[1]?.trim();if(p&&!/\s+(?:for|about)$/i.test(p)){let m=Bo(`what is a ${p}`,{nlp:s});m?.shape==="meta"&&(c=Yt(e,m,{contextId:n,prev:o}),u=mn(m,c,e))}}if(a===null&&u.miss&&!u.ambiguous){let p=vs(String(t||"")).match(fy)?.[1]?.trim();if(p){let m=Bo(`what is a ${p}`,{nlp:s});if(m?.shape==="meta"){let b=Yt(e,m,{contextId:n,prev:o}),h=mn(m,b,e);!h.miss&&!h.ambiguous&&(c=b,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 f=r.alternates.map(p=>{let m=Yt(e,p.parsed,{contextId:n,prev:o}),b=mn(p.parsed,m,e);return b.miss?null:{a:p,text:b.content}}).filter(Boolean);if(f.length){let p=ld(f.map(m=>m.a),{answerFor:m=>f.find(b=>b.a===m)?.text||null});d=`${d}
60
60
  ${p.join(`
61
- `)}`}}return{content:d,tmct_ask:{mechanical:!0,parsed:a&&!a.ambiguousParse?a:null,canonical:Qd(a),matches:(c.matches||[]).map(m=>({id:m.id,label:m.label,type:m.class,module:m.class?Bo(m):void 0})),traversal:c.traversal||null,miss:!!u.miss,ambiguous:!!u.ambiguous,relaxed:l,matchedVia:c.matchedVia||null,...u.ambiguous?{candidates:u.candidates,candidateParses:u.candidateParses}:{}}}}var fd,Js,Xn,ia,zb,Et,Rd,Ue,Ad,Db,Bb,Ub,Gb,Wb,Td,la,Vb,ga,Cd,Lt,Id,Kb,Xb,Qb,ew,tw,nw,sw,rw,aw,Md,wa,gw,Pd,bw,vw,hd,gd,Ew,wd,vd,_w,Aw,Cw,Hn,Gw,Ww,Vw,ka,Hw,kd,Kw,Sd,Pr,fa,Sa,ep,Zw,ey,ty,_d,oy,cy,ly,Ea,dy,py,Qn=K(()=>{Ae();Mi();jn();qn();Lo();Tr();Cr();pd();sa();Gn();md();Mo();fd=new WeakMap;Js={calls:"callsSymbol",touches:"touchesSymbol"},Xn=new Set(["Function","Method","Class","Attribute","GlobalVariable"]),ia={Function:"Method",Method:"Function"},zb={uses:["imports","calls","callsSymbol"]},Et=e=>zb[e]||[e],Rd=new Set(Object.values(Js)),Ue=12,Ad={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"]};Db={cochange:"cochanges",reexports:"export"};Bb={imports:"import",calls:"call",callsSymbol:"call",inherits:"inherit from",contains:"contain",tests:"test",touches:"touch",cochange:"cochange",reexports:"export",uses:"use"},Ub=e=>Bb[e]||$s(e),Gb=new RegExp(`^(?:${Object.keys(ae).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})(?:s|ing|ed)?\\s+`,"i"),Wb=new Set(["imports"]);Td=4,la="zzinnerset",Vb=new Set(["that","which","who","are","is","was","were","do","does","also","still","both","and","then","though"]),ga=new Set(["which","what","who","list","show","find","give","me","us","all"]),Cd=new Set(["are","is","was","were"]);Lt=e=>De[e]?{entityType:De[e],placeholder:!1}:En.includes(e)?{entityType:null,placeholder:!0}:null,Id=e=>!!ae[e]&&e.endsWith("ing");Kb=new Set(["all","every","each"]);Xb=new Set(["what","which","thing","things","one","ones","stuff"]);Qb=new Set(["those","them"]);ew=new Set(["did","was","were","do","does","has","have","had"]),tw=new Set(["change","changed","changes","update","updated","updates","modify","modified","modifies","touch","touched","touches","edit","edited","revise","revised"]),nw=new Set(["last","recently","ever","get","got","been","then","now","already"]),sw=new Set(["the","a","an","all","those","these","any"]);rw=new Set(["since","before","after","on"]);aw=/\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/;Md=new Set(["total","altogether","overall","exist","exists","existing","present","here","now","currently","graph","index","codebase","repo","repository","this","that"]);wa=new Set(["the","a","an","all","me","us"]),gw=[...ms].sort((e,t)=>t.split(" ").length-e.split(" ").length),Pd="functions, classes, methods, modules, attributes, variables, or commits",bw=new Set(["in","inside","under"]);vw=new Set(["called","named","about","like","containing","matching","with"]);hd=new Set(["recent","latest","newest"]);gd=new WeakMap;Ew=new Set(["Class","Function","Method","GlobalVariable","Attribute"]);wd=new WeakMap;vd={label:3,chain:2,attr:1};_w=e=>e&&typeof e.value=="boolean"?{...e,value:!e.value}:null;Aw=["imports","calls","callsSymbol","inherits","contains","tests"];Cw=/^\d{4}-\d{2}-\d{2}$/;Hn=e=>pn(e.slice(0,Ue).map(t=>["Function","Method"].includes(t.class)?`${t.label}()`:t.label))+(e.length>Ue?`, \u2026and ${e.length-Ue} more`:"");Gw=/^(?:the|a|an)\s+/i,Ww=new RegExp(`\\s+(${Object.keys(De).join("|")})$`,"i");Vw=/^(?:the\s+)?(?:main\s+|primary\s+)?entry[\s-]?points?(?:\s+(?:of|to|for)\s+(?:this|the)\s+(?:codebase|code|repo|repository|project|app))?$/i,ka=new Set(["index","main","app","server","cli","__main__"]),Hw=new Set(["test","tests","__tests__","fixture","fixtures","spec","specs","testdata"]),kd=e=>String(e).toLowerCase().split("/").pop().replace(/\.[a-z0-9]+$/,""),Kw=e=>String(e).toLowerCase().split("/").slice(0,-1).some(t=>Hw.has(t));Sd=8;Pr=new Set([...ue(Object.keys(ae)),...ue(Object.keys(De)),...ue(Object.keys(Bt)),...ue(Object.keys(qe)),...ue(ps),...ue(Object.keys(Un)),...ue(Object.keys(ln)),...ue(Object.keys(Bs)),...ue(En),...ue(Ro),...ue(ds),...ue(qt),...ue(sn),...ue(Sn),...ue(Object.keys(Gs))]),fa=new Set([...tt,...ga,...Ds]),Sa=new Set(ue(gr)),ep=new Set([...Sa,...fa]),Zw=["many","count","number","quantity","total","tally","list","show","display","print","dump","enumerate","name"],ey=[...new Set([...ue(Object.keys(ae)),...Object.keys(De),...Zw])].filter(e=>/^[a-z]+$/.test(e)&&e.length>=4&&!tt.has(e)),ty=new Set(["impact","impacts","impacted"]);_d=/\b(?:the\s+)?(?:last|latest|most\s+recent)\s+commit\b/i,oy=/^when\s+(?:was|were|is|did|does|do)\s+commit\s+[0-9a-fA-F:]+$/i;cy=/^(?:list|show(?:\s+me)?)\s+(?:all\s+|the\s+)?([a-z][a-z'-]*)\s*(.*)$/i,ly=/^(?:how\s+many|number\s+of|count(?:\s+the)?)\s+([a-z][a-z'-]*)\s*(.*)$/i,Ea=/^(?: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;dy=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,py=/^what\s+is\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\s+(?:used\s+)?for[?.!\s]*$/i});function Zn(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(`
62
- `);return{start:o,end:r,text:a,truncated:i}}async function On({readFile:e,repoRoot:t,path:n,start:s,end:o,maxLines:r}){let i=Dt(t),a=Dt(i,n);if(a!==i&&!a.startsWith(i+ml))throw new Ie(`refusing to read outside the repository root: ${n}`);let c=(await e(a,"utf8")).split(`
63
- `);return s==null||o==null?{lines:c}:{lines:c,...Zn(c,s,o,r)}}var zr=K(()=>{Be();Ct()});function pt(e){return{ok:!0,value:e}}function mt(e,{detail:t="",term:n=null}={}){if(!He[e])throw new TypeError(`miss(): unknown reason "${e}" (not in MISS_REASONS)`);return{ok:!1,miss:{reason:e,detail:t,term:n}}}function hn(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 Dr(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 _a,my,He,Ra,WE,op,Aa,fy,fn,ja,yt,qE,rp=K(()=>{_a="1.1.0",my="urn:tmct:core",He=Object.freeze({UNRESOLVED_TERM:"UNRESOLVED_TERM",CAPABILITY_ABSENT:"CAPABILITY_ABSENT",TRUNCATED_GRAPH:"TRUNCATED_GRAPH",NO_SOURCE:"NO_SOURCE"}),Ra=Object.freeze(["imports","calls","callsSymbol","defines","tests","touches","touchesSymbol","contains","inherits","cochange","reexports"]),WE=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"}),op=Object.freeze({resolution:["resolve","describe","members","subclasses","exports","signature"],traversal:["edges","impact"],source:["snippet","context"],aggregate:["architecture","untested","stats"],temporal:["history"],search:["search","ask"]}),Aa=Object.freeze(Object.values(op).flat()),fy=Object.freeze(new Set(op.source));fn="Individual",ja="Edge",yt="concurrent-safe: reads immutable graph truth; no shared mutable state",qE=Object.freeze({version:_a,ontology:my,missReasons:Object.values(He),edgeKinds:[...Ra],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: ${fn}, candidates: ${fn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:yt,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: ${fn}, out: ${ja}[], incoming: ${ja}[] }`,misses:["UNRESOLVED_TERM"],concurrency:yt,purpose:"Full typed portrait of one individual: its attributes and its outgoing/incoming edges."},members:{group:"resolution",args:{classId:"string"},result:`{ methods: ${fn}[], attributes: ${fn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:yt,purpose:"A class's methods + attributes (via the contains relation) \u2014 replaces reading the class body."},subclasses:{group:"resolution",args:{classId:"string"},result:`{ bases: ${fn}[], subclasses: ${fn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:yt,purpose:"Forward bases + the transitive reverse inheritance closure (who extends this)."},exports:{group:"resolution",args:{moduleId:"string"},result:`{ exports: ${fn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:yt,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:yt,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: ${ja}[] }`,misses:["UNRESOLVED_TERM"],concurrency:yt,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:yt,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:yt,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:yt,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:yt,purpose:"Package/module shape + the most-imported hub modules. Optional package prefix scopes it."},untested:{group:"aggregate",args:{},result:`{ modules: ${fn}[] }`,misses:[],concurrency:yt,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:yt,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:yt,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: ${fn}[] }`,misses:[],concurrency:yt,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:yt,purpose:"The mechanical, zero-model NL query over the graph \u2014 tmct's whole reason to exist."}}})});function hy(e,t){let n=[],s=[];for(let o of e.relations)for(let r of o.edges)r.subject===t&&n.push(Dr(r,{predicate:o.predicate,prop:o.prop})),r.object===t&&s.push(Dr(r,{predicate:o.predicate,prop:o.prop}));return{out:n,incoming:s}}function gy(e,t){for(let n of e.relations)if(An(n)===t)return{predicate:n.predicate,prop:n.prop};return{predicate:t,prop:null}}async function wy(e,t,{readFile:n,repoRoot:s}){if(!e.moduleLabel)return"";let o=null;try{({lines:o}=await On({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(`
61
+ `)}`}}if(!u.ambiguous&&c.objMatch&&Array.isArray(c.candidates)&&c.candidates.length){let f=new Set((c.matches||[]).map(m=>m&&m.id)),p=c.candidates.filter(m=>m&&m.id&&m.id!==c.objMatch.id&&!f.has(m.id));if(p.length){let m=p.slice(0,3).map(g=>g.label).filter(Boolean),b=p.length-m.length,h=m.join(", ")+(b>0?`, +${b} 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:Zd(a),matches:(c.matches||[]).map(f=>({id:f.id,label:f.label,type:f.class,module:f.class?Uo(f):void 0})),traversal:c.traversal||null,miss:!!u.miss,ambiguous:!!u.ambiguous,relaxed:l,matchedVia:c.matchedVia||null,...u.ambiguous?{candidates:u.candidates,candidateParses:u.candidateParses}:{}}}}var hd,Qs,Xn,ia,Bb,St,Ad,Ue,Td,Ub,Wb,Gb,qb,Vb,Cd,la,Kb,ga,Id,Lt,Od,Xb,Qb,ew,nw,sw,ow,rw,aw,lw,Pd,wa,ww,Fd,yw,xw,gd,bd,_w,yd,$d,Aw,Cw,Ow,Hn,qw,Vw,Kw,ka,Yw,Ed,Xw,Sd,Pr,fa,Ea,tp,ty,ny,sy,Rd,iy,uy,dy,Sa,my,fy,Qn=K(()=>{Ae();Mi();jn();qn();No();Tr();Cr();md();sa();Wn();fd();Po();hd=new WeakMap;Qs={calls:"callsSymbol",touches:"touchesSymbol"},Xn=new Set(["Function","Method","Class","Attribute","GlobalVariable"]),ia={Function:"Method",Method:"Function"},Bb={uses:["imports","calls","callsSymbol"]},St=e=>Bb[e]||[e],Ad=new Set(Object.values(Qs)),Ue=12,Td={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"]};Ub={cochange:"cochanges",reexports:"export"};Wb={imports:"import",calls:"call",callsSymbol:"call",inherits:"inherit from",contains:"contain",tests:"test",touches:"touch",cochange:"cochange",reexports:"export",uses:"use"},Gb=e=>Wb[e]||$s(e),qb=new RegExp(`^(?:${Object.keys(ae).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})(?:s|ing|ed)?\\s+`,"i"),Vb=new Set(["imports"]);Cd=4,la="zzinnerset",Kb=new Set(["that","which","who","are","is","was","were","do","does","also","still","both","and","then","though"]),ga=new Set(["which","what","who","list","show","find","give","me","us","all"]),Id=new Set(["are","is","was","were"]);Lt=e=>ze[e]?{entityType:ze[e],placeholder:!1}:Sn.includes(e)?{entityType:null,placeholder:!0}:null,Od=e=>!!ae[e]&&e.endsWith("ing");Xb=new Set(["all","every","each"]);Qb=new Set(["what","which","thing","things","one","ones","stuff"]);ew=new Set(["those","them"]);nw=new Set(["did","was","were","do","does","has","have","had"]),sw=new Set(["change","changed","changes","update","updated","updates","modify","modified","modifies","touch","touched","touches","edit","edited","revise","revised"]),ow=new Set(["last","recently","ever","get","got","been","then","now","already"]),rw=new Set(["the","a","an","all","those","these","any"]);aw=new Set(["since","before","after","on"]);lw=/\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/;Pd=new Set(["total","altogether","overall","exist","exists","existing","present","here","now","currently","graph","index","codebase","repo","repository","this","that"]);wa=new Set(["the","a","an","all","me","us"]),ww=[...ms].sort((e,t)=>t.split(" ").length-e.split(" ").length),Fd="functions, classes, methods, modules, attributes, variables, or commits",yw=new Set(["in","inside","under"]);xw=new Set(["called","named","about","like","containing","matching","with"]);gd=new Set(["recent","latest","newest"]);bd=new WeakMap;_w=new Set(["Class","Function","Method","GlobalVariable","Attribute"]);yd=new WeakMap;$d={label:3,chain:2,attr:1};Aw=e=>e&&typeof e.value=="boolean"?{...e,value:!e.value}:null;Cw=["imports","calls","callsSymbol","inherits","contains","tests"];Ow=/^\d{4}-\d{2}-\d{2}$/;Hn=e=>pn(e.slice(0,Ue).map(t=>["Function","Method"].includes(t.class)?`${t.label}()`:t.label))+(e.length>Ue?`, \u2026and ${e.length-Ue} more`:"");qw=/^(?:the|a|an)\s+/i,Vw=new RegExp(`\\s+(${Object.keys(ze).join("|")})$`,"i");Kw=/^(?:the\s+)?(?:main\s+|primary\s+)?entry[\s-]?points?(?:\s+(?:of|to|for)\s+(?:this|the)\s+(?:codebase|code|repo|repository|project|app))?$/i,ka=new Set(["index","main","app","server","cli","__main__"]),Yw=new Set(["test","tests","__tests__","fixture","fixtures","spec","specs","testdata"]),Ed=e=>String(e).toLowerCase().split("/").pop().replace(/\.[a-z0-9]+$/,""),Xw=e=>String(e).toLowerCase().split("/").slice(0,-1).some(t=>Yw.has(t));Sd=8;Pr=new Set([...ue(Object.keys(ae)),...ue(Object.keys(ze)),...ue(Object.keys(Bt)),...ue(Object.keys(qe)),...ue(ps),...ue(Object.keys(Un)),...ue(Object.keys(ln)),...ue(Object.keys(Bs)),...ue(Sn),...ue(Ao),...ue(ds),...ue(qt),...ue(sn),...ue(En),...ue(Object.keys(Ws))]),fa=new Set([...nt,...ga,...zs]),Ea=new Set(ue(br)),tp=new Set([...Ea,...fa]),ty=["many","count","number","quantity","total","tally","list","show","display","print","dump","enumerate","name"],ny=[...new Set([...ue(Object.keys(ae)),...Object.keys(ze),...ty])].filter(e=>/^[a-z]+$/.test(e)&&e.length>=4&&!nt.has(e)),sy=new Set(["impact","impacts","impacted"]);Rd=/\b(?:the\s+)?(?:last|latest|most\s+recent)\s+commit\b/i,iy=/^when\s+(?:was|were|is|did|does|do)\s+commit\s+[0-9a-fA-F:]+$/i;uy=/^(?:list|show(?:\s+me)?)\s+(?:all\s+|the\s+)?([a-z][a-z'-]*)\s*(.*)$/i,dy=/^(?:how\s+many|number\s+of|count(?:\s+the)?)\s+([a-z][a-z'-]*)\s*(.*)$/i,Sa=/^(?: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;my=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,fy=/^what\s+is\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\s+(?:used\s+)?for[?.!\s]*$/i});function Zn(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 On({readFile:e,repoRoot:t,path:n,start:s,end:o,maxLines:r}){let i=zt(t),a=zt(i,n);if(a!==i&&!a.startsWith(i+fl))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,...Zn(c,s,o,r)}}var Dr=K(()=>{Be();Ct()});function mt(e){return{ok:!0,value:e}}function ft(e,{detail:t="",term:n=null}={}){if(!He[e])throw new TypeError(`miss(): unknown reason "${e}" (not in MISS_REASONS)`);return{ok:!1,miss:{reason:e,detail:t,term:n}}}function hn(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 zr(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 _a,hy,He,Ra,HS,rp,Aa,gy,fn,ja,vt,KS,ip=K(()=>{_a="1.1.0",hy="urn:tmct:core",He=Object.freeze({UNRESOLVED_TERM:"UNRESOLVED_TERM",CAPABILITY_ABSENT:"CAPABILITY_ABSENT",TRUNCATED_GRAPH:"TRUNCATED_GRAPH",NO_SOURCE:"NO_SOURCE"}),Ra=Object.freeze(["imports","calls","callsSymbol","defines","tests","touches","touchesSymbol","contains","inherits","cochange","reexports"]),HS=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"}),rp=Object.freeze({resolution:["resolve","describe","members","subclasses","exports","signature"],traversal:["edges","impact"],source:["snippet","context"],aggregate:["architecture","untested","stats"],temporal:["history"],search:["search","ask"]}),Aa=Object.freeze(Object.values(rp).flat()),gy=Object.freeze(new Set(rp.source));fn="Individual",ja="Edge",vt="concurrent-safe: reads immutable graph truth; no shared mutable state",KS=Object.freeze({version:_a,ontology:hy,missReasons:Object.values(He),edgeKinds:[...Ra],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: ${fn}, candidates: ${fn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:vt,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: ${fn}, out: ${ja}[], incoming: ${ja}[] }`,misses:["UNRESOLVED_TERM"],concurrency:vt,purpose:"Full typed portrait of one individual: its attributes and its outgoing/incoming edges."},members:{group:"resolution",args:{classId:"string"},result:`{ methods: ${fn}[], attributes: ${fn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:vt,purpose:"A class's methods + attributes (via the contains relation) \u2014 replaces reading the class body."},subclasses:{group:"resolution",args:{classId:"string"},result:`{ bases: ${fn}[], subclasses: ${fn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:vt,purpose:"Forward bases + the transitive reverse inheritance closure (who extends this)."},exports:{group:"resolution",args:{moduleId:"string"},result:`{ exports: ${fn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:vt,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:vt,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: ${ja}[] }`,misses:["UNRESOLVED_TERM"],concurrency:vt,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:vt,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:vt,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:vt,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:vt,purpose:"Package/module shape + the most-imported hub modules. Optional package prefix scopes it."},untested:{group:"aggregate",args:{},result:`{ modules: ${fn}[] }`,misses:[],concurrency:vt,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:vt,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:vt,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: ${fn}[] }`,misses:[],concurrency:vt,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:vt,purpose:"The mechanical, zero-model NL query over the graph \u2014 tmct's whole reason to exist."}}})});function by(e,t){let n=[],s=[];for(let o of e.relations)for(let r of o.edges)r.subject===t&&n.push(zr(r,{predicate:o.predicate,prop:o.prop})),r.object===t&&s.push(zr(r,{predicate:o.predicate,prop:o.prop}));return{out:n,incoming:s}}function wy(e,t){for(let n of e.relations)if(An(n)===t)return{predicate:n.predicate,prop:n.prop};return{predicate:t,prop:null}}async function vy(e,t,{readFile:n,repoRoot:s}){if(!e.moduleLabel)return"";let o=null;try{({lines:o}=await On({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(`
64
65
  ## anchor: ${e.anchor.label} (${e.anchor.class}) @ ${e.moduleLabel}:${i}-${a}`),r.push(Zn(o,i,a,Ta).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(`
65
- ## closest example (full body) \u2014 copy this style: ${e.exemplar.label} (${e.exemplar.class})${l} @ ${e.moduleLabel}:${i}-${a}`),r.push(Zn(o,i,a,Ta).text),e.callHint&&r.push(e.callHint)}if(t.inlinedCallees&&e.calleeBodies.length){let i=by;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 On({readFile:n,repoRoot:s,path:a.site.path}))}catch{u=null}if(!u)continue;let d=Zn(u,l,a.site.end,i);r.push(`
66
+ ## closest example (full body) \u2014 copy this style: ${e.exemplar.label} (${e.exemplar.class})${l} @ ${e.moduleLabel}:${i}-${a}`),r.push(Zn(o,i,a,Ta).text),e.callHint&&r.push(e.callHint)}if(t.inlinedCallees&&e.calleeBodies.length){let i=yy;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 On({readFile:n,repoRoot:s,path:a.site.path}))}catch{u=null}if(!u)continue;let d=Zn(u,l,a.site.end,i);r.push(`
66
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(`
67
- `)}function Br(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:_a,capabilities:[...Aa],sourceAccess:!!t,graph:e,resolve(c){let{match:u,candidates:d}=Ut(e,String(c??""));return u?pt({match:hn(u),candidates:d.map(hn)}):mt(He.UNRESOLVED_TERM,{term:String(c??"")})},describe(c){let u=a(c);if(!u)return mt(He.UNRESOLVED_TERM,{term:c});let{out:d,incoming:m}=hy(e,c);return pt({individual:hn(u),out:d,incoming:m})},members(c){if(!a(c))return mt(He.UNRESOLVED_TERM,{term:c});let d=ve(e,"contains").filter(f=>f.subject===c),m=[],p=[];for(let f of d){let b=i.get(f.object),h=b?hn(b):{id:f.object,label:f.objectLabel||f.object,class:"Entity",attributes:[]};(b?.class||"")==="Attribute"?p.push(h):m.push(h)}return pt({methods:m,attributes:p})},subclasses(c){if(!a(c))return mt(He.UNRESOLVED_TERM,{term:c});let d=ve(e,"inherits"),m=d.filter(g=>g.subject===c).map(g=>i.get(g.object)?hn(i.get(g.object)):{id:g.object,label:g.objectLabel||g.object,class:"Class",attributes:[]}),p=new Map;for(let g of d)p.has(g.object)||p.set(g.object,[]),p.get(g.object).push(g.subject);let f=new Set([c]),b=[],h=[c];for(let g=0;g<8&&h.length;g+=1){let y=[];for(let w of h)for(let k of p.get(w)||[]){if(f.has(k))continue;f.add(k);let E=i.get(k);b.push(E?hn(E):{id:k,label:k,class:"Class",attributes:[]}),y.push(k)}h=y}return pt({bases:m,subclasses:b})},exports(c){if(!a(c))return mt(He.UNRESOLVED_TERM,{term:c});let m=ve(e,"reexports").filter(p=>p.subject===c).map(p=>i.get(p.object)?hn(i.get(p.object)):{id:p.object,label:p.objectLabel||p.object,class:"Entity",attributes:[]});return pt({exports:m})},signature(c){let u=a(c);if(!u)return mt(He.UNRESOLVED_TERM,{term:c});let d=[];for(let[p,f]of[["isStatic","static"],["isAbstract","abstract"],["isConstant","constant"]])Nt(u,p)&&d.push(f);let m=Nt(u,"visibility");return m&&d.push(m),pt({id:u.id,label:u.label,class:u.class||"Entity",params:Nt(u,"params"),returns:Nt(u,"returns"),raises:Nt(u,"raises"),decorators:Nt(u,"decorators"),doc:Nt(u,"doc"),selfFields:Nt(u,"self_fields"),flags:d})},edges(c,u,{limit:d,offset:m=0}={}){if(!Ra.includes(u))throw new TypeError(`edges(): unknown kind "${u}" (not in EDGE_KINDS)`);if(!a(c))return mt(He.UNRESOLVED_TERM,{term:c});let f=gy(e,u),b=ve(e,u).filter(h=>h.subject===c).map(h=>Dr(h,f));return b=d==null?b.slice(m):b.slice(m,m+d),pt({kind:u,edges:b})},impact(c,{maxDepth:u}={}){let d=a(c);if(!d)return mt(He.UNRESOLVED_TERM,{term:c});let m=u==null?Hs(e,d):Hs(e,d,{maxDepth:u}),p=m.reduce((f,b)=>f+b.length,0);return pt({total:p,levels:m})},async snippet(c){let u=a(c);if(!u)return mt(He.UNRESOLVED_TERM,{term:c});let d=bt(u);if(!l.sourceAccess)return mt(He.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 mt(He.NO_SOURCE,{term:c,detail:"no source span in the graph (likely a module)"});try{let m=await On({readFile:s,repoRoot:n,path:d.path,start:d.start,end:d.end,maxLines:Ta});return pt({path:d.path,span:{start:d.start,end:d.end},body:m.text})}catch(m){return mt(He.NO_SOURCE,{term:c,detail:`could not read ${d.path}: ${m?.message||m}`})}},async context(c,{depth:u="auto"}={}){let{match:d}=Ut(e,String(c??""));if(!d)return mt(He.UNRESOLVED_TERM,{term:String(c??"")});let m=Ks(e,d),p=String(u||"auto").trim().toLowerCase(),f,b;p==="min"?(f="TINY",b=ws("TINY")):p==="full"?(f="FULL",b=ws("FULL")):{tier:f,mask:b}=_r(m,e,{});let h=Ou(m,b);if(!l.sourceAccess)return pt({text:h,tier:f});let g=await wy(m,b,{readFile:s,repoRoot:n});return pt({text:g?`${h}
68
- ${g}`:h,tier:f})},architecture({package:c=""}={}){let u=String(c||"").trim().toLowerCase().replace(/^\.?\//,""),d=e.individuals.filter(g=>(g.class||"")==="Module"&&(!u||String(g.label||"").toLowerCase().startsWith(u))),m=new Map;for(let g of d){let y=g.label.includes("/")?g.label.slice(0,g.label.lastIndexOf("/")):"(root)";m.set(y,(m.get(y)||0)+1)}let p=new Set(d.map(g=>g.id)),f=new Map;for(let g of ve(e,"imports"))p.has(g.object)&&f.set(g.object,(f.get(g.object)||0)+1);let b=[...f.entries()].sort((g,y)=>y[1]-g[1]).map(([g,y])=>({id:g,label:i.get(g)?.label||g,importers:y})),h=[...m.entries()].sort((g,y)=>y[1]-g[1]);return pt({modules:d.length,packages:h,hubs:b})},untested(){let c=new Set(ve(e,"tests").map(d=>d.object)),u=e.individuals.filter(d=>(d.class||"")==="Module"&&!c.has(d.id)&&!/\.test\./.test(d.label||"")).map(hn);return pt({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 pt({total:e.individuals.length,classes:u,truncated:(e.truncated||[]).length>0})},history(c){if(!a(c))return mt(He.UNRESOLVED_TERM,{term:c});let d=[...ve(e,"touches"),...ve(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 b=i.get(f.subject);p.push({id:f.subject,label:f.subjectLabel||b?.label||f.subject,author:b?Nt(b,"author")??Nt(b,"commitAuthor"):null,date:b?Nt(b,"date")??Nt(b,"commitDate"):null,message:b?Nt(b,"message")??Nt(b,"commitMessage"):null})}return pt({commits:p})},search(c,{kind:u="",name:d="",decorator:m="",limit:p=Er,offset:f=0}={}){let b=String(c||""),h=String(u||"").trim().toLowerCase(),g=String(d||"").trim(),y=String(m||"").trim().toLowerCase(),w;if(h&&h!=="module"){let E=null;if(g){let v=Hi(g);if(v.error)return mt(He.UNRESOLVED_TERM,{term:g,detail:v.error});E=v}let $=b.toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean);try{w=Xi(e,$,{kind:h,decFilter:y,nameRe:E}).map(v=>v.ind)}catch(v){return mt(He.UNRESOLVED_TERM,{term:g,detail:String(v?.message||v)})}}else{let E=new Map;for(let $ of e.individuals)($.class||"")==="Module"&&E.set($.label,$);w=uu(e,b).map(({path:$})=>E.get($)).filter(Boolean)}let k=w.slice(f,f+p).map(hn);return pt({results:k})},ask(c){if(typeof r!="function")return mt(He.CAPABILITY_ABSENT,"this provider was constructed without an ask answerer");let{content:u,tmct_ask:d}=r(e,String(c||""));return pt({content:u,tmct_ask:d})}};if(o)for(let c of Aa){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=>(ip(o,c,performance.now()-m,f),f)):(ip(o,c,performance.now()-m,p),p)})}return l}function ip(e,t,n,s){try{e.record({tool:`ri.${t}`,perf:{ms_total:n},response:yy(s)})}catch{}}function yy(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 Nt,Ta,by,Ur=K(()=>{Ae();zr();rp();Nt=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value??null;Ta=200,by=120});function lp(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 Wo(e){return lp(e).toString(16).padStart(8,"0")}function $y(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 k=a(i[w-15],7)^a(i[w-15],18)^i[w-15]>>>3,E=a(i[w-2],17)^a(i[w-2],19)^i[w-2]>>>10;i[w]=i[w-16]+k+i[w-7]+E>>>0}let[d,m,p,f,b,h,g,y]=r;for(let w=0;w<64;w+=1){let k=a(b,6)^a(b,11)^a(b,25),E=b&h^~b&g,$=y+k+E+vy[w]+i[w]>>>0,v=a(d,2)^a(d,13)^a(d,22),A=d&m^d&p^m&p,T=v+A>>>0;y=g,g=h,h=b,b=f+$>>>0,f=p,p=m,m=d,d=$+T>>>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]+b>>>0,r[5]=r[5]+h>>>0,r[6]=r[6]+g>>>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 xy(e,t){let n=$y(e),s="";for(let o=0;o<t;o+=1)s+=n[o].toString(16).padStart(2,"0");return s}function Z(e){let t=Ln(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 Nn(e){let t=Ln(e);return Sy.get(t)??t}function de(e,t,n){return qo(Z(e),Nn(t),Z(n))}var vy,ky,Ln,Sy,qo,gn=K(()=>{vy=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]);ky=2e3,Ln=e=>String(e??"").replace(/\s+/g," ").trim().slice(0,ky);Sy=new Map([["mgx:cause","mgx:causes"],["mgx:desire","mgx:desires"],["mgx:want","mgx:desires"],["mgx:require","mgx:hasPrerequisite"],["mgx:involve","mgx:hasSubevent"]]);qo=(e,t,n)=>`fact:${xy(`${e}\0${t}\0${n}`,8)}`});var Xt={};Dn(Xt,{CARDINALITY_RULE_CONFIDENCE:()=>Cy,CAX_DW_RULE:()=>Oa,CAX_DW_RULE_CONFIDENCE:()=>Na,CAX_MAXC0_RULE_CONFIDENCE:()=>Oy,CLS_SVF1_RULE:()=>Ma,CLS_SVF1_RULE_CONFIDENCE:()=>Fa,DEFAULT_MAX_ENVIRONMENTS:()=>Gr,DISJOINT_PREDICATE:()=>to,ENTAILED_DISJOINT_PROVENANCE:()=>La,ENTAILED_PROVENANCE:()=>pp,ENTAILED_SCM_SVF_PROVENANCE:()=>Ba,ENTAILED_SVF1_PROVENANCE:()=>Pa,ENTAILED_TYPE_PROVENANCE:()=>fp,ON_PROPERTY_PREDICATE:()=>bn,SCM_SVF_RULE:()=>Da,SCM_SVF_RULE_CONFIDENCE:()=>Ua,SOME_VALUES_FROM_PREDICATE:()=>wn,SUBCLASS_PREDICATE:()=>Me,TYPE_PREDICATE:()=>jt,buildCardinalityRestrictions:()=>Ty,buildRelevanceFrontier:()=>Ia,deriveDisjointViolations:()=>wp,deriveSomeValuesFromApplication:()=>yp,deriveSomeValuesFromSubsumption:()=>vp,deriveSubClassClosure:()=>hp,deriveSubClassClosureDelta:()=>gp,deriveTypePropagation:()=>bp,entailedTrustFrom:()=>jy,findConsistencyViolations:()=>Ny,findIsaChain:()=>Ga,proveCardinalityAtLeast:()=>Iy,proveMaxCardinalityZeroDenial:()=>Ly,retractSubClassOf:()=>Dy,syllogise:()=>My});function up(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 jy(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 Mn(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=Z(s);o&&n.add(o)}return n.size?n:null}function hp(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}${Te}${d}`),r.has(u)||r.set(u,new Set),r.get(u).add(d));let i=s instanceof Set?s.size?s:null:Mn(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 b of f){let h=r.get(b);if(h)for(let g of h){if(p===g)continue;let y=`${p}${Te}${g}`;o.has(y)||c.has(y)||a(p,b,g)&&d.push([p,b,g,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,b,h]of d)if(!c.has(h)){if(l.length>=n)break;c.add(h),l.push({subject:p,object:b,via:f}),r.has(p)||r.set(p,new Set),r.get(p).add(b),m=!0}if(l.length>=n||!m)break}return l}function gp(e,t,{depth:n=32,budget:s=50,focus:o=null}={}){let r=new Set,i=new Map,a=new Map;for(let[f,b]of e||[])!f||!b||f===b||(r.add(`${f}${Te}${b}`),i.has(f)||i.set(f,new Set),i.get(f).add(b),a.has(b)||a.set(b,new Set),a.get(b).add(f));let l=[],c=new Set;for(let[f,b]of t||[]){if(!f||!b||f===b)continue;let h=`${f}${Te}${b}`;c.has(h)||(c.add(h),l.push([f,b]))}let u=o instanceof Set?o.size?o:null:Mn(o),d=(f,b,h)=>!u||u.has(f)||u.has(b)||u.has(h),m=[],p=new Set;for(let f=0;f<n&&l.length;f+=1){let b=[],h=(w,k,E)=>{if(w===E)return;let $=`${w}${Te}${E}`;r.has($)||p.has($)||d(w,k,E)&&b.push([w,k,E,$])};for(let[w,k]of l){for(let E of i.get(k)||[])h(w,k,E);for(let E of a.get(w)||[])h(E,w,k)}if(!b.length)break;b.sort((w,k)=>w[0].localeCompare(k[0])||w[2].localeCompare(k[2])||w[1].localeCompare(k[1]));let g=!1,y=[];for(let[w,k,E,$]of b)if(!p.has($)){if(m.length>=s)break;p.add($),m.push({subject:w,object:E,via:k}),i.has(w)||i.set(w,new Set),i.get(w).add(E),a.has(E)||a.set(E,new Set),a.get(E).add(w),y.push([w,E]),g=!0}if(m.length>=s||!g)break;l=y}return m}function yn(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 _y(e){return yn((e||[]).map(([t,n])=>[n,t]))}function Ia(e,t){let n=[],s=[],o=new Map,r=new Map;for(let c of e||[])!c||!c.subject||!c.predicate||!c.object||(es(c.predicate)?n.push([c.subject,c.object]):Es(c.predicate)?s.push([c.subject,c.object]):no(c.predicate)?o.set(c.subject,c.object):Ho(c.predicate)&&r.set(c.subject,c.object));let i=_y(n),a=new Set;for(let c of t||[]){let u=Z(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 bp(e,t,{budget:n=50,focus:s=null,presentTypeEdges:o=e}={}){let r=yn(t),i=new Set,a=new Set;for(let[p,f]of o||[])p&&f&&i.add(`${p}${Te}${f}`);let l=s instanceof Set?s.size?s:null:Mn(s),c=(p,f,b)=>!l||l.has(p)||l.has(f)||l.has(b),u=[];for(let[p,f]of e||[]){if(!p||!f)continue;let b=`${p}${Te}${f}`;if(!a.has(b)){a.add(b);for(let h of r(f)){if(h===f||h===p)continue;let g=`${p}${Te}${h}`;i.has(g)||c(p,f,h)&&u.push([p,f,h,g])}}}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,b,h]of u)if(!m.has(h)){if(d.length>=n)break;m.add(h),d.push({subject:p,object:b,via:f})}return d}function wp(e,t,n,{budget:s=50,focus:o=null}={}){let r=yn(t),i=new Map,a=new Set;for(let[f,b]of n||[])!f||!b||f===b||(a.add(`${f}${Te}${b}`),a.add(`${b}${Te}${f}`),i.has(f)||i.set(f,new Set),i.get(f).add(b),i.has(b)||i.set(b,new Set),i.get(b).add(f));if(!i.size)return[];let l=new Set,c=o instanceof Set?o.size?o:null:Mn(o),u=(f,b,h)=>!c||c.has(f)||c.has(b)||c.has(h),d=[];for(let[f,b]of e||[]){if(!f||!b)continue;let h=`${f}${Te}${b}`;if(!l.has(h)){l.add(h);for(let g of[b,...r(b)]){let y=i.get(g);if(y)for(let w of y){if(w===f)continue;let k=`${f}${Te}${w}`;a.has(k)||u(f,b,w)&&d.push([f,b,g,w,k])}}}}d.sort((f,b)=>f[0].localeCompare(b[0])||f[3].localeCompare(b[3])||f[2].localeCompare(b[2])||f[1].localeCompare(b[1]));let m=[],p=new Set;for(let[f,b,h,g,y]of d)if(!p.has(y)){if(m.length>=s)break;p.add(y),m.push({subject:f,object:g,viaType:b,viaClass:h})}return m}function yp(e,t,n,s,{budget:o=50,focus:r=null}={}){let i=yn(n),a=new Map;for(let h of s||[]){if(!h||!h.restriction||!h.property||!h.target)continue;let g=`${h.property}${Te}${h.target}`;a.has(g)||a.set(g,new Set),a.get(g).add(h.restriction)}if(!a.size)return[];let l=new Set,c=new Map;for(let[h,g]of t||[])!h||!g||(l.add(`${h}${Te}${g}`),c.has(h)||c.set(h,new Set),c.get(h).add(g));let u=r instanceof Set?r.size?r:null:Mn(r),d=(h,g,y)=>!u||u.has(h)||u.has(g)||u.has(y),m=new Set,p=[];for(let[h,g,y]of e||[]){if(!h||!g||!y)continue;let w=Z(g),k=`${h}${Te}${w}${Te}${y}`;if(m.has(k))continue;m.add(k);let E=c.get(y);if(E)for(let $ of E)for(let v of[$,...i($)]){let A=a.get(`${w}${Te}${v}`);if(A)for(let T of A){if(h===T)continue;let C=`${h}${Te}${T}`;l.has(C)||d(h,y,T)&&p.push([h,g,w,y,$,v,T,C])}}}p.sort((h,g)=>h[0].localeCompare(g[0])||h[6].localeCompare(g[6])||h[1].localeCompare(g[1])||h[3].localeCompare(g[3]));let f=[],b=new Set;for(let[h,g,y,w,k,E,$,v]of p)if(!b.has(v)){if(f.length>=o)break;b.add(v),f.push({subject:h,object:$,viaProperty:g,viaPropertyKey:y,viaValue:w,viaType:k,viaTarget:E})}return f}function Ty(e){let t=new Map,n=new Map,s=new Map;for(let r of e||[])if(!(!r||!r.subject||!r.predicate))if(no(r.predicate))t.set(r.subject,r.object);else if(Ey(r.predicate))s.set(r.subject,r.object);else{let i=Ay[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)!==Ry)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 vp(e,t,{budget:n=50,focus:s=null}={}){let o=yn(t),r=new Map;for(let m of e||[]){if(!m||!m.restriction||!m.property||!m.target)continue;let p=Z(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}${Te}${p}`);let a=s instanceof Set?s.size?s:null:Mn(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 b=`${p.restriction}${Te}${f.restriction}`;i.has(b)||l(p.restriction,f.restriction)&&c.push([p.restriction,f.restriction,p.target,f.target,b])}c.sort((m,p)=>m[0].localeCompare(p[0])||m[1].localeCompare(p[1]));let u=[],d=new Set;for(let[m,p,f,b,h]of c)if(!d.has(h)){if(u.length>=n)break;d.add(h),u.push({subject:m,object:p,viaY1:f,viaY2:b})}return u}function $p(e,t,n,s,{budget:o=20,focus:r=null}={}){if(!n)return null;let i=yn(e),a=r instanceof Set?r.size?r:null:Mn(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 Iy(e,t,n,s,o,r={}){if(!s||!Number.isFinite(o))return null;let i=$p(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 Ly(e,t,n,s,o={}){if(!s)return null;let r=$p(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 Ny(e,t,n,{budget:s=50,focus:o=null}={}){let r=yn(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:Mn(o),c=p=>!l||l.has(p),u=[],d=new Set;for(let[p,f]of a){if(!c(p))continue;let b=[...f].sort();for(let h=0;h<b.length;h+=1)for(let g=h+1;g<b.length;g+=1){let[y,w]=[b[h],b[g]],k=[y,...r(y)],E=[w,...r(w)],$=null;for(let A of k){let T=i.get(A);if(T){for(let C of E)if(T.has(C)){$=[A,C];break}if($)break}}if(!$)continue;let v=`${p}${Te}${y}${Te}${w}`;d.has(v)||(d.add(v),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,b,h,g]of u){if(m.length>=s)break;m.push({subject:p,classA:f,classB:b,viaA:h,viaB:g})}return m}async function My(e,{depth:t=32,budget:n=50,focus:s=null,expandFocus:o=!1,maxEnvironments:r=Gr,full:i=!1,store:a}={}){let{loadMemory:l,readFactRows:c,appendFacts:u}=up(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=>es(x.predicate)).map(x=>[x.subject,x.object]),b=p.filter(x=>Es(x.predicate)).map(x=>[x.subject,x.object]),h=p.filter(x=>Ss(x.predicate)).map(x=>[x.subject,x.object]),g=new Map,y=new Map,w=[];for(let x of p){let ie=String(x.predicate||"").trim().toLowerCase();no(x.predicate)?g.set(x.subject,x.object):Ho(x.predicate)?y.set(x.subject,x.object):za.has(ie)||w.push([x.subject,x.predicate,x.object])}let k=[];for(let[x,ie]of g){let Se=y.get(x);Se&&k.push({restriction:x,property:ie,target:Se})}let E=Mn(s),$=o&&E?Ia(p,[...E]):E,v=$===null&&d?await a.loadSyllogiseState(e):null,A=new Set(p.map(x=>x.id)),T=Array.isArray(v?.factIds)?v.factIds.filter(x=>!A.has(x)):[],C=v&&Array.isArray(v.factIds)&&!T.length&&!i?"delta":"full",S=C==="delta"?new Set(v.factIds):null,R=C==="delta"?p.filter(x=>!S.has(x.id)):p,N=R.length,j=new Map;for(let x of p)j.set(`${x.subject}${Te}${x.predicate}${Te}${x.object}`,x.trust);let _=(x,ie,Se)=>j.get(`${x}${Te}${ie}${Te}${Se}`),O=(x,ie,Se)=>j.has(`${x}${Te}${ie}${Te}${Se}`),P=x=>x.filter(ie=>typeof ie=="number"),L=C==="delta"&&!R.length,D=C==="delta"?R.filter(x=>es(x.predicate)).map(x=>[x.subject,x.object]):[],G=C==="delta"?D.length?gp(f,D,{depth:t,budget:n,focus:$}):[]:hp(f,{depth:t,budget:n,focus:$}),B=f.concat(G.map(x=>[x.subject,x.object])),F=$,I=null;if(C==="delta"&&!L){let x=p.concat(G.map(Se=>({subject:Se.subject,predicate:Me,object:Se.object}))),ie=[];for(let Se of R)ie.push(Se.subject,Se.object);I=Ia(x,ie),F=I}let M=x=>!I||I.has(x),U=I?b.filter(([x,ie])=>M(x)||M(ie)):b,V=new Set;if(I)for(let x of R)Ss(x.predicate)&&(V.add(x.subject),V.add(x.object));let W=I&&V.size?yn(B):null,q=I?b.filter(([x,ie])=>M(x)||M(ie)||W&&[...W(ie)].some(Se=>V.has(Se))):b,ne=new Set;if(I){for(let x of R)if(no(x.predicate)||Ho(x.predicate)){let ie=g.get(x.subject);ie&&ne.add(Z(ie))}}let oe=I?w.filter(([x,ie,Se])=>M(x)||M(Se)||ne.has(Z(ie))):w,Ee=Math.max(0,n-G.length),ce=Ee>0&&!L?bp(U,B,{budget:Ee,focus:F,presentTypeEdges:b}):[],$e=Math.max(0,n-G.length-ce.length),te=$e>0&&!L?wp(q,B,h,{budget:$e,focus:F}):[],Y=Math.max(0,n-G.length-ce.length-te.length),ee=Y>0&&k.length&&!L?yp(oe,b,B,k,{budget:Y,focus:F}):[],Ce=Math.max(0,n-G.length-ce.length-te.length-ee.length),H=Ce>0&&k.length>1&&!L?vp(k,B,{budget:Ce,focus:F}):[],Q=new Map(k.map(x=>[x.restriction,x])),we=[...G.map(x=>({subject:x.subject,predicate:Me,object:x.object,provenance:pp,justification:[[de(x.subject,Me,x.via),de(x.via,Me,x.object)]]})),...ce.map(x=>({subject:x.subject,predicate:jt,object:x.object,provenance:fp,justification:[[de(x.subject,jt,x.via),de(x.via,Me,x.object)]]})),...te.map(x=>{let ie=O(x.viaClass,to,x.object),[Se,kn]=ie?[x.viaClass,x.object]:[x.object,x.viaClass],zs=P([_(x.subject,jt,x.viaType),_(Se,to,kn),...x.viaClass!==x.viaType?[_(x.viaType,Me,x.viaClass)]:[]]);return{subject:x.subject,predicate:to,object:x.object,provenance:La,justification:[[de(x.subject,jt,x.viaType),de(Se,to,kn),...x.viaClass!==x.viaType?[de(x.viaType,Me,x.viaClass)]:[]]],...zs.length?{premiseTrusts:zs,ruleConfidence:Na}:{}}}),...ee.map(x=>{let ie=P([_(x.subject,x.viaProperty,x.viaValue),_(x.viaValue,jt,x.viaType),_(x.object,bn,x.viaPropertyKey),_(x.object,wn,x.viaTarget),...x.viaType!==x.viaTarget?[_(x.viaType,Me,x.viaTarget)]:[]]);return{subject:x.subject,predicate:jt,object:x.object,provenance:Pa,justification:[[de(x.subject,x.viaProperty,x.viaValue),de(x.viaValue,jt,x.viaType),de(x.object,bn,x.viaPropertyKey),de(x.object,wn,x.viaTarget),...x.viaType!==x.viaTarget?[de(x.viaType,Me,x.viaTarget)]:[]]],...ie.length?{premiseTrusts:ie,ruleConfidence:Fa}:{}}}),...H.map(x=>{let ie=Q.get(x.subject),Se=Q.get(x.object),kn=P([ie&&_(x.subject,bn,ie.property),_(x.subject,wn,x.viaY1),Se&&_(x.object,bn,Se.property),_(x.object,wn,x.viaY2),_(x.viaY1,Me,x.viaY2)]);return{subject:x.subject,predicate:Me,object:x.object,provenance:Ba,justification:[[...ie?[de(x.subject,bn,ie.property)]:[],de(x.subject,wn,x.viaY1),...Se?[de(x.object,bn,Se.property)]:[],de(x.object,wn,x.viaY2),de(x.viaY1,Me,x.viaY2)]],...kn.length?{premiseTrusts:kn,ruleConfidence:Ua}:{}}})],re=we.map(x=>({id:de(x.subject,x.predicate,x.object),subject:x.subject,predicate:x.predicate,object:x.object,environments:x.justification,write:x})),be=kp(p.concat(re.map(x=>({id:x.id,subject:x.subject,predicate:x.predicate,object:x.object})))),Fe=new Map(p.map(x=>[x.id,x])),pe=x=>es(x)||Es(x)||Ss(x),je=x=>C!=="delta"||I!==null&&(I.has(x.subject)||I.has(x.object)),me=p.filter(x=>pe(x.predicate)&&xp(x.provenance)&&Vo(x).length<r&&je(x)).map(x=>({id:x.id,subject:x.subject,predicate:x.predicate,object:x.object,environments:Vo(x),provenance:x.provenance})),Pt=[...re,...me].sort((x,ie)=>x.subject.localeCompare(ie.subject)||x.predicate.localeCompare(ie.predicate)||x.object.localeCompare(ie.object)),tn=0,Xe=!1,an=0;for(let x of Pt){if(an>=n){Xe=!0;break}an+=1;let ie=be(x,{maxEnvironments:r+1}),{kept:Se,truncated:kn}=Fy(x.environments,ie,r);if(kn&&(Xe=!0),!(Se.length<=x.environments.length)){if(tn+=Se.length-x.environments.length,x.write){x.write.justification=Se;continue}we.push({subject:x.subject,predicate:x.predicate,object:x.object,justification:Se,...Sp(x.provenance,Se,zs=>Fe.get(zs)?.trust)||{}})}}let{ids:Wt}=await u(e,we),Ft=[],At=0;for(let x of G)Ft.push({id:Wt[At],subject:x.subject,object:x.object,via:x.via,rule:dp}),At+=1;for(let x of ce)Ft.push({id:Wt[At],subject:x.subject,object:x.object,via:x.via,rule:mp}),At+=1;for(let x of te)Ft.push({id:Wt[At],subject:x.subject,object:x.object,via:x.viaClass,rule:Oa}),At+=1;for(let x of ee)Ft.push({id:Wt[At],subject:x.subject,object:x.object,via:x.viaValue,rule:Ma}),At+=1;for(let x of H)Ft.push({id:Wt[At],subject:x.subject,object:x.object,via:x.viaY1,rule:Da}),At+=1;let dr=Ft.length>=n;if($===null&&d&&!dr){let x=new Set(A);for(let ie of Wt)x.add(ie);await a.saveSyllogiseState(e,{version:1,factIds:[...x].sort(),completedAt:new Date().toISOString()})}return{derived:Ft,count:Ft.length,budget:n,depth:t,truncated:dr,mode:C,deltaSize:N,environmentsAdded:tn,alternatesTruncated:Xe}}function xp(e){let t=String(e||"").split(" | ").filter(Boolean);return t.length>0&&t.every(n=>n.startsWith("entailed:"))}function Py(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();es(u.predicate)?t.push([u.subject,u.object]):Es(u.predicate)?(n.has(u.subject)||n.set(u.subject,new Set),n.get(u.subject).add(u.object)):Ss(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)):no(u.predicate)?o.set(u.subject,u.object):Ho(u.predicate)?r.set(u.subject,u.object):za.has(d)||(i.has(u.subject)||i.set(u.subject,[]),i.get(u.subject).push([Z(u.predicate),u.object]))}let a=yn(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:Z(d),target:m}:null};return u=>{if(es(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(Es(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(Ss(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 kp(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();es(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)):Es(p.predicate)?(o.has(p.subject)||o.set(p.subject,new Set),o.get(p.subject).add(p.object)):Ss(p.predicate)?(r.add(`${p.subject}${Te}${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)):no(p.predicate)?a.set(p.subject,p.object):Ho(p.predicate)?l.set(p.subject,p.object):za.has(f)||(c.has(p.subject)||c.set(p.subject,[]),c.get(p.subject).push([p.predicate,p.object]))}let u=yn(n),d=p=>s.get(p)||new Set,m=p=>{let f=a.get(p),b=l.get(p);return f&&b?{property:f,propertyKey:Z(f),target:b}:null};return(p,{maxEnvironments:f=Gr}={})=>{let b=[],h=new Set,g=y=>{if(b.length>=f||p.id&&y.includes(p.id)||!y.every(k=>t.has(k)))return;let w=[...y].sort().join(" ");h.has(w)||(h.add(w),b.push(y))};if(es(p.predicate)){for(let y of[...d(p.subject)].sort()){if(b.length>=f)break;y===p.subject||y===p.object||d(y).has(p.object)&&g([de(p.subject,Me,y),de(y,Me,p.object)])}if(b.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)&&g([de(p.subject,bn,y.property),de(p.subject,wn,y.target),de(p.object,bn,w.property),de(p.object,wn,w.target),de(y.target,Me,w.target)])}return b}if(Es(p.predicate)){for(let w of[...o.get(p.subject)||[]].sort()){if(b.length>=f)break;w!==p.object&&d(w).has(p.object)&&g([de(p.subject,jt,w),de(w,Me,p.object)])}let y=m(p.object);if(y){let w=[...c.get(p.subject)||[]].filter(([k])=>Z(k)===y.propertyKey).sort((k,E)=>k[0].localeCompare(E[0])||k[1].localeCompare(E[1]));for(let[k,E]of w){if(b.length>=f)break;for(let $ of[...o.get(E)||[]].sort()){if(b.length>=f)break;$!==y.target&&!d($).has(y.target)||g([de(p.subject,k,E),de(E,jt,$),de(p.object,bn,y.propertyKey),de(p.object,wn,y.target),...$!==y.target?[de($,Me,y.target)]:[]])}}}return b}if(Ss(p.predicate)){let y=[];for(let w of o.get(p.subject)||[])for(let k of[w,...u(w)])(i.get(k)||new Set).has(p.object)&&y.push([w,k]);y.sort((w,k)=>w[0].localeCompare(k[0])||w[1].localeCompare(k[1]));for(let[w,k]of y){if(b.length>=f)break;let E=r.has(`${k}${Te}${p.object}`),[$,v]=E?[k,p.object]:[p.object,k];g([de(p.subject,jt,w),de($,to,v),...k!==w?[de(w,Me,k)]:[]])}return b}return b}}function Fy(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 Sp(e,t,n){let s;for(let i of String(e||"").split(" | ")){let a=zy.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 Dy(e,t,n,{budget:s=50,depth:o=32,maxEnvironments:r=Gr,store:i}={}){let{loadMemory:a,readFactRows:l,removeFacts:c}=up(i,["loadMemory","readFactRows","removeFacts"],"retractSubClassOf"),u=typeof i?.appendFacts=="function"?i.appendFacts:null,d=Z(t),m=Z(n),p=de(d,Me,m),f=await a(e),b=l(f),h=new Map(b.map(C=>[C.id,C]));if(!h.has(p))return{retracted:[],count:0,budget:s,depth:o,truncated:!1,found:!1};let g=b.filter(C=>Vo(C).length&&xp(C.provenance)),y=new Map;for(let C of g)for(let S of Vo(C))for(let R of S)y.has(R)||y.set(R,new Set),y.get(R).add(C.id);let w=new Set([p]),k=[p],E=new Map,$=!1,v=0,A=[p];for(;v<o;v+=1){let C=new Set;for(let L of A)for(let D of y.get(L)||[])w.has(D)||C.add(D);let S=[...C].map(L=>h.get(L)).sort((L,D)=>L.subject.localeCompare(D.subject)||L.predicate.localeCompare(D.predicate)||L.object.localeCompare(D.object));if(!S.length)break;let R=b.filter(L=>!w.has(L.id)&&!C.has(L.id)),N=new Set(R.map(L=>L.id)),j=kp(R),_=Py(R),O=!1,P=!1;A=[];for(let L of S){if(w.size>=s){P=!0;break}let D=Vo(L),G=D.filter(F=>F.every(I=>N.has(I)));if(G.length){G.length!==D.length&&E.set(L.id,G);continue}let B=j(L,{maxEnvironments:r});if(B.length){E.set(L.id,B);continue}_(L)||(w.add(L.id),k.push(L.id),A.push(L.id),O=!0)}if(P){$=!0;break}if(!O)break}!$&&v>=o&&($=g.some(C=>!w.has(C.id)&&C.justification.some(S=>w.has(S))));let{removed:T}=await c(e,k);if(u){let C=[...E.entries()].filter(([S])=>!w.has(S)).sort((S,R)=>S[0].localeCompare(R[0])).map(([S,R])=>{let N=h.get(S);return{subject:N.subject,predicate:N.predicate,object:N.object,justification:R,...Sp(N.provenance,R,j=>h.get(j)?.trust)||{}}});C.length&&await u(e,C)}return{retracted:T,count:T.length,budget:s,depth:o,truncated:$,found:!0}}function Ga(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:jt,object:u}]});for(let c of i.get(e)||[])a.push({node:c,path:[{subject:e,predicate:Me,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:Me,object:p}]})}a=u}return null}var Me,dp,pp,jt,mp,fp,to,Oa,La,Na,bn,wn,Ma,Pa,Fa,Gr,Te,es,Es,Ss,no,Ho,Ey,za,Ry,Ay,Da,Ba,Ua,Cy,Oy,Vo,zy,Gt=K(()=>{gn();Me="rdfs:subClassOf",dp="subClassOf",pp=`entailed:${dp}`,jt="rdf:type",mp="type",fp=`entailed:${mp}`,to="owl:disjointWith",Oa="disjointWith",La=`entailed:${Oa}`,Na=.95,bn="owl:onProperty",wn="owl:someValuesFrom",Ma="someValuesFrom",Pa=`entailed:${Ma}`,Fa=.95,Gr=4,Te="\u241F",es=e=>String(e||"").trim().toLowerCase()==="rdfs:subclassof",Es=e=>String(e||"").trim().toLowerCase()==="rdf:type",Ss=e=>String(e||"").trim().toLowerCase()==="owl:disjointwith",no=e=>String(e||"").trim().toLowerCase()==="owl:onproperty",Ho=e=>String(e||"").trim().toLowerCase()==="owl:somevaluesfrom",Ey=e=>String(e||"").trim().toLowerCase()==="owl:onclass",za=new Set(["rdfs:subclassof","rdf:type","owl:disjointwith","owl:onproperty","owl:somevaluesfrom","owl:intersectionof"]);Ry="has",Ay={"owl:cardinality":"exactly","owl:mincardinality":"min","owl:maxcardinality":"max"};Da="someValuesFromSubsumption",Ba=`entailed:${Da}`,Ua=.95;Cy=.95;Oy=.95;Vo=e=>e.environments||(Array.isArray(e.justification)&&e.justification.length?[e.justification]:[]);zy=new Map([[La,Na],[Pa,Fa],[Ba,Ua]])});function io(e){let t=String(e||""),n=Ep.get(t);return n||(t.startsWith(Wa)?so+t.slice(Wa.length):t)}function jp(e){let t=String(e||""),n=By.get(t);return n||(t.startsWith(so)?Wa+t.slice(so.length):null)}function Ap(e,t,n,s,o){let r=null;for(let i of e){if(i===t)return[];let a=Ga(i,new Set([t]),n,s,{maxHops:o});a&&(!r||a.length<r.length)&&(r=a)}return r}function Vr(e,t,n,{maxHops:s=3}={}){let o=ro(e),r=ro(t),i=Array.isArray(n)?n:[],{typeEdges:a,subClassEdges:l}=Rp(i),c=i.filter(g=>(g.predicate===qr||g.predicate===oo)&&r.has(g.object)),u=[];for(let g of c){let y=g.predicate===oo?"negative":"positive";if(o.has(g.subject)){u.push({fact:g,polarity:y,hops:0,chain:null});continue}let w=Ap(o,g.subject,a,l,s);w&&w.length&&u.push({fact:g,polarity:y,hops:w.length,chain:w})}if(!u.length)return{verdict:"none",hops:0,positive:[],negative:[],chain:null,overrides:null,baseRate:Va(o,r,i,{maxHops:s})};u.sort((g,y)=>g.hops-y.hops||(y.fact.trust||0)-(g.fact.trust||0));let d=u[0].hops,m=u.filter(g=>g.hops===d),p=m.filter(g=>g.polarity==="positive").map(g=>g.fact),f=m.filter(g=>g.polarity==="negative").map(g=>g.fact),b=f.length&&!p.length?"negative":"positive",h=u.find(g=>g.hops>d&&g.polarity!==b)||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 Va(e,t,n,{maxHops:s=3}={}){let o=ro(e),r=ro(t),i=Array.isArray(n)?n:[],a=i.filter(b=>b.predicate===Me||b.predicate===jt),l=a.filter(b=>o.has(b.subject)).map(b=>b.object);if(!l.length)return null;let c=l[0],u=[...new Set(a.filter(b=>b.object===c&&!o.has(b.subject)).map(b=>b.subject))],d=b=>{let h=i.find(g=>g.subject===b&&r.has(g.object)&&(g.predicate===qr||g.predicate===oo));return h?{name:b,polarity:h.predicate===oo?"negative":"positive",fact:h}:{name:b,polarity:"unknown",fact:null}},m=u.map(d),{typeEdges:p,subClassEdges:f}=Rp(i);return{klass:c,kinds:u.length,positive:m.filter(b=>b.polarity==="positive"),negative:m.filter(b=>b.polarity==="negative"),unknown:m.filter(b=>b.polarity==="unknown"),chain:Ap(o,c,p,f,s)}}function Ha(e,t,{exclude:n=[],maxHops:s=3}={}){let o=ro(e),r=ro(n),i=Array.isArray(t)?t:[],a=new Set,l=[];for(let c of i)c.predicate!==qr||!o.has(c.object)||r.has(c.subject)||a.has(c.subject)||(a.add(c.subject),Vr(new Set([c.subject]),o,i,{maxHops:s}).verdict==="yes"&&l.push(c));return l.sort(Uy)}var so,Wa,Wr,Ep,By,_p,qr,oo,qa,Uy,ro,Rp,Ka=K(()=>{Gt();so="mgxneg:",Wa="mgx:",Wr="mgxneg:subClassOf",Ep=new Map([[Me,Wr]]),By=new Map([...Ep].map(([e,t])=>[t,e]));_p=e=>String(e||"").startsWith(so),qr="mgx:capableOf",oo=io(qr),qa=6,Uy=(e,t)=>(t.trust||0)-(e.trust||0)||String(e.subject).localeCompare(String(t.subject)),ro=e=>e instanceof Set?e:new Set(Array.isArray(e)?e:[e]),Rp=e=>({typeEdges:e.filter(t=>t.predicate===jt).map(t=>[t.subject,t.object]),subClassEdges:e.filter(t=>t.predicate===Me).map(t=>[t.subject,t.object])})});function ao(e,t){let n=(e?.attributes||[]).find(s=>s?.prop===t);return n?String(n.value??""):void 0}function Vy(e,t){(!e?.class||!Gy.has(e.class))&&t.push(`must have a class from the closed vocabulary Utterance | Fact | Session | Source | Rule (got ${JSON.stringify(e?.class)})`)}function Hy(e,t){for(let s of["rdf:subject","rdf:predicate","rdf:object"])Hr(ao(e,s))||t.push(`a Fact needs a non-empty ${s}`);for(let s of["rdf:subject","rdf:object"]){let o=ao(e,s);o!==void 0&&qy.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=ao(e,"mgx:factProvenance");n!==void 0&&!Hr(n)&&t.push("mgx:factProvenance, when present, must be non-empty")}function Ky(e,t){Hr(ao(e,"mgx:ruleName"))||t.push("a Rule needs a non-empty mgx:ruleName");let n=ao(e,"mgx:ruleKind");if(!n||!Tp.has(n)){t.push(`a Rule's mgx:ruleKind must be one of ${[...Tp].join(" | ")} (got ${JSON.stringify(n)})`);return}for(let s of Wy[n])Hr(ao(e,s))||t.push(`a ${n} Rule needs a non-empty ${s}`)}function Yy(e){let t=[];return Vy(e,t),e?.class==="Fact"&&Hy(e,t),e?.class==="Rule"&&Ky(e,t),{ok:t.length===0,violations:t}}function Ya(e){let t=Yy(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 Gy,Tp,Wy,qy,Hr,Cp=K(()=>{Gy=new Set(["Utterance","Fact","Session","Source","Rule"]),Tp=new Set(["compose2","filter","recursive","action-signature","action-precond","action-effect","action-constraint"]),Wy={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"]},qy=/[.!?]\s+\w/;Hr=e=>typeof e=="string"&&e.trim().length>0});var Ip={};Dn(Ip,{access:()=>Qy,appendFile:()=>tv,basename:()=>bv,copyFile:()=>cv,createInterface:()=>xv,createReadStream:()=>uv,createRequire:()=>Xy,createWriteStream:()=>dv,default:()=>Sv,dirname:()=>fv,existsSync:()=>pv,fileURLToPath:()=>yv,isAbsolute:()=>gv,join:()=>mv,mkdir:()=>nv,mkdtemp:()=>sv,randomBytes:()=>vv,readFile:()=>Zy,readFileSync:()=>Jy,readdir:()=>lv,rename:()=>ov,resolve:()=>hv,rm:()=>iv,sep:()=>wv,spawnSync:()=>$v,stat:()=>av,tmpdir:()=>kv,unlink:()=>rv,writeFile:()=>ev});var st,Xy,Jy,Qy,Zy,ev,tv,nv,sv,ov,rv,iv,av,cv,lv,uv,dv,pv,mv,fv,hv,gv,bv,wv,yv,vv,$v,xv,kv,Sv,Op=K(()=>{st=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},Xy=st("createRequire"),Jy=st("readFileSync"),Qy=st("access"),Zy=st("readFile"),ev=st("writeFile"),tv=st("appendFile"),nv=st("mkdir"),sv=st("mkdtemp"),ov=st("rename"),rv=st("unlink"),iv=st("rm"),av=st("stat"),cv=st("copyFile"),lv=st("readdir"),uv=st("createReadStream"),dv=st("createWriteStream"),pv=()=>!1,mv=(...e)=>e.join("/"),fv=e=>String(e).replace(/\/[^/]*$/,""),hv=(...e)=>e.join("/"),gv=e=>String(e).startsWith("/"),bv=e=>String(e).split("/").pop(),wv="/",yv=e=>String(e),vv=st("randomBytes"),$v=st("spawnSync"),xv=st("createInterface"),kv=()=>"/tmp",Sv={}});var Ev,Ko,Xa=K(()=>{Ev=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,Ko=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(Ev);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 jv(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function _v(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+=`
68
+ `)}function Br(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:_a,capabilities:[...Aa],sourceAccess:!!t,graph:e,resolve(c){let{match:u,candidates:d}=Ut(e,String(c??""));return u?mt({match:hn(u),candidates:d.map(hn)}):ft(He.UNRESOLVED_TERM,{term:String(c??"")})},describe(c){let u=a(c);if(!u)return ft(He.UNRESOLVED_TERM,{term:c});let{out:d,incoming:f}=by(e,c);return mt({individual:hn(u),out:d,incoming:f})},members(c){if(!a(c))return ft(He.UNRESOLVED_TERM,{term:c});let d=ve(e,"contains").filter(m=>m.subject===c),f=[],p=[];for(let m of d){let b=i.get(m.object),h=b?hn(b):{id:m.object,label:m.objectLabel||m.object,class:"Entity",attributes:[]};(b?.class||"")==="Attribute"?p.push(h):f.push(h)}return mt({methods:f,attributes:p})},subclasses(c){if(!a(c))return ft(He.UNRESOLVED_TERM,{term:c});let d=ve(e,"inherits"),f=d.filter(g=>g.subject===c).map(g=>i.get(g.object)?hn(i.get(g.object)):{id:g.object,label:g.objectLabel||g.object,class:"Class",attributes:[]}),p=new Map;for(let g of d)p.has(g.object)||p.set(g.object,[]),p.get(g.object).push(g.subject);let m=new Set([c]),b=[],h=[c];for(let g=0;g<8&&h.length;g+=1){let y=[];for(let w of h)for(let k of p.get(w)||[]){if(m.has(k))continue;m.add(k);let S=i.get(k);b.push(S?hn(S):{id:k,label:k,class:"Class",attributes:[]}),y.push(k)}h=y}return mt({bases:f,subclasses:b})},exports(c){if(!a(c))return ft(He.UNRESOLVED_TERM,{term:c});let f=ve(e,"reexports").filter(p=>p.subject===c).map(p=>i.get(p.object)?hn(i.get(p.object)):{id:p.object,label:p.objectLabel||p.object,class:"Entity",attributes:[]});return mt({exports:f})},signature(c){let u=a(c);if(!u)return ft(He.UNRESOLVED_TERM,{term:c});let d=[];for(let[p,m]of[["isStatic","static"],["isAbstract","abstract"],["isConstant","constant"]])Nt(u,p)&&d.push(m);let f=Nt(u,"visibility");return f&&d.push(f),mt({id:u.id,label:u.label,class:u.class||"Entity",params:Nt(u,"params"),returns:Nt(u,"returns"),raises:Nt(u,"raises"),decorators:Nt(u,"decorators"),doc:Nt(u,"doc"),selfFields:Nt(u,"self_fields"),flags:d})},edges(c,u,{limit:d,offset:f=0}={}){if(!Ra.includes(u))throw new TypeError(`edges(): unknown kind "${u}" (not in EDGE_KINDS)`);if(!a(c))return ft(He.UNRESOLVED_TERM,{term:c});let m=wy(e,u),b=ve(e,u).filter(h=>h.subject===c).map(h=>zr(h,m));return b=d==null?b.slice(f):b.slice(f,f+d),mt({kind:u,edges:b})},impact(c,{maxDepth:u}={}){let d=a(c);if(!d)return ft(He.UNRESOLVED_TERM,{term:c});let f=u==null?Ks(e,d):Ks(e,d,{maxDepth:u}),p=f.reduce((m,b)=>m+b.length,0);return mt({total:p,levels:f})},async snippet(c){let u=a(c);if(!u)return ft(He.UNRESOLVED_TERM,{term:c});let d=wt(u);if(!l.sourceAccess)return ft(He.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 ft(He.NO_SOURCE,{term:c,detail:"no source span in the graph (likely a module)"});try{let f=await On({readFile:s,repoRoot:n,path:d.path,start:d.start,end:d.end,maxLines:Ta});return mt({path:d.path,span:{start:d.start,end:d.end},body:f.text})}catch(f){return ft(He.NO_SOURCE,{term:c,detail:`could not read ${d.path}: ${f?.message||f}`})}},async context(c,{depth:u="auto"}={}){let{match:d}=Ut(e,String(c??""));if(!d)return ft(He.UNRESOLVED_TERM,{term:String(c??"")});let f=Ys(e,d),p=String(u||"auto").trim().toLowerCase(),m,b;p==="min"?(m="TINY",b=ws("TINY")):p==="full"?(m="FULL",b=ws("FULL")):{tier:m,mask:b}=_r(f,e,{});let h=Lu(f,b);if(!l.sourceAccess)return mt({text:h,tier:m});let g=await vy(f,b,{readFile:s,repoRoot:n});return mt({text:g?`${h}
69
+ ${g}`:h,tier:m})},architecture({package:c=""}={}){let u=String(c||"").trim().toLowerCase().replace(/^\.?\//,""),d=e.individuals.filter(g=>(g.class||"")==="Module"&&(!u||String(g.label||"").toLowerCase().startsWith(u))),f=new Map;for(let g of d){let y=g.label.includes("/")?g.label.slice(0,g.label.lastIndexOf("/")):"(root)";f.set(y,(f.get(y)||0)+1)}let p=new Set(d.map(g=>g.id)),m=new Map;for(let g of ve(e,"imports"))p.has(g.object)&&m.set(g.object,(m.get(g.object)||0)+1);let b=[...m.entries()].sort((g,y)=>y[1]-g[1]).map(([g,y])=>({id:g,label:i.get(g)?.label||g,importers:y})),h=[...f.entries()].sort((g,y)=>y[1]-g[1]);return mt({modules:d.length,packages:h,hubs:b})},untested(){let c=new Set(ve(e,"tests").map(d=>d.object)),u=e.individuals.filter(d=>(d.class||"")==="Module"&&!c.has(d.id)&&!/\.test\./.test(d.label||"")).map(hn);return mt({modules:u})},stats(){let c=new Map;for(let d of e.individuals){let f=d.class||"Entity";c.set(f,(c.get(f)||0)+1)}let u=[...c.entries()].map(([d,f])=>({class:d,count:f})).sort((d,f)=>f.count-d.count||d.class.localeCompare(f.class));return mt({total:e.individuals.length,classes:u,truncated:(e.truncated||[]).length>0})},history(c){if(!a(c))return ft(He.UNRESOLVED_TERM,{term:c});let d=[...ve(e,"touches"),...ve(e,"touchesSymbol")].filter(m=>m.object===c),f=new Set,p=[];for(let m of d){if(f.has(m.subject))continue;f.add(m.subject);let b=i.get(m.subject);p.push({id:m.subject,label:m.subjectLabel||b?.label||m.subject,author:b?Nt(b,"author")??Nt(b,"commitAuthor"):null,date:b?Nt(b,"date")??Nt(b,"commitDate"):null,message:b?Nt(b,"message")??Nt(b,"commitMessage"):null})}return mt({commits:p})},search(c,{kind:u="",name:d="",decorator:f="",limit:p=Sr,offset:m=0}={}){let b=String(c||""),h=String(u||"").trim().toLowerCase(),g=String(d||"").trim(),y=String(f||"").trim().toLowerCase(),w;if(h&&h!=="module"){let S=null;if(g){let v=Hi(g);if(v.error)return ft(He.UNRESOLVED_TERM,{term:g,detail:v.error});S=v}let $=b.toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean);try{w=Xi(e,$,{kind:h,decFilter:y,nameRe:S}).map(v=>v.ind)}catch(v){return ft(He.UNRESOLVED_TERM,{term:g,detail:String(v?.message||v)})}}else{let S=new Map;for(let $ of e.individuals)($.class||"")==="Module"&&S.set($.label,$);w=du(e,b).map(({path:$})=>S.get($)).filter(Boolean)}let k=w.slice(m,m+p).map(hn);return mt({results:k})},ask(c){if(typeof r!="function")return ft(He.CAPABILITY_ABSENT,"this provider was constructed without an ask answerer");let{content:u,tmct_ask:d}=r(e,String(c||""));return mt({content:u,tmct_ask:d})}};if(o)for(let c of Aa){let u=l[c];typeof u=="function"&&(l[c]=(...d)=>{let f=performance.now(),p=u.apply(l,d);return p&&typeof p.then=="function"?p.then(m=>(ap(o,c,performance.now()-f,m),m)):(ap(o,c,performance.now()-f,p),p)})}return l}function ap(e,t,n,s){try{e.record({tool:`ri.${t}`,perf:{ms_total:n},response:$y(s)})}catch{}}function $y(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 Nt,Ta,yy,Ur=K(()=>{Ae();Dr();ip();Nt=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value??null;Ta=200,yy=120});function up(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 up(e).toString(16).padStart(8,"0")}function ky(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 k=a(i[w-15],7)^a(i[w-15],18)^i[w-15]>>>3,S=a(i[w-2],17)^a(i[w-2],19)^i[w-2]>>>10;i[w]=i[w-16]+k+i[w-7]+S>>>0}let[d,f,p,m,b,h,g,y]=r;for(let w=0;w<64;w+=1){let k=a(b,6)^a(b,11)^a(b,25),S=b&h^~b&g,$=y+k+S+xy[w]+i[w]>>>0,v=a(d,2)^a(d,13)^a(d,22),A=d&f^d&p^f&p,T=v+A>>>0;y=g,g=h,h=b,b=m+$>>>0,m=p,p=f,f=d,d=$+T>>>0}r[0]=r[0]+d>>>0,r[1]=r[1]+f>>>0,r[2]=r[2]+p>>>0,r[3]=r[3]+m>>>0,r[4]=r[4]+b>>>0,r[5]=r[5]+h>>>0,r[6]=r[6]+g>>>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 Ey(e,t){let n=ky(e),s="";for(let o=0;o<t;o+=1)s+=n[o].toString(16).padStart(2,"0");return s}function Z(e){let t=Ln(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 Nn(e){let t=Ln(e);return jy.get(t)??t}function de(e,t,n){return Vo(Z(e),Nn(t),Z(n))}var xy,Sy,Ln,jy,Vo,gn=K(()=>{xy=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]);Sy=2e3,Ln=e=>String(e??"").replace(/\s+/g," ").trim().slice(0,Sy);jy=new Map([["mgx:cause","mgx:causes"],["mgx:desire","mgx:desires"],["mgx:want","mgx:desires"],["mgx:require","mgx:hasPrerequisite"],["mgx:involve","mgx:hasSubevent"]]);Vo=(e,t,n)=>`fact:${Ey(`${e}\0${t}\0${n}`,8)}`});var Xt={};zn(Xt,{CARDINALITY_RULE_CONFIDENCE:()=>Oy,CAX_DW_RULE:()=>Oa,CAX_DW_RULE_CONFIDENCE:()=>Na,CAX_MAXC0_RULE_CONFIDENCE:()=>Ny,CLS_SVF1_RULE:()=>Ma,CLS_SVF1_RULE_CONFIDENCE:()=>Fa,DEFAULT_MAX_ENVIRONMENTS:()=>Wr,DISJOINT_PREDICATE:()=>no,ENTAILED_DISJOINT_PROVENANCE:()=>La,ENTAILED_PROVENANCE:()=>mp,ENTAILED_SCM_SVF_PROVENANCE:()=>Ba,ENTAILED_SVF1_PROVENANCE:()=>Pa,ENTAILED_TYPE_PROVENANCE:()=>hp,ON_PROPERTY_PREDICATE:()=>bn,SCM_SVF_RULE:()=>za,SCM_SVF_RULE_CONFIDENCE:()=>Ua,SOME_VALUES_FROM_PREDICATE:()=>wn,SUBCLASS_PREDICATE:()=>Pe,TYPE_PREDICATE:()=>jt,buildCardinalityRestrictions:()=>Iy,buildRelevanceFrontier:()=>Ia,deriveDisjointViolations:()=>yp,deriveSomeValuesFromApplication:()=>vp,deriveSomeValuesFromSubsumption:()=>$p,deriveSubClassClosure:()=>gp,deriveSubClassClosureDelta:()=>bp,deriveTypePropagation:()=>wp,entailedTrustFrom:()=>Ry,findConsistencyViolations:()=>Py,findIsaChain:()=>Wa,proveCardinalityAtLeast:()=>Ly,proveMaxCardinalityZeroDenial:()=>My,retractSubClassOf:()=>Uy,syllogise:()=>Fy});function dp(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 Ry(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 Mn(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=Z(s);o&&n.add(o)}return n.size?n:null}function gp(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}${Te}${d}`),r.has(u)||r.set(u,new Set),r.get(u).add(d));let i=s instanceof Set?s.size?s:null:Mn(s),a=(u,d,f)=>!i||i.has(u)||i.has(d)||i.has(f),l=[],c=new Set;for(let u=0;u<t;u+=1){let d=[];for(let[p,m]of r)for(let b of m){let h=r.get(b);if(h)for(let g of h){if(p===g)continue;let y=`${p}${Te}${g}`;o.has(y)||c.has(y)||a(p,b,g)&&d.push([p,b,g,y])}}if(!d.length)break;d.sort((p,m)=>p[0].localeCompare(m[0])||p[2].localeCompare(m[2])||p[1].localeCompare(m[1]));let f=!1;for(let[p,m,b,h]of d)if(!c.has(h)){if(l.length>=n)break;c.add(h),l.push({subject:p,object:b,via:m}),r.has(p)||r.set(p,new Set),r.get(p).add(b),f=!0}if(l.length>=n||!f)break}return l}function bp(e,t,{depth:n=32,budget:s=50,focus:o=null}={}){let r=new Set,i=new Map,a=new Map;for(let[m,b]of e||[])!m||!b||m===b||(r.add(`${m}${Te}${b}`),i.has(m)||i.set(m,new Set),i.get(m).add(b),a.has(b)||a.set(b,new Set),a.get(b).add(m));let l=[],c=new Set;for(let[m,b]of t||[]){if(!m||!b||m===b)continue;let h=`${m}${Te}${b}`;c.has(h)||(c.add(h),l.push([m,b]))}let u=o instanceof Set?o.size?o:null:Mn(o),d=(m,b,h)=>!u||u.has(m)||u.has(b)||u.has(h),f=[],p=new Set;for(let m=0;m<n&&l.length;m+=1){let b=[],h=(w,k,S)=>{if(w===S)return;let $=`${w}${Te}${S}`;r.has($)||p.has($)||d(w,k,S)&&b.push([w,k,S,$])};for(let[w,k]of l){for(let S of i.get(k)||[])h(w,k,S);for(let S of a.get(w)||[])h(S,w,k)}if(!b.length)break;b.sort((w,k)=>w[0].localeCompare(k[0])||w[2].localeCompare(k[2])||w[1].localeCompare(k[1]));let g=!1,y=[];for(let[w,k,S,$]of b)if(!p.has($)){if(f.length>=s)break;p.add($),f.push({subject:w,object:S,via:k}),i.has(w)||i.set(w,new Set),i.get(w).add(S),a.has(S)||a.set(S,new Set),a.get(S).add(w),y.push([w,S]),g=!0}if(f.length>=s||!g)break;l=y}return f}function yn(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 Ay(e){return yn((e||[]).map(([t,n])=>[n,t]))}function Ia(e,t){let n=[],s=[],o=new Map,r=new Map;for(let c of e||[])!c||!c.subject||!c.predicate||!c.object||(es(c.predicate)?n.push([c.subject,c.object]):Ss(c.predicate)?s.push([c.subject,c.object]):so(c.predicate)?o.set(c.subject,c.object):Ko(c.predicate)&&r.set(c.subject,c.object));let i=Ay(n),a=new Set;for(let c of t||[]){let u=Z(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 wp(e,t,{budget:n=50,focus:s=null,presentTypeEdges:o=e}={}){let r=yn(t),i=new Set,a=new Set;for(let[p,m]of o||[])p&&m&&i.add(`${p}${Te}${m}`);let l=s instanceof Set?s.size?s:null:Mn(s),c=(p,m,b)=>!l||l.has(p)||l.has(m)||l.has(b),u=[];for(let[p,m]of e||[]){if(!p||!m)continue;let b=`${p}${Te}${m}`;if(!a.has(b)){a.add(b);for(let h of r(m)){if(h===m||h===p)continue;let g=`${p}${Te}${h}`;i.has(g)||c(p,m,h)&&u.push([p,m,h,g])}}}u.sort((p,m)=>p[0].localeCompare(m[0])||p[2].localeCompare(m[2])||p[1].localeCompare(m[1]));let d=[],f=new Set;for(let[p,m,b,h]of u)if(!f.has(h)){if(d.length>=n)break;f.add(h),d.push({subject:p,object:b,via:m})}return d}function yp(e,t,n,{budget:s=50,focus:o=null}={}){let r=yn(t),i=new Map,a=new Set;for(let[m,b]of n||[])!m||!b||m===b||(a.add(`${m}${Te}${b}`),a.add(`${b}${Te}${m}`),i.has(m)||i.set(m,new Set),i.get(m).add(b),i.has(b)||i.set(b,new Set),i.get(b).add(m));if(!i.size)return[];let l=new Set,c=o instanceof Set?o.size?o:null:Mn(o),u=(m,b,h)=>!c||c.has(m)||c.has(b)||c.has(h),d=[];for(let[m,b]of e||[]){if(!m||!b)continue;let h=`${m}${Te}${b}`;if(!l.has(h)){l.add(h);for(let g of[b,...r(b)]){let y=i.get(g);if(y)for(let w of y){if(w===m)continue;let k=`${m}${Te}${w}`;a.has(k)||u(m,b,w)&&d.push([m,b,g,w,k])}}}}d.sort((m,b)=>m[0].localeCompare(b[0])||m[3].localeCompare(b[3])||m[2].localeCompare(b[2])||m[1].localeCompare(b[1]));let f=[],p=new Set;for(let[m,b,h,g,y]of d)if(!p.has(y)){if(f.length>=s)break;p.add(y),f.push({subject:m,object:g,viaType:b,viaClass:h})}return f}function vp(e,t,n,s,{budget:o=50,focus:r=null}={}){let i=yn(n),a=new Map;for(let h of s||[]){if(!h||!h.restriction||!h.property||!h.target)continue;let g=`${h.property}${Te}${h.target}`;a.has(g)||a.set(g,new Set),a.get(g).add(h.restriction)}if(!a.size)return[];let l=new Set,c=new Map;for(let[h,g]of t||[])!h||!g||(l.add(`${h}${Te}${g}`),c.has(h)||c.set(h,new Set),c.get(h).add(g));let u=r instanceof Set?r.size?r:null:Mn(r),d=(h,g,y)=>!u||u.has(h)||u.has(g)||u.has(y),f=new Set,p=[];for(let[h,g,y]of e||[]){if(!h||!g||!y)continue;let w=Z(g),k=`${h}${Te}${w}${Te}${y}`;if(f.has(k))continue;f.add(k);let S=c.get(y);if(S)for(let $ of S)for(let v of[$,...i($)]){let A=a.get(`${w}${Te}${v}`);if(A)for(let T of A){if(h===T)continue;let C=`${h}${Te}${T}`;l.has(C)||d(h,y,T)&&p.push([h,g,w,y,$,v,T,C])}}}p.sort((h,g)=>h[0].localeCompare(g[0])||h[6].localeCompare(g[6])||h[1].localeCompare(g[1])||h[3].localeCompare(g[3]));let m=[],b=new Set;for(let[h,g,y,w,k,S,$,v]of p)if(!b.has(v)){if(m.length>=o)break;b.add(v),m.push({subject:h,object:$,viaProperty:g,viaPropertyKey:y,viaValue:w,viaType:k,viaTarget:S})}return m}function Iy(e){let t=new Map,n=new Map,s=new Map;for(let r of e||[])if(!(!r||!r.subject||!r.predicate))if(so(r.predicate))t.set(r.subject,r.object);else if(_y(r.predicate))s.set(r.subject,r.object);else{let i=Cy[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)!==Ty)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 $p(e,t,{budget:n=50,focus:s=null}={}){let o=yn(t),r=new Map;for(let f of e||[]){if(!f||!f.restriction||!f.property||!f.target)continue;let p=Z(f.property);r.has(p)||r.set(p,[]),r.get(p).push({restriction:f.restriction,target:f.target})}let i=new Set;for(let[f,p]of t||[])f&&p&&i.add(`${f}${Te}${p}`);let a=s instanceof Set?s.size?s:null:Mn(s),l=(f,p)=>!a||a.has(f)||a.has(p),c=[];for(let[,f]of r)if(!(f.length<2))for(let p of f)for(let m of f){if(p.restriction===m.restriction||p.target===m.target||!o(p.target).has(m.target))continue;let b=`${p.restriction}${Te}${m.restriction}`;i.has(b)||l(p.restriction,m.restriction)&&c.push([p.restriction,m.restriction,p.target,m.target,b])}c.sort((f,p)=>f[0].localeCompare(p[0])||f[1].localeCompare(p[1]));let u=[],d=new Set;for(let[f,p,m,b,h]of c)if(!d.has(h)){if(u.length>=n)break;d.add(h),u.push({subject:f,object:p,viaY1:m,viaY2:b})}return u}function xp(e,t,n,s,{budget:o=20,focus:r=null}={}){if(!n)return null;let i=yn(e),a=r instanceof Set?r.size?r:null:Mn(r),l=f=>!a||a.has(n)||a.has(f),c=new Map;for(let[f,p]of e||[])!f||!p||(c.has(f)||c.set(f,new Set),c.get(f).add(p));let u=new Map((t||[]).map(f=>[f.restriction,f])),d=0;for(let f of[n,...i(n)]){if(d>=o)break;if(d+=1,!!l(f))for(let p of c.get(f)||[]){let m=u.get(p);if(m&&s(m))return{viaClass:f,viaRestriction:p,record:m}}}return null}function Ly(e,t,n,s,o,r={}){if(!s||!Number.isFinite(o))return null;let i=xp(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 My(e,t,n,s,o={}){if(!s)return null;let r=xp(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 Py(e,t,n,{budget:s=50,focus:o=null}={}){let r=yn(t),i=new Map;for(let[p,m]of n||[])!p||!m||p===m||(i.has(p)||i.set(p,new Set),i.get(p).add(m),i.has(m)||i.set(m,new Set),i.get(m).add(p));if(!i.size)return[];let a=new Map;for(let[p,m]of e||[])!p||!m||(a.has(p)||a.set(p,new Set),a.get(p).add(m));let l=o instanceof Set?o.size?o:null:Mn(o),c=p=>!l||l.has(p),u=[],d=new Set;for(let[p,m]of a){if(!c(p))continue;let b=[...m].sort();for(let h=0;h<b.length;h+=1)for(let g=h+1;g<b.length;g+=1){let[y,w]=[b[h],b[g]],k=[y,...r(y)],S=[w,...r(w)],$=null;for(let A of k){let T=i.get(A);if(T){for(let C of S)if(T.has(C)){$=[A,C];break}if($)break}}if(!$)continue;let v=`${p}${Te}${y}${Te}${w}`;d.has(v)||(d.add(v),u.push([p,y,w,$[0],$[1]]))}}u.sort((p,m)=>p[0].localeCompare(m[0])||p[1].localeCompare(m[1])||p[2].localeCompare(m[2]));let f=[];for(let[p,m,b,h,g]of u){if(f.length>=s)break;f.push({subject:p,classA:m,classB:b,viaA:h,viaB:g})}return f}async function Fy(e,{depth:t=32,budget:n=50,focus:s=null,expandFocus:o=!1,maxEnvironments:r=Wr,full:i=!1,store:a}={}){let{loadMemory:l,readFactRows:c,appendFacts:u}=dp(a,["loadMemory","readFactRows","appendFacts"],"syllogise"),d=typeof a?.loadSyllogiseState=="function"&&typeof a?.saveSyllogiseState=="function",f=await l(e),p=c(f),m=p.filter(x=>es(x.predicate)).map(x=>[x.subject,x.object]),b=p.filter(x=>Ss(x.predicate)).map(x=>[x.subject,x.object]),h=p.filter(x=>Es(x.predicate)).map(x=>[x.subject,x.object]),g=new Map,y=new Map,w=[];for(let x of p){let ie=String(x.predicate||"").trim().toLowerCase();so(x.predicate)?g.set(x.subject,x.object):Ko(x.predicate)?y.set(x.subject,x.object):Da.has(ie)||w.push([x.subject,x.predicate,x.object])}let k=[];for(let[x,ie]of g){let Ee=y.get(x);Ee&&k.push({restriction:x,property:ie,target:Ee})}let S=Mn(s),$=o&&S?Ia(p,[...S]):S,v=$===null&&d?await a.loadSyllogiseState(e):null,A=new Set(p.map(x=>x.id)),T=Array.isArray(v?.factIds)?v.factIds.filter(x=>!A.has(x)):[],C=v&&Array.isArray(v.factIds)&&!T.length&&!i?"delta":"full",E=C==="delta"?new Set(v.factIds):null,R=C==="delta"?p.filter(x=>!E.has(x.id)):p,N=R.length,j=new Map;for(let x of p)j.set(`${x.subject}${Te}${x.predicate}${Te}${x.object}`,x.trust);let _=(x,ie,Ee)=>j.get(`${x}${Te}${ie}${Te}${Ee}`),O=(x,ie,Ee)=>j.has(`${x}${Te}${ie}${Te}${Ee}`),P=x=>x.filter(ie=>typeof ie=="number"),L=C==="delta"&&!R.length,B=C==="delta"?R.filter(x=>es(x.predicate)).map(x=>[x.subject,x.object]):[],W=C==="delta"?B.length?bp(m,B,{depth:t,budget:n,focus:$}):[]:gp(m,{depth:t,budget:n,focus:$}),U=m.concat(W.map(x=>[x.subject,x.object])),F=$,I=null;if(C==="delta"&&!L){let x=p.concat(W.map(Ee=>({subject:Ee.subject,predicate:Pe,object:Ee.object}))),ie=[];for(let Ee of R)ie.push(Ee.subject,Ee.object);I=Ia(x,ie),F=I}let M=x=>!I||I.has(x),D=I?b.filter(([x,ie])=>M(x)||M(ie)):b,V=new Set;if(I)for(let x of R)Es(x.predicate)&&(V.add(x.subject),V.add(x.object));let G=I&&V.size?yn(U):null,q=I?b.filter(([x,ie])=>M(x)||M(ie)||G&&[...G(ie)].some(Ee=>V.has(Ee))):b,te=new Set;if(I){for(let x of R)if(so(x.predicate)||Ko(x.predicate)){let ie=g.get(x.subject);ie&&te.add(Z(ie))}}let oe=I?w.filter(([x,ie,Ee])=>M(x)||M(Ee)||te.has(Z(ie))):w,Se=Math.max(0,n-W.length),ce=Se>0&&!L?wp(D,U,{budget:Se,focus:F,presentTypeEdges:b}):[],$e=Math.max(0,n-W.length-ce.length),ne=$e>0&&!L?yp(q,U,h,{budget:$e,focus:F}):[],Y=Math.max(0,n-W.length-ce.length-ne.length),ee=Y>0&&k.length&&!L?vp(oe,b,U,k,{budget:Y,focus:F}):[],Ie=Math.max(0,n-W.length-ce.length-ne.length-ee.length),H=Ie>0&&k.length>1&&!L?$p(k,U,{budget:Ie,focus:F}):[],Q=new Map(k.map(x=>[x.restriction,x])),we=[...W.map(x=>({subject:x.subject,predicate:Pe,object:x.object,provenance:mp,justification:[[de(x.subject,Pe,x.via),de(x.via,Pe,x.object)]]})),...ce.map(x=>({subject:x.subject,predicate:jt,object:x.object,provenance:hp,justification:[[de(x.subject,jt,x.via),de(x.via,Pe,x.object)]]})),...ne.map(x=>{let ie=O(x.viaClass,no,x.object),[Ee,kn]=ie?[x.viaClass,x.object]:[x.object,x.viaClass],Ds=P([_(x.subject,jt,x.viaType),_(Ee,no,kn),...x.viaClass!==x.viaType?[_(x.viaType,Pe,x.viaClass)]:[]]);return{subject:x.subject,predicate:no,object:x.object,provenance:La,justification:[[de(x.subject,jt,x.viaType),de(Ee,no,kn),...x.viaClass!==x.viaType?[de(x.viaType,Pe,x.viaClass)]:[]]],...Ds.length?{premiseTrusts:Ds,ruleConfidence:Na}:{}}}),...ee.map(x=>{let ie=P([_(x.subject,x.viaProperty,x.viaValue),_(x.viaValue,jt,x.viaType),_(x.object,bn,x.viaPropertyKey),_(x.object,wn,x.viaTarget),...x.viaType!==x.viaTarget?[_(x.viaType,Pe,x.viaTarget)]:[]]);return{subject:x.subject,predicate:jt,object:x.object,provenance:Pa,justification:[[de(x.subject,x.viaProperty,x.viaValue),de(x.viaValue,jt,x.viaType),de(x.object,bn,x.viaPropertyKey),de(x.object,wn,x.viaTarget),...x.viaType!==x.viaTarget?[de(x.viaType,Pe,x.viaTarget)]:[]]],...ie.length?{premiseTrusts:ie,ruleConfidence:Fa}:{}}}),...H.map(x=>{let ie=Q.get(x.subject),Ee=Q.get(x.object),kn=P([ie&&_(x.subject,bn,ie.property),_(x.subject,wn,x.viaY1),Ee&&_(x.object,bn,Ee.property),_(x.object,wn,x.viaY2),_(x.viaY1,Pe,x.viaY2)]);return{subject:x.subject,predicate:Pe,object:x.object,provenance:Ba,justification:[[...ie?[de(x.subject,bn,ie.property)]:[],de(x.subject,wn,x.viaY1),...Ee?[de(x.object,bn,Ee.property)]:[],de(x.object,wn,x.viaY2),de(x.viaY1,Pe,x.viaY2)]],...kn.length?{premiseTrusts:kn,ruleConfidence:Ua}:{}}})],re=we.map(x=>({id:de(x.subject,x.predicate,x.object),subject:x.subject,predicate:x.predicate,object:x.object,environments:x.justification,write:x})),be=Ep(p.concat(re.map(x=>({id:x.id,subject:x.subject,predicate:x.predicate,object:x.object})))),Fe=new Map(p.map(x=>[x.id,x])),pe=x=>es(x)||Ss(x)||Es(x),je=x=>C!=="delta"||I!==null&&(I.has(x.subject)||I.has(x.object)),me=p.filter(x=>pe(x.predicate)&&kp(x.provenance)&&Ho(x).length<r&&je(x)).map(x=>({id:x.id,subject:x.subject,predicate:x.predicate,object:x.object,environments:Ho(x),provenance:x.provenance})),Pt=[...re,...me].sort((x,ie)=>x.subject.localeCompare(ie.subject)||x.predicate.localeCompare(ie.predicate)||x.object.localeCompare(ie.object)),tn=0,Je=!1,an=0;for(let x of Pt){if(an>=n){Je=!0;break}an+=1;let ie=be(x,{maxEnvironments:r+1}),{kept:Ee,truncated:kn}=zy(x.environments,ie,r);if(kn&&(Je=!0),!(Ee.length<=x.environments.length)){if(tn+=Ee.length-x.environments.length,x.write){x.write.justification=Ee;continue}we.push({subject:x.subject,predicate:x.predicate,object:x.object,justification:Ee,...Sp(x.provenance,Ee,Ds=>Fe.get(Ds)?.trust)||{}})}}let{ids:Gt}=await u(e,we),Ft=[],At=0;for(let x of W)Ft.push({id:Gt[At],subject:x.subject,object:x.object,via:x.via,rule:pp}),At+=1;for(let x of ce)Ft.push({id:Gt[At],subject:x.subject,object:x.object,via:x.via,rule:fp}),At+=1;for(let x of ne)Ft.push({id:Gt[At],subject:x.subject,object:x.object,via:x.viaClass,rule:Oa}),At+=1;for(let x of ee)Ft.push({id:Gt[At],subject:x.subject,object:x.object,via:x.viaValue,rule:Ma}),At+=1;for(let x of H)Ft.push({id:Gt[At],subject:x.subject,object:x.object,via:x.viaY1,rule:za}),At+=1;let pr=Ft.length>=n;if($===null&&d&&!pr){let x=new Set(A);for(let ie of Gt)x.add(ie);await a.saveSyllogiseState(e,{version:1,factIds:[...x].sort(),completedAt:new Date().toISOString()})}return{derived:Ft,count:Ft.length,budget:n,depth:t,truncated:pr,mode:C,deltaSize:N,environmentsAdded:tn,alternatesTruncated:Je}}function kp(e){let t=String(e||"").split(" | ").filter(Boolean);return t.length>0&&t.every(n=>n.startsWith("entailed:"))}function Dy(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();es(u.predicate)?t.push([u.subject,u.object]):Ss(u.predicate)?(n.has(u.subject)||n.set(u.subject,new Set),n.get(u.subject).add(u.object)):Es(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)):so(u.predicate)?o.set(u.subject,u.object):Ko(u.predicate)?r.set(u.subject,u.object):Da.has(d)||(i.has(u.subject)||i.set(u.subject,[]),i.get(u.subject).push([Z(u.predicate),u.object]))}let a=yn(t),l=(u,d)=>u!==d&&a(u).has(d),c=u=>{let d=o.get(u),f=r.get(u);return d&&f?{property:Z(d),target:f}:null};return u=>{if(es(u.predicate)){if(l(u.subject,u.object))return!0;let d=c(u.subject),f=c(u.object);return!!(d&&f&&d.property===f.property&&l(d.target,f.target))}if(Ss(u.predicate)){for(let f of n.get(u.subject)||[])if(l(f,u.object))return!0;let d=c(u.object);if(d){for(let[f,p]of i.get(u.subject)||[])if(f===d.property){for(let m of n.get(p)||[])if(m===d.target||l(m,d.target))return!0}}return!1}if(Es(u.predicate)){for(let d of n.get(u.subject)||[])for(let f of[d,...a(d)])if(s.get(f)?.has(u.object))return!0;return!1}return!0}}function Ep(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 m=String(p.predicate||"").trim().toLowerCase();es(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)):Ss(p.predicate)?(o.has(p.subject)||o.set(p.subject,new Set),o.get(p.subject).add(p.object)):Es(p.predicate)?(r.add(`${p.subject}${Te}${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)):so(p.predicate)?a.set(p.subject,p.object):Ko(p.predicate)?l.set(p.subject,p.object):Da.has(m)||(c.has(p.subject)||c.set(p.subject,[]),c.get(p.subject).push([p.predicate,p.object]))}let u=yn(n),d=p=>s.get(p)||new Set,f=p=>{let m=a.get(p),b=l.get(p);return m&&b?{property:m,propertyKey:Z(m),target:b}:null};return(p,{maxEnvironments:m=Wr}={})=>{let b=[],h=new Set,g=y=>{if(b.length>=m||p.id&&y.includes(p.id)||!y.every(k=>t.has(k)))return;let w=[...y].sort().join(" ");h.has(w)||(h.add(w),b.push(y))};if(es(p.predicate)){for(let y of[...d(p.subject)].sort()){if(b.length>=m)break;y===p.subject||y===p.object||d(y).has(p.object)&&g([de(p.subject,Pe,y),de(y,Pe,p.object)])}if(b.length<m){let y=f(p.subject),w=f(p.object);y&&w&&y.propertyKey===w.propertyKey&&y.target!==w.target&&d(y.target).has(w.target)&&g([de(p.subject,bn,y.property),de(p.subject,wn,y.target),de(p.object,bn,w.property),de(p.object,wn,w.target),de(y.target,Pe,w.target)])}return b}if(Ss(p.predicate)){for(let w of[...o.get(p.subject)||[]].sort()){if(b.length>=m)break;w!==p.object&&d(w).has(p.object)&&g([de(p.subject,jt,w),de(w,Pe,p.object)])}let y=f(p.object);if(y){let w=[...c.get(p.subject)||[]].filter(([k])=>Z(k)===y.propertyKey).sort((k,S)=>k[0].localeCompare(S[0])||k[1].localeCompare(S[1]));for(let[k,S]of w){if(b.length>=m)break;for(let $ of[...o.get(S)||[]].sort()){if(b.length>=m)break;$!==y.target&&!d($).has(y.target)||g([de(p.subject,k,S),de(S,jt,$),de(p.object,bn,y.propertyKey),de(p.object,wn,y.target),...$!==y.target?[de($,Pe,y.target)]:[]])}}}return b}if(Es(p.predicate)){let y=[];for(let w of o.get(p.subject)||[])for(let k of[w,...u(w)])(i.get(k)||new Set).has(p.object)&&y.push([w,k]);y.sort((w,k)=>w[0].localeCompare(k[0])||w[1].localeCompare(k[1]));for(let[w,k]of y){if(b.length>=m)break;let S=r.has(`${k}${Te}${p.object}`),[$,v]=S?[k,p.object]:[p.object,k];g([de(p.subject,jt,w),de($,no,v),...k!==w?[de(w,Pe,k)]:[]])}return b}return b}}function zy(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 Sp(e,t,n){let s;for(let i of String(e||"").split(" | ")){let a=By.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 Uy(e,t,n,{budget:s=50,depth:o=32,maxEnvironments:r=Wr,store:i}={}){let{loadMemory:a,readFactRows:l,removeFacts:c}=dp(i,["loadMemory","readFactRows","removeFacts"],"retractSubClassOf"),u=typeof i?.appendFacts=="function"?i.appendFacts:null,d=Z(t),f=Z(n),p=de(d,Pe,f),m=await a(e),b=l(m),h=new Map(b.map(C=>[C.id,C]));if(!h.has(p))return{retracted:[],count:0,budget:s,depth:o,truncated:!1,found:!1};let g=b.filter(C=>Ho(C).length&&kp(C.provenance)),y=new Map;for(let C of g)for(let E of Ho(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]),k=[p],S=new Map,$=!1,v=0,A=[p];for(;v<o;v+=1){let C=new Set;for(let L of A)for(let B of y.get(L)||[])w.has(B)||C.add(B);let E=[...C].map(L=>h.get(L)).sort((L,B)=>L.subject.localeCompare(B.subject)||L.predicate.localeCompare(B.predicate)||L.object.localeCompare(B.object));if(!E.length)break;let R=b.filter(L=>!w.has(L.id)&&!C.has(L.id)),N=new Set(R.map(L=>L.id)),j=Ep(R),_=Dy(R),O=!1,P=!1;A=[];for(let L of E){if(w.size>=s){P=!0;break}let B=Ho(L),W=B.filter(F=>F.every(I=>N.has(I)));if(W.length){W.length!==B.length&&S.set(L.id,W);continue}let U=j(L,{maxEnvironments:r});if(U.length){S.set(L.id,U);continue}_(L)||(w.add(L.id),k.push(L.id),A.push(L.id),O=!0)}if(P){$=!0;break}if(!O)break}!$&&v>=o&&($=g.some(C=>!w.has(C.id)&&C.justification.some(E=>w.has(E))));let{removed:T}=await c(e,k);if(u){let C=[...S.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,...Sp(N.provenance,R,j=>h.get(j)?.trust)||{}}});C.length&&await u(e,C)}return{retracted:T,count:T.length,budget:s,depth:o,truncated:$,found:!0}}function Wa(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:jt,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:f}of a)if(r.has(d))return f;if(c===o)break;let u=[];for(let{node:d,path:f}of a)if(!l.has(d)){l.add(d);for(let p of i.get(d)||[])l.has(p)||u.push({node:p,path:[...f,{subject:d,predicate:Pe,object:p}]})}a=u}return null}var Pe,pp,mp,jt,fp,hp,no,Oa,La,Na,bn,wn,Ma,Pa,Fa,Wr,Te,es,Ss,Es,so,Ko,_y,Da,Ty,Cy,za,Ba,Ua,Oy,Ny,Ho,By,Wt=K(()=>{gn();Pe="rdfs:subClassOf",pp="subClassOf",mp=`entailed:${pp}`,jt="rdf:type",fp="type",hp=`entailed:${fp}`,no="owl:disjointWith",Oa="disjointWith",La=`entailed:${Oa}`,Na=.95,bn="owl:onProperty",wn="owl:someValuesFrom",Ma="someValuesFrom",Pa=`entailed:${Ma}`,Fa=.95,Wr=4,Te="\u241F",es=e=>String(e||"").trim().toLowerCase()==="rdfs:subclassof",Ss=e=>String(e||"").trim().toLowerCase()==="rdf:type",Es=e=>String(e||"").trim().toLowerCase()==="owl:disjointwith",so=e=>String(e||"").trim().toLowerCase()==="owl:onproperty",Ko=e=>String(e||"").trim().toLowerCase()==="owl:somevaluesfrom",_y=e=>String(e||"").trim().toLowerCase()==="owl:onclass",Da=new Set(["rdfs:subclassof","rdf:type","owl:disjointwith","owl:onproperty","owl:somevaluesfrom","owl:intersectionof"]);Ty="has",Cy={"owl:cardinality":"exactly","owl:mincardinality":"min","owl:maxcardinality":"max"};za="someValuesFromSubsumption",Ba=`entailed:${za}`,Ua=.95;Oy=.95;Ny=.95;Ho=e=>e.environments||(Array.isArray(e.justification)&&e.justification.length?[e.justification]:[]);By=new Map([[La,Na],[Pa,Fa],[Ba,Ua]])});function ao(e){let t=String(e||""),n=jp.get(t);return n||(t.startsWith(Ga)?oo+t.slice(Ga.length):t)}function _p(e){let t=String(e||""),n=Wy.get(t);return n||(t.startsWith(oo)?Ga+t.slice(oo.length):null)}function Tp(e,t,n,s,o){let r=null;for(let i of e){if(i===t)return[];let a=Wa(i,new Set([t]),n,s,{maxHops:o});a&&(!r||a.length<r.length)&&(r=a)}return r}function Vr(e,t,n,{maxHops:s=3}={}){let o=io(e),r=io(t),i=Array.isArray(n)?n:[],{typeEdges:a,subClassEdges:l}=Ap(i),c=i.filter(g=>(g.predicate===qr||g.predicate===ro)&&r.has(g.object)),u=[];for(let g of c){let y=g.predicate===ro?"negative":"positive";if(o.has(g.subject)){u.push({fact:g,polarity:y,hops:0,chain:null});continue}let w=Tp(o,g.subject,a,l,s);w&&w.length&&u.push({fact:g,polarity:y,hops:w.length,chain:w})}if(!u.length)return{verdict:"none",hops:0,positive:[],negative:[],chain:null,overrides:null,baseRate:Va(o,r,i,{maxHops:s})};u.sort((g,y)=>g.hops-y.hops||(y.fact.trust||0)-(g.fact.trust||0));let d=u[0].hops,f=u.filter(g=>g.hops===d),p=f.filter(g=>g.polarity==="positive").map(g=>g.fact),m=f.filter(g=>g.polarity==="negative").map(g=>g.fact),b=m.length&&!p.length?"negative":"positive",h=u.find(g=>g.hops>d&&g.polarity!==b)||null;return{verdict:p.length&&m.length?"both":m.length?"no":"yes",hops:d,positive:p,negative:m,chain:u[0].chain,overrides:h?{fact:h.fact,chain:h.chain}:null,baseRate:null}}function Va(e,t,n,{maxHops:s=3}={}){let o=io(e),r=io(t),i=Array.isArray(n)?n:[],a=i.filter(b=>b.predicate===Pe||b.predicate===jt),l=a.filter(b=>o.has(b.subject)).map(b=>b.object);if(!l.length)return null;let c=l[0],u=[...new Set(a.filter(b=>b.object===c&&!o.has(b.subject)).map(b=>b.subject))],d=b=>{let h=i.find(g=>g.subject===b&&r.has(g.object)&&(g.predicate===qr||g.predicate===ro));return h?{name:b,polarity:h.predicate===ro?"negative":"positive",fact:h}:{name:b,polarity:"unknown",fact:null}},f=u.map(d),{typeEdges:p,subClassEdges:m}=Ap(i);return{klass:c,kinds:u.length,positive:f.filter(b=>b.polarity==="positive"),negative:f.filter(b=>b.polarity==="negative"),unknown:f.filter(b=>b.polarity==="unknown"),chain:Tp(o,c,p,m,s)}}function Ha(e,t,{exclude:n=[],maxHops:s=3}={}){let o=io(e),r=io(n),i=Array.isArray(t)?t:[],a=new Set,l=[];for(let c of i)c.predicate!==qr||!o.has(c.object)||r.has(c.subject)||a.has(c.subject)||(a.add(c.subject),Vr(new Set([c.subject]),o,i,{maxHops:s}).verdict==="yes"&&l.push(c));return l.sort(Gy)}var oo,Ga,Gr,jp,Wy,Rp,qr,ro,qa,Gy,io,Ap,Ka=K(()=>{Wt();oo="mgxneg:",Ga="mgx:",Gr="mgxneg:subClassOf",jp=new Map([[Pe,Gr]]),Wy=new Map([...jp].map(([e,t])=>[t,e]));Rp=e=>String(e||"").startsWith(oo),qr="mgx:capableOf",ro=ao(qr),qa=6,Gy=(e,t)=>(t.trust||0)-(e.trust||0)||String(e.subject).localeCompare(String(t.subject)),io=e=>e instanceof Set?e:new Set(Array.isArray(e)?e:[e]),Ap=e=>({typeEdges:e.filter(t=>t.predicate===jt).map(t=>[t.subject,t.object]),subClassEdges:e.filter(t=>t.predicate===Pe).map(t=>[t.subject,t.object])})});function co(e,t){let n=(e?.attributes||[]).find(s=>s?.prop===t);return n?String(n.value??""):void 0}function Ky(e,t){(!e?.class||!qy.has(e.class))&&t.push(`must have a class from the closed vocabulary Utterance | Fact | Session | Source | Rule (got ${JSON.stringify(e?.class)})`)}function Yy(e,t){for(let s of["rdf:subject","rdf:predicate","rdf:object"])Hr(co(e,s))||t.push(`a Fact needs a non-empty ${s}`);for(let s of["rdf:subject","rdf:object"]){let o=co(e,s);o!==void 0&&Hy.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=co(e,"mgx:factProvenance");n!==void 0&&!Hr(n)&&t.push("mgx:factProvenance, when present, must be non-empty")}function Xy(e,t){Hr(co(e,"mgx:ruleName"))||t.push("a Rule needs a non-empty mgx:ruleName");let n=co(e,"mgx:ruleKind");if(!n||!Cp.has(n)){t.push(`a Rule's mgx:ruleKind must be one of ${[...Cp].join(" | ")} (got ${JSON.stringify(n)})`);return}for(let s of Vy[n])Hr(co(e,s))||t.push(`a ${n} Rule needs a non-empty ${s}`)}function Jy(e){let t=[];return Ky(e,t),e?.class==="Fact"&&Yy(e,t),e?.class==="Rule"&&Xy(e,t),{ok:t.length===0,violations:t}}function Ya(e){let t=Jy(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 qy,Cp,Vy,Hy,Hr,Ip=K(()=>{qy=new Set(["Utterance","Fact","Session","Source","Rule"]),Cp=new Set(["compose2","filter","recursive","action-signature","action-precond","action-effect","action-constraint"]),Vy={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"]},Hy=/[.!?]\s+\w/;Hr=e=>typeof e=="string"&&e.trim().length>0});var Op={};zn(Op,{access:()=>ev,appendFile:()=>sv,basename:()=>yv,copyFile:()=>uv,createInterface:()=>Ev,createReadStream:()=>pv,createRequire:()=>Qy,createWriteStream:()=>mv,default:()=>jv,dirname:()=>gv,existsSync:()=>fv,fileURLToPath:()=>$v,isAbsolute:()=>wv,join:()=>hv,mkdir:()=>ov,mkdtemp:()=>rv,randomBytes:()=>xv,readFile:()=>tv,readFileSync:()=>Zy,readdir:()=>dv,rename:()=>iv,resolve:()=>bv,rm:()=>cv,sep:()=>vv,spawnSync:()=>kv,stat:()=>lv,tmpdir:()=>Sv,unlink:()=>av,writeFile:()=>nv});var ot,Qy,Zy,ev,tv,nv,sv,ov,rv,iv,av,cv,lv,uv,dv,pv,mv,fv,hv,gv,bv,wv,yv,vv,$v,xv,kv,Ev,Sv,jv,Lp=K(()=>{ot=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},Qy=ot("createRequire"),Zy=ot("readFileSync"),ev=ot("access"),tv=ot("readFile"),nv=ot("writeFile"),sv=ot("appendFile"),ov=ot("mkdir"),rv=ot("mkdtemp"),iv=ot("rename"),av=ot("unlink"),cv=ot("rm"),lv=ot("stat"),uv=ot("copyFile"),dv=ot("readdir"),pv=ot("createReadStream"),mv=ot("createWriteStream"),fv=()=>!1,hv=(...e)=>e.join("/"),gv=e=>String(e).replace(/\/[^/]*$/,""),bv=(...e)=>e.join("/"),wv=e=>String(e).startsWith("/"),yv=e=>String(e).split("/").pop(),vv="/",$v=e=>String(e),xv=ot("randomBytes"),kv=ot("spawnSync"),Ev=ot("createInterface"),Sv=()=>"/tmp",jv={}});var _v,Yo,Xa=K(()=>{_v=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,Yo=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(_v);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 Rv(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function Av(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+=`
69
70
  `,i===t&&(o+=" ".repeat(r+n+2),o+=`^
70
- `))}return o}var le,js=K(()=>{le=class extends Error{line;column;codeblock;constructor(t,n){let[s,o]=jv(n.toml,n.ptr),r=_v(n.toml,s,o);super(`Invalid TOML document: ${t}
71
+ `))}return o}var le,js=K(()=>{le=class extends Error{line;column;codeblock;constructor(t,n){let[s,o]=Rv(n.toml,n.ptr),r=Av(n.toml,s,o);super(`Invalid TOML document: ${t}
71
72
 
72
73
  ${r}`,n),this.line=s,this.column=o,this.codeblock=r}}});function Kr(e,t){let n=e[t++],s=n,o=n==="'",r=n===e[t]&&n===e[t+1];r&&(e[t+=2]===`
73
74
  `?t++:e[t]==="\r"&&e[t+1]===`
74
75
  `&&(t+=2));let i="",a=t,l=0;for(let c=t;c<e.length;c++)if(n=e[c],r&&(n===`
75
76
  `||n==="\r"&&e[c+1]===`
76
- `))l=l&&3;else{if(n<" "&&n!==" "||n==="\x7F")throw new le("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 le("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 le("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+=`
77
- `;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 le("unrecognized escape sequence",{toml:e,ptr:c});a=c+1,l=0}else if(n!==" "&&n!==" "){if(l===2)throw new le("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:a});l=!o&&n==="\\"?1:0,a=c}}throw new le("unfinished string",{toml:e,ptr:t})}function Lp(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=Rv.test(e);if(o||Av.test(e)){if(Tv.test(e))throw new le("leading zeroes are not allowed",{toml:t,ptr:n});e=e.replace(/_/g,"");let i=+e;if(isNaN(i))throw new le("invalid number",{toml:t,ptr:n});if(o){if((o=!Number.isSafeInteger(i))&&!s)throw new le("integer value cannot be represented losslessly",{toml:t,ptr:n});(o||s===!0)&&(i=BigInt(e))}return i}let r=new Ko(e);if(!r.isValid())throw new le("invalid value",{toml:t,ptr:n});return r}var Rv,Av,Tv,Ja=K(()=>{Xa();js();Rv=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,Av=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,Tv=/^[+-]?0[0-9_]/});function Yr(e,t=0,n=e.length){let s=e.indexOf(`
78
- `,t);return e[s-1]==="\r"&&s--,s<=n?s:-1}function co(e,t){for(let n=t;n<e.length;n++){let s=e[n];if(s===`
77
+ `))l=l&&3;else{if(n<" "&&n!==" "||n==="\x7F")throw new le("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 f=0;f<d;f++,c++){let p=e.charCodeAt(c+1),m=p>=48&&p<=57?p-48:p>=65&&p<=70?p-65+10:p>=97&&p<=102?p-97+10:-1;if(m<0)throw new le("invalid non-hex character in unicode escape",{toml:e,ptr:c+1});u=u<<4|m}if(u<0||u>1114111||u>=55296&&u<=57343)throw new le("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+=`
78
+ `;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 le("unrecognized escape sequence",{toml:e,ptr:c});a=c+1,l=0}else if(n!==" "&&n!==" "){if(l===2)throw new le("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:a});l=!o&&n==="\\"?1:0,a=c}}throw new le("unfinished string",{toml:e,ptr:t})}function Np(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=Tv.test(e);if(o||Cv.test(e)){if(Iv.test(e))throw new le("leading zeroes are not allowed",{toml:t,ptr:n});e=e.replace(/_/g,"");let i=+e;if(isNaN(i))throw new le("invalid number",{toml:t,ptr:n});if(o){if((o=!Number.isSafeInteger(i))&&!s)throw new le("integer value cannot be represented losslessly",{toml:t,ptr:n});(o||s===!0)&&(i=BigInt(e))}return i}let r=new Yo(e);if(!r.isValid())throw new le("invalid value",{toml:t,ptr:n});return r}var Tv,Cv,Iv,Ja=K(()=>{Xa();js();Tv=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,Cv=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,Iv=/^[+-]?0[0-9_]/});function Yr(e,t=0,n=e.length){let s=e.indexOf(`
79
+ `,t);return e[s-1]==="\r"&&s--,s<=n?s:-1}function lo(e,t){for(let n=t;n<e.length;n++){let s=e[n];if(s===`
79
80
  `)return n;if(s==="\r"&&e[n+1]===`
80
81
  `)return n+1;if(s<" "&&s!==" "||s==="\x7F")throw new le("control characters are not allowed in comments",{toml:e,ptr:t})}return e.length}function vn(e,t,n,s){let o;for(;;){for(;(o=e[t])===" "||o===" "||!n&&(o===`
81
82
  `||o==="\r"&&e[t+1]===`
82
- `);)t++;if(s||o!=="#")break;t=co(e,t)}return t}function Np(e,t,n,s,o=!1){if(!s)return t=Yr(e,t),t<0?e.length:t;for(let r=t;r<e.length;r++){let i=e[r];if(i==="#")r=Yr(e,r);else{if(i===n)return r+1;if(i===s||o&&(i===`
83
+ `);)t++;if(s||o!=="#")break;t=lo(e,t)}return t}function Mp(e,t,n,s,o=!1){if(!s)return t=Yr(e,t),t<0?e.length:t;for(let r=t;r<e.length;r++){let i=e[r];if(i==="#")r=Yr(e,r);else{if(i===n)return r+1;if(i===s||o&&(i===`
83
84
  `||i==="\r"&&e[r+1]===`
84
- `))return r}}throw new le("cannot find end of structure",{toml:e,ptr:t})}var Xr=K(()=>{js();});function Cv(e,t,n){let s=e.slice(t,n),o=s.indexOf("#");return o>-1&&(co(e,o),s=s.slice(0,o)),[s.trimEnd(),o]}function Yo(e,t,n,s,o){if(s===0)throw new le("document contains excessively nested structures. aborting.",{toml:e,ptr:t});let r=e[t];if(r==="["||r==="{"){let[l,c]=r==="["?Pp(e,t,s,o):Mp(e,t,s,o);if(n){if(c=vn(e,c),e[c]===",")c++;else if(e[c]!==n)throw new le("expected comma or end of structure",{toml:e,ptr:c})}return[l,c]}if(r==='"'||r==="'"){let[l,c]=Kr(e,t);if(n){if(c=vn(e,c),e[c]&&e[c]!==","&&e[c]!==n&&e[c]!==`
85
- `&&e[c]!=="\r")throw new le("unexpected character encountered",{toml:e,ptr:c});e[c]===","&&c++}return[l,c]}let i=Np(e,t,",",n),a=Cv(e,t,i-(e[i-1]===","?1:0));if(!a[0])throw new le("incomplete key-value declaration: no value specified",{toml:e,ptr:t});return n&&a[1]>-1&&(i=vn(e,t+a[1]),e[i]===","&&i++),[Lp(a[0],e,t,o),i]}var Qa=K(()=>{Ja();Za();Xr();js();});function Jr(e,t,n="="){let s=t-1,o=[],r=e.indexOf(n,t);if(r<0)throw new le("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 le("multiline strings are not allowed in keys",{toml:e,ptr:t});let[a,l]=Kr(e,t);s=e.indexOf(".",l);let c=e.slice(l,s<0||s>r?r:s),u=Yr(c);if(u>-1)throw new le("newlines are not allowed in keys",{toml:e,ptr:t+s+u});if(c.trimStart())throw new le("found extra tokens after the string part",{toml:e,ptr:l});if(r<l&&(r=e.indexOf(n,l),r<0))throw new le("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(!Iv.test(a))throw new le("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,vn(e,r+1,!0,!0)]}function Mp(e,t,n,s){let o={},r=new Set,i;for(t++;(i=e[t++])!=="}"&&i;){if(i===",")throw new le("expected value, found comma",{toml:e,ptr:t-1});if(i==="#")t=co(e,t);else if(i!==" "&&i!==" "&&i!==`
86
- `&&i!=="\r"){let a,l=o,c=!1,[u,d]=Jr(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 le("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 le("trying to redefine an already defined value",{toml:e,ptr:t});let[m,p]=Yo(e,d,"}",n-1,s);r.add(m),l[a]=m,t=p}}if(!i)throw new le("unfinished table encountered",{toml:e,ptr:t});return[o,t]}function Pp(e,t,n,s){let o=[],r;for(t++;(r=e[t++])!=="]"&&r;){if(r===",")throw new le("expected value, found comma",{toml:e,ptr:t-1});if(r==="#")t=co(e,t);else if(r!==" "&&r!==" "&&r!==`
87
- `&&r!=="\r"){let i=Yo(e,t-1,"]",n-1,s);o.push(i[0]),t=i[1]}}if(!r)throw new le("unfinished array encountered",{toml:e,ptr:t});return[o,t]}var Iv,Za=K(()=>{Ja();Qa();Xr();js();Iv=/^[a-zA-Z0-9-_]+[ \t]*$/});function Fp(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 lo(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let s={},o={},r=s,i=o;for(let a=vn(e,0);a<e.length;){if(e[a]==="["){let l=e[++a]==="[",c=Jr(e,a+=+l,"]");if(l){if(e[c[1]-1]!=="]")throw new le("expected end of table declaration",{toml:e,ptr:c[1]-1});c[1]++}let u=Fp(c[0],s,o,l?2:1);if(!u)throw new le("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=Jr(e,a),c=Fp(l[0],r,i,0);if(!c)throw new le("trying to redefine an already defined table or value",{toml:e,ptr:a});let u=Yo(e,l[1],void 0,t,n);c[1][c[0]]=u[0],a=u[1]}if(a=vn(e,a,!0),e[a]&&e[a]!==`
88
- `&&e[a]!=="\r")throw new le("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:a});a=vn(e,a)}return s}var zp=K(()=>{Za();Qa();Xr();js();});var Dp=K(()=>{});var Qr=K(()=>{zp();Dp();Xa();js();});var Gp={};Dn(Gp,{CONFIG_FILE:()=>ei,loadTomlConfig:()=>ec,mergeEffective:()=>Up,normalizeConfig:()=>Bp});async function ec(e,{file:t}={}){let n=t||X(e,ei),s;try{s=await ze(n,"utf8")}catch(o){if(o&&o.code==="ENOENT")return null;throw o}try{return lo(s)}catch(o){throw new Error(`Invalid ${ei} at ${n}: ${o&&o.message?o.message:o}`)}}async function Ov(e,t){let n;if(Array.isArray(e))n=e;else{let o=Dt(t,String(e));n=(await ze(o,"utf8")).split(`
89
- `)}let s=[];for(let o of n){let r=String(o).trim();!r||r.startsWith("#")||s.push(Dt(t,r))}return s}async function Bp(e,{configDir:t}={}){let n=e||{},s=t||process.cwd(),o={};if(n.repositories!==void 0&&(o.repositories=await Ov(n.repositories,s)),n.out_root!==void 0&&(o.outRoot=Dt(s,String(n.out_root))),n.graph_file!==void 0&&(o.graphFile=Dt(s,String(n.graph_file))),n.graph_files!==void 0){let y=Array.isArray(n.graph_files)?n.graph_files:[n.graph_files];o.graphFiles=y.map(w=>Dt(s,String(w)))}let r=n.corpus||{};r.tier!==void 0&&(o.corpus={tier:r.tier});let i=n.seed||{},a={};i.enabled!==void 0&&(a.enabled=i.enabled),i.limit!==void 0&&(a.limit=i.limit),Object.keys(a).length&&(o.seed=a),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);let l=n.index||{},c={};l.languages!==void 0&&(c.languages=l.languages),l.exclude!==void 0&&(c.exclude=l.exclude),l.secret_exclude!==void 0&&(c.secretExclude=l.secret_exclude),l.history_depth!==void 0&&(c.historyDepth=l.history_depth),l.include_text!==void 0&&(c.includeText=l.include_text),l.include_structure!==void 0&&(c.includeStructure=l.include_structure),l.respect_gitignore!==void 0&&(c.respectGitignore=l.respect_gitignore),l.markdown_sections!==void 0&&(c.markdownSections=l.markdown_sections),l.vue!==void 0&&(c.vue=l.vue),Object.keys(c).length&&(o.index=c);let u=n.tune||{},d={};u.score_gap_k!==void 0&&(d.scoreGapK=u.score_gap_k),u.literal_mention!==void 0&&(d.literalMention=u.literal_mention),u.demote_non_prod!==void 0&&(d.demoteNonProd=u.demote_non_prod),u.call_adjacency!==void 0&&(d.callAdjacency=u.call_adjacency),u.impl_of_interface!==void 0&&(d.implOfInterface=u.impl_of_interface),u.beam_search!==void 0&&(d.beamSearch=u.beam_search),u.beam_width!==void 0&&(d.beamWidth=u.beam_width),u.prose_layers!==void 0&&(d.proseLayers=u.prose_layers);let m=u.expansion||{},p={};m.strategy!==void 0&&(p.strategy=m.strategy),m.nodes!==void 0&&(p.nodes=m.nodes),m.q!==void 0&&(p.q=m.q),m.depth!==void 0&&(p.depth=m.depth),Object.keys(p).length&&(d.expansion=p),Object.keys(d).length&&(o.tune=d);let f=n.telemetry||{};f.enabled!==void 0&&(o.telemetry={enabled:f.enabled});let b=n.memory||{},h={};b.retention_versions!==void 0&&(h.retentionVersions=b.retention_versions),b.backend!==void 0&&(h.backend=b.backend),Object.keys(h).length&&(o.memory=h);let g=[];for(let[y,w]of Lv)n[y]&&n[y][w]!==void 0&&g.push(`${y}.${w}`);return o.unwired=g,o}function Zr(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:Zr(o,r,n)}return n}function Up({args:e={},toml:t=null,defaults:n={}}={}){let s=Zr(n),o=null;if(t){let{unwired:u,...d}=t;o=d}let r=o?Zr(o):{},i=Zr(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 ei,Lv,ti=K(()=>{St();Be();Qr();ei="tmct.toml";Lv=[["index","include_text"],["index","include_structure"],["index","respect_gitignore"],["index","markdown_sections"],["index","vue"]]});var ns={};Dn(ns,{CANONICALISED_FROM_PROP:()=>dc,CAPABLE_OF_PREDICATE:()=>im,CREATED_AT_PROP:()=>It,DEFAULT_RETENTION:()=>oc,FACT_CLASS:()=>ts,HAS_A_PREDICATE:()=>Cs,IN_REPLY_TO_PROP:()=>uc,MEMORY_DIR_REL:()=>Qo,MEMORY_GRAPH_REL:()=>ic,MEMORY_MANIFEST_REL:()=>Qp,MEMORY_SESSION_CLASS:()=>cc,MULTI_VALUED_PREDICATES:()=>am,OPERATOR_SOURCE_ID:()=>ni,RULE_CLASS:()=>po,RULE_KIND_ACTION_CONSTRAINT:()=>wc,RULE_KIND_ACTION_EFFECT:()=>rr,RULE_KIND_ACTION_PRECOND:()=>ci,RULE_KIND_ACTION_SIGNATURE:()=>bc,RULE_KIND_COMPOSE2:()=>sr,RULE_KIND_FILTER:()=>or,RULE_KIND_PROP:()=>ho,RULE_KIND_RECURSIVE:()=>gc,SAID_IN_SESSION_PROP:()=>lc,SOURCE_CLASS:()=>uo,SOURCE_RELIABILITY_PROP:()=>Vp,STATED_BY_PROP:()=>Fn,SYLLOGISE_STATE_REL:()=>hc,UPDATED_AT_PROP:()=>hs,UTTERANCE_CLASS:()=>ac,appendCanonicalisedFromEdges:()=>f$,appendFact:()=>h$,appendFacts:()=>nr,appendRule:()=>yc,appendUtterance:()=>m$,appendUtterances:()=>sm,closeSqliteMemoryStore:()=>Yp,createInMemoryStore:()=>ri,createSqliteMemoryStore:()=>Kp,emptyMemory:()=>Zo,factIdForTriple:()=>de,findContradictions:()=>cm,findRuleByName:()=>vc,findRulesByName:()=>v$,isMemoryOrSqliteHandle:()=>mc,loadMemory:()=>Jt,loadSyllogiseState:()=>e$,normFactPredicate:()=>Nn,normFactTerm:()=>Z,openConfiguredMemoryBackend:()=>fo,openMemoryBackend:()=>Xp,provSourceClassFor:()=>r$,provenanceTagToSource:()=>vr,readFactRows:()=>Qt,readRuleRows:()=>$c,removeFacts:()=>$$,resolveMemoryGraphFile:()=>Xo,resolveRelationChase:()=>xc,resolveRelationChaseReverse:()=>rm,saveSyllogiseState:()=>t$,snapshotMemory:()=>Jv});function Zo(){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:Pv.map(e=>({...e})),classes:[],objectProperties:[],individuals:[],proseIndex:{}}}function Xo(e,t=null){if(mo(e)||_s(e))throw new Error("resolveMemoryGraphFile: dir is a memory/sqlite handle, not a file path (Backend A only)");return t===null?X(e,ic):X(e,Qo,`graph.v${t}.json`)}function mo(e){return!!e&&typeof e=="object"&&e.backend===pc}function _s(e){return!!e&&typeof e=="object"&&e.backend===Hp}function mc(e){return mo(e)||_s(e)}function ri(){return{backend:pc,payload:Zo()}}function Dv(){if(qp)return;qp=!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 Kp(e){Dv();let{DatabaseSync:t}=await Promise.resolve().then(()=>(Op(),Ip)),n=new t(e);return n.exec("PRAGMA journal_mode = WAL"),n.exec("PRAGMA synchronous = NORMAL"),n.exec(Fv),{backend:Hp,db:n,dbPath:e}}function Yp(e){_s(e)&&e.db.close()}async function Xp(e,t){if(t===pc)return{dir:ri(),close:async()=>{}};let n=X(e,".tmct","memory","graph.sqlite"),s=r=>fl(r).then(()=>!0,()=>!1);!await s(n)&&await s(X(e,ic))&&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)
90
- `),await Bn(ke(n),{recursive:!0});let o=await Kp(n);return{dir:o,close:async()=>Yp(o)}}async function fo(e,t=process.env){let n=String(t?.TMCT_MEMORY_BACKEND||"").trim().toLowerCase();if(!n)try{let{loadTomlConfig:s}=await Promise.resolve().then(()=>(ti(),Gp));n=String((await s(e))?.memory?.backend||"").trim().toLowerCase()}catch{n=""}return Xp(e,n)}function Bv(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=Uv(e),e.cachedDataVersion=t),Pn(e.cachedPayload)}function Uv(e){let t=e.db,n=Zo(),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 Gv(e,t){let n=Pn(t),s=e.individuals.findIndex(o=>o?.id===t.id);s>=0?e.individuals[s]=n:e.individuals.push(n)}function Wv(e,t){e.individuals=e.individuals.filter(n=>t.has(n?.id))}function qv(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 Vv(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,Pn(Object.fromEntries(n.map(r=>[r,t[r]])))),e.examples.push(o)}function Hv(e,t){e.examples=e.examples.filter(n=>t.has(`${n.subject}\0${n.object}`))}function Kv(e,t){e.objectProperties=e.objectProperties.filter(n=>t.has(n?.prop))}function Yv(e,t){let n=e.db,s=Zo(),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=Pn(t.generated_at??s.generated_at),o.memory=Pn(t.memory??s.memory),o.prefixes=Pn(t.prefixes??s.prefixes),o.vocabulary=Pn(t.vocabulary??s.vocabulary),o.classes=Pn(t.classes??s.classes),o.proseIndex=Pn(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 k of t.individuals||[]){u.add(k.id);let E=JSON.stringify(k),$=i.get(k.id);if($&&$.json===E)continue;let v=$?$.ord:l++;c.run(k.id,v,k.class??null,k.label??null,E),o&&Gv(o,k)}let d=n.prepare("DELETE FROM individuals WHERE id = ?");for(let k of n.prepare("SELECT id FROM individuals").all())u.has(k.id)||d.run(k.id);o&&Wv(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,b=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 = ?"),g=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 k of t.objectProperties||[]){w.add(k.prop);let E=h.all(k.prop),$=new Map(E.map(S=>[`${S.subject}\0${S.object}`,S])),v=new Set,A=o?qv(o,k.prop):null;for(let S of k.examples||[]){let R=`${S.subject}\0${S.object}`;v.add(R);let N=Object.keys(S).filter(P=>!zv.has(P)),j=N.length?JSON.stringify(Object.fromEntries(N.map(P=>[P,S[P]]))):null,_=$.get(R);_&&(_.subject_label??null)===(S.subjectLabel??null)&&(_.object_label??null)===(S.objectLabel??null)&&(_.extra??null)===(j??null)||(g.run(k.prop,S.subject,S.object,S.subjectLabel??null,S.objectLabel??null,j),A&&Vv(A,S,N))}for(let S of $.keys()){if(v.has(S))continue;let[R,N]=S.split("\0");y.run(k.prop,R,N)}A&&Hv(A,v);let T=Number.isFinite(k.count)?k.count:(k.examples||[]).length,C=m.get(k.prop)?.ord??f++;b.run(k.prop,C,k.predicate??null,T),A&&(A.predicate=k.predicate??null,A.count=T)}for(let k of n.prepare("SELECT prop FROM relations").all())w.has(k.prop)||(n.prepare("DELETE FROM edges WHERE prop = ?").run(k.prop),n.prepare("DELETE FROM relations WHERE prop = ?").run(k.prop));o&&Kv(o,w),n.exec("COMMIT")}catch(r){throw n.exec("ROLLBACK"),e.cachedPayload=void 0,r}}async function Jp(e,t){let n=`${e}.tmp-${process.pid}-${Math.random().toString(36).slice(2,10)}`;await fr(n,t),await hr(n,e)}async function fc(e,t){await Jp(e,JSON.stringify(t))}async function Jv(e,{retentionVersions:t}={}){if(mc(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=Xo(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=Xv(e),r;try{r=JSON.parse(await ze(o,"utf8"))}catch(u){if(u?.code!=="ENOENT")throw u;r={version:0,retentionVersions:t??oc}}Number.isInteger(r.version)||(r.version=0),Number.isInteger(r.retentionVersions)||(r.retentionVersions=t??oc);let i=r.version,a=Xo(e,i);await Bn(ke(a),{recursive:!0}),await Jp(a,s),r.version=i+1;let l=null,c=i-r.retentionVersions;if(c>=0)try{await hl(Xo(e,c)),l=c}catch(u){if(u?.code!=="ENOENT")throw u}return await fc(o,r),{skipped:!1,version:i,prunedVersion:l}}async function Jt(e){if(mo(e))return tc(e.payload);if(_s(e))return tc(Bv(e));let t;try{t=await ze(sc(e),"utf8")}catch(n){if(n?.code==="ENOENT")return Zo();throw n}return tc(JSON.parse(t))}function tc(e){if(!Array.isArray(e?.individuals))return e;let t=new Map;for(let s of e.individuals){if(s?.class!==ts||!Qv.test(s.id||""))continue;let o=i=>(s.attributes||[]).find(a=>a?.key===i)?.value||"",r=qo(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 Zv(e,t){if(mo(e)){e.payload=t;return}if(_s(e)){Yv(e,t);return}await Bn(ke(sc(e)),{recursive:!0}),await fc(sc(e),t)}async function e$(e){if(mo(e))return e.syllogiseState?structuredClone(e.syllogiseState):null;if(_s(e)){let t=e.db.prepare("SELECT v FROM meta WHERE k = ?").get(Zp);return t?.v?JSON.parse(t.v):null}try{return JSON.parse(await ze(X(e,hc),"utf8"))}catch(t){if(t?.code==="ENOENT")return null;throw t}}async function t$(e,t){if(mo(e)){e.syllogiseState=structuredClone(t);return}if(_s(e)){e.db.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)").run(Zp,JSON.stringify(t));return}let n=X(e,hc);await Bn(ke(n),{recursive:!0}),await fc(n,t)}function n$(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===uo&&n.set(r.id,r));let o=(e.objectProperties||[]).find(r=>r?.prop===Fn);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[rc]={individualsById:t,sourcesById:n,statedByBySubject:s},e[rc]}async function As(e,t){let n=await Jt(e);n$(n);let s=await t(n)??n;return l$(s),d$(s),s.proseIndex=Cl(s.individuals),await Zv(e,s),s}function er(e,t){return e?.attributes?.find(n=>n?.prop===It)?.value||t||si()}function Jo(e,t,n,s){e.attributes=(e.attributes||[]).filter(o=>o?.prop!==t),e.attributes.push({prop:t,key:n,value:s})}function s$(e){switch(e?.kind){case"operator":return{id:e.sessionId?`${ni}:${e.sessionId}`:ni,type:"operator"};case"teach":return{id:e.sessionId?`${nc}:${e.sessionId}`:nc,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"extracted":return{id:`src:extracted:${e.name}`,type:"extracted"};case"web":return{id:`src:learned:web:${Wo(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 r$(e){return o$[e]||null}function i$(e,t,n){let s=s$(t);if(!s)return null;let o=Rs(e),r=o?o.individualsById.get(s.id):e.individuals.find(c=>c?.id===s.id),i=er(r,t?.createdAt||n),a={id:s.id,label:em(s.id),class:uo,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:sourceType",key:"sourceType",value:s.type},{prop:It,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=tr(e,a);return o&&o.sourcesById.set(s.id,l),s.id}function a$(e){let t=Rs(e),n={};if(t){for(let[s,o]of t.sourcesById)n[s]=o;return n}for(let s of e.individuals)s?.class===uo&&(n[s.id]=s);return n}function c$(e,t){let n=Rs(e);return n?(n.statedByBySubject.get(t)||[]).slice():(e.objectProperties.find(o=>o?.prop===Fn)?.examples||[]).filter(o=>o?.subject===t).map(o=>o.object)}function tm(e,t,n=Date.now(),s={}){let o=c$(e,t.id),r=(t.attributes||[]).find(l=>l?.prop===It)?.value||"",{score:i,inputs:a}=Fl({sourceIds:o,createdAt:r},a$(e),{now:n,...Array.isArray(s?.premiseTrusts)?{premiseTrusts:s.premiseTrusts}:{},...typeof s?.ruleConfidence=="number"?{ruleConfidence:s.ruleConfidence}:{}});Jo(t,yr,"trustScore",String(i)),Jo(t,Ni,"trustInputs",JSON.stringify(a)),Jo(t,hs,"updatedAt",new Date(n).toISOString())}function ai(e,t,n=Date.now(),s={}){let o=(t.attributes||[]).find(i=>i?.prop==="mgx:factProvenance")?.value||"",r=(t.attributes||[]).find(i=>i?.prop===It)?.value||new Date(n).toISOString();for(let i of o.split(" | ").filter(Boolean)){let a=vr(i);if(!a)continue;let l=i$(e,a,r);l&&oi(e,{predicate:"statedBy",prop:Fn},{subject:t.id,object:l,subjectLabel:t.label,objectLabel:em(l)})}tm(e,t,n,s)}function l$(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=e.objectProperties.find(r=>r?.prop===Fn),n=new Set((t?.examples||[]).map(r=>r.subject)),s=!1,o=Date.now();for(let r of e.individuals)r?.class!==ts||n.has(r.id)||!(r.attributes||[]).find(a=>a?.prop==="mgx:factProvenance")?.value||(ai(e,r,o),s=!0);s&&Ts(e)}function d$(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=Qt(e),n=new Set;for(let a of cm(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(!u$(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=Rs(e);for(let[a,l]of s){let c=o?o.individualsById.get(a):e.individuals.find(u=>u?.id===a);c&&(Jo(c,Vp,"sourceReliability",String(zl(l))),Jo(c,hs,"updatedAt",new Date().toISOString()))}let r=e.objectProperties.find(a=>a?.prop===Fn),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&&tm(e,l)}}function tr(e,t){let n=Rs(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 oi(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===Fn?Rs(e):null;if(r){let l=r.statedByBySubject.get(s.subject);if(!l||!l.includes(s.object)){o.examples.push({...s,createdAt:s.createdAt||si()}),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||si();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 Ts(e){let t=[cc,ac,ts,uo,po];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 p$(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:cc,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:It,key:"createdAt",value:n||si()},...n?[{prop:"mgx:sessionStarted",key:"started",value:n}]:[]]}),s}function nm(e,{role:t,text:n,ts:s,sessionId:o,sessionStarted:r="",parsed:i=null,replyTo:a=null,createdAt:l=""}){if(!Mv.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=Ln(n),d=`utt:${o}#${c}#${t}`,m=ii(u)||(t==="visitor"?"a-visitor-said":"a-tmct-said"),p=wr({doc:u}),f=e.individuals.find(y=>y?.id===d),b=er(f,l||c),h={id:d,label:m,class:ac,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:It,key:"createdAt",value:b},...i!=null?[{prop:"mgx:utteranceParsed",key:"parsed",value:JSON.stringify(i)}]:[],...p.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:p.join(" ")}]:[]]};tr(e,h);let g=p$(e,o,r);if(oi(e,{predicate:"saidInSession",prop:lc},{subject:d,object:g,subjectLabel:m,objectLabel:String(o).slice(0,8)}),a){let y=e.individuals.find(w=>w?.id===a);y&&oi(e,{predicate:"inReplyTo",prop:uc},{subject:d,object:a,subjectLabel:m,objectLabel:y.label})}return c&&c>String(e.generated_at||"")&&(e.generated_at=c),d}async function m$(e,t){let n;return await As(e,s=>{n=nm(s,t),Ts(s)}),{id:n}}async function sm(e,t){let n=[];return t?.length?(await As(e,s=>{for(let o of t)n.push(nm(s,o));Ts(s)}),{ids:n}):{ids:n}}async function f$(e,t){t?.length&&await As(e,n=>{for(let s of t)oi(n,{predicate:"canonicalisedFrom",prop:dc},{subject:s.factId,object:s.uttId,subjectLabel:s.factLabel,objectLabel:s.uttLabel})})}async function h$(e,{subject:t,predicate:n,object:s,provenance:o="",createdAt:r="",quantifier:i="",premiseTrusts:a,ruleConfidence:l}={}){let c=Z(t),u=Nn(n),d=Z(s);if(!c||!u||!d)throw new Error("a fact needs subject, predicate and object");let m=qo(c,u,d),p=`${c} ${u} ${d}`,f=wr({doc:p}),b=Ln(i);return await As(e,async h=>{let g=h.individuals.find(A=>A?.id===m),y=g?.attributes?.find(A=>A?.prop==="mgx:factProvenance")?.value||"",w=[...new Set([...y.split(" | "),Ln(o)].filter(Boolean))],k=er(g,r),E=g?.attributes?.find(A=>A?.prop==="mgx:factQuantifier")?.value||"",$=b||E,v={id:m,label:ii(p),class:ts,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:It,key:"createdAt",value:k},...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 Ya(v),tr(h,v),ai(h,h.individuals.find(A=>A?.id===m),void 0,{premiseTrusts:a,ruleConfidence:l}),Ts(h)}),{id:m}}function g$(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 nr(e,t){let n=[],s=0;for(let r of t||[]){let i=Z(r?.subject),a=Nn(r?.predicate),l=Z(r?.object);if(!i||!a||!l){s+=1;continue}let c=`${i} ${a} ${l}`;n.push({id:qo(i,a,l),s:i,p:a,o:l,text:c,tokens:wr({doc:c}),provenance:Ln(r?.provenance),createdAt:r?.createdAt||"",quantifier:Ln(r?.quantifier),premiseTrusts:Array.isArray(r?.premiseTrusts)?r.premiseTrusts:void 0,ruleConfidence:typeof r?.ruleConfidence=="number"?r.ruleConfidence:void 0,environments:g$(r?.justification)})}let o=[];return n.length?(await As(e,r=>{let i=Rs(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(k=>k?.prop==="mgx:factProvenance")?.value||"",f=[...new Set([...p.split(" | "),d.provenance].filter(Boolean))],b=er(m,d.createdAt),h=m?.attributes?.find(k=>k?.prop==="mgx:factQuantifier")?.value||"",g=d.quantifier||h,y={id:d.id,label:ii(d.text),class:ts,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:It,key:"createdAt",value:b},...f.length?[{prop:"mgx:factProvenance",key:"provenance",value:f.join(" | ")}]:[],...d.tokens.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:d.tokens.join(" ")}]:[],...g?[{prop:"mgx:factQuantifier",key:"quantifier",value:g}]:[],...d.environments?[{prop:"mgx:factJustification",key:"justification",value:d.environments.map(k=>k.join(" ")).join(" | ")}]:[]]},w=tr(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)ai(r,a.get(d),void 0,u.get(d));Ts(r)}),{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:r=""}={}){let i=om[n];if(!i)throw new Error(`a rule kind must be one of ${b$.join(", ")}, got ${JSON.stringify(n)}`);let a=Z(t);if(!a)throw new Error("a rule needs a name");let l=w$[n]||new Set,c=i.map(([p])=>Z(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===rr){let p=c[i.findIndex(([b])=>b==="objectRole")],f=c[i.findIndex(([b])=>b==="value")];if(!p&&!f)throw new Error(`a ${n} rule needs an objectRole or a value`)}let d=y$(n,a,c),m=ii(`${a} = ${n}(${c.join(", ")})`);return await As(e,async p=>{let f=p.individuals.find(w=>w?.id===d),b=f?.attributes?.find(w=>w?.prop==="mgx:factProvenance")?.value||"",h=[...new Set([...b.split(" | "),Ln(o)].filter(Boolean))],g=er(f,r),y={id:d,label:m,class:po,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:li,key:"ruleName",value:a},{prop:ho,key:"ruleKind",value:n},...i.map(([w,k],E)=>({prop:k,key:w,value:c[E],skip:!c[E]&&l.has(w)})).filter(w=>!w.skip).map(({skip:w,...k})=>k),{prop:It,key:"createdAt",value:g},...h.length?[{prop:"mgx:factProvenance",key:"provenance",value:h.join(" | ")}]:[]]};await Ya(y),tr(p,y),ai(p,p.individuals.find(w=>w?.id===d)),Ts(p)}),{id:d}}function vc(e,t){let n=Z(t);return(e?.individuals||[]).find(s=>s?.class===po&&(s.attributes||[]).find(o=>o?.prop===li)?.value===n)}function v$(e,t){let n=Z(t),s=o=>(o.attributes||[]).find(r=>r?.prop===ho)?.value||"";return(e?.individuals||[]).filter(o=>o?.class===po&&(o.attributes||[]).find(r=>r?.prop===li)?.value===n).sort((o,r)=>s(o).localeCompare(s(r))||String(o.id).localeCompare(String(r.id)))}function $c(e){let t=[];for(let n of e?.individuals||[]){if(n?.class!==po)continue;let s=a=>(n.attributes||[]).find(l=>l?.prop===a)?.value,o=s(ho),r=om[o];if(!r)continue;let i={};for(let[a,l]of r)i[a]=s(l)??"";t.push({id:n.id,name:s(li)||"",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 xc(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(Z,n),b=l(Z,s),h=r(p).filter(w=>f.has(w.fact.subject)&&b.has(w.fact.object));if(h.length){let w=h.slice().sort((k,E)=>c(k.fact,E.fact))[0];return{citation:[i(w.fact),...w.aliasFacts.map(k=>`${a(k)}${k.provenance?` (source: ${k.provenance})`:""}`)]}}let g=vc(e,p),y=g?.attributes?.find(w=>w.prop===ho)?.value;if(g&&y===sr){let w=g.attributes.find(N=>N.prop==="mgx:ruleBase1")?.value,k=g.attributes.find(N=>N.prop==="mgx:ruleBase2")?.value,E=Z(n),$=Z(s);if(!w||!k||!E||!$)return null;let C=m({entity:E,hopsTaken:0},N=>N.hopsTaken===2&&N.entity===$,N=>{if(N.hopsTaken>=2)return[];let j=N.hopsTaken===0?w:k;return r(j).filter(_=>_.fact.subject===N.entity).map(_=>({action:_,nextState:{entity:_.fact.object,hopsTaken:N.hopsTaken+1}}))},{maxDepth:2,stateKey:N=>`${N.entity}#${N.hopsTaken}`});if(!C)return null;let S=new Set,R=[];for(let N of C.actions){R.push(i(N.fact));for(let j of N.aliasFacts){let _=j.id||`${j.subject}|${j.predicate}|${j.object}`;S.has(_)||(S.add(_),R.push(`${a(j)}${j.provenance?` (source: ${j.provenance})`:""}`))}}return{citation:R}}if(g&&y===or){let w=g.attributes.find(T=>T.prop==="mgx:ruleBase1")?.value,k=g.attributes.find(T=>T.prop==="mgx:ruleFilterProperty")?.value;if(!w||!k)return null;let E=await xc(e,w,n,s,o);if(!E)return null;let $=Z(n),v=Z(k),A=u.find(T=>T.predicate===d&&T.subject===$&&Z(T.object)===v);return A?{citation:[...E.citation,i(A)]}:null}return null}async function rm(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(Z,n),f=o(m).filter(g=>p.has(g.fact.object));if(f.length){let g=new Map;for(let y of f)g.has(y.fact.subject)||g.set(y.fact.subject,[]),g.get(y.fact.subject).push(y);return[...g.entries()].map(([y,w])=>{let k=w.slice().sort((E,$)=>l(E.fact,$.fact))[0];return{subject:y,citation:[r(k.fact),...k.aliasFacts.map(E=>`${i(E)}${E.provenance?` (source: ${E.provenance})`:""}`)]}})}let b=vc(e,m),h=b?.attributes?.find(g=>g.prop===ho)?.value;if(b&&h===sr){let g=b.attributes.find(v=>v.prop==="mgx:ruleBase1")?.value,y=b.attributes.find(v=>v.prop==="mgx:ruleBase2")?.value,w=Z(n);return!g||!y||!w?[]:d({entity:w,hopsTaken:0},v=>{if(v.hopsTaken>=2)return[];let A=v.hopsTaken===0?y:g;return o(A).filter(T=>T.fact.object===v.entity).map(T=>({action:T,nextState:{entity:T.fact.subject,hopsTaken:v.hopsTaken+1}}))},{maxDepth:2,stateKey:v=>`${v.entity}#${v.hopsTaken}`}).filter(v=>v.node.hopsTaken===2).map(({node:v,path:A})=>{let T=new Set,C=[];for(let S of A.actions.slice().reverse()){C.push(r(S.fact));for(let R of S.aliasFacts){let N=R.id||`${R.subject}|${R.predicate}|${R.object}`;T.has(N)||(T.add(N),C.push(`${i(R)}${R.provenance?` (source: ${R.provenance})`:""}`))}}return{subject:v.entity,citation:C}})}if(b&&h===or){let g=b.attributes.find($=>$.prop==="mgx:ruleBase1")?.value,y=b.attributes.find($=>$.prop==="mgx:ruleFilterProperty")?.value;if(!g||!y)return[];let w=await rm(e,g,n,s),k=Z(y),E=[];for(let $ of w){let v=Z($.subject),A=c.find(T=>T.predicate===u&&T.subject===v&&Z(T.object)===k);A&&E.push({subject:$.subject,citation:[...$.citation,r(A)]})}return E}return[]}function Qt(e){let t=e?.individuals||[],n=new Map(t.filter(i=>i?.class===uo).map(i=>[i.id,i])),s=(e?.objectProperties||[]).find(i=>i?.prop===Fn),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!==ts)continue;let a=f=>(i.attributes||[]).find(b=>b?.key===f)?.value||"",l=o.get(i.id)||[],c=l.map(f=>(n.get(f)?.attributes||[]).find(b=>b?.prop==="mgx:sourceType")?.value).filter(Boolean),u=a("justification"),d=[];if(u)for(let f of u.split(" | ")){let b=f.split(" ").filter(Boolean);b.length&&d.push(b)}let m=[],p=new Set;for(let f of d)for(let b of f)p.has(b)||(p.add(b),m.push(b));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===yr)?.value)||0,environments:d,justification:m})}return r}async function $$(e,t){let n=new Set((t||[]).filter(Boolean)),s=[];return n.size?(await As(e,o=>{if(o.individuals=(o.individuals||[]).filter(i=>i?.class===ts&&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}Ts(o)}),{removed:s}):{removed:s}}function cm(e,{floor:t=x$}={}){let n=Qt(e).filter(r=>r.trust>=t),s=new Map;for(let r of n){if(am.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 Qo,ic,ac,ts,cc,uo,po,lc,uc,Nv,Fn,dc,Vp,ni,nc,Mv,Wp,Pv,sc,pc,Hp,Fv,zv,qp,Pn,Qp,oc,Xv,Qv,hc,Zp,rc,Rs,ii,si,em,o$,u$,sr,or,gc,bc,ci,rr,wc,b$,li,ho,om,w$,y$,x$,Cs,im,am,Ye=K(()=>{St();Be();Gn();gn();gn();To();To();Ka();Cp();Qo=X(".tmct","memory"),ic=X(Qo,"graph.json"),ac="Utterance",ts="Fact",cc="Session",uo="Source",po="Rule",lc="mgx:saidInSession",uc="mgx:inReplyTo",Nv="mgx:derivedFrom",Fn="mgx:statedBy",dc="mgx:canonicalisedFrom",Vp="mgx:sourceReliability",ni="src:operator-chat",nc="src:teach-chat",Mv=new Set(["visitor","tmct"]),Wp=48,Pv=[{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:lc,predicate:"saidInSession",note:"Utterance \u2192 Session it was said in; runtime observation, owned (no SEON term)"},{prop:uc,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:It,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:hs,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:Nv,predicate:"derivedFrom",note:"umbrella: a Fact derived from a Source (or another Fact). ext ref prov:wasDerivedFrom (UNVERIFIED-pending-web-check)"},{prop:Fn,predicate:"statedBy",note:"subPropertyOf derivedFrom: a Source directly asserts this Fact (one edge per independent source \u2014 replaces the factProvenance union)"},{prop:dc,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 | extracted | 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:yr,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:Ni,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:so,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)"}];sc=e=>Xo(e),pc="memory",Hp="sqlite";Fv=`
85
+ `))return r}}throw new le("cannot find end of structure",{toml:e,ptr:t})}var Xr=K(()=>{js();});function Ov(e,t,n){let s=e.slice(t,n),o=s.indexOf("#");return o>-1&&(lo(e,o),s=s.slice(0,o)),[s.trimEnd(),o]}function Xo(e,t,n,s,o){if(s===0)throw new le("document contains excessively nested structures. aborting.",{toml:e,ptr:t});let r=e[t];if(r==="["||r==="{"){let[l,c]=r==="["?Fp(e,t,s,o):Pp(e,t,s,o);if(n){if(c=vn(e,c),e[c]===",")c++;else if(e[c]!==n)throw new le("expected comma or end of structure",{toml:e,ptr:c})}return[l,c]}if(r==='"'||r==="'"){let[l,c]=Kr(e,t);if(n){if(c=vn(e,c),e[c]&&e[c]!==","&&e[c]!==n&&e[c]!==`
86
+ `&&e[c]!=="\r")throw new le("unexpected character encountered",{toml:e,ptr:c});e[c]===","&&c++}return[l,c]}let i=Mp(e,t,",",n),a=Ov(e,t,i-(e[i-1]===","?1:0));if(!a[0])throw new le("incomplete key-value declaration: no value specified",{toml:e,ptr:t});return n&&a[1]>-1&&(i=vn(e,t+a[1]),e[i]===","&&i++),[Np(a[0],e,t,o),i]}var Qa=K(()=>{Ja();Za();Xr();js();});function Jr(e,t,n="="){let s=t-1,o=[],r=e.indexOf(n,t);if(r<0)throw new le("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 le("multiline strings are not allowed in keys",{toml:e,ptr:t});let[a,l]=Kr(e,t);s=e.indexOf(".",l);let c=e.slice(l,s<0||s>r?r:s),u=Yr(c);if(u>-1)throw new le("newlines are not allowed in keys",{toml:e,ptr:t+s+u});if(c.trimStart())throw new le("found extra tokens after the string part",{toml:e,ptr:l});if(r<l&&(r=e.indexOf(n,l),r<0))throw new le("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(!Lv.test(a))throw new le("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,vn(e,r+1,!0,!0)]}function Pp(e,t,n,s){let o={},r=new Set,i;for(t++;(i=e[t++])!=="}"&&i;){if(i===",")throw new le("expected value, found comma",{toml:e,ptr:t-1});if(i==="#")t=lo(e,t);else if(i!==" "&&i!==" "&&i!==`
87
+ `&&i!=="\r"){let a,l=o,c=!1,[u,d]=Jr(e,t-1);for(let m=0;m<u.length;m++){if(m&&(l=c?l[a]:l[a]={}),a=u[m],(c=Object.hasOwn(l,a))&&(typeof l[a]!="object"||r.has(l[a])))throw new le("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 le("trying to redefine an already defined value",{toml:e,ptr:t});let[f,p]=Xo(e,d,"}",n-1,s);r.add(f),l[a]=f,t=p}}if(!i)throw new le("unfinished table encountered",{toml:e,ptr:t});return[o,t]}function Fp(e,t,n,s){let o=[],r;for(t++;(r=e[t++])!=="]"&&r;){if(r===",")throw new le("expected value, found comma",{toml:e,ptr:t-1});if(r==="#")t=lo(e,t);else if(r!==" "&&r!==" "&&r!==`
88
+ `&&r!=="\r"){let i=Xo(e,t-1,"]",n-1,s);o.push(i[0]),t=i[1]}}if(!r)throw new le("unfinished array encountered",{toml:e,ptr:t});return[o,t]}var Lv,Za=K(()=>{Ja();Qa();Xr();js();Lv=/^[a-zA-Z0-9-_]+[ \t]*$/});function Dp(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 uo(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let s={},o={},r=s,i=o;for(let a=vn(e,0);a<e.length;){if(e[a]==="["){let l=e[++a]==="[",c=Jr(e,a+=+l,"]");if(l){if(e[c[1]-1]!=="]")throw new le("expected end of table declaration",{toml:e,ptr:c[1]-1});c[1]++}let u=Dp(c[0],s,o,l?2:1);if(!u)throw new le("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=Jr(e,a),c=Dp(l[0],r,i,0);if(!c)throw new le("trying to redefine an already defined table or value",{toml:e,ptr:a});let u=Xo(e,l[1],void 0,t,n);c[1][c[0]]=u[0],a=u[1]}if(a=vn(e,a,!0),e[a]&&e[a]!==`
89
+ `&&e[a]!=="\r")throw new le("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:a});a=vn(e,a)}return s}var zp=K(()=>{Za();Qa();Xr();js();});var Bp=K(()=>{});var Qr=K(()=>{zp();Bp();Xa();js();});var Gp={};zn(Gp,{CONFIG_FILE:()=>ei,loadTomlConfig:()=>ec,mergeEffective:()=>Wp,normalizeConfig:()=>Up});async function ec(e,{file:t}={}){let n=t||J(e,ei),s;try{s=await De(n,"utf8")}catch(o){if(o&&o.code==="ENOENT")return null;throw o}try{return uo(s)}catch(o){throw new Error(`Invalid ${ei} at ${n}: ${o&&o.message?o.message:o}`)}}async function Nv(e,t){let n;if(Array.isArray(e))n=e;else{let o=zt(t,String(e));n=(await De(o,"utf8")).split(`
90
+ `)}let s=[];for(let o of n){let r=String(o).trim();!r||r.startsWith("#")||s.push(zt(t,r))}return s}async function Up(e,{configDir:t}={}){let n=e||{},s=t||process.cwd(),o={};if(n.repositories!==void 0&&(o.repositories=await Nv(n.repositories,s)),n.out_root!==void 0&&(o.outRoot=zt(s,String(n.out_root))),n.graph_file!==void 0&&(o.graphFile=zt(s,String(n.graph_file))),n.graph_files!==void 0){let y=Array.isArray(n.graph_files)?n.graph_files:[n.graph_files];o.graphFiles=y.map(w=>zt(s,String(w)))}let r=n.corpus||{};r.tier!==void 0&&(o.corpus={tier:r.tier});let i=n.seed||{},a={};i.enabled!==void 0&&(a.enabled=i.enabled),i.limit!==void 0&&(a.limit=i.limit),Object.keys(a).length&&(o.seed=a),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);let l=n.index||{},c={};l.languages!==void 0&&(c.languages=l.languages),l.exclude!==void 0&&(c.exclude=l.exclude),l.secret_exclude!==void 0&&(c.secretExclude=l.secret_exclude),l.history_depth!==void 0&&(c.historyDepth=l.history_depth),l.include_text!==void 0&&(c.includeText=l.include_text),l.include_structure!==void 0&&(c.includeStructure=l.include_structure),l.respect_gitignore!==void 0&&(c.respectGitignore=l.respect_gitignore),l.markdown_sections!==void 0&&(c.markdownSections=l.markdown_sections),l.vue!==void 0&&(c.vue=l.vue),Object.keys(c).length&&(o.index=c);let u=n.tune||{},d={};u.score_gap_k!==void 0&&(d.scoreGapK=u.score_gap_k),u.literal_mention!==void 0&&(d.literalMention=u.literal_mention),u.demote_non_prod!==void 0&&(d.demoteNonProd=u.demote_non_prod),u.call_adjacency!==void 0&&(d.callAdjacency=u.call_adjacency),u.impl_of_interface!==void 0&&(d.implOfInterface=u.impl_of_interface),u.beam_search!==void 0&&(d.beamSearch=u.beam_search),u.beam_width!==void 0&&(d.beamWidth=u.beam_width),u.prose_layers!==void 0&&(d.proseLayers=u.prose_layers);let f=u.expansion||{},p={};f.strategy!==void 0&&(p.strategy=f.strategy),f.nodes!==void 0&&(p.nodes=f.nodes),f.q!==void 0&&(p.q=f.q),f.depth!==void 0&&(p.depth=f.depth),Object.keys(p).length&&(d.expansion=p),Object.keys(d).length&&(o.tune=d);let m=n.telemetry||{};m.enabled!==void 0&&(o.telemetry={enabled:m.enabled});let b=n.memory||{},h={};b.retention_versions!==void 0&&(h.retentionVersions=b.retention_versions),b.backend!==void 0&&(h.backend=b.backend),Object.keys(h).length&&(o.memory=h);let g=[];for(let[y,w]of Mv)n[y]&&n[y][w]!==void 0&&g.push(`${y}.${w}`);return o.unwired=g,o}function Zr(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:Zr(o,r,n)}return n}function Wp({args:e={},toml:t=null,defaults:n={}}={}){let s=Zr(n),o=null;if(t){let{unwired:u,...d}=t;o=d}let r=o?Zr(o):{},i=Zr(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 ei,Mv,ti=K(()=>{Et();Be();Qr();ei="tmct.toml";Mv=[["index","include_text"],["index","include_structure"],["index","respect_gitignore"],["index","markdown_sections"],["index","vue"]]});var ns={};zn(ns,{CANONICALISED_FROM_PROP:()=>dc,CAPABLE_OF_PREDICATE:()=>am,CREATED_AT_PROP:()=>It,DEFAULT_RETENTION:()=>oc,FACT_CLASS:()=>ts,HAS_A_PREDICATE:()=>Cs,IN_REPLY_TO_PROP:()=>uc,MEMORY_DIR_REL:()=>Zo,MEMORY_GRAPH_REL:()=>ic,MEMORY_MANIFEST_REL:()=>Zp,MEMORY_SESSION_CLASS:()=>cc,MULTI_VALUED_PREDICATES:()=>cm,OPERATOR_SOURCE_ID:()=>ni,RULE_CLASS:()=>mo,RULE_KIND_ACTION_CONSTRAINT:()=>wc,RULE_KIND_ACTION_EFFECT:()=>ir,RULE_KIND_ACTION_PRECOND:()=>ci,RULE_KIND_ACTION_SIGNATURE:()=>bc,RULE_KIND_COMPOSE2:()=>or,RULE_KIND_FILTER:()=>rr,RULE_KIND_PROP:()=>go,RULE_KIND_RECURSIVE:()=>gc,SAID_IN_SESSION_PROP:()=>lc,SOURCE_CLASS:()=>po,SOURCE_RELIABILITY_PROP:()=>Hp,STATED_BY_PROP:()=>Fn,SYLLOGISE_STATE_REL:()=>hc,UPDATED_AT_PROP:()=>hs,UTTERANCE_CLASS:()=>ac,appendCanonicalisedFromEdges:()=>g$,appendFact:()=>b$,appendFacts:()=>sr,appendRule:()=>yc,appendUtterance:()=>h$,appendUtterances:()=>om,closeSqliteMemoryStore:()=>Xp,createInMemoryStore:()=>ri,createSqliteMemoryStore:()=>Yp,emptyMemory:()=>er,factIdForTriple:()=>de,findContradictions:()=>lm,findRuleByName:()=>vc,findRulesByName:()=>x$,isMemoryOrSqliteHandle:()=>mc,loadMemory:()=>Jt,loadSyllogiseState:()=>n$,normFactPredicate:()=>Nn,normFactTerm:()=>Z,openConfiguredMemoryBackend:()=>ho,openMemoryBackend:()=>Jp,provSourceClassFor:()=>a$,provenanceTagToSource:()=>Co,readFactRows:()=>Qt,readRuleRows:()=>$c,removeFacts:()=>k$,resolveMemoryGraphFile:()=>Jo,resolveRelationChase:()=>xc,resolveRelationChaseReverse:()=>im,saveSyllogiseState:()=>s$,snapshotMemory:()=>Zv});function er(){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:Dv.map(e=>({...e})),classes:[],objectProperties:[],individuals:[],proseIndex:{}}}function Jo(e,t=null){if(fo(e)||_s(e))throw new Error("resolveMemoryGraphFile: dir is a memory/sqlite handle, not a file path (Backend A only)");return t===null?J(e,ic):J(e,Zo,`graph.v${t}.json`)}function fo(e){return!!e&&typeof e=="object"&&e.backend===pc}function _s(e){return!!e&&typeof e=="object"&&e.backend===Kp}function mc(e){return fo(e)||_s(e)}function ri(){return{backend:pc,payload:er()}}function Uv(){if(Vp)return;Vp=!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 Yp(e){Uv();let{DatabaseSync:t}=await Promise.resolve().then(()=>(Lp(),Op)),n=new t(e);return n.exec("PRAGMA journal_mode = WAL"),n.exec("PRAGMA synchronous = NORMAL"),n.exec(zv),{backend:Kp,db:n,dbPath:e}}function Xp(e){_s(e)&&e.db.close()}async function Jp(e,t){if(t===pc)return{dir:ri(),close:async()=>{}};let n=J(e,".tmct","memory","graph.sqlite"),s=r=>hl(r).then(()=>!0,()=>!1);!await s(n)&&await s(J(e,ic))&&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)
91
+ `),await Bn(ke(n),{recursive:!0});let o=await Yp(n);return{dir:o,close:async()=>Xp(o)}}async function ho(e,t=process.env){let n=String(t?.TMCT_MEMORY_BACKEND||"").trim().toLowerCase();if(!n)try{let{loadTomlConfig:s}=await Promise.resolve().then(()=>(ti(),Gp));n=String((await s(e))?.memory?.backend||"").trim().toLowerCase()}catch{n=""}return Jp(e,n)}function Wv(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=Gv(e),e.cachedDataVersion=t),Pn(e.cachedPayload)}function Gv(e){let t=e.db,n=er(),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 qv(e,t){let n=Pn(t),s=e.individuals.findIndex(o=>o?.id===t.id);s>=0?e.individuals[s]=n:e.individuals.push(n)}function Vv(e,t){e.individuals=e.individuals.filter(n=>t.has(n?.id))}function Hv(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 Kv(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,Pn(Object.fromEntries(n.map(r=>[r,t[r]])))),e.examples.push(o)}function Yv(e,t){e.examples=e.examples.filter(n=>t.has(`${n.subject}\0${n.object}`))}function Xv(e,t){e.objectProperties=e.objectProperties.filter(n=>t.has(n?.prop))}function Jv(e,t){let n=e.db,s=er(),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=Pn(t.generated_at??s.generated_at),o.memory=Pn(t.memory??s.memory),o.prefixes=Pn(t.prefixes??s.prefixes),o.vocabulary=Pn(t.vocabulary??s.vocabulary),o.classes=Pn(t.classes??s.classes),o.proseIndex=Pn(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 k of t.individuals||[]){u.add(k.id);let S=JSON.stringify(k),$=i.get(k.id);if($&&$.json===S)continue;let v=$?$.ord:l++;c.run(k.id,v,k.class??null,k.label??null,S),o&&qv(o,k)}let d=n.prepare("DELETE FROM individuals WHERE id = ?");for(let k of n.prepare("SELECT id FROM individuals").all())u.has(k.id)||d.run(k.id);o&&Vv(o,u);let f=n.prepare("SELECT ord FROM relations WHERE prop = ?"),m=n.prepare("SELECT COALESCE(MAX(ord), -1) AS m FROM relations").get().m+1,b=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 = ?"),g=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 k of t.objectProperties||[]){w.add(k.prop);let S=h.all(k.prop),$=new Map(S.map(E=>[`${E.subject}\0${E.object}`,E])),v=new Set,A=o?Hv(o,k.prop):null;for(let E of k.examples||[]){let R=`${E.subject}\0${E.object}`;v.add(R);let N=Object.keys(E).filter(P=>!Bv.has(P)),j=N.length?JSON.stringify(Object.fromEntries(N.map(P=>[P,E[P]]))):null,_=$.get(R);_&&(_.subject_label??null)===(E.subjectLabel??null)&&(_.object_label??null)===(E.objectLabel??null)&&(_.extra??null)===(j??null)||(g.run(k.prop,E.subject,E.object,E.subjectLabel??null,E.objectLabel??null,j),A&&Kv(A,E,N))}for(let E of $.keys()){if(v.has(E))continue;let[R,N]=E.split("\0");y.run(k.prop,R,N)}A&&Yv(A,v);let T=Number.isFinite(k.count)?k.count:(k.examples||[]).length,C=f.get(k.prop)?.ord??m++;b.run(k.prop,C,k.predicate??null,T),A&&(A.predicate=k.predicate??null,A.count=T)}for(let k of n.prepare("SELECT prop FROM relations").all())w.has(k.prop)||(n.prepare("DELETE FROM edges WHERE prop = ?").run(k.prop),n.prepare("DELETE FROM relations WHERE prop = ?").run(k.prop));o&&Xv(o,w),n.exec("COMMIT")}catch(r){throw n.exec("ROLLBACK"),e.cachedPayload=void 0,r}}async function Qp(e,t){let n=`${e}.tmp-${process.pid}-${Math.random().toString(36).slice(2,10)}`;await hr(n,t),await gr(n,e)}async function fc(e,t){await Qp(e,JSON.stringify(t))}async function Zv(e,{retentionVersions:t}={}){if(mc(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=Jo(e),s;try{s=await De(n,"utf8")}catch(u){if(u?.code==="ENOENT")return{skipped:!0,version:null,prunedVersion:null};throw u}let o=Qv(e),r;try{r=JSON.parse(await De(o,"utf8"))}catch(u){if(u?.code!=="ENOENT")throw u;r={version:0,retentionVersions:t??oc}}Number.isInteger(r.version)||(r.version=0),Number.isInteger(r.retentionVersions)||(r.retentionVersions=t??oc);let i=r.version,a=Jo(e,i);await Bn(ke(a),{recursive:!0}),await Qp(a,s),r.version=i+1;let l=null,c=i-r.retentionVersions;if(c>=0)try{await gl(Jo(e,c)),l=c}catch(u){if(u?.code!=="ENOENT")throw u}return await fc(o,r),{skipped:!1,version:i,prunedVersion:l}}async function Jt(e){if(fo(e))return tc(e.payload);if(_s(e))return tc(Wv(e));let t;try{t=await De(sc(e),"utf8")}catch(n){if(n?.code==="ENOENT")return er();throw n}return tc(JSON.parse(t))}function tc(e){if(!Array.isArray(e?.individuals))return e;let t=new Map;for(let s of e.individuals){if(s?.class!==ts||!e$.test(s.id||""))continue;let o=i=>(s.attributes||[]).find(a=>a?.key===i)?.value||"",r=Vo(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 t$(e,t){if(fo(e)){e.payload=t;return}if(_s(e)){Jv(e,t);return}await Bn(ke(sc(e)),{recursive:!0}),await fc(sc(e),t)}async function n$(e){if(fo(e))return e.syllogiseState?structuredClone(e.syllogiseState):null;if(_s(e)){let t=e.db.prepare("SELECT v FROM meta WHERE k = ?").get(em);return t?.v?JSON.parse(t.v):null}try{return JSON.parse(await De(J(e,hc),"utf8"))}catch(t){if(t?.code==="ENOENT")return null;throw t}}async function s$(e,t){if(fo(e)){e.syllogiseState=structuredClone(t);return}if(_s(e)){e.db.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)").run(em,JSON.stringify(t));return}let n=J(e,hc);await Bn(ke(n),{recursive:!0}),await fc(n,t)}function o$(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===po&&n.set(r.id,r));let o=(e.objectProperties||[]).find(r=>r?.prop===Fn);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[rc]={individualsById:t,sourcesById:n,statedByBySubject:s},e[rc]}async function As(e,t){let n=await Jt(e);o$(n);let s=await t(n)??n;return d$(s),m$(s),s.proseIndex=Il(s.individuals),await t$(e,s),s}function tr(e,t){return e?.attributes?.find(n=>n?.prop===It)?.value||t||si()}function Qo(e,t,n,s){e.attributes=(e.attributes||[]).filter(o=>o?.prop!==t),e.attributes.push({prop:t,key:n,value:s})}function r$(e){switch(e?.kind){case"operator":return{id:e.sessionId?`${ni}:${e.sessionId}`:ni,type:"operator"};case"teach":return{id:e.sessionId?`${nc}:${e.sessionId}`:nc,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"extracted":return{id:`src:extracted:${e.name}`,type:"extracted"};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 a$(e){return i$[e]||null}function c$(e,t,n){let s=r$(t);if(!s)return null;let o=Rs(e),r=o?o.individualsById.get(s.id):e.individuals.find(c=>c?.id===s.id),i=tr(r,t?.createdAt||n),a={id:s.id,label:tm(s.id),class:po,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:sourceType",key:"sourceType",value:s.type},{prop:It,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=nr(e,a);return o&&o.sourcesById.set(s.id,l),s.id}function l$(e){let t=Rs(e),n={};if(t){for(let[s,o]of t.sourcesById)n[s]=o;return n}for(let s of e.individuals)s?.class===po&&(n[s.id]=s);return n}function u$(e,t){let n=Rs(e);return n?(n.statedByBySubject.get(t)||[]).slice():(e.objectProperties.find(o=>o?.prop===Fn)?.examples||[]).filter(o=>o?.subject===t).map(o=>o.object)}function nm(e,t,n=Date.now(),s={}){let o=u$(e,t.id),r=(t.attributes||[]).find(l=>l?.prop===It)?.value||"",{score:i,inputs:a}=Dl({sourceIds:o,createdAt:r},l$(e),{now:n,...Array.isArray(s?.premiseTrusts)?{premiseTrusts:s.premiseTrusts}:{},...typeof s?.ruleConfidence=="number"?{ruleConfidence:s.ruleConfidence}:{}});Qo(t,vr,"trustScore",String(i)),Qo(t,Ni,"trustInputs",JSON.stringify(a)),Qo(t,hs,"updatedAt",new Date(n).toISOString())}function ai(e,t,n=Date.now(),s={}){let o=(t.attributes||[]).find(i=>i?.prop==="mgx:factProvenance")?.value||"",r=(t.attributes||[]).find(i=>i?.prop===It)?.value||new Date(n).toISOString();for(let i of o.split(" | ").filter(Boolean)){let a=Co(i);if(!a)continue;let l=c$(e,a,r);l&&oi(e,{predicate:"statedBy",prop:Fn},{subject:t.id,object:l,subjectLabel:t.label,objectLabel:tm(l)})}nm(e,t,n,s)}function d$(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=e.objectProperties.find(r=>r?.prop===Fn),n=new Set((t?.examples||[]).map(r=>r.subject)),s=!1,o=Date.now();for(let r of e.individuals)r?.class!==ts||n.has(r.id)||!(r.attributes||[]).find(a=>a?.prop==="mgx:factProvenance")?.value||(ai(e,r,o),s=!0);s&&Ts(e)}function m$(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=Qt(e),n=new Set;for(let a of lm(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(!p$(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=Rs(e);for(let[a,l]of s){let c=o?o.individualsById.get(a):e.individuals.find(u=>u?.id===a);c&&(Qo(c,Hp,"sourceReliability",String(zl(l))),Qo(c,hs,"updatedAt",new Date().toISOString()))}let r=e.objectProperties.find(a=>a?.prop===Fn),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&&nm(e,l)}}function nr(e,t){let n=Rs(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 oi(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===Fn?Rs(e):null;if(r){let l=r.statedByBySubject.get(s.subject);if(!l||!l.includes(s.object)){o.examples.push({...s,createdAt:s.createdAt||si()}),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||si();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 Ts(e){let t=[cc,ac,ts,po,mo];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 f$(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:cc,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:It,key:"createdAt",value:n||si()},...n?[{prop:"mgx:sessionStarted",key:"started",value:n}]:[]]}),s}function sm(e,{role:t,text:n,ts:s,sessionId:o,sessionStarted:r="",parsed:i=null,replyTo:a=null,createdAt:l=""}){if(!Fv.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=Ln(n),d=`utt:${o}#${c}#${t}`,f=ii(u)||(t==="visitor"?"a-visitor-said":"a-tmct-said"),p=yr({doc:u}),m=e.individuals.find(y=>y?.id===d),b=tr(m,l||c),h={id:d,label:f,class:ac,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:It,key:"createdAt",value:b},...i!=null?[{prop:"mgx:utteranceParsed",key:"parsed",value:JSON.stringify(i)}]:[],...p.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:p.join(" ")}]:[]]};nr(e,h);let g=f$(e,o,r);if(oi(e,{predicate:"saidInSession",prop:lc},{subject:d,object:g,subjectLabel:f,objectLabel:String(o).slice(0,8)}),a){let y=e.individuals.find(w=>w?.id===a);y&&oi(e,{predicate:"inReplyTo",prop:uc},{subject:d,object:a,subjectLabel:f,objectLabel:y.label})}return c&&c>String(e.generated_at||"")&&(e.generated_at=c),d}async function h$(e,t){let n;return await As(e,s=>{n=sm(s,t),Ts(s)}),{id:n}}async function om(e,t){let n=[];return t?.length?(await As(e,s=>{for(let o of t)n.push(sm(s,o));Ts(s)}),{ids:n}):{ids:n}}async function g$(e,t){t?.length&&await As(e,n=>{for(let s of t)oi(n,{predicate:"canonicalisedFrom",prop:dc},{subject:s.factId,object:s.uttId,subjectLabel:s.factLabel,objectLabel:s.uttLabel})})}async function b$(e,{subject:t,predicate:n,object:s,provenance:o="",createdAt:r="",quantifier:i="",premiseTrusts:a,ruleConfidence:l}={}){let c=Z(t),u=Nn(n),d=Z(s);if(!c||!u||!d)throw new Error("a fact needs subject, predicate and object");let f=Vo(c,u,d),p=`${c} ${u} ${d}`,m=yr({doc:p}),b=Ln(i);return await As(e,async h=>{let g=h.individuals.find(A=>A?.id===f),y=g?.attributes?.find(A=>A?.prop==="mgx:factProvenance")?.value||"",w=[...new Set([...y.split(" | "),Ln(o)].filter(Boolean))],k=tr(g,r),S=g?.attributes?.find(A=>A?.prop==="mgx:factQuantifier")?.value||"",$=b||S,v={id:f,label:ii(p),class:ts,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:It,key:"createdAt",value:k},...w.length?[{prop:"mgx:factProvenance",key:"provenance",value:w.join(" | ")}]:[],...m.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:m.join(" ")}]:[],...$?[{prop:"mgx:factQuantifier",key:"quantifier",value:$}]:[]]};await Ya(v),nr(h,v),ai(h,h.individuals.find(A=>A?.id===f),void 0,{premiseTrusts:a,ruleConfidence:l}),Ts(h)}),{id:f}}function w$(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 sr(e,t){let n=[],s=0;for(let r of t||[]){let i=Z(r?.subject),a=Nn(r?.predicate),l=Z(r?.object);if(!i||!a||!l){s+=1;continue}let c=`${i} ${a} ${l}`;n.push({id:Vo(i,a,l),s:i,p:a,o:l,text:c,tokens:yr({doc:c}),provenance:Ln(r?.provenance),createdAt:r?.createdAt||"",quantifier:Ln(r?.quantifier),premiseTrusts:Array.isArray(r?.premiseTrusts)?r.premiseTrusts:void 0,ruleConfidence:typeof r?.ruleConfidence=="number"?r.ruleConfidence:void 0,environments:w$(r?.justification)})}let o=[];return n.length?(await As(e,r=>{let i=Rs(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 f=a.get(d.id),p=f?.attributes?.find(k=>k?.prop==="mgx:factProvenance")?.value||"",m=[...new Set([...p.split(" | "),d.provenance].filter(Boolean))],b=tr(f,d.createdAt),h=f?.attributes?.find(k=>k?.prop==="mgx:factQuantifier")?.value||"",g=d.quantifier||h,y={id:d.id,label:ii(d.text),class:ts,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:It,key:"createdAt",value:b},...m.length?[{prop:"mgx:factProvenance",key:"provenance",value:m.join(" | ")}]:[],...d.tokens.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:d.tokens.join(" ")}]:[],...g?[{prop:"mgx:factQuantifier",key:"quantifier",value:g}]:[],...d.environments?[{prop:"mgx:factJustification",key:"justification",value:d.environments.map(k=>k.join(" ")).join(" | ")}]:[]]},w=nr(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)ai(r,a.get(d),void 0,u.get(d));Ts(r)}),{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:r=""}={}){let i=rm[n];if(!i)throw new Error(`a rule kind must be one of ${y$.join(", ")}, got ${JSON.stringify(n)}`);let a=Z(t);if(!a)throw new Error("a rule needs a name");let l=v$[n]||new Set,c=i.map(([p])=>Z(s?.[p])),u=i.filter(([p],m)=>!l.has(p)&&!c[m]);if(u.length)throw new Error(`a ${n} rule needs ${u.map(([p])=>p).join(" + ")}`);if(n===ir){let p=c[i.findIndex(([b])=>b==="objectRole")],m=c[i.findIndex(([b])=>b==="value")];if(!p&&!m)throw new Error(`a ${n} rule needs an objectRole or a value`)}let d=$$(n,a,c),f=ii(`${a} = ${n}(${c.join(", ")})`);return await As(e,async p=>{let m=p.individuals.find(w=>w?.id===d),b=m?.attributes?.find(w=>w?.prop==="mgx:factProvenance")?.value||"",h=[...new Set([...b.split(" | "),Ln(o)].filter(Boolean))],g=tr(m,r),y={id:d,label:f,class:mo,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:li,key:"ruleName",value:a},{prop:go,key:"ruleKind",value:n},...i.map(([w,k],S)=>({prop:k,key:w,value:c[S],skip:!c[S]&&l.has(w)})).filter(w=>!w.skip).map(({skip:w,...k})=>k),{prop:It,key:"createdAt",value:g},...h.length?[{prop:"mgx:factProvenance",key:"provenance",value:h.join(" | ")}]:[]]};await Ya(y),nr(p,y),ai(p,p.individuals.find(w=>w?.id===d)),Ts(p)}),{id:d}}function vc(e,t){let n=Z(t);return(e?.individuals||[]).find(s=>s?.class===mo&&(s.attributes||[]).find(o=>o?.prop===li)?.value===n)}function x$(e,t){let n=Z(t),s=o=>(o.attributes||[]).find(r=>r?.prop===go)?.value||"";return(e?.individuals||[]).filter(o=>o?.class===mo&&(o.attributes||[]).find(r=>r?.prop===li)?.value===n).sort((o,r)=>s(o).localeCompare(s(r))||String(o.id).localeCompare(String(r.id)))}function $c(e){let t=[];for(let n of e?.individuals||[]){if(n?.class!==mo)continue;let s=a=>(n.attributes||[]).find(l=>l?.prop===a)?.value,o=s(go),r=rm[o];if(!r)continue;let i={};for(let[a,l]of r)i[a]=s(l)??"";t.push({id:n.id,name:s(li)||"",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 xc(e,t,n,s,o){let{relationFactsFor:r,renderFactLine:i,factPhrase:a,factTermVariants:l,byTrust:c,rows:u,HAS_PROPERTY_PREDICATE:d,findActionPath:f}=o,p=String(t||"").trim().toLowerCase(),m=l(Z,n),b=l(Z,s),h=r(p).filter(w=>m.has(w.fact.subject)&&b.has(w.fact.object));if(h.length){let w=h.slice().sort((k,S)=>c(k.fact,S.fact))[0];return{citation:[i(w.fact),...w.aliasFacts.map(k=>`${a(k)}${k.provenance?` (source: ${k.provenance})`:""}`)]}}let g=vc(e,p),y=g?.attributes?.find(w=>w.prop===go)?.value;if(g&&y===or){let w=g.attributes.find(N=>N.prop==="mgx:ruleBase1")?.value,k=g.attributes.find(N=>N.prop==="mgx:ruleBase2")?.value,S=Z(n),$=Z(s);if(!w||!k||!S||!$)return null;let C=f({entity:S,hopsTaken:0},N=>N.hopsTaken===2&&N.entity===$,N=>{if(N.hopsTaken>=2)return[];let j=N.hopsTaken===0?w:k;return r(j).filter(_=>_.fact.subject===N.entity).map(_=>({action:_,nextState:{entity:_.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 j of N.aliasFacts){let _=j.id||`${j.subject}|${j.predicate}|${j.object}`;E.has(_)||(E.add(_),R.push(`${a(j)}${j.provenance?` (source: ${j.provenance})`:""}`))}}return{citation:R}}if(g&&y===rr){let w=g.attributes.find(T=>T.prop==="mgx:ruleBase1")?.value,k=g.attributes.find(T=>T.prop==="mgx:ruleFilterProperty")?.value;if(!w||!k)return null;let S=await xc(e,w,n,s,o);if(!S)return null;let $=Z(n),v=Z(k),A=u.find(T=>T.predicate===d&&T.subject===$&&Z(T.object)===v);return A?{citation:[...S.citation,i(A)]}:null}return null}async function im(e,t,n,s){let{relationFactsFor:o,renderFactLine:r,factPhrase:i,factTermVariants:a,byTrust:l,rows:c,HAS_PROPERTY_PREDICATE:u,findReachableSet:d}=s,f=String(t||"").trim().toLowerCase(),p=a(Z,n),m=o(f).filter(g=>p.has(g.fact.object));if(m.length){let g=new Map;for(let y of m)g.has(y.fact.subject)||g.set(y.fact.subject,[]),g.get(y.fact.subject).push(y);return[...g.entries()].map(([y,w])=>{let k=w.slice().sort((S,$)=>l(S.fact,$.fact))[0];return{subject:y,citation:[r(k.fact),...k.aliasFacts.map(S=>`${i(S)}${S.provenance?` (source: ${S.provenance})`:""}`)]}})}let b=vc(e,f),h=b?.attributes?.find(g=>g.prop===go)?.value;if(b&&h===or){let g=b.attributes.find(v=>v.prop==="mgx:ruleBase1")?.value,y=b.attributes.find(v=>v.prop==="mgx:ruleBase2")?.value,w=Z(n);return!g||!y||!w?[]:d({entity:w,hopsTaken:0},v=>{if(v.hopsTaken>=2)return[];let A=v.hopsTaken===0?y:g;return o(A).filter(T=>T.fact.object===v.entity).map(T=>({action:T,nextState:{entity:T.fact.subject,hopsTaken:v.hopsTaken+1}}))},{maxDepth:2,stateKey:v=>`${v.entity}#${v.hopsTaken}`}).filter(v=>v.node.hopsTaken===2).map(({node:v,path:A})=>{let T=new Set,C=[];for(let E of A.actions.slice().reverse()){C.push(r(E.fact));for(let R of E.aliasFacts){let N=R.id||`${R.subject}|${R.predicate}|${R.object}`;T.has(N)||(T.add(N),C.push(`${i(R)}${R.provenance?` (source: ${R.provenance})`:""}`))}}return{subject:v.entity,citation:C}})}if(b&&h===rr){let g=b.attributes.find($=>$.prop==="mgx:ruleBase1")?.value,y=b.attributes.find($=>$.prop==="mgx:ruleFilterProperty")?.value;if(!g||!y)return[];let w=await im(e,g,n,s),k=Z(y),S=[];for(let $ of w){let v=Z($.subject),A=c.find(T=>T.predicate===u&&T.subject===v&&Z(T.object)===k);A&&S.push({subject:$.subject,citation:[...$.citation,r(A)]})}return S}return[]}function Qt(e){let t=e?.individuals||[],n=new Map(t.filter(i=>i?.class===po).map(i=>[i.id,i])),s=(e?.objectProperties||[]).find(i=>i?.prop===Fn),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!==ts)continue;let a=m=>(i.attributes||[]).find(b=>b?.key===m)?.value||"",l=o.get(i.id)||[],c=l.map(m=>(n.get(m)?.attributes||[]).find(b=>b?.prop==="mgx:sourceType")?.value).filter(Boolean),u=a("justification"),d=[];if(u)for(let m of u.split(" | ")){let b=m.split(" ").filter(Boolean);b.length&&d.push(b)}let f=[],p=new Set;for(let m of d)for(let b of m)p.has(b)||(p.add(b),f.push(b));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(m=>m?.prop===vr)?.value)||0,environments:d,justification:f})}return r}async function k$(e,t){let n=new Set((t||[]).filter(Boolean)),s=[];return n.size?(await As(e,o=>{if(o.individuals=(o.individuals||[]).filter(i=>i?.class===ts&&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}Ts(o)}),{removed:s}):{removed:s}}function lm(e,{floor:t=E$}={}){let n=Qt(e).filter(r=>r.trust>=t),s=new Map;for(let r of n){if(cm.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 Zo,ic,ac,ts,cc,po,mo,lc,uc,Pv,Fn,dc,Hp,ni,nc,Fv,qp,Dv,sc,pc,Kp,zv,Bv,Vp,Pn,Zp,oc,Qv,e$,hc,em,rc,Rs,ii,si,tm,i$,p$,or,rr,gc,bc,ci,ir,wc,y$,li,go,rm,v$,$$,E$,Cs,am,cm,Ye=K(()=>{Et();Be();Wn();gn();gn();Vs();Vs();Ka();Ip();Zo=J(".tmct","memory"),ic=J(Zo,"graph.json"),ac="Utterance",ts="Fact",cc="Session",po="Source",mo="Rule",lc="mgx:saidInSession",uc="mgx:inReplyTo",Pv="mgx:derivedFrom",Fn="mgx:statedBy",dc="mgx:canonicalisedFrom",Hp="mgx:sourceReliability",ni="src:operator-chat",nc="src:teach-chat",Fv=new Set(["visitor","tmct"]),qp=48,Dv=[{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:lc,predicate:"saidInSession",note:"Utterance \u2192 Session it was said in; runtime observation, owned (no SEON term)"},{prop:uc,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:It,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:hs,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:Pv,predicate:"derivedFrom",note:"umbrella: a Fact derived from a Source (or another Fact). ext ref prov:wasDerivedFrom (UNVERIFIED-pending-web-check)"},{prop:Fn,predicate:"statedBy",note:"subPropertyOf derivedFrom: a Source directly asserts this Fact (one edge per independent source \u2014 replaces the factProvenance union)"},{prop:dc,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 | extracted | 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:vr,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:Ni,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:oo,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)"}];sc=e=>Jo(e),pc="memory",Kp="sqlite";zv=`
91
92
  CREATE TABLE IF NOT EXISTS meta (k TEXT PRIMARY KEY, v TEXT NOT NULL);
92
93
  CREATE TABLE IF NOT EXISTS individuals (id TEXT PRIMARY KEY, ord INTEGER NOT NULL, class TEXT, label TEXT, json TEXT NOT NULL);
93
94
  CREATE TABLE IF NOT EXISTS relations (prop TEXT PRIMARY KEY, ord INTEGER NOT NULL, predicate TEXT, count INTEGER);
94
95
  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));
95
96
  CREATE INDEX IF NOT EXISTS edges_by_prop ON edges(prop);
96
- `,zv=new Set(["subject","object","subjectLabel","objectLabel"]),qp=!1;Pn=e=>e===void 0?e:structuredClone(e);Qp=X(Qo,"manifest.json"),oc=5,Xv=e=>X(e,Qp);Qv=/^fact:[0-9a-f]{8}$/;hc=X(Qo,"syllogise-state.json"),Zp="syllogiseState";rc=Symbol("mutateMemory lookup index");Rs=e=>e?.[rc]||null;ii=e=>e.length>Wp?e.slice(0,Wp-1)+"\u2026":e,si=()=>new Date().toISOString();em=e=>String(e).replace(/^src:/,""),o$=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"},web:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},extracted:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},entailed:{subClass:"tmct:ActivitySource",prov:"prov:Activity"}});u$=e=>typeof e=="string"&&(e.startsWith(`${ni}:`)||e.startsWith(`${nc}:`));sr="compose2",or="filter",gc="recursive",bc="action-signature",ci="action-precond",rr="action-effect",wc="action-constraint",b$=Object.freeze([sr,or,gc,bc,ci,rr,wc]),li="mgx:ruleName",ho="mgx:ruleKind",om={[sr]:[["base1","mgx:ruleBase1"],["base2","mgx:ruleBase2"]],[or]:[["base","mgx:ruleBase1"],["property","mgx:ruleFilterProperty"]],[gc]:[["baseCase","mgx:ruleBaseCase"],["recStep","mgx:ruleRecStep"]],[bc]:[["subjectClass","mgx:ruleActionSubjectClass"],["targetClass","mgx:ruleActionTargetClass"]],[ci]:[["shape","mgx:ruleActionPrecondShape"],["predicate","mgx:ruleActionPrecondPredicate"],["role","mgx:ruleActionPrecondRole"],["scope","mgx:ruleActionPrecondScope"],["value","mgx:ruleActionPrecondValue"],["negate","mgx:ruleActionPrecondNegate"]],[rr]:[["predicate","mgx:ruleActionEffectPredicate"],["subjectRole","mgx:ruleActionEffectSubject"],["objectRole","mgx:ruleActionEffectObject"],["value","mgx:ruleActionEffectValue"]],[wc]:[["left","mgx:ruleActionConstraintLeft"],["right","mgx:ruleActionConstraintRight"],["guard","mgx:ruleActionConstraintGuard"]]},w$={[ci]:new Set(["value","negate"]),[rr]:new Set(["objectRole","value"])},y$=(e,t,n)=>`rule:${Wo([e,t,...n].join("\0"))}`;x$=.5,Cs="mgx:hasA",im="mgx:capableOf",am=new Set([Cs,im].flatMap(e=>[e,io(e)]))});async function $n(e){try{let{dir:t,close:n}=await fo(ke(ke(e.graphFile)));try{return Qt(await Jt(t))}finally{await n()}}catch{return[]}}function um(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 ui(e,t){let n=Z(t),s=e.filter(a=>lm.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,Is),i=o.length>Is?`
97
+ `,Bv=new Set(["subject","object","subjectLabel","objectLabel"]),Vp=!1;Pn=e=>e===void 0?e:structuredClone(e);Zp=J(Zo,"manifest.json"),oc=5,Qv=e=>J(e,Zp);e$=/^fact:[0-9a-f]{8}$/;hc=J(Zo,"syllogise-state.json"),em="syllogiseState";rc=Symbol("mutateMemory lookup index");Rs=e=>e?.[rc]||null;ii=e=>e.length>qp?e.slice(0,qp-1)+"\u2026":e,si=()=>new Date().toISOString();tm=e=>String(e).replace(/^src:/,""),i$=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"},web:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},extracted:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},entailed:{subClass:"tmct:ActivitySource",prov:"prov:Activity"}});p$=e=>typeof e=="string"&&(e.startsWith(`${ni}:`)||e.startsWith(`${nc}:`));or="compose2",rr="filter",gc="recursive",bc="action-signature",ci="action-precond",ir="action-effect",wc="action-constraint",y$=Object.freeze([or,rr,gc,bc,ci,ir,wc]),li="mgx:ruleName",go="mgx:ruleKind",rm={[or]:[["base1","mgx:ruleBase1"],["base2","mgx:ruleBase2"]],[rr]:[["base","mgx:ruleBase1"],["property","mgx:ruleFilterProperty"]],[gc]:[["baseCase","mgx:ruleBaseCase"],["recStep","mgx:ruleRecStep"]],[bc]:[["subjectClass","mgx:ruleActionSubjectClass"],["targetClass","mgx:ruleActionTargetClass"]],[ci]:[["shape","mgx:ruleActionPrecondShape"],["predicate","mgx:ruleActionPrecondPredicate"],["role","mgx:ruleActionPrecondRole"],["scope","mgx:ruleActionPrecondScope"],["value","mgx:ruleActionPrecondValue"],["negate","mgx:ruleActionPrecondNegate"]],[ir]:[["predicate","mgx:ruleActionEffectPredicate"],["subjectRole","mgx:ruleActionEffectSubject"],["objectRole","mgx:ruleActionEffectObject"],["value","mgx:ruleActionEffectValue"]],[wc]:[["left","mgx:ruleActionConstraintLeft"],["right","mgx:ruleActionConstraintRight"],["guard","mgx:ruleActionConstraintGuard"]]},v$={[ci]:new Set(["value","negate"]),[ir]:new Set(["objectRole","value"])},$$=(e,t,n)=>`rule:${qo([e,t,...n].join("\0"))}`;E$=.5,Cs="mgx:hasA",am="mgx:capableOf",cm=new Set([Cs,am].flatMap(e=>[e,ao(e)]))});async function $n(e){try{let{dir:t,close:n}=await ho(ke(ke(e.graphFile)));try{return Qt(await Jt(t))}finally{await n()}}catch{return[]}}function dm(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 ui(e,t){let n=Z(t),s=e.filter(a=>um.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,Is),i=o.length>Is?`
97
98
  \u2026+${o.length-Is} more`:"";return`"${t}" is not a code-map entity \u2014 answering from memory/corpus facts. ${o.length} known subclass(es):
98
99
  ${r.join(`
99
100
  `)}${i}
100
- (${um(s)})`}function di(e,t){let n=Z(t),s=e.filter(a=>lm.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,Is).join(", ")}`),r.length){let a=r.length>Is?`, +${r.length-Is} more`:"";i.push(`known subclasses (${r.length}): ${r.slice(0,Is).join(", ")}${a}`)}return i.push(`(${um(s)})`),i.join(`
101
- `)}var lm,Is,go=K(()=>{Be();Ye();lm=new Set(["rdfs:subClassOf","rdf:type"]),Is=40});function E$(e,{conceptBase:t="concept:",relationMap:n=S$}={}){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 g=h;for(;r.get(g)!==g;)g=r.get(g);for(;r.get(h)!==g;){let y=r.get(h);r.set(h,g),h=y}return g},l=(h,g)=>{let y=a(h),w=a(g);y!==w&&(y<w?r.set(w,y):r.set(y,w))},c=[];for(let h of e){let g=h.predicate;if(!s.has(g)&&!o.has(g))continue;let y=Z(h.subject),w=Z(h.object);!y||!w||(i(y),i(w),s.has(g)?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 g=a(h);d.has(g)||d.set(g,new Set),d.get(g).add(h)}let m=[];for(let[h,g]of d){let y=[...g].sort();m.push({id:u(h),prefLabel:h,altLabels:y.filter(w=>w!==h)})}m.sort((h,g)=>h.id<g.id?-1:h.id>g.id?1:0);let p=new Set,f=[];for(let{s:h,o:g}of c){let y=u(a(h)),w=u(a(g));if(y===w)continue;let k=y<w?`${y}\0${w}`:`${w}\0${y}`;p.has(k)||(p.add(k),f.push({subject:y,object:w}))}return f.sort((h,g)=>`${h.subject}${h.object}`<`${g.subject}${g.object}`?-1:1),{concepts:m,related:f,conceptIdForTerm:h=>{let g=Z(h);return r.has(g)?u(a(g)):null},namespace:k$}}function kc(e,t,n={}){let s=E$(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=Z(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 k$,S$,Sc=K(()=>{gn();k$="http://www.w3.org/2004/02/skos/core#",S$={synonym:["mgx:synonym"],related:["mgx:relatedTo","mgx:similarTo"]}});var _c=K(()=>{});var rt,KA,YA,XA,JA,QA,ZA,eT,tT,nT,sT,oT,rT,iT,aT,cT,lT,Mt,uT,dT,pT,ss=K(()=>{rt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},KA=rt("createRequire"),YA=rt("readFileSync"),XA=rt("access"),JA=rt("readFile"),QA=rt("writeFile"),ZA=rt("appendFile"),eT=rt("mkdir"),tT=rt("mkdtemp"),nT=rt("rename"),sT=rt("unlink"),oT=rt("rm"),rT=rt("stat"),iT=rt("copyFile"),aT=rt("readdir"),cT=rt("createReadStream"),lT=rt("createWriteStream"),Mt=e=>String(e),uT=rt("randomBytes"),dT=rt("spawnSync"),pT=rt("createInterface")});var T$,Om,bT,wT,yT,Ac=K(()=>{St();ss();Be();T$={},Om=X(ke(Mt(T$.url)),"..","..",".."),bT=X(Om,"data","templates","responses.jsonl"),wT=X(Om,"data","phrasebook","software-phrases.txt"),yT=Object.freeze(new Set(["subject","count","noun","scope","comparison","metric","unit","superlative","provenance"]))});var it,xT,bo,kT,ST,ET,jT,_T,RT,AT,TT,CT,IT,OT,LT,L$,N$,NT,MT,PT,Os=K(()=>{it=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},xT=it("createRequire"),bo=it("readFileSync"),kT=it("access"),ST=it("readFile"),ET=it("writeFile"),jT=it("appendFile"),_T=it("mkdir"),RT=it("mkdtemp"),AT=it("rename"),TT=it("unlink"),CT=it("rm"),IT=it("stat"),OT=it("copyFile"),LT=it("readdir"),L$=it("createReadStream"),N$=it("createWriteStream"),NT=it("randomBytes"),MT=it("spawnSync"),PT=it("createInterface")});function Lm(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 z$(e=P$){let t=lo(bo(e,"utf8"));return Array.isArray(t.rule)?t.rule:[]}function Tc(){if(fi===null)try{fi=z$()}catch{fi=[]}return fi}var D$,M$,P$,F$,qT,fi,Cc=K(()=>{Os();ss();Be();Qr();Ac();D$={},M$=ke(Mt(D$.url)),P$=X(M$,"..","..","data","templates","grammar-rules.toml"),F$=Object.freeze(["prose","entity","path","number","code","provenance","receipt"]),qT=Object.freeze(new Set(F$.filter(e=>e!=="prose")));fi=null});var at,Nm,HT,KT,YT,XT,JT,QT,ZT,eC,tC,nC,sC,oC,rC,iC,aC,cC,lC,uC,Mm=K(()=>{at=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},Nm=at("createRequire"),HT=at("readFileSync"),KT=at("access"),YT=at("readFile"),XT=at("writeFile"),JT=at("appendFile"),QT=at("mkdir"),ZT=at("mkdtemp"),eC=at("rename"),tC=at("unlink"),nC=at("rm"),sC=at("stat"),oC=at("copyFile"),rC=at("readdir"),iC=at("createReadStream"),aC=at("createWriteStream"),cC=at("randomBytes"),lC=at("spawnSync"),uC=at("createInterface")});function B$(){if(ir!==void 0)return ir;try{let e=Pm?Pm():U$();ir=e&&e.winkNLP&&e.model?e:null}catch{ir=null}return ir}function U$(){let e=Nm(G$.url);return{winkNLP:e("wink-nlp"),model:e("wink-eng-lite-web-model")}}function Ic(){if(wo!==void 0)return wo;let e=B$();if(!e)return wo=null,null;try{wo=e.winkNLP(e.model)}catch{wo=null}return wo}var G$,Pm,ir,wo,Oc=K(()=>{Mm();G$={}});var zm,Fm=K(()=>{zm={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 V$(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 Dm(e,t={}){for(let[n,s]of Object.entries(t.nouns||{})){let o={lemma:n,...s||{}};if(o.property&&!H$.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(!K$.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 yo(e,t=q$){if(!e&&Lc.has(t))return Lc.get(t);let n=zm,s={nouns:new Map,nounPlurals:new Map,verbs:new Map,adjectives:new Map,properNames:new Map,ns:t};return Dm(s,n),e?(Dm(s,e),s):(Lc.set(t,s),s)}function hi(e,t,n={}){return Y$(e,t,n)[0]??null}function Y$(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 V$(s))l(e.nouns.get(c));return i}var q$,wC,yC,vC,H$,K$,Lc,ar=K(()=>{Fm();q$="tmct:",wC=Object.freeze({every:"universal",a:"indefinite",an:"indefinite",the:"definite",no:"negative"}),yC=Object.freeze({"at least":"owl:minCardinality","at most":"owl:maxCardinality",exactly:"owl:cardinality"}),vC=Object.freeze({one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10});H$=new Set(["data","object"]),K$=new Set(["subclass","data"]);Lc=new Map});var EC,jC,_C,X$,RC,AC,TC,Bm=K(()=>{Qn();Ae();EC=Object.freeze({class:"Class",module:"Module",function:"Function",method:"Method",attribute:"Attribute",variable:"GlobalVariable",constant:"GlobalVariable",commit:"Commit"}),jC=Object.freeze({Class:["class","classes"],Module:["module","modules"],Function:["function","functions"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"]}),_C=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`]}),X$=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"}),RC=Object.freeze({imports:["imports"],calls:["calls","callsSymbol"],contains:["contains"],inherits:["inherits"],tests:["tests"],defines:["defines"],touches:["touches","touchesSymbol"],cochange:["cochange"],reexports:["reexports"]}),AC=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"}}),TC=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 sx,ox,rx,ix,ax,cx,lx,ux,dx,kI,px,Wm,SI,EI,qm=K(()=>{ar();Lo();sx="subClassOf",ox="typeAssertion",rx="relation",ix="someValuesFrom",ax="cardinality",cx="disjointWith",lx="possessive",ux="adjective",dx="capability",kI=Object.freeze([sx,ox,rx,ix,ax,cx,lx,ux,dx]),px=new Set(["go","take","drop","open","unlock","close","give","look","talk","examine"]),Wm=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"]]),SI=Math.max(...[...Wm.keys()].map(e=>e.split(" ").length)),EI=[...new Set([...px,...[...Wm.keys()].map(e=>e.split(" ")[0])])]});var Ns=K(()=>{});var zc=K(()=>{Ae();Qn();Ns()});function $t({name:e,label:t,question:n,params:s=[],preconditions:o=[],add:r=[],del:i=[]}){return Object.freeze({type:os.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 mx,os,_e,lr,ht,_t,Zt,fx,hx,vt,gx,bx,Vm,II,OI,LI,Hm=K(()=>{mx=Object.freeze({cap:"urn:tmct:cap#",taught:"urn:tmct:taught#",mgx:"urn:tmct:mgx#",seon:"http://se-on.org/ontologies/seon.owl#"}),os=Object.freeze({Capability:"cap:Capability",Parameter:"cap:Parameter",Precondition:"cap:Precondition",Effect:"cap:Effect"}),_e=Object.freeze({Symbol:"seon:CodeEntity",Module:"mgx:Module",Class:"seon:ClassType",Query:"cap:FreeText",Kind:"cap:KindFilter",Package:"cap:PackageName"}),lr=Object.freeze({graphLoaded:"cap:graph-loaded",resolves:"cap:resolves",anyPresent:"cap:any-present",memoryFacts:"cap:memory-facts"}),ht=(e,t,{arg:n=e,required:s=!0,note:o=""}={})=>Object.freeze({type:os.Parameter,name:e,kind:t,arg:n,required:s,note:o}),_t=()=>Object.freeze({type:os.Precondition,pred:lr.graphLoaded}),Zt=(e,t)=>Object.freeze({type:os.Precondition,pred:lr.resolves,param:e,as:t}),fx=e=>Object.freeze({type:os.Precondition,pred:lr.anyPresent,params:Object.freeze([...e])}),hx=()=>Object.freeze({type:os.Precondition,pred:lr.memoryFacts}),vt=(e,t=null)=>Object.freeze({type:os.Effect,pred:"cap:knows",topic:e,of:t?`?${t}`:null});gx=Object.freeze([$t({name:"tmct_search",label:"search",question:"lexical search across the graph",params:[ht("query",_e.Query,{required:!1,note:"required unless a kind filter is given"}),ht("kind",_e.Kind,{required:!1}),ht("name",_e.Query,{required:!1}),ht("decorator",_e.Query,{required:!1})],preconditions:[_t(),fx(["query","kind"])],add:[vt("matches","query")]}),$t({name:"tmct_describe",label:"describe",question:"a symbol's definition, kind and relations",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[vt("description","symbol")]}),$t({name:"tmct_signature",label:"signature",question:"a symbol's signature only",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[vt("signature","symbol")]}),$t({name:"tmct_impact",label:"impact",question:"what a change to this module or symbol reaches (impact closure)",params:[ht("module",_e.Symbol,{note:"a Module, or any sited symbol \u2014 a fine-grained seed walks callsSymbol dependents and coarsens them to module grain"})],preconditions:[_t(),Zt("module",_e.Symbol)],add:[vt("impact","module")]}),$t({name:"tmct_members",label:"members",question:"the methods/attributes of a class",params:[ht("class",_e.Class,{arg:"class"})],preconditions:[_t(),Zt("class",_e.Class)],add:[vt("members","class")]}),$t({name:"tmct_subclasses",label:"subclasses",question:"the subclasses of a class",params:[ht("class",_e.Class,{arg:"class"})],preconditions:[_t(),Zt("class",_e.Class)],add:[vt("subclasses","class")]}),$t({name:"tmct_exports",label:"exports",question:"a module's public exports",params:[ht("module",_e.Module)],preconditions:[_t(),Zt("module",_e.Module)],add:[vt("exports","module")]}),$t({name:"tmct_callers",label:"callers",question:"functions that call this symbol",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[vt("callers","symbol")]}),$t({name:"tmct_callees",label:"callees",question:"functions this symbol calls",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[vt("callees","symbol")]}),$t({name:"tmct_calls",label:"calls",question:"the call edges out of this symbol/module",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[vt("calls","symbol")]}),$t({name:"tmct_tests_for",label:"tests",question:"the tests covering this symbol",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[vt("tests","symbol")]}),$t({name:"tmct_untested",label:"untested",question:"symbols with no covering test",params:[],preconditions:[_t()],add:[vt("untested",null)]}),$t({name:"tmct_history",label:"history",question:"the commit history of this symbol",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[vt("history","symbol")]}),$t({name:"tmct_cochanges",label:"cochanges",question:"symbols that change together with this one",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[vt("cochanges","symbol")]}),$t({name:"tmct_architecture",label:"arch",question:"the architecture overview (optional package filter)",params:[ht("package",_e.Package,{required:!1})],preconditions:[_t()],add:[vt("architecture","package")]}),$t({name:"tmct_related",label:"related",question:"a term's synonyms and related concepts (the SKOS view over the conversational-memory graph)",params:[ht("term",_e.Query,{note:"a concept term, matched against memory relation facts rather than resolved in the code graph"})],preconditions:[hx()],add:[vt("related","term")]})]),bx=e=>Object.freeze(e.reduce((t,n)=>(t[n.name]=n,t),Object.create(null))),Vm=gx,II=bx(Vm),OI=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"}),LI=Object.freeze({prefixes:mx,vocab:os,kinds:_e,precond:lr,get capabilities(){return Vm}})});var Km=K(()=>{Hm()});var Ym=K(()=>{});var tO,Qm=K(()=>{St();Be();Gn();Co();To();Ye();tO=X(".tmct","memory","blocks")});var Zm=K(()=>{Ns()});var tf=K(()=>{Gn();Co();Ns()});var Uc=K(()=>{Gn();Co();Ns()});var nf=K(()=>{Uc();Gn();bs();Ns()});var sf=K(()=>{});var of=K(()=>{Zm();tf();Uc();nf();sf();Ns()});var rf=K(()=>{Qm();Ye();Ur();Cc();of();zc()});var uf=K(()=>{});var Lx,df=K(()=>{St();Be();Ye();uf();Lx=X(".tmct","sessions")});var dt,pM,mM,fM,hM,gM,bM,wM,yM,vM,$M,xM,kM,SM,EM,jM,_M,RM,AM,Nx,mf=K(()=>{dt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},pM=dt("createRequire"),mM=dt("readFileSync"),fM=dt("access"),hM=dt("readFile"),gM=dt("writeFile"),bM=dt("appendFile"),wM=dt("mkdir"),yM=dt("mkdtemp"),vM=dt("rename"),$M=dt("unlink"),xM=dt("rm"),kM=dt("stat"),SM=dt("copyFile"),EM=dt("readdir"),jM=dt("createReadStream"),_M=dt("createWriteStream"),RM=dt("randomBytes"),AM=dt("spawnSync"),Nx=dt("createInterface")});var Px,vo,ff,Mx,hf,FM,zn,zM,wi,DM,gf=K(()=>{Os();St();mf();ss();Be();Qr();Ye();Px={},vo=X(ke(Mt(Px.url)),"..","..",".."),ff=X(vo,"corpus","conceptnet","slice.jsonl"),Mx=X(vo,"src","adapters","corpus","conceptnet-map.toml"),hf=X(vo,"corpus","seon","concepts.jsonl"),FM=X(vo,"corpus","seon","definitions.jsonl"),zn=X(vo,"corpus","tier2"),zM=X(zn,"manifest.json"),wi=X(vo,"corpus","wordnet"),DM=X(wi,"manifest.json")});function Dx(){return{seon:{kind:"corpus",active:!1,corpusPath:hf,provenancePrefix:"corpus:seon"},conceptnet:{kind:"corpus",active:!1,corpusPath:ff,provenancePrefix:"corpus:conceptnet",limit:void 0,prefer:zx},human:{kind:"corpus",active:!0,corpusPath:X(zn,"human.jsonl"),provenancePrefix:"corpus:human"},"human-medium":{kind:"corpus",active:!1,corpusPath:X(zn,"human-medium.jsonl"),provenancePrefix:"corpus:human-medium"},"human-large":{kind:"corpus",active:!1,corpusPath:X(zn,"human-large.jsonl"),provenancePrefix:"corpus:human-large"},"tier2-aws":{kind:"corpus",active:!1,corpusPath:X(zn,"aws.jsonl"),provenancePrefix:"corpus:tier2-aws"},"tier2-python":{kind:"corpus",active:!1,corpusPath:X(zn,"python.jsonl"),provenancePrefix:"corpus:tier2-python"},"tier2-java":{kind:"corpus",active:!1,corpusPath:X(zn,"java.jsonl"),provenancePrefix:"corpus:tier2-java"},"tier2-general":{kind:"corpus",active:!1,corpusPath:X(zn,"general.jsonl"),provenancePrefix:"corpus:tier2-general"},"wordnet-xl":{kind:"corpus",active:!1,corpusPath:X(wi,"wordnet-xl.jsonl"),provenancePrefix:"corpus:wordnet-xl"},"wordnet-full":{kind:"corpus",active:!1,corpusPath:X(wi,"wordnet-full.jsonl"),provenancePrefix:"corpus:wordnet-full"},namenet:{kind:"corpus",active:!1,corpusPath:X(Fx,"namenet.jsonl"),provenancePrefix:"corpus:namenet"}}}var Bx,Fx,JM,zx,QM,bf=K(()=>{Be();St();ss();ti();gf();Bx={},Fx=X(ke(Mt(Bx.url)),"..","..","corpus","namenet"),JM=Object.freeze(["corpus","lexicon","templates","pack","ontology"]),zx=["rdfs:subClassOf","rdf:type","mgx:usedFor","mgx:partOf","mgx:capableOf"];QM=Object.freeze(Dx())});var wf={};Dn(wf,{proseLemma:()=>Ux});function Ux(){if(Ms!==void 0)return Ms;try{let e=Ic();if(!e)return Ms=null,Ms;let t=e.its,n=new Map;Ms=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{Ms=null}return Ms}var Ms,yf=K(()=>{Oc()});Be();St();Be();jn();var Ht=e=>({type:"object",required:["symbol"],properties:{symbol:{type:"string",description:e}}}),El=e=>({type:"object",required:["module"],properties:{module:{type:"string",description:e}}}),jl=e=>({type:"object",required:["class"],properties:{class:{type:"string",description:e}}}),Ti=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:qt}},{name:"tmct_describe",tier:"cold",summary:"Locate one symbol and list its typed edges (both directions) with provenance.",inputSchema:Ht("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:Ht("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:El("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:jl("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:jl("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:El("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:Ht("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:Ht("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:Ht("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:Ht("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:Ht("A class name."),example:{symbol:"Truncator"}},{name:"tmct_callers",tier:"cold",summary:"Modules that call into a symbol's module (one hop).",inputSchema:Ht("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:Ht("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:Ht("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:Ht("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:Ht("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:{}}]),_l=Ti.filter(e=>e.tier==="hot"),AS=Ti.filter(e=>e.tier==="cold"),TS=Object.freeze(Ti.map(e=>e.name));Ct();var qs={};Dn(qs,{clearCache:()=>fh,emptyEntities:()=>Ci,fetchEntities:()=>wh,registerProvider:()=>hh});St();Ct();function mh(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 Al(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})=>mh(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 b={...f};return b.subject&&(b.subject=u(b.subject)),b.object&&(b.object=u(b.object)),b})),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 b of Array.isArray(p)?p:[]){let h=u(b);f.includes(h)||f.push(h)}}}return r.generated_at=i,a&&(r.bootstrap=!0),r}var Ws=null,Ao=null,br=null;function fh(){Ws=null,Ao=null}function hh(e){if(e!=null&&typeof e!="function")throw new TypeError("registerProvider expects a function (config) => entities payload, or null");let t=br;return br=e??null,Ws=null,t}function Ci(){return{generated_at:"",bootstrap:!0,classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}}}async function gh(e){let t;try{t=await ze(e,"utf8")}catch(n){if(n?.code==="ENOENT")return Ci();throw new Ie(`cannot read graph artifact at ${e} (${n?.code||n?.message||n})`)}try{return JSON.parse(t)}catch{throw new Ie(`graph artifact ${e} is not valid JSON`)}}async function bh(e){let t=e.graphFiles,n=[...t].map(String).sort().join("|");if(Ao&&Ao.key===n)return Ao.payload;let s=[];for(let r=0;r<t.length;r++){let i=await gh(t[r]);s.push({file:t[r],payload:i,name:e.graphNames?.[r]})}let o=Al(s);return Ao={key:n,payload:o},o}async function wh(e){if(br){let s;try{s=await br(e)}catch(o){throw o instanceof Ie?o:new Ie(`graph provider failed (${o?.message||o})`)}if(!s||typeof s!="object")throw new Ie("graph provider returned no entities payload");return s}if(Array.isArray(e.graphFiles)&&e.graphFiles.length>1)return bh(e);if(Ws&&Ws.file===e.graphFile)return Ws.payload;let t;try{t=await ze(e.graphFile,"utf8")}catch(s){if(s?.code==="ENOENT")return Ci();throw new Ie(`cannot read graph artifact at ${e.graphFile} (${s?.code||s?.message||s})`)}let n;try{n=JSON.parse(t)}catch{throw new Ie(`graph artifact ${e.graphFile} is not valid JSON`)}return Ws={file:e.graphFile,payload:n},n}Qn();Ur();Ct();Ae();async function Uo(e,t){let n=await t.fetchEntities(e),s=Sr(n);if(!s.individuals.length){let o=new Ie(`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}St();Be();Ct();zr();Ae();Qn();Ur();Ct();Ae();var Go=200;function nt(e,t){let n=String(e?.[t]||"").trim();if(!n)throw new Ie(`${t} is required`);return n}function gt(e,t,n){let{match:s,candidates:o}=Ut(e.graph,t);if(!s)throw new Ie(`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 Ke=e=>(t,{graph:n,svc:s})=>{let{match:o}=gt(s,nt(t,"symbol"),"symbol");return e(n,o)};async function ap(e,{config:t,source:n=qs,trim:s=!1,tel:o=null}={}){let r=String(e?.symbol||"").trim();if(!r)throw new Ie("symbol is required");let i=String(e?.depth||"auto").trim().toLowerCase(),a=!!e?.min,l=!!e?.untuned,c=!!e?.max,u=await Uo(t,n),d=ke(ke(t.graphFile)),m=Br(u,{sourceAccess:!0,repoRoot:d,readFile:ze,tel:o,ask:Jn}),{match:p}=gt(m,r,"symbol"),f=Ks(u,p),b,h,g=!1;a||i==="min"?(b="TINY",h=ws("TINY")):c||i==="full"?(b="FULL",h=ws("FULL"),g=!0):{tier:b,mask:h,topup:g}=_r(f,u,{untuned:l}),s&&!c&&(h=Cu(h));let y=null;if(f.moduleLabel)try{({lines:y}=await On({readFile:ze,repoRoot:d,path:f.moduleLabel}))}catch{y=null}let w=$=>y&&y[$-1]!=null?y[$-1].trim():"",k=($,v)=>Zn(y,$,v,Go).text,E=[`Edit context for ${f.moduleLabel} [${b}${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:v}=f.anchor.site;E.push(`
102
- ## anchor: ${f.anchor.label} (${f.anchor.class}) @ ${f.moduleLabel}:${$}-${v}`),E.push(k($,v)),f.callHint&&E.push(f.callHint)}if(h.registration&&f.globals.length){E.push(`
103
- ## registration / module globals (replicate this pattern):`);for(let $ of f.globals)E.push(` ${$.label} = ${$.value}${$.site?` [:${$.site.start}]`:""}`)}if(h.exemplar&&f.exemplar?.site&&y){let{start:$,end:v}=f.exemplar.site,A=f.exemplar.decorators?` @${f.exemplar.decorators}`:"";E.push(`
104
- ## closest example (full body) \u2014 copy this style: ${f.exemplar.label} (${f.exemplar.class})${A} @ ${f.moduleLabel}:${$}-${v}`),E.push(k($,v)),f.callHint&&E.push(f.callHint)}if(h.inlinedCallees&&f.calleeBodies.length&&y){let $=120;for(let v of f.calleeBodies){if($<=0)break;let A=v.site.start,C=v.site.path===f.moduleLabel&&y?y:await On({readFile:ze,repoRoot:d,path:v.site.path}).then(R=>R.lines).catch(()=>null);if(!C)continue;let S=Zn(C,A,v.site.end,$);E.push(`
105
- ## inlined callee body (depth-1 in-repo call): ${v.label} @ ${v.site.path}:${A}-${v.site.end}`),E.push(S.text),$-=S.end-A+1}}if(h.classMembers&&f.classMembers&&f.classMembers.members.length){E.push(`
106
- ## 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 v=String($.label).split(".").pop(),A=$.params!=null&&$.params!==""?`(${$.params})${$.returns?` -> ${$.returns}`:""}`:"",T=$.decorators?`@${$.decorators} `:"",C=$.raises?` raises=${$.raises}`:"";E.push(` ${$.class} ${v}${$.site?` :${$.site.start}`:""} ${T}${v}${A}${C}`)}}if(h.siblings&&f.siblings.length){E.push(`
107
- ## sibling symbols to copy the style of (most relevant first; ${f.siblings.length} total):`);for(let $ of f.siblings.slice(0,f.siblingCap)){let v=$.site?w($.site.start):"",A=$.decorators?`@${$.decorators} `:"",T=$.raises?` raises=${$.raises}`:"";E.push(` ${$.class} ${$.label}${$.site?` :${$.site.start}`:""} ${A}${v}${T}`)}f.siblings.length>f.siblingCap&&E.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&&E.push(`
101
+ (${dm(s)})`}function di(e,t){let n=Z(t),s=e.filter(a=>um.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,Is).join(", ")}`),r.length){let a=r.length>Is?`, +${r.length-Is} more`:"";i.push(`known subclasses (${r.length}): ${r.slice(0,Is).join(", ")}${a}`)}return i.push(`(${dm(s)})`),i.join(`
102
+ `)}var um,Is,bo=K(()=>{Be();Ye();um=new Set(["rdfs:subClassOf","rdf:type"]),Is=40});function _$(e,{conceptBase:t="concept:",relationMap:n=j$}={}){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 g=h;for(;r.get(g)!==g;)g=r.get(g);for(;r.get(h)!==g;){let y=r.get(h);r.set(h,g),h=y}return g},l=(h,g)=>{let y=a(h),w=a(g);y!==w&&(y<w?r.set(w,y):r.set(y,w))},c=[];for(let h of e){let g=h.predicate;if(!s.has(g)&&!o.has(g))continue;let y=Z(h.subject),w=Z(h.object);!y||!w||(i(y),i(w),s.has(g)?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 g=a(h);d.has(g)||d.set(g,new Set),d.get(g).add(h)}let f=[];for(let[h,g]of d){let y=[...g].sort();f.push({id:u(h),prefLabel:h,altLabels:y.filter(w=>w!==h)})}f.sort((h,g)=>h.id<g.id?-1:h.id>g.id?1:0);let p=new Set,m=[];for(let{s:h,o:g}of c){let y=u(a(h)),w=u(a(g));if(y===w)continue;let k=y<w?`${y}\0${w}`:`${w}\0${y}`;p.has(k)||(p.add(k),m.push({subject:y,object:w}))}return m.sort((h,g)=>`${h.subject}${h.object}`<`${g.subject}${g.object}`?-1:1),{concepts:f,related:m,conceptIdForTerm:h=>{let g=Z(h);return r.has(g)?u(a(g)):null},namespace:S$}}function kc(e,t,n={}){let s=_$(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=Z(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 S$,j$,Ec=K(()=>{gn();S$="http://www.w3.org/2004/02/skos/core#",j$={synonym:["mgx:synonym"],related:["mgx:relatedTo","mgx:similarTo"]}});var _c=K(()=>{});var it,JA,QA,ZA,eT,tT,nT,sT,oT,rT,iT,aT,cT,lT,uT,dT,pT,Mt,mT,fT,hT,ss=K(()=>{it=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},JA=it("createRequire"),QA=it("readFileSync"),ZA=it("access"),eT=it("readFile"),tT=it("writeFile"),nT=it("appendFile"),sT=it("mkdir"),oT=it("mkdtemp"),rT=it("rename"),iT=it("unlink"),aT=it("rm"),cT=it("stat"),lT=it("copyFile"),uT=it("readdir"),dT=it("createReadStream"),pT=it("createWriteStream"),Mt=e=>String(e),mT=it("randomBytes"),fT=it("spawnSync"),hT=it("createInterface")});var I$,Lm,vT,$T,xT,Ac=K(()=>{Et();ss();Be();I$={},Lm=J(ke(Mt(I$.url)),"..","..",".."),vT=J(Lm,"data","templates","responses.jsonl"),$T=J(Lm,"data","phrasebook","software-phrases.txt"),xT=Object.freeze(new Set(["subject","count","noun","scope","comparison","metric","unit","superlative","provenance"]))});var at,ST,wo,jT,_T,RT,AT,TT,CT,IT,OT,LT,NT,MT,PT,M$,P$,FT,DT,zT,Os=K(()=>{at=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},ST=at("createRequire"),wo=at("readFileSync"),jT=at("access"),_T=at("readFile"),RT=at("writeFile"),AT=at("appendFile"),TT=at("mkdir"),CT=at("mkdtemp"),IT=at("rename"),OT=at("unlink"),LT=at("rm"),NT=at("stat"),MT=at("copyFile"),PT=at("readdir"),M$=at("createReadStream"),P$=at("createWriteStream"),FT=at("randomBytes"),DT=at("spawnSync"),zT=at("createInterface")});function Nm(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 B$(e=D$){let t=uo(wo(e,"utf8"));return Array.isArray(t.rule)?t.rule:[]}function Tc(){if(fi===null)try{fi=B$()}catch{fi=[]}return fi}var U$,F$,D$,z$,KT,fi,Cc=K(()=>{Os();ss();Be();Qr();Ac();U$={},F$=ke(Mt(U$.url)),D$=J(F$,"..","..","data","templates","grammar-rules.toml"),z$=Object.freeze(["prose","entity","path","number","code","provenance","receipt"]),KT=Object.freeze(new Set(z$.filter(e=>e!=="prose")));fi=null});var ct,Mm,XT,JT,QT,ZT,eC,tC,nC,sC,oC,rC,iC,aC,cC,lC,uC,dC,pC,mC,Pm=K(()=>{ct=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},Mm=ct("createRequire"),XT=ct("readFileSync"),JT=ct("access"),QT=ct("readFile"),ZT=ct("writeFile"),eC=ct("appendFile"),tC=ct("mkdir"),nC=ct("mkdtemp"),sC=ct("rename"),oC=ct("unlink"),rC=ct("rm"),iC=ct("stat"),aC=ct("copyFile"),cC=ct("readdir"),lC=ct("createReadStream"),uC=ct("createWriteStream"),dC=ct("randomBytes"),pC=ct("spawnSync"),mC=ct("createInterface")});function W$(){if(ar!==void 0)return ar;try{let e=Fm?Fm():G$();ar=e&&e.winkNLP&&e.model?e:null}catch{ar=null}return ar}function G$(){let e=Mm(q$.url);return{winkNLP:e("wink-nlp"),model:e("wink-eng-lite-web-model")}}function Ic(){if(yo!==void 0)return yo;let e=W$();if(!e)return yo=null,null;try{yo=e.winkNLP(e.model)}catch{yo=null}return yo}var q$,Fm,ar,yo,Oc=K(()=>{Pm();q$={}});var zm,Dm=K(()=>{zm={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 K$(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 Bm(e,t={}){for(let[n,s]of Object.entries(t.nouns||{})){let o={lemma:n,...s||{}};if(o.property&&!Y$.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(!X$.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 vo(e,t=H$){if(!e&&Lc.has(t))return Lc.get(t);let n=zm,s={nouns:new Map,nounPlurals:new Map,verbs:new Map,adjectives:new Map,properNames:new Map,ns:t};return Bm(s,n),e?(Bm(s,e),s):(Lc.set(t,s),s)}function hi(e,t,n={}){return J$(e,t,n)[0]??null}function J$(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 K$(s))l(e.nouns.get(c));return i}var H$,$C,xC,kC,Y$,X$,Lc,cr=K(()=>{Dm();H$="tmct:",$C=Object.freeze({every:"universal",a:"indefinite",an:"indefinite",the:"definite",no:"negative"}),xC=Object.freeze({"at least":"owl:minCardinality","at most":"owl:maxCardinality",exactly:"owl:cardinality"}),kC=Object.freeze({one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10});Y$=new Set(["data","object"]),X$=new Set(["subclass","data"]);Lc=new Map});var RC,AC,TC,Q$,CC,IC,OC,Um=K(()=>{Qn();Ae();RC=Object.freeze({class:"Class",module:"Module",function:"Function",method:"Method",attribute:"Attribute",variable:"GlobalVariable",constant:"GlobalVariable",commit:"Commit"}),AC=Object.freeze({Class:["class","classes"],Module:["module","modules"],Function:["function","functions"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"]}),TC=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`]}),Q$=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"}),CC=Object.freeze({imports:["imports"],calls:["calls","callsSymbol"],contains:["contains"],inherits:["inherits"],tests:["tests"],defines:["defines"],touches:["touches","touchesSymbol"],cochange:["cochange"],reexports:["reexports"]}),IC=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"}}),OC=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 rx,ix,ax,cx,lx,ux,dx,px,mx,jI,fx,qm,_I,RI,Vm=K(()=>{cr();No();rx="subClassOf",ix="typeAssertion",ax="relation",cx="someValuesFrom",lx="cardinality",ux="disjointWith",dx="possessive",px="adjective",mx="capability",jI=Object.freeze([rx,ix,ax,cx,lx,ux,dx,px,mx]),fx=new Set(["go","take","drop","open","unlock","close","give","look","talk","examine"]),qm=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"]]),_I=Math.max(...[...qm.keys()].map(e=>e.split(" ").length)),RI=[...new Set([...fx,...[...qm.keys()].map(e=>e.split(" ")[0])])]});var Ns=K(()=>{});var Dc=K(()=>{Ae();Qn();Ns()});function xt({name:e,label:t,question:n,params:s=[],preconditions:o=[],add:r=[],del:i=[]}){return Object.freeze({type:os.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 hx,os,_e,ur,ht,_t,Zt,gx,bx,$t,wx,yx,Hm,NI,MI,PI,Km=K(()=>{hx=Object.freeze({cap:"urn:tmct:cap#",taught:"urn:tmct:taught#",mgx:"urn:tmct:mgx#",seon:"http://se-on.org/ontologies/seon.owl#"}),os=Object.freeze({Capability:"cap:Capability",Parameter:"cap:Parameter",Precondition:"cap:Precondition",Effect:"cap:Effect"}),_e=Object.freeze({Symbol:"seon:CodeEntity",Module:"mgx:Module",Class:"seon:ClassType",Query:"cap:FreeText",Kind:"cap:KindFilter",Package:"cap:PackageName"}),ur=Object.freeze({graphLoaded:"cap:graph-loaded",resolves:"cap:resolves",anyPresent:"cap:any-present",memoryFacts:"cap:memory-facts"}),ht=(e,t,{arg:n=e,required:s=!0,note:o=""}={})=>Object.freeze({type:os.Parameter,name:e,kind:t,arg:n,required:s,note:o}),_t=()=>Object.freeze({type:os.Precondition,pred:ur.graphLoaded}),Zt=(e,t)=>Object.freeze({type:os.Precondition,pred:ur.resolves,param:e,as:t}),gx=e=>Object.freeze({type:os.Precondition,pred:ur.anyPresent,params:Object.freeze([...e])}),bx=()=>Object.freeze({type:os.Precondition,pred:ur.memoryFacts}),$t=(e,t=null)=>Object.freeze({type:os.Effect,pred:"cap:knows",topic:e,of:t?`?${t}`:null});wx=Object.freeze([xt({name:"tmct_search",label:"search",question:"lexical search across the graph",params:[ht("query",_e.Query,{required:!1,note:"required unless a kind filter is given"}),ht("kind",_e.Kind,{required:!1}),ht("name",_e.Query,{required:!1}),ht("decorator",_e.Query,{required:!1})],preconditions:[_t(),gx(["query","kind"])],add:[$t("matches","query")]}),xt({name:"tmct_describe",label:"describe",question:"a symbol's definition, kind and relations",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[$t("description","symbol")]}),xt({name:"tmct_signature",label:"signature",question:"a symbol's signature only",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[$t("signature","symbol")]}),xt({name:"tmct_impact",label:"impact",question:"what a change to this module or symbol reaches (impact closure)",params:[ht("module",_e.Symbol,{note:"a Module, or any sited symbol \u2014 a fine-grained seed walks callsSymbol dependents and coarsens them to module grain"})],preconditions:[_t(),Zt("module",_e.Symbol)],add:[$t("impact","module")]}),xt({name:"tmct_members",label:"members",question:"the methods/attributes of a class",params:[ht("class",_e.Class,{arg:"class"})],preconditions:[_t(),Zt("class",_e.Class)],add:[$t("members","class")]}),xt({name:"tmct_subclasses",label:"subclasses",question:"the subclasses of a class",params:[ht("class",_e.Class,{arg:"class"})],preconditions:[_t(),Zt("class",_e.Class)],add:[$t("subclasses","class")]}),xt({name:"tmct_exports",label:"exports",question:"a module's public exports",params:[ht("module",_e.Module)],preconditions:[_t(),Zt("module",_e.Module)],add:[$t("exports","module")]}),xt({name:"tmct_callers",label:"callers",question:"functions that call this symbol",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[$t("callers","symbol")]}),xt({name:"tmct_callees",label:"callees",question:"functions this symbol calls",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[$t("callees","symbol")]}),xt({name:"tmct_calls",label:"calls",question:"the call edges out of this symbol/module",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[$t("calls","symbol")]}),xt({name:"tmct_tests_for",label:"tests",question:"the tests covering this symbol",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[$t("tests","symbol")]}),xt({name:"tmct_untested",label:"untested",question:"symbols with no covering test",params:[],preconditions:[_t()],add:[$t("untested",null)]}),xt({name:"tmct_history",label:"history",question:"the commit history of this symbol",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[$t("history","symbol")]}),xt({name:"tmct_cochanges",label:"cochanges",question:"symbols that change together with this one",params:[ht("symbol",_e.Symbol)],preconditions:[_t(),Zt("symbol",_e.Symbol)],add:[$t("cochanges","symbol")]}),xt({name:"tmct_architecture",label:"arch",question:"the architecture overview (optional package filter)",params:[ht("package",_e.Package,{required:!1})],preconditions:[_t()],add:[$t("architecture","package")]}),xt({name:"tmct_related",label:"related",question:"a term's synonyms and related concepts (the SKOS view over the conversational-memory graph)",params:[ht("term",_e.Query,{note:"a concept term, matched against memory relation facts rather than resolved in the code graph"})],preconditions:[bx()],add:[$t("related","term")]})]),yx=e=>Object.freeze(e.reduce((t,n)=>(t[n.name]=n,t),Object.create(null))),Hm=wx,NI=yx(Hm),MI=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"}),PI=Object.freeze({prefixes:hx,vocab:os,kinds:_e,precond:ur,get capabilities(){return Hm}})});var Ym=K(()=>{Km()});var Xm=K(()=>{Vs()});var rO,Zm=K(()=>{Et();Be();Wn();Io();Vs();Ye();rO=J(".tmct","memory","blocks")});var ef=K(()=>{Ns()});var nf=K(()=>{Wn();Io();Ns()});var Uc=K(()=>{Wn();Io();Ns()});var sf=K(()=>{Uc();Wn();bs();Ns()});var of=K(()=>{});var rf=K(()=>{ef();nf();Uc();sf();of();Ns()});var af=K(()=>{Zm();Ye();Ur();Cc();rf();Dc()});var df=K(()=>{});var Mx,pf=K(()=>{Et();Be();Ye();df();Mx=J(".tmct","sessions")});var pt,gM,bM,wM,yM,vM,$M,xM,kM,EM,SM,jM,_M,RM,AM,TM,CM,IM,OM,Px,ff=K(()=>{pt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},gM=pt("createRequire"),bM=pt("readFileSync"),wM=pt("access"),yM=pt("readFile"),vM=pt("writeFile"),$M=pt("appendFile"),xM=pt("mkdir"),kM=pt("mkdtemp"),EM=pt("rename"),SM=pt("unlink"),jM=pt("rm"),_M=pt("stat"),RM=pt("copyFile"),AM=pt("readdir"),TM=pt("createReadStream"),CM=pt("createWriteStream"),IM=pt("randomBytes"),OM=pt("spawnSync"),Px=pt("createInterface")});var Dx,$o,hf,Fx,gf,UM,Dn,WM,wi,GM,bf=K(()=>{Os();Et();ff();ss();Be();Qr();Ye();Dx={},$o=J(ke(Mt(Dx.url)),"..","..",".."),hf=J($o,"corpus","conceptnet","slice.jsonl"),Fx=J($o,"src","adapters","corpus","conceptnet-map.toml"),gf=J($o,"corpus","seon","concepts.jsonl"),UM=J($o,"corpus","seon","definitions.jsonl"),Dn=J($o,"corpus","tier2"),WM=J(Dn,"manifest.json"),wi=J($o,"corpus","wordnet"),GM=J(wi,"manifest.json")});function Ux(){return{seon:{kind:"corpus",active:!1,corpusPath:gf,provenancePrefix:"corpus:seon"},conceptnet:{kind:"corpus",active:!1,corpusPath:hf,provenancePrefix:"corpus:conceptnet",limit:void 0,prefer:Bx},human:{kind:"corpus",active:!0,corpusPath:J(Dn,"human.jsonl"),provenancePrefix:"corpus:human"},"human-medium":{kind:"corpus",active:!1,corpusPath:J(Dn,"human-medium.jsonl"),provenancePrefix:"corpus:human-medium"},"human-large":{kind:"corpus",active:!1,corpusPath:J(Dn,"human-large.jsonl"),provenancePrefix:"corpus:human-large"},"tier2-aws":{kind:"corpus",active:!1,corpusPath:J(Dn,"aws.jsonl"),provenancePrefix:"corpus:tier2-aws"},"tier2-python":{kind:"corpus",active:!1,corpusPath:J(Dn,"python.jsonl"),provenancePrefix:"corpus:tier2-python"},"tier2-java":{kind:"corpus",active:!1,corpusPath:J(Dn,"java.jsonl"),provenancePrefix:"corpus:tier2-java"},"tier2-general":{kind:"corpus",active:!1,corpusPath:J(Dn,"general.jsonl"),provenancePrefix:"corpus:tier2-general"},"wordnet-xl":{kind:"corpus",active:!1,corpusPath:J(wi,"wordnet-xl.jsonl"),provenancePrefix:"corpus:wordnet-xl"},"wordnet-full":{kind:"corpus",active:!1,corpusPath:J(wi,"wordnet-full.jsonl"),provenancePrefix:"corpus:wordnet-full"},namenet:{kind:"corpus",active:!1,corpusPath:J(zx,"namenet.jsonl"),provenancePrefix:"corpus:namenet"}}}var Wx,zx,t0,Bx,n0,wf=K(()=>{Be();Et();ss();ti();bf();Wx={},zx=J(ke(Mt(Wx.url)),"..","..","corpus","namenet"),t0=Object.freeze(["corpus","lexicon","templates","pack","ontology"]),Bx=["rdfs:subClassOf","rdf:type","mgx:usedFor","mgx:partOf","mgx:capableOf"];n0=Object.freeze(Ux())});var yf={};zn(yf,{proseLemma:()=>Gx});function Gx(){if(Ms!==void 0)return Ms;try{let e=Ic();if(!e)return Ms=null,Ms;let t=e.its,n=new Map;Ms=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{Ms=null}return Ms}var Ms,vf=K(()=>{Oc()});Be();Et();Be();jn();var Ht=e=>({type:"object",required:["symbol"],properties:{symbol:{type:"string",description:e}}}),jl=e=>({type:"object",required:["module"],properties:{module:{type:"string",description:e}}}),_l=e=>({type:"object",required:["class"],properties:{class:{type:"string",description:e}}}),Ti=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:qt}},{name:"tmct_describe",tier:"cold",summary:"Locate one symbol and list its typed edges (both directions) with provenance.",inputSchema:Ht("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:Ht("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:jl("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:_l("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:_l("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:jl("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:Ht("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:Ht("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:Ht("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:Ht("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:Ht("A class name."),example:{symbol:"Truncator"}},{name:"tmct_callers",tier:"cold",summary:"Modules that call into a symbol's module (one hop).",inputSchema:Ht("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:Ht("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:Ht("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:Ht("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:Ht("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:{}}]),Rl=Ti.filter(e=>e.tier==="hot"),IE=Ti.filter(e=>e.tier==="cold"),OE=Object.freeze(Ti.map(e=>e.name));Ct();var qs={};zn(qs,{clearCache:()=>gh,emptyEntities:()=>Ci,fetchEntities:()=>vh,registerProvider:()=>bh});Et();Ct();function hh(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 Tl(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})=>hh(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=f=>o.has(f)?`${c}/${f}`:f;Array.isArray(l.classes)&&r.classes.push(...l.classes),Array.isArray(l.vocabulary)&&r.vocabulary.push(...l.vocabulary);for(let f of Array.isArray(l.individuals)?l.individuals:[]){if(!f)continue;let p={...f};p.id&&(p.id=u(p.id)),Array.isArray(p.derived_from)&&(p.derived_from=p.derived_from.map(m=>u(m))),Array.isArray(p.mentions)&&(p.mentions=p.mentions.map(m=>m&&m.id?{...m,id:u(m.id)}:m)),r.individuals.push(p)}for(let f of Array.isArray(l.objectProperties)?l.objectProperties:[]){if(!f)continue;let p={...f};Array.isArray(p.examples)&&(p.examples=p.examples.map(m=>{if(!m)return m;let b={...m};return b.subject&&(b.subject=u(b.subject)),b.object&&(b.object=u(b.object)),b})),r.objectProperties.push(p)}let d=l.proseIndex&&typeof l.proseIndex=="object"?l.proseIndex:{};for(let[f,p]of Object.entries(d)){let m=r.proseIndex[f]||(r.proseIndex[f]=[]);for(let b of Array.isArray(p)?p:[]){let h=u(b);m.includes(h)||m.push(h)}}}return r.generated_at=i,a&&(r.bootstrap=!0),r}var Gs=null,To=null,wr=null;function gh(){Gs=null,To=null}function bh(e){if(e!=null&&typeof e!="function")throw new TypeError("registerProvider expects a function (config) => entities payload, or null");let t=wr;return wr=e??null,Gs=null,t}function Ci(){return{generated_at:"",bootstrap:!0,classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}}}async function wh(e){let t;try{t=await De(e,"utf8")}catch(n){if(n?.code==="ENOENT")return Ci();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 yh(e){let t=e.graphFiles,n=[...t].map(String).sort().join("|");if(To&&To.key===n)return To.payload;let s=[];for(let r=0;r<t.length;r++){let i=await wh(t[r]);s.push({file:t[r],payload:i,name:e.graphNames?.[r]})}let o=Tl(s);return To={key:n,payload:o},o}async function vh(e){if(wr){let s;try{s=await wr(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 yh(e);if(Gs&&Gs.file===e.graphFile)return Gs.payload;let t;try{t=await De(e.graphFile,"utf8")}catch(s){if(s?.code==="ENOENT")return Ci();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 Gs={file:e.graphFile,payload:n},n}Qn();Ur();Ct();Ae();async function Wo(e,t){let n=await t.fetchEntities(e),s=Er(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}Et();Be();Ct();Dr();Ae();Qn();Ur();Ct();Ae();var Go=200;function st(e,t){let n=String(e?.[t]||"").trim();if(!n)throw new Oe(`${t} is required`);return n}function gt(e,t,n){let{match:s,candidates:o}=Ut(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 Ke=e=>(t,{graph:n,svc:s})=>{let{match:o}=gt(s,st(t,"symbol"),"symbol");return e(n,o)};async function cp(e,{config:t,source:n=qs,trim:s=!1,tel:o=null}={}){let r=String(e?.symbol||"").trim();if(!r)throw new Oe("symbol is required");let i=String(e?.depth||"auto").trim().toLowerCase(),a=!!e?.min,l=!!e?.untuned,c=!!e?.max,u=await Wo(t,n),d=ke(ke(t.graphFile)),f=Br(u,{sourceAccess:!0,repoRoot:d,readFile:De,tel:o,ask:Jn}),{match:p}=gt(f,r,"symbol"),m=Ys(u,p),b,h,g=!1;a||i==="min"?(b="TINY",h=ws("TINY")):c||i==="full"?(b="FULL",h=ws("FULL"),g=!0):{tier:b,mask:h,topup:g}=_r(m,u,{untuned:l}),s&&!c&&(h=Iu(h));let y=null;if(m.moduleLabel)try{({lines:y}=await On({readFile:De,repoRoot:d,path:m.moduleLabel}))}catch{y=null}let w=$=>y&&y[$-1]!=null?y[$-1].trim():"",k=($,v)=>Zn(y,$,v,Go).text,S=[`Edit context for ${m.moduleLabel} [${b}${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&&m.anchor?.site&&y){let{start:$,end:v}=m.anchor.site;S.push(`
103
+ ## anchor: ${m.anchor.label} (${m.anchor.class}) @ ${m.moduleLabel}:${$}-${v}`),S.push(k($,v)),m.callHint&&S.push(m.callHint)}if(h.registration&&m.globals.length){S.push(`
104
+ ## registration / module globals (replicate this pattern):`);for(let $ of m.globals)S.push(` ${$.label} = ${$.value}${$.site?` [:${$.site.start}]`:""}`)}if(h.exemplar&&m.exemplar?.site&&y){let{start:$,end:v}=m.exemplar.site,A=m.exemplar.decorators?` @${m.exemplar.decorators}`:"";S.push(`
105
+ ## closest example (full body) \u2014 copy this style: ${m.exemplar.label} (${m.exemplar.class})${A} @ ${m.moduleLabel}:${$}-${v}`),S.push(k($,v)),m.callHint&&S.push(m.callHint)}if(h.inlinedCallees&&m.calleeBodies.length&&y){let $=120;for(let v of m.calleeBodies){if($<=0)break;let A=v.site.start,C=v.site.path===m.moduleLabel&&y?y:await On({readFile:De,repoRoot:d,path:v.site.path}).then(R=>R.lines).catch(()=>null);if(!C)continue;let E=Zn(C,A,v.site.end,$);S.push(`
106
+ ## inlined callee body (depth-1 in-repo call): ${v.label} @ ${v.site.path}:${A}-${v.site.end}`),S.push(E.text),$-=E.end-A+1}}if(h.classMembers&&m.classMembers&&m.classMembers.members.length){S.push(`
107
+ ## members of ${m.classMembers.className} (the edit likely lives INSIDE this class \u2014 copy a member's shape, do not read the class body):`);for(let $ of m.classMembers.members){let v=String($.label).split(".").pop(),A=$.params!=null&&$.params!==""?`(${$.params})${$.returns?` -> ${$.returns}`:""}`:"",T=$.decorators?`@${$.decorators} `:"",C=$.raises?` raises=${$.raises}`:"";S.push(` ${$.class} ${v}${$.site?` :${$.site.start}`:""} ${T}${v}${A}${C}`)}}if(h.siblings&&m.siblings.length){S.push(`
108
+ ## sibling symbols to copy the style of (most relevant first; ${m.siblings.length} total):`);for(let $ of m.siblings.slice(0,m.siblingCap)){let v=$.site?w($.site.start):"",A=$.decorators?`@${$.decorators} `:"",T=$.raises?` raises=${$.raises}`:"";S.push(` ${$.class} ${$.label}${$.site?` :${$.site.start}`:""} ${A}${v}${T}`)}m.siblings.length>m.siblingCap&&S.push(` \u2026+${m.siblings.length-m.siblingCap} more (use tmct_search kind=function or tmct_snippet <name> for any of them)`)}if(h.allExports&&m.allExports&&S.push(`
108
109
  ## module __all__ \u2014 this module curates its public API; ADD your new public symbol to this list so it is importable:
109
- ${f.allExports}`),h.reexports&&f.exports&&f.exports.length&&E.push(`
110
- ## re-exported symbols (resolved __all__ \u2192 defining module): ${f.exports.join(", ")}`),h.insertionRegion&&f.insertionRegion&&y){let $=f.insertionRegion.start,v=Math.min(y.length,$+40-1);E.push(`
111
- ## insertion region (write your new sibling here) \u2014 ${f.moduleLabel}:${$}-${v}`),E.push(y.slice($-1,v).map((A,T)=>`${$+T} ${A}`).join(`
112
- `))}else f.insertion&&E.push(`
113
- ## insert the new sibling after line ~${f.insertion} (end of the last top-level definition).`);return h.tests&&f.tests.length&&E.push(`
114
- ## covering tests: ${f.tests.join(", ")}`),h.cochange&&f.cochange&&f.cochange.length&&E.push(`
115
- ## usually changed together (consider editing these too): ${f.cochange.map($=>`${$.label} (\xD7${$.weight})`).join(", ")}`),E.push(`
116
- 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}.`),b!=="FULL"&&E.push(`(bundle tier ${b}; for any omitted sections run tmct_context_more {"symbol":"${r}"}, or tmct_context with depth="full".)`),{text:E.join(`
117
- `),tier:b,topup:g}}async function Ca(e,{config:t,source:n,tel:s}){return(await ap(e,{config:t,source:n,tel:s})).text}Ca.ownsGraphLoad=!0;Ae();function cp(e,{graph:t,svc:n}){let{match:s}=gt(n,nt(e,"symbol"),"symbol");return Iu(Ks(t,s))}Ae();go();async function dm(e,{graph:t,svc:n,config:s}){let o=nt(e,"symbol"),{match:r,candidates:i}=Ut(n.graph,o);if(r)return Vi(t,r,{candidates:i});let a=di(await $n(s),o);if(a)return a;gt(n,o,"symbol")}St();Ct();zr();Ae();async function pm(e,{graph:t,svc:n,repoRoot:s}){let o=nt(e,"symbol"),{match:r,candidates:i}=gt(n,o,"symbol"),a=bt(r);if(!a)throw new Ie(`"${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 On({readFile:ze,repoRoot:s,path:a.path,start:a.start,end:a.end,maxLines:Go})}catch(h){throw h instanceof Ie?h:new Ie(`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?`
118
- \u2026 (truncated to ${Go} lines; full span ${d})`:"",f=i.length?`
119
- (other matches: ${i.map(h=>h.label).join(", ")})`:"",b=Yi(t,r);return`${m}
110
+ ${m.allExports}`),h.reexports&&m.exports&&m.exports.length&&S.push(`
111
+ ## re-exported symbols (resolved __all__ \u2192 defining module): ${m.exports.join(", ")}`),h.insertionRegion&&m.insertionRegion&&y){let $=m.insertionRegion.start,v=Math.min(y.length,$+40-1);S.push(`
112
+ ## insertion region (write your new sibling here) \u2014 ${m.moduleLabel}:${$}-${v}`),S.push(y.slice($-1,v).map((A,T)=>`${$+T} ${A}`).join(`
113
+ `))}else m.insertion&&S.push(`
114
+ ## insert the new sibling after line ~${m.insertion} (end of the last top-level definition).`);return h.tests&&m.tests.length&&S.push(`
115
+ ## covering tests: ${m.tests.join(", ")}`),h.cochange&&m.cochange&&m.cochange.length&&S.push(`
116
+ ## usually changed together (consider editing these too): ${m.cochange.map($=>`${$.label} (\xD7${$.weight})`).join(", ")}`),S.push(`
117
+ 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 ${m.moduleLabel}.`),b!=="FULL"&&S.push(`(bundle tier ${b}; for any omitted sections run tmct_context_more {"symbol":"${r}"}, or tmct_context with depth="full".)`),{text:S.join(`
118
+ `),tier:b,topup:g}}async function Ca(e,{config:t,source:n,tel:s}){return(await cp(e,{config:t,source:n,tel:s})).text}Ca.ownsGraphLoad=!0;Ae();function lp(e,{graph:t,svc:n}){let{match:s}=gt(n,st(e,"symbol"),"symbol");return Ou(Ys(t,s))}Ae();bo();async function pm(e,{graph:t,svc:n,config:s}){let o=st(e,"symbol"),{match:r,candidates:i}=Ut(n.graph,o);if(r)return Vi(t,r,{candidates:i});let a=di(await $n(s),o);if(a)return a;gt(n,o,"symbol")}Et();Ct();Dr();Ae();async function mm(e,{graph:t,svc:n,repoRoot:s}){let o=st(e,"symbol"),{match:r,candidates:i}=gt(n,o,"symbol"),a=wt(r);if(!a)throw new Oe(`"${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 On({readFile:De,repoRoot:s,path:a.path,start:a.start,end:a.end,maxLines:Go})}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}`,f=`${r.label} \u2014 ${r.class||"Entity"} @ ${a.path}:${d}`,p=u?`
119
+ \u2026 (truncated to ${Go} lines; full span ${d})`:"",m=i.length?`
120
+ (other matches: ${i.map(h=>h.label).join(", ")})`:"",b=Yi(t,r);return`${f}
120
121
  ${c}${p}${b?`
121
- ${b}`:""}${f}`}Ae();var mm=Ke(mu);Ae();function fm(e,{graph:t,svc:n}){let{match:s}=gt(n,nt(e,"module"),"module");return nu(t,s)}Ct();Ae();go();async function hm(e,{graph:t,config:n}){let s=String(e?.query||"").trim(),o=String(e?.kind||"").trim();if(!s&&!o)throw new Ie("query is required");let r=du(t,s,{kind:o,decorator:String(e?.decorator||"").trim(),name:String(e?.name||"").trim()});if(!o&&/^no module matches/.test(r)){let i=di(await $n(n),s);if(i)return i}return r}Ae();go();async function gm(e,{graph:t,svc:n,config:s}){let o=nt(e,"class"),{match:r}=Ut(n.graph,o);if(r)return pu(t,r);let i=ui(await $n(s),o);if(i)return i;gt(n,o,"class")}Ae();go();async function bm(e,{graph:t,svc:n,config:s}){let o=nt(e,"class"),{match:r}=Ut(n.graph,o);if(r)return fu(t,r);let i=ui(await $n(s),o);if(i)return i;gt(n,o,"class")}Ct();Sc();go();async function Ec(e,{config:t}){let n=nt(e,"term"),s=kc(await $n(t),n);if(!s)throw new Ie(`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(`
122
- `)}Ec.ownsGraphLoad=!0;Ae();function wm(e,{graph:t}){return hu(t,{pkg:String(e?.package||"").trim()})}Ae();function ym(e,{graph:t,svc:n}){let{match:s}=gt(n,nt(e,"module"),"module");return Mu(t,s)}Ae();function vm(e,{graph:t}){return wu(t)}Ct();Qn();function $m(e,{graph:t}){let{content:n,tmct_ask:s}=Jn(t,nt(e,"query"));return`${n}
122
+ ${b}`:""}${m}`}Ae();var fm=Ke(fu);Ae();function hm(e,{graph:t,svc:n}){let{match:s}=gt(n,st(e,"module"),"module");return su(t,s)}Ct();Ae();bo();async function gm(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 r=pu(t,s,{kind:o,decorator:String(e?.decorator||"").trim(),name:String(e?.name||"").trim()});if(!o&&/^no module matches/.test(r)){let i=di(await $n(n),s);if(i)return i}return r}Ae();bo();async function bm(e,{graph:t,svc:n,config:s}){let o=st(e,"class"),{match:r}=Ut(n.graph,o);if(r)return mu(t,r);let i=ui(await $n(s),o);if(i)return i;gt(n,o,"class")}Ae();bo();async function wm(e,{graph:t,svc:n,config:s}){let o=st(e,"class"),{match:r}=Ut(n.graph,o);if(r)return hu(t,r);let i=ui(await $n(s),o);if(i)return i;gt(n,o,"class")}Ct();Ec();bo();async function Sc(e,{config:t}){let n=st(e,"term"),s=kc(await $n(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(r=>r.prefLabel).join(", ")}`),o.push("(from the memory graph's mgx:synonym / mgx:relatedTo / mgx:similarTo facts)"),o.join(`
123
+ `)}Sc.ownsGraphLoad=!0;Ae();function ym(e,{graph:t}){return gu(t,{pkg:String(e?.package||"").trim()})}Ae();function vm(e,{graph:t,svc:n}){let{match:s}=gt(n,st(e,"module"),"module");return Pu(t,s)}Ae();function $m(e,{graph:t}){return yu(t)}Ct();Qn();function xm(e,{graph:t}){let{content:n,tmct_ask:s}=Jn(t,st(e,"query"));return`${n}
123
124
 
124
125
  ---tmct_ask---
125
- ${JSON.stringify(s,null,2)}`}Ae();var xm=Ke(bu);Ae();var km=Ke(yu);Ae();var Sm=Ke(ju);Ae();var Em=Ke(Ru);Ae();var jm=Ke(Au);Ae();var _m=Ke($u);Ae();var Rm=Ke(xu);Ae();var Am=Ke(Su);Ae();var Tm=Ke(Nu);Ye();function j$(e){let t={subject:e.subject,predicate:e.predicate,object:e.object,provenance:e.provenance||""};return e.quantifier&&(t.quantifier=e.quantifier),t}function _$(e){let t=(e||[]).map(j$);return t.map(n=>JSON.stringify(n)).join(`
126
+ ${JSON.stringify(s,null,2)}`}Ae();var km=Ke(wu);Ae();var Em=Ke(vu);Ae();var Sm=Ke(_u);Ae();var jm=Ke(Au);Ae();var _m=Ke(Tu);Ae();var Rm=Ke(xu);Ae();var Am=Ke(ku);Ae();var Tm=Ke(Su);Ae();var Cm=Ke(Mu);Ye();function R$(e){let t={subject:e.subject,predicate:e.predicate,object:e.object,provenance:e.provenance||""};return e.quantifier&&(t.quantifier=e.quantifier),t}function A$(e){let t=(e||[]).map(R$);return t.map(n=>JSON.stringify(n)).join(`
126
127
  `)+(t.length?`
127
- `:"")}function Cm(e){return _$(Qt(e))}Be();Ye();async function jc(e,{config:t}){let{dir:n,close:s}=await fo(ke(ke(t.graphFile)));try{return Cm(await Jt(n))||"(the memory store holds no facts to export)"}finally{await s()}}jc.ownsGraphLoad=!0;var R$=Object.freeze({tmct_context:Ca,tmct_context_more:cp,tmct_describe:dm,tmct_snippet:pm,tmct_signature:mm,tmct_impact:fm,tmct_search:hm,tmct_members:gm,tmct_subclasses:bm,tmct_related:Ec,tmct_architecture:wm,tmct_exports:ym,tmct_untested:vm,tmct_ask:$m,tmct_tests_for:xm,tmct_history:km,tmct_file_history:Sm,tmct_method_history:Em,tmct_class_history:jm,tmct_callers:_m,tmct_callees:Rm,tmct_calls:Am,tmct_cochanges:Tm,tmct_export:jc});Mo();var pi=()=>{};_c();var mi=()=>({relations:[],constructions:[]});Ir(void 0);pi(mi);var Im=_l.map(({name:e,agentDescription:t,inputSchema:n})=>({name:e,description:t,inputSchema:n}));Ct();Ae();Qn();var ot=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},_A=ot("createRequire"),RA=ot("readFileSync"),AA=ot("access"),TA=ot("readFile"),CA=ot("writeFile"),IA=ot("appendFile"),OA=ot("mkdir"),LA=ot("mkdtemp"),NA=ot("rename"),MA=ot("unlink"),PA=ot("rm"),FA=ot("stat"),zA=ot("copyFile"),DA=ot("readdir"),BA=ot("createReadStream"),UA=ot("createWriteStream");var A$=ot("randomBytes"),GA=ot("spawnSync"),WA=ot("createInterface");Ac();var C$=/^src:corpus:(.+)$/;function I$(e,t={}){let n=C$.exec(String(e||""));if(!n)return 1;let s=t?.[n[1]];return typeof s=="number"&&Number.isFinite(s)?s:1}function O$(e,t={}){let n=Array.isArray(e?.sourceIds)?e.sourceIds:[];return n.length?Math.max(...n.map(s=>I$(s,t))):1}function ft(e,t={}){return(Array.isArray(e)?e:[]).map((s,o)=>({row:s,index:o,bias:O$(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)}Ye();Ka();Cc();Oc();jn();qn();Mo();_c();Lo();ar();gn();ar();Bm();Os();var gi=()=>{throw new Error("gunzipSync unavailable in a browser bundle")};ss();Be();var Q$={},GC=X(ke(Mt(Q$.url)),"..","..","..");gn();ar();gn();Os();ss();Be();gn();var Z$={},cI=X(ke(Mt(Z$.url)),"..","..","..");var uI=Object.freeze(["task","autoFeedback","alloFeedback","turnManagement","timeManagement","discourseStructuring","ownCommunicationManagement","partnerCommunicationManagement","socialObligationsManagement","contactManagement"]),dI=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"})}),pI=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"});Sc();var ex=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,tx=Object.freeze(["action-signature","action-precond","action-effect","action-constraint"]),nx=new Set(tx),Ls=e=>typeof e=="string"&&e.trim()!=="";function Nc(e){return typeof e=="string"&&ex.test(e)}function Um(e){return!!e&&typeof e=="object"&&Ls(e.s)}function Mc(e){return!!e&&typeof e=="object"&&e.kind==="fact"&&Nc(e.world)&&Ls(e.subject)&&Ls(e.predicate)&&Ls(e.object)}function Pc(e){if(!e||typeof e!="object"||e.kind!=="rule"||!Nc(e.world)||!Ls(e.name)||!nx.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(Ls)}function Fc(e){return!!e&&typeof e=="object"&&e.kind==="meta"&&Nc(e.world)&&Ls(e.opening)}function Gm(e){return Mc(e)||Pc(e)||Fc(e)}qm();zc();Km();Ym();Os();ss();Be();var xx={},wx=X(ke(Mt(xx.url)),"..","..","..");function yx(e=process.env){return e?.TMCT_WORLDS_PACK_DIR||X(wx,"corpus","worlds")}var Dc=new Map,Bc=new Map;function Xm(e){try{return gi(bo(e))}catch{return null}}function Jm(e){if(Dc.has(e))return Dc.get(e);let t=null,n=Xm(X(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 Dc.set(e,t),t}function vx(e,t){let n=Jm(e);if(!n)return null;let s=n[String(t??"")];if(!Um(s))return null;let o=`${e}\0${t}`;if(Bc.has(o))return Bc.get(o);let r=null,i=Xm(X(e,"shards",`${s.s}.jsonl.gz`));if(i){let a=[],l=[],c=null;for(let u of i.toString("utf8").split(`
128
- `))if(u.trim())try{let d=JSON.parse(u);if(!Gm(d)||d.world!==t)continue;Mc(d)?a.push(d):Pc(d)?l.push(d):Fc(d)&&!c&&(c=d)}catch{}(a.length||l.length||c)&&(r={name:t,facts:a,rules:l,meta:c})}return Bc.set(o,r),r}var $x=e=>({list:async()=>{let t=Jm(e());return t?Object.keys(t).sort():null},load:async t=>vx(e(),t)}),VI=$x(()=>yx());Ye();rf();var bi=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})}),cL=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"}),lL=Object.freeze({default_lo:"defaultLo",default_hi:"defaultHi",max_bound:"maxBound"}),uL=Object.freeze({max_depth:"maxDepth"});var _x=Object.freeze({x:2,y:2});var cf=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})});var mL=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"])]);bs();Ye();gn();Ye();var BL=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");Be();Os();St();var ct=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},GL=ct("createRequire"),WL=ct("readFileSync"),qL=ct("access"),VL=ct("readFile"),HL=ct("writeFile"),KL=ct("appendFile"),YL=ct("mkdir"),XL=ct("mkdtemp"),JL=ct("rename"),QL=ct("unlink"),ZL=ct("rm"),eN=ct("stat"),tN=ct("copyFile"),nN=ct("readdir"),sN=ct("createReadStream"),oN=ct("createWriteStream");var rN=ct("randomBytes"),iN=ct("spawnSync"),aN=ct("createInterface");var lt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},lN=lt("createRequire"),uN=lt("readFileSync"),dN=lt("access"),pN=lt("readFile"),mN=lt("writeFile"),fN=lt("appendFile"),hN=lt("mkdir"),gN=lt("mkdtemp"),bN=lt("rename"),wN=lt("unlink"),yN=lt("rm"),vN=lt("stat"),$N=lt("copyFile"),xN=lt("readdir"),kN=lt("createReadStream"),SN=lt("createWriteStream");var EN=lt("randomBytes"),jN=lt("spawnSync"),Ox=lt("createInterface");var ut=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},RN=ut("createRequire"),AN=ut("readFileSync"),TN=ut("access"),CN=ut("readFile"),IN=ut("writeFile"),ON=ut("appendFile"),LN=ut("mkdir"),NN=ut("mkdtemp"),MN=ut("rename"),PN=ut("unlink"),FN=ut("rm"),zN=ut("stat"),DN=ut("copyFile"),BN=ut("readdir"),UN=ut("createReadStream"),GN=ut("createWriteStream");var WN=ut("randomBytes"),lf=ut("spawnSync"),qN=ut("createInterface");Ct();Be();St();Be();ti();Ct();Ae();df();St();Be();bf();Ir(void 0);pi(mi);var sl=new Set(["it","this","that","here"]),Gx=e=>sl.has(String(e||"").trim().toLowerCase());var en={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"},yi=e=>e?`${String(e).toLowerCase()}(s)`:"entities",vf="look up a taught fact about a subject/verb/object";function Zc(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 ${yi(e.entityType)}`;if(t==="list")return`list/enumerate ${yi(e.entityType)} matching a condition`;if(t==="superlative")return`rank/compare ${yi(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 Zc(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&&en[o]?en[o]:`filter/traverse ${yi(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&&en[s]||"check a specific subject/object relationship":(n==="reverse"||n==="forward")&&s?en[s]||`understand a "${s}" relationship`:"understand a graph relationship"}var Of={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}};var F1=new Set(["stats","memory","focus",...Object.keys(Of)]);var $f={Class:["class","classes"],Function:["function","functions"],Module:["module","modules"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"],Session:["session","sessions"]};var Wx=new Set(["have","has","holds","hold"]);var z1=new RegExp(`\\b(?:${[...Object.keys(ae),...Object.keys(us)].filter(e=>!Wx.has(e)).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})\\b`,"i");var D1=new Set([...Im.map(e=>e.name),...Object.values(Of).map(e=>e.tool)]);var Lf=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"]),Nf=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"]),Mf=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"]);var qx=new Set(["ok","okay","cool","aight","fair enough","got it","gotcha","noted","sounds good","sure","cool cool","right"]);var xf=e=>e.replace(/(.)\1+/g,"$1");function ol(e){let t=new Map;for(let n of e)t.has(xf(n))||t.set(xf(n),n);return t}var B1=ol(Lf),U1=ol(Nf),G1=ol(Mf);var W1=new RegExp(`^(?:${[...qx].map(Ve).join("|")})\\s+(.+)$`,"i");var q1=[...Lf,...Nf,...Mf,"what can you do","what do you do","help","how do you work","who are you","what are you","what is your name"];var rl="(?:[a-z]+er|better|worse|(?:more|less)\\s+[a-z]+)",V1=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are)\\s+(${rl})\\s+than\\s+(.+)$`,"i"),Vx=new RegExp(`^(?:is|are)\\s+(.+?)\\s+(${rl})\\s+than\\s+(.+?)[?.!\\s]*$`,"i"),We="on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside";var Gc="mgx:ownedBy",Wc="mgx:hasProperty",ki="rdfs:subClassOf",Hx=new Set(["operator","teach","entailed"]),Ps=e=>!!e.sourceTypes?.some(t=>Hx.has(t));function qc(e,t=ki){let n=[],s=[];for(let o of e)o.predicate===t&&(s.push([o.subject,o.object]),Ps(o)&&n.push([o.subject,o.object]));return{strictEdges:n,broadEdges:s}}function Vc(e,t,n,s,o){return e(t,n,[],s.strictEdges,o)||e(t,n,[],s.broadEdges,o)}var H1=new RegExp(`^you\\s+(?:can|may)\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${We})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),K1=new RegExp(`^an?\\s+([a-z][\\w-]*)\\s+(?:can|may)\\s+be\\s+([a-z]+)\\s+(${We})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Y1=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${We})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*nothing\\s+may\\s+([a-z]+)\\s+(${We})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),X1=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${We})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+must\\s+be\\s+(${rl})\\s+than\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),J1=new RegExp(`^([a-z]+ing)\\s+an?\\s+([a-z][\\w-]*)\\s+(${We})\\s+an?\\s+([a-z][\\w-]*)\\s+makes\\s+(?:it|the\\s+([a-z][\\w-]*))\\s+([a-z]+)\\s+(${We})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Q1=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${We})\\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");var Z1=new RegExp(`^the\\s+goal\\s+is\\s+that\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${We})\\s+([\\w-]+)[.!?]*$`,"i"),eP=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+to\\s+([a-z]+)\\s+(${We})\\s+([\\w-]+)[.!?]*$`,"i"),tP=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+(${We})\\s+([\\w-]+)[.!?]*$`,"i"),nP=new RegExp(`^(?:can|could)\\s+you\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${We})\\s+an?\\s+([a-z][\\w-]*)[?.!]*$`,"i");var sP=new RegExp(`^(?:get|put|place|stack)\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${We})\\s+([\\w-]+)[?.!]*$`,"i"),oP=new RegExp(`^the\\s+goal\\s+is\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${We})\\s+([\\w-]+)[?.!]*$`,"i");var rP=new RegExp(`^(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${We})\\s+([\\w-]+)$`,"i");var iP=new RegExp(`^(?:what|who)\\s+([a-z']+)\\s+(${We})\\s+(.+?)[?.!\\s]*$`,"i"),aP=new RegExp(`^what\\s+(?:does|do|is)\\s+([\\w-]+)\\s+([a-z]+)(?:\\s+(${We}))?[?.!\\s]*$`,"i");var kf=/^(?:anywhere|everywhere|nowhere|somewhere)$/i;function il(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}var al="(?:(?:usually|often|sometimes|rarely|always|typically|generally|occasionally|frequently|normally|regularly|commonly|mostly|currently|still|also|really|actually)\\s+)?",Kx="(?:cannot|can't|can not|does not|doesn't|do not|don't|never)",cP=new RegExp(`^(.+?)\\s+(${Kx})\\s+(.+)$`,"i");var lP=new RegExp(`^([\\w'-]+)\\s+${al}([a-z]+)\\s+(.+?)[.!?]*$`,"i");var uP=new RegExp(`^(?:the\\s+|an?\\s+)([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+([a-z]+)\\s+(${We})\\s+(.+?)[.!?]*$`,"i");var Hc=/^(?:is|are|am|owns|maintains)$/i,Kc=/\b(?:is|are|am|owns|maintains)\b/i,Yx=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)$","i"),dP=new RegExp(`^(?:${ms.filter(e=>!/\s/.test(e)).join("|")})$`,"i");async function Yc(e){let t=String(e||"").toLowerCase();if(t==="has"||t==="have")return Cs;if(t==="can")return"mgx:capableOf";try{let{proseLemma:n}=await Promise.resolve().then(()=>(yf(),wf)),s=n(),o=s?s(t):t;return o==="have"?Cs:Nn(`mgx:${o}`)}catch{return Nn(`mgx:${t}`)}}var Xx=new RegExp(`^(?:does|did)\\s+([\\w'-]+)\\s+${al}([a-z]+)\\s+(.+?)[?.!\\s]*$`,"i"),Jx=new RegExp(`^what\\s+(?:does|did)\\s+([\\w'-]+)\\s+${al}([a-z]+(?:\\s+(?:${We}))?)[?.!\\s]*$`,"i"),Xc=/^(?:be|own|maintain)$/i,Qx=new RegExp(`^(${We})\\s+(.+)$`,"i");function Zx(e,t){let n=String(t||"").match(Qx);return n&&/^mgx:[a-z]+$/.test(e)?{predicate:`${e}-${n[1].toLowerCase()}`,object:n[2].trim()}:{predicate:e,object:String(t||"").trim()}}var ek=Object.freeze(["you're","i'm","it's","they're","he's","she's","we're","you","i","it","they","he","she","we"]),pP=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(${ek.join("|")})\\s+\\S+`,"i");var mP=new RegExp(`^([\\w-]+)\\s+([a-z]+)s\\s+(${We})\\s+([\\w-]+)$`,"i"),fP=new RegExp(`^forget\\s+(?:that\\s+)?([\\w-]+)\\s+([a-z]+)s\\s+(${We})\\s+([\\w-]+)$`,"i");var Pf="(?:\\s+(?:exactly|really|actually|anyway))?",hP=new RegExp(`^what\\s+does\\s+(.+?)\\s+do${Pf}\\??$`,"i"),gP=new RegExp(`^what\\s+(.+?)\\s+does${Pf}\\??$`,"i");var Ff="([A-Za-z][\\w'.-]*(?:\\s+[A-Za-z][\\w'.-]*){0,3})",bP=new RegExp(`^who\\s+(?:is|was)\\s+${Ff}$`,"i"),wP=new RegExp(`^what\\s+(?:did|has)\\s+${Ff}\\s+(?:touch(?:ed)?|chang(?:e|ed)|work(?:ed)?\\s+on|commit(?:ted)?)$`,"i");var tk="(?:good|bad|clean|messy|ugly|nice|great|terrible|awful|solid|elegant|readable|maintainable|well[- ]written|well[- ]structured|spaghetti|ok|okay|decent|healthy)",yP=new RegExp(`^is\\s+(?:this|the)\\s+code(?:base)?\\s+(?:any\\s+)?${tk}\\b`,"i");var vP=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");async function ur(e,t){if(!e||!t)return null;try{let{resolveObject:n}=await Promise.resolve().then(()=>(Qn(),sp)),s=n(e,t);if(s?.match?.id&&!s.ambiguous)return{id:s.match.id,label:s.match.label}}catch{}return null}var $P=new Set([...Object.keys(ae).flatMap(e=>e.split(/[\s-]+/)),...qt,...sn,"owns","maintains"].filter(e=>e.length>=3));var ko={"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"};function nk(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 zf(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 Df(e){if(ko[e])return ko[e];let t=String(e||""),n=jp(t);if(n){let r=Df(n);if(r==="can")return"cannot";if(r==="can be")return"cannot be";if(r==="is"||r.startsWith("is "))return`is not${r.slice(2)}`;let[i,...a]=r.split(" ");return["does not",zf(i),...a].join(" ")}let s=/^mgx:([a-z]+(?:-[a-z]+)*)-than$/i.exec(t);if(s)return`is ${s[1].replace(/-/g," ")} than`;let o=/^mgx:([a-z]+)(?:-([a-z]+))?$/i.exec(t);return o?`${nk(o[1])}${o[2]?` ${o[2]}`:""}`:e}var Rt=e=>`${e.subject} ${Df(e.predicate)} ${e.object}`;function Jc(e){let t=/^mgx:([a-z][\w-]*)$/i.exec(String(e||""));return t?t[1].toLowerCase():null}var sk=Object.entries(ko).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);function ok(e){let t=String(e||"").trim(),n=t.toLowerCase();for(let{marker:s,predicate:o}of sk)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: ${Rt(e)}${t}`:e.provenance.includes("corpus-weak:")?`possibly: ${Rt(e)}${t}`:e.provenance.includes("corpus:")?`${Rt(e)}${t}`:e.provenance.includes("reference:")?`${Rt(e)}${t}`:`i learned: ${Rt(e)}${t}`}function xo(e){let t=Tc().find(n=>n.kind==="article");return t&&Lm(String(e||""),t)?"an":"a"}function Bf(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 ${xo(e.object)} ${e.object}".`,replace:!0}:t?{text:`no \u2014 ${se(t)}`,replace:!0}:e?{text:`yes \u2014 ${se(e)}`,replace:!0}:null}function rk(e,t){let n=s=>`${Rt(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 ${xo(e.object)} ${e.object}".`,replace:!0}}function vi(e){let t=o=>`${Rt(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 Qc(e){try{let{loadMemory:t}=await Promise.resolve().then(()=>(Ye(),ns)),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 xt(e,t=null){if(t?.rows)return t.rows;try{let{loadMemory:n,readFactRows:s}=await Promise.resolve().then(()=>(Ye(),ns)),o=s(await n(e));return t&&(t.rows=o,t.reloads=(t.reloads||0)+1),o}catch{return[]}}var $i=null;function ik(e){if(!$i)try{$i=yo().nounPlurals}catch{$i=new Map}return $i.get(e)??null}function Si(e){let t=String(e||"").trim().toLowerCase();if(!t||/\s/.test(t))return t;try{return hi(yo(),t)?.lemma||t}catch{return t}}function ak(e){let t=String(e||"").trim().match(/^(?:all|every|each|both|most|some)\s+([\w-]+)$/i);if(!t)return Si(e);let n=Si(il(t[1]));return`${xo(n)} ${n}`}var ck=/^(?:every|each|all|any)\s+/i;function J(e,t){let n=e(t),s=new Set,o=new Set([n]),r=n.replace(ck,"").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=ik(i);a&&s.add(e(a))}return s}function Sf(e,t,n){for(let s of e)for(let o of t){let r=n(s,o);if(r)return r}return null}var Uf=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"]),xP=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("|")));var el=/^(?: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,Gf=/^(?:who|what)\s+(?:is|are)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,lk=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]+(?:\s+[A-Z][\w-]*)?)'s\s+([a-z][\w-]*)[?.!\s]*$/i;function Wf(e){let t=String(e).match(lk);return t?[t[0],t[2],t[1]]:null}var uk=/^list\s+(?:the\s+|all\s+)?([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,Fs=/^(?:is|are)\s+(?:an?\s+)?(.+?)\s+(?:a\s+kind\s+of|a\s+type\s+of|an?)\s+(.+?)[?.!\s]*$/i,$o=new Set(["rdfs:subClassOf","rdf:type"]),dk=6,pk=/^why\s+(?=(?:is|are)\b)/i,mk=/^explain\s+how\s+you\s+know\s+(?:that\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i;function qf(e){let t=String(e||"").replace(pk,"");if(t!==e){let s=t.match(Fs);if(s)return s}let n=String(e||"").match(mk);return n?`is ${n[1].trim()} a ${n[2].trim()}`.match(Fs):null}var tl=new Set(["kind","sort","type","subclass","superclass"]),fk=/^(?:so\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)\s*,?\s*(?:now\s+)?(?:right|correct|yeah)\??$/i,hk=/^(?: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,Pe=32,gk=/^(?:can|could)\s+(?:an?\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z]+)[?.!\s]*$/i,bk=/^(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+have\s+(?:an?\s+|the\s+)?(.+?)[?.!\s]*$/i,wk=/^what\s+can\s+(?:an?\s+)?(.+?)\s+do[?.!\s]*$/i,yk=/^what\s+has\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,vk=/^what\s+(?:(?:can\s+be|is)\s+used\s+for|is\s+for)\s+(.+?)[?.!\s]*$/i,$k=/^where(?:'s|\s+is|\s+are)\s+(.+?)(?:\s+now)?\s*[?.!]*$/i,Ef=/^mgx:[a-z]+-(?:on|in|at|inside|under|below|above|near|beside|behind|by)$/,xk=new RegExp(`^what(?:'s|\\s+is|\\s+are)\\s+(${We})\\s+(.+?)\\s*[?.!]*$`,"i"),kk=/^(?:do|does)\s+(all\s+|every\s+)?(?:an?\s+|the\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z-]+)[?.!\s]*$/i,Sk=/^what\s+can\s+(?!be\s)(.+?)[?.!\s]*$/i,Ek=/^(?:which|what)\s+([\w'-]+(?:\s+[\w'-]+)*?)\s+can\s+(.+?)[?.!\s]*$/i;function nl(e){return String(e||"").replace(/^(?:can't|cannot|can not)\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 jk(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=>`${Rt(s)}${s.provenance?` (source: ${s.provenance})`:""}`).join("; ")}function jf(e,t,n,{maxHops:s=3}={}){let o=J(Z,e),r=J(Z,t),i=Vr(o,r,n,{maxHops:s}),a=l=>{let c=l&&l.length?jk(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:
128
+ `:"")}function Im(e){return A$(Qt(e))}Be();Ye();async function jc(e,{config:t}){let{dir:n,close:s}=await ho(ke(ke(t.graphFile)));try{return Im(await Jt(n))||"(the memory store holds no facts to export)"}finally{await s()}}jc.ownsGraphLoad=!0;var T$=Object.freeze({tmct_context:Ca,tmct_context_more:lp,tmct_describe:pm,tmct_snippet:mm,tmct_signature:fm,tmct_impact:hm,tmct_search:gm,tmct_members:bm,tmct_subclasses:wm,tmct_related:Sc,tmct_architecture:ym,tmct_exports:vm,tmct_untested:$m,tmct_ask:xm,tmct_tests_for:km,tmct_history:Em,tmct_file_history:Sm,tmct_method_history:jm,tmct_class_history:_m,tmct_callers:Rm,tmct_callees:Am,tmct_calls:Tm,tmct_cochanges:Cm,tmct_export:jc});Po();var pi=()=>{};_c();var mi=()=>({relations:[],constructions:[]});Ir(void 0);pi(mi);var Om=Rl.map(({name:e,agentDescription:t,inputSchema:n})=>({name:e,description:t,inputSchema:n}));Ct();Ae();Qn();var rt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},TA=rt("createRequire"),CA=rt("readFileSync"),IA=rt("access"),OA=rt("readFile"),LA=rt("writeFile"),NA=rt("appendFile"),MA=rt("mkdir"),PA=rt("mkdtemp"),FA=rt("rename"),DA=rt("unlink"),zA=rt("rm"),BA=rt("stat"),UA=rt("copyFile"),WA=rt("readdir"),GA=rt("createReadStream"),qA=rt("createWriteStream");var C$=rt("randomBytes"),VA=rt("spawnSync"),HA=rt("createInterface");Ac();var O$=/^src:corpus:(.+)$/;function L$(e,t={}){let n=O$.exec(String(e||""));if(!n)return 1;let s=t?.[n[1]];return typeof s=="number"&&Number.isFinite(s)?s:1}function N$(e,t={}){let n=Array.isArray(e?.sourceIds)?e.sourceIds:[];return n.length?Math.max(...n.map(s=>L$(s,t))):1}function Xe(e,t={}){return(Array.isArray(e)?e:[]).map((s,o)=>({row:s,index:o,bias:N$(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)}Ye();Ka();Cc();Oc();jn();qn();Po();_c();No();cr();gn();cr();Um();Os();var gi=()=>{throw new Error("gunzipSync unavailable in a browser bundle")};ss();Be();var ex={},VC=J(ke(Mt(ex.url)),"..","..","..");gn();cr();gn();Os();ss();Be();gn();var tx={},dI=J(ke(Mt(tx.url)),"..","..","..");var mI=Object.freeze(["task","autoFeedback","alloFeedback","turnManagement","timeManagement","discourseStructuring","ownCommunicationManagement","partnerCommunicationManagement","socialObligationsManagement","contactManagement"]),fI=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"})}),hI=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"});Ec();var nx=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,sx=Object.freeze(["action-signature","action-precond","action-effect","action-constraint"]),ox=new Set(sx),Ls=e=>typeof e=="string"&&e.trim()!=="";function Nc(e){return typeof e=="string"&&nx.test(e)}function Wm(e){return!!e&&typeof e=="object"&&Ls(e.s)}function Mc(e){return!!e&&typeof e=="object"&&e.kind==="fact"&&Nc(e.world)&&Ls(e.subject)&&Ls(e.predicate)&&Ls(e.object)}function Pc(e){if(!e||typeof e!="object"||e.kind!=="rule"||!Nc(e.world)||!Ls(e.name)||!ox.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(Ls)}function Fc(e){return!!e&&typeof e=="object"&&e.kind==="meta"&&Nc(e.world)&&Ls(e.opening)}function Gm(e){return Mc(e)||Pc(e)||Fc(e)}Vm();Dc();Ym();Xm();Os();ss();Be();var Ex={},vx=J(ke(Mt(Ex.url)),"..","..","..");function $x(e=process.env){return e?.TMCT_WORLDS_PACK_DIR||J(vx,"corpus","worlds")}var zc=new Map,Bc=new Map;function Jm(e){try{return gi(wo(e))}catch{return null}}function Qm(e){if(zc.has(e))return zc.get(e);let t=null,n=Jm(J(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 zc.set(e,t),t}function xx(e,t){let n=Qm(e);if(!n)return null;let s=n[String(t??"")];if(!Wm(s))return null;let o=`${e}\0${t}`;if(Bc.has(o))return Bc.get(o);let r=null,i=Jm(J(e,"shards",`${s.s}.jsonl.gz`));if(i){let a=[],l=[],c=null;for(let u of i.toString("utf8").split(`
129
+ `))if(u.trim())try{let d=JSON.parse(u);if(!Gm(d)||d.world!==t)continue;Mc(d)?a.push(d):Pc(d)?l.push(d):Fc(d)&&!c&&(c=d)}catch{}(a.length||l.length||c)&&(r={name:t,facts:a,rules:l,meta:c})}return Bc.set(o,r),r}var kx=e=>({list:async()=>{let t=Qm(e());return t?Object.keys(t).sort():null},load:async t=>xx(e(),t)}),XI=kx(()=>$x());Ye();af();var bi=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})}),pL=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"}),mL=Object.freeze({default_lo:"defaultLo",default_hi:"defaultHi",max_bound:"maxBound"}),fL=Object.freeze({max_depth:"maxDepth"});var Ax=Object.freeze({x:2,y:2});var lf=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})});var bL=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"])]);bs();Ye();gn();Ye();var qL=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");Be();Os();Et();var lt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},HL=lt("createRequire"),KL=lt("readFileSync"),YL=lt("access"),XL=lt("readFile"),JL=lt("writeFile"),QL=lt("appendFile"),ZL=lt("mkdir"),eN=lt("mkdtemp"),tN=lt("rename"),nN=lt("unlink"),sN=lt("rm"),oN=lt("stat"),rN=lt("copyFile"),iN=lt("readdir"),aN=lt("createReadStream"),cN=lt("createWriteStream");var lN=lt("randomBytes"),uN=lt("spawnSync"),dN=lt("createInterface");var ut=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},mN=ut("createRequire"),fN=ut("readFileSync"),hN=ut("access"),gN=ut("readFile"),bN=ut("writeFile"),wN=ut("appendFile"),yN=ut("mkdir"),vN=ut("mkdtemp"),$N=ut("rename"),xN=ut("unlink"),kN=ut("rm"),EN=ut("stat"),SN=ut("copyFile"),jN=ut("readdir"),_N=ut("createReadStream"),RN=ut("createWriteStream");var AN=ut("randomBytes"),TN=ut("spawnSync"),Nx=ut("createInterface");var dt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},IN=dt("createRequire"),ON=dt("readFileSync"),LN=dt("access"),NN=dt("readFile"),MN=dt("writeFile"),PN=dt("appendFile"),FN=dt("mkdir"),DN=dt("mkdtemp"),zN=dt("rename"),BN=dt("unlink"),UN=dt("rm"),WN=dt("stat"),GN=dt("copyFile"),qN=dt("readdir"),VN=dt("createReadStream"),HN=dt("createWriteStream");var KN=dt("randomBytes"),uf=dt("spawnSync"),YN=dt("createInterface");Ct();Be();Et();Be();ti();Ct();Ae();pf();Et();Be();wf();Ir(void 0);pi(mi);var sl=new Set(["it","this","that","here"]),qx=e=>sl.has(String(e||"").trim().toLowerCase());var en={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"},yi=e=>e?`${String(e).toLowerCase()}(s)`:"entities",$f="look up a taught fact about a subject/verb/object";function Zc(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 ${yi(e.entityType)}`;if(t==="list")return`list/enumerate ${yi(e.entityType)} matching a condition`;if(t==="superlative")return`rank/compare ${yi(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 Zc(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&&en[o]?en[o]:`filter/traverse ${yi(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&&en[s]||"check a specific subject/object relationship":(n==="reverse"||n==="forward")&&s?en[s]||`understand a "${s}" relationship`:"understand a graph relationship"}var Nf={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}};var U1=new Set(["stats","memory","focus",...Object.keys(Nf)]);var xf={Class:["class","classes"],Function:["function","functions"],Module:["module","modules"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"],Session:["session","sessions"]};var Vx=new Set(["have","has","holds","hold"]);var W1=new RegExp(`\\b(?:${[...Object.keys(ae),...Object.keys(us)].filter(e=>!Vx.has(e)).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})\\b`,"i");var G1=new Set([...Om.map(e=>e.name),...Object.values(Nf).map(e=>e.tool)]);var Mf=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"]),Pf=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"]),Ff=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"]);var Hx=new Set(["ok","okay","cool","aight","fair enough","got it","gotcha","noted","sounds good","sure","cool cool","right"]);var kf=e=>e.replace(/(.)\1+/g,"$1");function ol(e){let t=new Map;for(let n of e)t.has(kf(n))||t.set(kf(n),n);return t}var q1=ol(Mf),V1=ol(Pf),H1=ol(Ff);var K1=new RegExp(`^(?:${[...Hx].map(Ve).join("|")})\\s+(.+)$`,"i");var Y1=[...Mf,...Pf,...Ff,"what can you do","what do you do","help","how do you work","who are you","what are you","what is your name"];var rl="(?:[a-z]+er|better|worse|(?:more|less)\\s+[a-z]+)",X1=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are)\\s+(${rl})\\s+than\\s+(.+)$`,"i"),Kx=new RegExp(`^(?:is|are)\\s+(.+?)\\s+(${rl})\\s+than\\s+(.+?)[?.!\\s]*$`,"i"),Ge="on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside";var Wc="mgx:ownedBy",Gc="mgx:hasProperty",ki="rdfs:subClassOf",Yx=new Set(["operator","teach","entailed"]),Ps=e=>!!e.sourceTypes?.some(t=>Yx.has(t));function qc(e,t=ki){let n=[],s=[];for(let o of e)o.predicate===t&&(s.push([o.subject,o.object]),Ps(o)&&n.push([o.subject,o.object]));return{strictEdges:n,broadEdges:s}}function Vc(e,t,n,s,o){return e(t,n,[],s.strictEdges,o)||e(t,n,[],s.broadEdges,o)}var J1=new RegExp(`^you\\s+(?:can|may)\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ge})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Q1=new RegExp(`^an?\\s+([a-z][\\w-]*)\\s+(?:can|may)\\s+be\\s+([a-z]+)\\s+(${Ge})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Z1=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ge})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*nothing\\s+may\\s+([a-z]+)\\s+(${Ge})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),eP=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ge})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+must\\s+be\\s+(${rl})\\s+than\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),tP=new RegExp(`^([a-z]+ing)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ge})\\s+an?\\s+([a-z][\\w-]*)\\s+makes\\s+(?:it|the\\s+([a-z][\\w-]*))\\s+([a-z]+)\\s+(${Ge})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),nP=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ge})\\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");var sP=new RegExp(`^the\\s+goal\\s+is\\s+that\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${Ge})\\s+([\\w-]+)[.!?]*$`,"i"),oP=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+to\\s+([a-z]+)\\s+(${Ge})\\s+([\\w-]+)[.!?]*$`,"i"),rP=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+(${Ge})\\s+([\\w-]+)[.!?]*$`,"i"),iP=new RegExp(`^(?:can|could)\\s+you\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ge})\\s+an?\\s+([a-z][\\w-]*)[?.!]*$`,"i");var aP=new RegExp(`^(?:get|put|place|stack)\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${Ge})\\s+([\\w-]+)[?.!]*$`,"i"),cP=new RegExp(`^the\\s+goal\\s+is\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${Ge})\\s+([\\w-]+)[?.!]*$`,"i");var lP=new RegExp(`^(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${Ge})\\s+([\\w-]+)$`,"i");var uP=new RegExp(`^(?:what|who)\\s+([a-z']+)\\s+(${Ge})\\s+(.+?)[?.!\\s]*$`,"i"),dP=new RegExp(`^what\\s+(?:does|do|is)\\s+([\\w-]+)\\s+([a-z]+)(?:\\s+(${Ge}))?[?.!\\s]*$`,"i");var Ef=/^(?:anywhere|everywhere|nowhere|somewhere)$/i;function il(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}var al="(?:(?:usually|often|sometimes|rarely|always|typically|generally|occasionally|frequently|normally|regularly|commonly|mostly|currently|still|also|really|actually)\\s+)?",Xx="(?:cannot|can't|can not|does not|doesn't|do not|don't|never)",pP=new RegExp(`^(.+?)\\s+(${Xx})\\s+(.+)$`,"i");var mP=new RegExp(`^([\\w'-]+)\\s+${al}([a-z]+)\\s+(.+?)[.!?]*$`,"i");var fP=new RegExp(`^(?:the\\s+|an?\\s+)([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+([a-z]+)\\s+(${Ge})\\s+(.+?)[.!?]*$`,"i");var Hc=/^(?:is|are|am|owns|maintains)$/i,Kc=/\b(?:is|are|am|owns|maintains)\b/i,Jx=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)$","i"),hP=new RegExp(`^(?:${ms.filter(e=>!/\s/.test(e)).join("|")})$`,"i");async function Yc(e){let t=String(e||"").toLowerCase();if(t==="has"||t==="have")return Cs;if(t==="can")return"mgx:capableOf";try{let{proseLemma:n}=await Promise.resolve().then(()=>(vf(),yf)),s=n(),o=s?s(t):t;return o==="have"?Cs:Nn(`mgx:${o}`)}catch{return Nn(`mgx:${t}`)}}var Qx=new RegExp(`^(?:does|did)\\s+([\\w'-]+)\\s+${al}([a-z]+)\\s+(.+?)[?.!\\s]*$`,"i"),Zx=new RegExp(`^what\\s+(?:does|did)\\s+([\\w'-]+)\\s+${al}([a-z]+(?:\\s+(?:${Ge}))?)[?.!\\s]*$`,"i"),Xc=/^(?:be|own|maintain)$/i,ek=new RegExp(`^(${Ge})\\s+(.+)$`,"i");function tk(e,t){let n=String(t||"").match(ek);return n&&/^mgx:[a-z]+$/.test(e)?{predicate:`${e}-${n[1].toLowerCase()}`,object:n[2].trim()}:{predicate:e,object:String(t||"").trim()}}var nk=Object.freeze(["you're","i'm","it's","they're","he's","she's","we're","you","i","it","they","he","she","we"]),gP=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(${nk.join("|")})\\s+\\S+`,"i");var bP=new RegExp(`^([\\w-]+)\\s+([a-z]+)s\\s+(${Ge})\\s+([\\w-]+)$`,"i"),wP=new RegExp(`^forget\\s+(?:that\\s+)?([\\w-]+)\\s+([a-z]+)s\\s+(${Ge})\\s+([\\w-]+)$`,"i");var Df="(?:\\s+(?:exactly|really|actually|anyway))?",yP=new RegExp(`^what\\s+does\\s+(.+?)\\s+do${Df}\\??$`,"i"),vP=new RegExp(`^what\\s+(.+?)\\s+does${Df}\\??$`,"i");var zf="([A-Za-z][\\w'.-]*(?:\\s+[A-Za-z][\\w'.-]*){0,3})",$P=new RegExp(`^who\\s+(?:is|was)\\s+${zf}$`,"i"),xP=new RegExp(`^what\\s+(?:did|has)\\s+${zf}\\s+(?:touch(?:ed)?|chang(?:e|ed)|work(?:ed)?\\s+on|commit(?:ted)?)$`,"i");var sk="(?:good|bad|clean|messy|ugly|nice|great|terrible|awful|solid|elegant|readable|maintainable|well[- ]written|well[- ]structured|spaghetti|ok|okay|decent|healthy)",kP=new RegExp(`^is\\s+(?:this|the)\\s+code(?:base)?\\s+(?:any\\s+)?${sk}\\b`,"i");var EP=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");async function dr(e,t){if(!e||!t)return null;try{let{resolveObject:n}=await Promise.resolve().then(()=>(Qn(),op)),s=n(e,t);if(s?.match?.id&&!s.ambiguous)return{id:s.match.id,label:s.match.label}}catch{}return null}var SP=new Set([...Object.keys(ae).flatMap(e=>e.split(/[\s-]+/)),...qt,...sn,"owns","maintains"].filter(e=>e.length>=3));var Eo={"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"},Sf=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"]),cl=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:works-in"]);function ok(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 Bf(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 Uf(e){if(Eo[e])return Eo[e];let t=String(e||""),n=_p(t);if(n){let r=Uf(n);if(r==="can")return"cannot";if(r==="can be")return"cannot be";if(r==="is"||r.startsWith("is "))return`is not${r.slice(2)}`;let[i,...a]=r.split(" ");return["does not",Bf(i),...a].join(" ")}let s=/^mgx:([a-z]+(?:-[a-z]+)*)-than$/i.exec(t);if(s)return`is ${s[1].replace(/-/g," ")} than`;let o=/^mgx:([a-z]+)(?:-([a-z]+))?$/i.exec(t);return o?`${ok(o[1])}${o[2]?` ${o[2]}`:""}`:e}var Rt=e=>`${e.subject} ${Uf(e.predicate)} ${e.object}`;function Jc(e){let t=/^mgx:([a-z][\w-]*)$/i.exec(String(e||""));return t?t[1].toLowerCase():null}var rk=Object.entries(Eo).filter(([e])=>!cl.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);function ik(e){let t=String(e||"").trim(),n=t.toLowerCase();for(let{marker:s,predicate:o}of rk)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: ${Rt(e)}${t}`:e.provenance.includes("corpus-weak:")?`possibly: ${Rt(e)}${t}`:e.provenance.includes("corpus:")?`${Rt(e)}${t}`:e.provenance.includes("reference:")?`${Rt(e)}${t}`:`i learned: ${Rt(e)}${t}`}function ko(e){let t=Tc().find(n=>n.kind==="article");return t&&Nm(String(e||""),t)?"an":"a"}function Wf(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 ${ko(e.object)} ${e.object}".`,replace:!0}:t?{text:`no \u2014 ${se(t)}`,replace:!0}:e?{text:`yes \u2014 ${se(e)}`,replace:!0}:null}function ak(e,t){let n=s=>`${Rt(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 ${ko(e.object)} ${e.object}".`,replace:!0}}function vi(e){let t=o=>`${Rt(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 Qc(e){try{let{loadMemory:t}=await Promise.resolve().then(()=>(Ye(),ns)),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 bt(e,t=null){if(t?.rows)return t.rows;try{let{loadMemory:n,readFactRows:s}=await Promise.resolve().then(()=>(Ye(),ns)),o=s(await n(e));return t&&(t.rows=o,t.reloads=(t.reloads||0)+1),o}catch{return[]}}var $i=null;function ck(e){if(!$i)try{$i=vo().nounPlurals}catch{$i=new Map}return $i.get(e)??null}function Ei(e){let t=String(e||"").trim().toLowerCase();if(!t||/\s/.test(t))return t;try{return hi(vo(),t)?.lemma||t}catch{return t}}function lk(e){let t=String(e||"").trim().match(/^(?:all|every|each|both|most|some)\s+([\w-]+)$/i);if(!t)return Ei(e);let n=Ei(il(t[1]));return`${ko(n)} ${n}`}var uk=/^(?:every|each|all|any)\s+/i;function X(e,t){let n=e(t),s=new Set,o=new Set([n]),r=n.replace(uk,"").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=ck(i);a&&s.add(e(a))}return s}function jf(e,t,n){for(let s of e)for(let o of t){let r=n(s,o);if(r)return r}return null}var Gf=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"]),jP=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("|")));var el=/^(?: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,qf=/^(?:who|what)\s+(?:is|are)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,dk=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]+(?:\s+[A-Z][\w-]*)?)'s\s+([a-z][\w-]*)[?.!\s]*$/i;function Vf(e){let t=String(e).match(dk);return t?[t[0],t[2],t[1]]:null}var pk=/^list\s+(?:the\s+|all\s+)?([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,Fs=/^(?:is|are)\s+(?:an?\s+)?(.+?)\s+(?:a\s+kind\s+of|a\s+type\s+of|an?)\s+(.+?)[?.!\s]*$/i,xo=new Set(["rdfs:subClassOf","rdf:type"]),mk=6,fk=/^why\s+(?=(?:is|are)\b)/i,hk=/^explain\s+how\s+you\s+know\s+(?:that\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i;function Hf(e){let t=String(e||"").replace(fk,"");if(t!==e){let s=t.match(Fs);if(s)return s}let n=String(e||"").match(hk);return n?`is ${n[1].trim()} a ${n[2].trim()}`.match(Fs):null}var tl=new Set(["kind","sort","type","subclass","superclass"]),gk=/^(?:so\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)\s*,?\s*(?:now\s+)?(?:right|correct|yeah)\??$/i,bk=/^(?: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,Ce=32,wk=/^(?:can|could)\s+(?:an?\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z]+)[?.!\s]*$/i,yk=/^(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+have\s+(?:an?\s+|the\s+)?(.+?)[?.!\s]*$/i,vk=/^what\s+can\s+(?:an?\s+)?(.+?)\s+do[?.!\s]*$/i,$k=/^what\s+has\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,xk=/^what\s+(?:(?:can\s+be|is)\s+used\s+for|is\s+for)\s+(.+?)[?.!\s]*$/i,kk=/^where(?:'s|\s+is|\s+are)\s+(.+?)(?:\s+now)?\s*[?.!]*$/i,_f=/^mgx:[a-z]+-(?:on|in|at|inside|under|below|above|near|beside|behind|by)$/,Ek=new RegExp(`^what(?:'s|\\s+is|\\s+are)\\s+(${Ge})\\s+(.+?)\\s*[?.!]*$`,"i"),Sk=/^(?:do|does)\s+(all\s+|every\s+)?(?:an?\s+|the\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z-]+)[?.!\s]*$/i,jk=/^what\s+can\s+(?!be\s)(.+?)[?.!\s]*$/i,_k=/^(?:which|what)\s+([\w'-]+(?:\s+[\w'-]+)*?)\s+can\s+(.+?)[?.!\s]*$/i;function nl(e){return String(e||"").replace(/^(?:can't|cannot|can not)\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 Rk(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=>`${Rt(s)}${s.provenance?` (source: ${s.provenance})`:""}`).join("; ")}function Rf(e,t,n,{maxHops:s=3}={}){let o=X(Z,e),r=X(Z,t),i=Vr(o,r,n,{maxHops:s}),a=l=>{let c=l&&l.length?Rk(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:
129
130
  ${[...i.negative,...i.positive].map(se).join(`
130
- `)}`,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 _f(e,t,n,{maxHops:s=3}={}){let o=J(Z,e),r=J(Z,t),i=Va(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,qa).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}.
131
+ `)}`,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 Af(e,t,n,{maxHops:s=3}={}){let o=X(Z,e),r=X(Z,t),i=Va(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,qa).map(f=>se(f.fact));return{text:`${l} ${a}, and of the ${i.kinds} kind${i.kinds===1?"":"s"} of ${i.klass} I know, ${u}.
131
132
  ${d.join(`
132
133
  `)}`,replace:!0,miss:!0}}let c=Ha(r,n,{exclude:new Set([...o,i.klass])});if(c.length){let u=c.slice(0,qa),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)`:""}:
133
134
  ${u.map(se).join(`
134
- `)}`,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}}var Vf="(?:most|least)\\s+[a-z][\\w-]*|[a-z][\\w-]*est|best|worst",_k=new RegExp(`^which\\s+([\\w'-]+)\\s+(?:is|are)\\s+(?:the\\s+)?(${Vf})[?.!\\s]*$`,"i"),Rk=new RegExp(`^what(?:'s|s|\\s+is)\\s+the\\s+(${Vf})\\s+([\\w'-]+)[?.!\\s]*$`,"i");function Ak(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}var Tk=new Set(["rdfs:subClassOf","rdf:type","mgx:hasA","mgx:capableOf","mgx:usedFor","mgx:ownedBy","owl:disjointWith","mgx:hasProperty","mgx:receivesAction"]),Ck=Object.entries(ko).filter(([e])=>!Tk.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),Ik=new Set(["rdfs:subClassOf","rdf:type","owl:disjointWith","mgx:hasProperty","mgx:hasA","mgx:capableOf","mgx:ownedBy"]),Ok=Object.entries(ko).filter(([e])=>!Ik.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=[zf(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),Rf=/^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,Lk=new Set(["changed","change","changes","updated","modified","happened","occurred"]);function xn(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 Hf(e,t,n,s,o={},r=null,i=null){return Kf(await Nk(e,t,n,s,o,r,i),n,t)}function Kf(e,t,n){if(!e||e.goal!==void 0)return e;let s=String(n||"").trim(),o=Zc(t?.parsed);if(!o&&e.generalVerbQuery&&(o=vf),!o){let r=s.match(el),i=r?null:s.match(Gf)||Wf(s),a=r?r[2]:i?i[1]:null;a&&!tl.has(a.toLowerCase())&&(o=vf)}if(!o){let r=s.match(Xf);r&&(o=Zc({shape:"meta",object:r[1]}))}return o?{...e,goal:o}:e}async function Nk(e,t,n,s,o={},r=null,i=null){let a;try{({normFactTerm:a}=await Promise.resolve().then(()=>(Ye(),ns)))}catch{return null}let l=String(t).trim(),c=l.match(vk);if(c){let _=J(a,c[1]),O=(await xt(e,r)).filter(P=>P.predicate==="mgx:usedFor"&&_.has(P.object));if(O.length){let L=ft(xn(O),o).map(se),D=L.slice(0,Pe),G=L.slice(Pe),B=G.length?`
135
- \u2026and ${G.length} more \u2014 say 'more' to see them.`:"";return{text:D.join(`
136
- `)+B,replace:!0,...G.length?{pending:{items:G,noun:"facts"}}:{}}}}for(let{predicate:_,re:O}of Ck){let P=l.match(O);if(!P)continue;let L=J(a,P[1]),D=(await xt(e,r)).filter(U=>U.predicate===_&&L.has(U.object));if(!D.length)continue;let B=ft(xn(D),o).map(se),F=B.slice(0,Pe),I=B.slice(Pe),M=I.length?`
135
+ `)}`,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}}var Kf="(?:most|least)\\s+[a-z][\\w-]*|[a-z][\\w-]*est|best|worst",Ak=new RegExp(`^which\\s+([\\w'-]+)\\s+(?:is|are)\\s+(?:the\\s+)?(${Kf})[?.!\\s]*$`,"i"),Tk=new RegExp(`^what(?:'s|s|\\s+is)\\s+the\\s+(${Kf})\\s+([\\w'-]+)[?.!\\s]*$`,"i");function Ck(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}var Ik=new Set(["rdfs:subClassOf","rdf:type","mgx:hasA","mgx:capableOf","mgx:usedFor","mgx:ownedBy","owl:disjointWith","mgx:hasProperty","mgx:receivesAction"]),Ok=Object.entries(Eo).filter(([e])=>!Ik.has(e)&&!cl.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),Lk=new Set(["rdfs:subClassOf","rdf:type","owl:disjointWith","mgx:hasProperty","mgx:hasA","mgx:capableOf","mgx:ownedBy"]),Nk=Object.entries(Eo).filter(([e])=>!Lk.has(e)&&!cl.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=[Bf(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),Tf=/^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,Mk=new Set(["changed","change","changes","updated","modified","happened","occurred"]);function xn(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 Yf(e,t,n,s,o={},r=null,i=null){return Xf(await Pk(e,t,n,s,o,r,i),n,t)}function Xf(e,t,n){if(!e||e.goal!==void 0)return e;let s=String(n||"").trim(),o=Zc(t?.parsed);if(!o&&e.generalVerbQuery&&(o=$f),!o){let r=s.match(el),i=r?null:s.match(qf)||Vf(s),a=r?r[2]:i?i[1]:null;a&&!tl.has(a.toLowerCase())&&(o=$f)}if(!o){let r=s.match(Qf);r&&(o=Zc({shape:"meta",object:r[1]}))}return o?{...e,goal:o}:e}async function Pk(e,t,n,s,o={},r=null,i=null){let a;try{({normFactTerm:a}=await Promise.resolve().then(()=>(Ye(),ns)))}catch{return null}let l=String(t).trim(),c=l.match(xk);if(c){let _=X(a,c[1]),O=(await bt(e,r)).filter(P=>P.predicate==="mgx:usedFor"&&_.has(P.object));if(O.length){let L=Xe(xn(O),o).map(se),B=L.slice(0,Ce),W=L.slice(Ce),U=W.length?`
136
+ \u2026and ${W.length} more \u2014 say 'more' to see them.`:"";return{text:B.join(`
137
+ `)+U,replace:!0,...W.length?{pending:{items:W,noun:"facts"}}:{}}}}for(let{predicate:_,re:O}of Ok){let P=l.match(O);if(!P)continue;let L=X(a,P[1]),B=(await bt(e,r)).filter(D=>D.predicate===_&&L.has(D.object));if(!B.length)continue;let U=Xe(xn(B),o).map(se),F=U.slice(0,Ce),I=U.slice(Ce),M=I.length?`
137
138
  \u2026and ${I.length} more \u2014 say 'more' to see them.`:"";return{text:F.join(`
138
- `)+M,replace:!0,...I.length?{pending:{items:I,noun:"facts"}}:{}}}let u=l.match(_k),d=u?null:l.match(Rk),m=u?u[1]:d?.[2],p=u?u[2]:d?.[1],f=m&&p?Ak(p):null;if(f){let _=`mgx:${f.replace(/\s+/g,"-")}-than`,O=await xt(e,r),P=J(a,m),L=[...P].sort((B,F)=>B.length-F.length)[0],D=B=>P.has(B)||B.startsWith(`${L}-`)||B.startsWith(`${L} `)||O.some(F=>$o.has(F.predicate)&&F.subject===B&&P.has(F.object)),G=xn(O.filter(B=>B.predicate===_&&Ps(B))).filter(B=>B.subject!==B.object&&D(B.subject)&&D(B.object));if(G.length){let B=new Set,F=new Map;for(let W of G)B.add(W.subject),B.add(W.object),F.set(W.object,(F.get(W.object)||0)+1),F.has(W.subject)||F.set(W.subject,F.get(W.subject)||0);let I=new Map(F),M=[],U=null;for(;I.size;){let W=[...I.keys()].filter(ne=>I.get(ne)===0);if(W.length!==1){U=W.length===0?{text:`I can't order the ${L}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} ${L} from what I know \u2014 nothing compares ${W[0]} and ${W[1]}. Teach me, e.g. "${W[0]} is ${f} than ${W[1]}".`,replace:!0,miss:!0};break}let q=W[0];M.push(q),I.delete(q);for(let ne of G)ne.subject===q&&I.has(ne.object)&&I.set(ne.object,I.get(ne.object)-1)}if(U)return U;let V=M.slice(0,-1).map((W,q)=>G.find(ne=>ne.subject===W&&ne.object===M[q+1]));if(V.every(Boolean)){let W=V.map(q=>`${Rt(q)}${q.provenance?` (source: ${q.provenance})`:""}`).join("; ");return{text:`${M[0]} \u2014 ${W}; so ${M[0]} is the ${p} ${L}`,replace:!0}}}}let b=s?l.match($k):null;if(b){let _=J(a,b[1]),O=(await xt(e,r)).filter(P=>Ef.test(P.predicate)&&_.has(P.subject));if(O.length){let L=ft(xn(O),o).map(se),D=L.slice(0,Pe),G=L.slice(Pe),B=G.length?`
139
- \u2026and ${G.length} more \u2014 say 'more' to see them.`:"";return{text:D.join(`
140
- `)+B,replace:!0,...G.length?{pending:{items:G,noun:"facts"}}:{}}}}let h=l.match(xk);if(h){let _=h[1].toLowerCase(),O=J(a,h[2].replace(/^(?:an?|the)\s+/i,"").trim()),P=(await xt(e,r)).filter(L=>Ef.test(L.predicate)&&L.predicate.endsWith(`-${_}`)&&O.has(L.object));if(P.length){let D=ft(xn(P),o).map(se),G=D.slice(0,Pe),B=D.slice(Pe),F=B.length?`
141
- \u2026and ${B.length} more \u2014 say 'more' to see them.`:"";return{text:G.join(`
142
- `)+F,replace:!0,...B.length?{pending:{items:B,noun:"facts"}}:{}}}}let g=n?.parsed?.shape==="meta"?n.parsed.object:null,y=n?.parsed&&n.parsed.node!=="miss";if(!g&&s&&!y&&!Rf.test(l)){let _=l.match(Xf)||l.match(/^what\s+(?:does|do)\s+(.+?)\s+means?[?.!\s]*$/i);_&&(g=ls(_[1]))}if(!g&&n?.ambiguous&&Array.isArray(n.candidateParses)){let _=n.candidateParses.find(O=>O?.shape==="meta"&&O.object);_&&(g=ls(String(_.object)))}if(g){let{subject:_,predicate:O}=ok(g),P=J(a,_),L=(await xt(e,r)).filter(M=>P.has(M.subject)),D=O?L.filter(M=>M.predicate===O):L;if(!D.length)return O&&L.length?{text:`I don't have any "${ko[O]}" facts about ${_}.`,replace:s}:null;D=ft(D,o);let G=D.map(se),B=G.slice(0,Pe),F=G.slice(Pe),I=F.length?`
143
- \u2026and ${F.length} more \u2014 say 'more' to see them.`:"";return{text:B.join(`
144
- `)+I,replace:s,...F.length?{pending:{items:F,noun:"facts"}}:{}}}if(!s)return null;let w=l.match(Vx);if(w){let O=`mgx:${w[2].toLowerCase().replace(/\s+/g,"-")}-than`,P=await Qc(e),L=V=>{let W=V.replace(/^(?:an?|the)\s+/i,"").trim();return i&&rs.test(W)?i:W},D=L(w[1]),G=L(w[3]),B=J(a,D),F=J(a,G),I=P.find(V=>V.predicate===O&&B.has(V.subject)&&F.has(V.object));if(I){let V=P.find(q=>q.predicate===O&&B.has(q.object)&&F.has(q.subject)),W=V?` \u2014 though you also told me the opposite: ${se(V)}. Both are stored; I won't silently pick one.`:"";return{text:`yes \u2014 ${se(I)}${W}`,replace:!0}}let M=P.filter(V=>V.predicate===O&&(B.has(V.subject)||B.has(V.object)));return{text:`I can't confirm that \u2014 nothing I remember compares them that way.${M.length?` I do know: ${M.slice(0,3).map(se).join("; ")}.`:""} If it's true, teach me: "${D} is ${w[2].toLowerCase()} than ${G}".`,replace:!0,miss:!0}}for(let{predicate:_,phrase:O,re:P}of Ok){let L=l.match(P);if(!L)continue;let D=await Qc(e),G=J(a,L[1]),B=J(a,L[2]),F=D.find(M=>M.predicate===_&&G.has(M.subject)&&B.has(M.object));if(F)return{text:`yes \u2014 ${se(F)}`,replace:!0};let I=D.filter(M=>M.predicate===_&&G.has(M.subject));if(I.length){let M=I.slice(0,3).map(se).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${L[1]} ${O} ${L[2]}. I do know: ${M}.`,replace:!0,miss:!0}}if(!n?.parsed&&D.some(M=>G.has(M.subject)))return{text:`I can't confirm that \u2014 nothing I remember says ${L[1]} ${O} ${L[2]}.`,replace:!0,miss:!0};break}let k=l.match(Fs)||qf(l);if(k){let _=J(a,k[1]),O=J(a,k[2]),P=await xt(e,r),L=F=>_.has(F.subject)&&O.has(F.object),{DISJOINT_PREDICATE:D}=await Promise.resolve().then(()=>(Gt(),Xt)),G=F=>_.has(F.subject)||_.has(F.object)||O.has(F.subject)||O.has(F.object);return P.some(F=>F.predicate===D&&Ps(F)&&G(F))?null:Bf(P.find(F=>$o.has(F.predicate)&&L(F)),P.find(F=>F.predicate===Wr&&L(F)))}let E=nl(l).match(gk);if(E){let _=await xt(e,r),O=jf(E[1],E[2],_);if(O)return O;let P=J(a,E[1]),L=_.filter(D=>D.predicate==="mgx:capableOf"&&P.has(D.subject));if(L.length){let D=L.slice(0,3).map(se).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${E[1]} can ${E[2]}. I do know: ${D}. If it's true, teach me: "a ${L[0].subject} can ${E[2]}".`,replace:!0,miss:!0}}return _f(E[1],E[2],_)}let $=l.match(bk);if($){let _=J(a,$[1]),O=J(a,$[2]),P=new Set(["mgx:hasA","tmct:has"]),L=await Qc(e),D=I=>L.find(M=>P.has(M.predicate)&&I.has(M.subject)&&O.has(M.object)),G=D(_);if(G)return{text:`yes \u2014 ${se(G)}`,replace:!0};let B=[{terms:_,chain:[]}],F=new Set;for(let I=0;I<4;I+=1){let M=[];for(let{terms:U,chain:V}of B){let W=L.filter(q=>$o.has(q.predicate)&&U.has(q.subject)&&!F.has(q.object));for(let q of W){if(F.has(q.object))continue;F.add(q.object);let ne=[...V,q],oe=D(J(a,q.object));if(oe)return{text:`yes \u2014 ${[...ne.map(se),se(oe)].join("; ")}`,replace:!0};M.push({terms:J(a,q.object),chain:ne})}}if(!M.length)break;B=M}return null}let v=nl(l).match(kk);if(v){let _=await xt(e,r),O=!!v[1],P=J(a,v[2]),L=J(a,v[3]),D=jf(v[2],v[3],_);if(D&&O)return{text:`I can't speak for all ${v[2]} \u2014 what I remember is generic, not universal. ${D.text}.`,replace:!0};if(D)return D;if(s){let G=_.filter(F=>F.predicate==="mgx:capableOf"&&P.has(F.subject));if(G.length){let F=G.slice(0,3).map(se).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${v[2]} can ${v[3]}. I do know: ${F}. If it's true, teach me: "a ${G[0].subject} can ${v[3]}".`,replace:!0,miss:!0}}let B=_f(v[2],v[3],_);if(B)return B;if(!/\s/.test(v[2].trim())&&!_.some(F=>P.has(F.subject)||P.has(F.object))){let F=il(Si(v[2]));return{text:`I can't confirm that \u2014 I don't know anything about "${v[2]}" yet. Teach me "a ${F} can ${v[3]}" (or "a ${F} cannot ${v[3]}") and I'll remember it.`,replace:!0,miss:!0}}}}let A=l.match(wk);if(A){let _=J(a,A[1]),O=(await xt(e,r)).filter(F=>(F.predicate==="mgx:capableOf"||F.predicate===oo)&&_.has(F.subject));if(!O.length)return null;let L=ft(xn(O),o).map(se),D=L.slice(0,Pe),G=L.slice(Pe),B=G.length?`
145
- \u2026and ${G.length} more \u2014 say 'more' to see them.`:"";return{text:D.join(`
146
- `)+B,replace:!0,...G.length?{pending:{items:G,noun:"facts"}}:{}}}let T=l.match(Ek);if(T){let _=J(a,T[1]),O=J(a,T[2]),P=await xt(e,r),L=xn(P.filter(D=>D.predicate==="mgx:capableOf"&&O.has(D.object))).filter(D=>Vr(new Set([D.subject]),O,P).verdict==="yes");if(L.length){let{findIsaChain:D,SUBCLASS_PREDICATE:G,TYPE_PREDICATE:B}=await Promise.resolve().then(()=>(Gt(),Xt)),F=P.filter(Y=>Y.predicate===G),I=P.filter(Y=>Y.predicate===B),M=F.map(Y=>[Y.subject,Y.object]),U=I.map(Y=>[Y.subject,Y.object]),V=Y=>(Y.predicate===G?F:I).find(ee=>ee.subject===Y.subject&&ee.object===Y.object),W=new Map,q=L.filter(Y=>_.has(Y.subject)?!0:(W.has(Y.subject)||W.set(Y.subject,D(Y.subject,_,U,M,{maxHops:3})),!!W.get(Y.subject))),oe=ft(q.length?q:L,o).map(Y=>{let ee=q.length?W.get(Y.subject):null;if(!ee||ee.length<2)return se(Y);let Ce=ee.map(V);if(!Ce.every(Boolean))return se(Y);let H=Ce.map(Q=>`${Rt(Q)}${Q.provenance?` (source: ${Q.provenance})`:""}`).join("; ");return`${se(Y)} \u2014 via: ${H}`}),Ee=oe.slice(0,Pe),ce=oe.slice(Pe),$e=ce.length?`
139
+ `)+M,replace:!0,...I.length?{pending:{items:I,noun:"facts"}}:{}}}let u=l.match(Ak),d=u?null:l.match(Tk),f=u?u[1]:d?.[2],p=u?u[2]:d?.[1],m=f&&p?Ck(p):null;if(m){let _=`mgx:${m.replace(/\s+/g,"-")}-than`,O=await bt(e,r),P=X(a,f),L=[...P].sort((U,F)=>U.length-F.length)[0],B=U=>P.has(U)||U.startsWith(`${L}-`)||U.startsWith(`${L} `)||O.some(F=>xo.has(F.predicate)&&F.subject===U&&P.has(F.object)),W=xn(O.filter(U=>U.predicate===_&&Ps(U))).filter(U=>U.subject!==U.object&&B(U.subject)&&B(U.object));if(W.length){let U=new Set,F=new Map;for(let G of W)U.add(G.subject),U.add(G.object),F.set(G.object,(F.get(G.object)||0)+1),F.has(G.subject)||F.set(G.subject,F.get(G.subject)||0);let I=new Map(F),M=[],D=null;for(;I.size;){let G=[...I.keys()].filter(te=>I.get(te)===0);if(G.length!==1){D=G.length===0?{text:`I can't order the ${L}s \u2014 the "${m} 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} ${L} from what I know \u2014 nothing compares ${G[0]} and ${G[1]}. Teach me, e.g. "${G[0]} is ${m} than ${G[1]}".`,replace:!0,miss:!0};break}let q=G[0];M.push(q),I.delete(q);for(let te of W)te.subject===q&&I.has(te.object)&&I.set(te.object,I.get(te.object)-1)}if(D)return D;let V=M.slice(0,-1).map((G,q)=>W.find(te=>te.subject===G&&te.object===M[q+1]));if(V.every(Boolean)){let G=V.map(q=>`${Rt(q)}${q.provenance?` (source: ${q.provenance})`:""}`).join("; ");return{text:`${M[0]} \u2014 ${G}; so ${M[0]} is the ${p} ${L}`,replace:!0}}}}let b=s?l.match(kk):null;if(b){let _=X(a,b[1]),O=(await bt(e,r)).filter(P=>_f.test(P.predicate)&&_.has(P.subject));if(O.length){let L=Xe(xn(O),o).map(se),B=L.slice(0,Ce),W=L.slice(Ce),U=W.length?`
140
+ \u2026and ${W.length} more \u2014 say 'more' to see them.`:"";return{text:B.join(`
141
+ `)+U,replace:!0,...W.length?{pending:{items:W,noun:"facts"}}:{}}}}let h=l.match(Ek);if(h){let _=h[1].toLowerCase(),O=X(a,h[2].replace(/^(?:an?|the)\s+/i,"").trim()),P=(await bt(e,r)).filter(L=>_f.test(L.predicate)&&L.predicate.endsWith(`-${_}`)&&O.has(L.object));if(P.length){let B=Xe(xn(P),o).map(se),W=B.slice(0,Ce),U=B.slice(Ce),F=U.length?`
142
+ \u2026and ${U.length} more \u2014 say 'more' to see them.`:"";return{text:W.join(`
143
+ `)+F,replace:!0,...U.length?{pending:{items:U,noun:"facts"}}:{}}}}let g=n?.parsed?.shape==="meta"?n.parsed.object:null,y=n?.parsed&&n.parsed.node!=="miss";if(!g&&s&&!y&&!Tf.test(l)){let _=l.match(Qf)||l.match(/^what\s+(?:does|do)\s+(.+?)\s+means?[?.!\s]*$/i);_&&(g=ls(_[1]))}if(!g&&n?.ambiguous&&Array.isArray(n.candidateParses)){let _=n.candidateParses.find(O=>O?.shape==="meta"&&O.object);_&&(g=ls(String(_.object)))}if(g){let{subject:_,predicate:O}=ik(g),P=X(a,_),L=(await bt(e,r)).filter(M=>P.has(M.subject)&&!Sf.has(M.predicate)),B=O?L.filter(M=>M.predicate===O):L;if(!B.length){if(O&&L.length)return{text:`I don't have any "${Eo[O]}" facts about ${_}.`,replace:s};if(!O){let M=Xe((await bt(e,r)).filter(D=>P.has(D.object)),o);if(M.length){let D=M.map(se),V=D.slice(0,Ce),G=D.slice(Ce),q=G.length?`
144
+ \u2026and ${G.length} more \u2014 say 'more' to see them.`:"";return{text:V.join(`
145
+ `)+q,replace:s,...G.length?{pending:{items:G,noun:"facts"}}:{}}}}return null}B=Xe(B,o);let W=B.map(se),U=W.slice(0,Ce),F=W.slice(Ce),I=F.length?`
146
+ \u2026and ${F.length} more \u2014 say 'more' to see them.`:"";return{text:U.join(`
147
+ `)+I,replace:s,...F.length?{pending:{items:F,noun:"facts"}}:{}}}if(!s)return null;let w=l.match(Kx);if(w){let O=`mgx:${w[2].toLowerCase().replace(/\s+/g,"-")}-than`,P=await Qc(e),L=V=>{let G=V.replace(/^(?:an?|the)\s+/i,"").trim();return i&&rs.test(G)?i:G},B=L(w[1]),W=L(w[3]),U=X(a,B),F=X(a,W),I=P.find(V=>V.predicate===O&&U.has(V.subject)&&F.has(V.object));if(I){let V=P.find(q=>q.predicate===O&&U.has(q.object)&&F.has(q.subject)),G=V?` \u2014 though you also told me the opposite: ${se(V)}. Both are stored; I won't silently pick one.`:"";return{text:`yes \u2014 ${se(I)}${G}`,replace:!0}}let M=P.filter(V=>V.predicate===O&&(U.has(V.subject)||U.has(V.object)));return{text:`I can't confirm that \u2014 nothing I remember compares them that way.${M.length?` I do know: ${M.slice(0,3).map(se).join("; ")}.`:""} If it's true, teach me: "${B} is ${w[2].toLowerCase()} than ${W}".`,replace:!0,miss:!0}}for(let{predicate:_,phrase:O,re:P}of Nk){let L=l.match(P);if(!L)continue;let B=await Qc(e),W=X(a,L[1]),U=X(a,L[2]),F=B.find(M=>M.predicate===_&&W.has(M.subject)&&U.has(M.object));if(F)return{text:`yes \u2014 ${se(F)}`,replace:!0};let I=B.filter(M=>M.predicate===_&&W.has(M.subject));if(I.length){let M=I.slice(0,3).map(se).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${L[1]} ${O} ${L[2]}. I do know: ${M}.`,replace:!0,miss:!0}}if(!n?.parsed&&B.some(M=>W.has(M.subject)))return{text:`I can't confirm that \u2014 nothing I remember says ${L[1]} ${O} ${L[2]}.`,replace:!0,miss:!0};break}let k=l.match(Fs)||Hf(l);if(k){let _=X(a,k[1]),O=X(a,k[2]),P=await bt(e,r),L=F=>_.has(F.subject)&&O.has(F.object),{DISJOINT_PREDICATE:B}=await Promise.resolve().then(()=>(Wt(),Xt)),W=F=>_.has(F.subject)||_.has(F.object)||O.has(F.subject)||O.has(F.object);return P.some(F=>F.predicate===B&&Ps(F)&&W(F))?null:Wf(P.find(F=>xo.has(F.predicate)&&L(F)),P.find(F=>F.predicate===Gr&&L(F)))}let S=nl(l).match(wk);if(S){let _=await bt(e,r),O=Rf(S[1],S[2],_);if(O)return O;let P=X(a,S[1]),L=_.filter(B=>B.predicate==="mgx:capableOf"&&P.has(B.subject));if(L.length){let B=L.slice(0,3).map(se).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${S[1]} can ${S[2]}. I do know: ${B}. If it's true, teach me: "a ${L[0].subject} can ${S[2]}".`,replace:!0,miss:!0}}return Af(S[1],S[2],_)}let $=l.match(yk);if($){let _=X(a,$[1]),O=X(a,$[2]),P=new Set(["mgx:hasA","tmct:has"]),L=await Qc(e),B=I=>L.find(M=>P.has(M.predicate)&&I.has(M.subject)&&O.has(M.object)),W=B(_);if(W)return{text:`yes \u2014 ${se(W)}`,replace:!0};let U=[{terms:_,chain:[]}],F=new Set;for(let I=0;I<4;I+=1){let M=[];for(let{terms:D,chain:V}of U){let G=L.filter(q=>xo.has(q.predicate)&&D.has(q.subject)&&!F.has(q.object));for(let q of G){if(F.has(q.object))continue;F.add(q.object);let te=[...V,q],oe=B(X(a,q.object));if(oe)return{text:`yes \u2014 ${[...te.map(se),se(oe)].join("; ")}`,replace:!0};M.push({terms:X(a,q.object),chain:te})}}if(!M.length)break;U=M}return null}let v=nl(l).match(Sk);if(v){let _=await bt(e,r),O=!!v[1],P=X(a,v[2]),L=X(a,v[3]),B=Rf(v[2],v[3],_);if(B&&O)return{text:`I can't speak for all ${v[2]} \u2014 what I remember is generic, not universal. ${B.text}.`,replace:!0};if(B)return B;if(s){let W=_.filter(F=>F.predicate==="mgx:capableOf"&&P.has(F.subject));if(W.length){let F=W.slice(0,3).map(se).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${v[2]} can ${v[3]}. I do know: ${F}. If it's true, teach me: "a ${W[0].subject} can ${v[3]}".`,replace:!0,miss:!0}}let U=Af(v[2],v[3],_);if(U)return U;if(!/\s/.test(v[2].trim())&&!_.some(F=>P.has(F.subject)||P.has(F.object))){let F=il(Ei(v[2]));return{text:`I can't confirm that \u2014 I don't know anything about "${v[2]}" yet. Teach me "a ${F} can ${v[3]}" (or "a ${F} cannot ${v[3]}") and I'll remember it.`,replace:!0,miss:!0}}}}let A=l.match(vk);if(A){let _=X(a,A[1]),O=(await bt(e,r)).filter(F=>(F.predicate==="mgx:capableOf"||F.predicate===ro)&&_.has(F.subject));if(!O.length)return null;let L=Xe(xn(O),o).map(se),B=L.slice(0,Ce),W=L.slice(Ce),U=W.length?`
148
+ \u2026and ${W.length} more \u2014 say 'more' to see them.`:"";return{text:B.join(`
149
+ `)+U,replace:!0,...W.length?{pending:{items:W,noun:"facts"}}:{}}}let T=l.match(_k);if(T){let _=X(a,T[1]),O=X(a,T[2]),P=await bt(e,r),L=xn(P.filter(B=>B.predicate==="mgx:capableOf"&&O.has(B.object))).filter(B=>Vr(new Set([B.subject]),O,P).verdict==="yes");if(L.length){let{findIsaChain:B,SUBCLASS_PREDICATE:W,TYPE_PREDICATE:U}=await Promise.resolve().then(()=>(Wt(),Xt)),F=P.filter(Y=>Y.predicate===W),I=P.filter(Y=>Y.predicate===U),M=F.map(Y=>[Y.subject,Y.object]),D=I.map(Y=>[Y.subject,Y.object]),V=Y=>(Y.predicate===W?F:I).find(ee=>ee.subject===Y.subject&&ee.object===Y.object),G=new Map,q=L.filter(Y=>_.has(Y.subject)?!0:(G.has(Y.subject)||G.set(Y.subject,B(Y.subject,_,D,M,{maxHops:3})),!!G.get(Y.subject))),oe=Xe(q.length?q:L,o).map(Y=>{let ee=q.length?G.get(Y.subject):null;if(!ee||ee.length<2)return se(Y);let Ie=ee.map(V);if(!Ie.every(Boolean))return se(Y);let H=Ie.map(Q=>`${Rt(Q)}${Q.provenance?` (source: ${Q.provenance})`:""}`).join("; ");return`${se(Y)} \u2014 via: ${H}`}),Se=oe.slice(0,Ce),ce=oe.slice(Ce),$e=ce.length?`
147
150
  \u2026and ${ce.length} more \u2014 say 'more' to see them.`:"";return{text:(q.length?"":`nothing I remember ties these to "${T[1]}", but:
148
- `)+Ee.join(`
149
- `)+$e,replace:!0,...ce.length?{pending:{items:ce,noun:"facts"}}:{}}}}let C=l.match(Sk);if(C&&C[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let _=J(a,C[1]),O=Ha(_,await xt(e,r));if(O.length){let L=ft(xn(O),o).map(se),D=L.slice(0,Pe),G=L.slice(Pe),B=G.length?`
150
- \u2026and ${G.length} more \u2014 say 'more' to see them.`:"";return{text:D.join(`
151
- `)+B,replace:!0,...G.length?{pending:{items:G,noun:"facts"}}:{}}}}let S=l.match(yk);if(S&&!Lk.has(S[1].trim().split(/\s+/)[0]?.toLowerCase())){let _=J(a,S[1]),O=(await xt(e,r)).filter(F=>F.predicate==="mgx:hasA"&&_.has(F.object));if(!O.length)return null;let L=ft(xn(O),o).map(se),D=L.slice(0,Pe),G=L.slice(Pe),B=G.length?`
152
- \u2026and ${G.length} more \u2014 say 'more' to see them.`:"";return{text:D.join(`
153
- `)+B,replace:!0,...G.length?{pending:{items:G,noun:"facts"}}:{}}}let R=l.match(Rf),N=n?.parsed?.shape==="reverse"&&n.parsed.kind==="inherits"?n.parsed.object:R?.[1];if(N){let _=J(a,N),O=(await xt(e,r)).filter(F=>$o.has(F.predicate)&&_.has(F.object));if(!O.length)return null;let L=ft(xn(O),o).map(se),D=L.slice(0,Pe),G=L.slice(Pe),B=G.length?`
154
- \u2026and ${G.length} more \u2014 say 'more' to see them.`:"";return{text:D.join(`
155
- `)+B,replace:!0,...G.length?{pending:{items:G,noun:"facts"}}:{}}}let j=l.match(hk);if(j){let _=J(a,j[1]),O=await xt(e,r),P=H=>!String(H.provenance||"").includes("corpus:")&&!String(H.provenance||"").includes("web:"),L=O.filter(H=>$o.has(H.predicate)&&P(H)),D=new Set,G=_;for(let H=0;H<8&&G.size;H+=1){let Q=new Set;for(let re of L)G.has(re.object)&&!D.has(re.subject)&&Q.add(re.subject);if(!Q.size)break;for(let re of Q)D.add(re);let we=new Set;for(let re of Q)for(let be of J(a,re))we.add(be);G=we}let B=O.filter(H=>_.has(H.subject)||_.has(H.object)||D.has(H.subject));if(!B.length){let H=a(j[1]).split(/\s+/).filter(Q=>Q.length>=4&&!Uf.has(Q));if(H.length){let Q=re=>new Set(String(re||"").split(/\s+/)),we=re=>{let be=Q(re);return H.some(Fe=>be.has(Fe))};B=O.filter(re=>we(re.subject)||we(re.object))}}if(!B.length)return null;let{findConsistencyViolations:F,TYPE_PREDICATE:I,SUBCLASS_PREDICATE:M,DISJOINT_PREDICATE:U}=await Promise.resolve().then(()=>(Gt(),Xt)),V=H=>!H.provenance?.includes("corpus:")&&!H.provenance?.includes("web:"),W=O.filter(H=>H.predicate===I&&V(H)).map(H=>[H.subject,H.object]),q=O.filter(H=>H.predicate===M&&V(H)).map(H=>[H.subject,H.object]),ne=O.filter(H=>H.predicate===U&&V(H)).map(H=>[H.subject,H.object]);if(ne.length){let Q=F(W,q,ne,{focus:_,budget:5}).find(we=>_.has(we.subject));if(Q)return{text:`I can't answer that \u2014 what I've been told about ${Q.subject} is inconsistent: it's taught to be both ${Q.classA} and ${Q.classB}, but ${Q.viaA} and ${Q.viaB} are disjoint (${Q.viaA} owl:disjointWith ${Q.viaB}). I'd need one of those retracted before I can answer honestly.`,replace:!0}}let oe=B.find(H=>_.has(H.subject)||_.has(H.object)),Ee=oe?_.has(oe.subject)?oe.subject:oe.object:j[1].trim(),ce=B.some(H=>D.has(H.subject)&&!_.has(H.subject)&&!_.has(H.object));B=ft(B,o);let $e=B.map(H=>` ${se(H)}`),te=$e.slice(0,Pe),Y=$e.slice(Pe),ee=Y.length?`
156
- \u2026and ${Y.length} more \u2014 say 'more' to see them.`:"";return{text:`${`${B.length} remembered fact${B.length===1?"":"s"} about ${Ee}${ce?" (including its known subtypes)":""}:`}
157
- ${te.join(`
158
- `)}${ee}`,replace:!0,...Y.length?{pending:{items:Y.map(H=>H.trim()),noun:"facts"}}:{}}}return null}var Mk=/^what\s+(?:did|have)\s+(?:i|we|you)\s+(?:told|tell|said|say)\s+(?:you|me|us)?\s*about\s+(.+?)[?.!\s]*$/i,Pk=/^what\s+kind\s+of\s+(?:thing|class|type|category|entity)?\s*(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,Fk=/^does\s+every\s+(.+?)\s+have\s+at\s+least\s+(\d+)\s+(.+?)[?.!\s]*$/i,zk=/^does\s+an?\s+(.+?)\s+have\s+an?\s+(.+?)[?.!\s]*$/i,Af=new Set(["owl:cardinality","owl:minCardinality","owl:maxCardinality","owl:onClass"]),Dk=/^who\s+(?:owns|maintains)\s+(.+?)[?.!\s]*$/i,Bk=/^(?:does|did)\s+([\w'-]+)\s+(?:owns?|maintains?)\s+(.+?)[?.!\s]*$/i,Uk=/^(?:is|are|was|were)\s+(.+?)\s+owned\s+by\s+([A-Za-z][\w'-]*(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,Gk=/^(?:does|did)\s+([\w'-]+)\s+(?:has|have)\s+an?\s+([a-z][\w-]*)\s+method[?.!\s]*$/i,Wk=/^what\s+methods\s+does\s+([\w'-]+)\s+have[?.!\s]*$/i,Tf=/^(?:is|are|was|were)\s+(.+?)\s+([A-Za-z][\w-]*)[?.!\s]*$/i,rs=/^(?:it|this|that)$/i,Cf=/^(?:you|i|they|he|she|we)\b/i,If=(e,t)=>({text:`I don't know anything about "${e}" yet \u2014 teach me directly, e.g. "remember that ${Si(e)} is ${t}".`,replace:!0}),qk=/^(?: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;async function Vk(e,t){let n=await ur(e,t);if(!n)return null;let s=(e?.byId?.get?.(n.id)||(e?.individuals||[]).find(o=>o?.id===n.id))?.class;return s&&$f[s]?$f[s][0]:null}var Hk=/inherit|supertype|subclass|extend|specializ/i,Kk=8;function xi(e,t){let n=[];if(!e||!t)return n;let s=new Set([t]),o=t;for(let r=0;r<Kk;r+=1){let i=null;for(let a of e.relations||[])if(Hk.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 Yf(e,t,n,s,o=null,r=null,i={},a=null){return Kf(await Yk(e,t,n,s,o,r,i,a),n,t)}async function Yk(e,t,n,s,o=null,r=null,i={},a=null){if(!s)return null;let l;try{({normFactTerm:l}=await Promise.resolve().then(()=>(Ye(),ns)))}catch{return null}let c=String(t).trim();if(o){let I=c.match(Fs);if(I){let M=await ur(o,I[1]);if(M){let U=J(l,Vt(I[2])),V=xi(o,M.id).find(q=>[...J(l,q.label)].some(ne=>U.has(ne)));if(V)return{text:`yes \u2014 the code graph says ${M.label} inherits ${V.label}.`,replace:!0};let W=await ur(o,Vt(I[2]));if(W&&xi(o,W.id).some(q=>q.id===M.id))return{text:`I can't confirm that \u2014 the code graph's stored direction runs the other way: ${W.label} inherits ${M.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 xt(e,a);if(!d.length){if(!Fs.test(u)&&!el.test(u)){let I=u.match(Tf);if(I){let M=I[1].trim(),U=rs.test(M)?r||null:M;if(U&&!/^there\b/i.test(U)&&!n?.parsed&&!Cf.test(M)&&!kf.test(I[2].trim()))return If(U,I[2].trim().toLowerCase())}}return null}let m=d.filter(I=>$o.has(I.predicate)),p=(I,M)=>M.trust-I.trust,f=I=>{let M=I.map(se),U=M.slice(0,Pe),V=M.slice(Pe),W=V.length?`
159
- \u2026and ${V.length} more \u2014 say 'more' to see them.`:"";return{text:U.join(`
160
- `)+W,replace:!0,...V.length?{pending:{items:V,noun:"facts"}}:{}}};if(qk.test(c)){let I=ft(m.length?m:d,i);return I.length?f(I):null}let b=u.match(el);if(b){let I=b[1].trim(),M=rs.test(I)?r||null:I,U=b[2].trim().toLowerCase(),V=b[3].trim();if(M&&!tl.has(U)){let W=qc(d),{findIsaChain:q}=await Promise.resolve().then(()=>(Gt(),Xt)),ne=H=>{let Q=String(H||"").trim().toLowerCase(),we=[];for(let re of d){let be=Jc(re.predicate);if(!be)continue;if(be===Q){we.push({fact:re,aliasFacts:[]});continue}let Fe=Vc(q,be,new Set([Q]),W,{maxHops:2});if(!Fe)continue;let pe=Fe.map(je=>d.find(me=>me.predicate===ki&&me.subject===je.subject&&me.object===je.object));pe.every(Boolean)&&we.push({fact:re,aliasFacts:pe})}return we},{loadMemory:oe,findRuleByName:Ee,resolveRelationChase:ce}=await Promise.resolve().then(()=>(Ye(),ns)),{findActionPath:$e}=await Promise.resolve().then(()=>(bs(),xr)),te=await oe(e),ee=await ce(te,U,M,V,{relationFactsFor:ne,renderFactLine:se,factPhrase:Rt,factTermVariants:J,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:Wc,findActionPath:$e});return ee?{text:`yes \u2014 ${ee.citation.join("; ")}`,replace:!0}:ne(U).length>0||!!Ee(te,U)?{text:`I know the '${U}' relation, but I can't confirm ${M} is the ${U} of ${V} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${U}' yet.`,replace:!0}}}let h=u.match(Gf)||Wf(u);if(h){let I=h[1].trim().toLowerCase(),M=h[2].trim(),U=rs.test(M)?r||null:M;if(U&&!tl.has(I)){let V=qc(d),{findIsaChain:W}=await Promise.resolve().then(()=>(Gt(),Xt)),q=H=>{let Q=String(H||"").trim().toLowerCase(),we=[];for(let re of d){let be=Jc(re.predicate);if(!be)continue;if(be===Q){we.push({fact:re,aliasFacts:[]});continue}let Fe=Vc(W,be,new Set([Q]),V,{maxHops:2});if(!Fe)continue;let pe=Fe.map(je=>d.find(me=>me.predicate===ki&&me.subject===je.subject&&me.object===je.object));pe.every(Boolean)&&we.push({fact:re,aliasFacts:pe})}return we},{loadMemory:ne,findRuleByName:oe,resolveRelationChaseReverse:Ee}=await Promise.resolve().then(()=>(Ye(),ns)),ce=await ne(e),{findReachableSet:$e}=await Promise.resolve().then(()=>(bs(),xr)),Y=await Ee(ce,I,U,{relationFactsFor:q,renderFactLine:se,factPhrase:Rt,factTermVariants:J,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:Wc,findReachableSet:$e});return Y.length?{text:Y.map(Q=>`${Q.subject} \u2014 ${Q.citation.join("; ")}`).join(`
161
- `),replace:!0}:q(I).length>0||!!oe(ce,I)?{text:/^what\b/i.test(u)?`I don't know what the ${I} of ${U} is from what you've told me.`:`I don't know anyone who is the ${I} of ${U} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${I}' yet.`,replace:!0}}}let g=u.match(uk);if(g){let I=il(g[1].trim().toLowerCase()),M=g[2].trim(),U=rs.test(M)?r||null:M;if(U){let{loadMemory:V,findRuleByName:W,RULE_KIND_PROP:q,RULE_KIND_RECURSIVE:ne}=await Promise.resolve().then(()=>(Ye(),ns)),oe=await V(e),Ee=W(oe,I),ce=Ee?.attributes?.find($e=>$e.prop===q)?.value;if(Ee&&ce===ne){let $e=Ee.attributes.find(ee=>ee.prop==="mgx:ruleBaseCase")?.value,te=Ee.attributes.find(ee=>ee.prop==="mgx:ruleRecStep")?.value,Y=l(U);if($e&&te&&Y){let ee=qc(d),{findIsaChain:Ce}=await Promise.resolve().then(()=>(Gt(),Xt)),H=Fe=>{let pe=String(Fe||"").trim().toLowerCase(),je=[];for(let me of d){let Pt=Jc(me.predicate);if(!Pt)continue;if(Pt===pe){je.push({fact:me,aliasFacts:[]});continue}let tn=Vc(Ce,Pt,new Set([pe]),ee,{maxHops:2});if(!tn)continue;let Xe=tn.map(an=>d.find(Wt=>Wt.predicate===ki&&Wt.subject===an.subject&&Wt.object===an.object));Xe.every(Boolean)&&je.push({fact:me,aliasFacts:Xe})}return je},{findReachableSet:Q}=await Promise.resolve().then(()=>(bs(),xr)),be=Q({entity:Y,hop:0},Fe=>{let pe=Fe.hop===0?$e:te;return H(pe).filter(je=>je.fact.subject===Fe.entity).map(je=>({action:je,nextState:{entity:je.fact.object,hop:Fe.hop+1}}))},{maxDepth:20,stateKey:Fe=>Fe.entity});if(be.length)return{text:be.map(({node:pe,path:je})=>{let me=new Set,Pt=[];for(let tn of je.actions){Pt.push(se(tn.fact));for(let Xe of tn.aliasFacts){let an=Xe.id||`${Xe.subject}|${Xe.predicate}|${Xe.object}`;me.has(an)||(me.add(an),Pt.push(`${Rt(Xe)}${Xe.provenance?` (source: ${Xe.provenance})`:""}`))}}return`${pe.entity} \u2014 ${Pt.join("; ")}`}).join(`
162
- `),replace:!0}}}return null}}let y=c.match(fk),w=c.match(Fs)||qf(c)||y&&`is ${y[1].trim()} a ${y[2].trim()}`.match(Fs);if(w){let I=J(l,Vt(w[2])),M=r&&rs.test(w[1].trim())?r:w[1],U=new Set(J(l,M));if([...U].some(z=>I.has(z))){let z=Vt(w[2]).trim();return{text:`yes \u2014 ${xo(z)} ${z} is ${xo(z)} ${z}, trivially: every kind is a kind of itself.`,replace:!0}}let V=await Vk(o,M);if(V)for(let z of J(l,V))U.add(z);let{findIsaChain:W,deriveDisjointViolations:q,SUBCLASS_PREDICATE:ne,TYPE_PREDICATE:oe,DISJOINT_PREDICATE:Ee}=await Promise.resolve().then(()=>(Gt(),Xt)),ce=Ps,$e=m.filter(z=>z.predicate===ne&&ce(z)),te=m.filter(z=>z.predicate===oe&&ce(z)),Y=$e.map(z=>[z.subject,z.object]),ee=te.map(z=>[z.subject,z.object]),Ce=m.filter(z=>z.predicate===ne),H=m.filter(z=>z.predicate===oe),Q=H.map(z=>[z.subject,z.object]),we=Ce.map(z=>[z.subject,z.object]),re=d.filter(z=>z.predicate===Ee&&ce(z)),be=re.map(z=>[z.subject,z.object]),Fe=re.length?q(Q.concat(we),we,be,{budget:20,focus:new Set([...U,...I])}):[],pe=z=>{let fe=Fe.find(Oe=>Oe.subject===z&&I.has(Oe.object));if(!fe)return null;let he=m.filter(Oe=>I.has(Oe.object)&&(Oe.subject===fe.viaClass||Oe.subject===fe.subject)).sort(p)[0],xe=re.find(Oe=>Oe.subject===fe.viaClass&&Oe.object===fe.object||Oe.subject===fe.object&&Oe.object===fe.viaClass);return!he||!xe?null:rk(he,xe)},je=m.filter(z=>U.has(z.subject)&&I.has(z.object)).sort(p)[0],me=d.filter(z=>z.predicate===Wr&&U.has(z.subject)&&I.has(z.object)).sort(p)[0],Pt=re.find(z=>U.has(z.subject)&&I.has(z.object)||U.has(z.object)&&I.has(z.subject));if(je&&!me){let z=pe(je.subject);if(z)return z}let tn=Bf(je,me||Pt);if(tn)return tn;if(re.length){let z=xe=>{let Oe=new Set(xe),kt=new Set(xe);for(let Re=0;Re<8&&kt.size;Re+=1){let ge=new Set;for(let[Je,as]of we)kt.has(Je)&&!Oe.has(as)&&ge.add(as);if(!ge.size)break;for(let Je of ge)Oe.add(Je);kt=ge}return Oe},fe=z(I),he=Fe.find(xe=>U.has(xe.subject)&&fe.has(xe.object)&&!z([xe.viaClass]).has(xe.object)&&!z([xe.object]).has(xe.viaClass));if(he){let xe=m.filter(ge=>U.has(ge.subject)&&ge.object===he.viaClass).sort(p)[0],Oe=re.find(ge=>ge.subject===he.viaClass&&ge.object===he.object||ge.subject===he.object&&ge.object===he.viaClass),kt=!I.has(he.object),Re=kt?m.filter(ge=>I.has(ge.subject)&&ge.object===he.object).sort(p)[0]:null;if(xe&&Oe&&(!kt||Re)){let ge=Vt(w[2]).trim();return{text:`no \u2014 ${[xe,...Re?[Re]:[]].map(se).join("; ")}; and ${Rt(Oe)}${Oe.provenance?` (source: ${Oe.provenance})`:""} \u2014 so ${M} can never be ${xo(ge)} ${ge}.`,replace:!0}}}}let Xe=await ur(o,M);if(Xe){let z=new Map;for(let he of xi(o,Xe.id))for(let xe of J(l,he.label))!U.has(xe)&&!z.has(xe)&&z.set(xe,he.label);let fe=m.filter(he=>z.has(he.subject)&&I.has(he.object)).sort(p)[0];if(fe)return{text:`yes \u2014 the code graph says ${Xe.label} inherits ${z.get(fe.subject)}, and ${se(fe)}`,replace:!0}}let an=z=>(z.predicate===ne?$e:te).find(fe=>fe.subject===z.subject&&fe.object===z.object);for(let z of U){let fe=W(z,I,ee,Y,{maxHops:2});if(!fe)continue;let he=pe(z);if(he)return he;let xe=fe.map(an);if(xe.every(Boolean))return{text:`yes \u2014 ${vi(xe)}`,replace:!0}}let Wt=z=>(z.predicate===ne?Ce:H).find(fe=>fe.subject===z.subject&&fe.object===z.object);for(let z of U){let fe=W(z,I,Q,we,{maxHops:2});if(!fe)continue;let he=pe(z);if(he)return he;let xe=fe.map(Wt);if(xe.every(Boolean)&&xe.some(ce))return{text:`yes \u2014 ${vi(xe)}`,replace:!0}}let Ft=M.match(/^(.*\S)\s+not$/i),At=Ft&&[Ft[0],r&&rs.test(Ft[1].trim())?r:Ft[1]];if(At){let z=J(l,At[1]),fe=I,he=m.filter(Re=>z.has(Re.subject)&&fe.has(Re.object)).sort(p)[0];if(he)return{text:`no \u2014 ${se(he)}`,replace:!0};let xe=re.find(Re=>z.has(Re.subject)&&fe.has(Re.object)||z.has(Re.object)&&fe.has(Re.subject));if(xe)return{text:`yes \u2014 ${se(xe)}`,replace:!0};let Oe=At[1].trim(),kt=Vt(w[2]).trim();return{text:`I can't confirm that either way \u2014 nothing I remember links ${Oe} and ${kt}. If no ${Oe} is a ${kt}, teach me: "no ${Oe} is a ${kt}".`,replace:!0,miss:!0}}if(re.length){let z=q(ee.concat(Y),Y,be,{budget:10});for(let fe of U){let he=z.find(Re=>Re.subject===fe&&I.has(Re.object));if(!he)continue;let xe=te.concat($e).find(Re=>Re.subject===he.subject&&Re.object===he.viaType),Oe=re.find(Re=>Re.subject===he.viaClass&&Re.object===he.object||Re.subject===he.object&&Re.object===he.viaClass),kt=[xe,Oe].filter(Boolean).map(se);return{text:`no \u2014 ${kt.length?kt.join("; "):`${he.viaClass} and ${he.object} are disjoint.`}`,replace:!0}}}let{deriveSomeValuesFromApplication:dr,ON_PROPERTY_PREDICATE:x,SOME_VALUES_FROM_PREDICATE:ie,deriveSomeValuesFromSubsumption:Se,ENTAILED_SCM_SVF_PROVENANCE:kn,SCM_SVF_RULE_CONFIDENCE:zs,entailedTrustFrom:cl}=await Promise.resolve().then(()=>(Gt(),Xt)),ll=d.filter(z=>z.predicate===x&&ce(z)),ul=d.filter(z=>z.predicate===ie&&ce(z));if(ll.length&&ul.length){let z=new Map(ul.map(ge=>[ge.subject,ge.object])),fe=ll.map(ge=>({restriction:ge.subject,property:ge.object,target:z.get(ge.subject)})).filter(ge=>ge.target),he=new Set([ne,oe,Ee,x,ie,"owl:intersectionOf"]),xe=d.filter(ge=>ce(ge)&&!he.has(ge.predicate)),Oe=xe.map(ge=>[ge.subject,ge.predicate,ge.object]),kt=dr(Oe,ee,Y,fe,{budget:10});for(let ge of U){let Je=kt.find(nn=>nn.subject===ge&&I.has(nn.object));if(!Je)continue;let as=xe.find(nn=>nn.subject===Je.subject&&nn.predicate===Je.viaProperty&&nn.object===Je.viaValue),cs=te.find(nn=>nn.subject===Je.viaValue&&nn.object===Je.viaType),So=[as,cs].filter(Boolean).map(se);return{text:`yes \u2014 ${So.length?So.join("; "):`${Je.subject} ${Je.viaProperty} ${Je.viaValue}, and ${Je.viaValue} is a ${Je.viaType}.`}`,replace:!0}}let Re=fe.length>1?Se(fe,Y,{budget:10}):[];if(Re.length){let ge=Y.concat(Re.map(ye=>[ye.subject,ye.object])),Je=new Map(fe.map(ye=>[ye.restriction,ye])),as=new Map;for(let ye of d)as.set(`${ye.subject}\0${ye.predicate}\0${ye.object}`,ye.trust);let cs=(ye,cn,Tt)=>as.get(`${ye}\0${cn}\0${Tt}`),So=new Map;for(let ye of Re){let cn=Je.get(ye.subject),Tt=Je.get(ye.object),zt=[cn&&cs(ye.subject,x,cn.property),cs(ye.subject,ie,ye.viaY1),Tt&&cs(ye.object,x,Tt.property),cs(ye.object,ie,ye.viaY2),cs(ye.viaY1,ne,ye.viaY2)].filter(eh=>typeof eh=="number"),mr=cl(zt,zs);mr!==null&&So.set(`${ye.subject}\0${ye.object}`,mr)}let nn=ye=>{if(ye.predicate!==ne)return te.find(zt=>zt.subject===ye.subject&&zt.object===ye.object);let cn=$e.find(zt=>zt.subject===ye.subject&&zt.object===ye.object);if(cn)return cn;let Tt=Re.find(zt=>zt.subject===ye.subject&&zt.object===ye.object);return Tt?{subject:Tt.subject,predicate:ne,object:Tt.object,provenance:kn,trust:So.get(`${Tt.subject}\0${Tt.object}`)}:void 0};for(let ye of U){let cn=W(ye,I,ee,ge,{maxHops:3});if(!cn)continue;let Tt=cn.map(nn);if(Tt.every(Boolean)){let zt=cl(Tt.map(mr=>mr.trust),1);return{text:`yes \u2014 ${vi(Tt)}`,replace:!0,...zt!==null?{trust:zt}:{}}}}}}let Qf=J(l,M),dl=m.filter(z=>Qf.has(z.subject)).sort(p),is=M.trim(),pr=Vt(w[2]).trim(),Zf=[...U].some(z=>W(z,I,ee,Y,{maxHops:dk}));if(dl.length){let z=dl.slice(0,3).map(se).join("; "),fe=Zf?`The facts to settle it are here, but the chain is longer than I follow while answering. Run "/syllogise ${is}", then ask me again.`:`If it's true, teach me: "${is} is a kind of ${pr}".`;return{text:`I can't confirm that \u2014 nothing I remember says ${is} is a ${pr}. I do know: ${z}. ${fe}`,replace:!0,miss:!0}}let pl=m.filter(z=>U.has(z.object)&&I.has(z.subject)).sort(p)[0];return pl?{text:`I can't confirm that \u2014 what I know runs the other way: ${se(pl)}. A kind doesn't reverse. If it's true, teach me: "every ${is} is a ${pr}".`,replace:!0,miss:!0}:!Xe&&!V&&!Gx(is)&&!d.some(z=>U.has(z.subject)||U.has(z.object))?{text:`I can't confirm that \u2014 I don't know "${is}" at all yet. If it's true, teach me: "${is} is a kind of ${pr}".`,replace:!0,miss:!0}:null}let k=c.match(Fk);if(k){let[,I,M,U]=k,{SUBCLASS_PREDICATE:V,ON_PROPERTY_PREDICATE:W,buildCardinalityRestrictions:q,proveCardinalityAtLeast:ne,CARDINALITY_RULE_CONFIDENCE:oe,entailedTrustFrom:Ee}=await Promise.resolve().then(()=>(Gt(),Xt)),ce=Ps,$e=m.filter(ee=>ee.predicate===V&&ce(ee)).map(ee=>[ee.subject,ee.object]),te=d.filter(ee=>(ee.predicate===W||Af.has(ee.predicate))&&ce(ee)),Y=q(te);if(Y.length){let ee=J(l,I.trim()),Ce=J(l,U.trim()),H=Number(M),Q=Sf(ee,Ce,(we,re)=>ne($e,Y,we,re,H,{}));if(Q){let we=d.find(me=>me.predicate===V&&me.subject===Q.viaClass&&me.object===Q.viaRestriction),re=we?.provenance?` (source: ${we.provenance})`:"",be=Q.kind==="exactly"?"exactly":"at least",Fe=(me,Pt)=>`${me}${Pt===1?"":"s"}`,pe=[we?.trust,...te.filter(me=>me.subject===Q.viaRestriction).map(me=>me.trust),...Q.viaClass!==Q.subject?[m.find(me=>me.predicate===V&&me.subject===Q.subject&&me.object===Q.viaClass)?.trust]:[]].filter(me=>typeof me=="number"),je=Ee(pe,oe);return{text:`yes \u2014 every ${Q.viaClass} has ${be} ${Q.n} ${Fe(Q.object,Q.n)}${re}, so at least ${H} follows.`,replace:!0,...je!==null?{trust:je}:{}}}}}let E=c.match(zk);if(E){let[,I,M]=E,{SUBCLASS_PREDICATE:U,ON_PROPERTY_PREDICATE:V,buildCardinalityRestrictions:W,proveMaxCardinalityZeroDenial:q,CAX_MAXC0_RULE_CONFIDENCE:ne,entailedTrustFrom:oe}=await Promise.resolve().then(()=>(Gt(),Xt)),Ee=Ps,ce=m.filter(Y=>Y.predicate===U&&Ee(Y)).map(Y=>[Y.subject,Y.object]),$e=d.filter(Y=>(Y.predicate===V||Af.has(Y.predicate))&&Ee(Y)),te=W($e);if(te.length){let Y=J(l,I.trim()),ee=J(l,M.trim()),Ce=Sf(Y,ee,(H,Q)=>q(ce,te,H,Q,{}));if(Ce){let H=d.find(be=>be.predicate===U&&be.subject===Ce.viaClass&&be.object===Ce.viaRestriction),Q=H?.provenance?` (source: ${H.provenance})`:"",we=[H?.trust,...$e.filter(be=>be.subject===Ce.viaRestriction).map(be=>be.trust),...Ce.viaClass!==Ce.subject?[m.find(be=>be.predicate===U&&be.subject===Ce.subject&&be.object===Ce.viaClass)?.trust]:[]].filter(be=>typeof be=="number"),re=oe(we,ne);return{text:`no \u2014 every ${Ce.viaClass} has at most 0 ${Ce.object}${Q}.`,replace:!0,...re!==null?{trust:re}:{}}}}}let $=c.match(Dk);if($){let I=J(l,$[1]),M=d.filter(U=>U.predicate===Gc&&I.has(U.subject)).sort(p);return M.length?f(M):null}let v=u.match(Bk);if(v){let[,I,M]=v,U=J(l,I.trim()),V=J(l,M.replace(/^an?\s+/i,"").trim()),W=d.filter(q=>q.predicate===Gc&&V.has(q.subject)&&U.has(q.object)).sort(p)[0];return W?{text:`yes \u2014 ${se(W)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${I.trim().toLowerCase()} owns/maintains ${M.trim()}.`,replace:!0}}let A=u.match(Uk);if(A){let[,I,M]=A,U=J(l,I.replace(/^an?\s+/i,"").trim()),V=J(l,M.trim()),W=d.filter(q=>q.predicate===Gc&&U.has(q.subject)&&V.has(q.object)).sort(p)[0];return W?{text:`yes \u2014 ${se(W)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${I.trim().toLowerCase()} is owned by ${M.trim()}.`,replace:!0}}let T=u.match(Gk);if(T){let[,I,M]=T,U=J(l,I.trim()),V=J(l,`${M.trim()} method`),W=d.filter(q=>q.predicate===Cs&&U.has(q.subject)&&V.has(q.object)).sort(p)[0];return W?{text:`yes \u2014 ${se(W)}`,replace:!0}:null}let C=u.match(Wk);if(C){let I=J(l,C[1].trim()),M=d.filter(U=>U.predicate===Cs&&I.has(U.subject)&&/ method$/.test(U.object)).sort(p);return M.length?f(M):null}let S=u.match(Tf);if(S){let I=S[1].trim(),M=Cf.test(I)?null:rs.test(I)?r||null:I,U=S[2].trim().toLowerCase();if(M){let V=J(l,M),W=new Map,q=null;if(o){let te=await ur(o,M);if(q=te,te)for(let Y of xi(o,te.id))for(let ee of J(l,Y.label))!V.has(ee)&&!W.has(ee)&&W.set(ee,Y.label),V.add(ee)}let ne=te=>te.predicate===Wc&&l(te.object)===U||te.predicate===`tmct:${U}`&&te.object==="true",oe=l(M).split(/\s+/).filter(te=>te.length>=4&&!Uf.has(te)),Ee=te=>oe.some(Y=>new Set(String(te.subject||"").split(/\s+/)).has(Y)),ce=te=>V.has(te.subject)||oe.length&&Ee(te),$e=d.filter(te=>ce(te)&&ne(te)).sort(p)[0];if($e){let te=W.get($e.subject);return{text:te?`yes \u2014 the code graph says ${q.label} inherits ${te}, and ${se($e)}`:`yes \u2014 ${se($e)}`,replace:!0}}{let{findIsaChain:te,SUBCLASS_PREDICATE:Y,TYPE_PREDICATE:ee}=await Promise.resolve().then(()=>(Gt(),Xt)),Ce=Ps,H=d.filter(pe=>pe.predicate===Y&&Ce(pe)),Q=d.filter(pe=>pe.predicate===ee&&Ce(pe)),we=H.map(pe=>[pe.subject,pe.object]),re=Q.map(pe=>[pe.subject,pe.object]),be=pe=>(pe.predicate===Y?H:Q).find(je=>je.subject===pe.subject&&je.object===pe.object),Fe=J(l,U);for(let pe of V){let je=te(pe,Fe,re,we,{maxHops:2});if(!je)continue;let me=je.map(be);if(me.every(Boolean))return{text:`yes \u2014 ${vi(me)}`,replace:!0}}}if(d.some(ce)&&!n?.parsed)return{text:`I don't have a fact saying ${ak(M)} is ${U}.`,replace:!0};if(!n?.parsed&&!kf.test(U))return If(M,U)}}let R=nl(c).match(Xx);if(R&&!Kc.test(c)){let[,I,M,U]=R,V=M.toLowerCase();if(!Hc.test(V)&&!Xc.test(V)){let W=I.trim(),q=Zx(await Yc(V),U),ne=q.object.replace(/^an?\s+/i,"").trim();if(W&&ne){let oe=q.predicate,Ee=J(l,W),ce=J(l,ne),$e=[oe,io(oe)],te=d.filter(ee=>$e.includes(ee.predicate)&&Ee.has(ee.subject)&&ce.has(ee.object)).sort(p)[0];if(te)return{text:`${_p(te.predicate)?"no":"yes"} \u2014 ${se(te)}`,replace:!0,generalVerbQuery:!0};let Y=d.filter(ee=>$e.includes(ee.predicate)&&Ee.has(ee.subject));if(Y.length){let ee=Y.slice(0,3).map(se).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${Rt({subject:W,predicate:oe,object:ne})}. I do know: ${ee}.`,replace:!0,miss:!0}}return null}}}let N=c.match(Jx);if(N&&!Kc.test(c)){let[,I,M]=N,[U,V]=M.toLowerCase().split(/\s+/);if(!Hc.test(U)&&!Xc.test(U)){let W=I.trim();if(W){let q=await Yc(U);V&&/^mgx:[a-z]+$/.test(q)&&(q=`${q}-${V}`);let ne=J(l,W),oe=[q,io(q)],Ee=ft(d.filter(ce=>oe.includes(ce.predicate)&&ne.has(ce.subject)),i);if(Ee.length)return{...f(Ee),generalVerbQuery:!0}}}}let j=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(j&&!Kc.test(c)){let[,I,M,U]=j,V=I.toLowerCase();if(!Hc.test(V)&&!Xc.test(V)&&!Yx.test(V)){let W=await Yc(V);/^mgx:[a-z]+$/.test(W)&&(W=`${W}-${M.toLowerCase()}`);let q=J(l,U.replace(/^(?:an?|the)\s+/i,"").trim()),ne=ft(d.filter(oe=>oe.predicate===W&&q.has(oe.object)),i);if(ne.length)return{...f(ne),generalVerbQuery:!0}}}let _=c.match(Mk);if(_){let I=J(l,_[1]),M=ft(d.filter(oe=>I.has(oe.subject)||I.has(oe.object)),i);if(!M.length)return null;let U=I.has(M[0].subject)?M[0].subject:M[0].object,V=M.map(oe=>` ${se(oe)}`),W=V.slice(0,Pe),q=V.slice(Pe),ne=q.length?`
163
- \u2026and ${q.length} more \u2014 say 'more' to see them.`:"";return{text:`${M.length} remembered fact${M.length===1?"":"s"} about ${U}:
164
- ${W.join(`
165
- `)}${ne}`,replace:!0,...q.length?{pending:{items:q.map(oe=>oe.trim()),noun:"facts"}}:{}}}let O=n?.parsed?.shape==="meta"?n.parsed.object:null,P=!1,L=c.match(Pk);if(L)O=L[1],P=!0;else if(!O&&!n?.parsed){let I=c.match(/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i);I&&(O=I[1])}if(!O)return null;let D=J(l,O),G=ft(m.filter(I=>D.has(I.subject)),i),B=ft(m.filter(I=>D.has(I.object)),i),F=P?G.length?G:B:B.length?B:G;return F.length?f(F):null}var kP=new RegExp(`\\b(?:${[...sl].join("|")})\\b`,"i");var Xf=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i;var SP=new RegExp(`^(?:(?:the|a|an)\\s+)?(.+?)\\s+(${Object.keys(De).join("|")})$`,"i");var EP={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:en.contains,subclasses:en.inherits,impact:"understand what a change to this module would reach (impact closure)",callers:en.calls,callees:en.calls,tests:en.tests,untested:en.tests,history:en.touches,exports:en.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"};var Jf="(?:changed?|modif(?:y|ied)|edits?|edited|touch(?:es|ed)?|updates?|updated|alters?|altered|deletes?|deleted|removes?|removed|drops?|dropped)",jP=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+${Jf}\\s+(?:the\\s+)?(.+?)[?.!\\s]*$`,"i"),_P=new RegExp(`^if\\s+(?:i|we|you|one|someone)\\s+${Jf}\\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"),RP=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"),AP=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"),TP=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");var Ei="as\\s+(?:its|the|an?)?\\s*(?:base\\s+class|parent\\s+class|base|parent)",CP=new RegExp(`^(.+?)\\s+uses?\\s+(?:which\\s+[\\w'-]+|what)\\s+${Ei}\\s*\\??$`,"i"),IP=new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+uses?\\s+${Ei}\\s*\\??$`,"i"),OP=new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+uses?\\s+(.+?)\\s+${Ei}\\s*\\??$`,"i"),LP=new RegExp(`^(.+?)\\s+uses?\\s+(.+?)\\s+${Ei}\\s*[.!]*$`,"i");var Xk=Object.freeze([...sl].filter(e=>e!=="here").concat("they")),NP=new RegExp(`^((?:is|are|can|could|does|do)\\s+|what\\s+(?:is|are)\\s+)(${Xk.join("|")})\\b(\\s+\\S.*)?$`,"i");var MP=X(".tmct","memory","corpus-seed.json");Ye();globalThis.tmctMemoryAsk={factAnswer:Hf,factReadBack:Yf,createInMemoryStore:ri,normFactTerm:Z};})();
151
+ `)+Se.join(`
152
+ `)+$e,replace:!0,...ce.length?{pending:{items:ce,noun:"facts"}}:{}}}}let C=l.match(jk);if(C&&C[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let _=X(a,C[1]),O=Ha(_,await bt(e,r));if(O.length){let L=Xe(xn(O),o).map(se),B=L.slice(0,Ce),W=L.slice(Ce),U=W.length?`
153
+ \u2026and ${W.length} more \u2014 say 'more' to see them.`:"";return{text:B.join(`
154
+ `)+U,replace:!0,...W.length?{pending:{items:W,noun:"facts"}}:{}}}}let E=l.match($k);if(E&&!Mk.has(E[1].trim().split(/\s+/)[0]?.toLowerCase())){let _=X(a,E[1]),O=(await bt(e,r)).filter(F=>F.predicate==="mgx:hasA"&&_.has(F.object));if(!O.length)return null;let L=Xe(xn(O),o).map(se),B=L.slice(0,Ce),W=L.slice(Ce),U=W.length?`
155
+ \u2026and ${W.length} more \u2014 say 'more' to see them.`:"";return{text:B.join(`
156
+ `)+U,replace:!0,...W.length?{pending:{items:W,noun:"facts"}}:{}}}let R=l.match(Tf),N=n?.parsed?.shape==="reverse"&&n.parsed.kind==="inherits"?n.parsed.object:R?.[1];if(N){let _=X(a,N),O=(await bt(e,r)).filter(F=>xo.has(F.predicate)&&_.has(F.object));if(!O.length)return null;let L=Xe(xn(O),o).map(se),B=L.slice(0,Ce),W=L.slice(Ce),U=W.length?`
157
+ \u2026and ${W.length} more \u2014 say 'more' to see them.`:"";return{text:B.join(`
158
+ `)+U,replace:!0,...W.length?{pending:{items:W,noun:"facts"}}:{}}}let j=l.match(bk);if(j){let _=X(a,j[1]),O=await bt(e,r),P=H=>!String(H.provenance||"").includes("corpus:")&&!String(H.provenance||"").includes("web:"),L=O.filter(H=>xo.has(H.predicate)&&P(H)),B=new Set,W=_;for(let H=0;H<8&&W.size;H+=1){let Q=new Set;for(let re of L)W.has(re.object)&&!B.has(re.subject)&&Q.add(re.subject);if(!Q.size)break;for(let re of Q)B.add(re);let we=new Set;for(let re of Q)for(let be of X(a,re))we.add(be);W=we}let U=O.filter(H=>_.has(H.subject)||_.has(H.object)||B.has(H.subject));if(!U.length){let H=a(j[1]).split(/\s+/).filter(Q=>Q.length>=4&&!Gf.has(Q));if(H.length){let Q=re=>new Set(String(re||"").split(/\s+/)),we=re=>{let be=Q(re);return H.some(Fe=>be.has(Fe))};U=O.filter(re=>we(re.subject)||we(re.object))}}if(U=U.filter(H=>!Sf.has(H.predicate)),!U.length)return null;let{findConsistencyViolations:F,TYPE_PREDICATE:I,SUBCLASS_PREDICATE:M,DISJOINT_PREDICATE:D}=await Promise.resolve().then(()=>(Wt(),Xt)),V=H=>!H.provenance?.includes("corpus:")&&!H.provenance?.includes("web:"),G=O.filter(H=>H.predicate===I&&V(H)).map(H=>[H.subject,H.object]),q=O.filter(H=>H.predicate===M&&V(H)).map(H=>[H.subject,H.object]),te=O.filter(H=>H.predicate===D&&V(H)).map(H=>[H.subject,H.object]);if(te.length){let Q=F(G,q,te,{focus:_,budget:5}).find(we=>_.has(we.subject));if(Q)return{text:`I can't answer that \u2014 what I've been told about ${Q.subject} is inconsistent: it's taught to be both ${Q.classA} and ${Q.classB}, but ${Q.viaA} and ${Q.viaB} are disjoint (${Q.viaA} owl:disjointWith ${Q.viaB}). I'd need one of those retracted before I can answer honestly.`,replace:!0}}let oe=U.find(H=>_.has(H.subject)||_.has(H.object)),Se=oe?_.has(oe.subject)?oe.subject:oe.object:j[1].trim(),ce=U.some(H=>B.has(H.subject)&&!_.has(H.subject)&&!_.has(H.object));U=Xe(U,o);let $e=U.map(H=>` ${se(H)}`),ne=$e.slice(0,Ce),Y=$e.slice(Ce),ee=Y.length?`
159
+ \u2026and ${Y.length} more \u2014 say 'more' to see them.`:"";return{text:`${`${U.length} remembered fact${U.length===1?"":"s"} about ${Se}${ce?" (including its known subtypes)":""}:`}
160
+ ${ne.join(`
161
+ `)}${ee}`,replace:!0,...Y.length?{pending:{items:Y.map(H=>H.trim()),noun:"facts"}}:{}}}return null}var Fk=/^what\s+(?:did|have)\s+(?:i|we|you)\s+(?:told|tell|said|say)\s+(?:you|me|us)?\s*about\s+(.+?)[?.!\s]*$/i,Dk=/^what\s+kind\s+of\s+(?:thing|class|type|category|entity)?\s*(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,zk=/^does\s+every\s+(.+?)\s+have\s+at\s+least\s+(\d+)\s+(.+?)[?.!\s]*$/i,Bk=/^does\s+an?\s+(.+?)\s+have\s+an?\s+(.+?)[?.!\s]*$/i,Cf=new Set(["owl:cardinality","owl:minCardinality","owl:maxCardinality","owl:onClass"]),Uk=/^who\s+(?:owns|maintains)\s+(.+?)[?.!\s]*$/i,Wk=/^(?:does|did)\s+([\w'-]+)\s+(?:owns?|maintains?)\s+(.+?)[?.!\s]*$/i,Gk=/^(?:is|are|was|were)\s+(.+?)\s+owned\s+by\s+([A-Za-z][\w'-]*(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,qk=/^(?:does|did)\s+([\w'-]+)\s+(?:has|have)\s+an?\s+([a-z][\w-]*)\s+method[?.!\s]*$/i,Vk=/^what\s+methods\s+does\s+([\w'-]+)\s+have[?.!\s]*$/i,If=/^(?:is|are|was|were)\s+(.+?)\s+([A-Za-z][\w-]*)[?.!\s]*$/i,rs=/^(?:it|this|that)$/i,Of=/^(?:you|i|they|he|she|we)\b/i,Lf=(e,t)=>({text:`I don't know anything about "${e}" yet \u2014 teach me directly, e.g. "remember that ${Ei(e)} is ${t}".`,replace:!0}),Hk=/^(?: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;async function Kk(e,t){let n=await dr(e,t);if(!n)return null;let s=(e?.byId?.get?.(n.id)||(e?.individuals||[]).find(o=>o?.id===n.id))?.class;return s&&xf[s]?xf[s][0]:null}var Yk=/inherit|supertype|subclass|extend|specializ/i,Xk=8;function xi(e,t){let n=[];if(!e||!t)return n;let s=new Set([t]),o=t;for(let r=0;r<Xk;r+=1){let i=null;for(let a of e.relations||[])if(Yk.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 Jf(e,t,n,s,o=null,r=null,i={},a=null){return Xf(await Jk(e,t,n,s,o,r,i,a),n,t)}async function Jk(e,t,n,s,o=null,r=null,i={},a=null){if(!s)return null;let l;try{({normFactTerm:l}=await Promise.resolve().then(()=>(Ye(),ns)))}catch{return null}let c=String(t).trim();if(o){let I=c.match(Fs);if(I){let M=await dr(o,I[1]);if(M){let D=X(l,Vt(I[2])),V=xi(o,M.id).find(q=>[...X(l,q.label)].some(te=>D.has(te)));if(V)return{text:`yes \u2014 the code graph says ${M.label} inherits ${V.label}.`,replace:!0};let G=await dr(o,Vt(I[2]));if(G&&xi(o,G.id).some(q=>q.id===M.id))return{text:`I can't confirm that \u2014 the code graph's stored direction runs the other way: ${G.label} inherits ${M.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 bt(e,a);if(!d.length){if(!Fs.test(u)&&!el.test(u)){let I=u.match(If);if(I){let M=I[1].trim(),D=rs.test(M)?r||null:M;if(D&&!/^there\b/i.test(D)&&!n?.parsed&&!Of.test(M)&&!Ef.test(I[2].trim()))return Lf(D,I[2].trim().toLowerCase())}}return null}let f=d.filter(I=>xo.has(I.predicate)),p=(I,M)=>M.trust-I.trust,m=I=>{let M=I.map(se),D=M.slice(0,Ce),V=M.slice(Ce),G=V.length?`
162
+ \u2026and ${V.length} more \u2014 say 'more' to see them.`:"";return{text:D.join(`
163
+ `)+G,replace:!0,...V.length?{pending:{items:V,noun:"facts"}}:{}}};if(Hk.test(c)){let I=Xe(f.length?f:d,i);return I.length?m(I):null}let b=u.match(el);if(b){let I=b[1].trim(),M=rs.test(I)?r||null:I,D=b[2].trim().toLowerCase(),V=b[3].trim();if(M&&!tl.has(D)){let G=qc(d),{findIsaChain:q}=await Promise.resolve().then(()=>(Wt(),Xt)),te=H=>{let Q=String(H||"").trim().toLowerCase(),we=[];for(let re of d){let be=Jc(re.predicate);if(!be)continue;if(be===Q){we.push({fact:re,aliasFacts:[]});continue}let Fe=Vc(q,be,new Set([Q]),G,{maxHops:2});if(!Fe)continue;let pe=Fe.map(je=>d.find(me=>me.predicate===ki&&me.subject===je.subject&&me.object===je.object));pe.every(Boolean)&&we.push({fact:re,aliasFacts:pe})}return we},{loadMemory:oe,findRuleByName:Se,resolveRelationChase:ce}=await Promise.resolve().then(()=>(Ye(),ns)),{findActionPath:$e}=await Promise.resolve().then(()=>(bs(),xr)),ne=await oe(e),ee=await ce(ne,D,M,V,{relationFactsFor:te,renderFactLine:se,factPhrase:Rt,factTermVariants:X,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:Gc,findActionPath:$e});return ee?{text:`yes \u2014 ${ee.citation.join("; ")}`,replace:!0}:te(D).length>0||!!Se(ne,D)?{text:`I know the '${D}' relation, but I can't confirm ${M} is the ${D} of ${V} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${D}' yet.`,replace:!0}}}let h=u.match(qf)||Vf(u);if(h){let I=h[1].trim().toLowerCase(),M=h[2].trim(),D=rs.test(M)?r||null:M;if(D&&!tl.has(I)){let V=qc(d),{findIsaChain:G}=await Promise.resolve().then(()=>(Wt(),Xt)),q=H=>{let Q=String(H||"").trim().toLowerCase(),we=[];for(let re of d){let be=Jc(re.predicate);if(!be)continue;if(be===Q){we.push({fact:re,aliasFacts:[]});continue}let Fe=Vc(G,be,new Set([Q]),V,{maxHops:2});if(!Fe)continue;let pe=Fe.map(je=>d.find(me=>me.predicate===ki&&me.subject===je.subject&&me.object===je.object));pe.every(Boolean)&&we.push({fact:re,aliasFacts:pe})}return we},{loadMemory:te,findRuleByName:oe,resolveRelationChaseReverse:Se}=await Promise.resolve().then(()=>(Ye(),ns)),ce=await te(e),{findReachableSet:$e}=await Promise.resolve().then(()=>(bs(),xr)),Y=await Se(ce,I,D,{relationFactsFor:q,renderFactLine:se,factPhrase:Rt,factTermVariants:X,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:Gc,findReachableSet:$e});return Y.length?{text:Y.map(Q=>`${Q.subject} \u2014 ${Q.citation.join("; ")}`).join(`
164
+ `),replace:!0}:q(I).length>0||!!oe(ce,I)?{text:/^what\b/i.test(u)?`I don't know what the ${I} of ${D} is from what you've told me.`:`I don't know anyone who is the ${I} of ${D} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${I}' yet.`,replace:!0}}}{let I=u.match(Qk);if(I){let M=X(l,I[1]),D=Xe(d.filter(V=>M.has(V.subject)||M.has(V.object)),i);if(D.length){let V=D.map(se),G=V.slice(0,Ce),q=V.slice(Ce),te=q.length?`
165
+ \u2026and ${q.length} more \u2014 say 'more' to see them.`:"";return{text:G.join(`
166
+ `)+te,replace:!0,...q.length?{pending:{items:q,noun:"facts"}}:{}}}}}let g=u.match(pk);if(g){let I=il(g[1].trim().toLowerCase()),M=g[2].trim(),D=rs.test(M)?r||null:M;if(D){let{loadMemory:V,findRuleByName:G,RULE_KIND_PROP:q,RULE_KIND_RECURSIVE:te}=await Promise.resolve().then(()=>(Ye(),ns)),oe=await V(e),Se=G(oe,I),ce=Se?.attributes?.find($e=>$e.prop===q)?.value;if(Se&&ce===te){let $e=Se.attributes.find(ee=>ee.prop==="mgx:ruleBaseCase")?.value,ne=Se.attributes.find(ee=>ee.prop==="mgx:ruleRecStep")?.value,Y=l(D);if($e&&ne&&Y){let ee=qc(d),{findIsaChain:Ie}=await Promise.resolve().then(()=>(Wt(),Xt)),H=Fe=>{let pe=String(Fe||"").trim().toLowerCase(),je=[];for(let me of d){let Pt=Jc(me.predicate);if(!Pt)continue;if(Pt===pe){je.push({fact:me,aliasFacts:[]});continue}let tn=Vc(Ie,Pt,new Set([pe]),ee,{maxHops:2});if(!tn)continue;let Je=tn.map(an=>d.find(Gt=>Gt.predicate===ki&&Gt.subject===an.subject&&Gt.object===an.object));Je.every(Boolean)&&je.push({fact:me,aliasFacts:Je})}return je},{findReachableSet:Q}=await Promise.resolve().then(()=>(bs(),xr)),be=Q({entity:Y,hop:0},Fe=>{let pe=Fe.hop===0?$e:ne;return H(pe).filter(je=>je.fact.subject===Fe.entity).map(je=>({action:je,nextState:{entity:je.fact.object,hop:Fe.hop+1}}))},{maxDepth:20,stateKey:Fe=>Fe.entity});if(be.length)return{text:be.map(({node:pe,path:je})=>{let me=new Set,Pt=[];for(let tn of je.actions){Pt.push(se(tn.fact));for(let Je of tn.aliasFacts){let an=Je.id||`${Je.subject}|${Je.predicate}|${Je.object}`;me.has(an)||(me.add(an),Pt.push(`${Rt(Je)}${Je.provenance?` (source: ${Je.provenance})`:""}`))}}return`${pe.entity} \u2014 ${Pt.join("; ")}`}).join(`
167
+ `),replace:!0}}}return null}}let y=c.match(gk),w=c.match(Fs)||Hf(c)||y&&`is ${y[1].trim()} a ${y[2].trim()}`.match(Fs);if(w){let I=X(l,Vt(w[2])),M=r&&rs.test(w[1].trim())?r:w[1],D=new Set(X(l,M));if([...D].some(z=>I.has(z))){let z=Vt(w[2]).trim();return{text:`yes \u2014 ${ko(z)} ${z} is ${ko(z)} ${z}, trivially: every kind is a kind of itself.`,replace:!0}}let V=await Kk(o,M);if(V)for(let z of X(l,V))D.add(z);let{findIsaChain:G,deriveDisjointViolations:q,SUBCLASS_PREDICATE:te,TYPE_PREDICATE:oe,DISJOINT_PREDICATE:Se}=await Promise.resolve().then(()=>(Wt(),Xt)),ce=Ps,$e=f.filter(z=>z.predicate===te&&ce(z)),ne=f.filter(z=>z.predicate===oe&&ce(z)),Y=$e.map(z=>[z.subject,z.object]),ee=ne.map(z=>[z.subject,z.object]),Ie=f.filter(z=>z.predicate===te),H=f.filter(z=>z.predicate===oe),Q=H.map(z=>[z.subject,z.object]),we=Ie.map(z=>[z.subject,z.object]),re=d.filter(z=>z.predicate===Se&&ce(z)),be=re.map(z=>[z.subject,z.object]),Fe=re.length?q(Q.concat(we),we,be,{budget:20,focus:new Set([...D,...I])}):[],pe=z=>{let fe=Fe.find(Le=>Le.subject===z&&I.has(Le.object));if(!fe)return null;let he=f.filter(Le=>I.has(Le.object)&&(Le.subject===fe.viaClass||Le.subject===fe.subject)).sort(p)[0],xe=re.find(Le=>Le.subject===fe.viaClass&&Le.object===fe.object||Le.subject===fe.object&&Le.object===fe.viaClass);return!he||!xe?null:ak(he,xe)},je=f.filter(z=>D.has(z.subject)&&I.has(z.object)).sort(p)[0],me=d.filter(z=>z.predicate===Gr&&D.has(z.subject)&&I.has(z.object)).sort(p)[0],Pt=re.find(z=>D.has(z.subject)&&I.has(z.object)||D.has(z.object)&&I.has(z.subject));if(je&&!me){let z=pe(je.subject);if(z)return z}let tn=Wf(je,me||Pt);if(tn)return tn;if(re.length){let z=xe=>{let Le=new Set(xe),kt=new Set(xe);for(let Re=0;Re<8&&kt.size;Re+=1){let ge=new Set;for(let[Qe,as]of we)kt.has(Qe)&&!Le.has(as)&&ge.add(as);if(!ge.size)break;for(let Qe of ge)Le.add(Qe);kt=ge}return Le},fe=z(I),he=Fe.find(xe=>D.has(xe.subject)&&fe.has(xe.object)&&!z([xe.viaClass]).has(xe.object)&&!z([xe.object]).has(xe.viaClass));if(he){let xe=f.filter(ge=>D.has(ge.subject)&&ge.object===he.viaClass).sort(p)[0],Le=re.find(ge=>ge.subject===he.viaClass&&ge.object===he.object||ge.subject===he.object&&ge.object===he.viaClass),kt=!I.has(he.object),Re=kt?f.filter(ge=>I.has(ge.subject)&&ge.object===he.object).sort(p)[0]:null;if(xe&&Le&&(!kt||Re)){let ge=Vt(w[2]).trim();return{text:`no \u2014 ${[xe,...Re?[Re]:[]].map(se).join("; ")}; and ${Rt(Le)}${Le.provenance?` (source: ${Le.provenance})`:""} \u2014 so ${M} can never be ${ko(ge)} ${ge}.`,replace:!0}}}}let Je=await dr(o,M);if(Je){let z=new Map;for(let he of xi(o,Je.id))for(let xe of X(l,he.label))!D.has(xe)&&!z.has(xe)&&z.set(xe,he.label);let fe=f.filter(he=>z.has(he.subject)&&I.has(he.object)).sort(p)[0];if(fe)return{text:`yes \u2014 the code graph says ${Je.label} inherits ${z.get(fe.subject)}, and ${se(fe)}`,replace:!0}}let an=z=>(z.predicate===te?$e:ne).find(fe=>fe.subject===z.subject&&fe.object===z.object);for(let z of D){let fe=G(z,I,ee,Y,{maxHops:2});if(!fe)continue;let he=pe(z);if(he)return he;let xe=fe.map(an);if(xe.every(Boolean))return{text:`yes \u2014 ${vi(xe)}`,replace:!0}}let Gt=z=>(z.predicate===te?Ie:H).find(fe=>fe.subject===z.subject&&fe.object===z.object);for(let z of D){let fe=G(z,I,Q,we,{maxHops:2});if(!fe)continue;let he=pe(z);if(he)return he;let xe=fe.map(Gt);if(xe.every(Boolean)&&xe.some(ce))return{text:`yes \u2014 ${vi(xe)}`,replace:!0}}let Ft=M.match(/^(.*\S)\s+not$/i),At=Ft&&[Ft[0],r&&rs.test(Ft[1].trim())?r:Ft[1]];if(At){let z=X(l,At[1]),fe=I,he=f.filter(Re=>z.has(Re.subject)&&fe.has(Re.object)).sort(p)[0];if(he)return{text:`no \u2014 ${se(he)}`,replace:!0};let xe=re.find(Re=>z.has(Re.subject)&&fe.has(Re.object)||z.has(Re.object)&&fe.has(Re.subject));if(xe)return{text:`yes \u2014 ${se(xe)}`,replace:!0};let Le=At[1].trim(),kt=Vt(w[2]).trim();return{text:`I can't confirm that either way \u2014 nothing I remember links ${Le} and ${kt}. If no ${Le} is a ${kt}, teach me: "no ${Le} is a ${kt}".`,replace:!0,miss:!0}}if(re.length){let z=q(ee.concat(Y),Y,be,{budget:10});for(let fe of D){let he=z.find(Re=>Re.subject===fe&&I.has(Re.object));if(!he)continue;let xe=ne.concat($e).find(Re=>Re.subject===he.subject&&Re.object===he.viaType),Le=re.find(Re=>Re.subject===he.viaClass&&Re.object===he.object||Re.subject===he.object&&Re.object===he.viaClass),kt=[xe,Le].filter(Boolean).map(se);return{text:`no \u2014 ${kt.length?kt.join("; "):`${he.viaClass} and ${he.object} are disjoint.`}`,replace:!0}}}let{deriveSomeValuesFromApplication:pr,ON_PROPERTY_PREDICATE:x,SOME_VALUES_FROM_PREDICATE:ie,deriveSomeValuesFromSubsumption:Ee,ENTAILED_SCM_SVF_PROVENANCE:kn,SCM_SVF_RULE_CONFIDENCE:Ds,entailedTrustFrom:ll}=await Promise.resolve().then(()=>(Wt(),Xt)),ul=d.filter(z=>z.predicate===x&&ce(z)),dl=d.filter(z=>z.predicate===ie&&ce(z));if(ul.length&&dl.length){let z=new Map(dl.map(ge=>[ge.subject,ge.object])),fe=ul.map(ge=>({restriction:ge.subject,property:ge.object,target:z.get(ge.subject)})).filter(ge=>ge.target),he=new Set([te,oe,Se,x,ie,"owl:intersectionOf"]),xe=d.filter(ge=>ce(ge)&&!he.has(ge.predicate)),Le=xe.map(ge=>[ge.subject,ge.predicate,ge.object]),kt=pr(Le,ee,Y,fe,{budget:10});for(let ge of D){let Qe=kt.find(nn=>nn.subject===ge&&I.has(nn.object));if(!Qe)continue;let as=xe.find(nn=>nn.subject===Qe.subject&&nn.predicate===Qe.viaProperty&&nn.object===Qe.viaValue),cs=ne.find(nn=>nn.subject===Qe.viaValue&&nn.object===Qe.viaType),So=[as,cs].filter(Boolean).map(se);return{text:`yes \u2014 ${So.length?So.join("; "):`${Qe.subject} ${Qe.viaProperty} ${Qe.viaValue}, and ${Qe.viaValue} is a ${Qe.viaType}.`}`,replace:!0}}let Re=fe.length>1?Ee(fe,Y,{budget:10}):[];if(Re.length){let ge=Y.concat(Re.map(ye=>[ye.subject,ye.object])),Qe=new Map(fe.map(ye=>[ye.restriction,ye])),as=new Map;for(let ye of d)as.set(`${ye.subject}\0${ye.predicate}\0${ye.object}`,ye.trust);let cs=(ye,cn,Tt)=>as.get(`${ye}\0${cn}\0${Tt}`),So=new Map;for(let ye of Re){let cn=Qe.get(ye.subject),Tt=Qe.get(ye.object),Dt=[cn&&cs(ye.subject,x,cn.property),cs(ye.subject,ie,ye.viaY1),Tt&&cs(ye.object,x,Tt.property),cs(ye.object,ie,ye.viaY2),cs(ye.viaY1,te,ye.viaY2)].filter(nh=>typeof nh=="number"),fr=ll(Dt,Ds);fr!==null&&So.set(`${ye.subject}\0${ye.object}`,fr)}let nn=ye=>{if(ye.predicate!==te)return ne.find(Dt=>Dt.subject===ye.subject&&Dt.object===ye.object);let cn=$e.find(Dt=>Dt.subject===ye.subject&&Dt.object===ye.object);if(cn)return cn;let Tt=Re.find(Dt=>Dt.subject===ye.subject&&Dt.object===ye.object);return Tt?{subject:Tt.subject,predicate:te,object:Tt.object,provenance:kn,trust:So.get(`${Tt.subject}\0${Tt.object}`)}:void 0};for(let ye of D){let cn=G(ye,I,ee,ge,{maxHops:3});if(!cn)continue;let Tt=cn.map(nn);if(Tt.every(Boolean)){let Dt=ll(Tt.map(fr=>fr.trust),1);return{text:`yes \u2014 ${vi(Tt)}`,replace:!0,...Dt!==null?{trust:Dt}:{}}}}}}let eh=X(l,M),pl=f.filter(z=>eh.has(z.subject)).sort(p),is=M.trim(),mr=Vt(w[2]).trim(),th=[...D].some(z=>G(z,I,ee,Y,{maxHops:mk}));if(pl.length){let z=pl.slice(0,3).map(se).join("; "),fe=th?`The facts to settle it are here, but the chain is longer than I follow while answering. Run "/syllogise ${is}", then ask me again.`:`If it's true, teach me: "${is} is a kind of ${mr}".`;return{text:`I can't confirm that \u2014 nothing I remember says ${is} is a ${mr}. I do know: ${z}. ${fe}`,replace:!0,miss:!0}}let ml=f.filter(z=>D.has(z.object)&&I.has(z.subject)).sort(p)[0];return ml?{text:`I can't confirm that \u2014 what I know runs the other way: ${se(ml)}. A kind doesn't reverse. If it's true, teach me: "every ${is} is a ${mr}".`,replace:!0,miss:!0}:!Je&&!V&&!qx(is)&&!d.some(z=>D.has(z.subject)||D.has(z.object))?{text:`I can't confirm that \u2014 I don't know "${is}" at all yet. If it's true, teach me: "${is} is a kind of ${mr}".`,replace:!0,miss:!0}:null}let k=c.match(zk);if(k){let[,I,M,D]=k,{SUBCLASS_PREDICATE:V,ON_PROPERTY_PREDICATE:G,buildCardinalityRestrictions:q,proveCardinalityAtLeast:te,CARDINALITY_RULE_CONFIDENCE:oe,entailedTrustFrom:Se}=await Promise.resolve().then(()=>(Wt(),Xt)),ce=Ps,$e=f.filter(ee=>ee.predicate===V&&ce(ee)).map(ee=>[ee.subject,ee.object]),ne=d.filter(ee=>(ee.predicate===G||Cf.has(ee.predicate))&&ce(ee)),Y=q(ne);if(Y.length){let ee=X(l,I.trim()),Ie=X(l,D.trim()),H=Number(M),Q=jf(ee,Ie,(we,re)=>te($e,Y,we,re,H,{}));if(Q){let we=d.find(me=>me.predicate===V&&me.subject===Q.viaClass&&me.object===Q.viaRestriction),re=we?.provenance?` (source: ${we.provenance})`:"",be=Q.kind==="exactly"?"exactly":"at least",Fe=(me,Pt)=>`${me}${Pt===1?"":"s"}`,pe=[we?.trust,...ne.filter(me=>me.subject===Q.viaRestriction).map(me=>me.trust),...Q.viaClass!==Q.subject?[f.find(me=>me.predicate===V&&me.subject===Q.subject&&me.object===Q.viaClass)?.trust]:[]].filter(me=>typeof me=="number"),je=Se(pe,oe);return{text:`yes \u2014 every ${Q.viaClass} has ${be} ${Q.n} ${Fe(Q.object,Q.n)}${re}, so at least ${H} follows.`,replace:!0,...je!==null?{trust:je}:{}}}}}let S=c.match(Bk);if(S){let[,I,M]=S,{SUBCLASS_PREDICATE:D,ON_PROPERTY_PREDICATE:V,buildCardinalityRestrictions:G,proveMaxCardinalityZeroDenial:q,CAX_MAXC0_RULE_CONFIDENCE:te,entailedTrustFrom:oe}=await Promise.resolve().then(()=>(Wt(),Xt)),Se=Ps,ce=f.filter(Y=>Y.predicate===D&&Se(Y)).map(Y=>[Y.subject,Y.object]),$e=d.filter(Y=>(Y.predicate===V||Cf.has(Y.predicate))&&Se(Y)),ne=G($e);if(ne.length){let Y=X(l,I.trim()),ee=X(l,M.trim()),Ie=jf(Y,ee,(H,Q)=>q(ce,ne,H,Q,{}));if(Ie){let H=d.find(be=>be.predicate===D&&be.subject===Ie.viaClass&&be.object===Ie.viaRestriction),Q=H?.provenance?` (source: ${H.provenance})`:"",we=[H?.trust,...$e.filter(be=>be.subject===Ie.viaRestriction).map(be=>be.trust),...Ie.viaClass!==Ie.subject?[f.find(be=>be.predicate===D&&be.subject===Ie.subject&&be.object===Ie.viaClass)?.trust]:[]].filter(be=>typeof be=="number"),re=oe(we,te);return{text:`no \u2014 every ${Ie.viaClass} has at most 0 ${Ie.object}${Q}.`,replace:!0,...re!==null?{trust:re}:{}}}}}let $=c.match(Uk);if($){let I=X(l,$[1]),M=d.filter(D=>D.predicate===Wc&&I.has(D.subject)).sort(p);return M.length?m(M):null}let v=u.match(Wk);if(v){let[,I,M]=v,D=X(l,I.trim()),V=X(l,M.replace(/^an?\s+/i,"").trim()),G=d.filter(q=>q.predicate===Wc&&V.has(q.subject)&&D.has(q.object)).sort(p)[0];return G?{text:`yes \u2014 ${se(G)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${I.trim().toLowerCase()} owns/maintains ${M.trim()}.`,replace:!0}}let A=u.match(Gk);if(A){let[,I,M]=A,D=X(l,I.replace(/^an?\s+/i,"").trim()),V=X(l,M.trim()),G=d.filter(q=>q.predicate===Wc&&D.has(q.subject)&&V.has(q.object)).sort(p)[0];return G?{text:`yes \u2014 ${se(G)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${I.trim().toLowerCase()} is owned by ${M.trim()}.`,replace:!0}}let T=u.match(qk);if(T){let[,I,M]=T,D=X(l,I.trim()),V=X(l,`${M.trim()} method`),G=d.filter(q=>q.predicate===Cs&&D.has(q.subject)&&V.has(q.object)).sort(p)[0];return G?{text:`yes \u2014 ${se(G)}`,replace:!0}:null}let C=u.match(Vk);if(C){let I=X(l,C[1].trim()),M=d.filter(D=>D.predicate===Cs&&I.has(D.subject)&&/ method$/.test(D.object)).sort(p);return M.length?m(M):null}let E=u.match(If);if(E){let I=E[1].trim(),M=Of.test(I)?null:rs.test(I)?r||null:I,D=E[2].trim().toLowerCase();if(M){let V=X(l,M),G=new Map,q=null;if(o){let ne=await dr(o,M);if(q=ne,ne)for(let Y of xi(o,ne.id))for(let ee of X(l,Y.label))!V.has(ee)&&!G.has(ee)&&G.set(ee,Y.label),V.add(ee)}let te=ne=>ne.predicate===Gc&&l(ne.object)===D||ne.predicate===`tmct:${D}`&&ne.object==="true",oe=l(M).split(/\s+/).filter(ne=>ne.length>=4&&!Gf.has(ne)),Se=ne=>oe.some(Y=>new Set(String(ne.subject||"").split(/\s+/)).has(Y)),ce=ne=>V.has(ne.subject)||oe.length&&Se(ne),$e=d.filter(ne=>ce(ne)&&te(ne)).sort(p)[0];if($e){let ne=G.get($e.subject);return{text:ne?`yes \u2014 the code graph says ${q.label} inherits ${ne}, and ${se($e)}`:`yes \u2014 ${se($e)}`,replace:!0}}{let{findIsaChain:ne,SUBCLASS_PREDICATE:Y,TYPE_PREDICATE:ee}=await Promise.resolve().then(()=>(Wt(),Xt)),Ie=Ps,H=d.filter(pe=>pe.predicate===Y&&Ie(pe)),Q=d.filter(pe=>pe.predicate===ee&&Ie(pe)),we=H.map(pe=>[pe.subject,pe.object]),re=Q.map(pe=>[pe.subject,pe.object]),be=pe=>(pe.predicate===Y?H:Q).find(je=>je.subject===pe.subject&&je.object===pe.object),Fe=X(l,D);for(let pe of V){let je=ne(pe,Fe,re,we,{maxHops:2});if(!je)continue;let me=je.map(be);if(me.every(Boolean))return{text:`yes \u2014 ${vi(me)}`,replace:!0}}}if(d.some(ce)&&!n?.parsed)return{text:`I don't have a fact saying ${lk(M)} is ${D}.`,replace:!0};if(!n?.parsed&&!Ef.test(D))return Lf(M,D)}}let R=nl(c).match(Qx);if(R&&!Kc.test(c)){let[,I,M,D]=R,V=M.toLowerCase();if(!Hc.test(V)&&!Xc.test(V)){let G=I.trim(),q=tk(await Yc(V),D),te=q.object.replace(/^an?\s+/i,"").trim();if(G&&te){let oe=q.predicate,Se=X(l,G),ce=X(l,te),$e=[oe,ao(oe)],ne=d.filter(ee=>$e.includes(ee.predicate)&&Se.has(ee.subject)&&ce.has(ee.object)).sort(p)[0];if(ne)return{text:`${Rp(ne.predicate)?"no":"yes"} \u2014 ${se(ne)}`,replace:!0,generalVerbQuery:!0};let Y=d.filter(ee=>$e.includes(ee.predicate)&&Se.has(ee.subject));if(Y.length){let ee=Y.slice(0,3).map(se).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${Rt({subject:G,predicate:oe,object:te})}. I do know: ${ee}.`,replace:!0,miss:!0}}return null}}}let N=c.match(Zx);if(N&&!Kc.test(c)){let[,I,M]=N,[D,V]=M.toLowerCase().split(/\s+/);if(!Hc.test(D)&&!Xc.test(D)){let G=I.trim();if(G){let q=await Yc(D);V&&/^mgx:[a-z]+$/.test(q)&&(q=`${q}-${V}`);let te=X(l,G),oe=[q,ao(q)],Se=Xe(d.filter(ce=>oe.includes(ce.predicate)&&te.has(ce.subject)),i);if(Se.length)return{...m(Se),generalVerbQuery:!0}}}}let j=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(j&&!Kc.test(c)){let[,I,M,D]=j,V=I.toLowerCase();if(!Hc.test(V)&&!Xc.test(V)&&!Jx.test(V)){let G=await Yc(V);/^mgx:[a-z]+$/.test(G)&&(G=`${G}-${M.toLowerCase()}`);let q=X(l,D.replace(/^(?:an?|the)\s+/i,"").trim()),te=Xe(d.filter(oe=>oe.predicate===G&&q.has(oe.object)),i);if(te.length)return{...m(te),generalVerbQuery:!0}}}let _=c.match(Fk);if(_){let I=X(l,_[1]),M=Xe(d.filter(oe=>I.has(oe.subject)||I.has(oe.object)),i);if(!M.length)return null;let D=I.has(M[0].subject)?M[0].subject:M[0].object,V=M.map(oe=>` ${se(oe)}`),G=V.slice(0,Ce),q=V.slice(Ce),te=q.length?`
168
+ \u2026and ${q.length} more \u2014 say 'more' to see them.`:"";return{text:`${M.length} remembered fact${M.length===1?"":"s"} about ${D}:
169
+ ${G.join(`
170
+ `)}${te}`,replace:!0,...q.length?{pending:{items:q.map(oe=>oe.trim()),noun:"facts"}}:{}}}let O=n?.parsed?.shape==="meta"?n.parsed.object:null,P=!1,L=c.match(Dk);if(L)O=L[1],P=!0;else if(!O&&!n?.parsed){let I=c.match(/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i);I&&(O=I[1])}if(!O)return null;let B=X(l,O),W=Xe(f.filter(I=>B.has(I.subject)),i),U=Xe(f.filter(I=>B.has(I.object)),i),F=P?W.length?W:U:U.length?U:W;return F.length?m(F):null}var _P=new RegExp(`\\b(?:${[...sl].join("|")})\\b`,"i");var Qf=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,Qk=/^who\s+(?:is|are|was|were)\s+(?:an?\s+|the\s+)?([\w'-]+)[?.!\s]*$/i;var RP=new RegExp(`^(?:(?:the|a|an)\\s+)?(.+?)\\s+(${Object.keys(ze).join("|")})$`,"i");var AP={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:en.contains,subclasses:en.inherits,impact:"understand what a change to this module would reach (impact closure)",callers:en.calls,callees:en.calls,tests:en.tests,untested:en.tests,history:en.touches,exports:en.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"};var Zf="(?:changed?|modif(?:y|ied)|edits?|edited|touch(?:es|ed)?|updates?|updated|alters?|altered|deletes?|deleted|removes?|removed|drops?|dropped)",TP=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+${Zf}\\s+(?:the\\s+)?(.+?)[?.!\\s]*$`,"i"),CP=new RegExp(`^if\\s+(?:i|we|you|one|someone)\\s+${Zf}\\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"),IP=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"),OP=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"),LP=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");var Si="as\\s+(?:its|the|an?)?\\s*(?:base\\s+class|parent\\s+class|base|parent)",NP=new RegExp(`^(.+?)\\s+uses?\\s+(?:which\\s+[\\w'-]+|what)\\s+${Si}\\s*\\??$`,"i"),MP=new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+uses?\\s+${Si}\\s*\\??$`,"i"),PP=new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+uses?\\s+(.+?)\\s+${Si}\\s*\\??$`,"i"),FP=new RegExp(`^(.+?)\\s+uses?\\s+(.+?)\\s+${Si}\\s*[.!]*$`,"i");var Zk=Object.freeze([...sl].filter(e=>e!=="here").concat("they")),DP=new RegExp(`^((?:is|are|can|could|does|do)\\s+|what\\s+(?:is|are)\\s+)(${Zk.join("|")})\\b(\\s+\\S.*)?$`,"i");var zP=J(".tmct","memory","corpus-seed.json");Ye();globalThis.tmctMemoryAsk={factAnswer:Yf,factReadBack:Jf,createInMemoryStore:ri,normFactTerm:Z};})();