@visulima/vis 1.0.0-alpha.30 → 1.0.0-alpha.32
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.
- package/CHANGELOG.md +17 -0
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/bin.js +290 -290
- package/dist/packem_chunks/bloom-status.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/config.js +15 -15
- package/dist/packem_chunks/doctor-probe.js +1 -1
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler22.js +1 -1
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler32.js +1 -1
- package/dist/packem_chunks/handler35.js +1 -1
- package/dist/packem_chunks/handler36.js +1 -1
- package/dist/packem_chunks/handler37.js +1 -1
- package/dist/packem_chunks/handler38.js +1 -1
- package/dist/packem_chunks/handler39.js +1 -1
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler42.js +1 -1
- package/dist/packem_chunks/handler43.js +1 -1
- package/dist/packem_chunks/handler44.js +1 -1
- package/dist/packem_chunks/handler45.js +1 -1
- package/dist/packem_chunks/handler46.js +1 -1
- package/dist/packem_chunks/handler47.js +1 -1
- package/dist/packem_chunks/handler48.js +1 -1
- package/dist/packem_chunks/handler49.js +1 -1
- package/dist/packem_chunks/handler50.js +1 -1
- package/dist/packem_chunks/handler51.js +37 -37
- package/dist/packem_chunks/handler52.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/prune.js +1 -1
- package/dist/packem_chunks/status.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_shared/Table-3pFgIUZ2-DABgc6rj.js +12 -0
- package/dist/packem_shared/{advisories-BxXiKFbL.js → advisories-CGKZo9Rx.js} +1 -1
- package/dist/packem_shared/{cyclonedx-BpGVHqSW.js → cyclonedx-BilSFCNY.js} +1 -1
- package/dist/packem_shared/{docker-CTE3s4LW.js → docker-EJiTY0Sz.js} +1 -1
- package/dist/packem_shared/{index-D1xC1Y_R.js → index-BnANMQ7k.js} +1 -1
- package/dist/packem_shared/{index-hoWfZmNo.js → index-K8aQuMvx.js} +1 -1
- package/dist/packem_shared/{lifecycle-CXaqPGAQ.js → lifecycle-Buigdp7P.js} +2 -2
- package/dist/packem_shared/{osv-bloom-DSZcHLsM.js → osv-bloom-0Vu8YRhg.js} +1 -1
- package/dist/packem_shared/{provenance-DkCA8BrN.js → provenance-D8vU1u2L.js} +1 -1
- package/dist/packem_shared/{registry-keys-Mixm4eAY.js → registry-keys-E3cZn4FI.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-D5E72FfN.js → resolve-explicit-cPzwdiEE.js} +1 -1
- package/dist/packem_shared/{s1ngularity-Qxc6tRRI.js → s1ngularity-DBcjspCC.js} +1 -1
- package/dist/packem_shared/{scan-progress-DVtCtI2z.js → scan-progress-CTVVf9WW.js} +1 -1
- package/dist/packem_shared/{signatures-byuFrtAH.js → signatures-ChTfrQvT.js} +1 -1
- package/dist/packem_shared/{typosquats-BiDxQj7R.js → typosquats-acxQ7blw.js} +1 -1
- package/dist/packem_shared/{watch-loop-C31Ar7BX.js → watch-loop-BpA_pxU9.js} +1 -1
- package/index.d.ts +201 -201
- package/index.js +52 -52
- package/package.json +10 -10
- package/dist/packem_shared/Table-DoSoazT6-DwnyTUsA.js +0 -12
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var m=Object.defineProperty;var a=(o,r)=>m(o,"name",{value:r,configurable:!0});import{e as l,E as f,I as u}from"../packem_shared/Table-
|
|
1
|
+
var m=Object.defineProperty;var a=(o,r)=>m(o,"name",{value:r,configurable:!0});import{e as l,E as f,I as u}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{p as i}from"./bin.js";import{g as $}from"../packem_shared/osv-bloom-0Vu8YRhg.js";var d=Object.defineProperty,n=a((o,r)=>d(o,"name",{value:r,configurable:!0}),"s");const c=n(o=>{if(!o)return"never";const r=Date.parse(o);if(Number.isNaN(r))return o;const t=Date.now()-r;if(t<0)return o;const e=Math.floor(t/6e4);if(e<1)return"just now";if(e<60)return`${e}m ago`;const s=Math.floor(e/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`},"formatRelative"),p=n(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),g=n(async({options:o,workspaceRoot:r})=>{if(!r)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const t=await $(r,o.cacheDir);if(o.format==="json"){process.stdout.write(`${JSON.stringify(t,void 0,2)}
|
|
2
2
|
`);return}if(i.info(`Cache: ${t.cacheDir}`),!t.present){i.warn(`No osv-bloom filter yet. Run ${l("vis advisories bloom sync")} to populate.`);return}if(t.manifest){const{manifest:e}=t;i.info(`Built: ${e.builtAtRfc3339} (${c(e.builtAtRfc3339)})`),i.info(`Fetch: ${t.fetchedAtIso??f("—")} (${c(t.fetchedAtIso)})`),i.info(`Filter: ${u(p(e.bloomByteLen))} m=${e.bloomMBits.toLocaleString()} bits k=${String(e.bloomKHashes)}`),i.info(`Set: ${e.entryCount.toLocaleString()} entries from ${e.advisoryCount.toLocaleString()} advisories (target FPR ${e.targetFpr})`),i.info(f(`Digest: ${e.setDigestSha256}`))}else i.warn("filter.bin present but manifest.json missing — `vis advisories bloom sync` will rewrite the cache.")},"execute"),y=g;export{y as advisoriesBloomStatusExecute};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var D=Object.defineProperty;var f=(o,t)=>D(o,"name",{value:t,configurable:!0});import{E as d}from"../packem_shared/Table-
|
|
1
|
+
var D=Object.defineProperty;var f=(o,t)=>D(o,"name",{value:t,configurable:!0});import{E as d}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{p as n}from"./bin.js";import{s as b}from"../packem_shared/scan-progress-CTVVf9WW.js";import{s as y,D as h}from"../packem_shared/osv-bloom-0Vu8YRhg.js";var v=Object.defineProperty,a=f((o,t)=>v(o,"name",{value:t,configurable:!0}),"s");const w=a(o=>o?.security?.audit?.advisories?.bloom??{},"readBloomConfig"),p=a(o=>o>=1e3?`${(o/1e3).toFixed(1)}s`:`${Math.round(o)}ms`,"formatDuration"),$=a(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),B=a(async({options:o,visConfig:t,workspaceRoot:c})=>{if(!c)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const l=o.format==="json",m=w(t),u=o.source??m.source??h,s=b([{id:"bloom",label:"Sync osv-bloom prefilter"}],{live:!l});let e,r;try{s.start("bloom");const i=Date.now();e=await y({allowedHosts:m.allowedHosts,cacheDir:o.cacheDir,force:!!o.force,source:u,workspaceRoot:c}),e.upToDate?s.finish("bloom","ok",`up to date · ${p(Date.now()-i)}`):s.finish("bloom","ok",`${e.manifest.entryCount.toLocaleString()} entries · ${$(e.bytesOnDisk)} · ${p(e.durationMs)}`)}catch(i){r=i instanceof Error?i.message:String(i),s.finish("bloom","error",r)}finally{s.stop()}l?process.stdout.write(`${JSON.stringify({bytesOnDisk:e?.bytesOnDisk??0,cacheDir:e?.cacheDir??null,durationMs:e?.durationMs??0,error:r??null,manifest:e?.manifest??null,source:u,upToDate:e?.upToDate??!1},void 0,2)}
|
|
2
2
|
`):e&&(n.info(d(`Cache: ${e.cacheDir}`)),n.info(d(`Built: ${e.manifest.builtAtRfc3339}`)),r||n.success(e.upToDate?"osv-bloom prefilter up to date.":"osv-bloom prefilter synced.")),r&&(process.exitCode=1)},"execute"),x=B;export{x as advisoriesBloomSyncExecute};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var Un=Object.defineProperty;var h=(e,t)=>Un(e,"name",{value:t,configurable:!0});import{createRequire as Kn}from"node:module";import{n as Ut,B as Yn,U as Kt,l as R,_ as Et,K as Oe,s as Qn,M as S,a as Ht}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{createJiti as Zt}from"jiti";import"../packem_shared/otelPlugin-CJR2T_lk.js";import"../packem_shared/definePlugin-CWm4Dv_t.js";const Hn=Kn(import.meta.url),ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rt=h(e=>{if(typeof ge<"u"&&ge.versions&&ge.versions.node){const[t,r]=ge.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ge.getBuiltinModule(e)}return Hn(e)},"__cjs_getBuiltinModule"),{createHash:qt}=rt("node:crypto"),{readdirSync:Gt,readFileSync:Zn,copyFileSync:Jn,unlinkSync:Xn}=rt("node:fs"),{createRequire:ke}=rt("node:module");var eo=Object.defineProperty,D=h((e,t)=>eo(e,"name",{value:t,configurable:!0}),"O$2"),to=Object.defineProperty,O=D((e,t)=>to(e,"name",{value:t,configurable:!0}),"h");const ro=ke(import.meta.url),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,no=O(e=>{if(typeof se<"u"&&se.versions&&se.versions.node){const[t,r]=se.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return se.getBuiltinModule(e)}return ro(e)},"__cjs_getBuiltinModule"),{env:ie,cwd:Jt}=se,{createRequire:ue}=no("node:module"),Xt=0,ae=2,Yt=Symbol("findUpStop");var oo=Object.defineProperty,so=O((e,t)=>oo(e,"name",{value:t,configurable:!0}),"e$1");const nt=so(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"t");var io=Object.defineProperty,ao=O((e,t)=>io(e,"name",{value:t,configurable:!0}),"r");const Pt=ao(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"r");var co=Object.defineProperty,Qt=O((e,t)=>co(e,"name",{value:t,configurable:!0}),"s$4");const uo=ue(import.meta.url),he=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lo=Qt(e=>{if(typeof he<"u"&&he.versions&&he.versions.node){const[t,r]=he.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return he.getBuiltinModule(e)}return uo(e)},"u"),{lstatSync:At,mkdirSync:fo}=lo("node:fs"),po=Qt(e=>{nt(e);try{const t=At(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Pt(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{fo(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=At(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Pt(r))}'`,{cause:t})}},"g");var go=Object.defineProperty,ho=O((e,t)=>go(e,"name",{value:t,configurable:!0}),"$e"),mo=Object.defineProperty,ot=ho((e,t)=>mo(e,"name",{value:t,configurable:!0}),"W"),yo=Object.defineProperty,g=ot((e,t)=>yo(e,"name",{value:t,configurable:!0}),"u$1");let Ct=g(()=>{var e=(()=>{var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,c=g((o,s)=>{for(var a in s)t(o,a,{get:s[a],enumerable:!0})},"ne"),f=g((o,s,a,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let u of n(s))!i.call(o,u)&&u!==a&&t(o,u,{get:g(()=>s[u],"get"),enumerable:!(l=r(s,u))||l.enumerable});return o},"ae"),d=g(o=>f(t({},"__esModule",{value:!0}),o),"oe"),v={};c(v,{zeptomatch:g(()=>Tt,"zeptomatch")});var w=g(o=>{const s=new Set,a=[o];for(let l=0;l<a.length;l++){const u=a[l];if(s.has(u))continue;s.add(u);const{children:p}=u;if(p?.length)for(let m=0,x=p.length;m<x;m++)a.push(p[m])}return Array.from(s)},"M"),$=g(o=>{let s="";const a=w(o);for(let l=0,u=a.length;l<u;l++){const p=a[l];if(!p.regex)continue;const m=p.regex.flags;if(s||(s=m),s!==m)throw new Error(`Inconsistent RegExp flags used: "${s}" and "${m}"`)}return s},"se"),y=g((o,s,a)=>{const l=a.get(o);if(l!==void 0)return l;const u=o.partial??s;let p="";if(o.regex&&(p+=u?"(?:$|":"",p+=o.regex.source),o.children?.length){const m=T(o.children.map(x=>y(x,s,a)).filter(Boolean));if(m?.length){const x=o.children.some(pe=>!pe.regex||!(pe.partial??s)),A=m.length>1||u&&(!p.length||x);p+=A?u?"(?:$|":"(?:":"",p+=m.join("|"),p+=A?")":""}}return o.regex&&(p+=u?")":""),a.set(o,p),p},"O"),P=g((o,s)=>{const a=new Map,l=w(o);for(let u=l.length-1;u>=0;u--){const p=y(l[u],s,a);if(!(u>0))return p}return""},"ie"),T=g(o=>Array.from(new Set(o)),"ue"),j=g((o,s,a)=>j.compile(o,a).test(s),"R");j.compile=(o,s)=>{const a=s?.partial??!1,l=P(o,a),u=$(o);return new RegExp(`^(?:${l})$`,u)};var N=j,F=g((o,s)=>{const a=N.compile(o,s),l=`${a.source.slice(0,-1)}[\\\\/]?$`,u=a.flags;return new RegExp(l,u)},"le"),ee=F,Fe=g(o=>{const s=o.map(l=>l.source).join("|")||"$^",a=o[0]?.flags;return new RegExp(s,a)},"ve"),We=Fe,te=g(o=>Array.isArray(o),"j"),W=g(o=>typeof o=="function","_"),Le=g(o=>o.length===0,"he"),Ve=(()=>{const{toString:o}=Function.prototype,s=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return a=>(a.length===0||a.length===1)&&s.test(o.call(a))})(),Pr=g(o=>typeof o=="number","de"),Ar=g(o=>typeof o=="object"&&o!==null,"xe"),Cr=g(o=>o instanceof RegExp,"me"),Sr=(()=>{const o=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return s=>o.test(s.source)})(),Nr=(()=>{const o=/^[a-zA-Z0-9_-]+$/;return s=>o.test(s.source)&&!s.flags.includes("i")})(),lt=g(o=>typeof o=="string","A"),U=g(o=>o===void 0,"f"),Mr=g(o=>{const s=new Map;return a=>{const l=s.get(a);if(l!==void 0)return l;const u=o(a);return s.set(a,u),u}},"ye"),ft=g((o,s,a={})=>{const l={cache:{},input:o,index:0,indexBacktrackMax:0,options:a,output:[]},u=K(s)(l),p=Math.max(l.index,l.indexBacktrackMax);if(u&&l.index===o.length)return l.output;throw new Error(`Failed to parse at index ${p}`)},"I"),b=g((o,s)=>te(o)?zr(o,s):lt(o)?pt(o,s):_r(o,s),"i"),zr=g((o,s)=>{const a={};for(const l of o){if(l.length!==1)throw new Error(`Invalid character: "${l}"`);const u=l.charCodeAt(0);a[u]=!0}return l=>{const u=l.input;let p=l.index,m=p;for(;m<u.length&&u.charCodeAt(m)in a;)m+=1;if(m>p){if(!U(s)&&!l.options.silent){const x=u.slice(p,m),A=W(s)?s(x,u,`${p}`):s;U(A)||l.output.push(A)}l.index=m}return!0}},"we"),_r=g((o,s)=>{if(Nr(o))return pt(o.source,s);{const a=o.source,l=o.flags.replace(/y|$/,"y"),u=new RegExp(a,l);return Sr(o)&&W(s)&&!Ve(s)?Rr(u,s):Dr(u,s)}},"$e"),Rr=g((o,s)=>a=>{const l=a.index,u=a.input;o.lastIndex=l;const p=o.exec(u);if(p){const m=o.lastIndex;if(!a.options.silent){const x=s(...p,u,`${l}`);U(x)||a.output.push(x)}return a.index=m,!0}else return!1},"Ee"),Dr=g((o,s)=>a=>{const l=a.index,u=a.input;if(o.lastIndex=l,o.test(u)){const p=o.lastIndex;if(!U(s)&&!a.options.silent){const m=W(s)?s(u.slice(l,p),u,`${l}`):s;U(m)||a.output.push(m)}return a.index=p,!0}else return!1},"Ce"),pt=g((o,s)=>a=>{const l=a.index,u=a.input;if(u.startsWith(o,l)){if(!U(s)&&!a.options.silent){const p=W(s)?s(o,u,`${l}`):s;U(p)||a.output.push(p)}return a.index+=o.length,!0}else return!1},"F"),qe=g((o,s,a,l)=>{const u=K(o),p=s>1;return Ue(Ge(gt(m=>{let x=0;for(;x<a;){const A=m.index;if(!u(m)||(x+=1,m.index===A))break}return x>=s},p),l))},"k"),dt=g((o,s)=>qe(o,0,1,s),"L"),Me=g((o,s)=>qe(o,0,1/0,s),"$"),Br=g((o,s)=>qe(o,1,1/0,s),"Re"),re=g((o,s)=>{const a=o.map(K);return Ue(Ge(gt(l=>{for(let u=0,p=a.length;u<p;u++)if(!a[u](l))return!1;return!0}),s))},"x"),M=g((o,s)=>{const a=o.map(K);return Ue(Ge(l=>{for(let u=0,p=a.length;u<p;u++)if(a[u](l))return!0;return!1},s))},"p"),gt=g((o,s=!0,a=!1)=>{const l=K(o);return s?u=>{const p=u.index,m=u.output.length,x=l(u);return!x&&!a&&(u.indexBacktrackMax=Math.max(u.indexBacktrackMax,u.index)),(!x||a)&&(u.index=p,u.output.length!==m&&(u.output.length=m)),x}:l},"q"),Ge=g((o,s)=>{const a=K(o);return s?l=>{if(l.options.silent)return a(l);const u=l.output.length;if(a(l)){const p=l.output.splice(u,1/0),m=s(p);return U(m)||l.output.push(m),!0}else return!1}:a},"B"),Ue=(()=>{let o=0;return s=>{const a=K(s),l=o+=1;return u=>{var p;if(u.options.memoization===!1)return a(u);const m=u.index,x=(p=u.cache)[l]||(p[l]={indexMax:-1,queue:[]}),A=x.queue;if(m<=x.indexMax){const de=x.store||(x.store=new Map);if(A.length){for(let oe=0,Vn=A.length;oe<Vn;oe+=2){const qn=A[oe*2],Gn=A[oe*2+1];de.set(qn,Gn)}A.length=0}const z=de.get(m);if(z===!1)return!1;if(Pr(z))return u.index=z,!0;if(z)return u.index=z.index,z.output?.length&&u.output.push(...z.output),!0}const pe=u.output.length,Ln=a(u);if(x.indexMax=Math.max(x.indexMax,m),Ln){const de=u.index,z=u.output.length;if(z>pe){const oe=u.output.slice(pe,z);A.push(m,{index:de,output:oe})}else A.push(m,de);return!0}else return A.push(m,!1),!1}}})(),ht=g(o=>{let s;return a=>(s||(s=K(o())),s(a))},"G"),K=Mr(o=>{if(W(o))return Le(o)?ht(o):o;if(lt(o)||Cr(o))return b(o);if(te(o))return re(o);if(Ar(o))return M(Object.values(o));throw new Error("Invalid rule")}),J=g(o=>o,"d"),Ir=g(o=>typeof o=="string","ke"),Fr=g(o=>{const s=new WeakMap,a=new WeakMap;return(l,u)=>{const p=u?.partial?a:s,m=p.get(l);if(m!==void 0)return m;const x=o(l,u);return p.set(l,x),x}},"Be"),Wr=g(o=>{const s={},a={};return(l,u)=>{const p=u?.partial?a:s;return p[l]??(p[l]=o(l,u))}},"Pe"),Lr=b(/\\./,J),Vr=b(/./,J),qr=b(/\*\*\*+/,"*"),Gr=b(/([^/{[(!])\*\*/,(o,s)=>`${s}*`),Ur=b(/(^|.)\*\*(?=[^*/)\]}])/,(o,s)=>`${s}*`),Kr=Me(M([Lr,qr,Gr,Ur,Vr])),Hr=Kr,Zr=g(o=>ft(o,Hr,{memoization:!1}).join(""),"Ie"),Jr=Zr,mt="abcdefghijklmnopqrstuvwxyz",Xr=g(o=>{let s="";for(;o>0;){const a=(o-1)%26;s=mt[a]+s,o=Math.floor((o-1)/26)}return s},"Le"),yt=g(o=>{let s=0;for(let a=0,l=o.length;a<l;a++)s=s*26+mt.indexOf(o[a])+1;return s},"V"),Ke=g((o,s)=>{if(s<o)return Ke(s,o);const a=[];for(;o<=s;)a.push(o++);return a},"b"),Yr=g((o,s,a)=>Ke(o,s).map(l=>String(l).padStart(a,"0")),"qe"),bt=g((o,s)=>Ke(yt(o),yt(s)).map(Xr),"W"),E=g(o=>({partial:!1,regex:new RegExp(o,"s"),children:[]}),"c"),fe=g(o=>({children:o}),"y"),ne=(()=>{const o=g((s,a,l)=>{if(l.has(s))return;l.add(s);const{children:u}=s;if(!u.length)u.push(a);else for(let p=0,m=u.length;p<m;p++)o(u[p],a,l)},"e");return s=>{if(!s.length)return fe([]);for(let a=s.length-1;a>=1;a--){const l=new Set,u=s[a-1],p=s[a];o(u,p,l)}return s[0]}})(),H=g(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),Qr=b(/\\./,E),en=b(/[$.*+?^(){}[\]\|]/,o=>E(`\\${o}`)),tn=b(/[\\\/]/,H),rn=b(/[^$.*+?^(){}[\]\|\\\/]+/,E),nn=b(/^(?:!!)*!(.*)$/,(o,s)=>E(`(?!^${Tt.compile(s).source}$).*?`)),on=b(/^(!!)+/),sn=M([nn,on]),an=b(/\/(\*\*\/)+/,()=>fe([ne([H(),E(".+?"),H()]),H()])),cn=b(/^(\*\*\/)+/,()=>fe([E("^"),ne([E(".*?"),H()])])),un=b(/\/(\*\*)$/,()=>fe([ne([H(),E(".*?")]),E("$")])),ln=b(/\*\*/,()=>E(".*?")),vt=M([an,cn,un,ln]),fn=b(/\*\/(?!\*\*\/|\*$)/,()=>ne([E("[^\\\\/]*?"),H()])),pn=b(/\*/,()=>E("[^\\\\/]*")),$t=M([fn,pn]),wt=b("?",()=>E("[^\\\\/]")),dn=b("[",J),gn=b("]",J),hn=b(/[!^]/,"^\\\\/"),mn=b(/[a-z]-[a-z]|[0-9]-[0-9]/i,J),yn=b(/\\./,J),bn=b(/[$.*+?^(){}[\|]/,o=>`\\${o}`),vn=b(/[\\\/]/,"\\\\/"),$n=b(/[^$.*+?^(){}[\]\|\\\/]+/,J),wn=M([yn,bn,vn,mn,$n]),xt=re([dn,dt(hn),Me(wn),gn],o=>E(o.join(""))),xn=b("{","(?:"),jn=b("}",")"),kn=b(/(\d+)\.\.(\d+)/,(o,s,a)=>Yr(+s,+a,Math.min(s.length,a.length)).join("|")),On=b(/([a-z]+)\.\.([a-z]+)/,(o,s,a)=>bt(s,a).join("|")),Tn=b(/([A-Z]+)\.\.([A-Z]+)/,(o,s,a)=>bt(s.toLowerCase(),a.toLowerCase()).join("|").toUpperCase()),En=M([kn,On,Tn]),jt=re([xn,En,jn],o=>E(o.join(""))),Pn=b("{"),An=b("}"),Cn=b(","),Sn=b(/\\./,E),Nn=b(/[$.*+?^(){[\]\|]/,o=>E(`\\${o}`)),Mn=b(/[\\\/]/,H),zn=b(/[^$.*+?^(){}[\]\|\\\/,]+/,E),_n=ht(()=>Ot),Rn=b("",()=>E("(?:)")),Dn=Br(M([vt,$t,wt,xt,jt,_n,Sn,Nn,Mn,zn]),ne),kt=M([Dn,Rn]),Ot=re([Pn,dt(re([kt,Me(re([Cn,kt]))])),An],fe),Bn=Me(M([sn,vt,$t,wt,xt,jt,Ot,Qr,en,tn,rn]),ne),In=Bn,Fn=g(o=>ft(o,In,{memoization:!1})[0],"kr"),Wn=Fn,He=g((o,s,a)=>He.compile(o,a).test(s),"N");He.compile=(()=>{const o=Wr((a,l)=>ee(Wn(Jr(a)),l)),s=Fr((a,l)=>We(a.map(u=>o(u,l))));return(a,l)=>Ir(a)?o(a,l):s(a,l)})();var Tt=He;return d(v)})();return e.default||e},"_lazyMatch"),Ze;const bo=g((e,t)=>(Ze||(Ze=Ct(),Ct=null),Ze(e,t)),"default");var vo=Object.defineProperty,$o=ot((e,t)=>vo(e,"name",{value:t,configurable:!0}),"t$1");const wo=/^[A-Z]:\//i,B=$o((e="")=>e&&e.replaceAll("\\","/").replace(wo,t=>t.toUpperCase()),"normalizeWindowsPath");var xo=Object.defineProperty,C=ot((e,t)=>xo(e,"name",{value:t,configurable:!0}),"r");const jo=/^[/\\]{2}/,ko=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,er=/^[A-Z]:$/i,St=/^\/([A-Z]:)?$/i,Oo=/.(\.[^./]+)$/,To=/^[/\\]|^[a-z]:[/\\]/i,Eo=/\/$/,Po=C(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),tr=C((e,t)=>{let r="",n=0,i=-1,c=0,f;for(let d=0;d<=e.length;++d){if(d<e.length)f=e[d];else{if(f==="/")break;f="/"}if(f==="/"){if(!(i===d-1||c===1))if(c===2){if(r.length<2||n!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const v=r.lastIndexOf("/");v===-1?(r="",n=0):(r=r.slice(0,v),n=r.length-1-r.lastIndexOf("/")),i=d,c=0;continue}else if(r.length>0){r="",n=0,i=d,c=0;continue}}t&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${e.slice(i+1,d)}`:r=e.slice(i+1,d),n=d-i-1;i=d,c=0}else f==="."&&c!==-1?++c:c=-1}return r},"normalizeString"),X=C(e=>ko.test(e),"isAbsolute"),rr=C(function(e){if(e.length===0)return".";e=B(e);const t=jo.exec(e),r=X(e),n=e.at(-1)==="/";return e=tr(e,!r),e.length===0?r?"/":n?"./":".":(n&&(e+="/"),er.test(e)&&(e+="/"),t?r?`//${e}`:`//./${e}`:r&&!X(e)?`/${e}`:e)},"normalize"),_=C((...e)=>{let t="";for(const r of e)if(r)if(t.length>0){const n=t.at(-1)==="/",i=r[0]==="/";n&&i?t+=r.slice(1):t+=n||i?r:`/${r}`}else t+=r;return rr(t)},"join"),q=C(function(...e){e=e.map(n=>B(n));let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){const i=n>=0?e[n]:Po();!i||i.length===0||(t=`${i}/${t}`,r=X(i))}return t=tr(t,!r),r&&!X(t)?`/${t}`:t.length>0?t:"."},"resolve");C(function(e){return B(e)},"toNamespacedPath");const nr=C(function(e){return Oo.exec(B(e))?.[1]??""},"extname");C(function(e,t){const r=q(e).replace(St,"$1").split("/"),n=q(t).replace(St,"$1").split("/");if(n[0][1]===":"&&r[0][1]===":"&&r[0]!==n[0])return n.join("/");const i=[...r];for(const c of i){if(n[0]!==c)break;r.shift(),n.shift()}return[...r.map(()=>".."),...n].join("/")},"relative");const Te=C(e=>{const t=B(e).replace(Eo,"").split("/").slice(0,-1);return t.length===1&&er.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(X(e)?"/":".")},"dirname");C(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return B(e.root?q(...t):t.join("/"))},"format");const Ao=C((e,t)=>{const r=B(e).split("/").pop();return t&&r.endsWith(t)?r.slice(0,-t.length):r},"basename"),or=C(function(e){const t=To.exec(e)?.[0]?.replaceAll("\\","/")??"",r=Ao(e),n=nr(r);return{base:r,dir:Te(e),ext:n,name:r.slice(0,r.length-n.length),root:t}},"parse");C((e,t)=>bo(t,rr(e)),"matchesGlob");var Co=Object.defineProperty,Y=O((e,t)=>Co(e,"name",{value:t,configurable:!0}),"n$3"),So=Object.defineProperty,G=Y((e,t)=>So(e,"name",{value:t,configurable:!0}),"a");const No=ue(import.meta.url),me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Mo=G(e=>{if(typeof me<"u"&&me.versions&&me.versions.node){const[t,r]=me.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return me.getBuiltinModule(e)}return No(e)},"__cjs_getBuiltinModule"),{fileURLToPath:zo}=Mo("node:url");var _o=Object.defineProperty,ce=G((e,t)=>_o(e,"name",{value:t,configurable:!0}),"t$1");function le(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}h(le,"le");D(le,"pe");O(le,"m$2");Y(le,"d");G(le,"getDefaultExportFromCjs");ce(le,"getDefaultExportFromCjs");function Ee(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}h(Ee,"ge");D(Ee,"Oe");O(Ee,"h$2");Y(Ee,"O");G(Ee,"getDefaultExportFromNamespaceIfPresent");ce(Ee,"getDefaultExportFromNamespaceIfPresent");function Pe(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}h(Pe,"me");D(Pe,"Ee");O(Pe,"x");Y(Pe,"P");G(Pe,"getDefaultExportFromNamespaceIfNotNamed");ce(Pe,"getDefaultExportFromNamespaceIfNotNamed");function Ae(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=ce(G(Y(O(D(h(function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)},"c"),"c"),"a"),"s"),"a"),"a");r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:ce(function(){return e[n]},"get")})}),r}h(Ae,"he");D(Ae,"ke");O(Ae,"y$1");Y(Ae,"_");G(Ae,"getAugmentedNamespace");ce(Ae,"getAugmentedNamespace");var Nt,Mt;function Ce(){return Mt||(Mt=1,Nt=["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"]),Nt}h(Ce,"ye");D(Ce,"Ae");O(Ce,"w");Y(Ce,"k");G(Ce,"requireBinaryExtensions");var Ro=Ce();const Do=le(Ro);var Bo=Object.defineProperty,I=G((e,t)=>Bo(e,"name",{value:t,configurable:!0}),"r");const Io=new Set(Do),Fo=new Set(["/","\\",void 0]),zt=Symbol.for("pathe:normalizedAlias"),Wo=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,Lo=I((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),_e=I((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),sr=I(e=>{if(e[zt])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([r],[n])=>Lo(r,n)));for(const r in t)for(const n in t)n===r||r.startsWith(n)||t[r].startsWith(n)&&Fo.has(t[r][n.length])&&(t[r]=t[n]+t[r].slice(n.length));return Object.defineProperty(t,zt,{enumerable:!1,value:!0}),t},"normalizeAliases");I((e,t)=>{e=B(e),t=sr(t);for(const[r,n]of Object.entries(t)){if(!e.startsWith(r))continue;const i=_e(r)?r.slice(0,-1):r;if(_e(e[i.length]))return _(n,e.slice(r.length))}return e},"resolveAlias");I(e=>Wo.exec(e)?.[2],"filename");I((e,t)=>{e=B(e),t=sr(t);for(const[r,n]of Object.entries(t).toReversed()){if(!e.startsWith(n))continue;const i=_e(n)?n.slice(0,-1):n;if(_e(e[i.length]))return _(r,e.slice(n.length))}return e},"reverseResolveAlias");const Vo=/^(?:\.?\.[/\\]|\.\.\B)/,qo=/^(?:msys|cygwin)$/;I(e=>Vo.test(e)||e==="..","isRelative");I(e=>Io.has(nr(e).slice(1).toLowerCase()),"isBinaryPath");const Z=I(e=>B(e instanceof URL?zo(e):e),"toPath");I(()=>{if(!globalThis.process)return!1;if(globalThis.process.platform==="win32"||globalThis.process.platform==="cygwin")return!0;const e=globalThis.process.env.OSTYPE;return typeof e!="string"?!1:qo.test(e)},"isWindows");var Go=Object.defineProperty,Ye=O((e,t)=>Go(e,"name",{value:t,configurable:!0}),"n$2");const Uo=ue(import.meta.url),ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ko=Ye(e=>{if(typeof ye<"u"&&ye.versions&&ye.versions.node){const[t,r]=ye.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ye.getBuiltinModule(e)}return Uo(e)},"h"),{stat:Ho,lstat:Zo}=Ko("node:fs/promises"),Jo=Ye(async(e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=t.cwd?Z(t.cwd):process.cwd();let n=q(r);const{root:i}=or(n),c=Z(t.stopAt??i),f=q(n,c),d=t.type??"file",v=Ye(async function($){return typeof e=="function"?[await e($)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"d");t.allowSymlinks??=!0;const w=t.allowSymlinks?Ho:Zo;for(;n&&n!==f&&n!==i;){const $=await v(n);for(let y of $){if(y===Yt)return;if(y===void 0)continue;Buffer.isBuffer(y)?y=y.toString():y instanceof URL&&(y=Z(y));const P=X(y)?y:q(n,y);try{const T=await w(P);if(d==="file"&&T.isFile()||d==="directory"&&T.isDirectory())return P}catch{}}n=Te(n)}},"k");var Xo=Object.defineProperty,Qe=O((e,t)=>Xo(e,"name",{value:t,configurable:!0}),"n$1");const Yo=ue(import.meta.url),be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Qo=Qe(e=>{if(typeof be<"u"&&be.versions&&be.versions.node){const[t,r]=be.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return be.getBuiltinModule(e)}return Yo(e)},"h"),{statSync:es,lstatSync:ts}=Qo("node:fs"),rs=Qe((e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=t.cwd?Z(t.cwd):process.cwd();let n=q(r);const{root:i}=or(n),c=Z(t.stopAt??i),f=q(n,c),d=t.type??"file",v=Qe(function($){return typeof e=="function"?[e($)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"m");t.allowSymlinks??=!0;const w=t.allowSymlinks?es:ts;for(;n&&n!==f&&n!==i;){for(let $ of v(n)){if($===Yt)return;if($===void 0)continue;Buffer.isBuffer($)?$=$.toString():$ instanceof URL&&($=Z($));const y=X($)?$:q(n,$);try{const P=w(y);if(d==="file"&&P.isFile()||d==="directory"&&P.isDirectory())return y}catch{}}n=Te(n)}},"F");var ns=Object.defineProperty,ir=O((e,t)=>ns(e,"name",{value:t,configurable:!0}),"t$2");const os=ue(import.meta.url),ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ss=ir(e=>{if(typeof ve<"u"&&ve.versions&&ve.versions.node){const[t,r]=ve.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ve.getBuiltinModule(e)}return os(e)},"i"),{access:is}=ss("node:fs/promises");async function L(e,t=Xt){nt(e),e=Z(e);try{return await is(e,t),!0}catch{return!1}}h(L,"R$3");D(L,"D");O(L,"l$2");ir(L,"d");var as=Object.defineProperty,ar=O((e,t)=>as(e,"name",{value:t,configurable:!0}),"s");const cs=ue(import.meta.url),$e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,us=ar(e=>{if(typeof $e<"u"&&$e.versions&&$e.versions.node){const[t,r]=$e.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return $e.getBuiltinModule(e)}return cs(e)},"i"),{accessSync:ls}=us("node:fs");function V(e,t=Xt){nt(e),e=Z(e);try{return ls(e,t),!0}catch{return!1}}h(V,"D$2");D(V,"I");O(V,"l$1");ar(V,"d");var fs=Object.defineProperty,ps=O((e,t)=>fs(e,"name",{value:t,configurable:!0}),"o");class cr extends Error{static{h(this,"dt")}static{D(this,"pt")}static{O(this,"n")}static{ps(this,"o")}constructor(t){super(`ENOENT: ${t}`)}get code(){return"ENOENT"}set code(t){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(t){throw new Error("Cannot overwrite name of NotFoundError")}}var ds=Object.defineProperty,st=O((e,t)=>ds(e,"name",{value:t,configurable:!0}),"a");const Re=st((e,t)=>(t?.create&&po(e),e),"useDirectory");st(async(e,t)=>{if(ie.CACHE_DIR&&!["0","1","false","true"].includes(ie.CACHE_DIR))return Re(_(ie.CACHE_DIR,e),t);const r=await Jo("package.json",{cwd:t?.cwd??Jt(),type:"file"});if(!r){if(t?.throwError)throw new cr("No such file or directory found.");return}const n=_(Te(r),"node_modules"),i=_(n,".cache"),c=_(i,e);if(!(!await L(c,ae)&&await L(c))&&!(!await L(i,ae)&&await L(i))&&!(!await L(n,ae)&&await L(n)))return Re(c,t)},"findCacheDirectory");const gs=st((e,t)=>{if(ie.CACHE_DIR&&!["0","1","false","true"].includes(ie.CACHE_DIR))return Re(_(ie.CACHE_DIR,e),t);const r=rs("package.json",{cwd:t?.cwd??Jt(),type:"file"});if(!r){if(t?.throwError)throw new cr("No such file or directory found.");return}const n=_(Te(r),"node_modules"),i=_(n,".cache"),c=_(i,e);if(!(!V(c,ae)&&V(c))&&!(!V(i,ae)&&V(i))&&!(!V(n,ae)&&V(n)))return Re(c,t)},"findCacheDirectorySync"),ur=gs;var hs=Object.defineProperty,ms=h((e,t)=>hs(e,"name",{value:t,configurable:!0}),"r$3");const _t=ms(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"r");var ys=Object.defineProperty,lr=h((e,t)=>ys(e,"name",{value:t,configurable:!0}),"s$5");const bs=ke(import.meta.url),we=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vs=lr(e=>{if(typeof we<"u"&&we.versions&&we.versions.node){const[t,r]=we.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return we.getBuiltinModule(e)}return bs(e)},"u"),{lstatSync:Rt,mkdirSync:$s}=vs("node:fs"),De=lr(e=>{Ut(e);try{const t=Rt(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(_t(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{$s(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=Rt(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(_t(r))}'`,{cause:t})}},"g");var ws=Object.defineProperty,fr=h((e,t)=>ws(e,"name",{value:t,configurable:!0}),"x$1"),xs=Object.defineProperty,it=fr((e,t)=>xs(e,"name",{value:t,configurable:!0}),"$"),js=Object.defineProperty,ks=it((e,t)=>js(e,"name",{value:t,configurable:!0}),"r$1");const Os=ks(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
2
|
-
`),"normalizeLF"),
|
|
3
|
-
`);typeof
|
|
4
|
-
`,
|
|
5
|
-
`);return
|
|
6
|
-
${
|
|
1
|
+
var po=Object.defineProperty;var v=(e,t)=>po(e,"name",{value:t,configurable:!0});import{createRequire as go}from"node:module";import{n as wn,B as vo,U as jn,l as X,_ as Qr,K as rt,s as $o,M as V,a as On}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{createJiti as kn}from"jiti";import"../packem_shared/otelPlugin-CJR2T_lk.js";import"../packem_shared/definePlugin-CWm4Dv_t.js";const ho=go(import.meta.url),Ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ir=v(e=>{if(typeof Ue<"u"&&Ue.versions&&Ue.versions.node){const[t,n]=Ue.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ue.getBuiltinModule(e)}return ho(e)},"__cjs_getBuiltinModule"),{createHash:$n}=Ir("node:crypto"),{readdirSync:xn,readFileSync:mo,copyFileSync:yo,unlinkSync:bo}=Ir("node:fs"),{createRequire:tt}=Ir("node:module");var xo=Object.defineProperty,Q=v((e,t)=>xo(e,"name",{value:t,configurable:!0}),"W$2"),wo=Object.defineProperty,A=Q((e,t)=>wo(e,"name",{value:t,configurable:!0}),"y");const jo=tt(import.meta.url),ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Oo=A(e=>{if(typeof ye<"u"&&ye.versions&&ye.versions.node){const[t,n]=ye.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return ye.getBuiltinModule(e)}return jo(e)},"__cjs_getBuiltinModule"),{env:be,cwd:En}=ye,{createRequire:xe}=Oo("node:module"),Pn=0,ve=2,An=Symbol("findUpStop");var ko=Object.defineProperty,Eo=A((e,t)=>ko(e,"name",{value:t,configurable:!0}),"t$4"),Po=Object.defineProperty,Ao=Eo((e,t)=>Po(e,"name",{value:t,configurable:!0}),"t"),To=Object.defineProperty,So=Ao((e,t)=>To(e,"name",{value:t,configurable:!0}),"n");const Fr=So(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var Co=Object.defineProperty,Mo=A((e,t)=>Co(e,"name",{value:t,configurable:!0}),"i$4"),zo=Object.defineProperty,No=Mo((e,t)=>zo(e,"name",{value:t,configurable:!0}),"r"),_o=Object.defineProperty,Bo=No((e,t)=>_o(e,"name",{value:t,configurable:!0}),"i");const Yr=Bo(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var Ro=Object.defineProperty,Do=A((e,t)=>Ro(e,"name",{value:t,configurable:!0}),"i$3"),Io=Object.defineProperty,Tn=Do((e,t)=>Io(e,"name",{value:t,configurable:!0}),"s");const Fo=xe(import.meta.url),qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wo=Tn(e=>{if(typeof qe<"u"&&qe.versions&&qe.versions.node){const[t,n]=qe.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return qe.getBuiltinModule(e)}return Fo(e)},"__cjs_getBuiltinModule"),{lstatSync:en,mkdirSync:Lo}=Wo("node:fs");var Vo=Object.defineProperty,Uo=Tn((e,t)=>Vo(e,"name",{value:t,configurable:!0}),"o");const qo=Uo(e=>{Fr(e);try{const t=en(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Yr(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{Lo(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const n=en(e);if(!n.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Yr(n))}'`,{cause:t})}},"ensureDirSync");var Go=Object.defineProperty,Zo=A((e,t)=>Go(e,"name",{value:t,configurable:!0}),"$e$1"),Ho=Object.defineProperty,Wr=Zo((e,t)=>Ho(e,"name",{value:t,configurable:!0}),"W"),Ko=Object.defineProperty,y=Wr((e,t)=>Ko(e,"name",{value:t,configurable:!0}),"u$1");let tn=y(()=>{var e=(()=>{var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,l=y((r,o)=>{for(var i in o)t(r,i,{get:o[i],enumerable:!0})},"ne"),g=y((r,o,i,c)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of s(o))!u.call(r,a)&&a!==i&&t(r,a,{get:y(()=>o[a],"get"),enumerable:!(c=n(o,a))||c.enumerable});return r},"ae"),h=y(r=>g(t({},"__esModule",{value:!0}),r),"oe"),x={};l(x,{zeptomatch:y(()=>Ve,"zeptomatch")});var O=y(r=>{const o=new Set,i=[r];for(let c=0;c<i.length;c++){const a=i[c];if(o.has(a))continue;o.add(a);const{children:f}=a;if(f?.length)for(let p=0,m=f.length;p<m;p++)i.push(f[p])}return Array.from(o)},"M"),j=y(r=>{let o="";const i=O(r);for(let c=0,a=i.length;c<a;c++){const f=i[c];if(!f.regex)continue;const p=f.regex.flags;if(o||(o=p),o!==p)throw new Error(`Inconsistent RegExp flags used: "${o}" and "${p}"`)}return o},"se"),$=y((r,o,i)=>{const c=i.get(r);if(c!==void 0)return c;const a=r.partial??o;let f="";if(r.regex&&(f+=a?"(?:$|":"",f+=r.regex.source),r.children?.length){const p=P(r.children.map(m=>$(m,o,i)).filter(Boolean));if(p?.length){const m=r.children.some(Z=>!Z.regex||!(Z.partial??o)),k=p.length>1||a&&(!f.length||m);f+=k?a?"(?:$|":"(?:":"",f+=p.join("|"),f+=k?")":""}}return r.regex&&(f+=a?")":""),i.set(r,f),f},"O"),M=y((r,o)=>{const i=new Map,c=O(r);for(let a=c.length-1;a>=0;a--){const f=$(c[a],o,i);if(!(a>0))return f}return""},"ie"),P=y(r=>Array.from(new Set(r)),"ue"),E=y((r,o,i)=>E.compile(r,i).test(o),"R");E.compile=(r,o)=>{const i=o?.partial??!1,c=M(r,i),a=j(r);return new RegExp(`^(?:${c})$`,a)};var U=E,q=y((r,o)=>{const i=U.compile(r,o),c=`${i.source.slice(0,-1)}[\\\\/]?$`,a=i.flags;return new RegExp(c,a)},"le"),se=q,je=y(r=>{const o=r.map(c=>c.source).join("|")||"$^",i=r[0]?.flags;return new RegExp(o,i)},"ve"),Oe=je,te=y(r=>Array.isArray(r),"j"),B=y(r=>typeof r=="function","_"),ke=y(r=>r.length===0,"he"),Ee=(()=>{const{toString:r}=Function.prototype,o=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return i=>(i.length===0||i.length===1)&&o.test(r.call(i))})(),ht=y(r=>typeof r=="number","de"),mt=y(r=>typeof r=="object"&&r!==null,"xe"),yt=y(r=>r instanceof RegExp,"me"),bt=(()=>{const r=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return o=>r.test(o.source)})(),vt=(()=>{const r=/^[a-zA-Z0-9_-]+$/;return o=>r.test(o.source)&&!o.flags.includes("i")})(),Pe=y(r=>typeof r=="string","A"),z=y(r=>r===void 0,"f"),$t=y(r=>{const o=new Map;return i=>{const c=o.get(i);if(c!==void 0)return c;const a=r(i);return o.set(i,a),a}},"ye"),Ae=y((r,o,i={})=>{const c={cache:{},input:r,index:0,indexBacktrackMax:0,options:i,output:[]},a=N(o)(c),f=Math.max(c.index,c.indexBacktrackMax);if(a&&c.index===r.length)return c.output;throw new Error(`Failed to parse at index ${f}`)},"I"),d=y((r,o)=>te(r)?xt(r,o):Pe(r)?Te(r,o):wt(r,o),"i"),xt=y((r,o)=>{const i={};for(const c of r){if(c.length!==1)throw new Error(`Invalid character: "${c}"`);const a=c.charCodeAt(0);i[a]=!0}return c=>{const a=c.input;let f=c.index,p=f;for(;p<a.length&&a.charCodeAt(p)in i;)p+=1;if(p>f){if(!z(o)&&!c.options.silent){const m=a.slice(f,p),k=B(o)?o(m,a,`${f}`):o;z(k)||c.output.push(k)}c.index=p}return!0}},"we"),wt=y((r,o)=>{if(vt(r))return Te(r.source,o);{const i=r.source,c=r.flags.replace(/y|$/,"y"),a=new RegExp(i,c);return bt(r)&&B(o)&&!Ee(o)?jt(a,o):Ot(a,o)}},"$e"),jt=y((r,o)=>i=>{const c=i.index,a=i.input;r.lastIndex=c;const f=r.exec(a);if(f){const p=r.lastIndex;if(!i.options.silent){const m=o(...f,a,`${c}`);z(m)||i.output.push(m)}return i.index=p,!0}else return!1},"Ee"),Ot=y((r,o)=>i=>{const c=i.index,a=i.input;if(r.lastIndex=c,r.test(a)){const f=r.lastIndex;if(!z(o)&&!i.options.silent){const p=B(o)?o(a.slice(c,f),a,`${c}`):o;z(p)||i.output.push(p)}return i.index=f,!0}else return!1},"Ce"),Te=y((r,o)=>i=>{const c=i.index,a=i.input;if(a.startsWith(r,c)){if(!z(o)&&!i.options.silent){const f=B(o)?o(r,a,`${c}`):o;z(f)||i.output.push(f)}return i.index+=r.length,!0}else return!1},"F"),ce=y((r,o,i,c)=>{const a=N(r),f=o>1;return le(ue(Ce(p=>{let m=0;for(;m<i;){const k=p.index;if(!a(p)||(m+=1,p.index===k))break}return m>=o},f),c))},"k"),Se=y((r,o)=>ce(r,0,1,o),"L"),re=y((r,o)=>ce(r,0,1/0,o),"$"),kt=y((r,o)=>ce(r,1,1/0,o),"Re"),F=y((r,o)=>{const i=r.map(N);return le(ue(Ce(c=>{for(let a=0,f=i.length;a<f;a++)if(!i[a](c))return!1;return!0}),o))},"x"),S=y((r,o)=>{const i=r.map(N);return le(ue(c=>{for(let a=0,f=i.length;a<f;a++)if(i[a](c))return!0;return!1},o))},"p"),Ce=y((r,o=!0,i=!1)=>{const c=N(r);return o?a=>{const f=a.index,p=a.output.length,m=c(a);return!m&&!i&&(a.indexBacktrackMax=Math.max(a.indexBacktrackMax,a.index)),(!m||i)&&(a.index=f,a.output.length!==p&&(a.output.length=p)),m}:c},"q"),ue=y((r,o)=>{const i=N(r);return o?c=>{if(c.options.silent)return i(c);const a=c.output.length;if(i(c)){const f=c.output.splice(a,1/0),p=o(f);return z(p)||c.output.push(p),!0}else return!1}:i},"B"),le=(()=>{let r=0;return o=>{const i=N(o),c=r+=1;return a=>{var f;if(a.options.memoization===!1)return i(a);const p=a.index,m=(f=a.cache)[c]||(f[c]={indexMax:-1,queue:[]}),k=m.queue;if(p<=m.indexMax){const H=m.store||(m.store=new Map);if(k.length){for(let L=0,Tr=k.length;L<Tr;L+=2){const Sr=k[L*2],Cr=k[L*2+1];H.set(Sr,Cr)}k.length=0}const C=H.get(p);if(C===!1)return!1;if(ht(C))return a.index=C,!0;if(C)return a.index=C.index,C.output?.length&&a.output.push(...C.output),!0}const Z=a.output.length,Ar=i(a);if(m.indexMax=Math.max(m.indexMax,p),Ar){const H=a.index,C=a.output.length;if(C>Z){const L=a.output.slice(Z,C);k.push(p,{index:H,output:L})}else k.push(p,H);return!0}else return k.push(p,!1),!1}}})(),Me=y(r=>{let o;return i=>(o||(o=N(r())),o(i))},"G"),N=$t(r=>{if(B(r))return ke(r)?Me(r):r;if(Pe(r)||yt(r))return d(r);if(te(r))return F(r);if(mt(r))return S(Object.values(r));throw new Error("Invalid rule")}),R=y(r=>r,"d"),Et=y(r=>typeof r=="string","ke"),Pt=y(r=>{const o=new WeakMap,i=new WeakMap;return(c,a)=>{const f=a?.partial?i:o,p=f.get(c);if(p!==void 0)return p;const m=r(c,a);return f.set(c,m),m}},"Be"),At=y(r=>{const o={},i={};return(c,a)=>{const f=a?.partial?i:o;return f[c]??(f[c]=r(c,a))}},"Pe"),Tt=d(/\\./,R),St=d(/./,R),Ct=d(/\*\*\*+/,"*"),Mt=d(/([^/{[(!])\*\*/,(r,o)=>`${o}*`),zt=d(/(^|.)\*\*(?=[^*/)\]}])/,(r,o)=>`${o}*`),Nt=re(S([Tt,Ct,Mt,zt,St])),_t=Nt,Bt=y(r=>Ae(r,_t,{memoization:!1}).join(""),"Ie"),Rt=Bt,ze="abcdefghijklmnopqrstuvwxyz",Dt=y(r=>{let o="";for(;r>0;){const i=(r-1)%26;o=ze[i]+o,r=Math.floor((r-1)/26)}return o},"Le"),Ne=y(r=>{let o=0;for(let i=0,c=r.length;i<c;i++)o=o*26+ze.indexOf(r[i])+1;return o},"V"),fe=y((r,o)=>{if(o<r)return fe(o,r);const i=[];for(;r<=o;)i.push(r++);return i},"b"),It=y((r,o,i)=>fe(r,o).map(c=>String(c).padStart(i,"0")),"qe"),_e=y((r,o)=>fe(Ne(r),Ne(o)).map(Dt),"W"),w=y(r=>({partial:!1,regex:new RegExp(r,"s"),children:[]}),"c"),G=y(r=>({children:r}),"y"),W=(()=>{const r=y((o,i,c)=>{if(c.has(o))return;c.add(o);const{children:a}=o;if(!a.length)a.push(i);else for(let f=0,p=a.length;f<p;f++)r(a[f],i,c)},"e");return o=>{if(!o.length)return G([]);for(let i=o.length-1;i>=1;i--){const c=new Set,a=o[i-1],f=o[i];r(a,f,c)}return o[0]}})(),_=y(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),Ft=d(/\\./,w),Wt=d(/[$.*+?^(){}[\]\|]/,r=>w(`\\${r}`)),Lt=d(/[\\\/]/,_),Vt=d(/[^$.*+?^(){}[\]\|\\\/]+/,w),Ut=d(/^(?:!!)*!(.*)$/,(r,o)=>w(`(?!^${Ve.compile(o).source}$).*?`)),qt=d(/^(!!)+/),Gt=S([Ut,qt]),Zt=d(/\/(\*\*\/)+/,()=>G([W([_(),w(".+?"),_()]),_()])),Ht=d(/^(\*\*\/)+/,()=>G([w("^"),W([w(".*?"),_()])])),Kt=d(/\/(\*\*)$/,()=>G([W([_(),w(".*?")]),w("$")])),Jt=d(/\*\*/,()=>w(".*?")),Be=S([Zt,Ht,Kt,Jt]),Xt=d(/\*\/(?!\*\*\/|\*$)/,()=>W([w("[^\\\\/]*?"),_()])),Qt=d(/\*/,()=>w("[^\\\\/]*")),Re=S([Xt,Qt]),De=d("?",()=>w("[^\\\\/]")),Yt=d("[",R),er=d("]",R),tr=d(/[!^]/,"^\\\\/"),rr=d(/[a-z]-[a-z]|[0-9]-[0-9]/i,R),nr=d(/\\./,R),or=d(/[$.*+?^(){}[\|]/,r=>`\\${r}`),sr=d(/[\\\/]/,"\\\\/"),ir=d(/[^$.*+?^(){}[\]\|\\\/]+/,R),ar=S([nr,or,sr,rr,ir]),Ie=F([Yt,Se(tr),re(ar),er],r=>w(r.join(""))),cr=d("{","(?:"),ur=d("}",")"),lr=d(/(\d+)\.\.(\d+)/,(r,o,i)=>It(+o,+i,Math.min(o.length,i.length)).join("|")),fr=d(/([a-z]+)\.\.([a-z]+)/,(r,o,i)=>_e(o,i).join("|")),pr=d(/([A-Z]+)\.\.([A-Z]+)/,(r,o,i)=>_e(o.toLowerCase(),i.toLowerCase()).join("|").toUpperCase()),dr=S([lr,fr,pr]),Fe=F([cr,dr,ur],r=>w(r.join(""))),gr=d("{"),hr=d("}"),mr=d(","),yr=d(/\\./,w),br=d(/[$.*+?^(){[\]\|]/,r=>w(`\\${r}`)),vr=d(/[\\\/]/,_),$r=d(/[^$.*+?^(){}[\]\|\\\/,]+/,w),xr=Me(()=>Le),wr=d("",()=>w("(?:)")),jr=kt(S([Be,Re,De,Ie,Fe,xr,yr,br,vr,$r]),W),We=S([jr,wr]),Le=F([gr,Se(F([We,re(F([mr,We]))])),hr],G),Or=re(S([Gt,Be,Re,De,Ie,Fe,Le,Ft,Wt,Lt,Vt]),W),kr=Or,Er=y(r=>Ae(r,kr,{memoization:!1})[0],"kr"),Pr=Er,pe=y((r,o,i)=>pe.compile(r,i).test(o),"N");pe.compile=(()=>{const r=At((i,c)=>se(Pr(Rt(i)),c)),o=Pt((i,c)=>Oe(i.map(a=>r(a,c))));return(i,c)=>Et(i)?r(i,c):o(i,c)})();var Ve=pe;return h(x)})();return e.default||e},"_lazyMatch"),Mr;const Jo=y((e,t)=>(Mr||(Mr=tn(),tn=null),Mr(e,t)),"default");var Xo=Object.defineProperty,Qo=Wr((e,t)=>Xo(e,"name",{value:t,configurable:!0}),"t$1");const Yo=/^[A-Z]:\//i,Y=Qo((e="")=>e&&e.replaceAll("\\","/").replace(Yo,t=>t.toUpperCase()),"normalizeWindowsPath");var es=Object.defineProperty,D=Wr((e,t)=>es(e,"name",{value:t,configurable:!0}),"r");const ts=/^[/\\]{2}/,rs=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Sn=/^[A-Z]:$/i,rn=/^\/([A-Z]:)?$/i,ns=/.(\.[^./]+)$/,os=/^[/\\]|^[a-z]:[/\\]/i,ss=/\/$/,is=D(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Cn=D((e,t)=>{let n="",s=0,u=-1,l=0,g;for(let h=0;h<=e.length;++h){if(h<e.length)g=e[h];else{if(g==="/")break;g="/"}if(g==="/"){if(!(u===h-1||l===1))if(l===2){if(n.length<2||s!==2||!n.endsWith(".")||n.at(-2)!=="."){if(n.length>2){const x=n.lastIndexOf("/");x===-1?(n="",s=0):(n=n.slice(0,x),s=n.length-1-n.lastIndexOf("/")),u=h,l=0;continue}else if(n.length>0){n="",s=0,u=h,l=0;continue}}t&&(n+=n.length>0?"/..":"..",s=2)}else n.length>0?n+=`/${e.slice(u+1,h)}`:n=e.slice(u+1,h),s=h-u-1;u=h,l=0}else g==="."&&l!==-1?++l:l=-1}return n},"normalizeString"),de=D(e=>rs.test(e),"isAbsolute"),Mn=D(function(e){if(e.length===0)return".";e=Y(e);const t=ts.exec(e),n=de(e),s=e.at(-1)==="/";return e=Cn(e,!n),e.length===0?n?"/":s?"./":".":(s&&(e+="/"),Sn.test(e)&&(e+="/"),t?n?`//${e}`:`//./${e}`:n&&!de(e)?`/${e}`:e)},"normalize"),zn=D((...e)=>{let t="";for(const n of e)if(n)if(t.length>0){const s=t.at(-1)==="/",u=n[0]==="/";s&&u?t+=n.slice(1):t+=s||u?n:`/${n}`}else t+=n;return Mn(t)},"join"),ne=D(function(...e){e=e.map(s=>Y(s));let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const u=s>=0?e[s]:is();!u||u.length===0||(t=`${u}/${t}`,n=de(u))}return t=Cn(t,!n),n&&!de(t)?`/${t}`:t.length>0?t:"."},"resolve");D(function(e){return Y(e)},"toNamespacedPath");const Nn=D(function(e){return ns.exec(Y(e))?.[1]??""},"extname");D(function(e,t){const n=ne(e).replace(rn,"$1").split("/"),s=ne(t).replace(rn,"$1").split("/");if(s[0][1]===":"&&n[0][1]===":"&&n[0]!==s[0])return s.join("/");const u=[...n];for(const l of u){if(s[0]!==l)break;n.shift(),s.shift()}return[...n.map(()=>".."),...s].join("/")},"relative");const Lr=D(e=>{const t=Y(e).replace(ss,"").split("/").slice(0,-1);return t.length===1&&Sn.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(de(e)?"/":".")},"dirname");D(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return Y(e.root?ne(...t):t.join("/"))},"format");const as=D((e,t)=>{const n=Y(e).split("/").pop();return t&&n.endsWith(t)?n.slice(0,-t.length):n},"basename"),_n=D(function(e){const t=os.exec(e)?.[0]?.replaceAll("\\","/")??"",n=as(e),s=Nn(n);return{base:n,dir:Lr(e),ext:s,name:n.slice(0,n.length-s.length),root:t}},"parse");D((e,t)=>Jo(t,Mn(e)),"matchesGlob");var cs=Object.defineProperty,ge=A((e,t)=>cs(e,"name",{value:t,configurable:!0}),"n$2"),us=Object.defineProperty,oe=ge((e,t)=>us(e,"name",{value:t,configurable:!0}),"a");const ls=xe(import.meta.url),Ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,fs=oe(e=>{if(typeof Ge<"u"&&Ge.versions&&Ge.versions.node){const[t,n]=Ge.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ge.getBuiltinModule(e)}return ls(e)},"__cjs_getBuiltinModule"),{fileURLToPath:ps}=fs("node:url");var ds=Object.defineProperty,$e=oe((e,t)=>ds(e,"name",{value:t,configurable:!0}),"t$1");function we(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}v(we,"Ie");Q(we,"De");A(we,"m$5");ge(we,"d");oe(we,"getDefaultExportFromCjs");$e(we,"getDefaultExportFromCjs");function nt(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}v(nt,"Fe");Q(nt,"mr");A(nt,"h$2");ge(nt,"O");oe(nt,"getDefaultExportFromNamespaceIfPresent");$e(nt,"getDefaultExportFromNamespaceIfPresent");function ot(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}v(ot,"Le");Q(ot,"$r");A(ot,"x");ge(ot,"P");oe(ot,"getDefaultExportFromNamespaceIfNotNamed");$e(ot,"getDefaultExportFromNamespaceIfNotNamed");function st(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=$e(oe(ge(A(Q(v(function s(){var u=!1;try{u=this instanceof s}catch{}return u?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)},"l"),"l"),"a"),"s"),"a"),"a");n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var u=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,u.get?u:{enumerable:!0,get:$e(function(){return e[s]},"get")})}),n}v(st,"Ze");Q(st,"br");A(st,"y$4");ge(st,"_");oe(st,"getAugmentedNamespace");$e(st,"getAugmentedNamespace");var nn,on;function it(){return on||(on=1,nn=["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"]),nn}v(it,"qe");Q(it,"xr");A(it,"w$1");ge(it,"k");oe(it,"requireBinaryExtensions");var gs=it();const hs=we(gs);var ms=Object.defineProperty,ee=oe((e,t)=>ms(e,"name",{value:t,configurable:!0}),"r");const ys=new Set(hs),bs=new Set(["/","\\",void 0]),sn=Symbol.for("pathe:normalizedAlias"),vs=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,$s=ee((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),lt=ee((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),Bn=ee(e=>{if(e[sn])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([n],[s])=>$s(n,s)));for(const n in t)for(const s in t)s===n||n.startsWith(s)||t[n].startsWith(s)&&bs.has(t[n][s.length])&&(t[n]=t[s]+t[n].slice(s.length));return Object.defineProperty(t,sn,{enumerable:!1,value:!0}),t},"normalizeAliases");ee((e,t)=>{e=Y(e),t=Bn(t);for(const[n,s]of Object.entries(t)){if(!e.startsWith(n))continue;const u=lt(n)?n.slice(0,-1):n;if(lt(e[u.length]))return zn(s,e.slice(n.length))}return e},"resolveAlias");ee(e=>vs.exec(e)?.[2],"filename");ee((e,t)=>{e=Y(e),t=Bn(t);for(const[n,s]of Object.entries(t).toReversed()){if(!e.startsWith(s))continue;const u=lt(s)?s.slice(0,-1):s;if(lt(e[u.length]))return zn(n,e.slice(s.length))}return e},"reverseResolveAlias");const xs=/^(?:\.?\.[/\\]|\.\.\B)/,ws=/^(?:msys|cygwin)$/;ee(e=>xs.test(e)||e==="..","isRelative");ee(e=>ys.has(Nn(e).slice(1).toLowerCase()),"isBinaryPath");const ae=ee(e=>Y(e instanceof URL?ps(e):e),"toPath");ee(()=>{if(!globalThis.process)return!1;if(globalThis.process.platform==="win32"||globalThis.process.platform==="cygwin")return!0;const e=globalThis.process.env.OSTYPE;return typeof e!="string"?!1:ws.test(e)},"isWindows");var js=Object.defineProperty,Os=A((e,t)=>js(e,"name",{value:t,configurable:!0}),"y$3"),ks=Object.defineProperty,Rn=Os((e,t)=>ks(e,"name",{value:t,configurable:!0}),"a");const Es=xe(import.meta.url),Ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ps=Rn(e=>{if(typeof Ze<"u"&&Ze.versions&&Ze.versions.node){const[t,n]=Ze.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ze.getBuiltinModule(e)}return Es(e)},"__cjs_getBuiltinModule"),{stat:As,lstat:Ts}=Ps("node:fs/promises");var Ss=Object.defineProperty,an=Rn((e,t)=>Ss(e,"name",{value:t,configurable:!0}),"s");const Cs=an(async(e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const n=t.cwd?ae(t.cwd):process.cwd();let s=ne(n);const{root:u}=_n(s),l=ae(t.stopAt??u),g=ne(s,l),h=t.type??"file",x=an(async function(j){return typeof e=="function"?[await e(j)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const O=t.allowSymlinks?As:Ts;for(;s&&s!==g&&s!==u;){const j=await x(s);for(let $ of j){if($===An)return;if($===void 0)continue;Buffer.isBuffer($)?$=$.toString():$ instanceof URL&&($=ae($));const M=de($)?$:ne(s,$);try{const P=await O(M);if(h==="file"&&P.isFile()||h==="directory"&&P.isDirectory())return M}catch{}}s=Lr(s)}},"findUp");var Ms=Object.defineProperty,zs=A((e,t)=>Ms(e,"name",{value:t,configurable:!0}),"p"),Ns=Object.defineProperty,Dn=zs((e,t)=>Ns(e,"name",{value:t,configurable:!0}),"i");const _s=xe(import.meta.url),He=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Bs=Dn(e=>{if(typeof He<"u"&&He.versions&&He.versions.node){const[t,n]=He.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return He.getBuiltinModule(e)}return _s(e)},"__cjs_getBuiltinModule"),{statSync:Rs,lstatSync:Ds}=Bs("node:fs");var Is=Object.defineProperty,cn=Dn((e,t)=>Is(e,"name",{value:t,configurable:!0}),"o");const Fs=cn((e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const n=t.cwd?ae(t.cwd):process.cwd();let s=ne(n);const{root:u}=_n(s),l=ae(t.stopAt??u),g=ne(s,l),h=t.type??"file",x=cn(function(j){return typeof e=="function"?[e(j)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const O=t.allowSymlinks?Rs:Ds;for(;s&&s!==g&&s!==u;){for(let j of x(s)){if(j===An)return;if(j===void 0)continue;Buffer.isBuffer(j)?j=j.toString():j instanceof URL&&(j=ae(j));const $=de(j)?j:ne(s,j);try{const M=O($);if(h==="file"&&M.isFile()||h==="directory"&&M.isDirectory())return $}catch{}}s=Lr(s)}},"findUpSync");var Ws=Object.defineProperty,In=A((e,t)=>Ws(e,"name",{value:t,configurable:!0}),"t$2"),Ls=Object.defineProperty,Vr=In((e,t)=>Ls(e,"name",{value:t,configurable:!0}),"s");const Vs=xe(import.meta.url),Ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Us=Vr(e=>{if(typeof Ke<"u"&&Ke.versions&&Ke.versions.node){const[t,n]=Ke.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ke.getBuiltinModule(e)}return Vs(e)},"__cjs_getBuiltinModule"),{access:qs}=Us("node:fs/promises");var Gs=Object.defineProperty,Zs=Vr((e,t)=>Gs(e,"name",{value:t,configurable:!0}),"o");async function K(e,t=Pn){Fr(e),e=ae(e);try{return await qs(e,t),!0}catch{return!1}}v(K,"F$3");Q(K,"Z");A(K,"i$1");In(K,"d");Vr(K,"m");Zs(K,"isAccessible");var Hs=Object.defineProperty,Fn=A((e,t)=>Hs(e,"name",{value:t,configurable:!0}),"t$1"),Ks=Object.defineProperty,Ur=Fn((e,t)=>Ks(e,"name",{value:t,configurable:!0}),"t");const Js=xe(import.meta.url),Je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xs=Ur(e=>{if(typeof Je<"u"&&Je.versions&&Je.versions.node){const[t,n]=Je.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Je.getBuiltinModule(e)}return Js(e)},"__cjs_getBuiltinModule"),{accessSync:Qs}=Xs("node:fs");var Ys=Object.defineProperty,ei=Ur((e,t)=>Ys(e,"name",{value:t,configurable:!0}),"o");function J(e,t=Pn){Fr(e),e=ae(e);try{return Qs(e,t),!0}catch{return!1}}v(J,"L");Q(J,"H");A(J,"i");Fn(J,"d");Ur(J,"m");ei(J,"isAccessibleSync");var ti=Object.defineProperty,Wn=A((e,t)=>ti(e,"name",{value:t,configurable:!0}),"o"),ri=Object.defineProperty,Ln=Wn((e,t)=>ri(e,"name",{value:t,configurable:!0}),"o"),ni=Object.defineProperty,oi=Ln((e,t)=>ni(e,"name",{value:t,configurable:!0}),"o");let Vn=class extends Error{static{v(this,"tr")}static{Q(this,"Qr")}static{A(this,"s")}static{Wn(this,"u")}static{Ln(this,"n")}static{oi(this,"NotFoundError")}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")}};var si=Object.defineProperty,ii=A((e,t)=>si(e,"name",{value:t,configurable:!0}),"$e"),ai=Object.defineProperty,qr=ii((e,t)=>ai(e,"name",{value:t,configurable:!0}),"W"),ci=Object.defineProperty,b=qr((e,t)=>ci(e,"name",{value:t,configurable:!0}),"u$1");let un=b(()=>{var e=(()=>{var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,l=b((r,o)=>{for(var i in o)t(r,i,{get:o[i],enumerable:!0})},"ne"),g=b((r,o,i,c)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of s(o))!u.call(r,a)&&a!==i&&t(r,a,{get:b(()=>o[a],"get"),enumerable:!(c=n(o,a))||c.enumerable});return r},"ae"),h=b(r=>g(t({},"__esModule",{value:!0}),r),"oe"),x={};l(x,{zeptomatch:b(()=>Ve,"zeptomatch")});var O=b(r=>{const o=new Set,i=[r];for(let c=0;c<i.length;c++){const a=i[c];if(o.has(a))continue;o.add(a);const{children:f}=a;if(f?.length)for(let p=0,m=f.length;p<m;p++)i.push(f[p])}return Array.from(o)},"M"),j=b(r=>{let o="";const i=O(r);for(let c=0,a=i.length;c<a;c++){const f=i[c];if(!f.regex)continue;const p=f.regex.flags;if(o||(o=p),o!==p)throw new Error(`Inconsistent RegExp flags used: "${o}" and "${p}"`)}return o},"se"),$=b((r,o,i)=>{const c=i.get(r);if(c!==void 0)return c;const a=r.partial??o;let f="";if(r.regex&&(f+=a?"(?:$|":"",f+=r.regex.source),r.children?.length){const p=P(r.children.map(m=>$(m,o,i)).filter(Boolean));if(p?.length){const m=r.children.some(Z=>!Z.regex||!(Z.partial??o)),k=p.length>1||a&&(!f.length||m);f+=k?a?"(?:$|":"(?:":"",f+=p.join("|"),f+=k?")":""}}return r.regex&&(f+=a?")":""),i.set(r,f),f},"O"),M=b((r,o)=>{const i=new Map,c=O(r);for(let a=c.length-1;a>=0;a--){const f=$(c[a],o,i);if(!(a>0))return f}return""},"ie"),P=b(r=>Array.from(new Set(r)),"ue"),E=b((r,o,i)=>E.compile(r,i).test(o),"R");E.compile=(r,o)=>{const i=o?.partial??!1,c=M(r,i),a=j(r);return new RegExp(`^(?:${c})$`,a)};var U=E,q=b((r,o)=>{const i=U.compile(r,o),c=`${i.source.slice(0,-1)}[\\\\/]?$`,a=i.flags;return new RegExp(c,a)},"le"),se=q,je=b(r=>{const o=r.map(c=>c.source).join("|")||"$^",i=r[0]?.flags;return new RegExp(o,i)},"ve"),Oe=je,te=b(r=>Array.isArray(r),"j"),B=b(r=>typeof r=="function","_"),ke=b(r=>r.length===0,"he"),Ee=(()=>{const{toString:r}=Function.prototype,o=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return i=>(i.length===0||i.length===1)&&o.test(r.call(i))})(),ht=b(r=>typeof r=="number","de"),mt=b(r=>typeof r=="object"&&r!==null,"xe"),yt=b(r=>r instanceof RegExp,"me"),bt=(()=>{const r=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return o=>r.test(o.source)})(),vt=(()=>{const r=/^[a-zA-Z0-9_-]+$/;return o=>r.test(o.source)&&!o.flags.includes("i")})(),Pe=b(r=>typeof r=="string","A"),z=b(r=>r===void 0,"f"),$t=b(r=>{const o=new Map;return i=>{const c=o.get(i);if(c!==void 0)return c;const a=r(i);return o.set(i,a),a}},"ye"),Ae=b((r,o,i={})=>{const c={cache:{},input:r,index:0,indexBacktrackMax:0,options:i,output:[]},a=N(o)(c),f=Math.max(c.index,c.indexBacktrackMax);if(a&&c.index===r.length)return c.output;throw new Error(`Failed to parse at index ${f}`)},"I"),d=b((r,o)=>te(r)?xt(r,o):Pe(r)?Te(r,o):wt(r,o),"i"),xt=b((r,o)=>{const i={};for(const c of r){if(c.length!==1)throw new Error(`Invalid character: "${c}"`);const a=c.charCodeAt(0);i[a]=!0}return c=>{const a=c.input;let f=c.index,p=f;for(;p<a.length&&a.charCodeAt(p)in i;)p+=1;if(p>f){if(!z(o)&&!c.options.silent){const m=a.slice(f,p),k=B(o)?o(m,a,`${f}`):o;z(k)||c.output.push(k)}c.index=p}return!0}},"we"),wt=b((r,o)=>{if(vt(r))return Te(r.source,o);{const i=r.source,c=r.flags.replace(/y|$/,"y"),a=new RegExp(i,c);return bt(r)&&B(o)&&!Ee(o)?jt(a,o):Ot(a,o)}},"$e"),jt=b((r,o)=>i=>{const c=i.index,a=i.input;r.lastIndex=c;const f=r.exec(a);if(f){const p=r.lastIndex;if(!i.options.silent){const m=o(...f,a,`${c}`);z(m)||i.output.push(m)}return i.index=p,!0}else return!1},"Ee"),Ot=b((r,o)=>i=>{const c=i.index,a=i.input;if(r.lastIndex=c,r.test(a)){const f=r.lastIndex;if(!z(o)&&!i.options.silent){const p=B(o)?o(a.slice(c,f),a,`${c}`):o;z(p)||i.output.push(p)}return i.index=f,!0}else return!1},"Ce"),Te=b((r,o)=>i=>{const c=i.index,a=i.input;if(a.startsWith(r,c)){if(!z(o)&&!i.options.silent){const f=B(o)?o(r,a,`${c}`):o;z(f)||i.output.push(f)}return i.index+=r.length,!0}else return!1},"F"),ce=b((r,o,i,c)=>{const a=N(r),f=o>1;return le(ue(Ce(p=>{let m=0;for(;m<i;){const k=p.index;if(!a(p)||(m+=1,p.index===k))break}return m>=o},f),c))},"k"),Se=b((r,o)=>ce(r,0,1,o),"L"),re=b((r,o)=>ce(r,0,1/0,o),"$"),kt=b((r,o)=>ce(r,1,1/0,o),"Re"),F=b((r,o)=>{const i=r.map(N);return le(ue(Ce(c=>{for(let a=0,f=i.length;a<f;a++)if(!i[a](c))return!1;return!0}),o))},"x"),S=b((r,o)=>{const i=r.map(N);return le(ue(c=>{for(let a=0,f=i.length;a<f;a++)if(i[a](c))return!0;return!1},o))},"p"),Ce=b((r,o=!0,i=!1)=>{const c=N(r);return o?a=>{const f=a.index,p=a.output.length,m=c(a);return!m&&!i&&(a.indexBacktrackMax=Math.max(a.indexBacktrackMax,a.index)),(!m||i)&&(a.index=f,a.output.length!==p&&(a.output.length=p)),m}:c},"q"),ue=b((r,o)=>{const i=N(r);return o?c=>{if(c.options.silent)return i(c);const a=c.output.length;if(i(c)){const f=c.output.splice(a,1/0),p=o(f);return z(p)||c.output.push(p),!0}else return!1}:i},"B"),le=(()=>{let r=0;return o=>{const i=N(o),c=r+=1;return a=>{var f;if(a.options.memoization===!1)return i(a);const p=a.index,m=(f=a.cache)[c]||(f[c]={indexMax:-1,queue:[]}),k=m.queue;if(p<=m.indexMax){const H=m.store||(m.store=new Map);if(k.length){for(let L=0,Tr=k.length;L<Tr;L+=2){const Sr=k[L*2],Cr=k[L*2+1];H.set(Sr,Cr)}k.length=0}const C=H.get(p);if(C===!1)return!1;if(ht(C))return a.index=C,!0;if(C)return a.index=C.index,C.output?.length&&a.output.push(...C.output),!0}const Z=a.output.length,Ar=i(a);if(m.indexMax=Math.max(m.indexMax,p),Ar){const H=a.index,C=a.output.length;if(C>Z){const L=a.output.slice(Z,C);k.push(p,{index:H,output:L})}else k.push(p,H);return!0}else return k.push(p,!1),!1}}})(),Me=b(r=>{let o;return i=>(o||(o=N(r())),o(i))},"G"),N=$t(r=>{if(B(r))return ke(r)?Me(r):r;if(Pe(r)||yt(r))return d(r);if(te(r))return F(r);if(mt(r))return S(Object.values(r));throw new Error("Invalid rule")}),R=b(r=>r,"d"),Et=b(r=>typeof r=="string","ke"),Pt=b(r=>{const o=new WeakMap,i=new WeakMap;return(c,a)=>{const f=a?.partial?i:o,p=f.get(c);if(p!==void 0)return p;const m=r(c,a);return f.set(c,m),m}},"Be"),At=b(r=>{const o={},i={};return(c,a)=>{const f=a?.partial?i:o;return f[c]??(f[c]=r(c,a))}},"Pe"),Tt=d(/\\./,R),St=d(/./,R),Ct=d(/\*\*\*+/,"*"),Mt=d(/([^/{[(!])\*\*/,(r,o)=>`${o}*`),zt=d(/(^|.)\*\*(?=[^*/)\]}])/,(r,o)=>`${o}*`),Nt=re(S([Tt,Ct,Mt,zt,St])),_t=Nt,Bt=b(r=>Ae(r,_t,{memoization:!1}).join(""),"Ie"),Rt=Bt,ze="abcdefghijklmnopqrstuvwxyz",Dt=b(r=>{let o="";for(;r>0;){const i=(r-1)%26;o=ze[i]+o,r=Math.floor((r-1)/26)}return o},"Le"),Ne=b(r=>{let o=0;for(let i=0,c=r.length;i<c;i++)o=o*26+ze.indexOf(r[i])+1;return o},"V"),fe=b((r,o)=>{if(o<r)return fe(o,r);const i=[];for(;r<=o;)i.push(r++);return i},"b"),It=b((r,o,i)=>fe(r,o).map(c=>String(c).padStart(i,"0")),"qe"),_e=b((r,o)=>fe(Ne(r),Ne(o)).map(Dt),"W"),w=b(r=>({partial:!1,regex:new RegExp(r,"s"),children:[]}),"c"),G=b(r=>({children:r}),"y"),W=(()=>{const r=b((o,i,c)=>{if(c.has(o))return;c.add(o);const{children:a}=o;if(!a.length)a.push(i);else for(let f=0,p=a.length;f<p;f++)r(a[f],i,c)},"e");return o=>{if(!o.length)return G([]);for(let i=o.length-1;i>=1;i--){const c=new Set,a=o[i-1],f=o[i];r(a,f,c)}return o[0]}})(),_=b(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),Ft=d(/\\./,w),Wt=d(/[$.*+?^(){}[\]\|]/,r=>w(`\\${r}`)),Lt=d(/[\\\/]/,_),Vt=d(/[^$.*+?^(){}[\]\|\\\/]+/,w),Ut=d(/^(?:!!)*!(.*)$/,(r,o)=>w(`(?!^${Ve.compile(o).source}$).*?`)),qt=d(/^(!!)+/),Gt=S([Ut,qt]),Zt=d(/\/(\*\*\/)+/,()=>G([W([_(),w(".+?"),_()]),_()])),Ht=d(/^(\*\*\/)+/,()=>G([w("^"),W([w(".*?"),_()])])),Kt=d(/\/(\*\*)$/,()=>G([W([_(),w(".*?")]),w("$")])),Jt=d(/\*\*/,()=>w(".*?")),Be=S([Zt,Ht,Kt,Jt]),Xt=d(/\*\/(?!\*\*\/|\*$)/,()=>W([w("[^\\\\/]*?"),_()])),Qt=d(/\*/,()=>w("[^\\\\/]*")),Re=S([Xt,Qt]),De=d("?",()=>w("[^\\\\/]")),Yt=d("[",R),er=d("]",R),tr=d(/[!^]/,"^\\\\/"),rr=d(/[a-z]-[a-z]|[0-9]-[0-9]/i,R),nr=d(/\\./,R),or=d(/[$.*+?^(){}[\|]/,r=>`\\${r}`),sr=d(/[\\\/]/,"\\\\/"),ir=d(/[^$.*+?^(){}[\]\|\\\/]+/,R),ar=S([nr,or,sr,rr,ir]),Ie=F([Yt,Se(tr),re(ar),er],r=>w(r.join(""))),cr=d("{","(?:"),ur=d("}",")"),lr=d(/(\d+)\.\.(\d+)/,(r,o,i)=>It(+o,+i,Math.min(o.length,i.length)).join("|")),fr=d(/([a-z]+)\.\.([a-z]+)/,(r,o,i)=>_e(o,i).join("|")),pr=d(/([A-Z]+)\.\.([A-Z]+)/,(r,o,i)=>_e(o.toLowerCase(),i.toLowerCase()).join("|").toUpperCase()),dr=S([lr,fr,pr]),Fe=F([cr,dr,ur],r=>w(r.join(""))),gr=d("{"),hr=d("}"),mr=d(","),yr=d(/\\./,w),br=d(/[$.*+?^(){[\]\|]/,r=>w(`\\${r}`)),vr=d(/[\\\/]/,_),$r=d(/[^$.*+?^(){}[\]\|\\\/,]+/,w),xr=Me(()=>Le),wr=d("",()=>w("(?:)")),jr=kt(S([Be,Re,De,Ie,Fe,xr,yr,br,vr,$r]),W),We=S([jr,wr]),Le=F([gr,Se(F([We,re(F([mr,We]))])),hr],G),Or=re(S([Gt,Be,Re,De,Ie,Fe,Le,Ft,Wt,Lt,Vt]),W),kr=Or,Er=b(r=>Ae(r,kr,{memoization:!1})[0],"kr"),Pr=Er,pe=b((r,o,i)=>pe.compile(r,i).test(o),"N");pe.compile=(()=>{const r=At((i,c)=>se(Pr(Rt(i)),c)),o=Pt((i,c)=>Oe(i.map(a=>r(a,c))));return(i,c)=>Et(i)?r(i,c):o(i,c)})();var Ve=pe;return h(x)})();return e.default||e},"_lazyMatch"),zr;const ui=b((e,t)=>(zr||(zr=un(),un=null),zr(e,t)),"default");var li=Object.defineProperty,fi=qr((e,t)=>li(e,"name",{value:t,configurable:!0}),"t$1");const pi=/^[A-Z]:\//i,he=fi((e="")=>e&&e.replaceAll("\\","/").replace(pi,t=>t.toUpperCase()),"normalizeWindowsPath");var di=Object.defineProperty,I=qr((e,t)=>di(e,"name",{value:t,configurable:!0}),"r");const gi=/^[/\\]{2}/,hi=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Un=/^[A-Z]:$/i,ln=/^\/([A-Z]:)?$/i,mi=/.(\.[^./]+)$/,yi=/^[/\\]|^[a-z]:[/\\]/i,bi=/\/$/,vi=I(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),qn=I((e,t)=>{let n="",s=0,u=-1,l=0,g;for(let h=0;h<=e.length;++h){if(h<e.length)g=e[h];else{if(g==="/")break;g="/"}if(g==="/"){if(!(u===h-1||l===1))if(l===2){if(n.length<2||s!==2||!n.endsWith(".")||n.at(-2)!=="."){if(n.length>2){const x=n.lastIndexOf("/");x===-1?(n="",s=0):(n=n.slice(0,x),s=n.length-1-n.lastIndexOf("/")),u=h,l=0;continue}else if(n.length>0){n="",s=0,u=h,l=0;continue}}t&&(n+=n.length>0?"/..":"..",s=2)}else n.length>0?n+=`/${e.slice(u+1,h)}`:n=e.slice(u+1,h),s=h-u-1;u=h,l=0}else g==="."&&l!==-1?++l:l=-1}return n},"normalizeString"),et=I(e=>hi.test(e),"isAbsolute"),Gn=I(function(e){if(e.length===0)return".";e=he(e);const t=gi.exec(e),n=et(e),s=e.at(-1)==="/";return e=qn(e,!n),e.length===0?n?"/":s?"./":".":(s&&(e+="/"),Un.test(e)&&(e+="/"),t?n?`//${e}`:`//./${e}`:n&&!et(e)?`/${e}`:e)},"normalize"),ie=I((...e)=>{let t="";for(const n of e)if(n)if(t.length>0){const s=t.at(-1)==="/",u=n[0]==="/";s&&u?t+=n.slice(1):t+=s||u?n:`/${n}`}else t+=n;return Gn(t)},"join"),Br=I(function(...e){e=e.map(s=>he(s));let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const u=s>=0?e[s]:vi();!u||u.length===0||(t=`${u}/${t}`,n=et(u))}return t=qn(t,!n),n&&!et(t)?`/${t}`:t.length>0?t:"."},"resolve");I(function(e){return he(e)},"toNamespacedPath");const $i=I(function(e){return mi.exec(he(e))?.[1]??""},"extname");I(function(e,t){const n=Br(e).replace(ln,"$1").split("/"),s=Br(t).replace(ln,"$1").split("/");if(s[0][1]===":"&&n[0][1]===":"&&n[0]!==s[0])return s.join("/");const u=[...n];for(const l of u){if(s[0]!==l)break;n.shift(),s.shift()}return[...n.map(()=>".."),...s].join("/")},"relative");const Gr=I(e=>{const t=he(e).replace(bi,"").split("/").slice(0,-1);return t.length===1&&Un.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(et(e)?"/":".")},"dirname");I(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return he(e.root?Br(...t):t.join("/"))},"format");const xi=I((e,t)=>{const n=he(e).split("/").pop();return t&&n.endsWith(t)?n.slice(0,-t.length):n},"basename");I(function(e){const t=yi.exec(e)?.[0]?.replaceAll("\\","/")??"",n=xi(e),s=$i(n);return{base:n,dir:Gr(e),ext:s,name:n.slice(0,n.length-s.length),root:t}},"parse");I((e,t)=>ui(t,Gn(e)),"matchesGlob");var wi=Object.defineProperty,Zr=A((e,t)=>wi(e,"name",{value:t,configurable:!0}),"a");const ft=Zr((e,t)=>(t?.create&&qo(e),e),"useDirectory");Zr(async(e,t)=>{if(be.CACHE_DIR&&!["0","1","false","true"].includes(be.CACHE_DIR))return ft(ie(be.CACHE_DIR,e),t);const n=await Cs("package.json",{cwd:t?.cwd??En(),type:"file"});if(!n){if(t?.throwError)throw new Vn("No such file or directory found.");return}const s=ie(Gr(n),"node_modules"),u=ie(s,".cache"),l=ie(u,e);if(!(!await K(l,ve)&&await K(l))&&!(!await K(u,ve)&&await K(u))&&!(!await K(s,ve)&&await K(s)))return ft(l,t)},"findCacheDirectory");const ji=Zr((e,t)=>{if(be.CACHE_DIR&&!["0","1","false","true"].includes(be.CACHE_DIR))return ft(ie(be.CACHE_DIR,e),t);const n=Fs("package.json",{cwd:t?.cwd??En(),type:"file"});if(!n){if(t?.throwError)throw new Vn("No such file or directory found.");return}const s=ie(Gr(n),"node_modules"),u=ie(s,".cache"),l=ie(u,e);if(!(!J(l,ve)&&J(l))&&!(!J(u,ve)&&J(u))&&!(!J(s,ve)&&J(s)))return ft(l,t)},"findCacheDirectorySync"),Zn=ji;var Oi=Object.defineProperty,ki=v((e,t)=>Oi(e,"name",{value:t,configurable:!0}),"r$3");const fn=ki(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"r");var Ei=Object.defineProperty,Hn=v((e,t)=>Ei(e,"name",{value:t,configurable:!0}),"s$5");const Pi=tt(import.meta.url),Xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ai=Hn(e=>{if(typeof Xe<"u"&&Xe.versions&&Xe.versions.node){const[t,n]=Xe.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Xe.getBuiltinModule(e)}return Pi(e)},"u"),{lstatSync:pn,mkdirSync:Ti}=Ai("node:fs"),pt=Hn(e=>{wn(e);try{const t=pn(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(fn(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{Ti(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const n=pn(e);if(!n.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(fn(n))}'`,{cause:t})}},"g");var Si=Object.defineProperty,Kn=v((e,t)=>Si(e,"name",{value:t,configurable:!0}),"x$1"),Ci=Object.defineProperty,Hr=Kn((e,t)=>Ci(e,"name",{value:t,configurable:!0}),"$"),Mi=Object.defineProperty,zi=Hr((e,t)=>Mi(e,"name",{value:t,configurable:!0}),"r$1");const Ni=zi(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
2
|
+
`),"normalizeLF"),_i=globalThis.process??Object.create(null),dn={versions:{}},gn=new Proxy(_i,{get(e,t){if(t in e)return e[t];if(t in dn)return dn[t]}});var Bi=Object.defineProperty,Ri=Hr((e,t)=>Bi(e,"name",{value:t,configurable:!0}),"b");const Di=Ri((e,t,n,s)=>{const u={column:0,line:-1,...e.start},l={...u,...e.end},g=u.line,h=u.column,x=l.line,O=l.column;let j=Math.max(g-(n+1),0),$=Math.min(t.length,x+s);g===-1&&(j=0),x===-1&&($=t.length);const M=x-g,P={};if(M)for(let E=0;E<=M;E++){const U=E+g;if(!h)P[U]=!0;else if(E===0){const q=t[U-1]?.length;P[U]=[h,(q??0)-h+1]}else if(E===M)P[U]=[0,O];else{const q=t[U-E]?.length;P[U]=[0,q]}}else h===O?P[g]=h?[h,0]:!0:P[g]=[h,(O??0)-(h??0)];return{end:$,markerLines:P,start:j}},"getMarkerLines");var Ii=Object.defineProperty,ut=Hr((e,t)=>Ii(e,"name",{value:t,configurable:!0}),"t");const Fi=gn.platform==="win32"&&!gn.env?.WT_SESSION?">":"❯",Wi=ut((e,t,n)=>{const s={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...n,color:{gutter:ut(E=>E,"gutter"),marker:ut(E=>E,"marker"),message:ut(E=>E,"message"),...n?.color}},u=typeof t.start.column=="number";let l=Ni(e).split(`
|
|
3
|
+
`);typeof s.tabWidth=="number"&&(l=l.map(E=>E.replaceAll(" "," ".repeat(s.tabWidth))));const{end:g,markerLines:h,start:x}=Di(t,l,s.linesAbove,s.linesBelow),O=String(g).length,{gutter:j,marker:$,message:M}=s.color;let P=l.slice(x,g).map((E,U)=>{const q=x+1+U,se=h[q],je=String(q).padStart(O),Oe=!h[q+1],te=` ${je}${s.showGutter?" |":""}`;if(se){let B="";if(Array.isArray(se)){const ke=E.replaceAll(/[^\t]/g," ").slice(0,Math.max(se[0]-1,0)),Ee=se[1]||1;B=[`
|
|
4
|
+
`,s.prefix+j(te.replaceAll(/\d/g," "))," ",ke,$("^").repeat(Ee)].join(""),Oe&&s.message&&(B+=` ${M(s.message)}`)}return[s.prefix+$(Fi),j(te),E.length>0?` ${E}`:"",B].join("")}return`${s.prefix} ${j(te)}${E.length>0?` ${E}`:""}`}).join(`
|
|
5
|
+
`);return s.message&&!u&&(P=`${s.prefix+" ".repeat(O+1)+s.message}
|
|
6
|
+
${P}`),P},"codeFrame");var Li=Object.defineProperty,Vi=Kn((e,t)=>Li(e,"name",{value:t,configurable:!0}),"N"),Ui=Object.defineProperty,Kr=Vi((e,t)=>Ui(e,"name",{value:t,configurable:!0}),"l");const hn=Kr((e,t)=>{let n=0,s=t.length-2;for(;n<s;){const u=n+(s-n>>1);if(e<t[u])s=u-1;else if(e>=t[u+1])n=u+1;else{n=u;break}}return n},"binarySearch"),qi=/\n|\r(?!\n)/,Gi=Kr(e=>e.split(qi).reduce((t,n)=>(t.push(t.at(-1)+n.length+1),t),[0]),"getLineStartIndexes"),Zi=Kr((e,t,n)=>{const s=n?.skipChecks??!1;if(!s&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!s&&(typeof t!="number"||typeof e=="string"&&t>=e.length||Array.isArray(e)&&t+1>=e.at(-1)))return{column:0,line:0};if(typeof e=="string"){const l=Gi(e),g=hn(t,l);return{column:t-l[g]+1,line:g+1}}const u=hn(t,e);return{column:t-e[u]+1,line:u+1}},"indexToLineColumn");var Hi=Object.defineProperty,Ki=v((e,t)=>Hi(e,"name",{value:t,configurable:!0}),"r$2");let Ji=class extends Error{static{v(this,"a")}static{Ki(this,"r")}fileName;codeFrame;name="JSONError";#e;constructor(t){super(),this.#e=t}get message(){return`${this.#e}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
|
|
7
7
|
|
|
8
8
|
${this.codeFrame}
|
|
9
|
-
`:""}`}set message(t){this.#e=t}};var
|
|
10
|
-
`;if(
|
|
9
|
+
`:""}`}set message(t){this.#e=t}};var Xi=Object.defineProperty,at=v((e,t)=>Xi(e,"name",{value:t,configurable:!0}),"a$2");const Qi=at(e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,"p"),Yi=at((e,t,n)=>Wi(e,{start:t},{tabWidth:!1,...n}),"m"),ea=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,ta=at((e,t)=>{const n=ea.exec(t);if(!n)return;const[,s,u,l]=n;if(u&&l)return{column:Number(l),line:Number(u)};let g=Number(s);return g===e.length&&(g=e.length-1),Zi(e,g)},"d"),ra=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,na=at(e=>e.replace(ra,(t,n,s)=>`"${s}"(${Qi(s)})`),"h");function Jn(e,t,n,s){typeof t=="string"&&(typeof n=="object"&&(s=n),n=t,t=void 0);let u;try{return JSON.parse(e,t)}catch(h){u=h.message}let l;e?(l=ta(e,u),u=na(u)):u+=" while parsing empty string";const g=new Ji(u);throw g.fileName=n,l&&(g.codeFrame=Yi(e,l,s)),g}v(Jn,"$$1");at(Jn,"$");var oa=Object.defineProperty,sa=v((e,t)=>oa(e,"name",{value:t,configurable:!0}),"c$1");function Jr(e,t,n){typeof t=="object"&&(n=t,t=void 0);const s=vo(e,{buffer:!0,encoding:void 0});let u=new TextDecoder().decode(s);const{beforeParse:l,color:g}=n??{};return typeof l=="function"&&(u=l(u)),Jn(u,t,jn(e),{color:g})}v(Jr,"s$4");sa(Jr,"a");var ia=Object.defineProperty,aa=v((e,t)=>ia(e,"name",{value:t,configurable:!0}),"e$2");const ca=aa(e=>{if(typeof e!="string"&&!(e instanceof ArrayBuffer)&&!ArrayBuffer.isView(e))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},"e");var ua=Object.defineProperty,la=v((e,t)=>ua(e,"name",{value:t,configurable:!0}),"n$1");const fa=new TextEncoder,pa=la(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return fa.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e)){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},"r");var da=Object.defineProperty,Xn=v((e,t)=>da(e,"name",{value:t,configurable:!0}),"c");const ga=tt(import.meta.url),Qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ha=Xn(e=>{if(typeof Qe<"u"&&Qe.versions&&Qe.versions.node){const[t,n]=Qe.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Qe.getBuiltinModule(e)}return ga(e)},"l"),{mkdirSync:ma,writeFileSync:ya,statSync:ba,renameSync:mn,chownSync:va,chmodSync:$a,unlinkSync:xa}=ha("node:fs"),wa=Xn((e,t,n)=>{n={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...n},wn(e),ca(t),e=jn(e);const s=`${e}.tmp`;try{const u=X(e,Qr);if(!u&&n.recursive){const g=rt(e);X(g,Qr)||ma(g,{recursive:!0})}let l;if(ya(s,typeof t=="string"?Buffer.from(t,n.encoding??"utf8"):pa(t),{flag:n.flag}),u&&!n.overwrite&&(l=ba(e),n.chown??={gid:l.gid,uid:l.uid},mn(e,`${e}.bak`)),n.chown)try{va(s,n.chown.uid,n.chown.gid)}catch{}$a(s,l&&!n.mode?l.mode:n.mode??438),mn(s,e)}catch(u){throw new Error(`Failed to write file at: ${e} - ${u.message}`,{cause:u})}finally{X(s)&&xa(`${e}.tmp`)}},"E");var ja=Object.defineProperty,me=v((e,t)=>ja(e,"name",{value:t,configurable:!0}),"i$2");const Oa=/^(?:( )+|\t+)/,ct="space";function Rr(e,t,n){return e&&t===ct&&n===1}v(Rr,"d$3");me(Rr,"d");function Dr(e,t){const n=new Map;let s=0,u,l;for(const g of e.split(/\n/g)){if(!g)continue;const h=g.match(Oa);if(h===null)s=0,u="";else{const x=h[0].length,O=h[1]?ct:"tab";if(Rr(t,O,x))continue;O!==u&&(s=0),u=O;let j=1,$=0;const M=x-s;if(s=x,M===0)j=0,$=1;else{const E=Math.abs(M);if(Rr(t,O,E))continue;l=Qn(O,E)}const P=n.get(l);n.set(l,P===void 0?[1,0]:[P[0]+j,P[1]+$])}}return n}v(Dr,"h$1");me(Dr,"h");function Qn(e,t){return(e===ct?"s":"t")+String(t)}v(Qn,"x");me(Qn,"w");function Yn(e){const t=e[0]==="s"?ct:"tab",n=Number(e.slice(1));return{type:t,amount:n}}v(Yn,"E$1");me(Yn,"E");function eo(e){let t,n=0,s=0;for(const[u,[l,g]]of e)(l>n||l===n&&g>s)&&(n=l,s=g,t=u);return t}v(eo,"M");me(eo,"v");function to(e,t){return(e===ct?" ":" ").repeat(t)}v(to,"k");me(to,"x");function ro(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=Dr(e,!0);t.size===0&&(t=Dr(e,!1));const n=eo(t);let s,u=0,l="";return n!==void 0&&({type:s,amount:u}=Yn(n),l=to(s,u)),{amount:u,type:s,indent:l}}v(ro,"z$1");me(ro,"M");var ka=Object.defineProperty,no=v((e,t)=>ka(e,"name",{value:t,configurable:!0}),"s$2");const Ea=tt(import.meta.url),Ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Pa=no(e=>{if(typeof Ye<"u"&&Ye.versions&&Ye.versions.node){const[t,n]=Ye.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ye.getBuiltinModule(e)}return Ea(e)},"g"),{readFileSync:Aa}=Pa("node:fs"),oo=no((e,t,n={})=>{const{detectIndent:s,indent:u,replacer:l,stringify:g=JSON.stringify,...h}={indent:" ",...n};let x=u,O=`
|
|
10
|
+
`;if(X(e,$o))try{const $=Aa(e,"utf8");if(s){const{indent:M}=ro($);x=M}O=$.endsWith(`
|
|
11
11
|
`)?`
|
|
12
|
-
`:""}catch(
|
|
13
|
-
`),
|
|
14
|
-
Chain: ${
|
|
12
|
+
`:""}catch($){if($.code!=="ENOENT")throw $}const j=g(t,l,x);wa(e,`${j}${O}`,h)},"R");var Ta=Object.defineProperty,Sa=v((e,t)=>Ta(e,"name",{value:t,configurable:!0}),"s$1");class dt extends Error{static{v(this,"VisConfigError")}static{Sa(this,"VisConfigError")}chain;constructor(t,n,s){super(t,s),this.name=this.constructor.name,this.chain=n}}var Ca=Object.defineProperty,Ma=v((e,t)=>Ca(e,"name",{value:t,configurable:!0}),"e");class za extends dt{static{v(this,"VisConfigCycleError")}static{Ma(this,"VisConfigCycleError")}constructor(t,n){const s=[...n,`${t} (re-enters)`].join(" → ");super(`Config cycle: ${s}`,n)}}var Na=Object.defineProperty,_a=v((e,t)=>Na(e,"name",{value:t,configurable:!0}),"s");class so extends dt{static{v(this,"VisConfigDeprecatedKeyError")}static{_a(this,"VisConfigDeprecatedKeyError")}filePath;removedKeys;constructor(t,n,s){const u=[`${t} uses removed keys.`,""];for(const l of s){const g=l.location?` (at ${l.location})`:"";u.push(` • ${l.name}${g} → renamed to \`${l.renamedTo}\``);for(const h of l.children??[])u.push(` ↳ ${h.name} → renamed to \`${h.renamedTo}\``)}u.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(u.join(`
|
|
13
|
+
`),n),this.filePath=t,this.removedKeys=s}}var Ba=Object.defineProperty,Ra=v((e,t)=>Ba(e,"name",{value:t,configurable:!0}),"t$1");class yn extends dt{static{v(this,"VisConfigLoadError")}static{Ra(this,"VisConfigLoadError")}constructor(t,n,s){const u=s instanceof Error?s.message:String(s),l=n.length>0?`
|
|
14
|
+
Chain: ${n.join(" → ")}`:"";super(`Failed to load ${t}: ${u}${l}`,n,{cause:s})}}var Da=Object.defineProperty,io=v((e,t)=>Da(e,"name",{value:t,configurable:!0}),"t");const Ia=io(e=>e.join(" → "),"formatChain");class Nr extends dt{static{v(this,"VisConfigNotFoundError")}static{io(this,"VisConfigNotFoundError")}constructor(t,n,s){const u=n.length>0?n[n.length-1]:"<unknown>",l=s.length>0?`
|
|
15
15
|
Tried:
|
|
16
|
-
${
|
|
17
|
-
`)}`:"";super(`Cannot resolve "${t}" extended from ${
|
|
18
|
-
Chain: ${
|
|
19
|
-
`);return t.digest("hex")},"hashConfigChain"),
|
|
16
|
+
${s.join(`
|
|
17
|
+
`)}`:"";super(`Cannot resolve "${t}" extended from ${u}.${l}
|
|
18
|
+
Chain: ${Ia(n)}`,n)}}var Fa=Object.defineProperty,ao=v((e,t)=>Fa(e,"name",{value:t,configurable:!0}),"i$1");const bn="@inherit",Wa=["aliases","dependsOn","inputs","outputs"],La=ao((e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(bn))return[...t];const n=[];for(const s of t){if(s===bn){e!==void 0&&n.push(...e);continue}n.push(s)}return n},"mergeArrayWithInherit"),Va=ao((e,t)=>{const n={...e,...t};for(const s of Wa){const u=e?.[s],l=t?.[s],g=La(u,l);g===void 0?delete n[s]:n[s]=g}return n},"mergeTargetWithInherit");var Ua=Object.defineProperty,gt=v((e,t)=>Ua(e,"name",{value:t,configurable:!0}),"o");const qa=gt(e=>{const t=[];if(Object.hasOwn(e,"targetDefaults")&&t.push({name:"targetDefaults",renamedTo:"tasks"}),Object.hasOwn(e,"taskRunnerOptions")&&t.push({name:"taskRunnerOptions",renamedTo:"taskRunner"}),Object.hasOwn(e,"taskDefaults")){const{taskDefaults:n}=e,s=[];if(Array.isArray(n))for(const[u,l]of n.entries())l&&typeof l=="object"&&(Object.hasOwn(l,"scope")&&s.push({location:`taskDefaults[${u}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(l,"targets")&&s.push({location:`taskDefaults[${u}].targets`,name:"targets",renamedTo:"tasks"}));t.push({children:s.length>0?s:void 0,name:"taskDefaults",renamedTo:"scopedTasks"})}else if(Array.isArray(e.scopedTasks))for(const[n,s]of e.scopedTasks.entries())s&&typeof s=="object"&&(Object.hasOwn(s,"scope")&&t.push({location:`scopedTasks[${n}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(s,"targets")&&t.push({location:`scopedTasks[${n}].targets`,name:"targets",renamedTo:"tasks"}));return t},"detectDeprecatedConfigKeys"),Ga=gt(e=>Object.hasOwn(e,"targets")&&!Object.hasOwn(e,"tasks")?[{name:"targets",renamedTo:"tasks"}]:[],"detectDeprecatedTaskKeys"),Za=gt((e,t,n)=>{if(!n||typeof n!="object")return;const s=qa(n);if(s.length>0)throw new so(e,t,s)},"assertNoDeprecatedConfigKeys"),Ha=gt((e,t,n)=>{if(!n||typeof n!="object")return;const s=Ga(n);if(s.length>0)throw new so(e,t,s)},"assertNoDeprecatedTaskKeys");var Ka=Object.defineProperty,T=v((e,t)=>Ka(e,"name",{value:t,configurable:!0}),"r");const co=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],Ja=new Set(co),uo=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],Xa=new Set(uo),vc=2880,_r={blockExoticSubdeps:!0,policies:{installScripts:{strict:!0},publisherChange:{ignoreAfter:43200,mode:"no-downgrade"}}},Qa=T(e=>{if(!e)return{..._r};const t=_r.policies??{},n=e.policies??{},s={...t,...n};for(const u of Object.keys(t)){const l=t[u],g=n[u];l!==void 0&&g!==void 0&&(s[u]={...l,...g})}return{..._r,...e,policies:s}},"mergeSecurityDefaults"),vn=T(e=>({...e,security:Qa(e.security),update:{security:!0,target:"minor",...e.update}}),"applyDefaults"),Ya=T(e=>{let t;try{t=xn(e)}catch{return}const n=new Set(t.filter(s=>Ja.has(s)));for(const s of co)if(n.has(s))return V(e,s)},"findVisConfigFile"),ec=T(e=>{let t;try{t=xn(e)}catch{return}const n=new Set(t.filter(s=>Xa.has(s)));for(const s of uo)if(n.has(s))return V(e,s)},"findVisTaskConfigFile"),Xr=T(e=>$n("sha256").update(mo(e)).digest("hex"),"hashFileContents"),tc=T(e=>{const t=$n("sha256"),n=[...e].sort();for(const s of n)t.update(s),t.update(":"),t.update(Xr(s)),t.update(`
|
|
19
|
+
`);return t.digest("hex")},"hashConfigChain"),rc=T(e=>{const t=V(e,"node_modules");if(X(t)){const s=V(t,".cache","vis");return pt(s),V(s,"vis-config-cache.json")}const n=Zn("vis",{create:!0,cwd:e});return n?V(n,"vis-config-cache.json"):void 0},"getConfigCachePath"),nc=T((e,t)=>{if(X(e))try{const n=Jr(e);if(n.hash===t)return n.config}catch{}},"readConfigCache"),oc=T((e,t,n)=>{try{pt(rt(e)),oo(e,{config:n,hash:t})}catch{}},"writeConfigCache"),sc=T(e=>e===void 0?[]:Array.isArray(e)?e:[e],"normalizeExtends"),ic=T((e,t,n)=>{if(On(e))throw new Nr(e,[...n,t],["Absolute paths in `extends` are not supported. Use a relative path or an npm package name."]);const s=[];if(e.startsWith("./")||e.startsWith("../")){const u=rt(t),l=V(u,e);if(s.push(l),X(l))return l;throw new Nr(e,[...n,t],s)}try{return tt(t).resolve(e)}catch{throw s.push(`require.resolve("${e}") from ${t}`),new Nr(e,[...n,t],s)}},"resolveExtendsSpecifier"),lo=T(async(e,t,n)=>{const s=Xr(t),u=t.slice(t.lastIndexOf(".")),l=V(rt(t),`.vis-config-tmp-${s}${u}`);yo(t,l);let g;try{g=await e.import(l,{default:!0,try:!0})??{}}catch(h){throw new yn(t,n,h)}finally{try{bo(l)}catch{}}try{return(typeof g=="function"?await g()??{}:g)??{}}catch(h){throw new yn(t,n,h)}},"loadRawConfig"),ac=T((e,t)=>{const n={...e,...t};if(e.tasks||t.tasks){const s=new Set([...Object.keys(e.tasks??{}),...Object.keys(t.tasks??{})]),u={};for(const l of s)u[l]=Va(e.tasks?.[l],t.tasks?.[l]);n.tasks=u}if((e.scopedTasks||t.scopedTasks)&&(n.scopedTasks=[...e.scopedTasks??[],...t.scopedTasks??[]]),(e.fileGroups||t.fileGroups)&&(n.fileGroups={...e.fileGroups,...t.fileGroups}),(e.taskGroups||t.taskGroups)&&(n.taskGroups={...e.taskGroups,...t.taskGroups}),e.security||t.security){const s=e.security?.policies??{},u=t.security?.policies??{},l={...s,...u};for(const g of Object.keys(s)){const h=s[g],x=u[g];h!==void 0&&x!==void 0&&(l[g]={...h,...x})}n.security={...e.security,...t.security,acceptedRisks:{...e.security?.acceptedRisks,...t.security?.acceptedRisks},policies:l}}return(e.update||t.update)&&(n.update={...e.update,...t.update}),(e.taskRunner||t.taskRunner)&&(n.taskRunner={...e.taskRunner,...t.taskRunner}),delete n.extends,n},"mergeVisConfigs"),fo=T(async(e,t,n,s,u,l)=>{if(s.has(t))throw new za(t,n);if(!u.has(t)){s.add(t);try{const g=await lo(e,t,n);Za(t,n,g);const h=sc(g.extends);for(const x of h){const O=ic(x,t,n);await fo(e,O,[...n,t],s,u,l)}u.set(t,g),l.push(t)}finally{s.delete(t)}}},"resolveConfigChain"),$c=T(async(e,t)=>{let n;if(t?.explicitConfigPath){const $=On(t.explicitConfigPath)?t.explicitConfigPath:V(e,t.explicitConfigPath);if(!X($))throw new Error(`Cannot find config file at ${$}`);n=$}else n=Ya(e);if(!n)return vn({});const s=kn(e,{fsCache:!1,moduleCache:!1}),u=new Set,l=new Map,g=[];await fo(s,n,[],u,l,g);const h=tc(g),x=rc(e);if(x){const $=nc(x,h);if($)return $}let O={};for(const $ of g)O=ac(O,l.get($));const j=vn(O);return x&&oc(x,h,j),j},"loadVisConfig"),cc=T(e=>e.replaceAll(/[^\w.-]+/g,"_"),"sanitizeProjectName"),uc=T((e,t)=>{const n=V(e,"node_modules"),s=cc(t);if(X(n)){const l=V(n,".cache","vis","task-configs");return pt(l),V(l,`${s}.json`)}const u=Zn("vis",{create:!0,cwd:e});return u?V(u,"task-configs",`${s}.json`):void 0},"getVisTaskCachePath"),lc=T((e,t)=>{if(X(e))try{const n=Jr(e);if(n.hash===t)return n.config}catch{}},"readVisTaskCache"),fc=T((e,t,n)=>{try{pt(rt(e)),oo(e,{config:n,hash:t})}catch{}},"writeVisTaskCache"),xc=T(async(e,t,n)=>{const s=ec(t);if(!s)return;const u=Xr(s),l=uc(e,n);if(l){const O=lc(l,u);if(O)return O}const g=kn(t,{fsCache:!1,moduleCache:!1}),h=await lo(g,s,[]);Ha(s,[],h);const x=h;return l&&fc(l,u,x),x},"loadVisTaskConfig"),wc=T(e=>e,"defineTaskConfig"),jc=T(e=>e,"defineConfig");export{Jn as $,wa as E,ec as G,vc as H,uo as V,wc as a,pt as b,jc as c,oo as d,$c as e,fn as f,ca as g,co as h,pa as i,Ya as j,Va as k,_r as l,vn as m,Zn as p,xc as r,Jr as s,ro as z};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var h=Object.defineProperty;var p=(e,t)=>h(e,"name",{value:t,configurable:!0});import{I as g,T as l,j as m,E as n,q as b,e as d}from"../packem_shared/Table-
|
|
1
|
+
var h=Object.defineProperty;var p=(e,t)=>h(e,"name",{value:t,configurable:!0});import{I as g,T as l,j as m,E as n,q as b,e as d}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{ReapiRemoteCache as f,resolveTurboEnvCompat as k}from"@visulima/task-runner";import{p as $}from"./bin.js";var w=Object.defineProperty,s=p((e,t)=>w(e,"name",{value:t,configurable:!0}),"s");const y=s((e,t)=>t==="http"||t==="reapi"?t:e.startsWith("grpc://")||e.startsWith("grpcs://")?"reapi":"http","inferBackend"),S=s(async(e,t)=>{const o=Date.now(),a=new AbortController,r=setTimeout(()=>{a.abort()},t);try{const i=await fetch(e,{method:"HEAD",signal:a.signal});return{backend:"http",durationMs:Date.now()-o,httpStatus:i.status,ok:!0,url:e}}catch(i){return{backend:"http",durationMs:Date.now()-o,error:i instanceof Error?i.message:String(i),ok:!1,url:e}}finally{clearTimeout(r)}},"probeHttp"),C=s(async(e,t)=>{const o=Date.now(),a=new f({...e,timeout:t});try{return{backend:"reapi",capabilities:await a.probeCapabilities(),durationMs:Date.now()-o,ok:!0,url:e.url}}catch(r){return{backend:"reapi",durationMs:Date.now()-o,error:r instanceof Error?r.message:String(r),ok:!1,url:e.url}}finally{try{await a.close()}catch{}}},"probeReapi"),D=s(e=>{const t=[],o=e.ok?g("OK"):l("FAIL");if(t.push(`${m("Remote cache")} ${o}`),t.push(` ${n("URL:")} ${b(e.url)}`),t.push(` ${n("Backend:")} ${e.backend}`),t.push(` ${n("Latency:")} ${String(e.durationMs)}ms`),e.httpStatus!==void 0&&t.push(` ${n("Status:")} ${String(e.httpStatus)}`),e.capabilities){const a=e.capabilities.digestFunctions.length>0?e.capabilities.digestFunctions.join(", "):d("(none advertised)");t.push(` ${n("Digests:")} ${a}`),t.push(` ${n("Batch:")} ${String(e.capabilities.maxBatchTotalSizeBytes)} bytes`)}return e.error&&t.push(` ${n("Error:")} ${l(e.error)}`),t.join(`
|
|
2
2
|
`)},"formatTable"),T=s(async({logger:e,options:t,visConfig:o})=>{const a=k((o??{}).taskRunner?.remoteCache),r=t.url??a?.url,i=t.format??"table",u=t.timeout??5e3;if(!r){$.error("No remote cache configured. Set taskRunner.remoteCache.url in vis.config.ts, pass --url=..., or export TURBO_API."),process.exitCode=1;return}const c=y(r,t.backend)==="reapi"?await C({...a??{url:r},backend:"reapi",url:r},u):await S(r,u);i==="json"?e.log(JSON.stringify(c,null,2)):e.log(D(c)),c.ok||(process.exitCode=1)},"cacheDoctorExecute");export{T as cacheDoctorExecute};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var O=Object.defineProperty;var v=(e,t)=>O(e,"name",{value:t,configurable:!0});import{createRequire as q}from"node:module";import{j as $,E as P,e as R,q as D,T as j,I}from"../packem_shared/Table-
|
|
1
|
+
var O=Object.defineProperty;var v=(e,t)=>O(e,"name",{value:t,configurable:!0});import{createRequire as q}from"node:module";import{j as $,E as P,e as R,q as D,T as j,I}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{z as _}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{r as W,a as B,b as L,c as w}from"../packem_shared/ai-fix-BkPUHA0z.js";import{p}from"./bin.js";import{l as N}from"../packem_shared/failure-log-34Wl3npC.js";const A=q(import.meta.url),m=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,J=v(e=>{if(typeof m<"u"&&m.versions&&m.versions.node){const[t,r]=m.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return m.getBuiltinModule(e)}return A(e)},"__cjs_getBuiltinModule"),{createInterface:z}=J("node:readline");var M=Object.defineProperty,l=v((e,t)=>M(e,"name",{value:t,configurable:!0}),"c");const U={"ambiguous-match":"ambiguous match",applied:"applied",error:"error","missing-file":"missing file","no-match":"no match","outside-workspace":"outside workspace"},S=l((e,t,r)=>{const o=W(e,t,r),s=_(e,o);return s===""||s.startsWith("..")?o:s},"formatDisplayPath"),E=l((e,t,r)=>{const o=[$(`Fix proposal (${e.provider}, confidence: ${e.confidence})`),"",e.explanation||P("<no explanation>")];if(e.cannotFix)return o.push(""),o.push(R(`Cannot fix automatically: ${e.cannotFix}`)),o.join(`
|
|
2
2
|
`);if(e.patches.length===0)return o.push(""),o.push(R("No patches were proposed.")),o.join(`
|
|
3
3
|
`);o.push(""),o.push($(`Patches (${String(e.patches.length)}):`));for(const[s,i]of e.patches.entries()){const a=S(t,r,i.file);o.push(""),o.push(D(`[${String(s+1)}] ${a}`)),i.reason&&o.push(P(` reason: ${i.reason}`));for(const c of i.oldString.split(`
|
|
4
4
|
`))o.push(j(` - ${c}`));for(const c of i.newString.split(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var y=Object.defineProperty;var w=(r,e)=>y(r,"name",{value:e,configurable:!0});import{I as N,E as $,T as M,e as R}from"../packem_shared/Table-
|
|
1
|
+
var y=Object.defineProperty;var w=(r,e)=>y(r,"name",{value:e,configurable:!0});import{I as N,E as $,T as M,e as R}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{p as g}from"./bin.js";import{r as S,M as x,a as A,b,c as P,d as j,e as C,f as E,g as B,h as D}from"../packem_shared/s1ngularity-DBcjspCC.js";import{g as O,a as V,r as F}from"../packem_shared/provenance-D8vU1u2L.js";import{r as I}from"../packem_shared/signatures-ChTfrQvT.js";var T=Object.defineProperty,p=w((r,e)=>T(r,"name",{value:e,configurable:!0}),"p");const k=new Set(["archivedRepo","author","downloads","expiredDomains","metadata","newBin","provenance","s1ngularity","signatures"]),U=p(r=>{const e=r.trim();if(e==="")return;if(e.startsWith("@")){const o=e.indexOf("@",1);return o===-1?{name:e,spec:void 0}:{name:e.slice(0,o),spec:e.slice(o+1)||void 0}}const i=e.indexOf("@");return i===-1?{name:e,spec:void 0}:{name:e.slice(0,i),spec:e.slice(i+1)||void 0}},"parsePackageArg"),L=p(r=>{if(r===void 0||r.trim()==="")return;const e=new Set;for(const i of r.split(",")){const o=i.trim();if(!k.has(o))throw new Error(`Unknown marshall in --only: ${o}. Known: ${[...k].sort().join(", ")}.`);e.add(o)}return e},"parseOnlyFlag"),l=p((r,e)=>r===void 0||r.has(e),"should"),J=p(r=>r?.has("signatures")??!1,"shouldRunSignatures"),Q=p(async({argument:r,options:e,workspaceRoot:i})=>{if(!r||r.length===0)throw new Error("No package specified. Usage: vis inspect <package>[@<spec>]");const o=U(r[0]);if(o===void 0)throw new Error(`Invalid package argument: "${String(r[0])}". Usage: vis inspect <package>[@<spec>]`);const t=L(e.only),u=await O(o.name,{workspaceRoot:i});if(u===void 0){g.error(`Package ${o.name} not found in the registry.`),process.exitCode=2;return}const h=V(u,o.spec);if(h===void 0){g.error(`Could not resolve ${o.name}@${o.spec??"latest"} to a published version.`),process.exitCode=2;return}const c=[{name:o.name,version:h}],n=new x;if(l(t,"author")){const s=await S(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"author",message:a.message,packageName:a.packageName,severity:a.severity})}if(l(t,"provenance")){const s=await F(c);for(const a of s)n.add({marshall:"provenance",message:`Prior version ${a.priorVersionWithProvenance} had provenance but ${a.version} does not.`,packageName:a.packageName,severity:"error"})}if(l(t,"s1ngularity")){const s=await A(c,{workspaceRoot:i});for(const a of s){const d=a.hookChanges.map(v=>`${v.hook} (${v.kind})`).join(", "),m=a.hookChanges.length===1;n.add({marshall:"s1ngularity",message:`${a.version} ${m?"has an":"has"} install-script ${m?"change":"changes"} [${d}] AND dropped the provenance attestation that ${a.priorVersion} carried — this is the s1ngularity compromised-publish shape.`,packageName:a.packageName,severity:"error"})}}if(l(t,"newBin")){const s=await b(c);for(const a of s){const d=a.newBins.map(m=>m.command).join(", ");n.add({marshall:"newBin",message:`${a.toVersion} adds new bin script${a.newBins.length===1?"":"s"}: ${d} (prior: ${a.fromVersion}).`,packageName:a.packageName,severity:"warning"})}}if(l(t,"metadata")){const s=await P(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"metadata",message:`Missing/invalid metadata: ${a.issues.join(", ")}.`,packageName:a.packageName,severity:"warning"})}if(l(t,"downloads")){const s=await j([o.name]);for(const a of s){const d=a.downloadsLastMonth===void 0?"unknown":String(a.downloadsLastMonth);n.add({marshall:"downloads",message:a.kind==="no-data"?"npm stats API returned no monthly download data.":`Only ${d} downloads in the past month.`,packageName:a.packageName,severity:a.severity})}}if(l(t,"expiredDomains")){const s=await C(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"expiredDomains",message:a.kind==="expired"?`Maintainer email domain ${a.domain} (${a.maintainer}) is unregistered — potential hijack risk.`:`Could not verify maintainer email domain ${a.domain} (${a.maintainer}).`,packageName:a.packageName,severity:a.severity})}if(J(t)){const s=await I(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"signatures",message:a.message,packageName:a.packageName,severity:a.severity})}if(l(t,"archivedRepo")){const s=await E(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"archivedRepo",message:a.kind==="archived"?`Source repo ${a.owner}/${a.repo} is archived${a.archivedAt===void 0?"":` (since ${a.archivedAt})`}.`:`Source repo ${a.owner}/${a.repo} returned 404 from GitHub.`,packageName:a.packageName,severity:"warning"})}const f=n.all();if(e.json===!0)process.stdout.write(`${JSON.stringify(B(f),void 0,2)}
|
|
2
2
|
`);else{const s=`${o.name}@${h}`;if(f.length===0)g.info(`${N("✓")} ${s} — no findings.`);else{g.info(`${$("Inspecting")} ${s}`);for(const m of D(f))process.stdout.write(`${m}
|
|
3
3
|
`);const a=n.errors().length,d=n.warnings().length;process.stdout.write(`
|
|
4
4
|
${$("Summary:")} ${M(`${String(a)} error${a===1?"":"s"}`)}, ${R(`${String(d)} warning${d===1?"":"s"}`)}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var M=Object.defineProperty;var d=(s,r)=>M(s,"name",{value:r,configurable:!0});import{createRequire as T}from"node:module";import{l as F,M as h,K as N,O as H}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{p as n}from"./bin.js";import{A as J,R as K,I as Q,C as U}from"../packem_shared/pm-runner-DmKT2FqF.js";import{s as W}from"../packem_shared/typosquats-
|
|
1
|
+
var M=Object.defineProperty;var d=(s,r)=>M(s,"name",{value:r,configurable:!0});import{createRequire as T}from"node:module";import{l as F,M as h,K as N,O as H}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{p as n}from"./bin.js";import{A as J,R as K,I as Q,C as U}from"../packem_shared/pm-runner-DmKT2FqF.js";import{s as W}from"../packem_shared/typosquats-acxQ7blw.js";import{h as G,P as V}from"../packem_shared/peer-warnings-EvSJ18gE.js";import{o as X}from"../packem_shared/utils-DrNg0XTR.js";const B=T(import.meta.url),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,A=d(s=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[r,t]=l.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return l.getBuiltinModule(s)}return B(s)},"__cjs_getBuiltinModule"),{rmSync:$}=A("node:fs");var Y=Object.defineProperty,y=d((s,r)=>Y(s,"name",{value:r,configurable:!0}),"u");const Z=["pnpm-lock.yaml","yarn.lock","package-lock.json","npm-shrinkwrap.json","bun.lock","bun.lockb"],ee=y(s=>{let r=s;for(;;){for(const e of Z)if(F(h(r,e)))return!0;const t=N(r);if(t===r||H(r).root===r)return!1;r=t}},"hasLockfile"),g=new Set(["aube","auto","bun","npm","pnpm","yarn"]),ce=y(async s=>{const{argument:r,logger:t,options:e,visConfig:c,workspaceRoot:C}=s,a=C??process.cwd();if(r&&r.length>0){const o=e,{default:j}=await import("./handler16.js"),q=o.marshallCheck===!1||o["no-marshall-check"]===!0?!1:void 0,S=o.socketCheck===!1||o["no-socket-check"]===!0?!1:void 0,P=o.typosquatCheck===!1||o["no-typosquat-check"]===!0?!1:void 0,z=o.runScripts===!0||o["run-scripts"]===!0,E=o.workspaceRoot===!0||o["workspace-root"]===!0,I=o.saveOptional===!0||o["save-optional"]===!0,D=e.dev===!0,L={autoInstallPeers:!1,exact:o.exact===!0,filter:e.filter,global:!1,marshallCheck:q,runScripts:z,saveDev:D,saveOptional:I,savePeer:!1,socketCheck:S,to:void 0,typosquatCheck:P,workspace:!1,workspaceRoot:E};await j({...s,argument:r,options:L});return}if(e.typosquatCheck!==!1&&!await W(a,c?.security?.typosquatAllowlist)){process.exitCode=1;return}const i=e.installer;if(i&&!g.has(i)){n.error(`Invalid --installer value: "${i}". Expected one of: ${[...g].join(", ")}.`),process.exitCode=1;return}const w=i,b=e.aube===!1;let f;try{f=b?J(a):K(a,{backend:w,configBackend:c?.install?.backend,configCorepack:c?.install?.corepack})}catch(o){n.error(o instanceof Error?o.message:String(o)),process.exitCode=1;return}const k=Q(a,f);k&&n.warn(k);const _=X(e.filter),p=e.ci||!1,m=e.frozenLockfile||p,O=e.frozenLockfile===!1||e.force||e.lockfileOnly,x=ee(a),v=m||!O&&x;if(!m&&v&&!e.silent&&n.info("Defaulting to frozen lockfile (pass --no-frozen-lockfile to allow lockfile updates)."),p){n.info("Clean install: removing node_modules...");try{$(h(a,"node_modules"),{force:!0,recursive:!0})}catch(o){n.error(`Failed to remove node_modules: ${o instanceof Error?o.message:String(o)}`),process.exitCode=1;return}}const{code:u,output:R}=await U(f,{dev:e.dev||!1,filter:_,force:e.force||!1,frozenLockfile:v,ignoreScripts:!e.runScripts,lockfileOnly:e.lockfileOnly||!1,noOptional:e.optional===!1,offline:e.offline||!1,prod:e.prod||!1,recursive:e.recursive||!1,silent:e.silent||!1,workspaceRoot:e.workspaceRoot||!1},a,t,{ciMode:p,preferOffline:e.preferOffline||!1});u!==0&&(process.exitCode=u),u===0&&!e.silent&&G(R)&&n.info(V)},"execute");export{ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var O=Object.defineProperty;var $=(s,a)=>O(s,"name",{value:a,configurable:!0});import{createRequire as A}from"node:module";import{E,T as N,e as z,I as M}from"../packem_shared/Table-
|
|
1
|
+
var O=Object.defineProperty;var $=(s,a)=>O(s,"name",{value:a,configurable:!0});import{createRequire as A}from"node:module";import{E,T as N,e as z,I as M}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{s as B,d as U}from"./config.js";import{l as V,Y as C,$ as Y,p as f,a0 as x,a1 as J,a2 as K,f as Q,C as W,T as G,a as H,a3 as X,i as P,c as Z,a4 as ee}from"./bin.js";import{M as oe}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{y as se,R as te,P as ne}from"../packem_shared/pm-runner-DmKT2FqF.js";import{r as D,a as ae,b as re,p as ie}from"../packem_shared/resolve-explicit-cPzwdiEE.js";import{r as ce}from"../packem_shared/typosquats-acxQ7blw.js";import{d as T,o as R}from"../packem_shared/utils-DrNg0XTR.js";const L=A(import.meta.url),v=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,F=$(s=>{if(typeof v<"u"&&v.versions&&v.versions.node){const[a,e]=v.versions.node.split(".").map(Number);if(a>22||a===22&&e>=3||a===20&&e>=16)return v.getBuiltinModule(s)}return L(s)},"__cjs_getBuiltinModule"),{createInterface:I}=F("node:readline");var le=Object.defineProperty,w=$((s,a)=>le(s,"name",{value:a,configurable:!0}),"c");const j=w(s=>s==="default"?"catalog:":`catalog:${s}`,"buildCatalogRef"),b=w(s=>s==="default"?"default catalog":`catalog "${s}"`,"labelForCatalog"),pe=w((s,a)=>{const e=[];for(const[o,n]of a)o.includes(":")||n.has(s)&&e.push(o);if(e.length===0)return;if(e.length===1){const[o]=e;return{source:b(o),spec:j(o)}}const r=e.find(o=>o==="default")??e[0],i=e.filter(o=>o!==r);return{candidates:[...e],conflict:!0,source:`${b(r)} (also in: ${i.map(o=>b(o)).join(", ")})`,spec:j(r)}},"resolveFromCatalogs"),fe=w((s,a)=>{const e=new Map;for(const[c,l]of a){if(!c.includes(":"))continue;const u=l.get(s);u!==void 0&&e.set(u,(e.get(u)??0)+1)}if(e.size===0)return;const r=[...e.entries()],i=r.reduce((c,[,l])=>c+l,0);if(r.length===1){const[[c]]=r;return{source:`siblings (${String(i)} pkg${i===1?"":"s"} on ${c})`,spec:c}}const o=[...r].sort((c,l)=>l[1]-c[1]),[n,t]=o[0],p=o.slice(1).map(([c,l])=>`${c} (×${String(l)})`);return{candidates:o.map(([c])=>c),conflict:!0,source:`siblings (most common: ${n} ×${String(t)}; conflicts: ${p.join(", ")})`,spec:n}},"resolveFromSiblings"),ue=w((s,a)=>pe(s,a)||fe(s,a),"conformToCatalog");var de=Object.defineProperty,g=$((s,a)=>de(s,"name",{value:a,configurable:!0}),"u");const ge=g((s,a,e)=>{const r=[];for(const i of s.values()){const{overall:o}=i.score,n=V(o),t=`${String(Math.round(o*100))}%`,p=i.alerts.length,c=C(i),l=Y(c,i.version,e),u=n==="red"?N:n==="yellow"?z:M;if(l?f.info(` ${u(t)} ${x(i)} ${E(`[accepted: ${l.reason}]`)}`):f.info(` ${u(t)} ${x(i)}`),p>0){const d=i.alerts.filter(m=>m.severity==="critical"||m.severity==="high").length;d>0&&f.warn(` ${String(d)} critical/high alert${d===1?"":"s"}`)}o<a&&!l&&r.push(i)}return r},"displaySecurityReports"),me=g(async(s,a)=>{const e=I({input:process.stdin,output:process.stdout}),r=g(t=>new Promise(p=>{e.question(t,c=>{p(c.trim())})}),"ask"),i=String(Math.round(a*100));f.warn(""),f.warn(`${String(s.length)} package${s.length===1?"":"s"} scored below the minimum threshold (${i}%):`);for(const t of s){const p=C(t),c=`${String(Math.round(t.score.overall*100))}%`;f.warn(` • ${p}@${t.version} — score: ${c} (${J(t.score.overall)})`)}f.warn("");const o=await r("Continue adding these packages? [y/N] ");if(o.toLowerCase()!=="y"&&o.toLowerCase()!=="yes")return e.close(),!1;const n=await r("Remember this decision? (prints config snippet) [y/N] ");if(e.close(),n.toLowerCase()==="y"||n.toLowerCase()==="yes"){f.notice(""),f.notice("Add the following to security.acceptedRisks in vis.config.ts:"),f.notice("");for(const t of s){const p=C(t),c=K(p,t.version,t.score.overall,"Reviewed and accepted");f.notice(c)}f.notice("")}return!0},"confirmLowScorePackages"),ke=g(async(s,a,e,r)=>{const i=await D(s);if(i.length===0)return!0;f.info(""),f.info(`${a.map(t=>t.displayName).join(" + ")} security check:`);const o=await Q(a,i);if(o.size===0)return f.info(" Could not fetch security data. Proceeding."),!0;const n=ge(o,e,r);return n.length===0?(f.info(""),!0):process.stdin.isTTY?me(n,e):(f.warn(`Aborting: ${String(n.length)} package${n.length===1?"":"s"} below minimum score. Use --no-socket-check to skip.`),!1)},"runSocketPreCheck"),he=["dependencies","devDependencies","peerDependencies","optionalDependencies"],ve=g(s=>s.savePeer?"peerDependencies":s.saveOptional?"optionalDependencies":s.saveDev?"devDependencies":"dependencies","pickDepSection"),_=g((s,a)=>s.startsWith("catalog:")||!a?s:s.replace(/^[\^~]/,""),"applyExactPrefix"),we=g(async(s,a)=>{const e=[];for(const o of s){const{name:n,versionSpec:t}=T(o);if(!n)continue;if(t!==void 0){e.push({explicit:t,name:n});continue}const p=ue(n,a);if(p){p.conflict&&f.warn(`${n}: ambiguous constraint — picking ${p.spec} (${p.source}). Pass ${n}@<version> to override.`),e.push({entry:{name:n,source:p.source,spec:p.spec},kind:"resolved",name:n});continue}e.push({kind:"missing",name:n})}const r=e.filter(o=>"kind"in o&&o.kind==="missing").map(o=>o.name),i=r.length>0?await ae(r):new Map;return e.map(o=>{if("explicit"in o)return{name:o.name,source:"explicit",spec:o.explicit};if(o.kind==="resolved")return o.entry;const n=i.get(o.name);if(n===void 0)throw new Error(`--to: cannot resolve a version for "${o.name}" (not in any catalog or sibling, and registry lookup failed). Pass ${o.name}@<version> explicitly.`);const t=`^${n}`;return f.info(`${o.name}: no existing constraint — using registry latest (${t}). Add to a catalog to share this version across workspace packages.`),{name:o.name,source:"registry latest",spec:t}})},"planConformedSpecs"),$e=g((s,a,e,r)=>{for(const{name:i,spec:o}of a){const n=_(o,r);for(const p of he){if(p===e)continue;const c=s[p];c?.[i]!==void 0&&(delete c[i],Object.keys(c).length===0&&delete s[p])}let t=s[e];t===void 0&&(t={},s[e]=t),t[i]=n}},"applyPlannedSpecsToPackageJson"),ye=g(async({ignoreScripts:s,logger:a,options:e,packages:r,pm:i,target:o,visConfig:n,workspaceRoot:t})=>{const{workspace:p}=W(t,n??{}),c=p.projects[o];if(!c){const k=Object.keys(p.projects).sort();throw new Error(`--to: workspace package "${o}" not found. Available: ${k.length>0?k.slice(0,10).join(", "):"(none)"}${k.length>10?`, ... (${String(k.length-10)} more)`:""}.`)}const l=oe(t,c.root,"package.json"),{packageManager:u}=G(t),d=H(t,u),m=ve(e),h=e.exact??!1,y=await we(r,d);if(y.length===0)return 0;const S=B(l);$e(S,y,m,h),U(l,S,{indent:X(l,{useEditorconfig:n?.editorconfig??!0}),overwrite:!0});for(const k of y){const q=_(k.spec,h);f.info(`${M("+")} ${k.name}@${q} → ${o}/${m} (${E(k.source)})`)}return se(i,{dev:!1,filter:[],force:!1,frozenLockfile:!1,ignoreScripts:s,lockfileOnly:!1,noOptional:!1,offline:!1,prod:!1,recursive:!1,silent:!1,workspaceRoot:!1},t,a)},"applyConformedAdd"),Te=g(async({argument:s,logger:a,options:e,visConfig:r,workspaceRoot:i})=>{let o=s;if(!o||o.length===0)throw new Error("No packages specified. Usage: vis add <packages...>");if(e.typosquatCheck!==!1){const l=o.map(d=>T(d)),u=await ce(l.map(d=>d.name),r?.security?.typosquatAllowlist);if(!u.ok){process.exitCode=1;return}o=l.map((d,m)=>{const h=u.packages[m];return h!==d.name?d.versionSpec?`${h}@${d.versionSpec}`:h??"":o[m]??""})}if(e.marshallCheck!==!1){const l=await D(o);if(l.length>0){const u=await re(l,{config:r?.security?.marshalls,workspaceRoot:i});if(!await ie(u)){process.exitCode=1;return}}}if(e.socketCheck!==!1){const l=new Set;P("socket")&&l.add("socket"),P("depsDev")&&l.add("deps-dev");const u=Z(r?.security,{disabled:l,minimumScore:r?.security?.policies?.score?.minimum});if(u.length>0){const d=r?.security?.policies?.score?.minimum??ee;if(!await ke(o,u,d,r?.security?.acceptedRisks)){process.exitCode=1;return}}}const n=process.cwd(),t=te(i??n,{configBackend:r?.install?.backend,configCorepack:r?.install?.corepack}),p=!e.runScripts;if(e.to){if(e.global||e.workspaceRoot)throw new Error("--to is incompatible with --global / --workspace-root.");if(e.filter&&R(e.filter).length>0)throw new Error("--to and --filter are mutually exclusive — --to already targets one package.");if(!i)throw new Error("--to requires a monorepo workspace. Run from inside a pnpm/bun/yarn/npm workspace.");const l=await ye({ignoreScripts:p,logger:a,options:e,packages:o,pm:t,target:e.to,visConfig:r,workspaceRoot:i});l!==0&&(process.exitCode=l);return}const c=ne(t,{exact:e.exact||!1,filter:R(e.filter),global:e.global||!1,optional:e.saveOptional||!1,packages:o,peer:e.savePeer||!1,saveDev:e.saveDev||!1,workspace:e.workspace||!1,workspaceRoot:e.workspaceRoot||!1},n,a,{autoInstallPeers:e.autoInstallPeers||!1,ignoreScripts:p});c!==0&&(process.exitCode=c)},"execute");export{Te as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var x=Object.defineProperty;var c=(o,e)=>x(o,"name",{value:e,configurable:!0});import{createRequire as y}from"node:module";import{
|
|
1
|
+
var x=Object.defineProperty;var c=(o,e)=>x(o,"name",{value:e,configurable:!0});import{createRequire as y}from"node:module";import{b as C}from"./config.js";import{C as B,K as S}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{C as R,S as O,p as u}from"./bin.js";import{b as T,s as q}from"../packem_shared/cyclonedx-BilSFCNY.js";const h=y(import.meta.url),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$=c(o=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[e,s]=r.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return r.getBuiltinModule(o)}return h(o)},"__cjs_getBuiltinModule"),{writeFileSync:k}=$("node:fs");var D=Object.defineProperty,d=c((o,e)=>D(o,"name",{value:e,configurable:!0}),"m");const f=["json","xml"],E=d(o=>f.includes(o),"isSbomFormat"),G=d(async({options:o,visConfig:e,workspaceRoot:s})=>{if(!s)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{packageJsons:w,workspace:a}=R(s,e),b=O(s,a,w),p=o.focus,g=p?p.split(",").map(v=>v.trim()).filter(Boolean):void 0,t=(o.format??"json").toLowerCase();if(!E(t))throw new Error(`Unknown --format: "${t}". Expected one of: ${f.join(", ")}.`);const n=T({focus:g,includeDev:!!o.includeDev,projectGraph:b,workspace:a,workspaceRoot:s}),m=t==="xml"?q(n):`${JSON.stringify(n,void 0,2)}
|
|
2
2
|
`,l=o.output??(t==="xml"?"sbom.cdx.xml":"sbom.cdx.json");if(l==="-"){process.stdout.write(m);return}const i=B(s,l);C(S(i)),k(i,m,"utf8");const _=n.components?.length??0,j=n.dependencies?.length??0;u.success(`SBOM written to ${i}`),u.notice(`${_} components, ${j} dependency edges`)},"execute");export{G as default};
|