@visulima/vis 1.0.0-alpha.13 → 1.0.0-alpha.15

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 (99) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/LICENSE.md +8177 -385
  3. package/dist/bin.js +1 -1
  4. package/dist/config/index.d.ts +493 -1
  5. package/dist/config/index.js +1 -1
  6. package/dist/packem_chunks/applyDefaults.js +2 -2
  7. package/dist/packem_chunks/bin.js +1147 -209
  8. package/dist/packem_chunks/doctor-probe.js +2 -2
  9. package/dist/packem_chunks/fix.js +11 -11
  10. package/dist/packem_chunks/handler.js +1 -1
  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 +5 -5
  14. package/dist/packem_chunks/handler13.js +1 -1
  15. package/dist/packem_chunks/handler14.js +20 -18
  16. package/dist/packem_chunks/handler15.js +1 -20
  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 +5 -1
  21. package/dist/packem_chunks/handler2.js +1 -1
  22. package/dist/packem_chunks/handler20.js +1 -5
  23. package/dist/packem_chunks/handler21.js +1 -1
  24. package/dist/packem_chunks/handler22.js +5 -1
  25. package/dist/packem_chunks/handler23.js +1 -5
  26. package/dist/packem_chunks/handler24.js +3 -1
  27. package/dist/packem_chunks/handler25.js +1 -3
  28. package/dist/packem_chunks/handler26.js +1 -1
  29. package/dist/packem_chunks/handler27.js +7 -1
  30. package/dist/packem_chunks/handler28.js +22 -6
  31. package/dist/packem_chunks/handler29.js +3 -23
  32. package/dist/packem_chunks/handler3.js +4 -4
  33. package/dist/packem_chunks/handler30.js +18 -3
  34. package/dist/packem_chunks/handler31.js +1 -1
  35. package/dist/packem_chunks/handler32.js +2 -2
  36. package/dist/packem_chunks/handler33.js +24 -24
  37. package/dist/packem_chunks/handler34.js +2 -2
  38. package/dist/packem_chunks/handler35.js +3 -3
  39. package/dist/packem_chunks/handler36.js +16 -16
  40. package/dist/packem_chunks/handler37.js +2 -2
  41. package/dist/packem_chunks/handler38.js +6 -22
  42. package/dist/packem_chunks/handler39.js +9 -9
  43. package/dist/packem_chunks/handler4.js +1 -1
  44. package/dist/packem_chunks/handler40.js +5 -22
  45. package/dist/packem_chunks/handler41.js +10 -6
  46. package/dist/packem_chunks/handler42.js +24 -5
  47. package/dist/packem_chunks/handler43.js +153 -10
  48. package/dist/packem_chunks/handler44.js +25 -153
  49. package/dist/packem_chunks/handler45.js +3 -25
  50. package/dist/packem_chunks/handler46.js +27 -3
  51. package/dist/packem_chunks/handler47.js +41 -26
  52. package/dist/packem_chunks/handler48.js +32 -40
  53. package/dist/packem_chunks/handler5.js +7 -7
  54. package/dist/packem_chunks/handler6.js +1 -1
  55. package/dist/packem_chunks/handler7.js +1 -1
  56. package/dist/packem_chunks/handler8.js +1 -1
  57. package/dist/packem_chunks/handler9.js +1 -1
  58. package/dist/packem_chunks/heal-accept.js +4 -4
  59. package/dist/packem_chunks/heal.js +3 -3
  60. package/dist/packem_chunks/help-command.js +18 -0
  61. package/dist/packem_chunks/index.js +4 -4
  62. package/dist/packem_chunks/loader.js +1 -1
  63. package/dist/packem_shared/ai-analysis-CGVjqwdc.js +68 -0
  64. package/dist/packem_shared/ai-cache-BdPgSfg2.js +1 -0
  65. package/dist/packem_shared/{ai-fix-nn4zOE95.js → ai-fix-iHtGLkJS.js} +4 -4
  66. package/dist/packem_shared/cache-directory-DTfMSzT9.js +1 -0
  67. package/dist/packem_shared/dependency-scan-SQeRzrpJ.js +2 -0
  68. package/dist/packem_shared/docker-D5p9mRPU.js +2 -0
  69. package/dist/packem_shared/failure-log-CElcbnb9.js +2 -0
  70. package/dist/packem_shared/flakiness-C4t4_NoA.js +1 -0
  71. package/dist/packem_shared/lockfile-B7JJzxnL.js +1 -0
  72. package/dist/packem_shared/otel-CO8UEfTa.js +17 -0
  73. package/dist/packem_shared/otelPlugin-DTynZDWh.js +1 -0
  74. package/dist/packem_shared/readTomlSync-1fKo0R52-DAKNI1Me.js +109 -0
  75. package/dist/packem_shared/registry-D04iOQ5H.js +2 -0
  76. package/dist/packem_shared/run-summary-utils-BPraMTcm.js +1 -0
  77. package/dist/packem_shared/runtime-check-l4qFpo08.js +1 -0
  78. package/dist/packem_shared/selectors-Sem2CTYA.js +3 -0
  79. package/dist/packem_shared/toolchain-BhZNts--.js +5 -0
  80. package/dist/packem_shared/typosquats-Dr7VIL2B.js +1 -0
  81. package/dist/packem_shared/verify-C6NNOhTA.js +1 -0
  82. package/dist/packem_shared/{vis-update-app-D1jl0UZZ.js → vis-update-app-DGiMc5kb.js} +1 -1
  83. package/package.json +14 -31
  84. package/dist/packem_shared/ai-analysis-hm8d2W7z.js +0 -67
  85. package/dist/packem_shared/ai-cache-DoiF80AR.js +0 -1
  86. package/dist/packem_shared/cache-directory-CwHlJhgx.js +0 -1
  87. package/dist/packem_shared/dependency-scan-COr5n63B.js +0 -2
  88. package/dist/packem_shared/docker-D6OGr5_S.js +0 -2
  89. package/dist/packem_shared/failure-log-iUVLf6ts.js +0 -2
  90. package/dist/packem_shared/flakiness-D9wf0t56.js +0 -1
  91. package/dist/packem_shared/otel-DxDUPJJH.js +0 -6
  92. package/dist/packem_shared/otelPlugin-CQq6poq8.js +0 -1
  93. package/dist/packem_shared/registry-CkubDdiY.js +0 -2
  94. package/dist/packem_shared/run-summary-utils-BfBvjzhY.js +0 -1
  95. package/dist/packem_shared/runtime-check-BXZ43CBW.js +0 -1
  96. package/dist/packem_shared/selectors-BylODRiM.js +0 -3
  97. package/dist/packem_shared/toolchain-BgBOUHII.js +0 -5
  98. package/dist/packem_shared/typosquats-CcZl99B1.js +0 -1
  99. package/dist/packem_shared/verify-Baj5mFJ7.js +0 -1
