"use strict";var p=Object.create;var h=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var b=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0})},f=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!y.call(e,s)&&s!==n&&h(e,s,{get:()=>t[s],enumerable:!(r=m(t,s))||r.enumerable});return e};var u=(e,t,n)=>(n=e!=null?p(M(e)):{},f(t||!e||!e.__esModule?h(n,"default",{value:e,enumerable:!0}):n,e)),E=e=>f(h({},"__esModule",{value:!0}),e);var U={};b(U,{basicMatcher:()=>$,loadMatcher:()=>x});module.exports=E(U);var $={isMatch:(e,t)=>{let n=c(e);return t.some(r=>W(n,c(r)))}},x=async e=>{if(e==="micromatch"){let t;try{t=await import("micromatch")}catch{throw new Error("micromatch is not installed. Please add it as a dependency if you want to use it.")}return{isMatch:(n,r)=>{try{return t.isMatch(c(n),r.map(c))}catch(s){throw new Error(`micromatch failed to run isMatch: ${s.message}`)}}}}if(e==="picomatch"){let t;try{t=(await import("picomatch")).default}catch{throw new Error("picomatch is not installed. Please add it as a dependency if you want to use it.")}return{isMatch:(n,r)=>{try{return t(r.map(c))(c(n))}catch(s){throw new Error(`picomatch failed to run isMatch: ${s.message}`)}}}}throw new Error(`Unknown matcher name: ${e}`)},c=e=>{let t="",n=!1;for(let r of e)n?(t+=r,n=!1):r==="\\"?(n=!0,t+="\\"):r==="."?t+="/":t+=r;return t},P=e=>{let t=e.startsWith("!"),n=t?e.slice(1):e,r=[],s="",i=!1;for(let a of n)i?(s+="\\"+a,i=!1):a==="\\"?i=!0:a==="/"?(r.push(s),s=""):s+=a;return i&&(s+="\\"),r.push(s),t&&(r.negated=!0),r},W=(e,t)=>{let n=e.split("/"),r=P(t),s=r.negated===!0,i=d(n,r);return s?!i:i},d=(e,t)=>{let n=0,r=0;for(;n<e.length&&r<t.length;){let s=t[r];if(s==="**"){if(r===t.length-1)return!0;for(let i=0;n+i<=e.length;i++)if(d(e.slice(n+i),t.slice(r+1)))return!0;return!1}if(!k(e[n],s))return!1;n++,r++}for(;r<t.length&&t[r]==="**";)r++;return n===e.length&&r===t.length},k=(e,t)=>{let n=!1,r=!1,s="",i="";for(let o=0;o<t.length;o++){let l=t[o];if(n){i+=l,n=!1;continue}if(l==="\\"){n=!0;continue}if(l==="*"){if(!r){r=!0,s=i,i="";continue}i+="*";continue}i+=l}if(n&&(i+="\\"),!r){let o=i.replace(/\\(.)/g,"$1");return e===o}let a=i.replace(/\\(.)/g,"$1"),g=s.replace(/\\(.)/g,"$1");return e.startsWith(g)&&e.endsWith(a)};0&&(module.exports={basicMatcher,loadMatcher});
