import{__module as e}from"../../_virtual/index49.mjs";import t from"../../_virtual/_node_path.mjs";import{__require as r}from"../path-type/index.mjs";var o;function s(){if(o)return e.exports;o=1;const s=t,i=r(),n=e=>e.length>1?`{${e.join(",")}}`:e[0],p=(e,t)=>{const r="!"===e[0]?e.slice(1):e;return s.isAbsolute(r)?r:s.join(t,r)},c=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>{return s.posix.join(e,(o=r,i=t.extensions,s.extname(o)?`**/${o}`:`**/${o}.${n(i)}`));var o,i}):t.files?t.files.map(t=>s.posix.join(e,`**/${t}`)):t.extensions?[s.posix.join(e,`**/*.${n(t.extensions)}`)]:[s.posix.join(e,"**")]};return e.exports=async(e,t)=>{if("string"!=typeof(t={cwd:process.cwd(),...t}).cwd)throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);const r=await Promise.all([].concat(e).map(async e=>await i.isDirectory(p(e,t.cwd))?c(e,t):e));return[].concat.apply([],r)},e.exports.sync=(e,t)=>{if("string"!=typeof(t={cwd:process.cwd(),...t}).cwd)throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);const r=[].concat(e).map(e=>i.isDirectorySync(p(e,t.cwd))?c(e,t):e);return[].concat.apply([],r)},e.exports}export{s as __require};