@visulima/vis 1.0.0-alpha.18 → 1.0.0-alpha.19

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.
@@ -1,24 +1,153 @@
1
- var jr=Object.defineProperty;var k=(e,t)=>jr(e,"name",{value:t,configurable:!0});import{createRequire as Fr}from"node:module";import{a8 as yr,u as Br,aX as Ur,aJ as qr,aK as Wr,aL as Yt,A as Kr,p as z,x as Xr,s as zr}from"./bin.js";import{M as Te,a as Gt,$ as Xe,B as Ue,n as vr,C as Jr}from"./config.js";import{render as Vr}from"@visulima/tui";import Yr from"module-replacements/manifests/micro-utilities.json"with{type:"json"};import Zr from"module-replacements/manifests/native.json"with{type:"json"};import en from"module-replacements/manifests/preferred.json"with{type:"json"};import tn,{useSyncExternalStore as rn,useRef as nn,useState as Zt,useCallback as on}from"react";import{jsx as R,jsxs as M,Fragment as it}from"react/jsx-runtime";import{Box as G}from"@visulima/tui/components/box";import{Text as P}from"@visulima/tui/components/text";import{useApp as sn}from"@visulima/tui/hooks/use-app";import{useInput as an}from"@visulima/tui/hooks/use-input";import{useWindowSize as cn}from"@visulima/tui/hooks/use-window-size";import{ScrollView as ln}from"@visulima/tui/components/scroll-view";import{ScrollBar as un}from"@visulima/tui/components/scroll-bar";import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
2
- const require = __cjs_mod__.createRequire(import.meta.url);
3
- const Mr=Fr(import.meta.url),Ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,mr=k(e=>{if(typeof Ge<"u"&&Ge.versions&&Ge.versions.node){const[t,r]=Ge.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return Ge.getBuiltinModule(e)}return Mr(e)},"__cjs_getBuiltinModule"),{writeFileSync:Gr}=mr("node:fs"),{createRequire:Qr}=mr("node:module");var pn=Object.defineProperty,Ie=k((e,t)=>pn(e,"name",{value:t,configurable:!0}),"r$2"),fn=Object.defineProperty,je=Ie((e,t)=>fn(e,"name",{value:t,configurable:!0}),"r"),hn=Object.defineProperty,He=je((e,t)=>hn(e,"name",{value:t,configurable:!0}),"t");function at(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}k(at,"p$1");Ie(at,"f");je(at,"getDefaultExportFromCjs");He(at,"getDefaultExportFromCjs");function Bt(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}k(Bt,"f$1");Ie(Bt,"l");je(Bt,"getDefaultExportFromNamespaceIfPresent");He(Bt,"getDefaultExportFromNamespaceIfPresent");function Ut(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}k(Ut,"l$1");Ie(Ut,"s");je(Ut,"getDefaultExportFromNamespaceIfNotNamed");He(Ut,"getDefaultExportFromNamespaceIfNotNamed");function qt(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=He(je(Ie(k(function n(){var s=!1;try{s=this instanceof n}catch{}return s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)},"u"),"n"),"a"),"a");r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:He(function(){return e[n]},"get")})}),r}k(qt,"s$1");Ie(qt,"m");je(qt,"getAugmentedNamespace");He(qt,"getAugmentedNamespace");var dn=Object.defineProperty,we=k((e,t)=>dn(e,"name",{value:t,configurable:!0}),"lt$1"),gn=Object.defineProperty,de=we((e,t)=>gn(e,"name",{value:t,configurable:!0}),"ut"),er={},Tt,tr;function Fe(){if(tr)return Tt;tr=1;const e="[^\\\\/]",t=Symbol("unignore"),r="\\.",n="\\+",s="\\?",i="\\/",a="(?=.)",f="[^/]",l=`(?:${i}|$)`,g=`(?:^|${i})`,y=`${r}{1,2}${l}`,h=`(?!${r})`,v=`(?!${g}${y})`,m=`(?!${r}{0,1}${l})`,_=`(?!${y})`,A=`[^.${i}]`,b=`${f}*?`,q="/",H={DOT_LITERAL:r,PLUS_LITERAL:n,QMARK_LITERAL:s,SLASH_LITERAL:i,ONE_CHAR:a,QMARK:f,END_ANCHOR:l,DOTS_SLASH:y,NO_DOT:h,NO_DOTS:v,NO_DOT_SLASH:m,NO_DOTS_SLASH:_,QMARK_NO_DOT:A,STAR:b,START_ANCHOR:g,SEP:q},W={...H,SLASH_LITERAL:"[\\\\/]",QMARK:e,STAR:`${e}*?`,DOTS_SLASH:`${r}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[\\\\/])${r}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},d={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return Tt={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:d,UNIGNORE:t,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(E){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${E.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(E){return E===!0?W:H}},Tt}k(Fe,"_t$1");we(Fe,"bt");de(Fe,"requireConstants");var rr;function Me(){return rr||(rr=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:r,REGEX_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_GLOBAL:s}=Fe();e.isObject=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),e.hasRegexChars=i=>n.test(i),e.isRegexChar=i=>i.length===1&&e.hasRegexChars(i),e.escapeRegex=i=>i.replace(s,"\\$1"),e.toPosixSlashes=i=>i.replace(t,"/"),e.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const i=navigator.platform.toLowerCase();return i==="win32"||i==="windows"}return process.platform?process.platform==="win32":!1},e.removeBackslashes=i=>i.replace(r,a=>a==="\\"?"":a),e.escapeLast=(i,a,f)=>{const l=i.lastIndexOf(a,f);return l===-1?i:i[l-1]==="\\"?e.escapeLast(i,a,l-1):`${i.slice(0,l)}\\${i.slice(l)}`},e.removePrefix=(i,a={})=>{let f=i;return f.startsWith("./")&&(f=f.slice(2),a.prefix="./"),f},e.wrapOutput=(i,a={},f={})=>{const l=f.contains?"":"^",g=f.contains?"":"$";let y=`${l}(?:${i})${g}`;return a.negated===!0&&(y=`(?:^(?!${y}).*$)`),y},e.basename=(i,{windows:a}={})=>{const f=i.split(a?/[\\/]/:"/"),l=f[f.length-1];return l===""?f[f.length-2]:l}})(er)),er}k(Me,"Et$1");we(Me,"yt");de(Me,"requireUtils");var Nt,nr;function Wt(){if(nr)return Nt;nr=1;var e=Object.defineProperty,t=de((d,E)=>e(d,"name",{value:E,configurable:!0}),"k");const r=Me(),{CHAR_ASTERISK:n,CHAR_AT:s,CHAR_BACKWARD_SLASH:i,CHAR_COMMA:a,CHAR_DOT:f,CHAR_EXCLAMATION_MARK:l,CHAR_FORWARD_SLASH:g,CHAR_LEFT_CURLY_BRACE:y,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:v,CHAR_PLUS:m,CHAR_QUESTION_MARK:_,CHAR_RIGHT_CURLY_BRACE:A,CHAR_RIGHT_PARENTHESES:b,CHAR_RIGHT_SQUARE_BRACKET:q}=Fe(),H=t(d=>d===g||d===i,"isPathSeparator"),W=t(d=>{d.isPrefix!==!0&&(d.depth=d.isGlobstar?1/0:1)},"depth");return Nt=t((d,E)=>{const o=E||{},S=d.length-1,T=o.parts===!0||o.scanToEnd===!0,C=[],w=[],N=[];let j=d,J=-1,V=0,ge=0,ae=!1,me=!1,Z=!1,ke=!1,Re=!1,ye=!1,Q=!1,ve=!1,Ce=!1,ce=!1,se=0,ue,I,U={value:"",depth:0,isGlob:!1};const p=t(()=>J>=S,"eos"),le=t(()=>j.charCodeAt(J+1),"peek"),ne=t(()=>(ue=I,j.charCodeAt(++J)),"advance");for(;J<S;){I=ne();let K;if(I===i){Q=U.backslashes=!0,I=ne(),I===y&&(ye=!0);continue}if(ye===!0||I===y){for(se++;p()!==!0&&(I=ne());){if(I===i){Q=U.backslashes=!0,ne();continue}if(I===y){se++;continue}if(ye!==!0&&I===f&&(I=ne())===f){if(ae=U.isBrace=!0,Z=U.isGlob=!0,ce=!0,T===!0)continue;break}if(ye!==!0&&I===a){if(ae=U.isBrace=!0,Z=U.isGlob=!0,ce=!0,T===!0)continue;break}if(I===A&&(se--,se===0)){ye=!1,ae=U.isBrace=!0,ce=!0;break}}if(T===!0)continue;break}if(I===g){if(C.push(J),w.push(U),U={value:"",depth:0,isGlob:!1},ce===!0)continue;if(ue===f&&J===V+1){V+=2;continue}ge=J+1;continue}if(o.noext!==!0&&(I===m||I===s||I===n||I===_||I===l)&&le()===h){if(Z=U.isGlob=!0,ke=U.isExtglob=!0,ce=!0,I===l&&J===V&&(Ce=!0),T===!0){for(;p()!==!0&&(I=ne());){if(I===i){Q=U.backslashes=!0,I=ne();continue}if(I===b){Z=U.isGlob=!0,ce=!0;break}}continue}break}if(I===n){if(ue===n&&(Re=U.isGlobstar=!0),Z=U.isGlob=!0,ce=!0,T===!0)continue;break}if(I===_){if(Z=U.isGlob=!0,ce=!0,T===!0)continue;break}if(I===v){for(;p()!==!0&&(K=ne());){if(K===i){Q=U.backslashes=!0,ne();continue}if(K===q){me=U.isBracket=!0,Z=U.isGlob=!0,ce=!0;break}}if(T===!0)continue;break}if(o.nonegate!==!0&&I===l&&J===V){ve=U.negated=!0,V++;continue}if(o.noparen!==!0&&I===h){if(Z=U.isGlob=!0,T===!0){for(;p()!==!0&&(I=ne());){if(I===h){Q=U.backslashes=!0,I=ne();continue}if(I===b){ce=!0;break}}continue}break}if(Z===!0){if(ce=!0,T===!0)continue;break}}o.noext===!0&&(ke=!1,Z=!1);let re=j,c="",u="";V>0&&(c=j.slice(0,V),j=j.slice(V),ge-=V),re&&Z===!0&&ge>0?(re=j.slice(0,ge),u=j.slice(ge)):Z===!0?(re="",u=j):re=j,re&&re!==""&&re!=="/"&&re!==j&&H(re.charCodeAt(re.length-1))&&(re=re.slice(0,-1)),o.unescape===!0&&(u&&(u=r.removeBackslashes(u)),re&&Q===!0&&(re=r.removeBackslashes(re)));const fe={prefix:c,input:d,start:V,base:re,glob:u,isBrace:ae,isBracket:me,isGlob:Z,isExtglob:ke,isGlobstar:Re,negated:ve,negatedExtglob:Ce};if(o.tokens===!0&&(fe.maxDepth=0,H(I)||w.push(U),fe.tokens=w),o.parts===!0||o.tokens===!0){let K;for(let ee=0;ee<C.length;ee++){const xe=K?K+1:V,pe=C[ee],_e=d.slice(xe,pe);o.tokens&&(ee===0&&V!==0?(w[ee].isPrefix=!0,w[ee].value=c):w[ee].value=_e,W(w[ee]),fe.maxDepth+=w[ee].depth),(ee!==0||_e!=="")&&N.push(_e),K=pe}if(K&&K+1<d.length){const ee=d.slice(K+1);N.push(ee),o.tokens&&(w[w.length-1].value=ee,W(w[w.length-1]),fe.maxDepth+=w[w.length-1].depth)}fe.slashes=C,fe.parts=N}return fe},"scan"),Nt}k(Wt,"Nt$1");we(Wt,"wt");de(Wt,"requireScan");var Dt,or;function Kt(){if(or)return Dt;or=1;var e=Object.defineProperty,t=de((d,E)=>e(d,"name",{value:E,configurable:!0}),"y");const r=Fe(),n=Me(),{MAX_LENGTH:s,POSIX_REGEX_SOURCE:i,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:f,REPLACEMENTS:l}=r,g=t((d,E)=>typeof E.expandRange=="function"?E.expandRange(...d,E):(d.sort(),`[${d.join("-")}]`),"expandRange"),y=t((d,E)=>`Missing ${d}: "${E}" - use "\\\\${E}" to match literal characters`,"syntaxError"),h=t(d=>{const E=[];let o=0,S=0,T=0,C="",w=!1;for(const N of d){if(w===!0){C+=N,w=!1;continue}if(N==="\\"){C+=N,w=!0;continue}if(N==='"'){T=T===1?0:1,C+=N;continue}if(T===0){if(N==="[")o++;else if(N==="]"&&o>0)o--;else if(o===0){if(N==="(")S++;else if(N===")"&&S>0)S--;else if(N==="|"&&S===0){E.push(C),C="";continue}}}C+=N}return E.push(C),E},"splitTopLevel"),v=t(d=>{let E=!1;for(const o of d){if(E===!0){E=!1;continue}if(o==="\\"){E=!0;continue}if(/[?*+@!()[\]{}]/.test(o))return!1}return!0},"isPlainBranch"),m=t(d=>{let E=d.trim(),o=!0;for(;o===!0;)o=!1,/^@\([^\\()[\]{}|]+\)$/.test(E)&&(E=E.slice(2,-1),o=!0);if(v(E))return E.replace(/\\(.)/g,"$1")},"normalizeSimpleBranch"),_=t(d=>{const E=d.map(m).filter(Boolean);for(let o=0;o<E.length;o++)for(let S=o+1;S<E.length;S++){const T=E[o],C=E[S],w=T[0];if(!(!w||T!==w.repeat(T.length)||C!==w.repeat(C.length))&&(T===C||T.startsWith(C)||C.startsWith(T)))return!0}return!1},"hasRepeatedCharPrefixOverlap"),A=t((d,E=!0)=>{if(d[0]!=="+"&&d[0]!=="*"||d[1]!=="(")return;let o=0,S=0,T=0,C=!1;for(let w=1;w<d.length;w++){const N=d[w];if(C===!0){C=!1;continue}if(N==="\\"){C=!0;continue}if(N==='"'){T=T===1?0:1;continue}if(T!==1){if(N==="["){o++;continue}if(N==="]"&&o>0){o--;continue}if(!(o>0)){if(N==="("){S++;continue}if(N===")"&&(S--,S===0))return E===!0&&w!==d.length-1?void 0:{type:d[0],body:d.slice(2,w),end:w}}}}},"parseRepeatedExtglob"),b=t(d=>{let E=0;const o=[];for(;E<d.length;){const S=A(d.slice(E),!1);if(!S||S.type!=="*")return;const T=h(S.body).map(w=>w.trim());if(T.length!==1)return;const C=m(T[0]);if(!C||C.length!==1)return;o.push(C),E+=S.end+1}return o.length<1?void 0:`${o.length===1?n.escapeRegex(o[0]):`[${o.map(S=>n.escapeRegex(S)).join("")}]`}*`},"getStarExtglobSequenceOutput"),q=t(d=>{let E=0,o=d.trim(),S=A(o);for(;S;)E++,o=S.body.trim(),S=A(o);return E},"repeatedExtglobRecursion"),H=t((d,E)=>{if(E.maxExtglobRecursion===!1)return{risky:!1};const o=typeof E.maxExtglobRecursion=="number"?E.maxExtglobRecursion:r.DEFAULT_MAX_EXTGLOB_RECURSION,S=h(d).map(T=>T.trim());if(S.length>1&&(S.some(T=>T==="")||S.some(T=>/^[*?]+$/.test(T))||_(S)))return{risky:!0};for(const T of S){const C=b(T);if(C)return{risky:!0,safeOutput:C};if(q(T)>o)return{risky:!0}}return{risky:!1}},"analyzeRepeatedExtglob"),W=t((d,E)=>{if(typeof d!="string")throw new TypeError("Expected a string");d=l[d]||d;const o={...E},S=typeof o.maxLength=="number"?Math.min(s,o.maxLength):s;let T=d.length;if(T>S)throw new SyntaxError(`Input length: ${T}, exceeds maximum allowed length: ${S}`);const C={type:"bos",value:"",output:o.prepend||""},w=[C],N=o.capture?"":"?:",j=r.globChars(o.windows),J=r.extglobChars(j),{DOT_LITERAL:V,PLUS_LITERAL:ge,SLASH_LITERAL:ae,ONE_CHAR:me,DOTS_SLASH:Z,NO_DOT:ke,NO_DOT_SLASH:Re,NO_DOTS_SLASH:ye,QMARK:Q,QMARK_NO_DOT:ve,STAR:Ce,START_ANCHOR:ce}=j,se=t(x=>`(${N}(?:(?!${ce}${x.dot?Z:V}).)*?)`,"globstar"),ue=o.dot?"":ke,I=o.dot?Q:ve;let U=o.bash===!0?se(o):Ce;o.capture&&(U=`(${U})`),typeof o.noext=="boolean"&&(o.noextglob=o.noext);const p={input:d,index:-1,start:0,dot:o.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:w};d=n.removePrefix(d,p),T=d.length;const le=[],ne=[],re=[];let c=C,u;const fe=t(()=>p.index===T-1,"eos"),K=p.peek=(x=1)=>d[p.index+x],ee=p.advance=()=>d[++p.index]||"",xe=t(()=>d.slice(p.index+1),"remaining"),pe=t((x="",Y=0)=>{p.consumed+=x,p.index+=Y},"consume"),_e=t(x=>{p.output+=x.output!=null?x.output:x.value,pe(x.value)},"append"),Hr=t(()=>{let x=1;for(;K()==="!"&&(K(2)!=="("||K(3)==="?");)ee(),p.start++,x++;return x%2===0?!1:(p.negated=!0,p.start++,!0)},"negate"),nt=t(x=>{p[x]++,re.push(x)},"increment"),Ee=t(x=>{p[x]--,re.pop()},"decrement"),F=t(x=>{if(c.type==="globstar"){const Y=p.braces>0&&(x.type==="comma"||x.type==="brace"),$=x.extglob===!0||le.length&&(x.type==="pipe"||x.type==="paren");x.type!=="slash"&&x.type!=="paren"&&!Y&&!$&&(p.output=p.output.slice(0,-c.output.length),c.type="star",c.value="*",c.output=U,p.output+=c.output)}if(le.length&&x.type!=="paren"&&(le[le.length-1].inner+=x.value),(x.value||x.output)&&_e(x),c&&c.type==="text"&&x.type==="text"){c.output=(c.output||c.value)+x.value,c.value+=x.value;return}x.prev=c,w.push(x),c=x},"push"),ot=t((x,Y)=>{const $={...J[Y],conditions:1,inner:""};$.prev=c,$.parens=p.parens,$.output=p.output,$.startIndex=p.index,$.tokensIndex=w.length;const B=(o.capture?"(":"")+$.open;nt("parens"),F({type:x,value:Y,output:p.output?"":me}),F({type:"paren",extglob:!0,value:ee(),output:B}),le.push($)},"extglobOpen"),Ir=t(x=>{const Y=d.slice(x.startIndex,p.index+1),$=d.slice(x.startIndex+2,p.index),B=H($,o);if((x.type==="plus"||x.type==="star")&&B.risky){const X=B.safeOutput?(x.output?"":me)+(o.capture?`(${B.safeOutput})`:B.safeOutput):void 0,be=w[x.tokensIndex];be.type="text",be.value=Y,be.output=X||n.escapeRegex(Y);for(let $e=x.tokensIndex+1;$e<w.length;$e++)w[$e].value="",w[$e].output="",delete w[$e].suffix;p.output=x.output+be.output,p.backtrack=!0,F({type:"paren",extglob:!0,value:u,output:""}),Ee("parens");return}let te=x.close+(o.capture?")":""),oe;if(x.type==="negate"){let X=U;if(x.inner&&x.inner.length>1&&x.inner.includes("/")&&(X=se(o)),(X!==U||fe()||/^\)+$/.test(xe()))&&(te=x.close=`)$))${X}`),x.inner.includes("*")&&(oe=xe())&&/^\.[^\\/.]+$/.test(oe)){const be=W(oe,{...E,fastpaths:!1}).output;te=x.close=`)${be})${X})`}x.prev.type==="bos"&&(p.negatedExtglob=!0)}F({type:"paren",extglob:!0,value:u,output:te}),Ee("parens")},"extglobClose");if(o.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(d)){let x=!1,Y=d.replace(f,($,B,te,oe,X,be)=>oe==="\\"?(x=!0,$):oe==="?"?B?B+oe+(X?Q.repeat(X.length):""):be===0?I+(X?Q.repeat(X.length):""):Q.repeat(te.length):oe==="."?V.repeat(te.length):oe==="*"?B?B+oe+(X?U:""):U:B?$:`\\${$}`);return x===!0&&(o.unescape===!0?Y=Y.replace(/\\/g,""):Y=Y.replace(/\\+/g,$=>$.length%2===0?"\\\\":$?"\\":"")),Y===d&&o.contains===!0?(p.output=d,p):(p.output=n.wrapOutput(Y,p,E),p)}for(;!fe();){if(u=ee(),u==="\0")continue;if(u==="\\"){const $=K();if($==="/"&&o.bash!==!0||$==="."||$===";")continue;if(!$){u+="\\",F({type:"text",value:u});continue}const B=/^\\+/.exec(xe());let te=0;if(B&&B[0].length>2&&(te=B[0].length,p.index+=te,te%2!==0&&(u+="\\")),o.unescape===!0?u=ee():u+=ee(),p.brackets===0){F({type:"text",value:u});continue}}if(p.brackets>0&&(u!=="]"||c.value==="["||c.value==="[^")){if(o.posix!==!1&&u===":"){const $=c.value.slice(1);if($.includes("[")&&(c.posix=!0,$.includes(":"))){const B=c.value.lastIndexOf("["),te=c.value.slice(0,B),oe=c.value.slice(B+2),X=i[oe];if(X){c.value=te+X,p.backtrack=!0,ee(),!C.output&&w.indexOf(c)===1&&(C.output=me);continue}}}(u==="["&&K()!==":"||u==="-"&&K()==="]")&&(u=`\\${u}`),u==="]"&&(c.value==="["||c.value==="[^")&&(u=`\\${u}`),o.posix===!0&&u==="!"&&c.value==="["&&(u="^"),c.value+=u,_e({value:u});continue}if(p.quotes===1&&u!=='"'){u=n.escapeRegex(u),c.value+=u,_e({value:u});continue}if(u==='"'){p.quotes=p.quotes===1?0:1,o.keepQuotes===!0&&F({type:"text",value:u});continue}if(u==="("){nt("parens"),F({type:"paren",value:u});continue}if(u===")"){if(p.parens===0&&o.strictBrackets===!0)throw new SyntaxError(y("opening","("));const $=le[le.length-1];if($&&p.parens===$.parens+1){Ir(le.pop());continue}F({type:"paren",value:u,output:p.parens?")":"\\)"}),Ee("parens");continue}if(u==="["){if(o.nobracket===!0||!xe().includes("]")){if(o.nobracket!==!0&&o.strictBrackets===!0)throw new SyntaxError(y("closing","]"));u=`\\${u}`}else nt("brackets");F({type:"bracket",value:u});continue}if(u==="]"){if(o.nobracket===!0||c&&c.type==="bracket"&&c.value.length===1){F({type:"text",value:u,output:`\\${u}`});continue}if(p.brackets===0){if(o.strictBrackets===!0)throw new SyntaxError(y("opening","["));F({type:"text",value:u,output:`\\${u}`});continue}Ee("brackets");const $=c.value.slice(1);if(c.posix!==!0&&$[0]==="^"&&!$.includes("/")&&(u=`/${u}`),c.value+=u,_e({value:u}),o.literalBrackets===!1||n.hasRegexChars($))continue;const B=n.escapeRegex(c.value);if(p.output=p.output.slice(0,-c.value.length),o.literalBrackets===!0){p.output+=B,c.value=B;continue}c.value=`(${N}${B}|${c.value})`,p.output+=c.value;continue}if(u==="{"&&o.nobrace!==!0){nt("braces");const $={type:"brace",value:u,output:"(",outputIndex:p.output.length,tokensIndex:p.tokens.length};ne.push($),F($);continue}if(u==="}"){const $=ne[ne.length-1];if(o.nobrace===!0||!$){F({type:"text",value:u,output:u});continue}let B=")";if($.dots===!0){const te=w.slice(),oe=[];for(let X=te.length-1;X>=0&&(w.pop(),te[X].type!=="brace");X--)te[X].type!=="dots"&&oe.unshift(te[X].value);B=g(oe,o),p.backtrack=!0}if($.comma!==!0&&$.dots!==!0){const te=p.output.slice(0,$.outputIndex),oe=p.tokens.slice($.tokensIndex);$.value=$.output="\\{",u=B="\\}",p.output=te;for(const X of oe)p.output+=X.output||X.value}F({type:"brace",value:u,output:B}),Ee("braces"),ne.pop();continue}if(u==="|"){le.length>0&&le[le.length-1].conditions++,F({type:"text",value:u});continue}if(u===","){let $=u;const B=ne[ne.length-1];B&&re[re.length-1]==="braces"&&(B.comma=!0,$="|"),F({type:"comma",value:u,output:$});continue}if(u==="/"){if(c.type==="dot"&&p.index===p.start+1){p.start=p.index+1,p.consumed="",p.output="",w.pop(),c=C;continue}F({type:"slash",value:u,output:ae});continue}if(u==="."){if(p.braces>0&&c.type==="dot"){c.value==="."&&(c.output=V);const $=ne[ne.length-1];c.type="dots",c.output+=u,c.value+=u,$.dots=!0;continue}if(p.braces+p.parens===0&&c.type!=="bos"&&c.type!=="slash"){F({type:"text",value:u,output:V});continue}F({type:"dot",value:u,output:V});continue}if(u==="?"){if(!(c&&c.value==="(")&&o.noextglob!==!0&&K()==="("&&K(2)!=="?"){ot("qmark",u);continue}if(c&&c.type==="paren"){const $=K();let B=u;(c.value==="("&&!/[!=<:]/.test($)||$==="<"&&!/<([!=]|\w+>)/.test(xe()))&&(B=`\\${u}`),F({type:"text",value:u,output:B});continue}if(o.dot!==!0&&(c.type==="slash"||c.type==="bos")){F({type:"qmark",value:u,output:ve});continue}F({type:"qmark",value:u,output:Q});continue}if(u==="!"){if(o.noextglob!==!0&&K()==="("&&(K(2)!=="?"||!/[!=<:]/.test(K(3)))){ot("negate",u);continue}if(o.nonegate!==!0&&p.index===0){Hr();continue}}if(u==="+"){if(o.noextglob!==!0&&K()==="("&&K(2)!=="?"){ot("plus",u);continue}if(c&&c.value==="("||o.regex===!1){F({type:"plus",value:u,output:ge});continue}if(c&&(c.type==="bracket"||c.type==="paren"||c.type==="brace")||p.parens>0){F({type:"plus",value:u});continue}F({type:"plus",value:ge});continue}if(u==="@"){if(o.noextglob!==!0&&K()==="("&&K(2)!=="?"){F({type:"at",extglob:!0,value:u,output:""});continue}F({type:"text",value:u});continue}if(u!=="*"){(u==="$"||u==="^")&&(u=`\\${u}`);const $=a.exec(xe());$&&(u+=$[0],p.index+=$[0].length),F({type:"text",value:u});continue}if(c&&(c.type==="globstar"||c.star===!0)){c.type="star",c.star=!0,c.value+=u,c.output=U,p.backtrack=!0,p.globstar=!0,pe(u);continue}let x=xe();if(o.noextglob!==!0&&/^\([^?]/.test(x)){ot("star",u);continue}if(c.type==="star"){if(o.noglobstar===!0){pe(u);continue}const $=c.prev,B=$.prev,te=$.type==="slash"||$.type==="bos",oe=B&&(B.type==="star"||B.type==="globstar");if(o.bash===!0&&(!te||x[0]&&x[0]!=="/")){F({type:"star",value:u,output:""});continue}const X=p.braces>0&&($.type==="comma"||$.type==="brace"),be=le.length&&($.type==="pipe"||$.type==="paren");if(!te&&$.type!=="paren"&&!X&&!be){F({type:"star",value:u,output:""});continue}for(;x.slice(0,3)==="/**";){const $e=d[p.index+4];if($e&&$e!=="/")break;x=x.slice(3),pe("/**",3)}if($.type==="bos"&&fe()){c.type="globstar",c.value+=u,c.output=se(o),p.output=c.output,p.globstar=!0,pe(u);continue}if($.type==="slash"&&$.prev.type!=="bos"&&!oe&&fe()){p.output=p.output.slice(0,-($.output+c.output).length),$.output=`(?:${$.output}`,c.type="globstar",c.output=se(o)+(o.strictSlashes?")":"|$)"),c.value+=u,p.globstar=!0,p.output+=$.output+c.output,pe(u);continue}if($.type==="slash"&&$.prev.type!=="bos"&&x[0]==="/"){const $e=x[1]!==void 0?"|$":"";p.output=p.output.slice(0,-($.output+c.output).length),$.output=`(?:${$.output}`,c.type="globstar",c.output=`${se(o)}${ae}|${ae}${$e})`,c.value+=u,p.output+=$.output+c.output,p.globstar=!0,pe(u+ee()),F({type:"slash",value:"/",output:""});continue}if($.type==="bos"&&x[0]==="/"){c.type="globstar",c.value+=u,c.output=`(?:^|${ae}|${se(o)}${ae})`,p.output=c.output,p.globstar=!0,pe(u+ee()),F({type:"slash",value:"/",output:""});continue}if(X&&x[0]==="/"){c.type="globstar",c.value+=u,c.output=`(?:^|${ae}|${se(o)}${ae})`,p.output+=c.output,p.globstar=!0,pe(u+ee()),F({type:"slash",value:"/",output:""});continue}p.output=p.output.slice(0,-c.output.length),c.type="globstar",c.output=se(o),c.value+=u,p.output+=c.output,p.globstar=!0,pe(u);continue}const Y={type:"star",value:u,output:U};if(o.bash===!0){Y.output=".*?",(c.type==="bos"||c.type==="slash")&&(Y.output=ue+Y.output),F(Y);continue}if(c&&(c.type==="bracket"||c.type==="paren")&&o.regex===!0){Y.output=u,F(Y);continue}(p.index===p.start||c.type==="slash"||c.type==="dot")&&(c.type==="dot"?(p.output+=Re,c.output+=Re):o.dot===!0?(p.output+=ye,c.output+=ye):(p.output+=ue,c.output+=ue),K()!=="*"&&(p.output+=me,c.output+=me)),F(Y)}for(;p.brackets>0;){if(o.strictBrackets===!0)throw new SyntaxError(y("closing","]"));p.output=n.escapeLast(p.output,"["),Ee("brackets")}for(;p.parens>0;){if(o.strictBrackets===!0)throw new SyntaxError(y("closing",")"));p.output=n.escapeLast(p.output,"("),Ee("parens")}for(;p.braces>0;){if(o.strictBrackets===!0)throw new SyntaxError(y("closing","}"));p.output=n.escapeLast(p.output,"{"),Ee("braces")}if(o.strictSlashes!==!0&&(c.type==="star"||c.type==="bracket")&&F({type:"maybe_slash",value:"",output:`${ae}?`}),p.backtrack===!0){p.output="";for(const x of p.tokens)p.output+=x.output!=null?x.output:x.value,x.suffix&&(p.output+=x.suffix)}return p},"parse");return W.fastpaths=(d,E)=>{const o={...E},S=typeof o.maxLength=="number"?Math.min(s,o.maxLength):s,T=d.length;if(T>S)throw new SyntaxError(`Input length: ${T}, exceeds maximum allowed length: ${S}`);d=l[d]||d;const{DOT_LITERAL:C,SLASH_LITERAL:w,ONE_CHAR:N,DOTS_SLASH:j,NO_DOT:J,NO_DOTS:V,NO_DOTS_SLASH:ge,STAR:ae,START_ANCHOR:me}=r.globChars(o.windows),Z=o.dot?V:J,ke=o.dot?ge:J,Re=o.capture?"":"?:",ye={negated:!1,prefix:""};let Q=o.bash===!0?".*?":ae;o.capture&&(Q=`(${Q})`);const ve=t(ue=>ue.noglobstar===!0?Q:`(${Re}(?:(?!${me}${ue.dot?j:C}).)*?)`,"globstar"),Ce=t(ue=>{switch(ue){case"*":return`${Z}${N}${Q}`;case".*":return`${C}${N}${Q}`;case"*.*":return`${Z}${Q}${C}${N}${Q}`;case"*/*":return`${Z}${Q}${w}${N}${ke}${Q}`;case"**":return Z+ve(o);case"**/*":return`(?:${Z}${ve(o)}${w})?${ke}${N}${Q}`;case"**/*.*":return`(?:${Z}${ve(o)}${w})?${ke}${Q}${C}${N}${Q}`;case"**/.*":return`(?:${Z}${ve(o)}${w})?${C}${N}${Q}`;default:{const I=/^(.*?)\.(\w+)$/.exec(ue);if(!I)return;const U=Ce(I[1]);return U?U+C+I[2]:void 0}}},"create"),ce=n.removePrefix(d,ye);let se=Ce(ce);return se&&o.strictSlashes!==!0&&(se+=`${w}?`),se},Dt=W,Dt}k(Kt,"It$1");we(Kt,"Bt");de(Kt,"requireParse");var Lt,ir;function Xt(){if(ir)return Lt;ir=1;var e=Object.defineProperty,t=de((l,g)=>e(l,"name",{value:g,configurable:!0}),"h");const r=Wt(),n=Kt(),s=Me(),i=Fe(),a=t(l=>l&&typeof l=="object"&&!Array.isArray(l),"isObject"),f=t((l,g,y=!1)=>{if(Array.isArray(l)){const H=l.map(W=>f(W,g,y));return t(W=>{for(const d of H){const E=d(W);if(E)return E}return!1},"arrayMatcher")}const h=a(l)&&l.tokens&&l.input;if(l===""||typeof l!="string"&&!h)throw new TypeError("Expected pattern to be a non-empty string");const v=g||{},m=v.windows,_=h?f.compileRe(l,g):f.makeRe(l,g,!1,!0),A=_.state;delete _.state;let b=t(()=>!1,"isIgnored");if(v.ignore){const H={...g,ignore:null,onMatch:null,onResult:null};b=f(v.ignore,H,y)}const q=t((H,W=!1)=>{const{isMatch:d,match:E,output:o}=f.test(H,_,g,{glob:l,posix:m}),S={glob:l,state:A,regex:_,posix:m,input:H,output:o,match:E,isMatch:d};if(typeof v.onResult=="function"&&v.onResult(S),d===!1)return S.isMatch=!1,W?S:!1;e:if(b(H)){if(typeof v.onIgnore=="function"&&v.onIgnore(S)===i.UNIGNORE){S.isMatch=!0;break e}return S.isMatch=!1,W?S:!1}return typeof v.onMatch=="function"&&v.onMatch(S),W?S:!0},"matcher");return y&&(q.state=A),q},"picomatch");return f.test=(l,g,y,{glob:h,posix:v}={})=>{if(typeof l!="string")throw new TypeError("Expected input to be a string");if(l==="")return{isMatch:!1,output:""};const m=y||{},_=m.format||(v?s.toPosixSlashes:null);let A=l===h,b=A&&_?_(l):l;return A===!1&&(b=_?_(l):l,A=b===h),(A===!1||m.capture===!0)&&(m.matchBase===!0||m.basename===!0?A=f.matchBase(l,g,y,v):A=g.exec(b)),{isMatch:!!A,match:A,output:b}},f.matchBase=(l,g,y)=>(g instanceof RegExp?g:f.makeRe(g,y)).test(s.basename(l)),f.isMatch=(l,g,y)=>f(g,y)(l),f.parse=(l,g)=>Array.isArray(l)?l.map(y=>f.parse(y,g)):n(l,{...g,fastpaths:!1}),f.scan=(l,g)=>r(l,g),f.compileRe=(l,g,y=!1,h=!1)=>{if(y===!0)return l.output;const v=g||{},m=v.contains?"":"^",_=v.contains?"":"$";let A=`${m}(?:${l.output})${_}`;l&&l.negated===!0&&(A=`^(?!${A}).*$`);const b=f.toRegex(A,g);return h===!0&&(b.state=l),b},f.makeRe=(l,g={},y=!1,h=!1)=>{if(!l||typeof l!="string")throw new TypeError("Expected a non-empty string");let v={negated:!1,fastpaths:!0};return g.fastpaths!==!1&&(l[0]==="."||l[0]==="*")&&(v.output=n.fastpaths(l,g)),v.output||(v=n(l,g)),f.compileRe(v,g,y,h)},f.toRegex=(l,g)=>{try{const y=g||{};return new RegExp(l,y.flags||(y.nocase?"i":""))}catch(y){if(g&&g.debug===!0)throw y;return/$^/}},f.constants=i,Lt=f,Lt}k(Xt,"wt");we(Xt,"Gt");de(Xt,"requirePicomatch$1");var Ht,sr;function zt(){if(sr)return Ht;sr=1;var e=Object.defineProperty,t=de((i,a)=>e(i,"name",{value:a,configurable:!0}),"c");const r=Xt(),n=Me();function s(i,a,f=!1){return a&&(a.windows===null||a.windows===void 0)&&(a={...a,windows:n.isWindows()}),r(i,a,f)}return k(s,"D"),we(s,"D"),de(s,"picomatch"),t(s,"picomatch"),Object.assign(s,r),Ht=s,Ht}k(zt,"Pt$1");we(zt,"Mt");de(zt,"requirePicomatch");var mn=zt();const Oe=at(mn);var yn=Object.defineProperty,L=k((e,t)=>yn(e,"name",{value:t,configurable:!0}),"u$1"),vn=Object.defineProperty,D=L((e,t)=>vn(e,"name",{value:t,configurable:!0}),"l");const bn=Qr(import.meta.url),Be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ze=D(e=>{if(typeof Be<"u"&&Be.versions&&Be.versions.node){const[t,r]=Be.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return Be.getBuiltinModule(e)}return bn(e)},"__cjs_getBuiltinModule"),ar=ze("fs"),$n={...ar,default:ar},{statSync:An,stat:kn,realpathSync:xn,realpath:_n,readdirSync:En,readdir:Sn}=ze("fs"),{sep:br,basename:wn,dirname:Ft,resolve:$r,normalize:Rn,relative:Cn,posix:Pe,isAbsolute:On}=ze("path"),{fileURLToPath:Pn}=ze("url"),{createRequire:Tn}=ze("module");var Nn=Object.defineProperty,O=D((e,t)=>Nn(e,"name",{value:t,configurable:!0}),"r"),cr=Tn(import.meta.url);function ct(e){let t=Rn(e);return t.length>1&&t[t.length-1]===br&&(t=t.substring(0,t.length-1)),t}k(ct,"H");L(ct,"tt");D(ct,"M$1");O(ct,"cleanPath");const Dn=/[\\/]/g;function Qe(e,t){return e.replace(Dn,t)}k(Qe,"M$1");L(Qe,"T");D(Qe,"D$1");O(Qe,"convertSlashes");const Ln=/^[a-z]:[\\/]$/i;function lt(e){return e==="/"||Ln.test(e)}k(lt,"J");L(lt,"et");D(lt,"T$1");O(lt,"isRootDirectory");function De(e,t){const{resolvePaths:r,normalizePath:n,pathSeparator:s}=t,i=process.platform==="win32"&&e.includes("/")||e.startsWith(".");if(r&&(e=$r(e)),(n||i)&&(e=ct(e)),e===".")return"";const a=e[e.length-1]!==s;return Qe(a?e+s:e,s)}k(De,"q$1");L(De,"q");D(De,"w");O(De,"normalizePath");function Je(e,t){return t+e}k(Je,"B$1");L(Je,"I");D(Je,"P");O(Je,"joinPathWithBasePath");function ut(e,t){return function(r,n){return n.startsWith(e)?n.slice(e.length)+r:Qe(Cn(e,n),t.pathSeparator)+t.pathSeparator+r}}k(ut,"K");L(ut,"st");D(ut,"X");O(ut,"joinPathWithRelativePath");function pt(e){return e}k(pt,"V");L(pt,"rt");D(pt,"H");O(pt,"joinPath");function ft(e,t,r){return t+e+r}k(ft,"X$1");L(ft,"nt");D(ft,"U$1");O(ft,"joinDirectoryPath");function ht(e,t){const{relativePaths:r,includeBasePath:n}=t;return r&&e?ut(e,t):n?Je:pt}k(ht,"Z");L(ht,"it");D(ht,"J");O(ht,"build$7");function dt(e){return function(t,r){r.push(t.substring(e.length)||".")}}k(dt,"tt");L(dt,"ot");D(dt,"K$1");O(dt,"pushDirectoryWithRelativePath");function gt(e){return function(t,r,n){const s=t.substring(e.length)||".";n.every(i=>i(s,!0))&&r.push(s)}}k(gt,"et");L(gt,"ut");D(gt,"V");O(gt,"pushDirectoryFilterWithRelativePath");const Hn=O((e,t)=>{t.push(e||".")},"pushDirectory"),In=O((e,t,r)=>{const n=e||".";r.every(s=>s(n,!0))&&t.push(n)},"pushDirectoryFilter"),jn=O(()=>{},"empty$2");function mt(e,t){const{includeDirs:r,filters:n,relativePaths:s}=t;return r?s?n&&n.length?gt(e):dt(e):n&&n.length?In:Hn:jn}k(mt,"st");L(mt,"lt");D(mt,"st$1");O(mt,"build$6");const Fn=O((e,t,r,n)=>{n.every(s=>s(e,!1))&&r.files++},"pushFileFilterAndCount"),Mn=O((e,t,r,n)=>{n.every(s=>s(e,!1))&&t.push(e)},"pushFileFilter"),Gn=O((e,t,r,n)=>{r.files++},"pushFileCount"),Bn=O((e,t)=>{t.push(e)},"pushFile"),Un=O(()=>{},"empty$1");function yt(e){const{excludeFiles:t,filters:r,onlyCounts:n}=e;return t?Un:r&&r.length?n?Fn:Mn:n?Gn:Bn}k(yt,"it");L(yt,"at");D(yt,"ut$1");O(yt,"build$5");const qn=O(e=>e,"getArray"),Wn=O(()=>[""].slice(0,0),"getArrayGroup");function vt(e){return e.group?Wn:qn}k(vt,"nt");L(vt,"ct");D(vt,"ct$1");O(vt,"build$4");const Kn=O((e,t,r)=>{e.push({directory:t,files:r,dir:t})},"groupFiles"),Xn=O(()=>{},"empty");function bt(e){return e.group?Kn:Xn}k(bt,"rt");L(bt,"ht");D(bt,"ft$1");O(bt,"build$3");const zn=O(function(e,t,r){const{queue:n,fs:s,options:{suppressErrors:i}}=t;n.enqueue(),s.realpath(e,(a,f)=>{if(a)return n.dequeue(i?null:a,t);s.stat(f,(l,g)=>{if(l)return n.dequeue(i?null:l,t);if(g.isDirectory()&&Ve(e,f,t))return n.dequeue(null,t);r(g,f),n.dequeue(null,t)})})},"resolveSymlinksAsync"),Qn=O(function(e,t,r){const{queue:n,fs:s,options:{suppressErrors:i}}=t;n.enqueue();try{const a=s.realpathSync(e),f=s.statSync(a);if(f.isDirectory()&&Ve(e,a,t))return;r(f,a)}catch(a){if(!i)throw a}},"resolveSymlinks");function $t(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:t?Qn:zn}k($t,"ot");L($t,"pt");D($t,"gt$1");O($t,"build$2");function Ve(e,t,r){if(r.options.useRealPaths)return At(t,r);let n=Ft(e),s=1;for(;n!==r.root&&s<2;){const i=r.symlinks.get(n);i&&(i===t||i.startsWith(t)||t.startsWith(i))?s++:n=Ft(n)}return r.symlinks.set(e,t),s>1}k(Ve,"_$2");L(Ve,"L");D(Ve,"E$1");O(Ve,"isRecursive");function At(e,t){return t.visited.includes(e+t.options.pathSeparator)}k(At,"lt");L(At,"ft");D(At,"dt$1");O(At,"isRecursiveUsingRealPaths");const Jn=O(e=>e.counts,"onlyCountsSync"),Vn=O(e=>e.groups,"groupsSync"),Yn=O(e=>e.paths,"defaultSync"),Zn=O(e=>e.paths.slice(0,e.options.maxFiles),"limitFilesSync"),eo=O((e,t,r)=>(Ne(t,r,e.counts,e.options.suppressErrors),null),"onlyCountsAsync"),to=O((e,t,r)=>(Ne(t,r,e.paths,e.options.suppressErrors),null),"defaultAsync"),ro=O((e,t,r)=>(Ne(t,r,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),"limitFilesAsync"),no=O((e,t,r)=>(Ne(t,r,e.groups,e.options.suppressErrors),null),"groupsAsync");function Ne(e,t,r,n){t(e&&!n?e:null,r)}k(Ne,"A$3");L(Ne,"j");D(Ne,"y");O(Ne,"report");function kt(e,t){const{onlyCounts:r,group:n,maxFiles:s}=e;return r?t?Jn:eo:n?t?Vn:no:s?t?Zn:ro:t?Yn:to}k(kt,"at");L(kt,"gt");D(kt,"Et");O(kt,"build$1");const Ar={withFileTypes:!0},oo=O((e,t,r,n,s)=>{if(e.queue.enqueue(),n<0)return e.queue.dequeue(null,e);const{fs:i}=e;e.visited.push(t),e.counts.directories++,i.readdir(t||".",Ar,(a,f=[])=>{s(f,r,n),e.queue.dequeue(e.options.suppressErrors?null:a,e)})},"walkAsync"),io=O((e,t,r,n,s)=>{const{fs:i}=e;if(n<0)return;e.visited.push(t),e.counts.directories++;let a=[];try{a=i.readdirSync(t||".",Ar)}catch(f){if(!e.options.suppressErrors)throw f}s(a,r,n)},"walkSync");function xt(e){return e?io:oo}k(xt,"ut");L(xt,"yt");D(xt,"xt$1");O(xt,"build");var so=class{static{k(this,"De")}static{L(this,"we")}static{D(this,"_t")}static{O(this,"Queue")}count=0;constructor(e){this.onQueueEmpty=e}enqueue(){return this.count++,this.count}dequeue(e,t){this.onQueueEmpty&&(--this.count<=0||e)&&(this.onQueueEmpty(e,t),e&&(t.controller.abort(),this.onQueueEmpty=void 0))}},ao=class{static{k(this,"Ae")}static{L(this,"$e")}static{D(this,"At")}static{O(this,"Counter")}_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}},co=class{static{k(this,"Ee")}static{L(this,"Se")}static{D(this,"Wt")}static{O(this,"Aborter")}aborted=!1;abort(){this.aborted=!0}},kr=class{static{k(this,"Dt")}static{L(this,"mt")}static{D(this,"q")}static{O(this,"Walker")}root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,r){this.isSynchronous=!r,this.callbackInvoker=kt(t,this.isSynchronous),this.root=De(e,t),this.state={root:lt(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new ao,options:t,queue:new so((n,s)=>this.callbackInvoker(s,n,r)),symlinks:new Map,visited:[""].slice(0,0),controller:new co,fs:t.fs||$n},this.joinPath=ht(this.root,t),this.pushDirectory=mt(this.root,t),this.pushFile=yt(t),this.getArray=vt(t),this.groupFiles=bt(t),this.resolveSymlink=$t(t,this.isSynchronous),this.walkDirectory=xt(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=O((e,t,r)=>{const{paths:n,options:{filters:s,resolveSymlinks:i,excludeSymlinks:a,exclude:f,maxFiles:l,signal:g,useRealPaths:y,pathSeparator:h},controller:v}=this.state;if(v.aborted||g&&g.aborted||l&&n.length>l)return;const m=this.getArray(this.state.paths);for(let _=0;_<e.length;++_){const A=e[_];if(A.isFile()||A.isSymbolicLink()&&!i&&!a){const b=this.joinPath(A.name,t);this.pushFile(b,m,this.state.counts,s)}else if(A.isDirectory()){let b=ft(A.name,t,this.state.options.pathSeparator);if(f&&f(A.name,b))continue;this.pushDirectory(b,n,s),this.walkDirectory(this.state,b,b,r-1,this.walk)}else if(this.resolveSymlink&&A.isSymbolicLink()){let b=Je(A.name,t);this.resolveSymlink(b,this.state,(q,H)=>{if(q.isDirectory()){if(H=De(H,this.state.options),f&&f(A.name,y?H:b+h))return;this.walkDirectory(this.state,H,y?H:b+h,r-1,this.walk)}else{H=y?H:b;const W=wn(H),d=De(Ft(H),this.state.options);H=this.joinPath(W,d),this.pushFile(H,m,this.state.counts,s)}})}}this.groupFiles(this.state.groups,t,m)},"walk")};function _t(e,t){return new Promise((r,n)=>{Ye(e,t,(s,i)=>{if(s)return n(s);r(i)})})}k(_t,"ct");L(_t,"bt");D(_t,"Ct");O(_t,"promise");function Ye(e,t,r){new kr(e,t,r).start()}k(Ye,"T$1");L(Ye,"G");D(Ye,"x");O(Ye,"callback");function Et(e,t){return new kr(e,t).start()}k(Et,"ht");L(Et,"vt");D(Et,"jt");O(Et,"sync");var lr=class{static{k(this,"kt")}static{L(this,"J")}static{D(this,"F")}static{O(this,"APIBuilder")}constructor(e,t){this.root=e,this.options=t}withPromise(){return _t(this.root,this.options)}withCallback(e){Ye(this.root,this.options,e)}sync(){return Et(this.root,this.options)}};let xr=null;try{cr.resolve("picomatch"),xr=cr("picomatch")}catch{}var lo=class{static{k(this,"We")}static{L(this,"ke")}static{D(this,"$t")}static{O(this,"Builder")}globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:br,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new lr(e||".",this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new lr(e||".",this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){const r=this.globFunction||xr;if(!r)throw new Error("Please specify a glob function to use glob matching.");var n=this.globCache[e.join("\0")];return n||(n=r(e,...t),this.globCache[e.join("\0")]=n),this.options.filters.push(s=>n(s)),this}},uo=Object.defineProperty,ie=D((e,t)=>uo(e,"name",{value:t,configurable:!0}),"a");const po=Array.isArray,_r=/\\/g,Er=process.platform==="win32",fo=/^(\/?\.\.)+$/;function We(e,t={}){const r=e.length,n=Array(r),s=Array(r);let i,a;for(i=0;i<r;i++){const f=Ze(e[i]);n[i]=f;const l=f.length,g=Array(l);for(a=0;a<l;a++)g[a]=Oe(f[a],t);s[i]=g}return f=>{const l=f.split("/");if(l[0]===".."&&fo.test(f))return!0;for(i=0;i<r;i++){const g=n[i],y=s[i],h=l.length,v=Math.min(h,g.length);for(a=0;a<v;){const m=g[a];if(m.includes("/"))return!0;if(!y[a](l[a]))break;if(!t.noglobstar&&m==="**")return!0;a++}if(a===h)return!0}return!1}}k(We,"R$1");L(We,"B");D(We,"D");ie(We,"getPartialMatcher");const ho=/^[A-Z]:\/$/i,go=Er?e=>ho.test(e):e=>e==="/";function Ke(e,t,r){if(e===t||t.startsWith(`${e}/`)){if(r){const s=e.length+ +!go(e);return(i,a)=>i.slice(s,a?-1:void 0)||"."}const n=t.slice(e.length+1);return n?(s,i)=>{if(s===".")return n;const a=`${n}/${s}`;return i?a.slice(0,-1):a}:(s,i)=>i&&s!=="."?s.slice(0,-1):s}return r?n=>Pe.relative(e,n)||".":n=>Pe.relative(e,`${t}/${n}`)||"."}k(Ke,"O$2");L(Ke,"M");D(Ke,"M");ie(Ke,"buildFormat");function St(e,t){if(t.startsWith(`${e}/`)){const r=t.slice(e.length+1);return n=>`${r}/${n}`}return r=>{const n=Pe.relative(e,`${t}/${r}`);return r[r.length-1]==="/"&&n!==""?`${n}/`:n||"."}}k(St,"pt");L(St,"St");D(St,"at");ie(St,"buildRelative");const mo={parts:!0};function Ze(e){var t;const r=Oe.scan(e,mo);return!((t=r.parts)===null||t===void 0)&&t.length?r.parts:[e]}k(Ze,"I$3");L(Ze,"z");D(Ze,"N");ie(Ze,"splitPattern");const yo=/\\(?![()[\]{}!+@])/g;function Qt(e){return Sr(e)}k(Qt,"qt");L(Qt,"Ee");D(Qt,"ut");ie(Qt,"convertPosixPathToPattern");function Jt(e){return wr(e).replace(yo,"/")}k(Jt,"jt");L(Jt,"Re");D(Jt,"ft");ie(Jt,"convertWin32PathToPattern");const vo=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,bo=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,Sr=ie(e=>e.replace(vo,"\\$&"),"escapePosixPath"),wr=ie(e=>e.replace(bo,"\\$&"),"escapeWin32Path"),$o=Er?wr:Sr;function wt(e,t){if(t?.caseSensitiveMatch===!1)return!0;const r=Oe.scan(e);return r.isGlob||r.negated}k(wt,"ft");L(wt,"Dt");D(wt,"k");ie(wt,"isDynamicPattern");function Se(...e){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...e)}k(Se,"D$1");L(Se,"D");D(Se,"E");ie(Se,"log");function et(e){return typeof e=="string"?[e]:e??[]}k(et,"L$1");L(et,"U");D(et,"W");ie(et,"ensureStringArray");const Ao=/^(\/?\.\.)+/,ko=/\\(?=[()[\]{}!*+?@|])/g;function Le(e,t,r,n){var s;const i=t.cwd;let a=e;e[e.length-1]==="/"&&(a=e.slice(0,-1));const f=a.lastIndexOf("/"),l=(f===-1?a:a.slice(f+1)).startsWith("!(");a[a.length-1]!=="*"&&!l&&t.expandDirectories&&(a+="/**");const g=$o(i);a=On(a.replace(ko,""))?Pe.relative(g,a):Pe.normalize(a);const y=(s=Ao.exec(a))===null||s===void 0?void 0:s[0],h=Ze(a);if(y){const m=(y.length+1)/3;let _=0;const A=g.split("/");for(;_<m&&h[_+m]===A[A.length+_-m];)a=a.slice(0,(m-_-1)*3)+a.slice((m-_)*3+h[_+m].length+1)||".",_++;const b=Pe.join(i,y.slice(_*3));b[0]!=="."&&r.root.length>b.length&&(r.root=b,r.depthOffset=-m+_)}if(!n&&r.depthOffset>=0){var v;(v=r.commonPath)!==null&&v!==void 0||(r.commonPath=h);const m=[],_=Math.min(r.commonPath.length,h.length);for(let A=0;A<_;A++){const b=h[A];if(b==="**"&&!h[A+1]){m.pop();break}if(A===h.length-1||b!==r.commonPath[A]||wt(b))break;m.push(b)}r.depthOffset=m.length,r.commonPath=m,r.root=m.length>0?Pe.join(i,...m):i}return a}k(Le,"j$1");L(Le,"E");D(Le,"$");ie(Le,"normalizePattern");function Rt(e,t,r){const n=[],s=[],i=[];for(const a of e.ignore)a&&(a[0]!=="!"||a[1]==="("?s.push(Le(a,e,r,!0)):i.push(a.slice(1)));for(const a of t)a&&(a[0]!=="!"||a[1]==="("?n.push(Le(a,e,r,!1)):(a[1]!=="!"||a[2]==="(")&&s.push(Le(a.slice(1),e,r,!0)));return{match:n,ignore:s,unignore:i}}k(Rt,"gt");L(Rt,"xt");D(Rt,"St");ie(Rt,"processPatterns");function Ct(e,t){const r=e.cwd,n={root:r,depthOffset:0},s=Rt(e,t,n);e.debug&&Se("internal processing patterns:",s);const{absolute:i,caseSensitiveMatch:a,debug:f,dot:l,followSymbolicLinks:g,onlyDirectories:y}=e,h=n.root.replace(_r,""),v={dot:l,nobrace:e.braceExpansion===!1,nocase:!a,noextglob:e.extglob===!1,noglobstar:e.globstar===!1,posix:!0},m=s.unignore.length>0,_=m?Oe(s.unignore,v):void 0,A=m?We(s.unignore,v):void 0,b=Oe(s.match,{...v,ignore:s.ignore,onIgnore:_?C=>_(C.output)&&Oe.constants.UNIGNORE:void 0}),q=Oe(s.ignore,v),H=We(s.match,v),W=Ke(r,h,i),d=i?W:Ke(r,h,!0),E=s.match.length>0&&s.match.every(C=>C==="**"||C==="**/*"),o=s.ignore.length>0||m||!E?(C,w)=>{const N=d(w,!0);return N==="."||A&&A(N)?!1:!H(N)||q(N)}:void 0;let S;e.deep!==void 0&&(S=Math.round(e.deep-n.depthOffset));const T=new lo({filters:[f?(C,w)=>{const N=W(C,w),j=b(N);return j&&Se(`matched ${N}`),j}:(C,w)=>{const N=W(C,w);return b(N)}],exclude:f&&o?(C,w)=>{const N=o(C,w);return Se(`${N?"skipped":"crawling"} ${w}`),N}:o,fs:e.fs,pathSeparator:"/",relativePaths:!i,resolvePaths:i,includeBasePath:i,resolveSymlinks:g,excludeSymlinks:!g,excludeFiles:y,includeDirs:y||!e.onlyFiles,maxDepth:S,signal:e.signal}).crawl(h);return e.debug&&Se("internal properties:",{...n,root:h}),[T,r!==h&&!i&&St(r,h)]}k(Ct,"dt");L(Ct,"At");D(Ct,"vt");ie(Ct,"buildCrawler");function tt(e,t){if(t)for(let r=e.length-1;r>=0;r--)e[r]=t(e[r]);return e}k(tt,"z$1");L(tt,"N");D(tt,"U");ie(tt,"formatPaths");const xo={caseSensitiveMatch:!0,cwd:process.cwd(),debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function Ot(e){const t={...xo,...e};return t.cwd=(t.cwd instanceof URL?Pn(t.cwd):$r(t.cwd)).replace(_r,"/"),t.ignore=et(t.ignore),t.fs&&(t.fs={readdir:t.fs.readdir||Sn,readdirSync:t.fs.readdirSync||En,realpath:t.fs.realpath||_n,realpathSync:t.fs.realpathSync||xn,stat:t.fs.stat||kn,statSync:t.fs.statSync||An}),t.debug&&Se("globbing with options:",t),t}k(Ot,"yt");L(Ot,"_t");D(Ot,"pt");ie(Ot,"getOptions");function rt(e,t={}){var r;if(e&&t?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");const n=po(e)||typeof e=="string",s=et((r=n?e:e.patterns)!==null&&r!==void 0?r:"**/*"),i=Ot(n?t:e);return s.length>0?Ct(i,s):[]}k(rt,"G$1");L(rt,"Q");D(rt,"G");ie(rt,"getCrawler");async function Pt(e,t){const[r,n]=rt(e,t);return r?tt(await r.withPromise(),n):[]}k(Pt,"mt");L(Pt,"Ie");D(Pt,"bt");ie(Pt,"glob");function Vt(e,t){const[r,n]=rt(e,t);return r?tt(r.sync(),n):[]}k(Vt,"vt");L(Vt,"Le");D(Vt,"xt");ie(Vt,"globSync");var _o=Object.defineProperty,Eo=k((e,t)=>_o(e,"name",{value:t,configurable:!0}),"r$1"),So=Object.defineProperty,wo=Eo((e,t)=>So(e,"name",{value:t,configurable:!0}),"r"),Ro=Object.defineProperty,Co=wo((e,t)=>Ro(e,"name",{value:t,configurable:!0}),"r");const Oo=Co(async(e,t)=>await Pt(e,t),"glob");var Po=Object.defineProperty,Ae=k((e,t)=>Po(e,"name",{value:t,configurable:!0}),"d$1");const To=["dependencies","devDependencies","peerDependencies","peerDependenciesMeta","optionalDependencies","bundleDependencies"],No=["overrides","pnpm","resolutions"],Do=["engines","files"],Lo=Ae(e=>{const t=yr.coerce(e)?.major;return t!==void 0&&t>=10},"isPnpmV10Plus"),Ho=Ae(e=>{const t=Te(e,"pnpm-workspace.yaml");if(!Gt(t))return{overrides:{},source:"pnpm-workspace.yaml"};try{return{overrides:Br(t)?.overrides??{},source:"pnpm-workspace.yaml"}}catch{return{overrides:{},source:"pnpm-workspace.yaml"}}},"readPnpmWorkspaceOverrides"),Io=Ae((e,t)=>{let r={};return t==="deno"?{overrides:{},source:"package.json"}:(t==="pnpm"?r=e.pnpm?.overrides??{}:t==="yarn"||t==="bun"?r=e.resolutions??{}:r=e.overrides??{},{overrides:r,source:"package.json"})},"readPkgJsonOverrides"),jo=Ae((e,t,r)=>r.name==="pnpm"&&Lo(r.version)?Ho(e):Io(t,r.name),"readOverrides"),ur=Ae((e,t)=>{const r=t;for(const s of No){const i=e.indexOf(s);if(i!==-1&&s!==r)return r==="overrides"?i:i+1}let n=-1;for(const s of To){const i=e.indexOf(s);i>n&&(n=i)}if(n!==-1)return n+1;for(const s of Do){const i=e.indexOf(s);if(i!==-1)return i}return e.length},"findInsertIndex"),Fo=Ae((e,t)=>{const r=Te(e,"pnpm-workspace.yaml");if(!Gt(r))throw new Error(`pnpm-workspace.yaml not found at ${r}. Cannot write overrides for pnpm v10+.`);let n=Xe(r);const s=`overrides:
4
- ${Object.entries(t).map(([i,a])=>` '${i}': '${a}'`).join(`
5
- `)}
6
- `;n=/^overrides:\s*$/m.test(n)||/^overrides:\s*\n/m.test(n)?n.replace(/^overrides:\s*\n(?:(?:[ \t].*)?\n)*/m,s):`${n.trimEnd()}
7
-
8
- ${s}`,Ue(r,n)},"writePnpmWorkspaceOverrides"),Mo=Ae((e,t,r,n,s)=>{const i=Xe(e),a=Ur(e,i,{useEditorconfig:s});if(n==="pnpm"){const f=t.pnpm??{};if(f.overrides=r,t.pnpm)t.pnpm=f,Ue(e,`${JSON.stringify(t,null,a)}
9
- `);else{const l=Object.keys(t),g=ur(l,"pnpm"),y=Object.entries(t);y.splice(g,0,["pnpm",f]),Ue(e,`${JSON.stringify(Object.fromEntries(y),null,a)}
10
- `)}}else{const f=n==="yarn"||n==="bun"?"resolutions":"overrides";if(t[f])t[f]=r,Ue(e,`${JSON.stringify(t,null,a)}
11
- `);else{const l=Object.keys(t),g=ur(l,f),y=Object.entries(t);y.splice(g,0,[f,r]),Ue(e,`${JSON.stringify(Object.fromEntries(y),null,a)}
12
- `)}}},"writePkgJsonOverrides"),Go=Ae((e,t,r,n,s)=>{if(n.name==="deno")return{added:[],updated:[]};const i=Xe(t),a=JSON.parse(i),{overrides:f,source:l}=jo(e,a,n),g=[],y=[],h=new Set;if(n.name==="npm")for(const m of["dependencies","devDependencies"]){const _=a[m];if(_)for(const A of Object.keys(_))h.add(A)}for(const m of r){const _=f[m.original];if(typeof _=="object")continue;let A=m.spec;n.name==="npm"&&h.has(m.original)&&(A=`$${m.original}`),_!==A&&(_?y.push(m.original):g.push(m.original),f[m.original]=A)}if(g.length===0&&y.length===0)return{added:g,updated:y};const v=Object.fromEntries(Object.entries(f).sort(([m],[_])=>m.localeCompare(_)));return l==="pnpm-workspace.yaml"?Fo(e,v):Mo(t,a,v,n.name,s),{added:g,updated:y}},"applyOverrides"),Bo=Ae((e,t)=>{const r={bun:["bun.lock"],deno:["deno.lock"],npm:["npm-shrinkwrap.json","package-lock.json"],pnpm:["pnpm-lock.yaml"],yarn:["yarn.lock"]};for(const n of r[t]??[]){const s=Te(e,n);try{return Xe(s)}catch{continue}}return""},"readLockfileText"),Uo=Ae((e,t,r)=>{if(!e)return!1;const n=t.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`);switch(r){case"bun":return e.includes(`"${t}":`)||new RegExp(String.raw`(^|\s|[",])${n}@`,"m").test(e);case"deno":return e.includes(`"${t}"`)||e.includes(`"npm:${t}@`)||e.includes(`"jsr:${t}@`);case"npm":return e.includes(`"${t}":`)||e.includes(`"node_modules/${t}":`);case"pnpm":return new RegExp(String.raw`(^|\s|['"/])${n}(@|['"]?:)`,"m").test(e);case"yarn":return new RegExp(String.raw`(^|\s|[",])${n}@`,"m").test(e);default:return!1}},"lockfileContainsPackage");var It={exports:{}},jt,pr;function fr(){if(pr)return jt;pr=1;var e=Object.defineProperty,t=k((h,v)=>e(h,"name",{value:v,configurable:!0}),"t"),r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=t((h,v)=>{for(var m in v)r(h,m,{get:v[m],enumerable:!0})},"__export"),f=t((h,v,m,_)=>{if(v&&typeof v=="object"||typeof v=="function")for(let A of s(v))!i.call(h,A)&&A!==m&&r(h,A,{get:t(()=>v[A],"get"),enumerable:!(_=n(v,A))||_.enumerable});return h},"__copyProps"),l=t(h=>f(r({},"__esModule",{value:!0}),h),"__toCommonJS"),g={};a(g,{PURL_Type:t(()=>y,"PURL_Type")}),jt=l(g);var y=(h=>(h.APK="apk",h.BITBUCKET="bitbucket",h.COCOAPODS="cocoapods",h.CARGO="cargo",h.CHROME="chrome",h.COMPOSER="composer",h.CONAN="conan",h.CONDA="conda",h.CRAN="cran",h.DEB="deb",h.DOCKER="docker",h.GEM="gem",h.GENERIC="generic",h.GITHUB="github",h.GOLANG="golang",h.HACKAGE="hackage",h.HEX="hex",h.HUGGINGFACE="huggingface",h.MAVEN="maven",h.MLFLOW="mlflow",h.NPM="npm",h.NUGET="nuget",h.OCI="oci",h.PUB="pub",h.PYPI="pypi",h.QPKG="qpkg",h.RPM="rpm",h.SWID="swid",h.SWIFT="swift",h.VCS="vcs",h))(y||{});return jt}k(fr,"requireTypes");var hr;function qo(){return hr||(hr=1,(function(e){var t=Object.defineProperty,r=k((v,m)=>t(v,"name",{value:m,configurable:!0}),"a"),n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,f=r((v,m)=>{for(var _ in m)n(v,_,{get:m[_],enumerable:!0})},"__export"),l=r((v,m,_,A)=>{if(m&&typeof m=="object"||typeof m=="function")for(let b of i(m))!a.call(v,b)&&b!==_&&n(v,b,{get:r(()=>m[b],"get"),enumerable:!(A=s(m,b))||A.enumerable});return v},"__copyProps"),g=r((v,m,_)=>(l(v,m,"default"),_&&l(_,m,"default")),"__reExport"),y={};f(y,{getManifestData:r(()=>h,"getManifestData")}),g(y,fr(),e.exports);function h(v,m){try{const _=require("../manifest.json");if(!v)return _;const A=_[v];if(!A)return;if(!m)return A;const b=A.find(([q,H])=>H.package===m);return b?b[1]:void 0}catch{return}}k(h,"getManifestData"),r(h,"getManifestData"),e.exports={getManifestData:h,...fr()}})(It)),It.exports}k(qo,"requireDist");var Wo=qo(),Ko=Object.defineProperty,qe=k((e,t)=>Ko(e,"name",{value:t,configurable:!0}),"s");const Xo=qe((e,t,r)=>{let n=e;if(t!=="all"&&(n=n.filter(s=>s.category===t)),r){const s=r.toLowerCase();n=n.filter(i=>i.packageName.toLowerCase().includes(s))}return n},"filterEntries");class zo{static{k(this,"h")}static{qe(this,"OptimizeStore")}#e;#r=new Set;constructor(t){this.#e={applyProgress:null,checkedEntries:new Set,entries:t,error:null,filterActive:!1,filterText:"",filterType:"all",focusedPanel:"list",phase:"browsing",selectedIndex:0}}getSnapshot=qe(()=>this.#e,"getSnapshot");subscribe=qe(t=>(this.#r.add(t),()=>{this.#r.delete(t)}),"subscribe");getFilteredEntries=qe(()=>Xo(this.#e.entries,this.#e.filterType,this.#e.filterText),"getFilteredEntries");#t(){this.#e={...this.#e};for(const t of this.#r)t()}select(t){const r=this.getFilteredEntries();this.#e.selectedIndex=r.length===0?-1:Math.max(0,Math.min(t,r.length-1)),this.#t()}toggleCheck(t){const r=new Set(this.#e.checkedEntries);r.has(t)?r.delete(t):r.add(t),this.#e.checkedEntries=r,this.#t()}toggleAll(){const t=this.getFilteredEntries(),r=new Set(this.#e.checkedEntries);if(t.every(n=>r.has(n.packageName)))for(const n of t)r.delete(n.packageName);else for(const n of t)r.add(n.packageName);this.#e.checkedEntries=r,this.#t()}setFilter(t){this.#e.filterType=t,this.#e.selectedIndex=0,this.#t()}setFilterText(t){this.#e.filterText=t,this.#e.selectedIndex=0,this.#t()}setFilterActive(t){this.#e.filterActive=t,this.#t()}setFocusedPanel(t){this.#e.focusedPanel=t,this.#t()}setPhase(t){this.#e.phase=t,this.#t()}setProgress(t,r){this.#e.applyProgress={current:t,total:r},this.#t()}setError(t){this.#e.error=t,this.#e.phase="error",this.#t()}getCheckedEntries(){return this.#e.entries.filter(t=>this.#e.checkedEntries.has(t.packageName))}}const Rr={"micro-utility":"gray",native:"green",preferred:"yellow",socket:"cyan"},Qo={"micro-utility":"MICRO",native:"NATIVE",preferred:"PREF",socket:"SOCKET"},Jo={"micro-utility":"Trivial utility package that can be replaced with inline code.",native:"Polyfill for a native JS/Node.js API. Use the built-in instead.",preferred:"A lighter or faster alternative package exists.",socket:"Security-hardened replacement from Socket.dev's @socketregistry."};var Vo=Object.defineProperty,Yo=k((e,t)=>Vo(e,"name",{value:t,configurable:!0}),"d");const Zo=Yo(({entry:e,focused:t,scrollRef:r})=>{const n=t?"white":"gray";if(!e)return R(G,{alignItems:"center",borderColor:"gray",borderStyle:"single",flexDirection:"column",flexGrow:1,justifyContent:"center",children:R(P,{dimColor:!0,children:"No entry selected"})});const s=Rr[e.category]??"gray";return M(G,{borderColor:n,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[R(G,{flexShrink:0,paddingTop:1,paddingX:2,children:R(P,{bold:!0,color:"white",children:e.packageName})}),M(ln,{flexGrow:1,flexShrink:1,paddingX:2,ref:r,scrollbar:!0,scrollbarColor:"gray",children:[R(P,{}),M(G,{children:[R(G,{width:14,children:R(P,{dimColor:!0,children:"Category:"})}),R(P,{bold:!0,color:s,children:e.category})]}),M(G,{children:[R(G,{width:14,children:R(P,{dimColor:!0,children:"Replace with:"})}),R(P,{children:e.replacement})]}),e.overrideSpec&&M(G,{children:[R(G,{width:14,children:R(P,{dimColor:!0,children:"Override:"})}),R(P,{color:"cyan",children:e.overrideSpec})]}),M(G,{children:[R(G,{width:14,children:R(P,{dimColor:!0,children:"Codemod:"})}),R(P,{color:e.hasCodemod?"green":"gray",children:e.hasCodemod?"available ⚙":"not available"})]}),M(G,{flexDirection:"column",marginTop:1,children:[R(P,{dimColor:!0,children:"── "}),R(P,{bold:!0,color:"white",children:"DESCRIPTION"}),R(G,{marginTop:1,paddingLeft:2,children:R(P,{children:Jo[e.category]??""})})]}),e.category==="native"&&M(G,{flexDirection:"column",marginTop:1,children:[R(P,{dimColor:!0,children:"── "}),R(P,{bold:!0,color:"green",children:"ACTION"}),R(G,{flexDirection:"column",marginTop:1,paddingLeft:2,children:e.hasCodemod?M(it,{children:[M(P,{color:"green",children:["✓"," ","Codemod will rewrite imports to use native API."]}),R(P,{dimColor:!0,children:" The package can then be removed from dependencies."})]}):M(it,{children:[M(P,{color:"yellow",children:["ℹ"," ","No automated codemod available."]}),R(P,{dimColor:!0,children:" Manual migration required — replace usage with native equivalent."})]})})]}),e.category==="socket"&&M(G,{flexDirection:"column",marginTop:1,children:[R(P,{dimColor:!0,children:"── "}),R(P,{bold:!0,color:"cyan",children:"ACTION"}),M(G,{flexDirection:"column",marginTop:1,paddingLeft:2,children:[M(P,{color:"cyan",children:["✓"," ","Override will redirect resolution to the hardened package."]}),R(P,{dimColor:!0,children:" No source code changes needed — drop-in replacement."})]})]}),(e.category==="preferred"||e.category==="micro-utility")&&M(G,{flexDirection:"column",marginTop:1,children:[R(P,{dimColor:!0,children:"── "}),R(P,{bold:!0,color:"yellow",children:"ACTION"}),R(G,{flexDirection:"column",marginTop:1,paddingLeft:2,children:e.hasCodemod?M(it,{children:[M(P,{color:"green",children:["✓"," ","Codemod will rewrite imports to the recommended alternative."]}),R(P,{dimColor:!0,children:" The original package can then be removed from dependencies."})]}):M(it,{children:[M(P,{color:"yellow",children:["ℹ"," ","Manual migration required."]}),e.docUrl?R(P,{dimColor:!0,children:" Open the migration guide below for the recommended alternative and steps."}):R(P,{dimColor:!0,children:" Consult the package's docs or the e18e module-replacements guide for an alternative."})]})})]}),M(G,{flexDirection:"column",marginTop:1,children:[R(P,{dimColor:!0,children:"── "}),R(P,{bold:!0,color:"white",children:"LINKS"}),M(G,{flexDirection:"column",marginTop:1,paddingLeft:2,children:[M(P,{color:"cyan",underline:!0,children:["https://npmx.dev/",e.packageName]}),e.docUrl&&R(P,{color:"cyan",underline:!0,children:e.docUrl})]})]})]})]})},"OptimizeDetailPanel");var ei=Object.defineProperty,Cr=k((e,t)=>ei(e,"name",{value:t,configurable:!0}),"b$1");const ti=[{key:"all",label:"All",shortcut:"1"},{key:"native",label:"Native",shortcut:"2"},{key:"preferred",label:"Preferred",shortcut:"3"},{key:"micro-utility",label:"Micro",shortcut:"4"},{key:"socket",label:"Socket",shortcut:"5"}],ri=Cr(({checked:e,entry:t,isSelected:r})=>{const n=Rr[t.category]??"white",s=Qo[t.category]??t.category,i=e?"☑":"☐",a=t.hasCodemod?"⚙":" ";return M(G,{flexShrink:0,height:1,children:[R(P,{children:r?">":" "}),M(P,{color:e?"white":"gray",children:[" ",i," "]}),R(P,{bold:!0,color:n,children:`[${s}]`.padEnd(9)}),M(P,{children:[" ",a," "]}),R(G,{flexGrow:1,children:R(P,{bold:r,inverse:r,wrap:"truncate",children:t.packageName})}),R(P,{dimColor:!0,children:" → "}),R(P,{wrap:"truncate",children:t.replacement})]})},"EntryRow"),ni=Cr(({checkedEntries:e,entries:t,filterActive:r,filterText:n,filterType:s,focused:i,isDryRun:a,scrollOffset:f,selectedIndex:l,totalEntries:g,viewportHeight:y})=>{const h=i?"white":"gray";let v=0,m=0,_=0,A=0;for(const o of t)switch(o.category){case"micro-utility":{_++;break}case"native":{v++;break}case"preferred":{m++;break}case"socket":{A++;break}}const b=[];v>0&&b.push(`${v} native`),m>0&&b.push(`${m} preferred`),_>0&&b.push(`${_} micro`),A>0&&b.push(`${A} socket`);const q=b.length>0?` (${b.join(", ")})`:"",H=e.size,W=[];for(const[o,S]of t.entries())W.push(R(ri,{checked:e.has(S.packageName),entry:S,isSelected:o===l},S.packageName));const d=t.length,E=d>y&&y>0;return M(G,{borderColor:h,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[M(G,{flexShrink:0,gap:1,paddingX:1,children:[R(P,{bold:!0,inverse:!0,children:" VIS OPTIMIZE "}),M(P,{wrap:"truncate",children:[g," ","optimizations",q]}),!a&&H>0&&M(P,{dimColor:!0,children:[" ","—",H," ","selected"]})]}),R(G,{flexShrink:0,gap:1,paddingX:1,paddingY:1,children:ti.map(o=>{const S=s===o.key;return M(G,{children:[R(P,{dimColor:!S,children:"["}),R(P,{bold:S,color:S?"cyan":"gray",children:o.shortcut}),R(P,{dimColor:!S,children:"]"}),M(P,{color:S?"white":"gray",children:[" ",o.label]})]},o.key)})}),r&&M(G,{flexShrink:0,paddingX:1,children:[R(P,{bold:!0,color:"white",children:"/ "}),R(P,{children:n}),R(P,{inverse:!0,children:" "})]}),M(G,{flexDirection:"row",flexGrow:1,overflow:"hidden",children:[R(G,{flexDirection:"column",flexGrow:1,overflow:"hidden",paddingLeft:1,children:R(G,{flexDirection:"column",marginTop:-f,children:W})}),E&&R(G,{flexShrink:0,marginLeft:1,marginRight:1,children:R(un,{contentHeight:d,placement:"inset",scrollOffset:f,style:"block",viewportHeight:y})})]})]})},"OptimizeListPanel");var oi=Object.defineProperty,ii=k((e,t)=>oi(e,"name",{value:t,configurable:!0}),"I$1");const si=100,dr=10,gr={1:"all",2:"native",3:"preferred",4:"micro-utility",5:"socket"},ai=ii(({isDryRun:e,store:t})=>{const{exit:r}=sn(),{columns:n,rows:s}=cn(),i=rn(t.subscribe,t.getSnapshot),a=nn(null),[f,l]=Zt(0),[g,y]=Zt(!1),h=t.getFilteredEntries(),v=h[i.selectedIndex]??null,m=n>=si,_=Math.max(0,s-5),A=on(b=>{r(b)},[r]);return an((b,q)=>{if(g){b==="y"||b==="Y"?A():y(!1);return}if(i.filterActive){q.escape?(t.setFilterActive(!1),t.setFilterText("")):q.return?t.setFilterActive(!1):q.backspace||q.delete?t.setFilterText(i.filterText.slice(0,-1)):b&&!q.ctrl&&!q.meta&&t.setFilterText(i.filterText+b);return}if(b==="q"){!e&&i.checkedEntries.size>0?y(!0):A();return}if(b==="/"){t.setFilterActive(!0);return}if(gr[b]){t.setFilter(gr[b]);return}if(q.tab){t.setFocusedPanel(i.focusedPanel==="list"?"detail":"list");return}if(i.focusedPanel==="list")if(q.upArrow||b==="k"){const H=Math.max(0,i.selectedIndex-1);t.select(H),H<f&&l(H)}else if(q.downArrow||b==="j"){const H=Math.min(h.length-1,i.selectedIndex+1);t.select(H),H>=f+_&&l(H-_+1)}else b===" "?v&&t.toggleCheck(v.packageName):b==="a"?t.toggleAll():q.return&&!e&&i.checkedEntries.size>0&&A(t.getCheckedEntries());else i.focusedPanel==="detail"&&(q.upArrow||b==="k"?a.current?.scrollBy(-1):(q.downArrow||b==="j")&&a.current?.scrollBy(1))},{isActive:i.phase==="browsing"}),s<dr?R(G,{alignItems:"center",justifyContent:"center",children:M(P,{color:"yellow",children:["Terminal too small. Resize to at least",dr," ","rows."]})}):M(G,{flexDirection:"column",height:s,width:n,children:[M(G,{flexDirection:m?"row":"column",flexGrow:1,children:[R(G,{flexBasis:m?"50%":void 0,flexGrow:1,children:R(ni,{checkedEntries:i.checkedEntries,entries:h,filterActive:i.filterActive,filterText:i.filterText,filterType:i.filterType,focused:i.focusedPanel==="list",isDryRun:e,scrollOffset:f,selectedIndex:i.selectedIndex,totalEntries:i.entries.length,viewportHeight:_})}),R(G,{flexBasis:m?"50%":void 0,flexGrow:1,children:R(Zo,{entry:v,focused:i.focusedPanel==="detail",scrollRef:a})})]}),R(G,{flexShrink:0,paddingX:1,children:M(P,{dimColor:!0,children:[e?"Preview mode":"space:toggle a:all enter:apply"," ","| tab:switch panel /: filter q:quit |","⚙","=codemod available"]})}),R(qr,{autoExitSeconds:3,onCancel:k(()=>{y(!1)},"onCancel"),visible:g})]})},"VisOptimizeApp");var ci=Object.defineProperty,he=k((e,t)=>ci(e,"name",{value:t,configurable:!0}),"p");const Mt=he((e,t)=>{const r=new Set;try{const n=vr(e),s=t?[n.dependencies,n.optionalDependencies]:[n.dependencies,n.devDependencies,n.peerDependencies,n.optionalDependencies];for(const i of s)if(i)for(const a of Object.keys(i))r.add(a)}catch{}return r},"collectDepsFromPkgJson"),Or=he(e=>{const t=Wr(e);if(t)return Yt(e,t);const r=Te(e,"package.json");if(!Gt(r))return[];try{const n=vr(r),s=Array.isArray(n.workspaces)?n.workspaces:n.workspaces?.packages;return s?Yt(e,s):[]}catch{return[]}},"discoverWorkspacePackages"),li="https://github.com/es-tooling/module-replacements/blob/main/docs/modules",ui=he(e=>`${li}/${e}.md`,"buildE18eDocUrl"),pi=he(e=>{if(e.type==="simple"&&e.replacement)return e.replacement;if(e.type==="native"){const t=e.nodeVersion?` (Node ${e.nodeVersion}+)`:"";return e.replacement?`${e.replacement}${t}`:`Native API${t}`}return e.type==="documented"&&e.docPath?"see migration guide":""},"e18eReplacementHint"),Pr=he(e=>{const t=[],r=he((n,s)=>{const i=n.moduleReplacements;if(Array.isArray(i))for(const a of i)e.has(a.moduleName)&&t.push({category:s,docUrl:a.type==="documented"&&a.docPath?ui(a.docPath):void 0,hasCodemod:!1,overrideSpec:void 0,packageName:a.moduleName,replacement:pi(a)})},"scanManifest");return r(Zr,"native"),r(en,"preferred"),r(Yr,"micro-utility"),t},"buildE18eEntries"),Tr=he((e,t,r,n)=>{const s=Wo.getManifestData("npm")??[],i=[];for(const[,a]of s){if(a.deprecated)continue;const f=e.has(a.package),l=t?Uo(t,a.package,r.name):!1;if(!f&&!l)continue;const g=yr.coerce(a.version)?.major;if(g===void 0)continue;const y=n?`npm:${a.name}@${a.version}`:`npm:${a.name}@^${String(g)}`;i.push({category:"socket",hasCodemod:!1,overrideSpec:y,packageName:a.package,replacement:a.name})}return i},"buildSocketEntries");let st;const Nr=he(async()=>{if(st)return st;try{return st=(await import("module-replacements-codemods")).codemods,st}catch{return{}}},"loadCodemods"),Dr=he(async e=>{try{const t=await Nr();for(const r of e)r.category!=="socket"&&t[r.packageName]&&(r.hasCodemod=!0)}catch{}},"markCodemodAvailability"),Lr=he(async(e,t)=>{let r=0;try{const n=(await Nr())[t];if(!n)return{filesChanged:0,packageName:t};const s=n({}),i=await fi(e);for(const a of i){const f=Xe(a);if(f.includes(t))try{const l=await s.transform({file:{filename:a,source:f}});l!==f&&(Gr(a,l,"utf8"),r++)}catch(l){process.stderr.write(`warn: codemod transform failed for ${a}: ${l instanceof Error?l.message:String(l)}
13
- `)}}}catch{}return{filesChanged:r,packageName:t}},"runCodemod"),fi=he(async e=>Oo("**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}",{absolute:!0,cwd:e,ignore:["**/.*/**","**/.*","**/node_modules/**","**/dist/**","**/coverage/**","**/.git/**","**/.next/**","**/.nuxt/**"]}),"collectSourceFiles"),hi=he(async({logger:e,options:t,visConfig:r,workspaceRoot:n})=>{if(!n)throw new Error("Could not determine workspace root. Run this command inside a monorepo.");const s=Kr(n),i=!!t.dryRun,a=!!t.prod,f=!!t.pin;z.info(`Detected ${s.name} v${s.version}.`);const l=Mt(Te(n,"package.json"),a),g=Or(n),y=new Set(l);for(const o of g){const S=Mt(Te(Jr(n,o),"package.json"),a);for(const T of S)y.add(T)}g.length>0&&z.info(`Scanned ${String(g.length)} workspace package${g.length===1?"":"s"}.`),z.info(`Scanning dependencies...
14
- `);const h=Bo(n,s.name),v=Pr(y),m=Tr(y,h,s,f),_=new Set(v.map(o=>o.packageName)),A=m.filter(o=>!_.has(o.packageName)),b=[...v,...A];if(await Dr(b),b.length===0){z.info("No optimizations found for your dependencies.");return}const q=!!process.stdout.isTTY&&!zr,H=t.format==="json"||!!t.json;if(q&&!i&&!H){const o=new zo(b),S=await Vr(tn.createElement(ai,{isDryRun:!1,store:o}),{alternateScreen:!0,exitOnCtrlC:!1,interactive:!0,patchConsole:!0}).waitUntilExit(),T=Array.isArray(S)?S:[];if(T.length===0){z.info("No optimizations selected.");return}const C=T.filter(j=>j.category!=="socket"&&j.hasCodemod),w=T.filter(j=>j.category!=="socket"&&!j.hasCodemod),N=T.filter(j=>j.category==="socket");if(C.length>0){z.info(`
15
- Running ${String(C.length)} codemod${C.length===1?"":"s"}...
16
- `);for(const j of C){const J=await Lr(n,j.packageName);J.filesChanged>0?z.success(` ${j.packageName}: ${String(J.filesChanged)} file${J.filesChanged===1?"":"s"} updated`):z.info(` ${j.packageName}: no files changed`)}}if(w.length>0){z.warn(`
17
- ${String(w.length)} selected replacement${w.length===1?"":"s"} require manual migration (no codemod available):`);for(const j of w)z.info(` ${j.packageName} → ${j.replacement}`);z.notice(" Replace usage in your source code, then remove from dependencies.")}if(N.length>0){const j=N.filter(V=>V.overrideSpec).map(V=>({original:V.packageName,spec:V.overrideSpec})),J=Go(n,Te(n,"package.json"),j,s,r?.editorconfig??!0);J.added.length>0&&z.success(`
18
- Added ${String(J.added.length)} override${J.added.length===1?"":"s"}.`),J.updated.length>0&&z.success(`Updated ${String(J.updated.length)} override${J.updated.length===1?"":"s"}.`)}if(N.length>0&&t.install!==!1){z.info(`
19
- Running ${s.name} install to update lockfile...`);const j=Xr(s,{dev:!1,filter:[],force:!1,frozenLockfile:!1,ignoreScripts:!1,lockfileOnly:!1,noOptional:!1,offline:!1,prod:!1,recursive:!1,silent:!1,workspaceRoot:!1},n,e);j!==0&&z.warn(`${s.name} install exited with code ${String(j)}. Run it manually.`)}z.info(""),z.success("Optimization complete.");return}if(H){process.stdout.write(`${JSON.stringify({e18e:v.map(o=>({category:o.category,hasCodemod:o.hasCodemod,packageName:o.packageName,replacement:o.replacement})),packageManager:s.name,socket:A.map(o=>({overrideSpec:o.overrideSpec,packageName:o.packageName,replacement:o.replacement})),total:b.length,workspaces:g.length},void 0,2)}
20
- `);return}const W=v.filter(o=>o.category==="native"),d=v.filter(o=>o.category==="preferred"),E=v.filter(o=>o.category==="micro-utility");if(W.length>0){z.info(`Native replacements (${String(W.length)}):`);for(const o of W)z.info(` ${o.hasCodemod?"⚙":" "} ${o.packageName} → ${o.replacement}`)}if(d.length>0){z.info(`
21
- Preferred alternatives (${String(d.length)}):`);for(const o of d)z.info(` ${o.hasCodemod?"":" "} ${o.packageName} → ${o.replacement}`)}if(E.length>0){z.info(`
22
- Micro-utilities (${String(E.length)}):`);for(const o of E)z.info(` ${o.hasCodemod?"⚙":" "} ${o.packageName} → ${o.replacement}`)}if(A.length>0){z.info(`
23
- Socket.dev overrides (${String(A.length)}):`);for(const o of A)z.info(` ${o.packageName} ${o.overrideSpec}`)}z.info(`
24
- Total: ${String(b.length)} optimizations available (⚙ = codemod available).`),i&&z.notice("Run without --dry-run for interactive selection.")},"execute"),Pi=Object.defineProperty({__proto__:null,buildE18eEntries:Pr,buildSocketEntries:Tr,collectDepsFromPkgJson:Mt,default:hi,discoverWorkspacePackages:Or,markCodemodAvailability:Dr,runCodemod:Lr},Symbol.toStringTag,{value:"Module"});export{Or as A,Pr as F,Lr as I,Bo as L,Tr as T,Dr as U,Go as a,Pi as h,Mt as x};
1
+ var ge=Object.defineProperty;var g=(e,t)=>ge(e,"name",{value:t,configurable:!0});import{createRequire as he}from"node:module";import{aH as ve,E as d,j as k,q as x,p as a,i as ce,x as be,A as we}from"./bin.js";import{a as O,C as _,Q as ke,z as W,h as b,M as c,B as m,n as ie,y as xe,b as $e}from"./config.js";import{f as Se}from"../packem_shared/giget-CcEy_Elm.js";const fe=he(import.meta.url),D=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,J=g(e=>{if(typeof D<"u"&&D.versions&&D.versions.node){const[t,r]=D.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return D.getBuiltinModule(e)}return fe(e)},"__cjs_getBuiltinModule"),{spawnSync:ye}=J("node:child_process"),{createInterface:_e}=J("node:readline"),{readdirSync:je,chmodSync:Ce}=J("node:fs");var Oe=Object.defineProperty,L=g((e,t)=>Oe(e,"name",{value:t,configurable:!0}),"e");const Pe={"vis:app":"builtin:app","vis:application":"builtin:app","vis:generator":"builtin:generator","vis:lib":"builtin:library","vis:library":"builtin:library","vis:monorepo":"builtin:monorepo"},Ne=["https://github.com/","https://gitlab.com/","https://bitbucket.org/","https://raw.githubusercontent.com/","https://git.sr.ht/","git@github.com:","git@gitlab.com:","git@bitbucket.org:","git@git.sr.ht:","github:","gh:","gitlab:","bitbucket:","sourcehut:","git:","http://","https://"],qe=L(e=>{for(const t of Ne)if(e.startsWith(t))return!0;return!e.startsWith("@")&&/^[^/#@][^/#]*\/[^/#]+/.test(e)},"isGitUrl"),De=new Set(["sv"]),Ee=L(e=>{if(De.has(e)||e.startsWith("create-")||e.startsWith("@")&&e.includes("/create-"))return e;if(e.startsWith("@")){const t=e.indexOf("/");if(t!==-1){const r=e.slice(0,t),i=e.slice(t+1);return`${r}/create-${i}`}return e}return`create-${e}`},"expandCreateShorthand"),Te=L((e,t=[])=>{if(!e)throw new Error("No template specified.");const r=e.toLowerCase(),i=Pe[r];return i?{args:t,source:r,type:i}:qe(e)?{args:t,source:e,type:"remote:git"}:{args:t,source:Ee(e),type:"remote:npm"}},"discoverTemplate"),Ie=L(e=>{switch(e){case"builtin:app":return"apps";case"builtin:generator":case"builtin:library":return"packages";default:return"."}},"inferParentDir");var Re=Object.defineProperty,le=g((e,t)=>Re(e,"name",{value:t,configurable:!0}),"i$1");const ae=["ability","able","about","above","abroad","absence","absolute","absolutely","absorb","academic","accept","access","accompany","accomplish","according","account","accurate","achieve","achievement","acid","acknowledge","acquire","across","act","action","active","activist","activity","actor","actress","actual","actually","adapt","add","addition","additional","address","adequate","adjust","adjustment","administration","administrator","admire","admission","admit","adolescent","adopt","adult","advance","advanced","advantage","adventure","advertising","advice","advise","adviser","advocate","affair","affect","afford","after","afternoon","again","against","age","agency","agenda","agent","ago","agree","agreement","agricultural","ahead","aid","aide","aim","air","aircraft","airline","airport","album","alive","all","alliance","allow","ally","almost","alone","along","already","also","alter","alternative","although","always","amazing","among","amount","analysis","analyst","analyze","ancient","and","angle","animal","anniversary","announce","annual","another","answer","anticipate","any","anybody","anymore","anyone","anything","anyway","anywhere","apart","apartment","apparent","apparently","appeal","appear","appearance","apple","application","apply","appoint","appointment","appreciate","approach","appropriate","approval","approve","approximately","architect","area","argue","argument","arise","arm","armed","around","arrange","arrangement","arrival","arrive","art","article","artist","artistic","aside","ask","asleep","aspect","assert","assess","assessment","asset","assign","assignment","assist","assistance","assistant","associate","association","assume","assumption","assure","athlete","athletic","atmosphere","attach","attempt","attend","attention","attitude","attorney","attract","attractive","attribute","audience","author","authority","auto","available","average","avoid","award","aware","awareness","away","awesome","baby","back","background","bag","bake","balance","ball","ban","band","bank","bar","barely","barrel","base","baseball","basic","basically","basis","basket","basketball","bathroom","battery","beach","bean","bear","beat","beautiful","beauty","because","become","bed","bedroom","beer","before","begin","beginning","behavior","behind","being","belief","believe","bell","belong","below","belt","bench","bend","beneath","benefit","beside","besides","best","bet","better","between","beyond","big","bike","bill","billion","bind","biological","bird","birth","birthday","bit","bite","black","blade","blanket","blind","block","blow","blue","board","boat","body","bond","bone","book","boom","boot","border","born","borrow","boss","both","bother","bottle","bottom","boundary","bowl","box","boy","boyfriend","brain","branch","brand","bread","break","breakfast","breast","breath","breathe","brick","bridge","brief","briefly","bright","brilliant","bring","broad","brother","brown","brush","buck","budget","build","building","bullet","bunch","bury","bus","business","busy","but","butter","button","buy","buyer","cabin","cabinet","cable","cake","calculate","call","camera","camp","campaign","campus","can","candidate","cap","capability","capable","capacity","capital","captain","capture","car","carbon","card","care","career","careful","carefully","carrier","carry","case","cash","cast","cat","catch","category","cause","ceiling","celebrate","celebration","celebrity","cell","center","central","century","ceremony","certain","certainly","chain","chair","chairman","challenge","chamber","champion","championship","chance","change","changing","channel","chapter","character","characteristic","characterize","charge","charity","chart","chase","cheap","check","cheek","cheese","chef","chemical","chest","chicken","chief","child","childhood","chip","chocolate","choice","cholesterol","choose","church","cigarette","circle","circumstance","cite","citizen","city","civil","civilian","claim","class","classic","classroom","clean","clear","clearly","client","climate","climb","clinic","clinical","clock","close","closely","closer","clothes","clothing","cloud","club","clue","cluster","coach","coal","coalition","coast","coat","code","coffee","cognitive","cold","colleague","collect","collection","collective","college","colonial","color","column","combination","combine","come","comedy","comfort","comfortable","command","commander","comment","commercial","commission","commit","commitment","committee","common","communicate","communication","community","company","compare","comparison","compete","competition","competitive","competitor","complete","completely","complex","complicated","component","compose","composition","comprehensive","computer","concentrate","concentration","concept","concern","concerned","concert","conclude","conclusion","concrete","condition","conduct","conference","confidence","confident","confirm","confront","confusion","congressional","connect","connection","consciousness","consensus","consequence","conservative","consider","considerable","consideration","consist","consistent","constant","constantly","constitute","constitutional","construct","construction","consultant","consume","consumer","consumption","contact","contain","container","contemporary","content","contest","context","continue","continued","contract","contrast","contribute","contribution","control","convention","conventional","conversation","convert","conviction","convince","cook","cookie","cooking","cool","cooperation","cop","cope","copy","core","corn","corner","corporate","corporation","correct","correspondent","cost","cotton","couch","could","council","counselor","count","counter","country","county","couple","courage","course","court","cousin","cover","coverage","cow","crack","craft","cream","create","creation","creative","creature","credit","crew","criteria","crop","cross","crowd","crucial","cultural","culture","cup","curious","current","currently","curriculum","custom","customer","cut","cycle","dad","daily","dance","dare","dark","darkness","data","date","daughter","day","deal","dealer","dear","debate","decade","decide","decision","deck","declare","decrease","deep","deeply","deer","defend","defendant","defense","defensive","define","definitely","definition","degree","delay","deliver","delivery","demand","democracy","democratic","demonstrate","demonstration","deny","department","depend","dependent","depending","depict","depth","deputy","derive","describe","description","desert","deserve","design","designer","desire","desk","desperate","despite","detail","detailed","detect","determine","develop","developing","development","device","devote","dialogue","diet","differ","difference","different","differently","difficult","difficulty","dig","digital","dimension","dining","dinner","direct","direction","directly","director","disability","disagree","disappear","discipline","discourse","discover","discovery","discuss","discussion","dish","dismiss","display","distance","distant","distinct","distinction","distinguish","distribute","distribution","district","diverse","diversity","divide","division","doctor","document","dog","domestic","dominant","dominate","door","double","down","downtown","dozen","draft","drag","drama","dramatic","dramatically","draw","drawing","dream","dress","drink","drive","driver","drop","dry","due","during","dust","duty","each","eager","ear","early","earn","earnings","earth","ease","easily","east","eastern","easy","eat","economic","economics","economist","economy","edge","edition","editor","educate","education","educational","educator","effect","effective","effectively","efficiency","efficient","effort","egg","eight","either","elderly","elect","election","electric","electricity","electronic","element","elementary","eliminate","elite","else","elsewhere","embrace","emerge","emission","emotion","emotional","emphasis","emphasize","employ","employee","employer","employment","empty","enable","encounter","encourage","end","energy","enforcement","engage","engine","engineer","engineering","enhance","enjoy","enormous","enough","ensure","enter","enterprise","entertainment","entire","entirely","entrance","entry","environment","environmental","episode","equal","equally","equipment","era","escape","especially","essay","essential","essentially","establish","establishment","estate","estimate","etc","ethics","ethnic","evaluate","evaluation","even","evening","event","eventually","ever","every","everybody","everyday","everyone","everything","everywhere","evidence","evolution","evolve","exact","exactly","examination","examine","example","exceed","excellent","except","exception","exchange","exciting","executive","exercise","exhibit","exhibition","exist","existence","existing","expand","expansion","expect","expectation","expense","expensive","experience","experiment","expert","explain","explanation","explore","expose","express","expression","extend","extension","extensive","extent","external","extra","extraordinary","extreme","extremely","eye","fabric","face","facility","fact","factor","factory","faculty","fade","fair","fairly","faith","fall","false","familiar","family","famous","fan","fantasy","far","farm","farmer","fashion","fast","fate","father","favor","favorite","feature","federal","fee","feed","feel","feeling","fellow","female","fence","few","fewer","fiber","fiction","field","fifteen","fifth","fifty","figure","file","fill","film","final","finally","finance","financial","find","finding","fine","finger","finish","firm","first","fish","fishing","fit","fitness","five","fix","flag","flame","flat","flavor","flesh","flight","float","floor","flow","flower","fly","focus","folk","follow","following","food","foot","football","for","force","foreign","forest","forever","forget","form","formal","formation","former","formula","forth","fortune","forward","found","foundation","founder","four","fourth","frame","framework","free","freedom","freeze","frequency","frequent","frequently","fresh","friend","friendly","friendship","from","front","fruit","fuel","full","fully","fun","function","fund","fundamental","funding","funeral","funny","furniture","furthermore","future","gain","galaxy","gallery","game","gap","garage","garden","garlic","gas","gate","gather","gaze","gear","gender","gene","general","generally","generate","generation","genetic","gentleman","gently","gesture","get","ghost","giant","gift","gifted","girl","girlfriend","give","given","glad","glance","glass","global","glove","goal","gold","golden","golf","good","government","governor","grab","grade","gradually","graduate","grain","grand","grandfather","grandmother","grant","grass","grave","gray","great","greatest","green","grocery","ground","group","grow","growing","growth","guarantee","guard","guess","guest","guide","guideline","guy","habit","habitat","hair","half","hall","hand","handful","handle","hang","happen","happy","hard","hardly","hat","have","head","headline","headquarters","health","healthy","hear","hearing","heart","heat","heaven","heavily","heavy","heel","height","helicopter","hello","help","helpful","here","heritage","hero","herself","hey","hide","high","highlight","highly","highway","hill","himself","hip","hire","historian","historic","historical","history","hit","hold","hole","holiday","holy","home","honest","honey","honor","hope","horizon","horse","hospital","host","hot","hotel","hour","house","household","housing","how","however","huge","human","humor","hundred","hungry","hunter","hunting","husband","hypothesis","ice","idea","ideal","identification","identify","identity","ignore","illustrate","image","imagination","imagine","immediate","immediately","immigrant","immigration","impact","implement","implication","imply","importance","important","impose","impossible","impress","impression","impressive","improve","improvement","incentive","incident","include","including","income","incorporate","increase","increased","increasing","increasingly","incredible","indeed","independence","independent","index","indicate","indication","individual","industrial","industry","infant","inflation","influence","inform","information","ingredient","initial","initially","initiative","inner","innocent","inquiry","inside","insight","insist","inspire","install","instance","instead","institution","institutional","instruction","instructor","instrument","insurance","intellectual","intelligence","intend","intense","intensity","intention","interaction","interest","interested","interesting","internal","international","interpret","interpretation","intervention","interview","into","introduce","introduction","invest","investigate","investigation","investigator","investment","investor","invite","involve","involved","involvement","iron","island","issue","item","its","itself","jacket","jet","job","join","joint","joke","journal","journalist","journey","joy","judge","judgment","juice","jump","junior","jury","just","justice","justify","keep","key","kick","kid","kind","king","kiss","kitchen","knee","knife","knock","know","knowledge","lab","label","labor","laboratory","lady","lake","land","landscape","language","lap","large","largely","last","late","later","latter","laugh","launch","law","lawn","lawsuit","lawyer","lay","layer","lead","leader","leadership","leading","leaf","league","lean","learn","learning","least","leather","leave","left","leg","legacy","legal","legend","legislation","legitimate","lemon","length","less","lesson","let","letter","level","liberal","library","license","lie","life","lifestyle","lifetime","lift","light","like","likely","limit","limitation","limited","line","link","lip","list","listen","literally","literary","literature","little","live","living","load","loan","local","locate","location","lock","long","look","loose","lose","lost","lot","lots","loud","love","lovely","lover","low","lower","luck","lucky","lunch","lung","machine","magazine","mail","main","mainly","maintain","maintenance","major","majority","make","maker","makeup","male","mall","man","manage","management","manager","manner","manufacturer","manufacturing","many","map","margin","mark","market","marketing","marriage","married","marry","mask","mass","massive","master","match","material","math","matter","may","maybe","mayor","meal","mean","meaning","meanwhile","measure","measurement","meat","mechanism","media","medical","medication","medicine","medium","meet","meeting","member","membership","memory","mental","mention","menu","mere","merely","message","metal","meter","method","middle","might","military","milk","million","mind","mine","minister","minor","minority","minute","miracle","mirror","miss","missile","mission","mix","mixture","mode","model","moderate","modern","modest","mom","moment","money","monitor","month","mood","moon","moral","more","moreover","morning","mortgage","most","mostly","mother","motion","motivation","motor","mount","mountain","mouse","mouth","move","movement","movie","much","multiple","muscle","museum","music","musical","musician","must","mutual","myself","mystery","myth","naked","name","narrative","narrow","nation","national","native","natural","naturally","nature","near","nearby","nearly","necessarily","necessary","neck","need","negative","negotiate","negotiation","neighbor","neighborhood","neither","nerve","net","network","never","nevertheless","new","newly","news","newspaper","next","nice","night","nine","nobody","nod","nomination","none","nonetheless","nor","normal","normally","north","northern","nose","not","note","nothing","notice","notion","novel","now","nowhere","nuclear","number","numerous","nurse","nut","object","objective","obligation","observation","observe","observer","obtain","obvious","obviously","occasion","occasionally","occupation","occupy","occur","ocean","odd","odds","off","offer","office","officer","official","often","oil","okay","old","once","one","ongoing","onion","online","only","onto","open","opening","operate","operating","operation","operator","opinion","opponent","opportunity","oppose","opposite","opposition","option","orange","order","ordinary","organic","organization","organize","orientation","origin","original","originally","other","others","otherwise","ought","our","ourselves","out","outcome","outside","oven","over","overall","overcome","overlook","owe","own","owner","pace","pack","package","page","paint","painter","painting","pair","pale","palm","pan","panel","pant","paper","parent","park","parking","part","participant","participate","participation","particular","particularly","partly","partner","partnership","party","pass","passage","passenger","passion","past","patch","path","patient","pattern","pause","pay","payment","peace","peak","peer","people","pepper","per","perceive","percentage","perception","perfect","perfectly","perform","performance","perhaps","period","permanent","permission","permit","person","personal","personality","personally","personnel","perspective","persuade","pet","phase","phenomenon","philosophy","phone","photo","photograph","photographer","phrase","physical","physically","physician","piano","pick","picture","pie","piece","pile","pilot","pine","pink","pipe","pitch","place","plan","plane","planet","planning","plant","plastic","plate","platform","play","player","please","pleasure","plenty","plot","plus","pocket","poem","poet","poetry","point","pole","police","policy","political","politically","politician","politics","poll","pool","pop","popular","population","porch","port","portion","portrait","portray","pose","position","positive","possess","possibility","possible","possibly","post","pot","potato","potential","potentially","pound","pour","powder","power","powerful","practical","practice","pray","prayer","precisely","predict","prefer","preference","pregnancy","pregnant","preparation","prepare","prescription","presence","present","presentation","preserve","president","presidential","press","pretend","pretty","prevent","previous","previously","price","pride","priest","primarily","primary","prime","principal","principle","print","prior","priority","privacy","private","probably","procedure","proceed","process","produce","producer","product","production","profession","professional","professor","profile","profit","program","progress","project","prominent","promise","promote","prompt","proof","proper","properly","property","proportion","proposal","propose","proposed","prosecutor","prospect","protect","protection","protein","protest","proud","prove","provide","provider","province","provision","psychological","psychologist","psychology","public","publication","publicly","publish","publisher","pull","purchase","pure","purpose","pursue","push","put","qualify","quality","quarter","quarterback","question","quick","quickly","quiet","quietly","quit","quite","quote","race","racial","radical","radio","rail","rain","raise","range","rank","rapid","rapidly","rare","rarely","rate","rather","rating","ratio","raw","reach","react","reaction","read","reader","reading","ready","real","reality","realize","really","reason","reasonable","recall","receive","recent","recently","recipe","recognition","recognize","recommend","recommendation","record","recording","recover","recovery","recruit","red","reduce","reduction","refer","reference","reflect","reflection","reform","refugee","refuse","regard","regarding","regardless","regime","region","regional","register","regular","regularly","regulate","regulation","reinforce","relate","relation","relationship","relative","relatively","relax","release","relevant","relief","religion","religious","rely","remain","remaining","remarkable","remember","remind","remote","remove","repeat","repeatedly","replace","reply","report","reporter","represent","representation","representative","reputation","request","require","requirement","research","researcher","resemble","reservation","resident","resist","resolution","resolve","resort","resource","respect","respond","respondent","response","responsibility","responsible","rest","restaurant","restore","restriction","result","retain","retire","retirement","return","reveal","revenue","review","revolution","rhythm","rice","rich","rid","ride","rifle","right","ring","rise","river","road","rock","role","roll","romantic","roof","room","root","rope","rose","roughly","round","route","routine","row","rub","rule","run","running","rural","rush","sacred","safe","safety","sake","salad","salary","sale","sales","salt","same","sample","sanction","sand","satellite","satisfaction","satisfy","sauce","save","saving","say","scale","scenario","scene","schedule","scheme","scholar","scholarship","school","science","scientific","scientist","scope","score","screen","script","sea","search","season","seat","second","secret","secretary","section","sector","secure","security","see","seed","seek","seem","segment","seize","select","selection","self","sell","senator","send","senior","sense","sensitive","sentence","separate","sequence","series","serious","seriously","serve","service","session","set","setting","settle","settlement","seven","several","shade","shadow","shake","shall","shape","share","sharp","sheet","shelf","shell","shelter","shift","shine","ship","shirt","shoe","shop","shopping","shore","short","shortly","shot","should","shoulder","shout","show","shower","shrug","shut","side","sigh","sight","sign","signal","significance","significant","significantly","silence","silent","silver","similar","similarly","simple","simply","since","sing","singer","single","sink","sir","sister","sit","site","situation","six","size","ski","skill","skin","sky","sleep","slice","slide","slight","slightly","slip","slow","slowly","small","smart","smell","smile","smooth","snap","snow","soccer","social","society","soft","software","soil","solar","solid","solution","solve","some","somebody","somehow","someone","something","sometimes","somewhat","somewhere","son","song","soon","sophisticated","sorry","sort","soul","sound","soup","source","south","southern","space","speak","speaker","special","specialist","species","specific","specifically","speech","speed","spend","spending","spin","spirit","spiritual","split","spokesman","sport","spot","spread","spring","square","squeeze","stability","stable","staff","stage","stair","stake","stand","standard","standing","star","stare","start","state","statement","station","statistics","status","stay","steady","steal","steel","step","stick","still","stir","stock","stomach","stone","stop","storage","store","storm","story","straight","strange","stranger","strategic","strategy","stream","street","strength","strengthen","stretch","string","strip","strong","strongly","structure","student","studio","study","stuff","style","subject","submit","subsequent","substance","substantial","succeed","success","successful","successfully","such","sudden","suddenly","sue","sufficient","sugar","suggest","suggestion","suit","summer","summit","sun","super","supply","support","supporter","suppose","supposed","sure","surely","surface","surgery","surprise","surprised","surprising","surprisingly","surround","survey","survival","survive","survivor","sustain","swear","sweep","sweet","swim","swing","switch","symbol","system","table","tablespoon","tactic","tail","take","tale","talent","talk","tall","tank","tap","tape","target","task","taste","tax","taxpayer","tea","teach","teacher","teaching","team","tear","teaspoon","technical","technique","technology","teen","teenager","telephone","telescope","television","tell","temperature","temporary","ten","tend","tendency","tennis","tent","term","terms","territory","test","testify","testimony","testing","text","than","thank","thanks","that","the","theater","their","them","theme","themselves","then","theory","therapy","there","therefore","thick","thin","thing","think","thinking","third","thirty","though","thought","thousand","three","throat","through","throughout","throw","ticket","tie","tight","time","tiny","tip","tire","tired","tissue","title","today","toe","together","tomato","tomorrow","tone","tongue","tonight","too","tool","tooth","top","topic","toss","total","totally","touch","tough","tour","tourist","tournament","tower","town","toy","trace","track","trade","tradition","traditional","traffic","trail","train","training","transfer","transform","transformation","transition","translate","transportation","travel","treat","treatment","treaty","tree","tremendous","trend","trial","tribe","trip","troop","truck","true","truly","trust","truth","try","tube","tunnel","turn","twelve","twenty","twice","twin","two","type","typical","typically","ultimate","ultimately","unable","uncle","under","undergo","understand","understanding","unfortunately","uniform","union","unique","unit","universal","universe","university","unknown","unless","unlike","unlikely","until","unusual","upon","upper","urban","urge","use","used","useful","user","usual","usually","utility","vacation","valley","valuable","value","variable","variation","variety","various","vary","vast","vegetable","vehicle","venture","version","versus","very","vessel","veteran","via","victory","video","view","viewer","village","virtually","virtue","visible","vision","visit","visitor","visual","vital","voice","volume","volunteer","vote","voter","wage","wait","wake","walk","wall","wander","want","warm","warn","warning","wash","watch","water","wave","way","wealth","wealthy","wear","weather","wedding","week","weekend","weekly","weigh","weight","welcome","welfare","well","west","western","wet","what","whatever","wheel","when","whenever","where","whereas","whether","which","while","whisper","white","who","whole","whom","whose","why","wide","widely","widespread","wife","wild","will","willing","win","wind","window","wine","wing","winner","winter","wipe","wire","wisdom","wise","wish","with","withdraw","within","without","witness","woman","wonder","wonderful","wood","wooden","word","work","worker","working","works","workshop","world","worried","worth","would","wrap","write","writer","writing","yard","yeah","year","yell","yellow","yes","yesterday","yield","young","your","yours","yourself","youth","zone"],Me=le((e,t)=>Math.floor(e+Math.random()*(t-e+1)),"random");function F(){return ae[Me(0,ae.length-1)]}g(F,"getRandomWord");le(F,"getRandomWord");var ze=Object.defineProperty,Le=g((e,t)=>ze(e,"name",{value:t,configurable:!0}),"o$1");const Ae=Le(()=>`${F()}-${F()}`,"randomName");var U,ne;function Ge(){return ne||(ne=1,U=["_http_agent","_http_client","_http_common","_http_incoming","_http_outgoing","_http_server","_stream_duplex","_stream_passthrough","_stream_readable","_stream_transform","_stream_wrap","_stream_writable","_tls_common","_tls_wrap","assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib","node:sea","node:sqlite","node:test","node:test/reporters"]),U}g(Ge,"requireBuiltinModules");var B,oe;function Ue(){if(oe)return B;oe=1;var e=Object.defineProperty,t=g((o,l)=>e(o,"name",{value:l,configurable:!0}),"i");const r=Ge();var i=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),n=["node_modules","favicon.ico"];function u(o){var l=[],s=[];if(o===null)return s.push("name cannot be null"),p(l,s);if(o===void 0)return s.push("name cannot be undefined"),p(l,s);if(typeof o!="string")return s.push("name must be a string"),p(l,s);if(o.length||s.push("name length must be greater than zero"),o.startsWith(".")&&s.push("name cannot start with a period"),o.startsWith("-")&&s.push("name cannot start with a hyphen"),o.match(/^_/)&&s.push("name cannot start with an underscore"),o.trim()!==o&&s.push("name cannot contain leading or trailing spaces"),n.forEach(function(h){o.toLowerCase()===h&&s.push(h+" is not a valid package name")}),r.includes(o.toLowerCase())&&l.push(o+" is a core module name"),o.length>214&&l.push("name can no longer contain more than 214 characters"),o.toLowerCase()!==o&&l.push("name can no longer contain capital letters"),/[~'!()*]/.test(o.split("/").slice(-1)[0])&&l.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(o)!==o){var w=o.match(i);if(w){var $=w[1],y=w[2];if(y.startsWith(".")&&s.push("name cannot start with a period"),encodeURIComponent($)===$&&encodeURIComponent(y)===y)return p(l,s)}s.push("name can only contain URL-friendly characters")}return p(l,s)}g(u,"validate"),t(u,"validate");var p=t(function(o,l){var s={validForNewPackages:l.length===0&&o.length===0,validForOldPackages:l.length===0,warnings:o,errors:l};return s.warnings.length||delete s.warnings,s.errors.length||delete s.errors,s},"done");return B=u,B}g(Ue,"requireLib");var Be=Ue();const Ve=ve(Be);var Fe=Object.defineProperty,I=g((e,t)=>Fe(e,"name",{value:t,configurable:!0}),"r$2");const pe=I(e=>e?Ve(e).validForNewPackages:!1,"isValidPackageName"),T=I(e=>e.toLowerCase().trim().replaceAll(/\s+/g,"-").replaceAll(/[^a-z\d\-~]/g,"-").replace(/^[._-]+/,"").replaceAll(/-{2,}/g,"-").replace(/-$/,""),"toValidPackageName"),Je=new Set([".DS_Store",".git",".gitkeep","Thumbs.db"]),ue=I(e=>O(e)?je(e).every(t=>Je.has(t)):!0,"isEmptyDir"),We=I((e,t)=>{const r=_(t,e);return{packageName:T(ke(r)),targetDir:r}},"resolveTargetDir"),He=I(e=>ue(e),"canSafelyOverwrite");var Ye=Object.defineProperty,A=g((e,t)=>Ye(e,"name",{value:t,configurable:!0}),"l$4");const E=A((e,t)=>new Promise(r=>{e.question(t,i=>{r(i.trim())})}),"ask"),V=A(async(e,t,r=!0)=>{const i=await E(e,` ${t} ${d(r?"[Y/n]":"[y/N]")} `);return i===""?r:i.toLowerCase()==="y"||i.toLowerCase()==="yes"},"confirm"),se=A(async(e,t,r)=>{process.stderr.write(` ${t}
2
+ `);for(const[i,n]of r.entries()){const u=k(x(` ${String(i+1)}.`)),p=n.hint?d(` — ${n.hint}`):"";process.stderr.write(`${u} ${n.label}${p}
3
+ `)}for(;;){const i=await E(e,`
4
+ ${d(`Enter choice (1-${String(r.length)}):`)} `),n=Number.parseInt(i,10);if(n>=1&&n<=r.length)return r[n-1].value;const u=r.find(p=>p.value===i||p.label.toLowerCase()===i.toLowerCase());if(u)return u.value;process.stderr.write(` ${d("Invalid choice. Try again.")}
5
+ `)}},"select"),Ke=A(async e=>{const t=_e({input:process.stdin,output:process.stdout});try{process.stderr.write(`
6
+ ${k(x("vis create"))} ${d("— project scaffolding")}
7
+
8
+ `);const r=e.inMonorepo?[{hint:"Scaffold via create-vite",label:"Vis Application",value:"vis:app"},{hint:"Reusable package scaffold",label:"Vis Library",value:"vis:library"},{hint:"Code generator scaffold",label:"Vis Generator",value:"vis:generator"},{hint:"Enter an npm create-* package or GitHub URL",label:"Custom template",value:"__custom__"}]:[{hint:"Full workspace setup",label:"Vis Monorepo",value:"vis:monorepo"},{hint:"Scaffold via create-vite",label:"Vis Application",value:"vis:app"},{hint:"Reusable package scaffold",label:"Vis Library",value:"vis:library"},{hint:"Code generator scaffold",label:"Vis Generator",value:"vis:generator"},{hint:"Enter an npm create-* package or GitHub URL",label:"Custom template",value:"__custom__"}];let i=await se(t,"Select a template:",r);if(i==="__custom__"&&(i=await E(t,`
9
+ ${d("Template (npm package or GitHub URL):")} `),!i))throw new Error("No template specified.");const n=Ae(),u=await E(t,`
10
+ ${d(`Project name (${n}):`)} `)||n;if(!pe(T(u)))throw new Error(`Invalid project name: "${u}". Must be a valid npm package name.`);const p=T(u),o=await E(t,` ${d(`Target directory (${p}):`)} `)||p;let l=!1;const s=_(e.cwd,o);if(!ue(s)&&(l=await V(t,`Directory "${o}" is not empty. Overwrite?`,!1),!l))throw new Error("Aborted — directory not empty.");let w;e.inMonorepo||(e.defaultPm?(w=e.defaultPm,process.stderr.write(` ${d(`Package manager: ${w} (from config)`)}
11
+ `)):w=await se(t,"Package manager:",[{label:"pnpm",value:"pnpm"},{label:"npm",value:"npm"},{label:"yarn",value:"yarn"},{label:"bun",value:"bun"}]));let $=!1;e.inMonorepo||($=await V(t,"Initialize a git repository?",e.defaultGitInit??!1));const y=e.defaultEditor==="vscode",h=await V(t,"Generate VS Code configuration?",y)?"vscode":void 0;return process.stderr.write(`
12
+ `),{editor:h,gitInit:$,overwrite:l,pm:w,projectName:u,targetDir:o,template:i}}finally{t.close()}},"runInteractivePrompts");var Qe=Object.defineProperty,S=g((e,t)=>Qe(e,"name",{value:t,configurable:!0}),"i");const Xe=S((e,t)=>{a.info("Scaffolding application via create-vite...");const r=[W(t.cwd,t.targetDir)||".",...e.args];return r.includes("--no-immediate")||r.push("--no-immediate"),ce(t.pm,{additionalPackages:[],args:r,package:"create-vite",shellMode:!1,silent:!1},t.cwd,t.logger)},"executeApp"),Ze=S(e=>`${JSON.stringify({devDependencies:{typescript:"^5.0.0",vitest:"^3.0.0"},exports:{".":{default:"./dist/index.js",types:"./dist/index.d.ts"}},files:["dist"],main:"./dist/index.js",name:e,scripts:{build:"tsc",dev:"tsc --watch",test:"vitest run","test:watch":"vitest"},type:"module",types:"./dist/index.d.ts",version:"0.0.1"},null,4)}
13
+ `,"libraryPackageJson"),et=S(()=>`${JSON.stringify({compilerOptions:{declaration:!0,declarationMap:!0,esModuleInterop:!0,module:"Node16",moduleResolution:"Node16",outDir:"./dist",rootDir:"./src",skipLibCheck:!0,sourceMap:!0,strict:!0,target:"ES2022"},include:["src/**/*"]},null,4)}
14
+ `,"libraryTsconfig"),tt=S(e=>`/**
15
+ * ${e} — library entry point.
16
+ */
17
+
18
+ export const greet = (name: string): string => \`Hello from ${e}, \${name}!\`;
19
+ `,"librarySrcIndex"),rt=S(e=>`import { describe, expect, it } from "vitest";
20
+
21
+ import { greet } from "../src/index";
22
+
23
+ describe("${e}", () => {
24
+ it("should greet", () => {
25
+ expect(greet("world")).toBe("Hello from ${e}, world!");
26
+ });
27
+ });
28
+ `,"libraryTestIndex"),it=S((e,t)=>{const{projectName:r,targetDir:i}=t;return a.info("Scaffolding library package..."),b(i),b(c(i,"src")),b(c(i,"__tests__")),m(c(i,"package.json"),Ze(r)),a.success("Created package.json"),m(c(i,"tsconfig.json"),et()),a.success("Created tsconfig.json"),m(c(i,"src","index.ts"),tt(r)),a.success("Created src/index.ts"),m(c(i,"__tests__","index.test.ts"),rt(r)),a.success("Created __tests__/index.test.ts"),m(c(i,".gitignore"),`node_modules/
29
+ dist/
30
+ .env
31
+ .DS_Store
32
+ `),a.success("Created .gitignore"),0},"executeLibrary"),at=S((e,t)=>{switch(e.type){case"builtin:app":return Xe(e,t);case"builtin:library":return it(e,t);default:throw new Error(`Unknown built-in template type: ${e.type}`)}},"executeBuiltin");var nt=Object.defineProperty,R=g((e,t)=>nt(e,"name",{value:t,configurable:!0}),"n$1");const ot=R((e,t)=>`${JSON.stringify({bin:{[e]:"./bin/index.js"},description:t,devDependencies:{typescript:"^5.0.0"},name:e,private:!0,scripts:{build:"tsc",dev:"tsc --watch"},type:"module",version:"0.0.1"},null,4)}
33
+ `,"packageJson"),st=R(e=>`#!/usr/bin/env node
34
+
35
+ /**
36
+ * ${e} — code generator
37
+ *
38
+ * Usage: npx ${e} [options]
39
+ */
40
+
41
+ console.log("Hello from ${e}!");
42
+ `,"binIndex"),ct=R(()=>`${JSON.stringify({compilerOptions:{declaration:!0,esModuleInterop:!0,module:"Node16",moduleResolution:"Node16",outDir:"./dist",rootDir:"./src",skipLibCheck:!0,strict:!0,target:"ES2022"},include:["src/**/*","bin/**/*"]},null,4)}
43
+ `,"tsconfigJson"),lt=R(()=>`/**
44
+ * Generator core logic — export functions used by the CLI entry point.
45
+ */
46
+
47
+ export const generate = (): void => {
48
+ // TODO: Implement your generator logic here
49
+ };
50
+ `,"srcIndex"),pt=R((e,t="")=>{const{projectName:r,targetDir:i}=e;a.info("Scaffolding code generator..."),b(i),b(c(i,"bin")),b(c(i,"src")),m(c(i,"package.json"),ot(r,t||`Code generator: ${r}`)),a.success("Created package.json");const n=c(i,"bin","index.js");return m(n,st(r)),Ce(n,493),a.success("Created bin/index.js (executable)"),m(c(i,"tsconfig.json"),ct()),a.success("Created tsconfig.json"),m(c(i,"src","index.ts"),lt()),a.success("Created src/index.ts"),0},"executeGeneratorTemplate");var ut=Object.defineProperty,P=g((e,t)=>ut(e,"name",{value:t,configurable:!0}),"n");const dt=P(e=>`${JSON.stringify({devDependencies:{"@visulima/vis":"latest"},name:e,packageManager:"pnpm@latest",private:!0,scripts:{build:"vis run build",dev:"vis run dev",lint:"vis run lint",test:"vis run test"},type:"module",version:"0.0.0"},null,4)}
51
+ `,"rootPackageJson"),mt=P(()=>`packages:
52
+ - "apps/*"
53
+ - "packages/*"
54
+ `,"pnpmWorkspaceYaml"),gt=P(()=>`# Dependencies
55
+ node_modules/
56
+
57
+ # Build output
58
+ dist/
59
+ .output/
60
+
61
+ # Environment
62
+ .env
63
+ .env.local
64
+ .env.*.local
65
+
66
+ # IDE
67
+ .vscode/*
68
+ !.vscode/settings.json
69
+ !.vscode/extensions.json
70
+ .idea/
71
+
72
+ # OS
73
+ .DS_Store
74
+ Thumbs.db
75
+
76
+ # Logs
77
+ *.log
78
+ npm-debug.log*
79
+ pnpm-debug.log*
80
+
81
+ # Cache
82
+ .turbo/
83
+ .cache/
84
+ `,"gitignore"),ht=P(()=>`root = true
85
+
86
+ [*]
87
+ indent_style = space
88
+ indent_size = 4
89
+ end_of_line = lf
90
+ charset = utf-8
91
+ trim_trailing_whitespace = true
92
+ insert_final_newline = true
93
+
94
+ [*.{yml,yaml}]
95
+ indent_size = 2
96
+
97
+ [*.md]
98
+ trim_trailing_whitespace = false
99
+ `,"editorconfig"),ft=P(e=>`# ${e}
100
+
101
+ A monorepo powered by [vis](https://visulima.com/packages/vis).
102
+
103
+ ## Getting Started
104
+
105
+ \`\`\`bash
106
+ # Install dependencies
107
+ pnpm install
108
+
109
+ # Run all apps in development mode
110
+ pnpm dev
111
+
112
+ # Build all packages
113
+ pnpm build
114
+
115
+ # Run tests
116
+ pnpm test
117
+ \`\`\`
118
+
119
+ ## Structure
120
+
121
+ \`\`\`
122
+ ├── apps/ # Applications
123
+ ├── packages/ # Shared packages & libraries
124
+ ├── pnpm-workspace.yaml
125
+ └── package.json
126
+ \`\`\`
127
+ `,"readmeMd"),yt=P(e=>{const{projectName:t,targetDir:r}=e;return a.info("Scaffolding monorepo workspace..."),b(r),b(c(r,"apps")),b(c(r,"packages")),m(c(r,"package.json"),dt(t)),a.success("Created package.json"),m(c(r,"pnpm-workspace.yaml"),mt()),a.success("Created pnpm-workspace.yaml"),m(c(r,".gitignore"),gt()),a.success("Created .gitignore"),m(c(r,".editorconfig"),ht()),a.success("Created .editorconfig"),m(c(r,"README.md"),ft(t)),a.success("Created README.md"),m(c(r,"apps",".gitkeep"),""),m(c(r,"packages",".gitkeep"),""),0},"executeMonorepoTemplate");var vt=Object.defineProperty,H=g((e,t)=>vt(e,"name",{value:t,configurable:!0}),"s");const bt={"create-nuxt":{monoArgs:["--no-gitInit"]},"create-vite":{args:["--no-immediate"]},sv:{args:["--no-install"],prependCommand:"create"}},wt=H((e,t,r)=>{const i=bt[e];if(!i)return t;const n=[...t];if(i.prependCommand&&!n.includes(i.prependCommand)&&n.unshift(i.prependCommand),i.args)for(const u of i.args)n.includes(u)||n.push(u);if(r&&i.monoArgs)for(const u of i.monoArgs)n.includes(u)||n.push(u);return n},"applyAutoFixes"),kt=H((e,t)=>{const r=W(t.cwd,t.targetDir)||".",i=[...e.args];i.includes(r)||i.unshift(r);const n=wt(e.source,i,t.inMonorepo);return a.info(`Running ${e.source} via ${t.pm.name} dlx...`),ce(t.pm,{additionalPackages:[],args:n,package:e.source,shellMode:!1,silent:!1},t.cwd,t.logger)},"executeRemoteNpm"),xt=H(async(e,t)=>{const{createConfig:r}=t;a.info(`Downloading template from ${e.source}...`);try{const i=await Se(e.source,{auth:r?.auth||process.env.GIGET_AUTH||process.env.GITHUB_TOKEN||process.env.GH_TOKEN||void 0,dir:t.targetDir,force:!0,preferOffline:r?.preferOffline,provider:r?.defaultProvider,registry:r?.registry});return a.info(`Downloaded to ${i.dir}`),0}catch(i){const n=i instanceof Error?i.message:String(i);return a.warn(`Failed to download template: ${n}`),1}},"executeRemoteGit");var $t=Object.defineProperty,_t=g((e,t)=>$t(e,"name",{value:t,configurable:!0}),"r");const jt=_t(async(e,t)=>{switch(e.type){case"builtin:app":case"builtin:library":return at(e,t);case"builtin:generator":return pt(t);case"builtin:monorepo":return yt(t);case"remote:git":return xt(e,t);case"remote:npm":return kt(e,t);default:throw new Error(`Unknown template type: ${e.type}`)}},"executeTemplate");var Ct=Object.defineProperty,j=g((e,t)=>Ct(e,"name",{value:t,configurable:!0}),"g");const St=j(e=>{const t=c(e,".vscode");b(t);const r=c(t,"settings.json"),i={"editor.defaultFormatter":"oxc.oxc-vscode","editor.formatOnSave":!0};if(O(r))try{const p=ie(r);m(r,`${JSON.stringify({...i,...p},null,4)}
128
+ `),a.success("Merged .vscode/settings.json")}catch{a.warn("Could not merge .vscode/settings.json, skipping")}else m(r,`${JSON.stringify(i,null,4)}
129
+ `),a.success("Created .vscode/settings.json");const n=c(t,"extensions.json"),u={recommendations:["oxc.oxc-vscode"]};if(O(n))try{const p=ie(n);m(n,`${JSON.stringify({...p,recommendations:[...new Set([...p.recommendations||[],...u.recommendations])]},null,4)}
130
+ `),a.success("Merged .vscode/extensions.json")}catch{a.warn("Could not merge .vscode/extensions.json, skipping")}else m(n,`${JSON.stringify(u,null,4)}
131
+ `),a.success("Created .vscode/extensions.json")},"generateVscodeConfig"),Ot=j((e,t)=>{const r=c(e,".ai");b(r);const i=c(r,"instructions");if(O(i))return;const n=`# Project Instructions
132
+
133
+ This project was scaffolded with vis create.
134
+
135
+ ## Development
136
+
137
+ - Package manager: ${t}
138
+ - Build: \`${t} run build\`
139
+ - Test: \`${t} run test\`
140
+ - Lint: \`${t} run lint\`
141
+
142
+ ## Conventions
143
+
144
+ - Use TypeScript strict mode
145
+ - ESM modules (\`"type": "module"\`)
146
+ - Follow Angular-style conventional commits
147
+ `;m(i,n),a.success("Created .ai/instructions")},"generateAiInstructions"),Pt=j(e=>{ye("git",["init"],{cwd:e,stdio:"pipe"}).status===0?a.success("Initialized git repository"):a.warn("Failed to initialize git repository")},"initGitRepo"),Nt=j((e,t,r,i=!1)=>(a.info("Installing dependencies..."),be(t,{dev:!1,filter:[],force:!1,frozenLockfile:!1,ignoreScripts:!1,lockfileOnly:!1,noOptional:!1,offline:i,prod:!1,recursive:!1,silent:!1,workspaceRoot:!1},e,r)===0?(a.success("Dependencies installed"),!0):(a.warn("Dependency installation failed (you can run install manually)"),!1)),"installDependencies"),qt=j(e=>{const t=e.split("#")[0].split("?")[0].replace(/\/+$/,"").replace(/\.git$/,"").split("/").filter(Boolean).at(-1)??"",r=t.includes(":")?t.split(":").pop()??t:t;return T(r)||"my-project"},"extractRepoName"),Dt=j(e=>{if(a.info(""),a.info(" Built-in templates:"),a.info(` ${k(x("vis:monorepo"))} ${d("Full pnpm workspace setup")}`),a.info(` ${k(x("vis:app"))} ${d("Application scaffold via create-vite")}`),a.info(` ${k(x("vis:library"))} ${d("Reusable TypeScript library package")}`),a.info(` ${k(x("vis:generator"))} ${d("Code generator scaffold with bin entry")}`),e&&Object.keys(e).length>0){a.info(""),a.info(" Config aliases (vis.config.ts → create.templates):");for(const[t,r]of Object.entries(e))a.info(` ${k(x(t))}${" ".repeat(Math.max(1,16-t.length))}${d(r)}`)}a.info(""),a.info(" Remote templates:"),a.info(` ${d("Any npm create-* package:")} vis create vite`),a.info(` ${d("GitHub repository:")} vis create user/repo`),a.info(` ${d("GitLab / Bitbucket:")} vis create gitlab:user/repo`),a.info(` ${d("Full URL:")} vis create https://github.com/user/repo`),a.info(""),a.info(` ${d("Template args after --:")} vis create vite -- --template react-ts`),a.info("")},"listTemplates"),Et=j((e,t,r,i)=>{const n=_(t)===_(e)?"":e;process.stderr.write(`
148
+ `),a.success("Project created successfully!"),process.stderr.write(`
149
+ `),a.notice("Next steps:"),n&&a.info(` cd ${n}`),i||a.info(` ${r} install`),a.info(` ${r} run dev`),process.stderr.write(`
150
+ `)},"printNextSteps"),Lt=j(async({argument:e,logger:t,options:r,rawUnknown:i,visConfig:n,workspaceRoot:u})=>{const p=Array.isArray(e)?e:e?[e]:[],o=n?.create;if(r.list){Dt(o?.templates);return}const l=r.cwd||u||process.cwd(),s=!!u,w=!!process.stdin.isTTY,$=we(l);let y,h,f,N=o?.defaultEditor,M=o?.gitInit??!1,Y=[],q=$,K=!1;if(p.length===0&&w&&r.interactive!==!1){const v=await Ke({cwd:l,defaultEditor:o?.defaultEditor,defaultGitInit:o?.gitInit,defaultPm:o?.defaultPm,inMonorepo:s});y=v.template,h=v.projectName,f=_(l,v.targetDir),N=v.editor??N,M=v.gitInit,K=v.overwrite,v.pm&&(q={name:v.pm,version:$.version})}else{if(p.length===0)throw new Error(`No template specified. Usage: vis create <template> [name] [-- args...]
151
+ Use --list to see available templates, or run interactively in a terminal.`);{let v=[...i??[]];if(v.length===0){const te=process.argv.slice(2),re=te.indexOf("--");re!==-1&&(v=te.slice(re+1))}const C=p.indexOf("--"),me=C===-1?p:p.slice(0,C);Y=[...C===-1?[]:p.slice(C+1),...v],[y,h]=me,!h&&y&&(h=qt(y)),N=r.editor==="vscode"?"vscode":N,M=!!r.gitInit||M}}if(!y)throw new Error("No template specified.");const z=o?.templates?.[y]??y,Q=Te(z,Y);if(!f){const v=s?Ie(Q.type):".",C=We(h??"",_(l,v));f=C.targetDir,h=C.packageName}const X=T(h??"");if(!pe(X))throw new Error(`Invalid project name: "${h}". Use lowercase alphanumeric characters and hyphens.`);h=X;const de=_(f),G=W(_(l),de);if(G===".."||G.startsWith(`..${xe}`)||$e(G))throw new Error(`Target directory "${f}" is outside the working directory. Use a name without "../" path segments.`);if(!K&&!He(f))throw new Error(`Target directory "${f}" is not empty.
152
+ Use a different name or clear the directory first.`);z!==y&&a.info(`Alias: ${k(x(y))} → ${d(z)}`),a.info(`Template: ${k(x(z))}`),a.info(`Project: ${k(h)}`),a.info(`Target: ${d(f)}`),process.stderr.write(`
153
+ `);const Z=await jt(Q,{createConfig:o,cwd:l,inMonorepo:s,logger:t,pm:q,projectName:h,targetDir:f});if(Z!==0){process.exitCode=Z;return}N==="vscode"&&St(f),O(f)&&Ot(f,q.name),M&&!s&&Pt(f);let ee=!1;o?.install!==!1&&O(c(f,"package.json"))&&(ee=Nt(f,q,t,o?.preferOffline)),Et(f,l,q.name,ee)},"execute");export{Lt as default};