@@ -0,0 +1,17 @@
1
+ var Io=Object.defineProperty;var x=(e,t)=>Io(e,"name",{value:t,configurable:!0});import{createRequire as Fo}from"node:module";import{definePlugin as Do}from"../packem_chunks/applyDefaults.js";const Wo=Fo(import.meta.url),dr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Lo=x(e=>{if(typeof dr<"u"&&dr.versions&&dr.versions.node){const[t,s]=dr.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return dr.getBuiltinModule(e)}return Wo(e)},"__cjs_getBuiltinModule"),{createRequire:Ce}=Lo("node:module");var Uo=Object.defineProperty,Ge=x((e,t)=>Uo(e,"name",{value:t,configurable:!0}),"K$2"),qo=Object.defineProperty,W=Ge((e,t)=>qo(e,"name",{value:t,configurable:!0}),"E");const Zo=Ce(import.meta.url),De=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ln=W(e=>{if(typeof De<"u"&&De.versions&&De.versions.node){const[t,s]=De.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return De.getBuiltinModule(e)}return Zo(e)},"__cjs_getBuiltinModule"),{existsSync:Ue}=Ln("node:fs"),{env:qe,cwd:Dn}=De,{createRequire:He}=Ln("node:module"),Un=0,Ze=2,qn=Symbol("findUpStop");var Vo=Object.defineProperty,Jo=W((e,t)=>Vo(e,"name",{value:t,configurable:!0}),"t$4"),Go=Object.defineProperty,Ho=Jo((e,t)=>Go(e,"name",{value:t,configurable:!0}),"t"),Ko=Object.defineProperty,Xo=Ho((e,t)=>Ko(e,"name",{value:t,configurable:!0}),"n");const Qr=Xo(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var Yo=Object.defineProperty,Qo=W((e,t)=>Yo(e,"name",{value:t,configurable:!0}),"i$4"),es=Object.defineProperty,ts=Qo((e,t)=>es(e,"name",{value:t,configurable:!0}),"r"),rs=Object.defineProperty,ns=ts((e,t)=>rs(e,"name",{value:t,configurable:!0}),"i");const bn=ns(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var os=Object.defineProperty,ss=W((e,t)=>os(e,"name",{value:t,configurable:!0}),"i$3"),is=Object.defineProperty,Zn=ss((e,t)=>is(e,"name",{value:t,configurable:!0}),"s");const as=He(import.meta.url),gr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ls=Zn(e=>{if(typeof gr<"u"&&gr.versions&&gr.versions.node){const[t,s]=gr.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return gr.getBuiltinModule(e)}return as(e)},"__cjs_getBuiltinModule"),{lstatSync:yn,mkdirSync:cs}=ls("node:fs");var us=Object.defineProperty,fs=Zn((e,t)=>us(e,"name",{value:t,configurable:!0}),"o");const ps=fs(e=>{Qr(e);try{const t=yn(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(bn(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{cs(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const s=yn(e);if(!s.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(bn(s))}'`,{cause:t})}},"ensureDirSync");var ds=Object.defineProperty,b=W((e,t)=>ds(e,"name",{value:t,configurable:!0}),"s$6");let $n=b(()=>{var e=(()=>{var t=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,d=b((r,n)=>{for(var o in n)t(r,o,{get:n[o],enumerable:!0})},"ne"),h=b((r,n,o,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of l(n))!u.call(r,i)&&i!==o&&t(r,i,{get:b(()=>n[i],"get"),enumerable:!(a=s(n,i))||a.enumerable});return r},"ae"),m=b(r=>h(t({},"__esModule",{value:!0}),r),"oe"),j={};d(j,{zeptomatch:b(()=>Pe,"zeptomatch")});var A=b(r=>{const n=new Set,o=[r];for(let a=0;a<o.length;a++){const i=o[a];if(n.has(i))continue;n.add(i);const{children:c}=i;if(c?.length)for(let f=0,g=c.length;f<g;f++)o.push(c[f])}return Array.from(n)},"M"),P=b(r=>{let n="";const o=A(r);for(let a=0,i=o.length;a<i;a++){const c=o[a];if(!c.regex)continue;const f=c.regex.flags;if(n||(n=f),n!==f)throw new Error(`Inconsistent RegExp flags used: "${n}" and "${f}"`)}return n},"se"),O=b((r,n,o)=>{const a=o.get(r);if(a!==void 0)return a;const i=r.partial??n;let c="";if(r.regex&&(c+=i?"(?:$|":"",c+=r.regex.source),r.children?.length){const f=T(r.children.map(g=>O(g,n,o)).filter(Boolean));if(f?.length){const g=r.children.some(D=>!D.regex||!(D.partial??n)),w=f.length>1||i&&(!c.length||g);c+=w?i?"(?:$|":"(?:":"",c+=f.join("|"),c+=w?")":""}}return r.regex&&(c+=i?")":""),o.set(r,c),c},"O"),N=b((r,n)=>{const o=new Map,a=A(r);for(let i=a.length-1;i>=0;i--){const c=O(a[i],n,o);if(!(i>0))return c}return""},"ie"),T=b(r=>Array.from(new Set(r)),"ue"),E=b((r,n,o)=>E.compile(r,o).test(n),"R");E.compile=(r,n)=>{const o=n?.partial??!1,a=N(r,o),i=P(r);return new RegExp(`^(?:${a})$`,i)};var q=E,G=b((r,n)=>{const o=q.compile(r,n),a=`${o.source.slice(0,-1)}[\\\\/]?$`,i=o.flags;return new RegExp(a,i)},"le"),re=G,Me=b(r=>{const n=r.map(a=>a.source).join("|")||"$^",o=r[0]?.flags;return new RegExp(n,o)},"ve"),_e=Me,K=b(r=>Array.isArray(r),"j"),B=b(r=>typeof r=="function","_"),Te=b(r=>r.length===0,"he"),Re=(()=>{const{toString:r}=Function.prototype,n=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return o=>(o.length===0||o.length===1)&&n.test(r.call(o))})(),Ke=b(r=>typeof r=="number","de"),Xe=b(r=>typeof r=="object"&&r!==null,"xe"),Ye=b(r=>r instanceof RegExp,"me"),Qe=(()=>{const r=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return n=>r.test(n.source)})(),et=(()=>{const r=/^[a-zA-Z0-9_-]+$/;return n=>r.test(n.source)&&!n.flags.includes("i")})(),ce=b(r=>typeof r=="string","A"),z=b(r=>r===void 0,"f"),tt=b(r=>{const n=new Map;return o=>{const a=n.get(o);if(a!==void 0)return a;const i=r(o);return n.set(o,i),i}},"ye"),ue=b((r,n,o={})=>{const a={cache:{},input:r,index:0,indexBacktrackMax:0,options:o,output:[]},i=M(n)(a),c=Math.max(a.index,a.indexBacktrackMax);if(i&&a.index===r.length)return a.output;throw new Error(`Failed to parse at index ${c}`)},"I"),p=b((r,n)=>K(r)?rt(r,n):ce(r)?fe(r,n):nt(r,n),"i"),rt=b((r,n)=>{const o={};for(const a of r){if(a.length!==1)throw new Error(`Invalid character: "${a}"`);const i=a.charCodeAt(0);o[i]=!0}return a=>{const i=a.input;let c=a.index,f=c;for(;f<i.length&&i.charCodeAt(f)in o;)f+=1;if(f>c){if(!z(n)&&!a.options.silent){const g=i.slice(c,f),w=B(n)?n(g,i,`${c}`):n;z(w)||a.output.push(w)}a.index=f}return!0}},"we"),nt=b((r,n)=>{if(et(r))return fe(r.source,n);{const o=r.source,a=r.flags.replace(/y|$/,"y"),i=new RegExp(o,a);return Qe(r)&&B(n)&&!Re(n)?ot(i,n):st(i,n)}},"$e"),ot=b((r,n)=>o=>{const a=o.index,i=o.input;r.lastIndex=a;const c=r.exec(i);if(c){const f=r.lastIndex;if(!o.options.silent){const g=n(...c,i,`${a}`);z(g)||o.output.push(g)}return o.index=f,!0}else return!1},"Ee"),st=b((r,n)=>o=>{const a=o.index,i=o.input;if(r.lastIndex=a,r.test(i)){const c=r.lastIndex;if(!z(n)&&!o.options.silent){const f=B(n)?n(i.slice(a,c),i,`${a}`):n;z(f)||o.output.push(f)}return o.index=c,!0}else return!1},"Ce"),fe=b((r,n)=>o=>{const a=o.index,i=o.input;if(i.startsWith(r,a)){if(!z(n)&&!o.options.silent){const c=B(n)?n(r,i,`${a}`):n;z(c)||o.output.push(c)}return o.index+=r.length,!0}else return!1},"F"),X=b((r,n,o,a)=>{const i=M(r),c=n>1;return Q(Y(de(f=>{let g=0;for(;g<o;){const w=f.index;if(!i(f)||(g+=1,f.index===w))break}return g>=n},c),a))},"k"),pe=b((r,n)=>X(r,0,1,n),"L"),Z=b((r,n)=>X(r,0,1/0,n),"$"),it=b((r,n)=>X(r,1,1/0,n),"Re"),C=b((r,n)=>{const o=r.map(M);return Q(Y(de(a=>{for(let i=0,c=o.length;i<c;i++)if(!o[i](a))return!1;return!0}),n))},"x"),k=b((r,n)=>{const o=r.map(M);return Q(Y(a=>{for(let i=0,c=o.length;i<c;i++)if(o[i](a))return!0;return!1},n))},"p"),de=b((r,n=!0,o=!1)=>{const a=M(r);return n?i=>{const c=i.index,f=i.output.length,g=a(i);return!g&&!o&&(i.indexBacktrackMax=Math.max(i.indexBacktrackMax,i.index)),(!g||o)&&(i.index=c,i.output.length!==f&&(i.output.length=f)),g}:a},"q"),Y=b((r,n)=>{const o=M(r);return n?a=>{if(a.options.silent)return o(a);const i=a.output.length;if(o(a)){const c=a.output.splice(i,1/0),f=n(c);return z(f)||a.output.push(f),!0}else return!1}:o},"B"),Q=(()=>{let r=0;return n=>{const o=M(n),a=r+=1;return i=>{var c;if(i.options.memoization===!1)return o(i);const f=i.index,g=(c=i.cache)[a]||(c[a]={indexMax:-1,queue:[]}),w=g.queue;if(f<=g.indexMax){const U=g.store||(g.store=new Map);if(w.length){for(let F=0,ur=w.length;F<ur;F+=2){const fr=w[F*2],pr=w[F*2+1];U.set(fr,pr)}w.length=0}const S=U.get(f);if(S===!1)return!1;if(Ke(S))return i.index=S,!0;if(S)return i.index=S.index,S.output?.length&&i.output.push(...S.output),!0}const D=i.output.length,cr=o(i);if(g.indexMax=Math.max(g.indexMax,f),cr){const U=i.index,S=i.output.length;if(S>D){const F=i.output.slice(D,S);w.push(f,{index:U,output:F})}else w.push(f,U);return!0}else return w.push(f,!1),!1}}})(),ge=b(r=>{let n;return o=>(n||(n=M(r())),n(o))},"G"),M=tt(r=>{if(B(r))return Te(r)?ge(r):r;if(ce(r)||Ye(r))return p(r);if(K(r))return C(r);if(Xe(r))return k(Object.values(r));throw new Error("Invalid rule")}),R=b(r=>r,"d"),at=b(r=>typeof r=="string","ke"),lt=b(r=>{const n=new WeakMap,o=new WeakMap;return(a,i)=>{const c=i?.partial?o:n,f=c.get(a);if(f!==void 0)return f;const g=r(a,i);return c.set(a,g),g}},"Be"),ct=b(r=>{const n={},o={};return(a,i)=>{const c=i?.partial?o:n;return c[a]??(c[a]=r(a,i))}},"Pe"),ut=p(/\\./,R),ft=p(/./,R),pt=p(/\*\*\*+/,"*"),dt=p(/([^/{[(!])\*\*/,(r,n)=>`${n}*`),gt=p(/(^|.)\*\*(?=[^*/)\]}])/,(r,n)=>`${n}*`),mt=Z(k([ut,pt,dt,gt,ft])),ht=mt,bt=b(r=>ue(r,ht,{memoization:!1}).join(""),"Ie"),yt=bt,me="abcdefghijklmnopqrstuvwxyz",$t=b(r=>{let n="";for(;r>0;){const o=(r-1)%26;n=me[o]+n,r=Math.floor((r-1)/26)}return n},"Le"),he=b(r=>{let n=0;for(let o=0,a=r.length;o<a;o++)n=n*26+me.indexOf(r[o])+1;return n},"V"),ee=b((r,n)=>{if(n<r)return ee(n,r);const o=[];for(;r<=n;)o.push(r++);return o},"b"),vt=b((r,n,o)=>ee(r,n).map(a=>String(a).padStart(o,"0")),"qe"),be=b((r,n)=>ee(he(r),he(n)).map($t),"W"),y=b(r=>({partial:!1,regex:new RegExp(r,"s"),children:[]}),"c"),L=b(r=>({children:r}),"y"),I=(()=>{const r=b((n,o,a)=>{if(a.has(n))return;a.add(n);const{children:i}=n;if(!i.length)i.push(o);else for(let c=0,f=i.length;c<f;c++)r(i[c],o,a)},"e");return n=>{if(!n.length)return L([]);for(let o=n.length-1;o>=1;o--){const a=new Set,i=n[o-1],c=n[o];r(i,c,a)}return n[0]}})(),_=b(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),xt=p(/\\./,y),wt=p(/[$.*+?^(){}[\]\|]/,r=>y(`\\${r}`)),jt=p(/[\\\/]/,_),Ot=p(/[^$.*+?^(){}[\]\|\\\/]+/,y),Pt=p(/^(?:!!)*!(.*)$/,(r,n)=>y(`(?!^${Pe.compile(n).source}$).*?`)),Et=p(/^(!!)+/),kt=k([Pt,Et]),St=p(/\/(\*\*\/)+/,()=>L([I([_(),y(".+?"),_()]),_()])),At=p(/^(\*\*\/)+/,()=>L([y("^"),I([y(".*?"),_()])])),zt=p(/\/(\*\*)$/,()=>L([I([_(),y(".*?")]),y("$")])),Mt=p(/\*\*/,()=>y(".*?")),ye=k([St,At,zt,Mt]),_t=p(/\*\/(?!\*\*\/|\*$)/,()=>I([y("[^\\\\/]*?"),_()])),Tt=p(/\*/,()=>y("[^\\\\/]*")),$e=k([_t,Tt]),ve=p("?",()=>y("[^\\\\/]")),Rt=p("[",R),Nt=p("]",R),Bt=p(/[!^]/,"^\\\\/"),Ct=p(/[a-z]-[a-z]|[0-9]-[0-9]/i,R),It=p(/\\./,R),Ft=p(/[$.*+?^(){}[\|]/,r=>`\\${r}`),Wt=p(/[\\\/]/,"\\\\/"),Lt=p(/[^$.*+?^(){}[\]\|\\\/]+/,R),Dt=k([It,Ft,Wt,Ct,Lt]),xe=C([Rt,pe(Bt),Z(Dt),Nt],r=>y(r.join(""))),Ut=p("{","(?:"),qt=p("}",")"),Zt=p(/(\d+)\.\.(\d+)/,(r,n,o)=>vt(+n,+o,Math.min(n.length,o.length)).join("|")),Vt=p(/([a-z]+)\.\.([a-z]+)/,(r,n,o)=>be(n,o).join("|")),Jt=p(/([A-Z]+)\.\.([A-Z]+)/,(r,n,o)=>be(n.toLowerCase(),o.toLowerCase()).join("|").toUpperCase()),Gt=k([Zt,Vt,Jt]),we=C([Ut,Gt,qt],r=>y(r.join(""))),Ht=p("{"),Kt=p("}"),Xt=p(","),Yt=p(/\\./,y),Qt=p(/[$.*+?^(){[\]\|]/,r=>y(`\\${r}`)),er=p(/[\\\/]/,_),tr=p(/[^$.*+?^(){}[\]\|\\\/,]+/,y),rr=ge(()=>Oe),nr=p("",()=>y("(?:)")),or=it(k([ye,$e,ve,xe,we,rr,Yt,Qt,er,tr]),I),je=k([or,nr]),Oe=C([Ht,pe(C([je,Z(C([Xt,je]))])),Kt],L),sr=Z(k([kt,ye,$e,ve,xe,we,Oe,xt,wt,jt,Ot]),I),ir=sr,ar=b(r=>ue(r,ir,{memoization:!1})[0],"kr"),lr=ar,te=b((r,n,o)=>te.compile(r,o).test(n),"N");te.compile=(()=>{const r=ct((o,a)=>re(lr(yt(o)),a)),n=lt((o,a)=>_e(o.map(i=>r(i,a))));return(o,a)=>at(o)?r(o,a):n(o,a)})();var Pe=te;return m(j)})();return e.default||e},"_lazyMatch"),Jr;const gs=b((e,t)=>(Jr||(Jr=$n(),$n=null),Jr(e,t)),"zeptomatch"),ms=/^[A-Z]:\//i,ne=b((e="")=>e&&e.replaceAll("\\","/").replace(ms,t=>t.toUpperCase()),"normalizeWindowsPath"),hs=/^[/\\]{2}/,bs=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Vn=/^[A-Z]:$/i,vn=/^\/([A-Z]:)?$/i,ys=/.(\.[^./]+)$/,$s=/^[/\\]|^[a-z]:[/\\]/i,vs=/\/$/,xs=b(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Jn=b((e,t)=>{let s="",l=0,u=-1,d=0,h;for(let m=0;m<=e.length;++m){if(m<e.length)h=e[m];else{if(h==="/")break;h="/"}if(h==="/"){if(!(u===m-1||d===1))if(d===2){if(s.length<2||l!==2||!s.endsWith(".")||s.at(-2)!=="."){if(s.length>2){const j=s.lastIndexOf("/");j===-1?(s="",l=0):(s=s.slice(0,j),l=s.length-1-s.lastIndexOf("/")),u=m,d=0;continue}else if(s.length>0){s="",l=0,u=m,d=0;continue}}t&&(s+=s.length>0?"/..":"..",l=2)}else s.length>0?s+=`/${e.slice(u+1,m)}`:s=e.slice(u+1,m),l=m-u-1;u=m,d=0}else h==="."&&d!==-1?++d:d=-1}return s},"normalizeString"),Be=b(e=>bs.test(e),"isAbsolute"),Gn=b(function(e){if(e.length===0)return".";e=ne(e);const t=hs.exec(e),s=Be(e),l=e.at(-1)==="/";return e=Jn(e,!s),e.length===0?s?"/":l?"./":".":(l&&(e+="/"),Vn.test(e)&&(e+="/"),t?s?`//${e}`:`//./${e}`:s&&!Be(e)?`/${e}`:e)},"normalize"),Hn=b((...e)=>{let t="";for(const s of e)if(s)if(t.length>0){const l=t.at(-1)==="/",u=s[0]==="/";l&&u?t+=s.slice(1):t+=l||u?s:`/${s}`}else t+=s;return Gn(t)},"join"),ie=b(function(...e){e=e.map(l=>ne(l));let t="",s=!1;for(let l=e.length-1;l>=-1&&!s;l--){const u=l>=0?e[l]:xs();!u||u.length===0||(t=`${u}/${t}`,s=Be(u))}return t=Jn(t,!s),s&&!Be(t)?`/${t}`:t.length>0?t:"."},"resolve");b(function(e){return ne(e)},"toNamespacedPath");const Kn=b(function(e){return ys.exec(ne(e))?.[1]??""},"extname");b(function(e,t){const s=ie(e).replace(vn,"$1").split("/"),l=ie(t).replace(vn,"$1").split("/");if(l[0][1]===":"&&s[0][1]===":"&&s[0]!==l[0])return l.join("/");const u=[...s];for(const d of u){if(l[0]!==d)break;s.shift(),l.shift()}return[...s.map(()=>".."),...l].join("/")},"relative");const en=b(e=>{const t=ne(e).replace(vs,"").split("/").slice(0,-1);return t.length===1&&Vn.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(Be(e)?"/":".")},"dirname");b(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return ne(e.root?ie(...t):t.join("/"))},"format");const ws=b((e,t)=>{const s=ne(e).split("/").pop();return t&&s.endsWith(t)?s.slice(0,-t.length):s},"basename"),Xn=b(function(e){const t=$s.exec(e)?.[0]?.replaceAll("\\","/")??"",s=ws(e),l=Kn(s);return{base:s,dir:en(e),ext:l,name:s.slice(0,s.length-l.length),root:t}},"parse");b((e,t)=>gs(t,Gn(e)),"matchesGlob");var js=Object.defineProperty,H=W((e,t)=>js(e,"name",{value:t,configurable:!0}),"i$2");const Os=He(import.meta.url),mr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ps=H(e=>{if(typeof mr<"u"&&mr.versions&&mr.versions.node){const[t,s]=mr.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return mr.getBuiltinModule(e)}return Os(e)},"__cjs_getBuiltinModule"),{fileURLToPath:Es}=Ps("node:url");function Br(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}x(Br,"dn$1");Ge(Br,"Nr");W(Br,"w$1");H(Br,"getDefaultExportFromCjs");var xn,wn;function Cr(){return wn||(wn=1,xn=["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"]),xn}x(Cr,"gn$1");Ge(Cr,"Dr");W(Cr,"y$2");H(Cr,"requireBinaryExtensions");var ks=Cr();const Ss=Br(ks),As=new Set(Ss),zs=new Set(["/","\\",void 0]),jn=Symbol.for("pathe:normalizedAlias"),Ms=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,_s=H((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),Tr=H((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),Yn=H(e=>{if(e[jn])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([s],[l])=>_s(s,l)));for(const s in t)for(const l in t)l===s||s.startsWith(l)||t[s].startsWith(l)&&zs.has(t[s][l.length])&&(t[s]=t[l]+t[s].slice(l.length));return Object.defineProperty(t,jn,{enumerable:!1,value:!0}),t},"normalizeAliases");H((e,t)=>{e=ne(e),t=Yn(t);for(const[s,l]of Object.entries(t)){if(!e.startsWith(s))continue;const u=Tr(s)?s.slice(0,-1):s;if(Tr(e[u.length]))return Hn(l,e.slice(s.length))}return e},"resolveAlias");H(e=>Ms.exec(e)?.[2],"filename");H((e,t)=>{e=ne(e),t=Yn(t);for(const[s,l]of Object.entries(t).toReversed()){if(!e.startsWith(l))continue;const u=Tr(l)?l.slice(0,-1):l;if(Tr(e[u.length]))return Hn(s,e.slice(l.length))}return e},"reverseResolveAlias");const Ts=/^(?:\.?\.[/\\]|\.\.\B)/,Rs=/^(?:msys|cygwin)$/;H(e=>Ts.test(e)||e==="..","isRelative");H(e=>As.has(Kn(e).slice(1).toLowerCase()),"isBinaryPath");const Ve=H(e=>ne(e instanceof URL?Es(e):e),"toPath");H(()=>{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:Rs.test(e)},"isWindows");var Ns=Object.defineProperty,Bs=W((e,t)=>Ns(e,"name",{value:t,configurable:!0}),"p"),Cs=Object.defineProperty,Qn=Bs((e,t)=>Cs(e,"name",{value:t,configurable:!0}),"a");const Is=He(import.meta.url),hr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,eo=Qn(e=>{if(typeof hr<"u"&&hr.versions&&hr.versions.node){const[t,s]=hr.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return hr.getBuiltinModule(e)}return Is(e)},"__cjs_getBuiltinModule"),{stat:Fs,lstat:Ws}=eo("node:fs/promises"),{fileURLToPath:Ls}=eo("node:url");var Ds=Object.defineProperty,On=Qn((e,t)=>Ds(e,"name",{value:t,configurable:!0}),"n");const Us=On(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 s=t.cwd?Ve(t.cwd):process.cwd();let l=ie(s);const{root:u}=Xn(l),d=Ve(t.stopAt??u),h=ie(l,d),m=t.type??"file",j=On(async function(P){return typeof e=="function"?[await e(P)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const A=t.allowSymlinks?Fs:Ws;for(;l&&l!==h&&l!==u;){const P=await j(l);for(let O of P){if(O===qn)return;if(O===void 0)continue;Buffer.isBuffer(O)?O=O.toString():O instanceof URL&&(O=Ls(O));const N=Be(O)?O:ie(l,O);try{const T=await A(N);if(m==="file"&&T.isFile()||m==="directory"&&T.isDirectory())return N}catch{}}l=en(l)}},"findUp");var qs=Object.defineProperty,Zs=W((e,t)=>qs(e,"name",{value:t,configurable:!0}),"u$3"),Vs=Object.defineProperty,to=Zs((e,t)=>Vs(e,"name",{value:t,configurable:!0}),"i");const Js=He(import.meta.url),br=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ro=to(e=>{if(typeof br<"u"&&br.versions&&br.versions.node){const[t,s]=br.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return br.getBuiltinModule(e)}return Js(e)},"__cjs_getBuiltinModule"),{statSync:Gs,lstatSync:Hs}=ro("node:fs"),{fileURLToPath:Ks}=ro("node:url");var Xs=Object.defineProperty,Pn=to((e,t)=>Xs(e,"name",{value:t,configurable:!0}),"o");const Ys=Pn((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 s=t.cwd?Ve(t.cwd):process.cwd();let l=ie(s);const{root:u}=Xn(l),d=Ve(t.stopAt??u),h=ie(l,d),m=t.type??"file",j=Pn(function(P){return typeof e=="function"?[e(P)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const A=t.allowSymlinks?Gs:Hs;for(;l&&l!==h&&l!==u;){for(let P of j(l)){if(P===qn)return;if(P===void 0)continue;Buffer.isBuffer(P)?P=P.toString():P instanceof URL&&(P=Ks(P));const O=Be(P)?P:ie(l,P);try{const N=A(O);if(m==="file"&&N.isFile()||m==="directory"&&N.isDirectory())return O}catch{}}l=en(l)}},"findUpSync");var Qs=Object.defineProperty,no=W((e,t)=>Qs(e,"name",{value:t,configurable:!0}),"t$2"),ei=Object.defineProperty,tn=no((e,t)=>ei(e,"name",{value:t,configurable:!0}),"s");const ti=He(import.meta.url),yr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ri=tn(e=>{if(typeof yr<"u"&&yr.versions&&yr.versions.node){const[t,s]=yr.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return yr.getBuiltinModule(e)}return ti(e)},"__cjs_getBuiltinModule"),{access:ni}=ri("node:fs/promises");var oi=Object.defineProperty,si=tn((e,t)=>oi(e,"name",{value:t,configurable:!0}),"o");async function ke(e,t=Un){Qr(e),e=Ve(e);try{return await ni(e,t),!0}catch{return!1}}x(ke,"Q$2");Ge(ke,"se");W(ke,"i$1");no(ke,"d");tn(ke,"m");si(ke,"isAccessible");var ii=Object.defineProperty,oo=W((e,t)=>ii(e,"name",{value:t,configurable:!0}),"t$1"),ai=Object.defineProperty,rn=oo((e,t)=>ai(e,"name",{value:t,configurable:!0}),"t");const li=He(import.meta.url),$r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ci=rn(e=>{if(typeof $r<"u"&&$r.versions&&$r.versions.node){const[t,s]=$r.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return $r.getBuiltinModule(e)}return li(e)},"__cjs_getBuiltinModule"),{accessSync:ui}=ci("node:fs");var fi=Object.defineProperty,pi=rn((e,t)=>fi(e,"name",{value:t,configurable:!0}),"o");function Se(e,t=Un){Qr(e),e=Ve(e);try{return ui(e,t),!0}catch{return!1}}x(Se,"ee$1");Ge(Se,"ie");W(Se,"i");oo(Se,"d");rn(Se,"m");pi(Se,"isAccessibleSync");var di=Object.defineProperty,so=W((e,t)=>di(e,"name",{value:t,configurable:!0}),"o"),gi=Object.defineProperty,io=so((e,t)=>gi(e,"name",{value:t,configurable:!0}),"o"),mi=Object.defineProperty,hi=io((e,t)=>mi(e,"name",{value:t,configurable:!0}),"o");let ao=class extends Error{static{x(this,"Jn")}static{Ge(this,"Xr")}static{W(this,"s")}static{so(this,"u")}static{io(this,"n")}static{hi(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 bi=Object.defineProperty,yi=W((e,t)=>bi(e,"name",{value:t,configurable:!0}),"$e"),$i=Object.defineProperty,nn=yi((e,t)=>$i(e,"name",{value:t,configurable:!0}),"W"),vi=Object.defineProperty,$=nn((e,t)=>vi(e,"name",{value:t,configurable:!0}),"u$1");let En=$(()=>{var e=(()=>{var t=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,d=$((r,n)=>{for(var o in n)t(r,o,{get:n[o],enumerable:!0})},"ne"),h=$((r,n,o,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of l(n))!u.call(r,i)&&i!==o&&t(r,i,{get:$(()=>n[i],"get"),enumerable:!(a=s(n,i))||a.enumerable});return r},"ae"),m=$(r=>h(t({},"__esModule",{value:!0}),r),"oe"),j={};d(j,{zeptomatch:$(()=>Pe,"zeptomatch")});var A=$(r=>{const n=new Set,o=[r];for(let a=0;a<o.length;a++){const i=o[a];if(n.has(i))continue;n.add(i);const{children:c}=i;if(c?.length)for(let f=0,g=c.length;f<g;f++)o.push(c[f])}return Array.from(n)},"M"),P=$(r=>{let n="";const o=A(r);for(let a=0,i=o.length;a<i;a++){const c=o[a];if(!c.regex)continue;const f=c.regex.flags;if(n||(n=f),n!==f)throw new Error(`Inconsistent RegExp flags used: "${n}" and "${f}"`)}return n},"se"),O=$((r,n,o)=>{const a=o.get(r);if(a!==void 0)return a;const i=r.partial??n;let c="";if(r.regex&&(c+=i?"(?:$|":"",c+=r.regex.source),r.children?.length){const f=T(r.children.map(g=>O(g,n,o)).filter(Boolean));if(f?.length){const g=r.children.some(D=>!D.regex||!(D.partial??n)),w=f.length>1||i&&(!c.length||g);c+=w?i?"(?:$|":"(?:":"",c+=f.join("|"),c+=w?")":""}}return r.regex&&(c+=i?")":""),o.set(r,c),c},"O"),N=$((r,n)=>{const o=new Map,a=A(r);for(let i=a.length-1;i>=0;i--){const c=O(a[i],n,o);if(!(i>0))return c}return""},"ie"),T=$(r=>Array.from(new Set(r)),"ue"),E=$((r,n,o)=>E.compile(r,o).test(n),"R");E.compile=(r,n)=>{const o=n?.partial??!1,a=N(r,o),i=P(r);return new RegExp(`^(?:${a})$`,i)};var q=E,G=$((r,n)=>{const o=q.compile(r,n),a=`${o.source.slice(0,-1)}[\\\\/]?$`,i=o.flags;return new RegExp(a,i)},"le"),re=G,Me=$(r=>{const n=r.map(a=>a.source).join("|")||"$^",o=r[0]?.flags;return new RegExp(n,o)},"ve"),_e=Me,K=$(r=>Array.isArray(r),"j"),B=$(r=>typeof r=="function","_"),Te=$(r=>r.length===0,"he"),Re=(()=>{const{toString:r}=Function.prototype,n=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return o=>(o.length===0||o.length===1)&&n.test(r.call(o))})(),Ke=$(r=>typeof r=="number","de"),Xe=$(r=>typeof r=="object"&&r!==null,"xe"),Ye=$(r=>r instanceof RegExp,"me"),Qe=(()=>{const r=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return n=>r.test(n.source)})(),et=(()=>{const r=/^[a-zA-Z0-9_-]+$/;return n=>r.test(n.source)&&!n.flags.includes("i")})(),ce=$(r=>typeof r=="string","A"),z=$(r=>r===void 0,"f"),tt=$(r=>{const n=new Map;return o=>{const a=n.get(o);if(a!==void 0)return a;const i=r(o);return n.set(o,i),i}},"ye"),ue=$((r,n,o={})=>{const a={cache:{},input:r,index:0,indexBacktrackMax:0,options:o,output:[]},i=M(n)(a),c=Math.max(a.index,a.indexBacktrackMax);if(i&&a.index===r.length)return a.output;throw new Error(`Failed to parse at index ${c}`)},"I"),p=$((r,n)=>K(r)?rt(r,n):ce(r)?fe(r,n):nt(r,n),"i"),rt=$((r,n)=>{const o={};for(const a of r){if(a.length!==1)throw new Error(`Invalid character: "${a}"`);const i=a.charCodeAt(0);o[i]=!0}return a=>{const i=a.input;let c=a.index,f=c;for(;f<i.length&&i.charCodeAt(f)in o;)f+=1;if(f>c){if(!z(n)&&!a.options.silent){const g=i.slice(c,f),w=B(n)?n(g,i,`${c}`):n;z(w)||a.output.push(w)}a.index=f}return!0}},"we"),nt=$((r,n)=>{if(et(r))return fe(r.source,n);{const o=r.source,a=r.flags.replace(/y|$/,"y"),i=new RegExp(o,a);return Qe(r)&&B(n)&&!Re(n)?ot(i,n):st(i,n)}},"$e"),ot=$((r,n)=>o=>{const a=o.index,i=o.input;r.lastIndex=a;const c=r.exec(i);if(c){const f=r.lastIndex;if(!o.options.silent){const g=n(...c,i,`${a}`);z(g)||o.output.push(g)}return o.index=f,!0}else return!1},"Ee"),st=$((r,n)=>o=>{const a=o.index,i=o.input;if(r.lastIndex=a,r.test(i)){const c=r.lastIndex;if(!z(n)&&!o.options.silent){const f=B(n)?n(i.slice(a,c),i,`${a}`):n;z(f)||o.output.push(f)}return o.index=c,!0}else return!1},"Ce"),fe=$((r,n)=>o=>{const a=o.index,i=o.input;if(i.startsWith(r,a)){if(!z(n)&&!o.options.silent){const c=B(n)?n(r,i,`${a}`):n;z(c)||o.output.push(c)}return o.index+=r.length,!0}else return!1},"F"),X=$((r,n,o,a)=>{const i=M(r),c=n>1;return Q(Y(de(f=>{let g=0;for(;g<o;){const w=f.index;if(!i(f)||(g+=1,f.index===w))break}return g>=n},c),a))},"k"),pe=$((r,n)=>X(r,0,1,n),"L"),Z=$((r,n)=>X(r,0,1/0,n),"$"),it=$((r,n)=>X(r,1,1/0,n),"Re"),C=$((r,n)=>{const o=r.map(M);return Q(Y(de(a=>{for(let i=0,c=o.length;i<c;i++)if(!o[i](a))return!1;return!0}),n))},"x"),k=$((r,n)=>{const o=r.map(M);return Q(Y(a=>{for(let i=0,c=o.length;i<c;i++)if(o[i](a))return!0;return!1},n))},"p"),de=$((r,n=!0,o=!1)=>{const a=M(r);return n?i=>{const c=i.index,f=i.output.length,g=a(i);return!g&&!o&&(i.indexBacktrackMax=Math.max(i.indexBacktrackMax,i.index)),(!g||o)&&(i.index=c,i.output.length!==f&&(i.output.length=f)),g}:a},"q"),Y=$((r,n)=>{const o=M(r);return n?a=>{if(a.options.silent)return o(a);const i=a.output.length;if(o(a)){const c=a.output.splice(i,1/0),f=n(c);return z(f)||a.output.push(f),!0}else return!1}:o},"B"),Q=(()=>{let r=0;return n=>{const o=M(n),a=r+=1;return i=>{var c;if(i.options.memoization===!1)return o(i);const f=i.index,g=(c=i.cache)[a]||(c[a]={indexMax:-1,queue:[]}),w=g.queue;if(f<=g.indexMax){const U=g.store||(g.store=new Map);if(w.length){for(let F=0,ur=w.length;F<ur;F+=2){const fr=w[F*2],pr=w[F*2+1];U.set(fr,pr)}w.length=0}const S=U.get(f);if(S===!1)return!1;if(Ke(S))return i.index=S,!0;if(S)return i.index=S.index,S.output?.length&&i.output.push(...S.output),!0}const D=i.output.length,cr=o(i);if(g.indexMax=Math.max(g.indexMax,f),cr){const U=i.index,S=i.output.length;if(S>D){const F=i.output.slice(D,S);w.push(f,{index:U,output:F})}else w.push(f,U);return!0}else return w.push(f,!1),!1}}})(),ge=$(r=>{let n;return o=>(n||(n=M(r())),n(o))},"G"),M=tt(r=>{if(B(r))return Te(r)?ge(r):r;if(ce(r)||Ye(r))return p(r);if(K(r))return C(r);if(Xe(r))return k(Object.values(r));throw new Error("Invalid rule")}),R=$(r=>r,"d"),at=$(r=>typeof r=="string","ke"),lt=$(r=>{const n=new WeakMap,o=new WeakMap;return(a,i)=>{const c=i?.partial?o:n,f=c.get(a);if(f!==void 0)return f;const g=r(a,i);return c.set(a,g),g}},"Be"),ct=$(r=>{const n={},o={};return(a,i)=>{const c=i?.partial?o:n;return c[a]??(c[a]=r(a,i))}},"Pe"),ut=p(/\\./,R),ft=p(/./,R),pt=p(/\*\*\*+/,"*"),dt=p(/([^/{[(!])\*\*/,(r,n)=>`${n}*`),gt=p(/(^|.)\*\*(?=[^*/)\]}])/,(r,n)=>`${n}*`),mt=Z(k([ut,pt,dt,gt,ft])),ht=mt,bt=$(r=>ue(r,ht,{memoization:!1}).join(""),"Ie"),yt=bt,me="abcdefghijklmnopqrstuvwxyz",$t=$(r=>{let n="";for(;r>0;){const o=(r-1)%26;n=me[o]+n,r=Math.floor((r-1)/26)}return n},"Le"),he=$(r=>{let n=0;for(let o=0,a=r.length;o<a;o++)n=n*26+me.indexOf(r[o])+1;return n},"V"),ee=$((r,n)=>{if(n<r)return ee(n,r);const o=[];for(;r<=n;)o.push(r++);return o},"b"),vt=$((r,n,o)=>ee(r,n).map(a=>String(a).padStart(o,"0")),"qe"),be=$((r,n)=>ee(he(r),he(n)).map($t),"W"),y=$(r=>({partial:!1,regex:new RegExp(r,"s"),children:[]}),"c"),L=$(r=>({children:r}),"y"),I=(()=>{const r=$((n,o,a)=>{if(a.has(n))return;a.add(n);const{children:i}=n;if(!i.length)i.push(o);else for(let c=0,f=i.length;c<f;c++)r(i[c],o,a)},"e");return n=>{if(!n.length)return L([]);for(let o=n.length-1;o>=1;o--){const a=new Set,i=n[o-1],c=n[o];r(i,c,a)}return n[0]}})(),_=$(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),xt=p(/\\./,y),wt=p(/[$.*+?^(){}[\]\|]/,r=>y(`\\${r}`)),jt=p(/[\\\/]/,_),Ot=p(/[^$.*+?^(){}[\]\|\\\/]+/,y),Pt=p(/^(?:!!)*!(.*)$/,(r,n)=>y(`(?!^${Pe.compile(n).source}$).*?`)),Et=p(/^(!!)+/),kt=k([Pt,Et]),St=p(/\/(\*\*\/)+/,()=>L([I([_(),y(".+?"),_()]),_()])),At=p(/^(\*\*\/)+/,()=>L([y("^"),I([y(".*?"),_()])])),zt=p(/\/(\*\*)$/,()=>L([I([_(),y(".*?")]),y("$")])),Mt=p(/\*\*/,()=>y(".*?")),ye=k([St,At,zt,Mt]),_t=p(/\*\/(?!\*\*\/|\*$)/,()=>I([y("[^\\\\/]*?"),_()])),Tt=p(/\*/,()=>y("[^\\\\/]*")),$e=k([_t,Tt]),ve=p("?",()=>y("[^\\\\/]")),Rt=p("[",R),Nt=p("]",R),Bt=p(/[!^]/,"^\\\\/"),Ct=p(/[a-z]-[a-z]|[0-9]-[0-9]/i,R),It=p(/\\./,R),Ft=p(/[$.*+?^(){}[\|]/,r=>`\\${r}`),Wt=p(/[\\\/]/,"\\\\/"),Lt=p(/[^$.*+?^(){}[\]\|\\\/]+/,R),Dt=k([It,Ft,Wt,Ct,Lt]),xe=C([Rt,pe(Bt),Z(Dt),Nt],r=>y(r.join(""))),Ut=p("{","(?:"),qt=p("}",")"),Zt=p(/(\d+)\.\.(\d+)/,(r,n,o)=>vt(+n,+o,Math.min(n.length,o.length)).join("|")),Vt=p(/([a-z]+)\.\.([a-z]+)/,(r,n,o)=>be(n,o).join("|")),Jt=p(/([A-Z]+)\.\.([A-Z]+)/,(r,n,o)=>be(n.toLowerCase(),o.toLowerCase()).join("|").toUpperCase()),Gt=k([Zt,Vt,Jt]),we=C([Ut,Gt,qt],r=>y(r.join(""))),Ht=p("{"),Kt=p("}"),Xt=p(","),Yt=p(/\\./,y),Qt=p(/[$.*+?^(){[\]\|]/,r=>y(`\\${r}`)),er=p(/[\\\/]/,_),tr=p(/[^$.*+?^(){}[\]\|\\\/,]+/,y),rr=ge(()=>Oe),nr=p("",()=>y("(?:)")),or=it(k([ye,$e,ve,xe,we,rr,Yt,Qt,er,tr]),I),je=k([or,nr]),Oe=C([Ht,pe(C([je,Z(C([Xt,je]))])),Kt],L),sr=Z(k([kt,ye,$e,ve,xe,we,Oe,xt,wt,jt,Ot]),I),ir=sr,ar=$(r=>ue(r,ir,{memoization:!1})[0],"kr"),lr=ar,te=$((r,n,o)=>te.compile(r,o).test(n),"N");te.compile=(()=>{const r=ct((o,a)=>re(lr(yt(o)),a)),n=lt((o,a)=>_e(o.map(i=>r(i,a))));return(o,a)=>at(o)?r(o,a):n(o,a)})();var Pe=te;return m(j)})();return e.default||e},"_lazyMatch"),Gr;const xi=$((e,t)=>(Gr||(Gr=En(),En=null),Gr(e,t)),"default");var wi=Object.defineProperty,ji=nn((e,t)=>wi(e,"name",{value:t,configurable:!0}),"t$1");const Oi=/^[A-Z]:\//i,Ie=ji((e="")=>e&&e.replaceAll("\\","/").replace(Oi,t=>t.toUpperCase()),"normalizeWindowsPath");var Pi=Object.defineProperty,V=nn((e,t)=>Pi(e,"name",{value:t,configurable:!0}),"r");const Ei=/^[/\\]{2}/,ki=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,lo=/^[A-Z]:$/i,kn=/^\/([A-Z]:)?$/i,Si=/.(\.[^./]+)$/,Ai=/^[/\\]|^[a-z]:[/\\]/i,zi=/\/$/,Mi=V(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),co=V((e,t)=>{let s="",l=0,u=-1,d=0,h;for(let m=0;m<=e.length;++m){if(m<e.length)h=e[m];else{if(h==="/")break;h="/"}if(h==="/"){if(!(u===m-1||d===1))if(d===2){if(s.length<2||l!==2||!s.endsWith(".")||s.at(-2)!=="."){if(s.length>2){const j=s.lastIndexOf("/");j===-1?(s="",l=0):(s=s.slice(0,j),l=s.length-1-s.lastIndexOf("/")),u=m,d=0;continue}else if(s.length>0){s="",l=0,u=m,d=0;continue}}t&&(s+=s.length>0?"/..":"..",l=2)}else s.length>0?s+=`/${e.slice(u+1,m)}`:s=e.slice(u+1,m),l=m-u-1;u=m,d=0}else h==="."&&d!==-1?++d:d=-1}return s},"normalizeString"),Er=V(e=>ki.test(e),"isAbsolute"),uo=V(function(e){if(e.length===0)return".";e=Ie(e);const t=Ei.exec(e),s=Er(e),l=e.at(-1)==="/";return e=co(e,!s),e.length===0?s?"/":l?"./":".":(l&&(e+="/"),lo.test(e)&&(e+="/"),t?s?`//${e}`:`//./${e}`:s&&!Er(e)?`/${e}`:e)},"normalize"),Ee=V((...e)=>{let t="";for(const s of e)if(s)if(t.length>0){const l=t.at(-1)==="/",u=s[0]==="/";l&&u?t+=s.slice(1):t+=l||u?s:`/${s}`}else t+=s;return uo(t)},"join"),Kr=V(function(...e){e=e.map(l=>Ie(l));let t="",s=!1;for(let l=e.length-1;l>=-1&&!s;l--){const u=l>=0?e[l]:Mi();!u||u.length===0||(t=`${u}/${t}`,s=Er(u))}return t=co(t,!s),s&&!Er(t)?`/${t}`:t.length>0?t:"."},"resolve");V(function(e){return Ie(e)},"toNamespacedPath");const _i=V(function(e){return Si.exec(Ie(e))?.[1]??""},"extname");V(function(e,t){const s=Kr(e).replace(kn,"$1").split("/"),l=Kr(t).replace(kn,"$1").split("/");if(l[0][1]===":"&&s[0][1]===":"&&s[0]!==l[0])return l.join("/");const u=[...s];for(const d of u){if(l[0]!==d)break;s.shift(),l.shift()}return[...s.map(()=>".."),...l].join("/")},"relative");const on=V(e=>{const t=Ie(e).replace(zi,"").split("/").slice(0,-1);return t.length===1&&lo.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(Er(e)?"/":".")},"dirname");V(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return Ie(e.root?Kr(...t):t.join("/"))},"format");const Ti=V((e,t)=>{const s=Ie(e).split("/").pop();return t&&s.endsWith(t)?s.slice(0,-t.length):s},"basename");V(function(e){const t=Ai.exec(e)?.[0]?.replaceAll("\\","/")??"",s=Ti(e),l=_i(s);return{base:s,dir:on(e),ext:l,name:s.slice(0,s.length-l.length),root:t}},"parse");V((e,t)=>xi(t,uo(e)),"matchesGlob");var Ri=Object.defineProperty,sn=W((e,t)=>Ri(e,"name",{value:t,configurable:!0}),"u");const Rr=sn((e,t)=>(t?.create&&ps(e),e),"useDirectory");sn(async(e,t)=>{if(qe.CACHE_DIR&&!["0","1","false","true"].includes(qe.CACHE_DIR))return Rr(Ee(qe.CACHE_DIR,e),t);const s=await Us("package.json",{cwd:t?.cwd??Dn(),type:"file"});if(!s){if(t?.throwError)throw new ao("No such file or directory found.");return}const l=Ee(on(s),"node_modules"),u=Ee(l,".cache"),d=Ee(u,e);if(!(Ue(d)&&!await ke(d,Ze))&&!(Ue(u)&&!await ke(u,Ze))&&!(Ue(l)&&!await ke(l,Ze)))return Rr(d,t)},"findCacheDirectory");const Ni=sn((e,t)=>{if(qe.CACHE_DIR&&!["0","1","false","true"].includes(qe.CACHE_DIR))return Rr(Ee(qe.CACHE_DIR,e),t);const s=Ys("package.json",{cwd:t?.cwd??Dn(),type:"file"});if(!s){if(t?.throwError)throw new ao("No such file or directory found.");return}const l=Ee(on(s),"node_modules"),u=Ee(l,".cache"),d=Ee(u,e);if(!(Ue(d)&&!Se(d,Ze))&&!(Ue(u)&&!Se(u,Ze))&&!(Ue(l)&&!Se(l,Ze)))return Rr(d,t)},"findCacheDirectorySync"),Zc=Ni,Xr=0,fo=4,Vc=Symbol("findUpStop"),Jc=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*[\s\S]*?\*\//g;var Bi=Object.defineProperty,Ci=x((e,t)=>Bi(e,"name",{value:t,configurable:!0}),"t$a"),Ii=Object.defineProperty,Fi=Ci((e,t)=>Ii(e,"name",{value:t,configurable:!0}),"t"),Wi=Object.defineProperty,Li=Fi((e,t)=>Wi(e,"name",{value:t,configurable:!0}),"n");const Ir=Li(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var Di=Object.defineProperty,Ui=x((e,t)=>Di(e,"name",{value:t,configurable:!0}),"i$a"),qi=Object.defineProperty,Zi=Ui((e,t)=>qi(e,"name",{value:t,configurable:!0}),"r"),Vi=Object.defineProperty,Ji=Zi((e,t)=>Vi(e,"name",{value:t,configurable:!0}),"i");const Sn=Ji(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var Gi=Object.defineProperty,Hi=x((e,t)=>Gi(e,"name",{value:t,configurable:!0}),"i$9"),Ki=Object.defineProperty,po=Hi((e,t)=>Ki(e,"name",{value:t,configurable:!0}),"s");const Xi=Ce(import.meta.url),vr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yi=po(e=>{if(typeof vr<"u"&&vr.versions&&vr.versions.node){const[t,s]=vr.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return vr.getBuiltinModule(e)}return Xi(e)},"__cjs_getBuiltinModule"),{lstatSync:An,mkdirSync:Qi}=Yi("node:fs");var ea=Object.defineProperty,ta=po((e,t)=>ea(e,"name",{value:t,configurable:!0}),"o");const Gc=ta(e=>{Ir(e);try{const t=An(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Sn(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{Qi(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const s=An(e);if(!s.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Sn(s))}'`,{cause:t})}},"ensureDirSync");var ra=Object.defineProperty,na=x((e,t)=>ra(e,"name",{value:t,configurable:!0}),"$e"),oa=Object.defineProperty,an=na((e,t)=>oa(e,"name",{value:t,configurable:!0}),"W"),sa=Object.defineProperty,v=an((e,t)=>sa(e,"name",{value:t,configurable:!0}),"u$1");let zn=v(()=>{var e=(()=>{var t=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,d=v((r,n)=>{for(var o in n)t(r,o,{get:n[o],enumerable:!0})},"ne"),h=v((r,n,o,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of l(n))!u.call(r,i)&&i!==o&&t(r,i,{get:v(()=>n[i],"get"),enumerable:!(a=s(n,i))||a.enumerable});return r},"ae"),m=v(r=>h(t({},"__esModule",{value:!0}),r),"oe"),j={};d(j,{zeptomatch:v(()=>Pe,"zeptomatch")});var A=v(r=>{const n=new Set,o=[r];for(let a=0;a<o.length;a++){const i=o[a];if(n.has(i))continue;n.add(i);const{children:c}=i;if(c?.length)for(let f=0,g=c.length;f<g;f++)o.push(c[f])}return Array.from(n)},"M"),P=v(r=>{let n="";const o=A(r);for(let a=0,i=o.length;a<i;a++){const c=o[a];if(!c.regex)continue;const f=c.regex.flags;if(n||(n=f),n!==f)throw new Error(`Inconsistent RegExp flags used: "${n}" and "${f}"`)}return n},"se"),O=v((r,n,o)=>{const a=o.get(r);if(a!==void 0)return a;const i=r.partial??n;let c="";if(r.regex&&(c+=i?"(?:$|":"",c+=r.regex.source),r.children?.length){const f=T(r.children.map(g=>O(g,n,o)).filter(Boolean));if(f?.length){const g=r.children.some(D=>!D.regex||!(D.partial??n)),w=f.length>1||i&&(!c.length||g);c+=w?i?"(?:$|":"(?:":"",c+=f.join("|"),c+=w?")":""}}return r.regex&&(c+=i?")":""),o.set(r,c),c},"O"),N=v((r,n)=>{const o=new Map,a=A(r);for(let i=a.length-1;i>=0;i--){const c=O(a[i],n,o);if(!(i>0))return c}return""},"ie"),T=v(r=>Array.from(new Set(r)),"ue"),E=v((r,n,o)=>E.compile(r,o).test(n),"R");E.compile=(r,n)=>{const o=n?.partial??!1,a=N(r,o),i=P(r);return new RegExp(`^(?:${a})$`,i)};var q=E,G=v((r,n)=>{const o=q.compile(r,n),a=`${o.source.slice(0,-1)}[\\\\/]?$`,i=o.flags;return new RegExp(a,i)},"le"),re=G,Me=v(r=>{const n=r.map(a=>a.source).join("|")||"$^",o=r[0]?.flags;return new RegExp(n,o)},"ve"),_e=Me,K=v(r=>Array.isArray(r),"j"),B=v(r=>typeof r=="function","_"),Te=v(r=>r.length===0,"he"),Re=(()=>{const{toString:r}=Function.prototype,n=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return o=>(o.length===0||o.length===1)&&n.test(r.call(o))})(),Ke=v(r=>typeof r=="number","de"),Xe=v(r=>typeof r=="object"&&r!==null,"xe"),Ye=v(r=>r instanceof RegExp,"me"),Qe=(()=>{const r=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return n=>r.test(n.source)})(),et=(()=>{const r=/^[a-zA-Z0-9_-]+$/;return n=>r.test(n.source)&&!n.flags.includes("i")})(),ce=v(r=>typeof r=="string","A"),z=v(r=>r===void 0,"f"),tt=v(r=>{const n=new Map;return o=>{const a=n.get(o);if(a!==void 0)return a;const i=r(o);return n.set(o,i),i}},"ye"),ue=v((r,n,o={})=>{const a={cache:{},input:r,index:0,indexBacktrackMax:0,options:o,output:[]},i=M(n)(a),c=Math.max(a.index,a.indexBacktrackMax);if(i&&a.index===r.length)return a.output;throw new Error(`Failed to parse at index ${c}`)},"I"),p=v((r,n)=>K(r)?rt(r,n):ce(r)?fe(r,n):nt(r,n),"i"),rt=v((r,n)=>{const o={};for(const a of r){if(a.length!==1)throw new Error(`Invalid character: "${a}"`);const i=a.charCodeAt(0);o[i]=!0}return a=>{const i=a.input;let c=a.index,f=c;for(;f<i.length&&i.charCodeAt(f)in o;)f+=1;if(f>c){if(!z(n)&&!a.options.silent){const g=i.slice(c,f),w=B(n)?n(g,i,`${c}`):n;z(w)||a.output.push(w)}a.index=f}return!0}},"we"),nt=v((r,n)=>{if(et(r))return fe(r.source,n);{const o=r.source,a=r.flags.replace(/y|$/,"y"),i=new RegExp(o,a);return Qe(r)&&B(n)&&!Re(n)?ot(i,n):st(i,n)}},"$e"),ot=v((r,n)=>o=>{const a=o.index,i=o.input;r.lastIndex=a;const c=r.exec(i);if(c){const f=r.lastIndex;if(!o.options.silent){const g=n(...c,i,`${a}`);z(g)||o.output.push(g)}return o.index=f,!0}else return!1},"Ee"),st=v((r,n)=>o=>{const a=o.index,i=o.input;if(r.lastIndex=a,r.test(i)){const c=r.lastIndex;if(!z(n)&&!o.options.silent){const f=B(n)?n(i.slice(a,c),i,`${a}`):n;z(f)||o.output.push(f)}return o.index=c,!0}else return!1},"Ce"),fe=v((r,n)=>o=>{const a=o.index,i=o.input;if(i.startsWith(r,a)){if(!z(n)&&!o.options.silent){const c=B(n)?n(r,i,`${a}`):n;z(c)||o.output.push(c)}return o.index+=r.length,!0}else return!1},"F"),X=v((r,n,o,a)=>{const i=M(r),c=n>1;return Q(Y(de(f=>{let g=0;for(;g<o;){const w=f.index;if(!i(f)||(g+=1,f.index===w))break}return g>=n},c),a))},"k"),pe=v((r,n)=>X(r,0,1,n),"L"),Z=v((r,n)=>X(r,0,1/0,n),"$"),it=v((r,n)=>X(r,1,1/0,n),"Re"),C=v((r,n)=>{const o=r.map(M);return Q(Y(de(a=>{for(let i=0,c=o.length;i<c;i++)if(!o[i](a))return!1;return!0}),n))},"x"),k=v((r,n)=>{const o=r.map(M);return Q(Y(a=>{for(let i=0,c=o.length;i<c;i++)if(o[i](a))return!0;return!1},n))},"p"),de=v((r,n=!0,o=!1)=>{const a=M(r);return n?i=>{const c=i.index,f=i.output.length,g=a(i);return!g&&!o&&(i.indexBacktrackMax=Math.max(i.indexBacktrackMax,i.index)),(!g||o)&&(i.index=c,i.output.length!==f&&(i.output.length=f)),g}:a},"q"),Y=v((r,n)=>{const o=M(r);return n?a=>{if(a.options.silent)return o(a);const i=a.output.length;if(o(a)){const c=a.output.splice(i,1/0),f=n(c);return z(f)||a.output.push(f),!0}else return!1}:o},"B"),Q=(()=>{let r=0;return n=>{const o=M(n),a=r+=1;return i=>{var c;if(i.options.memoization===!1)return o(i);const f=i.index,g=(c=i.cache)[a]||(c[a]={indexMax:-1,queue:[]}),w=g.queue;if(f<=g.indexMax){const U=g.store||(g.store=new Map);if(w.length){for(let F=0,ur=w.length;F<ur;F+=2){const fr=w[F*2],pr=w[F*2+1];U.set(fr,pr)}w.length=0}const S=U.get(f);if(S===!1)return!1;if(Ke(S))return i.index=S,!0;if(S)return i.index=S.index,S.output?.length&&i.output.push(...S.output),!0}const D=i.output.length,cr=o(i);if(g.indexMax=Math.max(g.indexMax,f),cr){const U=i.index,S=i.output.length;if(S>D){const F=i.output.slice(D,S);w.push(f,{index:U,output:F})}else w.push(f,U);return!0}else return w.push(f,!1),!1}}})(),ge=v(r=>{let n;return o=>(n||(n=M(r())),n(o))},"G"),M=tt(r=>{if(B(r))return Te(r)?ge(r):r;if(ce(r)||Ye(r))return p(r);if(K(r))return C(r);if(Xe(r))return k(Object.values(r));throw new Error("Invalid rule")}),R=v(r=>r,"d"),at=v(r=>typeof r=="string","ke"),lt=v(r=>{const n=new WeakMap,o=new WeakMap;return(a,i)=>{const c=i?.partial?o:n,f=c.get(a);if(f!==void 0)return f;const g=r(a,i);return c.set(a,g),g}},"Be"),ct=v(r=>{const n={},o={};return(a,i)=>{const c=i?.partial?o:n;return c[a]??(c[a]=r(a,i))}},"Pe"),ut=p(/\\./,R),ft=p(/./,R),pt=p(/\*\*\*+/,"*"),dt=p(/([^/{[(!])\*\*/,(r,n)=>`${n}*`),gt=p(/(^|.)\*\*(?=[^*/)\]}])/,(r,n)=>`${n}*`),mt=Z(k([ut,pt,dt,gt,ft])),ht=mt,bt=v(r=>ue(r,ht,{memoization:!1}).join(""),"Ie"),yt=bt,me="abcdefghijklmnopqrstuvwxyz",$t=v(r=>{let n="";for(;r>0;){const o=(r-1)%26;n=me[o]+n,r=Math.floor((r-1)/26)}return n},"Le"),he=v(r=>{let n=0;for(let o=0,a=r.length;o<a;o++)n=n*26+me.indexOf(r[o])+1;return n},"V"),ee=v((r,n)=>{if(n<r)return ee(n,r);const o=[];for(;r<=n;)o.push(r++);return o},"b"),vt=v((r,n,o)=>ee(r,n).map(a=>String(a).padStart(o,"0")),"qe"),be=v((r,n)=>ee(he(r),he(n)).map($t),"W"),y=v(r=>({partial:!1,regex:new RegExp(r,"s"),children:[]}),"c"),L=v(r=>({children:r}),"y"),I=(()=>{const r=v((n,o,a)=>{if(a.has(n))return;a.add(n);const{children:i}=n;if(!i.length)i.push(o);else for(let c=0,f=i.length;c<f;c++)r(i[c],o,a)},"e");return n=>{if(!n.length)return L([]);for(let o=n.length-1;o>=1;o--){const a=new Set,i=n[o-1],c=n[o];r(i,c,a)}return n[0]}})(),_=v(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),xt=p(/\\./,y),wt=p(/[$.*+?^(){}[\]\|]/,r=>y(`\\${r}`)),jt=p(/[\\\/]/,_),Ot=p(/[^$.*+?^(){}[\]\|\\\/]+/,y),Pt=p(/^(?:!!)*!(.*)$/,(r,n)=>y(`(?!^${Pe.compile(n).source}$).*?`)),Et=p(/^(!!)+/),kt=k([Pt,Et]),St=p(/\/(\*\*\/)+/,()=>L([I([_(),y(".+?"),_()]),_()])),At=p(/^(\*\*\/)+/,()=>L([y("^"),I([y(".*?"),_()])])),zt=p(/\/(\*\*)$/,()=>L([I([_(),y(".*?")]),y("$")])),Mt=p(/\*\*/,()=>y(".*?")),ye=k([St,At,zt,Mt]),_t=p(/\*\/(?!\*\*\/|\*$)/,()=>I([y("[^\\\\/]*?"),_()])),Tt=p(/\*/,()=>y("[^\\\\/]*")),$e=k([_t,Tt]),ve=p("?",()=>y("[^\\\\/]")),Rt=p("[",R),Nt=p("]",R),Bt=p(/[!^]/,"^\\\\/"),Ct=p(/[a-z]-[a-z]|[0-9]-[0-9]/i,R),It=p(/\\./,R),Ft=p(/[$.*+?^(){}[\|]/,r=>`\\${r}`),Wt=p(/[\\\/]/,"\\\\/"),Lt=p(/[^$.*+?^(){}[\]\|\\\/]+/,R),Dt=k([It,Ft,Wt,Ct,Lt]),xe=C([Rt,pe(Bt),Z(Dt),Nt],r=>y(r.join(""))),Ut=p("{","(?:"),qt=p("}",")"),Zt=p(/(\d+)\.\.(\d+)/,(r,n,o)=>vt(+n,+o,Math.min(n.length,o.length)).join("|")),Vt=p(/([a-z]+)\.\.([a-z]+)/,(r,n,o)=>be(n,o).join("|")),Jt=p(/([A-Z]+)\.\.([A-Z]+)/,(r,n,o)=>be(n.toLowerCase(),o.toLowerCase()).join("|").toUpperCase()),Gt=k([Zt,Vt,Jt]),we=C([Ut,Gt,qt],r=>y(r.join(""))),Ht=p("{"),Kt=p("}"),Xt=p(","),Yt=p(/\\./,y),Qt=p(/[$.*+?^(){[\]\|]/,r=>y(`\\${r}`)),er=p(/[\\\/]/,_),tr=p(/[^$.*+?^(){}[\]\|\\\/,]+/,y),rr=ge(()=>Oe),nr=p("",()=>y("(?:)")),or=it(k([ye,$e,ve,xe,we,rr,Yt,Qt,er,tr]),I),je=k([or,nr]),Oe=C([Ht,pe(C([je,Z(C([Xt,je]))])),Kt],L),sr=Z(k([kt,ye,$e,ve,xe,we,Oe,xt,wt,jt,Ot]),I),ir=sr,ar=v(r=>ue(r,ir,{memoization:!1})[0],"kr"),lr=ar,te=v((r,n,o)=>te.compile(r,o).test(n),"N");te.compile=(()=>{const r=ct((o,a)=>re(lr(yt(o)),a)),n=lt((o,a)=>_e(o.map(i=>r(i,a))));return(o,a)=>at(o)?r(o,a):n(o,a)})();var Pe=te;return m(j)})();return e.default||e},"_lazyMatch"),Hr;const ia=v((e,t)=>(Hr||(Hr=zn(),zn=null),Hr(e,t)),"default");var aa=Object.defineProperty,la=an((e,t)=>aa(e,"name",{value:t,configurable:!0}),"t$1");const ca=/^[A-Z]:\//i,oe=la((e="")=>e&&e.replaceAll("\\","/").replace(ca,t=>t.toUpperCase()),"normalizeWindowsPath");var ua=Object.defineProperty,J=an((e,t)=>ua(e,"name",{value:t,configurable:!0}),"r");const fa=/^[/\\]{2}/,pa=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,go=/^[A-Z]:$/i,Mn=/^\/([A-Z]:)?$/i,da=/.(\.[^./]+)$/,ga=/^[/\\]|^[a-z]:[/\\]/i,ma=/\/$/,ha=/^win/i,ba=J(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Hc="/",Kc=ha.test(globalThis.process?.platform??"")?";":":",mo=J((e,t)=>{let s="",l=0,u=-1,d=0,h;for(let m=0;m<=e.length;++m){if(m<e.length)h=e[m];else{if(h==="/")break;h="/"}if(h==="/"){if(!(u===m-1||d===1))if(d===2){if(s.length<2||l!==2||!s.endsWith(".")||s.at(-2)!=="."){if(s.length>2){const j=s.lastIndexOf("/");j===-1?(s="",l=0):(s=s.slice(0,j),l=s.length-1-s.lastIndexOf("/")),u=m,d=0;continue}else if(s.length>0){s="",l=0,u=m,d=0;continue}}t&&(s+=s.length>0?"/..":"..",l=2)}else s.length>0?s+=`/${e.slice(u+1,m)}`:s=e.slice(u+1,m),l=m-u-1;u=m,d=0}else h==="."&&d!==-1?++d:d=-1}return s},"normalizeString"),kr=J(e=>pa.test(e),"isAbsolute"),ho=J(function(e){if(e.length===0)return".";e=oe(e);const t=fa.exec(e),s=kr(e),l=e.at(-1)==="/";return e=mo(e,!s),e.length===0?s?"/":l?"./":".":(l&&(e+="/"),go.test(e)&&(e+="/"),t?s?`//${e}`:`//./${e}`:s&&!kr(e)?`/${e}`:e)},"normalize"),bo=J((...e)=>{let t="";for(const s of e)if(s)if(t.length>0){const l=t.at(-1)==="/",u=s[0]==="/";l&&u?t+=s.slice(1):t+=l||u?s:`/${s}`}else t+=s;return ho(t)},"join"),Yr=J(function(...e){e=e.map(l=>oe(l));let t="",s=!1;for(let l=e.length-1;l>=-1&&!s;l--){const u=l>=0?e[l]:ba();!u||u.length===0||(t=`${u}/${t}`,s=kr(u))}return t=mo(t,!s),s&&!kr(t)?`/${t}`:t.length>0?t:"."},"resolve");J(function(e){return oe(e)},"toNamespacedPath");const yo=J(function(e){return da.exec(oe(e))?.[1]??""},"extname"),Xc=J(function(e,t){const s=Yr(e).replace(Mn,"$1").split("/"),l=Yr(t).replace(Mn,"$1").split("/");if(l[0][1]===":"&&s[0][1]===":"&&s[0]!==l[0])return l.join("/");const u=[...s];for(const d of u){if(l[0]!==d)break;s.shift(),l.shift()}return[...s.map(()=>".."),...l].join("/")},"relative"),$o=J(e=>{const t=oe(e).replace(ma,"").split("/").slice(0,-1);return t.length===1&&go.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(kr(e)?"/":".")},"dirname");J(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return oe(e.root?Yr(...t):t.join("/"))},"format");const ya=J((e,t)=>{const s=oe(e).split("/").pop();return t&&s.endsWith(t)?s.slice(0,-t.length):s},"basename"),Yc=J(function(e){const t=ga.exec(e)?.[0]?.replaceAll("\\","/")??"",s=ya(e),l=yo(s);return{base:s,dir:$o(e),ext:l,name:s.slice(0,s.length-l.length),root:t}},"parse");J((e,t)=>ia(t,ho(e)),"matchesGlob");var $a=Object.defineProperty,Fe=x((e,t)=>$a(e,"name",{value:t,configurable:!0}),"n$5"),va=Object.defineProperty,le=Fe((e,t)=>va(e,"name",{value:t,configurable:!0}),"a");const xa=Ce(import.meta.url),xr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,wa=le(e=>{if(typeof xr<"u"&&xr.versions&&xr.versions.node){const[t,s]=xr.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return xr.getBuiltinModule(e)}return xa(e)},"__cjs_getBuiltinModule"),{fileURLToPath:ja}=wa("node:url");var Oa=Object.defineProperty,Je=le((e,t)=>Oa(e,"name",{value:t,configurable:!0}),"t$1");function Fr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}x(Fr,"m$4");Fe(Fr,"d");le(Fr,"getDefaultExportFromCjs");Je(Fr,"getDefaultExportFromCjs");function ln(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}x(ln,"h$2");Fe(ln,"O");le(ln,"getDefaultExportFromNamespaceIfPresent");Je(ln,"getDefaultExportFromNamespaceIfPresent");function cn(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}x(cn,"x$3");Fe(cn,"P");le(cn,"getDefaultExportFromNamespaceIfNotNamed");Je(cn,"getDefaultExportFromNamespaceIfNotNamed");function un(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var s=Je(le(Fe(x(function l(){var u=!1;try{u=this instanceof l}catch{}return u?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)},"a"),"s"),"a"),"a");s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(l){var u=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(s,l,u.get?u:{enumerable:!0,get:Je(function(){return e[l]},"get")})}),s}x(un,"y$3");Fe(un,"_");le(un,"getAugmentedNamespace");Je(un,"getAugmentedNamespace");var _n,Tn;function fn(){return Tn||(Tn=1,_n=["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"]),_n}x(fn,"w$2");Fe(fn,"k");le(fn,"requireBinaryExtensions");var Pa=fn();const Ea=Fr(Pa);var ka=Object.defineProperty,se=le((e,t)=>ka(e,"name",{value:t,configurable:!0}),"r");const Sa=new Set(Ea),Aa=new Set(["/","\\",void 0]),Rn=Symbol.for("pathe:normalizedAlias"),za=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,Ma=se((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),Nr=se((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),vo=se(e=>{if(e[Rn])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([s],[l])=>Ma(s,l)));for(const s in t)for(const l in t)l===s||s.startsWith(l)||t[s].startsWith(l)&&Aa.has(t[s][l.length])&&(t[s]=t[l]+t[s].slice(l.length));return Object.defineProperty(t,Rn,{enumerable:!1,value:!0}),t},"normalizeAliases");se((e,t)=>{e=oe(e),t=vo(t);for(const[s,l]of Object.entries(t)){if(!e.startsWith(s))continue;const u=Nr(s)?s.slice(0,-1):s;if(Nr(e[u.length]))return bo(l,e.slice(s.length))}return e},"resolveAlias");se(e=>za.exec(e)?.[2],"filename");se((e,t)=>{e=oe(e),t=vo(t);for(const[s,l]of Object.entries(t).toReversed()){if(!e.startsWith(l))continue;const u=Nr(l)?l.slice(0,-1):l;if(Nr(e[u.length]))return bo(s,e.slice(l.length))}return e},"reverseResolveAlias");const _a=/^(?:\.?\.[/\\]|\.\.\B)/,Ta=/^(?:msys|cygwin)$/;se(e=>_a.test(e)||e==="..","isRelative");se(e=>Sa.has(yo(e).slice(1).toLowerCase()),"isBinaryPath");const Wr=se(e=>oe(e instanceof URL?ja(e):e),"toPath");se(()=>{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:Ta.test(e)},"isWindows");var Ra=Object.defineProperty,xo=x((e,t)=>Ra(e,"name",{value:t,configurable:!0}),"t$8"),Na=Object.defineProperty,pn=xo((e,t)=>Na(e,"name",{value:t,configurable:!0}),"t");const Ba=Ce(import.meta.url),wr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ca=pn(e=>{if(typeof wr<"u"&&wr.versions&&wr.versions.node){const[t,s]=wr.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return wr.getBuiltinModule(e)}return Ba(e)},"__cjs_getBuiltinModule"),{accessSync:Ia}=Ca("node:fs");var Fa=Object.defineProperty,Wa=pn((e,t)=>Fa(e,"name",{value:t,configurable:!0}),"o");function ae(e,t=Xr){Ir(e),e=Wr(e);try{return Ia(e,t),!0}catch{return!1}}x(ae,"i$7");xo(ae,"d");pn(ae,"m");Wa(ae,"isAccessibleSync");var La=Object.defineProperty,wo=x((e,t)=>La(e,"name",{value:t,configurable:!0}),"t$7"),Da=Object.defineProperty,jo=wo((e,t)=>Da(e,"name",{value:t,configurable:!0}),"t"),Ua=Object.defineProperty,qa=jo((e,t)=>Ua(e,"name",{value:t,configurable:!0}),"o");let Nn=class extends Error{static{x(this,"c")}static{wo(this,"i")}static{jo(this,"n")}static{qa(this,"PermissionError")}constructor(t){super(`EPERM: Operation not permitted, ${t}`)}get code(){return"EPERM"}set code(t){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(t){throw new Error("Cannot overwrite name of PermissionError")}};var Za=Object.defineProperty,Va=x((e,t)=>Za(e,"name",{value:t,configurable:!0}),"a$5"),Ja=Object.defineProperty,Oo=Va((e,t)=>Ja(e,"name",{value:t,configurable:!0}),"i");const Ga=Ce(import.meta.url),jr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Po=Oo(e=>{if(typeof jr<"u"&&jr.versions&&jr.versions.node){const[t,s]=jr.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return jr.getBuiltinModule(e)}return Ga(e)},"__cjs_getBuiltinModule"),{readFileSync:Ha}=Po("node:fs"),{unzipSync:Ka,brotliDecompressSync:Xa}=Po("node:zlib");var Ya=Object.defineProperty,Eo=Oo((e,t)=>Ya(e,"name",{value:t,configurable:!0}),"r");const Qa={brotli:Xa,gzip:Ka,none:Eo(e=>e,"none")},el=Eo((e,t)=>{if(Ir(e),e=Wr(e),!ae(e))throw new Nn(`unable to read the non-accessible file: ${e}`);if(!ae(e,fo))throw new Nn(`invalid access to read file at: ${e}`);const{buffer:s,compression:l,encoding:u,flag:d}=t??{},h=Ha(e,d?{encoding:u,flag:d}:{encoding:u}),m=Qa[l??"none"],j=m(h);return s?j:j.toString()},"readFileSync");var tl=Object.defineProperty,rl=x((e,t)=>tl(e,"name",{value:t,configurable:!0}),"x$2"),nl=Object.defineProperty,ko=rl((e,t)=>nl(e,"name",{value:t,configurable:!0}),"$"),ol=Object.defineProperty,sl=ko((e,t)=>ol(e,"name",{value:t,configurable:!0}),"A"),il=Object.defineProperty,dn=sl((e,t)=>il(e,"name",{value:t,configurable:!0}),"$"),al=Object.defineProperty,ll=dn((e,t)=>al(e,"name",{value:t,configurable:!0}),"r$1");const cl=ll(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
2
+ `),"normalizeLF"),ul=globalThis.process??Object.create(null),Bn={versions:{}},Cn=new Proxy(ul,{get(e,t){if(t in e)return e[t];if(t in Bn)return Bn[t]}});var fl=Object.defineProperty,pl=dn((e,t)=>fl(e,"name",{value:t,configurable:!0}),"b");const dl=pl((e,t,s,l)=>{const u={column:0,line:-1,...e.start},d={...u,...e.end},h=u.line,m=u.column,j=d.line,A=d.column;let P=Math.max(h-(s+1),0),O=Math.min(t.length,j+l);h===-1&&(P=0),j===-1&&(O=t.length);const N=j-h,T={};if(N)for(let E=0;E<=N;E++){const q=E+h;if(!m)T[q]=!0;else if(E===0){const G=t[q-1]?.length;T[q]=[m,(G??0)-m+1]}else if(E===N)T[q]=[0,A];else{const G=t[q-E]?.length;T[q]=[0,G]}}else m===A?T[h]=m?[m,0]:!0:T[h]=[m,(A??0)-(m??0)];return{end:O,markerLines:T,start:P}},"getMarkerLines");var gl=Object.defineProperty,_r=dn((e,t)=>gl(e,"name",{value:t,configurable:!0}),"t");const ml=Cn.platform==="win32"&&!Cn.env?.WT_SESSION?">":"❯",hl=_r((e,t,s)=>{const l={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...s,color:{gutter:_r(E=>E,"gutter"),marker:_r(E=>E,"marker"),message:_r(E=>E,"message"),...s?.color}},u=typeof t.start.column=="number";let d=cl(e).split(`
3
+ `);typeof l.tabWidth=="number"&&(d=d.map(E=>E.replaceAll(" "," ".repeat(l.tabWidth))));const{end:h,markerLines:m,start:j}=dl(t,d,l.linesAbove,l.linesBelow),A=String(h).length,{gutter:P,marker:O,message:N}=l.color;let T=d.slice(j,h).map((E,q)=>{const G=j+1+q,re=m[G],Me=` ${String(G)}`.slice(-A),_e=!m[G+1],K=` ${Me}${l.showGutter?" |":""}`;if(re){let B="";if(Array.isArray(re)){const Te=E.replaceAll(/[^\t]/g," ").slice(0,Math.max(re[0]-1,0)),Re=re[1]||1;B=[`
4
+ `,l.prefix+P(K.replaceAll(/\d/g," "))," ",Te,O("^").repeat(Re)].join(""),_e&&l.message&&(B+=` ${N(l.message)}`)}return[l.prefix+O(ml),P(K),E.length>0?` ${E}`:"",B].join("")}return`${l.prefix} ${P(K)}${E.length>0?` ${E}`:""}`}).join(`
5
+ `);return l.message&&!u&&(T=`${l.prefix+" ".repeat(A+1)+l.message}
6
+ ${T}`),T},"codeFrame");var bl=Object.defineProperty,yl=ko((e,t)=>bl(e,"name",{value:t,configurable:!0}),"s"),$l=Object.defineProperty,vl=yl((e,t)=>$l(e,"name",{value:t,configurable:!0}),"o"),xl=Object.defineProperty,gn=vl((e,t)=>xl(e,"name",{value:t,configurable:!0}),"l");const In=gn((e,t)=>{let s=0,l=t.length-2;for(;s<l;){const u=s+(l-s>>1);if(e<t[u])l=u-1;else if(e>=t[u+1])s=u+1;else{s=u;break}}return s},"binarySearch"),wl=/\n|\r(?!\n)/,jl=gn(e=>e.split(wl).reduce((t,s)=>(t.push(t.at(-1)+s.length+1),t),[0]),"getLineStartIndexes"),Ol=gn((e,t,s)=>{const l=s?.skipChecks??!1;if(!l&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!l&&(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 d=jl(e),h=In(t,d);return{column:t-d[h]+1,line:h+1}}const u=In(t,e);return{column:t-e[u]+1,line:u+1}},"indexToLineColumn");var Pl=Object.defineProperty,So=x((e,t)=>Pl(e,"name",{value:t,configurable:!0}),"t$6"),El=Object.defineProperty,Ao=So((e,t)=>El(e,"name",{value:t,configurable:!0}),"t"),kl=Object.defineProperty,Sl=Ao((e,t)=>kl(e,"name",{value:t,configurable:!0}),"i");let Al=class extends Error{static{x(this,"m")}static{So(this,"m")}static{Ao(this,"t")}static{Sl(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
+
8
+ ${this.codeFrame}
9
+ `:""}`}set message(t){this.#e=t}};var zl=Object.defineProperty,zo=x((e,t)=>zl(e,"name",{value:t,configurable:!0}),"u$3"),Ml=Object.defineProperty,Mo=zo((e,t)=>Ml(e,"name",{value:t,configurable:!0}),"s"),_l=Object.defineProperty,zr=Mo((e,t)=>_l(e,"name",{value:t,configurable:!0}),"a");const Tl=zr(e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,"getCodePoint"),Rl=zr((e,t,s)=>hl(e,{start:t},{tabWidth:!1,...s}),"generateCodeFrame"),Nl=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,Bl=zr((e,t)=>{const s=Nl.exec(t);if(!s)return;const[,l,u,d]=s;if(u&&d)return{column:Number(d),line:Number(u)};let h=Number(l);return h===e.length&&(h=e.length-1),Ol(e,h)},"getErrorLocation"),Cl=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,Il=zr(e=>e.replace(Cl,(t,s,l)=>`"${l}"(${Tl(l)})`),"addCodePointToUnexpectedToken");function Lr(e,t,s,l){typeof t=="string"&&(typeof s=="object"&&(l=s),s=t,t=void 0);let u;try{return JSON.parse(e,t)}catch(m){u=m.message}let d;e?(d=Bl(e,u),u=Il(u)):u+=" while parsing empty string";const h=new Al(u);throw h.fileName=s,d&&(h.codeFrame=Rl(e,d,l)),h}x(Lr,"d$3");zo(Lr,"w");Mo(Lr,"E");zr(Lr,"parseJson");var Fl=Object.defineProperty,_o=x((e,t)=>Fl(e,"name",{value:t,configurable:!0}),"t$5"),Wl=Object.defineProperty,To=_o((e,t)=>Wl(e,"name",{value:t,configurable:!0}),"t"),Ll=Object.defineProperty,Dl=To((e,t)=>Ll(e,"name",{value:t,configurable:!0}),"r");function mn(e,t,s){typeof t=="object"&&(s=t,t=void 0);const l=el(e,{buffer:!0,encoding:void 0});let u=new TextDecoder().decode(l);const{beforeParse:d,color:h}=s??{};return typeof d=="function"&&(u=d(u)),Lr(u,t,Wr(e),{color:h})}x(mn,"n$3");_o(mn,"s");To(mn,"J");Dl(mn,"readJsonSync");var Ul=Object.defineProperty,ql=x((e,t)=>Ul(e,"name",{value:t,configurable:!0}),"a$3"),Zl=Object.defineProperty,Vl=ql((e,t)=>Zl(e,"name",{value:t,configurable:!0}),"t"),Jl=Object.defineProperty,Gl=Vl((e,t)=>Jl(e,"name",{value:t,configurable:!0}),"e");const Hl=Gl(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 Kl=Object.defineProperty,Xl=x((e,t)=>Kl(e,"name",{value:t,configurable:!0}),"t$3"),Yl=Object.defineProperty,Ql=Xl((e,t)=>Yl(e,"name",{value:t,configurable:!0}),"r"),ec=Object.defineProperty,tc=Ql((e,t)=>ec(e,"name",{value:t,configurable:!0}),"f");const rc=new TextEncoder,nc=tc(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return rc.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 oc=Object.defineProperty,sc=x((e,t)=>oc(e,"name",{value:t,configurable:!0}),"m"),ic=Object.defineProperty,Ro=sc((e,t)=>ic(e,"name",{value:t,configurable:!0}),"s");const ac=Ce(import.meta.url),Or=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lc=Ro(e=>{if(typeof Or<"u"&&Or.versions&&Or.versions.node){const[t,s]=Or.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return Or.getBuiltinModule(e)}return ac(e)},"__cjs_getBuiltinModule"),{mkdirSync:cc,writeFileSync:uc,statSync:fc,renameSync:Fn,chownSync:pc,chmodSync:dc,unlinkSync:gc}=lc("node:fs");var mc=Object.defineProperty,hc=Ro((e,t)=>mc(e,"name",{value:t,configurable:!0}),"f");const bc=hc((e,t,s)=>{s={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...s},Ir(e),Hl(t),e=Wr(e);const l=`${e}.tmp`;try{const u=ae(e,Xr);if(!u&&s.recursive){const h=$o(e);ae(h,Xr)||cc(h,{recursive:!0})}let d;if(uc(l,nc(t),{encoding:s.encoding,flag:s.flag}),u&&!s.overwrite&&(d=fc(e),s.chown??={gid:d.gid,uid:d.uid},Fn(e,`${e}.bak`)),s.chown)try{pc(l,s.chown.uid,s.chown.gid)}catch{}dc(l,d&&!s.mode?d.mode:s.mode??438),Fn(l,e)}catch(u){throw new Error(`Failed to write file at: ${e} - ${u.message}`,{cause:u})}finally{ae(l)&&gc(`${e}.tmp`)}},"writeFileSync");var yc=Object.defineProperty,Ae=x((e,t)=>yc(e,"name",{value:t,configurable:!0}),"i$2"),$c=Object.defineProperty,ze=Ae((e,t)=>$c(e,"name",{value:t,configurable:!0}),"s"),vc=Object.defineProperty,We=ze((e,t)=>vc(e,"name",{value:t,configurable:!0}),"i");const xc=/^(?:( )+|\t+)/,Mr="space";function Sr(e,t,s){return e&&t===Mr&&s===1}x(Sr,"d$1");Ae(Sr,"g");ze(Sr,"I");We(Sr,"shouldIgnoreSingleSpace");function Ar(e,t){const s=new Map;let l=0,u,d;for(const h of e.split(/\n/g)){if(!h)continue;const m=h.match(xc);if(m===null)l=0,u="";else{const j=m[0].length,A=m[1]?Mr:"tab";if(Sr(t,A,j))continue;A!==u&&(l=0),u=A;let P=1,O=0;const N=j-l;if(l=j,N===0)P=0,O=1;else{const E=Math.abs(N);if(Sr(t,A,E))continue;d=Dr(A,E)}const T=s.get(d);s.set(d,T===void 0?[1,0]:[T[0]+P,T[1]+O])}}return s}x(Ar,"p$1");Ae(Ar,"y");ze(Ar,"h");We(Ar,"makeIndentsMap");function Dr(e,t){return(e===Mr?"s":"t")+String(t)}x(Dr,"b$1");Ae(Dr,"v");ze(Dr,"m");We(Dr,"encodeIndentsKey");function Ur(e){const t=e[0]==="s"?Mr:"tab",s=Number(e.slice(1));return{type:t,amount:s}}x(Ur,"v");Ae(Ur,"M");ze(Ur,"_");We(Ur,"decodeIndentsKey");function qr(e){let t,s=0,l=0;for(const[u,[d,h]]of e)(d>s||d===s&&h>l)&&(s=d,l=h,t=u);return t}x(qr,"I");Ae(qr,"S");ze(qr,"k");We(qr,"getMostUsedKey");function Zr(e,t){return(e===Mr?" ":" ").repeat(t)}x(Zr,"h");Ae(Zr,"k");ze(Zr,"D");We(Zr,"makeIndentString");function Vr(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=Ar(e,!0);t.size===0&&(t=Ar(e,!1));const s=qr(t);let l,u=0,d="";return s!==void 0&&({type:l,amount:u}=Ur(s),d=Zr(l,u)),{amount:u,type:l,indent:d}}x(Vr,"M");Ae(Vr,"x");ze(Vr,"C");We(Vr,"detectIndent");var wc=Object.defineProperty,jc=x((e,t)=>wc(e,"name",{value:t,configurable:!0}),"a$1"),Oc=Object.defineProperty,No=jc((e,t)=>Oc(e,"name",{value:t,configurable:!0}),"i");const Pc=Ce(import.meta.url),Pr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ec=No(e=>{if(typeof Pr<"u"&&Pr.versions&&Pr.versions.node){const[t,s]=Pr.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return Pr.getBuiltinModule(e)}return Pc(e)},"__cjs_getBuiltinModule"),{readFileSync:kc}=Ec("node:fs");var Sc=Object.defineProperty,Ac=No((e,t)=>Sc(e,"name",{value:t,configurable:!0}),"r");const tu=Ac((e,t,s={})=>{const{detectIndent:l,indent:u,replacer:d,stringify:h=JSON.stringify,...m}={indent:" ",...s};let j=u,A=`
10
+ `;if(ae(e,fo))try{const O=kc(e,"utf8");if(l){const{indent:N}=Vr(O);j=N}A=O.endsWith(`
11
+ `)?`
12
+ `:""}catch(O){if(O.code!=="ENOENT")throw O}const P=h(t,d,j);bc(e,`${P}${A}`,m)},"writeJsonSync");var zc=Object.defineProperty,Mc=x((e,t)=>zc(e,"name",{value:t,configurable:!0}),"s");class hn extends Error{static{x(this,"VisConfigError")}static{Mc(this,"VisConfigError")}chain;constructor(t,s,l){super(t,l),this.name=this.constructor.name,this.chain=s}}var _c=Object.defineProperty,Tc=x((e,t)=>_c(e,"name",{value:t,configurable:!0}),"e");class ru extends hn{static{x(this,"VisConfigCycleError")}static{Tc(this,"VisConfigCycleError")}constructor(t,s){const l=[...s,`${t} (re-enters)`].join(" → ");super(`Config cycle: ${l}`,s)}}var Rc=Object.defineProperty,Nc=x((e,t)=>Rc(e,"name",{value:t,configurable:!0}),"t$1");class nu extends hn{static{x(this,"VisConfigLoadError")}static{Nc(this,"VisConfigLoadError")}constructor(t,s,l){const u=l instanceof Error?l.message:String(l),d=s.length>0?`
13
+ Chain: ${s.join(" → ")}`:"";super(`Failed to load ${t}: ${u}${d}`,s,{cause:l})}}var Bc=Object.defineProperty,Bo=x((e,t)=>Bc(e,"name",{value:t,configurable:!0}),"t");const Cc=Bo(e=>e.join(" → "),"formatChain");class ou extends hn{static{x(this,"VisConfigNotFoundError")}static{Bo(this,"VisConfigNotFoundError")}constructor(t,s,l){const u=s.length>0?s[s.length-1]:"<unknown>",d=l.length>0?`
14
+ Tried:
15
+ ${l.join(`
16
+ `)}`:"";super(`Cannot resolve "${t}" extended from ${u}.${d}
17
+ Chain: ${Cc(s)}`,s)}}var Ic=Object.defineProperty,Co=x((e,t)=>Ic(e,"name",{value:t,configurable:!0}),"i$1");const Wn="@inherit",Fc=["aliases","dependsOn","inputs","outputs"],Wc=Co((e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(Wn))return[...t];const s=[];for(const l of t){if(l===Wn){e!==void 0&&s.push(...e);continue}s.push(l)}return s},"mergeArrayWithInherit"),su=Co((e,t)=>{const s={...e,...t};for(const l of Fc){const u=e?.[l],d=t?.[l],h=Wc(u,d);h===void 0?delete s[l]:s[l]=h}return s},"mergeTargetWithInherit");var Ne;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Ne||(Ne={}));var Lc=Object.defineProperty,Le=x((e,t)=>Lc(e,"name",{value:t,configurable:!0}),"i");const iu=Le(e=>{const{renameSpan:t,tracer:s}=e;let l;const u=new Map;return Do({hooks:{"run:after":Le(d=>{if(!l)return;const h=[...d.values()].filter(m=>m.status==="failure").length;l.setAttribute("vis.run.tasks_total",d.size),l.setAttribute("vis.run.tasks_failed",h),h>0?l.setStatus({code:Ne.ERROR,message:`${String(h)} task(s) failed`}):l.setStatus({code:Ne.OK}),l.end(),l=void 0;for(const m of u.values())m.end();u.clear()},"run:after"),"run:before":Le(d=>{l&&(l.setStatus({code:Ne.ERROR,message:"run:before fired while previous run was still active"}),l.end());for(const h of u.values())h.end();u.clear(),l=s.startSpan("vis.run",{attributes:{"vis.run.task_count":d.tasks.length,"vis.workspace_root":d.workspaceRoot}})},"run:before"),"task:after":Le((d,h)=>{const m=u.get(d.id);m&&(m.setAttribute("vis.task.exit_code",h.code??0),m.setAttribute("vis.task.cache_status",h.status),m.end(),u.delete(d.id))},"task:after"),"task:before":Le(d=>{const h=u.get(d.id);h&&(h.setStatus({code:Ne.ERROR,message:"retried — superseded by new attempt"}),h.end());const m=s.startSpan(t?t(d):d.id,{attributes:{"vis.task.id":d.id,"vis.task.project":d.target.project,"vis.task.target":d.target.target}});u.set(d.id,m)},"task:before"),"task:failure":Le((d,h)=>{const m=u.get(d.id);m&&m.setStatus({code:Ne.ERROR,message:`Task failed with exit code ${String(h.code??-1)}`})},"task:failure")},name:"otel"})},"otelPlugin");export{el as $,bc as B,Yr as C,Zc as K,ho as L,bo as M,kr as O,ya as Q,Wr as U,ru as V,Xr as _,$o as a,nu as b,ou as c,Yc as d,Jc as e,Ir as f,Vc as g,Gc as h,ae as i,Kc as j,Nn as k,Sn as l,su as m,mn as n,iu as o,Lr as p,Hl as q,nc as r,fo as s,Vr as t,tu as w,Hc as y,Xc as z};
@@ -0,0 +1 @@
1
+ import"../packem_chunks/applyDefaults.js";import{o as e}from"./otel-CO8UEfTa.js";export{e as otelPlugin};
@@ -0,0 +1,109 @@
1
+ var X=Object.defineProperty;var s=(e,t)=>X(e,"name",{value:t,configurable:!0});import{$ as Y}from"./otel-CO8UEfTa.js";var ee=Object.defineProperty,A=s((e,t)=>ee(e,"name",{value:t,configurable:!0}),"i");/*!
2
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
3
+ * SPDX-License-Identifier: BSD-3-Clause
4
+ *
5
+ * Redistribution and use in source and binary forms, with or without
6
+ * modification, are permitted provided that the following conditions are met:
7
+ *
8
+ * 1. Redistributions of source code must retain the above copyright notice, this
9
+ * list of conditions and the following disclaimer.
10
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
11
+ * this list of conditions and the following disclaimer in the
12
+ * documentation and/or other materials provided with the distribution.
13
+ * 3. Neither the name of the copyright holder nor the names of its contributors
14
+ * may be used to endorse or promote products derived from this software without
15
+ * specific prior written permission.
16
+ *
17
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+ */function C(e,t){let r=e.slice(0,t).split(/\r\n|\n|\r/g);return[r.length,r.pop().length+1]}s(C,"d$2");A(C,"getLineColFromPtr");function D(e,t,r){let n=e.split(/\r\n|\n|\r/g),o="",l=(Math.log10(t+1)|0)+1;for(let i=t-1;i<=t+1;i++){let a=n[i-1];a&&(o+=i.toString().padEnd(l," "),o+=": ",o+=a,o+=`
28
+ `,i===t&&(o+=" ".repeat(l+r+2),o+=`^
29
+ `))}return o}s(D,"m$3");A(D,"makeCodeBlock");class c extends Error{static{s(this,"TomlError")}static{A(this,"TomlError")}line;column;codeblock;constructor(t,r){const[n,o]=C(r.toml,r.ptr),l=D(r.toml,n,o);super(`Invalid TOML document: ${t}
30
+
31
+ ${l}`,r),this.line=n,this.column=o,this.codeblock=l}}var te=Object.defineProperty,g=s((e,t)=>te(e,"name",{value:t,configurable:!0}),"e");function V(e,t){let r=0;for(;e[t-++r]==="\\";);return--r&&r%2}s(V,"h$4");g(V,"isEscaped");function x(e,t=0,r=e.length){let n=e.indexOf(`
32
+ `,t);return e[n-1]==="\r"&&n--,n<=r?n:-1}s(x,"indexOfNewline");g(x,"indexOfNewline");function v(e,t){for(let r=t;r<e.length;r++){let n=e[r];if(n===`
33
+ `)return r;if(n==="\r"&&e[r+1]===`
34
+ `)return r+1;if(n<" "&&n!==" "||n==="")throw new c("control characters are not allowed in comments",{toml:e,ptr:t})}return e.length}s(v,"skipComment");g(v,"skipComment");function h(e,t,r,n){let o;for(;;){for(;(o=e[t])===" "||o===" "||!r&&(o===`
35
+ `||o==="\r"&&e[t+1]===`
36
+ `);)t++;if(n||o!=="#")break;t=v(e,t)}return t}s(h,"skipVoid");g(h,"skipVoid");function z(e,t,r,n,o=!1){if(!n)return t=x(e,t),t<0?e.length:t;for(let l=t;l<e.length;l++){let i=e[l];if(i==="#")l=x(e,l);else{if(i===r)return l+1;if(i===n||o&&(i===`
37
+ `||i==="\r"&&e[l+1]===`
38
+ `))return l}}throw new c("cannot find end of structure",{toml:e,ptr:t})}s(z,"skipUntil");g(z,"skipUntil");function P(e,t){let r=e[t],n=r===e[t+1]&&e[t+1]===e[t+2]?e.slice(t,t+3):r;t+=n.length-1;do t=e.indexOf(n,++t);while(t>-1&&r!=="'"&&V(e,t));return t>-1&&(t+=n.length,n.length>1&&(e[t]===r&&t++,e[t]===r&&t++)),t}s(P,"getStringEnd");g(P,"getStringEnd");var re=Object.defineProperty,ne=s((e,t)=>re(e,"name",{value:t,configurable:!0}),"l$1");/*!
39
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
40
+ * SPDX-License-Identifier: BSD-3-Clause
41
+ *
42
+ * Redistribution and use in source and binary forms, with or without
43
+ * modification, are permitted provided that the following conditions are met:
44
+ *
45
+ * 1. Redistributions of source code must retain the above copyright notice, this
46
+ * list of conditions and the following disclaimer.
47
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
48
+ * this list of conditions and the following disclaimer in the
49
+ * documentation and/or other materials provided with the distribution.
50
+ * 3. Neither the name of the copyright holder nor the names of its contributors
51
+ * may be used to endorse or promote products derived from this software without
52
+ * specific prior written permission.
53
+ *
54
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
55
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
56
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
57
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
58
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
59
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
60
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
61
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
62
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
63
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64
+ */let ie=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;class w extends Date{static{s(this,"TomlDate")}static{ne(this,"TomlDate")}#t=!1;#r=!1;#e=null;constructor(t){let r=!0,n=!0,o="Z";if(typeof t=="string"){let l=t.match(ie);l?(l[1]||(r=!1,t=`0000-01-01T${t}`),n=!!l[2],n&&t[10]===" "&&(t=t.replace(" ","T")),l[2]&&+l[2]>23?t="":(o=l[3]||null,t=t.toUpperCase(),!o&&n&&(t+="Z"))):t=""}super(t),isNaN(this.getTime())||(this.#t=r,this.#r=n,this.#e=o)}isDateTime(){return this.#t&&this.#r}isLocal(){return!this.#t||!this.#r||!this.#e}isDate(){return this.#t&&!this.#r}isTime(){return this.#r&&!this.#t}isValid(){return this.#t||this.#r}toISOString(){let t=super.toISOString();if(this.isDate())return t.slice(0,10);if(this.isTime())return t.slice(11,23);if(this.#e===null)return t.slice(0,-1);if(this.#e==="Z")return t;let r=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return r=this.#e[0]==="-"?r:-r,new Date(this.getTime()-r*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(t,r="Z"){let n=new w(t);return n.#e=r,n}static wrapAsLocalDateTime(t){let r=new w(t);return r.#e=null,r}static wrapAsLocalDate(t){let r=new w(t);return r.#r=!1,r.#e=null,r}static wrapAsLocalTime(t){let r=new w(t);return r.#t=!1,r.#e=null,r}}var le=Object.defineProperty,L=s((e,t)=>le(e,"name",{value:t,configurable:!0}),"w$1");let oe=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,ae=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,fe=/^[+-]?0[0-9_]/,ue=/^[0-9a-f]{2,8}$/i,I={b:"\b",t:" ",n:`
65
+ `,f:"\f",r:"\r",e:"\x1B",'"':'"',"\\":"\\"};function N(e,t=0,r=e.length){let n=e[t]==="'",o=e[t++]===e[t]&&e[t]===e[t+1];o&&(r-=2,e[t+=2]==="\r"&&t++,e[t]===`
66
+ `&&t++);let l=0,i,a="",u=t;for(;t<r-1;){let f=e[t++];if(f===`
67
+ `||f==="\r"&&e[t]===`
68
+ `){if(!o)throw new c("newlines are not allowed in strings",{toml:e,ptr:t-1})}else if(f<" "&&f!==" "||f==="")throw new c("control characters are not allowed in strings",{toml:e,ptr:t-1});if(i){if(i=!1,f==="x"||f==="u"||f==="U"){let d=e.slice(t,t+=f==="x"?2:f==="u"?4:8);if(!ue.test(d))throw new c("invalid unicode escape",{toml:e,ptr:l});try{a+=String.fromCodePoint(parseInt(d,16))}catch{throw new c("invalid unicode escape",{toml:e,ptr:l})}}else if(o&&(f===`
69
+ `||f===" "||f===" "||f==="\r")){if(t=h(e,t-1,!0),e[t]!==`
70
+ `&&e[t]!=="\r")throw new c("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:l});t=h(e,t)}else if(f in I)a+=I[f];else throw new c("unrecognized escape sequence",{toml:e,ptr:l});u=t}else!n&&f==="\\"&&(l=t-1,i=!0,a+=e.slice(u,l))}return a+e.slice(u,r-1)}s(N,"parseString");L(N,"parseString");function Z(e,t,r,n){if(e==="true")return!0;if(e==="false")return!1;if(e==="-inf")return-1/0;if(e==="inf"||e==="+inf")return 1/0;if(e==="nan"||e==="+nan"||e==="-nan")return NaN;if(e==="-0")return n?0n:0;let o=oe.test(e);if(o||ae.test(e)){if(fe.test(e))throw new c("leading zeroes are not allowed",{toml:t,ptr:r});e=e.replace(/_/g,"");let i=+e;if(isNaN(i))throw new c("invalid number",{toml:t,ptr:r});if(o){if((o=!Number.isSafeInteger(i))&&!n)throw new c("integer value cannot be represented losslessly",{toml:t,ptr:r});(o||n===!0)&&(i=BigInt(e))}return i}const l=new w(e);if(!l.isValid())throw new c("invalid value",{toml:t,ptr:r});return l}s(Z,"parseValue");L(Z,"parseValue");var se=Object.defineProperty,F=s((e,t)=>se(e,"name",{value:t,configurable:!0}),"t$1");function B(e,t,r){let n=e.slice(t,r),o=n.indexOf("#");return o>-1&&(v(e,o),n=n.slice(0,o)),[n.trimEnd(),o]}s(B,"T$1");F(B,"sliceAndTrimEndOf");function j(e,t,r,n,o){if(n===0)throw new c("document contains excessively nested structures. aborting.",{toml:e,ptr:t});let l=e[t];if(l==="["||l==="{"){let[u,f]=l==="["?K(e,t,n,o):U(e,t,n,o);if(r){if(f=h(e,f),e[f]===",")f++;else if(e[f]!==r)throw new c("expected comma or end of structure",{toml:e,ptr:f})}return[u,f]}let i;if(l==='"'||l==="'"){i=P(e,t);let u=N(e,t,i);if(r){if(i=h(e,i),e[i]&&e[i]!==","&&e[i]!==r&&e[i]!==`
71
+ `&&e[i]!=="\r")throw new c("unexpected character encountered",{toml:e,ptr:i});i+=+(e[i]===",")}return[u,i]}i=z(e,t,",",r);let a=B(e,t,i-+(e[i-1]===","));if(!a[0])throw new c("incomplete key-value declaration: no value specified",{toml:e,ptr:t});return r&&a[1]>-1&&(i=h(e,t+a[1]),i+=+(e[i]===",")),[Z(a[0],e,t,o),i]}s(j,"extractValue");F(j,"extractValue");var ce=Object.defineProperty,_=s((e,t)=>ce(e,"name",{value:t,configurable:!0}),"m$2");let de=/^[a-zA-Z0-9-_]+[ \t]*$/;function O(e,t,r="="){let n=t-1,o=[],l=e.indexOf(r,t);if(l<0)throw new c("incomplete key-value: cannot find end of key",{toml:e,ptr:t});do{let i=e[t=++n];if(i!==" "&&i!==" ")if(i==='"'||i==="'"){if(i===e[t+1]&&i===e[t+2])throw new c("multiline strings are not allowed in keys",{toml:e,ptr:t});let a=P(e,t);if(a<0)throw new c("unfinished string encountered",{toml:e,ptr:t});n=e.indexOf(".",a);let u=e.slice(a,n<0||n>l?l:n),f=x(u);if(f>-1)throw new c("newlines are not allowed in keys",{toml:e,ptr:t+n+f});if(u.trimStart())throw new c("found extra tokens after the string part",{toml:e,ptr:a});if(l<a&&(l=e.indexOf(r,a),l<0))throw new c("incomplete key-value: cannot find end of key",{toml:e,ptr:t});o.push(N(e,t,a))}else{n=e.indexOf(".",t);let a=e.slice(t,n<0||n>l?l:n);if(!de.test(a))throw new c("only letter, numbers, dashes and underscores are allowed in keys",{toml:e,ptr:t});o.push(a.trimEnd())}}while(n+1&&n<l);return[o,h(e,l+1,!0,!0)]}s(O,"parseKey");_(O,"parseKey");function U(e,t,r,n){let o={},l=new Set,i;for(t++;(i=e[t++])!=="}"&&i;){if(i===",")throw new c("expected value, found comma",{toml:e,ptr:t-1});if(i==="#")t=v(e,t);else if(i!==" "&&i!==" "&&i!==`
72
+ `&&i!=="\r"){let a,u=o,f=!1,[d,m]=O(e,t-1);for(let $=0;$<d.length;$++){if($&&(u=f?u[a]:u[a]={}),a=d[$],(f=Object.hasOwn(u,a))&&(typeof u[a]!="object"||l.has(u[a])))throw new c("trying to redefine an already defined value",{toml:e,ptr:t});!f&&a==="__proto__"&&Object.defineProperty(u,a,{enumerable:!0,configurable:!0,writable:!0})}if(f)throw new c("trying to redefine an already defined value",{toml:e,ptr:t});let[y,W]=j(e,m,"}",r-1,n);l.add(y),u[a]=y,t=W}}if(!i)throw new c("unfinished table encountered",{toml:e,ptr:t});return[o,t]}s(U,"parseInlineTable");_(U,"parseInlineTable");function K(e,t,r,n){let o=[],l;for(t++;(l=e[t++])!=="]"&&l;){if(l===",")throw new c("expected value, found comma",{toml:e,ptr:t-1});if(l==="#")t=v(e,t);else if(l!==" "&&l!==" "&&l!==`
73
+ `&&l!=="\r"){let i=j(e,t-1,"]",r-1,n);o.push(i[0]),t=i[1]}}if(!l)throw new c("unfinished array encountered",{toml:e,ptr:t});return[o,t]}s(K,"parseArray");_(K,"parseArray");var he=Object.defineProperty,M=s((e,t)=>he(e,"name",{value:t,configurable:!0}),"b$1");function E(e,t,r,n){let o=t,l=r,i,a=!1,u;for(let f=0;f<e.length;f++){if(f){if(o=a?o[i]:o[i]={},l=(u=l[i]).c,n===0&&(u.t===1||u.t===2))return null;if(u.t===2){let d=o.length-1;o=o[d],l=l[d].c}}if(i=e[f],(a=Object.hasOwn(o,i))&&l[i]?.t===0&&l[i]?.d)return null;a||(i==="__proto__"&&(Object.defineProperty(o,i,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(l,i,{enumerable:!0,configurable:!0,writable:!0})),l[i]={t:f<e.length-1&&n===2?3:n,d:!1,i:0,c:{}})}if(u=l[i],u.t!==n&&!(n===1&&u.t===3)||(n===2&&(u.d||(u.d=!0,o[i]=[]),o[i].push(o={}),u.c[u.i++]=u={t:1,d:!1,i:0,c:{}}),u.d))return null;if(u.d=!0,n===1)o=a?o[i]:o[i]={};else if(n===0&&a)return null;return[i,o,u.c]}s(E,"w");M(E,"peekTable");function q(e,{maxDepth:t=1e3,integersAsBigInt:r}={}){let n={},o={},l=n,i=o;for(let a=h(e,0);a<e.length;){if(e[a]==="["){let u=e[++a]==="[",f=O(e,a+=+u,"]");if(u){if(e[f[1]-1]!=="]")throw new c("expected end of table declaration",{toml:e,ptr:f[1]-1});f[1]++}let d=E(f[0],n,o,u?2:1);if(!d)throw new c("trying to redefine an already defined table or value",{toml:e,ptr:a});i=d[2],l=d[1],a=f[1]}else{let u=O(e,a),f=E(u[0],l,i,0);if(!f)throw new c("trying to redefine an already defined table or value",{toml:e,ptr:a});let d=j(e,u[1],void 0,t,r);f[1][f[0]]=d[0],a=d[1]}if(a=h(e,a,!0),e[a]&&e[a]!==`
74
+ `&&e[a]!=="\r")throw new c("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:a});a=h(e,a)}return n}s(q,"parse");M(q,"parse");var pe=Object.defineProperty,p=s((e,t)=>pe(e,"name",{value:t,configurable:!0}),"l");/*!
75
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
76
+ * SPDX-License-Identifier: BSD-3-Clause
77
+ *
78
+ * Redistribution and use in source and binary forms, with or without
79
+ * modification, are permitted provided that the following conditions are met:
80
+ *
81
+ * 1. Redistributions of source code must retain the above copyright notice, this
82
+ * list of conditions and the following disclaimer.
83
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
84
+ * this list of conditions and the following disclaimer in the
85
+ * documentation and/or other materials provided with the distribution.
86
+ * 3. Neither the name of the copyright holder nor the names of its contributors
87
+ * may be used to endorse or promote products derived from this software without
88
+ * specific prior written permission.
89
+ *
90
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
91
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
92
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
93
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
94
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
95
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
96
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
97
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
98
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
99
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
100
+ */let J=/^[a-z0-9-_]+$/i;function b(e){let t=typeof e;if(t==="object"){if(Array.isArray(e))return"array";if(e instanceof Date)return"date"}return t}s(b,"g");p(b,"extendedTypeOf");function G(e){for(let t=0;t<e.length;t++)if(b(e[t])!=="object")return!1;return e.length!=0}s(G,"E");p(G,"isArrayOfTables");function T(e){return JSON.stringify(e).replace(/\x7f/g,"\\u007f")}s(T,"a$1");p(T,"formatString");function k(e,t,r,n){if(r===0)throw new Error("Could not stringify the object: maximum object depth exceeded");if(t==="number")return isNaN(e)?"nan":e===1/0?"inf":e===-1/0?"-inf":n&&Number.isInteger(e)?e.toFixed(1):e.toString();if(t==="bigint"||t==="boolean")return e.toString();if(t==="string")return T(e);if(t==="date"){if(isNaN(e.getTime()))throw new TypeError("cannot serialize invalid date");return e.toISOString()}if(t==="object")return H(e,r,n);if(t==="array")return Q(e,r,n)}s(k,"d$1");p(k,"stringifyValue");function H(e,t,r){let n=Object.keys(e);if(n.length===0)return"{}";let o="{ ";for(let l=0;l<n.length;l++){let i=n[l];l&&(o+=", "),o+=J.test(i)?i:T(i),o+=" = ",o+=k(e[i],b(e[i]),t-1,r)}return o+" }"}s(H,"b");p(H,"stringifyInlineTable");function Q(e,t,r){if(e.length===0)return"[]";let n="[ ";for(let o=0;o<e.length;o++){if(o&&(n+=", "),e[o]===null||e[o]===void 0)throw new TypeError("arrays cannot contain null or undefined values");n+=k(e[o],b(e[o]),t-1,r)}return n+" ]"}s(Q,"x");p(Q,"stringifyArray");function R(e,t,r,n){if(r===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let o="";for(let l=0;l<e.length;l++)o+=`${o&&`
101
+ `}[[${t}]]
102
+ `,o+=S(0,e[l],t,r,n);return o}s(R,"k");p(R,"stringifyArrayTable");function S(e,t,r,n,o){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let l="",i="",a=Object.keys(t);for(let u=0;u<a.length;u++){let f=a[u];if(t[f]!==null&&t[f]!==void 0){let d=b(t[f]);if(d==="symbol"||d==="function")throw new TypeError(`cannot serialize values of type '${d}'`);let m=J.test(f)?f:T(f);if(d==="array"&&G(t[f]))i+=(i&&`
103
+ `)+R(t[f],r?`${r}.${m}`:m,n-1,o);else if(d==="object"){let y=r?`${r}.${m}`:m;i+=(i&&`
104
+ `)+S(y,t[f],y,n-1,o)}else l+=m,l+=" = ",l+=k(t[f],d,n,o),l+=`
105
+ `}}return e&&(l||!i)&&(l=l?`[${e}]
106
+ ${l}`:`[${e}]`),l&&i?`${l}
107
+ ${i}`:l||i}s(S,"h");p(S,"stringifyTable");function me(e,{maxDepth:t=1e3,numbersAsFloat:r=!1}={}){if(b(e)!=="object")throw new TypeError("stringify can only be called with an object");let n=S(0,e,"",t,r);return n[n.length-1]!==`
108
+ `?n+`
109
+ `:n}s(me,"stringify");p(me,"stringify");var we=Object.defineProperty,ge=s((e,t)=>we(e,"name",{value:t,configurable:!0}),"a"),be=Object.defineProperty,ye=ge((e,t)=>be(e,"name",{value:t,configurable:!0}),"t"),ve=Object.defineProperty,$e=ye((e,t)=>ve(e,"name",{value:t,configurable:!0}),"n");const je=$e((e,t)=>{const r=Y(e,{encoding:"utf8",...t});return q(r)},"readTomlSync");export{je as d};
@@ -0,0 +1,2 @@
1
+ var R=Object.defineProperty;var n=(t,e)=>R(t,"name",{value:e,configurable:!0});import{createRequire as M}from"node:module";import{f as q,l as m,M as d}from"./otel-CO8UEfTa.js";import{ax as B,ay as C,az as E}from"../packem_chunks/bin.js";const j=M(import.meta.url),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,w=n(t=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[e,r]=u.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return u.getBuiltinModule(t)}return j(t)},"__cjs_getBuiltinModule"),{Socket:k}=w("node:net"),{randomBytes:P}=w("node:crypto"),{readdir:x,writeFile:O,rename:F,rm:f,open:N,readFile:A,stat:L,unlink:h}=w("node:fs/promises"),{createRequire:I}=w("node:module");var W=Object.defineProperty,X=n((t,e)=>W(t,"name",{value:e,configurable:!0}),"i"),z=Object.defineProperty,b=X((t,e)=>z(t,"name",{value:e,configurable:!0}),"s");const G=I(import.meta.url),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,J=b(t=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[e,r]=l.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return l.getBuiltinModule(t)}return G(t)},"__cjs_getBuiltinModule"),{lstat:v,mkdir:V}=J("node:fs/promises");var Y=Object.defineProperty,H=b((t,e)=>Y(t,"name",{value:e,configurable:!0}),"o");const K=H(async t=>{q(t);try{const e=await v(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(m(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await V(t,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const r=await v(t);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(m(r))}'`,{cause:e})}},"ensureDir");var Q=Object.defineProperty,c=n((t,e)=>Q(t,"name",{value:e,configurable:!0}),"s");const U=3e4,$=100;class Z extends Error{static{n(this,"ServiceReadinessError")}constructor(e,r){super(e),this.elapsedMs=r,this.name="ServiceReadinessError"}elapsedMs;static{c(this,"ServiceReadinessError")}}const ee=c(async t=>{const e=t.host??"127.0.0.1",{port:r}=t,o=t.timeoutMs??U,i=Date.now();for(;Date.now()-i<o;){if(await te(e,r))return;await re($)}throw new Z(`Timed out waiting for ${e}:${String(r)} to accept TCP connections (${String(o)}ms)`,Date.now()-i)},"waitForTcp"),te=c((t,e)=>new Promise(r=>{const o=new k,i=c(a=>{o.removeAllListeners(),o.destroy(),r(a)},"onDone");o.once("connect",()=>{i(!0)}),o.once("error",()=>{i(!1)}),o.setTimeout($,()=>{i(!1)});try{o.connect(e,t)}catch{i(!1)}}),"tryConnect"),re=c(t=>new Promise(e=>{setTimeout(e,t)}),"delay"),he=c(async(t,e)=>{const r=t.readiness??(t.port===void 0?void 0:{tcp:{port:t.port}});r&&await ee({host:r.tcp.host,port:r.tcp.port,timeoutMs:e?.timeoutMs??r.tcp.timeoutMs})},"runReadiness");var ie=Object.defineProperty,s=n((t,e)=>ie(t,"name",{value:e,configurable:!0}),"o");const _=384,g=5e3,oe=50,se=3e4,p=s(async t=>{const e=d(B(t),"services");try{await K(e)}catch(r){throw r.code==="ENOTDIR"?new Error(`Service registry path ${e} exists but is not a directory. Remove it or move the conflicting file before running \`vis service\`.`,{cause:r}):r}return e},"getRegistryDir"),S=s(t=>t.replaceAll("/","_").replaceAll(":","__"),"slugify"),y=s((t,e)=>d(t,`${S(e)}.json`),"entryPath"),ae=s((t,e)=>d(t,`${S(e)}.lock`),"lockPath"),T=s(async(t,e)=>{const r=await p(t),o=y(r,e);if(await C(o))try{return await E(o)}catch{return}},"readEntry"),ne=s(async t=>{const e=await p(t);let r;try{r=await x(e)}catch{return[]}const o=[];for(const i of r)if(i.endsWith(".json"))try{const a=await E(d(e,i));o.push(a)}catch{}return o},"readAllEntries"),me=s(async(t,e)=>{const r=await p(t),o=y(r,e.id),i=d(r,`.${P(8).toString("hex")}.tmp`);await O(i,`${JSON.stringify(e,void 0,2)}
2
+ `,{mode:_});try{await F(i,o)}catch(a){throw await f(i,{force:!0}).catch(()=>{}),a}},"writeEntry"),ce=s(async(t,e,r)=>{const o=await p(t),i=r??await T(t,e);await f(y(o,e),{force:!0}),i&&await f(i.logFile,{force:!0}).catch(()=>{})},"deleteEntry"),D=s(t=>{try{return process.kill(t,0),!0}catch{return!1}},"isAlive"),ve=s(async t=>{const e=await ne(t),r=[],o=[];for(const i of e){if(D(i.pid)){o.push(i);continue}const a=await T(t,i.id);if(a&&a.pid!==i.pid){o.push(a);continue}await ce(t,i.id,i).catch(()=>{}),r.push(i.id)}return{pruned:r,surviving:o}},"pruneDead"),ue=s(t=>new Promise(e=>{setTimeout(e,t)}),"sleep"),le=s(async t=>{try{const e=await N(t,"wx",_);try{await e.writeFile(String(process.pid))}finally{await e.close().catch(()=>{})}return!0}catch(e){if(e.code==="EEXIST")return!1;throw e}},"tryClaimLock"),de=s(async t=>{let e;try{const r=await A(t,"utf8"),o=Number.parseInt(r.trim(),10);e=Number.isFinite(o)?o:void 0}catch{return!0}if(e!==void 0&&!D(e))return!0;try{const r=await L(t);return Date.now()-r.mtimeMs>se}catch{return!0}},"isLockStale"),ge=s(async(t,e,r)=>{const o=await p(t),i=ae(o,e),a=Date.now();for(;!await le(i);){if(await de(i)){await h(i).catch(()=>{});continue}if(Date.now()-a>=g)throw new Error(`Could not acquire service lock for ${e} within ${String(g)}ms — another \`vis service\` invocation appears to be holding it.`);await ue(oe)}try{return await r()}finally{await h(i).catch(()=>{})}},"withServiceLock");export{_ as R,Z as S,me as a,he as b,ne as c,ce as d,p as g,D as i,ve as p,T as r,S as s,ge as w};
@@ -0,0 +1 @@
1
+ var y=Object.defineProperty;var d=(e,s)=>y(e,"name",{value:s,configurable:!0});import{createRequire as j}from"node:module";import{M as m}from"./otel-CO8UEfTa.js";const M=j(import.meta.url),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_=d(e=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[s,t]=u.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return u.getBuiltinModule(e)}return M(e)},"__cjs_getBuiltinModule"),{readdir:p,stat:l,readFile:h}=_("node:fs/promises");var k=Object.defineProperty,c=d((e,s)=>k(e,"name",{value:s,configurable:!0}),"m");const b=c((e,s)=>e.tasks.find(t=>t.taskId===s),"findTaskInSummary"),f=c((e,s)=>{const t=e??{},i=s??{},n=[],r=[],a=[];for(const o of Object.keys(t))o in i?t[o]!==i[o]&&a.push(o):n.push(o);for(const o of Object.keys(i))o in t||r.push(o);return n.sort(),r.sort(),a.sort(),{added:n,changed:a,removed:r}},"diffHashBuckets"),R=c((e,s)=>({commandChanged:(e?.command??"")!==(s?.command??""),implicitDeps:f(e?.implicitDeps,s?.implicitDeps),nodes:f(e?.nodes,s?.nodes),runtime:f(e?.runtime,s?.runtime)}),"diffHashDetails"),w=c(async(e,s)=>{const t=m(e,".task-runner","runs",`${s}.json`);try{const i=await h(t,"utf8");return JSON.parse(i)}catch{return}},"readRunSummaryById"),B=c(async(e,s)=>{const t=m(e,".task-runner","runs");let i;try{i=await p(t)}catch{return}const n=[];for(const r of i){if(!r.endsWith(".json")||s!==void 0&&r===`${s}.json`)continue;const a=m(t,r);try{const o=await l(a);o.isFile()&&n.push({mtimeMs:o.mtimeMs,path:a})}catch{}}if(n.length!==0){n.sort((r,a)=>a.mtimeMs-r.mtimeMs);try{const r=await h(n[0].path,"utf8");return JSON.parse(r)}catch{return}}},"readPreviousRunSummary"),D=c(async e=>{const s=m(e,".task-runner","runs");let t;try{t=await p(s)}catch{return[]}const i=[];for(const n of t){if(!n.endsWith(".json"))continue;const r=m(s,n);try{const a=await l(r);a.isFile()&&i.push({id:n.slice(0,-5),mtimeMs:a.mtimeMs,path:r})}catch{}}return i.sort((n,r)=>r.mtimeMs-n.mtimeMs),i},"listRunSummaries");export{B as a,R as d,b as f,D as l,w as r};
@@ -0,0 +1 @@
1
+ var d=Object.defineProperty;var f=(t,s)=>d(t,"name",{value:s,configurable:!0});import{M as m,i as h,$ as k,n as v}from"./otel-CO8UEfTa.js";var $=Object.defineProperty,g=f((t,s)=>$(t,"name",{value:s,configurable:!0}),"p");const M=g(t=>{for(const s of[".nvmrc",".node-version"]){const i=m(t,s);if(h(i))try{return k(i).trim().replace(/^v/,"")}catch{}}},"readNodeVersionFile"),l=g((t,s)=>{const i=t.split(/[.\-+]/).map(r=>Number.parseInt(r,10)||0),c=s.split(/[.\-+]/).map(r=>Number.parseInt(r,10)||0),e=Math.max(i.length,c.length);for(let r=0;r<e;r++){const n=i[r]??0,a=c[r]??0;if(n!==a)return n-a}return 0},"compareVersions"),b=g((t,s)=>{const i=s.trim();if(i===""||i==="*")return!0;const c=i.split(/\s+/).filter(Boolean);for(const e of c)if(e.startsWith(">=")){if(l(t,e.slice(2).trim())<0)return!1}else if(e.startsWith("<=")){if(l(t,e.slice(2).trim())>0)return!1}else if(e.startsWith(">")){if(l(t,e.slice(1).trim())<=0)return!1}else if(e.startsWith("<")){if(l(t,e.slice(1).trim())>=0)return!1}else if(/^\d/.test(e)){const r=t.split("."),n=e.split(".");for(const[a,o]of n.entries())if(o!==r[a])return!1}return!0},"satisfiesRange"),x=g(t=>{const s=[],i=m(t,"package.json");let c;try{c=v(i)}catch{return s}const e=process.versions.node;if(c.engines?.node){const n=c.engines.node;b(e,n)||s.push({actual:e,expected:n,kind:"node",message:`package.json engines.node requires ${n}, but the current Node.js is ${e}.`,severity:"error"})}const r=M(t);if(r){const[n,a]=r.split("."),[o,p]=e.split(".");(n!==o||a!==void 0&&a!==p)&&s.push({actual:e,expected:r,kind:"node",message:`.nvmrc pins Node ${r} but the current Node.js is ${e}. Run \`nvm use\` or switch runtimes.`,severity:"warning"})}if(c.packageManager){const[n,a]=c.packageManager.split("@"),o=(process.env.npm_config_user_agent??"").split(" ")[0]??"",[p,u]=o.split("/");p&&n&&p!==n?s.push({actual:p,expected:n,kind:"packageManager",message:`package.json packageManager pins ${c.packageManager} but the current invocation is ${o}. Install the correct package manager.`,severity:"error"}):u&&a&&u!==a&&s.push({actual:u,expected:a,kind:"packageManager",message:`package.json packageManager pins ${n}@${a} but the current invocation uses ${n}@${u}.`,severity:"warning"})}return s},"checkRuntimeVersions");export{x as c};
@@ -0,0 +1,3 @@
1
+ var w=Object.defineProperty;var m=(e,t)=>w(e,"name",{value:t,configurable:!0});import{createRequire as v}from"node:module";import{z as b}from"./otel-CO8UEfTa.js";const k=v(import.meta.url),j=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_=m(e=>{if(typeof j<"u"&&j.versions&&j.versions.node){const[t,r]=j.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return j.getBuiltinModule(e)}return k(e)},"__cjs_getBuiltinModule"),{createInterface:$}=_("node:readline");var T=Object.defineProperty,f=m((e,t)=>T(e,"name",{value:t,configurable:!0}),"g");const q=/^#([\w\-/]+):(.+)$/,x=/^([@\w\-/]+):(.+)$/,P=f(e=>{if(e==="")return;if(e.startsWith(":"))return{kind:"all",target:e.slice(1)};if(e.startsWith("~:"))return{kind:"closest",target:e.slice(2)};const t=q.exec(e);if(t?.[1]&&t[2])return{kind:"tag",tag:t[1],target:t[2]};const r=x.exec(e);return r?.[1]&&r[2]&&(r[1].startsWith("@")||r[1].includes("/")||r[1].includes("-"))?{kind:"project",projects:[r[1]],target:r[2]}:{kind:"all",target:e}},"parseTargetSelector"),N=f(async(e,t,r,a)=>{const s=P(e);if(!s)throw new Error(`Invalid target selector: "${e}"`);const c=Object.keys(t.projects);if(s.kind==="all")return{projects:c,target:s.target};if(s.kind==="project")return{projects:s.projects??[],target:s.target};if(s.kind==="tag"){const o=s.tag;return{projects:c.filter(i=>t.projects[i]?.tags?.includes(o)??!1),target:s.target}}const n=b(a,r)||".";let p,l=-1;for(const[o,i]of Object.entries(t.projects)){const u=i.root;u&&(n===u||n.startsWith(`${u}/`))&&u.length>l&&(l=u.length,p=o)}if(!p){if(process.stdout.isTTY){const o=$({input:process.stdin,output:process.stderr}),i=Object.keys(t.projects).sort();process.stderr.write(`No project found at ${n}. Pick one:
2
+ `);for(const[d,h]of i.entries())process.stderr.write(` ${String(d+1)}) ${h}
3
+ `);const u=await new Promise(d=>{o.question("> ",d)});o.close();const g=Number.parseInt(u,10)-1;if(g>=0&&g<i.length)return{projects:[i[g]],target:s.target}}throw new Error(`No project found at or above ${n} for selector "${e}".`)}return{projects:[p],target:s.target}},"resolveSelector"),E=/^(\w+)\s*(!?=)\s*(.+)$/,Q=f(e=>{const t=e.trim();if(t==="")return;const r=t.split("&&").map(o=>o.trim()),a=t.split("||").map(o=>o.trim()),s=r.length>1,c=a.length>1;if(s&&c)throw new Error("Query language does not support mixed && / || — split into multiple --query flags or simplify.");const n=c?a:r,p=c?"||":"&&",l=[];for(const o of n){const i=E.exec(o);if(!i)throw new Error(`Invalid query clause: "${o}". Expected <field>=<value> or <field>!=<value>.`);const[,u,g,d]=i;l.push({field:u,op:g==="!="?"!=":"=",value:d.trim().replaceAll(/^["']|["']$/g,"")})}return{clauses:l,op:p}},"parseQuery"),y=f((e,t,r)=>{const{field:a,op:s,value:c}=e,n=f(l=>{const o=l===c;return s==="="?o:!o},"test"),p=f(l=>{const o=(l??[]).includes(c);return s==="="?o:!o},"testList");switch(a){case"id":case"project":return n(t);case"language":return n(r.language);case"layer":return n(r.layer);case"projectType":case"type":return n(r.projectType);case"stack":return n(r.stack);case"tag":case"tags":return p(r.tags);default:return!1}},"matchClause"),O=f((e,t,r)=>{if(!r||r.trim()==="")return e;const a=Q(r);return a?e.filter(s=>{const c=t.projects[s];return c?a.op==="&&"?a.clauses.every(n=>y(n,s,c)):a.clauses.some(n=>y(n,s,c)):!1}):e},"filterProjectsByQuery");export{O as f,P as p,N as r};
@@ -0,0 +1,5 @@
1
+ var N=Object.defineProperty;var x=(o,e)=>N(o,"name",{value:e,configurable:!0});import{createRequire as I}from"node:module";import{M as d,i as g,$ as k,n as O,j as J,y as R}from"./otel-CO8UEfTa.js";const B=I(import.meta.url),M=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,j=x(o=>{if(typeof M<"u"&&M.versions&&M.versions.node){const[e,n]=M.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return M.getBuiltinModule(o)}return B(o)},"__cjs_getBuiltinModule"),{execFileSync:w}=j("node:child_process"),{randomBytes:D}=j("node:crypto"),{writeFileSync:U,renameSync:q,unlinkSync:H}=j("node:fs");var z=Object.defineProperty,f=x((o,e)=>z(o,"name",{value:e,configurable:!0}),"f");const V=["proto","mise","fnm","volta","asdf","nvm","corepack"],Z={asdf:["bun","deno","go","node","npm","pnpm","python","ruby","rust","yarn"],corepack:["npm","pnpm","yarn"],fnm:["node"],mise:["bun","deno","go","node","npm","pnpm","python","ruby","rust","yarn"],nvm:["node"],proto:["bun","deno","go","node","npm","pnpm","python","ruby","rust","yarn"],volta:["node","npm","pnpm","yarn"]},X=["proto","mise","fnm","volta","asdf","nvm","corepack"],W={asdf:[".tool-versions"],corepack:[],fnm:[".nvmrc",".node-version"],mise:[".mise.toml",".config/mise.toml","mise.toml"],nvm:[".nvmrc"],proto:[".prototools"],volta:[]},b=new Map,y=f(o=>{const e=b.get(o);if(e!==void 0||b.has(o))return e;const n=process.env.PATH;if(!n){b.set(o,void 0);return}const t=process.platform==="win32"?["",...(process.env.PATHEXT??".COM;.EXE;.BAT;.CMD").split(";")]:[""];for(const r of n.split(J)){const i=r.replaceAll(/^["']|["']$/g,"").trim();if(i!=="")for(const l of t){const s=`${i}${R}${o}${l}`;if(g(s))return b.set(o,s),s}}b.set(o,void 0)},"isOnPath"),_=f((o,e=["--version"])=>{try{const n=w(o,e,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3}),t=/\d+\.\d+(?:\.\d+)?/.exec(n);return t?t[0]:n.trim()||void 0}catch{return}},"queryManagerVersion"),A=f((o,e)=>{const n=d(o,"package.json");if(!g(n))return[];try{const t=O(n)[e];if(e==="volta"&&typeof t=="object"&&t!==null&&Object.keys(t).length>0)return["package.json"];if(e==="packageManager"&&typeof t=="string"&&t.length>0)return["package.json"]}catch{}return[]},"pkgFieldConfigFiles"),G=f((o,e)=>o==="volta"?A(e,"volta"):o==="corepack"?A(e,"packageManager"):W[o].filter(n=>g(d(e,n))),"configFilesFor"),P=new Map,K=f(()=>{P.clear(),b.clear()},"clearToolchainCache"),S=f((o,e)=>{if(!e?.refresh){const i=P.get(o);if(i)return i}const n=[],t=!!y("pnpm")||!!y("yarn");for(const i of X){const l=i==="nvm"?void 0:y(i),s=i==="nvm"&&!!process.env.NVM_DIR,c=G(i,o),a=!!l||s;i==="corepack"&&!a&&(!(c.length>0)||t)||!a&&c.length===0||n.push({binPath:l,configFiles:c,installed:a,name:i,version:l?_(l):void 0})}const r=Object.freeze(n);return P.set(o,r),r},"findInstalledManagers"),ye=f((o,e,n)=>{const t=n??S(o);return e?.preferredManager&&e.preferredManager!=="none"?t.find(r=>r.name===e.preferredManager)??{configFiles:[],installed:!1,name:e.preferredManager}:t.find(r=>r.installed&&r.configFiles.length>0)??t.find(r=>r.installed)??t.find(r=>r.configFiles.length>0)??{configFiles:[],installed:!1,name:"none"}},"pickPrimaryManager"),L=f((o,e)=>{for(const n of e){const t=d(o,n);if(g(t))try{const r=k(t).trim();if(r!=="")return{name:n,value:r.replace(/^v/,"")}}catch{}}},"readVersionFile"),Q=/^([a-z][\w-]*)\s*=\s*"?([^"\n#]+?)"?\s*(?:#.*)?$/i,Y=f(o=>{const e=d(o,".prototools");if(!g(e))return[];const n=k(e),t=[];let r=!1;for(const i of n.split(/\r?\n/)){const l=i.trim();if(l===""||l.startsWith("#"))continue;if(l.startsWith("[")){r=!0;continue}if(r)continue;const s=Q.exec(l);if(!s)continue;const[,c,a]=s,u=h(c);u&&t.push({source:".prototools",tool:u,version:a.trim()})}return t},"parsePrototools"),ee=/^\[tools\]\s*$/i,oe=/^([a-z][\w-]*)\s*=\s*"?([^"\n#]+?)"?\s*(?:#.*)?$/i,ne=f(o=>{for(const e of W.mise){const n=d(o,e);if(!g(n))continue;const t=[],r=k(n);let i=!1;for(const l of r.split(/\r?\n/)){const s=l.trim();if(s===""||s.startsWith("#"))continue;if(s.startsWith("[")){i=ee.test(s);continue}if(!i)continue;const c=oe.exec(s);if(!c)continue;const[,a,u]=c,m=h(a);m&&t.push({source:".mise.toml",tool:m,version:u.trim()})}if(t.length>0)return t}return[]},"parseMiseToml"),te=f(o=>{const e=d(o,".tool-versions");if(!g(e))return[];const n=k(e),t=[];for(const r of n.split(/\r?\n/)){const i=r.trim();if(i===""||i.startsWith("#"))continue;const l=i.split(/\s+/);if(l.length<2)continue;const[s,...c]=l,a=h(s);a&&c[0]&&t.push({source:".tool-versions",tool:a,version:c[0]})}return t},"parseToolVersions"),h=f(o=>{switch(o.toLowerCase()){case"bun":return"bun";case"deno":return"deno";case"go":case"golang":return"go";case"node":case"nodejs":return"node";case"npm":return"npm";case"pnpm":return"pnpm";case"python":case"python3":return"python";case"ruby":return"ruby";case"rust":case"rustc":return"rust";case"yarn":return"yarn";default:return}},"normalizeToolName"),re=f(o=>{const[e]=o.split("+",1),n=/^(pnpm|yarn|npm|bun)@(.+)$/.exec(e??"");if(!n)return;const t=h(n[1]);if(t)return{source:"packageManager",tool:t,version:n[2]}},"parsePackageManagerField"),se=f((o,e)=>{const n=new Map,t=f(s=>{n.set(s.tool,s)},"add"),r=d(o,"package.json");let i={};try{g(r)&&(i=O(r))}catch{}if(i.engines)for(const[s,c]of Object.entries(i.engines)){const a=h(s);a&&typeof c=="string"&&t({source:"engines",tool:a,version:c})}if(i.packageManager){const s=re(i.packageManager);s&&t(s)}if(i.volta)for(const[s,c]of Object.entries(i.volta)){const a=h(s);a&&typeof c=="string"&&t({source:"volta",tool:a,version:c})}const l=L(o,[".nvmrc",".node-version"]);l&&t({source:l.name===".nvmrc"?".nvmrc":".node-version",tool:"node",version:l.value});for(const s of te(o))t(s);for(const s of ne(o))t(s);for(const s of Y(o))t(s);if(e?.tools)for(const[s,c]of Object.entries(e.tools)){const a=h(s);a&&typeof c=="string"&&t({source:"vis.config.ts",tool:a,version:c})}return[...n.values()]},"parseExpectedTools"),F={bun:{args:["--version"],binaries:["bun"]},deno:{args:["--version"],binaries:["deno"]},go:{args:["version"],binaries:["go"]},node:{args:["--version"],binaries:["node"]},npm:{args:["--version"],binaries:["npm"]},pnpm:{args:["--version"],binaries:["pnpm"]},python:{args:["--version"],binaries:["python","python3"]},ruby:{args:["--version"],binaries:["ruby"]},rust:{args:["--version"],binaries:["rustc"]},yarn:{args:["--version"],binaries:["yarn"]}},ie=f(o=>{const e=F[o];for(const n of e.binaries){const t=y(n);if(t)return _(t,e.args)}if(o==="node")return process.versions.node},"queryToolVersion"),ae=f((o,e)=>{const n=e.trim();if(n===""||n==="*"||n==="latest")return!0;if(/^\d[\d.]*$/.test(n))return o===n||o.startsWith(`${n}.`);const t=f(s=>s.split(/[.\-+]/).map(c=>Number.parseInt(c,10)||0),"parse"),r=f((s,c)=>{const a=t(s),u=t(c),m=Math.max(a.length,u.length);for(let p=0;p<m;p++){const $=a[p]??0,v=u[p]??0;if($!==v)return $-v}return 0},"compare"),i=f(s=>{for(const c of s)if(c.startsWith(">=")){if(r(o,c.slice(2).trim())<0)return!1}else if(c.startsWith("<=")){if(r(o,c.slice(2).trim())>0)return!1}else if(c.startsWith(">")){if(r(o,c.slice(1).trim())<=0)return!1}else if(c.startsWith("<")){if(r(o,c.slice(1).trim())>=0)return!1}else if(c.startsWith("^")||c.startsWith("~")){const a=c.slice(1).trim(),[u,m]=t(a),[p,$]=t(o);if(p!==u||c.startsWith("~")&&$!==m||r(o,a)<0)return!1}return!0},"matchesAll"),l=n.split("||").map(s=>s.trim().split(/\s+/).filter(Boolean)).filter(s=>s.length>0);return l.length===0?!0:l.some(s=>i(s))},"satisfies"),ce=f((o,e)=>{switch(o){case".mise.toml":return["mise"];case".node-version":case".nvmrc":return["fnm","nvm","volta","proto","mise","asdf"];case".prototools":return["proto"];case".tool-versions":return["asdf","mise"];case"packageManager":return e==="pnpm"||e==="yarn"?["self-activate","volta","proto","mise","corepack"]:e==="npm"?["volta","proto","mise","asdf","corepack"]:e==="bun"?["proto","mise","asdf"]:["volta","proto","mise"];case"volta":return["volta"];default:return["proto","mise","fnm","volta","asdf","nvm","corepack"]}},"preferenceFor"),le=f((o,e,n)=>{if(n?.preferredManager&&n.preferredManager!=="none"&&T(n.preferredManager,o.tool)){const r=e.find(i=>i.name===n.preferredManager);return r?{installed:r.installed,name:r.name}:{installed:!1,name:n.preferredManager,note:`${n.preferredManager} is the preferred manager but isn't on PATH`}}const t=ce(o.source,o.tool);for(const r of t){if(r==="self-activate"){if((o.tool==="pnpm"||o.tool==="yarn")&&y(o.tool))return{installed:!0,name:"self-activate",note:`${o.tool} will activate ${o.version} from the packageManager field on next invocation`};continue}if(T(r,o.tool)&&e.find(i=>i.name===r)?.installed)return{installed:!0,name:r}}for(const r of t)if(!(r==="self-activate"||!T(r,o.tool)))return{installed:!1,name:r,note:`${r} can install ${o.tool} — run \`vis toolchain install\` after adding it to PATH`};return{installed:!1,name:"none",note:"No manager knows how to install this tool"}},"resolveManagerFor"),T=f((o,e)=>o==="none"?!1:o==="self-activate"?e==="pnpm"||e==="yarn":Z[o].includes(e),"canHandle"),fe=f((o,e)=>{const n=S(o),t=se(o,e).map(r=>{const i=ie(r.tool),l=i!==void 0&&ae(i,r.version),s=le(r,n,e);return{actual:i,expected:r,manager:s,matches:l}});return{detected:n,tools:t}},"getToolchainStatus"),pe=f((o,e)=>{switch(o){case"asdf":return e?{args:["install",e.tool,e.version],bin:"asdf"}:void 0;case"corepack":return e?{args:["prepare",`${e.tool}@${e.version}`,"--activate"],bin:"corepack"}:{args:["prepare","--activate"],bin:"corepack",hint:"reads the packageManager field in package.json"};case"fnm":return e?.tool!=="node"?void 0:{args:["install",e.version],bin:"fnm"};case"mise":return e?{args:["install",`${e.tool}@${e.version}`],bin:"mise"}:void 0;case"none":return;case"nvm":return{args:[],bin:"nvm",hint:"nvm is a shell function — run `nvm install` / `nvm use` from your shell"};case"proto":return e?{args:["install",e.tool,e.version],bin:"proto"}:void 0;case"self-activate":return{args:[],bin:e?.tool??"pnpm",hint:`${e?.tool??"pnpm"} will self-activate on next invocation — no install needed`};case"volta":return e?{args:["install",`${e.tool}@${e.version}`],bin:"volta"}:{args:["install","node@lts"],bin:"volta",hint:"volta pins per-tool; specify <tool>@<version>"};default:{const n=o;throw new Error(`Unknown manager: ${n}`)}}},"buildInstallInvocation"),$e=f((o,e)=>{switch(o){case"asdf":return{args:["local",e.tool,e.version],bin:"asdf",configChange:{file:".tool-versions",hint:`Pins ${e.tool} ${e.version}`}};case"corepack":return e.tool!=="npm"&&e.tool!=="pnpm"&&e.tool!=="yarn"?void 0:{args:["use",`${e.tool}@${e.version}`],bin:"corepack",configChange:{file:"package.json",hint:`Writes packageManager: "${e.tool}@${e.version}"`}};case"fnm":return e.tool==="node"?{args:["use",e.version],bin:"fnm"}:void 0;case"mise":return{args:["use","--",`${e.tool}@${e.version}`],bin:"mise",configChange:{file:".mise.toml",hint:`Pins ${e.tool} ${e.version}`}};case"none":return;case"nvm":return e.tool==="node"?{args:[],bin:"nvm",configChange:{file:".nvmrc",hint:"Write version to .nvmrc manually (nvm doesn't persist)."}}:void 0;case"proto":return{args:["pin",e.tool,e.version],bin:"proto",configChange:{file:".prototools",hint:`Pins ${e.tool} ${e.version}`}};case"self-activate":return{args:[],bin:e.tool,configChange:{file:"package.json",hint:`Set packageManager: "${e.tool}@${e.version}" — ${e.tool} will self-activate on next invocation`}};case"volta":return{args:["pin",`${e.tool}@${e.version}`],bin:"volta",configChange:{file:"package.json",hint:`Writes volta.${e.tool}`}};default:{const n=o;throw new Error(`Unknown manager: ${n}`)}}},"buildUseInvocation"),be=f(o=>{for(const e of F[o].binaries){const n=y(e);if(n)return n}},"findOnPathByAlias"),ke=f((o,e)=>{const n=F[e].binaries;if(o.installed&&o.binPath&&(o.name==="proto"||o.name==="mise"||o.name==="asdf"||o.name==="volta"||o.name==="fnm"))for(const t of n)try{const r=w(o.binPath,["which",t],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3}).trim();if(r)return r}catch{}for(const t of n){const r=y(t);if(r)return r}},"resolveToolBinary"),E=f((o,e)=>{const n=`${o}.${process.pid}.${D(6).toString("hex")}.tmp`;U(n,e);try{q(n,o)}catch(t){try{H(n)}catch{}throw t}},"atomicWrite"),ue=f((o,e)=>{if("packageManager"in o)return o.packageManager=e,o;const n={};let t=!1;for(const[r,i]of Object.entries(o))!t&&(r==="dependencies"||r==="devDependencies"||r==="peerDependencies"||r==="optionalDependencies")&&(n.packageManager=e,t=!0),n[r]=i;return t||(n.packageManager=e),n},"insertPackageManagerKey"),Me=f((o,e)=>{if(e.tool!=="pnpm"&&e.tool!=="yarn"&&e.tool!=="npm"&&e.tool!=="bun")return;const n=d(o,"package.json");if(!g(n))throw new Error(`Cannot pin ${e.tool}: ${n} does not exist.`);const t=k(n),r=/\n([ \t]+)/.exec(t)?.[1]??" ";let i;try{i=JSON.parse(t)}catch(a){throw new Error(`${n} is not valid JSON — fix it before running \`vis toolchain use\`. Underlying error: ${a.message}`,{cause:a})}const l=`${e.tool}@${e.version}`,s=ue(i,l),c=t.endsWith(`
2
+ `)?`
3
+ `:"";return E(n,`${JSON.stringify(s,void 0,r)}${c}`),l},"writePackageManagerField"),we=f((o,e)=>{const n=d(o,"package.json");if(!g(n))return;const t=k(n);let r;try{r=JSON.parse(t)}catch(s){throw new Error(`${n} is not valid JSON — fix it before running \`vis toolchain use\`. Underlying error: ${s.message}`,{cause:s})}if(r.engines?.[e.tool]===void 0||r.engines[e.tool]===e.version)return;r.engines[e.tool]=e.version;const i=/\n([ \t]+)/.exec(t)?.[1]??" ",l=t.endsWith(`
4
+ `)?`
5
+ `:"";return E(n,`${JSON.stringify(r,void 0,i)}${l}`),e.version},"updateEnginesField"),xe=f(o=>{const e=/^([a-z][\w-]*)@(.+)$/i.exec(o.trim());if(!e)return;const n=h(e[1]);if(n)return{source:"vis.config.ts",tool:n,version:e[2]}},"parseUseArgument"),ge=f(async(o,e,n)=>{const t=fe(o,e),r=t.tools.filter(a=>!a.matches);if(r.length===0)return{attempted:[],failed:[],upToDate:!0};const i=t.detected.some(a=>a.installed);if(!(e?.autoInstall??i))return{attempted:[],failed:[],upToDate:!1};const l=[],s=[],c=new Map;for(const a of r){const u=c.get(a.manager.name);u?u.push(a):c.set(a.manager.name,[a])}for(const[a,u]of c){if(a==="self-activate"){for(const{expected:p}of u)n.info(`toolchain: ${p.tool} ${p.version} will self-activate on next ${p.tool} invocation`),l.push(p);continue}if(a==="none"){for(const{expected:p}of u)s.push({error:`no manager can install ${p.tool} — install one of ${V.join(", ")}`,spec:p});continue}if(!t.detected.find(p=>p.name===a)?.installed){for(const{expected:p}of u)s.push({error:`${a} is not on PATH`,spec:p});continue}const m=u.map(p=>({invocation:pe(a,p.expected),tool:p})).filter(p=>p.invocation!==void 0);for(const{invocation:p,tool:$}of m){const{expected:v}=$;if(p.bin==="nvm"&&p.args.length===0){n.warn(`toolchain: nvm requires a shell-side activation for ${v.tool} ${v.version}. Run \`nvm install\` / \`nvm use\` manually.`),s.push({error:"nvm requires shell-side activation",spec:v});continue}n.info(`toolchain: $ ${p.bin} ${p.args.join(" ")}`);try{w(p.bin,p.args,{cwd:o,stdio:"inherit"}),l.push(v),a==="fnm"&&de(p.bin,n)}catch(C){s.push({error:C.message,spec:v});break}}}return K(),{attempted:l,failed:s,upToDate:!1}},"ensureToolchain"),Te=f(async(o,e,n,t=!1)=>{if(t)return;const r=await ge(o,e,n);for(const i of r.failed)n.warn(`toolchain: ${i.spec.tool} ${i.spec.version} — ${i.error}`)},"runToolchainPreflight"),de=f((o,e)=>{const n=process.platform==="win32"?"powershell":"bash";try{const t=w(o,["env","--shell",n],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3});for(const r of t.split(/\r?\n/)){const i=r.trim();if(i==="")continue;const l=/^\$env:([A-Z_]\w*)\s*=\s*(.+)$/i.exec(i);if(l){const[,a,u]=l;process.env[a]=u.replaceAll(/^["']|["']$/g,"");continue}const s=/^set\s+"?([A-Z_]\w*)=(.*?)"?$/i.exec(i);if(s){const[,a,u]=s;process.env[a]=u;continue}const c=/^(?:export\s+)?([A-Z_]\w*)=(.+)$/i.exec(i);if(c){const[,a,u]=c;process.env[a]=u.replaceAll(/^["']|["']$/g,"")}}}catch(t){e.warn(`toolchain: could not activate fnm env (${t.message}). Subsequent tasks may use the previous Node version.`)}},"activateFnmEnv");export{V as S,le as a,pe as b,$e as c,ke as d,be as e,S as f,fe as g,ye as h,xe as p,Te as r,we as u,Me as w};
@@ -0,0 +1 @@
1
+ var q=Object.defineProperty;var l=(e,s)=>q(e,"name",{value:s,configurable:!0});import{createRequire as $}from"node:module";import{aE as M,p as i,d as b,e as k}from"../packem_chunks/bin.js";import{M as C,i as D,n as A}from"./otel-CO8UEfTa.js";const z=$(import.meta.url),m=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_=l(e=>{if(typeof m<"u"&&m.versions&&m.versions.node){const[s,r]=m.versions.node.split(".").map(Number);if(s>22||s===22&&r>=3||s===20&&r>=16)return m.getBuiltinModule(e)}return z(e)},"__cjs_getBuiltinModule"),{createInterface:T}=_("node:readline");var O=["aj","aju","av","avj","ejv","jav","jv"],F=["angula","angular-node","angularjs"],N=["auto-prefixer"],P=["aaxios","aios","axio","axioos","axios-node","axioss","axis","axiso","axois","axos","axxios"],B=["abel","babbel","babe","babel-js","babel-node","babl","bable","bbael","bebel"],R=["bcrpyt","bcrypt-node","brcypt","crypt","dcrypt"],S=["bcryptjs-node","dcryptjs"],W=["bunan","bunya","bunyan-node","buynan"],E=["cai","cha","chaijs","chal","chi","chia","hai"],L=["cahlk","calk","cchalk","ch4lk","cha1k","chaalk","chaik","chak","chakl","chalk-node","chalkk","challk","chhalk","chlak","chlk","halk","hcalk"],U=["cheero","cherio"],V=["c0lor","ccolor","clor","colo","coloor","color-js","colorjs","colorr","colr","coolor","coolr"],I=["ccolors","colors-node","colorss","colorz","colrs","coolors"],J=["c0mmander","ccommander","cmmander","cmomander","co-mmander","comamnder","comander","comm4nder","commaander","commader","commadner","commamder","command3r","commandder","commande","commandeer","commander-js","commanderr","commandr","commandre","commanedr","commaner","commannder","commender","commmander","commnader","commnder","coommander","ocmmander","ommander"],Y=["cor","corss","cos","cosr","cros","crs","ors"],G=["days"],H=["d3bug","dbeug","dbug","ddebug","debbug","debg","debgu","debu","debu9","debug-js","debug-node","debugg","debugjs","debuug","deebug","deubg","deug","ebug","edbug"],K=["dot-env","dotenv-node","dotenvjs","dotevn"],Q=["3lectron","eectron","eelctron","eelectron","el3ctron","elcetron","elctron","elecctron","elecron","elecrton","electon","electorn","electr0n","electrn","electrno","electro","electrom","electron-node","electronn","electroon","electrron","electtron","eleectron","eletcron","eletron","ellectron","lectron","leectron"],X=["asbuild","ebuild","esbuild-node","esbuildjs","ezbuild","sbuild"],Z=["aslint","elint","eslint-js","eslint-node","eslit","ezlint","slint"],ee=["eexpress","epress","epxress","experss","expess","exppress","expreess","expres","express-node","expressjs","expresss","exprress","exprses","exprss","exress","exrpess","exxpress","xepress","xpress"],oe=["astify"],se=["firebasejs"],re=["form1dable"],ae=["glb","glo","glob-js","globjs","gob","golb","lob"],te=["go","goot","gotjs","gott","gt","gto","ogt","ot","qot"],ne=["helmetjs","helnet"],ce=["homo","hon","hoo","hoon","ohno","ono"],ie=["inquire","inquirer-js","nquirer"],de=["iredis"],me=["ejst","est","jast","jes","jestjs","jestt","jet","jets","jst"],le=["imp","jim","jip","jmp"],pe=["ji","jio","jo","joii","jol","oi","oji"],ue=["jdom","jsdm","jsdo","jsdom-js","jsdon","jsom","sdom"],ve=["jsonwebtoken-js","jsonwebtoken-node"],he=["ka","kao","ko","koaa","koajs","koe","oa","oka"],je=["1odash","iodash","l0dash","ldash","ldoash","llodash","lo-dash","loadsh","loash","lobash","lod4sh","lodaash","lodah","lodahs","lodas","lodash-node","lodashh","lodassh","loddash","lodesh","lodsah","lodsh","loodash","odash","oldash"],be=["luca","luci","lucie"],ke=["luon","luxo","luxon-js"],ge=["imcromatch","mciromatch","micormatch","micrmoatch","micro-match","microamtch","micromacth","micromathc","micromtach","mircomatch"],fe=["minimath"],ye=["mcha","mmocha","moca","moch","mocha-js","moha","nocha","ocha"],xe=["m0ment","mment","mmoent","mmoment","moemnt","moent","mom3nt","momeent","momemt","momen","momen7","momennt","moment-js","momentjs","momentt","momet","mometn","momment","momnet","momnt","monent","mooment","oment","omment"],we=["mognoose","mogoose","mongoos","mongose","monqoose","moongoose"],qe=["moran","organ"],$e=["muler","multer-js","muter"],ze=["mysql"],_e=["ext","mext","n3xt","naxt","net","netx","nex","next-js","next-node","nextjs","nxt"],Te=["node-mailer","nodemailer-js"],Me=["nodemo","nodemonjs","nodmeon"],Ce=["oar","or","ora-node","ore","ra","roa"],De=["arcel","parce","parceljs"],Ae=["passport-js"],Oe=["phase","phaser-node"],Fe=["ino","pimo","pin","pino-node","pinojs","pio","pion"],Ne=["playright","playwright-js"],Pe=["postcss-js","postcss-node","potscss"],Be=["pettier","pprettier","pretier","prettierjs","prettierr","prtetier"],Re=["prima","prism","prisma-js","prismajs","prizma"],Se=["pupeteer"],We=["rada","rama","ramd","randa"],Ee=["eact","eract","r3act","raact","ract","raect","re4ct","reaact","reac","reac7","reacct","react-node","reactjs","reactt","reat","reatc","recat","rect","reeact","reect","rreact"],Le=["erdis","radis","rdis","redi","redis-js","redis-node","rediss","rediz","reds","reis","rredis"],Ue=["resen","rsend"],Ve=["ollup","rollup-js","rollup-node"],Ie=["ass","asss","sas","sass-node","sess","ssas","sss"],Je=["emver","seemver","semver-node","semvre","senver","sever"],Ye=["sequelize-js","sequelize-node"],Ge=["harp","shap","shar","sharp-js","sharpjs"],He=["stipe","strip","stripe-node","tripe"],Ke=["supabase-js"],Qe=["suelte","svelt3","svelte-js","sveltejs","velte"],Xe=["tailwindcss-js"],Ze=["auri","taui"],eo=["hree","htree","thee","there","three-js","three-node","tree"],oo=["stx","sx","ts","tsxx","ttsx","tx","txs","tzx"],so=["ttypescript","typecript","typescipt","typescript-node","typescriptjs","typescrit","typescritp"],ro=["udnerscore","undercore","underscoer","underscore-node","underscroe","undersocre","undesrcore"],ao=["uid","uud","uudi","uui","uuid-js","uuid-node","uuidjs","vuid"],to=["ite","vie","vit","vita","vite-node","vitee","vlte","vte"],no=["itest","uitest","vitestjs","vitezt","vittest","vtest"],co=["ue","uue","uve","ve","veu","vu","vu3","vua","vue-node","vuee","vuejs","vuue","vve","vvue"],io=["web-pack","weback","webpac","webpack-node","webpackjs","webpak","weebpack","wepack","wepback"],mo=["winson","winston-js","winstoon"],lo=["up","uyp","yp","yu","yupjs","yupp"],po=["od","zd","zdo","zo","zob","zod-js","zodjs"];const uo={ajv:O,angular:F,autoprefixer:N,"aws-sdk":["awssdk","ews-sdk"],axios:P,babel:B,bcrypt:R,bcryptjs:S,"body-parser":["body-paresr","body-parse","body-parser-js","body_parser"],bunyan:W,chai:E,chalk:L,cheerio:U,color:V,colors:I,commander:J,"cookie-parser":["cookie-parse","cookieparser"],cors:Y,"cross-env":["crossenv"],"date-fns":["data-fns","date-fn"],dayjs:G,debug:H,dotenv:K,electron:Q,esbuild:X,eslint:Z,express:ee,fastify:oe,firebase:se,formidable:re,glob:ae,got:te,helmet:ne,hono:ce,inquirer:ie,ioredis:de,jest:me,jimp:le,joi:pe,jsdom:ue,jsonwebtoken:ve,koa:he,lodash:je,lucia:be,luxon:ke,micromatch:ge,minimatch:fe,mocha:ye,moment:xe,mongoose:we,morgan:qe,multer:$e,mysql2:ze,next:_e,"node-fetch":["node-fecth","node-fethc","node.fetch"],nodemailer:Te,nodemon:Me,ora:Ce,parcel:De,passport:Ae,phaser:Oe,pino:Fe,playwright:Ne,postcss:Pe,prettier:Be,prisma:Re,puppeteer:Se,ramda:We,react:Ee,"react-dom":["eact-dom","eract-dom","r3act-dom","ract-dom","raect-dom","re4ct-dom","reaact-dom","reac-dom","reac7-dom","reacct-dom","react-bom","react-d0m","react-ddom","react-dm","react-dmo","react-do","react-domm","react-don","react-doom","react-odm","react-om","react.dom","reactdom","reactt-dom","reat-dom","reatc-dom","recat-dom","rect-dom","reeact-dom","rreact-dom"],redis:Le,resend:Ue,rollup:Ve,sass:Ie,semver:Je,sequelize:Ye,sharp:Ge,"socket.io":["ocket.io","oscket.io","scket.io","scoket.io","soccket.io","socekt.io","socet.io","sock3t.io","socke.io","socke7.io","sockeet.io","socket.1o","socket.i","socket.iio","socket.ioo","socket.lo","socket.o","socket.oi","sockett.io","sockket.io","sockt.io","sockte.io","sokcet.io","soket.io","soocket.io","ssocket.io"],stripe:He,supabase:Ke,svelte:Qe,tailwindcss:Xe,tauri:Ze,three:eo,"ts-node":["tts-node"],tsx:oo,typescript:so,underscore:ro,uuid:ao,vite:to,vitest:no,vue:co,webpack:io,winston:mo,yup:lo,zod:po};var v,g;function vo(){return g||(g=1,v={"@tanstack/start":["start-tanstack-app","tanstack","tanstack-app","tanstack-start"]}),v}l(vo,"requireTyposquatsManual");var ho=vo();const jo=M(ho);var bo=Object.defineProperty,n=l((e,s)=>bo(e,"name",{value:s,configurable:!0}),"c");const ko={a:["4","e"],b:["d"],d:["b"],e:["3","a"],g:["9","q"],i:["1","l"],l:["1","i"],m:["n"],n:["m"],o:["0"],s:["5","z"],t:["7"],u:["v"],v:["u"]},go=["app","cli","core","kit","lib","pkg","sdk"],fo=n(e=>{const s=new Set;if(e.length<3)return s;for(let o=0;o<e.length;o++){const a=e[o],t=a==="-"||a==="."||a==="_";if(t||s.add(e.slice(0,o)+e.slice(o+1)),t||s.add(e.slice(0,o)+a+e.slice(o)),o<e.length-1&&e[o]!==e[o+1]){const u=e[o+1]==="-"||e[o+1]==="."||e[o+1]==="_";if(!t&&!u){const d=[...e];[d[o],d[o+1]]=[d[o+1],d[o]],s.add(d.join(""))}}const c=e[o].toLowerCase(),j=ko[c];if(j)for(const u of j)s.add(e.slice(0,o)+u+e.slice(o+1))}const r=/[-._]/g;if(r.test(e))s.add(e.replaceAll(r,"")),s.add(e.replaceAll(r,"-")),s.add(e.replaceAll(r,".")),s.add(e.replaceAll(r,"_"));else if(e.length>5)for(let o=2;o<e.length-2;o++)s.add(`${e.slice(0,o)}-${e.slice(o)}`),s.add(`${e.slice(0,o)}.${e.slice(o)}`),s.add(`${e.slice(0,o)}_${e.slice(o)}`);if(e.startsWith("@")||(s.add(`${e}-js`),s.add(`${e}js`),s.add(`${e}-node`)),e.startsWith("@")){const o=e.indexOf("/");if(o>1&&o<e.length-1){const a=e.slice(1,o),t=e.slice(o+1);a.length>=3&&s.add(a);for(const c of["","-",".","_"])s.add(`${a}${c}${t}`),s.add(`${t}${c}${a}`);for(const c of go)s.add(`${a}-${c}`),s.add(`${t}-${a}-${c}`),s.add(`${c}-${a}-${t}`)}}return s.delete(e),s},"generateVariants");let h,p;const f=n(()=>{if(!h){const e={};for(const s of[uo,jo])for(const[r,o]of Object.entries(s)){const a=e[r]??(e[r]=[]);for(const t of o)a.includes(t)||a.push(t)}h=e}return h},"loadBlocklist"),yo=n(()=>{if(!p){p=new Map;for(const[e,s]of Object.entries(f()))for(const r of s)p.set(r,e)}return p},"getReverseLookup"),xo=n(e=>e.startsWith("@")?e.split("/")[1]??e:e,"bareName"),wo=n(e=>{const s=xo(e),r=yo().get(s);if(r)return{input:e,legitimate:r,method:"blocklist"};for(const o of Object.keys(f()))if(fo(o).has(s))return{input:e,legitimate:o,method:"heuristic"}},"checkTyposquat"),y=n((e,s)=>{const r=s?new Set(s):void 0,o=[];for(const a of e){if(r?.has(a))continue;const t=wo(a);t&&o.push(t)}return o},"checkTyposquats"),x=n((e,s)=>{i.warn(""),i.warn(b(`Possible typosquat${e.length===1?"":"s"} ${s}:`));for(const r of e){const o=r.method==="blocklist"?"known typosquat":"similar name";i.warn(` ${k("⚠")} ${b(r.input)} — did you mean ${k(r.legitimate)}? (${o})`)}i.warn("")},"printTyposquatWarnings"),w=n(async e=>{if(!process.stdin.isTTY){i.warn("Aborting: potential typosquat detected in non-interactive mode. Use --no-typosquat-check to skip.");return}const s=T({input:process.stdin,output:process.stdout}),r=await new Promise(o=>{s.question(e,a=>{o(a.trim().toLowerCase())})});return s.close(),r},"askConfirmation"),Do=n(async(e,s)=>{const r=y(e,s);if(r.length===0)return{ok:!0,packages:e};x(r,"detected");const o=await w(`Use suggested package${r.length===1?"":"s"} instead? [S]uggested / [y]es, keep original / [N]o, abort (default: N) `);if(o===void 0)return{ok:!1,packages:e};if(o==="s"||o==="suggested"){const a=new Map(r.map(t=>[t.input,t.legitimate]));return{ok:!0,packages:e.map(t=>a.get(t)??t)}}return o==="y"||o==="yes"?{ok:!0,packages:e}:{ok:!1,packages:e}},"runTyposquatCheck"),qo=/^(?:npm|pnpm|yarn):(.+?)(?:@.*)?$/,$o=n(e=>qo.exec(e)?.[1],"parseAliasTarget"),zo=n(e=>{if(!D(e))return[];const s=A(e),r={...s.dependencies,...s.devDependencies,...s.optionalDependencies,...s.peerDependencies},o=new Set;for(const[a,t]of Object.entries(r)){o.add(a);const c=$o(t);c&&o.add(c)}return[...o]},"readDepsFromPackageJson"),Ao=n(async(e,s)=>{const r=C(e,"package.json"),o=zo(r);if(o.length===0)return!0;const a=y(o,s);if(a.length===0)return!0;x(a,"in package.json dependencies"),i.warn("Fix the package name in package.json before proceeding.");const t=await w("Continue anyway? [y/N] ");return t==="y"||t==="yes"},"scanDepsForTyposquats");export{Do as r,Ao as s};
@@ -0,0 +1 @@
1
+ var u=Object.defineProperty;var g=(n,s)=>u(n,"name",{value:s,configurable:!0});import{createRequire as m}from"node:module";import{M as i,i as a,$ as f}from"./otel-CO8UEfTa.js";import{t as $}from"../packem_chunks/bin.js";const j=m(import.meta.url),k=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=g(n=>{if(typeof k<"u"&&k.versions&&k.versions.node){const[s,o]=k.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return k.getBuiltinModule(n)}return j(n)},"__cjs_getBuiltinModule"),{readdirSync:v}=b("node:fs");var w=Object.defineProperty,l=g((n,s)=>w(n,"name",{value:s,configurable:!0}),"o");const _=[".husky/pre-commit",".vis-hooks/pre-commit",".git/hooks/pre-commit"],D=[".secretlintrc",".secretlintrc.json",".secretlintrc.js",".secretlintrc.mjs",".secretlintrc.cjs",".secretlintrc.yml",".secretlintrc.yaml"],S=[".syncpackrc",".syncpackrc.json",".syncpackrc.yaml",".syncpackrc.yml",".syncpackrc.cjs",".syncpackrc.js",".syncpackrc.mjs",".syncpackrc.ts","syncpack.config.cjs","syncpack.config.js","syncpack.config.mjs","syncpack.config.ts"],M=l(n=>{const s=i(n,"package.json");if(!a(s))return[];let o;try{o=JSON.parse(f(s))}catch{return[]}const e=[];if(o.scripts)for(const[t,c]of Object.entries(o.scripts))typeof c=="string"&&(/\bgitleaks\b/.test(c)&&e.push({detail:`Script "${t}" still invokes gitleaks: ${c}`,kind:"script",location:"package.json",tool:"gitleaks"}),/\bsecretlint\b/.test(c)&&e.push({detail:`Script "${t}" still invokes secretlint: ${c}`,kind:"script",location:"package.json",tool:"secretlint"}),/\bsyncpack\b/.test(c)&&e.push({detail:`Script "${t}" still invokes syncpack: ${c}`,kind:"script",location:"package.json",tool:"syncpack"}),/\bsherif\b/.test(c)&&e.push({detail:`Script "${t}" still invokes sherif: ${c}`,kind:"script",location:"package.json",tool:"sherif"}));if(o.devDependencies)for(const t of Object.keys(o.devDependencies))(t==="gitleaks"||t==="@gitleaks/cli")&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"gitleaks"}),(t==="secretlint"||t.startsWith("@secretlint/"))&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"secretlint"}),t==="syncpack"&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"syncpack"}),t==="sherif"&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"sherif"});return o.sherif&&e.push({detail:"`sherif` config block still present in package.json",kind:"config",location:"package.json",tool:"sherif"}),e},"scanPackageJson"),O=l(n=>{const s=[];for(const o of _){const e=i(n,o);if(!a(e))continue;const t=f(e);/\bgitleaks\b/.test(t)&&s.push({detail:"gitleaks invocation still present in hook",kind:"hook",location:o,tool:"gitleaks"}),/\bsecretlint\b/.test(t)&&s.push({detail:"secretlint invocation still present in hook",kind:"hook",location:o,tool:"secretlint"}),/\bsyncpack\b/.test(t)&&s.push({detail:"syncpack invocation still present in hook",kind:"hook",location:o,tool:"syncpack"}),/\bsherif\b/.test(t)&&s.push({detail:"sherif invocation still present in hook",kind:"hook",location:o,tool:"sherif"})}return s},"scanHooks"),C=l(n=>{const s=[];for(const o of D)a(i(n,o))&&s.push({detail:"secretlint config should be removed after migration",kind:"config",location:o,tool:"secretlint"});for(const o of S)a(i(n,o))&&s.push({detail:"syncpack config should be removed after migration",kind:"config",location:o,tool:"syncpack"});return s},"scanConfigs"),N=[".github/workflows",".gitlab-ci.yml",".circleci/config.yml",".woodpecker.yml",".drone.yml"],q=l(n=>{const s=[],o=l(e=>{const t=i(n,e);if(!a(t))return;const c=f(t);/\bsyncpack\b/.test(c)&&s.push({detail:"syncpack invocation still present in CI",kind:"ci",location:e,tool:"syncpack"}),/\bsherif\b/.test(c)&&s.push({detail:"sherif invocation still present in CI",kind:"ci",location:e,tool:"sherif"})},"scanFile");for(const e of N){const t=i(n,e);if(a(t)){if(e===".github/workflows"){try{for(const c of v(t))(c.endsWith(".yml")||c.endsWith(".yaml"))&&o(`.github/workflows/${c}`)}catch{}continue}o(e)}}return s},"scanCi"),I=l(n=>{const s=[],o=i(n,"pnpm-workspace.yaml");if(a(o)){let t;try{t=$(o)}catch{t=void 0}if(t&&typeof t=="object"){const c=t.catalog;c&&typeof c.syncpack=="string"&&s.push({detail:"`syncpack` still listed in pnpm-workspace.yaml#catalog",kind:"catalog",location:"pnpm-workspace.yaml",tool:"syncpack"});const r=t.catalogs;if(r&&typeof r=="object")for(const[d,p]of Object.entries(r))p&&typeof p.syncpack=="string"&&s.push({detail:`\`syncpack\` still listed in pnpm-workspace.yaml#catalogs.${d}`,kind:"catalog",location:"pnpm-workspace.yaml",tool:"syncpack"})}}const e=i(n,"package.json");if(a(e)){let t;try{t=JSON.parse(f(e))}catch{return s}const c=t.workspaces;if(c&&typeof c=="object"&&!Array.isArray(c)){const d=c.catalog;d&&typeof d.syncpack=="string"&&s.push({detail:"`syncpack` still listed in package.json#workspaces.catalog",kind:"catalog",location:"package.json",tool:"syncpack"});const p=c.catalogs;if(p&&typeof p=="object")for(const[h,y]of Object.entries(p))y&&typeof y.syncpack=="string"&&s.push({detail:`\`syncpack\` still listed in package.json#workspaces.catalogs.${h}`,kind:"catalog",location:"package.json",tool:"syncpack"})}const r=t.catalog;r&&typeof r.syncpack=="string"&&s.push({detail:"`syncpack` still listed in package.json#catalog",kind:"catalog",location:"package.json",tool:"syncpack"})}return s},"scanCatalogs"),J=l(n=>[...M(n),...O(n),...C(n),...q(n),...I(n)],"scanMigrationLeftovers"),B=l((n,s)=>{const o=J(n);if(o.length===0)return s.info("✓ No unmigrated gitleaks/secretlint/sherif/syncpack references found."),[];s.warn(`Found ${String(o.length)} unmigrated reference(s):`);for(const e of o)s.warn(` [${e.kind}] ${e.location} — ${e.detail}`);return o},"verifyMigration");export{J as s,B as v};