@visulima/vis 1.0.0-alpha.25 → 1.0.0-alpha.27

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.
Files changed (85) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/LICENSE.md +19 -152
  3. package/README.md +24 -22
  4. package/dist/bin.js +1 -1
  5. package/dist/binx.js +1 -1
  6. package/dist/config/index.d.ts +176 -16
  7. package/dist/packem_chunks/bin.js +263 -263
  8. package/dist/packem_chunks/bloom-status.js +1 -1
  9. package/dist/packem_chunks/bloom-sync.js +1 -1
  10. package/dist/packem_chunks/config.js +15 -15
  11. package/dist/packem_chunks/handler10.js +1 -1
  12. package/dist/packem_chunks/handler11.js +1 -1
  13. package/dist/packem_chunks/handler12.js +1 -1
  14. package/dist/packem_chunks/handler13.js +1 -1
  15. package/dist/packem_chunks/handler14.js +8 -9
  16. package/dist/packem_chunks/handler15.js +1 -1
  17. package/dist/packem_chunks/handler16.js +1 -1
  18. package/dist/packem_chunks/handler17.js +1 -1
  19. package/dist/packem_chunks/handler18.js +1 -1
  20. package/dist/packem_chunks/handler19.js +1 -1
  21. package/dist/packem_chunks/handler2.js +1 -1
  22. package/dist/packem_chunks/handler20.js +1 -1
  23. package/dist/packem_chunks/handler22.js +1 -1
  24. package/dist/packem_chunks/handler23.js +1 -1
  25. package/dist/packem_chunks/handler27.js +1 -1
  26. package/dist/packem_chunks/handler28.js +1 -1
  27. package/dist/packem_chunks/handler29.js +1 -1
  28. package/dist/packem_chunks/handler30.js +3 -3
  29. package/dist/packem_chunks/handler31.js +2 -2
  30. package/dist/packem_chunks/handler34.js +1 -1
  31. package/dist/packem_chunks/handler35.js +3 -22
  32. package/dist/packem_chunks/handler36.js +21 -60
  33. package/dist/packem_chunks/handler37.js +61 -6
  34. package/dist/packem_chunks/handler38.js +3 -24
  35. package/dist/packem_chunks/handler39.js +6 -153
  36. package/dist/packem_chunks/handler4.js +1 -1
  37. package/dist/packem_chunks/handler40.js +24 -10
  38. package/dist/packem_chunks/handler41.js +153 -25
  39. package/dist/packem_chunks/handler42.js +10 -708
  40. package/dist/packem_chunks/handler43.js +25 -24
  41. package/dist/packem_chunks/handler44.js +659 -273
  42. package/dist/packem_chunks/handler45.js +24 -46
  43. package/dist/packem_chunks/handler46.js +322 -3
  44. package/dist/packem_chunks/handler47.js +48 -27
  45. package/dist/packem_chunks/handler48.js +3 -186
  46. package/dist/packem_chunks/handler49.js +23 -30
  47. package/dist/packem_chunks/handler5.js +6 -6
  48. package/dist/packem_chunks/handler50.js +196 -0
  49. package/dist/packem_chunks/handler51.js +34 -0
  50. package/dist/packem_chunks/handler8.js +1 -1
  51. package/dist/packem_chunks/handler9.js +1 -1
  52. package/dist/packem_chunks/heal-accept.js +1 -1
  53. package/dist/packem_chunks/help-command.js +16 -16
  54. package/dist/packem_chunks/index.js +1 -1
  55. package/dist/packem_chunks/list.js +1 -1
  56. package/dist/packem_chunks/loader.js +1 -1
  57. package/dist/packem_chunks/prune.js +1 -1
  58. package/dist/packem_chunks/status.js +1 -1
  59. package/dist/packem_chunks/sync.js +1 -1
  60. package/dist/packem_chunks/sync2.js +1 -1
  61. package/dist/packem_chunks/tripwire.js +1 -1
  62. package/dist/packem_chunks/verify-lockfile.js +1 -1
  63. package/dist/packem_shared/{advisories-U1QKY_tg.js → advisories-xIOdLbAI.js} +1 -1
  64. package/dist/packem_shared/{cyclonedx-D6F9rAay.js → cyclonedx-B3ILsY74.js} +1 -1
  65. package/dist/packem_shared/{docker-BU-7veP5.js → docker-BynKrOLe.js} +1 -1
  66. package/dist/packem_shared/{index-PexbdLyT.js → index-B_KtN1MB.js} +1 -1
  67. package/dist/packem_shared/{index-D9ZIw4ra.js → index-efSniSRN.js} +1 -1
  68. package/dist/packem_shared/{lifecycle-ChCFTm5Q.js → lifecycle-CJRNbN3x.js} +2 -2
  69. package/dist/packem_shared/{min-release-age-heJgeP7o.js → min-release-age-aEn0x8Vy.js} +1 -1
  70. package/dist/packem_shared/{native-config-sync-BOeuyrBj.js → native-config-sync-DdhTLlKL.js} +1 -1
  71. package/dist/packem_shared/{osv-bloom-CyCDpXBl.js → osv-bloom-BJhlc_I2.js} +2 -2
  72. package/dist/packem_shared/{pm-runner-Cj76BV8q.js → pm-runner-BwX5AL3W.js} +1 -1
  73. package/dist/packem_shared/{provenance-CdvMwB2R.js → provenance-BuiEsWbI.js} +1 -1
  74. package/dist/packem_shared/{resolve-explicit-CRFybyxv.js → resolve-explicit-RgRrUDZv.js} +1 -1
  75. package/dist/packem_shared/{s1ngularity-CiZla5EP.js → s1ngularity-Bs9fUf3q.js} +1 -1
  76. package/dist/packem_shared/{scan-progress-EbvmIh4i.js → scan-progress-DjPT66jy.js} +2 -2
  77. package/dist/packem_shared/{signatures-BsEDWhME.js → signatures-LYMy8OR5.js} +1 -1
  78. package/dist/packem_shared/{typosquats-_7T7U2q2.js → typosquats-znskIR5j.js} +1 -1
  79. package/dist/packem_shared/watch-BSVsZ_1I.js +1 -0
  80. package/dist/packem_shared/watch-loop-DLlMLg_J.js +11 -0
  81. package/index.d.ts +201 -201
  82. package/index.js +751 -567
  83. package/package.json +11 -11
  84. package/schemas/project.schema.json +86 -1
  85. package/schemas/vis-config.schema.json +255 -7
