import{t as e}from"./chunk-YNYSPYQ5-gU4-j5DO.mjs";var t=2048,n=new Map;function r(e,r,a){let o=typeof a==`boolean`?{ignoreCase:a}:a??{},s=r;o.stripQuotes&&(s.startsWith(`"`)&&s.endsWith(`"`)||s.startsWith(`'`)&&s.endsWith(`'`))&&(s=s.slice(1,-1));let c=o.ignoreCase?`i:${s}`:s,l=n.get(c);if(!l){if(l=i(s,o.ignoreCase),n.size>=t){let e=n.keys().next().value;e!==void 0&&n.delete(e)}n.set(c,l)}return l.test(e)}function i(t,n){let r=`^`;for(let e=0;e<t.length;e++){let n=t[e];if(n===`*`)r+=`.*`;else if(n===`?`)r+=`.`;else if(n===`[`){let n=e+1;for(;n<t.length&&t[n]!==`]`;)n++;r+=t.slice(e,n+1),e=n}else n===`.`||n===`+`||n===`^`||n===`$`||n===`{`||n===`}`||n===`(`||n===`)`||n===`|`||n===`\\`?r+=`\\${n}`:r+=n}return r+=`$`,e(r,n?`i`:``)}export{r as t};
//# sourceMappingURL=chunk-J642UCRS-HjD8qpZD.mjs.map