// @bun
import{nc as J}from"./chunk-2vw7w2j4.js";var S=typeof globalThis.Bun?.hash==="function";function z(u){if(S)return Bun.hash(u);let g=0;for(let f=0;f<u.length;f++){let b=u.charCodeAt(f);g=(g<<5)-g+b,g=g&g}return g}var T=100,G=0,B=new Map;function Y(u,g,f=!0,b=!1){let x=z(u),F=`${g}:${f?1:0}:${b?1:0}`,p=B.get(F);if(p&&p.contentHash===x)return p.lastAccess=++G,p.declarations;let j=J(u,g,f,b);if(B.set(F,{declarations:j,contentHash:x,lastAccess:++G}),B.size>T){let w=null,q=1/0;for(let[Q,v]of B)if(v.lastAccess<q)q=v.lastAccess,w=Q;if(w)B.delete(w)}return j}function $(){B.clear()}
export{z as kc,Y as lc,$ as mc};
