@visulima/packem 2.0.0-alpha.95 → 2.0.0-alpha.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,25 @@
1
+ import{createRequire as B}from"node:module";const de=0,yr=4,mr=Symbol("findUpStop"),Jr=/^[A-Z]:\//i,bt=(t="")=>t&&t.replaceAll("\\","/").replace(Jr,e=>e.toUpperCase()),ts=/^[/\\]{2}/,es=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,$r=/^[A-Z]:$/i,Ie=/^\/([A-Z]:)?$/i,rs=/.(\.[^./]+)$/,ss=/^[/\\]|^[a-z]:[/\\]/i,ns=/\/$/,os=()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/",br=(t,e)=>{let r="",n=0,o=-1,s=0,i;for(let u=0;u<=t.length;++u){if(u<t.length)i=t[u];else{if(i==="/")break;i="/"}if(i==="/"){if(!(o===u-1||s===1))if(s===2){if(r.length<2||n!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const a=r.lastIndexOf("/");a===-1?(r="",n=0):(r=r.slice(0,a),n=r.length-1-r.lastIndexOf("/")),o=u,s=0;continue}else if(r.length>0){r="",n=0,o=u,s=0;continue}}e&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${t.slice(o+1,u)}`:r=t.slice(o+1,u),n=u-o-1;o=u,s=0}else i==="."&&s!==-1?++s:s=-1}return r},$t=t=>es.test(t),oe=function(t){if(t.length===0)return".";t=bt(t);const e=ts.exec(t),r=$t(t),n=t.at(-1)==="/";return t=br(t,!r),t.length===0?r?"/":n?"./":".":(n&&(t+="/"),$r.test(t)&&(t+="/"),e?r?`//${t}`:`//./${t}`:r&&!$t(t)?`/${t}`:t)},ye=(...t)=>{let e="";for(const r of t)if(r)if(e.length>0){const n=e.at(-1)==="/",o=r[0]==="/";n&&o?e+=r.slice(1):e+=n||o?r:`/${r}`}else e+=r;return oe(e)},pt=function(...t){t=t.map(n=>bt(n));let e="",r=!1;for(let n=t.length-1;n>=-1&&!r;n--){const o=n>=0?t[n]:os();!o||o.length===0||(e=`${o}/${e}`,r=$t(o))}return e=br(e,!r),r&&!$t(e)?`/${e}`:e.length>0?e:"."},Hu=function(t){return bt(t)},is=function(t){return rs.exec(bt(t))?.[1]??""},Bu=function(t,e){const r=pt(t).replace(Ie,"$1").split("/"),n=pt(e).replace(Ie,"$1").split("/");if(n[0][1]===":"&&r[0][1]===":"&&r[0]!==n[0])return n.join("/");const o=Math.min(r.length,n.length);let s=0;for(;s<o&&r[s]===n[s];)s+=1;const i=r.length-s;return[...Array.from({length:i}).fill(".."),...n.slice(s)].join("/")},ie=t=>{const e=bt(t).replace(ns,""),r=e.lastIndexOf("/");if(r===-1)return $t(t)?"/":".";const n=e.slice(0,r);return $r.test(n)?`${n}/`:n||($t(t)?"/":".")},He=(t,e)=>{const r=bt(t),n=r.slice(r.lastIndexOf("/")+1);if(e&&n.endsWith(e)){if(e===r)return"";const o=n.slice(0,-e.length);if(o.length>0)return o}return n},vr=function(t){const e=ss.exec(t)?.[0]?.replaceAll("\\","/")??"",r=He(t),n=is(r);return{base:r,dir:ie(t),ext:n,name:r.slice(0,r.length-n.length),root:e}},us=B(import.meta.url),At=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,as=t=>{if(typeof At<"u"&&At.versions&&At.versions.node){const[e,r]=At.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return At.getBuiltinModule(t)}return us(t)},{fileURLToPath:ls}=as("node:url");function cs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Pe,Fe;function ps(){return Fe||(Fe=1,Pe=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),Pe}var fs=ps();const hs=cs(fs);new Set(hs);const gs=new Set(["/","\\",void 0]),Ge=Symbol.for("pathe:normalizedAlias"),ds=(t,e)=>e.split("/").length-t.split("/").length,Ue=(t="/")=>{const e=t.at(-1);return e==="/"||e==="\\"},ys=t=>{if(t[Ge])return t;const e=Object.fromEntries(Object.entries(t).toSorted(([r],[n])=>ds(r,n)));for(const r in e)for(const n in e)n===r||r.startsWith(n)||e[r].startsWith(n)&&gs.has(e[r][n.length])&&(e[r]=e[n]+e[r].slice(n.length));return Object.defineProperty(e,Ge,{enumerable:!1,value:!0}),e},Mu=(t,e)=>{t=bt(t),e=ys(e);for(const[r,n]of Object.entries(e)){if(!t.startsWith(r))continue;const o=Ue(r)?r.slice(0,-1):r;if(Ue(t[o.length]))return ye(n,t.slice(r.length))}return t},ms=/^(?:\.?\.[/\\]|\.\.\B)/,Du=t=>ms.test(t)||t==="..",V=t=>bt(t instanceof URL?ls(t):t);let wr=class extends Error{constructor(e){super(`EEXIST: ${e}`)}get code(){return"EEXIST"}set code(e){throw new Error("Cannot overwrite code EEXIST")}get name(){return"AlreadyExistsError"}set name(e){throw new Error("Cannot overwrite name of AlreadyExistsError")}};const ot=t=>{if(!t||!(t instanceof URL)&&typeof t!="string")throw new TypeError("Path must be a non-empty string or URL.")},$s=B(import.meta.url),xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,bs=t=>{if(typeof xt<"u"&&xt.versions&&xt.versions.node){const[e,r]=xt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return xt.getBuiltinModule(t)}return $s(t)};bs("node:fs/promises");const vs=B(import.meta.url),St=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ws=t=>{if(typeof St<"u"&&St.versions&&St.versions.node){const[e,r]=St.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return St.getBuiltinModule(t)}return vs(t)};ws("node:fs");const fe=t=>{if(t.isFile())return"file";if(t.isDirectory())return"dir";if(t.isSymbolicLink())return"symlink"},Es=B(import.meta.url),Tt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,As=t=>{if(typeof Tt<"u"&&Tt.versions&&Tt.versions.node){const[e,r]=Tt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Tt.getBuiltinModule(t)}return Es(t)},{lstat:We,mkdir:xs}=As("node:fs/promises"),Pu=async t=>{ot(t);try{const e=await We(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(fe(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await xs(t,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const r=await We(t);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(fe(r))}'`,{cause:e})}},Ss=B(import.meta.url),Rt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ts=t=>{if(typeof Rt<"u"&&Rt.versions&&Rt.versions.node){const[e,r]=Rt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Rt.getBuiltinModule(t)}return Ss(t)},{lstatSync:ze,mkdirSync:Rs}=Ts("node:fs"),Fu=t=>{ot(t);try{const e=ze(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(fe(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{Rs(t,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const r=ze(t);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(fe(r))}'`,{cause:e})}},_s=B(import.meta.url),_t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ks=t=>{if(typeof _t<"u"&&_t.versions&&_t.versions.node){const[e,r]=_t.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return _t.getBuiltinModule(t)}return _s(t)};ks("node:fs/promises");const Cs=B(import.meta.url),kt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Os=t=>{if(typeof kt<"u"&&kt.versions&&kt.versions.node){const[e,r]=kt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return kt.getBuiltinModule(t)}return Cs(t)};Os("node:fs");const Ns=B(import.meta.url),Ct=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ls=t=>{if(typeof Ct<"u"&&Ct.versions&&Ct.versions.node){const[e,r]=Ct.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ct.getBuiltinModule(t)}return Ns(t)};Ls("node:fs/promises");const Hs=B(import.meta.url),Ot=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Bs=t=>{if(typeof Ot<"u"&&Ot.versions&&Ot.versions.node){const[e,r]=Ot.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ot.getBuiltinModule(t)}return Hs(t)};Bs("node:fs");const Ms=B(import.meta.url),Nt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ds=t=>{if(typeof Nt<"u"&&Nt.versions&&Nt.versions.node){const[e,r]=Nt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Nt.getBuiltinModule(t)}return Ms(t)};Ds("node:fs/promises");const Is=B(import.meta.url),Lt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ps=t=>{if(typeof Lt<"u"&&Lt.versions&&Lt.versions.node){const[e,r]=Lt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Lt.getBuiltinModule(t)}return Is(t)};Ps("node:fs");B(import.meta.url);let he=class extends Error{root;constructor(e,r){super(`${e instanceof Error?e.message:String(e)} for path "${r}"`),this.cause=e,this.root=r}get name(){return"WalkError"}set name(e){throw new Error("Cannot overwrite name of WalkError")}};const ge=t=>{const e=t.replace(/[$()+\\^]/g,String.raw`\$&`).replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`).replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");try{return new RegExp(`^${e}$`)}catch(r){throw new Error(`Invalid glob pattern: ${t}`,{cause:r})}};let Fs=class{name;path;#t;constructor(e,r,n){this.#t=e,this.name=r,this.path=n}isDirectory(){return this.#t.isDirectory()}isFile(){return this.#t.isFile()}isSymbolicLink(){return this.#t.isSymbolicLink()}};const Et=(t,e,r)=>new Fs(t,e,r),mt=(t,e,r,n)=>{if(Array.isArray(e)&&e.length>0&&!e.some(s=>t.endsWith(s)))return!1;const o=t.includes("\\")?t.replaceAll("\\","/"):t;return r&&!r.some(s=>s.test(o))?!1:!n?.some(s=>s.test(o))},Gs=B(import.meta.url),Ht=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Us=t=>{if(typeof Ht<"u"&&Ht.versions&&Ht.versions.node){const[e,r]=Ht.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ht.getBuiltinModule(t)}return Gs(t)},{readdir:Ws,realpath:zs,stat:Er}=Us("node:fs/promises"),js=async t=>{const e=oe(t),r=He(e),n=await Er(e);return Et(n,r,e)};async function*qs(t,e={}){const{extensions:r,followSymlinks:n=!1,includeDirs:o=!0,includeFiles:s=!0,includeSymlinks:i=!0,match:u,maxDepth:a=Number.POSITIVE_INFINITY,skip:m}=e;if(ot(t),a<0)return;const p=e.visited??new Set,d=u?u.map(g=>typeof g=="string"?ge(g):g):void 0,b=m?m.map(g=>typeof g=="string"?ge(g):g):void 0;if(t=pt(V(t)),o&&mt(t,r,d,b)&&(yield await js(t)),!(a<1||!mt(t,void 0,void 0,b)))try{const g=await Ws(t,{withFileTypes:!0});for(const $ of g){let x=ye(t,$.name),R=$.isDirectory(),C=$.isFile();if($.isSymbolicLink())if(n){const O=await zs(x);if(p.has(O))continue;x=O;const y=await Er(O);R=y.isDirectory(),C=y.isFile()}else if(i&&mt(x,r,d,b)){yield Et($,$.name,x);continue}else continue;R?(n&&p.add(x),yield*qs(x,{extensions:r,followSymlinks:n,includeDirs:o,includeFiles:s,includeSymlinks:i,match:d,maxDepth:a-1,skip:b,visited:p})):C&&s&&mt(x,r,d,b)&&(yield Et($,$.name,x))}}catch(g){throw g instanceof he?g:new he(g,t)}}const Xs=B(import.meta.url),Bt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ks=t=>{if(typeof Bt<"u"&&Bt.versions&&Bt.versions.node){const[e,r]=Bt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Bt.getBuiltinModule(t)}return Xs(t)},{readdirSync:Qs,realpathSync:Zs,statSync:Ar}=Ks("node:fs"),Vs=t=>{const e=oe(t),r=Ar(e);return Et(r,He(e),e)};function*Ys(t,e={}){const{extensions:r,followSymlinks:n=!1,includeDirs:o=!0,includeFiles:s=!0,includeSymlinks:i=!0,match:u,maxDepth:a=Number.POSITIVE_INFINITY,skip:m}=e;if(ot(t),a<0)return;const p=e.visited??new Set,d=u?u.map(g=>typeof g=="string"?ge(g):g):void 0,b=m?m.map(g=>typeof g=="string"?ge(g):g):void 0;if(t=pt(V(t)),o&&mt(t,r,d,b)&&(yield Vs(t)),!(a<1||!mt(t,void 0,void 0,b)))try{const g=Qs(t,{withFileTypes:!0});for(const $ of g){let x=ye(t,$.name),R=$.isDirectory(),C=$.isFile();if($.isSymbolicLink())if(n){const O=Zs(x);if(p.has(O))continue;x=O;const y=Ar(O);R=y.isDirectory(),C=y.isFile()}else if(i&&mt(x,r,d,b)){yield Et($,$.name,oe(x));continue}else continue;R?(n&&p.add(x),yield*Ys(x,{extensions:r,followSymlinks:n,includeDirs:o,includeFiles:s,includeSymlinks:i,match:d,maxDepth:a-1,skip:b,visited:p})):C&&s&&mt(x,r,d,b)&&(yield Et($,$.name,oe(x)))}}catch(g){throw g instanceof he?g:new he(g,t)}}const Js=B(import.meta.url),Mt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tn=t=>{if(typeof Mt<"u"&&Mt.versions&&Mt.versions.node){const[e,r]=Mt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Mt.getBuiltinModule(t)}return Js(t)},{stat:en,lstat:rn}=tn("node:fs/promises"),Wu=async(t,e={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=e.cwd?V(e.cwd):process.cwd();let n=pt(r);const{root:o}=vr(n),s=V(e.stopAt??o),i=pt(n,s),u=e.type??"file",a=async function(p){return typeof t=="function"?[await t(p)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]};e.allowSymlinks??=!0;const m=e.allowSymlinks?en:rn;for(;n&&n!==i&&n!==o;){const p=await a(n);for(let d of p){if(d===mr)return;if(d===void 0)continue;Buffer.isBuffer(d)?d=d.toString():d instanceof URL&&(d=V(d));const b=$t(d)?d:pt(n,d);try{const g=await m(b);if(u==="file"&&g.isFile()||u==="directory"&&g.isDirectory())return b}catch{}}n=ie(n)}},sn=B(import.meta.url),Dt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,nn=t=>{if(typeof Dt<"u"&&Dt.versions&&Dt.versions.node){const[e,r]=Dt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Dt.getBuiltinModule(t)}return sn(t)},{statSync:on,lstatSync:un}=nn("node:fs"),zu=(t,e={})=>{const r=e.cwd?V(e.cwd):process.cwd();let n=pt(r);const{root:o}=vr(n),s=V(e.stopAt??o),i=pt(n,s),u=e.type??"file",a=function(p){return[t]};e.allowSymlinks??=!0;const m=e.allowSymlinks?on:un;for(;n&&n!==i&&n!==o;){for(let p of a()){if(p===mr)return;if(p===void 0)continue;Buffer.isBuffer(p)?p=p.toString():p instanceof URL&&(p=V(p));const d=$t(p)?p:pt(n,p);try{const b=m(d);if(u==="file"&&b.isFile()||u==="directory"&&b.isDirectory())return d}catch{}}n=ie(n)}};function Be(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var je={},ve,qe;function me(){if(qe)return ve;qe=1;const t="[^\\\\/]",e=Symbol("unignore"),r="\\.",n="\\+",o="\\?",s="\\/",i="(?=.)",u="[^/]",a=`(?:${s}|$)`,m=`(?:^|${s})`,p=`${r}{1,2}${a}`,d=`(?!${r})`,b=`(?!${m}${p})`,g=`(?!${r}{0,1}${a})`,$=`(?!${p})`,x=`[^.${s}]`,R=`${u}*?`,C="/",O={DOT_LITERAL:r,PLUS_LITERAL:n,QMARK_LITERAL:o,SLASH_LITERAL:s,ONE_CHAR:i,QMARK:u,END_ANCHOR:a,DOTS_SLASH:p,NO_DOT:d,NO_DOTS:b,NO_DOT_SLASH:g,NO_DOTS_SLASH:$,QMARK_NO_DOT:x,STAR:R,START_ANCHOR:m,SEP:C},y={...O,SLASH_LITERAL:"[\\\\/]",QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${r}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[\\\\/])${r}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},E={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return ve={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:E,UNIGNORE:e,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(l){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${l.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(l){return l===!0?y:O}},ve}var Xe;function $e(){return Xe||(Xe=1,(function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:r,REGEX_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_GLOBAL:o}=me();t.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),t.hasRegexChars=s=>n.test(s),t.isRegexChar=s=>s.length===1&&t.hasRegexChars(s),t.escapeRegex=s=>s.replace(o,"\\$1"),t.toPosixSlashes=s=>s.replace(e,"/"),t.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const s=navigator.platform.toLowerCase();return s==="win32"||s==="windows"}return process.platform?process.platform==="win32":!1},t.removeBackslashes=s=>s.replace(r,i=>i==="\\"?"":i),t.escapeLast=(s,i,u)=>{const a=s.lastIndexOf(i,u);return a===-1?s:s[a-1]==="\\"?t.escapeLast(s,i,a-1):`${s.slice(0,a)}\\${s.slice(a)}`},t.removePrefix=(s,i={})=>{let u=s;return u.startsWith("./")&&(u=u.slice(2),i.prefix="./"),u},t.wrapOutput=(s,i={},u={})=>{const a=u.contains?"":"^",m=u.contains?"":"$";let p=`${a}(?:${s})${m}`;return i.negated===!0&&(p=`(?:^(?!${p}).*$)`),p},t.basename=(s,{windows:i}={})=>{const u=s.split(i?/[\\/]/:"/"),a=u[u.length-1];return a===""?u[u.length-2]:a}})(je)),je}var we,Ke;function an(){if(Ke)return we;Ke=1;const t=$e(),{CHAR_ASTERISK:e,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:u,CHAR_LEFT_CURLY_BRACE:a,CHAR_LEFT_PARENTHESES:m,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:d,CHAR_QUESTION_MARK:b,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:$,CHAR_RIGHT_SQUARE_BRACKET:x}=me(),R=O=>O===u||O===n,C=O=>{O.isPrefix!==!0&&(O.depth=O.isGlobstar?1/0:1)};return we=(O,y)=>{const E=y||{},l=O.length-1,_=E.parts===!0||E.scanToEnd===!0,N=[],S=[],T=[];let A=O,D=-1,G=0,tt=0,ft=!1,et=!1,q=!1,rt=!1,ht=!1,it=!1,st=!1,z=!1,ut=!1,Q=!1,gt=0,Z,k,I={value:"",depth:0,isGlob:!1};const K=()=>D>=l,h=()=>A.charCodeAt(D+1),U=()=>(Z=k,A.charCodeAt(++D));for(;D<l;){k=U();let Y;if(k===n){st=I.backslashes=!0,k=U(),k===a&&(it=!0);continue}if(it===!0||k===a){for(gt++;K()!==!0&&(k=U());){if(k===n){st=I.backslashes=!0,U();continue}if(k===a){gt++;continue}if(it!==!0&&k===s&&(k=U())===s){if(ft=I.isBrace=!0,q=I.isGlob=!0,Q=!0,_===!0)continue;break}if(it!==!0&&k===o){if(ft=I.isBrace=!0,q=I.isGlob=!0,Q=!0,_===!0)continue;break}if(k===g&&(gt--,gt===0)){it=!1,ft=I.isBrace=!0,Q=!0;break}}if(_===!0)continue;break}if(k===u){if(N.push(D),S.push(I),I={value:"",depth:0,isGlob:!1},Q===!0)continue;if(Z===s&&D===G+1){G+=2;continue}tt=D+1;continue}if(E.noext!==!0&&(k===d||k===r||k===e||k===b||k===i)&&h()===m){if(q=I.isGlob=!0,rt=I.isExtglob=!0,Q=!0,k===i&&D===G&&(ut=!0),_===!0){for(;K()!==!0&&(k=U());){if(k===n){st=I.backslashes=!0,k=U();continue}if(k===$){q=I.isGlob=!0,Q=!0;break}}continue}break}if(k===e){if(Z===e&&(ht=I.isGlobstar=!0),q=I.isGlob=!0,Q=!0,_===!0)continue;break}if(k===b){if(q=I.isGlob=!0,Q=!0,_===!0)continue;break}if(k===p){for(;K()!==!0&&(Y=U());){if(Y===n){st=I.backslashes=!0,U();continue}if(Y===x){et=I.isBracket=!0,q=I.isGlob=!0,Q=!0;break}}if(_===!0)continue;break}if(E.nonegate!==!0&&k===i&&D===G){z=I.negated=!0,G++;continue}if(E.noparen!==!0&&k===m){if(q=I.isGlob=!0,_===!0){for(;K()!==!0&&(k=U());){if(k===m){st=I.backslashes=!0,k=U();continue}if(k===$){Q=!0;break}}continue}break}if(q===!0){if(Q=!0,_===!0)continue;break}}E.noext===!0&&(rt=!1,q=!1);let F=A,dt="",c="";G>0&&(dt=A.slice(0,G),A=A.slice(G),tt-=G),F&&q===!0&&tt>0?(F=A.slice(0,tt),c=A.slice(tt)):q===!0?(F="",c=A):F=A,F&&F!==""&&F!=="/"&&F!==A&&R(F.charCodeAt(F.length-1))&&(F=F.slice(0,-1)),E.unescape===!0&&(c&&(c=t.removeBackslashes(c)),F&&st===!0&&(F=t.removeBackslashes(F)));const f={prefix:dt,input:O,start:G,base:F,glob:c,isBrace:ft,isBracket:et,isGlob:q,isExtglob:rt,isGlobstar:ht,negated:z,negatedExtglob:ut};if(E.tokens===!0&&(f.maxDepth=0,R(k)||S.push(I),f.tokens=S),E.parts===!0||E.tokens===!0){let Y;for(let M=0;M<N.length;M++){const nt=Y?Y+1:G,at=N[M],J=O.slice(nt,at);E.tokens&&(M===0&&G!==0?(S[M].isPrefix=!0,S[M].value=dt):S[M].value=J,C(S[M]),f.maxDepth+=S[M].depth),(M!==0||J!=="")&&T.push(J),Y=at}if(Y&&Y+1<O.length){const M=O.slice(Y+1);T.push(M),E.tokens&&(S[S.length-1].value=M,C(S[S.length-1]),f.maxDepth+=S[S.length-1].depth)}f.slashes=N,f.parts=T}return f},we}var Ee,Qe;function ln(){if(Qe)return Ee;Qe=1;const t=me(),e=$e(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:i}=t,u=(y,E)=>typeof E.expandRange=="function"?E.expandRange(...y,E):(y.sort(),`[${y.join("-")}]`),a=(y,E)=>`Missing ${y}: "${E}" - use "\\\\${E}" to match literal characters`,m=y=>{const E=[];let l=0,_=0,N=0,S="",T=!1;for(const A of y){if(T===!0){S+=A,T=!1;continue}if(A==="\\"){S+=A,T=!0;continue}if(A==='"'){N=N===1?0:1,S+=A;continue}if(N===0){if(A==="[")l++;else if(A==="]"&&l>0)l--;else if(l===0){if(A==="(")_++;else if(A===")"&&_>0)_--;else if(A==="|"&&_===0){E.push(S),S="";continue}}}S+=A}return E.push(S),E},p=y=>{let E=!1;for(const l of y){if(E===!0){E=!1;continue}if(l==="\\"){E=!0;continue}if(/[?*+@!()[\]{}]/.test(l))return!1}return!0},d=y=>{let E=y.trim(),l=!0;for(;l===!0;)l=!1,/^@\([^\\()[\]{}|]+\)$/.test(E)&&(E=E.slice(2,-1),l=!0);if(p(E))return E.replace(/\\(.)/g,"$1")},b=y=>{const E=y.map(d).filter(Boolean);for(let l=0;l<E.length;l++)for(let _=l+1;_<E.length;_++){const N=E[l],S=E[_],T=N[0];if(!(!T||N!==T.repeat(N.length)||S!==T.repeat(S.length))&&(N===S||N.startsWith(S)||S.startsWith(N)))return!0}return!1},g=(y,E=!0)=>{if(y[0]!=="+"&&y[0]!=="*"||y[1]!=="(")return;let l=0,_=0,N=0,S=!1;for(let T=1;T<y.length;T++){const A=y[T];if(S===!0){S=!1;continue}if(A==="\\"){S=!0;continue}if(A==='"'){N=N===1?0:1;continue}if(N!==1){if(A==="["){l++;continue}if(A==="]"&&l>0){l--;continue}if(!(l>0)){if(A==="("){_++;continue}if(A===")"&&(_--,_===0))return E===!0&&T!==y.length-1?void 0:{type:y[0],body:y.slice(2,T),end:T}}}}},$=y=>`${y.length===1?e.escapeRegex(y[0]):`[${y.map(E=>e.escapeRegex(E)).join("")}]`}*`,x=y=>{let E=0;const l=[];for(;E<y.length;){const _=g(y.slice(E),!1);if(!_||_.type!=="*")return;const N=m(_.body).map(T=>T.trim());if(N.length!==1)return;const S=d(N[0]);if(!S||S.length!==1)return;l.push(S),E+=_.end+1}if(!(l.length<1))return l},R=y=>{let E=0,l=y.trim(),_=g(l);for(;_;)E++,l=_.body.trim(),_=g(l);return E},C=(y,E)=>{if(E.maxExtglobRecursion===!1)return{risky:!1};const l=typeof E.maxExtglobRecursion=="number"?E.maxExtglobRecursion:t.DEFAULT_MAX_EXTGLOB_RECURSION,_=m(y).map(A=>A.trim());if(_.length>1&&(_.some(A=>A==="")||_.some(A=>/^[*?]+$/.test(A))||b(_)))return{risky:!0};const N=[];let S=!1,T=!0;for(const A of _){const D=x(A);if(D){S=!0,N.push(...D);continue}const G=d(A);if(G&&G.length===1){N.push(G);continue}if(T=!1,R(A)>l)return{risky:!0}}return S?T?{risky:!0,safeOutput:$([...new Set(N)])}:{risky:!0}:{risky:!1}},O=(y,E)=>{if(typeof y!="string")throw new TypeError("Expected a string");y=i[y]||y;const l={...E},_=typeof l.maxLength=="number"?Math.min(r,l.maxLength):r;let N=y.length;if(N>_)throw new SyntaxError(`Input length: ${N}, exceeds maximum allowed length: ${_}`);const S={type:"bos",value:"",output:l.prepend||""},T=[S],A=l.capture?"":"?:",D=t.globChars(l.windows),G=t.extglobChars(D),{DOT_LITERAL:tt,PLUS_LITERAL:ft,SLASH_LITERAL:et,ONE_CHAR:q,DOTS_SLASH:rt,NO_DOT:ht,NO_DOT_SLASH:it,NO_DOTS_SLASH:st,QMARK:z,QMARK_NO_DOT:ut,STAR:Q,START_ANCHOR:gt}=D,Z=w=>`(${A}(?:(?!${gt}${w.dot?rt:tt}).)*?)`,k=l.dot?"":ht,I=l.dot?z:ut;let K=l.bash===!0?Z(l):Q;l.capture&&(K=`(${K})`),typeof l.noext=="boolean"&&(l.noextglob=l.noext);const h={input:y,index:-1,start:0,dot:l.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:T};y=e.removePrefix(y,h),N=y.length;const U=[],F=[],dt=[];let c=S,f;const Y=()=>h.index===N-1,M=h.peek=(w=1)=>y[h.index+w],nt=h.advance=()=>y[++h.index]||"",at=()=>y.slice(h.index+1),J=(w="",W=0)=>{h.consumed+=w,h.index+=W},le=w=>{h.output+=w.output!=null?w.output:w.value,J(w.value)},Vr=()=>{let w=1;for(;M()==="!"&&(M(2)!=="("||M(3)==="?");)nt(),h.start++,w++;return w%2===0?!1:(h.negated=!0,h.start++,!0)},ce=w=>{h[w]++,dt.push(w)},yt=w=>{h[w]--,dt.pop()},L=w=>{if(c.type==="globstar"){const W=h.braces>0&&(w.type==="comma"||w.type==="brace"),v=w.extglob===!0||U.length&&(w.type==="pipe"||w.type==="paren");w.type!=="slash"&&w.type!=="paren"&&!W&&!v&&(h.output=h.output.slice(0,-c.output.length),c.type="star",c.value="*",c.output=K,h.output+=c.output)}if(U.length&&w.type!=="paren"&&(U[U.length-1].inner+=w.value),(w.value||w.output)&&le(w),c&&c.type==="text"&&w.type==="text"){c.output=(c.output||c.value)+w.value,c.value+=w.value;return}w.prev=c,T.push(w),c=w},pe=(w,W)=>{const v={...G[W],conditions:1,inner:""};v.prev=c,v.parens=h.parens,v.output=h.output,v.startIndex=h.index,v.tokensIndex=T.length;const H=(l.capture?"(":"")+v.open;ce("parens"),L({type:w,value:W,output:h.output?"":q}),L({type:"paren",extglob:!0,value:nt(),output:H}),U.push(v)},Yr=w=>{const W=y.slice(w.startIndex,h.index+1),v=y.slice(w.startIndex+2,h.index),H=C(v,l);if((w.type==="plus"||w.type==="star")&&H.risky){const P=H.safeOutput?(w.output?"":q)+(l.capture?`(${H.safeOutput})`:H.safeOutput):void 0,lt=T[w.tokensIndex];lt.type="text",lt.value=W,lt.output=P||e.escapeRegex(W);for(let ct=w.tokensIndex+1;ct<T.length;ct++)T[ct].value="",T[ct].output="",delete T[ct].suffix;h.output=w.output+lt.output,h.backtrack=!0,L({type:"paren",extglob:!0,value:f,output:""}),yt("parens");return}let j=w.close+(l.capture?")":""),X;if(w.type==="negate"){let P=K;if(w.inner&&w.inner.length>1&&w.inner.includes("/")&&(P=Z(l)),(P!==K||Y()||/^\)+$/.test(at()))&&(j=w.close=`)$))${P}`),w.inner.includes("*")&&(X=at())&&/^\.[^\\/.]+$/.test(X)){const lt=O(X,{...E,fastpaths:!1}).output;j=w.close=`)${lt})${P})`}w.prev.type==="bos"&&(h.negatedExtglob=!0)}L({type:"paren",extglob:!0,value:f,output:j}),yt("parens")};if(l.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(y)){let w=!1,W=y.replace(s,(v,H,j,X,P,lt)=>X==="\\"?(w=!0,v):X==="?"?H?H+X+(P?z.repeat(P.length):""):lt===0?I+(P?z.repeat(P.length):""):z.repeat(j.length):X==="."?tt.repeat(j.length):X==="*"?H?H+X+(P?K:""):K:H?v:`\\${v}`);return w===!0&&(l.unescape===!0?W=W.replace(/\\/g,""):W=W.replace(/\\+/g,v=>v.length%2===0?"\\\\":v?"\\":"")),W===y&&l.contains===!0?(h.output=y,h):(h.output=e.wrapOutput(W,h,E),h)}for(;!Y();){if(f=nt(),f==="\0")continue;if(f==="\\"){const v=M();if(v==="/"&&l.bash!==!0||v==="."||v===";")continue;if(!v){f+="\\",L({type:"text",value:f});continue}const H=/^\\+/.exec(at());let j=0;if(H&&H[0].length>2&&(j=H[0].length,h.index+=j,j%2!==0&&(f+="\\")),l.unescape===!0?f=nt():f+=nt(),h.brackets===0){L({type:"text",value:f});continue}}if(h.brackets>0&&(f!=="]"||c.value==="["||c.value==="[^")){if(l.posix!==!1&&f===":"){const v=c.value.slice(1);if(v.includes("[")&&(c.posix=!0,v.includes(":"))){const H=c.value.lastIndexOf("["),j=c.value.slice(0,H),X=c.value.slice(H+2),P=n[X];if(P){c.value=j+P,h.backtrack=!0,nt(),!S.output&&T.indexOf(c)===1&&(S.output=q);continue}}}(f==="["&&M()!==":"||f==="-"&&M()==="]")&&(f=`\\${f}`),f==="]"&&(c.value==="["||c.value==="[^")&&(f=`\\${f}`),l.posix===!0&&f==="!"&&c.value==="["&&(f="^"),c.value+=f,le({value:f});continue}if(h.quotes===1&&f!=='"'){f=e.escapeRegex(f),c.value+=f,le({value:f});continue}if(f==='"'){h.quotes=h.quotes===1?0:1,l.keepQuotes===!0&&L({type:"text",value:f});continue}if(f==="("){ce("parens"),L({type:"paren",value:f});continue}if(f===")"){if(h.parens===0&&l.strictBrackets===!0)throw new SyntaxError(a("opening","("));const v=U[U.length-1];if(v&&h.parens===v.parens+1){Yr(U.pop());continue}L({type:"paren",value:f,output:h.parens?")":"\\)"}),yt("parens");continue}if(f==="["){if(l.nobracket===!0||!at().includes("]")){if(l.nobracket!==!0&&l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));f=`\\${f}`}else ce("brackets");L({type:"bracket",value:f});continue}if(f==="]"){if(l.nobracket===!0||c&&c.type==="bracket"&&c.value.length===1){L({type:"text",value:f,output:`\\${f}`});continue}if(h.brackets===0){if(l.strictBrackets===!0)throw new SyntaxError(a("opening","["));L({type:"text",value:f,output:`\\${f}`});continue}yt("brackets");const v=c.value.slice(1);if(c.posix!==!0&&v[0]==="^"&&!v.includes("/")&&(f=`/${f}`),c.value+=f,le({value:f}),l.literalBrackets===!1||e.hasRegexChars(v))continue;const H=e.escapeRegex(c.value);if(h.output=h.output.slice(0,-c.value.length),l.literalBrackets===!0){h.output+=H,c.value=H;continue}c.value=`(${A}${H}|${c.value})`,h.output+=c.value;continue}if(f==="{"&&l.nobrace!==!0){ce("braces");const v={type:"brace",value:f,output:"(",outputIndex:h.output.length,tokensIndex:h.tokens.length};F.push(v),L(v);continue}if(f==="}"){const v=F[F.length-1];if(l.nobrace===!0||!v){L({type:"text",value:f,output:f});continue}let H=")";if(v.dots===!0){const j=T.slice(),X=[];for(let P=j.length-1;P>=0&&(T.pop(),j[P].type!=="brace");P--)j[P].type!=="dots"&&X.unshift(j[P].value);H=u(X,l),h.backtrack=!0}if(v.comma!==!0&&v.dots!==!0){const j=h.output.slice(0,v.outputIndex),X=h.tokens.slice(v.tokensIndex);v.value=v.output="\\{",f=H="\\}",h.output=j;for(const P of X)h.output+=P.output||P.value}L({type:"brace",value:f,output:H}),yt("braces"),F.pop();continue}if(f==="|"){U.length>0&&U[U.length-1].conditions++,L({type:"text",value:f});continue}if(f===","){let v=f;const H=F[F.length-1];H&&dt[dt.length-1]==="braces"&&(H.comma=!0,v="|"),L({type:"comma",value:f,output:v});continue}if(f==="/"){if(c.type==="dot"&&h.index===h.start+1){h.start=h.index+1,h.consumed="",h.output="",T.pop(),c=S;continue}L({type:"slash",value:f,output:et});continue}if(f==="."){if(h.braces>0&&c.type==="dot"){c.value==="."&&(c.output=tt);const v=F[F.length-1];c.type="dots",c.output+=f,c.value+=f,v.dots=!0;continue}if(h.braces+h.parens===0&&c.type!=="bos"&&c.type!=="slash"){L({type:"text",value:f,output:tt});continue}L({type:"dot",value:f,output:tt});continue}if(f==="?"){if(!(c&&c.value==="(")&&l.noextglob!==!0&&M()==="("&&M(2)!=="?"){pe("qmark",f);continue}if(c&&c.type==="paren"){const v=M();let H=f;(c.value==="("&&!/[!=<:]/.test(v)||v==="<"&&!/<([!=]|\w+>)/.test(at()))&&(H=`\\${f}`),L({type:"text",value:f,output:H});continue}if(l.dot!==!0&&(c.type==="slash"||c.type==="bos")){L({type:"qmark",value:f,output:ut});continue}L({type:"qmark",value:f,output:z});continue}if(f==="!"){if(l.noextglob!==!0&&M()==="("&&(M(2)!=="?"||!/[!=<:]/.test(M(3)))){pe("negate",f);continue}if(l.nonegate!==!0&&h.index===0){Vr();continue}}if(f==="+"){if(l.noextglob!==!0&&M()==="("&&M(2)!=="?"){pe("plus",f);continue}if(c&&c.value==="("||l.regex===!1){L({type:"plus",value:f,output:ft});continue}if(c&&(c.type==="bracket"||c.type==="paren"||c.type==="brace")||h.parens>0){L({type:"plus",value:f});continue}L({type:"plus",value:ft});continue}if(f==="@"){if(l.noextglob!==!0&&M()==="("&&M(2)!=="?"){L({type:"at",extglob:!0,value:f,output:""});continue}L({type:"text",value:f});continue}if(f!=="*"){(f==="$"||f==="^")&&(f=`\\${f}`);const v=o.exec(at());v&&(f+=v[0],h.index+=v[0].length),L({type:"text",value:f});continue}if(c&&(c.type==="globstar"||c.star===!0)){c.type="star",c.star=!0,c.value+=f,c.output=K,h.backtrack=!0,h.globstar=!0,J(f);continue}let w=at();if(l.noextglob!==!0&&/^\([^?]/.test(w)){pe("star",f);continue}if(c.type==="star"){if(l.noglobstar===!0){J(f);continue}const v=c.prev,H=v.prev,j=v.type==="slash"||v.type==="bos",X=H&&(H.type==="star"||H.type==="globstar");if(l.bash===!0&&(!j||w[0]&&w[0]!=="/")){L({type:"star",value:f,output:""});continue}const P=h.braces>0&&(v.type==="comma"||v.type==="brace"),lt=U.length&&(v.type==="pipe"||v.type==="paren");if(!j&&v.type!=="paren"&&!P&&!lt){L({type:"star",value:f,output:""});continue}for(;w.slice(0,3)==="/**";){const ct=y[h.index+4];if(ct&&ct!=="/")break;w=w.slice(3),J("/**",3)}if(v.type==="bos"&&Y()){c.type="globstar",c.value+=f,c.output=Z(l),h.output=c.output,h.globstar=!0,J(f);continue}if(v.type==="slash"&&v.prev.type!=="bos"&&!X&&Y()){h.output=h.output.slice(0,-(v.output+c.output).length),v.output=`(?:${v.output}`,c.type="globstar",c.output=Z(l)+(l.strictSlashes?")":"|$)"),c.value+=f,h.globstar=!0,h.output+=v.output+c.output,J(f);continue}if(v.type==="slash"&&v.prev.type!=="bos"&&w[0]==="/"){const ct=w[1]!==void 0?"|$":"";h.output=h.output.slice(0,-(v.output+c.output).length),v.output=`(?:${v.output}`,c.type="globstar",c.output=`${Z(l)}${et}|${et}${ct})`,c.value+=f,h.output+=v.output+c.output,h.globstar=!0,J(f+nt()),L({type:"slash",value:"/",output:""});continue}if(v.type==="bos"&&w[0]==="/"){c.type="globstar",c.value+=f,c.output=`(?:^|${et}|${Z(l)}${et})`,h.output=c.output,h.globstar=!0,J(f+nt()),L({type:"slash",value:"/",output:""});continue}if(P&&w[0]==="/"){c.type="globstar",c.value+=f,c.output=`(?:^|${et}|${Z(l)}${et})`,h.output+=c.output,h.globstar=!0,J(f+nt()),L({type:"slash",value:"/",output:""});continue}h.output=h.output.slice(0,-c.output.length),c.type="globstar",c.output=Z(l),c.value+=f,h.output+=c.output,h.globstar=!0,J(f);continue}const W={type:"star",value:f,output:K};if(l.bash===!0){W.output=".*?",(c.type==="bos"||c.type==="slash")&&(W.output=k+W.output),L(W);continue}if(c&&(c.type==="bracket"||c.type==="paren")&&l.regex===!0){W.output=f,L(W);continue}(h.index===h.start||c.type==="slash"||c.type==="dot")&&(c.type==="dot"?(h.output+=it,c.output+=it):l.dot===!0?(h.output+=st,c.output+=st):(h.output+=k,c.output+=k),M()!=="*"&&(h.output+=q,c.output+=q)),L(W)}for(;h.brackets>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));h.output=e.escapeLast(h.output,"["),yt("brackets")}for(;h.parens>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing",")"));h.output=e.escapeLast(h.output,"("),yt("parens")}for(;h.braces>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","}"));h.output=e.escapeLast(h.output,"{"),yt("braces")}if(l.strictSlashes!==!0&&(c.type==="star"||c.type==="bracket")&&L({type:"maybe_slash",value:"",output:`${et}?`}),h.backtrack===!0){h.output="";for(const w of h.tokens)h.output+=w.output!=null?w.output:w.value,w.suffix&&(h.output+=w.suffix)}return h};return O.fastpaths=(y,E)=>{const l={...E},_=typeof l.maxLength=="number"?Math.min(r,l.maxLength):r,N=y.length;if(N>_)throw new SyntaxError(`Input length: ${N}, exceeds maximum allowed length: ${_}`);y=i[y]||y;const{DOT_LITERAL:S,SLASH_LITERAL:T,ONE_CHAR:A,DOTS_SLASH:D,NO_DOT:G,NO_DOTS:tt,NO_DOTS_SLASH:ft,STAR:et,START_ANCHOR:q}=t.globChars(l.windows),rt=l.dot?tt:G,ht=l.dot?ft:G,it=l.capture?"":"?:",st={negated:!1,prefix:""};let z=l.bash===!0?".*?":et;l.capture&&(z=`(${z})`);const ut=k=>k.noglobstar===!0?z:`(${it}(?:(?!${q}${k.dot?D:S}).)*?)`,Q=k=>{switch(k){case"*":return`${rt}${A}${z}`;case".*":return`${S}${A}${z}`;case"*.*":return`${rt}${z}${S}${A}${z}`;case"*/*":return`${rt}${z}${T}${A}${ht}${z}`;case"**":return rt+ut(l);case"**/*":return`(?:${rt}${ut(l)}${T})?${ht}${A}${z}`;case"**/*.*":return`(?:${rt}${ut(l)}${T})?${ht}${z}${S}${A}${z}`;case"**/.*":return`(?:${rt}${ut(l)}${T})?${S}${A}${z}`;default:{const I=/^(.*?)\.(\w+)$/.exec(k);if(!I)return;const K=Q(I[1]);return K?K+S+I[2]:void 0}}},gt=e.removePrefix(y,st);let Z=Q(gt);return Z&&l.strictSlashes!==!0&&(Z+=`${T}?`),Z},Ee=O,Ee}var Ae,Ze;function cn(){if(Ze)return Ae;Ze=1;const t=an(),e=ln(),r=$e(),n=me(),o=i=>i&&typeof i=="object"&&!Array.isArray(i),s=(i,u,a=!1)=>{if(Array.isArray(i)){const R=i.map(C=>s(C,u,a));return C=>{for(const O of R){const y=O(C);if(y)return y}return!1}}const m=o(i)&&i.tokens&&i.input;if(i===""||typeof i!="string"&&!m)throw new TypeError("Expected pattern to be a non-empty string");const p=u||{},d=p.windows,b=m?s.compileRe(i,u):s.makeRe(i,u,!1,!0),g=b.state;delete b.state;let $=()=>!1;if(p.ignore){const R={...u,ignore:null,onMatch:null,onResult:null};$=s(p.ignore,R,a)}const x=(R,C=!1)=>{const{isMatch:O,match:y,output:E}=s.test(R,b,u,{glob:i,posix:d}),l={glob:i,state:g,regex:b,posix:d,input:R,output:E,match:y,isMatch:O};if(typeof p.onResult=="function"&&p.onResult(l),O===!1)return l.isMatch=!1,C?l:!1;t:if($(R)){if(typeof p.onIgnore=="function"&&p.onIgnore(l)===n.UNIGNORE){l.isMatch=!0;break t}return l.isMatch=!1,C?l:!1}return typeof p.onMatch=="function"&&p.onMatch(l),C?l:!0};return a&&(x.state=g),x};return s.test=(i,u,a,{glob:m,posix:p}={})=>{if(typeof i!="string")throw new TypeError("Expected input to be a string");if(i==="")return{isMatch:!1,output:""};const d=a||{},b=d.format||(p?r.toPosixSlashes:null);let g=i===m,$=g&&b?b(i):i;return g===!1&&($=b?b(i):i,g=$===m),(g===!1||d.capture===!0)&&(d.matchBase===!0||d.basename===!0?g=s.matchBase(i,u,a,p):g=u.exec($)),{isMatch:!!g,match:g,output:$}},s.matchBase=(i,u,a,m=a&&a.windows)=>(u instanceof RegExp?u:s.makeRe(u,a)).test(r.basename(i,{windows:m})),s.isMatch=(i,u,a)=>s(u,a)(i),s.parse=(i,u)=>Array.isArray(i)?i.map(a=>s.parse(a,u)):e(i,{...u,fastpaths:!1}),s.scan=(i,u)=>t(i,u),s.compileRe=(i,u,a=!1,m=!1)=>{if(a===!0)return i.output;const p=u||{},d=p.contains?"":"^",b=p.contains?"":"$";let g=`${d}(?:${i.output})${b}`;i&&i.negated===!0&&(g=`^(?!${g}).*$`);const $=s.toRegex(g,u);return m===!0&&($.state=i),$},s.makeRe=(i,u={},a=!1,m=!1)=>{if(!i||typeof i!="string")throw new TypeError("Expected a non-empty string");let p={negated:!1,fastpaths:!0};return u.fastpaths!==!1&&(i[0]==="."||i[0]==="*")&&(p.output=e.fastpaths(i,u)),p.output||(p=e(i,u)),s.compileRe(p,u,a,m)},s.toRegex=(i,u)=>{try{const a=u||{};return new RegExp(i,a.flags||(a.nocase?"i":""))}catch(a){if(u&&u.debug===!0)throw a;return/$^/}},s.constants=n,Ae=s,Ae}var xe,Ve;function pn(){if(Ve)return xe;Ve=1;const t=cn(),e=$e();function r(n,o,s=!1){return o&&(o.windows===null||o.windows===void 0)&&(o={...o,windows:e.isWindows()}),t(n,o,s)}return Object.assign(r,t),xe=r,xe}var fn=pn();const vt=Be(fn),hn=B(import.meta.url),It=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ue=t=>{if(typeof It<"u"&&It.versions&&It.versions.node){const[e,r]=It.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return It.getBuiltinModule(t)}return hn(t)},Ye=ue("fs"),gn={...Ye,default:Ye},{statSync:dn,stat:yn,realpathSync:mn,realpath:$n,readdirSync:bn,readdir:vn}=ue("fs"),{sep:xr,basename:wn,dirname:Oe,resolve:Sr,normalize:En,relative:An,posix:wt,isAbsolute:xn}=ue("path"),{fileURLToPath:Sn}=ue("url"),{createRequire:Tn}=ue("module");var Je=Tn(import.meta.url);function Rn(t){let e=En(t);return e.length>1&&e[e.length-1]===xr&&(e=e.substring(0,e.length-1)),e}const _n=/[\\/]/g;function Tr(t,e){return t.replace(_n,e)}const kn=/^[a-z]:[\\/]$/i;function Cn(t){return t==="/"||kn.test(t)}function Se(t,e){const{resolvePaths:r,normalizePath:n,pathSeparator:o}=e,s=process.platform==="win32"&&t.includes("/")||t.startsWith(".");if(r&&(t=Sr(t)),(n||s)&&(t=Rn(t)),t===".")return"";const i=t[t.length-1]!==o;return Tr(i?t+o:t,o)}function Rr(t,e){return e+t}function On(t,e){return function(r,n){return n.startsWith(t)?n.slice(t.length)+r:Tr(An(t,n),e.pathSeparator)+e.pathSeparator+r}}function Nn(t){return t}function Ln(t,e,r){return e+t+r}function Hn(t,e){const{relativePaths:r,includeBasePath:n}=e;return r&&t?On(t,e):n?Rr:Nn}function Bn(t){return function(e,r){r.push(e.substring(t.length)||".")}}function Mn(t){return function(e,r,n){const o=e.substring(t.length)||".";n.every(s=>s(o,!0))&&r.push(o)}}const Dn=(t,e)=>{e.push(t||".")},In=(t,e,r)=>{const n=t||".";r.every(o=>o(n,!0))&&e.push(n)},Pn=()=>{};function Fn(t,e){const{includeDirs:r,filters:n,relativePaths:o}=e;return r?o?n&&n.length?Mn(t):Bn(t):n&&n.length?In:Dn:Pn}const Gn=(t,e,r,n)=>{n.every(o=>o(t,!1))&&r.files++},Un=(t,e,r,n)=>{n.every(o=>o(t,!1))&&e.push(t)},Wn=(t,e,r,n)=>{r.files++},zn=(t,e)=>{e.push(t)},jn=()=>{};function qn(t){const{excludeFiles:e,filters:r,onlyCounts:n}=t;return e?jn:r&&r.length?n?Gn:Un:n?Wn:zn}const Xn=t=>t,Kn=()=>[""].slice(0,0);function Qn(t){return t.group?Kn:Xn}const Zn=(t,e,r)=>{t.push({directory:e,files:r,dir:e})},Vn=()=>{};function Yn(t){return t.group?Zn:Vn}const Jn=function(t,e,r){const{queue:n,fs:o,options:{suppressErrors:s}}=e;n.enqueue(),o.realpath(t,(i,u)=>{if(i)return n.dequeue(s?null:i,e);o.stat(u,(a,m)=>{if(a)return n.dequeue(s?null:a,e);if(m.isDirectory()&&_r(t,u,e))return n.dequeue(null,e);r(m,u),n.dequeue(null,e)})})},to=function(t,e,r){const{queue:n,fs:o,options:{suppressErrors:s}}=e;n.enqueue();try{const i=o.realpathSync(t),u=o.statSync(i);if(u.isDirectory()&&_r(t,i,e))return;r(u,i)}catch(i){if(!s)throw i}};function eo(t,e){return!t.resolveSymlinks||t.excludeSymlinks?null:e?to:Jn}function _r(t,e,r){if(r.options.useRealPaths)return ro(e,r);let n=Oe(t),o=1;for(;n!==r.root&&o<2;){const s=r.symlinks.get(n);s&&(s===e||s.startsWith(e)||e.startsWith(s))?o++:n=Oe(n)}return r.symlinks.set(t,e),o>1}function ro(t,e){return e.visited.includes(t+e.options.pathSeparator)}const so=t=>t.counts,no=t=>t.groups,oo=t=>t.paths,io=t=>t.paths.slice(0,t.options.maxFiles),uo=(t,e,r)=>(be(e,r,t.counts,t.options.suppressErrors),null),ao=(t,e,r)=>(be(e,r,t.paths,t.options.suppressErrors),null),lo=(t,e,r)=>(be(e,r,t.paths.slice(0,t.options.maxFiles),t.options.suppressErrors),null),co=(t,e,r)=>(be(e,r,t.groups,t.options.suppressErrors),null);function be(t,e,r,n){e(t&&!n?t:null,r)}function po(t,e){const{onlyCounts:r,group:n,maxFiles:o}=t;return r?e?so:uo:n?e?no:co:o?e?io:lo:e?oo:ao}const kr={withFileTypes:!0},fo=(t,e,r,n,o)=>{if(t.queue.enqueue(),n<0)return t.queue.dequeue(null,t);const{fs:s}=t;t.visited.push(e),t.counts.directories++,s.readdir(e||".",kr,(i,u=[])=>{o(u,r,n),t.queue.dequeue(t.options.suppressErrors?null:i,t)})},ho=(t,e,r,n,o)=>{const{fs:s}=t;if(n<0)return;t.visited.push(e),t.counts.directories++;let i=[];try{i=s.readdirSync(e||".",kr)}catch(u){if(!t.options.suppressErrors)throw u}o(i,r,n)};function go(t){return t?ho:fo}var yo=class{count=0;constructor(t){this.onQueueEmpty=t}enqueue(){return this.count++,this.count}dequeue(t,e){this.onQueueEmpty&&(--this.count<=0||t)&&(this.onQueueEmpty(t,e),t&&(e.controller.abort(),this.onQueueEmpty=void 0))}},mo=class{_files=0;_directories=0;set files(t){this._files=t}get files(){return this._files}set directories(t){this._directories=t}get directories(){return this._directories}get dirs(){return this._directories}},$o=class{aborted=!1;abort(){this.aborted=!0}},Cr=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,r,n){this.isSynchronous=!n,this.callbackInvoker=po(r,this.isSynchronous),this.root=Se(e,r),this.state={root:Cn(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new mo,options:r,queue:new yo((o,s)=>this.callbackInvoker(s,o,n)),symlinks:new Map,visited:[""].slice(0,0),controller:new $o,fs:r.fs||gn},this.joinPath=Hn(this.root,r),this.pushDirectory=Fn(this.root,r),this.pushFile=qn(r),this.getArray=Qn(r),this.groupFiles=Yn(r),this.resolveSymlink=eo(r,this.isSynchronous),this.walkDirectory=go(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,r,n)=>{const{paths:o,options:{filters:s,resolveSymlinks:i,excludeSymlinks:u,exclude:a,maxFiles:m,signal:p,useRealPaths:d,pathSeparator:b},controller:g}=this.state;if(g.aborted||p&&p.aborted||m&&o.length>m)return;const $=this.getArray(this.state.paths);for(let x=0;x<e.length;++x){const R=e[x];if(R.isFile()||R.isSymbolicLink()&&!i&&!u){const C=this.joinPath(R.name,r);this.pushFile(C,$,this.state.counts,s)}else if(R.isDirectory()){let C=Ln(R.name,r,this.state.options.pathSeparator);if(a&&a(R.name,C))continue;this.pushDirectory(C,o,s),this.walkDirectory(this.state,C,C,n-1,this.walk)}else if(this.resolveSymlink&&R.isSymbolicLink()){let C=Rr(R.name,r);this.resolveSymlink(C,this.state,(O,y)=>{if(O.isDirectory()){if(y=Se(y,this.state.options),a&&a(R.name,d?y:C+b))return;this.walkDirectory(this.state,y,d?y:C+b,n-1,this.walk)}else{y=d?y:C;const E=wn(y),l=Se(Oe(y),this.state.options);y=this.joinPath(E,l),this.pushFile(y,$,this.state.counts,s)}})}}this.groupFiles(this.state.groups,r,$)}};function bo(t,e){return new Promise((r,n)=>{Or(t,e,(o,s)=>{if(o)return n(o);r(s)})})}function Or(t,e,r){new Cr(t,e,r).start()}function vo(t,e){return new Cr(t,e).start()}var tr=class{constructor(e,r){this.root=e,this.options=r}withPromise(){return bo(this.root,this.options)}withCallback(e){Or(this.root,this.options,e)}sync(){return vo(this.root,this.options)}};let Nr=null;try{Je.resolve("picomatch"),Nr=Je("picomatch")}catch{}var wo=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:xr,filters:[]};globFunction;constructor(t){this.options={...this.options,...t},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(t){return this.options.pathSeparator=t,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(t){return this.options.maxDepth=t,this}withMaxFiles(t){return this.options.maxFiles=t,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:t=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=t,this.withFullPaths()}withAbortSignal(t){return this.options.signal=t,this}normalize(){return this.options.normalizePath=!0,this}filter(t){return this.options.filters.push(t),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(t){return this.options.exclude=t,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(t){return new tr(t||".",this.options)}withGlobFunction(t){return this.globFunction=t,this}crawlWithOptions(t,e){return this.options={...this.options,...e},new tr(t||".",this.options)}glob(...t){return this.globFunction?this.globWithOptions(t):this.globWithOptions(t,{dot:!0})}globWithOptions(t,...e){const r=this.globFunction||Nr;if(!r)throw new Error("Please specify a glob function to use glob matching.");var n=this.globCache[t.join("\0")];return n||(n=r(t,...e),this.globCache[t.join("\0")]=n),this.options.filters.push(o=>n(o)),this}};const Eo=Array.isArray,Lr=/\\/g,Ao=/^[A-Za-z]:$/,Hr=process.platform==="win32",xo=/^(\/?\.\.)+$/;function er(t,e={}){const r=t.length,n=Array(r),o=Array(r);let s,i;for(s=0;s<r;s++){const u=Br(t[s]);n[s]=u;const a=u.length,m=Array(a);for(i=0;i<a;i++)m[i]=vt(u[i],e);o[s]=m}return u=>{const a=u.split("/");if(a[0]===".."&&xo.test(u))return!0;for(s=0;s<r;s++){const m=n[s],p=o[s],d=a.length,b=Math.min(d,m.length);for(i=0;i<b;){const g=m[i];if(g.includes("/"))return!0;if(!p[i](a[i]))break;if(!e.noglobstar&&g==="**")return!0;i++}if(i===d)return!0}return!1}}const So=/^[A-Z]:\/$/i,To=Hr?t=>So.test(t):t=>t==="/";function rr(t,e,r){if(t===e||e.startsWith(`${t}/`)){if(r){const o=t.length+ +!To(t);return(s,i)=>s.slice(o,i?-1:void 0)||"."}const n=e.slice(t.length+1);return n?(o,s)=>{if(o===".")return n;const i=`${n}/${o}`;return s?i.slice(0,-1):i}:(o,s)=>s&&o!=="."?o.slice(0,-1):o}return r?n=>wt.relative(t,n)||".":n=>wt.relative(t,`${e}/${n}`)||"."}function Ro(t,e){if(e.startsWith(`${t}/`)){const r=e.slice(t.length+1);return n=>`${r}/${n}`}return r=>{const n=wt.relative(t,`${e}/${r}`);return r[r.length-1]==="/"&&n!==""?`${n}/`:n||"."}}function sr(t){return t.replace(Ao,e=>`${e}/`)}const _o={parts:!0};function Br(t){var e;const r=vt.scan(t,_o);return!((e=r.parts)===null||e===void 0)&&e.length?r.parts:[t]}const ko=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,Co=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,Oo=t=>t.replace(ko,"\\$&"),No=t=>t.replace(Co,"\\$&"),Lo=Hr?No:Oo;function Ho(t,e){const r=vt.scan(t);return r.isGlob||r.negated}function ne(...t){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...t)}function Mr(t){return typeof t=="string"?[t]:t??[]}const Bo=/^(\/?\.\.)+/,Mo=/\\(?=[()[\]{}!*+?@|])/g;function Te(t,e,r,n){var o;const s=e.cwd;let i=t;t[t.length-1]==="/"&&(i=t.slice(0,-1));const u=i.lastIndexOf("/"),a=(u===-1?i:i.slice(u+1)).startsWith("!(");i[i.length-1]!=="*"&&!a&&e.expandDirectories&&(i+="/**");const m=Lo(s);i=xn(i.replace(Mo,""))?wt.relative(m,i):wt.normalize(i);const p=(o=Bo.exec(i))===null||o===void 0?void 0:o[0],d=Br(i);if(p){const g=(p.length+1)/3;let $=0;const x=m.split("/");for(;$<g&&d[$+g]===x[x.length+$-g];)i=i.slice(0,(g-$-1)*3)+i.slice((g-$)*3+d[$+g].length+1)||".",$++;const R=wt.join(s,p.slice($*3));R[0]!=="."&&r.root.length>R.length&&(r.root=sr(R),r.depthOffset=-g+$)}if(!n&&r.depthOffset>=0){var b;(b=r.commonPath)!==null&&b!==void 0||(r.commonPath=d);const g=[],$=Math.min(r.commonPath.length,d.length);for(let x=0;x<$;x++){const R=d[x];if(R==="**"&&!d[x+1]){g.pop();break}if(x===d.length-1||R!==r.commonPath[x]||Ho(R))break;g.push(R)}r.depthOffset=g.length,r.commonPath=g,r.root=sr(g.length>0?wt.join(s,...g):s)}return i}function Do(t,e,r){const n=[],o=[],s=[];for(const i of t.ignore)i&&(i[0]!=="!"||i[1]==="("?o.push(Te(i,t,r,!0)):s.push(i.slice(1)));for(const i of e)i&&(i[0]!=="!"||i[1]==="("?n.push(Te(i,t,r,!1)):(i[1]!=="!"||i[2]==="(")&&o.push(Te(i.slice(1),t,r,!0)));return{match:n,ignore:o,unignore:s}}function Io(t,e){const r=t.cwd,n={root:r,depthOffset:0},o=Do(t,e,n);t.debug&&ne("internal processing patterns:",o);const{absolute:s,caseSensitiveMatch:i,debug:u,dot:a,followSymbolicLinks:m,onlyDirectories:p}=t,d=n.root.replace(Lr,""),b={dot:a,nobrace:t.braceExpansion===!1,nocase:!i,noextglob:t.extglob===!1,noglobstar:t.globstar===!1,posix:!0},g=o.unignore.length>0,$=g?vt(o.unignore,b):void 0,x=g?er(o.unignore,b):void 0,R=vt(o.match,{...b,ignore:o.ignore,onIgnore:$?T=>$(T.output)&&vt.constants.UNIGNORE:void 0}),C=vt(o.ignore,b),O=er(o.match,b),y=rr(r,d,s),E=s?y:rr(r,d,!0),l=o.match.length>0&&o.match.every(T=>T==="**"||T==="**/*"),_=o.ignore.length>0||g||!l?(T,A)=>{const D=E(A,!0);return D==="."||x&&x(D)?!1:!O(D)||C(D)}:void 0;let N;t.deep!==void 0&&(N=Math.round(t.deep-n.depthOffset));const S=new wo({filters:[u?(T,A)=>{const D=y(T,A),G=R(D);return G&&ne(`matched ${D}`),G}:(T,A)=>{const D=y(T,A);return R(D)}],exclude:u&&_?(T,A)=>{const D=_(T,A);return ne(`${D?"skipped":"crawling"} ${A}`),D}:_,fs:t.fs,pathSeparator:"/",relativePaths:!s,resolvePaths:s,includeBasePath:s,resolveSymlinks:m,excludeSymlinks:!m,excludeFiles:p,includeDirs:p||!t.onlyFiles,maxDepth:N,signal:t.signal}).crawl(d);return t.debug&&ne("internal properties:",{...n,root:d}),[S,r!==d&&!s&&Ro(r,d)]}function Dr(t,e){if(e)for(let r=t.length-1;r>=0;r--)t[r]=e(t[r]);return t}const nr={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function Po(t){const e=Object.assign({},t);for(const r in nr)e[r]===void 0&&Object.assign(e,{[r]:nr[r]});return e.cwd=(e.cwd instanceof URL?Sn(e.cwd):Sr(e.cwd||process.cwd())).replace(Lr,"/"),e.ignore=Mr(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||vn,readdirSync:e.fs.readdirSync||bn,realpath:e.fs.realpath||$n,realpathSync:e.fs.realpathSync||mn,stat:e.fs.stat||yn,statSync:e.fs.statSync||dn}),e.debug&&ne("globbing with options:",e),e}function Ir(t,e={}){var r;if(t&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");const n=Eo(t)||typeof t=="string",o=Mr((r=n?t:t.patterns)!==null&&r!==void 0?r:"**/*"),s=Po(n?e:t);return o.length>0?Io(s,o):[]}async function Xu(t,e){const[r,n]=Ir(t,e);return r?Dr(await r.withPromise(),n):[]}function Ku(t,e){const[r,n]=Ir(t,e);return r?Dr(r.sync(),n):[]}var Re,or;function Fo(){if(or)return Re;or=1;/*!
2
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
3
+ *
4
+ * Copyright (c) 2014-2016, Jon Schlinkert.
5
+ * Licensed under the MIT License.
6
+ */return Re=function(t){if(typeof t!="string"||t==="")return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(e[2])return!0;t=t.slice(e.index+e[0].length)}return!1},Re}var _e,ir;function Pr(){if(ir)return _e;ir=1;/*!
7
+ * is-glob <https://github.com/jonschlinkert/is-glob>
8
+ *
9
+ * Copyright (c) 2014-2017, Jon Schlinkert.
10
+ * Released under the MIT License.
11
+ */var t=Fo(),e={"{":"}","(":")","[":"]"},r=function(o){if(o[0]==="!")return!0;for(var s=0,i=-2,u=-2,a=-2,m=-2,p=-2;s<o.length;){if(o[s]==="*"||o[s+1]==="?"&&/[\].+)]/.test(o[s])||u!==-1&&o[s]==="["&&o[s+1]!=="]"&&(u<s&&(u=o.indexOf("]",s)),u>s&&(p===-1||p>u||(p=o.indexOf("\\",s),p===-1||p>u)))||a!==-1&&o[s]==="{"&&o[s+1]!=="}"&&(a=o.indexOf("}",s),a>s&&(p=o.indexOf("\\",s),p===-1||p>a))||m!==-1&&o[s]==="("&&o[s+1]==="?"&&/[:!=]/.test(o[s+2])&&o[s+3]!==")"&&(m=o.indexOf(")",s),m>s&&(p=o.indexOf("\\",s),p===-1||p>m))||i!==-1&&o[s]==="("&&o[s+1]!=="|"&&(i<s&&(i=o.indexOf("|",s)),i!==-1&&o[i+1]!==")"&&(m=o.indexOf(")",i),m>i&&(p=o.indexOf("\\",i),p===-1||p>m))))return!0;if(o[s]==="\\"){var d=o[s+1];s+=2;var b=e[d];if(b){var g=o.indexOf(b,s);g!==-1&&(s=g+1)}if(o[s]==="!")return!0}else s++}return!1},n=function(o){if(o[0]==="!")return!0;for(var s=0;s<o.length;){if(/[*?{}()[\]]/.test(o[s]))return!0;if(o[s]==="\\"){var i=o[s+1];s+=2;var u=e[i];if(u){var a=o.indexOf(u,s);a!==-1&&(s=a+1)}if(o[s]==="!")return!0}else s++}return!1};return _e=function(o,s){if(typeof o!="string"||o==="")return!1;if(t(o))return!0;var i=r;return s&&s.strict===!1&&(i=n),i(o)},_e}const Go=B(import.meta.url),Pt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Fr=t=>{if(typeof Pt<"u"&&Pt.versions&&Pt.versions.node){const[e,r]=Pt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Pt.getBuiltinModule(t)}return Go(t)},Uo=Fr("path"),Wo=Fr("os");var ke,ur;function zo(){if(ur)return ke;ur=1;var t=Pr(),e=Uo.posix.dirname,r=Wo.platform()==="win32",n="/",o=/\\/g,s=/\\([!*?|[\](){}])/g;ke=function(a,m){var p=Object.assign({flipBackslashes:!0},m);p.flipBackslashes&&r&&a.indexOf(n)<0&&(a=a.replace(o,n)),i(a)&&(a+=n),a+="a";do a=e(a);while(u(a));return a.replace(s,"$1")};function i(a){var m=a.slice(-1),p;switch(m){case"}":p="{";break;case"]":p="[";break;default:return!1}var d=a.indexOf(p);return d<0?!1:a.slice(d+1,-1).includes(n)}function u(a){return/\([^()]+$/.test(a)||a[0]==="{"||a[0]==="["||/[^\\][{[]/.test(a)?!0:t(a)}return ke}var jo=zo();const qo=Be(jo),Qu=(t,e)=>qo(t,e),Xo=B(import.meta.url),Ft=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ko=t=>{if(typeof Ft<"u"&&Ft.versions&&Ft.versions.node){const[e,r]=Ft.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ft.getBuiltinModule(t)}return Xo(t)},{access:Qo}=Ko("node:fs/promises");async function Ne(t,e=de){ot(t),t=V(t);try{return await Qo(t,e),!0}catch{return!1}}const Zo=B(import.meta.url),Gt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vo=t=>{if(typeof Gt<"u"&&Gt.versions&&Gt.versions.node){const[e,r]=Gt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Gt.getBuiltinModule(t)}return Zo(t)},{accessSync:Yo}=Vo("node:fs");function Le(t,e=de){ot(t),t=V(t);try{return Yo(t,e),!0}catch{return!1}}var Jo=Pr();const ti=Be(Jo),Zu=(t,e)=>ti(t,e),ei=B(import.meta.url),Ut=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Gr=t=>{if(typeof Ut<"u"&&Ut.versions&&Ut.versions.node){const[e,r]=Ut.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ut.getBuiltinModule(t)}return ei(t)};Gr("node:fs/promises");Gr("node:fs");let ri=class extends Error{constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}},si=class extends Error{constructor(e){super(`EPERM: Operation not permitted, ${e}`)}get code(){return"EPERM"}set code(e){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(e){throw new Error("Cannot overwrite name of PermissionError")}};const Ur=(t,e)=>{const r=t?.code;return r==="ENOENT"?new ri(`no such file or directory, open '${e}'`):r==="EACCES"||r==="EPERM"?new si(`unable to read the non-readable file: ${e}`):t},ni=B(import.meta.url),Wt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wr=t=>{if(typeof Wt<"u"&&Wt.versions&&Wt.versions.node){const[e,r]=Wt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Wt.getBuiltinModule(t)}return ni(t)},{readFile:oi}=Wr("node:fs/promises"),{unzip:ii,brotliDecompress:ui}=Wr("node:zlib"),ai={brotli:ui,gzip:ii,none:(t,e)=>{e(null,t)}},Ju=async(t,e)=>{ot(t),t=V(t);const{buffer:r,compression:n,encoding:o,flag:s}=e??{};let i;try{i=await oi(t,s?{flag:s}:{})}catch(u){throw Ur(u,t)}return await new Promise((u,a)=>{ai[n??"none"](i,(m,p)=>{m?a(m):u(r?p:p.toString(o??"utf8"))})})},li=B(import.meta.url),zt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,zr=t=>{if(typeof zt<"u"&&zt.versions&&zt.versions.node){const[e,r]=zt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return zt.getBuiltinModule(t)}return li(t)},{readFileSync:ci}=zr("node:fs"),{unzipSync:pi,brotliDecompressSync:fi}=zr("node:zlib"),hi={brotli:fi,gzip:pi,none:t=>t},gi=(t,e)=>{ot(t),t=V(t);const{buffer:r,compression:n,encoding:o,flag:s}=e??{};let i;try{i=ci(t,s?{flag:s}:{})}catch(m){throw Ur(m,t)}const u=hi[n??"none"],a=u(i);return r?a:a.toString(o??"utf8")},di=B(import.meta.url),jt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,yi=t=>{if(typeof jt<"u"&&jt.versions&&jt.versions.node){const[e,r]=jt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return jt.getBuiltinModule(t)}return di(t)},{createRequire:jr}=yi("node:module"),mi=globalThis.process??Object.create(null),ar={versions:{}},lr=new Proxy(mi,{get(t,e){if(e in t)return t[e];if(e in ar)return ar[e]}}),$i=t=>t.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
12
+ `),bi=(t,e,r,n)=>{const o={column:0,line:-1,...t.start},s={...o,...t.end},i=o.line,u=o.column,a=s.line,m=s.column;let p=Math.max(i-(r+1),0),d=Math.min(e.length,a+n);i===-1&&(p=0),a===-1&&(d=e.length);const b=a-i,g={};if(b)for(let $=0;$<=b;$++){const x=$+i;if(!u)g[x]=!0;else if($===0){const R=e[x-1]?.length;g[x]=[u,(R??0)-u+1]}else if($===b)g[x]=[0,m];else{const R=e[x-$]?.length;g[x]=[0,R]}}else u===m?g[i]=u?[u,0]:!0:g[i]=[u,(m??0)-(u??0)];return{end:d,markerLines:g,start:p}},vi=lr.platform==="win32"&&!lr.env?.WT_SESSION?">":"❯",wi=(t,e,r)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:$=>$,marker:$=>$,message:$=>$,...r?.color}},o=typeof e.start.column=="number";let s=(t.includes("\r")?$i(t):t).split(`
13
+ `);typeof n.tabWidth=="number"&&t.includes(" ")&&(s=s.map($=>$.replaceAll(" "," ".repeat(n.tabWidth))));const{end:i,markerLines:u,start:a}=bi(e,s,n.linesAbove,n.linesBelow),m=String(i).length,{gutter:p,marker:d,message:b}=n.color;let g=s.slice(a,i).map(($,x)=>{const R=a+1+x,C=u[R],O=String(R).padStart(m),y=!u[R+1],E=` ${O}${n.showGutter?" |":""}`;if(C){let l="";if(Array.isArray(C)){const _=$.replaceAll(/[^\t]/g," ").slice(0,Math.max(C[0]-1,0)),N=C[1]||1;l=[`
14
+ `,n.prefix+p(E.replaceAll(/\d/g," "))," ",_,d("^").repeat(N)].join(""),y&&n.message&&(l+=` ${b(n.message)}`)}return[n.prefix+d(vi),p(E),$.length>0?` ${$}`:"",l].join("")}return`${n.prefix} ${p(E)}${$.length>0?` ${$}`:""}`}).join(`
15
+ `);return n.message&&!o&&(g=`${n.prefix+" ".repeat(m+1)+n.message}
16
+ ${g}`),g},cr=(t,e)=>{let r=0,n=e.length-2;for(;r<n;){const o=r+(n-r>>1);if(t<e[o])n=o-1;else if(t>=e[o+1])r=o+1;else{r=o;break}}return r},Ei=/\n|\r(?!\n)/,Ai=t=>t.split(Ei).reduce((e,r)=>(e.push(e.at(-1)+r.length+1),e),[0]),xi=(t,e,r)=>{if(!Array.isArray(t)&&typeof t!="string"||(typeof t=="string"||Array.isArray(t))&&t.length===0)return{column:0,line:0};if(typeof e!="number"||typeof t=="string"&&e>=t.length||Array.isArray(t)&&e+1>=t.at(-1))return{column:0,line:0};if(typeof t=="string"){const o=Ai(t),s=cr(e,o);return{column:e-o[s]+1,line:s+1}}const n=cr(e,t);return{column:e-t[n]+1,line:n+1}},Si=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&Si.set("AggregateError",AggregateError);const Ti=jr(import.meta.url),qt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ri=t=>{if(typeof qt<"u"&&qt.versions&&qt.versions.node){const[e,r]=qt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return qt.getBuiltinModule(t)}return Ti(t)};Ri("node:util");const _i=jr(import.meta.url),Xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Me=t=>{if(typeof Xt<"u"&&Xt.versions&&Xt.versions.node){const[e,r]=Xt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Xt.getBuiltinModule(t)}return _i(t)};Me("node:fs");Me("node:path");Me("node:url");let ki=class extends Error{fileName;codeFrame;name="JSONError";#t;constructor(e){super(),this.#t=e}get message(){return`${this.#t}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
17
+
18
+ ${this.codeFrame}
19
+ `:""}`}set message(e){this.#t=e}};const Ci=t=>String.raw`\u{${t.codePointAt(0).toString(16)}}`,Oi=(t,e,r)=>wi(t,{start:e},{tabWidth:!1,...r}),Ni=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,Li=(t,e)=>{const r=Ni.exec(e);if(!r)return;const[,n,o,s]=r;if(o&&s)return{column:Number(s),line:Number(o)};let i=Number(n);return i===t.length&&(i=t.length-1),xi(t,i)},Hi=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,Bi=t=>t.replace(Hi,(e,r,n)=>`"${n}"(${Ci(n)})`);function Mi(t,e,r,n){let o;try{return JSON.parse(t,e)}catch(u){o=u.message}let s;t?(s=Li(t,o),o=Bi(o)):o+=" while parsing empty string";const i=new ki(o);throw i.fileName=r,s&&(i.codeFrame=Oi(t,s,n)),i}function ea(t,e,r){const n=gi(t,{buffer:!0,encoding:void 0});let o=new TextDecoder().decode(n);const{beforeParse:s,color:i}={};return typeof s=="function"&&(o=s(o)),Mi(o,e,V(t),{color:i})}const Di=t=>({force:!0,recursive:!0}),Ii=B(import.meta.url),Kt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,qr=t=>{if(typeof Kt<"u"&&Kt.versions&&Kt.versions.node){const[e,r]=Kt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Kt.getBuiltinModule(t)}return Ii(t)},{existsSync:Pi}=qr("node:fs"),{mkdir:Fi,readdir:Gi,rm:Ui}=qr("node:fs/promises"),ra=async(t,e)=>{if(ot(t),!Pi(t)){await Fi(t,{recursive:!0});return}const r=await Gi(t),n=Di();for(const o of r)await Ui(ye(V(t),o),n)},Wi=B(import.meta.url),Qt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,zi=t=>{if(typeof Qt<"u"&&Qt.versions&&Qt.versions.node){const[e,r]=Qt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Qt.getBuiltinModule(t)}return Wi(t)};zi("node:fs");const ji=B(import.meta.url),Zt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,qi=t=>{if(typeof Zt<"u"&&Zt.versions&&Zt.versions.node){const[e,r]=Zt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Zt.getBuiltinModule(t)}return ji(t)};qi("node:fs/promises");const Xi=B(import.meta.url),Vt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ki=t=>{if(typeof Vt<"u"&&Vt.versions&&Vt.versions.node){const[e,r]=Vt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Vt.getBuiltinModule(t)}return Xi(t)};Ki("node:fs");B(import.meta.url);const Xr=t=>{if(typeof t!="string"&&!(t instanceof ArrayBuffer)&&!ArrayBuffer.isView(t))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},Qi=B(import.meta.url),Yt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Zi=t=>{if(typeof Yt<"u"&&Yt.versions&&Yt.versions.node){const[e,r]=Yt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Yt.getBuiltinModule(t)}return Qi(t)},{randomBytes:Vi}=Zi("node:crypto"),Kr=t=>`${t}.${process.pid.toString(36)}.${Vi(6).toString("hex")}.tmp`,Yi=new TextEncoder,Qr=t=>{if(t instanceof Uint8Array)return t;if(typeof t=="string")return Yi.encode(t);if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t)){const e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new Uint8Array(e)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},Ji=B(import.meta.url),Jt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tu=t=>{if(typeof Jt<"u"&&Jt.versions&&Jt.versions.node){const[e,r]=Jt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Jt.getBuiltinModule(t)}return Ji(t)},{mkdir:eu,writeFile:ru,stat:su,rename:pr,chown:nu,chmod:ou,unlink:iu}=tu("node:fs/promises"),uu=async(t,e,r)=>{r={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},ot(t),Xr(e),t=V(t);const n=await Ne(t,de);if(n&&!r.overwrite)throw new wr(`file already exists, open '${t}'`);const o=Kr(t);try{!n&&r.recursive&&await eu(ie(t),{recursive:!0});let s;if(await ru(o,typeof e=="string"?Buffer.from(e,r.encoding??"utf8"):Qr(e),{flag:"wx"}),n&&r.backup&&(s=await su(t),r.chown??={gid:s.gid,uid:s.uid},await pr(t,`${t}.bak`)),r.chown)try{await nu(o,r.chown.uid,r.chown.gid)}catch{}await ou(o,s&&!r.mode?s.mode:r.mode??438),await pr(o,t)}catch(s){throw new Error(`Failed to write file at: ${t} - ${s.message}`,{cause:s})}finally{await Ne(o)&&await iu(o)}},au=B(import.meta.url),te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lu=t=>{if(typeof te<"u"&&te.versions&&te.versions.node){const[e,r]=te.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return te.getBuiltinModule(t)}return au(t)},{mkdirSync:cu,writeFileSync:pu,statSync:fu,renameSync:fr,chownSync:hu,chmodSync:gu,unlinkSync:du}=lu("node:fs"),yu=(t,e,r)=>{r={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},ot(t),Xr(e),t=V(t);const n=Le(t,de);if(n&&!r.overwrite)throw new wr(`file already exists, open '${t}'`);const o=Kr(t);try{!n&&r.recursive&&cu(ie(t),{recursive:!0});let s;if(pu(o,typeof e=="string"?Buffer.from(e,r.encoding??"utf8"):Qr(e),{flag:"wx"}),n&&r.backup&&(s=fu(t),r.chown??={gid:s.gid,uid:s.uid},fr(t,`${t}.bak`)),r.chown)try{hu(o,r.chown.uid,r.chown.gid)}catch{}gu(o,s&&!r.mode?s.mode:r.mode??438),fr(o,t)}catch(s){throw new Error(`Failed to write file at: ${t} - ${s.message}`,{cause:s})}finally{Le(o)&&du(o)}},mu=/^(?:( )+|\t+)/,ae="space";function hr(t,e,r){return t&&e===ae&&r===1}function gr(t,e){const r=new Map;let n=0,o,s;for(const i of t.split(/\n/g)){if(!i)continue;const u=i.match(mu);if(u===null)n=0,o="";else{const a=u[0].length,m=u[1]?ae:"tab";if(hr(e,m,a))continue;m!==o&&(n=0),o=m;let p=1,d=0;const b=a-n;if(n=a,b===0)p=0,d=1;else{const $=Math.abs(b);if(hr(e,m,$))continue;s=$u(m,$)}const g=r.get(s);r.set(s,g===void 0?[1,0]:[g[0]+p,g[1]+d])}}return r}function $u(t,e){return(t===ae?"s":"t")+String(e)}function bu(t){const e=t[0]==="s"?ae:"tab",r=Number(t.slice(1));return{type:e,amount:r}}function vu(t){let e,r=0,n=0;for(const[o,[s,i]]of t)(s>r||s===r&&i>n)&&(r=s,n=i,e=o);return e}function wu(t,e){return(t===ae?" ":" ").repeat(e)}function Zr(t){if(typeof t!="string")throw new TypeError("Expected a string");let e=gr(t,!0);e.size===0&&(e=gr(t,!1));const r=vu(e);let n,o=0,s="";return r!==void 0&&({type:n,amount:o}=bu(r),s=wu(n,o)),{amount:o,type:n,indent:s}}const Eu=B(import.meta.url),ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Au=t=>{if(typeof ee<"u"&&ee.versions&&ee.versions.node){const[e,r]=ee.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return ee.getBuiltinModule(t)}return Eu(t)},{readFile:xu}=Au("node:fs/promises"),sa=async(t,e,r={})=>{const{detectIndent:n,indent:o,replacer:s,stringify:i=JSON.stringify,...u}={indent:" ",...r};let a=o,m=`
20
+ `;if(await Ne(t,yr))try{const d=await xu(t,"utf8");if(n){const{indent:b}=Zr(d);a=b}m=d.endsWith(`
21
+ `)?`
22
+ `:""}catch(d){if(d.code!=="ENOENT")throw d}const p=i(e,s,a);await uu(t,`${p}${m}`,u)},Su=B(import.meta.url),re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Tu=t=>{if(typeof re<"u"&&re.versions&&re.versions.node){const[e,r]=re.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return re.getBuiltinModule(t)}return Su(t)},{readFileSync:Ru}=Tu("node:fs"),na=(t,e,r={})=>{const{detectIndent:n,indent:o,replacer:s,stringify:i=JSON.stringify,...u}={indent:" ",...r};let a=o,m=`
23
+ `;if(Le(t,yr))try{const d=Ru(t,"utf8");if(n){const{indent:b}=Zr(d);a=b}m=d.endsWith(`
24
+ `)?`
25
+ `:""}catch(d){if(d.code!=="ENOENT")throw d}const p=i(e,s,a);yu(t,`${p}${m}`,u)},_u=B(import.meta.url),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,De=t=>{if(typeof se<"u"&&se.versions&&se.versions.node){const[e,r]=se.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return se.getBuiltinModule(t)}return _u(t)},ku=De("fs"),Cu=De("os"),Ou=De("path");var Ce={},dr;function Nu(){if(dr)return Ce;dr=1;var t=Object.defineProperty,e=(p,d)=>t(p,"name",{value:d,configurable:!0}),r=ku,n=Cu,o=Ou;const s=e(p=>{let d="";for(let b=0;b<p.length;b+=1){const g=p[b],$=g.toUpperCase();d+=g===$?g.toLowerCase():$}return d},"invertCase"),i=new Map,u=e((p,d)=>{const b=o.join(p,`.is-fs-case-sensitive-test-${process.pid}`);try{return d.writeFileSync(b,""),!d.existsSync(s(b))}finally{try{d.unlinkSync(b)}catch{}}},"checkDirectoryCaseWithWrite"),a=e((p,d,b)=>{try{return u(p,b)}catch(g){if(d===void 0)return u(n.tmpdir(),b);throw g}},"checkDirectoryCaseWithFallback"),m=e((p,d=r,b=!0)=>{const g=p??process.cwd();if(b&&i.has(g))return i.get(g);let $;const x=s(g);return x!==g&&d.existsSync(g)?$=!d.existsSync(x):$=a(g,p,d),b&&i.set(g,$),$},"isFsCaseSensitive");return Ce.isFsCaseSensitive=m,Ce}Nu();export{$t as A,pt as B,Ku as C,zu as F,ie as H,Ys as I,He as J,V as L,Mi as N,na as O,Wu as P,yu as T,Xu as W,ea as a,Ne as b,is as c,Mu as d,ri as e,Le as f,Du as g,Qu as h,oe as i,Pu as j,Zu as k,ra as l,ye as m,sa as n,Fu as o,uu as q,gi as v,Hu as w,qs as x,Bu as y,Ju as z};
@@ -0,0 +1 @@
1
+ import{createFilter as b}from"@rollup/pluginutils";import{f as w}from"./oxcTransformPlugin-B5ATuMoi-DwCO2qaH.js";import{H as f}from"./index-KXVG6Tyr.js";import{ResolverFactory as F}from"oxc-resolver";const S=/^\0/,R=(t,i)=>{if(typeof t=="boolean")return()=>t;if(Array.isArray(t)){const s=t.map(o=>o.includes("/")?o:`**/${o}`);return b(s,void 0,{resolve:i})}return s=>!0},J=(t,i,s,o)=>{const{ignoreSideEffectsForRoot:v,...a}=t,y=new Map,h=new F({...a,roots:[...a.roots??[],i],tsconfig:o?{configFile:o,references:"auto"}:void 0});return{name:"oxc-resolve",resolveId:{filter:{id:{exclude:S}},async handler(c,l,m){if(c.startsWith("\0"))return;const{isEntry:E}=m,p=E||!l?f(c):f(l),{error:x,path:e}=await h.async(p,c);if(x){s.debug(x,{context:[{basedir:i,extensions:a.extensions,id:e}]});return}let d=r=>!0;try{const{packageJson:r,path:u}=await w(f(e),{cache:y}),g=f(u);(!v||i!==g)&&(d=R(r.sideEffects,g))}catch(r){const u=r instanceof Error?r.message:String(r);s.debug(u,{context:[{basedir:p,caller:"Resolver",error:r,extensions:a.extensions,id:e}]})}if(c.includes("?"))return{id:e,moduleSideEffects:d(e)};const n=await this.resolve(e,l,{skipSelf:!0,...m});if(n)return n.external?!1:n.id!==e?n:{id:e,meta:n.meta,moduleSideEffects:d(e)}},order:"post"}}};export{J as k};