@seed-design/codemod 0.0.20 → 0.0.21

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.
@@ -61,7 +61,7 @@ ${S}`),g.pop(),`{${M}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";
61
61
  `));d&&this.exceptions.handle(d),g&&this.rejections.handle(g)}isLevelEnabled(e){let t=gl(this.levels,e);if(t===null)return!1;let i=gl(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=t:this.transports.findIndex(s=>{let o=gl(this.levels,s.level);return o===null&&(o=i),o>=t})!==-1}log(e,t,...i){if(arguments.length===1)return e[He]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return t&&typeof t=="object"?(t[He]=t.level=e,this._addDefaultMeta(t),this.write(t),this):(t={[He]:e,level:e,message:t},this._addDefaultMeta(t),this.write(t),this);let[n]=i;if(typeof n=="object"&&n!==null&&!(t&&t.match&&t.match(e2))){let o=Object.assign({},this.defaultMeta,n,{[He]:e,[fm]:i,level:e,message:t});return n.message&&(o.message=`${o.message} ${n.message}`),n.stack&&(o.stack=n.stack),n.cause&&(o.cause=n.cause),this.write(o),this}return this.write(Object.assign({},this.defaultMeta,{[He]:e,[fm]:i,level:e,message:t})),this}_transform(e,t,i){if(this.silent)return i();e[He]||(e[He]=e.level),!this.levels[e[He]]&&this.levels[e[He]]!==0&&console.error("[winston] Unknown logger level: %s",e[He]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,i()}}_final(e){let t=this.transports.slice();hm(t,(i,n)=>{if(!i||i.finished)return setImmediate(n);i.once("finish",n),i.end()},e)}add(e){let t=!cm(e)||e.log.length>2?new Jx({transport:e}):e;if(!t._writableState||!t._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",t),this._onEvent("warn",t),this.pipe(t),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}remove(e){if(!e)return this;let t=e;return(!cm(e)||e.log.length>2)&&(t=this.transports.filter(i=>i.transport===e)[0]),t&&this.unpipe(t),this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){Zx.deprecated("setLevels")}query(e,t){typeof e=="function"&&(t=e,e={}),e=e||{};let i={},n=Object.assign({},e.query||{});function s(a,l){e.query&&typeof a.formatQuery=="function"&&(e.query=a.formatQuery(n)),a.query(e,(u,h)=>{if(u)return l(u);typeof a.formatResults=="function"&&(h=a.formatResults(h,e.format)),l(null,h)})}function o(a,l){s(a,(u,h)=>{l&&(h=u||h,h&&(i[a.name]=h),l()),l=null})}hm(this.transports.filter(a=>!!a.query),o,()=>t(null,i))}stream(e={}){let t=new Hx,i=[];return t._streams=i,t.destroy=()=>{let n=i.length;for(;n--;)i[n].destroy()},this.transports.filter(n=>!!n.stream).forEach(n=>{let s=n.stream(e);s&&(i.push(s),s.on("log",o=>{o.transport=o.transport||[],o.transport.push(n.name),t.emit("log",o)}),s.on("error",o=>{o.transport=o.transport||[],o.transport.push(n.name),t.emit("error",o)}))}),t}startTimer(){return new Qx(this)}profile(e,...t){let i=Date.now();if(this.profilers[e]){let n=this.profilers[e];delete this.profilers[e],typeof t[t.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),t.pop());let s=typeof t[t.length-1]=="object"?t.pop():{};return s.level=s.level||"info",s.durationMs=i-n,s.message=s.message||e,this.write(s)}return this.profilers[e]=i,this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...e)}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...e)}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
62
62
  `))}_onEvent(e,t){function i(n){e==="error"&&!this.transports.includes(t)&&this.add(t),this.emit(e,n,t)}t["__winston"+e]||(t["__winston"+e]=i.bind(this),t.on(e,t["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function gl(r,e){let t=r[e];return!t&&t!==0?null:t}Object.defineProperty(As.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:r}=this._readableState;return Array.isArray(r)?r:[r].filter(Boolean)}});dm.exports=As});var ml=m((MR,pm)=>{"use strict";var{LEVEL:t2}=G(),r2=_s(),i2=Ms(),n2=Oi()("winston:create-logger");function s2(r){return"is"+r.charAt(0).toUpperCase()+r.slice(1)+"Enabled"}pm.exports=function(r={}){r.levels=r.levels||r2.npm.levels;class e extends i2{constructor(n){super(n)}}let t=new e(r);return Object.keys(r.levels).forEach(function(i){if(n2('Define prototype method for "%s"',i),i==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[i]=function(...n){let s=this||t;if(n.length===1){let[o]=n,a=o&&o.message&&o||{message:o};return a.level=a[t2]=i,s._addDefaultMeta(a),s.write(a),this||t}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[s2(i)]=function(){return(this||t).isLevelEnabled(i)}}),t}});var mm=m((TR,gm)=>{"use strict";var o2=ml();gm.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,t){if(!this.loggers.has(e)){t=Object.assign({},t||this.options);let i=t.transports||this.options.transports;i?t.transports=Array.isArray(i)?i.slice():[i]:t.transports=[];let n=o2(t);n.on("close",()=>this._delete(e)),this.loggers.set(e,n)}return this.loggers.get(e)}get(e,t){return this.add(e,t)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((t,i)=>this._removeLogger(i))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var wm=m(k=>{"use strict";var ym=oa(),{warn:Ti}=aa();k.version=zc().version;k.transports=zg();k.config=_s();k.addColors=ym.levels;k.format=ym.format;k.createLogger=ml();k.Logger=Ms();k.ExceptionHandler=fl();k.RejectionHandler=dl();k.Container=mm();k.Transport=cr();k.loggers=new k.Container;var Ve=k.createLogger();Object.keys(k.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(r=>k[r]=(...e)=>Ve[r](...e));Object.defineProperty(k,"level",{get(){return Ve.level},set(r){Ve.level=r}});Object.defineProperty(k,"exceptions",{get(){return Ve.exceptions}});Object.defineProperty(k,"rejections",{get(){return Ve.rejections}});["exitOnError"].forEach(r=>{Object.defineProperty(k,r,{get(){return Ve[r]},set(e){Ve[r]=e}})});Object.defineProperty(k,"default",{get(){return{exceptionHandlers:Ve.exceptionHandlers,rejectionHandlers:Ve.rejectionHandlers,transports:Ve.transports}}});Ti.deprecated(k,"setLevels");Ti.forFunctions(k,"useFormat",["cli"]);Ti.forProperties(k,"useFormat",["padLevels","stripColors"]);Ti.forFunctions(k,"deprecated",["addRewriter","addFilter","clone","extend"]);Ti.forProperties(k,"deprecated",["emitErrs","levelLength"])});var c2={};Tm(c2,{default:()=>f2,processCssFiles:()=>h2});module.exports=Lm(c2);var F=vr(vh(),1),yo=F.default,tE=F.default.stringify,rE=F.default.fromJSON,iE=F.default.plugin,nE=F.default.parse,sE=F.default.list,oE=F.default.document,aE=F.default.comment,lE=F.default.atRule,uE=F.default.rule,hE=F.default.decl,fE=F.default.root,cE=F.default.CssSyntaxError,dE=F.default.Declaration,pE=F.default.Container,gE=F.default.Processor,mE=F.default.Document,yE=F.default.Comment,wE=F.default.Warning,vE=F.default.AtRule,bE=F.default.Result,SE=F.default.Input,_E=F.default.Rule,xE=F.default.Root,EE=F.default.Node;var bh=[{previous:"$semantic.typography.h1",next:[],description:"Deprecated"},{previous:"$semantic.typography.h2",next:[],description:"Deprecated"},{previous:"$semantic.typography.h3",next:[],description:"Deprecated"},{previous:"$semantic.typography.h4",next:["t10Bold","screenTitle"],description:"\uC904\uAC04\uACA9 -0.1px"},{previous:"$semantic.typography.title1Bold",next:["t9Bold"],description:"\uC904\uAC04\uACA9 -0.4px"},{previous:"$semantic.typography.title1Regular",next:[],description:"Deprecated"},{previous:"$semantic.typography.title2Bold",next:["t7Bold"]},{previous:"$semantic.typography.title2Regular",next:["t7Regular"]},{previous:"$semantic.typography.title3Bold",next:["t6Bold"],description:"\uC904\uAC04\uACA9 -0.3px"},{previous:"$semantic.typography.title3Regular",next:["t6Regular"]},{previous:"$semantic.typography.subtitle1Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.subtitle1Regular",next:["t5Regular"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.subtitle2Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.subtitle2Regular",next:["t4Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.bodyL1Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 -2px"},{previous:"$semantic.typography.bodyL1Regular",next:["articleBody"]},{previous:"$semantic.typography.bodyL2Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 -2px"},{previous:"$semantic.typography.bodyL2Regular",next:[],alternative:["t4Regular"],description:"Deprecated"},{previous:"$semantic.typography.bodyM1Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.bodyM1Regular",next:["t5Regular"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.bodyM2Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.bodyM2Regular",next:["t4Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.caption1Bold",next:["t3Bold"],description:"\uC904\uAC04\uACA9 -1.5px"},{previous:"$semantic.typography.caption1Regular",next:[],alternative:["t3Regular"],description:"Deprecated"},{previous:"$semantic.typography.caption2Bold",next:["t2Bold"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.caption2Regular",next:["t2Regular"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.label1Bold",next:["t6Bold"],description:"\uC904\uAC04\uACA9 -0.3px"},{previous:"$semantic.typography.label1Regular",next:["t6Regular"]},{previous:"$semantic.typography.label2Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.label2Regular",next:["t5Regular"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.label3Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label3Regular",next:["t4Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label4Bold",next:["t2Bold"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.label4Regular",next:["t2Regular"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.label5Bold",next:["t1Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label5Regular",next:["t1Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label6Bold",next:[],alternative:["t1Bold"],description:"Deprecated"},{previous:"$semantic.typography.label6Regular",next:[],alternative:["t1Regular"],description:"Deprecated"}];var Ts=require("node:fs"),vm=require("node:path");var Bh=vr(Nh(),1);var zr=r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")};var Iy={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Wr=r=>r.replace(/[[\]\\-]/g,"\\$&"),Fy=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ph=r=>r.join(""),Dh=(r,e)=>{let t=e;if(r.charAt(t)!=="[")throw new Error("not in a brace expression");let i=[],n=[],s=t+1,o=!1,a=!1,l=!1,u=!1,h=t,c="";e:for(;s<r.length;){let g=r.charAt(s);if((g==="!"||g==="^")&&s===t+1){u=!0,s++;continue}if(g==="]"&&o&&!l){h=s+1;break}if(o=!0,g==="\\"&&!l){l=!0,s++;continue}if(g==="["&&!l){for(let[y,[w,S,b]]of Object.entries(Iy))if(r.startsWith(y,s)){if(c)return["$.",!1,r.length-t,!0];s+=y.length,b?n.push(w):i.push(w),a=a||S;continue e}}if(l=!1,c){g>c?i.push(Wr(c)+"-"+Wr(g)):g===c&&i.push(Wr(g)),c="",s++;continue}if(r.startsWith("-]",s+1)){i.push(Wr(g+"-")),s+=2;continue}if(r.startsWith("-",s+1)){c=g,s+=2;continue}i.push(Wr(g)),s++}if(h<s)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,r.length-t,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!u){let g=i[0].length===2?i[0].slice(-1):i[0];return[Fy(g),!1,h-t,!1]}let f="["+(u?"^":"")+Ph(i)+"]",p="["+(u?"":"^")+Ph(n)+"]";return[i.length&&n.length?"("+f+"|"+p+")":i.length?f:p,a,h-t,!0]};var Le=(r,{windowsPathsNoEscape:e=!1}={})=>e?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var jy=new Set(["!","?","+","*","@"]),kh=r=>jy.has(r),$y="(?!(?:^|/)\\.\\.?(?:$|/))",nn="(?!\\.)",By=new Set(["[","."]),Uy=new Set(["..","."]),zy=new Set("().*{}+?[]^$\\!"),Wy=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),bo="[^/]",Ih=bo+"*?",Fh=bo+"+?",Ht=class r{type;#e;#t;#s=!1;#i=[];#o;#b;#u;#f=!1;#a;#l;#n=!1;constructor(e,t,i={}){this.type=e,e&&(this.#t=!0),this.#o=t,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?i:this.#e.#a,this.#u=this.#e===this?[]:this.#e.#u,e==="!"&&!this.#e.#f&&this.#u.push(this),this.#b=this.#o?this.#o.#i.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#i)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#i.map(e=>String(e)).join("|")+")":this.#l=this.#i.map(e=>String(e)).join("")}#m(){if(this!==this.#e)throw new Error("should only call on root");if(this.#f)return this;this.toString(),this.#f=!0;let e;for(;e=this.#u.pop();){if(e.type!=="!")continue;let t=e,i=t.#o;for(;i;){for(let n=t.#b+1;!i.type&&n<i.#i.length;n++)for(let s of e.#i){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(i.#i[n])}t=i,i=t.#o}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof r&&t.#o===this))throw new Error("invalid part: "+t);this.#i.push(t)}}toJSON(){var t;let e=this.type===null?this.#i.slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...this.#i.map(i=>i.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#f&&((t=this.#o)==null?void 0:t.type)==="!")&&e.push({}),e}isStart(){var t;if(this.#e===this)return!0;if(!((t=this.#o)!=null&&t.isStart()))return!1;if(this.#b===0)return!0;let e=this.#o;for(let i=0;i<this.#b;i++){let n=e.#i[i];if(!(n instanceof r&&n.type==="!"))return!1}return!0}isEnd(){var t,i,n;if(this.#e===this||((t=this.#o)==null?void 0:t.type)==="!")return!0;if(!((i=this.#o)!=null&&i.isEnd()))return!1;if(!this.type)return(n=this.#o)==null?void 0:n.isEnd();let e=this.#o?this.#o.#i.length:0;return this.#b===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new r(this.type,e);for(let i of this.#i)t.copyIn(i);return t}static#y(e,t,i,n){let s=!1,o=!1,a=-1,l=!1;if(t.type===null){let p=i,d="";for(;p<e.length;){let g=e.charAt(p++);if(s||g==="\\"){s=!s,d+=g;continue}if(o){p===a+1?(g==="^"||g==="!")&&(l=!0):g==="]"&&!(p===a+2&&l)&&(o=!1),d+=g;continue}else if(g==="["){o=!0,a=p,l=!1,d+=g;continue}if(!n.noext&&kh(g)&&e.charAt(p)==="("){t.push(d),d="";let y=new r(g,t);p=r.#y(e,y,p,n),t.push(y);continue}d+=g}return t.push(d),p}let u=i+1,h=new r(null,t),c=[],f="";for(;u<e.length;){let p=e.charAt(u++);if(s||p==="\\"){s=!s,f+=p;continue}if(o){u===a+1?(p==="^"||p==="!")&&(l=!0):p==="]"&&!(u===a+2&&l)&&(o=!1),f+=p;continue}else if(p==="["){o=!0,a=u,l=!1,f+=p;continue}if(kh(p)&&e.charAt(u)==="("){h.push(f),f="";let d=new r(p,h);h.push(d),u=r.#y(e,d,u,n);continue}if(p==="|"){h.push(f),f="",c.push(h),h=new r(null,t);continue}if(p===")")return f===""&&t.#i.length===0&&(t.#n=!0),h.push(f),f="",t.push(...c,h),u;f+=p}return t.type=null,t.#t=void 0,t.#i=[e.substring(i-1)],u}static fromGlob(e,t={}){let i=new r(null,void 0,t);return r.#y(e,i,0,t),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,i,n,s]=this.toRegExpSource();if(!(n||this.#t||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let a=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#a}toRegExpSource(e){var l;let t=e??!!this.#a.dot;if(this.#e===this&&this.#m(),!this.type){let u=this.isStart()&&this.isEnd(),h=this.#i.map(d=>{let[g,y,w,S]=typeof d=="string"?r.#c(d,this.#t,u):d.toRegExpSource(e);return this.#t=this.#t||w,this.#s=this.#s||S,g}).join(""),c="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&Uy.has(this.#i[0]))){let g=By,y=t&&g.has(h.charAt(0))||h.startsWith("\\.")&&g.has(h.charAt(2))||h.startsWith("\\.\\.")&&g.has(h.charAt(4)),w=!t&&!e&&g.has(h.charAt(0));c=y?$y:w?nn:""}let f="";return this.isEnd()&&this.#e.#f&&((l=this.#o)==null?void 0:l.type)==="!"&&(f="(?:$|\\/)"),[c+h+f,Le(h),this.#t=!!this.#t,this.#s]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#d(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let u=this.toString();return this.#i=[u],this.type=null,this.#t=void 0,[u,Le(this.toString()),!1,!1]}let o=!i||e||t||!nn?"":this.#d(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#n)a=(this.isStart()&&!t?nn:"")+Fh;else{let u=this.type==="!"?"))"+(this.isStart()&&!t&&!e?nn:"")+Ih+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=n+s+u}return[a,Le(s),this.#t=!!this.#t,this.#s]}#d(e){return this.#i.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[i,n,s,o]=t.toRegExpSource(e);return this.#s=this.#s||o,i}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#c(e,t,i=!1){let n=!1,s="",o=!1;for(let a=0;a<e.length;a++){let l=e.charAt(a);if(n){n=!1,s+=(zy.has(l)?"\\":"")+l;continue}if(l==="\\"){a===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,h,c,f]=Dh(e,a);if(c){s+=u,o=o||h,a+=c-1,t=t||f;continue}}if(l==="*"){i&&e==="*"?s+=Fh:s+=Ih,t=!0;continue}if(l==="?"){s+=bo,t=!0;continue}s+=Wy(l)}return[s,Le(e),!!t,o]}};var Vt=(r,{windowsPathsNoEscape:e=!1}={})=>e?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&");var le=(r,e,t={})=>(zr(e),!t.nocomment&&e.charAt(0)==="#"?!1:new we(e,t).match(r)),Gy=/^\*+([^+@!?\*\[\(]*)$/,Hy=r=>e=>!e.startsWith(".")&&e.endsWith(r),Vy=r=>e=>e.endsWith(r),Yy=r=>(r=r.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(r)),Ky=r=>(r=r.toLowerCase(),e=>e.toLowerCase().endsWith(r)),Jy=/^\*+\.\*+$/,Qy=r=>!r.startsWith(".")&&r.includes("."),Zy=r=>r!=="."&&r!==".."&&r.includes("."),Xy=/^\.\*+$/,ew=r=>r!=="."&&r!==".."&&r.startsWith("."),tw=/^\*+$/,rw=r=>r.length!==0&&!r.startsWith("."),iw=r=>r.length!==0&&r!=="."&&r!=="..",nw=/^\?+([^+@!?\*\[\(]*)?$/,sw=([r,e=""])=>{let t=Uh([r]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},ow=([r,e=""])=>{let t=zh([r]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},aw=([r,e=""])=>{let t=zh([r]);return e?i=>t(i)&&i.endsWith(e):t},lw=([r,e=""])=>{let t=Uh([r]);return e?i=>t(i)&&i.endsWith(e):t},Uh=([r])=>{let e=r.length;return t=>t.length===e&&!t.startsWith(".")},zh=([r])=>{let e=r.length;return t=>t.length===e&&t!=="."&&t!==".."},Wh=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",jh={win32:{sep:"\\"},posix:{sep:"/"}},uw=Wh==="win32"?jh.win32.sep:jh.posix.sep;le.sep=uw;var te=Symbol("globstar **");le.GLOBSTAR=te;var hw="[^/]",fw=hw+"*?",cw="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",dw="(?:(?!(?:\\/|^)\\.).)*?",pw=(r,e={})=>t=>le(t,r,e);le.filter=pw;var xe=(r,e={})=>Object.assign({},r,e),gw=r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return le;let e=le;return Object.assign((i,n,s={})=>e(i,n,xe(r,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,xe(r,s))}static defaults(n){return e.defaults(xe(r,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,o={}){super(n,s,xe(r,o))}static fromGlob(n,s={}){return e.AST.fromGlob(n,xe(r,s))}},unescape:(i,n={})=>e.unescape(i,xe(r,n)),escape:(i,n={})=>e.escape(i,xe(r,n)),filter:(i,n={})=>e.filter(i,xe(r,n)),defaults:i=>e.defaults(xe(r,i)),makeRe:(i,n={})=>e.makeRe(i,xe(r,n)),braceExpand:(i,n={})=>e.braceExpand(i,xe(r,n)),match:(i,n,s={})=>e.match(i,n,xe(r,s)),sep:e.sep,GLOBSTAR:te})};le.defaults=gw;var Gh=(r,e={})=>(zr(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:(0,Bh.default)(r));le.braceExpand=Gh;var mw=(r,e={})=>new we(r,e).makeRe();le.makeRe=mw;var yw=(r,e,t={})=>{let i=new we(e,t);return r=r.filter(n=>i.match(n)),i.options.nonull&&!r.length&&r.push(e),r};le.match=yw;var $h=/[?*]|[+@!]\(.*?\)|\[|\]/,ww=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),we=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){zr(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||Wh,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((s,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!$h.test(s[2]))&&!$h.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(h=>this.parse(h))];if(u)return[s[0],...s.slice(1).map(h=>this.parse(h))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let n=0;n<e[i].length;n++)e[i][n]==="**"&&(e[i][n]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let i=-1;for(;(i=t.indexOf("**",i+1))!==-1;){let n=i;for(;t[n+1]==="**";)n++;n!==i&&t.splice(i,n-i)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((i,n)=>{let s=i[i.length-1];return n==="**"&&s==="**"?i:n===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(i.pop(),i):(i.push(n),i)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let s=e[n];n===1&&s===""&&e[0]===""||(s==="."||s==="")&&(t=!0,e.splice(n,1),n--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let n=e[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(t=!0,e.splice(i-1,2),i-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let i of e){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let o=n;for(;i[o+1]==="**";)o++;o>n&&i.splice(n+1,o-n);let a=i[n+1],l=i[n+2],u=i[n+3];if(a!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;t=!0,i.splice(n,1);let h=i.slice(0);h[n]="**",e.push(h),n--}if(!this.preserveMultipleSlashes){for(let o=1;o<i.length-1;o++){let a=i[o];o===1&&a===""&&i[0]===""||(a==="."||a==="")&&(t=!0,i.splice(o,1),o--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(t=!0,i.pop())}let s=0;for(;(s=i.indexOf("..",s+1))!==-1;){let o=i[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let l=s===1&&i[s+1]==="**"?["."]:[];i.splice(s-1,2,...l),i.length===0&&i.push(""),s-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let i=t+1;i<e.length;i++){let n=this.partsMatch(e[t],e[i],!this.preserveMultipleSlashes);if(n){e[t]=[],e[i]=n;break}}return e.filter(t=>t.length)}partsMatch(e,t,i=!1){let n=0,s=0,o=[],a="";for(;n<e.length&&s<t.length;)if(e[n]===t[s])o.push(a==="b"?t[s]:e[n]),n++,s++;else if(i&&e[n]==="**"&&t[s]===e[n+1])o.push(e[n]),n++;else if(i&&t[s]==="**"&&e[n]===t[s+1])o.push(t[s]),s++;else if(e[n]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(a==="b")return!1;a="a",o.push(e[n]),n++,s++}else if(t[s]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(a==="a")return!1;a="b",o.push(t[s]),n++,s++}else return!1;return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)t=!t,i++;i&&(this.pattern=e.slice(i)),this.negate=t}matchOne(e,t,i=!1){let n=this.options;if(this.isWindows){let g=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),y=!g&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),w=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),S=!w&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),b=y?3:g?0:void 0,_=S?3:w?0:void 0;if(typeof b=="number"&&typeof _=="number"){let[C,M]=[e[b],t[_]];C.toLowerCase()===M.toLowerCase()&&(t[_]=C,_>b?t=t.slice(_):b>_&&(e=e.slice(b)))}}let{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,a=0,l=e.length,u=t.length;o<l&&a<u;o++,a++){this.debug("matchOne loop");var h=t[a],c=e[o];if(this.debug(t,h,c),h===!1)return!1;if(h===te){this.debug("GLOBSTAR",[t,h,c]);var f=o,p=a+1;if(p===u){for(this.debug("** at the end");o<l;o++)if(e[o]==="."||e[o]===".."||!n.dot&&e[o].charAt(0)===".")return!1;return!0}for(;f<l;){var d=e[f];if(this.debug(`
63
63
  globstar while`,e,f,t,p,d),this.matchOne(e.slice(f),t.slice(p),i))return this.debug("globstar found match!",f,l,d),!0;if(d==="."||d===".."||!n.dot&&d.charAt(0)==="."){this.debug("dot detected!",e,f,t,p);break}this.debug("globstar swallow a segment, and continue"),f++}return!!(i&&(this.debug(`
64
- >>> no match, partial?`,e,f,t,p),f===l))}let g;if(typeof h=="string"?(g=c===h,this.debug("string match",h,c,g)):(g=h.test(c),this.debug("pattern match",h,c,g)),!g)return!1}if(o===l&&a===u)return!0;if(o===l)return i;if(a===u)return o===l-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return Gh(this.pattern,this.options)}parse(e){zr(e);let t=this.options;if(e==="**")return te;if(e==="")return"";let i,n=null;(i=e.match(tw))?n=t.dot?iw:rw:(i=e.match(Gy))?n=(t.nocase?t.dot?Ky:Yy:t.dot?Vy:Hy)(i[1]):(i=e.match(nw))?n=(t.nocase?t.dot?ow:sw:t.dot?aw:lw)(i):(i=e.match(Jy))?n=t.dot?Zy:Qy:(i=e.match(Xy))&&(n=ew);let s=Ht.fromGlob(e,this.options).toMMPattern();return n&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:n}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,i=t.noglobstar?fw:t.dot?cw:dw,n=new Set(t.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(h=>{if(h instanceof RegExp)for(let c of h.flags.split(""))n.add(c);return typeof h=="string"?ww(h):h===te?te:h._src});return u.forEach((h,c)=>{let f=u[c+1],p=u[c-1];h!==te||p===te||(p===void 0?f!==void 0&&f!==te?u[c+1]="(?:\\/|"+i+"\\/)?"+f:u[c]=i:f===void 0?u[c-1]=p+"(?:\\/|"+i+")?":f!==te&&(u[c-1]=p+"(?:\\/|\\/"+i+"\\/)"+f,u[c+1]=te))}),u.filter(h=>h!==te).join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let s=this.set;this.debug(this.pattern,"set",s);let o=n[n.length-1];if(!o)for(let a=n.length-2;!o&&a>=0;a--)o=n[a];for(let a=0;a<s.length;a++){let l=s[a],u=n;if(i.matchBase&&l.length===1&&(u=[o]),this.matchOne(u,l,t))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return le.defaults(e).Minimatch}};le.AST=Ht;le.Minimatch=we;le.escape=Vt;le.unescape=Le;var yf=require("node:url");var Yt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Yh=new Set,So=typeof process=="object"&&process?process:{},Kh=(r,e,t,i)=>{typeof So.emitWarning=="function"?So.emitWarning(r,e,t,i):console.error(`[${t}] ${e}: ${r}`)},sn=globalThis.AbortController,Hh=globalThis.AbortSignal,Vh;if(typeof sn>"u"){Hh=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},sn=class{constructor(){e()}signal=new Hh;abort(i){var n,s;if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let o of this.signal._onabort)o(i);(s=(n=this.signal).onabort)==null||s.call(n,i)}}};let r=((Vh=So.env)==null?void 0:Vh.LRU_CACHE_IGNORE_AC_WARNING)!=="1",e=()=>{r&&(r=!1,Kh("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var vw=r=>!Yh.has(r),YE=Symbol("type"),it=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),Jh=r=>it(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?Kt:null:null,Kt=class extends Array{constructor(e){super(e),this.fill(0)}},_o=class r{heap;length;static#e=!1;static create(e){let t=Jh(e);if(!t)return[];r.#e=!0;let i=new r(e,t);return r.#e=!1,i}constructor(e,t){if(!r.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Gr=class r{#e;#t;#s;#i;#o;#b;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#f;#a;#l;#n;#m;#y;#d;#c;#x;#g;#E;#O;#v;#S;#_;#p;static unsafeExposeInternals(e){return{starts:e.#O,ttls:e.#v,sizes:e.#E,keyMap:e.#a,keyList:e.#l,valList:e.#n,next:e.#m,prev:e.#y,get head(){return e.#d},get tail(){return e.#c},free:e.#x,isBackgroundFetch:t=>e.#h(t),backgroundFetch:(t,i,n,s)=>e.#F(t,i,n,s),moveToTail:t=>e.#$(t),indexes:t=>e.#R(t),rindexes:t=>e.#M(t),isStale:t=>e.#w(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#f}get size(){return this.#u}get fetchMethod(){return this.#o}get memoMethod(){return this.#b}get dispose(){return this.#s}get disposeAfter(){return this.#i}constructor(e){let{max:t=0,ttl:i,ttlResolution:n=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:u,disposeAfter:h,noDisposeOnSet:c,noUpdateTTL:f,maxSize:p=0,maxEntrySize:d=0,sizeCalculation:g,fetchMethod:y,memoMethod:w,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:_,allowStaleOnFetchAbort:C,ignoreFetchAbort:M}=e;if(t!==0&&!it(t))throw new TypeError("max option must be a nonnegative integer");let T=t?Jh(t):Array;if(!T)throw new Error("invalid max value: "+t);if(this.#e=t,this.#t=p,this.maxEntrySize=d||this.#t,this.sizeCalculation=g,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#b=w,y!==void 0&&typeof y!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=y,this.#_=!!y,this.#a=new Map,this.#l=new Array(t).fill(void 0),this.#n=new Array(t).fill(void 0),this.#m=new T(t),this.#y=new T(t),this.#d=0,this.#c=0,this.#x=_o.create(t),this.#u=0,this.#f=0,typeof u=="function"&&(this.#s=u),typeof h=="function"?(this.#i=h,this.#g=[]):(this.#i=void 0,this.#g=void 0),this.#S=!!this.#s,this.#p=!!this.#i,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!_,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!M,this.maxEntrySize!==0){if(this.#t!==0&&!it(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!it(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#T()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=it(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!it(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#A()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let q="LRU_CACHE_UNBOUNDED";vw(q)&&(Yh.add(q),Kh("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",q,r))}}getRemainingTTL(e){return this.#a.has(e)?1/0:0}#A(){let e=new Kt(this.#e),t=new Kt(this.#e);this.#v=e,this.#O=t,this.#q=(s,o,a=Yt.now())=>{if(t[s]=o!==0?a:0,e[s]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#w(s)&&this.#L(this.#l[s],"expire")},o+1);l.unref&&l.unref()}},this.#C=s=>{t[s]=e[s]!==0?Yt.now():0},this.#r=(s,o)=>{if(e[o]){let a=e[o],l=t[o];if(!a||!l)return;s.ttl=a,s.start=l,s.now=i||n();let u=s.now-l;s.remainingTTL=a-u}};let i=0,n=()=>{let s=Yt.now();if(this.ttlResolution>0){i=s;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return s};this.getRemainingTTL=s=>{let o=this.#a.get(s);if(o===void 0)return 0;let a=e[o],l=t[o];if(!a||!l)return 1/0;let u=(i||n())-l;return a-u},this.#w=s=>{let o=t[s],a=e[s];return!!a&&!!o&&(i||n())-o>a}}#C=()=>{};#r=()=>{};#q=()=>{};#w=()=>!1;#T(){let e=new Kt(this.#e);this.#f=0,this.#E=e,this.#N=t=>{this.#f-=e[t],e[t]=0},this.#D=(t,i,n,s)=>{if(this.#h(i))return 0;if(!it(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,t),!it(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return n},this.#P=(t,i,n)=>{if(e[t]=i,this.#t){let s=this.#t-e[t];for(;this.#f>s;)this.#I(!0)}this.#f+=e[t],n&&(n.entrySize=i,n.totalCalculatedSize=this.#f)}}#N=e=>{};#P=(e,t,i)=>{};#D=(e,t,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:e=this.allowStale}={}){if(this.#u)for(let t=this.#c;!(!this.#k(t)||((e||!this.#w(t))&&(yield t),t===this.#d));)t=this.#y[t]}*#M({allowStale:e=this.allowStale}={}){if(this.#u)for(let t=this.#d;!(!this.#k(t)||((e||!this.#w(t))&&(yield t),t===this.#c));)t=this.#m[t]}#k(e){return e!==void 0&&this.#a.get(this.#l[e])===e}*entries(){for(let e of this.#R())this.#n[e]!==void 0&&this.#l[e]!==void 0&&!this.#h(this.#n[e])&&(yield[this.#l[e],this.#n[e]])}*rentries(){for(let e of this.#M())this.#n[e]!==void 0&&this.#l[e]!==void 0&&!this.#h(this.#n[e])&&(yield[this.#l[e],this.#n[e]])}*keys(){for(let e of this.#R()){let t=this.#l[e];t!==void 0&&!this.#h(this.#n[e])&&(yield t)}}*rkeys(){for(let e of this.#M()){let t=this.#l[e];t!==void 0&&!this.#h(this.#n[e])&&(yield t)}}*values(){for(let e of this.#R())this.#n[e]!==void 0&&!this.#h(this.#n[e])&&(yield this.#n[e])}*rvalues(){for(let e of this.#M())this.#n[e]!==void 0&&!this.#h(this.#n[e])&&(yield this.#n[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#R()){let n=this.#n[i],s=this.#h(n)?n.__staleWhileFetching:n;if(s!==void 0&&e(s,this.#l[i],this))return this.get(this.#l[i],t)}}forEach(e,t=this){for(let i of this.#R()){let n=this.#n[i],s=this.#h(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(t,s,this.#l[i],this)}}rforEach(e,t=this){for(let i of this.#M()){let n=this.#n[i],s=this.#h(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(t,s,this.#l[i],this)}}purgeStale(){let e=!1;for(let t of this.#M({allowStale:!0}))this.#w(t)&&(this.#L(this.#l[t],"expire"),e=!0);return e}info(e){let t=this.#a.get(e);if(t===void 0)return;let i=this.#n[t],n=this.#h(i)?i.__staleWhileFetching:i;if(n===void 0)return;let s={value:n};if(this.#v&&this.#O){let o=this.#v[t],a=this.#O[t];if(o&&a){let l=o-(Yt.now()-a);s.ttl=l,s.start=Date.now()}}return this.#E&&(s.size=this.#E[t]),s}dump(){let e=[];for(let t of this.#R({allowStale:!0})){let i=this.#l[t],n=this.#n[t],s=this.#h(n)?n.__staleWhileFetching:n;if(s===void 0||i===void 0)continue;let o={value:s};if(this.#v&&this.#O){o.ttl=this.#v[t];let a=Yt.now()-this.#O[t];o.start=Math.floor(Date.now()-a)}this.#E&&(o.size=this.#E[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let n=Date.now()-i.start;i.start=Yt.now()-n}this.set(t,i.value,i)}}set(e,t,i={}){var f,p,d,g,y;if(t===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:s,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,h=this.#D(e,t,i.size||0,a);if(this.maxEntrySize&&h>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#L(e,"set"),this;let c=this.#u===0?void 0:this.#a.get(e);if(c===void 0)c=this.#u===0?this.#c:this.#x.length!==0?this.#x.pop():this.#u===this.#e?this.#I(!1):this.#u,this.#l[c]=e,this.#n[c]=t,this.#a.set(e,c),this.#m[this.#c]=c,this.#y[c]=this.#c,this.#c=c,this.#u++,this.#P(c,h,l),l&&(l.set="add"),u=!1;else{this.#$(c);let w=this.#n[c];if(t!==w){if(this.#_&&this.#h(w)){w.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:S}=w;S!==void 0&&!o&&(this.#S&&((f=this.#s)==null||f.call(this,S,e,"set")),this.#p&&((p=this.#g)==null||p.push([S,e,"set"])))}else o||(this.#S&&((d=this.#s)==null||d.call(this,w,e,"set")),this.#p&&((g=this.#g)==null||g.push([w,e,"set"])));if(this.#N(c),this.#P(c,h,l),this.#n[c]=t,l){l.set="replace";let S=w&&this.#h(w)?w.__staleWhileFetching:w;S!==void 0&&(l.oldValue=S)}}else l&&(l.set="update")}if(n!==0&&!this.#v&&this.#A(),this.#v&&(u||this.#q(c,n,s),l&&this.#r(l,c)),!o&&this.#p&&this.#g){let w=this.#g,S;for(;S=w==null?void 0:w.shift();)(y=this.#i)==null||y.call(this,...S)}return this}pop(){var e;try{for(;this.#u;){let t=this.#n[this.#d];if(this.#I(!0),this.#h(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#p&&this.#g){let t=this.#g,i;for(;i=t==null?void 0:t.shift();)(e=this.#i)==null||e.call(this,...i)}}}#I(e){var s,o;let t=this.#d,i=this.#l[t],n=this.#n[t];return this.#_&&this.#h(n)?n.__abortController.abort(new Error("evicted")):(this.#S||this.#p)&&(this.#S&&((s=this.#s)==null||s.call(this,n,i,"evict")),this.#p&&((o=this.#g)==null||o.push([n,i,"evict"]))),this.#N(t),e&&(this.#l[t]=void 0,this.#n[t]=void 0,this.#x.push(t)),this.#u===1?(this.#d=this.#c=0,this.#x.length=0):this.#d=this.#m[t],this.#a.delete(i),this.#u--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=t,s=this.#a.get(e);if(s!==void 0){let o=this.#n[s];if(this.#h(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#w(s))n&&(n.has="stale",this.#r(n,s));else return i&&this.#C(s),n&&(n.has="hit",this.#r(n,s)),!0}else n&&(n.has="miss");return!1}peek(e,t={}){let{allowStale:i=this.allowStale}=t,n=this.#a.get(e);if(n===void 0||!i&&this.#w(n))return;let s=this.#n[n];return this.#h(s)?s.__staleWhileFetching:s}#F(e,t,i,n){let s=t===void 0?void 0:this.#n[t];if(this.#h(s))return s;let o=new sn,{signal:a}=i;a==null||a.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:i,context:n},u=(g,y=!1)=>{let{aborted:w}=o.signal,S=i.ignoreFetchAbort&&g!==void 0;if(i.status&&(w&&!y?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,S&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),w&&!S&&!y)return c(o.signal.reason);let b=p;return this.#n[t]===p&&(g===void 0?b.__staleWhileFetching?this.#n[t]=b.__staleWhileFetching:this.#L(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,g,l.options))),g},h=g=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=g),c(g)),c=g=>{let{aborted:y}=o.signal,w=y&&i.allowStaleOnFetchAbort,S=w||i.allowStaleOnFetchRejection,b=S||i.noDeleteOnFetchRejection,_=p;if(this.#n[t]===p&&(!b||_.__staleWhileFetching===void 0?this.#L(e,"fetch"):w||(this.#n[t]=_.__staleWhileFetching)),S)return i.status&&_.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),_.__staleWhileFetching;if(_.__returned===_)throw g},f=(g,y)=>{var S;let w=(S=this.#o)==null?void 0:S.call(this,e,s,l);w&&w instanceof Promise&&w.then(b=>g(b===void 0?void 0:b),y),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(g(void 0),i.allowStaleOnFetchAbort&&(g=b=>u(b,!0)))})};i.status&&(i.status.fetchDispatched=!0);let p=new Promise(f).then(u,h),d=Object.assign(p,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.set(e,d,{...l.options,status:void 0}),t=this.#a.get(e)):this.#n[t]=d,d}#h(e){if(!this.#_)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof sn}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:g,forceRefresh:y=!1,status:w,signal:S}=t;if(!this.#_)return w&&(w.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:w});let b={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:u,noUpdateTTL:h,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:d,ignoreFetchAbort:p,status:w,signal:S},_=this.#a.get(e);if(_===void 0){w&&(w.fetch="miss");let C=this.#F(e,_,b,g);return C.__returned=C}else{let C=this.#n[_];if(this.#h(C)){let j=i&&C.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",j&&(w.returnedStale=!0)),j?C.__staleWhileFetching:C.__returned=C}let M=this.#w(_);if(!y&&!M)return w&&(w.fetch="hit"),this.#$(_),n&&this.#C(_),w&&this.#r(w,_),C;let T=this.#F(e,_,b,g),R=T.__staleWhileFetching!==void 0&&i;return w&&(w.fetch=M?"stale":"refresh",R&&M&&(w.returnedStale=!0)),R?T.__staleWhileFetching:T.__returned=T}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#b;if(!i)throw new Error("no memoMethod provided to constructor");let{context:n,forceRefresh:s,...o}=t,a=this.get(e,o);if(!s&&a!==void 0)return a;let l=i(e,a,{options:o,context:n});return this.set(e,l,o),l}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=t,a=this.#a.get(e);if(a!==void 0){let l=this.#n[a],u=this.#h(l);return o&&this.#r(o,a),this.#w(a)?(o&&(o.get="stale"),u?(o&&i&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),i?l.__staleWhileFetching:void 0):(s||this.#L(e,"expire"),o&&i&&(o.returnedStale=!0),i?l:void 0)):(o&&(o.get="hit"),u?l.__staleWhileFetching:(this.#$(a),n&&this.#C(a),l))}else o&&(o.get="miss")}#j(e,t){this.#y[t]=e,this.#m[e]=t}#$(e){e!==this.#c&&(e===this.#d?this.#d=this.#m[e]:this.#j(this.#y[e],this.#m[e]),this.#j(this.#c,e),this.#c=e)}delete(e){return this.#L(e,"delete")}#L(e,t){var n,s,o,a;let i=!1;if(this.#u!==0){let l=this.#a.get(e);if(l!==void 0)if(i=!0,this.#u===1)this.#B(t);else{this.#N(l);let u=this.#n[l];if(this.#h(u)?u.__abortController.abort(new Error("deleted")):(this.#S||this.#p)&&(this.#S&&((n=this.#s)==null||n.call(this,u,e,t)),this.#p&&((s=this.#g)==null||s.push([u,e,t]))),this.#a.delete(e),this.#l[l]=void 0,this.#n[l]=void 0,l===this.#c)this.#c=this.#y[l];else if(l===this.#d)this.#d=this.#m[l];else{let h=this.#y[l];this.#m[h]=this.#m[l];let c=this.#m[l];this.#y[c]=this.#y[l]}this.#u--,this.#x.push(l)}}if(this.#p&&((o=this.#g)!=null&&o.length)){let l=this.#g,u;for(;u=l==null?void 0:l.shift();)(a=this.#i)==null||a.call(this,...u)}return i}clear(){return this.#B("delete")}#B(e){var t,i,n;for(let s of this.#M({allowStale:!0})){let o=this.#n[s];if(this.#h(o))o.__abortController.abort(new Error("deleted"));else{let a=this.#l[s];this.#S&&((t=this.#s)==null||t.call(this,o,a,e)),this.#p&&((i=this.#g)==null||i.push([o,a,e]))}}if(this.#a.clear(),this.#n.fill(void 0),this.#l.fill(void 0),this.#v&&this.#O&&(this.#v.fill(0),this.#O.fill(0)),this.#E&&this.#E.fill(0),this.#d=0,this.#c=0,this.#x.length=0,this.#f=0,this.#u=0,this.#p&&this.#g){let s=this.#g,o;for(;o=s==null?void 0:s.shift();)(n=this.#i)==null||n.call(this,...o)}}};var Zt=require("node:path"),af=require("node:url"),Ue=require("fs"),Aw=vr(require("node:fs"),1),ot=require("node:fs/promises");var cn=require("node:events"),Ao=vr(require("node:stream"),1),tf=require("node:string_decoder"),Qh=typeof process=="object"&&process?process:{stdout:null,stderr:null},bw=r=>!!r&&typeof r=="object"&&(r instanceof st||r instanceof Ao.default||Sw(r)||_w(r)),Sw=r=>!!r&&typeof r=="object"&&r instanceof cn.EventEmitter&&typeof r.pipe=="function"&&r.pipe!==Ao.default.Writable.prototype.pipe,_w=r=>!!r&&typeof r=="object"&&r instanceof cn.EventEmitter&&typeof r.write=="function"&&typeof r.end=="function",Je=Symbol("EOF"),Qe=Symbol("maybeEmitEnd"),nt=Symbol("emittedEnd"),on=Symbol("emittingEnd"),Hr=Symbol("emittedError"),an=Symbol("closed"),Zh=Symbol("read"),ln=Symbol("flush"),Xh=Symbol("flushChunk"),qe=Symbol("encoding"),Jt=Symbol("decoder"),Y=Symbol("flowing"),Vr=Symbol("paused"),Qt=Symbol("resume"),K=Symbol("buffer"),ue=Symbol("pipes"),J=Symbol("bufferLength"),xo=Symbol("bufferPush"),un=Symbol("bufferShift"),se=Symbol("objectMode"),W=Symbol("destroyed"),Eo=Symbol("error"),Oo=Symbol("emitData"),ef=Symbol("emitEnd"),Co=Symbol("emitEnd2"),$e=Symbol("async"),Ro=Symbol("abort"),hn=Symbol("aborted"),Yr=Symbol("signal"),bt=Symbol("dataListeners"),ve=Symbol("discarded"),Kr=r=>Promise.resolve().then(r),xw=r=>r(),Ew=r=>r==="end"||r==="finish"||r==="prefinish",Ow=r=>r instanceof ArrayBuffer||!!r&&typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,Cw=r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r),fn=class{src;dest;opts;ondrain;constructor(e,t,i){this.src=e,this.dest=t,this.opts=i,this.ondrain=()=>e[Qt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Mo=class extends fn{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,i){super(e,t,i),this.proxyErrors=n=>t.emit("error",n),e.on("error",this.proxyErrors)}},Rw=r=>!!r.objectMode,Mw=r=>!r.objectMode&&!!r.encoding&&r.encoding!=="buffer",st=class extends cn.EventEmitter{[Y]=!1;[Vr]=!1;[ue]=[];[K]=[];[se];[qe];[$e];[Jt];[Je]=!1;[nt]=!1;[on]=!1;[an]=!1;[Hr]=null;[J]=0;[W]=!1;[Yr];[hn]=!1;[bt]=0;[ve]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Rw(t)?(this[se]=!0,this[qe]=null):Mw(t)?(this[qe]=t.encoding,this[se]=!1):(this[se]=!1,this[qe]=null),this[$e]=!!t.async,this[Jt]=this[qe]?new tf.StringDecoder(this[qe]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[K]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[ue]});let{signal:i}=t;i&&(this[Yr]=i,i.aborted?this[Ro]():i.addEventListener("abort",()=>this[Ro]()))}get bufferLength(){return this[J]}get encoding(){return this[qe]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[se]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[$e]}set async(e){this[$e]=this[$e]||!!e}[Ro](){var e,t;this[hn]=!0,this.emit("abort",(e=this[Yr])==null?void 0:e.reason),this.destroy((t=this[Yr])==null?void 0:t.reason)}get aborted(){return this[hn]}set aborted(e){}write(e,t,i){var s;if(this[hn])return!1;if(this[Je])throw new Error("write after end");if(this[W])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(i=t,t="utf8"),t||(t="utf8");let n=this[$e]?Kr:xw;if(!this[se]&&!Buffer.isBuffer(e)){if(Cw(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Ow(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[se]?(this[Y]&&this[J]!==0&&this[ln](!0),this[Y]?this.emit("data",e):this[xo](e),this[J]!==0&&this.emit("readable"),i&&n(i),this[Y]):e.length?(typeof e=="string"&&!(t===this[qe]&&!((s=this[Jt])!=null&&s.lastNeed))&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[qe]&&(e=this[Jt].write(e)),this[Y]&&this[J]!==0&&this[ln](!0),this[Y]?this.emit("data",e):this[xo](e),this[J]!==0&&this.emit("readable"),i&&n(i),this[Y]):(this[J]!==0&&this.emit("readable"),i&&n(i),this[Y])}read(e){if(this[W])return null;if(this[ve]=!1,this[J]===0||e===0||e&&e>this[J])return this[Qe](),null;this[se]&&(e=null),this[K].length>1&&!this[se]&&(this[K]=[this[qe]?this[K].join(""):Buffer.concat(this[K],this[J])]);let t=this[Zh](e||null,this[K][0]);return this[Qe](),t}[Zh](e,t){if(this[se])this[un]();else{let i=t;e===i.length||e===null?this[un]():typeof i=="string"?(this[K][0]=i.slice(e),t=i.slice(0,e),this[J]-=e):(this[K][0]=i.subarray(e),t=i.subarray(0,e),this[J]-=e)}return this.emit("data",t),!this[K].length&&!this[Je]&&this.emit("drain"),t}end(e,t,i){return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t="utf8"),e!==void 0&&this.write(e,t),i&&this.once("end",i),this[Je]=!0,this.writable=!1,(this[Y]||!this[Vr])&&this[Qe](),this}[Qt](){this[W]||(!this[bt]&&!this[ue].length&&(this[ve]=!0),this[Vr]=!1,this[Y]=!0,this.emit("resume"),this[K].length?this[ln]():this[Je]?this[Qe]():this.emit("drain"))}resume(){return this[Qt]()}pause(){this[Y]=!1,this[Vr]=!0,this[ve]=!1}get destroyed(){return this[W]}get flowing(){return this[Y]}get paused(){return this[Vr]}[xo](e){this[se]?this[J]+=1:this[J]+=e.length,this[K].push(e)}[un](){return this[se]?this[J]-=1:this[J]-=this[K][0].length,this[K].shift()}[ln](e=!1){do;while(this[Xh](this[un]())&&this[K].length);!e&&!this[K].length&&!this[Je]&&this.emit("drain")}[Xh](e){return this.emit("data",e),this[Y]}pipe(e,t){if(this[W])return e;this[ve]=!1;let i=this[nt];return t=t||{},e===Qh.stdout||e===Qh.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,i?t.end&&e.end():(this[ue].push(t.proxyErrors?new Mo(this,e,t):new fn(this,e,t)),this[$e]?Kr(()=>this[Qt]()):this[Qt]()),e}unpipe(e){let t=this[ue].find(i=>i.dest===e);t&&(this[ue].length===1?(this[Y]&&this[bt]===0&&(this[Y]=!1),this[ue]=[]):this[ue].splice(this[ue].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let i=super.on(e,t);if(e==="data")this[ve]=!1,this[bt]++,!this[ue].length&&!this[Y]&&this[Qt]();else if(e==="readable"&&this[J]!==0)super.emit("readable");else if(Ew(e)&&this[nt])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Hr]){let n=t;this[$e]?Kr(()=>n.call(this,this[Hr])):n.call(this,this[Hr])}return i}removeListener(e,t){return this.off(e,t)}off(e,t){let i=super.off(e,t);return e==="data"&&(this[bt]=this.listeners("data").length,this[bt]===0&&!this[ve]&&!this[ue].length&&(this[Y]=!1)),i}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[bt]=0,!this[ve]&&!this[ue].length&&(this[Y]=!1)),t}get emittedEnd(){return this[nt]}[Qe](){!this[on]&&!this[nt]&&!this[W]&&this[K].length===0&&this[Je]&&(this[on]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[an]&&this.emit("close"),this[on]=!1)}emit(e,...t){let i=t[0];if(e!=="error"&&e!=="close"&&e!==W&&this[W])return!1;if(e==="data")return!this[se]&&!i?!1:this[$e]?(Kr(()=>this[Oo](i)),!0):this[Oo](i);if(e==="end")return this[ef]();if(e==="close"){if(this[an]=!0,!this[nt]&&!this[W])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Hr]=i,super.emit(Eo,i);let s=!this[Yr]||this.listeners("error").length?super.emit("error",i):!1;return this[Qe](),s}else if(e==="resume"){let s=super.emit("resume");return this[Qe](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,...t);return this[Qe](),n}[Oo](e){for(let i of this[ue])i.dest.write(e)===!1&&this.pause();let t=this[ve]?!1:super.emit("data",e);return this[Qe](),t}[ef](){return this[nt]?!1:(this[nt]=!0,this.readable=!1,this[$e]?(Kr(()=>this[Co]()),!0):this[Co]())}[Co](){if(this[Jt]){let t=this[Jt].end();if(t){for(let i of this[ue])i.dest.write(t);this[ve]||super.emit("data",t)}}for(let t of this[ue])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[se]||(e.dataLength=0);let t=this.promise();return this.on("data",i=>{e.push(i),this[se]||(e.dataLength+=i.length)}),await t,e}async concat(){if(this[se])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[qe]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(W,()=>t(new Error("stream destroyed"))),this.on("error",i=>t(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[ve]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[Je])return t();let s,o,a=c=>{this.off("data",l),this.off("end",u),this.off(W,h),t(),o(c)},l=c=>{this.off("error",a),this.off("end",u),this.off(W,h),this.pause(),s({value:c,done:!!this[Je]})},u=()=>{this.off("error",a),this.off("data",l),this.off(W,h),t(),s({done:!0,value:void 0})},h=()=>a(new Error("stream destroyed"));return new Promise((c,f)=>{o=f,s=c,this.once(W,h),this.once("error",a),this.once("end",u),this.once("data",l)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ve]=!1;let e=!1,t=()=>(this.pause(),this.off(Eo,t),this.off(W,t),this.off("end",t),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return t();let n=this.read();return n===null?t():{done:!1,value:n}};return this.once("end",t),this.once(Eo,t),this.once(W,t),{next:i,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[W])return e?this.emit("error",e):this.emit(W),this;this[W]=!0,this[ve]=!0,this[K].length=0,this[J]=0;let t=this;return typeof t.close=="function"&&!this[an]&&t.close(),e?this.emit("error",e):this.emit(W),this}static get isStream(){return bw}};var Tw=Ue.realpathSync.native,Qr={lstatSync:Ue.lstatSync,readdir:Ue.readdir,readdirSync:Ue.readdirSync,readlinkSync:Ue.readlinkSync,realpathSync:Tw,promises:{lstat:ot.lstat,readdir:ot.readdir,readlink:ot.readlink,realpath:ot.realpath}},lf=r=>!r||r===Qr||r===Aw?Qr:{...Qr,...r,promises:{...Qr.promises,...r.promises||{}}},uf=/^\\\\\?\\([a-z]:)\\?$/i,Lw=r=>r.replace(/\//g,"\\").replace(uf,"$1\\"),qw=/[\\\/]/,Oe=0,hf=1,ff=2,Be=4,cf=6,df=8,St=10,pf=12,Ee=15,Jr=~Ee,To=16,rf=32,Zr=64,Ne=128,dn=256,gn=512,nf=Zr|Ne|gn,Nw=1023,Lo=r=>r.isFile()?df:r.isDirectory()?Be:r.isSymbolicLink()?St:r.isCharacterDevice()?ff:r.isBlockDevice()?cf:r.isSocket()?pf:r.isFIFO()?hf:Oe,sf=new Map,Xr=r=>{let e=sf.get(r);if(e)return e;let t=r.normalize("NFKD");return sf.set(r,t),t},of=new Map,pn=r=>{let e=of.get(r);if(e)return e;let t=Xr(r.toLowerCase());return of.set(r,t),t},mn=class extends Gr{constructor(){super({max:256})}},qo=class extends Gr{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},gf=Symbol("PathScurry setAsCwd"),oe=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#s;get mode(){return this.#s}#i;get nlink(){return this.#i}#o;get uid(){return this.#o}#b;get gid(){return this.#b}#u;get rdev(){return this.#u}#f;get blksize(){return this.#f}#a;get ino(){return this.#a}#l;get size(){return this.#l}#n;get blocks(){return this.#n}#m;get atimeMs(){return this.#m}#y;get mtimeMs(){return this.#y}#d;get ctimeMs(){return this.#d}#c;get birthtimeMs(){return this.#c}#x;get atime(){return this.#x}#g;get mtime(){return this.#g}#E;get ctime(){return this.#E}#O;get birthtime(){return this.#O}#v;#S;#_;#p;#A;#C;#r;#q;#w;#T;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Oe,i,n,s,o,a){this.name=e,this.#v=s?pn(e):Xr(e),this.#r=t&Nw,this.nocase=s,this.roots=n,this.root=i||this,this.#q=o,this.#_=a.fullpath,this.#A=a.relative,this.#C=a.relativePosix,this.parent=a.parent,this.parent?this.#e=this.parent.#e:this.#e=lf(a.fs)}depth(){return this.#S!==void 0?this.#S:this.parent?this.#S=this.parent.depth()+1:this.#S=0}childrenCache(){return this.#q}resolve(e){if(!e)return this;let t=this.getRootString(e),n=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#N(n):this.#N(n)}#N(e){let t=this;for(let i of e)t=t.child(i);return t}children(){let e=this.#q.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#q.set(this,t),this.#r&=~To,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?pn(e):Xr(e);for(let l of i)if(l.#v===n)return l;let s=this.parent?this.sep:"",o=this.#_?this.#_+s+e:void 0,a=this.newChild(e,Oe,{...t,parent:this,fullpath:o});return this.canReaddir()||(a.#r|=Ne),i.push(a),a}relative(){if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let e=this.name,t=this.parent;if(!t)return this.#A=this.name;let i=t.relative();return i+(!i||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#C!==void 0)return this.#C;let e=this.name,t=this.parent;if(!t)return this.#C=this.fullpathPosix();let i=t.relativePosix();return i+(!i||!t.parent?"":"/")+e}fullpath(){if(this.#_!==void 0)return this.#_;let e=this.name,t=this.parent;if(!t)return this.#_=this.name;let n=t.fullpath()+(t.parent?this.sep:"")+e;return this.#_=n}fullpathPosix(){if(this.#p!==void 0)return this.#p;if(this.sep==="/")return this.#p=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#p=`//?/${n}`:this.#p=n}let e=this.parent,t=e.fullpathPosix(),i=t+(!t||!e.parent?"":"/")+this.name;return this.#p=i}isUnknown(){return(this.#r&Ee)===Oe}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#r&Ee)===df}isDirectory(){return(this.#r&Ee)===Be}isCharacterDevice(){return(this.#r&Ee)===ff}isBlockDevice(){return(this.#r&Ee)===cf}isFIFO(){return(this.#r&Ee)===hf}isSocket(){return(this.#r&Ee)===pf}isSymbolicLink(){return(this.#r&St)===St}lstatCached(){return this.#r&rf?this:void 0}readlinkCached(){return this.#w}realpathCached(){return this.#T}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#w)return!0;if(!this.parent)return!1;let e=this.#r&Ee;return!(e!==Oe&&e!==St||this.#r&dn||this.#r&Ne)}calledReaddir(){return!!(this.#r&To)}isENOENT(){return!!(this.#r&Ne)}isNamed(e){return this.nocase?this.#v===pn(e):this.#v===Xr(e)}async readlink(){var t;let e=this.#w;if(e)return e;if(this.canReadlink()&&this.parent)try{let i=await this.#e.promises.readlink(this.fullpath()),n=(t=await this.parent.realpath())==null?void 0:t.resolve(i);if(n)return this.#w=n}catch(i){this.#h(i.code);return}}readlinkSync(){var t;let e=this.#w;if(e)return e;if(this.canReadlink()&&this.parent)try{let i=this.#e.readlinkSync(this.fullpath()),n=(t=this.parent.realpathSync())==null?void 0:t.resolve(i);if(n)return this.#w=n}catch(i){this.#h(i.code);return}}#P(e){this.#r|=To;for(let t=e.provisional;t<e.length;t++){let i=e[t];i&&i.#D()}}#D(){this.#r&Ne||(this.#r=(this.#r|Ne)&Jr,this.#R())}#R(){let e=this.children();e.provisional=0;for(let t of e)t.#D()}#M(){this.#r|=gn,this.#k()}#k(){if(this.#r&Zr)return;let e=this.#r;(e&Ee)===Be&&(e&=Jr),this.#r=e|Zr,this.#R()}#I(e=""){e==="ENOTDIR"||e==="EPERM"?this.#k():e==="ENOENT"?this.#D():this.children().provisional=0}#F(e=""){e==="ENOTDIR"?this.parent.#k():e==="ENOENT"&&this.#D()}#h(e=""){let t=this.#r;t|=dn,e==="ENOENT"&&(t|=Ne),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Jr),this.#r=t,e==="ENOTDIR"&&this.parent&&this.parent.#k()}#j(e,t){return this.#L(e,t)||this.#$(e,t)}#$(e,t){let i=Lo(e),n=this.newChild(e.name,i,{parent:this}),s=n.#r&Ee;return s!==Be&&s!==St&&s!==Oe&&(n.#r|=Zr),t.unshift(n),t.provisional++,n}#L(e,t){for(let i=t.provisional;i<t.length;i++){let n=t[i];if((this.nocase?pn(e.name):Xr(e.name))===n.#v)return this.#B(e,n,i,t)}}#B(e,t,i,n){let s=t.name;return t.#r=t.#r&Jr|Lo(e),s!==e.name&&(t.name=e.name),i!==n.provisional&&(i===n.length-1?n.pop():n.splice(i,1),n.unshift(t)),n.provisional++,t}async lstat(){if((this.#r&Ne)===0)try{return this.#G(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#F(e.code)}}lstatSync(){if((this.#r&Ne)===0)try{return this.#G(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#F(e.code)}}#G(e){let{atime:t,atimeMs:i,birthtime:n,birthtimeMs:s,blksize:o,blocks:a,ctime:l,ctimeMs:u,dev:h,gid:c,ino:f,mode:p,mtime:d,mtimeMs:g,nlink:y,rdev:w,size:S,uid:b}=e;this.#x=t,this.#m=i,this.#O=n,this.#c=s,this.#f=o,this.#n=a,this.#E=l,this.#d=u,this.#t=h,this.#b=c,this.#a=f,this.#s=p,this.#g=d,this.#y=g,this.#i=y,this.#u=w,this.#l=S,this.#o=b;let _=Lo(e);this.#r=this.#r&Jr|_|rf,_!==Oe&&_!==Be&&_!==St&&(this.#r|=Zr)}#z=[];#W=!1;#H(e){this.#W=!1;let t=this.#z.slice();this.#z.length=0,t.forEach(i=>i(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let s=i.slice(0,i.provisional);t?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#z.push(e),this.#W)return;this.#W=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(s,o)=>{if(s)this.#I(s.code),i.provisional=0;else{for(let a of o)this.#j(a,i);this.#P(i)}this.#H(i.slice(0,i.provisional))})}#U;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#U)await this.#U;else{let i=()=>{};this.#U=new Promise(n=>i=n);try{for(let n of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#j(n,e);this.#P(e)}catch(n){this.#I(n.code),e.provisional=0}this.#U=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let i of this.#e.readdirSync(t,{withFileTypes:!0}))this.#j(i,e);this.#P(e)}catch(i){this.#I(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#r&nf)return!1;let e=Ee&this.#r;return e===Oe||e===Be||e===St}shouldWalk(e,t){return(this.#r&Be)===Be&&!(this.#r&nf)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#T)return this.#T;if(!((gn|dn|Ne)&this.#r))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#T=this.resolve(e)}catch{this.#M()}}realpathSync(){if(this.#T)return this.#T;if(!((gn|dn|Ne)&this.#r))try{let e=this.#e.realpathSync(this.fullpath());return this.#T=this.resolve(e)}catch{this.#M()}}[gf](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),i=[],n=this;for(;n&&n.parent;)t.add(n),n.#A=i.join(this.sep),n.#C=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!t.has(n);)n.#A=void 0,n.#C=void 0,n=n.parent}},yn=class r extends oe{sep="\\";splitSep=qw;constructor(e,t=Oe,i,n,s,o,a){super(e,t,i,n,s,o,a)}newChild(e,t=Oe,i={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Zt.win32.parse(e).root}getRoot(e){if(e=Lw(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,i]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=i;return this.roots[e]=new Xt(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(uf,"$1\\"),e===t}},wn=class r extends oe{splitSep="/";sep="/";constructor(e,t=Oe,i,n,s,o,a){super(e,t,i,n,s,o,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Oe,i={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}},vn=class{root;rootPath;roots;cwd;#e;#t;#s;nocase;#i;constructor(e=process.cwd(),t,i,{nocase:n,childrenCacheSize:s=16*1024,fs:o=Qr}={}){this.#i=lf(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,af.fileURLToPath)(e));let a=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#e=new mn,this.#t=new mn,this.#s=new qo(s);let l=a.substring(this.rootPath.length).split(i);if(l.length===1&&!l[0]&&l.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#i),this.roots[this.rootPath]=this.root;let u=this.root,h=l.length-1,c=t.sep,f=this.rootPath,p=!1;for(let d of l){let g=h--;u=u.child(d,{relative:new Array(g).fill("..").join(c),relativePosix:new Array(g).fill("..").join("/"),fullpath:f+=(p?"":c)+d}),p=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#s}resolve(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let i=this.#e.get(t);if(i!==void 0)return i;let n=this.cwd.resolve(t).fullpath();return this.#e.set(t,n),n}resolvePosix(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let i=this.#t.get(t);if(i!==void 0)return i;let n=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,n),n}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd);let{withFileTypes:i}=t;if(e.canReaddir()){let n=await e.readdir();return i?n:n.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd);let{withFileTypes:i=!0}=t;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(n=>n.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e.withFileTypes,e=this.cwd);let i=await e.readlink();return t?i:i==null?void 0:i.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return t?i:i==null?void 0:i.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e.withFileTypes,e=this.cwd);let i=await e.realpath();return t?i:i==null?void 0:i.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return t?i:i==null?void 0:i.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=t,a=[];(!s||s(e))&&a.push(i?e:e.fullpath());let l=new Set,u=(c,f)=>{l.add(c),c.readdirCB((p,d)=>{if(p)return f(p);let g=d.length;if(!g)return f();let y=()=>{--g===0&&f()};for(let w of d)(!s||s(w))&&a.push(i?w:w.fullpath()),n&&w.isSymbolicLink()?w.realpath().then(S=>S!=null&&S.isUnknown()?S.lstat():S).then(S=>S!=null&&S.shouldWalk(l,o)?u(S,y):y()):w.shouldWalk(l,o)?u(w,y):y()},!0)},h=e;return new Promise((c,f)=>{u(h,p=>{if(p)return f(p);c(a)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=t,a=[];(!s||s(e))&&a.push(i?e:e.fullpath());let l=new Set([e]);for(let u of l){let h=u.readdirSync();for(let c of h){(!s||s(c))&&a.push(i?c:c.fullpath());let f=c;if(c.isSymbolicLink()){if(!(n&&(f=c.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(l,o)&&l.add(f)}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=t;(!s||s(e))&&(yield i?e:e.fullpath());let a=new Set([e]);for(let l of a){let u=l.readdirSync();for(let h of u){(!s||s(h))&&(yield i?h:h.fullpath());let c=h;if(h.isSymbolicLink()){if(!(n&&(c=h.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(a,o)&&a.add(c)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=t,a=new st({objectMode:!0});(!s||s(e))&&a.write(i?e:e.fullpath());let l=new Set,u=[e],h=0,c=()=>{let f=!1;for(;!f;){let p=u.shift();if(!p){h===0&&a.end();return}h++,l.add(p);let d=(y,w,S=!1)=>{if(y)return a.emit("error",y);if(n&&!S){let b=[];for(let _ of w)_.isSymbolicLink()&&b.push(_.realpath().then(C=>C!=null&&C.isUnknown()?C.lstat():C));if(b.length){Promise.all(b).then(()=>d(null,w,!0));return}}for(let b of w)b&&(!s||s(b))&&(a.write(i?b:b.fullpath())||(f=!0));h--;for(let b of w){let _=b.realpathCached()||b;_.shouldWalk(l,o)&&u.push(_)}f&&!a.flowing?a.once("drain",c):g||c()},g=!0;p.readdirCB(d,!0),g=!1}};return c(),a}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=t,a=new st({objectMode:!0}),l=new Set;(!s||s(e))&&a.write(i?e:e.fullpath());let u=[e],h=0,c=()=>{let f=!1;for(;!f;){let p=u.shift();if(!p){h===0&&a.end();return}h++,l.add(p);let d=p.readdirSync();for(let g of d)(!s||s(g))&&(a.write(i?g:g.fullpath())||(f=!0));h--;for(let g of d){let y=g;if(g.isSymbolicLink()){if(!(n&&(y=g.realpathSync())))continue;y.isUnknown()&&y.lstatSync()}y.shouldWalk(l,o)&&u.push(y)}}f&&!a.flowing&&a.once("drain",c)};return c(),a}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[gf](t)}},Xt=class extends vn{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,Zt.win32,"\\",{...t,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return Zt.win32.parse(e).root.toUpperCase()}newRoot(e){return new yn(this.rootPath,Be,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},er=class extends vn{sep="/";constructor(e=process.cwd(),t={}){let{nocase:i=!1}=t;super(e,Zt.posix,"/",{...t,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new wn(this.rootPath,Be,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},ei=class extends er{constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,{...t,nocase:i})}},XE=process.platform==="win32"?yn:wn,mf=process.platform==="win32"?Xt:process.platform==="darwin"?ei:er;var Pw=r=>r.length>=1,Dw=r=>r.length>=1,tr=class r{#e;#t;#s;length;#i;#o;#b;#u;#f;#a;#l=!0;constructor(e,t,i,n){if(!Pw(e))throw new TypeError("empty pattern list");if(!Dw(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=t,this.#s=i,this.#i=n,this.#s===0){if(this.isUNC()){let[s,o,a,l,...u]=this.#e,[h,c,f,p,...d]=this.#t;u[0]===""&&(u.shift(),d.shift());let g=[s,o,a,l,""].join("/"),y=[h,c,f,p,""].join("/");this.#e=[g,...u],this.#t=[y,...d],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#e,[a,...l]=this.#t;o[0]===""&&(o.shift(),l.shift());let u=s+"/",h=a+"/";this.#e=[u,...o],this.#t=[h,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#s]}isString(){return typeof this.#e[this.#s]=="string"}isGlobstar(){return this.#e[this.#s]===te}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#b=this.#b||(this.#s===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new r(this.#e,this.#t,this.#s+1,this.#i),this.#o.#a=this.#a,this.#o.#f=this.#f,this.#o.#u=this.#u,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#f!==void 0?this.#f:this.#f=this.#i==="win32"&&this.#s===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#u!==void 0?this.#u:this.#u=this.#i==="win32"&&this.#s===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#s===0?e:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}};var kw=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",rr=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:i,noext:n,noglobstar:s,platform:o=kw}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let a of e)this.add(a)}add(e){let t=new we(e,this.mmopts);for(let i=0;i<t.set.length;i++){let n=t.set[i],s=t.globParts[i];if(!n||!s)throw new Error("invalid pattern object");for(;n[0]==="."&&s[0]===".";)n.shift(),s.shift();let o=new tr(n,s,0,this.platform),a=new we(o.globString(),this.mmopts),l=s[s.length-1]==="**",u=o.isAbsolute();u?this.absolute.push(a):this.relative.push(a),l&&(u?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let t=e.fullpath(),i=`${t}/`,n=e.relative()||".",s=`${n}/`;for(let o of this.relative)if(o.match(n)||o.match(s))return!0;for(let o of this.absolute)if(o.match(t)||o.match(i))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let n of this.relativeChildren)if(n.match(i))return!0;for(let n of this.absoluteChildren)if(n.match(t))return!0;return!1}};var No=class r{store;constructor(e=new Map){this.store=e}copy(){return new r(new Map(this.store))}hasWalked(e,t){var i;return(i=this.store.get(e.fullpath()))==null?void 0:i.has(t.globString())}storeWalked(e,t){let i=e.fullpath(),n=this.store.get(i);n?n.add(t.globString()):this.store.set(i,new Set([t.globString()]))}},Po=class{store=new Map;add(e,t,i){let n=(t?2:0)|(i?1:0),s=this.store.get(e);this.store.set(e,s===void 0?n:n&s)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},Do=class{store=new Map;add(e,t){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(n=>n.globString()===t.globString())||i.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},ti=class r{hasWalkedCache;matches=new Po;subwalks=new Do;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new No}processPatterns(e,t){this.patterns=t;let i=t.map(n=>[e,n]);for(let[n,s]of i){this.hasWalkedCache.storeWalked(n,s);let o=s.root(),a=s.isAbsolute()&&this.opts.absolute!==!1;if(o){n=n.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let c=s.rest();if(c)s=c;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let l,u,h=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)n=n.resolve(l),s=u,h=!0;if(l=s.pattern(),u=s.rest(),h){if(this.hasWalkedCache.hasWalked(n,s))continue;this.hasWalkedCache.storeWalked(n,s)}if(typeof l=="string"){let c=l===".."||l===""||l===".";this.matches.add(n.resolve(l),a,c);continue}else if(l===te){(!n.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(n,s);let c=u==null?void 0:u.pattern(),f=u==null?void 0:u.rest();if(!u||(c===""||c===".")&&!f)this.matches.add(n,a,c===""||c===".");else if(c===".."){let p=n.parent||n;f?this.hasWalkedCache.hasWalked(p,f)||this.subwalks.add(p,f):this.matches.add(p,a,!0)}}else l instanceof RegExp&&this.subwalks.add(n,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new r(this.opts,this.hasWalkedCache)}filterEntries(e,t){let i=this.subwalks.get(e),n=this.child();for(let s of t)for(let o of i){let a=o.isAbsolute(),l=o.pattern(),u=o.rest();l===te?n.testGlobstar(s,o,u,a):l instanceof RegExp?n.testRegExp(s,l,u,a):n.testString(s,l,u,a)}return n}testGlobstar(e,t,i,n){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(i&&t.checkFollowGlobstar()?this.subwalks.add(e,i):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),i){let s=i.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,i.rest(),n);else if(s===".."){let o=e.parent||e;this.subwalks.add(o,i)}else s instanceof RegExp&&this.testRegExp(e,s,i.rest(),n)}}testRegExp(e,t,i,n){t.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}testString(e,t,i,n){e.isNamed(t)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}};var Iw=(r,e)=>typeof r=="string"?new rr([r],e):Array.isArray(r)?new rr(r,e):r,bn=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#s;signal;maxDepth;includeChildMatches;constructor(e,t,i){if(this.patterns=e,this.path=t,this.opts=i,this.#s=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(this.#t=Iw(i.ignore??[],i),!this.includeChildMatches&&typeof this.#t.add!="function")){let n="cannot ignore child matches, ignore lacks add() method.";throw new Error(n)}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#i(e){var t,i;return this.seen.has(e)||!!((i=(t=this.#t)==null?void 0:t.ignored)!=null&&i.call(t,e))}#o(e){var t,i;return!!((i=(t=this.#t)==null?void 0:t.childrenIgnored)!=null&&i.call(t,e))}pause(){this.paused=!0}resume(){var t;if((t=this.signal)!=null&&t.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){var t;(t=this.signal)!=null&&t.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&(s!=null&&s.isSymbolicLink())){let o=await s.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(s,t)}matchCheckTest(e,t){var i;return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!((i=e.realpathCached())!=null&&i.isDirectory()))&&!this.#i(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&(s!=null&&s.isSymbolicLink())){let o=s.realpathSync();o&&(o!=null&&o.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(s,t)}matchFinish(e,t){var s;if(this.#i(e))return;if(!this.includeChildMatches&&((s=this.#t)!=null&&s.add)){let o=`${e.relativePosix()}/**`;this.#t.add(o)}let i=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let n=this.opts.mark&&e.isDirectory()?this.#s:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let o=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(o+n)}else{let o=this.opts.posix?e.relativePosix():e.relative(),a=this.opts.dotRelative&&!o.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(o?a+o+n:"."+n)}}async match(e,t,i){let n=await this.matchCheck(e,i);n&&this.matchFinish(n,t)}matchSync(e,t,i){let n=this.matchCheckSync(e,i);n&&this.matchFinish(n,t)}walkCB(e,t,i){var n;(n=this.signal)!=null&&n.aborted&&i(),this.walkCB2(e,t,new ti(this.opts),i)}walkCB2(e,t,i,n){var a;if(this.#o(e))return n();if((a=this.signal)!=null&&a.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2(e,t,i,n));return}i.processPatterns(e,t);let s=1,o=()=>{--s===0&&n()};for(let[l,u,h]of i.matches.entries())this.#i(l)||(s++,this.match(l,u,h).then(()=>o()));for(let l of i.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirCached();l.calledReaddir()?this.walkCB3(l,u,i,o):l.readdirCB((h,c)=>this.walkCB3(l,c,i,o),!0)}o()}walkCB3(e,t,i,n){i=i.filterEntries(e,t);let s=1,o=()=>{--s===0&&n()};for(let[a,l,u]of i.matches.entries())this.#i(a)||(s++,this.match(a,l,u).then(()=>o()));for(let[a,l]of i.subwalks.entries())s++,this.walkCB2(a,l,i.child(),o);o()}walkCBSync(e,t,i){var n;(n=this.signal)!=null&&n.aborted&&i(),this.walkCB2Sync(e,t,new ti(this.opts),i)}walkCB2Sync(e,t,i,n){var a;if(this.#o(e))return n();if((a=this.signal)!=null&&a.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,i,n));return}i.processPatterns(e,t);let s=1,o=()=>{--s===0&&n()};for(let[l,u,h]of i.matches.entries())this.#i(l)||this.matchSync(l,u,h);for(let l of i.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirSync();this.walkCB3Sync(l,u,i,o)}o()}walkCB3Sync(e,t,i,n){i=i.filterEntries(e,t);let s=1,o=()=>{--s===0&&n()};for(let[a,l,u]of i.matches.entries())this.#i(a)||this.matchSync(a,l,u);for(let[a,l]of i.subwalks.entries())s++,this.walkCB2Sync(a,l,i.child(),o);o()}},ri=class extends bn{matches=new Set;constructor(e,t,i){super(e,t,i)}matchEmit(e){this.matches.add(e)}async walk(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,i)=>{this.walkCB(this.path,this.patterns,()=>{var n;(n=this.signal)!=null&&n.aborted?i(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{var t;if((t=this.signal)!=null&&t.aborted)throw this.signal.reason}),this.matches}},ii=class extends bn{results;constructor(e,t,i){super(e,t,i),this.results=new st({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var Fw=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Pe=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,yf.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=t.platform||Fw,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=t.platform==="win32"?Xt:t.platform==="darwin"?ei:t.platform?er:mf;this.scurry=new l(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",n={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new we(l,n)),[o,a]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=o.map((l,u)=>{let h=a[u];if(!h)throw new Error("invalid pattern object");return new tr(l,h,0,this.platform)})}async walk(){return[...await new ri(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new ri(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new ii(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new ii(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var ko=(r,e={})=>{Array.isArray(r)||(r=[r]);for(let t of r)if(new we(t,e).hasMagic())return!0;return!1};function _n(r,e={}){return new Pe(r,e).streamSync()}function vf(r,e={}){return new Pe(r,e).stream()}function bf(r,e={}){return new Pe(r,e).walkSync()}async function wf(r,e={}){return new Pe(r,e).walk()}function xn(r,e={}){return new Pe(r,e).iterateSync()}function Sf(r,e={}){return new Pe(r,e).iterate()}var jw=_n,$w=Object.assign(vf,{sync:_n}),Bw=xn,Uw=Object.assign(Sf,{sync:xn}),zw=Object.assign(bf,{stream:_n,iterate:xn}),Sn=Object.assign(wf,{glob:wf,globSync:bf,sync:zw,globStream:vf,stream:$w,globStreamSync:_n,streamSync:jw,globIterate:Sf,iterate:Uw,globIterateSync:xn,iterateSync:Bw,Glob:Pe,hasMagic:ko,escape:Vt,unescape:Le});Sn.glob=Sn;var Z=vr(wm(),1);function yl(r){let e=Z.format.printf(({message:a,timestamp:l,metadata:u})=>{let{previousToken:h,nextToken:c,line:f}=u,p=f?`(line ${f})`:"";return`${l} ${a}: ${h} \u2192 ${c} ${p}`}),t=Z.format.printf(({level:a,message:l,timestamp:u,failureReason:h,metadata:c})=>{let{previousToken:f,description:p}=c,d=p||h||"";return`${u} [${a.toUpperCase()}]: ${l}
64
+ >>> no match, partial?`,e,f,t,p),f===l))}let g;if(typeof h=="string"?(g=c===h,this.debug("string match",h,c,g)):(g=h.test(c),this.debug("pattern match",h,c,g)),!g)return!1}if(o===l&&a===u)return!0;if(o===l)return i;if(a===u)return o===l-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return Gh(this.pattern,this.options)}parse(e){zr(e);let t=this.options;if(e==="**")return te;if(e==="")return"";let i,n=null;(i=e.match(tw))?n=t.dot?iw:rw:(i=e.match(Gy))?n=(t.nocase?t.dot?Ky:Yy:t.dot?Vy:Hy)(i[1]):(i=e.match(nw))?n=(t.nocase?t.dot?ow:sw:t.dot?aw:lw)(i):(i=e.match(Jy))?n=t.dot?Zy:Qy:(i=e.match(Xy))&&(n=ew);let s=Ht.fromGlob(e,this.options).toMMPattern();return n&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:n}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,i=t.noglobstar?fw:t.dot?cw:dw,n=new Set(t.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(h=>{if(h instanceof RegExp)for(let c of h.flags.split(""))n.add(c);return typeof h=="string"?ww(h):h===te?te:h._src});return u.forEach((h,c)=>{let f=u[c+1],p=u[c-1];h!==te||p===te||(p===void 0?f!==void 0&&f!==te?u[c+1]="(?:\\/|"+i+"\\/)?"+f:u[c]=i:f===void 0?u[c-1]=p+"(?:\\/|"+i+")?":f!==te&&(u[c-1]=p+"(?:\\/|\\/"+i+"\\/)"+f,u[c+1]=te))}),u.filter(h=>h!==te).join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let s=this.set;this.debug(this.pattern,"set",s);let o=n[n.length-1];if(!o)for(let a=n.length-2;!o&&a>=0;a--)o=n[a];for(let a=0;a<s.length;a++){let l=s[a],u=n;if(i.matchBase&&l.length===1&&(u=[o]),this.matchOne(u,l,t))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return le.defaults(e).Minimatch}};le.AST=Ht;le.Minimatch=we;le.escape=Vt;le.unescape=Le;var yf=require("node:url");var Yt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Yh=new Set,So=typeof process=="object"&&process?process:{},Kh=(r,e,t,i)=>{typeof So.emitWarning=="function"?So.emitWarning(r,e,t,i):console.error(`[${t}] ${e}: ${r}`)},sn=globalThis.AbortController,Hh=globalThis.AbortSignal,Vh;if(typeof sn>"u"){Hh=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},sn=class{constructor(){e()}signal=new Hh;abort(i){var n,s;if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let o of this.signal._onabort)o(i);(s=(n=this.signal).onabort)==null||s.call(n,i)}}};let r=((Vh=So.env)==null?void 0:Vh.LRU_CACHE_IGNORE_AC_WARNING)!=="1",e=()=>{r&&(r=!1,Kh("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var vw=r=>!Yh.has(r),YE=Symbol("type"),it=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),Jh=r=>it(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?Kt:null:null,Kt=class extends Array{constructor(e){super(e),this.fill(0)}},_o=class r{heap;length;static#e=!1;static create(e){let t=Jh(e);if(!t)return[];r.#e=!0;let i=new r(e,t);return r.#e=!1,i}constructor(e,t){if(!r.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Gr=class r{#e;#t;#s;#i;#o;#b;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#f;#a;#l;#n;#m;#y;#d;#c;#x;#g;#E;#O;#v;#S;#_;#p;static unsafeExposeInternals(e){return{starts:e.#O,ttls:e.#v,sizes:e.#E,keyMap:e.#a,keyList:e.#l,valList:e.#n,next:e.#m,prev:e.#y,get head(){return e.#d},get tail(){return e.#c},free:e.#x,isBackgroundFetch:t=>e.#h(t),backgroundFetch:(t,i,n,s)=>e.#F(t,i,n,s),moveToTail:t=>e.#$(t),indexes:t=>e.#R(t),rindexes:t=>e.#M(t),isStale:t=>e.#w(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#f}get size(){return this.#u}get fetchMethod(){return this.#o}get memoMethod(){return this.#b}get dispose(){return this.#s}get disposeAfter(){return this.#i}constructor(e){let{max:t=0,ttl:i,ttlResolution:n=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:u,disposeAfter:h,noDisposeOnSet:c,noUpdateTTL:f,maxSize:p=0,maxEntrySize:d=0,sizeCalculation:g,fetchMethod:y,memoMethod:w,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:_,allowStaleOnFetchAbort:C,ignoreFetchAbort:M}=e;if(t!==0&&!it(t))throw new TypeError("max option must be a nonnegative integer");let T=t?Jh(t):Array;if(!T)throw new Error("invalid max value: "+t);if(this.#e=t,this.#t=p,this.maxEntrySize=d||this.#t,this.sizeCalculation=g,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#b=w,y!==void 0&&typeof y!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=y,this.#_=!!y,this.#a=new Map,this.#l=new Array(t).fill(void 0),this.#n=new Array(t).fill(void 0),this.#m=new T(t),this.#y=new T(t),this.#d=0,this.#c=0,this.#x=_o.create(t),this.#u=0,this.#f=0,typeof u=="function"&&(this.#s=u),typeof h=="function"?(this.#i=h,this.#g=[]):(this.#i=void 0,this.#g=void 0),this.#S=!!this.#s,this.#p=!!this.#i,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!_,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!M,this.maxEntrySize!==0){if(this.#t!==0&&!it(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!it(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#T()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=it(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!it(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#A()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let q="LRU_CACHE_UNBOUNDED";vw(q)&&(Yh.add(q),Kh("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",q,r))}}getRemainingTTL(e){return this.#a.has(e)?1/0:0}#A(){let e=new Kt(this.#e),t=new Kt(this.#e);this.#v=e,this.#O=t,this.#q=(s,o,a=Yt.now())=>{if(t[s]=o!==0?a:0,e[s]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#w(s)&&this.#L(this.#l[s],"expire")},o+1);l.unref&&l.unref()}},this.#C=s=>{t[s]=e[s]!==0?Yt.now():0},this.#r=(s,o)=>{if(e[o]){let a=e[o],l=t[o];if(!a||!l)return;s.ttl=a,s.start=l,s.now=i||n();let u=s.now-l;s.remainingTTL=a-u}};let i=0,n=()=>{let s=Yt.now();if(this.ttlResolution>0){i=s;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return s};this.getRemainingTTL=s=>{let o=this.#a.get(s);if(o===void 0)return 0;let a=e[o],l=t[o];if(!a||!l)return 1/0;let u=(i||n())-l;return a-u},this.#w=s=>{let o=t[s],a=e[s];return!!a&&!!o&&(i||n())-o>a}}#C=()=>{};#r=()=>{};#q=()=>{};#w=()=>!1;#T(){let e=new Kt(this.#e);this.#f=0,this.#E=e,this.#N=t=>{this.#f-=e[t],e[t]=0},this.#D=(t,i,n,s)=>{if(this.#h(i))return 0;if(!it(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,t),!it(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return n},this.#P=(t,i,n)=>{if(e[t]=i,this.#t){let s=this.#t-e[t];for(;this.#f>s;)this.#I(!0)}this.#f+=e[t],n&&(n.entrySize=i,n.totalCalculatedSize=this.#f)}}#N=e=>{};#P=(e,t,i)=>{};#D=(e,t,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:e=this.allowStale}={}){if(this.#u)for(let t=this.#c;!(!this.#k(t)||((e||!this.#w(t))&&(yield t),t===this.#d));)t=this.#y[t]}*#M({allowStale:e=this.allowStale}={}){if(this.#u)for(let t=this.#d;!(!this.#k(t)||((e||!this.#w(t))&&(yield t),t===this.#c));)t=this.#m[t]}#k(e){return e!==void 0&&this.#a.get(this.#l[e])===e}*entries(){for(let e of this.#R())this.#n[e]!==void 0&&this.#l[e]!==void 0&&!this.#h(this.#n[e])&&(yield[this.#l[e],this.#n[e]])}*rentries(){for(let e of this.#M())this.#n[e]!==void 0&&this.#l[e]!==void 0&&!this.#h(this.#n[e])&&(yield[this.#l[e],this.#n[e]])}*keys(){for(let e of this.#R()){let t=this.#l[e];t!==void 0&&!this.#h(this.#n[e])&&(yield t)}}*rkeys(){for(let e of this.#M()){let t=this.#l[e];t!==void 0&&!this.#h(this.#n[e])&&(yield t)}}*values(){for(let e of this.#R())this.#n[e]!==void 0&&!this.#h(this.#n[e])&&(yield this.#n[e])}*rvalues(){for(let e of this.#M())this.#n[e]!==void 0&&!this.#h(this.#n[e])&&(yield this.#n[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#R()){let n=this.#n[i],s=this.#h(n)?n.__staleWhileFetching:n;if(s!==void 0&&e(s,this.#l[i],this))return this.get(this.#l[i],t)}}forEach(e,t=this){for(let i of this.#R()){let n=this.#n[i],s=this.#h(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(t,s,this.#l[i],this)}}rforEach(e,t=this){for(let i of this.#M()){let n=this.#n[i],s=this.#h(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(t,s,this.#l[i],this)}}purgeStale(){let e=!1;for(let t of this.#M({allowStale:!0}))this.#w(t)&&(this.#L(this.#l[t],"expire"),e=!0);return e}info(e){let t=this.#a.get(e);if(t===void 0)return;let i=this.#n[t],n=this.#h(i)?i.__staleWhileFetching:i;if(n===void 0)return;let s={value:n};if(this.#v&&this.#O){let o=this.#v[t],a=this.#O[t];if(o&&a){let l=o-(Yt.now()-a);s.ttl=l,s.start=Date.now()}}return this.#E&&(s.size=this.#E[t]),s}dump(){let e=[];for(let t of this.#R({allowStale:!0})){let i=this.#l[t],n=this.#n[t],s=this.#h(n)?n.__staleWhileFetching:n;if(s===void 0||i===void 0)continue;let o={value:s};if(this.#v&&this.#O){o.ttl=this.#v[t];let a=Yt.now()-this.#O[t];o.start=Math.floor(Date.now()-a)}this.#E&&(o.size=this.#E[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let n=Date.now()-i.start;i.start=Yt.now()-n}this.set(t,i.value,i)}}set(e,t,i={}){var f,p,d,g,y;if(t===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:s,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,h=this.#D(e,t,i.size||0,a);if(this.maxEntrySize&&h>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#L(e,"set"),this;let c=this.#u===0?void 0:this.#a.get(e);if(c===void 0)c=this.#u===0?this.#c:this.#x.length!==0?this.#x.pop():this.#u===this.#e?this.#I(!1):this.#u,this.#l[c]=e,this.#n[c]=t,this.#a.set(e,c),this.#m[this.#c]=c,this.#y[c]=this.#c,this.#c=c,this.#u++,this.#P(c,h,l),l&&(l.set="add"),u=!1;else{this.#$(c);let w=this.#n[c];if(t!==w){if(this.#_&&this.#h(w)){w.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:S}=w;S!==void 0&&!o&&(this.#S&&((f=this.#s)==null||f.call(this,S,e,"set")),this.#p&&((p=this.#g)==null||p.push([S,e,"set"])))}else o||(this.#S&&((d=this.#s)==null||d.call(this,w,e,"set")),this.#p&&((g=this.#g)==null||g.push([w,e,"set"])));if(this.#N(c),this.#P(c,h,l),this.#n[c]=t,l){l.set="replace";let S=w&&this.#h(w)?w.__staleWhileFetching:w;S!==void 0&&(l.oldValue=S)}}else l&&(l.set="update")}if(n!==0&&!this.#v&&this.#A(),this.#v&&(u||this.#q(c,n,s),l&&this.#r(l,c)),!o&&this.#p&&this.#g){let w=this.#g,S;for(;S=w==null?void 0:w.shift();)(y=this.#i)==null||y.call(this,...S)}return this}pop(){var e;try{for(;this.#u;){let t=this.#n[this.#d];if(this.#I(!0),this.#h(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#p&&this.#g){let t=this.#g,i;for(;i=t==null?void 0:t.shift();)(e=this.#i)==null||e.call(this,...i)}}}#I(e){var s,o;let t=this.#d,i=this.#l[t],n=this.#n[t];return this.#_&&this.#h(n)?n.__abortController.abort(new Error("evicted")):(this.#S||this.#p)&&(this.#S&&((s=this.#s)==null||s.call(this,n,i,"evict")),this.#p&&((o=this.#g)==null||o.push([n,i,"evict"]))),this.#N(t),e&&(this.#l[t]=void 0,this.#n[t]=void 0,this.#x.push(t)),this.#u===1?(this.#d=this.#c=0,this.#x.length=0):this.#d=this.#m[t],this.#a.delete(i),this.#u--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=t,s=this.#a.get(e);if(s!==void 0){let o=this.#n[s];if(this.#h(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#w(s))n&&(n.has="stale",this.#r(n,s));else return i&&this.#C(s),n&&(n.has="hit",this.#r(n,s)),!0}else n&&(n.has="miss");return!1}peek(e,t={}){let{allowStale:i=this.allowStale}=t,n=this.#a.get(e);if(n===void 0||!i&&this.#w(n))return;let s=this.#n[n];return this.#h(s)?s.__staleWhileFetching:s}#F(e,t,i,n){let s=t===void 0?void 0:this.#n[t];if(this.#h(s))return s;let o=new sn,{signal:a}=i;a==null||a.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:i,context:n},u=(g,y=!1)=>{let{aborted:w}=o.signal,S=i.ignoreFetchAbort&&g!==void 0;if(i.status&&(w&&!y?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,S&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),w&&!S&&!y)return c(o.signal.reason);let b=p;return this.#n[t]===p&&(g===void 0?b.__staleWhileFetching?this.#n[t]=b.__staleWhileFetching:this.#L(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,g,l.options))),g},h=g=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=g),c(g)),c=g=>{let{aborted:y}=o.signal,w=y&&i.allowStaleOnFetchAbort,S=w||i.allowStaleOnFetchRejection,b=S||i.noDeleteOnFetchRejection,_=p;if(this.#n[t]===p&&(!b||_.__staleWhileFetching===void 0?this.#L(e,"fetch"):w||(this.#n[t]=_.__staleWhileFetching)),S)return i.status&&_.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),_.__staleWhileFetching;if(_.__returned===_)throw g},f=(g,y)=>{var S;let w=(S=this.#o)==null?void 0:S.call(this,e,s,l);w&&w instanceof Promise&&w.then(b=>g(b===void 0?void 0:b),y),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(g(void 0),i.allowStaleOnFetchAbort&&(g=b=>u(b,!0)))})};i.status&&(i.status.fetchDispatched=!0);let p=new Promise(f).then(u,h),d=Object.assign(p,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.set(e,d,{...l.options,status:void 0}),t=this.#a.get(e)):this.#n[t]=d,d}#h(e){if(!this.#_)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof sn}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:g,forceRefresh:y=!1,status:w,signal:S}=t;if(!this.#_)return w&&(w.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:w});let b={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:u,noUpdateTTL:h,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:d,ignoreFetchAbort:p,status:w,signal:S},_=this.#a.get(e);if(_===void 0){w&&(w.fetch="miss");let C=this.#F(e,_,b,g);return C.__returned=C}else{let C=this.#n[_];if(this.#h(C)){let j=i&&C.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",j&&(w.returnedStale=!0)),j?C.__staleWhileFetching:C.__returned=C}let M=this.#w(_);if(!y&&!M)return w&&(w.fetch="hit"),this.#$(_),n&&this.#C(_),w&&this.#r(w,_),C;let T=this.#F(e,_,b,g),R=T.__staleWhileFetching!==void 0&&i;return w&&(w.fetch=M?"stale":"refresh",R&&M&&(w.returnedStale=!0)),R?T.__staleWhileFetching:T.__returned=T}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#b;if(!i)throw new Error("no memoMethod provided to constructor");let{context:n,forceRefresh:s,...o}=t,a=this.get(e,o);if(!s&&a!==void 0)return a;let l=i(e,a,{options:o,context:n});return this.set(e,l,o),l}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=t,a=this.#a.get(e);if(a!==void 0){let l=this.#n[a],u=this.#h(l);return o&&this.#r(o,a),this.#w(a)?(o&&(o.get="stale"),u?(o&&i&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),i?l.__staleWhileFetching:void 0):(s||this.#L(e,"expire"),o&&i&&(o.returnedStale=!0),i?l:void 0)):(o&&(o.get="hit"),u?l.__staleWhileFetching:(this.#$(a),n&&this.#C(a),l))}else o&&(o.get="miss")}#j(e,t){this.#y[t]=e,this.#m[e]=t}#$(e){e!==this.#c&&(e===this.#d?this.#d=this.#m[e]:this.#j(this.#y[e],this.#m[e]),this.#j(this.#c,e),this.#c=e)}delete(e){return this.#L(e,"delete")}#L(e,t){var n,s,o,a;let i=!1;if(this.#u!==0){let l=this.#a.get(e);if(l!==void 0)if(i=!0,this.#u===1)this.#B(t);else{this.#N(l);let u=this.#n[l];if(this.#h(u)?u.__abortController.abort(new Error("deleted")):(this.#S||this.#p)&&(this.#S&&((n=this.#s)==null||n.call(this,u,e,t)),this.#p&&((s=this.#g)==null||s.push([u,e,t]))),this.#a.delete(e),this.#l[l]=void 0,this.#n[l]=void 0,l===this.#c)this.#c=this.#y[l];else if(l===this.#d)this.#d=this.#m[l];else{let h=this.#y[l];this.#m[h]=this.#m[l];let c=this.#m[l];this.#y[c]=this.#y[l]}this.#u--,this.#x.push(l)}}if(this.#p&&((o=this.#g)!=null&&o.length)){let l=this.#g,u;for(;u=l==null?void 0:l.shift();)(a=this.#i)==null||a.call(this,...u)}return i}clear(){return this.#B("delete")}#B(e){var t,i,n;for(let s of this.#M({allowStale:!0})){let o=this.#n[s];if(this.#h(o))o.__abortController.abort(new Error("deleted"));else{let a=this.#l[s];this.#S&&((t=this.#s)==null||t.call(this,o,a,e)),this.#p&&((i=this.#g)==null||i.push([o,a,e]))}}if(this.#a.clear(),this.#n.fill(void 0),this.#l.fill(void 0),this.#v&&this.#O&&(this.#v.fill(0),this.#O.fill(0)),this.#E&&this.#E.fill(0),this.#d=0,this.#c=0,this.#x.length=0,this.#f=0,this.#u=0,this.#p&&this.#g){let s=this.#g,o;for(;o=s==null?void 0:s.shift();)(n=this.#i)==null||n.call(this,...o)}}};var Zt=require("node:path"),af=require("node:url"),Ue=require("fs"),Aw=vr(require("node:fs"),1),ot=require("node:fs/promises");var cn=require("node:events"),Ao=vr(require("node:stream"),1),tf=require("node:string_decoder"),Qh=typeof process=="object"&&process?process:{stdout:null,stderr:null},bw=r=>!!r&&typeof r=="object"&&(r instanceof st||r instanceof Ao.default||Sw(r)||_w(r)),Sw=r=>!!r&&typeof r=="object"&&r instanceof cn.EventEmitter&&typeof r.pipe=="function"&&r.pipe!==Ao.default.Writable.prototype.pipe,_w=r=>!!r&&typeof r=="object"&&r instanceof cn.EventEmitter&&typeof r.write=="function"&&typeof r.end=="function",Je=Symbol("EOF"),Qe=Symbol("maybeEmitEnd"),nt=Symbol("emittedEnd"),on=Symbol("emittingEnd"),Hr=Symbol("emittedError"),an=Symbol("closed"),Zh=Symbol("read"),ln=Symbol("flush"),Xh=Symbol("flushChunk"),qe=Symbol("encoding"),Jt=Symbol("decoder"),Y=Symbol("flowing"),Vr=Symbol("paused"),Qt=Symbol("resume"),K=Symbol("buffer"),ue=Symbol("pipes"),J=Symbol("bufferLength"),xo=Symbol("bufferPush"),un=Symbol("bufferShift"),se=Symbol("objectMode"),W=Symbol("destroyed"),Eo=Symbol("error"),Oo=Symbol("emitData"),ef=Symbol("emitEnd"),Co=Symbol("emitEnd2"),$e=Symbol("async"),Ro=Symbol("abort"),hn=Symbol("aborted"),Yr=Symbol("signal"),bt=Symbol("dataListeners"),ve=Symbol("discarded"),Kr=r=>Promise.resolve().then(r),xw=r=>r(),Ew=r=>r==="end"||r==="finish"||r==="prefinish",Ow=r=>r instanceof ArrayBuffer||!!r&&typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,Cw=r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r),fn=class{src;dest;opts;ondrain;constructor(e,t,i){this.src=e,this.dest=t,this.opts=i,this.ondrain=()=>e[Qt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Mo=class extends fn{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,i){super(e,t,i),this.proxyErrors=n=>t.emit("error",n),e.on("error",this.proxyErrors)}},Rw=r=>!!r.objectMode,Mw=r=>!r.objectMode&&!!r.encoding&&r.encoding!=="buffer",st=class extends cn.EventEmitter{[Y]=!1;[Vr]=!1;[ue]=[];[K]=[];[se];[qe];[$e];[Jt];[Je]=!1;[nt]=!1;[on]=!1;[an]=!1;[Hr]=null;[J]=0;[W]=!1;[Yr];[hn]=!1;[bt]=0;[ve]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Rw(t)?(this[se]=!0,this[qe]=null):Mw(t)?(this[qe]=t.encoding,this[se]=!1):(this[se]=!1,this[qe]=null),this[$e]=!!t.async,this[Jt]=this[qe]?new tf.StringDecoder(this[qe]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[K]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[ue]});let{signal:i}=t;i&&(this[Yr]=i,i.aborted?this[Ro]():i.addEventListener("abort",()=>this[Ro]()))}get bufferLength(){return this[J]}get encoding(){return this[qe]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[se]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[$e]}set async(e){this[$e]=this[$e]||!!e}[Ro](){var e,t;this[hn]=!0,this.emit("abort",(e=this[Yr])==null?void 0:e.reason),this.destroy((t=this[Yr])==null?void 0:t.reason)}get aborted(){return this[hn]}set aborted(e){}write(e,t,i){var s;if(this[hn])return!1;if(this[Je])throw new Error("write after end");if(this[W])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(i=t,t="utf8"),t||(t="utf8");let n=this[$e]?Kr:xw;if(!this[se]&&!Buffer.isBuffer(e)){if(Cw(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Ow(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[se]?(this[Y]&&this[J]!==0&&this[ln](!0),this[Y]?this.emit("data",e):this[xo](e),this[J]!==0&&this.emit("readable"),i&&n(i),this[Y]):e.length?(typeof e=="string"&&!(t===this[qe]&&!((s=this[Jt])!=null&&s.lastNeed))&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[qe]&&(e=this[Jt].write(e)),this[Y]&&this[J]!==0&&this[ln](!0),this[Y]?this.emit("data",e):this[xo](e),this[J]!==0&&this.emit("readable"),i&&n(i),this[Y]):(this[J]!==0&&this.emit("readable"),i&&n(i),this[Y])}read(e){if(this[W])return null;if(this[ve]=!1,this[J]===0||e===0||e&&e>this[J])return this[Qe](),null;this[se]&&(e=null),this[K].length>1&&!this[se]&&(this[K]=[this[qe]?this[K].join(""):Buffer.concat(this[K],this[J])]);let t=this[Zh](e||null,this[K][0]);return this[Qe](),t}[Zh](e,t){if(this[se])this[un]();else{let i=t;e===i.length||e===null?this[un]():typeof i=="string"?(this[K][0]=i.slice(e),t=i.slice(0,e),this[J]-=e):(this[K][0]=i.subarray(e),t=i.subarray(0,e),this[J]-=e)}return this.emit("data",t),!this[K].length&&!this[Je]&&this.emit("drain"),t}end(e,t,i){return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t="utf8"),e!==void 0&&this.write(e,t),i&&this.once("end",i),this[Je]=!0,this.writable=!1,(this[Y]||!this[Vr])&&this[Qe](),this}[Qt](){this[W]||(!this[bt]&&!this[ue].length&&(this[ve]=!0),this[Vr]=!1,this[Y]=!0,this.emit("resume"),this[K].length?this[ln]():this[Je]?this[Qe]():this.emit("drain"))}resume(){return this[Qt]()}pause(){this[Y]=!1,this[Vr]=!0,this[ve]=!1}get destroyed(){return this[W]}get flowing(){return this[Y]}get paused(){return this[Vr]}[xo](e){this[se]?this[J]+=1:this[J]+=e.length,this[K].push(e)}[un](){return this[se]?this[J]-=1:this[J]-=this[K][0].length,this[K].shift()}[ln](e=!1){do;while(this[Xh](this[un]())&&this[K].length);!e&&!this[K].length&&!this[Je]&&this.emit("drain")}[Xh](e){return this.emit("data",e),this[Y]}pipe(e,t){if(this[W])return e;this[ve]=!1;let i=this[nt];return t=t||{},e===Qh.stdout||e===Qh.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,i?t.end&&e.end():(this[ue].push(t.proxyErrors?new Mo(this,e,t):new fn(this,e,t)),this[$e]?Kr(()=>this[Qt]()):this[Qt]()),e}unpipe(e){let t=this[ue].find(i=>i.dest===e);t&&(this[ue].length===1?(this[Y]&&this[bt]===0&&(this[Y]=!1),this[ue]=[]):this[ue].splice(this[ue].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let i=super.on(e,t);if(e==="data")this[ve]=!1,this[bt]++,!this[ue].length&&!this[Y]&&this[Qt]();else if(e==="readable"&&this[J]!==0)super.emit("readable");else if(Ew(e)&&this[nt])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Hr]){let n=t;this[$e]?Kr(()=>n.call(this,this[Hr])):n.call(this,this[Hr])}return i}removeListener(e,t){return this.off(e,t)}off(e,t){let i=super.off(e,t);return e==="data"&&(this[bt]=this.listeners("data").length,this[bt]===0&&!this[ve]&&!this[ue].length&&(this[Y]=!1)),i}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[bt]=0,!this[ve]&&!this[ue].length&&(this[Y]=!1)),t}get emittedEnd(){return this[nt]}[Qe](){!this[on]&&!this[nt]&&!this[W]&&this[K].length===0&&this[Je]&&(this[on]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[an]&&this.emit("close"),this[on]=!1)}emit(e,...t){let i=t[0];if(e!=="error"&&e!=="close"&&e!==W&&this[W])return!1;if(e==="data")return!this[se]&&!i?!1:this[$e]?(Kr(()=>this[Oo](i)),!0):this[Oo](i);if(e==="end")return this[ef]();if(e==="close"){if(this[an]=!0,!this[nt]&&!this[W])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Hr]=i,super.emit(Eo,i);let s=!this[Yr]||this.listeners("error").length?super.emit("error",i):!1;return this[Qe](),s}else if(e==="resume"){let s=super.emit("resume");return this[Qe](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,...t);return this[Qe](),n}[Oo](e){for(let i of this[ue])i.dest.write(e)===!1&&this.pause();let t=this[ve]?!1:super.emit("data",e);return this[Qe](),t}[ef](){return this[nt]?!1:(this[nt]=!0,this.readable=!1,this[$e]?(Kr(()=>this[Co]()),!0):this[Co]())}[Co](){if(this[Jt]){let t=this[Jt].end();if(t){for(let i of this[ue])i.dest.write(t);this[ve]||super.emit("data",t)}}for(let t of this[ue])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[se]||(e.dataLength=0);let t=this.promise();return this.on("data",i=>{e.push(i),this[se]||(e.dataLength+=i.length)}),await t,e}async concat(){if(this[se])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[qe]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(W,()=>t(new Error("stream destroyed"))),this.on("error",i=>t(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[ve]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[Je])return t();let s,o,a=c=>{this.off("data",l),this.off("end",u),this.off(W,h),t(),o(c)},l=c=>{this.off("error",a),this.off("end",u),this.off(W,h),this.pause(),s({value:c,done:!!this[Je]})},u=()=>{this.off("error",a),this.off("data",l),this.off(W,h),t(),s({done:!0,value:void 0})},h=()=>a(new Error("stream destroyed"));return new Promise((c,f)=>{o=f,s=c,this.once(W,h),this.once("error",a),this.once("end",u),this.once("data",l)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ve]=!1;let e=!1,t=()=>(this.pause(),this.off(Eo,t),this.off(W,t),this.off("end",t),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return t();let n=this.read();return n===null?t():{done:!1,value:n}};return this.once("end",t),this.once(Eo,t),this.once(W,t),{next:i,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[W])return e?this.emit("error",e):this.emit(W),this;this[W]=!0,this[ve]=!0,this[K].length=0,this[J]=0;let t=this;return typeof t.close=="function"&&!this[an]&&t.close(),e?this.emit("error",e):this.emit(W),this}static get isStream(){return bw}};var Tw=Ue.realpathSync.native,Qr={lstatSync:Ue.lstatSync,readdir:Ue.readdir,readdirSync:Ue.readdirSync,readlinkSync:Ue.readlinkSync,realpathSync:Tw,promises:{lstat:ot.lstat,readdir:ot.readdir,readlink:ot.readlink,realpath:ot.realpath}},lf=r=>!r||r===Qr||r===Aw?Qr:{...Qr,...r,promises:{...Qr.promises,...r.promises||{}}},uf=/^\\\\\?\\([a-z]:)\\?$/i,Lw=r=>r.replace(/\//g,"\\").replace(uf,"$1\\"),qw=/[\\\/]/,Oe=0,hf=1,ff=2,Be=4,cf=6,df=8,St=10,pf=12,Ee=15,Jr=~Ee,To=16,rf=32,Zr=64,Ne=128,dn=256,gn=512,nf=Zr|Ne|gn,Nw=1023,Lo=r=>r.isFile()?df:r.isDirectory()?Be:r.isSymbolicLink()?St:r.isCharacterDevice()?ff:r.isBlockDevice()?cf:r.isSocket()?pf:r.isFIFO()?hf:Oe,sf=new Map,Xr=r=>{let e=sf.get(r);if(e)return e;let t=r.normalize("NFKD");return sf.set(r,t),t},of=new Map,pn=r=>{let e=of.get(r);if(e)return e;let t=Xr(r.toLowerCase());return of.set(r,t),t},mn=class extends Gr{constructor(){super({max:256})}},qo=class extends Gr{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},gf=Symbol("PathScurry setAsCwd"),oe=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#s;get mode(){return this.#s}#i;get nlink(){return this.#i}#o;get uid(){return this.#o}#b;get gid(){return this.#b}#u;get rdev(){return this.#u}#f;get blksize(){return this.#f}#a;get ino(){return this.#a}#l;get size(){return this.#l}#n;get blocks(){return this.#n}#m;get atimeMs(){return this.#m}#y;get mtimeMs(){return this.#y}#d;get ctimeMs(){return this.#d}#c;get birthtimeMs(){return this.#c}#x;get atime(){return this.#x}#g;get mtime(){return this.#g}#E;get ctime(){return this.#E}#O;get birthtime(){return this.#O}#v;#S;#_;#p;#A;#C;#r;#q;#w;#T;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Oe,i,n,s,o,a){this.name=e,this.#v=s?pn(e):Xr(e),this.#r=t&Nw,this.nocase=s,this.roots=n,this.root=i||this,this.#q=o,this.#_=a.fullpath,this.#A=a.relative,this.#C=a.relativePosix,this.parent=a.parent,this.parent?this.#e=this.parent.#e:this.#e=lf(a.fs)}depth(){return this.#S!==void 0?this.#S:this.parent?this.#S=this.parent.depth()+1:this.#S=0}childrenCache(){return this.#q}resolve(e){if(!e)return this;let t=this.getRootString(e),n=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#N(n):this.#N(n)}#N(e){let t=this;for(let i of e)t=t.child(i);return t}children(){let e=this.#q.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#q.set(this,t),this.#r&=~To,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?pn(e):Xr(e);for(let l of i)if(l.#v===n)return l;let s=this.parent?this.sep:"",o=this.#_?this.#_+s+e:void 0,a=this.newChild(e,Oe,{...t,parent:this,fullpath:o});return this.canReaddir()||(a.#r|=Ne),i.push(a),a}relative(){if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let e=this.name,t=this.parent;if(!t)return this.#A=this.name;let i=t.relative();return i+(!i||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#C!==void 0)return this.#C;let e=this.name,t=this.parent;if(!t)return this.#C=this.fullpathPosix();let i=t.relativePosix();return i+(!i||!t.parent?"":"/")+e}fullpath(){if(this.#_!==void 0)return this.#_;let e=this.name,t=this.parent;if(!t)return this.#_=this.name;let n=t.fullpath()+(t.parent?this.sep:"")+e;return this.#_=n}fullpathPosix(){if(this.#p!==void 0)return this.#p;if(this.sep==="/")return this.#p=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#p=`//?/${n}`:this.#p=n}let e=this.parent,t=e.fullpathPosix(),i=t+(!t||!e.parent?"":"/")+this.name;return this.#p=i}isUnknown(){return(this.#r&Ee)===Oe}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#r&Ee)===df}isDirectory(){return(this.#r&Ee)===Be}isCharacterDevice(){return(this.#r&Ee)===ff}isBlockDevice(){return(this.#r&Ee)===cf}isFIFO(){return(this.#r&Ee)===hf}isSocket(){return(this.#r&Ee)===pf}isSymbolicLink(){return(this.#r&St)===St}lstatCached(){return this.#r&rf?this:void 0}readlinkCached(){return this.#w}realpathCached(){return this.#T}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#w)return!0;if(!this.parent)return!1;let e=this.#r&Ee;return!(e!==Oe&&e!==St||this.#r&dn||this.#r&Ne)}calledReaddir(){return!!(this.#r&To)}isENOENT(){return!!(this.#r&Ne)}isNamed(e){return this.nocase?this.#v===pn(e):this.#v===Xr(e)}async readlink(){var t;let e=this.#w;if(e)return e;if(this.canReadlink()&&this.parent)try{let i=await this.#e.promises.readlink(this.fullpath()),n=(t=await this.parent.realpath())==null?void 0:t.resolve(i);if(n)return this.#w=n}catch(i){this.#h(i.code);return}}readlinkSync(){var t;let e=this.#w;if(e)return e;if(this.canReadlink()&&this.parent)try{let i=this.#e.readlinkSync(this.fullpath()),n=(t=this.parent.realpathSync())==null?void 0:t.resolve(i);if(n)return this.#w=n}catch(i){this.#h(i.code);return}}#P(e){this.#r|=To;for(let t=e.provisional;t<e.length;t++){let i=e[t];i&&i.#D()}}#D(){this.#r&Ne||(this.#r=(this.#r|Ne)&Jr,this.#R())}#R(){let e=this.children();e.provisional=0;for(let t of e)t.#D()}#M(){this.#r|=gn,this.#k()}#k(){if(this.#r&Zr)return;let e=this.#r;(e&Ee)===Be&&(e&=Jr),this.#r=e|Zr,this.#R()}#I(e=""){e==="ENOTDIR"||e==="EPERM"?this.#k():e==="ENOENT"?this.#D():this.children().provisional=0}#F(e=""){e==="ENOTDIR"?this.parent.#k():e==="ENOENT"&&this.#D()}#h(e=""){let t=this.#r;t|=dn,e==="ENOENT"&&(t|=Ne),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Jr),this.#r=t,e==="ENOTDIR"&&this.parent&&this.parent.#k()}#j(e,t){return this.#L(e,t)||this.#$(e,t)}#$(e,t){let i=Lo(e),n=this.newChild(e.name,i,{parent:this}),s=n.#r&Ee;return s!==Be&&s!==St&&s!==Oe&&(n.#r|=Zr),t.unshift(n),t.provisional++,n}#L(e,t){for(let i=t.provisional;i<t.length;i++){let n=t[i];if((this.nocase?pn(e.name):Xr(e.name))===n.#v)return this.#B(e,n,i,t)}}#B(e,t,i,n){let s=t.name;return t.#r=t.#r&Jr|Lo(e),s!==e.name&&(t.name=e.name),i!==n.provisional&&(i===n.length-1?n.pop():n.splice(i,1),n.unshift(t)),n.provisional++,t}async lstat(){if((this.#r&Ne)===0)try{return this.#G(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#F(e.code)}}lstatSync(){if((this.#r&Ne)===0)try{return this.#G(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#F(e.code)}}#G(e){let{atime:t,atimeMs:i,birthtime:n,birthtimeMs:s,blksize:o,blocks:a,ctime:l,ctimeMs:u,dev:h,gid:c,ino:f,mode:p,mtime:d,mtimeMs:g,nlink:y,rdev:w,size:S,uid:b}=e;this.#x=t,this.#m=i,this.#O=n,this.#c=s,this.#f=o,this.#n=a,this.#E=l,this.#d=u,this.#t=h,this.#b=c,this.#a=f,this.#s=p,this.#g=d,this.#y=g,this.#i=y,this.#u=w,this.#l=S,this.#o=b;let _=Lo(e);this.#r=this.#r&Jr|_|rf,_!==Oe&&_!==Be&&_!==St&&(this.#r|=Zr)}#z=[];#W=!1;#H(e){this.#W=!1;let t=this.#z.slice();this.#z.length=0,t.forEach(i=>i(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let s=i.slice(0,i.provisional);t?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#z.push(e),this.#W)return;this.#W=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(s,o)=>{if(s)this.#I(s.code),i.provisional=0;else{for(let a of o)this.#j(a,i);this.#P(i)}this.#H(i.slice(0,i.provisional))})}#U;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#U)await this.#U;else{let i=()=>{};this.#U=new Promise(n=>i=n);try{for(let n of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#j(n,e);this.#P(e)}catch(n){this.#I(n.code),e.provisional=0}this.#U=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let i of this.#e.readdirSync(t,{withFileTypes:!0}))this.#j(i,e);this.#P(e)}catch(i){this.#I(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#r&nf)return!1;let e=Ee&this.#r;return e===Oe||e===Be||e===St}shouldWalk(e,t){return(this.#r&Be)===Be&&!(this.#r&nf)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#T)return this.#T;if(!((gn|dn|Ne)&this.#r))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#T=this.resolve(e)}catch{this.#M()}}realpathSync(){if(this.#T)return this.#T;if(!((gn|dn|Ne)&this.#r))try{let e=this.#e.realpathSync(this.fullpath());return this.#T=this.resolve(e)}catch{this.#M()}}[gf](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),i=[],n=this;for(;n&&n.parent;)t.add(n),n.#A=i.join(this.sep),n.#C=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!t.has(n);)n.#A=void 0,n.#C=void 0,n=n.parent}},yn=class r extends oe{sep="\\";splitSep=qw;constructor(e,t=Oe,i,n,s,o,a){super(e,t,i,n,s,o,a)}newChild(e,t=Oe,i={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Zt.win32.parse(e).root}getRoot(e){if(e=Lw(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,i]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=i;return this.roots[e]=new Xt(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(uf,"$1\\"),e===t}},wn=class r extends oe{splitSep="/";sep="/";constructor(e,t=Oe,i,n,s,o,a){super(e,t,i,n,s,o,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Oe,i={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}},vn=class{root;rootPath;roots;cwd;#e;#t;#s;nocase;#i;constructor(e=process.cwd(),t,i,{nocase:n,childrenCacheSize:s=16*1024,fs:o=Qr}={}){this.#i=lf(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,af.fileURLToPath)(e));let a=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#e=new mn,this.#t=new mn,this.#s=new qo(s);let l=a.substring(this.rootPath.length).split(i);if(l.length===1&&!l[0]&&l.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#i),this.roots[this.rootPath]=this.root;let u=this.root,h=l.length-1,c=t.sep,f=this.rootPath,p=!1;for(let d of l){let g=h--;u=u.child(d,{relative:new Array(g).fill("..").join(c),relativePosix:new Array(g).fill("..").join("/"),fullpath:f+=(p?"":c)+d}),p=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#s}resolve(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let i=this.#e.get(t);if(i!==void 0)return i;let n=this.cwd.resolve(t).fullpath();return this.#e.set(t,n),n}resolvePosix(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let i=this.#t.get(t);if(i!==void 0)return i;let n=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,n),n}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd);let{withFileTypes:i}=t;if(e.canReaddir()){let n=await e.readdir();return i?n:n.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd);let{withFileTypes:i=!0}=t;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(n=>n.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e.withFileTypes,e=this.cwd);let i=await e.readlink();return t?i:i==null?void 0:i.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return t?i:i==null?void 0:i.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e.withFileTypes,e=this.cwd);let i=await e.realpath();return t?i:i==null?void 0:i.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return t?i:i==null?void 0:i.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=t,a=[];(!s||s(e))&&a.push(i?e:e.fullpath());let l=new Set,u=(c,f)=>{l.add(c),c.readdirCB((p,d)=>{if(p)return f(p);let g=d.length;if(!g)return f();let y=()=>{--g===0&&f()};for(let w of d)(!s||s(w))&&a.push(i?w:w.fullpath()),n&&w.isSymbolicLink()?w.realpath().then(S=>S!=null&&S.isUnknown()?S.lstat():S).then(S=>S!=null&&S.shouldWalk(l,o)?u(S,y):y()):w.shouldWalk(l,o)?u(w,y):y()},!0)},h=e;return new Promise((c,f)=>{u(h,p=>{if(p)return f(p);c(a)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=t,a=[];(!s||s(e))&&a.push(i?e:e.fullpath());let l=new Set([e]);for(let u of l){let h=u.readdirSync();for(let c of h){(!s||s(c))&&a.push(i?c:c.fullpath());let f=c;if(c.isSymbolicLink()){if(!(n&&(f=c.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(l,o)&&l.add(f)}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=t;(!s||s(e))&&(yield i?e:e.fullpath());let a=new Set([e]);for(let l of a){let u=l.readdirSync();for(let h of u){(!s||s(h))&&(yield i?h:h.fullpath());let c=h;if(h.isSymbolicLink()){if(!(n&&(c=h.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(a,o)&&a.add(c)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=t,a=new st({objectMode:!0});(!s||s(e))&&a.write(i?e:e.fullpath());let l=new Set,u=[e],h=0,c=()=>{let f=!1;for(;!f;){let p=u.shift();if(!p){h===0&&a.end();return}h++,l.add(p);let d=(y,w,S=!1)=>{if(y)return a.emit("error",y);if(n&&!S){let b=[];for(let _ of w)_.isSymbolicLink()&&b.push(_.realpath().then(C=>C!=null&&C.isUnknown()?C.lstat():C));if(b.length){Promise.all(b).then(()=>d(null,w,!0));return}}for(let b of w)b&&(!s||s(b))&&(a.write(i?b:b.fullpath())||(f=!0));h--;for(let b of w){let _=b.realpathCached()||b;_.shouldWalk(l,o)&&u.push(_)}f&&!a.flowing?a.once("drain",c):g||c()},g=!0;p.readdirCB(d,!0),g=!1}};return c(),a}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof oe||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=t,a=new st({objectMode:!0}),l=new Set;(!s||s(e))&&a.write(i?e:e.fullpath());let u=[e],h=0,c=()=>{let f=!1;for(;!f;){let p=u.shift();if(!p){h===0&&a.end();return}h++,l.add(p);let d=p.readdirSync();for(let g of d)(!s||s(g))&&(a.write(i?g:g.fullpath())||(f=!0));h--;for(let g of d){let y=g;if(g.isSymbolicLink()){if(!(n&&(y=g.realpathSync())))continue;y.isUnknown()&&y.lstatSync()}y.shouldWalk(l,o)&&u.push(y)}}f&&!a.flowing&&a.once("drain",c)};return c(),a}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[gf](t)}},Xt=class extends vn{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,Zt.win32,"\\",{...t,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return Zt.win32.parse(e).root.toUpperCase()}newRoot(e){return new yn(this.rootPath,Be,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},er=class extends vn{sep="/";constructor(e=process.cwd(),t={}){let{nocase:i=!1}=t;super(e,Zt.posix,"/",{...t,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new wn(this.rootPath,Be,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},ei=class extends er{constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,{...t,nocase:i})}},XE=process.platform==="win32"?yn:wn,mf=process.platform==="win32"?Xt:process.platform==="darwin"?ei:er;var Pw=r=>r.length>=1,Dw=r=>r.length>=1,tr=class r{#e;#t;#s;length;#i;#o;#b;#u;#f;#a;#l=!0;constructor(e,t,i,n){if(!Pw(e))throw new TypeError("empty pattern list");if(!Dw(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=t,this.#s=i,this.#i=n,this.#s===0){if(this.isUNC()){let[s,o,a,l,...u]=this.#e,[h,c,f,p,...d]=this.#t;u[0]===""&&(u.shift(),d.shift());let g=[s,o,a,l,""].join("/"),y=[h,c,f,p,""].join("/");this.#e=[g,...u],this.#t=[y,...d],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#e,[a,...l]=this.#t;o[0]===""&&(o.shift(),l.shift());let u=s+"/",h=a+"/";this.#e=[u,...o],this.#t=[h,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#s]}isString(){return typeof this.#e[this.#s]=="string"}isGlobstar(){return this.#e[this.#s]===te}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#b=this.#b||(this.#s===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new r(this.#e,this.#t,this.#s+1,this.#i),this.#o.#a=this.#a,this.#o.#f=this.#f,this.#o.#u=this.#u,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#f!==void 0?this.#f:this.#f=this.#i==="win32"&&this.#s===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#u!==void 0?this.#u:this.#u=this.#i==="win32"&&this.#s===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#s===0?e:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}};var kw=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",rr=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:i,noext:n,noglobstar:s,platform:o=kw}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let a of e)this.add(a)}add(e){let t=new we(e,this.mmopts);for(let i=0;i<t.set.length;i++){let n=t.set[i],s=t.globParts[i];if(!n||!s)throw new Error("invalid pattern object");for(;n[0]==="."&&s[0]===".";)n.shift(),s.shift();let o=new tr(n,s,0,this.platform),a=new we(o.globString(),this.mmopts),l=s[s.length-1]==="**",u=o.isAbsolute();u?this.absolute.push(a):this.relative.push(a),l&&(u?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let t=e.fullpath(),i=`${t}/`,n=e.relative()||".",s=`${n}/`;for(let o of this.relative)if(o.match(n)||o.match(s))return!0;for(let o of this.absolute)if(o.match(t)||o.match(i))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let n of this.relativeChildren)if(n.match(i))return!0;for(let n of this.absoluteChildren)if(n.match(t))return!0;return!1}};var No=class r{store;constructor(e=new Map){this.store=e}copy(){return new r(new Map(this.store))}hasWalked(e,t){var i;return(i=this.store.get(e.fullpath()))==null?void 0:i.has(t.globString())}storeWalked(e,t){let i=e.fullpath(),n=this.store.get(i);n?n.add(t.globString()):this.store.set(i,new Set([t.globString()]))}},Po=class{store=new Map;add(e,t,i){let n=(t?2:0)|(i?1:0),s=this.store.get(e);this.store.set(e,s===void 0?n:n&s)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},Do=class{store=new Map;add(e,t){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(n=>n.globString()===t.globString())||i.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},ti=class r{hasWalkedCache;matches=new Po;subwalks=new Do;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new No}processPatterns(e,t){this.patterns=t;let i=t.map(n=>[e,n]);for(let[n,s]of i){this.hasWalkedCache.storeWalked(n,s);let o=s.root(),a=s.isAbsolute()&&this.opts.absolute!==!1;if(o){n=n.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let c=s.rest();if(c)s=c;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let l,u,h=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)n=n.resolve(l),s=u,h=!0;if(l=s.pattern(),u=s.rest(),h){if(this.hasWalkedCache.hasWalked(n,s))continue;this.hasWalkedCache.storeWalked(n,s)}if(typeof l=="string"){let c=l===".."||l===""||l===".";this.matches.add(n.resolve(l),a,c);continue}else if(l===te){(!n.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(n,s);let c=u==null?void 0:u.pattern(),f=u==null?void 0:u.rest();if(!u||(c===""||c===".")&&!f)this.matches.add(n,a,c===""||c===".");else if(c===".."){let p=n.parent||n;f?this.hasWalkedCache.hasWalked(p,f)||this.subwalks.add(p,f):this.matches.add(p,a,!0)}}else l instanceof RegExp&&this.subwalks.add(n,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new r(this.opts,this.hasWalkedCache)}filterEntries(e,t){let i=this.subwalks.get(e),n=this.child();for(let s of t)for(let o of i){let a=o.isAbsolute(),l=o.pattern(),u=o.rest();l===te?n.testGlobstar(s,o,u,a):l instanceof RegExp?n.testRegExp(s,l,u,a):n.testString(s,l,u,a)}return n}testGlobstar(e,t,i,n){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(i&&t.checkFollowGlobstar()?this.subwalks.add(e,i):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),i){let s=i.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,i.rest(),n);else if(s===".."){let o=e.parent||e;this.subwalks.add(o,i)}else s instanceof RegExp&&this.testRegExp(e,s,i.rest(),n)}}testRegExp(e,t,i,n){t.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}testString(e,t,i,n){e.isNamed(t)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}};var Iw=(r,e)=>typeof r=="string"?new rr([r],e):Array.isArray(r)?new rr(r,e):r,bn=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#s;signal;maxDepth;includeChildMatches;constructor(e,t,i){if(this.patterns=e,this.path=t,this.opts=i,this.#s=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(this.#t=Iw(i.ignore??[],i),!this.includeChildMatches&&typeof this.#t.add!="function")){let n="cannot ignore child matches, ignore lacks add() method.";throw new Error(n)}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#i(e){var t,i;return this.seen.has(e)||!!((i=(t=this.#t)==null?void 0:t.ignored)!=null&&i.call(t,e))}#o(e){var t,i;return!!((i=(t=this.#t)==null?void 0:t.childrenIgnored)!=null&&i.call(t,e))}pause(){this.paused=!0}resume(){var t;if((t=this.signal)!=null&&t.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){var t;(t=this.signal)!=null&&t.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&(s!=null&&s.isSymbolicLink())){let o=await s.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(s,t)}matchCheckTest(e,t){var i;return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!((i=e.realpathCached())!=null&&i.isDirectory()))&&!this.#i(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&(s!=null&&s.isSymbolicLink())){let o=s.realpathSync();o&&(o!=null&&o.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(s,t)}matchFinish(e,t){var s;if(this.#i(e))return;if(!this.includeChildMatches&&((s=this.#t)!=null&&s.add)){let o=`${e.relativePosix()}/**`;this.#t.add(o)}let i=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let n=this.opts.mark&&e.isDirectory()?this.#s:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let o=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(o+n)}else{let o=this.opts.posix?e.relativePosix():e.relative(),a=this.opts.dotRelative&&!o.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(o?a+o+n:"."+n)}}async match(e,t,i){let n=await this.matchCheck(e,i);n&&this.matchFinish(n,t)}matchSync(e,t,i){let n=this.matchCheckSync(e,i);n&&this.matchFinish(n,t)}walkCB(e,t,i){var n;(n=this.signal)!=null&&n.aborted&&i(),this.walkCB2(e,t,new ti(this.opts),i)}walkCB2(e,t,i,n){var a;if(this.#o(e))return n();if((a=this.signal)!=null&&a.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2(e,t,i,n));return}i.processPatterns(e,t);let s=1,o=()=>{--s===0&&n()};for(let[l,u,h]of i.matches.entries())this.#i(l)||(s++,this.match(l,u,h).then(()=>o()));for(let l of i.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirCached();l.calledReaddir()?this.walkCB3(l,u,i,o):l.readdirCB((h,c)=>this.walkCB3(l,c,i,o),!0)}o()}walkCB3(e,t,i,n){i=i.filterEntries(e,t);let s=1,o=()=>{--s===0&&n()};for(let[a,l,u]of i.matches.entries())this.#i(a)||(s++,this.match(a,l,u).then(()=>o()));for(let[a,l]of i.subwalks.entries())s++,this.walkCB2(a,l,i.child(),o);o()}walkCBSync(e,t,i){var n;(n=this.signal)!=null&&n.aborted&&i(),this.walkCB2Sync(e,t,new ti(this.opts),i)}walkCB2Sync(e,t,i,n){var a;if(this.#o(e))return n();if((a=this.signal)!=null&&a.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,i,n));return}i.processPatterns(e,t);let s=1,o=()=>{--s===0&&n()};for(let[l,u,h]of i.matches.entries())this.#i(l)||this.matchSync(l,u,h);for(let l of i.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirSync();this.walkCB3Sync(l,u,i,o)}o()}walkCB3Sync(e,t,i,n){i=i.filterEntries(e,t);let s=1,o=()=>{--s===0&&n()};for(let[a,l,u]of i.matches.entries())this.#i(a)||this.matchSync(a,l,u);for(let[a,l]of i.subwalks.entries())s++,this.walkCB2Sync(a,l,i.child(),o);o()}},ri=class extends bn{matches=new Set;constructor(e,t,i){super(e,t,i)}matchEmit(e){this.matches.add(e)}async walk(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,i)=>{this.walkCB(this.path,this.patterns,()=>{var n;(n=this.signal)!=null&&n.aborted?i(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{var t;if((t=this.signal)!=null&&t.aborted)throw this.signal.reason}),this.matches}},ii=class extends bn{results;constructor(e,t,i){super(e,t,i),this.results=new st({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var Fw=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Pe=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,yf.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=t.platform||Fw,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=t.platform==="win32"?Xt:t.platform==="darwin"?ei:t.platform?er:mf;this.scurry=new l(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",n={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new we(l,n)),[o,a]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=o.map((l,u)=>{let h=a[u];if(!h)throw new Error("invalid pattern object");return new tr(l,h,0,this.platform)})}async walk(){return[...await new ri(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new ri(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new ii(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new ii(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var ko=(r,e={})=>{Array.isArray(r)||(r=[r]);for(let t of r)if(new we(t,e).hasMagic())return!0;return!1};function _n(r,e={}){return new Pe(r,e).streamSync()}function vf(r,e={}){return new Pe(r,e).stream()}function bf(r,e={}){return new Pe(r,e).walkSync()}async function wf(r,e={}){return new Pe(r,e).walk()}function xn(r,e={}){return new Pe(r,e).iterateSync()}function Sf(r,e={}){return new Pe(r,e).iterate()}var jw=_n,$w=Object.assign(vf,{sync:_n}),Bw=xn,Uw=Object.assign(Sf,{sync:xn}),zw=Object.assign(bf,{stream:_n,iterate:xn}),Sn=Object.assign(wf,{glob:wf,globSync:bf,sync:zw,globStream:vf,stream:$w,globStreamSync:_n,streamSync:jw,globIterate:Sf,iterate:Uw,globIterateSync:xn,iterateSync:Bw,Glob:Pe,hasMagic:ko,escape:Vt,unescape:Le});Sn.glob=Sn;var Z=vr(wm());function yl(r){let e=Z.format.printf(({message:a,timestamp:l,metadata:u})=>{let{previousToken:h,nextToken:c,line:f}=u,p=f?`(line ${f})`:"";return`${l} ${a}: ${h} \u2192 ${c} ${p}`}),t=Z.format.printf(({level:a,message:l,timestamp:u,failureReason:h,metadata:c})=>{let{previousToken:f,description:p}=c,d=p||h||"";return`${u} [${a.toUpperCase()}]: ${l}
65
65
  \u21B3 reason: ${f} ${d}`}),i=Z.format.printf(({level:a,message:l,timestamp:u})=>`${u} [${a.toUpperCase()}]: ${l}`),n=(0,Z.format)(a=>{let l=a.metadata;return(l==null?void 0:l.status)==="success"?a:!1}),s=(0,Z.format)(a=>{let l=a.metadata;return(l==null?void 0:l.status)==="failure"||(l==null?void 0:l.status)==="warning"?a:!1}),o=(0,Z.createLogger)({level:"debug",transports:[new Z.transports.File({filename:`.report/${r}-success.log`,format:Z.format.combine(n(),Z.format.timestamp({format:"YYYY-MM-DD HH:mm:ss"}),e)}),new Z.transports.File({filename:`.report/${r}-issues.log`,format:Z.format.combine(s(),Z.format.timestamp({format:"YYYY-MM-DD HH:mm:ss"}),t)}),new Z.transports.File({filename:`.report/${r}-debug.log`,level:"debug",format:Z.format.combine(Z.format.timestamp({format:"YYYY-MM-DD HH:mm:ss"}),i)})]});return{logger:o,logTransformResult(a,l){let{status:u,failureReason:h,needsVerification:c,description:f,previousToken:p,nextToken:d}=l,g=u==="success"?"info":u==="warning"?"warn":"error",y=l.line?`(line: ${l.line})`:"";o.log({level:g,message:`${a} ${y}`,...h&&{failureReason:h},...f&&{description:f},metadata:l}),c&&u==="success"&&o.log({level:"warn",message:`${a} ${y}`,metadata:{previousToken:p,nextToken:d,status:"warning",description:f||"\uC0AC\uC6A9 \uD655\uC778 \uD544\uC694\uD55C \uD1A0\uD070\uC785\uB2C8\uB2E4",needsVerification:!0,line:l.line}})},startFile(a){o.debug(`Starting transformation of ${a}`)},finishFile(a){o.debug(`Finished transformation of ${a}`)}}}function a2(r){let e=bh.find(t=>t.previous===r);return e?e.next&&e.next.length>0?e.next[0]:(!e.next||e.next.length===0)&&e.alternative&&e.alternative.length>0?e.alternative[0]:null:null}function l2(r){return r.replace(/var\(--seed-semantic-typography-([^-]+)-([^-]+)-([^)]+)\)/g,(e,t,i,n)=>{try{let s=`$semantic.typography.${t}${i.charAt(0).toUpperCase()+i.slice(1)}`,o=a2(s);if(!o)return e;let a="";switch(n){case"font-size":a=`--seed-font-size-${o.replace(/Regular|Medium|Bold/,"")}`;break;case"line-height":a=`--seed-line-height-${o.replace(/Regular|Medium|Bold/,"")}`;break;case"font-weight":o.includes("Regular")?a="--seed-font-weight-regular":o.includes("Medium")?a="--seed-font-weight-medium":o.includes("Bold")&&(a="--seed-font-weight-bold");break;case"letter-spacing":return"normal";default:return e}return`var(${a})`}catch(s){return console.error(`Error transforming token: ${e}`,s),e}})}var u2={postcssPlugin:"replace-css-typography-variable",Declaration(r){if(r.value.includes("var(--seed-semantic-typography")){let e=r.value,t=l2(e);e!==t&&(r.value=t)}}},bm=(r,e,t)=>{let i=yl("replace-css-typography-variable");if(!r.path.endsWith(".css"))return r.source;i.startFile(r.path);try{let n=yo([u2]),s=r.source,a=n.process(s,{from:r.path,parser:yo.parse}).sync().root.toString();return i.finishFile(r.path),a}catch(n){return console.error("Error processing CSS:",n),r.source}};function h2(r,e){let t=yl("replace-css-typography-variable"),i=[];for(let o of r)try{if(o.endsWith(".css")){i.push((0,vm.resolve)(o));continue}let a=Sn.sync(`${o}/**/*.css`,{ignore:["**/node_modules/**","**/dist/**","**/build/**"]});i=[...i,...a]}catch(a){console.error(`\uACBD\uB85C \uCC98\uB9AC \uC911 \uC624\uB958 \uBC1C\uC0DD: ${o}`,a)}let n=[...new Set(i)];if(n.length===0){console.log("\uBCC0\uD658\uD560 CSS \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");return}console.log(`\uCD1D ${n.length}\uAC1C\uC758 CSS \uD30C\uC77C\uC744 \uCC3E\uC558\uC2B5\uB2C8\uB2E4.`);let s=0;for(let o of n)try{let a=(0,Ts.readFileSync)(o,"utf8"),l=bm({path:o,source:a},null,{});a!==l&&((0,Ts.writeFileSync)(o,l,"utf8"),t.logTransformResult(o,{previousToken:o,nextToken:"transformed",status:"success"}),s++)}catch(a){console.error(`\uD30C\uC77C \uBCC0\uD658 \uC911 \uC624\uB958 \uBC1C\uC0DD: ${o}`,a),t.logTransformResult(o,{previousToken:o,nextToken:null,status:"failure",failureReason:a.message})}console.log(`CSS \uBCC0\uD658 \uC644\uB8CC: \uCD1D ${s}\uAC1C \uD30C\uC77C \uBCC0\uACBD\uB428`)}var f2=bm;0&&(module.exports={processCssFiles});
66
66
  /*! Bundled license information:
67
67
 
@@ -28,7 +28,7 @@ ${q}`),m.pop(),`{${j}}`}case"number":return isFinite(l)?String(l):e?e(l):"null";
28
28
  `),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:fl.loadavg(),uptime:fl.uptime()}}getTrace(e){return(e?cl.parse(e):cl.get()).map(n=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;let r=new Fg(e);this.handlers.set(e,r),this.logger.pipe(r)}}_uncaughtException(e){let r=this.getAllInfo(e),n=this._getExceptionHandlers(),i=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,a;!n.length&&i&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),i=!1);function s(){mi("doExit",i),mi("process._exiting",process._exiting),i&&!process._exiting&&(a&&clearTimeout(a),process.exit(1))}if(!n||n.length===0)return process.nextTick(s);Ig(n,(o,u)=>{let f=kg(u),d=o.transport||o;function g(p){return()=>{mi(p),f()}}d._ending=!0,d.once("finish",g("finished")),d.once("error",g("error"))},()=>i&&s()),this.logger.log(r),i&&(a=setTimeout(s,3e3))}_getExceptionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleExceptions)}}});var pl=c((uv,dl)=>{"use strict";var{Writable:Bg}=De();dl.exports=class extends Bg{constructor(e){if(super({objectMode:!0}),!e)throw new Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=e}_write(e,r,n){return e.rejection?this.transport.log(e,n):(n(),!0)}}});var bi=c((fv,vl)=>{"use strict";var gl=require("os"),Hg=Cr(),yi=Et()("winston:rejection"),Wg=pi(),ml=gi(),zg=pl();vl.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle rejections");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(n=>this._addHandler(n));this._addHandler(r)}),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}unhandle(){this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`unhandledRejection: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
29
29
  `),stack:e&&e.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:gl.loadavg(),uptime:gl.uptime()}}getTrace(e){return(e?ml.parse(e):ml.get()).map(n=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;let r=new zg(e);this.handlers.set(e,r),this.logger.pipe(r)}}_unhandledRejection(e){let r=this.getAllInfo(e),n=this._getRejectionHandlers(),i=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,a;!n.length&&i&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),i=!1);function s(){yi("doExit",i),yi("process._exiting",process._exiting),i&&!process._exiting&&(a&&clearTimeout(a),process.exit(1))}if(!n||n.length===0)return process.nextTick(s);Hg(n,(o,u)=>{let f=Wg(u),d=o.transport||o;function g(p){return()=>{yi(p),f()}}d._ending=!0,d.once("finish",g("finished")),d.once("error",g("error"))},()=>i&&s()),this.logger.log(r),i&&(a=setTimeout(s,3e3))}_getRejectionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleRejections)}}});var bl=c((cv,yl)=>{"use strict";var wi=class{constructor(e){let r=Ir();if(typeof e!="object"||Array.isArray(e)||!(e instanceof r))throw new Error("Logger is required for profiling");this.logger=e,this.start=Date.now()}done(...e){typeof e[e.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop());let r=typeof e[e.length-1]=="object"?e.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}};yl.exports=wi});var Ir=c((hv,El)=>{"use strict";var{Stream:Ug,Transform:Yg}=De(),wl=Cr(),{LEVEL:he,SPLAT:_l}=I(),xl=hi(),Gg=vi(),Vg=bi(),Jg=Wn(),Kg=bl(),{warn:Zg}=dn(),Xg=$r(),Qg=/%[scdjifoO%]/g,kr=class extends Yg{constructor(e){super({objectMode:!0}),this.configure(e)}child(e){let r=this;return Object.create(r,{write:{value:function(n){let i=Object.assign({},e,n);n instanceof Error&&(i.stack=n.stack,i.message=n.message),r.write(i)}}})}configure({silent:e,format:r,defaultMeta:n,levels:i,level:a="info",exitOnError:s=!0,transports:o,colors:u,emitErrs:f,formatters:d,padLevels:g,rewriters:p,stripColors:v,exceptionHandlers:l,rejectionHandlers:m}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=r||this.format||on()(),this.defaultMeta=n||null,this.levels=i||this.levels||Xg.npm.levels,this.level=a,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new Gg(this),this.rejections=new Vg(this),this.profilers={},this.exitOnError=s,o&&(o=Array.isArray(o)?o:[o],o.forEach(y=>this.add(y))),u||f||d||g||p||v)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
30
30
  `));l&&this.exceptions.handle(l),m&&this.rejections.handle(m)}isLevelEnabled(e){let r=_i(this.levels,e);if(r===null)return!1;let n=_i(this.levels,this.level);return n===null?!1:!this.transports||this.transports.length===0?n>=r:this.transports.findIndex(a=>{let s=_i(this.levels,a.level);return s===null&&(s=n),s>=r})!==-1}log(e,r,...n){if(arguments.length===1)return e[he]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[he]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[he]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[i]=n;if(typeof i=="object"&&i!==null&&!(r&&r.match&&r.match(Qg))){let s=Object.assign({},this.defaultMeta,i,{[he]:e,[_l]:n,level:e,message:r});return i.message&&(s.message=`${s.message} ${i.message}`),i.stack&&(s.stack=i.stack),i.cause&&(s.cause=i.cause),this.write(s),this}return this.write(Object.assign({},this.defaultMeta,{[he]:e,[_l]:n,level:e,message:r})),this}_transform(e,r,n){if(this.silent)return n();e[he]||(e[he]=e.level),!this.levels[e[he]]&&this.levels[e[he]]!==0&&console.error("[winston] Unknown logger level: %s",e[he]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,n()}}_final(e){let r=this.transports.slice();wl(r,(n,i)=>{if(!n||n.finished)return setImmediate(i);n.once("finish",i),n.end()},e)}add(e){let r=!xl(e)||e.log.length>2?new Jg({transport:e}):e;if(!r._writableState||!r._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",r),this._onEvent("warn",r),this.pipe(r),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}remove(e){if(!e)return this;let r=e;return(!xl(e)||e.log.length>2)&&(r=this.transports.filter(n=>n.transport===e)[0]),r&&this.unpipe(r),this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){Zg.deprecated("setLevels")}query(e,r){typeof e=="function"&&(r=e,e={}),e=e||{};let n={},i=Object.assign({},e.query||{});function a(o,u){e.query&&typeof o.formatQuery=="function"&&(e.query=o.formatQuery(i)),o.query(e,(f,d)=>{if(f)return u(f);typeof o.formatResults=="function"&&(d=o.formatResults(d,e.format)),u(null,d)})}function s(o,u){a(o,(f,d)=>{u&&(d=f||d,d&&(n[o.name]=d),u()),u=null})}wl(this.transports.filter(o=>!!o.query),s,()=>r(null,n))}stream(e={}){let r=new Ug,n=[];return r._streams=n,r.destroy=()=>{let i=n.length;for(;i--;)n[i].destroy()},this.transports.filter(i=>!!i.stream).forEach(i=>{let a=i.stream(e);a&&(n.push(a),a.on("log",s=>{s.transport=s.transport||[],s.transport.push(i.name),r.emit("log",s)}),a.on("error",s=>{s.transport=s.transport||[],s.transport.push(i.name),r.emit("error",s)}))}),r}startTimer(){return new Kg(this)}profile(e,...r){let n=Date.now();if(this.profilers[e]){let i=this.profilers[e];delete this.profilers[e],typeof r[r.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),r.pop());let a=typeof r[r.length-1]=="object"?r.pop():{};return a.level=a.level||"info",a.durationMs=n-i,a.message=a.message||e,this.write(a)}return this.profilers[e]=n,this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...e)}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...e)}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
31
- `))}_onEvent(e,r){function n(i){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,i,r)}r["__winston"+e]||(r["__winston"+e]=n.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function _i(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(kr.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});El.exports=kr});var xi=c((dv,Sl)=>{"use strict";var{LEVEL:e0}=I(),t0=$r(),r0=Ir(),n0=Et()("winston:create-logger");function i0(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}Sl.exports=function(t={}){t.levels=t.levels||t0.npm.levels;class e extends r0{constructor(i){super(i)}}let r=new e(t);return Object.keys(t.levels).forEach(function(n){if(n0('Define prototype method for "%s"',n),n==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[n]=function(...i){let a=this||r;if(i.length===1){let[s]=i,o=s&&s.message&&s||{message:s};return o.level=o[e0]=n,a._addDefaultMeta(o),a.write(o),this||r}return i.length===0?(a.log(n,""),a):a.log(n,...i)},e.prototype[i0(n)]=function(){return(this||r).isLevelEnabled(n)}}),r}});var Rl=c((gv,Ml)=>{"use strict";var a0=xi();Ml.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let n=r.transports||this.options.transports;n?r.transports=Array.isArray(n)?n.slice():[n]:r.transports=[];let i=a0(r);i.on("close",()=>this._delete(e)),this.loggers.set(e,i)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,n)=>this._removeLogger(n))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var Ol=c(L=>{"use strict";var ql=hn(),{warn:Ot}=dn();L.version=Xa().version;L.transports=Qu();L.config=$r();L.addColors=ql.levels;L.format=ql.format;L.createLogger=xi();L.Logger=Ir();L.ExceptionHandler=vi();L.RejectionHandler=bi();L.Container=Rl();L.Transport=Je();L.loggers=new L.Container;var de=L.createLogger();Object.keys(L.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>L[t]=(...e)=>de[t](...e));Object.defineProperty(L,"level",{get(){return de.level},set(t){de.level=t}});Object.defineProperty(L,"exceptions",{get(){return de.exceptions}});Object.defineProperty(L,"rejections",{get(){return de.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(L,t,{get(){return de[t]},set(e){de[t]=e}})});Object.defineProperty(L,"default",{get(){return{exceptionHandlers:de.exceptionHandlers,rejectionHandlers:de.rejectionHandlers,transports:de.transports}}});Ot.deprecated(L,"setLevels");Ot.forFunctions(L,"useFormat",["cli"]);Ot.forProperties(L,"useFormat",["padLevels","stripColors"]);Ot.forFunctions(L,"deprecated",["addRewriter","addFilter","clone","extend"]);Ot.forProperties(L,"deprecated",["emitErrs","levelLength"])});var l0={};kl(l0,{default:()=>u0});module.exports=Bl(l0);var Ai=[{previous:"$semantic.typography.h1",next:[],description:"Deprecated"},{previous:"$semantic.typography.h2",next:[],description:"Deprecated"},{previous:"$semantic.typography.h3",next:[],description:"Deprecated"},{previous:"$semantic.typography.h4",next:["t10Bold","screenTitle"],description:"\uC904\uAC04\uACA9 -0.1px"},{previous:"$semantic.typography.title1Bold",next:["t9Bold"],description:"\uC904\uAC04\uACA9 -0.4px"},{previous:"$semantic.typography.title1Regular",next:[],description:"Deprecated"},{previous:"$semantic.typography.title2Bold",next:["t7Bold"]},{previous:"$semantic.typography.title2Regular",next:["t7Regular"]},{previous:"$semantic.typography.title3Bold",next:["t6Bold"],description:"\uC904\uAC04\uACA9 -0.3px"},{previous:"$semantic.typography.title3Regular",next:["t6Regular"]},{previous:"$semantic.typography.subtitle1Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.subtitle1Regular",next:["t5Regular"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.subtitle2Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.subtitle2Regular",next:["t4Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.bodyL1Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 -2px"},{previous:"$semantic.typography.bodyL1Regular",next:["articleBody"]},{previous:"$semantic.typography.bodyL2Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 -2px"},{previous:"$semantic.typography.bodyL2Regular",next:[],alternative:["t4Regular"],description:"Deprecated"},{previous:"$semantic.typography.bodyM1Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.bodyM1Regular",next:["t5Regular"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.bodyM2Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.bodyM2Regular",next:["t4Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.caption1Bold",next:["t3Bold"],description:"\uC904\uAC04\uACA9 -1.5px"},{previous:"$semantic.typography.caption1Regular",next:[],alternative:["t3Regular"],description:"Deprecated"},{previous:"$semantic.typography.caption2Bold",next:["t2Bold"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.caption2Regular",next:["t2Regular"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.label1Bold",next:["t6Bold"],description:"\uC904\uAC04\uACA9 -0.3px"},{previous:"$semantic.typography.label1Regular",next:["t6Regular"]},{previous:"$semantic.typography.label2Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.label2Regular",next:["t5Regular"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.label3Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label3Regular",next:["t4Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label4Bold",next:["t2Bold"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.label4Regular",next:["t2Regular"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.label5Bold",next:["t1Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label5Regular",next:["t1Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label6Bold",next:[],alternative:["t1Bold"],description:"Deprecated"},{previous:"$semantic.typography.label6Regular",next:[],alternative:["t1Regular"],description:"Deprecated"}];var B=Fl(Ol(),1);function Tl(t){let e=B.format.printf(({message:o,timestamp:u,metadata:f})=>{let{previousToken:d,nextToken:g,line:p}=f,v=p?`(line ${p})`:"";return`${u} ${o}: ${d} \u2192 ${g} ${v}`}),r=B.format.printf(({level:o,message:u,timestamp:f,failureReason:d,metadata:g})=>{let{previousToken:p,description:v}=g,l=v||d||"";return`${f} [${o.toUpperCase()}]: ${u}
31
+ `))}_onEvent(e,r){function n(i){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,i,r)}r["__winston"+e]||(r["__winston"+e]=n.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function _i(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(kr.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});El.exports=kr});var xi=c((dv,Sl)=>{"use strict";var{LEVEL:e0}=I(),t0=$r(),r0=Ir(),n0=Et()("winston:create-logger");function i0(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}Sl.exports=function(t={}){t.levels=t.levels||t0.npm.levels;class e extends r0{constructor(i){super(i)}}let r=new e(t);return Object.keys(t.levels).forEach(function(n){if(n0('Define prototype method for "%s"',n),n==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[n]=function(...i){let a=this||r;if(i.length===1){let[s]=i,o=s&&s.message&&s||{message:s};return o.level=o[e0]=n,a._addDefaultMeta(o),a.write(o),this||r}return i.length===0?(a.log(n,""),a):a.log(n,...i)},e.prototype[i0(n)]=function(){return(this||r).isLevelEnabled(n)}}),r}});var Rl=c((gv,Ml)=>{"use strict";var a0=xi();Ml.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let n=r.transports||this.options.transports;n?r.transports=Array.isArray(n)?n.slice():[n]:r.transports=[];let i=a0(r);i.on("close",()=>this._delete(e)),this.loggers.set(e,i)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,n)=>this._removeLogger(n))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var Ol=c(L=>{"use strict";var ql=hn(),{warn:Ot}=dn();L.version=Xa().version;L.transports=Qu();L.config=$r();L.addColors=ql.levels;L.format=ql.format;L.createLogger=xi();L.Logger=Ir();L.ExceptionHandler=vi();L.RejectionHandler=bi();L.Container=Rl();L.Transport=Je();L.loggers=new L.Container;var de=L.createLogger();Object.keys(L.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>L[t]=(...e)=>de[t](...e));Object.defineProperty(L,"level",{get(){return de.level},set(t){de.level=t}});Object.defineProperty(L,"exceptions",{get(){return de.exceptions}});Object.defineProperty(L,"rejections",{get(){return de.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(L,t,{get(){return de[t]},set(e){de[t]=e}})});Object.defineProperty(L,"default",{get(){return{exceptionHandlers:de.exceptionHandlers,rejectionHandlers:de.rejectionHandlers,transports:de.transports}}});Ot.deprecated(L,"setLevels");Ot.forFunctions(L,"useFormat",["cli"]);Ot.forProperties(L,"useFormat",["padLevels","stripColors"]);Ot.forFunctions(L,"deprecated",["addRewriter","addFilter","clone","extend"]);Ot.forProperties(L,"deprecated",["emitErrs","levelLength"])});var l0={};kl(l0,{default:()=>u0});module.exports=Bl(l0);var Ai=[{previous:"$semantic.typography.h1",next:[],description:"Deprecated"},{previous:"$semantic.typography.h2",next:[],description:"Deprecated"},{previous:"$semantic.typography.h3",next:[],description:"Deprecated"},{previous:"$semantic.typography.h4",next:["t10Bold","screenTitle"],description:"\uC904\uAC04\uACA9 -0.1px"},{previous:"$semantic.typography.title1Bold",next:["t9Bold"],description:"\uC904\uAC04\uACA9 -0.4px"},{previous:"$semantic.typography.title1Regular",next:[],description:"Deprecated"},{previous:"$semantic.typography.title2Bold",next:["t7Bold"]},{previous:"$semantic.typography.title2Regular",next:["t7Regular"]},{previous:"$semantic.typography.title3Bold",next:["t6Bold"],description:"\uC904\uAC04\uACA9 -0.3px"},{previous:"$semantic.typography.title3Regular",next:["t6Regular"]},{previous:"$semantic.typography.subtitle1Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.subtitle1Regular",next:["t5Regular"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.subtitle2Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.subtitle2Regular",next:["t4Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.bodyL1Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 -2px"},{previous:"$semantic.typography.bodyL1Regular",next:["articleBody"]},{previous:"$semantic.typography.bodyL2Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 -2px"},{previous:"$semantic.typography.bodyL2Regular",next:[],alternative:["t4Regular"],description:"Deprecated"},{previous:"$semantic.typography.bodyM1Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.bodyM1Regular",next:["t5Regular"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.bodyM2Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.bodyM2Regular",next:["t4Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.caption1Bold",next:["t3Bold"],description:"\uC904\uAC04\uACA9 -1.5px"},{previous:"$semantic.typography.caption1Regular",next:[],alternative:["t3Regular"],description:"Deprecated"},{previous:"$semantic.typography.caption2Bold",next:["t2Bold"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.caption2Regular",next:["t2Regular"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.label1Bold",next:["t6Bold"],description:"\uC904\uAC04\uACA9 -0.3px"},{previous:"$semantic.typography.label1Regular",next:["t6Regular"]},{previous:"$semantic.typography.label2Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.label2Regular",next:["t5Regular"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.label3Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label3Regular",next:["t4Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label4Bold",next:["t2Bold"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.label4Regular",next:["t2Regular"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.label5Bold",next:["t1Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label5Regular",next:["t1Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label6Bold",next:[],alternative:["t1Bold"],description:"Deprecated"},{previous:"$semantic.typography.label6Regular",next:[],alternative:["t1Regular"],description:"Deprecated"}];var B=Fl(Ol());function Tl(t){let e=B.format.printf(({message:o,timestamp:u,metadata:f})=>{let{previousToken:d,nextToken:g,line:p}=f,v=p?`(line ${p})`:"";return`${u} ${o}: ${d} \u2192 ${g} ${v}`}),r=B.format.printf(({level:o,message:u,timestamp:f,failureReason:d,metadata:g})=>{let{previousToken:p,description:v}=g,l=v||d||"";return`${f} [${o.toUpperCase()}]: ${u}
32
32
  \u21B3 reason: ${p} ${l}`}),n=B.format.printf(({level:o,message:u,timestamp:f})=>`${f} [${o.toUpperCase()}]: ${u}`),i=(0,B.format)(o=>{let u=o.metadata;return(u==null?void 0:u.status)==="success"?o:!1}),a=(0,B.format)(o=>{let u=o.metadata;return(u==null?void 0:u.status)==="failure"||(u==null?void 0:u.status)==="warning"?o:!1}),s=(0,B.createLogger)({level:"debug",transports:[new B.transports.File({filename:`.report/${t}-success.log`,format:B.format.combine(i(),B.format.timestamp({format:"YYYY-MM-DD HH:mm:ss"}),e)}),new B.transports.File({filename:`.report/${t}-issues.log`,format:B.format.combine(a(),B.format.timestamp({format:"YYYY-MM-DD HH:mm:ss"}),r)}),new B.transports.File({filename:`.report/${t}-debug.log`,level:"debug",format:B.format.combine(B.format.timestamp({format:"YYYY-MM-DD HH:mm:ss"}),n)})]});return{logger:s,logTransformResult(o,u){let{status:f,failureReason:d,needsVerification:g,description:p,previousToken:v,nextToken:l}=u,m=f==="success"?"info":f==="warning"?"warn":"error",y=u.line?`(line: ${u.line})`:"";s.log({level:m,message:`${o} ${y}`,...d&&{failureReason:d},...p&&{description:p},metadata:u}),g&&f==="success"&&s.log({level:"warn",message:`${o} ${y}`,metadata:{previousToken:v,nextToken:l,status:"warning",description:p||"\uC0AC\uC6A9 \uD655\uC778 \uD544\uC694\uD55C \uD1A0\uD070\uC785\uB2C8\uB2E4",needsVerification:!0,line:u.line}})},startFile(o){s.debug(`Starting transformation of ${o}`)},finishFile(o){s.debug(`Finished transformation of ${o}`)}}}function Fr(t){let e=Ai.find(r=>{let n=r.previous.split(".");return n[n.length-1]===t});return e?e.next&&e.next.length>0?e.next[0]:(!e.next||e.next.length===0)&&e.alternative&&e.alternative.length>0?e.alternative[0]:null:null}function s0(t,e,r){if(!r)return;let n=e.find(t.ImportDeclaration,{source:{value:"components/Base/Text"}});if(n.length===0)return;let i=e.get().node.comments||[];n.forEach(a=>{let s=a.node.comments||[];a.node.specifiers.find(u=>u.type==="ImportDefaultSpecifier")&&(a.node.source.value="@seed-design/react",a.node.specifiers=[t.importSpecifier(t.identifier("Text"))]),a.node.comments=s}),i.length>0&&(e.get().node.comments=i)}function Ei(t,e){if(e.consequent.type==="StringLiteral"){let r=e.consequent.value,n=Fr(r);n&&(e.consequent.value=n)}if(e.alternate.type==="StringLiteral"){let r=e.alternate.value,n=Fr(r);n&&(e.alternate.value=n)}return e.consequent.type==="ConditionalExpression"&&Ei(t,e.consequent),e.alternate.type==="ConditionalExpression"&&Ei(t,e.alternate),e}var o0=(t,e)=>{let r=Tl("replace-text-component"),n=e.jscodeshift,i=n(t.source);r.startFile(t.path);let a=!1;i.find(n.JSXElement).filter(o=>{let u=o.node.openingElement.name;return u.type==="JSXIdentifier"&&u.name==="Text"}).forEach(o=>{var d,g,p,v;let u=o.node.openingElement,f=u.attributes.find(l=>l.type==="JSXAttribute"&&l.name.name==="variant");if(f&&f.type==="JSXAttribute"){if(((d=f.value)==null?void 0:d.type)==="StringLiteral"){let l=f.value.value,m=Fr(l);m&&(u.attributes=u.attributes.filter(y=>!(y.type==="JSXAttribute"&&y.name.name==="variant")),u.attributes.push(n.jsxAttribute(n.jsxIdentifier("textStyle"),n.stringLiteral(m))),a=!0,r.logTransformResult(t.path,{previousToken:`variant="${l}"`,nextToken:`textStyle="${m}"`,status:"success",line:(g=f.loc)==null?void 0:g.start.line}))}else if(((p=f.value)==null?void 0:p.type)==="JSXExpressionContainer"){let l=f.value.expression;if(l.type==="StringLiteral"){let m=l.value,y=Fr(m);y&&(u.attributes=u.attributes.filter(x=>!(x.type==="JSXAttribute"&&x.name.name==="variant")),u.attributes.push(n.jsxAttribute(n.jsxIdentifier("textStyle"),n.stringLiteral(y))),a=!0)}else if(l.type==="ConditionalExpression"){let m=Ei(n,l);u.attributes=u.attributes.filter(y=>!(y.type==="JSXAttribute"&&y.name.name==="variant")),u.attributes.push(n.jsxAttribute(n.jsxIdentifier("textStyle"),n.jsxExpressionContainer(m))),a=!0,r.logTransformResult(t.path,{previousToken:"variant={\uC870\uAC74\uBD80 \uD45C\uD604\uC2DD}",nextToken:"textStyle={\uC870\uAC74\uBD80 \uD45C\uD604\uC2DD}",status:"success",line:(v=f.loc)==null?void 0:v.start.line})}}}}),s0(n,i,a),r.finishFile(t.path);let s={quote:"auto",objectCurlySpacing:!0};return i.toSource(s)},u0=o0;
33
33
  /*! Bundled license information:
34
34