import{a as r,b as s}from"./chunk-SIWBT4LK.mjs";import{a as c,b as o,g as t}from"./chunk-IFUYCFBO.mjs";import"./chunk-76CZ6Z7T.mjs";for(let a of["basicMatcher","micromatch","picomatch"])c(a,async()=>{let e=a==="basicMatcher"?r:await s(a);o("matches exact strings",()=>{t(e.isMatch("foo.bar",["foo.bar"])).toBe(!0),t(e.isMatch("foo.bar",["foo.baz"])).toBe(!1)}),o("matches with single * segment",()=>{t(e.isMatch("foo.bar",["foo.*"])).toBe(!0),t(e.isMatch("foo.baz.qux",["foo.*.qux"])).toBe(!0),t(e.isMatch("foo.bar",["*.baz"])).toBe(!1)}),o("matches with ** for nested paths",()=>{t(e.isMatch("a.b.c",["a.**"])).toBe(!0),t(e.isMatch("a.b.c.d",["a.**.d"])).toBe(!0),t(e.isMatch("a.b.c.d",["**.d"])).toBe(!0),t(e.isMatch("a.b.c.d",["*.d"])).toBe(!1),t(e.isMatch("a.b.c",["**"])).toBe(!0)}),o("supports prefix-* and *-suffix in segments",()=>{t(e.isMatch("foo.helloWorld",["foo.hello*"])).toBe(!0),t(e.isMatch("foo.helloWorld",["foo.*World"])).toBe(!0),t(e.isMatch("foo.helloWorld",["foo.hel*ld"])).toBe(!0),t(e.isMatch("foo.helloWorld",["foo.hel*xyz"])).toBe(!1)}),o("returns true if any pattern matches",()=>{t(e.isMatch("foo.bar",["no.match","foo.*"])).toBe(!0)}),o("handles empty patterns",()=>{t(e.isMatch("foo.bar",[])).toBe(!1)}),o("respects escapes",()=>{t(e.isMatch("foo.helloWorld",["foo.hello*"])).toBe(!0),t(e.isMatch("foo.helloWorld",["foo.hello\\*"])).toBe(!1),t(e.isMatch("foo.hello*",["foo.hello\\*"])).toBe(!0),t(e.isMatch("a.b.c",["a.**"])).toBe(!0),t(e.isMatch("a.b.c",["a.\\*\\*"])).toBe(!1),t(e.isMatch("a.**",["a.\\*\\*"])).toBe(!0),t(e.isMatch("a.c.b",["a.***"])).toBe(!1)}),o("negates exact match",()=>{t(e.isMatch("src/index.ts",["!src/index.ts"])).toBe(!1),t(e.isMatch("src/other.ts",["!src/index.ts"])).toBe(!0)}),o("negates directory glob",()=>{t(e.isMatch("src/utils/app.ts",["!src/**"])).toBe(!1),t(e.isMatch("lib/app.ts",["!src/**"])).toBe(!0)}),o("negates simple * wildcard (recursive)",()=>{t(e.isMatch("test/app.test.ts",["!**/*.test.ts"])).toBe(!1),t(e.isMatch("test/app.ts",["!**/*.test.ts"])).toBe(!0)}),o("root level negation",()=>{t(e.isMatch("src",["!src"])).toBe(!1),t(e.isMatch("other",["!src"])).toBe(!0)})});c("loadMatcher",()=>{o("loads micromatch when available",async()=>{let a=await s("micromatch");t(a.isMatch("foo",["foo"])).toBe(!0),t(a.isMatch("bar",["foo"])).toBe(!1)}),o("loads picomatch when available",async()=>{let a=await s("picomatch");t(a.isMatch("okmyfield",["ok*"])).toBe(!0),t(a.isMatch("fail",["pattern"])).toBe(!1)}),o("throws on unknown matcher",async()=>{await t(()=>s("invalid")).rejects.toThrow(/Unknown matcher/)})});