@@ -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/index.server-B7ETiT4C.js";import{p as i}from"./bin.js";import{g as $}from"../packem_shared/osv-bloom-CyCDpXBl.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)}
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/index.server-B7ETiT4C.js";import{p as i}from"./bin.js";import{g as $}from"../packem_shared/osv-bloom-BJhlc_I2.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/index.server-B7ETiT4C.js";import{p as n}from"./bin.js";import{s as b}from"../packem_shared/scan-progress-EbvmIh4i.js";import{s as y,D as h}from"../packem_shared/osv-bloom-CyCDpXBl.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)}
1
+ var D=Object.defineProperty;var f=(o,t)=>D(o,"name",{value:t,configurable:!0});import{E as d}from"../packem_shared/index.server-B7ETiT4C.js";import{p as n}from"./bin.js";import{s as b}from"../packem_shared/scan-progress-DjPT66jy.js";import{s as y,D as h}from"../packem_shared/osv-bloom-BJhlc_I2.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 yo=Object.defineProperty;var x=(e,t)=>yo(e,"name",{value:t,configurable:!0});import{createRequire as bo}from"node:module";import{f as jn,$ as jo,U as On,i as J,_ as Qr,K as rt,s as Oo,M as L,a as kn}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{createJiti as Pn}from"jiti";import"../packem_shared/otelPlugin-CJR2T_lk.js";import"../packem_shared/definePlugin-CWm4Dv_t.js";const vo=bo(import.meta.url),Le=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Lr=x(e=>{if(typeof Le<"u"&&Le.versions&&Le.versions.node){const[t,n]=Le.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Le.getBuiltinModule(e)}return vo(e)},"__cjs_getBuiltinModule"),{createHash:xn}=Lr("node:crypto"),{readdirSync:wn,readFileSync:$o,copyFileSync:xo,unlinkSync:wo}=Lr("node:fs"),{createRequire:tt}=Lr("node:module");var ko=Object.defineProperty,ve=x((e,t)=>ko(e,"name",{value:t,configurable:!0}),"K$2"),Po=Object.defineProperty,M=ve((e,t)=>Po(e,"name",{value:t,configurable:!0}),"E");const Eo=tt(import.meta.url),ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,En=M(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 Eo(e)},"__cjs_getBuiltinModule"),{existsSync:he}=En("node:fs"),{env:me,cwd:Tn}=ge,{createRequire:$e}=En("node:module"),An=0,ye=2,Sn=Symbol("findUpStop");var To=Object.defineProperty,Ao=M((e,t)=>To(e,"name",{value:t,configurable:!0}),"t$4"),So=Object.defineProperty,Co=Ao((e,t)=>So(e,"name",{value:t,configurable:!0}),"t"),Mo=Object.defineProperty,_o=Co((e,t)=>Mo(e,"name",{value:t,configurable:!0}),"n");const Vr=_o(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var zo=Object.defineProperty,No=M((e,t)=>zo(e,"name",{value:t,configurable:!0}),"i$4"),Bo=Object.defineProperty,Ro=No((e,t)=>Bo(e,"name",{value:t,configurable:!0}),"r"),Io=Object.defineProperty,Do=Ro((e,t)=>Io(e,"name",{value:t,configurable:!0}),"i");const en=Do(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var Fo=Object.defineProperty,Wo=M((e,t)=>Fo(e,"name",{value:t,configurable:!0}),"i$3"),Lo=Object.defineProperty,Cn=Wo((e,t)=>Lo(e,"name",{value:t,configurable:!0}),"s");const Vo=$e(import.meta.url),Ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Uo=Cn(e=>{if(typeof Ve<"u"&&Ve.versions&&Ve.versions.node){const[t,n]=Ve.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ve.getBuiltinModule(e)}return Vo(e)},"__cjs_getBuiltinModule"),{lstatSync:tn,mkdirSync:qo}=Uo("node:fs");var Zo=Object.defineProperty,Go=Cn((e,t)=>Zo(e,"name",{value:t,configurable:!0}),"o");const Ko=Go(e=>{Vr(e);try{const t=tn(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(en(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{qo(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const n=tn(e);if(!n.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(en(n))}'`,{cause:t})}},"ensureDirSync");var Jo=Object.defineProperty,m=M((e,t)=>Jo(e,"name",{value:t,configurable:!0}),"s$6");let rn=m(()=>{var e=(()=>{var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,l=m((r,o)=>{for(var i in o)t(r,i,{get:o[i],enumerable:!0})},"ne"),g=m((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:m(()=>o[a],"get"),enumerable:!(c=n(o,a))||c.enumerable});return r},"ae"),h=m(r=>g(t({},"__esModule",{value:!0}),r),"oe"),$={};l($,{zeptomatch:m(()=>We,"zeptomatch")});var O=m(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,y=f.length;p<y;p++)i.push(f[p])}return Array.from(o)},"M"),j=m(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"),v=m((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=E(r.children.map(y=>v(y,o,i)).filter(Boolean));if(p?.length){const y=r.children.some(G=>!G.regex||!(G.partial??o)),k=p.length>1||a&&(!f.length||y);f+=k?a?"(?:$|":"(?:":"",f+=p.join("|"),f+=k?")":""}}return r.regex&&(f+=a?")":""),i.set(r,f),f},"O"),C=m((r,o)=>{const i=new Map,c=O(r);for(let a=c.length-1;a>=0;a--){const f=v(c[a],o,i);if(!(a>0))return f}return""},"ie"),E=m(r=>Array.from(new Set(r)),"ue"),P=m((r,o,i)=>P.compile(r,i).test(o),"R");P.compile=(r,o)=>{const i=o?.partial??!1,c=C(r,i),a=j(r);return new RegExp(`^(?:${c})$`,a)};var U=P,q=m((r,o)=>{const i=U.compile(r,o),c=`${i.source.slice(0,-1)}[\\\\/]?$`,a=i.flags;return new RegExp(c,a)},"le"),ee=q,xe=m(r=>{const o=r.map(c=>c.source).join("|")||"$^",i=r[0]?.flags;return new RegExp(o,i)},"ve"),we=xe,X=m(r=>Array.isArray(r),"j"),B=m(r=>typeof r=="function","_"),je=m(r=>r.length===0,"he"),Oe=(()=>{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))})(),$t=m(r=>typeof r=="number","de"),xt=m(r=>typeof r=="object"&&r!==null,"xe"),wt=m(r=>r instanceof RegExp,"me"),jt=(()=>{const r=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return o=>r.test(o.source)})(),Ot=(()=>{const r=/^[a-zA-Z0-9_-]+$/;return o=>r.test(o.source)&&!o.flags.includes("i")})(),ke=m(r=>typeof r=="string","A"),_=m(r=>r===void 0,"f"),kt=m(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"),Pe=m((r,o,i={})=>{const c={cache:{},input:r,index:0,indexBacktrackMax:0,options:i,output:[]},a=z(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=m((r,o)=>X(r)?Pt(r,o):ke(r)?Ee(r,o):Et(r,o),"i"),Pt=m((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(!_(o)&&!c.options.silent){const y=a.slice(f,p),k=B(o)?o(y,a,`${f}`):o;_(k)||c.output.push(k)}c.index=p}return!0}},"we"),Et=m((r,o)=>{if(Ot(r))return Ee(r.source,o);{const i=r.source,c=r.flags.replace(/y|$/,"y"),a=new RegExp(i,c);return jt(r)&&B(o)&&!Oe(o)?Tt(a,o):At(a,o)}},"$e"),Tt=m((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 y=o(...f,a,`${c}`);_(y)||i.output.push(y)}return i.index=p,!0}else return!1},"Ee"),At=m((r,o)=>i=>{const c=i.index,a=i.input;if(r.lastIndex=c,r.test(a)){const f=r.lastIndex;if(!_(o)&&!i.options.silent){const p=B(o)?o(a.slice(c,f),a,`${c}`):o;_(p)||i.output.push(p)}return i.index=f,!0}else return!1},"Ce"),Ee=m((r,o)=>i=>{const c=i.index,a=i.input;if(a.startsWith(r,c)){if(!_(o)&&!i.options.silent){const f=B(o)?o(r,a,`${c}`):o;_(f)||i.output.push(f)}return i.index+=r.length,!0}else return!1},"F"),ie=m((r,o,i,c)=>{const a=z(r),f=o>1;return ce(ae(Ae(p=>{let y=0;for(;y<i;){const k=p.index;if(!a(p)||(y+=1,p.index===k))break}return y>=o},f),c))},"k"),Te=m((r,o)=>ie(r,0,1,o),"L"),Y=m((r,o)=>ie(r,0,1/0,o),"$"),St=m((r,o)=>ie(r,1,1/0,o),"Re"),D=m((r,o)=>{const i=r.map(z);return ce(ae(Ae(c=>{for(let a=0,f=i.length;a<f;a++)if(!i[a](c))return!1;return!0}),o))},"x"),A=m((r,o)=>{const i=r.map(z);return ce(ae(c=>{for(let a=0,f=i.length;a<f;a++)if(i[a](c))return!0;return!1},o))},"p"),Ae=m((r,o=!0,i=!1)=>{const c=z(r);return o?a=>{const f=a.index,p=a.output.length,y=c(a);return!y&&!i&&(a.indexBacktrackMax=Math.max(a.indexBacktrackMax,a.index)),(!y||i)&&(a.index=f,a.output.length!==p&&(a.output.length=p)),y}:c},"q"),ae=m((r,o)=>{const i=z(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 _(p)||c.output.push(p),!0}else return!1}:i},"B"),ce=(()=>{let r=0;return o=>{const i=z(o),c=r+=1;return a=>{var f;if(a.options.memoization===!1)return i(a);const p=a.index,y=(f=a.cache)[c]||(f[c]={indexMax:-1,queue:[]}),k=y.queue;if(p<=y.indexMax){const K=y.store||(y.store=new Map);if(k.length){for(let W=0,zr=k.length;W<zr;W+=2){const Nr=k[W*2],Br=k[W*2+1];K.set(Nr,Br)}k.length=0}const S=K.get(p);if(S===!1)return!1;if($t(S))return a.index=S,!0;if(S)return a.index=S.index,S.output?.length&&a.output.push(...S.output),!0}const G=a.output.length,_r=i(a);if(y.indexMax=Math.max(y.indexMax,p),_r){const K=a.index,S=a.output.length;if(S>G){const W=a.output.slice(G,S);k.push(p,{index:K,output:W})}else k.push(p,K);return!0}else return k.push(p,!1),!1}}})(),Se=m(r=>{let o;return i=>(o||(o=z(r())),o(i))},"G"),z=kt(r=>{if(B(r))return je(r)?Se(r):r;if(ke(r)||wt(r))return d(r);if(X(r))return D(r);if(xt(r))return A(Object.values(r));throw new Error("Invalid rule")}),R=m(r=>r,"d"),Ct=m(r=>typeof r=="string","ke"),Mt=m(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 y=r(c,a);return f.set(c,y),y}},"Be"),_t=m(r=>{const o={},i={};return(c,a)=>{const f=a?.partial?i:o;return f[c]??(f[c]=r(c,a))}},"Pe"),zt=d(/\\./,R),Nt=d(/./,R),Bt=d(/\*\*\*+/,"*"),Rt=d(/([^/{[(!])\*\*/,(r,o)=>`${o}*`),It=d(/(^|.)\*\*(?=[^*/)\]}])/,(r,o)=>`${o}*`),Dt=Y(A([zt,Bt,Rt,It,Nt])),Ft=Dt,Wt=m(r=>Pe(r,Ft,{memoization:!1}).join(""),"Ie"),Lt=Wt,Ce="abcdefghijklmnopqrstuvwxyz",Vt=m(r=>{let o="";for(;r>0;){const i=(r-1)%26;o=Ce[i]+o,r=Math.floor((r-1)/26)}return o},"Le"),Me=m(r=>{let o=0;for(let i=0,c=r.length;i<c;i++)o=o*26+Ce.indexOf(r[i])+1;return o},"V"),ue=m((r,o)=>{if(o<r)return ue(o,r);const i=[];for(;r<=o;)i.push(r++);return i},"b"),Ut=m((r,o,i)=>ue(r,o).map(c=>String(c).padStart(i,"0")),"qe"),_e=m((r,o)=>ue(Me(r),Me(o)).map(Vt),"W"),w=m(r=>({partial:!1,regex:new RegExp(r,"s"),children:[]}),"c"),Z=m(r=>({children:r}),"y"),F=(()=>{const r=m((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 Z([]);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]}})(),N=m(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),qt=d(/\\./,w),Zt=d(/[$.*+?^(){}[\]\|]/,r=>w(`\\${r}`)),Gt=d(/[\\\/]/,N),Kt=d(/[^$.*+?^(){}[\]\|\\\/]+/,w),Jt=d(/^(?:!!)*!(.*)$/,(r,o)=>w(`(?!^${We.compile(o).source}$).*?`)),Ht=d(/^(!!)+/),Xt=A([Jt,Ht]),Yt=d(/\/(\*\*\/)+/,()=>Z([F([N(),w(".+?"),N()]),N()])),Qt=d(/^(\*\*\/)+/,()=>Z([w("^"),F([w(".*?"),N()])])),er=d(/\/(\*\*)$/,()=>Z([F([N(),w(".*?")]),w("$")])),tr=d(/\*\*/,()=>w(".*?")),ze=A([Yt,Qt,er,tr]),rr=d(/\*\/(?!\*\*\/|\*$)/,()=>F([w("[^\\\\/]*?"),N()])),nr=d(/\*/,()=>w("[^\\\\/]*")),Ne=A([rr,nr]),Be=d("?",()=>w("[^\\\\/]")),or=d("[",R),sr=d("]",R),ir=d(/[!^]/,"^\\\\/"),ar=d(/[a-z]-[a-z]|[0-9]-[0-9]/i,R),cr=d(/\\./,R),ur=d(/[$.*+?^(){}[\|]/,r=>`\\${r}`),lr=d(/[\\\/]/,"\\\\/"),fr=d(/[^$.*+?^(){}[\]\|\\\/]+/,R),pr=A([cr,ur,lr,ar,fr]),Re=D([or,Te(ir),Y(pr),sr],r=>w(r.join(""))),dr=d("{","(?:"),gr=d("}",")"),hr=d(/(\d+)\.\.(\d+)/,(r,o,i)=>Ut(+o,+i,Math.min(o.length,i.length)).join("|")),mr=d(/([a-z]+)\.\.([a-z]+)/,(r,o,i)=>_e(o,i).join("|")),yr=d(/([A-Z]+)\.\.([A-Z]+)/,(r,o,i)=>_e(o.toLowerCase(),i.toLowerCase()).join("|").toUpperCase()),br=A([hr,mr,yr]),Ie=D([dr,br,gr],r=>w(r.join(""))),vr=d("{"),$r=d("}"),xr=d(","),wr=d(/\\./,w),jr=d(/[$.*+?^(){[\]\|]/,r=>w(`\\${r}`)),Or=d(/[\\\/]/,N),kr=d(/[^$.*+?^(){}[\]\|\\\/,]+/,w),Pr=Se(()=>Fe),Er=d("",()=>w("(?:)")),Tr=St(A([ze,Ne,Be,Re,Ie,Pr,wr,jr,Or,kr]),F),De=A([Tr,Er]),Fe=D([vr,Te(D([De,Y(D([xr,De]))])),$r],Z),Ar=Y(A([Xt,ze,Ne,Be,Re,Ie,Fe,qt,Zt,Gt,Kt]),F),Sr=Ar,Cr=m(r=>Pe(r,Sr,{memoization:!1})[0],"kr"),Mr=Cr,le=m((r,o,i)=>le.compile(r,i).test(o),"N");le.compile=(()=>{const r=_t((i,c)=>ee(Mr(Lt(i)),c)),o=Mt((i,c)=>we(i.map(a=>r(a,c))));return(i,c)=>Ct(i)?r(i,c):o(i,c)})();var We=le;return h($)})();return e.default||e},"_lazyMatch"),Rr;const Ho=m((e,t)=>(Rr||(Rr=rn(),rn=null),Rr(e,t)),"zeptomatch"),Xo=/^[A-Z]:\//i,H=m((e="")=>e&&e.replaceAll("\\","/").replace(Xo,t=>t.toUpperCase()),"normalizeWindowsPath"),Yo=/^[/\\]{2}/,Qo=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Mn=/^[A-Z]:$/i,nn=/^\/([A-Z]:)?$/i,es=/.(\.[^./]+)$/,ts=/^[/\\]|^[a-z]:[/\\]/i,rs=/\/$/,ns=m(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),_n=m((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 $=n.lastIndexOf("/");$===-1?(n="",s=0):(n=n.slice(0,$),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"),fe=m(e=>Qo.test(e),"isAbsolute"),zn=m(function(e){if(e.length===0)return".";e=H(e);const t=Yo.exec(e),n=fe(e),s=e.at(-1)==="/";return e=_n(e,!n),e.length===0?n?"/":s?"./":".":(s&&(e+="/"),Mn.test(e)&&(e+="/"),t?n?`//${e}`:`//./${e}`:n&&!fe(e)?`/${e}`:e)},"normalize"),Nn=m((...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 zn(t)},"join"),Q=m(function(...e){e=e.map(s=>H(s));let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const u=s>=0?e[s]:ns();!u||u.length===0||(t=`${u}/${t}`,n=fe(u))}return t=_n(t,!n),n&&!fe(t)?`/${t}`:t.length>0?t:"."},"resolve");m(function(e){return H(e)},"toNamespacedPath");const Bn=m(function(e){return es.exec(H(e))?.[1]??""},"extname");m(function(e,t){const n=Q(e).replace(nn,"$1").split("/"),s=Q(t).replace(nn,"$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 Ur=m(e=>{const t=H(e).replace(rs,"").split("/").slice(0,-1);return t.length===1&&Mn.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(fe(e)?"/":".")},"dirname");m(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return H(e.root?Q(...t):t.join("/"))},"format");const os=m((e,t)=>{const n=H(e).split("/").pop();return t&&n.endsWith(t)?n.slice(0,-t.length):n},"basename"),Rn=m(function(e){const t=ts.exec(e)?.[0]?.replaceAll("\\","/")??"",n=os(e),s=Bn(n);return{base:n,dir:Ur(e),ext:s,name:n.slice(0,n.length-s.length),root:t}},"parse");m((e,t)=>Ho(t,zn(e)),"matchesGlob");var ss=Object.defineProperty,V=M((e,t)=>ss(e,"name",{value:t,configurable:!0}),"i$2");const is=$e(import.meta.url),Ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,as=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 is(e)},"__cjs_getBuiltinModule"),{fileURLToPath:cs}=as("node:url");function ut(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}x(ut,"dn");ve(ut,"Nr");M(ut,"w$1");V(ut,"getDefaultExportFromCjs");var on,sn;function lt(){return sn||(sn=1,on=["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"]),on}x(lt,"gn");ve(lt,"Dr");M(lt,"y$2");V(lt,"requireBinaryExtensions");var us=lt();const ls=ut(us),fs=new Set(ls),ps=new Set(["/","\\",void 0]),an=Symbol.for("pathe:normalizedAlias"),ds=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,gs=V((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),at=V((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),In=V(e=>{if(e[an])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([n],[s])=>gs(n,s)));for(const n in t)for(const s in t)s===n||n.startsWith(s)||t[n].startsWith(s)&&ps.has(t[n][s.length])&&(t[n]=t[s]+t[n].slice(s.length));return Object.defineProperty(t,an,{enumerable:!1,value:!0}),t},"normalizeAliases");V((e,t)=>{e=H(e),t=In(t);for(const[n,s]of Object.entries(t)){if(!e.startsWith(n))continue;const u=at(n)?n.slice(0,-1):n;if(at(e[u.length]))return Nn(s,e.slice(n.length))}return e},"resolveAlias");V(e=>ds.exec(e)?.[2],"filename");V((e,t)=>{e=H(e),t=In(t);for(const[n,s]of Object.entries(t).toReversed()){if(!e.startsWith(s))continue;const u=at(s)?s.slice(0,-1):s;if(at(e[u.length]))return Nn(n,e.slice(s.length))}return e},"reverseResolveAlias");const hs=/^(?:\.?\.[/\\]|\.\.\B)/,ms=/^(?:msys|cygwin)$/;V(e=>hs.test(e)||e==="..","isRelative");V(e=>fs.has(Bn(e).slice(1).toLowerCase()),"isBinaryPath");const be=V(e=>H(e instanceof URL?cs(e):e),"toPath");V(()=>{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:ms.test(e)},"isWindows");var ys=Object.defineProperty,bs=M((e,t)=>ys(e,"name",{value:t,configurable:!0}),"p"),vs=Object.defineProperty,Dn=bs((e,t)=>vs(e,"name",{value:t,configurable:!0}),"a");const $s=$e(import.meta.url),qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Fn=Dn(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 $s(e)},"__cjs_getBuiltinModule"),{stat:xs,lstat:ws}=Fn("node:fs/promises"),{fileURLToPath:js}=Fn("node:url");var Os=Object.defineProperty,cn=Dn((e,t)=>Os(e,"name",{value:t,configurable:!0}),"n");const ks=cn(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?be(t.cwd):process.cwd();let s=Q(n);const{root:u}=Rn(s),l=be(t.stopAt??u),g=Q(s,l),h=t.type??"file",$=cn(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?xs:ws;for(;s&&s!==g&&s!==u;){const j=await $(s);for(let v of j){if(v===Sn)return;if(v===void 0)continue;Buffer.isBuffer(v)?v=v.toString():v instanceof URL&&(v=js(v));const C=fe(v)?v:Q(s,v);try{const E=await O(C);if(h==="file"&&E.isFile()||h==="directory"&&E.isDirectory())return C}catch{}}s=Ur(s)}},"findUp");var Ps=Object.defineProperty,Es=M((e,t)=>Ps(e,"name",{value:t,configurable:!0}),"u$3"),Ts=Object.defineProperty,Wn=Es((e,t)=>Ts(e,"name",{value:t,configurable:!0}),"i");const As=$e(import.meta.url),Ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ln=Wn(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 As(e)},"__cjs_getBuiltinModule"),{statSync:Ss,lstatSync:Cs}=Ln("node:fs"),{fileURLToPath:Ms}=Ln("node:url");var _s=Object.defineProperty,un=Wn((e,t)=>_s(e,"name",{value:t,configurable:!0}),"o");const zs=un((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?be(t.cwd):process.cwd();let s=Q(n);const{root:u}=Rn(s),l=be(t.stopAt??u),g=Q(s,l),h=t.type??"file",$=un(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?Ss:Cs;for(;s&&s!==g&&s!==u;){for(let j of $(s)){if(j===Sn)return;if(j===void 0)continue;Buffer.isBuffer(j)?j=j.toString():j instanceof URL&&(j=Ms(j));const v=fe(j)?j:Q(s,j);try{const C=O(v);if(h==="file"&&C.isFile()||h==="directory"&&C.isDirectory())return v}catch{}}s=Ur(s)}},"findUpSync");var Ns=Object.defineProperty,Vn=M((e,t)=>Ns(e,"name",{value:t,configurable:!0}),"t$2"),Bs=Object.defineProperty,qr=Vn((e,t)=>Bs(e,"name",{value:t,configurable:!0}),"s");const Rs=$e(import.meta.url),Ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Is=qr(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 Rs(e)},"__cjs_getBuiltinModule"),{access:Ds}=Is("node:fs/promises");var Fs=Object.defineProperty,Ws=qr((e,t)=>Fs(e,"name",{value:t,configurable:!0}),"o");async function re(e,t=An){Vr(e),e=be(e);try{return await Ds(e,t),!0}catch{return!1}}x(re,"Q$2");ve(re,"se");M(re,"i$1");Vn(re,"d");qr(re,"m");Ws(re,"isAccessible");var Ls=Object.defineProperty,Un=M((e,t)=>Ls(e,"name",{value:t,configurable:!0}),"t$1"),Vs=Object.defineProperty,Zr=Un((e,t)=>Vs(e,"name",{value:t,configurable:!0}),"t");const Us=$e(import.meta.url),Ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,qs=Zr(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 Us(e)},"__cjs_getBuiltinModule"),{accessSync:Zs}=qs("node:fs");var Gs=Object.defineProperty,Ks=Zr((e,t)=>Gs(e,"name",{value:t,configurable:!0}),"o");function ne(e,t=An){Vr(e),e=be(e);try{return Zs(e,t),!0}catch{return!1}}x(ne,"ee$1");ve(ne,"ie");M(ne,"i");Un(ne,"d");Zr(ne,"m");Ks(ne,"isAccessibleSync");var Js=Object.defineProperty,qn=M((e,t)=>Js(e,"name",{value:t,configurable:!0}),"o"),Hs=Object.defineProperty,Zn=qn((e,t)=>Hs(e,"name",{value:t,configurable:!0}),"o"),Xs=Object.defineProperty,Ys=Zn((e,t)=>Xs(e,"name",{value:t,configurable:!0}),"o");let Gn=class extends Error{static{x(this,"Jn")}static{ve(this,"Xr")}static{M(this,"s")}static{qn(this,"u")}static{Zn(this,"n")}static{Ys(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 Qs=Object.defineProperty,ei=M((e,t)=>Qs(e,"name",{value:t,configurable:!0}),"$e"),ti=Object.defineProperty,Gr=ei((e,t)=>ti(e,"name",{value:t,configurable:!0}),"W"),ri=Object.defineProperty,b=Gr((e,t)=>ri(e,"name",{value:t,configurable:!0}),"u$1");let ln=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"),$={};l($,{zeptomatch:b(()=>We,"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,y=f.length;p<y;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"),v=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=E(r.children.map(y=>v(y,o,i)).filter(Boolean));if(p?.length){const y=r.children.some(G=>!G.regex||!(G.partial??o)),k=p.length>1||a&&(!f.length||y);f+=k?a?"(?:$|":"(?:":"",f+=p.join("|"),f+=k?")":""}}return r.regex&&(f+=a?")":""),i.set(r,f),f},"O"),C=b((r,o)=>{const i=new Map,c=O(r);for(let a=c.length-1;a>=0;a--){const f=v(c[a],o,i);if(!(a>0))return f}return""},"ie"),E=b(r=>Array.from(new Set(r)),"ue"),P=b((r,o,i)=>P.compile(r,i).test(o),"R");P.compile=(r,o)=>{const i=o?.partial??!1,c=C(r,i),a=j(r);return new RegExp(`^(?:${c})$`,a)};var U=P,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"),ee=q,xe=b(r=>{const o=r.map(c=>c.source).join("|")||"$^",i=r[0]?.flags;return new RegExp(o,i)},"ve"),we=xe,X=b(r=>Array.isArray(r),"j"),B=b(r=>typeof r=="function","_"),je=b(r=>r.length===0,"he"),Oe=(()=>{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))})(),$t=b(r=>typeof r=="number","de"),xt=b(r=>typeof r=="object"&&r!==null,"xe"),wt=b(r=>r instanceof RegExp,"me"),jt=(()=>{const r=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return o=>r.test(o.source)})(),Ot=(()=>{const r=/^[a-zA-Z0-9_-]+$/;return o=>r.test(o.source)&&!o.flags.includes("i")})(),ke=b(r=>typeof r=="string","A"),_=b(r=>r===void 0,"f"),kt=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"),Pe=b((r,o,i={})=>{const c={cache:{},input:r,index:0,indexBacktrackMax:0,options:i,output:[]},a=z(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)=>X(r)?Pt(r,o):ke(r)?Ee(r,o):Et(r,o),"i"),Pt=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(!_(o)&&!c.options.silent){const y=a.slice(f,p),k=B(o)?o(y,a,`${f}`):o;_(k)||c.output.push(k)}c.index=p}return!0}},"we"),Et=b((r,o)=>{if(Ot(r))return Ee(r.source,o);{const i=r.source,c=r.flags.replace(/y|$/,"y"),a=new RegExp(i,c);return jt(r)&&B(o)&&!Oe(o)?Tt(a,o):At(a,o)}},"$e"),Tt=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 y=o(...f,a,`${c}`);_(y)||i.output.push(y)}return i.index=p,!0}else return!1},"Ee"),At=b((r,o)=>i=>{const c=i.index,a=i.input;if(r.lastIndex=c,r.test(a)){const f=r.lastIndex;if(!_(o)&&!i.options.silent){const p=B(o)?o(a.slice(c,f),a,`${c}`):o;_(p)||i.output.push(p)}return i.index=f,!0}else return!1},"Ce"),Ee=b((r,o)=>i=>{const c=i.index,a=i.input;if(a.startsWith(r,c)){if(!_(o)&&!i.options.silent){const f=B(o)?o(r,a,`${c}`):o;_(f)||i.output.push(f)}return i.index+=r.length,!0}else return!1},"F"),ie=b((r,o,i,c)=>{const a=z(r),f=o>1;return ce(ae(Ae(p=>{let y=0;for(;y<i;){const k=p.index;if(!a(p)||(y+=1,p.index===k))break}return y>=o},f),c))},"k"),Te=b((r,o)=>ie(r,0,1,o),"L"),Y=b((r,o)=>ie(r,0,1/0,o),"$"),St=b((r,o)=>ie(r,1,1/0,o),"Re"),D=b((r,o)=>{const i=r.map(z);return ce(ae(Ae(c=>{for(let a=0,f=i.length;a<f;a++)if(!i[a](c))return!1;return!0}),o))},"x"),A=b((r,o)=>{const i=r.map(z);return ce(ae(c=>{for(let a=0,f=i.length;a<f;a++)if(i[a](c))return!0;return!1},o))},"p"),Ae=b((r,o=!0,i=!1)=>{const c=z(r);return o?a=>{const f=a.index,p=a.output.length,y=c(a);return!y&&!i&&(a.indexBacktrackMax=Math.max(a.indexBacktrackMax,a.index)),(!y||i)&&(a.index=f,a.output.length!==p&&(a.output.length=p)),y}:c},"q"),ae=b((r,o)=>{const i=z(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 _(p)||c.output.push(p),!0}else return!1}:i},"B"),ce=(()=>{let r=0;return o=>{const i=z(o),c=r+=1;return a=>{var f;if(a.options.memoization===!1)return i(a);const p=a.index,y=(f=a.cache)[c]||(f[c]={indexMax:-1,queue:[]}),k=y.queue;if(p<=y.indexMax){const K=y.store||(y.store=new Map);if(k.length){for(let W=0,zr=k.length;W<zr;W+=2){const Nr=k[W*2],Br=k[W*2+1];K.set(Nr,Br)}k.length=0}const S=K.get(p);if(S===!1)return!1;if($t(S))return a.index=S,!0;if(S)return a.index=S.index,S.output?.length&&a.output.push(...S.output),!0}const G=a.output.length,_r=i(a);if(y.indexMax=Math.max(y.indexMax,p),_r){const K=a.index,S=a.output.length;if(S>G){const W=a.output.slice(G,S);k.push(p,{index:K,output:W})}else k.push(p,K);return!0}else return k.push(p,!1),!1}}})(),Se=b(r=>{let o;return i=>(o||(o=z(r())),o(i))},"G"),z=kt(r=>{if(B(r))return je(r)?Se(r):r;if(ke(r)||wt(r))return d(r);if(X(r))return D(r);if(xt(r))return A(Object.values(r));throw new Error("Invalid rule")}),R=b(r=>r,"d"),Ct=b(r=>typeof r=="string","ke"),Mt=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 y=r(c,a);return f.set(c,y),y}},"Be"),_t=b(r=>{const o={},i={};return(c,a)=>{const f=a?.partial?i:o;return f[c]??(f[c]=r(c,a))}},"Pe"),zt=d(/\\./,R),Nt=d(/./,R),Bt=d(/\*\*\*+/,"*"),Rt=d(/([^/{[(!])\*\*/,(r,o)=>`${o}*`),It=d(/(^|.)\*\*(?=[^*/)\]}])/,(r,o)=>`${o}*`),Dt=Y(A([zt,Bt,Rt,It,Nt])),Ft=Dt,Wt=b(r=>Pe(r,Ft,{memoization:!1}).join(""),"Ie"),Lt=Wt,Ce="abcdefghijklmnopqrstuvwxyz",Vt=b(r=>{let o="";for(;r>0;){const i=(r-1)%26;o=Ce[i]+o,r=Math.floor((r-1)/26)}return o},"Le"),Me=b(r=>{let o=0;for(let i=0,c=r.length;i<c;i++)o=o*26+Ce.indexOf(r[i])+1;return o},"V"),ue=b((r,o)=>{if(o<r)return ue(o,r);const i=[];for(;r<=o;)i.push(r++);return i},"b"),Ut=b((r,o,i)=>ue(r,o).map(c=>String(c).padStart(i,"0")),"qe"),_e=b((r,o)=>ue(Me(r),Me(o)).map(Vt),"W"),w=b(r=>({partial:!1,regex:new RegExp(r,"s"),children:[]}),"c"),Z=b(r=>({children:r}),"y"),F=(()=>{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 Z([]);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]}})(),N=b(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),qt=d(/\\./,w),Zt=d(/[$.*+?^(){}[\]\|]/,r=>w(`\\${r}`)),Gt=d(/[\\\/]/,N),Kt=d(/[^$.*+?^(){}[\]\|\\\/]+/,w),Jt=d(/^(?:!!)*!(.*)$/,(r,o)=>w(`(?!^${We.compile(o).source}$).*?`)),Ht=d(/^(!!)+/),Xt=A([Jt,Ht]),Yt=d(/\/(\*\*\/)+/,()=>Z([F([N(),w(".+?"),N()]),N()])),Qt=d(/^(\*\*\/)+/,()=>Z([w("^"),F([w(".*?"),N()])])),er=d(/\/(\*\*)$/,()=>Z([F([N(),w(".*?")]),w("$")])),tr=d(/\*\*/,()=>w(".*?")),ze=A([Yt,Qt,er,tr]),rr=d(/\*\/(?!\*\*\/|\*$)/,()=>F([w("[^\\\\/]*?"),N()])),nr=d(/\*/,()=>w("[^\\\\/]*")),Ne=A([rr,nr]),Be=d("?",()=>w("[^\\\\/]")),or=d("[",R),sr=d("]",R),ir=d(/[!^]/,"^\\\\/"),ar=d(/[a-z]-[a-z]|[0-9]-[0-9]/i,R),cr=d(/\\./,R),ur=d(/[$.*+?^(){}[\|]/,r=>`\\${r}`),lr=d(/[\\\/]/,"\\\\/"),fr=d(/[^$.*+?^(){}[\]\|\\\/]+/,R),pr=A([cr,ur,lr,ar,fr]),Re=D([or,Te(ir),Y(pr),sr],r=>w(r.join(""))),dr=d("{","(?:"),gr=d("}",")"),hr=d(/(\d+)\.\.(\d+)/,(r,o,i)=>Ut(+o,+i,Math.min(o.length,i.length)).join("|")),mr=d(/([a-z]+)\.\.([a-z]+)/,(r,o,i)=>_e(o,i).join("|")),yr=d(/([A-Z]+)\.\.([A-Z]+)/,(r,o,i)=>_e(o.toLowerCase(),i.toLowerCase()).join("|").toUpperCase()),br=A([hr,mr,yr]),Ie=D([dr,br,gr],r=>w(r.join(""))),vr=d("{"),$r=d("}"),xr=d(","),wr=d(/\\./,w),jr=d(/[$.*+?^(){[\]\|]/,r=>w(`\\${r}`)),Or=d(/[\\\/]/,N),kr=d(/[^$.*+?^(){}[\]\|\\\/,]+/,w),Pr=Se(()=>Fe),Er=d("",()=>w("(?:)")),Tr=St(A([ze,Ne,Be,Re,Ie,Pr,wr,jr,Or,kr]),F),De=A([Tr,Er]),Fe=D([vr,Te(D([De,Y(D([xr,De]))])),$r],Z),Ar=Y(A([Xt,ze,Ne,Be,Re,Ie,Fe,qt,Zt,Gt,Kt]),F),Sr=Ar,Cr=b(r=>Pe(r,Sr,{memoization:!1})[0],"kr"),Mr=Cr,le=b((r,o,i)=>le.compile(r,i).test(o),"N");le.compile=(()=>{const r=_t((i,c)=>ee(Mr(Lt(i)),c)),o=Mt((i,c)=>we(i.map(a=>r(a,c))));return(i,c)=>Ct(i)?r(i,c):o(i,c)})();var We=le;return h($)})();return e.default||e},"_lazyMatch"),Ir;const ni=b((e,t)=>(Ir||(Ir=ln(),ln=null),Ir(e,t)),"default");var oi=Object.defineProperty,si=Gr((e,t)=>oi(e,"name",{value:t,configurable:!0}),"t$1");const ii=/^[A-Z]:\//i,pe=si((e="")=>e&&e.replaceAll("\\","/").replace(ii,t=>t.toUpperCase()),"normalizeWindowsPath");var ai=Object.defineProperty,I=Gr((e,t)=>ai(e,"name",{value:t,configurable:!0}),"r");const ci=/^[/\\]{2}/,ui=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Kn=/^[A-Z]:$/i,fn=/^\/([A-Z]:)?$/i,li=/.(\.[^./]+)$/,fi=/^[/\\]|^[a-z]:[/\\]/i,pi=/\/$/,di=I(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Jn=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 $=n.lastIndexOf("/");$===-1?(n="",s=0):(n=n.slice(0,$),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"),Ye=I(e=>ui.test(e),"isAbsolute"),Hn=I(function(e){if(e.length===0)return".";e=pe(e);const t=ci.exec(e),n=Ye(e),s=e.at(-1)==="/";return e=Jn(e,!n),e.length===0?n?"/":s?"./":".":(s&&(e+="/"),Kn.test(e)&&(e+="/"),t?n?`//${e}`:`//./${e}`:n&&!Ye(e)?`/${e}`:e)},"normalize"),te=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 Hn(t)},"join"),Wr=I(function(...e){e=e.map(s=>pe(s));let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const u=s>=0?e[s]:di();!u||u.length===0||(t=`${u}/${t}`,n=Ye(u))}return t=Jn(t,!n),n&&!Ye(t)?`/${t}`:t.length>0?t:"."},"resolve");I(function(e){return pe(e)},"toNamespacedPath");const gi=I(function(e){return li.exec(pe(e))?.[1]??""},"extname");I(function(e,t){const n=Wr(e).replace(fn,"$1").split("/"),s=Wr(t).replace(fn,"$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 Kr=I(e=>{const t=pe(e).replace(pi,"").split("/").slice(0,-1);return t.length===1&&Kn.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(Ye(e)?"/":".")},"dirname");I(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return pe(e.root?Wr(...t):t.join("/"))},"format");const hi=I((e,t)=>{const n=pe(e).split("/").pop();return t&&n.endsWith(t)?n.slice(0,-t.length):n},"basename");I(function(e){const t=fi.exec(e)?.[0]?.replaceAll("\\","/")??"",n=hi(e),s=gi(n);return{base:n,dir:Kr(e),ext:s,name:n.slice(0,n.length-s.length),root:t}},"parse");I((e,t)=>ni(t,Hn(e)),"matchesGlob");var mi=Object.defineProperty,Jr=M((e,t)=>mi(e,"name",{value:t,configurable:!0}),"u");const ct=Jr((e,t)=>(t?.create&&Ko(e),e),"useDirectory");Jr(async(e,t)=>{if(me.CACHE_DIR&&!["0","1","false","true"].includes(me.CACHE_DIR))return ct(te(me.CACHE_DIR,e),t);const n=await ks("package.json",{cwd:t?.cwd??Tn(),type:"file"});if(!n){if(t?.throwError)throw new Gn("No such file or directory found.");return}const s=te(Kr(n),"node_modules"),u=te(s,".cache"),l=te(u,e);if(!(he(l)&&!await re(l,ye))&&!(he(u)&&!await re(u,ye))&&!(he(s)&&!await re(s,ye)))return ct(l,t)},"findCacheDirectory");const yi=Jr((e,t)=>{if(me.CACHE_DIR&&!["0","1","false","true"].includes(me.CACHE_DIR))return ct(te(me.CACHE_DIR,e),t);const n=zs("package.json",{cwd:t?.cwd??Tn(),type:"file"});if(!n){if(t?.throwError)throw new Gn("No such file or directory found.");return}const s=te(Kr(n),"node_modules"),u=te(s,".cache"),l=te(u,e);if(!(he(l)&&!ne(l,ye))&&!(he(u)&&!ne(u,ye))&&!(he(s)&&!ne(s,ye)))return ct(l,t)},"findCacheDirectorySync"),Xn=yi;var bi=Object.defineProperty,vi=x((e,t)=>bi(e,"name",{value:t,configurable:!0}),"i$7"),$i=Object.defineProperty,xi=vi((e,t)=>$i(e,"name",{value:t,configurable:!0}),"r"),wi=Object.defineProperty,ji=xi((e,t)=>wi(e,"name",{value:t,configurable:!0}),"i");const pn=ji(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var Oi=Object.defineProperty,ki=x((e,t)=>Oi(e,"name",{value:t,configurable:!0}),"i$6"),Pi=Object.defineProperty,Yn=ki((e,t)=>Pi(e,"name",{value:t,configurable:!0}),"s");const Ei=tt(import.meta.url),Je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ti=Yn(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 Ei(e)},"__cjs_getBuiltinModule"),{lstatSync:dn,mkdirSync:Ai}=Ti("node:fs");var Si=Object.defineProperty,Ci=Yn((e,t)=>Si(e,"name",{value:t,configurable:!0}),"o");const ft=Ci(e=>{jn(e);try{const t=dn(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(pn(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{Ai(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const n=dn(e);if(!n.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(pn(n))}'`,{cause:t})}},"ensureDirSync");var Mi=Object.defineProperty,_i=x((e,t)=>Mi(e,"name",{value:t,configurable:!0}),"x$2"),zi=Object.defineProperty,Qn=_i((e,t)=>zi(e,"name",{value:t,configurable:!0}),"$"),Ni=Object.defineProperty,Bi=Qn((e,t)=>Ni(e,"name",{value:t,configurable:!0}),"A"),Ri=Object.defineProperty,Hr=Bi((e,t)=>Ri(e,"name",{value:t,configurable:!0}),"$"),Ii=Object.defineProperty,Di=Hr((e,t)=>Ii(e,"name",{value:t,configurable:!0}),"r$1");const Fi=Di(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
2
- `),"normalizeLF"),Wi=globalThis.process??Object.create(null),gn={versions:{}},hn=new Proxy(Wi,{get(e,t){if(t in e)return e[t];if(t in gn)return gn[t]}});var Li=Object.defineProperty,Vi=Hr((e,t)=>Li(e,"name",{value:t,configurable:!0}),"b");const Ui=Vi((e,t,n,s)=>{const u={column:0,line:-1,...e.start},l={...u,...e.end},g=u.line,h=u.column,$=l.line,O=l.column;let j=Math.max(g-(n+1),0),v=Math.min(t.length,$+s);g===-1&&(j=0),$===-1&&(v=t.length);const C=$-g,E={};if(C)for(let P=0;P<=C;P++){const U=P+g;if(!h)E[U]=!0;else if(P===0){const q=t[U-1]?.length;E[U]=[h,(q??0)-h+1]}else if(P===C)E[U]=[0,O];else{const q=t[U-P]?.length;E[U]=[0,q]}}else h===O?E[g]=h?[h,0]:!0:E[g]=[h,(O??0)-(h??0)];return{end:v,markerLines:E,start:j}},"getMarkerLines");var qi=Object.defineProperty,it=Hr((e,t)=>qi(e,"name",{value:t,configurable:!0}),"t");const Zi=hn.platform==="win32"&&!hn.env?.WT_SESSION?">":"❯",Gi=it((e,t,n)=>{const s={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...n,color:{gutter:it(P=>P,"gutter"),marker:it(P=>P,"marker"),message:it(P=>P,"message"),...n?.color}},u=typeof t.start.column=="number";let l=Fi(e).split(`
3
- `);typeof s.tabWidth=="number"&&(l=l.map(P=>P.replaceAll(" "," ".repeat(s.tabWidth))));const{end:g,markerLines:h,start:$}=Ui(t,l,s.linesAbove,s.linesBelow),O=String(g).length,{gutter:j,marker:v,message:C}=s.color;let E=l.slice($,g).map((P,U)=>{const q=$+1+U,ee=h[q],xe=` ${String(q)}`.slice(-O),we=!h[q+1],X=` ${xe}${s.showGutter?" |":""}`;if(ee){let B="";if(Array.isArray(ee)){const je=P.replaceAll(/[^\t]/g," ").slice(0,Math.max(ee[0]-1,0)),Oe=ee[1]||1;B=[`
4
- `,s.prefix+j(X.replaceAll(/\d/g," "))," ",je,v("^").repeat(Oe)].join(""),we&&s.message&&(B+=` ${C(s.message)}`)}return[s.prefix+v(Zi),j(X),P.length>0?` ${P}`:"",B].join("")}return`${s.prefix} ${j(X)}${P.length>0?` ${P}`:""}`}).join(`
5
- `);return s.message&&!u&&(E=`${s.prefix+" ".repeat(O+1)+s.message}
6
- ${E}`),E},"codeFrame");var Ki=Object.defineProperty,Ji=Qn((e,t)=>Ki(e,"name",{value:t,configurable:!0}),"s"),Hi=Object.defineProperty,Xi=Ji((e,t)=>Hi(e,"name",{value:t,configurable:!0}),"o"),Yi=Object.defineProperty,Xr=Xi((e,t)=>Yi(e,"name",{value:t,configurable:!0}),"l");const mn=Xr((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)/,ea=Xr(e=>e.split(Qi).reduce((t,n)=>(t.push(t.at(-1)+n.length+1),t),[0]),"getLineStartIndexes"),ta=Xr((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=ea(e),g=mn(t,l);return{column:t-l[g]+1,line:g+1}}const u=mn(t,e);return{column:t-e[u]+1,line:u+1}},"indexToLineColumn");var ra=Object.defineProperty,eo=x((e,t)=>ra(e,"name",{value:t,configurable:!0}),"t$6"),na=Object.defineProperty,to=eo((e,t)=>na(e,"name",{value:t,configurable:!0}),"t"),oa=Object.defineProperty,sa=to((e,t)=>oa(e,"name",{value:t,configurable:!0}),"i");let ia=class extends Error{static{x(this,"m")}static{eo(this,"m")}static{to(this,"t")}static{sa(this,"JSONError")}fileName;codeFrame;name="JSONError";#e;constructor(t){super(),this.#e=t}get message(){return`${this.#e}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
1
+ var co=Object.defineProperty;var m=(e,t)=>co(e,"name",{value:t,configurable:!0});import{createRequire as uo}from"node:module";import{f as nr,$ as mo,U as or,i as B,_ as Bt,K as Ce,s as ho,M as A,a as sr}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{createJiti as ir}from"jiti";import"../packem_shared/otelPlugin-CJR2T_lk.js";import"../packem_shared/definePlugin-CWm4Dv_t.js";const lo=uo(import.meta.url),ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lt=m(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 lo(e)},"__cjs_getBuiltinModule"),{createHash:tr}=lt("node:crypto"),{readdirSync:rr,readFileSync:fo,copyFileSync:po,unlinkSync:go}=lt("node:fs"),{createRequire:Se}=lt("node:module");var yo=Object.defineProperty,D=m((e,t)=>yo(e,"name",{value:t,configurable:!0}),"O$2"),bo=Object.defineProperty,k=D((e,t)=>bo(e,"name",{value:t,configurable:!0}),"h");const vo=Se(import.meta.url),ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ar=k(e=>{if(typeof ae<"u"&&ae.versions&&ae.versions.node){const[t,r]=ae.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ae.getBuiltinModule(e)}return vo(e)},"__cjs_getBuiltinModule"),{existsSync:ce}=ar("node:fs"),{env:ue,cwd:cr}=ae,{createRequire:pe}=ar("node:module"),ur=0,le=2,lr=Symbol("findUpStop");var $o=Object.defineProperty,wo=k((e,t)=>$o(e,"name",{value:t,configurable:!0}),"t$4"),jo=Object.defineProperty,xo=wo((e,t)=>jo(e,"name",{value:t,configurable:!0}),"t"),Oo=Object.defineProperty,ko=xo((e,t)=>Oo(e,"name",{value:t,configurable:!0}),"n");const ft=ko(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var Po=Object.defineProperty,To=k((e,t)=>Po(e,"name",{value:t,configurable:!0}),"i$4"),Eo=Object.defineProperty,So=To((e,t)=>Eo(e,"name",{value:t,configurable:!0}),"r"),Co=Object.defineProperty,Ao=So((e,t)=>Co(e,"name",{value:t,configurable:!0}),"i");const Dt=Ao(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var _o=Object.defineProperty,No=k((e,t)=>_o(e,"name",{value:t,configurable:!0}),"i$3"),Mo=Object.defineProperty,fr=No((e,t)=>Mo(e,"name",{value:t,configurable:!0}),"s");const zo=pe(import.meta.url),be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Bo=fr(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 zo(e)},"__cjs_getBuiltinModule"),{lstatSync:It,mkdirSync:Do}=Bo("node:fs");var Io=Object.defineProperty,Ro=fr((e,t)=>Io(e,"name",{value:t,configurable:!0}),"o");const Fo=Ro(e=>{ft(e);try{const t=It(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Dt(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{Do(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=It(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Dt(r))}'`,{cause:t})}},"ensureDirSync");var Wo=Object.defineProperty,Lo=k((e,t)=>Wo(e,"name",{value:t,configurable:!0}),"$e"),Vo=Object.defineProperty,pt=Lo((e,t)=>Vo(e,"name",{value:t,configurable:!0}),"W"),Uo=Object.defineProperty,g=pt((e,t)=>Uo(e,"name",{value:t,configurable:!0}),"u$1");let Rt=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(()=>zt,"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 h=0,j=p.length;h<j;h++)a.push(p[h])}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 h=p.regex.flags;if(s||(s=h),s!==h)throw new Error(`Inconsistent RegExp flags used: "${s}" and "${h}"`)}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 h=P(o.children.map(j=>y(j,s,a)).filter(Boolean));if(h?.length){const j=o.children.some(me=>!me.regex||!(me.partial??s)),S=h.length>1||u&&(!p.length||j);p+=S?u?"(?:$|":"(?:":"",p+=h.join("|"),p+=S?")":""}}return o.regex&&(p+=u?")":""),a.set(o,p),p},"O"),E=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"),P=g(o=>Array.from(new Set(o)),"ue"),x=g((o,s,a)=>x.compile(o,a).test(s),"R");x.compile=(o,s)=>{const a=s?.partial??!1,l=E(o,a),u=$(o);return new RegExp(`^(?:${l})$`,u)};var _=x,F=g((o,s)=>{const a=_.compile(o,s),l=`${a.source.slice(0,-1)}[\\\\/]?$`,u=a.flags;return new RegExp(l,u)},"le"),re=F,Ye=g(o=>{const s=o.map(l=>l.source).join("|")||"$^",a=o[0]?.flags;return new RegExp(s,a)},"ve"),Qe=Ye,ne=g(o=>Array.isArray(o),"j"),W=g(o=>typeof o=="function","_"),et=g(o=>o.length===0,"he"),tt=(()=>{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))})(),Ur=g(o=>typeof o=="number","de"),qr=g(o=>typeof o=="object"&&o!==null,"xe"),Kr=g(o=>o instanceof RegExp,"me"),Gr=(()=>{const o=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return s=>o.test(s.source)})(),Jr=(()=>{const o=/^[a-zA-Z0-9_-]+$/;return s=>o.test(s.source)&&!s.flags.includes("i")})(),vt=g(o=>typeof o=="string","A"),U=g(o=>o===void 0,"f"),Hr=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"),$t=g((o,s,a={})=>{const l={cache:{},input:o,index:0,indexBacktrackMax:0,options:a,output:[]},u=q(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)=>ne(o)?Zr(o,s):vt(o)?wt(o,s):Xr(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,h=p;for(;h<u.length&&u.charCodeAt(h)in a;)h+=1;if(h>p){if(!U(s)&&!l.options.silent){const j=u.slice(p,h),S=W(s)?s(j,u,`${p}`):s;U(S)||l.output.push(S)}l.index=h}return!0}},"we"),Xr=g((o,s)=>{if(Jr(o))return wt(o.source,s);{const a=o.source,l=o.flags.replace(/y|$/,"y"),u=new RegExp(a,l);return Gr(o)&&W(s)&&!tt(s)?Yr(u,s):Qr(u,s)}},"$e"),Yr=g((o,s)=>a=>{const l=a.index,u=a.input;o.lastIndex=l;const p=o.exec(u);if(p){const h=o.lastIndex;if(!a.options.silent){const j=s(...p,u,`${l}`);U(j)||a.output.push(j)}return a.index=h,!0}else return!1},"Ee"),Qr=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 h=W(s)?s(u.slice(l,p),u,`${l}`):s;U(h)||a.output.push(h)}return a.index=p,!0}else return!1},"Ce"),wt=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"),rt=g((o,s,a,l)=>{const u=q(o),p=s>1;return ot(nt(xt(h=>{let j=0;for(;j<a;){const S=h.index;if(!u(h)||(j+=1,h.index===S))break}return j>=s},p),l))},"k"),jt=g((o,s)=>rt(o,0,1,s),"L"),Re=g((o,s)=>rt(o,0,1/0,s),"$"),en=g((o,s)=>rt(o,1,1/0,s),"Re"),oe=g((o,s)=>{const a=o.map(q);return ot(nt(xt(l=>{for(let u=0,p=a.length;u<p;u++)if(!a[u](l))return!1;return!0}),s))},"x"),N=g((o,s)=>{const a=o.map(q);return ot(nt(l=>{for(let u=0,p=a.length;u<p;u++)if(a[u](l))return!0;return!1},s))},"p"),xt=g((o,s=!0,a=!1)=>{const l=q(o);return s?u=>{const p=u.index,h=u.output.length,j=l(u);return!j&&!a&&(u.indexBacktrackMax=Math.max(u.indexBacktrackMax,u.index)),(!j||a)&&(u.index=p,u.output.length!==h&&(u.output.length=h)),j}:l},"q"),nt=g((o,s)=>{const a=q(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),h=s(p);return U(h)||l.output.push(h),!0}else return!1}:a},"B"),ot=(()=>{let o=0;return s=>{const a=q(s),l=o+=1;return u=>{var p;if(u.options.memoization===!1)return a(u);const h=u.index,j=(p=u.cache)[l]||(p[l]={indexMax:-1,queue:[]}),S=j.queue;if(h<=j.indexMax){const he=j.store||(j.store=new Map);if(S.length){for(let ie=0,so=S.length;ie<so;ie+=2){const io=S[ie*2],ao=S[ie*2+1];he.set(io,ao)}S.length=0}const M=he.get(h);if(M===!1)return!1;if(Ur(M))return u.index=M,!0;if(M)return u.index=M.index,M.output?.length&&u.output.push(...M.output),!0}const me=u.output.length,oo=a(u);if(j.indexMax=Math.max(j.indexMax,h),oo){const he=u.index,M=u.output.length;if(M>me){const ie=u.output.slice(me,M);S.push(h,{index:he,output:ie})}else S.push(h,he);return!0}else return S.push(h,!1),!1}}})(),Ot=g(o=>{let s;return a=>(s||(s=q(o())),s(a))},"G"),q=Hr(o=>{if(W(o))return et(o)?Ot(o):o;if(vt(o)||Kr(o))return b(o);if(ne(o))return oe(o);if(qr(o))return N(Object.values(o));throw new Error("Invalid rule")}),Y=g(o=>o,"d"),tn=g(o=>typeof o=="string","ke"),rn=g(o=>{const s=new WeakMap,a=new WeakMap;return(l,u)=>{const p=u?.partial?a:s,h=p.get(l);if(h!==void 0)return h;const j=o(l,u);return p.set(l,j),j}},"Be"),nn=g(o=>{const s={},a={};return(l,u)=>{const p=u?.partial?a:s;return p[l]??(p[l]=o(l,u))}},"Pe"),on=b(/\\./,Y),sn=b(/./,Y),an=b(/\*\*\*+/,"*"),cn=b(/([^/{[(!])\*\*/,(o,s)=>`${s}*`),un=b(/(^|.)\*\*(?=[^*/)\]}])/,(o,s)=>`${s}*`),ln=Re(N([on,an,cn,un,sn])),fn=ln,pn=g(o=>$t(o,fn,{memoization:!1}).join(""),"Ie"),dn=pn,kt="abcdefghijklmnopqrstuvwxyz",gn=g(o=>{let s="";for(;o>0;){const a=(o-1)%26;s=kt[a]+s,o=Math.floor((o-1)/26)}return s},"Le"),Pt=g(o=>{let s=0;for(let a=0,l=o.length;a<l;a++)s=s*26+kt.indexOf(o[a])+1;return s},"V"),st=g((o,s)=>{if(s<o)return st(s,o);const a=[];for(;o<=s;)a.push(o++);return a},"b"),mn=g((o,s,a)=>st(o,s).map(l=>String(l).padStart(a,"0")),"qe"),Tt=g((o,s)=>st(Pt(o),Pt(s)).map(gn),"W"),T=g(o=>({partial:!1,regex:new RegExp(o,"s"),children:[]}),"c"),ge=g(o=>({children:o}),"y"),se=(()=>{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,h=u.length;p<h;p++)o(u[p],a,l)},"e");return s=>{if(!s.length)return ge([]);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]}})(),K=g(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),hn=b(/\\./,T),yn=b(/[$.*+?^(){}[\]\|]/,o=>T(`\\${o}`)),bn=b(/[\\\/]/,K),vn=b(/[^$.*+?^(){}[\]\|\\\/]+/,T),$n=b(/^(?:!!)*!(.*)$/,(o,s)=>T(`(?!^${zt.compile(s).source}$).*?`)),wn=b(/^(!!)+/),jn=N([$n,wn]),xn=b(/\/(\*\*\/)+/,()=>ge([se([K(),T(".+?"),K()]),K()])),On=b(/^(\*\*\/)+/,()=>ge([T("^"),se([T(".*?"),K()])])),kn=b(/\/(\*\*)$/,()=>ge([se([K(),T(".*?")]),T("$")])),Pn=b(/\*\*/,()=>T(".*?")),Et=N([xn,On,kn,Pn]),Tn=b(/\*\/(?!\*\*\/|\*$)/,()=>se([T("[^\\\\/]*?"),K()])),En=b(/\*/,()=>T("[^\\\\/]*")),St=N([Tn,En]),Ct=b("?",()=>T("[^\\\\/]")),Sn=b("[",Y),Cn=b("]",Y),An=b(/[!^]/,"^\\\\/"),_n=b(/[a-z]-[a-z]|[0-9]-[0-9]/i,Y),Nn=b(/\\./,Y),Mn=b(/[$.*+?^(){}[\|]/,o=>`\\${o}`),zn=b(/[\\\/]/,"\\\\/"),Bn=b(/[^$.*+?^(){}[\]\|\\\/]+/,Y),Dn=N([Nn,Mn,zn,_n,Bn]),At=oe([Sn,jt(An),Re(Dn),Cn],o=>T(o.join(""))),In=b("{","(?:"),Rn=b("}",")"),Fn=b(/(\d+)\.\.(\d+)/,(o,s,a)=>mn(+s,+a,Math.min(s.length,a.length)).join("|")),Wn=b(/([a-z]+)\.\.([a-z]+)/,(o,s,a)=>Tt(s,a).join("|")),Ln=b(/([A-Z]+)\.\.([A-Z]+)/,(o,s,a)=>Tt(s.toLowerCase(),a.toLowerCase()).join("|").toUpperCase()),Vn=N([Fn,Wn,Ln]),_t=oe([In,Vn,Rn],o=>T(o.join(""))),Un=b("{"),qn=b("}"),Kn=b(","),Gn=b(/\\./,T),Jn=b(/[$.*+?^(){[\]\|]/,o=>T(`\\${o}`)),Hn=b(/[\\\/]/,K),Zn=b(/[^$.*+?^(){}[\]\|\\\/,]+/,T),Xn=Ot(()=>Mt),Yn=b("",()=>T("(?:)")),Qn=en(N([Et,St,Ct,At,_t,Xn,Gn,Jn,Hn,Zn]),se),Nt=N([Qn,Yn]),Mt=oe([Un,jt(oe([Nt,Re(oe([Kn,Nt]))])),qn],ge),eo=Re(N([jn,Et,St,Ct,At,_t,Mt,hn,yn,bn,vn]),se),to=eo,ro=g(o=>$t(o,to,{memoization:!1})[0],"kr"),no=ro,it=g((o,s,a)=>it.compile(o,a).test(s),"N");it.compile=(()=>{const o=nn((a,l)=>re(no(dn(a)),l)),s=rn((a,l)=>Qe(a.map(u=>o(u,l))));return(a,l)=>tn(a)?o(a,l):s(a,l)})();var zt=it;return d(v)})();return e.default||e},"_lazyMatch"),at;const qo=g((e,t)=>(at||(at=Rt(),Rt=null),at(e,t)),"default");var Ko=Object.defineProperty,Go=pt((e,t)=>Ko(e,"name",{value:t,configurable:!0}),"t$1");const Jo=/^[A-Z]:\//i,I=Go((e="")=>e&&e.replaceAll("\\","/").replace(Jo,t=>t.toUpperCase()),"normalizeWindowsPath");var Ho=Object.defineProperty,C=pt((e,t)=>Ho(e,"name",{value:t,configurable:!0}),"r");const Zo=/^[/\\]{2}/,Xo=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,pr=/^[A-Z]:$/i,Ft=/^\/([A-Z]:)?$/i,Yo=/.(\.[^./]+)$/,Qo=/^[/\\]|^[a-z]:[/\\]/i,es=/\/$/,ts=C(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),dr=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"),Q=C(e=>Xo.test(e),"isAbsolute"),gr=C(function(e){if(e.length===0)return".";e=I(e);const t=Zo.exec(e),r=Q(e),n=e.at(-1)==="/";return e=dr(e,!r),e.length===0?r?"/":n?"./":".":(n&&(e+="/"),pr.test(e)&&(e+="/"),t?r?`//${e}`:`//./${e}`:r&&!Q(e)?`/${e}`:e)},"normalize"),z=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 gr(t)},"join"),L=C(function(...e){e=e.map(n=>I(n));let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){const i=n>=0?e[n]:ts();!i||i.length===0||(t=`${i}/${t}`,r=Q(i))}return t=dr(t,!r),r&&!Q(t)?`/${t}`:t.length>0?t:"."},"resolve");C(function(e){return I(e)},"toNamespacedPath");const mr=C(function(e){return Yo.exec(I(e))?.[1]??""},"extname");C(function(e,t){const r=L(e).replace(Ft,"$1").split("/"),n=L(t).replace(Ft,"$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 Ae=C(e=>{const t=I(e).replace(es,"").split("/").slice(0,-1);return t.length===1&&pr.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(Q(e)?"/":".")},"dirname");C(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return I(e.root?L(...t):t.join("/"))},"format");const rs=C((e,t)=>{const r=I(e).split("/").pop();return t&&r.endsWith(t)?r.slice(0,-t.length):r},"basename"),hr=C(function(e){const t=Qo.exec(e)?.[0]?.replaceAll("\\","/")??"",r=rs(e),n=mr(r);return{base:r,dir:Ae(e),ext:n,name:r.slice(0,r.length-n.length),root:t}},"parse");C((e,t)=>qo(t,gr(e)),"matchesGlob");var ns=Object.defineProperty,ee=k((e,t)=>ns(e,"name",{value:t,configurable:!0}),"n$2"),os=Object.defineProperty,V=ee((e,t)=>os(e,"name",{value:t,configurable:!0}),"a");const ss=pe(import.meta.url),ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,is=V(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 ss(e)},"__cjs_getBuiltinModule"),{fileURLToPath:as}=is("node:url");var cs=Object.defineProperty,fe=V((e,t)=>cs(e,"name",{value:t,configurable:!0}),"t$1");function de(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}m(de,"ue");D(de,"de");k(de,"m$4");ee(de,"d");V(de,"getDefaultExportFromCjs");fe(de,"getDefaultExportFromCjs");function _e(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}m(_e,"me");D(_e,"je");k(_e,"h$2");ee(_e,"O");V(_e,"getDefaultExportFromNamespaceIfPresent");fe(_e,"getDefaultExportFromNamespaceIfPresent");function Ne(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}m(Ne,"he");D(Ne,"Oe");k(Ne,"x");ee(Ne,"P");V(Ne,"getDefaultExportFromNamespaceIfNotNamed");fe(Ne,"getDefaultExportFromNamespaceIfNotNamed");function Me(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=fe(V(ee(k(D(m(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:fe(function(){return e[n]},"get")})}),r}m(Me,"ye");D(Me,"Pe");k(Me,"y$3");ee(Me,"_");V(Me,"getAugmentedNamespace");fe(Me,"getAugmentedNamespace");var Wt,Lt;function ze(){return Lt||(Lt=1,Wt=["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"]),Wt}m(ze,"be");D(ze,"_e");k(ze,"w$1");ee(ze,"k");V(ze,"requireBinaryExtensions");var us=ze();const ls=de(us);var fs=Object.defineProperty,R=V((e,t)=>fs(e,"name",{value:t,configurable:!0}),"r");const ps=new Set(ls),ds=new Set(["/","\\",void 0]),Vt=Symbol.for("pathe:normalizedAlias"),gs=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,ms=R((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),We=R((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),yr=R(e=>{if(e[Vt])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([r],[n])=>ms(r,n)));for(const r in t)for(const n in t)n===r||r.startsWith(n)||t[r].startsWith(n)&&ds.has(t[r][n.length])&&(t[r]=t[n]+t[r].slice(n.length));return Object.defineProperty(t,Vt,{enumerable:!1,value:!0}),t},"normalizeAliases");R((e,t)=>{e=I(e),t=yr(t);for(const[r,n]of Object.entries(t)){if(!e.startsWith(r))continue;const i=We(r)?r.slice(0,-1):r;if(We(e[i.length]))return z(n,e.slice(r.length))}return e},"resolveAlias");R(e=>gs.exec(e)?.[2],"filename");R((e,t)=>{e=I(e),t=yr(t);for(const[r,n]of Object.entries(t).toReversed()){if(!e.startsWith(n))continue;const i=We(n)?n.slice(0,-1):n;if(We(e[i.length]))return z(r,e.slice(n.length))}return e},"reverseResolveAlias");const hs=/^(?:\.?\.[/\\]|\.\.\B)/,ys=/^(?:msys|cygwin)$/;R(e=>hs.test(e)||e==="..","isRelative");R(e=>ps.has(mr(e).slice(1).toLowerCase()),"isBinaryPath");const G=R(e=>I(e instanceof URL?as(e):e),"toPath");R(()=>{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:ys.test(e)},"isWindows");var bs=Object.defineProperty,vs=k((e,t)=>bs(e,"name",{value:t,configurable:!0}),"y$2"),$s=Object.defineProperty,br=vs((e,t)=>$s(e,"name",{value:t,configurable:!0}),"a");const ws=pe(import.meta.url),$e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,js=br(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 ws(e)},"__cjs_getBuiltinModule"),{stat:xs,lstat:Os}=js("node:fs/promises");var ks=Object.defineProperty,Ut=br((e,t)=>ks(e,"name",{value:t,configurable:!0}),"s");const Ps=Ut(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?G(t.cwd):process.cwd();let n=L(r);const{root:i}=hr(n),c=G(t.stopAt??i),f=L(n,c),d=t.type??"file",v=Ut(async function($){return typeof e=="function"?[await e($)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const w=t.allowSymlinks?xs:Os;for(;n&&n!==f&&n!==i;){const $=await v(n);for(let y of $){if(y===lr)return;if(y===void 0)continue;Buffer.isBuffer(y)?y=y.toString():y instanceof URL&&(y=G(y));const E=Q(y)?y:L(n,y);try{const P=await w(E);if(d==="file"&&P.isFile()||d==="directory"&&P.isDirectory())return E}catch{}}n=Ae(n)}},"findUp");var Ts=Object.defineProperty,Es=k((e,t)=>Ts(e,"name",{value:t,configurable:!0}),"p"),Ss=Object.defineProperty,vr=Es((e,t)=>Ss(e,"name",{value:t,configurable:!0}),"i");const Cs=pe(import.meta.url),we=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,As=vr(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 Cs(e)},"__cjs_getBuiltinModule"),{statSync:_s,lstatSync:Ns}=As("node:fs");var Ms=Object.defineProperty,qt=vr((e,t)=>Ms(e,"name",{value:t,configurable:!0}),"o");const zs=qt((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?G(t.cwd):process.cwd();let n=L(r);const{root:i}=hr(n),c=G(t.stopAt??i),f=L(n,c),d=t.type??"file",v=qt(function($){return typeof e=="function"?[e($)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const w=t.allowSymlinks?_s:Ns;for(;n&&n!==f&&n!==i;){for(let $ of v(n)){if($===lr)return;if($===void 0)continue;Buffer.isBuffer($)?$=$.toString():$ instanceof URL&&($=G($));const y=Q($)?$:L(n,$);try{const E=w(y);if(d==="file"&&E.isFile()||d==="directory"&&E.isDirectory())return y}catch{}}n=Ae(n)}},"findUpSync");var Bs=Object.defineProperty,$r=k((e,t)=>Bs(e,"name",{value:t,configurable:!0}),"t$2"),Ds=Object.defineProperty,dt=$r((e,t)=>Ds(e,"name",{value:t,configurable:!0}),"s");const Is=pe(import.meta.url),je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Rs=dt(e=>{if(typeof je<"u"&&je.versions&&je.versions.node){const[t,r]=je.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return je.getBuiltinModule(e)}return Is(e)},"__cjs_getBuiltinModule"),{access:Fs}=Rs("node:fs/promises");var Ws=Object.defineProperty,Ls=dt((e,t)=>Ws(e,"name",{value:t,configurable:!0}),"o");async function J(e,t=ur){ft(e),e=G(e);try{return await Fs(e,t),!0}catch{return!1}}m(J,"I$2");D(J,"V");k(J,"i$1");$r(J,"d");dt(J,"m");Ls(J,"isAccessible");var Vs=Object.defineProperty,wr=k((e,t)=>Vs(e,"name",{value:t,configurable:!0}),"t$1"),Us=Object.defineProperty,gt=wr((e,t)=>Us(e,"name",{value:t,configurable:!0}),"t");const qs=pe(import.meta.url),xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ks=gt(e=>{if(typeof xe<"u"&&xe.versions&&xe.versions.node){const[t,r]=xe.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return xe.getBuiltinModule(e)}return qs(e)},"__cjs_getBuiltinModule"),{accessSync:Gs}=Ks("node:fs");var Js=Object.defineProperty,Hs=gt((e,t)=>Js(e,"name",{value:t,configurable:!0}),"o");function H(e,t=ur){ft(e),e=G(e);try{return Gs(e,t),!0}catch{return!1}}m(H,"F$3");D(H,"X");k(H,"i");wr(H,"d");gt(H,"m");Hs(H,"isAccessibleSync");var Zs=Object.defineProperty,jr=k((e,t)=>Zs(e,"name",{value:t,configurable:!0}),"o"),Xs=Object.defineProperty,xr=jr((e,t)=>Xs(e,"name",{value:t,configurable:!0}),"o"),Ys=Object.defineProperty,Qs=xr((e,t)=>Ys(e,"name",{value:t,configurable:!0}),"o");class Or extends Error{static{m(this,"wt")}static{D(this,"$t")}static{k(this,"s")}static{jr(this,"u")}static{xr(this,"n")}static{Qs(this,"NotFoundError")}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 ei=Object.defineProperty,mt=k((e,t)=>ei(e,"name",{value:t,configurable:!0}),"u");const Le=mt((e,t)=>(t?.create&&Fo(e),e),"useDirectory");mt(async(e,t)=>{if(ue.CACHE_DIR&&!["0","1","false","true"].includes(ue.CACHE_DIR))return Le(z(ue.CACHE_DIR,e),t);const r=await Ps("package.json",{cwd:t?.cwd??cr(),type:"file"});if(!r){if(t?.throwError)throw new Or("No such file or directory found.");return}const n=z(Ae(r),"node_modules"),i=z(n,".cache"),c=z(i,e);if(!(ce(c)&&!await J(c,le))&&!(ce(i)&&!await J(i,le))&&!(ce(n)&&!await J(n,le)))return Le(c,t)},"findCacheDirectory");const ti=mt((e,t)=>{if(ue.CACHE_DIR&&!["0","1","false","true"].includes(ue.CACHE_DIR))return Le(z(ue.CACHE_DIR,e),t);const r=zs("package.json",{cwd:t?.cwd??cr(),type:"file"});if(!r){if(t?.throwError)throw new Or("No such file or directory found.");return}const n=z(Ae(r),"node_modules"),i=z(n,".cache"),c=z(i,e);if(!(ce(c)&&!H(c,le))&&!(ce(i)&&!H(i,le))&&!(ce(n)&&!H(n,le)))return Le(c,t)},"findCacheDirectorySync"),kr=ti;var ri=Object.defineProperty,ni=m((e,t)=>ri(e,"name",{value:t,configurable:!0}),"i$7"),oi=Object.defineProperty,si=ni((e,t)=>oi(e,"name",{value:t,configurable:!0}),"r"),ii=Object.defineProperty,ai=si((e,t)=>ii(e,"name",{value:t,configurable:!0}),"i");const Kt=ai(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var ci=Object.defineProperty,ui=m((e,t)=>ci(e,"name",{value:t,configurable:!0}),"i$6"),li=Object.defineProperty,Pr=ui((e,t)=>li(e,"name",{value:t,configurable:!0}),"s");const fi=Se(import.meta.url),Oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,pi=Pr(e=>{if(typeof Oe<"u"&&Oe.versions&&Oe.versions.node){const[t,r]=Oe.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return Oe.getBuiltinModule(e)}return fi(e)},"__cjs_getBuiltinModule"),{lstatSync:Gt,mkdirSync:di}=pi("node:fs");var gi=Object.defineProperty,mi=Pr((e,t)=>gi(e,"name",{value:t,configurable:!0}),"o");const Ve=mi(e=>{nr(e);try{const t=Gt(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Kt(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{di(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=Gt(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Kt(r))}'`,{cause:t})}},"ensureDirSync");var hi=Object.defineProperty,yi=m((e,t)=>hi(e,"name",{value:t,configurable:!0}),"x$2"),bi=Object.defineProperty,Tr=yi((e,t)=>bi(e,"name",{value:t,configurable:!0}),"$"),vi=Object.defineProperty,$i=Tr((e,t)=>vi(e,"name",{value:t,configurable:!0}),"A"),wi=Object.defineProperty,ht=$i((e,t)=>wi(e,"name",{value:t,configurable:!0}),"$"),ji=Object.defineProperty,xi=ht((e,t)=>ji(e,"name",{value:t,configurable:!0}),"r$1");const Oi=xi(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
2
+ `),"normalizeLF"),ki=globalThis.process??Object.create(null),Jt={versions:{}},Ht=new Proxy(ki,{get(e,t){if(t in e)return e[t];if(t in Jt)return Jt[t]}});var Pi=Object.defineProperty,Ti=ht((e,t)=>Pi(e,"name",{value:t,configurable:!0}),"b");const Ei=Ti((e,t,r,n)=>{const i={column:0,line:-1,...e.start},c={...i,...e.end},f=i.line,d=i.column,v=c.line,w=c.column;let $=Math.max(f-(r+1),0),y=Math.min(t.length,v+n);f===-1&&($=0),v===-1&&(y=t.length);const E=v-f,P={};if(E)for(let x=0;x<=E;x++){const _=x+f;if(!d)P[_]=!0;else if(x===0){const F=t[_-1]?.length;P[_]=[d,(F??0)-d+1]}else if(x===E)P[_]=[0,w];else{const F=t[_-x]?.length;P[_]=[0,F]}}else d===w?P[f]=d?[d,0]:!0:P[f]=[d,(w??0)-(d??0)];return{end:y,markerLines:P,start:$}},"getMarkerLines");var Si=Object.defineProperty,Fe=ht((e,t)=>Si(e,"name",{value:t,configurable:!0}),"t");const Ci=Ht.platform==="win32"&&!Ht.env?.WT_SESSION?">":"❯",Ai=Fe((e,t,r)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:Fe(x=>x,"gutter"),marker:Fe(x=>x,"marker"),message:Fe(x=>x,"message"),...r?.color}},i=typeof t.start.column=="number";let c=Oi(e).split(`
3
+ `);typeof n.tabWidth=="number"&&(c=c.map(x=>x.replaceAll(" "," ".repeat(n.tabWidth))));const{end:f,markerLines:d,start:v}=Ei(t,c,n.linesAbove,n.linesBelow),w=String(f).length,{gutter:$,marker:y,message:E}=n.color;let P=c.slice(v,f).map((x,_)=>{const F=v+1+_,re=d[F],Ye=` ${String(F)}`.slice(-w),Qe=!d[F+1],ne=` ${Ye}${n.showGutter?" |":""}`;if(re){let W="";if(Array.isArray(re)){const et=x.replaceAll(/[^\t]/g," ").slice(0,Math.max(re[0]-1,0)),tt=re[1]||1;W=[`
4
+ `,n.prefix+$(ne.replaceAll(/\d/g," "))," ",et,y("^").repeat(tt)].join(""),Qe&&n.message&&(W+=` ${E(n.message)}`)}return[n.prefix+y(Ci),$(ne),x.length>0?` ${x}`:"",W].join("")}return`${n.prefix} ${$(ne)}${x.length>0?` ${x}`:""}`}).join(`
5
+ `);return n.message&&!i&&(P=`${n.prefix+" ".repeat(w+1)+n.message}
6
+ ${P}`),P},"codeFrame");var _i=Object.defineProperty,Ni=Tr((e,t)=>_i(e,"name",{value:t,configurable:!0}),"s"),Mi=Object.defineProperty,zi=Ni((e,t)=>Mi(e,"name",{value:t,configurable:!0}),"o"),Bi=Object.defineProperty,yt=zi((e,t)=>Bi(e,"name",{value:t,configurable:!0}),"l");const Zt=yt((e,t)=>{let r=0,n=t.length-2;for(;r<n;){const i=r+(n-r>>1);if(e<t[i])n=i-1;else if(e>=t[i+1])r=i+1;else{r=i;break}}return r},"binarySearch"),Di=/\n|\r(?!\n)/,Ii=yt(e=>e.split(Di).reduce((t,r)=>(t.push(t.at(-1)+r.length+1),t),[0]),"getLineStartIndexes"),Ri=yt((e,t,r)=>{const n=r?.skipChecks??!1;if(!n&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!n&&(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 c=Ii(e),f=Zt(t,c);return{column:t-c[f]+1,line:f+1}}const i=Zt(t,e);return{column:t-e[i]+1,line:i+1}},"indexToLineColumn");var Fi=Object.defineProperty,Er=m((e,t)=>Fi(e,"name",{value:t,configurable:!0}),"t$6"),Wi=Object.defineProperty,Sr=Er((e,t)=>Wi(e,"name",{value:t,configurable:!0}),"t"),Li=Object.defineProperty,Vi=Sr((e,t)=>Li(e,"name",{value:t,configurable:!0}),"i");let Ui=class extends Error{static{m(this,"m")}static{Er(this,"m")}static{Sr(this,"t")}static{Vi(this,"JSONError")}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 aa=Object.defineProperty,ro=x((e,t)=>aa(e,"name",{value:t,configurable:!0}),"u$3"),ca=Object.defineProperty,no=ro((e,t)=>ca(e,"name",{value:t,configurable:!0}),"s"),ua=Object.defineProperty,nt=no((e,t)=>ua(e,"name",{value:t,configurable:!0}),"a");const la=nt(e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,"getCodePoint"),fa=nt((e,t,n)=>Gi(e,{start:t},{tabWidth:!1,...n}),"generateCodeFrame"),pa=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,da=nt((e,t)=>{const n=pa.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),ta(e,g)},"getErrorLocation"),ga=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,ha=nt(e=>e.replace(ga,(t,n,s)=>`"${s}"(${la(s)})`),"addCodePointToUnexpectedToken");function pt(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=da(e,u),u=ha(u)):u+=" while parsing empty string";const g=new ia(u);throw g.fileName=n,l&&(g.codeFrame=fa(e,l,s)),g}x(pt,"d$5");ro(pt,"w");no(pt,"E");nt(pt,"parseJson");var ma=Object.defineProperty,oo=x((e,t)=>ma(e,"name",{value:t,configurable:!0}),"t$5"),ya=Object.defineProperty,so=oo((e,t)=>ya(e,"name",{value:t,configurable:!0}),"t"),ba=Object.defineProperty,va=so((e,t)=>ba(e,"name",{value:t,configurable:!0}),"r");function ot(e,t,n){typeof t=="object"&&(n=t,t=void 0);const s=jo(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)),pt(u,t,On(e),{color:g})}x(ot,"n$3");oo(ot,"s");so(ot,"J");va(ot,"readJsonSync");var $a=Object.defineProperty,xa=x((e,t)=>$a(e,"name",{value:t,configurable:!0}),"a$3"),wa=Object.defineProperty,ja=xa((e,t)=>wa(e,"name",{value:t,configurable:!0}),"t"),Oa=Object.defineProperty,ka=ja((e,t)=>Oa(e,"name",{value:t,configurable:!0}),"e");const Pa=ka(e=>{if(typeof e!="string"&&!(e instanceof ArrayBuffer)&&!ArrayBuffer.isView(e))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},"assertValidFileContents");var Ea=Object.defineProperty,Ta=x((e,t)=>Ea(e,"name",{value:t,configurable:!0}),"t$3"),Aa=Object.defineProperty,Sa=Ta((e,t)=>Aa(e,"name",{value:t,configurable:!0}),"r"),Ca=Object.defineProperty,Ma=Sa((e,t)=>Ca(e,"name",{value:t,configurable:!0}),"f");const _a=new TextEncoder,za=Ma(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return _a.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.")},"toUint8Array");var Na=Object.defineProperty,Ba=x((e,t)=>Na(e,"name",{value:t,configurable:!0}),"m$1"),Ra=Object.defineProperty,io=Ba((e,t)=>Ra(e,"name",{value:t,configurable:!0}),"s");const Ia=tt(import.meta.url),He=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Da=io(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 Ia(e)},"__cjs_getBuiltinModule"),{mkdirSync:Fa,writeFileSync:Wa,statSync:La,renameSync:yn,chownSync:Va,chmodSync:Ua,unlinkSync:qa}=Da("node:fs");var Za=Object.defineProperty,Ga=io((e,t)=>Za(e,"name",{value:t,configurable:!0}),"f");const Ka=Ga((e,t,n)=>{n={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...n},jn(e),Pa(t),e=On(e);const s=`${e}.tmp`;try{const u=J(e,Qr);if(!u&&n.recursive){const g=rt(e);J(g,Qr)||Fa(g,{recursive:!0})}let l;if(Wa(s,za(t),{encoding:n.encoding,flag:n.flag}),u&&!n.overwrite&&(l=La(e),n.chown??={gid:l.gid,uid:l.uid},yn(e,`${e}.bak`)),n.chown)try{Va(s,n.chown.uid,n.chown.gid)}catch{}Ua(s,l&&!n.mode?l.mode:n.mode??438),yn(s,e)}catch(u){throw new Error(`Failed to write file at: ${e} - ${u.message}`,{cause:u})}finally{J(s)&&qa(`${e}.tmp`)}},"writeFileSync");var Ja=Object.defineProperty,oe=x((e,t)=>Ja(e,"name",{value:t,configurable:!0}),"i$2"),Ha=Object.defineProperty,se=oe((e,t)=>Ha(e,"name",{value:t,configurable:!0}),"s"),Xa=Object.defineProperty,de=se((e,t)=>Xa(e,"name",{value:t,configurable:!0}),"i");const Ya=/^(?:( )+|\t+)/,st="space";function Qe(e,t,n){return e&&t===st&&n===1}x(Qe,"d$3");oe(Qe,"g");se(Qe,"I");de(Qe,"shouldIgnoreSingleSpace");function et(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(Ya);if(h===null)s=0,u="";else{const $=h[0].length,O=h[1]?st:"tab";if(Qe(t,O,$))continue;O!==u&&(s=0),u=O;let j=1,v=0;const C=$-s;if(s=$,C===0)j=0,v=1;else{const P=Math.abs(C);if(Qe(t,O,P))continue;l=dt(O,P)}const E=n.get(l);n.set(l,E===void 0?[1,0]:[E[0]+j,E[1]+v])}}return n}x(et,"p");oe(et,"y");se(et,"h");de(et,"makeIndentsMap");function dt(e,t){return(e===st?"s":"t")+String(t)}x(dt,"b$1");oe(dt,"v");se(dt,"m");de(dt,"encodeIndentsKey");function gt(e){const t=e[0]==="s"?st:"tab",n=Number(e.slice(1));return{type:t,amount:n}}x(gt,"v");oe(gt,"M");se(gt,"_");de(gt,"decodeIndentsKey");function ht(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}x(ht,"I");oe(ht,"S");se(ht,"k");de(ht,"getMostUsedKey");function mt(e,t){return(e===st?" ":" ").repeat(t)}x(mt,"h$1");oe(mt,"k");se(mt,"D");de(mt,"makeIndentString");function yt(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=et(e,!0);t.size===0&&(t=et(e,!1));const n=ht(t);let s,u=0,l="";return n!==void 0&&({type:s,amount:u}=gt(n),l=mt(s,u)),{amount:u,type:s,indent:l}}x(yt,"M");oe(yt,"x");se(yt,"C");de(yt,"detectIndent");var Qa=Object.defineProperty,ec=x((e,t)=>Qa(e,"name",{value:t,configurable:!0}),"a$1"),tc=Object.defineProperty,ao=ec((e,t)=>tc(e,"name",{value:t,configurable:!0}),"i");const rc=tt(import.meta.url),Xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,nc=ao(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 rc(e)},"__cjs_getBuiltinModule"),{readFileSync:oc}=nc("node:fs");var sc=Object.defineProperty,ic=ao((e,t)=>sc(e,"name",{value:t,configurable:!0}),"r");const co=ic((e,t,n={})=>{const{detectIndent:s,indent:u,replacer:l,stringify:g=JSON.stringify,...h}={indent:" ",...n};let $=u,O=`
10
- `;if(J(e,Oo))try{const v=oc(e,"utf8");if(s){const{indent:C}=yt(v);$=C}O=v.endsWith(`
9
+ `:""}`}set message(t){this.#e=t}};var qi=Object.defineProperty,Cr=m((e,t)=>qi(e,"name",{value:t,configurable:!0}),"u$3"),Ki=Object.defineProperty,Ar=Cr((e,t)=>Ki(e,"name",{value:t,configurable:!0}),"s"),Gi=Object.defineProperty,Be=Ar((e,t)=>Gi(e,"name",{value:t,configurable:!0}),"a");const Ji=Be(e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,"getCodePoint"),Hi=Be((e,t,r)=>Ai(e,{start:t},{tabWidth:!1,...r}),"generateCodeFrame"),Zi=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,Xi=Be((e,t)=>{const r=Zi.exec(t);if(!r)return;const[,n,i,c]=r;if(i&&c)return{column:Number(c),line:Number(i)};let f=Number(n);return f===e.length&&(f=e.length-1),Ri(e,f)},"getErrorLocation"),Yi=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,Qi=Be(e=>e.replace(Yi,(t,r,n)=>`"${n}"(${Ji(n)})`),"addCodePointToUnexpectedToken");function Ue(e,t,r,n){typeof t=="string"&&(typeof r=="object"&&(n=r),r=t,t=void 0);let i;try{return JSON.parse(e,t)}catch(d){i=d.message}let c;e?(c=Xi(e,i),i=Qi(i)):i+=" while parsing empty string";const f=new Ui(i);throw f.fileName=r,c&&(f.codeFrame=Hi(e,c,n)),f}m(Ue,"d$5");Cr(Ue,"w");Ar(Ue,"E");Be(Ue,"parseJson");var ea=Object.defineProperty,_r=m((e,t)=>ea(e,"name",{value:t,configurable:!0}),"t$5"),ta=Object.defineProperty,Nr=_r((e,t)=>ta(e,"name",{value:t,configurable:!0}),"t"),ra=Object.defineProperty,na=Nr((e,t)=>ra(e,"name",{value:t,configurable:!0}),"r");function De(e,t,r){typeof t=="object"&&(r=t,t=void 0);const n=mo(e,{buffer:!0,encoding:void 0});let i=new TextDecoder().decode(n);const{beforeParse:c,color:f}=r??{};return typeof c=="function"&&(i=c(i)),Ue(i,t,or(e),{color:f})}m(De,"n$3");_r(De,"s");Nr(De,"J");na(De,"readJsonSync");var oa=Object.defineProperty,sa=m((e,t)=>oa(e,"name",{value:t,configurable:!0}),"a$3"),ia=Object.defineProperty,aa=sa((e,t)=>ia(e,"name",{value:t,configurable:!0}),"t"),ca=Object.defineProperty,ua=aa((e,t)=>ca(e,"name",{value:t,configurable:!0}),"e");const la=ua(e=>{if(typeof e!="string"&&!(e instanceof ArrayBuffer)&&!ArrayBuffer.isView(e))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},"assertValidFileContents");var fa=Object.defineProperty,pa=m((e,t)=>fa(e,"name",{value:t,configurable:!0}),"t$3"),da=Object.defineProperty,ga=pa((e,t)=>da(e,"name",{value:t,configurable:!0}),"r"),ma=Object.defineProperty,ha=ga((e,t)=>ma(e,"name",{value:t,configurable:!0}),"f");const ya=new TextEncoder,ba=ha(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return ya.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.")},"toUint8Array");var va=Object.defineProperty,$a=m((e,t)=>va(e,"name",{value:t,configurable:!0}),"m$1"),wa=Object.defineProperty,Mr=$a((e,t)=>wa(e,"name",{value:t,configurable:!0}),"s");const ja=Se(import.meta.url),ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xa=Mr(e=>{if(typeof ke<"u"&&ke.versions&&ke.versions.node){const[t,r]=ke.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ke.getBuiltinModule(e)}return ja(e)},"__cjs_getBuiltinModule"),{mkdirSync:Oa,writeFileSync:ka,statSync:Pa,renameSync:Xt,chownSync:Ta,chmodSync:Ea,unlinkSync:Sa}=xa("node:fs");var Ca=Object.defineProperty,Aa=Mr((e,t)=>Ca(e,"name",{value:t,configurable:!0}),"f");const _a=Aa((e,t,r)=>{r={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},nr(e),la(t),e=or(e);const n=`${e}.tmp`;try{const i=B(e,Bt);if(!i&&r.recursive){const f=Ce(e);B(f,Bt)||Oa(f,{recursive:!0})}let c;if(ka(n,ba(t),{encoding:r.encoding,flag:r.flag}),i&&!r.overwrite&&(c=Pa(e),r.chown??={gid:c.gid,uid:c.uid},Xt(e,`${e}.bak`)),r.chown)try{Ta(n,r.chown.uid,r.chown.gid)}catch{}Ea(n,c&&!r.mode?c.mode:r.mode??438),Xt(n,e)}catch(i){throw new Error(`Failed to write file at: ${e} - ${i.message}`,{cause:i})}finally{B(n)&&Sa(`${e}.tmp`)}},"writeFileSync");var Na=Object.defineProperty,Z=m((e,t)=>Na(e,"name",{value:t,configurable:!0}),"i$2"),Ma=Object.defineProperty,X=Z((e,t)=>Ma(e,"name",{value:t,configurable:!0}),"s"),za=Object.defineProperty,te=X((e,t)=>za(e,"name",{value:t,configurable:!0}),"i");const Ba=/^(?:( )+|\t+)/,Ie="space";function Te(e,t,r){return e&&t===Ie&&r===1}m(Te,"d$3");Z(Te,"g");X(Te,"I");te(Te,"shouldIgnoreSingleSpace");function Ee(e,t){const r=new Map;let n=0,i,c;for(const f of e.split(/\n/g)){if(!f)continue;const d=f.match(Ba);if(d===null)n=0,i="";else{const v=d[0].length,w=d[1]?Ie:"tab";if(Te(t,w,v))continue;w!==i&&(n=0),i=w;let $=1,y=0;const E=v-n;if(n=v,E===0)$=0,y=1;else{const x=Math.abs(E);if(Te(t,w,x))continue;c=qe(w,x)}const P=r.get(c);r.set(c,P===void 0?[1,0]:[P[0]+$,P[1]+y])}}return r}m(Ee,"p");Z(Ee,"y");X(Ee,"h");te(Ee,"makeIndentsMap");function qe(e,t){return(e===Ie?"s":"t")+String(t)}m(qe,"b$1");Z(qe,"v");X(qe,"m");te(qe,"encodeIndentsKey");function Ke(e){const t=e[0]==="s"?Ie:"tab",r=Number(e.slice(1));return{type:t,amount:r}}m(Ke,"v");Z(Ke,"M");X(Ke,"_");te(Ke,"decodeIndentsKey");function Ge(e){let t,r=0,n=0;for(const[i,[c,f]]of e)(c>r||c===r&&f>n)&&(r=c,n=f,t=i);return t}m(Ge,"I");Z(Ge,"S");X(Ge,"k");te(Ge,"getMostUsedKey");function Je(e,t){return(e===Ie?" ":" ").repeat(t)}m(Je,"h$1");Z(Je,"k");X(Je,"D");te(Je,"makeIndentString");function He(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=Ee(e,!0);t.size===0&&(t=Ee(e,!1));const r=Ge(t);let n,i=0,c="";return r!==void 0&&({type:n,amount:i}=Ke(r),c=Je(n,i)),{amount:i,type:n,indent:c}}m(He,"M");Z(He,"x");X(He,"C");te(He,"detectIndent");var Da=Object.defineProperty,Ia=m((e,t)=>Da(e,"name",{value:t,configurable:!0}),"a$1"),Ra=Object.defineProperty,zr=Ia((e,t)=>Ra(e,"name",{value:t,configurable:!0}),"i");const Fa=Se(import.meta.url),Pe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wa=zr(e=>{if(typeof Pe<"u"&&Pe.versions&&Pe.versions.node){const[t,r]=Pe.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return Pe.getBuiltinModule(e)}return Fa(e)},"__cjs_getBuiltinModule"),{readFileSync:La}=Wa("node:fs");var Va=Object.defineProperty,Ua=zr((e,t)=>Va(e,"name",{value:t,configurable:!0}),"r");const Br=Ua((e,t,r={})=>{const{detectIndent:n,indent:i,replacer:c,stringify:f=JSON.stringify,...d}={indent:" ",...r};let v=i,w=`
10
+ `;if(B(e,ho))try{const y=La(e,"utf8");if(n){const{indent:E}=He(y);v=E}w=y.endsWith(`
11
11
  `)?`
12
- `:""}catch(v){if(v.code!=="ENOENT")throw v}const j=g(t,l,$);Ka(e,`${j}${O}`,h)},"writeJsonSync");var ac=Object.defineProperty,cc=x((e,t)=>ac(e,"name",{value:t,configurable:!0}),"s$1");class bt extends Error{static{x(this,"VisConfigError")}static{cc(this,"VisConfigError")}chain;constructor(t,n,s){super(t,s),this.name=this.constructor.name,this.chain=n}}var uc=Object.defineProperty,lc=x((e,t)=>uc(e,"name",{value:t,configurable:!0}),"e");class fc extends bt{static{x(this,"VisConfigCycleError")}static{lc(this,"VisConfigCycleError")}constructor(t,n){const s=[...n,`${t} (re-enters)`].join(" → ");super(`Config cycle: ${s}`,n)}}var pc=Object.defineProperty,dc=x((e,t)=>pc(e,"name",{value:t,configurable:!0}),"s");class uo extends bt{static{x(this,"VisConfigDeprecatedKeyError")}static{dc(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 gc=Object.defineProperty,hc=x((e,t)=>gc(e,"name",{value:t,configurable:!0}),"t$1");class bn extends bt{static{x(this,"VisConfigLoadError")}static{hc(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 mc=Object.defineProperty,lo=x((e,t)=>mc(e,"name",{value:t,configurable:!0}),"t");const yc=lo(e=>e.join(" → "),"formatChain");class Dr extends bt{static{x(this,"VisConfigNotFoundError")}static{lo(this,"VisConfigNotFoundError")}constructor(t,n,s){const u=n.length>0?n[n.length-1]:"<unknown>",l=s.length>0?`
12
+ `:""}catch(y){if(y.code!=="ENOENT")throw y}const $=f(t,c,v);_a(e,`${$}${w}`,d)},"writeJsonSync");var qa=Object.defineProperty,Ka=m((e,t)=>qa(e,"name",{value:t,configurable:!0}),"s$1");class Ze extends Error{static{m(this,"VisConfigError")}static{Ka(this,"VisConfigError")}chain;constructor(t,r,n){super(t,n),this.name=this.constructor.name,this.chain=r}}var Ga=Object.defineProperty,Ja=m((e,t)=>Ga(e,"name",{value:t,configurable:!0}),"e");class Ha extends Ze{static{m(this,"VisConfigCycleError")}static{Ja(this,"VisConfigCycleError")}constructor(t,r){const n=[...r,`${t} (re-enters)`].join(" → ");super(`Config cycle: ${n}`,r)}}var Za=Object.defineProperty,Xa=m((e,t)=>Za(e,"name",{value:t,configurable:!0}),"s");class Dr extends Ze{static{m(this,"VisConfigDeprecatedKeyError")}static{Xa(this,"VisConfigDeprecatedKeyError")}filePath;removedKeys;constructor(t,r,n){const i=[`${t} uses removed keys.`,""];for(const c of n){const f=c.location?` (at ${c.location})`:"";i.push(` • ${c.name}${f} → renamed to \`${c.renamedTo}\``);for(const d of c.children??[])i.push(` ↳ ${d.name} → renamed to \`${d.renamedTo}\``)}i.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(i.join(`
13
+ `),r),this.filePath=t,this.removedKeys=n}}var Ya=Object.defineProperty,Qa=m((e,t)=>Ya(e,"name",{value:t,configurable:!0}),"t$1");class Yt extends Ze{static{m(this,"VisConfigLoadError")}static{Qa(this,"VisConfigLoadError")}constructor(t,r,n){const i=n instanceof Error?n.message:String(n),c=r.length>0?`
14
+ Chain: ${r.join(" → ")}`:"";super(`Failed to load ${t}: ${i}${c}`,r,{cause:n})}}var ec=Object.defineProperty,Ir=m((e,t)=>ec(e,"name",{value:t,configurable:!0}),"t");const tc=Ir(e=>e.join(" → "),"formatChain");class ct extends Ze{static{m(this,"VisConfigNotFoundError")}static{Ir(this,"VisConfigNotFoundError")}constructor(t,r,n){const i=r.length>0?r[r.length-1]:"<unknown>",c=n.length>0?`
15
15
  Tried:
16
- ${s.join(`
17
- `)}`:"";super(`Cannot resolve "${t}" extended from ${u}.${l}
18
- Chain: ${yc(n)}`,n)}}var bc=Object.defineProperty,fo=x((e,t)=>bc(e,"name",{value:t,configurable:!0}),"i$1");const vn="@inherit",vc=["aliases","dependsOn","inputs","outputs"],$c=fo((e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(vn))return[...t];const n=[];for(const s of t){if(s===vn){e!==void 0&&n.push(...e);continue}n.push(s)}return n},"mergeArrayWithInherit"),xc=fo((e,t)=>{const n={...e,...t};for(const s of vc){const u=e?.[s],l=t?.[s],g=$c(u,l);g===void 0?delete n[s]:n[s]=g}return n},"mergeTargetWithInherit");var wc=Object.defineProperty,vt=x((e,t)=>wc(e,"name",{value:t,configurable:!0}),"o");const jc=vt(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"),Oc=vt(e=>Object.hasOwn(e,"targets")&&!Object.hasOwn(e,"tasks")?[{name:"targets",renamedTo:"tasks"}]:[],"detectDeprecatedTaskKeys"),kc=vt((e,t,n)=>{if(!n||typeof n!="object")return;const s=jc(n);if(s.length>0)throw new uo(e,t,s)},"assertNoDeprecatedConfigKeys"),Pc=vt((e,t,n)=>{if(!n||typeof n!="object")return;const s=Oc(n);if(s.length>0)throw new uo(e,t,s)},"assertNoDeprecatedTaskKeys");var Ec=Object.defineProperty,T=x((e,t)=>Ec(e,"name",{value:t,configurable:!0}),"r");const po=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],Tc=new Set(po),go=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],Ac=new Set(go),Xc=2880,Fr={blockExoticSubdeps:!0,policies:{installScripts:{strict:!0},publisherChange:{ignoreAfter:43200,mode:"no-downgrade"}}},Sc=T(e=>{if(!e)return{...Fr};const t=Fr.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{...Fr,...e,policies:s}},"mergeSecurityDefaults"),$n=T(e=>({...e,security:Sc(e.security),update:{security:!0,target:"minor",...e.update}}),"applyDefaults"),Cc=T(e=>{let t;try{t=wn(e)}catch{return}const n=new Set(t.filter(s=>Tc.has(s)));for(const s of po)if(n.has(s))return L(e,s)},"findVisConfigFile"),Mc=T(e=>{let t;try{t=wn(e)}catch{return}const n=new Set(t.filter(s=>Ac.has(s)));for(const s of go)if(n.has(s))return L(e,s)},"findVisTaskConfigFile"),Yr=T(e=>xn("sha256").update($o(e)).digest("hex"),"hashFileContents"),_c=T(e=>{const t=xn("sha256"),n=[...e].sort();for(const s of n)t.update(s),t.update(":"),t.update(Yr(s)),t.update(`
19
- `);return t.digest("hex")},"hashConfigChain"),zc=T(e=>{const t=L(e,"node_modules");if(J(t)){const s=L(t,".cache","vis");return ft(s),L(s,"vis-config-cache.json")}const n=Xn("vis",{create:!0,cwd:e});return n?L(n,"vis-config-cache.json"):void 0},"getConfigCachePath"),Nc=T((e,t)=>{if(J(e))try{const n=ot(e);if(n.hash===t)return n.config}catch{}},"readConfigCache"),Bc=T((e,t,n)=>{try{ft(rt(e)),co(e,{config:n,hash:t})}catch{}},"writeConfigCache"),Rc=T(e=>e===void 0?[]:Array.isArray(e)?e:[e],"normalizeExtends"),Ic=T((e,t,n)=>{if(kn(e))throw new Dr(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=L(u,e);if(s.push(l),J(l))return l;throw new Dr(e,[...n,t],s)}try{return tt(t).resolve(e)}catch{throw s.push(`require.resolve("${e}") from ${t}`),new Dr(e,[...n,t],s)}},"resolveExtendsSpecifier"),ho=T(async(e,t,n)=>{const s=Yr(t),u=t.slice(t.lastIndexOf(".")),l=L(rt(t),`.vis-config-tmp-${s}${u}`);xo(t,l);let g;try{g=await e.import(l,{default:!0,try:!0})??{}}catch(h){throw new bn(t,n,h)}finally{try{wo(l)}catch{}}try{return(typeof g=="function"?await g()??{}:g)??{}}catch(h){throw new bn(t,n,h)}},"loadRawConfig"),Dc=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]=xc(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],$=u[g];h!==void 0&&$!==void 0&&(l[g]={...h,...$})}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"),mo=T(async(e,t,n,s,u,l)=>{if(s.has(t))throw new fc(t,n);if(!u.has(t)){s.add(t);try{const g=await ho(e,t,n);kc(t,n,g);const h=Rc(g.extends);for(const $ of h){const O=Ic($,t,n);await mo(e,O,[...n,t],s,u,l)}u.set(t,g),l.push(t)}finally{s.delete(t)}}},"resolveConfigChain"),Yc=T(async(e,t)=>{let n;if(t?.explicitConfigPath){const v=kn(t.explicitConfigPath)?t.explicitConfigPath:L(e,t.explicitConfigPath);if(!J(v))throw new Error(`Cannot find config file at ${v}`);n=v}else n=Cc(e);if(!n)return $n({});const s=Pn(e,{fsCache:!1,moduleCache:!1}),u=new Set,l=new Map,g=[];await mo(s,n,[],u,l,g);const h=_c(g),$=zc(e);if($){const v=Nc($,h);if(v)return v}let O={};for(const v of g)O=Dc(O,l.get(v));const j=$n(O);return $&&Bc($,h,j),j},"loadVisConfig"),Fc=T(e=>e.replaceAll(/[^\w.-]+/g,"_"),"sanitizeProjectName"),Wc=T((e,t)=>{const n=L(e,"node_modules"),s=Fc(t);if(J(n)){const l=L(n,".cache","vis","task-configs");return ft(l),L(l,`${s}.json`)}const u=Xn("vis",{create:!0,cwd:e});return u?L(u,"task-configs",`${s}.json`):void 0},"getVisTaskCachePath"),Lc=T((e,t)=>{if(J(e))try{const n=ot(e);if(n.hash===t)return n.config}catch{}},"readVisTaskCache"),Vc=T((e,t,n)=>{try{ft(rt(e)),co(e,{config:n,hash:t})}catch{}},"writeVisTaskCache"),Qc=T(async(e,t,n)=>{const s=Mc(t);if(!s)return;const u=Yr(s),l=Wc(e,n);if(l){const O=Lc(l,u);if(O)return O}const g=Pn(t,{fsCache:!1,moduleCache:!1}),h=await ho(g,s,[]);Pc(s,[],h);const $=h;return l&&Vc(l,u,$),$},"loadVisTaskConfig"),eu=T(e=>e,"defineTaskConfig"),tu=T(e=>e,"defineConfig");export{Ka as B,Mc as G,Xc as H,Xn as K,yt as M,go as V,eu as a,ft as b,tu as c,pn as d,Yc as e,pt as f,za as g,po as h,xc as i,Cc as j,Fr as l,$n as m,ot as n,Qc as r,Pa as s,co as w};
16
+ ${n.join(`
17
+ `)}`:"";super(`Cannot resolve "${t}" extended from ${i}.${c}
18
+ Chain: ${tc(r)}`,r)}}var rc=Object.defineProperty,Rr=m((e,t)=>rc(e,"name",{value:t,configurable:!0}),"i$1");const Qt="@inherit",nc=["aliases","dependsOn","inputs","outputs"],oc=Rr((e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(Qt))return[...t];const r=[];for(const n of t){if(n===Qt){e!==void 0&&r.push(...e);continue}r.push(n)}return r},"mergeArrayWithInherit"),sc=Rr((e,t)=>{const r={...e,...t};for(const n of nc){const i=e?.[n],c=t?.[n],f=oc(i,c);f===void 0?delete r[n]:r[n]=f}return r},"mergeTargetWithInherit");var ic=Object.defineProperty,Xe=m((e,t)=>ic(e,"name",{value:t,configurable:!0}),"o");const ac=Xe(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:r}=e,n=[];if(Array.isArray(r))for(const[i,c]of r.entries())c&&typeof c=="object"&&(Object.hasOwn(c,"scope")&&n.push({location:`taskDefaults[${i}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(c,"targets")&&n.push({location:`taskDefaults[${i}].targets`,name:"targets",renamedTo:"tasks"}));t.push({children:n.length>0?n:void 0,name:"taskDefaults",renamedTo:"scopedTasks"})}else if(Array.isArray(e.scopedTasks))for(const[r,n]of e.scopedTasks.entries())n&&typeof n=="object"&&(Object.hasOwn(n,"scope")&&t.push({location:`scopedTasks[${r}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(n,"targets")&&t.push({location:`scopedTasks[${r}].targets`,name:"targets",renamedTo:"tasks"}));return t},"detectDeprecatedConfigKeys"),cc=Xe(e=>Object.hasOwn(e,"targets")&&!Object.hasOwn(e,"tasks")?[{name:"targets",renamedTo:"tasks"}]:[],"detectDeprecatedTaskKeys"),uc=Xe((e,t,r)=>{if(!r||typeof r!="object")return;const n=ac(r);if(n.length>0)throw new Dr(e,t,n)},"assertNoDeprecatedConfigKeys"),lc=Xe((e,t,r)=>{if(!r||typeof r!="object")return;const n=cc(r);if(n.length>0)throw new Dr(e,t,n)},"assertNoDeprecatedTaskKeys");var fc=Object.defineProperty,O=m((e,t)=>fc(e,"name",{value:t,configurable:!0}),"r");const Fr=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],pc=new Set(Fr),Wr=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],dc=new Set(Wr),zc=2880,ut={blockExoticSubdeps:!0,policies:{installScripts:{strict:!0},publisherChange:{ignoreAfter:43200,mode:"no-downgrade"}}},gc=O(e=>{if(!e)return{...ut};const t=ut.policies??{},r=e.policies??{},n={...t,...r};for(const i of Object.keys(t)){const c=t[i],f=r[i];c!==void 0&&f!==void 0&&(n[i]={...c,...f})}return{...ut,...e,policies:n}},"mergeSecurityDefaults"),er=O(e=>({...e,security:gc(e.security),update:{security:!0,target:"minor",...e.update}}),"applyDefaults"),mc=O(e=>{let t;try{t=rr(e)}catch{return}const r=new Set(t.filter(n=>pc.has(n)));for(const n of Fr)if(r.has(n))return A(e,n)},"findVisConfigFile"),hc=O(e=>{let t;try{t=rr(e)}catch{return}const r=new Set(t.filter(n=>dc.has(n)));for(const n of Wr)if(r.has(n))return A(e,n)},"findVisTaskConfigFile"),bt=O(e=>tr("sha256").update(fo(e)).digest("hex"),"hashFileContents"),yc=O(e=>{const t=tr("sha256"),r=[...e].sort();for(const n of r)t.update(n),t.update(":"),t.update(bt(n)),t.update(`
19
+ `);return t.digest("hex")},"hashConfigChain"),bc=O(e=>{const t=A(e,"node_modules");if(B(t)){const n=A(t,".cache","vis");return Ve(n),A(n,"vis-config-cache.json")}const r=kr("vis",{create:!0,cwd:e});return r?A(r,"vis-config-cache.json"):void 0},"getConfigCachePath"),vc=O((e,t)=>{if(B(e))try{const r=De(e);if(r.hash===t)return r.config}catch{}},"readConfigCache"),$c=O((e,t,r)=>{try{Ve(Ce(e)),Br(e,{config:r,hash:t})}catch{}},"writeConfigCache"),wc=O(e=>e===void 0?[]:Array.isArray(e)?e:[e],"normalizeExtends"),jc=O((e,t,r)=>{if(sr(e))throw new ct(e,[...r,t],["Absolute paths in `extends` are not supported. Use a relative path or an npm package name."]);const n=[];if(e.startsWith("./")||e.startsWith("../")){const i=Ce(t),c=A(i,e);if(n.push(c),B(c))return c;throw new ct(e,[...r,t],n)}try{return Se(t).resolve(e)}catch{throw n.push(`require.resolve("${e}") from ${t}`),new ct(e,[...r,t],n)}},"resolveExtendsSpecifier"),Lr=O(async(e,t,r)=>{const n=bt(t),i=t.slice(t.lastIndexOf(".")),c=A(Ce(t),`.vis-config-tmp-${n}${i}`);po(t,c);let f;try{f=await e.import(c,{default:!0,try:!0})??{}}catch(d){throw new Yt(t,r,d)}finally{try{go(c)}catch{}}try{return(typeof f=="function"?await f()??{}:f)??{}}catch(d){throw new Yt(t,r,d)}},"loadRawConfig"),xc=O((e,t)=>{const r={...e,...t};if(e.tasks||t.tasks){const n=new Set([...Object.keys(e.tasks??{}),...Object.keys(t.tasks??{})]),i={};for(const c of n)i[c]=sc(e.tasks?.[c],t.tasks?.[c]);r.tasks=i}if((e.scopedTasks||t.scopedTasks)&&(r.scopedTasks=[...e.scopedTasks??[],...t.scopedTasks??[]]),(e.fileGroups||t.fileGroups)&&(r.fileGroups={...e.fileGroups,...t.fileGroups}),(e.taskGroups||t.taskGroups)&&(r.taskGroups={...e.taskGroups,...t.taskGroups}),e.security||t.security){const n=e.security?.policies??{},i=t.security?.policies??{},c={...n,...i};for(const f of Object.keys(n)){const d=n[f],v=i[f];d!==void 0&&v!==void 0&&(c[f]={...d,...v})}r.security={...e.security,...t.security,acceptedRisks:{...e.security?.acceptedRisks,...t.security?.acceptedRisks},policies:c}}return(e.update||t.update)&&(r.update={...e.update,...t.update}),(e.taskRunner||t.taskRunner)&&(r.taskRunner={...e.taskRunner,...t.taskRunner}),delete r.extends,r},"mergeVisConfigs"),Vr=O(async(e,t,r,n,i,c)=>{if(n.has(t))throw new Ha(t,r);if(!i.has(t)){n.add(t);try{const f=await Lr(e,t,r);uc(t,r,f);const d=wc(f.extends);for(const v of d){const w=jc(v,t,r);await Vr(e,w,[...r,t],n,i,c)}i.set(t,f),c.push(t)}finally{n.delete(t)}}},"resolveConfigChain"),Bc=O(async(e,t)=>{let r;if(t?.explicitConfigPath){const y=sr(t.explicitConfigPath)?t.explicitConfigPath:A(e,t.explicitConfigPath);if(!B(y))throw new Error(`Cannot find config file at ${y}`);r=y}else r=mc(e);if(!r)return er({});const n=ir(e,{fsCache:!1,moduleCache:!1}),i=new Set,c=new Map,f=[];await Vr(n,r,[],i,c,f);const d=yc(f),v=bc(e);if(v){const y=vc(v,d);if(y)return y}let w={};for(const y of f)w=xc(w,c.get(y));const $=er(w);return v&&$c(v,d,$),$},"loadVisConfig"),Oc=O(e=>e.replaceAll(/[^\w.-]+/g,"_"),"sanitizeProjectName"),kc=O((e,t)=>{const r=A(e,"node_modules"),n=Oc(t);if(B(r)){const c=A(r,".cache","vis","task-configs");return Ve(c),A(c,`${n}.json`)}const i=kr("vis",{create:!0,cwd:e});return i?A(i,"task-configs",`${n}.json`):void 0},"getVisTaskCachePath"),Pc=O((e,t)=>{if(B(e))try{const r=De(e);if(r.hash===t)return r.config}catch{}},"readVisTaskCache"),Tc=O((e,t,r)=>{try{Ve(Ce(e)),Br(e,{config:r,hash:t})}catch{}},"writeVisTaskCache"),Dc=O(async(e,t,r)=>{const n=hc(t);if(!n)return;const i=bt(n),c=kc(e,r);if(c){const w=Pc(c,i);if(w)return w}const f=ir(t,{fsCache:!1,moduleCache:!1}),d=await Lr(f,n,[]);lc(n,[],d);const v=d;return c&&Tc(c,i,v),v},"loadVisTaskConfig"),Ic=O(e=>e,"defineTaskConfig"),Rc=O(e=>e,"defineConfig");export{kr as B,hc as G,zc as H,He as M,Wr as V,Ic as a,Ve as b,Rc as c,_a as d,Bc as e,Kt as f,Ue as g,Fr as h,ba as i,mc as j,sc as k,ut as l,er as m,De as n,Dc as r,la as s,Br as w};
@@ -1,2 +1,2 @@
1
- var g=Object.defineProperty;var d=(t,o)=>g(t,"name",{value:o,configurable:!0});import{M as l}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{C as v,S as h}from"./bin.js";import{s as j,p as x}from"../packem_shared/docker-BU-7veP5.js";var C=Object.defineProperty,m=d((t,o)=>C(t,"name",{value:o,configurable:!0}),"f");const $=m(async({argument:t,logger:o,options:s,visConfig:w,workspaceRoot:e})=>{const n=t[0];if(!n)throw new Error("Missing subcommand. Usage: vis docker <scaffold|prune>");if(!e)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{packageJsons:k,workspace:c}=v(e,w);if(n==="scaffold"){const a=h(e,c,k),r=s.focus;if(!r)throw new Error("Missing --focus. Pass one or more project names, comma-separated.");const f=r.split(",").map(i=>i.trim()).filter(Boolean);if(f.length===0)throw new Error("--focus resolved to an empty list. Provide at least one project name.");const u=l(e,s.out??".vis/docker"),{projects:p}=j({focus:f,includeSources:!!s.includeSources,log:m(i=>{o.info(i)},"log"),outDir:u,projectGraph:a,pruneLockfile:s.pruneLockfile!==!1,workspace:c,workspaceRoot:e});o.info(`Scaffolded ${p.length} project(s) into ${u}`),o.info(`Focus closure: ${p.toSorted().join(", ")}`);return}if(n==="prune"){const a=l(e,s.context??".vis/docker"),{removed:r}=x({contextRoot:a,workspace:c,workspaceRoot:e});o.info(`Pruned ${r.length} unfocused project(s)`),r.length>0&&o.debug?.(r.join(`
1
+ var g=Object.defineProperty;var d=(t,o)=>g(t,"name",{value:o,configurable:!0});import{M as l}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{C as v,S as h}from"./bin.js";import{s as j,p as x}from"../packem_shared/docker-BynKrOLe.js";var C=Object.defineProperty,m=d((t,o)=>C(t,"name",{value:o,configurable:!0}),"f");const $=m(async({argument:t,logger:o,options:s,visConfig:w,workspaceRoot:e})=>{const n=t[0];if(!n)throw new Error("Missing subcommand. Usage: vis docker <scaffold|prune>");if(!e)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{packageJsons:k,workspace:c}=v(e,w);if(n==="scaffold"){const a=h(e,c,k),r=s.focus;if(!r)throw new Error("Missing --focus. Pass one or more project names, comma-separated.");const f=r.split(",").map(i=>i.trim()).filter(Boolean);if(f.length===0)throw new Error("--focus resolved to an empty list. Provide at least one project name.");const u=l(e,s.out??".vis/docker"),{projects:p}=j({focus:f,includeSources:!!s.includeSources,log:m(i=>{o.info(i)},"log"),outDir:u,projectGraph:a,pruneLockfile:s.pruneLockfile!==!1,workspace:c,workspaceRoot:e});o.info(`Scaffolded ${p.length} project(s) into ${u}`),o.info(`Focus closure: ${p.toSorted().join(", ")}`);return}if(n==="prune"){const a=l(e,s.context??".vis/docker"),{removed:r}=x({contextRoot:a,workspace:c,workspaceRoot:e});o.info(`Pruned ${r.length} unfocused project(s)`),r.length>0&&o.debug?.(r.join(`
2
2
  `));return}throw new Error(`Unknown subcommand: "${n}". Expected scaffold or prune.`)},"execute");export{$ as default};
@@ -1 +1 @@
1
- var d=Object.defineProperty;var n=(o,r)=>d(o,"name",{value:r,configurable:!0});import{R as m,N as g}from"../packem_shared/pm-runner-Cj76BV8q.js";import{o as u}from"../packem_shared/utils-DrNg0XTR.js";var v=Object.defineProperty,k=n((o,r)=>v(o,"name",{value:r,configurable:!0}),"t");const x=k(async({argument:o,logger:r,options:e,visConfig:s,workspaceRoot:t})=>{const a=o;if(!a||a.length===0)throw new Error("No command specified. Usage: vis exec <command> [args...]");const[i,...f]=a,l=t??process.cwd(),p=m(l,{configBackend:s?.install?.backend,configCorepack:s?.install?.corepack}),c=g(p,{args:f,command:i,filter:u(e.filter),parallel:e.parallel||!1,recursive:e.recursive||!1,reverse:e.reverse||!1,shellMode:e.shellMode||!1,workspaceRoot:e.workspaceRoot||!1},l,r);c!==0&&(process.exitCode=c)},"execute");export{x as default};
1
+ var d=Object.defineProperty;var n=(o,r)=>d(o,"name",{value:r,configurable:!0});import{R as m,N as g}from"../packem_shared/pm-runner-BwX5AL3W.js";import{o as u}from"../packem_shared/utils-DrNg0XTR.js";var v=Object.defineProperty,k=n((o,r)=>v(o,"name",{value:r,configurable:!0}),"t");const x=k(async({argument:o,logger:r,options:e,visConfig:s,workspaceRoot:t})=>{const a=o;if(!a||a.length===0)throw new Error("No command specified. Usage: vis exec <command> [args...]");const[i,...f]=a,l=t??process.cwd(),p=m(l,{configBackend:s?.install?.backend,configCorepack:s?.install?.corepack}),c=g(p,{args:f,command:i,filter:u(e.filter),parallel:e.parallel||!1,recursive:e.recursive||!1,reverse:e.reverse||!1,shellMode:e.shellMode||!1,workspaceRoot:e.workspaceRoot||!1},l,r);c!==0&&(process.exitCode=c)},"execute");export{x as default};
@@ -1,4 +1,4 @@
1
- var g=Object.defineProperty;var a=(e,i)=>g(e,"name",{value:i,configurable:!0});import{createRequire as _}from"node:module";import{M as n,i as u,$ as p}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{B as $}from"./config.js";import{l as j}from"./bin.js";const b=_(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=a(e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[i,s]=c.versions.node.split(".").map(Number);if(i>22||i===22&&s>=3||i===20&&s>=16)return c.getBuiltinModule(e)}return b(e)},"__cjs_getBuiltinModule"),{rmSync:y}=d("node:fs"),{homedir:r}=d("node:os"),{createInterface:w}=d("node:readline");var T=Object.defineProperty,m=a((e,i)=>T(e,"name",{value:i,configurable:!0}),"l");const f=j(),h=[n(r(),".zshrc"),n(r(),".zshenv"),n(r(),".bashrc"),n(r(),".bash_profile"),n(r(),".profile"),n(r(),".config","fish","config.fish")],M=m(e=>{const i=[];for(const s of h)if(u(s))try{const l=p(s).split(`
1
+ var g=Object.defineProperty;var a=(e,i)=>g(e,"name",{value:i,configurable:!0});import{createRequire as _}from"node:module";import{M as n,i as u,$ as p}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{d as $}from"./config.js";import{l as j}from"./bin.js";const b=_(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=a(e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[i,s]=c.versions.node.split(".").map(Number);if(i>22||i===22&&s>=3||i===20&&s>=16)return c.getBuiltinModule(e)}return b(e)},"__cjs_getBuiltinModule"),{rmSync:y}=d("node:fs"),{homedir:r}=d("node:os"),{createInterface:w}=d("node:readline");var T=Object.defineProperty,m=a((e,i)=>T(e,"name",{value:i,configurable:!0}),"l");const f=j(),h=[n(r(),".zshrc"),n(r(),".zshenv"),n(r(),".bashrc"),n(r(),".bash_profile"),n(r(),".profile"),n(r(),".config","fish","config.fish")],M=m(e=>{const i=[];for(const s of h)if(u(s))try{const l=p(s).split(`
2
2
  `),o=l.filter(t=>!t.includes(".vis/bin")&&!t.includes("VIS_HOME")&&!t.includes("# vis "));o.length!==l.length&&($(s,o.join(`
3
3
  `)),i.push(s))}catch{e.warn(`warning: could not clean ${s}`)}return i},"cleanShellProfiles"),R=m(async({logger:e,options:i})=>{if(!u(f)){e.info("vis is not installed (no ~/.vis directory found).");return}e.info("This will remove:"),e.info(` ${f}/`);const s=h.filter(o=>u(o)&&p(o).includes(".vis"));for(const o of s)e.info(` Lines in ${o}`);if(!i.yes){if(!process.stdin.isTTY)throw new Error("Non-interactive terminal. Use --yes to confirm.");const o=w({input:process.stdin,output:process.stdout}),t=await new Promise(v=>{o.question(`
4
4
  Type "uninstall" to confirm: `,v)});if(o.close(),t.trim()!=="uninstall"){e.info("Aborted.");return}}const l=M(e);for(const o of l)e.info(`Cleaned ${o}`);try{y(f,{force:!0,recursive:!0}),e.info(`
@@ -1 +1 @@
1
- var g=Object.defineProperty;var c=(e,a)=>g(e,"name",{value:a,configurable:!0});import{R as d,S as k}from"../packem_shared/pm-runner-Cj76BV8q.js";var u=Object.defineProperty,v=c((e,a)=>u(e,"name",{value:a,configurable:!0}),"t");const x=v(async({argument:e,logger:a,options:r,process:i,visConfig:n,workspaceRoot:t})=>{if(!e||e.length===0)throw new Error("No package specified. Usage: vis info <package> [field...]");const[f,...p]=e,s=t??i.cwd,l=d(s,{configBackend:n?.install?.backend,configCorepack:n?.install?.corepack}),o=k(l,{fields:p,json:r.json||!1,package:f},s,a);o!==0&&o!==1&&(process.exitCode=o)},"execute");export{x as default};
1
+ var g=Object.defineProperty;var c=(e,a)=>g(e,"name",{value:a,configurable:!0});import{R as d,S as k}from"../packem_shared/pm-runner-BwX5AL3W.js";var u=Object.defineProperty,v=c((e,a)=>u(e,"name",{value:a,configurable:!0}),"t");const x=v(async({argument:e,logger:a,options:r,process:i,visConfig:n,workspaceRoot:t})=>{if(!e||e.length===0)throw new Error("No package specified. Usage: vis info <package> [field...]");const[f,...p]=e,s=t??i.cwd,l=d(s,{configBackend:n?.install?.backend,configCorepack:n?.install?.corepack}),o=k(l,{fields:p,json:r.json||!1,package:f},s,a);o!==0&&o!==1&&(process.exitCode=o)},"execute");export{x as default};
@@ -1,4 +1,4 @@
1
- var D=Object.defineProperty;var j=(t,s)=>D(t,"name",{value:s,configurable:!0});import{createRequire as M}from"node:module";import{i as b,M as d,z as P}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{H as v,B as w,j as K}from"./config.js";import{p as e}from"./bin.js";import{A as q}from"../packem_shared/pm-runner-Cj76BV8q.js";import{O as G}from"../packem_shared/build-scripts-3E2pmscY.js";import{N as A}from"../packem_shared/native-config-sync-BOeuyrBj.js";import{E as T}from"../packem_shared/min-release-age-heJgeP7o.js";const N=M(import.meta.url),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,C=j(t=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[s,o]=h.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return h.getBuiltinModule(t)}return N(t)},"__cjs_getBuiltinModule"),{execFileSync:I}=C("node:child_process"),{createInterface:F}=C("node:readline");var L=Object.defineProperty,u=j((t,s)=>L(t,"name",{value:s,configurable:!0}),"f");const Y=u(t=>{const s=[];return b(d(t,"turbo.json"))&&s.push("turborepo"),b(d(t,"nx.json"))&&s.push("nx"),b(d(t,".moon"))&&s.push("moon"),s},"detectExistingTools"),E=u((t,s)=>new Promise(o=>{t.question(s,i=>{o(i.trim())})}),"ask"),m=u(async(t,s,o=!0)=>{const i=await E(t,`${s} ${o?"[Y/n]":"[y/N]"} `);return i===""?o:i.toLowerCase()==="y"||i.toLowerCase()==="yes"},"confirm"),k=u((t,s)=>{const o=[],i=Object.entries(s.allowBuilds).filter(([,l])=>l).map(([l])=>` "${l}": true,`).join(`
1
+ var D=Object.defineProperty;var j=(o,s)=>D(o,"name",{value:s,configurable:!0});import{createRequire as M}from"node:module";import{i as b,M as d,z as P}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{H as v,d as w,j as K}from"./config.js";import{p as e}from"./bin.js";import{A as q}from"../packem_shared/pm-runner-BwX5AL3W.js";import{O as G}from"../packem_shared/build-scripts-3E2pmscY.js";import{N as A}from"../packem_shared/native-config-sync-DdhTLlKL.js";import{E as T}from"../packem_shared/min-release-age-aEn0x8Vy.js";const N=M(import.meta.url),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,C=j(o=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[s,t]=h.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return h.getBuiltinModule(o)}return N(o)},"__cjs_getBuiltinModule"),{execFileSync:I}=C("node:child_process"),{createInterface:F}=C("node:readline");var L=Object.defineProperty,u=j((o,s)=>L(o,"name",{value:s,configurable:!0}),"f");const Y=u(o=>{const s=[];return b(d(o,"turbo.json"))&&s.push("turborepo"),b(d(o,"nx.json"))&&s.push("nx"),b(d(o,".moon"))&&s.push("moon"),s},"detectExistingTools"),E=u((o,s)=>new Promise(t=>{o.question(s,i=>{t(i.trim())})}),"ask"),m=u(async(o,s,t=!0)=>{const i=await E(o,`${s} ${t?"[Y/n]":"[y/N]"} `);return i===""?t:i.toLowerCase()==="y"||i.toLowerCase()==="yes"},"confirm"),k=u((o,s)=>{const t=[],i=Object.entries(s.allowBuilds).filter(([,l])=>l).map(([l])=>` "${l}": true,`).join(`
2
2
  `),a=[` installScripts: {
3
3
  allow: ${i?`{
4
4
  ${i}
@@ -10,19 +10,18 @@ ${a.join(`
10
10
  `)}
11
11
  },`;return s.enableSocket&&(n+=`
12
12
  socket: { enabled: true },`),s.enableDepsDev&&(n+=`
13
- depsDev: { enabled: true },`),o.push(` security: {
13
+ depsDev: { enabled: true },`),t.push(` security: {
14
14
  ${n}
15
- },`),s.staged&&o.push(` staged: {
16
- "*.{ts,tsx}": "eslint --fix",
17
- "*.{ts,tsx,js,jsx,json,md}": "prettier --write",
15
+ },`),s.staged&&t.push(` staged: {
16
+ "*": ["vis lint --staged --fix", "vis fmt --staged"],
18
17
  },`),`import { defineConfig } from "@visulima/vis/config";
19
18
 
20
19
  export default defineConfig({
21
- ${o.join(`
20
+ ${t.join(`
22
21
 
23
22
  `)}
24
23
  });
25
- `},"generateConfigContent"),z=u(async(t,s,o)=>{const i=F({input:process.stdin,output:process.stdout});e.info(`
24
+ `},"generateConfigContent"),z=u(async(o,s,t)=>{const i=F({input:process.stdin,output:process.stdout});e.info(`
26
25
  vis init — interactive setup
27
- `);const a=await m(i," Enable Socket.dev security scanning?");a&&(e.success(" Socket.dev enabled — scores, alerts, and supply chain data active."),process.env.VIS_SOCKET_TOKEN||e.notice(" Set VIS_SOCKET_TOKEN for a custom API token (optional).")),e.info("");const n=await m(i," Enable Google deps.dev (OpenSSF Scorecard + GHSA advisories)?");n&&e.success(" deps.dev enabled — Scorecard signals and advisories merged into the security report."),e.info("");const l=await m(i," Scan for packages with build scripts?"),g={};if(l){e.info(" Scanning node_modules...");const c=G(t,{});if(c.length>0){e.info(` Found ${String(c.length)} package${c.length===1?"":"s"} with build scripts:
28
- `);for(const r of c){const f=await m(i,` Allow ${r}?`,!1),_=r.split(" (")[0]??r;g[_]=f,f&&e.success(` ✓ ${_} approved`)}}else e.info(" No packages with build scripts found.")}e.info("");const O=await m(i," Enforce a minimum release age (block freshly-published versions)?");let p;if(O){const c=await E(i,` Minimum age in minutes (default ${String(v)} = 2 days): `),r=c===""?v:Number.parseInt(c,10);p=Number.isFinite(r)&&r>0?r:v,e.success(` minimumReleaseAge: ${String(p)} minutes`)}e.info("");const S=await m(i," Set up pre-commit hooks (lint-staged)?",!1);let y=!1;(s.name==="pnpm"||s.name==="yarn"||s.name==="npm"||s.name==="bun")&&(e.info(""),y=await m(i,` Sync security settings to ${s.name} config?`));const $=Y(t);if($.length>0&&(e.info(""),e.info(` Detected existing tools: ${$.join(", ")}`),await m(i,` Run \`vis migrate\` for ${$.join(", ")}?`,!1))){i.close();const[c,...r]=s.name==="pnpm"?["pnpm","exec"]:s.name==="yarn"?["yarn","exec"]:s.name==="bun"?["bunx"]:["npx"];for(const f of $){e.info(` Migrating from ${f}...`);try{I(c,[...r,"vis","migrate",f],{cwd:t,stdio:"inherit"})}catch{e.warn(` Migration from ${f} had issues — run \`vis migrate ${f}\` manually.`)}}if(b(o))e.success(`Migrated config written to ${o}`);else{const f=k(s.name,{allowBuilds:g,enableDepsDev:n,enableSocket:a,minimumReleaseAge:p,staged:S});w(o,f),e.success(`Created ${o}`)}e.notice(" Run 'vis doctor' to see your project's full health status.");return}i.close(),e.info("");const B=k(s.name,{allowBuilds:g,enableDepsDev:n,enableSocket:a,minimumReleaseAge:p,staged:S});if(w(o,B),e.success(`Created ${o}`),y){const c=Object.fromEntries(Object.entries(g).filter(([,r])=>r));for(const r of A(s.name,t,c))e.success(` ${r}`);for(const r of T(s.name,t,p))e.success(` ${r}`)}e.info(""),e.info(" Setup complete. Your config:");const x=[a&&"Socket.dev",n&&"deps.dev"].filter(Boolean);e.info(` Security: ${x.length>0?`${x.join(" + ")} enabled`:"defaults only"}`),e.info(` Build scripts: ${Object.values(g).filter(Boolean).length} approved`),e.info(` Min age: ${p===void 0?"not enforced":`${String(p)} minutes`}`),e.info(` Git hooks: ${S?"lint-staged configured":"not configured"}`),e.info(` PM sync: ${y?"done":"skipped"}`),e.info(""),e.notice(" Run 'vis doctor' to see your project's full health status."),e.info("")},"runInteractiveInit"),H=u((t,s,o,i)=>{const a=k(s.name,{allowBuilds:{},enableDepsDev:!1,enableSocket:!1,minimumReleaseAge:v,staged:!1});if(w(i,a),e.success(`Created ${i}`),e.info(" Secure defaults are applied automatically by defineConfig()."),o.syncNative){for(const n of A(s.name,t,{}))e.success(` ${n}`);for(const n of T(s.name,t,v))e.success(` ${n}`)}e.info(""),e.notice("Run 'vis doctor' for a full health check, or 'vis init' in a terminal for guided setup.")},"runStaticInit"),R=u((t,s,o)=>{const i=d(t,".."),a=d(s,"node_modules","@visulima","vis","schemas",o),n=P(i,a),l=n===""?`./${o}`:n.split(/[/\\]/u).join("/");return l.startsWith(".")?l:`./${l}`},"buildSchemaRef"),V=u((t,s)=>{const o=R(d(t,"project.json"),s,"project.schema.json"),i=R(d(t,"vis.config.ts"),s,"vis-config.schema.json");e.info(""),e.info("Paste these into your config files to get editor IntelliSense:"),e.info(""),e.info(` project.json → "$schema": "${o}"`),e.info(` vis.config.ts → see ${i} (vis.config.ts is TypeScript; use the import path directly)`),e.info(""),e.notice("For nested project.json files, the `..` depth changes — run `vis migrate nx` to auto-rewrite all of them.")},"printSchemaPaths"),oe=u(async({options:t,workspaceRoot:s})=>{const o=s??process.cwd();if(t.schema){V(o,o);return}const i=q(o),a=K(o);if(a&&!t.force){e.warn(`Config already exists: ${a}`),e.notice("Use --force to overwrite, or edit the existing file.");return}const n=a??d(o,"vis.config.ts");process.stdin.isTTY&&t.interactive!==!1?await z(o,i,n):H(o,i,t,n)},"execute");export{R as buildSchemaRefForTesting,oe as default};
26
+ `);const a=await m(i," Enable Socket.dev security scanning?");a&&(e.success(" Socket.dev enabled — scores, alerts, and supply chain data active."),process.env.VIS_SOCKET_TOKEN||e.notice(" Set VIS_SOCKET_TOKEN for a custom API token (optional).")),e.info("");const n=await m(i," Enable Google deps.dev (OpenSSF Scorecard + GHSA advisories)?");n&&e.success(" deps.dev enabled — Scorecard signals and advisories merged into the security report."),e.info("");const l=await m(i," Scan for packages with build scripts?"),g={};if(l){e.info(" Scanning node_modules...");const c=G(o,{});if(c.length>0){e.info(` Found ${String(c.length)} package${c.length===1?"":"s"} with build scripts:
27
+ `);for(const r of c){const f=await m(i,` Allow ${r}?`,!1),x=r.split(" (")[0]??r;g[x]=f,f&&e.success(` ✓ ${x} approved`)}}else e.info(" No packages with build scripts found.")}e.info("");const O=await m(i," Enforce a minimum release age (block freshly-published versions)?");let p;if(O){const c=await E(i,` Minimum age in minutes (default ${String(v)} = 2 days): `),r=c===""?v:Number.parseInt(c,10);p=Number.isFinite(r)&&r>0?r:v,e.success(` minimumReleaseAge: ${String(p)} minutes`)}e.info("");const S=await m(i," Set up pre-commit hooks (lint-staged)?",!1);let y=!1;(s.name==="pnpm"||s.name==="yarn"||s.name==="npm"||s.name==="bun")&&(e.info(""),y=await m(i,` Sync security settings to ${s.name} config?`));const $=Y(o);if($.length>0&&(e.info(""),e.info(` Detected existing tools: ${$.join(", ")}`),await m(i,` Run \`vis migrate\` for ${$.join(", ")}?`,!1))){i.close();const[c,...r]=s.name==="pnpm"?["pnpm","exec"]:s.name==="yarn"?["yarn","exec"]:s.name==="bun"?["bunx"]:["npx"];for(const f of $){e.info(` Migrating from ${f}...`);try{I(c,[...r,"vis","migrate",f],{cwd:o,stdio:"inherit"})}catch{e.warn(` Migration from ${f} had issues — run \`vis migrate ${f}\` manually.`)}}if(b(t))e.success(`Migrated config written to ${t}`);else{const f=k(s.name,{allowBuilds:g,enableDepsDev:n,enableSocket:a,minimumReleaseAge:p,staged:S});w(t,f),e.success(`Created ${t}`)}e.notice(" Run 'vis doctor' to see your project's full health status.");return}i.close(),e.info("");const B=k(s.name,{allowBuilds:g,enableDepsDev:n,enableSocket:a,minimumReleaseAge:p,staged:S});if(w(t,B),e.success(`Created ${t}`),y){const c=Object.fromEntries(Object.entries(g).filter(([,r])=>r));for(const r of A(s.name,o,c))e.success(` ${r}`);for(const r of T(s.name,o,p))e.success(` ${r}`)}e.info(""),e.info(" Setup complete. Your config:");const _=[a&&"Socket.dev",n&&"deps.dev"].filter(Boolean);e.info(` Security: ${_.length>0?`${_.join(" + ")} enabled`:"defaults only"}`),e.info(` Build scripts: ${Object.values(g).filter(Boolean).length} approved`),e.info(` Min age: ${p===void 0?"not enforced":`${String(p)} minutes`}`),e.info(` Git hooks: ${S?"lint-staged configured":"not configured"}`),e.info(` PM sync: ${y?"done":"skipped"}`),e.info(""),e.notice(" Run 'vis doctor' to see your project's full health status."),e.info("")},"runInteractiveInit"),H=u((o,s,t,i)=>{const a=k(s.name,{allowBuilds:{},enableDepsDev:!1,enableSocket:!1,minimumReleaseAge:v,staged:!1});if(w(i,a),e.success(`Created ${i}`),e.info(" Secure defaults are applied automatically by defineConfig()."),t.syncNative){for(const n of A(s.name,o,{}))e.success(` ${n}`);for(const n of T(s.name,o,v))e.success(` ${n}`)}e.info(""),e.notice("Run 'vis doctor' for a full health check, or 'vis init' in a terminal for guided setup.")},"runStaticInit"),R=u((o,s,t)=>{const i=d(o,".."),a=d(s,"node_modules","@visulima","vis","schemas",t),n=P(i,a),l=n===""?`./${t}`:n.split(/[/\\]/u).join("/");return l.startsWith(".")?l:`./${l}`},"buildSchemaRef"),V=u((o,s)=>{const t=R(d(o,"project.json"),s,"project.schema.json"),i=R(d(o,"vis.config.ts"),s,"vis-config.schema.json");e.info(""),e.info("Paste these into your config files to get editor IntelliSense:"),e.info(""),e.info(` project.json → "$schema": "${t}"`),e.info(` vis.config.ts → see ${i} (vis.config.ts is TypeScript; use the import path directly)`),e.info(""),e.notice("For nested project.json files, the `..` depth changes — run `vis migrate nx` to auto-rewrite all of them.")},"printSchemaPaths"),te=u(async({options:o,workspaceRoot:s})=>{const t=s??process.cwd();if(o.schema){V(t,t);return}const i=q(t),a=K(t);if(a&&!o.force){e.warn(`Config already exists: ${a}`),e.notice("Use --force to overwrite, or edit the existing file.");return}const n=a??d(t,"vis.config.ts");process.stdin.isTTY&&o.interactive!==!1?await z(t,i,n):H(t,i,o,n)},"execute");export{R as buildSchemaRefForTesting,te as default};
@@ -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/index.server-B7ETiT4C.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-CiZla5EP.js";import{g as O,a as V,r as F}from"../packem_shared/provenance-CdvMwB2R.js";import{r as I}from"../packem_shared/signatures-BsEDWhME.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)}
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/index.server-B7ETiT4C.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-Bs9fUf3q.js";import{g as O,a as V,r as F}from"../packem_shared/provenance-BuiEsWbI.js";import{r as I}from"../packem_shared/signatures-LYMy8OR5.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"}`)}.