socket 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +415 -0
- package/LICENSE +21 -0
- package/dist/bootstrap-smol.js +262 -0
- package/dist/bootstrap.js +135 -119
- package/logo-dark.png +0 -0
- package/logo-light.png +0 -0
- package/package.json +22 -14
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";var Gv=Object.create;var uu=Object.defineProperty;var Vv=Object.getOwnPropertyDescriptor;var Wv=Object.getOwnPropertyNames;var zv=Object.getPrototypeOf,qv=Object.prototype.hasOwnProperty;var ge=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Kv=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Wv(t))!qv.call(e,i)&&i!==s&&uu(e,i,{get:()=>t[i],enumerable:!(u=Vv(t,i))||u.enumerable});return e};var yt=(e,t,s)=>(s=e!=null?Gv(zv(e)):{},Kv(t||!e||!e.__esModule?uu(s,"default",{value:e,enumerable:!0}):s,e));var xt=ge((WF,fu)=>{var Hn=Object.defineProperty,Jv=Object.getOwnPropertyDescriptor,Zv=Object.getOwnPropertyNames,Xv=Object.prototype.hasOwnProperty,Yv=(e,t)=>{for(var s in t)Hn(e,s,{get:t[s],enumerable:!0})},Qv=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Zv(t))!Xv.call(e,i)&&i!==s&&Hn(e,i,{get:()=>t[i],enumerable:!(u=Jv(t,i))||u.enumerable});return e},eS=e=>Qv(Hn({},"__esModule",{value:!0}),e),du={};Yv(du,{clearEnv:()=>iS,getEnvValue:()=>rS,hasOverride:()=>oS,resetEnv:()=>nS,setEnv:()=>sS,withEnv:()=>aS,withEnvSync:()=>lS});fu.exports=eS(du);var tS=require("async_hooks"),Bs=new tS.AsyncLocalStorage,er=new Map;function rS(e){let t=Bs.getStore();return t?.has(e)?t.get(e):er.has(e)?er.get(e):process.env[e]}function sS(e,t){er.set(e,t)}function iS(e){er.delete(e)}function nS(){er.clear()}function oS(e){return Bs.getStore()?.has(e)||er.has(e)}async function aS(e,t){let s=new Map(Object.entries(e));return await Bs.run(s,t)}function lS(e,t){let s=new Map(Object.entries(e));return Bs.run(s,t)}});var Vn=ge((zF,mu)=>{var Gn=Object.defineProperty,cS=Object.getOwnPropertyDescriptor,uS=Object.getOwnPropertyNames,hS=Object.prototype.hasOwnProperty,pS=(e,t)=>{for(var s in t)Gn(e,s,{get:t[s],enumerable:!0})},dS=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of uS(t))!hS.call(e,i)&&i!==s&&Gn(e,i,{get:()=>t[i],enumerable:!(u=cS(t,i))||u.enumerable});return e},fS=e=>dS(Gn({},"__esModule",{value:!0}),e),gu={};pS(gu,{getHome:()=>mS});mu.exports=fS(gu);var gS=xt();function mS(){return(0,gS.getEnvValue)("HOME")}});var zn=ge((qF,vu)=>{var Wn=Object.defineProperty,yS=Object.getOwnPropertyDescriptor,vS=Object.getOwnPropertyNames,SS=Object.prototype.hasOwnProperty,ES=(e,t)=>{for(var s in t)Wn(e,s,{get:t[s],enumerable:!0})},bS=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of vS(t))!SS.call(e,i)&&i!==s&&Wn(e,i,{get:()=>t[i],enumerable:!(u=yS(t,i))||u.enumerable});return e},_S=e=>bS(Wn({},"__esModule",{value:!0}),e),yu={};ES(yu,{getAppdata:()=>wS,getComspec:()=>AS,getLocalappdata:()=>OS,getUserprofile:()=>RS});vu.exports=_S(yu);var Us=xt();function wS(){return(0,Us.getEnvValue)("APPDATA")}function OS(){return(0,Us.getEnvValue)("LOCALAPPDATA")}function RS(){return(0,Us.getEnvValue)("USERPROFILE")}function AS(){return(0,Us.getEnvValue)("COMSPEC")}});var bu=ge((KF,Eu)=>{var qn=Object.defineProperty,CS=Object.getOwnPropertyDescriptor,IS=Object.getOwnPropertyNames,TS=Object.prototype.hasOwnProperty,PS=(e,t)=>{for(var s in t)qn(e,s,{get:t[s],enumerable:!0})},xS=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of IS(t))!TS.call(e,i)&&i!==s&&qn(e,i,{get:()=>t[i],enumerable:!(u=CS(t,i))||u.enumerable});return e},NS=e=>xS(qn({},"__esModule",{value:!0}),e),Su={};PS(Su,{getXdgCacheHome:()=>kS,getXdgConfigHome:()=>LS,getXdgDataHome:()=>DS});Eu.exports=NS(Su);var Kn=xt();function kS(){return(0,Kn.getEnvValue)("XDG_CACHE_HOME")}function LS(){return(0,Kn.getEnvValue)("XDG_CONFIG_HOME")}function DS(){return(0,Kn.getEnvValue)("XDG_DATA_HOME")}});var Fs=ge((JF,Ou)=>{var Jn=Object.defineProperty,$S=Object.getOwnPropertyDescriptor,MS=Object.getOwnPropertyNames,jS=Object.prototype.hasOwnProperty,BS=(e,t)=>{for(var s in t)Jn(e,s,{get:t[s],enumerable:!0})},US=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of MS(t))!jS.call(e,i)&&i!==s&&Jn(e,i,{get:()=>t[i],enumerable:!(u=$S(t,i))||u.enumerable});return e},FS=e=>US(Jn({},"__esModule",{value:!0}),e),_u={};BS(_u,{DARWIN:()=>GS,S_IXGRP:()=>zS,S_IXOTH:()=>qS,S_IXUSR:()=>WS,WIN32:()=>VS});Ou.exports=FS(_u);var HS=require("os"),wu=(0,HS.platform)(),GS=wu==="darwin",VS=wu==="win32",WS=64,zS=8,qS=1});var tr=ge((ZF,Cu)=>{var Xn=Object.defineProperty,KS=Object.getOwnPropertyDescriptor,JS=Object.getOwnPropertyNames,ZS=Object.prototype.hasOwnProperty,XS=(e,t)=>{for(var s in t)Xn(e,s,{get:t[s],enumerable:!0})},YS=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of JS(t))!ZS.call(e,i)&&i!==s&&Xn(e,i,{get:()=>t[i],enumerable:!(u=KS(t,i))||u.enumerable});return e},QS=e=>YS(Xn({},"__esModule",{value:!0}),e),Ru={};XS(Ru,{getAbortController:()=>Au,getAbortSignal:()=>eE,getSpinner:()=>tE});Cu.exports=QS(Ru);var Zn;function Au(){return Zn===void 0&&(Zn=new AbortController),Zn}function eE(){return Au().signal}var Hs;function tE(){if(Hs===void 0)try{let{Spinner:e}=require("../lib/spinner");Hs=e()??null}catch{Hs=null}return Hs??null}});var rr=ge((XF,Tu)=>{var eo=Object.defineProperty,rE=Object.getOwnPropertyDescriptor,sE=Object.getOwnPropertyNames,iE=Object.prototype.hasOwnProperty,nE=(e,t)=>{for(var s in t)eo(e,s,{get:t[s],enumerable:!0})},oE=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of sE(t))!iE.call(e,i)&&i!==s&&eo(e,i,{get:()=>t[i],enumerable:!(u=rE(t,i))||u.enumerable});return e},aE=e=>oE(eo({},"__esModule",{value:!0}),e),Iu={};nE(Iu,{arrayChunk:()=>uE,arrayUnique:()=>hE,isArray:()=>pE,joinAnd:()=>dE,joinOr:()=>fE});Tu.exports=aE(Iu);var Yn;function lE(){return Yn===void 0&&(Yn=new Intl.ListFormat("en",{style:"long",type:"conjunction"})),Yn}var Qn;function cE(){return Qn===void 0&&(Qn=new Intl.ListFormat("en",{style:"long",type:"disjunction"})),Qn}function uE(e,t){let s=t??2;if(s<=0)throw new Error("Chunk size must be greater than 0");let{length:u}=e,i=Math.min(u,s),a=[];for(let c=0;c<u;c+=i)a.push(e.slice(c,c+i));return a}function hE(e){return[...new Set(e)]}var pE=Array.isArray;function dE(e){return lE().format(e)}function fE(e){return cE().format(e)}});var ro=ge((YF,xu)=>{var to=Object.defineProperty,gE=Object.getOwnPropertyDescriptor,mE=Object.getOwnPropertyNames,yE=Object.prototype.hasOwnProperty,vE=(e,t)=>{for(var s in t)to(e,s,{get:t[s],enumerable:!0})},SE=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of mE(t))!yE.call(e,i)&&i!==s&&to(e,i,{get:()=>t[i],enumerable:!(u=gE(t,i))||u.enumerable});return e},EE=e=>SE(to({},"__esModule",{value:!0}),e),Pu={};vE(Pu,{COLUMN_LIMIT:()=>TE,EMPTY_FILE:()=>RE,EMPTY_VALUE:()=>AE,LOOP_SENTINEL:()=>_E,NODE_AUTH_TOKEN:()=>PE,NODE_ENV:()=>xE,UNDEFINED_TOKEN:()=>CE,UNKNOWN_ERROR:()=>wE,UNKNOWN_VALUE:()=>OE,V:()=>IE,kInternalsSymbol:()=>bE});xu.exports=EE(Pu);var bE=Symbol("@socketregistry.constants.internals"),_E=1e6,wE="Unknown error",OE="<unknown>",RE=`/* empty */
|
|
3
|
+
`,AE="<value>",CE=void 0,IE="v",TE=80,PE="NODE_AUTH_TOKEN",xE="NODE_ENV"});var Lu=ge(sr=>{"use strict";var NE=Object.defineProperty,it=(e,t)=>NE(e,"name",{value:t,configurable:!0});Object.defineProperty(sr,"__esModule",{value:!0});var Nu=it(function(e){return function(t,s,u){return e(t,s,u)*u}},"castComparer"),io=it(function(e,t){if(e)throw Error("Invalid sort config: "+t)},"throwInvalidConfigErrorIfTrue"),ku=it(function(e){var t=e||{},s=t.asc,u=t.desc,i=s?1:-1,a=s||u;io(!a,"Expected `asc` or `desc` property"),io(s&&u,"Ambiguous object with `asc` and `desc` config properties");var c=e.comparer&&Nu(e.comparer);return{order:i,sortBy:a,comparer:c}},"unpackObjectSorter"),kE=it(function(e){return it(function t(s,u,i,a,c,r,n){var o,l;if(typeof s=="string")o=r[s],l=n[s];else if(typeof s=="function")o=s(r),l=s(n);else{var h=ku(s);return t(h.sortBy,u,i,h.order,h.comparer||e,r,n)}var p=c(o,l,a);return(p===0||o==null&&l==null)&&u.length>i?t(u[i],u,i+1,a,c,r,n):p},"multiPropertySorter")},"multiPropertySorterProvider");function no(e,t,s){if(e===void 0||e===!0)return function(a,c){return t(a,c,s)};if(typeof e=="string")return io(e.includes("."),"String syntax not allowed for nested properties."),function(a,c){return t(a[e],c[e],s)};if(typeof e=="function")return function(a,c){return t(e(a),e(c),s)};if(Array.isArray(e)){var u=kE(t);return function(a,c){return u(e[0],e,1,s,t,a,c)}}var i=ku(e);return no(i.sortBy,i.comparer||t,i.order)}it(no,"getSortStrategy");var so=it(function(e,t,s,u){var i;return Array.isArray(t)?(Array.isArray(s)&&s.length<2&&(i=s,s=i[0]),t.sort(no(s,u,e))):t},"sortArray");function Gs(e){var t=Nu(e.comparer);return function(s){var u=Array.isArray(s)&&!e.inPlaceSorting?s.slice():s;return{asc:it(function(i){return so(1,u,i,t)},"asc"),desc:it(function(i){return so(-1,u,i,t)},"desc"),by:it(function(i){return so(1,u,i,t)},"by")}}}it(Gs,"createNewSortInstance");var oo=it(function(e,t,s){return e==null?s:t==null?-s:typeof e!=typeof t?typeof e<typeof t?-1:1:e<t?-1:e>t?1:0},"defaultComparer"),LE=Gs({comparer:oo}),DE=Gs({comparer:oo,inPlaceSorting:!0});sr.createNewSortInstance=Gs;sr.defaultComparer=oo;sr.inPlaceSort=DE;sr.sort=LE});var Hu=ge((eH,Fu)=>{"use strict";var $E=Object.defineProperty,we=(e,t)=>$E(e,"name",{value:t,configurable:!0}),Oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ws=Oe((e,t)=>{"use strict";var s="2.0.0",u=Number.MAX_SAFE_INTEGER||9007199254740991,i=16,a=250,c=["major","premajor","minor","preminor","patch","prepatch","prerelease"];t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:a,MAX_SAFE_INTEGER:u,RELEASE_TYPES:c,SEMVER_SPEC_VERSION:s,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}),zs=Oe((e,t)=>{"use strict";var s=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...u)=>{}:()=>{};t.exports=s}),Vr=Oe((e,t)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:u,MAX_LENGTH:i}=Ws(),a=zs();e=t.exports={};var c=e.re=[],r=e.safeRe=[],n=e.src=[],o=e.safeSrc=[],l=e.t={},h=0,p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",i],[p,u]],g=we(f=>{for(let[y,S]of d)f=f.split(`${y}*`).join(`${y}{0,${S}}`).split(`${y}+`).join(`${y}{1,${S}}`);return f},"makeSafeRegex"),m=we((f,y,S)=>{let E=g(y),b=h++;a(f,b,y),l[f]=b,n[b]=y,o[b]=E,c[b]=new RegExp(y,S?"g":void 0),r[b]=new RegExp(E,S?"g":void 0)},"createToken");m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),m("MAINVERSION",`(${n[l.NUMERICIDENTIFIER]})\\.(${n[l.NUMERICIDENTIFIER]})\\.(${n[l.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${n[l.NUMERICIDENTIFIERLOOSE]})\\.(${n[l.NUMERICIDENTIFIERLOOSE]})\\.(${n[l.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${n[l.NONNUMERICIDENTIFIER]}|${n[l.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${n[l.NONNUMERICIDENTIFIER]}|${n[l.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${n[l.PRERELEASEIDENTIFIER]}(?:\\.${n[l.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${n[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${n[l.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${p}+`),m("BUILD",`(?:\\+(${n[l.BUILDIDENTIFIER]}(?:\\.${n[l.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${n[l.MAINVERSION]}${n[l.PRERELEASE]}?${n[l.BUILD]}?`),m("FULL",`^${n[l.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${n[l.MAINVERSIONLOOSE]}${n[l.PRERELEASELOOSE]}?${n[l.BUILD]}?`),m("LOOSE",`^${n[l.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${n[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${n[l.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${n[l.XRANGEIDENTIFIER]})(?:\\.(${n[l.XRANGEIDENTIFIER]})(?:\\.(${n[l.XRANGEIDENTIFIER]})(?:${n[l.PRERELEASE]})?${n[l.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${n[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[l.XRANGEIDENTIFIERLOOSE]})(?:${n[l.PRERELEASELOOSE]})?${n[l.BUILD]}?)?)?`),m("XRANGE",`^${n[l.GTLT]}\\s*${n[l.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${n[l.GTLT]}\\s*${n[l.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${s}})(?:\\.(\\d{1,${s}}))?(?:\\.(\\d{1,${s}}))?`),m("COERCE",`${n[l.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",n[l.COERCEPLAIN]+`(?:${n[l.PRERELEASE]})?(?:${n[l.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",n[l.COERCE],!0),m("COERCERTLFULL",n[l.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${n[l.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",m("TILDE",`^${n[l.LONETILDE]}${n[l.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${n[l.LONETILDE]}${n[l.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${n[l.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",m("CARET",`^${n[l.LONECARET]}${n[l.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${n[l.LONECARET]}${n[l.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${n[l.GTLT]}\\s*(${n[l.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${n[l.GTLT]}\\s*(${n[l.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${n[l.GTLT]}\\s*(${n[l.LOOSEPLAIN]}|${n[l.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${n[l.XRANGEPLAIN]})\\s+-\\s+(${n[l.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${n[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${n[l.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}),co=Oe((e,t)=>{"use strict";var s=Object.freeze({loose:!0}),u=Object.freeze({}),i=we(a=>a?typeof a!="object"?s:a:u,"parseOptions");t.exports=i}),Mu=Oe((e,t)=>{"use strict";var s=/^[0-9]+$/,u=we((a,c)=>{let r=s.test(a),n=s.test(c);return r&&n&&(a=+a,c=+c),a===c?0:r&&!n?-1:n&&!r?1:a<c?-1:1},"compareIdentifiers"),i=we((a,c)=>u(c,a),"rcompareIdentifiers");t.exports={compareIdentifiers:u,rcompareIdentifiers:i}}),We=Oe((e,t)=>{"use strict";var s=zs(),{MAX_LENGTH:u,MAX_SAFE_INTEGER:i}=Ws(),{safeRe:a,t:c}=Vr(),r=co(),{compareIdentifiers:n}=Mu(),o=class vt{static{we(this,"SemVer")}constructor(h,p){if(p=r(p),h instanceof vt){if(h.loose===!!p.loose&&h.includePrerelease===!!p.includePrerelease)return h;h=h.version}else if(typeof h!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof h}".`);if(h.length>u)throw new TypeError(`version is longer than ${u} characters`);s("SemVer",h,p),this.options=p,this.loose=!!p.loose,this.includePrerelease=!!p.includePrerelease;let d=h.trim().match(p.loose?a[c.LOOSE]:a[c.FULL]);if(!d)throw new TypeError(`Invalid Version: ${h}`);if(this.raw=h,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(g=>{if(/^[0-9]+$/.test(g)){let m=+g;if(m>=0&&m<i)return m}return g}):this.prerelease=[],this.build=d[5]?d[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(h){if(s("SemVer.compare",this.version,this.options,h),!(h instanceof vt)){if(typeof h=="string"&&h===this.version)return 0;h=new vt(h,this.options)}return h.version===this.version?0:this.compareMain(h)||this.comparePre(h)}compareMain(h){return h instanceof vt||(h=new vt(h,this.options)),n(this.major,h.major)||n(this.minor,h.minor)||n(this.patch,h.patch)}comparePre(h){if(h instanceof vt||(h=new vt(h,this.options)),this.prerelease.length&&!h.prerelease.length)return-1;if(!this.prerelease.length&&h.prerelease.length)return 1;if(!this.prerelease.length&&!h.prerelease.length)return 0;let p=0;do{let d=this.prerelease[p],g=h.prerelease[p];if(s("prerelease compare",p,d,g),d===void 0&&g===void 0)return 0;if(g===void 0)return 1;if(d===void 0)return-1;if(d!==g)return n(d,g)}while(++p)}compareBuild(h){h instanceof vt||(h=new vt(h,this.options));let p=0;do{let d=this.build[p],g=h.build[p];if(s("build compare",p,d,g),d===void 0&&g===void 0)return 0;if(g===void 0)return 1;if(d===void 0)return-1;if(d!==g)return n(d,g)}while(++p)}inc(h,p,d){if(h.startsWith("pre")){if(!p&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(p){let g=`-${p}`.match(this.options.loose?a[c.PRERELEASELOOSE]:a[c.PRERELEASE]);if(!g||g[1]!==p)throw new Error(`invalid identifier: ${p}`)}}switch(h){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",p,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",p,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",p,d),this.inc("pre",p,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",p,d),this.inc("pre",p,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let g=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[g];else{let m=this.prerelease.length;for(;--m>=0;)typeof this.prerelease[m]=="number"&&(this.prerelease[m]++,m=-2);if(m===-1){if(p===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(g)}}if(p){let m=[p,g];d===!1&&(m=[p]),n(this.prerelease[0],p)===0?isNaN(this.prerelease[1])&&(this.prerelease=m):this.prerelease=m}break}default:throw new Error(`invalid increment argument: ${h}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};t.exports=o}),ir=Oe((e,t)=>{"use strict";var s=We(),u=we((i,a,c=!1)=>{if(i instanceof s)return i;try{return new s(i,a)}catch(r){if(!c)return null;throw r}},"parse");t.exports=u}),ME=Oe((e,t)=>{"use strict";var s=ir(),u=we((i,a)=>{let c=s(i,a);return c?c.version:null},"valid");t.exports=u}),jE=Oe((e,t)=>{"use strict";var s=ir(),u=we((i,a)=>{let c=s(i.trim().replace(/^[=v]+/,""),a);return c?c.version:null},"clean");t.exports=u}),BE=Oe((e,t)=>{"use strict";var s=We(),u=we((i,a,c,r,n)=>{typeof c=="string"&&(n=r,r=c,c=void 0);try{return new s(i instanceof s?i.version:i,c).inc(a,r,n).version}catch{return null}},"inc");t.exports=u}),UE=Oe((e,t)=>{"use strict";var s=ir(),u=we((i,a)=>{let c=s(i,null,!0),r=s(a,null,!0),n=c.compare(r);if(n===0)return null;let o=n>0,l=o?c:r,h=o?r:c,p=!!l.prerelease.length;if(h.prerelease.length&&!p){if(!h.patch&&!h.minor)return"major";if(h.compareMain(l)===0)return h.minor&&!h.patch?"minor":"patch"}let d=p?"pre":"";return c.major!==r.major?d+"major":c.minor!==r.minor?d+"minor":c.patch!==r.patch?d+"patch":"prerelease"},"diff");t.exports=u}),FE=Oe((e,t)=>{"use strict";var s=We(),u=we((i,a)=>new s(i,a).major,"major");t.exports=u}),HE=Oe((e,t)=>{"use strict";var s=We(),u=we((i,a)=>new s(i,a).minor,"minor");t.exports=u}),GE=Oe((e,t)=>{"use strict";var s=We(),u=we((i,a)=>new s(i,a).patch,"patch");t.exports=u}),VE=Oe((e,t)=>{"use strict";var s=ir(),u=we((i,a)=>{let c=s(i,a);return c&&c.prerelease.length?c.prerelease:null},"prerelease");t.exports=u}),ct=Oe((e,t)=>{"use strict";var s=We(),u=we((i,a,c)=>new s(i,c).compare(new s(a,c)),"compare");t.exports=u}),WE=Oe((e,t)=>{"use strict";var s=ct(),u=we((i,a,c)=>s(a,i,c),"rcompare");t.exports=u}),zE=Oe((e,t)=>{"use strict";var s=ct(),u=we((i,a)=>s(i,a,!0),"compareLoose");t.exports=u}),uo=Oe((e,t)=>{"use strict";var s=We(),u=we((i,a,c)=>{let r=new s(i,c),n=new s(a,c);return r.compare(n)||r.compareBuild(n)},"compareBuild");t.exports=u}),qE=Oe((e,t)=>{"use strict";var s=uo(),u=we((i,a)=>i.sort((c,r)=>s(c,r,a)),"sort");t.exports=u}),KE=Oe((e,t)=>{"use strict";var s=uo(),u=we((i,a)=>i.sort((c,r)=>s(r,c,a)),"rsort");t.exports=u}),qs=Oe((e,t)=>{"use strict";var s=ct(),u=we((i,a,c)=>s(i,a,c)>0,"gt");t.exports=u}),ho=Oe((e,t)=>{"use strict";var s=ct(),u=we((i,a,c)=>s(i,a,c)<0,"lt");t.exports=u}),ju=Oe((e,t)=>{"use strict";var s=ct(),u=we((i,a,c)=>s(i,a,c)===0,"eq");t.exports=u}),Bu=Oe((e,t)=>{"use strict";var s=ct(),u=we((i,a,c)=>s(i,a,c)!==0,"neq");t.exports=u}),po=Oe((e,t)=>{"use strict";var s=ct(),u=we((i,a,c)=>s(i,a,c)>=0,"gte");t.exports=u}),fo=Oe((e,t)=>{"use strict";var s=ct(),u=we((i,a,c)=>s(i,a,c)<=0,"lte");t.exports=u}),Uu=Oe((e,t)=>{"use strict";var s=ju(),u=Bu(),i=qs(),a=po(),c=ho(),r=fo(),n=we((o,l,h,p)=>{switch(l){case"===":return typeof o=="object"&&(o=o.version),typeof h=="object"&&(h=h.version),o===h;case"!==":return typeof o=="object"&&(o=o.version),typeof h=="object"&&(h=h.version),o!==h;case"":case"=":case"==":return s(o,h,p);case"!=":return u(o,h,p);case">":return i(o,h,p);case">=":return a(o,h,p);case"<":return c(o,h,p);case"<=":return r(o,h,p);default:throw new TypeError(`Invalid operator: ${l}`)}},"cmp");t.exports=n}),JE=Oe((e,t)=>{"use strict";var s=We(),u=ir(),{safeRe:i,t:a}=Vr(),c=we((r,n)=>{if(r instanceof s)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;n=n||{};let o=null;if(!n.rtl)o=r.match(n.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let m=n.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],f;for(;(f=m.exec(r))&&(!o||o.index+o[0].length!==r.length);)(!o||f.index+f[0].length!==o.index+o[0].length)&&(o=f),m.lastIndex=f.index+f[1].length+f[2].length;m.lastIndex=-1}if(o===null)return null;let l=o[2],h=o[3]||"0",p=o[4]||"0",d=n.includePrerelease&&o[5]?`-${o[5]}`:"",g=n.includePrerelease&&o[6]?`+${o[6]}`:"";return u(`${l}.${h}.${p}${d}${g}`,n)},"coerce");t.exports=c}),ZE=Oe((e,t)=>{"use strict";var s=class{static{we(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(u){let i=this.map.get(u);if(i!==void 0)return this.map.delete(u),this.map.set(u,i),i}delete(u){return this.map.delete(u)}set(u,i){if(!this.delete(u)&&i!==void 0){if(this.map.size>=this.max){let a=this.map.keys().next().value;this.delete(a)}this.map.set(u,i)}return this}};t.exports=s}),ut=Oe((e,t)=>{"use strict";var s=/\s+/g,u=class Vs{static{we(this,"Range")}constructor(B,G){if(G=c(G),B instanceof Vs)return B.loose===!!G.loose&&B.includePrerelease===!!G.includePrerelease?B:new Vs(B.raw,G);if(B instanceof r)return this.raw=B.value,this.set=[[B]],this.formatted=void 0,this;if(this.options=G,this.loose=!!G.loose,this.includePrerelease=!!G.includePrerelease,this.raw=B.trim().replace(s," "),this.set=this.raw.split("||").map(W=>this.parseRange(W.trim())).filter(W=>W.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let W=this.set[0];if(this.set=this.set.filter(N=>!y(N[0])),this.set.length===0)this.set=[W];else if(this.set.length>1){for(let N of this.set)if(N.length===1&&S(N[0])){this.set=[N];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let B=0;B<this.set.length;B++){B>0&&(this.formatted+="||");let G=this.set[B];for(let W=0;W<G.length;W++)W>0&&(this.formatted+=" "),this.formatted+=G[W].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(B){let G=((this.options.includePrerelease&&m)|(this.options.loose&&f))+":"+B,W=a.get(G);if(W)return W;let N=this.options.loose,D=N?l[h.HYPHENRANGELOOSE]:l[h.HYPHENRANGE];B=B.replace(D,M(this.options.includePrerelease)),n("hyphen replace",B),B=B.replace(l[h.COMPARATORTRIM],p),n("comparator trim",B),B=B.replace(l[h.TILDETRIM],d),n("tilde trim",B),B=B.replace(l[h.CARETTRIM],g),n("caret trim",B);let T=B.split(" ").map(Q=>b(Q,this.options)).join(" ").split(/\s+/).map(Q=>x(Q,this.options));N&&(T=T.filter(Q=>(n("loose invalid filter",Q,this.options),!!Q.match(l[h.COMPARATORLOOSE])))),n("range list",T);let C=new Map,Z=T.map(Q=>new r(Q,this.options));for(let Q of Z){if(y(Q))return[Q];C.set(Q.value,Q)}C.size>1&&C.has("")&&C.delete("");let X=[...C.values()];return a.set(G,X),X}intersects(B,G){if(!(B instanceof Vs))throw new TypeError("a Range is required");return this.set.some(W=>E(W,G)&&B.set.some(N=>E(N,G)&&W.every(D=>N.every(T=>D.intersects(T,G)))))}test(B){if(!B)return!1;if(typeof B=="string")try{B=new o(B,this.options)}catch{return!1}for(let G=0;G<this.set.length;G++)if(U(this.set[G],B,this.options))return!0;return!1}};t.exports=u;var i=ZE(),a=new i,c=co(),r=Ks(),n=zs(),o=We(),{safeRe:l,t:h,comparatorTrimReplace:p,tildeTrimReplace:d,caretTrimReplace:g}=Vr(),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:f}=Ws(),y=we(V=>V.value==="<0.0.0-0","isNullSet"),S=we(V=>V.value==="","isAny"),E=we((V,B)=>{let G=!0,W=V.slice(),N=W.pop();for(;G&&W.length;)G=W.every(D=>N.intersects(D,B)),N=W.pop();return G},"isSatisfiable"),b=we((V,B)=>(n("comp",V,B),V=A(V,B),n("caret",V),V=O(V,B),n("tildes",V),V=P(V,B),n("xrange",V),V=$(V,B),n("stars",V),V),"parseComparator"),_=we(V=>!V||V.toLowerCase()==="x"||V==="*","isX"),O=we((V,B)=>V.trim().split(/\s+/).map(G=>w(G,B)).join(" "),"replaceTildes"),w=we((V,B)=>{let G=B.loose?l[h.TILDELOOSE]:l[h.TILDE];return V.replace(G,(W,N,D,T,C)=>{n("tilde",V,W,N,D,T,C);let Z;return _(N)?Z="":_(D)?Z=`>=${N}.0.0 <${+N+1}.0.0-0`:_(T)?Z=`>=${N}.${D}.0 <${N}.${+D+1}.0-0`:C?(n("replaceTilde pr",C),Z=`>=${N}.${D}.${T}-${C} <${N}.${+D+1}.0-0`):Z=`>=${N}.${D}.${T} <${N}.${+D+1}.0-0`,n("tilde return",Z),Z})},"replaceTilde"),A=we((V,B)=>V.trim().split(/\s+/).map(G=>I(G,B)).join(" "),"replaceCarets"),I=we((V,B)=>{n("caret",V,B);let G=B.loose?l[h.CARETLOOSE]:l[h.CARET],W=B.includePrerelease?"-0":"";return V.replace(G,(N,D,T,C,Z)=>{n("caret",V,N,D,T,C,Z);let X;return _(D)?X="":_(T)?X=`>=${D}.0.0${W} <${+D+1}.0.0-0`:_(C)?D==="0"?X=`>=${D}.${T}.0${W} <${D}.${+T+1}.0-0`:X=`>=${D}.${T}.0${W} <${+D+1}.0.0-0`:Z?(n("replaceCaret pr",Z),D==="0"?T==="0"?X=`>=${D}.${T}.${C}-${Z} <${D}.${T}.${+C+1}-0`:X=`>=${D}.${T}.${C}-${Z} <${D}.${+T+1}.0-0`:X=`>=${D}.${T}.${C}-${Z} <${+D+1}.0.0-0`):(n("no pr"),D==="0"?T==="0"?X=`>=${D}.${T}.${C}${W} <${D}.${T}.${+C+1}-0`:X=`>=${D}.${T}.${C}${W} <${D}.${+T+1}.0-0`:X=`>=${D}.${T}.${C} <${+D+1}.0.0-0`),n("caret return",X),X})},"replaceCaret"),P=we((V,B)=>(n("replaceXRanges",V,B),V.split(/\s+/).map(G=>L(G,B)).join(" ")),"replaceXRanges"),L=we((V,B)=>{V=V.trim();let G=B.loose?l[h.XRANGELOOSE]:l[h.XRANGE];return V.replace(G,(W,N,D,T,C,Z)=>{n("xRange",V,W,N,D,T,C,Z);let X=_(D),Q=X||_(T),k=Q||_(C),F=k;return N==="="&&F&&(N=""),Z=B.includePrerelease?"-0":"",X?N===">"||N==="<"?W="<0.0.0-0":W="*":N&&F?(Q&&(T=0),C=0,N===">"?(N=">=",Q?(D=+D+1,T=0,C=0):(T=+T+1,C=0)):N==="<="&&(N="<",Q?D=+D+1:T=+T+1),N==="<"&&(Z="-0"),W=`${N+D}.${T}.${C}${Z}`):Q?W=`>=${D}.0.0${Z} <${+D+1}.0.0-0`:k&&(W=`>=${D}.${T}.0${Z} <${D}.${+T+1}.0-0`),n("xRange return",W),W})},"replaceXRange"),$=we((V,B)=>(n("replaceStars",V,B),V.trim().replace(l[h.STAR],"")),"replaceStars"),x=we((V,B)=>(n("replaceGTE0",V,B),V.trim().replace(l[B.includePrerelease?h.GTE0PRE:h.GTE0],"")),"replaceGTE0"),M=we(V=>(B,G,W,N,D,T,C,Z,X,Q,k,F)=>(_(W)?G="":_(N)?G=`>=${W}.0.0${V?"-0":""}`:_(D)?G=`>=${W}.${N}.0${V?"-0":""}`:T?G=`>=${G}`:G=`>=${G}${V?"-0":""}`,_(X)?Z="":_(Q)?Z=`<${+X+1}.0.0-0`:_(k)?Z=`<${X}.${+Q+1}.0-0`:F?Z=`<=${X}.${Q}.${k}-${F}`:V?Z=`<${X}.${Q}.${+k+1}-0`:Z=`<=${Z}`,`${G} ${Z}`.trim()),"hyphenReplace"),U=we((V,B,G)=>{for(let W=0;W<V.length;W++)if(!V[W].test(B))return!1;if(B.prerelease.length&&!G.includePrerelease){for(let W=0;W<V.length;W++)if(n(V[W].semver),V[W].semver!==r.ANY&&V[W].semver.prerelease.length>0){let N=V[W].semver;if(N.major===B.major&&N.minor===B.minor&&N.patch===B.patch)return!0}return!1}return!0},"testSet")}),Ks=Oe((e,t)=>{"use strict";var s=Symbol("SemVer ANY"),u=class lo{static{we(this,"Comparator")}static get ANY(){return s}constructor(p,d){if(d=i(d),p instanceof lo){if(p.loose===!!d.loose)return p;p=p.value}p=p.trim().split(/\s+/).join(" "),n("comparator",p,d),this.options=d,this.loose=!!d.loose,this.parse(p),this.semver===s?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}parse(p){let d=this.options.loose?a[c.COMPARATORLOOSE]:a[c.COMPARATOR],g=p.match(d);if(!g)throw new TypeError(`Invalid comparator: ${p}`);this.operator=g[1]!==void 0?g[1]:"",this.operator==="="&&(this.operator=""),g[2]?this.semver=new o(g[2],this.options.loose):this.semver=s}toString(){return this.value}test(p){if(n("Comparator.test",p,this.options.loose),this.semver===s||p===s)return!0;if(typeof p=="string")try{p=new o(p,this.options)}catch{return!1}return r(p,this.operator,this.semver,this.options)}intersects(p,d){if(!(p instanceof lo))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(p.value,d).test(this.value):p.operator===""?p.value===""?!0:new l(this.value,d).test(p.semver):(d=i(d),d.includePrerelease&&(this.value==="<0.0.0-0"||p.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||p.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&p.operator.startsWith(">")||this.operator.startsWith("<")&&p.operator.startsWith("<")||this.semver.version===p.semver.version&&this.operator.includes("=")&&p.operator.includes("=")||r(this.semver,"<",p.semver,d)&&this.operator.startsWith(">")&&p.operator.startsWith("<")||r(this.semver,">",p.semver,d)&&this.operator.startsWith("<")&&p.operator.startsWith(">")))}};t.exports=u;var i=co(),{safeRe:a,t:c}=Vr(),r=Uu(),n=zs(),o=We(),l=ut()}),Js=Oe((e,t)=>{"use strict";var s=ut(),u=we((i,a,c)=>{try{a=new s(a,c)}catch{return!1}return a.test(i)},"satisfies");t.exports=u}),XE=Oe((e,t)=>{"use strict";var s=ut(),u=we((i,a)=>new s(i,a).set.map(c=>c.map(r=>r.value).join(" ").trim().split(" ")),"toComparators");t.exports=u}),YE=Oe((e,t)=>{"use strict";var s=We(),u=ut(),i=we((a,c,r)=>{let n=null,o=null,l=null;try{l=new u(c,r)}catch{return null}return a.forEach(h=>{l.test(h)&&(!n||o.compare(h)===-1)&&(n=h,o=new s(n,r))}),n},"maxSatisfying");t.exports=i}),QE=Oe((e,t)=>{"use strict";var s=We(),u=ut(),i=we((a,c,r)=>{let n=null,o=null,l=null;try{l=new u(c,r)}catch{return null}return a.forEach(h=>{l.test(h)&&(!n||o.compare(h)===1)&&(n=h,o=new s(n,r))}),n},"minSatisfying");t.exports=i}),eb=Oe((e,t)=>{"use strict";var s=We(),u=ut(),i=qs(),a=we((c,r)=>{c=new u(c,r);let n=new s("0.0.0");if(c.test(n)||(n=new s("0.0.0-0"),c.test(n)))return n;n=null;for(let o=0;o<c.set.length;++o){let l=c.set[o],h=null;l.forEach(p=>{let d=new s(p.semver.version);switch(p.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!h||i(d,h))&&(h=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${p.operator}`)}}),h&&(!n||i(n,h))&&(n=h)}return n&&c.test(n)?n:null},"minVersion");t.exports=a}),tb=Oe((e,t)=>{"use strict";var s=ut(),u=we((i,a)=>{try{return new s(i,a).range||"*"}catch{return null}},"validRange");t.exports=u}),go=Oe((e,t)=>{"use strict";var s=We(),u=Ks(),{ANY:i}=u,a=ut(),c=Js(),r=qs(),n=ho(),o=fo(),l=po(),h=we((p,d,g,m)=>{p=new s(p,m),d=new a(d,m);let f,y,S,E,b;switch(g){case">":f=r,y=o,S=n,E=">",b=">=";break;case"<":f=n,y=l,S=r,E="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(c(p,d,m))return!1;for(let _=0;_<d.set.length;++_){let O=d.set[_],w=null,A=null;if(O.forEach(I=>{I.semver===i&&(I=new u(">=0.0.0")),w=w||I,A=A||I,f(I.semver,w.semver,m)?w=I:S(I.semver,A.semver,m)&&(A=I)}),w.operator===E||w.operator===b||(!A.operator||A.operator===E)&&y(p,A.semver)||A.operator===b&&S(p,A.semver))return!1}return!0},"outside");t.exports=h}),rb=Oe((e,t)=>{"use strict";var s=go(),u=we((i,a,c)=>s(i,a,">",c),"gtr");t.exports=u}),sb=Oe((e,t)=>{"use strict";var s=go(),u=we((i,a,c)=>s(i,a,"<",c),"ltr");t.exports=u}),ib=Oe((e,t)=>{"use strict";var s=ut(),u=we((i,a,c)=>(i=new s(i,c),a=new s(a,c),i.intersects(a,c)),"intersects");t.exports=u}),nb=Oe((e,t)=>{"use strict";var s=Js(),u=ct();t.exports=(i,a,c)=>{let r=[],n=null,o=null,l=i.sort((g,m)=>u(g,m,c));for(let g of l)s(g,a,c)?(o=g,n||(n=g)):(o&&r.push([n,o]),o=null,n=null);n&&r.push([n,null]);let h=[];for(let[g,m]of r)g===m?h.push(g):!m&&g===l[0]?h.push("*"):m?g===l[0]?h.push(`<=${m}`):h.push(`${g} - ${m}`):h.push(`>=${g}`);let p=h.join(" || "),d=typeof a.raw=="string"?a.raw:String(a);return p.length<d.length?p:a}}),ob=Oe((e,t)=>{"use strict";var s=ut(),u=Ks(),{ANY:i}=u,a=Js(),c=ct(),r=we((d,g,m={})=>{if(d===g)return!0;d=new s(d,m),g=new s(g,m);let f=!1;e:for(let y of d.set){for(let S of g.set){let E=l(y,S,m);if(f=f||E!==null,E)continue e}if(f)return!1}return!0},"subset"),n=[new u(">=0.0.0-0")],o=[new u(">=0.0.0")],l=we((d,g,m)=>{if(d===g)return!0;if(d.length===1&&d[0].semver===i){if(g.length===1&&g[0].semver===i)return!0;m.includePrerelease?d=n:d=o}if(g.length===1&&g[0].semver===i){if(m.includePrerelease)return!0;g=o}let f=new Set,y,S;for(let P of d)P.operator===">"||P.operator===">="?y=h(y,P,m):P.operator==="<"||P.operator==="<="?S=p(S,P,m):f.add(P.semver);if(f.size>1)return null;let E;if(y&&S&&(E=c(y.semver,S.semver,m),E>0||E===0&&(y.operator!==">="||S.operator!=="<=")))return null;for(let P of f){if(y&&!a(P,String(y),m)||S&&!a(P,String(S),m))return null;for(let L of g)if(!a(P,String(L),m))return!1;return!0}let b,_,O,w,A=S&&!m.includePrerelease&&S.semver.prerelease.length?S.semver:!1,I=y&&!m.includePrerelease&&y.semver.prerelease.length?y.semver:!1;A&&A.prerelease.length===1&&S.operator==="<"&&A.prerelease[0]===0&&(A=!1);for(let P of g){if(w=w||P.operator===">"||P.operator===">=",O=O||P.operator==="<"||P.operator==="<=",y){if(I&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===I.major&&P.semver.minor===I.minor&&P.semver.patch===I.patch&&(I=!1),P.operator===">"||P.operator===">="){if(b=h(y,P,m),b===P&&b!==y)return!1}else if(y.operator===">="&&!a(y.semver,String(P),m))return!1}if(S){if(A&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===A.major&&P.semver.minor===A.minor&&P.semver.patch===A.patch&&(A=!1),P.operator==="<"||P.operator==="<="){if(_=p(S,P,m),_===P&&_!==S)return!1}else if(S.operator==="<="&&!a(S.semver,String(P),m))return!1}if(!P.operator&&(S||y)&&E!==0)return!1}return!(y&&O&&!S&&E!==0||S&&w&&!y&&E!==0||I||A)},"simpleSubset"),h=we((d,g,m)=>{if(!d)return g;let f=c(d.semver,g.semver,m);return f>0?d:f<0||g.operator===">"&&d.operator===">="?g:d},"higherGT"),p=we((d,g,m)=>{if(!d)return g;let f=c(d.semver,g.semver,m);return f<0?d:f>0||g.operator==="<"&&d.operator==="<="?g:d},"lowerLT");t.exports=r}),ao=Vr(),Du=Ws(),ab=We(),$u=Mu(),lb=ir(),cb=ME(),ub=jE(),hb=BE(),pb=UE(),db=FE(),fb=HE(),gb=GE(),mb=VE(),yb=ct(),vb=WE(),Sb=zE(),Eb=uo(),bb=qE(),_b=KE(),wb=qs(),Ob=ho(),Rb=ju(),Ab=Bu(),Cb=po(),Ib=fo(),Tb=Uu(),Pb=JE(),xb=Ks(),Nb=ut(),kb=Js(),Lb=XE(),Db=YE(),$b=QE(),Mb=eb(),jb=tb(),Bb=go(),Ub=rb(),Fb=sb(),Hb=ib(),Gb=nb(),Vb=ob();Fu.exports={parse:lb,valid:cb,clean:ub,inc:hb,diff:pb,major:db,minor:fb,patch:gb,prerelease:mb,compare:yb,rcompare:vb,compareLoose:Sb,compareBuild:Eb,sort:bb,rsort:_b,gt:wb,lt:Ob,eq:Rb,neq:Ab,gte:Cb,lte:Ib,cmp:Tb,coerce:Pb,Comparator:xb,Range:Nb,satisfies:kb,toComparators:Lb,maxSatisfying:Db,minSatisfying:$b,minVersion:Mb,validRange:jb,outside:Bb,gtr:Ub,ltr:Fb,intersects:Hb,simplifyRange:Gb,subset:Vb,SemVer:ab,re:ao.re,src:ao.src,tokens:ao.t,SEMVER_SPEC_VERSION:Du.SEMVER_SPEC_VERSION,RELEASE_TYPES:Du.RELEASE_TYPES,compareIdentifiers:$u.compareIdentifiers,rcompareIdentifiers:$u.rcompareIdentifiers}});var Eo=ge((rH,Wu)=>{var So=Object.defineProperty,Wb=Object.getOwnPropertyDescriptor,zb=Object.getOwnPropertyNames,qb=Object.prototype.hasOwnProperty,Kb=(e,t)=>{for(var s in t)So(e,s,{get:t[s],enumerable:!0})},Jb=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zb(t))!qb.call(e,i)&&i!==s&&So(e,i,{get:()=>t[i],enumerable:!(u=Wb(t,i))||u.enumerable});return e},Zb=e=>Jb(So({},"__esModule",{value:!0}),e),Gu={};Kb(Gu,{compareSemver:()=>e_,compareStr:()=>Qb,localeCompare:()=>Xb,naturalCompare:()=>Vu,naturalSorter:()=>Yb});Wu.exports=Zb(Gu);var mo;function Xb(e,t){return mo===void 0&&(mo=new Intl.Collator().compare),mo(e,t)}var yo;function Vu(e,t){return yo===void 0&&(yo=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare),yo(e,t)}var vo;function Yb(e){return vo===void 0&&(vo=Lu().createNewSortInstance({comparer:Vu})),vo?.(e)}function Qb(e,t){return e<t?-1:e>t?1:0}function e_(e,t){let s=Hu(),u=s.valid(e),i=s.valid(t);return!u&&!i?0:u?i?s.compare(e,t):1:-1}});var Vt=ge((sH,Qu)=>{var wo=Object.defineProperty,t_=Object.getOwnPropertyDescriptor,r_=Object.getOwnPropertyNames,s_=Object.prototype.hasOwnProperty,i_=(e,t)=>{for(var s in t)wo(e,s,{get:t[s],enumerable:!0})},n_=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of r_(t))!s_.call(e,i)&&i!==s&&wo(e,i,{get:()=>t[i],enumerable:!(u=t_(t,i))||u.enumerable});return e},o_=e=>n_(wo({},"__esModule",{value:!0}),e),Ku={};i_(Ku,{createConstantsObject:()=>f_,createLazyGetter:()=>Ju,defineGetter:()=>Zu,defineLazyGetter:()=>Xu,defineLazyGetters:()=>Yu,entryKeyComparator:()=>_o,getKeys:()=>g_,getOwn:()=>m_,getOwnPropertyValues:()=>y_,hasKeys:()=>v_,hasOwn:()=>S_,isObject:()=>nr,isObjectObject:()=>E_,merge:()=>w_,objectAssign:()=>b_,objectEntries:()=>Ro,objectFreeze:()=>__,toSortedObject:()=>Zs,toSortedObjectFromEntries:()=>Ao});Qu.exports=o_(Ku);var zr=ro(),Wr=rr(),a_=Eo(),zu=Object.defineProperties,l_=Object.defineProperty,Nt=Object.freeze,c_=Object.fromEntries,qu=Object.getOwnPropertyDescriptors,u_=Object.getOwnPropertyNames,h_=Object.getPrototypeOf,Xs=Object.hasOwn,p_=Object.keys,d_=Object.prototype,bo=Object.setPrototypeOf,Oo=Reflect.ownKeys;function Ju(e,t,s){let u=zr.UNDEFINED_TOKEN,{[e]:i}={[e](){return u===zr.UNDEFINED_TOKEN&&(s?.initialized?.add(e),u=t()),u}};return i}function f_(e,t){let s={__proto__:null,...t},u=Nt({__proto__:null,getters:s.getters?Nt(bo(Zs(s.getters),null)):void 0,internals:s.internals?Nt(bo(Zs(s.internals),null)):void 0,mixin:s.mixin?Nt(zu({__proto__:null},qu(s.mixin))):void 0,props:e?Nt(bo(Zs(e),null)):void 0}),i=Nt({__proto__:null,initialized:new Set}),a=Yu({__proto__:null,[zr.kInternalsSymbol]:Nt({__proto__:null,get attributes(){return u},get lazyGetterStats(){return i},...u.internals}),kInternalsSymbol:zr.kInternalsSymbol,...u.props},u.getters,i);return u.mixin&&zu(a,Ao(Ro(qu(u.mixin)).filter(c=>!Xs(a,c[0])))),Nt(a)}function Zu(e,t,s){return l_(e,t,{get:s,enumerable:!1,configurable:!0}),e}function Xu(e,t,s,u){return Zu(e,t,Ju(t,s,u))}function Yu(e,t,s){if(t!==null&&typeof t=="object"){let u=Oo(t);for(let i=0,{length:a}=u;i<a;i+=1){let c=u[i];Xu(e,c,t[c],s)}}return e}function _o(e,t){let s=e[0],u=t[0],i=typeof s=="string"?s:String(s),a=typeof u=="string"?u:String(u);return(0,a_.localeCompare)(i,a)}function g_(e){return nr(e)?p_(e):[]}function m_(e,t){if(e!=null)return Xs(e,t)?e[t]:void 0}function y_(e){if(e==null)return[];let t=u_(e),{length:s}=t,u=Array(s);for(let i=0;i<s;i+=1)u[i]=e[t[i]];return u}function v_(e){if(e==null)return!1;for(let t in e)if(Xs(e,t))return!0;return!1}function S_(e,t){return e==null?!1:Xs(e,t)}function nr(e){return e!==null&&typeof e=="object"}function E_(e){if(e===null||typeof e!="object"||(0,Wr.isArray)(e))return!1;let t=h_(e);return t===null||t===d_}var b_=Object.assign;function Ro(e){if(e==null)return[];let t=Oo(e),{length:s}=t,u=Array(s),i=e;for(let a=0;a<s;a+=1){let c=t[a];u[a]=[c,i[c]]}return u}var __=Object.freeze;function w_(e,t){if(!nr(e)||!nr(t))return e;let s=[[e,t]],u=0,{length:i}=s;for(;u<i;){if(u===zr.LOOP_SENTINEL)throw new Error("Detected infinite loop in object crawl of merge");let{0:a,1:c}=s[u++];if(!c||!a)continue;let r=(0,Wr.isArray)(c),n=(0,Wr.isArray)(a);if(r||n)continue;let o=Oo(c);for(let l=0,{length:h}=o;l<h;l+=1){let p=o[l],d=c[p],g=a[p];(0,Wr.isArray)(d)?a[p]=d:nr(d)&&nr(g)&&!(0,Wr.isArray)(g)?s[i++]=[g,d]:a[p]=d}}return e}function Zs(e){return Ao(Ro(e))}function Ao(e){let t=[],s=[];for(let u of e)typeof u[0]=="symbol"?s.push(u):t.push(u);return!t.length&&!s.length?{}:c_([...s.sort(_o),...t.sort(_o)])}});var th=ge((iH,eh)=>{"use strict";var O_=Object.defineProperty,Pe=(e,t)=>O_(e,"name",{value:t,configurable:!0}),qr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ys=qr((e,t)=>{"use strict";var s=require("path"),u="\\\\/",i=`[^${u}]`,a="\\.",c="\\+",r="\\?",n="\\/",o="(?=.)",l="[^/]",h=`(?:${n}|$)`,p=`(?:^|${n})`,d=`${a}{1,2}${h}`,g=`(?!${a})`,m=`(?!${p}${d})`,f=`(?!${a}{0,1}${h})`,y=`(?!${d})`,S=`[^.${n}]`,E=`${l}*?`,b={DOT_LITERAL:a,PLUS_LITERAL:c,QMARK_LITERAL:r,SLASH_LITERAL:n,ONE_CHAR:o,QMARK:l,END_ANCHOR:h,DOTS_SLASH:d,NO_DOT:g,NO_DOTS:m,NO_DOT_SLASH:f,NO_DOTS_SLASH:y,QMARK_NO_DOT:S,STAR:E,START_ANCHOR:p},_={...b,SLASH_LITERAL:`[${u}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${a}{1,2}(?:[${u}]|$)`,NO_DOT:`(?!${a})`,NO_DOTS:`(?!(?:^|[${u}])${a}{1,2}(?:[${u}]|$))`,NO_DOT_SLASH:`(?!${a}{0,1}(?:[${u}]|$))`,NO_DOTS_SLASH:`(?!${a}{1,2}(?:[${u}]|$))`,QMARK_NO_DOT:`[^.${u}]`,START_ANCHOR:`(?:^|[${u}])`,END_ANCHOR:`(?:[${u}]|$)`},O={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:O,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:s.sep,extglobChars(w){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${w.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(w){return w===!0?_:b}}}),Co=qr(e=>{"use strict";var t=require("path"),s=process.platform==="win32",{REGEX_BACKSLASH:u,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:c}=Ys();e.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),e.hasRegexChars=r=>a.test(r),e.isRegexChar=r=>r.length===1&&e.hasRegexChars(r),e.escapeRegex=r=>r.replace(c,"\\$1"),e.toPosixSlashes=r=>r.replace(u,"/"),e.removeBackslashes=r=>r.replace(i,n=>n==="\\"?"":n),e.supportsLookbehinds=()=>{let r=process.version.slice(1).split(".").map(Number);return r.length===3&&r[0]>=9||r[0]===8&&r[1]>=10},e.isWindows=r=>r&&typeof r.windows=="boolean"?r.windows:s===!0||t.sep==="\\",e.escapeLast=(r,n,o)=>{let l=r.lastIndexOf(n,o);return l===-1?r:r[l-1]==="\\"?e.escapeLast(r,n,l-1):`${r.slice(0,l)}\\${r.slice(l)}`},e.removePrefix=(r,n={})=>{let o=r;return o.startsWith("./")&&(o=o.slice(2),n.prefix="./"),o},e.wrapOutput=(r,n={},o={})=>{let l=o.contains?"":"^",h=o.contains?"":"$",p=`${l}(?:${r})${h}`;return n.negated===!0&&(p=`(?:^(?!${p}).*$)`),p}}),R_=qr((e,t)=>{"use strict";var s=Co(),{CHAR_ASTERISK:u,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:c,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:n,CHAR_FORWARD_SLASH:o,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:d,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:y}=Ys(),S=Pe(_=>_===o||_===a,"isPathSeparator"),E=Pe(_=>{_.isPrefix!==!0&&(_.depth=_.isGlobstar?1/0:1)},"depth"),b=Pe((_,O)=>{let w=O||{},A=_.length-1,I=w.parts===!0||w.scanToEnd===!0,P=[],L=[],$=[],x=_,M=-1,U=0,V=0,B=!1,G=!1,W=!1,N=!1,D=!1,T=!1,C=!1,Z=!1,X=!1,Q=!1,k=0,F,z,j={value:"",depth:0,isGlob:!1},q=Pe(()=>M>=A,"eos"),J=Pe(()=>x.charCodeAt(M+1),"peek"),Y=Pe(()=>(F=z,x.charCodeAt(++M)),"advance");for(;M<A;){z=Y();let te;if(z===a){C=j.backslashes=!0,z=Y(),z===l&&(T=!0);continue}if(T===!0||z===l){for(k++;q()!==!0&&(z=Y());){if(z===a){C=j.backslashes=!0,Y();continue}if(z===l){k++;continue}if(T!==!0&&z===r&&(z=Y())===r){if(B=j.isBrace=!0,W=j.isGlob=!0,Q=!0,I===!0)continue;break}if(T!==!0&&z===c){if(B=j.isBrace=!0,W=j.isGlob=!0,Q=!0,I===!0)continue;break}if(z===m&&(k--,k===0)){T=!1,B=j.isBrace=!0,Q=!0;break}}if(I===!0)continue;break}if(z===o){if(P.push(M),L.push(j),j={value:"",depth:0,isGlob:!1},Q===!0)continue;if(F===r&&M===U+1){U+=2;continue}V=M+1;continue}if(w.noext!==!0&&(z===d||z===i||z===u||z===g||z===n)&&J()===h){if(W=j.isGlob=!0,N=j.isExtglob=!0,Q=!0,z===n&&M===U&&(X=!0),I===!0){for(;q()!==!0&&(z=Y());){if(z===a){C=j.backslashes=!0,z=Y();continue}if(z===f){W=j.isGlob=!0,Q=!0;break}}continue}break}if(z===u){if(F===u&&(D=j.isGlobstar=!0),W=j.isGlob=!0,Q=!0,I===!0)continue;break}if(z===g){if(W=j.isGlob=!0,Q=!0,I===!0)continue;break}if(z===p){for(;q()!==!0&&(te=Y());){if(te===a){C=j.backslashes=!0,Y();continue}if(te===y){G=j.isBracket=!0,W=j.isGlob=!0,Q=!0;break}}if(I===!0)continue;break}if(w.nonegate!==!0&&z===n&&M===U){Z=j.negated=!0,U++;continue}if(w.noparen!==!0&&z===h){if(W=j.isGlob=!0,I===!0){for(;q()!==!0&&(z=Y());){if(z===h){C=j.backslashes=!0,z=Y();continue}if(z===f){Q=!0;break}}continue}break}if(W===!0){if(Q=!0,I===!0)continue;break}}w.noext===!0&&(N=!1,W=!1);let R=x,H="",ee="";U>0&&(H=x.slice(0,U),x=x.slice(U),V-=U),R&&W===!0&&V>0?(R=x.slice(0,V),ee=x.slice(V)):W===!0?(R="",ee=x):R=x,R&&R!==""&&R!=="/"&&R!==x&&S(R.charCodeAt(R.length-1))&&(R=R.slice(0,-1)),w.unescape===!0&&(ee&&(ee=s.removeBackslashes(ee)),R&&C===!0&&(R=s.removeBackslashes(R)));let ne={prefix:H,input:_,start:U,base:R,glob:ee,isBrace:B,isBracket:G,isGlob:W,isExtglob:N,isGlobstar:D,negated:Z,negatedExtglob:X};if(w.tokens===!0&&(ne.maxDepth=0,S(z)||L.push(j),ne.tokens=L),w.parts===!0||w.tokens===!0){let te;for(let ae=0;ae<P.length;ae++){let he=te?te+1:U,re=P[ae],ue=_.slice(he,re);w.tokens&&(ae===0&&U!==0?(L[ae].isPrefix=!0,L[ae].value=H):L[ae].value=ue,E(L[ae]),ne.maxDepth+=L[ae].depth),(ae!==0||ue!=="")&&$.push(ue),te=re}if(te&&te+1<_.length){let ae=_.slice(te+1);$.push(ae),w.tokens&&(L[L.length-1].value=ae,E(L[L.length-1]),ne.maxDepth+=L[L.length-1].depth)}ne.slashes=P,ne.parts=$}return ne},"scan");t.exports=b}),A_=qr((e,t)=>{"use strict";var s=Ys(),u=Co(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:n}=s,o=Pe((p,d)=>{if(typeof d.expandRange=="function")return d.expandRange(...p,d);p.sort();let g=`[${p.join("-")}]`;try{new RegExp(g)}catch{return p.map(m=>u.escapeRegex(m)).join("..")}return g},"expandRange"),l=Pe((p,d)=>`Missing ${p}: "${d}" - use "\\\\${d}" to match literal characters`,"syntaxError"),h=Pe((p,d)=>{if(typeof p!="string")throw new TypeError("Expected a string");p=n[p]||p;let g={...d},m=typeof g.maxLength=="number"?Math.min(i,g.maxLength):i,f=p.length;if(f>m)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${m}`);let y={type:"bos",value:"",output:g.prepend||""},S=[y],E=g.capture?"":"?:",b=u.isWindows(d),_=s.globChars(b),O=s.extglobChars(_),{DOT_LITERAL:w,PLUS_LITERAL:A,SLASH_LITERAL:I,ONE_CHAR:P,DOTS_SLASH:L,NO_DOT:$,NO_DOT_SLASH:x,NO_DOTS_SLASH:M,QMARK:U,QMARK_NO_DOT:V,STAR:B,START_ANCHOR:G}=_,W=Pe(re=>`(${E}(?:(?!${G}${re.dot?L:w}).)*?)`,"globstar"),N=g.dot?"":$,D=g.dot?U:V,T=g.bash===!0?W(g):B;g.capture&&(T=`(${T})`),typeof g.noext=="boolean"&&(g.noextglob=g.noext);let C={input:p,index:-1,start:0,dot:g.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:S};p=u.removePrefix(p,C),f=p.length;let Z=[],X=[],Q=[],k=y,F,z=Pe(()=>C.index===f-1,"eos"),j=C.peek=(re=1)=>p[C.index+re],q=C.advance=()=>p[++C.index]||"",J=Pe(()=>p.slice(C.index+1),"remaining"),Y=Pe((re="",ue=0)=>{C.consumed+=re,C.index+=ue},"consume"),R=Pe(re=>{C.output+=re.output!=null?re.output:re.value,Y(re.value)},"append"),H=Pe(()=>{let re=1;for(;j()==="!"&&(j(2)!=="("||j(3)==="?");)q(),C.start++,re++;return re%2===0?!1:(C.negated=!0,C.start++,!0)},"negate"),ee=Pe(re=>{C[re]++,Q.push(re)},"increment"),ne=Pe(re=>{C[re]--,Q.pop()},"decrement"),te=Pe(re=>{if(k.type==="globstar"){let ue=C.braces>0&&(re.type==="comma"||re.type==="brace"),ie=re.extglob===!0||Z.length&&(re.type==="pipe"||re.type==="paren");re.type!=="slash"&&re.type!=="paren"&&!ue&&!ie&&(C.output=C.output.slice(0,-k.output.length),k.type="star",k.value="*",k.output=T,C.output+=k.output)}if(Z.length&&re.type!=="paren"&&(Z[Z.length-1].inner+=re.value),(re.value||re.output)&&R(re),k&&k.type==="text"&&re.type==="text"){k.value+=re.value,k.output=(k.output||"")+re.value;return}re.prev=k,S.push(re),k=re},"push"),ae=Pe((re,ue)=>{let ie={...O[ue],conditions:1,inner:""};ie.prev=k,ie.parens=C.parens,ie.output=C.output;let le=(g.capture?"(":"")+ie.open;ee("parens"),te({type:re,value:ue,output:C.output?"":P}),te({type:"paren",extglob:!0,value:q(),output:le}),Z.push(ie)},"extglobOpen"),he=Pe(re=>{let ue=re.close+(g.capture?")":""),ie;if(re.type==="negate"){let le=T;if(re.inner&&re.inner.length>1&&re.inner.includes("/")&&(le=W(g)),(le!==T||z()||/^\)+$/.test(J()))&&(ue=re.close=`)$))${le}`),re.inner.includes("*")&&(ie=J())&&/^\.[^\\/.]+$/.test(ie)){let fe=h(ie,{...d,fastpaths:!1}).output;ue=re.close=`)${fe})${le})`}re.prev.type==="bos"&&(C.negatedExtglob=!0)}te({type:"paren",extglob:!0,value:F,output:ue}),ne("parens")},"extglobClose");if(g.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(p)){let re=!1,ue=p.replace(r,(ie,le,fe,me,ce,pe)=>me==="\\"?(re=!0,ie):me==="?"?le?le+me+(ce?U.repeat(ce.length):""):pe===0?D+(ce?U.repeat(ce.length):""):U.repeat(fe.length):me==="."?w.repeat(fe.length):me==="*"?le?le+me+(ce?T:""):T:le?ie:`\\${ie}`);return re===!0&&(g.unescape===!0?ue=ue.replace(/\\/g,""):ue=ue.replace(/\\+/g,ie=>ie.length%2===0?"\\\\":ie?"\\":"")),ue===p&&g.contains===!0?(C.output=p,C):(C.output=u.wrapOutput(ue,C,d),C)}for(;!z();){if(F=q(),F==="\0")continue;if(F==="\\"){let ie=j();if(ie==="/"&&g.bash!==!0||ie==="."||ie===";")continue;if(!ie){F+="\\",te({type:"text",value:F});continue}let le=/^\\+/.exec(J()),fe=0;if(le&&le[0].length>2&&(fe=le[0].length,C.index+=fe,fe%2!==0&&(F+="\\")),g.unescape===!0?F=q():F+=q(),C.brackets===0){te({type:"text",value:F});continue}}if(C.brackets>0&&(F!=="]"||k.value==="["||k.value==="[^")){if(g.posix!==!1&&F===":"){let ie=k.value.slice(1);if(ie.includes("[")&&(k.posix=!0,ie.includes(":"))){let le=k.value.lastIndexOf("["),fe=k.value.slice(0,le),me=k.value.slice(le+2),ce=a[me];if(ce){k.value=fe+ce,C.backtrack=!0,q(),!y.output&&S.indexOf(k)===1&&(y.output=P);continue}}}(F==="["&&j()!==":"||F==="-"&&j()==="]")&&(F=`\\${F}`),F==="]"&&(k.value==="["||k.value==="[^")&&(F=`\\${F}`),g.posix===!0&&F==="!"&&k.value==="["&&(F="^"),k.value+=F,R({value:F});continue}if(C.quotes===1&&F!=='"'){F=u.escapeRegex(F),k.value+=F,R({value:F});continue}if(F==='"'){C.quotes=C.quotes===1?0:1,g.keepQuotes===!0&&te({type:"text",value:F});continue}if(F==="("){ee("parens"),te({type:"paren",value:F});continue}if(F===")"){if(C.parens===0&&g.strictBrackets===!0)throw new SyntaxError(l("opening","("));let ie=Z[Z.length-1];if(ie&&C.parens===ie.parens+1){he(Z.pop());continue}te({type:"paren",value:F,output:C.parens?")":"\\)"}),ne("parens");continue}if(F==="["){if(g.nobracket===!0||!J().includes("]")){if(g.nobracket!==!0&&g.strictBrackets===!0)throw new SyntaxError(l("closing","]"));F=`\\${F}`}else ee("brackets");te({type:"bracket",value:F});continue}if(F==="]"){if(g.nobracket===!0||k&&k.type==="bracket"&&k.value.length===1){te({type:"text",value:F,output:`\\${F}`});continue}if(C.brackets===0){if(g.strictBrackets===!0)throw new SyntaxError(l("opening","["));te({type:"text",value:F,output:`\\${F}`});continue}ne("brackets");let ie=k.value.slice(1);if(k.posix!==!0&&ie[0]==="^"&&!ie.includes("/")&&(F=`/${F}`),k.value+=F,R({value:F}),g.literalBrackets===!1||u.hasRegexChars(ie))continue;let le=u.escapeRegex(k.value);if(C.output=C.output.slice(0,-k.value.length),g.literalBrackets===!0){C.output+=le,k.value=le;continue}k.value=`(${E}${le}|${k.value})`,C.output+=k.value;continue}if(F==="{"&&g.nobrace!==!0){ee("braces");let ie={type:"brace",value:F,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};X.push(ie),te(ie);continue}if(F==="}"){let ie=X[X.length-1];if(g.nobrace===!0||!ie){te({type:"text",value:F,output:F});continue}let le=")";if(ie.dots===!0){let fe=S.slice(),me=[];for(let ce=fe.length-1;ce>=0&&(S.pop(),fe[ce].type!=="brace");ce--)fe[ce].type!=="dots"&&me.unshift(fe[ce].value);le=o(me,g),C.backtrack=!0}if(ie.comma!==!0&&ie.dots!==!0){let fe=C.output.slice(0,ie.outputIndex),me=C.tokens.slice(ie.tokensIndex);ie.value=ie.output="\\{",F=le="\\}",C.output=fe;for(let ce of me)C.output+=ce.output||ce.value}te({type:"brace",value:F,output:le}),ne("braces"),X.pop();continue}if(F==="|"){Z.length>0&&Z[Z.length-1].conditions++,te({type:"text",value:F});continue}if(F===","){let ie=F,le=X[X.length-1];le&&Q[Q.length-1]==="braces"&&(le.comma=!0,ie="|"),te({type:"comma",value:F,output:ie});continue}if(F==="/"){if(k.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",S.pop(),k=y;continue}te({type:"slash",value:F,output:I});continue}if(F==="."){if(C.braces>0&&k.type==="dot"){k.value==="."&&(k.output=w);let ie=X[X.length-1];k.type="dots",k.output+=F,k.value+=F,ie.dots=!0;continue}if(C.braces+C.parens===0&&k.type!=="bos"&&k.type!=="slash"){te({type:"text",value:F,output:w});continue}te({type:"dot",value:F,output:w});continue}if(F==="?"){if(!(k&&k.value==="(")&&g.noextglob!==!0&&j()==="("&&j(2)!=="?"){ae("qmark",F);continue}if(k&&k.type==="paren"){let ie=j(),le=F;if(ie==="<"&&!u.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(k.value==="("&&!/[!=<:]/.test(ie)||ie==="<"&&!/<([!=]|\w+>)/.test(J()))&&(le=`\\${F}`),te({type:"text",value:F,output:le});continue}if(g.dot!==!0&&(k.type==="slash"||k.type==="bos")){te({type:"qmark",value:F,output:V});continue}te({type:"qmark",value:F,output:U});continue}if(F==="!"){if(g.noextglob!==!0&&j()==="("&&(j(2)!=="?"||!/[!=<:]/.test(j(3)))){ae("negate",F);continue}if(g.nonegate!==!0&&C.index===0){H();continue}}if(F==="+"){if(g.noextglob!==!0&&j()==="("&&j(2)!=="?"){ae("plus",F);continue}if(k&&k.value==="("||g.regex===!1){te({type:"plus",value:F,output:A});continue}if(k&&(k.type==="bracket"||k.type==="paren"||k.type==="brace")||C.parens>0){te({type:"plus",value:F});continue}te({type:"plus",value:A});continue}if(F==="@"){if(g.noextglob!==!0&&j()==="("&&j(2)!=="?"){te({type:"at",extglob:!0,value:F,output:""});continue}te({type:"text",value:F});continue}if(F!=="*"){(F==="$"||F==="^")&&(F=`\\${F}`);let ie=c.exec(J());ie&&(F+=ie[0],C.index+=ie[0].length),te({type:"text",value:F});continue}if(k&&(k.type==="globstar"||k.star===!0)){k.type="star",k.star=!0,k.value+=F,k.output=T,C.backtrack=!0,C.globstar=!0,Y(F);continue}let re=J();if(g.noextglob!==!0&&/^\([^?]/.test(re)){ae("star",F);continue}if(k.type==="star"){if(g.noglobstar===!0){Y(F);continue}let ie=k.prev,le=ie.prev,fe=ie.type==="slash"||ie.type==="bos",me=le&&(le.type==="star"||le.type==="globstar");if(g.bash===!0&&(!fe||re[0]&&re[0]!=="/")){te({type:"star",value:F,output:""});continue}let ce=C.braces>0&&(ie.type==="comma"||ie.type==="brace"),pe=Z.length&&(ie.type==="pipe"||ie.type==="paren");if(!fe&&ie.type!=="paren"&&!ce&&!pe){te({type:"star",value:F,output:""});continue}for(;re.slice(0,3)==="/**";){let de=p[C.index+4];if(de&&de!=="/")break;re=re.slice(3),Y("/**",3)}if(ie.type==="bos"&&z()){k.type="globstar",k.value+=F,k.output=W(g),C.output=k.output,C.globstar=!0,Y(F);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&!me&&z()){C.output=C.output.slice(0,-(ie.output+k.output).length),ie.output=`(?:${ie.output}`,k.type="globstar",k.output=W(g)+(g.strictSlashes?")":"|$)"),k.value+=F,C.globstar=!0,C.output+=ie.output+k.output,Y(F);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&re[0]==="/"){let de=re[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(ie.output+k.output).length),ie.output=`(?:${ie.output}`,k.type="globstar",k.output=`${W(g)}${I}|${I}${de})`,k.value+=F,C.output+=ie.output+k.output,C.globstar=!0,Y(F+q()),te({type:"slash",value:"/",output:""});continue}if(ie.type==="bos"&&re[0]==="/"){k.type="globstar",k.value+=F,k.output=`(?:^|${I}|${W(g)}${I})`,C.output=k.output,C.globstar=!0,Y(F+q()),te({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-k.output.length),k.type="globstar",k.output=W(g),k.value+=F,C.output+=k.output,C.globstar=!0,Y(F);continue}let ue={type:"star",value:F,output:T};if(g.bash===!0){ue.output=".*?",(k.type==="bos"||k.type==="slash")&&(ue.output=N+ue.output),te(ue);continue}if(k&&(k.type==="bracket"||k.type==="paren")&&g.regex===!0){ue.output=F,te(ue);continue}(C.index===C.start||k.type==="slash"||k.type==="dot")&&(k.type==="dot"?(C.output+=x,k.output+=x):g.dot===!0?(C.output+=M,k.output+=M):(C.output+=N,k.output+=N),j()!=="*"&&(C.output+=P,k.output+=P)),te(ue)}for(;C.brackets>0;){if(g.strictBrackets===!0)throw new SyntaxError(l("closing","]"));C.output=u.escapeLast(C.output,"["),ne("brackets")}for(;C.parens>0;){if(g.strictBrackets===!0)throw new SyntaxError(l("closing",")"));C.output=u.escapeLast(C.output,"("),ne("parens")}for(;C.braces>0;){if(g.strictBrackets===!0)throw new SyntaxError(l("closing","}"));C.output=u.escapeLast(C.output,"{"),ne("braces")}if(g.strictSlashes!==!0&&(k.type==="star"||k.type==="bracket")&&te({type:"maybe_slash",value:"",output:`${I}?`}),C.backtrack===!0){C.output="";for(let re of C.tokens)C.output+=re.output!=null?re.output:re.value,re.suffix&&(C.output+=re.suffix)}return C},"parse");h.fastpaths=(p,d)=>{let g={...d},m=typeof g.maxLength=="number"?Math.min(i,g.maxLength):i,f=p.length;if(f>m)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${m}`);p=n[p]||p;let y=u.isWindows(d),{DOT_LITERAL:S,SLASH_LITERAL:E,ONE_CHAR:b,DOTS_SLASH:_,NO_DOT:O,NO_DOTS:w,NO_DOTS_SLASH:A,STAR:I,START_ANCHOR:P}=s.globChars(y),L=g.dot?w:O,$=g.dot?A:O,x=g.capture?"":"?:",M={negated:!1,prefix:""},U=g.bash===!0?".*?":I;g.capture&&(U=`(${U})`);let V=Pe(N=>N.noglobstar===!0?U:`(${x}(?:(?!${P}${N.dot?_:S}).)*?)`,"globstar"),B=Pe(N=>{switch(N){case"*":return`${L}${b}${U}`;case".*":return`${S}${b}${U}`;case"*.*":return`${L}${U}${S}${b}${U}`;case"*/*":return`${L}${U}${E}${b}${$}${U}`;case"**":return L+V(g);case"**/*":return`(?:${L}${V(g)}${E})?${$}${b}${U}`;case"**/*.*":return`(?:${L}${V(g)}${E})?${$}${U}${S}${b}${U}`;case"**/.*":return`(?:${L}${V(g)}${E})?${S}${b}${U}`;default:{let D=/^(.*?)\.(\w+)$/.exec(N);if(!D)return;let T=B(D[1]);return T?T+S+D[2]:void 0}}},"create"),G=u.removePrefix(p,M),W=B(G);return W&&g.strictSlashes!==!0&&(W+=`${E}?`),W},t.exports=h}),C_=qr((e,t)=>{"use strict";var s=require("path"),u=R_(),i=A_(),a=Co(),c=Ys(),r=Pe(o=>o&&typeof o=="object"&&!Array.isArray(o),"isObject"),n=Pe((o,l,h=!1)=>{if(Array.isArray(o)){let E=o.map(b=>n(b,l,h));return Pe(b=>{for(let _ of E){let O=_(b);if(O)return O}return!1},"arrayMatcher")}let p=r(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!p)throw new TypeError("Expected pattern to be a non-empty string");let d=l||{},g=a.isWindows(l),m=p?n.compileRe(o,l):n.makeRe(o,l,!1,!0),f=m.state;delete m.state;let y=Pe(()=>!1,"isIgnored");if(d.ignore){let E={...l,ignore:null,onMatch:null,onResult:null};y=n(d.ignore,E,h)}let S=Pe((E,b=!1)=>{let{isMatch:_,match:O,output:w}=n.test(E,m,l,{glob:o,posix:g}),A={glob:o,state:f,regex:m,posix:g,input:E,output:w,match:O,isMatch:_};return typeof d.onResult=="function"&&d.onResult(A),_===!1?(A.isMatch=!1,b?A:!1):y(E)?(typeof d.onIgnore=="function"&&d.onIgnore(A),A.isMatch=!1,b?A:!1):(typeof d.onMatch=="function"&&d.onMatch(A),b?A:!0)},"matcher");return h&&(S.state=f),S},"picomatch");n.test=(o,l,h,{glob:p,posix:d}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};let g=h||{},m=g.format||(d?a.toPosixSlashes:null),f=o===p,y=f&&m?m(o):o;return f===!1&&(y=m?m(o):o,f=y===p),(f===!1||g.capture===!0)&&(g.matchBase===!0||g.basename===!0?f=n.matchBase(o,l,h,d):f=l.exec(y)),{isMatch:!!f,match:f,output:y}},n.matchBase=(o,l,h,p=a.isWindows(h))=>(l instanceof RegExp?l:n.makeRe(l,h)).test(s.basename(o)),n.isMatch=(o,l,h)=>n(l,h)(o),n.parse=(o,l)=>Array.isArray(o)?o.map(h=>n.parse(h,l)):i(o,{...l,fastpaths:!1}),n.scan=(o,l)=>u(o,l),n.compileRe=(o,l,h=!1,p=!1)=>{if(h===!0)return o.output;let d=l||{},g=d.contains?"":"^",m=d.contains?"":"$",f=`${g}(?:${o.output})${m}`;o&&o.negated===!0&&(f=`^(?!${f}).*$`);let y=n.toRegex(f,l);return p===!0&&(y.state=o),y},n.makeRe=(o,l={},h=!1,p=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let d={negated:!1,fastpaths:!0};return l.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(d.output=i.fastpaths(o,l)),d.output||(d=i(o,l)),n.compileRe(d,l,h,p)},n.toRegex=(o,l)=>{try{let h=l||{};return new RegExp(o,h.flags||(h.nocase?"i":""))}catch(h){if(l&&l.debug===!0)throw h;return/$^/}},n.constants=c,t.exports=n});eh.exports=C_()});var hh=ge((nH,uh)=>{"use strict";var I_=Object.defineProperty,oe=(e,t)=>I_(e,"name",{value:t,configurable:!0}),Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),T_=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.splitWhen=e.flatten=void 0;function t(u){return u.reduce((i,a)=>[].concat(i,a),[])}oe(t,"flatten"),e.flatten=t;function s(u,i){let a=[[]],c=0;for(let r of u)i(r)?(c++,a[c]=[]):a[c].push(r);return a}oe(s,"splitWhen"),e.splitWhen=s}),P_=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEnoentCodeError=void 0;function t(s){return s.code==="ENOENT"}oe(t,"isEnoentCodeError"),e.isEnoentCodeError=t}),x_=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDirentFromStats=void 0;var t=class{static{oe(this,"DirentFromStats")}constructor(u,i){this.name=u,this.isBlockDevice=i.isBlockDevice.bind(i),this.isCharacterDevice=i.isCharacterDevice.bind(i),this.isDirectory=i.isDirectory.bind(i),this.isFIFO=i.isFIFO.bind(i),this.isFile=i.isFile.bind(i),this.isSocket=i.isSocket.bind(i),this.isSymbolicLink=i.isSymbolicLink.bind(i)}};function s(u,i){return new t(u,i)}oe(s,"createDirentFromStats"),e.createDirentFromStats=s}),N_=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertPosixPathToPattern=e.convertWindowsPathToPattern=e.convertPathToPattern=e.escapePosixPath=e.escapeWindowsPath=e.escape=e.removeLeadingDotSegment=e.makeAbsolute=e.unixify=void 0;var t=require("os"),s=require("path"),u=t.platform()==="win32",i=2,a=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,c=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,r=/^\\\\([.?])/,n=/\\(?![!()+@[\]{}])/g;function o(f){return f.replace(/\\/g,"/")}oe(o,"unixify"),e.unixify=o;function l(f,y){return s.resolve(f,y)}oe(l,"makeAbsolute"),e.makeAbsolute=l;function h(f){if(f.charAt(0)==="."){let y=f.charAt(1);if(y==="/"||y==="\\")return f.slice(i)}return f}oe(h,"removeLeadingDotSegment"),e.removeLeadingDotSegment=h,e.escape=u?p:d;function p(f){return f.replace(c,"\\$2")}oe(p,"escapeWindowsPath"),e.escapeWindowsPath=p;function d(f){return f.replace(a,"\\$2")}oe(d,"escapePosixPath"),e.escapePosixPath=d,e.convertPathToPattern=u?g:m;function g(f){return p(f).replace(r,"//$1").replace(n,"/")}oe(g,"convertWindowsPathToPattern"),e.convertWindowsPathToPattern=g;function m(f){return d(f)}oe(m,"convertPosixPathToPattern"),e.convertPosixPathToPattern=m}),k_=Se((e,t)=>{t.exports=oe(function(s){if(typeof s!="string"||s==="")return!1;for(var u;u=/(\\).|([@?!+*]\(.*\))/g.exec(s);){if(u[2])return!0;s=s.slice(u.index+u[0].length)}return!1},"isExtglob")}),L_=Se((e,t)=>{var s=k_(),u={"{":"}","(":")","[":"]"},i=oe(function(c){if(c[0]==="!")return!0;for(var r=0,n=-2,o=-2,l=-2,h=-2,p=-2;r<c.length;){if(c[r]==="*"||c[r+1]==="?"&&/[\].+)]/.test(c[r])||o!==-1&&c[r]==="["&&c[r+1]!=="]"&&(o<r&&(o=c.indexOf("]",r)),o>r&&(p===-1||p>o||(p=c.indexOf("\\",r),p===-1||p>o)))||l!==-1&&c[r]==="{"&&c[r+1]!=="}"&&(l=c.indexOf("}",r),l>r&&(p=c.indexOf("\\",r),p===-1||p>l))||h!==-1&&c[r]==="("&&c[r+1]==="?"&&/[:!=]/.test(c[r+2])&&c[r+3]!==")"&&(h=c.indexOf(")",r),h>r&&(p=c.indexOf("\\",r),p===-1||p>h))||n!==-1&&c[r]==="("&&c[r+1]!=="|"&&(n<r&&(n=c.indexOf("|",r)),n!==-1&&c[n+1]!==")"&&(h=c.indexOf(")",n),h>n&&(p=c.indexOf("\\",n),p===-1||p>h))))return!0;if(c[r]==="\\"){var d=c[r+1];r+=2;var g=u[d];if(g){var m=c.indexOf(g,r);m!==-1&&(r=m+1)}if(c[r]==="!")return!0}else r++}return!1},"strictCheck"),a=oe(function(c){if(c[0]==="!")return!0;for(var r=0;r<c.length;){if(/[*?{}()[\]]/.test(c[r]))return!0;if(c[r]==="\\"){var n=c[r+1];r+=2;var o=u[n];if(o){var l=c.indexOf(o,r);l!==-1&&(r=l+1)}if(c[r]==="!")return!0}else r++}return!1},"relaxedCheck");t.exports=oe(function(c,r){if(typeof c!="string"||c==="")return!1;if(s(c))return!0;var n=i;return r&&r.strict===!1&&(n=a),n(c)},"isGlob")}),D_=Se((e,t)=>{"use strict";var s=L_(),u=require("path").posix.dirname,i=require("os").platform()==="win32",a="/",c=/\\/g,r=/[\{\[].*[\}\]]$/,n=/(^|[^\\])([\{\[]|\([^\)]+$)/,o=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=oe(function(l,h){var p=Object.assign({flipBackslashes:!0},h);p.flipBackslashes&&i&&l.indexOf(a)<0&&(l=l.replace(c,a)),r.test(l)&&(l+=a),l+="a";do l=u(l);while(s(l)||n.test(l));return l.replace(o,"$1")},"globParent")}),To=Se(e=>{"use strict";e.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1,e.find=(t,s)=>t.nodes.find(u=>u.type===s),e.exceedsLimit=(t,s,u=1,i)=>i===!1||!e.isInteger(t)||!e.isInteger(s)?!1:(Number(s)-Number(t))/Number(u)>=i,e.escapeNode=(t,s=0,u)=>{let i=t.nodes[s];i&&(u&&i.type===u||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)},e.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0),e.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1,e.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0,e.reduce=t=>t.reduce((s,u)=>(u.type==="text"&&s.push(u.value),u.type==="range"&&(u.type="text"),s),[]),e.flatten=(...t)=>{let s=[],u=oe(i=>{for(let a=0;a<i.length;a++){let c=i[a];if(Array.isArray(c)){u(c);continue}c!==void 0&&s.push(c)}return s},"flat");return u(t),s}}),Po=Se((e,t)=>{"use strict";var s=To();t.exports=(u,i={})=>{let a=oe((c,r={})=>{let n=i.escapeInvalid&&s.isInvalidBrace(r),o=c.invalid===!0&&i.escapeInvalid===!0,l="";if(c.value)return(n||o)&&s.isOpenOrClose(c)?"\\"+c.value:c.value;if(c.value)return c.value;if(c.nodes)for(let h of c.nodes)l+=a(h);return l},"stringify");return a(u)}}),$_=Se((e,t)=>{"use strict";t.exports=function(s){return typeof s=="number"?s-s===0:typeof s=="string"&&s.trim()!==""?Number.isFinite?Number.isFinite(+s):isFinite(+s):!1}}),M_=Se((e,t)=>{"use strict";var s=$_(),u=oe((S,E,b)=>{if(s(S)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(E===void 0||S===E)return String(S);if(s(E)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let _={relaxZeros:!0,...b};typeof _.strictZeros=="boolean"&&(_.relaxZeros=_.strictZeros===!1);let O=String(_.relaxZeros),w=String(_.shorthand),A=String(_.capture),I=String(_.wrap),P=S+":"+E+"="+O+w+A+I;if(u.cache.hasOwnProperty(P))return u.cache[P].result;let L=Math.min(S,E),$=Math.max(S,E);if(Math.abs(L-$)===1){let B=S+"|"+E;return _.capture?`(${B})`:_.wrap===!1?B:`(?:${B})`}let x=f(S)||f(E),M={min:S,max:E,a:L,b:$},U=[],V=[];if(x&&(M.isPadded=x,M.maxLen=String(M.max).length),L<0){let B=$<0?Math.abs($):1;V=r(B,Math.abs(L),M,_),L=M.a=0}return $>=0&&(U=r(L,$,M,_)),M.negatives=V,M.positives=U,M.result=i(V,U,_),_.capture===!0?M.result=`(${M.result})`:_.wrap!==!1&&U.length+V.length>1&&(M.result=`(?:${M.result})`),u.cache[P]=M,M.result},"toRegexRange");function i(S,E,b){let _=n(S,E,"-",!1,b)||[],O=n(E,S,"",!1,b)||[],w=n(S,E,"-?",!0,b)||[];return _.concat(w).concat(O).join("|")}oe(i,"collatePatterns");function a(S,E){let b=1,_=1,O=p(S,b),w=new Set([E]);for(;S<=O&&O<=E;)w.add(O),b+=1,O=p(S,b);for(O=d(E+1,_)-1;S<O&&O<=E;)w.add(O),_+=1,O=d(E+1,_)-1;return w=[...w],w.sort(l),w}oe(a,"splitToRanges");function c(S,E,b){if(S===E)return{pattern:S,count:[],digits:0};let _=o(S,E),O=_.length,w="",A=0;for(let I=0;I<O;I++){let[P,L]=_[I];P===L?w+=P:P!=="0"||L!=="9"?w+=m(P,L,b):A++}return A&&(w+=b.shorthand===!0?"\\d":"[0-9]"),{pattern:w,count:[A],digits:O}}oe(c,"rangeToPattern");function r(S,E,b,_){let O=a(S,E),w=[],A=S,I;for(let P=0;P<O.length;P++){let L=O[P],$=c(String(A),String(L),_),x="";if(!b.isPadded&&I&&I.pattern===$.pattern){I.count.length>1&&I.count.pop(),I.count.push($.count[0]),I.string=I.pattern+g(I.count),A=L+1;continue}b.isPadded&&(x=y(L,b,_)),$.string=x+$.pattern+g($.count),w.push($),A=L+1,I=$}return w}oe(r,"splitToPatterns");function n(S,E,b,_,O){let w=[];for(let A of S){let{string:I}=A;!_&&!h(E,"string",I)&&w.push(b+I),_&&h(E,"string",I)&&w.push(b+I)}return w}oe(n,"filterPatterns");function o(S,E){let b=[];for(let _=0;_<S.length;_++)b.push([S[_],E[_]]);return b}oe(o,"zip");function l(S,E){return S>E?1:E>S?-1:0}oe(l,"compare");function h(S,E,b){return S.some(_=>_[E]===b)}oe(h,"contains");function p(S,E){return Number(String(S).slice(0,-E)+"9".repeat(E))}oe(p,"countNines");function d(S,E){return S-S%Math.pow(10,E)}oe(d,"countZeros");function g(S){let[E=0,b=""]=S;return b||E>1?`{${E+(b?","+b:"")}}`:""}oe(g,"toQuantifier");function m(S,E,b){return`[${S}${E-S===1?"":"-"}${E}]`}oe(m,"toCharacterClass");function f(S){return/^-?(0+)\d/.test(S)}oe(f,"hasPadding");function y(S,E,b){if(!E.isPadded)return S;let _=Math.abs(E.maxLen-String(S).length),O=b.relaxZeros!==!1;switch(_){case 0:return"";case 1:return O?"0?":"0";case 2:return O?"0{0,2}":"00";default:return O?`0{0,${_}}`:`0{${_}}`}}oe(y,"padZeros"),u.cache={},u.clearCache=()=>u.cache={},t.exports=u}),rh=Se((e,t)=>{"use strict";var s=require("util"),u=M_(),i=oe(_=>_!==null&&typeof _=="object"&&!Array.isArray(_),"isObject"),a=oe(_=>O=>_===!0?Number(O):String(O),"transform"),c=oe(_=>typeof _=="number"||typeof _=="string"&&_!=="","isValidValue"),r=oe(_=>Number.isInteger(+_),"isNumber"),n=oe(_=>{let O=`${_}`,w=-1;if(O[0]==="-"&&(O=O.slice(1)),O==="0")return!1;for(;O[++w]==="0";);return w>0},"zeros"),o=oe((_,O,w)=>typeof _=="string"||typeof O=="string"?!0:w.stringify===!0,"stringify"),l=oe((_,O,w)=>{if(O>0){let A=_[0]==="-"?"-":"";A&&(_=_.slice(1)),_=A+_.padStart(A?O-1:O,"0")}return w===!1?String(_):_},"pad"),h=oe((_,O)=>{let w=_[0]==="-"?"-":"";for(w&&(_=_.slice(1),O--);_.length<O;)_="0"+_;return w?"-"+_:_},"toMaxLen"),p=oe((_,O,w)=>{_.negatives.sort(($,x)=>$<x?-1:$>x?1:0),_.positives.sort(($,x)=>$<x?-1:$>x?1:0);let A=O.capture?"":"?:",I="",P="",L;return _.positives.length&&(I=_.positives.map($=>h(String($),w)).join("|")),_.negatives.length&&(P=`-(${A}${_.negatives.map($=>h(String($),w)).join("|")})`),I&&P?L=`${I}|${P}`:L=I||P,O.wrap?`(${A}${L})`:L},"toSequence"),d=oe((_,O,w,A)=>{if(w)return u(_,O,{wrap:!1,...A});let I=String.fromCharCode(_);if(_===O)return I;let P=String.fromCharCode(O);return`[${I}-${P}]`},"toRange"),g=oe((_,O,w)=>{if(Array.isArray(_)){let A=w.wrap===!0,I=w.capture?"":"?:";return A?`(${I}${_.join("|")})`:_.join("|")}return u(_,O,w)},"toRegex"),m=oe((..._)=>new RangeError("Invalid range arguments: "+s.inspect(..._)),"rangeError"),f=oe((_,O,w)=>{if(w.strictRanges===!0)throw m([_,O]);return[]},"invalidRange"),y=oe((_,O)=>{if(O.strictRanges===!0)throw new TypeError(`Expected step "${_}" to be a number`);return[]},"invalidStep"),S=oe((_,O,w=1,A={})=>{let I=Number(_),P=Number(O);if(!Number.isInteger(I)||!Number.isInteger(P)){if(A.strictRanges===!0)throw m([_,O]);return[]}I===0&&(I=0),P===0&&(P=0);let L=I>P,$=String(_),x=String(O),M=String(w);w=Math.max(Math.abs(w),1);let U=n($)||n(x)||n(M),V=U?Math.max($.length,x.length,M.length):0,B=U===!1&&o(_,O,A)===!1,G=A.transform||a(B);if(A.toRegex&&w===1)return d(h(_,V),h(O,V),!0,A);let W={negatives:[],positives:[]},N=oe(C=>W[C<0?"negatives":"positives"].push(Math.abs(C)),"push"),D=[],T=0;for(;L?I>=P:I<=P;)A.toRegex===!0&&w>1?N(I):D.push(l(G(I,T),V,B)),I=L?I-w:I+w,T++;return A.toRegex===!0?w>1?p(W,A,V):g(D,null,{wrap:!1,...A}):D},"fillNumbers"),E=oe((_,O,w=1,A={})=>{if(!r(_)&&_.length>1||!r(O)&&O.length>1)return f(_,O,A);let I=A.transform||(B=>String.fromCharCode(B)),P=`${_}`.charCodeAt(0),L=`${O}`.charCodeAt(0),$=P>L,x=Math.min(P,L),M=Math.max(P,L);if(A.toRegex&&w===1)return d(x,M,!1,A);let U=[],V=0;for(;$?P>=L:P<=L;)U.push(I(P,V)),P=$?P-w:P+w,V++;return A.toRegex===!0?g(U,null,{wrap:!1,options:A}):U},"fillLetters"),b=oe((_,O,w,A={})=>{if(O==null&&c(_))return[_];if(!c(_)||!c(O))return f(_,O,A);if(typeof w=="function")return b(_,O,1,{transform:w});if(i(w))return b(_,O,0,w);let I={...A};return I.capture===!0&&(I.wrap=!0),w=w||I.step||1,r(w)?r(_)&&r(O)?S(_,O,w,I):E(_,O,Math.max(Math.abs(w),1),I):w!=null&&!i(w)?y(w,I):b(_,O,1,w)},"fill");t.exports=b}),j_=Se((e,t)=>{"use strict";var s=rh(),u=To(),i=oe((a,c={})=>{let r=oe((n,o={})=>{let l=u.isInvalidBrace(o),h=n.invalid===!0&&c.escapeInvalid===!0,p=l===!0||h===!0,d=c.escapeInvalid===!0?"\\":"",g="";if(n.isOpen===!0||n.isClose===!0)return d+n.value;if(n.type==="open")return p?d+n.value:"(";if(n.type==="close")return p?d+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":p?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let m=u.reduce(n.nodes),f=s(...m,{...c,wrap:!1,toRegex:!0,strictZeros:!0});if(f.length!==0)return m.length>1&&f.length>1?`(${f})`:f}if(n.nodes)for(let m of n.nodes)g+=r(m,n);return g},"walk");return r(a)},"compile");t.exports=i}),B_=Se((e,t)=>{"use strict";var s=rh(),u=Po(),i=To(),a=oe((r="",n="",o=!1)=>{let l=[];if(r=[].concat(r),n=[].concat(n),!n.length)return r;if(!r.length)return o?i.flatten(n).map(h=>`{${h}}`):n;for(let h of r)if(Array.isArray(h))for(let p of h)l.push(a(p,n,o));else for(let p of n)o===!0&&typeof p=="string"&&(p=`{${p}}`),l.push(Array.isArray(p)?a(h,p,o):h+p);return i.flatten(l)},"append"),c=oe((r,n={})=>{let o=n.rangeLimit===void 0?1e3:n.rangeLimit,l=oe((h,p={})=>{h.queue=[];let d=p,g=p.queue;for(;d.type!=="brace"&&d.type!=="root"&&d.parent;)d=d.parent,g=d.queue;if(h.invalid||h.dollar){g.push(a(g.pop(),u(h,n)));return}if(h.type==="brace"&&h.invalid!==!0&&h.nodes.length===2){g.push(a(g.pop(),["{}"]));return}if(h.nodes&&h.ranges>0){let S=i.reduce(h.nodes);if(i.exceedsLimit(...S,n.step,o))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let E=s(...S,n);E.length===0&&(E=u(h,n)),g.push(a(g.pop(),E)),h.nodes=[];return}let m=i.encloseBrace(h),f=h.queue,y=h;for(;y.type!=="brace"&&y.type!=="root"&&y.parent;)y=y.parent,f=y.queue;for(let S=0;S<h.nodes.length;S++){let E=h.nodes[S];if(E.type==="comma"&&h.type==="brace"){S===1&&f.push(""),f.push("");continue}if(E.type==="close"){g.push(a(g.pop(),f,m));continue}if(E.value&&E.type!=="open"){f.push(a(f.pop(),E.value));continue}E.nodes&&l(E,h)}return f},"walk");return i.flatten(l(r))},"expand");t.exports=c}),U_=Se((e,t)=>{"use strict";t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
4
|
+
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}}),F_=Se((e,t)=>{"use strict";var s=Po(),{MAX_LENGTH:u,CHAR_BACKSLASH:i,CHAR_BACKTICK:a,CHAR_COMMA:c,CHAR_DOT:r,CHAR_LEFT_PARENTHESES:n,CHAR_RIGHT_PARENTHESES:o,CHAR_LEFT_CURLY_BRACE:l,CHAR_RIGHT_CURLY_BRACE:h,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:g,CHAR_SINGLE_QUOTE:m,CHAR_NO_BREAK_SPACE:f,CHAR_ZERO_WIDTH_NOBREAK_SPACE:y}=U_(),S=oe((E,b={})=>{if(typeof E!="string")throw new TypeError("Expected a string");let _=b||{},O=typeof _.maxLength=="number"?Math.min(u,_.maxLength):u;if(E.length>O)throw new SyntaxError(`Input length (${E.length}), exceeds max characters (${O})`);let w={type:"root",input:E,nodes:[]},A=[w],I=w,P=w,L=0,$=E.length,x=0,M=0,U,V=oe(()=>E[x++],"advance"),B=oe(G=>{if(G.type==="text"&&P.type==="dot"&&(P.type="text"),P&&P.type==="text"&&G.type==="text"){P.value+=G.value;return}return I.nodes.push(G),G.parent=I,G.prev=P,P=G,G},"push");for(B({type:"bos"});x<$;)if(I=A[A.length-1],U=V(),!(U===y||U===f)){if(U===i){B({type:"text",value:(b.keepEscaping?U:"")+V()});continue}if(U===d){B({type:"text",value:"\\"+U});continue}if(U===p){L++;let G;for(;x<$&&(G=V());){if(U+=G,G===p){L++;continue}if(G===i){U+=V();continue}if(G===d&&(L--,L===0))break}B({type:"text",value:U});continue}if(U===n){I=B({type:"paren",nodes:[]}),A.push(I),B({type:"text",value:U});continue}if(U===o){if(I.type!=="paren"){B({type:"text",value:U});continue}I=A.pop(),B({type:"text",value:U}),I=A[A.length-1];continue}if(U===g||U===m||U===a){let G=U,W;for(b.keepQuotes!==!0&&(U="");x<$&&(W=V());){if(W===i){U+=W+V();continue}if(W===G){b.keepQuotes===!0&&(U+=W);break}U+=W}B({type:"text",value:U});continue}if(U===l){M++;let G={type:"brace",open:!0,close:!1,dollar:P.value&&P.value.slice(-1)==="$"||I.dollar===!0,depth:M,commas:0,ranges:0,nodes:[]};I=B(G),A.push(I),B({type:"open",value:U});continue}if(U===h){if(I.type!=="brace"){B({type:"text",value:U});continue}let G="close";I=A.pop(),I.close=!0,B({type:G,value:U}),M--,I=A[A.length-1];continue}if(U===c&&M>0){if(I.ranges>0){I.ranges=0;let G=I.nodes.shift();I.nodes=[G,{type:"text",value:s(I)}]}B({type:"comma",value:U}),I.commas++;continue}if(U===r&&M>0&&I.commas===0){let G=I.nodes;if(M===0||G.length===0){B({type:"text",value:U});continue}if(P.type==="dot"){if(I.range=[],P.value+=U,P.type="range",I.nodes.length!==3&&I.nodes.length!==5){I.invalid=!0,I.ranges=0,P.type="text";continue}I.ranges++,I.args=[];continue}if(P.type==="range"){G.pop();let W=G[G.length-1];W.value+=P.value+U,P=W,I.ranges--;continue}B({type:"dot",value:U});continue}B({type:"text",value:U})}do if(I=A.pop(),I.type!=="root"){I.nodes.forEach(N=>{N.nodes||(N.type==="open"&&(N.isOpen=!0),N.type==="close"&&(N.isClose=!0),N.nodes||(N.type="text"),N.invalid=!0)});let G=A[A.length-1],W=G.nodes.indexOf(I);G.nodes.splice(W,1,...I.nodes)}while(A.length>0);return B({type:"eos"}),w},"parse");t.exports=S}),H_=Se((e,t)=>{"use strict";var s=Po(),u=j_(),i=B_(),a=F_(),c=oe((r,n={})=>{let o=[];if(Array.isArray(r))for(let l of r){let h=c.create(l,n);Array.isArray(h)?o.push(...h):o.push(h)}else o=[].concat(c.create(r,n));return n&&n.expand===!0&&n.nodupes===!0&&(o=[...new Set(o)]),o},"braces");c.parse=(r,n={})=>a(r,n),c.stringify=(r,n={})=>s(typeof r=="string"?c.parse(r,n):r,n),c.compile=(r,n={})=>(typeof r=="string"&&(r=c.parse(r,n)),u(r,n)),c.expand=(r,n={})=>{typeof r=="string"&&(r=c.parse(r,n));let o=i(r,n);return n.noempty===!0&&(o=o.filter(Boolean)),n.nodupes===!0&&(o=[...new Set(o)]),o},c.create=(r,n={})=>r===""||r.length<3?[r]:n.expand!==!0?c.compile(r,n):c.expand(r,n),t.exports=c}),ti=Se((e,t)=>{"use strict";var s=require("path"),u="\\\\/",i=`[^${u}]`,a="\\.",c="\\+",r="\\?",n="\\/",o="(?=.)",l="[^/]",h=`(?:${n}|$)`,p=`(?:^|${n})`,d=`${a}{1,2}${h}`,g=`(?!${a})`,m=`(?!${p}${d})`,f=`(?!${a}{0,1}${h})`,y=`(?!${d})`,S=`[^.${n}]`,E=`${l}*?`,b={DOT_LITERAL:a,PLUS_LITERAL:c,QMARK_LITERAL:r,SLASH_LITERAL:n,ONE_CHAR:o,QMARK:l,END_ANCHOR:h,DOTS_SLASH:d,NO_DOT:g,NO_DOTS:m,NO_DOT_SLASH:f,NO_DOTS_SLASH:y,QMARK_NO_DOT:S,STAR:E,START_ANCHOR:p},_={...b,SLASH_LITERAL:`[${u}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${a}{1,2}(?:[${u}]|$)`,NO_DOT:`(?!${a})`,NO_DOTS:`(?!(?:^|[${u}])${a}{1,2}(?:[${u}]|$))`,NO_DOT_SLASH:`(?!${a}{0,1}(?:[${u}]|$))`,NO_DOTS_SLASH:`(?!${a}{1,2}(?:[${u}]|$))`,QMARK_NO_DOT:`[^.${u}]`,START_ANCHOR:`(?:^|[${u}])`,END_ANCHOR:`(?:[${u}]|$)`},O={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:O,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:s.sep,extglobChars(w){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${w.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(w){return w===!0?_:b}}}),ri=Se(e=>{"use strict";var t=require("path"),s=process.platform==="win32",{REGEX_BACKSLASH:u,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:c}=ti();e.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),e.hasRegexChars=r=>a.test(r),e.isRegexChar=r=>r.length===1&&e.hasRegexChars(r),e.escapeRegex=r=>r.replace(c,"\\$1"),e.toPosixSlashes=r=>r.replace(u,"/"),e.removeBackslashes=r=>r.replace(i,n=>n==="\\"?"":n),e.supportsLookbehinds=()=>{let r=process.version.slice(1).split(".").map(Number);return r.length===3&&r[0]>=9||r[0]===8&&r[1]>=10},e.isWindows=r=>r&&typeof r.windows=="boolean"?r.windows:s===!0||t.sep==="\\",e.escapeLast=(r,n,o)=>{let l=r.lastIndexOf(n,o);return l===-1?r:r[l-1]==="\\"?e.escapeLast(r,n,l-1):`${r.slice(0,l)}\\${r.slice(l)}`},e.removePrefix=(r,n={})=>{let o=r;return o.startsWith("./")&&(o=o.slice(2),n.prefix="./"),o},e.wrapOutput=(r,n={},o={})=>{let l=o.contains?"":"^",h=o.contains?"":"$",p=`${l}(?:${r})${h}`;return n.negated===!0&&(p=`(?:^(?!${p}).*$)`),p}}),G_=Se((e,t)=>{"use strict";var s=ri(),{CHAR_ASTERISK:u,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:c,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:n,CHAR_FORWARD_SLASH:o,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:d,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:y}=ti(),S=oe(_=>_===o||_===a,"isPathSeparator"),E=oe(_=>{_.isPrefix!==!0&&(_.depth=_.isGlobstar?1/0:1)},"depth"),b=oe((_,O)=>{let w=O||{},A=_.length-1,I=w.parts===!0||w.scanToEnd===!0,P=[],L=[],$=[],x=_,M=-1,U=0,V=0,B=!1,G=!1,W=!1,N=!1,D=!1,T=!1,C=!1,Z=!1,X=!1,Q=!1,k=0,F,z,j={value:"",depth:0,isGlob:!1},q=oe(()=>M>=A,"eos"),J=oe(()=>x.charCodeAt(M+1),"peek"),Y=oe(()=>(F=z,x.charCodeAt(++M)),"advance");for(;M<A;){z=Y();let te;if(z===a){C=j.backslashes=!0,z=Y(),z===l&&(T=!0);continue}if(T===!0||z===l){for(k++;q()!==!0&&(z=Y());){if(z===a){C=j.backslashes=!0,Y();continue}if(z===l){k++;continue}if(T!==!0&&z===r&&(z=Y())===r){if(B=j.isBrace=!0,W=j.isGlob=!0,Q=!0,I===!0)continue;break}if(T!==!0&&z===c){if(B=j.isBrace=!0,W=j.isGlob=!0,Q=!0,I===!0)continue;break}if(z===m&&(k--,k===0)){T=!1,B=j.isBrace=!0,Q=!0;break}}if(I===!0)continue;break}if(z===o){if(P.push(M),L.push(j),j={value:"",depth:0,isGlob:!1},Q===!0)continue;if(F===r&&M===U+1){U+=2;continue}V=M+1;continue}if(w.noext!==!0&&(z===d||z===i||z===u||z===g||z===n)&&J()===h){if(W=j.isGlob=!0,N=j.isExtglob=!0,Q=!0,z===n&&M===U&&(X=!0),I===!0){for(;q()!==!0&&(z=Y());){if(z===a){C=j.backslashes=!0,z=Y();continue}if(z===f){W=j.isGlob=!0,Q=!0;break}}continue}break}if(z===u){if(F===u&&(D=j.isGlobstar=!0),W=j.isGlob=!0,Q=!0,I===!0)continue;break}if(z===g){if(W=j.isGlob=!0,Q=!0,I===!0)continue;break}if(z===p){for(;q()!==!0&&(te=Y());){if(te===a){C=j.backslashes=!0,Y();continue}if(te===y){G=j.isBracket=!0,W=j.isGlob=!0,Q=!0;break}}if(I===!0)continue;break}if(w.nonegate!==!0&&z===n&&M===U){Z=j.negated=!0,U++;continue}if(w.noparen!==!0&&z===h){if(W=j.isGlob=!0,I===!0){for(;q()!==!0&&(z=Y());){if(z===h){C=j.backslashes=!0,z=Y();continue}if(z===f){Q=!0;break}}continue}break}if(W===!0){if(Q=!0,I===!0)continue;break}}w.noext===!0&&(N=!1,W=!1);let R=x,H="",ee="";U>0&&(H=x.slice(0,U),x=x.slice(U),V-=U),R&&W===!0&&V>0?(R=x.slice(0,V),ee=x.slice(V)):W===!0?(R="",ee=x):R=x,R&&R!==""&&R!=="/"&&R!==x&&S(R.charCodeAt(R.length-1))&&(R=R.slice(0,-1)),w.unescape===!0&&(ee&&(ee=s.removeBackslashes(ee)),R&&C===!0&&(R=s.removeBackslashes(R)));let ne={prefix:H,input:_,start:U,base:R,glob:ee,isBrace:B,isBracket:G,isGlob:W,isExtglob:N,isGlobstar:D,negated:Z,negatedExtglob:X};if(w.tokens===!0&&(ne.maxDepth=0,S(z)||L.push(j),ne.tokens=L),w.parts===!0||w.tokens===!0){let te;for(let ae=0;ae<P.length;ae++){let he=te?te+1:U,re=P[ae],ue=_.slice(he,re);w.tokens&&(ae===0&&U!==0?(L[ae].isPrefix=!0,L[ae].value=H):L[ae].value=ue,E(L[ae]),ne.maxDepth+=L[ae].depth),(ae!==0||ue!=="")&&$.push(ue),te=re}if(te&&te+1<_.length){let ae=_.slice(te+1);$.push(ae),w.tokens&&(L[L.length-1].value=ae,E(L[L.length-1]),ne.maxDepth+=L[L.length-1].depth)}ne.slashes=P,ne.parts=$}return ne},"scan");t.exports=b}),V_=Se((e,t)=>{"use strict";var s=ti(),u=ri(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:n}=s,o=oe((p,d)=>{if(typeof d.expandRange=="function")return d.expandRange(...p,d);p.sort();let g=`[${p.join("-")}]`;try{new RegExp(g)}catch{return p.map(m=>u.escapeRegex(m)).join("..")}return g},"expandRange"),l=oe((p,d)=>`Missing ${p}: "${d}" - use "\\\\${d}" to match literal characters`,"syntaxError"),h=oe((p,d)=>{if(typeof p!="string")throw new TypeError("Expected a string");p=n[p]||p;let g={...d},m=typeof g.maxLength=="number"?Math.min(i,g.maxLength):i,f=p.length;if(f>m)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${m}`);let y={type:"bos",value:"",output:g.prepend||""},S=[y],E=g.capture?"":"?:",b=u.isWindows(d),_=s.globChars(b),O=s.extglobChars(_),{DOT_LITERAL:w,PLUS_LITERAL:A,SLASH_LITERAL:I,ONE_CHAR:P,DOTS_SLASH:L,NO_DOT:$,NO_DOT_SLASH:x,NO_DOTS_SLASH:M,QMARK:U,QMARK_NO_DOT:V,STAR:B,START_ANCHOR:G}=_,W=oe(re=>`(${E}(?:(?!${G}${re.dot?L:w}).)*?)`,"globstar"),N=g.dot?"":$,D=g.dot?U:V,T=g.bash===!0?W(g):B;g.capture&&(T=`(${T})`),typeof g.noext=="boolean"&&(g.noextglob=g.noext);let C={input:p,index:-1,start:0,dot:g.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:S};p=u.removePrefix(p,C),f=p.length;let Z=[],X=[],Q=[],k=y,F,z=oe(()=>C.index===f-1,"eos"),j=C.peek=(re=1)=>p[C.index+re],q=C.advance=()=>p[++C.index]||"",J=oe(()=>p.slice(C.index+1),"remaining"),Y=oe((re="",ue=0)=>{C.consumed+=re,C.index+=ue},"consume"),R=oe(re=>{C.output+=re.output!=null?re.output:re.value,Y(re.value)},"append"),H=oe(()=>{let re=1;for(;j()==="!"&&(j(2)!=="("||j(3)==="?");)q(),C.start++,re++;return re%2===0?!1:(C.negated=!0,C.start++,!0)},"negate"),ee=oe(re=>{C[re]++,Q.push(re)},"increment"),ne=oe(re=>{C[re]--,Q.pop()},"decrement"),te=oe(re=>{if(k.type==="globstar"){let ue=C.braces>0&&(re.type==="comma"||re.type==="brace"),ie=re.extglob===!0||Z.length&&(re.type==="pipe"||re.type==="paren");re.type!=="slash"&&re.type!=="paren"&&!ue&&!ie&&(C.output=C.output.slice(0,-k.output.length),k.type="star",k.value="*",k.output=T,C.output+=k.output)}if(Z.length&&re.type!=="paren"&&(Z[Z.length-1].inner+=re.value),(re.value||re.output)&&R(re),k&&k.type==="text"&&re.type==="text"){k.value+=re.value,k.output=(k.output||"")+re.value;return}re.prev=k,S.push(re),k=re},"push"),ae=oe((re,ue)=>{let ie={...O[ue],conditions:1,inner:""};ie.prev=k,ie.parens=C.parens,ie.output=C.output;let le=(g.capture?"(":"")+ie.open;ee("parens"),te({type:re,value:ue,output:C.output?"":P}),te({type:"paren",extglob:!0,value:q(),output:le}),Z.push(ie)},"extglobOpen"),he=oe(re=>{let ue=re.close+(g.capture?")":""),ie;if(re.type==="negate"){let le=T;if(re.inner&&re.inner.length>1&&re.inner.includes("/")&&(le=W(g)),(le!==T||z()||/^\)+$/.test(J()))&&(ue=re.close=`)$))${le}`),re.inner.includes("*")&&(ie=J())&&/^\.[^\\/.]+$/.test(ie)){let fe=h(ie,{...d,fastpaths:!1}).output;ue=re.close=`)${fe})${le})`}re.prev.type==="bos"&&(C.negatedExtglob=!0)}te({type:"paren",extglob:!0,value:F,output:ue}),ne("parens")},"extglobClose");if(g.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(p)){let re=!1,ue=p.replace(r,(ie,le,fe,me,ce,pe)=>me==="\\"?(re=!0,ie):me==="?"?le?le+me+(ce?U.repeat(ce.length):""):pe===0?D+(ce?U.repeat(ce.length):""):U.repeat(fe.length):me==="."?w.repeat(fe.length):me==="*"?le?le+me+(ce?T:""):T:le?ie:`\\${ie}`);return re===!0&&(g.unescape===!0?ue=ue.replace(/\\/g,""):ue=ue.replace(/\\+/g,ie=>ie.length%2===0?"\\\\":ie?"\\":"")),ue===p&&g.contains===!0?(C.output=p,C):(C.output=u.wrapOutput(ue,C,d),C)}for(;!z();){if(F=q(),F==="\0")continue;if(F==="\\"){let ie=j();if(ie==="/"&&g.bash!==!0||ie==="."||ie===";")continue;if(!ie){F+="\\",te({type:"text",value:F});continue}let le=/^\\+/.exec(J()),fe=0;if(le&&le[0].length>2&&(fe=le[0].length,C.index+=fe,fe%2!==0&&(F+="\\")),g.unescape===!0?F=q():F+=q(),C.brackets===0){te({type:"text",value:F});continue}}if(C.brackets>0&&(F!=="]"||k.value==="["||k.value==="[^")){if(g.posix!==!1&&F===":"){let ie=k.value.slice(1);if(ie.includes("[")&&(k.posix=!0,ie.includes(":"))){let le=k.value.lastIndexOf("["),fe=k.value.slice(0,le),me=k.value.slice(le+2),ce=a[me];if(ce){k.value=fe+ce,C.backtrack=!0,q(),!y.output&&S.indexOf(k)===1&&(y.output=P);continue}}}(F==="["&&j()!==":"||F==="-"&&j()==="]")&&(F=`\\${F}`),F==="]"&&(k.value==="["||k.value==="[^")&&(F=`\\${F}`),g.posix===!0&&F==="!"&&k.value==="["&&(F="^"),k.value+=F,R({value:F});continue}if(C.quotes===1&&F!=='"'){F=u.escapeRegex(F),k.value+=F,R({value:F});continue}if(F==='"'){C.quotes=C.quotes===1?0:1,g.keepQuotes===!0&&te({type:"text",value:F});continue}if(F==="("){ee("parens"),te({type:"paren",value:F});continue}if(F===")"){if(C.parens===0&&g.strictBrackets===!0)throw new SyntaxError(l("opening","("));let ie=Z[Z.length-1];if(ie&&C.parens===ie.parens+1){he(Z.pop());continue}te({type:"paren",value:F,output:C.parens?")":"\\)"}),ne("parens");continue}if(F==="["){if(g.nobracket===!0||!J().includes("]")){if(g.nobracket!==!0&&g.strictBrackets===!0)throw new SyntaxError(l("closing","]"));F=`\\${F}`}else ee("brackets");te({type:"bracket",value:F});continue}if(F==="]"){if(g.nobracket===!0||k&&k.type==="bracket"&&k.value.length===1){te({type:"text",value:F,output:`\\${F}`});continue}if(C.brackets===0){if(g.strictBrackets===!0)throw new SyntaxError(l("opening","["));te({type:"text",value:F,output:`\\${F}`});continue}ne("brackets");let ie=k.value.slice(1);if(k.posix!==!0&&ie[0]==="^"&&!ie.includes("/")&&(F=`/${F}`),k.value+=F,R({value:F}),g.literalBrackets===!1||u.hasRegexChars(ie))continue;let le=u.escapeRegex(k.value);if(C.output=C.output.slice(0,-k.value.length),g.literalBrackets===!0){C.output+=le,k.value=le;continue}k.value=`(${E}${le}|${k.value})`,C.output+=k.value;continue}if(F==="{"&&g.nobrace!==!0){ee("braces");let ie={type:"brace",value:F,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};X.push(ie),te(ie);continue}if(F==="}"){let ie=X[X.length-1];if(g.nobrace===!0||!ie){te({type:"text",value:F,output:F});continue}let le=")";if(ie.dots===!0){let fe=S.slice(),me=[];for(let ce=fe.length-1;ce>=0&&(S.pop(),fe[ce].type!=="brace");ce--)fe[ce].type!=="dots"&&me.unshift(fe[ce].value);le=o(me,g),C.backtrack=!0}if(ie.comma!==!0&&ie.dots!==!0){let fe=C.output.slice(0,ie.outputIndex),me=C.tokens.slice(ie.tokensIndex);ie.value=ie.output="\\{",F=le="\\}",C.output=fe;for(let ce of me)C.output+=ce.output||ce.value}te({type:"brace",value:F,output:le}),ne("braces"),X.pop();continue}if(F==="|"){Z.length>0&&Z[Z.length-1].conditions++,te({type:"text",value:F});continue}if(F===","){let ie=F,le=X[X.length-1];le&&Q[Q.length-1]==="braces"&&(le.comma=!0,ie="|"),te({type:"comma",value:F,output:ie});continue}if(F==="/"){if(k.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",S.pop(),k=y;continue}te({type:"slash",value:F,output:I});continue}if(F==="."){if(C.braces>0&&k.type==="dot"){k.value==="."&&(k.output=w);let ie=X[X.length-1];k.type="dots",k.output+=F,k.value+=F,ie.dots=!0;continue}if(C.braces+C.parens===0&&k.type!=="bos"&&k.type!=="slash"){te({type:"text",value:F,output:w});continue}te({type:"dot",value:F,output:w});continue}if(F==="?"){if(!(k&&k.value==="(")&&g.noextglob!==!0&&j()==="("&&j(2)!=="?"){ae("qmark",F);continue}if(k&&k.type==="paren"){let ie=j(),le=F;if(ie==="<"&&!u.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(k.value==="("&&!/[!=<:]/.test(ie)||ie==="<"&&!/<([!=]|\w+>)/.test(J()))&&(le=`\\${F}`),te({type:"text",value:F,output:le});continue}if(g.dot!==!0&&(k.type==="slash"||k.type==="bos")){te({type:"qmark",value:F,output:V});continue}te({type:"qmark",value:F,output:U});continue}if(F==="!"){if(g.noextglob!==!0&&j()==="("&&(j(2)!=="?"||!/[!=<:]/.test(j(3)))){ae("negate",F);continue}if(g.nonegate!==!0&&C.index===0){H();continue}}if(F==="+"){if(g.noextglob!==!0&&j()==="("&&j(2)!=="?"){ae("plus",F);continue}if(k&&k.value==="("||g.regex===!1){te({type:"plus",value:F,output:A});continue}if(k&&(k.type==="bracket"||k.type==="paren"||k.type==="brace")||C.parens>0){te({type:"plus",value:F});continue}te({type:"plus",value:A});continue}if(F==="@"){if(g.noextglob!==!0&&j()==="("&&j(2)!=="?"){te({type:"at",extglob:!0,value:F,output:""});continue}te({type:"text",value:F});continue}if(F!=="*"){(F==="$"||F==="^")&&(F=`\\${F}`);let ie=c.exec(J());ie&&(F+=ie[0],C.index+=ie[0].length),te({type:"text",value:F});continue}if(k&&(k.type==="globstar"||k.star===!0)){k.type="star",k.star=!0,k.value+=F,k.output=T,C.backtrack=!0,C.globstar=!0,Y(F);continue}let re=J();if(g.noextglob!==!0&&/^\([^?]/.test(re)){ae("star",F);continue}if(k.type==="star"){if(g.noglobstar===!0){Y(F);continue}let ie=k.prev,le=ie.prev,fe=ie.type==="slash"||ie.type==="bos",me=le&&(le.type==="star"||le.type==="globstar");if(g.bash===!0&&(!fe||re[0]&&re[0]!=="/")){te({type:"star",value:F,output:""});continue}let ce=C.braces>0&&(ie.type==="comma"||ie.type==="brace"),pe=Z.length&&(ie.type==="pipe"||ie.type==="paren");if(!fe&&ie.type!=="paren"&&!ce&&!pe){te({type:"star",value:F,output:""});continue}for(;re.slice(0,3)==="/**";){let de=p[C.index+4];if(de&&de!=="/")break;re=re.slice(3),Y("/**",3)}if(ie.type==="bos"&&z()){k.type="globstar",k.value+=F,k.output=W(g),C.output=k.output,C.globstar=!0,Y(F);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&!me&&z()){C.output=C.output.slice(0,-(ie.output+k.output).length),ie.output=`(?:${ie.output}`,k.type="globstar",k.output=W(g)+(g.strictSlashes?")":"|$)"),k.value+=F,C.globstar=!0,C.output+=ie.output+k.output,Y(F);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&re[0]==="/"){let de=re[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(ie.output+k.output).length),ie.output=`(?:${ie.output}`,k.type="globstar",k.output=`${W(g)}${I}|${I}${de})`,k.value+=F,C.output+=ie.output+k.output,C.globstar=!0,Y(F+q()),te({type:"slash",value:"/",output:""});continue}if(ie.type==="bos"&&re[0]==="/"){k.type="globstar",k.value+=F,k.output=`(?:^|${I}|${W(g)}${I})`,C.output=k.output,C.globstar=!0,Y(F+q()),te({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-k.output.length),k.type="globstar",k.output=W(g),k.value+=F,C.output+=k.output,C.globstar=!0,Y(F);continue}let ue={type:"star",value:F,output:T};if(g.bash===!0){ue.output=".*?",(k.type==="bos"||k.type==="slash")&&(ue.output=N+ue.output),te(ue);continue}if(k&&(k.type==="bracket"||k.type==="paren")&&g.regex===!0){ue.output=F,te(ue);continue}(C.index===C.start||k.type==="slash"||k.type==="dot")&&(k.type==="dot"?(C.output+=x,k.output+=x):g.dot===!0?(C.output+=M,k.output+=M):(C.output+=N,k.output+=N),j()!=="*"&&(C.output+=P,k.output+=P)),te(ue)}for(;C.brackets>0;){if(g.strictBrackets===!0)throw new SyntaxError(l("closing","]"));C.output=u.escapeLast(C.output,"["),ne("brackets")}for(;C.parens>0;){if(g.strictBrackets===!0)throw new SyntaxError(l("closing",")"));C.output=u.escapeLast(C.output,"("),ne("parens")}for(;C.braces>0;){if(g.strictBrackets===!0)throw new SyntaxError(l("closing","}"));C.output=u.escapeLast(C.output,"{"),ne("braces")}if(g.strictSlashes!==!0&&(k.type==="star"||k.type==="bracket")&&te({type:"maybe_slash",value:"",output:`${I}?`}),C.backtrack===!0){C.output="";for(let re of C.tokens)C.output+=re.output!=null?re.output:re.value,re.suffix&&(C.output+=re.suffix)}return C},"parse");h.fastpaths=(p,d)=>{let g={...d},m=typeof g.maxLength=="number"?Math.min(i,g.maxLength):i,f=p.length;if(f>m)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${m}`);p=n[p]||p;let y=u.isWindows(d),{DOT_LITERAL:S,SLASH_LITERAL:E,ONE_CHAR:b,DOTS_SLASH:_,NO_DOT:O,NO_DOTS:w,NO_DOTS_SLASH:A,STAR:I,START_ANCHOR:P}=s.globChars(y),L=g.dot?w:O,$=g.dot?A:O,x=g.capture?"":"?:",M={negated:!1,prefix:""},U=g.bash===!0?".*?":I;g.capture&&(U=`(${U})`);let V=oe(N=>N.noglobstar===!0?U:`(${x}(?:(?!${P}${N.dot?_:S}).)*?)`,"globstar"),B=oe(N=>{switch(N){case"*":return`${L}${b}${U}`;case".*":return`${S}${b}${U}`;case"*.*":return`${L}${U}${S}${b}${U}`;case"*/*":return`${L}${U}${E}${b}${$}${U}`;case"**":return L+V(g);case"**/*":return`(?:${L}${V(g)}${E})?${$}${b}${U}`;case"**/*.*":return`(?:${L}${V(g)}${E})?${$}${U}${S}${b}${U}`;case"**/.*":return`(?:${L}${V(g)}${E})?${S}${b}${U}`;default:{let D=/^(.*?)\.(\w+)$/.exec(N);if(!D)return;let T=B(D[1]);return T?T+S+D[2]:void 0}}},"create"),G=u.removePrefix(p,M),W=B(G);return W&&g.strictSlashes!==!0&&(W+=`${E}?`),W},t.exports=h}),W_=Se((e,t)=>{"use strict";var s=require("path"),u=G_(),i=V_(),a=ri(),c=ti(),r=oe(o=>o&&typeof o=="object"&&!Array.isArray(o),"isObject"),n=oe((o,l,h=!1)=>{if(Array.isArray(o)){let E=o.map(b=>n(b,l,h));return oe(b=>{for(let _ of E){let O=_(b);if(O)return O}return!1},"arrayMatcher")}let p=r(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!p)throw new TypeError("Expected pattern to be a non-empty string");let d=l||{},g=a.isWindows(l),m=p?n.compileRe(o,l):n.makeRe(o,l,!1,!0),f=m.state;delete m.state;let y=oe(()=>!1,"isIgnored");if(d.ignore){let E={...l,ignore:null,onMatch:null,onResult:null};y=n(d.ignore,E,h)}let S=oe((E,b=!1)=>{let{isMatch:_,match:O,output:w}=n.test(E,m,l,{glob:o,posix:g}),A={glob:o,state:f,regex:m,posix:g,input:E,output:w,match:O,isMatch:_};return typeof d.onResult=="function"&&d.onResult(A),_===!1?(A.isMatch=!1,b?A:!1):y(E)?(typeof d.onIgnore=="function"&&d.onIgnore(A),A.isMatch=!1,b?A:!1):(typeof d.onMatch=="function"&&d.onMatch(A),b?A:!0)},"matcher");return h&&(S.state=f),S},"picomatch");n.test=(o,l,h,{glob:p,posix:d}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};let g=h||{},m=g.format||(d?a.toPosixSlashes:null),f=o===p,y=f&&m?m(o):o;return f===!1&&(y=m?m(o):o,f=y===p),(f===!1||g.capture===!0)&&(g.matchBase===!0||g.basename===!0?f=n.matchBase(o,l,h,d):f=l.exec(y)),{isMatch:!!f,match:f,output:y}},n.matchBase=(o,l,h,p=a.isWindows(h))=>(l instanceof RegExp?l:n.makeRe(l,h)).test(s.basename(o)),n.isMatch=(o,l,h)=>n(l,h)(o),n.parse=(o,l)=>Array.isArray(o)?o.map(h=>n.parse(h,l)):i(o,{...l,fastpaths:!1}),n.scan=(o,l)=>u(o,l),n.compileRe=(o,l,h=!1,p=!1)=>{if(h===!0)return o.output;let d=l||{},g=d.contains?"":"^",m=d.contains?"":"$",f=`${g}(?:${o.output})${m}`;o&&o.negated===!0&&(f=`^(?!${f}).*$`);let y=n.toRegex(f,l);return p===!0&&(y.state=o),y},n.makeRe=(o,l={},h=!1,p=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let d={negated:!1,fastpaths:!0};return l.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(d.output=i.fastpaths(o,l)),d.output||(d=i(o,l)),n.compileRe(d,l,h,p)},n.toRegex=(o,l)=>{try{let h=l||{};return new RegExp(o,h.flags||(h.nocase?"i":""))}catch(h){if(l&&l.debug===!0)throw h;return/$^/}},n.constants=c,t.exports=n}),z_=Se((e,t)=>{"use strict";t.exports=W_()}),q_=Se((e,t)=>{"use strict";var s=require("util"),u=H_(),i=z_(),a=ri(),c=oe(o=>o===""||o==="./","isEmptyString"),r=oe(o=>{let l=o.indexOf("{");return l>-1&&o.indexOf("}",l)>-1},"hasBraces"),n=oe((o,l,h)=>{l=[].concat(l),o=[].concat(o);let p=new Set,d=new Set,g=new Set,m=0,f=oe(S=>{g.add(S.output),h&&h.onResult&&h.onResult(S)},"onResult");for(let S=0;S<l.length;S++){let E=i(String(l[S]),{...h,onResult:f},!0),b=E.state.negated||E.state.negatedExtglob;b&&m++;for(let _ of o){let O=E(_,!0);(b?!O.isMatch:O.isMatch)&&(b?p.add(O.output):(p.delete(O.output),d.add(O.output)))}}let y=(m===l.length?[...g]:[...d]).filter(S=>!p.has(S));if(h&&y.length===0){if(h.failglob===!0)throw new Error(`No matches found for "${l.join(", ")}"`);if(h.nonull===!0||h.nullglob===!0)return h.unescape?l.map(S=>S.replace(/\\/g,"")):l}return y},"micromatch");n.match=n,n.matcher=(o,l)=>i(o,l),n.isMatch=(o,l,h)=>i(l,h)(o),n.any=n.isMatch,n.not=(o,l,h={})=>{l=[].concat(l).map(String);let p=new Set,d=[],g=oe(f=>{h.onResult&&h.onResult(f),d.push(f.output)},"onResult"),m=new Set(n(o,l,{...h,onResult:g}));for(let f of d)m.has(f)||p.add(f);return[...p]},n.contains=(o,l,h)=>{if(typeof o!="string")throw new TypeError(`Expected a string: "${s.inspect(o)}"`);if(Array.isArray(l))return l.some(p=>n.contains(o,p,h));if(typeof l=="string"){if(c(o)||c(l))return!1;if(o.includes(l)||o.startsWith("./")&&o.slice(2).includes(l))return!0}return n.isMatch(o,l,{...h,contains:!0})},n.matchKeys=(o,l,h)=>{if(!a.isObject(o))throw new TypeError("Expected the first argument to be an object");let p=n(Object.keys(o),l,h),d={};for(let g of p)d[g]=o[g];return d},n.some=(o,l,h)=>{let p=[].concat(o);for(let d of[].concat(l)){let g=i(String(d),h);if(p.some(m=>g(m)))return!0}return!1},n.every=(o,l,h)=>{let p=[].concat(o);for(let d of[].concat(l)){let g=i(String(d),h);if(!p.every(m=>g(m)))return!1}return!0},n.all=(o,l,h)=>{if(typeof o!="string")throw new TypeError(`Expected a string: "${s.inspect(o)}"`);return[].concat(l).every(p=>i(p,h)(o))},n.capture=(o,l,h)=>{let p=a.isWindows(h),d=i.makeRe(String(o),{...h,capture:!0}).exec(p?a.toPosixSlashes(l):l);if(d)return d.slice(1).map(g=>g===void 0?"":g)},n.makeRe=(...o)=>i.makeRe(...o),n.scan=(...o)=>i.scan(...o),n.parse=(o,l)=>{let h=[];for(let p of[].concat(o||[]))for(let d of u(String(p),l))h.push(i.parse(d,l));return h},n.braces=(o,l)=>{if(typeof o!="string")throw new TypeError("Expected a string");return l&&l.nobrace===!0||!r(o)?[o]:u(o,l)},n.braceExpand=(o,l)=>{if(typeof o!="string")throw new TypeError("Expected a string");return n.braces(o,{...l,expand:!0})},n.hasBraces=r,t.exports=n}),K_=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAbsolute=e.partitionAbsoluteAndRelative=e.removeDuplicateSlashes=e.matchAny=e.convertPatternsToRe=e.makeRe=e.getPatternParts=e.expandBraceExpansion=e.expandPatternsWithBraceExpansion=e.isAffectDepthOfReadingPattern=e.endsWithSlashGlobStar=e.hasGlobStar=e.getBaseDirectory=e.isPatternRelatedToParentDirectory=e.getPatternsOutsideCurrentDirectory=e.getPatternsInsideCurrentDirectory=e.getPositivePatterns=e.getNegativePatterns=e.isPositivePattern=e.isNegativePattern=e.convertToNegativePattern=e.convertToPositivePattern=e.isDynamicPattern=e.isStaticPattern=void 0;var t=require("path"),s=D_(),u=q_(),i="**",a="\\",c=/[*?]|^!/,r=/\[[^[]*]/,n=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,o=/[!*+?@]\([^(]*\)/,l=/,|\.\./,h=/(?!^)\/{2,}/g;function p(D,T={}){return!d(D,T)}oe(p,"isStaticPattern"),e.isStaticPattern=p;function d(D,T={}){return D===""?!1:!!(T.caseSensitiveMatch===!1||D.includes(a)||c.test(D)||r.test(D)||n.test(D)||T.extglob!==!1&&o.test(D)||T.braceExpansion!==!1&&g(D))}oe(d,"isDynamicPattern"),e.isDynamicPattern=d;function g(D){let T=D.indexOf("{");if(T===-1)return!1;let C=D.indexOf("}",T+1);if(C===-1)return!1;let Z=D.slice(T,C);return l.test(Z)}oe(g,"hasBraceExpansion");function m(D){return y(D)?D.slice(1):D}oe(m,"convertToPositivePattern"),e.convertToPositivePattern=m;function f(D){return"!"+D}oe(f,"convertToNegativePattern"),e.convertToNegativePattern=f;function y(D){return D.startsWith("!")&&D[1]!=="("}oe(y,"isNegativePattern"),e.isNegativePattern=y;function S(D){return!y(D)}oe(S,"isPositivePattern"),e.isPositivePattern=S;function E(D){return D.filter(y)}oe(E,"getNegativePatterns"),e.getNegativePatterns=E;function b(D){return D.filter(S)}oe(b,"getPositivePatterns"),e.getPositivePatterns=b;function _(D){return D.filter(T=>!w(T))}oe(_,"getPatternsInsideCurrentDirectory"),e.getPatternsInsideCurrentDirectory=_;function O(D){return D.filter(w)}oe(O,"getPatternsOutsideCurrentDirectory"),e.getPatternsOutsideCurrentDirectory=O;function w(D){return D.startsWith("..")||D.startsWith("./..")}oe(w,"isPatternRelatedToParentDirectory"),e.isPatternRelatedToParentDirectory=w;function A(D){return s(D,{flipBackslashes:!1})}oe(A,"getBaseDirectory"),e.getBaseDirectory=A;function I(D){return D.includes(i)}oe(I,"hasGlobStar"),e.hasGlobStar=I;function P(D){return D.endsWith("/"+i)}oe(P,"endsWithSlashGlobStar"),e.endsWithSlashGlobStar=P;function L(D){let T=t.basename(D);return P(D)||p(T)}oe(L,"isAffectDepthOfReadingPattern"),e.isAffectDepthOfReadingPattern=L;function $(D){return D.reduce((T,C)=>T.concat(x(C)),[])}oe($,"expandPatternsWithBraceExpansion"),e.expandPatternsWithBraceExpansion=$;function x(D){let T=u.braces(D,{expand:!0,nodupes:!0,keepEscaping:!0});return T.sort((C,Z)=>C.length-Z.length),T.filter(C=>C!=="")}oe(x,"expandBraceExpansion"),e.expandBraceExpansion=x;function M(D,T){let{parts:C}=u.scan(D,Object.assign(Object.assign({},T),{parts:!0}));return C.length===0&&(C=[D]),C[0].startsWith("/")&&(C[0]=C[0].slice(1),C.unshift("")),C}oe(M,"getPatternParts"),e.getPatternParts=M;function U(D,T){return u.makeRe(D,T)}oe(U,"makeRe"),e.makeRe=U;function V(D,T){return D.map(C=>U(C,T))}oe(V,"convertPatternsToRe"),e.convertPatternsToRe=V;function B(D,T){return T.some(C=>C.test(D))}oe(B,"matchAny"),e.matchAny=B;function G(D){return D.replace(h,"/")}oe(G,"removeDuplicateSlashes"),e.removeDuplicateSlashes=G;function W(D){let T=[],C=[];for(let Z of D)N(Z)?T.push(Z):C.push(Z);return[T,C]}oe(W,"partitionAbsoluteAndRelative"),e.partitionAbsoluteAndRelative=W;function N(D){return t.isAbsolute(D)}oe(N,"isAbsolute"),e.isAbsolute=N}),J_=Se((e,t)=>{"use strict";var s=require("stream"),u=s.PassThrough,i=Array.prototype.slice;t.exports=a;function a(){let r=[],n=i.call(arguments),o=!1,l=n[n.length-1];l&&!Array.isArray(l)&&l.pipe==null?n.pop():l={};let h=l.end!==!1,p=l.pipeError===!0;l.objectMode==null&&(l.objectMode=!0),l.highWaterMark==null&&(l.highWaterMark=64*1024);let d=u(l);function g(){for(let y=0,S=arguments.length;y<S;y++)r.push(c(arguments[y],l));return m(),this}oe(g,"addStream");function m(){if(o)return;o=!0;let y=r.shift();if(!y){process.nextTick(f);return}Array.isArray(y)||(y=[y]);let S=y.length+1;function E(){--S>0||(o=!1,m())}oe(E,"next");function b(_){function O(){_.removeListener("merge2UnpipeEnd",O),_.removeListener("end",O),p&&_.removeListener("error",w),E()}oe(O,"onend");function w(A){d.emit("error",A)}if(oe(w,"onerror"),_._readableState.endEmitted)return E();_.on("merge2UnpipeEnd",O),_.on("end",O),p&&_.on("error",w),_.pipe(d,{end:!1}),_.resume()}oe(b,"pipe");for(let _=0;_<y.length;_++)b(y[_]);E()}oe(m,"mergeStream");function f(){o=!1,d.emit("queueDrain"),h&&d.end()}return oe(f,"endStream"),d.setMaxListeners(0),d.add=g,d.on("unpipe",function(y){y.emit("merge2UnpipeEnd")}),n.length&&g.apply(null,n),d}oe(a,"merge2");function c(r,n){if(Array.isArray(r))for(let o=0,l=r.length;o<l;o++)r[o]=c(r[o],n);else{if(!r._readableState&&r.pipe&&(r=r.pipe(u(n))),!r._readableState||!r.pause||!r.pipe)throw new Error("Only readable stream can be merged.");r.pause()}return r}oe(c,"pauseStreams")}),Z_=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;var t=J_();function s(i){let a=t(i);return i.forEach(c=>{c.once("error",r=>a.emit("error",r))}),a.once("close",()=>u(i)),a.once("end",()=>u(i)),a}oe(s,"merge"),e.merge=s;function u(i){i.forEach(a=>a.emit("close"))}oe(u,"propagateCloseEventToSources")}),X_=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEmpty=e.isString=void 0;function t(u){return typeof u=="string"}oe(t,"isString"),e.isString=t;function s(u){return u===""}oe(s,"isEmpty"),e.isEmpty=s}),kt=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.string=e.stream=e.pattern=e.path=e.fs=e.errno=e.array=void 0;var t=T_();e.array=t;var s=P_();e.errno=s;var u=x_();e.fs=u;var i=N_();e.path=i;var a=K_();e.pattern=a;var c=Z_();e.stream=c;var r=X_();e.string=r}),Y_=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertPatternGroupToTask=e.convertPatternGroupsToTasks=e.groupPatternsByBaseDirectory=e.getNegativePatternsAsPositive=e.getPositivePatterns=e.convertPatternsToTasks=e.generate=void 0;var t=kt();function s(l,h){let p=u(l,h),d=u(h.ignore,h),g=a(p),m=c(p,d),f=g.filter(b=>t.pattern.isStaticPattern(b,h)),y=g.filter(b=>t.pattern.isDynamicPattern(b,h)),S=i(f,m,!1),E=i(y,m,!0);return S.concat(E)}oe(s,"generate"),e.generate=s;function u(l,h){let p=l;return h.braceExpansion&&(p=t.pattern.expandPatternsWithBraceExpansion(p)),h.baseNameMatch&&(p=p.map(d=>d.includes("/")?d:`**/${d}`)),p.map(d=>t.pattern.removeDuplicateSlashes(d))}oe(u,"processPatterns");function i(l,h,p){let d=[],g=t.pattern.getPatternsOutsideCurrentDirectory(l),m=t.pattern.getPatternsInsideCurrentDirectory(l),f=r(g),y=r(m);return d.push(...n(f,h,p)),"."in y?d.push(o(".",m,h,p)):d.push(...n(y,h,p)),d}oe(i,"convertPatternsToTasks"),e.convertPatternsToTasks=i;function a(l){return t.pattern.getPositivePatterns(l)}oe(a,"getPositivePatterns"),e.getPositivePatterns=a;function c(l,h){return t.pattern.getNegativePatterns(l).concat(h).map(t.pattern.convertToPositivePattern)}oe(c,"getNegativePatternsAsPositive"),e.getNegativePatternsAsPositive=c;function r(l){let h={};return l.reduce((p,d)=>{let g=t.pattern.getBaseDirectory(d);return g in p?p[g].push(d):p[g]=[d],p},h)}oe(r,"groupPatternsByBaseDirectory"),e.groupPatternsByBaseDirectory=r;function n(l,h,p){return Object.keys(l).map(d=>o(d,l[d],h,p))}oe(n,"convertPatternGroupsToTasks"),e.convertPatternGroupsToTasks=n;function o(l,h,p,d){return{dynamic:d,positive:h,negative:p,base:l,patterns:[].concat(h,p.map(t.pattern.convertToNegativePattern))}}oe(o,"convertPatternGroupToTask"),e.convertPatternGroupToTask=o}),Q_=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.read=void 0;function t(i,a,c){a.fs.lstat(i,(r,n)=>{if(r!==null){s(c,r);return}if(!n.isSymbolicLink()||!a.followSymbolicLink){u(c,n);return}a.fs.stat(i,(o,l)=>{if(o!==null){if(a.throwErrorOnBrokenSymbolicLink){s(c,o);return}u(c,n);return}a.markSymbolicLink&&(l.isSymbolicLink=()=>!0),u(c,l)})})}oe(t,"read"),e.read=t;function s(i,a){i(a)}oe(s,"callFailureCallback");function u(i,a){i(null,a)}oe(u,"callSuccessCallback")}),ew=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.read=void 0;function t(s,u){let i=u.fs.lstatSync(s);if(!i.isSymbolicLink()||!u.followSymbolicLink)return i;try{let a=u.fs.statSync(s);return u.markSymbolicLink&&(a.isSymbolicLink=()=>!0),a}catch(a){if(!u.throwErrorOnBrokenSymbolicLink)return i;throw a}}oe(t,"read"),e.read=t}),tw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;var t=require("fs");e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync};function s(u){return u===void 0?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),u)}oe(s,"createFileSystemAdapter"),e.createFileSystemAdapter=s}),rw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=tw(),s=class{static{oe(this,"Settings")}constructor(u={}){this._options=u,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=t.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(u,i){return u??i}};e.default=s}),or=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.statSync=e.stat=e.Settings=void 0;var t=Q_(),s=ew(),u=rw();e.Settings=u.default;function i(r,n,o){if(typeof n=="function"){t.read(r,c(),n);return}t.read(r,c(n),o)}oe(i,"stat"),e.stat=i;function a(r,n){let o=c(n);return s.read(r,o)}oe(a,"statSync"),e.statSync=a;function c(r={}){return r instanceof u.default?r:new u.default(r)}oe(c,"getSettings")}),sw=Se((e,t)=>{var s;t.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(global):u=>(s||(s=Promise.resolve())).then(u).catch(i=>setTimeout(()=>{throw i},0))}),iw=Se((e,t)=>{t.exports=u;var s=sw();function u(i,a){let c,r,n,o=!0;Array.isArray(i)?(c=[],r=i.length):(n=Object.keys(i),c={},r=n.length);function l(p){function d(){a&&a(p,c),a=null}oe(d,"end"),o?s(d):d()}oe(l,"done");function h(p,d,g){c[p]=g,(--r===0||d)&&l(d)}oe(h,"each"),r?n?n.forEach(function(p){i[p](function(d,g){h(p,d,g)})}):i.forEach(function(p,d){p(function(g,m){h(d,g,m)})}):l(null),o=!1}oe(u,"runParallel")}),sh=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var t=process.versions.node.split(".");if(t[0]===void 0||t[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var s=Number.parseInt(t[0],10),u=Number.parseInt(t[1],10),i=10,a=10,c=s>i,r=s===i&&u>=a;e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=c||r}),nw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDirentFromStats=void 0;var t=class{static{oe(this,"DirentFromStats")}constructor(u,i){this.name=u,this.isBlockDevice=i.isBlockDevice.bind(i),this.isCharacterDevice=i.isCharacterDevice.bind(i),this.isDirectory=i.isDirectory.bind(i),this.isFIFO=i.isFIFO.bind(i),this.isFile=i.isFile.bind(i),this.isSocket=i.isSocket.bind(i),this.isSymbolicLink=i.isSymbolicLink.bind(i)}};function s(u,i){return new t(u,i)}oe(s,"createDirentFromStats"),e.createDirentFromStats=s}),ih=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fs=void 0;var t=nw();e.fs=t}),nh=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.joinPathSegments=void 0;function t(s,u,i){return s.endsWith(i)?s+u:s+i+u}oe(t,"joinPathSegments"),e.joinPathSegments=t}),ow=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readdir=e.readdirWithFileTypes=e.read=void 0;var t=or(),s=iw(),u=sh(),i=ih(),a=nh();function c(p,d,g){if(!d.stats&&u.IS_SUPPORT_READDIR_WITH_FILE_TYPES){r(p,d,g);return}o(p,d,g)}oe(c,"read"),e.read=c;function r(p,d,g){d.fs.readdir(p,{withFileTypes:!0},(m,f)=>{if(m!==null){l(g,m);return}let y=f.map(E=>({dirent:E,name:E.name,path:a.joinPathSegments(p,E.name,d.pathSegmentSeparator)}));if(!d.followSymbolicLinks){h(g,y);return}let S=y.map(E=>n(E,d));s(S,(E,b)=>{if(E!==null){l(g,E);return}h(g,b)})})}oe(r,"readdirWithFileTypes"),e.readdirWithFileTypes=r;function n(p,d){return g=>{if(!p.dirent.isSymbolicLink()){g(null,p);return}d.fs.stat(p.path,(m,f)=>{if(m!==null){if(d.throwErrorOnBrokenSymbolicLink){g(m);return}g(null,p);return}p.dirent=i.fs.createDirentFromStats(p.name,f),g(null,p)})}}oe(n,"makeRplTaskEntry");function o(p,d,g){d.fs.readdir(p,(m,f)=>{if(m!==null){l(g,m);return}let y=f.map(S=>{let E=a.joinPathSegments(p,S,d.pathSegmentSeparator);return b=>{t.stat(E,d.fsStatSettings,(_,O)=>{if(_!==null){b(_);return}let w={name:S,path:E,dirent:i.fs.createDirentFromStats(S,O)};d.stats&&(w.stats=O),b(null,w)})}});s(y,(S,E)=>{if(S!==null){l(g,S);return}h(g,E)})})}oe(o,"readdir"),e.readdir=o;function l(p,d){p(d)}oe(l,"callFailureCallback");function h(p,d){p(null,d)}oe(h,"callSuccessCallback")}),aw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readdir=e.readdirWithFileTypes=e.read=void 0;var t=or(),s=sh(),u=ih(),i=nh();function a(n,o){return!o.stats&&s.IS_SUPPORT_READDIR_WITH_FILE_TYPES?c(n,o):r(n,o)}oe(a,"read"),e.read=a;function c(n,o){return o.fs.readdirSync(n,{withFileTypes:!0}).map(l=>{let h={dirent:l,name:l.name,path:i.joinPathSegments(n,l.name,o.pathSegmentSeparator)};if(h.dirent.isSymbolicLink()&&o.followSymbolicLinks)try{let p=o.fs.statSync(h.path);h.dirent=u.fs.createDirentFromStats(h.name,p)}catch(p){if(o.throwErrorOnBrokenSymbolicLink)throw p}return h})}oe(c,"readdirWithFileTypes"),e.readdirWithFileTypes=c;function r(n,o){return o.fs.readdirSync(n).map(l=>{let h=i.joinPathSegments(n,l,o.pathSegmentSeparator),p=t.statSync(h,o.fsStatSettings),d={name:l,path:h,dirent:u.fs.createDirentFromStats(l,p)};return o.stats&&(d.stats=p),d})}oe(r,"readdir"),e.readdir=r}),lw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;var t=require("fs");e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync};function s(u){return u===void 0?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),u)}oe(s,"createFileSystemAdapter"),e.createFileSystemAdapter=s}),cw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),s=or(),u=lw(),i=class{static{oe(this,"Settings")}constructor(a={}){this._options=a,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=u.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new s.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(a,c){return a??c}};e.default=i}),xo=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Settings=e.scandirSync=e.scandir=void 0;var t=ow(),s=aw(),u=cw();e.Settings=u.default;function i(r,n,o){if(typeof n=="function"){t.read(r,c(),n);return}t.read(r,c(n),o)}oe(i,"scandir"),e.scandir=i;function a(r,n){let o=c(n);return s.read(r,o)}oe(a,"scandirSync"),e.scandirSync=a;function c(r={}){return r instanceof u.default?r:new u.default(r)}oe(c,"getSettings")}),uw=Se((e,t)=>{"use strict";function s(u){var i=new u,a=i;function c(){var n=i;return n.next?i=n.next:(i=new u,a=i),n.next=null,n}oe(c,"get");function r(n){a.next=n,a=n}return oe(r,"release"),{get:c,release:r}}oe(s,"reusify"),t.exports=s}),hw=Se((e,t)=>{"use strict";var s=uw();function u(r,n,o){if(typeof r=="function"&&(o=n,n=r,r=null),!(o>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var l=s(a),h=null,p=null,d=0,g=null,m={push:O,drain:i,saturated:i,pause:y,paused:!1,get concurrency(){return o},set concurrency($){if(!($>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(o=$,!m.paused)for(;h&&d<o;)d++,A()},running:f,resume:b,idle:_,length:S,getQueue:E,unshift:w,empty:i,kill:I,killAndDrain:P,error:L};return m;function f(){return d}function y(){m.paused=!0}function S(){for(var $=h,x=0;$;)$=$.next,x++;return x}function E(){for(var $=h,x=[];$;)x.push($.value),$=$.next;return x}function b(){if(m.paused){if(m.paused=!1,h===null){d++,A();return}for(;h&&d<o;)d++,A()}}function _(){return d===0&&m.length()===0}function O($,x){var M=l.get();M.context=r,M.release=A,M.value=$,M.callback=x||i,M.errorHandler=g,d>=o||m.paused?p?(p.next=M,p=M):(h=M,p=M,m.saturated()):(d++,n.call(r,M.value,M.worked))}function w($,x){var M=l.get();M.context=r,M.release=A,M.value=$,M.callback=x||i,M.errorHandler=g,d>=o||m.paused?h?(M.next=h,h=M):(h=M,p=M,m.saturated()):(d++,n.call(r,M.value,M.worked))}function A($){$&&l.release($);var x=h;x&&d<=o?m.paused?d--:(p===h&&(p=null),h=x.next,x.next=null,n.call(r,x.value,x.worked),p===null&&m.empty()):--d===0&&m.drain()}function I(){h=null,p=null,m.drain=i}function P(){h=null,p=null,m.drain(),m.drain=i}function L($){g=$}}oe(u,"fastqueue");function i(){}oe(i,"noop");function a(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var r=this;this.worked=oe(function(n,o){var l=r.callback,h=r.errorHandler,p=r.value;r.value=null,r.callback=i,r.errorHandler&&h(n,p),l.call(r.context,n,o),r.release(r)},"worked")}oe(a,"Task");function c(r,n,o){typeof r=="function"&&(o=n,n=r,r=null);function l(y,S){n.call(this,y).then(function(E){S(null,E)},S)}oe(l,"asyncWrapper");var h=u(r,l,o),p=h.push,d=h.unshift;return h.push=g,h.unshift=m,h.drained=f,h;function g(y){var S=new Promise(function(E,b){p(y,function(_,O){if(_){b(_);return}E(O)})});return S.catch(i),S}function m(y){var S=new Promise(function(E,b){d(y,function(_,O){if(_){b(_);return}E(O)})});return S.catch(i),S}function f(){var y=new Promise(function(S){process.nextTick(function(){if(h.idle())S();else{var E=h.drain;h.drain=function(){typeof E=="function"&&E(),S(),h.drain=E}}})});return y}}oe(c,"queueAsPromised"),t.exports=u,t.exports.promise=c}),No=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.joinPathSegments=e.replacePathSegmentSeparator=e.isAppliedFilter=e.isFatalError=void 0;function t(a,c){return a.errorFilter===null?!0:!a.errorFilter(c)}oe(t,"isFatalError"),e.isFatalError=t;function s(a,c){return a===null||a(c)}oe(s,"isAppliedFilter"),e.isAppliedFilter=s;function u(a,c){return a.split(/[/\\]/).join(c)}oe(u,"replacePathSegmentSeparator"),e.replacePathSegmentSeparator=u;function i(a,c,r){return a===""?c:a.endsWith(r)?a+c:a+r+c}oe(i,"joinPathSegments"),e.joinPathSegments=i}),oh=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=No(),s=class{static{oe(this,"Reader")}constructor(u,i){this._root=u,this._settings=i,this._root=t.replacePathSegmentSeparator(u,i.pathSegmentSeparator)}};e.default=s}),ah=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("events"),s=xo(),u=hw(),i=No(),a=oh(),c=class extends a.default{static{oe(this,"AsyncReader")}constructor(r,n){super(r,n),this._settings=n,this._scandir=s.scandir,this._emitter=new t.EventEmitter,this._queue=u(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(r){this._emitter.on("entry",r)}onError(r){this._emitter.once("error",r)}onEnd(r){this._emitter.once("end",r)}_pushToQueue(r,n){let o={directory:r,base:n};this._queue.push(o,l=>{l!==null&&this._handleError(l)})}_worker(r,n){this._scandir(r.directory,this._settings.fsScandirSettings,(o,l)=>{if(o!==null){n(o,void 0);return}for(let h of l)this._handleEntry(h,r.base);n(null,void 0)})}_handleError(r){this._isDestroyed||!i.isFatalError(this._settings,r)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",r))}_handleEntry(r,n){if(this._isDestroyed||this._isFatalError)return;let o=r.path;n!==void 0&&(r.path=i.joinPathSegments(n,r.name,this._settings.pathSegmentSeparator)),i.isAppliedFilter(this._settings.entryFilter,r)&&this._emitEntry(r),r.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,r)&&this._pushToQueue(o,n===void 0?void 0:r.path)}_emitEntry(r){this._emitter.emit("entry",r)}};e.default=c}),pw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=ah(),s=class{static{oe(this,"AsyncProvider")}constructor(a,c){this._root=a,this._settings=c,this._reader=new t.default(this._root,this._settings),this._storage=[]}read(a){this._reader.onError(c=>{u(a,c)}),this._reader.onEntry(c=>{this._storage.push(c)}),this._reader.onEnd(()=>{i(a,this._storage)}),this._reader.read()}};e.default=s;function u(a,c){a(c)}oe(u,"callFailureCallback");function i(a,c){a(null,c)}oe(i,"callSuccessCallback")}),dw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("stream"),s=ah(),u=class{static{oe(this,"StreamProvider")}constructor(i,a){this._root=i,this._settings=a,this._reader=new s.default(this._root,this._settings),this._stream=new t.Readable({objectMode:!0,read:oe(()=>{},"read"),destroy:oe(()=>{this._reader.isDestroyed||this._reader.destroy()},"destroy")})}read(){return this._reader.onError(i=>{this._stream.emit("error",i)}),this._reader.onEntry(i=>{this._stream.push(i)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};e.default=u}),fw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=xo(),s=No(),u=oh(),i=class extends u.default{static{oe(this,"SyncReader")}constructor(){super(...arguments),this._scandir=t.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(a,c){this._queue.add({directory:a,base:c})}_handleQueue(){for(let a of this._queue.values())this._handleDirectory(a.directory,a.base)}_handleDirectory(a,c){try{let r=this._scandir(a,this._settings.fsScandirSettings);for(let n of r)this._handleEntry(n,c)}catch(r){this._handleError(r)}}_handleError(a){if(s.isFatalError(this._settings,a))throw a}_handleEntry(a,c){let r=a.path;c!==void 0&&(a.path=s.joinPathSegments(c,a.name,this._settings.pathSegmentSeparator)),s.isAppliedFilter(this._settings.entryFilter,a)&&this._pushToStorage(a),a.dirent.isDirectory()&&s.isAppliedFilter(this._settings.deepFilter,a)&&this._pushToQueue(r,c===void 0?void 0:a.path)}_pushToStorage(a){this._storage.push(a)}};e.default=i}),gw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=fw(),s=class{static{oe(this,"SyncProvider")}constructor(u,i){this._root=u,this._settings=i,this._reader=new t.default(this._root,this._settings)}read(){return this._reader.read()}};e.default=s}),mw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),s=xo(),u=class{static{oe(this,"Settings")}constructor(i={}){this._options=i,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.fsScandirSettings=new s.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(i,a){return i??a}};e.default=u}),ko=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Settings=e.walkStream=e.walkSync=e.walk=void 0;var t=pw(),s=dw(),u=gw(),i=mw();e.Settings=i.default;function a(o,l,h){if(typeof l=="function"){new t.default(o,n()).read(l);return}new t.default(o,n(l)).read(h)}oe(a,"walk"),e.walk=a;function c(o,l){let h=n(l);return new u.default(o,h).read()}oe(c,"walkSync"),e.walkSync=c;function r(o,l){let h=n(l);return new s.default(o,h).read()}oe(r,"walkStream"),e.walkStream=r;function n(o={}){return o instanceof i.default?o:new i.default(o)}oe(n,"getSettings")}),Lo=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),s=or(),u=kt(),i=class{static{oe(this,"Reader")}constructor(a){this._settings=a,this._fsStatSettings=new s.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(a){return t.resolve(this._settings.cwd,a)}_makeEntry(a,c){let r={name:c,path:c,dirent:u.fs.createDirentFromStats(c,a)};return this._settings.stats&&(r.stats=a),r}_isFatalError(a){return!u.errno.isEnoentCodeError(a)&&!this._settings.suppressErrors}};e.default=i}),lh=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("stream"),s=or(),u=ko(),i=Lo(),a=class extends i.default{static{oe(this,"ReaderStream")}constructor(){super(...arguments),this._walkStream=u.walkStream,this._stat=s.stat}dynamic(c,r){return this._walkStream(c,r)}static(c,r){let n=c.map(this._getFullEntryPath,this),o=new t.PassThrough({objectMode:!0});o._write=(l,h,p)=>this._getEntry(n[l],c[l],r).then(d=>{d!==null&&r.entryFilter(d)&&o.push(d),l===n.length-1&&o.end(),p()}).catch(p);for(let l=0;l<n.length;l++)o.write(l);return o}_getEntry(c,r,n){return this._getStat(c).then(o=>this._makeEntry(o,r)).catch(o=>{if(n.errorFilter(o))return null;throw o})}_getStat(c){return new Promise((r,n)=>{this._stat(c,this._fsStatSettings,(o,l)=>o===null?r(l):n(o))})}};e.default=a}),yw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=ko(),s=Lo(),u=lh(),i=class extends s.default{static{oe(this,"ReaderAsync")}constructor(){super(...arguments),this._walkAsync=t.walk,this._readerStream=new u.default(this._settings)}dynamic(a,c){return new Promise((r,n)=>{this._walkAsync(a,c,(o,l)=>{o===null?r(l):n(o)})})}async static(a,c){let r=[],n=this._readerStream.static(a,c);return new Promise((o,l)=>{n.once("error",l),n.on("data",h=>r.push(h)),n.once("end",()=>o(r))})}};e.default=i}),vw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=kt(),s=class{static{oe(this,"Matcher")}constructor(u,i,a){this._patterns=u,this._settings=i,this._micromatchOptions=a,this._storage=[],this._fillStorage()}_fillStorage(){for(let u of this._patterns){let i=this._getPatternSegments(u),a=this._splitSegmentsIntoSections(i);this._storage.push({complete:a.length<=1,pattern:u,segments:i,sections:a})}}_getPatternSegments(u){return t.pattern.getPatternParts(u,this._micromatchOptions).map(i=>t.pattern.isDynamicPattern(i,this._settings)?{dynamic:!0,pattern:i,patternRe:t.pattern.makeRe(i,this._micromatchOptions)}:{dynamic:!1,pattern:i})}_splitSegmentsIntoSections(u){return t.array.splitWhen(u,i=>i.dynamic&&t.pattern.hasGlobStar(i.pattern))}};e.default=s}),Sw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=vw(),s=class extends t.default{static{oe(this,"PartialMatcher")}match(u){let i=u.split("/"),a=i.length,c=this._storage.filter(r=>!r.complete||r.segments.length>a);for(let r of c){let n=r.sections[0];if(!r.complete&&a>n.length||i.every((o,l)=>{let h=r.segments[l];return!!(h.dynamic&&h.patternRe.test(o)||!h.dynamic&&h.pattern===o)}))return!0}return!1}};e.default=s}),Ew=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=kt(),s=Sw(),u=class{static{oe(this,"DeepFilter")}constructor(i,a){this._settings=i,this._micromatchOptions=a}getFilter(i,a,c){let r=this._getMatcher(a),n=this._getNegativePatternsRe(c);return o=>this._filter(i,o,r,n)}_getMatcher(i){return new s.default(i,this._settings,this._micromatchOptions)}_getNegativePatternsRe(i){let a=i.filter(t.pattern.isAffectDepthOfReadingPattern);return t.pattern.convertPatternsToRe(a,this._micromatchOptions)}_filter(i,a,c,r){if(this._isSkippedByDeep(i,a.path)||this._isSkippedSymbolicLink(a))return!1;let n=t.path.removeLeadingDotSegment(a.path);return this._isSkippedByPositivePatterns(n,c)?!1:this._isSkippedByNegativePatterns(n,r)}_isSkippedByDeep(i,a){return this._settings.deep===1/0?!1:this._getEntryLevel(i,a)>=this._settings.deep}_getEntryLevel(i,a){let c=a.split("/").length;if(i==="")return c;let r=i.split("/").length;return c-r}_isSkippedSymbolicLink(i){return!this._settings.followSymbolicLinks&&i.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(i,a){return!this._settings.baseNameMatch&&!a.match(i)}_isSkippedByNegativePatterns(i,a){return!t.pattern.matchAny(i,a)}};e.default=u}),bw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=kt(),s=class{static{oe(this,"EntryFilter")}constructor(u,i){this._settings=u,this._micromatchOptions=i,this.index=new Map}getFilter(u,i){let[a,c]=t.pattern.partitionAbsoluteAndRelative(i),r={positive:{all:t.pattern.convertPatternsToRe(u,this._micromatchOptions)},negative:{absolute:t.pattern.convertPatternsToRe(a,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:t.pattern.convertPatternsToRe(c,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return n=>this._filter(n,r)}_filter(u,i){let a=t.path.removeLeadingDotSegment(u.path);if(this._settings.unique&&this._isDuplicateEntry(a)||this._onlyFileFilter(u)||this._onlyDirectoryFilter(u))return!1;let c=this._isMatchToPatternsSet(a,i,u.dirent.isDirectory());return this._settings.unique&&c&&this._createIndexRecord(a),c}_isDuplicateEntry(u){return this.index.has(u)}_createIndexRecord(u){this.index.set(u,void 0)}_onlyFileFilter(u){return this._settings.onlyFiles&&!u.dirent.isFile()}_onlyDirectoryFilter(u){return this._settings.onlyDirectories&&!u.dirent.isDirectory()}_isMatchToPatternsSet(u,i,a){return!(!this._isMatchToPatterns(u,i.positive.all,a)||this._isMatchToPatterns(u,i.negative.relative,a)||this._isMatchToAbsoluteNegative(u,i.negative.absolute,a))}_isMatchToAbsoluteNegative(u,i,a){if(i.length===0)return!1;let c=t.path.makeAbsolute(this._settings.cwd,u);return this._isMatchToPatterns(c,i,a)}_isMatchToPatterns(u,i,a){if(i.length===0)return!1;let c=t.pattern.matchAny(u,i);return!c&&a?t.pattern.matchAny(u+"/",i):c}};e.default=s}),_w=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=kt(),s=class{static{oe(this,"ErrorFilter")}constructor(u){this._settings=u}getFilter(){return u=>this._isNonFatalError(u)}_isNonFatalError(u){return t.errno.isEnoentCodeError(u)||this._settings.suppressErrors}};e.default=s}),ww=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=kt(),s=class{static{oe(this,"EntryTransformer")}constructor(u){this._settings=u}getTransformer(){return u=>this._transform(u)}_transform(u){let i=u.path;return this._settings.absolute&&(i=t.path.makeAbsolute(this._settings.cwd,i),i=t.path.unixify(i)),this._settings.markDirectories&&u.dirent.isDirectory()&&(i+="/"),this._settings.objectMode?Object.assign(Object.assign({},u),{path:i}):i}};e.default=s}),Do=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),s=Ew(),u=bw(),i=_w(),a=ww(),c=class{static{oe(this,"Provider")}constructor(r){this._settings=r,this.errorFilter=new i.default(this._settings),this.entryFilter=new u.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new s.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new a.default(this._settings)}_getRootDirectory(r){return t.resolve(this._settings.cwd,r.base)}_getReaderOptions(r){let n=r.base==="."?"":r.base;return{basePath:n,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(n,r.positive,r.negative),entryFilter:this.entryFilter.getFilter(r.positive,r.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};e.default=c}),Ow=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=yw(),s=Do(),u=class extends s.default{static{oe(this,"ProviderAsync")}constructor(){super(...arguments),this._reader=new t.default(this._settings)}async read(i){let a=this._getRootDirectory(i),c=this._getReaderOptions(i);return(await this.api(a,i,c)).map(r=>c.transform(r))}api(i,a,c){return a.dynamic?this._reader.dynamic(i,c):this._reader.static(a.patterns,c)}};e.default=u}),Rw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("stream"),s=lh(),u=Do(),i=class extends u.default{static{oe(this,"ProviderStream")}constructor(){super(...arguments),this._reader=new s.default(this._settings)}read(a){let c=this._getRootDirectory(a),r=this._getReaderOptions(a),n=this.api(c,a,r),o=new t.Readable({objectMode:!0,read:oe(()=>{},"read")});return n.once("error",l=>o.emit("error",l)).on("data",l=>o.emit("data",r.transform(l))).once("end",()=>o.emit("end")),o.once("close",()=>n.destroy()),o}api(a,c,r){return c.dynamic?this._reader.dynamic(a,r):this._reader.static(c.patterns,r)}};e.default=i}),Aw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=or(),s=ko(),u=Lo(),i=class extends u.default{static{oe(this,"ReaderSync")}constructor(){super(...arguments),this._walkSync=s.walkSync,this._statSync=t.statSync}dynamic(a,c){return this._walkSync(a,c)}static(a,c){let r=[];for(let n of a){let o=this._getFullEntryPath(n),l=this._getEntry(o,n,c);l===null||!c.entryFilter(l)||r.push(l)}return r}_getEntry(a,c,r){try{let n=this._getStat(a);return this._makeEntry(n,c)}catch(n){if(r.errorFilter(n))return null;throw n}}_getStat(a){return this._statSync(a,this._fsStatSettings)}};e.default=i}),Cw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Aw(),s=Do(),u=class extends s.default{static{oe(this,"ProviderSync")}constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(i){let a=this._getRootDirectory(i),c=this._getReaderOptions(i);return this.api(a,i,c).map(c.transform)}api(i,a,c){return a.dynamic?this._reader.dynamic(i,c):this._reader.static(a.patterns,c)}};e.default=u}),Iw=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var t=require("fs"),s=require("os"),u=Math.max(s.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:t.lstat,lstatSync:t.lstatSync,stat:t.stat,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync};var i=class{static{oe(this,"Settings")}constructor(a={}){this._options=a,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,u),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(a,c){return a===void 0?c:a}_getFileSystemMethods(a={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),a)}};e.default=i}),ch=Y_(),Tw=Ow(),Pw=Rw(),xw=Cw(),Io=Iw(),ot=kt();async function Qs(e,t){nt(e);let s=ei(e,Tw.default,t),u=await Promise.all(s);return ot.array.flatten(u)}oe(Qs,"FastGlob");(function(e){e.glob=e,e.globSync=t,e.globStream=s,e.async=e;function t(o,l){nt(o);let h=ei(o,xw.default,l);return ot.array.flatten(h)}oe(t,"sync"),e.sync=t;function s(o,l){nt(o);let h=ei(o,Pw.default,l);return ot.stream.merge(h)}oe(s,"stream"),e.stream=s;function u(o,l){nt(o);let h=[].concat(o),p=new Io.default(l);return ch.generate(h,p)}oe(u,"generateTasks"),e.generateTasks=u;function i(o,l){nt(o);let h=new Io.default(l);return ot.pattern.isDynamicPattern(o,h)}oe(i,"isDynamicPattern"),e.isDynamicPattern=i;function a(o){return nt(o),ot.path.escape(o)}oe(a,"escapePath"),e.escapePath=a;function c(o){return nt(o),ot.path.convertPathToPattern(o)}oe(c,"convertPathToPattern"),e.convertPathToPattern=c;let r;(function(o){function l(p){return nt(p),ot.path.escapePosixPath(p)}oe(l,"escapePath"),o.escapePath=l;function h(p){return nt(p),ot.path.convertPosixPathToPattern(p)}oe(h,"convertPathToPattern"),o.convertPathToPattern=h})(r=e.posix||(e.posix={}));let n;(function(o){function l(p){return nt(p),ot.path.escapeWindowsPath(p)}oe(l,"escapePath"),o.escapePath=l;function h(p){return nt(p),ot.path.convertWindowsPathToPattern(p)}oe(h,"convertPathToPattern"),o.convertPathToPattern=h})(n=e.win32||(e.win32={}))})(Qs||(Qs={}));function ei(e,t,s){let u=[].concat(e),i=new Io.default(s),a=ch.generate(u,i),c=new t(i);return a.map(c.read,c)}oe(ei,"getWorks");function nt(e){if(![].concat(e).every(t=>ot.string.isString(t)&&!ot.string.isEmpty(t)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}oe(nt,"assertPatternsInput");uh.exports=Qs;});var Wt=ge((NH,dh)=>{var $o=Object.defineProperty,Nw=Object.getOwnPropertyDescriptor,kw=Object.getOwnPropertyNames,Lw=Object.prototype.hasOwnProperty,Dw=(e,t)=>{for(var s in t)$o(e,s,{get:t[s],enumerable:!0})},$w=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of kw(t))!Lw.call(e,i)&&i!==s&&$o(e,i,{get:()=>t[i],enumerable:!(u=Nw(t,i))||u.enumerable});return e},Mw=e=>$w($o({},"__esModule",{value:!0}),e),ph={};Dw(ph,{CACHE_DIR:()=>eO,CACHE_TTL_DIR:()=>tO,CHANGELOG_MD:()=>Vw,DOT_GITHUB:()=>Yw,DOT_GIT_DIR:()=>Xw,DOT_PACKAGE_LOCK_JSON:()=>Jw,DOT_SOCKET_DIR:()=>Qw,ESLINT_CONFIG_JS:()=>qw,EXTENSIONS:()=>OO,EXTENSIONS_JSON:()=>zw,EXT_CJS:()=>iO,EXT_CMD:()=>nO,EXT_CTS:()=>oO,EXT_DTS:()=>aO,EXT_JS:()=>lO,EXT_JSON:()=>cO,EXT_LOCK:()=>uO,EXT_LOCKB:()=>hO,EXT_MD:()=>pO,EXT_MJS:()=>dO,EXT_MTS:()=>fO,EXT_PS1:()=>gO,EXT_YAML:()=>mO,EXT_YML:()=>yO,GITIGNORE:()=>Kw,LICENSE:()=>Uw,LICENSE_GLOB:()=>vO,LICENSE_GLOB_RECURSIVE:()=>SO,LICENSE_MD:()=>Fw,LICENSE_ORIGINAL:()=>Hw,LICENSE_ORIGINAL_GLOB:()=>EO,LICENSE_ORIGINAL_GLOB_RECURSIVE:()=>bO,MANIFEST_JSON:()=>Ww,NODE_MODULES:()=>Zw,NODE_MODULES_GLOB_RECURSIVE:()=>rO,PACKAGE_JSON:()=>jw,README_GLOB:()=>_O,README_GLOB_RECURSIVE:()=>wO,README_MD:()=>Gw,ROLLUP_EXTERNAL_SUFFIX:()=>RO,SLASH_NODE_MODULES_SLASH:()=>sO,TSCONFIG_JSON:()=>Bw});dh.exports=Mw(ph);var jw="package.json",Bw="tsconfig.json",Uw="LICENSE",Fw="LICENSE.md",Hw="LICENSE.original",Gw="README.md",Vw="CHANGELOG.md",Ww="manifest.json",zw="extensions.json",qw="eslint.config.js",Kw=".gitignore",Jw=".package-lock.json",Zw="node_modules",Xw=".git",Yw=".github",Qw=".socket",eO="cache",tO="ttl",rO="**/node_modules",sO="/node_modules/",iO=".cjs",nO=".cmd",oO=".cts",aO=".d.ts",lO=".js",cO=".json",uO=".lock",hO=".lockb",pO=".md",dO=".mjs",fO=".mts",gO=".ps1",mO=".yaml",yO=".yml",vO="LICEN[CS]E{[.-]*,}",SO="**/LICEN[CS]E{[.-]*,}",EO="*.original{.*,}",bO="**/*.original{.*,}",_O="README{.*,}",wO="**/README{.*,}",OO="extensions",RO="__rollup_external"});var vh=ge((kH,yh)=>{var Bo=Object.defineProperty,AO=Object.getOwnPropertyDescriptor,CO=Object.getOwnPropertyNames,IO=Object.prototype.hasOwnProperty,TO=(e,t)=>{for(var s in t)Bo(e,s,{get:t[s],enumerable:!0})},PO=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of CO(t))!IO.call(e,i)&&i!==s&&Bo(e,i,{get:()=>t[i],enumerable:!(u=AO(t,i))||u.enumerable});return e},xO=e=>PO(Bo({},"__esModule",{value:!0}),e),gh={};TO(gh,{defaultIgnore:()=>mh,getGlobMatcher:()=>$O,globStreamLicenses:()=>DO});yh.exports=xO(gh);var NO=Vt(),mh=(0,NO.objectFreeze)(["**/.git","**/.npmrc","**/node_modules","**/.DS_Store","**/.gitignore","**/.hg","**/.lock-wscript","**/.npmignore","**/.svn","**/.wafpickle-*","**/.*.swp","**/._*/**","**/archived-packages/**","**/build/config.gypi","**/CVS","**/npm-debug.log","**/*.orig","**/.env","**/.eslintcache","**/.nvm","**/.tap","**/.vscode","**/*.tsbuildinfo","**/Thumbs.db","**/bower_components"]),Mo;function kO(){return Mo===void 0&&(Mo=th()),Mo}var jo;function LO(){if(jo===void 0){let e=hh();jo=e.default||e}return jo}function DO(e,t){let{ignore:s,ignoreOriginals:u,recursive:i,...a}={__proto__:null,...t},c=[...Array.isArray(s)?s:mh,"**/*.{cjs,cts,js,json,mjs,mts,ts}"];return u&&c.push(Wt().LICENSE_ORIGINAL_GLOB_RECURSIVE),LO().globStream([i?Wt().LICENSE_GLOB_RECURSIVE:Wt().LICENSE_GLOB],{__proto__:null,absolute:!0,caseSensitiveMatch:!1,cwd:e,...a,...c?{ignore:c}:{}})}var fh=new Map;function $O(e,t){let s=Array.isArray(e)?e:[e],u=JSON.stringify({patterns:s,options:t}),i=fh.get(u);if(i)return i;let a=s.filter(o=>!o.startsWith("!")),c=s.filter(o=>o.startsWith("!")).map(o=>o.slice(1)),r=kO(),n={dot:!0,nocase:!0,...t,...c.length>0?{ignore:c}:{}};return i=r(a.length>0?a:s,n),fh.set(u,i),i}});var Fo=ge((LH,Eh)=>{var Uo=Object.defineProperty,MO=Object.getOwnPropertyDescriptor,jO=Object.getOwnPropertyNames,BO=Object.prototype.hasOwnProperty,UO=(e,t)=>{for(var s in t)Uo(e,s,{get:t[s],enumerable:!0})},FO=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jO(t))!BO.call(e,i)&&i!==s&&Uo(e,i,{get:()=>t[i],enumerable:!(u=MO(t,i))||u.enumerable});return e},HO=e=>FO(Uo({},"__esModule",{value:!0}),e),Sh={};UO(Sh,{ANSI_BOLD:()=>VO,ANSI_DIM:()=>WO,ANSI_ITALIC:()=>zO,ANSI_RESET:()=>GO,ANSI_STRIKETHROUGH:()=>KO,ANSI_UNDERLINE:()=>qO,ansiRegex:()=>ZO,stripAnsi:()=>XO});Eh.exports=HO(Sh);var GO="\x1B[0m",VO="\x1B[1m",WO="\x1B[2m",zO="\x1B[3m",qO="\x1B[4m",KO="\x1B[9m",JO=/\x1b\[[0-9;]*m/g;function ZO(e){let{onlyFirst:t}=e??{},s="(?:\\u001B\\][\\s\\S]*?(?:\\u0007\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(s,t?void 0:"g")}function XO(e){return e.replace(JO,"")}});var Ah=ge((DH,Rh)=>{var si=Object.defineProperty,YO=Object.getOwnPropertyDescriptor,QO=Object.getOwnPropertyNames,eR=Object.prototype.hasOwnProperty,Lt=(e,t)=>si(e,"name",{value:t,configurable:!0}),tR=(e,t)=>{for(var s in t)si(e,s,{get:t[s],enumerable:!0})},rR=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of QO(t))!eR.call(e,i)&&i!==s&&si(e,i,{get:()=>t[i],enumerable:!(u=YO(t,i))||u.enumerable});return e},sR=e=>rR(si({},"__esModule",{value:!0}),e),bh={};tR(bh,{_isNarrowWidth:()=>iR,eastAsianWidth:()=>Oh,eastAsianWidthType:()=>wh});Rh.exports=sR(bh);function Ho(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}Lt(Ho,"isAmbiguous");function ii(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}Lt(ii,"isFullWidth");function ni(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}Lt(ni,"isWide");function _h(e){return Ho(e)?"ambiguous":ii(e)?"fullwidth":e===8361||e>=65377&&e<=65470||e>=65474&&e<=65479||e>=65482&&e<=65487||e>=65490&&e<=65495||e>=65498&&e<=65500||e>=65512&&e<=65518?"halfwidth":e>=32&&e<=126||e===162||e===163||e===165||e===166||e===172||e===175||e>=10214&&e<=10221||e===10629||e===10630?"narrow":ni(e)?"wide":"neutral"}Lt(_h,"getCategory");function Go(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}Lt(Go,"validate");function wh(e){return Go(e),_h(e)}Lt(wh,"eastAsianWidthType");function Oh(e,{ambiguousAsWide:t=!1}={}){return Go(e),ii(e)||ni(e)||t&&Ho(e)?2:1}Lt(Oh,"eastAsianWidth");var iR=Lt(e=>!(ii(e)||ni(e)),"_isNarrowWidth")});var zt=ge(($H,Ph)=>{var qo=Object.defineProperty,nR=Object.getOwnPropertyDescriptor,oR=Object.getOwnPropertyNames,aR=Object.prototype.hasOwnProperty,lR=(e,t)=>{for(var s in t)qo(e,s,{get:t[s],enumerable:!0})},cR=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of oR(t))!aR.call(e,i)&&i!==s&&qo(e,i,{get:()=>t[i],enumerable:!(u=nR(t,i))||u.enumerable});return e},uR=e=>cR(qo({},"__esModule",{value:!0}),e),Ih={};lR(Ih,{ansiRegex:()=>oi.ansiRegex,applyLinePrefix:()=>hR,camelToKebab:()=>pR,centerText:()=>wR,fromCharCode:()=>Th,indentString:()=>dR,isBlankString:()=>fR,isNonEmptyString:()=>gR,repeatString:()=>_R,search:()=>mR,stringWidth:()=>SR,stripAnsi:()=>oi.stripAnsi,stripBom:()=>yR,toKebabCase:()=>ER,trimNewlines:()=>bR});Ph.exports=uR(Ih);var oi=Fo(),Ch=Ah(),Th=String.fromCharCode;function hR(e,t){let{prefix:s=""}={__proto__:null,...t};return s.length?`${s}${e.includes(`
|
|
5
|
+
`)?e.replace(/\n/g,`
|
|
6
|
+
${s}`):e}`:e}function pR(e){let{length:t}=e;if(!t)return"";let s="",u=0;for(;u<t;){let i=e[u];if(!i)break;let a=i.charCodeAt(0);if(a>=65&&a<=90)for(s.length>0&&(s+="-");u<t;){let c=e[u];if(!c)break;let r=c.charCodeAt(0);if(r>=65&&r<=90)s+=Th(r+32),u+=1;else break}else s+=i,u+=1}return s}function dR(e,t){let{count:s=1}={__proto__:null,...t};return e.replace(/^(?!\s*$)/gm," ".repeat(s))}function fR(e){return typeof e=="string"&&(!e.length||/^\s+$/.test(e))}function gR(e){return typeof e=="string"&&e.length>0}function mR(e,t,s){let{fromIndex:u=0}={__proto__:null,...s},{length:i}=e;if(u>=i)return-1;if(u===0)return e.search(t);let a=u<0?Math.max(i+u,0):u,c=e.slice(a).search(t);return c===-1?-1:c+a}function yR(e){return e.length>0&&e.charCodeAt(0)===65279?e.slice(1):e}var vR=new Intl.Segmenter,Vo,Wo,zo;try{Vo=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark}|\\p{Surrogate})+$","v"),Wo=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),zo=new RegExp("^\\p{RGI_Emoji}$","v")}catch{Vo=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark})+$","u"),Wo=/^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}]+/u,zo=new RegExp("^\\p{Extended_Pictographic}$","u")}function SR(e){if(typeof e!="string"||!e.length)return 0;let t=(0,oi.stripAnsi)(e);if(!t.length)return 0;let s=0,u={ambiguousAsWide:!1};for(let{segment:i}of vR.segment(t)){if(Vo.test(i))continue;if(zo.test(i)){s+=2;continue}let a=i.replace(Wo,"").codePointAt(0);if(a!==void 0&&(s+=(0,Ch.eastAsianWidth)(a,u),i.length>1))for(let c of i.slice(1)){let r=c.charCodeAt(0);if(r>=65280&&r<=65519){let n=c.codePointAt(0);n!==void 0&&(s+=(0,Ch.eastAsianWidth)(n,u))}}}return s}function ER(e){return e.length?e.replace(/([a-z]+[0-9]*)([A-Z])/g,"$1-$2").replace(/_/g,"-").toLowerCase():e}function bR(e){let{length:t}=e;if(t===0)return e;let s=e.charCodeAt(0),u=s!==13&&s!==10;if(t===1)return u?e:"";let i=e.charCodeAt(t-1);if(u&&i!==13&&i!==10)return e;let a=0,c=t;for(;a<c;){let r=e.charCodeAt(a);if(r!==13&&r!==10)break;a+=1}for(;c>a;){let r=e.charCodeAt(c-1);if(r!==13&&r!==10)break;c-=1}return a===0&&c===t?e:e.slice(a,c)}function _R(e,t){return t<=0?"":e.repeat(t)}function wR(e,t){let s=(0,oi.stripAnsi)(e).length;if(s>=t)return e;let u=t-s,i=Math.floor(u/2),a=u-i;return" ".repeat(i)+e+" ".repeat(a)}});var kh=ge((MH,Nh)=>{var Ko=Object.defineProperty,OR=Object.getOwnPropertyDescriptor,RR=Object.getOwnPropertyNames,AR=Object.prototype.hasOwnProperty,CR=(e,t)=>{for(var s in t)Ko(e,s,{get:t[s],enumerable:!0})},IR=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of RR(t))!AR.call(e,i)&&i!==s&&Ko(e,i,{get:()=>t[i],enumerable:!(u=OR(t,i))||u.enumerable});return e},TR=e=>IR(Ko({},"__esModule",{value:!0}),e),xh={};CR(xh,{isJsonPrimitive:()=>kR,jsonParse:()=>LR});Nh.exports=TR(xh);var PR=zt(),xR=JSON.parse;function NR(e){if(!e||typeof e!="object")return!1;let t=e;if(typeof t.length!="number"||typeof t.copy!="function"||typeof t.slice!="function"||typeof t.length=="number"&&t.length>0&&typeof t[0]!="number")return!1;let s=e.constructor;return!!(typeof s?.isBuffer=="function"&&s.isBuffer(e))}function kR(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"}function LR(e,t){let{filepath:s,reviver:u,throws:i}={__proto__:null,...t},a=i===void 0||!!i,c=NR(e)?e.toString("utf8"):e;try{return xR((0,PR.stripBom)(c),u)}catch(r){if(a){let n=r;throw n&&typeof s=="string"&&(n.message=`${s}: ${n.message}`),n}}}});var ar=ge((jH,Bh)=>{var ea=Object.defineProperty,DR=Object.getOwnPropertyDescriptor,$R=Object.getOwnPropertyNames,MR=Object.prototype.hasOwnProperty,jR=(e,t)=>{for(var s in t)ea(e,s,{get:t[s],enumerable:!0})},BR=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $R(t))!MR.call(e,i)&&i!==s&&ea(e,i,{get:()=>t[i],enumerable:!(u=DR(t,i))||u.enumerable});return e},UR=e=>BR(ea({},"__esModule",{value:!0}),e),$h={};jR($h,{isAbsolute:()=>li,isNodeModules:()=>KR,isPath:()=>JR,isRelative:()=>ZR,normalizePath:()=>ta,pathLikeToString:()=>Dt,relativeResolve:()=>eA,splitPath:()=>XR,trimLeadingDotSlash:()=>YR});Bh.exports=UR($h);var ai=Fs(),Lh=zt(),Mh=92,FR=58,jh=47,HR=97,GR=122,Xo=65,Yo=90,Qo=/[/\\]/,VR=/(?:^|[/\\])node_modules(?:[/\\]|$)/;function Kr(e){return e===jh||e===Mh}function WR(e){return e>=Xo&&e<=Yo||e>=HR&&e<=GR}var Jo;function zR(){return Jo===void 0&&(Jo=require("buffer")),Jo}var Zo;function qR(){return Zo===void 0&&(Zo=require("url")),Zo}function KR(e){let t=Dt(e);return VR.test(t)}function li(e){let t=Dt(e),{length:s}=t;if(s===0)return!1;let u=t.charCodeAt(0);return!!(u===jh||u===Mh||ai.WIN32&&s>2&&WR(u)&&t.charCodeAt(1)===FR&&Kr(t.charCodeAt(2)))}function JR(e){let t=Dt(e);if(typeof t!="string"||t.length===0||/^[a-z][a-z0-9+.-]+:/i.test(t))return!1;if(t==="."||t===".."||li(t))return!0;if(t.includes("/")||t.includes("\\")){if(t.startsWith("@")&&!t.startsWith("@/")){let s=t.split("/");if(s.length<=2&&!s[1]?.includes("\\"))return!1}return!0}return!1}function ZR(e){let t=Dt(e);return typeof t!="string"?!1:t.length===0?!0:!li(t)}function ta(e){let t=Dt(e),{length:s}=t;if(s===0)return".";if(s<2)return s===1&&t.charCodeAt(0)===92?"/":t;let u=0,i=0,a="";if(s>4&&t.charCodeAt(3)===92){let h=t.charCodeAt(2);(h===63||h===46)&&t.charCodeAt(0)===92&&t.charCodeAt(1)===92&&(i=2,a="//")}if(i===0)if(s>2&&(t.charCodeAt(0)===92&&t.charCodeAt(1)===92&&t.charCodeAt(2)!==92||t.charCodeAt(0)===47&&t.charCodeAt(1)===47&&t.charCodeAt(2)!==47)){let h=-1,p=!1,d=2;for(;d<s&&(t.charCodeAt(d)===47||t.charCodeAt(d)===92);)d++;for(;d<s;){let g=t.charCodeAt(d);if(g===47||g===92){h=d;break}d++}if(h>2){for(d=h;d<s&&(t.charCodeAt(d)===47||t.charCodeAt(d)===92);)d++;d<s&&(p=!0)}if(h>2&&p)i=2,a="//";else{for(u=t.charCodeAt(i);u===47||u===92;)i+=1,u=t.charCodeAt(i);i&&(a="/")}}else{for(u=t.charCodeAt(i);u===47||u===92;)i+=1,u=t.charCodeAt(i);i&&(a="/")}let c=(0,Lh.search)(t,Qo,{fromIndex:i});if(c===-1){let h=t.slice(i);return h==="."||h.length===0?a||".":h===".."?a?a.slice(0,-1)||"/":"..":a+h}let r="",n=0,o=0;for(;c!==-1;){let h=t.slice(i,c);if(h.length>0&&h!==".")if(h==="..")if(n>0){let p=r.lastIndexOf("/");if(p===-1)r="",n=0,o>0&&!a&&(r="..",o=1);else{let d=p+1;r.slice(d)===".."?(r=`${r}/${h}`,o+=1):(r=r.slice(0,p),n-=1)}}else a||(r=r+(r.length===0?"":"/")+h,o+=1);else r=r+(r.length===0?"":"/")+h,n+=1;for(i=c+1,u=t.charCodeAt(i);u===47||u===92;)i+=1,u=t.charCodeAt(i);c=(0,Lh.search)(t,Qo,{fromIndex:i})}let l=t.slice(i);if(l.length>0&&l!==".")if(l==="..")if(n>0){let h=r.lastIndexOf("/");if(h===-1)r="",n=0,o>0&&!a&&(r="..",o=1);else{let p=h+1;r.slice(p)===".."?(r=`${r}/${l}`,o+=1):(r=r.slice(0,h),n-=1)}}else a||(r=r+(r.length===0?"":"/")+l,o+=1);else r=r+(r.length===0?"":"/")+l,n+=1;return r.length===0?a||".":a+r}function Dt(e){if(e==null)return"";if(typeof e=="string")return e;let{Buffer:t}=zR();if(t.isBuffer(e))return e.toString("utf8");let s=qR();if(e instanceof URL)try{return s.fileURLToPath(e)}catch{let u=e.pathname,i=decodeURIComponent(u);if(ai.WIN32&&i.startsWith("/")){let a=i.charCodeAt(1)|32;if(!(i.length>=3&&a>=97&&a<=122&&i.charAt(2)===":"))return i}return i}return String(e)}function XR(e){let t=Dt(e);return t===""?[]:t.split(Qo)}function YR(e){let t=Dt(e);return t.startsWith("./")||t.startsWith(".\\")?t.slice(2):t}function Dh(...e){let t="",s=!1;for(let u=e.length-1;u>=0&&!s;u-=1){let i=e[u];typeof i!="string"||i.length===0||(t=i+(t.length===0?"":`/${t}`),s=li(i))}return s||(t=require("process").cwd()+(t.length===0?"":`/${t}`)),ta(t)}function QR(e,t){if(e===t)return"";let s=Dh(e),u=Dh(t);if(s===u)return"";if(ai.WIN32){let d=s.toLowerCase(),g=u.toLowerCase();if(d===g)return""}let i=1,a=s.length,c=a-i,r=1,n=u.length-r,o=c<n?c:n,l=-1,h=0;for(;h<o;h+=1){let d=s.charCodeAt(i+h),g=u.charCodeAt(r+h);if(ai.WIN32&&(d>=Xo&&d<=Yo&&(d+=32),g>=Xo&&g<=Yo&&(g+=32)),d!==g)break;Kr(s.charCodeAt(i+h))&&(l=h)}if(h===o){if(n>o){let d=u.charCodeAt(r+h);if(Kr(d))return u.slice(r+h+1);if(h===0)return u.slice(r+h)}else if(c>o){let d=s.charCodeAt(i+h);Kr(d)?l=h:h===0&&(l=0)}}let p="";for(h=i+l+1;h<=a;h+=1){let d=s.charCodeAt(h);(h===a||Kr(d))&&(p+=p.length===0?"..":"/..")}return p+u.slice(r+l)}function eA(e,t){let s=QR(e,t);return s===""?"":ta(s)}});var sa=ge((BH,Hh)=>{var ra=Object.defineProperty,tA=Object.getOwnPropertyDescriptor,rA=Object.getOwnPropertyNames,sA=Object.prototype.hasOwnProperty,iA=(e,t)=>{for(var s in t)ra(e,s,{get:t[s],enumerable:!0})},nA=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of rA(t))!sA.call(e,i)&&i!==s&&ra(e,i,{get:()=>t[i],enumerable:!(u=tA(t,i))||u.enumerable});return e},oA=e=>nA(ra({},"__esModule",{value:!0}),e),Uh={};iA(Uh,{clearPath:()=>aA,getPathValue:()=>lA,hasOverride:()=>cA,invalidateCaches:()=>ui,registerCacheInvalidation:()=>uA,resetPaths:()=>hA,setPath:()=>pA});Hh.exports=oA(Uh);var lr=new Map,ci=new Map,Fh=[];function aA(e){lr.delete(e),ui()}function lA(e,t){if(lr.has(e))return lr.get(e);if(ci.has(e))return ci.get(e);let s=t();return ci.set(e,s),s}function cA(e){return lr.has(e)}function ui(){ci.clear();for(let e of Fh)try{e()}catch{}}function uA(e){Fh.push(e)}function hA(){lr.clear(),ui()}function pA(e,t){lr.set(e,t),ui()}});var na=ge((UH,Vh)=>{var ia=Object.defineProperty,dA=Object.getOwnPropertyDescriptor,fA=Object.getOwnPropertyNames,gA=Object.prototype.hasOwnProperty,mA=(e,t)=>{for(var s in t)ia(e,s,{get:t[s],enumerable:!0})},yA=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fA(t))!gA.call(e,i)&&i!==s&&ia(e,i,{get:()=>t[i],enumerable:!(u=dA(t,i))||u.enumerable});return e},vA=e=>yA(ia({},"__esModule",{value:!0}),e),Gh={};mA(Gh,{envAsBoolean:()=>SA,envAsNumber:()=>EA,envAsString:()=>bA});Vh.exports=vA(Gh);function SA(e){if(!e)return!1;let t=e.toLowerCase();return t==="true"||t==="1"||t==="yes"}function EA(e){if(!e)return 0;let t=Number(e);return Number.isNaN(t)?0:t}function bA(e){return e||""}});var aa=ge((FH,zh)=>{var oa=Object.defineProperty,_A=Object.getOwnPropertyDescriptor,wA=Object.getOwnPropertyNames,OA=Object.prototype.hasOwnProperty,RA=(e,t)=>{for(var s in t)oa(e,s,{get:t[s],enumerable:!0})},AA=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of wA(t))!OA.call(e,i)&&i!==s&&oa(e,i,{get:()=>t[i],enumerable:!(u=_A(t,i))||u.enumerable});return e},CA=e=>AA(oa({},"__esModule",{value:!0}),e),Wh={};RA(Wh,{getSocketAcceptRisks:()=>IA,getSocketApiBaseUrl:()=>TA,getSocketApiProxy:()=>PA,getSocketApiTimeout:()=>xA,getSocketApiToken:()=>NA,getSocketCacacheDir:()=>kA,getSocketConfig:()=>LA,getSocketDebug:()=>DA,getSocketDlxDirEnv:()=>$A,getSocketHome:()=>MA,getSocketNoApiToken:()=>jA,getSocketNpmRegistry:()=>BA,getSocketOrgSlug:()=>UA,getSocketRegistryUrl:()=>FA,getSocketViewAllRisks:()=>HA});zh.exports=CA(Wh);var hi=na(),ze=xt();function IA(){return(0,hi.envAsBoolean)((0,ze.getEnvValue)("SOCKET_ACCEPT_RISKS"))}function TA(){return(0,ze.getEnvValue)("SOCKET_API_BASE_URL")}function PA(){return(0,ze.getEnvValue)("SOCKET_API_PROXY")}function xA(){return(0,hi.envAsNumber)((0,ze.getEnvValue)("SOCKET_API_TIMEOUT"))}function NA(){return(0,ze.getEnvValue)("SOCKET_API_TOKEN")}function kA(){return(0,ze.getEnvValue)("SOCKET_CACACHE_DIR")}function LA(){return(0,ze.getEnvValue)("SOCKET_CONFIG")}function DA(){return(0,ze.getEnvValue)("SOCKET_DEBUG")}function $A(){return(0,ze.getEnvValue)("SOCKET_DLX_DIR")}function MA(){return(0,ze.getEnvValue)("SOCKET_HOME")}function jA(){return(0,hi.envAsBoolean)((0,ze.getEnvValue)("SOCKET_NO_API_TOKEN"))}function BA(){return(0,ze.getEnvValue)("SOCKET_NPM_REGISTRY")}function UA(){return(0,ze.getEnvValue)("SOCKET_ORG_SLUG")}function FA(){return(0,ze.getEnvValue)("SOCKET_REGISTRY_URL")}function HA(){return(0,hi.envAsBoolean)((0,ze.getEnvValue)("SOCKET_VIEW_ALL_RISKS"))}});var At=ge((HH,Jh)=>{var la=Object.defineProperty,GA=Object.getOwnPropertyDescriptor,VA=Object.getOwnPropertyNames,WA=Object.prototype.hasOwnProperty,zA=(e,t)=>{for(var s in t)la(e,s,{get:t[s],enumerable:!0})},qA=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of VA(t))!WA.call(e,i)&&i!==s&&la(e,i,{get:()=>t[i],enumerable:!(u=GA(t,i))||u.enumerable});return e},KA=e=>qA(la({},"__esModule",{value:!0}),e),qh={};zA(qh,{CACHE_SOCKET_API_DIR:()=>yC,REGISTRY:()=>vC,REGISTRY_SCOPE_DELIMITER:()=>SC,SOCKET_API_BASE_URL:()=>JA,SOCKET_API_TOKENS_URL:()=>eC,SOCKET_APP_PREFIX:()=>gC,SOCKET_CLI_APP_NAME:()=>hC,SOCKET_CONTACT_URL:()=>YA,SOCKET_DASHBOARD_URL:()=>QA,SOCKET_DLX_APP_NAME:()=>pC,SOCKET_DOCS_URL:()=>sC,SOCKET_FIREWALL_APP_NAME:()=>dC,SOCKET_GITHUB_ORG:()=>aC,SOCKET_IPC_HANDSHAKE:()=>mC,SOCKET_OVERRIDE_SCOPE:()=>oC,SOCKET_PRICING_URL:()=>tC,SOCKET_PUBLIC_API_KEY:()=>Kh,SOCKET_PUBLIC_API_TOKEN:()=>ZA,SOCKET_REGISTRY_APP_NAME:()=>fC,SOCKET_REGISTRY_NPM_ORG:()=>uC,SOCKET_REGISTRY_PACKAGE_NAME:()=>cC,SOCKET_REGISTRY_REPO_NAME:()=>lC,SOCKET_REGISTRY_SCOPE:()=>iC,SOCKET_SECURITY_SCOPE:()=>nC,SOCKET_STATUS_URL:()=>rC,SOCKET_WEBSITE_URL:()=>XA});Jh.exports=KA(qh);var JA="https://api.socket.dev/v0",Kh="sktsec_t_--RAN5U4ivauy4w37-6aoKyYPDt5ZbaT5JBVMqiwKo_api",ZA=Kh,XA="https://socket.dev",YA="https://socket.dev/contact",QA="https://socket.dev/dashboard",eC="https://socket.dev/dashboard/settings/api-tokens",tC="https://socket.dev/pricing",rC="https://status.socket.dev",sC="https://docs.socket.dev",iC="@socketregistry",nC="@socketsecurity",oC="@socketoverride",aC="SocketDev",lC="socket-registry",cC="@socketsecurity/registry",uC="socketregistry",hC="socket",pC="dlx",dC="sfw",fC="registry",gC="_",mC="SOCKET_IPC_HANDSHAKE",yC="socket-api",vC="registry",SC="__"});var Yh=ge((GH,Xh)=>{var ca=Object.defineProperty,EC=Object.getOwnPropertyDescriptor,bC=Object.getOwnPropertyNames,_C=Object.prototype.hasOwnProperty,wC=(e,t)=>{for(var s in t)ca(e,s,{get:t[s],enumerable:!0})},OC=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of bC(t))!_C.call(e,i)&&i!==s&&ca(e,i,{get:()=>t[i],enumerable:!(u=EC(t,i))||u.enumerable});return e},RC=e=>OC(ca({},"__esModule",{value:!0}),e),Zh={};wC(Zh,{CACHE_GITHUB_DIR:()=>CC,GITHUB_API_BASE_URL:()=>AC});Xh.exports=RC(Zh);var AC="https://api.github.com",CC="github"});var mi=ge((VH,lp)=>{var IC=Object.create,fi=Object.defineProperty,TC=Object.getOwnPropertyDescriptor,PC=Object.getOwnPropertyNames,xC=Object.getPrototypeOf,NC=Object.prototype.hasOwnProperty,kC=(e,t)=>{for(var s in t)fi(e,s,{get:t[s],enumerable:!0})},Qh=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of PC(t))!NC.call(e,i)&&i!==s&&fi(e,i,{get:()=>t[i],enumerable:!(u=TC(t,i))||u.enumerable});return e},ep=(e,t,s)=>(s=e!=null?IC(xC(e)):{},Qh(t||!e||!e.__esModule?fi(s,"default",{value:e,enumerable:!0}):s,e)),LC=e=>Qh(fi({},"__esModule",{value:!0}),e),tp={};kC(tp,{getOsHomeDir:()=>sp,getOsTmpDir:()=>MC,getSocketAppCacheDir:()=>ip,getSocketAppCacheTtlDir:()=>np,getSocketAppDir:()=>gi,getSocketCacacheDir:()=>BC,getSocketCliDir:()=>FC,getSocketDlxDir:()=>UC,getSocketHomePath:()=>jC,getSocketRegistryDir:()=>HC,getSocketRegistryGithubCacheDir:()=>GC,getSocketUserDir:()=>Zr,getUserHomeDir:()=>op,invalidateCache:()=>ap});lp.exports=LC(tp);var rp=ep(require("os")),qt=ep(require("path")),DC=Vn(),di=aa(),$C=zn(),Ct=ar(),ua=sa();function sp(){return(0,ua.getPathValue)("homedir",()=>rp.homedir())}function MC(){return(0,ua.getPathValue)("tmpdir",()=>rp.tmpdir())}function jC(){return Zr()}var pi;function Zr(){return pi===void 0&&(pi=(0,Ct.normalizePath)(qt.join(op(),Wt().DOT_SOCKET_DIR))),pi}function gi(e){return(0,Ct.normalizePath)(qt.join(Zr(),`${At().SOCKET_APP_PREFIX}${e}`))}var Jr;function BC(){return Jr===void 0&&((0,di.getSocketCacacheDir)()?Jr=(0,Ct.normalizePath)((0,di.getSocketCacacheDir)()):Jr=(0,Ct.normalizePath)(qt.join(Zr(),`${At().SOCKET_APP_PREFIX}cacache`))),Jr}function UC(){return(0,di.getSocketDlxDirEnv)()?(0,Ct.normalizePath)((0,di.getSocketDlxDirEnv)()):(0,Ct.normalizePath)(qt.join(Zr(),`${At().SOCKET_APP_PREFIX}${At().SOCKET_DLX_APP_NAME}`))}function ip(e){return(0,Ct.normalizePath)(qt.join(gi(e),Wt().CACHE_DIR))}function np(e){return(0,Ct.normalizePath)(qt.join(ip(e),Wt().CACHE_TTL_DIR))}function FC(){return gi(At().SOCKET_CLI_APP_NAME)}function HC(){return gi(At().SOCKET_REGISTRY_APP_NAME)}function GC(){return(0,Ct.normalizePath)(qt.join(np(At().SOCKET_REGISTRY_APP_NAME),Yh().CACHE_GITHUB_DIR))}function op(){let e=(0,DC.getHome)();return e||(0,$C.getUserprofile)()||sp()}function ap(){pi=void 0,Jr=void 0}(0,ua.registerCacheInvalidation)(ap)});var Ca=ge((iG,sd)=>{var VC=Object.create,Xr=Object.defineProperty,WC=Object.getOwnPropertyDescriptor,zC=Object.getOwnPropertyNames,qC=Object.getPrototypeOf,KC=Object.prototype.hasOwnProperty,se=(e,t)=>Xr(e,"name",{value:t,configurable:!0}),ve=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),JC=(e,t)=>{for(var s in t)Xr(e,s,{get:t[s],enumerable:!0})},mp=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zC(t))!KC.call(e,i)&&i!==s&&Xr(e,i,{get:()=>t[i],enumerable:!(u=WC(t,i))||u.enumerable});return e},De=(e,t,s)=>(s=e!=null?VC(qC(e)):{},mp(t||!e||!e.__esModule?Xr(s,"default",{value:e,enumerable:!0}):s,e)),ZC=e=>mp(Xr({},"__esModule",{value:!0}),e),XC=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.splitWhen=e.flatten=void 0;function t(u){return u.reduce((i,a)=>[].concat(i,a),[])}se(t,"flatten"),e.flatten=t;function s(u,i){let a=[[]],c=0;for(let r of u)i(r)?(c++,a[c]=[]):a[c].push(r);return a}se(s,"splitWhen"),e.splitWhen=s}),YC=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEnoentCodeError=void 0;function t(s){return s.code==="ENOENT"}se(t,"isEnoentCodeError"),e.isEnoentCodeError=t}),QC=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDirentFromStats=void 0;var t=class{static{se(this,"DirentFromStats")}constructor(u,i){this.name=u,this.isBlockDevice=i.isBlockDevice.bind(i),this.isCharacterDevice=i.isCharacterDevice.bind(i),this.isDirectory=i.isDirectory.bind(i),this.isFIFO=i.isFIFO.bind(i),this.isFile=i.isFile.bind(i),this.isSocket=i.isSocket.bind(i),this.isSymbolicLink=i.isSymbolicLink.bind(i)}};function s(u,i){return new t(u,i)}se(s,"createDirentFromStats"),e.createDirentFromStats=s}),e1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertPosixPathToPattern=e.convertWindowsPathToPattern=e.convertPathToPattern=e.escapePosixPath=e.escapeWindowsPath=e.escape=e.removeLeadingDotSegment=e.makeAbsolute=e.unixify=void 0;var t=require("os"),s=require("path"),u=t.platform()==="win32",i=2,a=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,c=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,r=/^\\\\([.?])/,n=/\\(?![!()+@[\]{}])/g;function o(f){return f.replace(/\\/g,"/")}se(o,"unixify"),e.unixify=o;function l(f,y){return s.resolve(f,y)}se(l,"makeAbsolute"),e.makeAbsolute=l;function h(f){if(f.charAt(0)==="."){let y=f.charAt(1);if(y==="/"||y==="\\")return f.slice(i)}return f}se(h,"removeLeadingDotSegment"),e.removeLeadingDotSegment=h,e.escape=u?p:d;function p(f){return f.replace(c,"\\$2")}se(p,"escapeWindowsPath"),e.escapeWindowsPath=p;function d(f){return f.replace(a,"\\$2")}se(d,"escapePosixPath"),e.escapePosixPath=d,e.convertPathToPattern=u?g:m;function g(f){return p(f).replace(r,"//$1").replace(n,"/")}se(g,"convertWindowsPathToPattern"),e.convertWindowsPathToPattern=g;function m(f){return d(f)}se(m,"convertPosixPathToPattern"),e.convertPosixPathToPattern=m}),t1=ve((e,t)=>{t.exports=se(function(s){if(typeof s!="string"||s==="")return!1;for(var u;u=/(\\).|([@?!+*]\(.*\))/g.exec(s);){if(u[2])return!0;s=s.slice(u.index+u[0].length)}return!1},"isExtglob")}),yp=ve((e,t)=>{var s=t1(),u={"{":"}","(":")","[":"]"},i=se(function(c){if(c[0]==="!")return!0;for(var r=0,n=-2,o=-2,l=-2,h=-2,p=-2;r<c.length;){if(c[r]==="*"||c[r+1]==="?"&&/[\].+)]/.test(c[r])||o!==-1&&c[r]==="["&&c[r+1]!=="]"&&(o<r&&(o=c.indexOf("]",r)),o>r&&(p===-1||p>o||(p=c.indexOf("\\",r),p===-1||p>o)))||l!==-1&&c[r]==="{"&&c[r+1]!=="}"&&(l=c.indexOf("}",r),l>r&&(p=c.indexOf("\\",r),p===-1||p>l))||h!==-1&&c[r]==="("&&c[r+1]==="?"&&/[:!=]/.test(c[r+2])&&c[r+3]!==")"&&(h=c.indexOf(")",r),h>r&&(p=c.indexOf("\\",r),p===-1||p>h))||n!==-1&&c[r]==="("&&c[r+1]!=="|"&&(n<r&&(n=c.indexOf("|",r)),n!==-1&&c[n+1]!==")"&&(h=c.indexOf(")",n),h>n&&(p=c.indexOf("\\",n),p===-1||p>h))))return!0;if(c[r]==="\\"){var d=c[r+1];r+=2;var g=u[d];if(g){var m=c.indexOf(g,r);m!==-1&&(r=m+1)}if(c[r]==="!")return!0}else r++}return!1},"strictCheck"),a=se(function(c){if(c[0]==="!")return!0;for(var r=0;r<c.length;){if(/[*?{}()[\]]/.test(c[r]))return!0;if(c[r]==="\\"){var n=c[r+1];r+=2;var o=u[n];if(o){var l=c.indexOf(o,r);l!==-1&&(r=l+1)}if(c[r]==="!")return!0}else r++}return!1},"relaxedCheck");t.exports=se(function(c,r){if(typeof c!="string"||c==="")return!1;if(s(c))return!0;var n=i;return r&&r.strict===!1&&(n=a),n(c)},"isGlob")}),r1=ve((e,t)=>{"use strict";var s=yp(),u=require("path").posix.dirname,i=require("os").platform()==="win32",a="/",c=/\\/g,r=/[\{\[].*[\}\]]$/,n=/(^|[^\\])([\{\[]|\([^\)]+$)/,o=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=se(function(l,h){var p=Object.assign({flipBackslashes:!0},h);p.flipBackslashes&&i&&l.indexOf(a)<0&&(l=l.replace(c,a)),r.test(l)&&(l+=a),l+="a";do l=u(l);while(s(l)||n.test(l));return l.replace(o,"$1")},"globParent")}),fa=ve(e=>{"use strict";e.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1,e.find=(t,s)=>t.nodes.find(u=>u.type===s),e.exceedsLimit=(t,s,u=1,i)=>i===!1||!e.isInteger(t)||!e.isInteger(s)?!1:(Number(s)-Number(t))/Number(u)>=i,e.escapeNode=(t,s=0,u)=>{let i=t.nodes[s];i&&(u&&i.type===u||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)},e.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0),e.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1,e.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0,e.reduce=t=>t.reduce((s,u)=>(u.type==="text"&&s.push(u.value),u.type==="range"&&(u.type="text"),s),[]),e.flatten=(...t)=>{let s=[],u=se(i=>{for(let a=0;a<i.length;a++){let c=i[a];if(Array.isArray(c)){u(c);continue}c!==void 0&&s.push(c)}return s},"flat");return u(t),s}}),ga=ve((e,t)=>{"use strict";var s=fa();t.exports=(u,i={})=>{let a=se((c,r={})=>{let n=i.escapeInvalid&&s.isInvalidBrace(r),o=c.invalid===!0&&i.escapeInvalid===!0,l="";if(c.value)return(n||o)&&s.isOpenOrClose(c)?"\\"+c.value:c.value;if(c.value)return c.value;if(c.nodes)for(let h of c.nodes)l+=a(h);return l},"stringify");return a(u)}}),s1=ve((e,t)=>{"use strict";t.exports=function(s){return typeof s=="number"?s-s===0:typeof s=="string"&&s.trim()!==""?Number.isFinite?Number.isFinite(+s):isFinite(+s):!1}}),i1=ve((e,t)=>{"use strict";var s=s1(),u=se((S,E,b)=>{if(s(S)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(E===void 0||S===E)return String(S);if(s(E)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let _={relaxZeros:!0,...b};typeof _.strictZeros=="boolean"&&(_.relaxZeros=_.strictZeros===!1);let O=String(_.relaxZeros),w=String(_.shorthand),A=String(_.capture),I=String(_.wrap),P=S+":"+E+"="+O+w+A+I;if(u.cache.hasOwnProperty(P))return u.cache[P].result;let L=Math.min(S,E),$=Math.max(S,E);if(Math.abs(L-$)===1){let B=S+"|"+E;return _.capture?`(${B})`:_.wrap===!1?B:`(?:${B})`}let x=f(S)||f(E),M={min:S,max:E,a:L,b:$},U=[],V=[];if(x&&(M.isPadded=x,M.maxLen=String(M.max).length),L<0){let B=$<0?Math.abs($):1;V=r(B,Math.abs(L),M,_),L=M.a=0}return $>=0&&(U=r(L,$,M,_)),M.negatives=V,M.positives=U,M.result=i(V,U,_),_.capture===!0?M.result=`(${M.result})`:_.wrap!==!1&&U.length+V.length>1&&(M.result=`(?:${M.result})`),u.cache[P]=M,M.result},"toRegexRange");function i(S,E,b){let _=n(S,E,"-",!1,b)||[],O=n(E,S,"",!1,b)||[],w=n(S,E,"-?",!0,b)||[];return _.concat(w).concat(O).join("|")}se(i,"collatePatterns");function a(S,E){let b=1,_=1,O=p(S,b),w=new Set([E]);for(;S<=O&&O<=E;)w.add(O),b+=1,O=p(S,b);for(O=d(E+1,_)-1;S<O&&O<=E;)w.add(O),_+=1,O=d(E+1,_)-1;return w=[...w],w.sort(l),w}se(a,"splitToRanges");function c(S,E,b){if(S===E)return{pattern:S,count:[],digits:0};let _=o(S,E),O=_.length,w="",A=0;for(let I=0;I<O;I++){let[P,L]=_[I];P===L?w+=P:P!=="0"||L!=="9"?w+=m(P,L,b):A++}return A&&(w+=b.shorthand===!0?"\\d":"[0-9]"),{pattern:w,count:[A],digits:O}}se(c,"rangeToPattern");function r(S,E,b,_){let O=a(S,E),w=[],A=S,I;for(let P=0;P<O.length;P++){let L=O[P],$=c(String(A),String(L),_),x="";if(!b.isPadded&&I&&I.pattern===$.pattern){I.count.length>1&&I.count.pop(),I.count.push($.count[0]),I.string=I.pattern+g(I.count),A=L+1;continue}b.isPadded&&(x=y(L,b,_)),$.string=x+$.pattern+g($.count),w.push($),A=L+1,I=$}return w}se(r,"splitToPatterns");function n(S,E,b,_,O){let w=[];for(let A of S){let{string:I}=A;!_&&!h(E,"string",I)&&w.push(b+I),_&&h(E,"string",I)&&w.push(b+I)}return w}se(n,"filterPatterns");function o(S,E){let b=[];for(let _=0;_<S.length;_++)b.push([S[_],E[_]]);return b}se(o,"zip");function l(S,E){return S>E?1:E>S?-1:0}se(l,"compare");function h(S,E,b){return S.some(_=>_[E]===b)}se(h,"contains");function p(S,E){return Number(String(S).slice(0,-E)+"9".repeat(E))}se(p,"countNines");function d(S,E){return S-S%Math.pow(10,E)}se(d,"countZeros");function g(S){let[E=0,b=""]=S;return b||E>1?`{${E+(b?","+b:"")}}`:""}se(g,"toQuantifier");function m(S,E,b){return`[${S}${E-S===1?"":"-"}${E}]`}se(m,"toCharacterClass");function f(S){return/^-?(0+)\d/.test(S)}se(f,"hasPadding");function y(S,E,b){if(!E.isPadded)return S;let _=Math.abs(E.maxLen-String(S).length),O=b.relaxZeros!==!1;switch(_){case 0:return"";case 1:return O?"0?":"0";case 2:return O?"0{0,2}":"00";default:return O?`0{0,${_}}`:`0{${_}}`}}se(y,"padZeros"),u.cache={},u.clearCache=()=>u.cache={},t.exports=u}),vp=ve((e,t)=>{"use strict";var s=require("util"),u=i1(),i=se(_=>_!==null&&typeof _=="object"&&!Array.isArray(_),"isObject"),a=se(_=>O=>_===!0?Number(O):String(O),"transform"),c=se(_=>typeof _=="number"||typeof _=="string"&&_!=="","isValidValue"),r=se(_=>Number.isInteger(+_),"isNumber"),n=se(_=>{let O=`${_}`,w=-1;if(O[0]==="-"&&(O=O.slice(1)),O==="0")return!1;for(;O[++w]==="0";);return w>0},"zeros"),o=se((_,O,w)=>typeof _=="string"||typeof O=="string"?!0:w.stringify===!0,"stringify"),l=se((_,O,w)=>{if(O>0){let A=_[0]==="-"?"-":"";A&&(_=_.slice(1)),_=A+_.padStart(A?O-1:O,"0")}return w===!1?String(_):_},"pad"),h=se((_,O)=>{let w=_[0]==="-"?"-":"";for(w&&(_=_.slice(1),O--);_.length<O;)_="0"+_;return w?"-"+_:_},"toMaxLen"),p=se((_,O,w)=>{_.negatives.sort(($,x)=>$<x?-1:$>x?1:0),_.positives.sort(($,x)=>$<x?-1:$>x?1:0);let A=O.capture?"":"?:",I="",P="",L;return _.positives.length&&(I=_.positives.map($=>h(String($),w)).join("|")),_.negatives.length&&(P=`-(${A}${_.negatives.map($=>h(String($),w)).join("|")})`),I&&P?L=`${I}|${P}`:L=I||P,O.wrap?`(${A}${L})`:L},"toSequence"),d=se((_,O,w,A)=>{if(w)return u(_,O,{wrap:!1,...A});let I=String.fromCharCode(_);if(_===O)return I;let P=String.fromCharCode(O);return`[${I}-${P}]`},"toRange"),g=se((_,O,w)=>{if(Array.isArray(_)){let A=w.wrap===!0,I=w.capture?"":"?:";return A?`(${I}${_.join("|")})`:_.join("|")}return u(_,O,w)},"toRegex"),m=se((..._)=>new RangeError("Invalid range arguments: "+s.inspect(..._)),"rangeError"),f=se((_,O,w)=>{if(w.strictRanges===!0)throw m([_,O]);return[]},"invalidRange"),y=se((_,O)=>{if(O.strictRanges===!0)throw new TypeError(`Expected step "${_}" to be a number`);return[]},"invalidStep"),S=se((_,O,w=1,A={})=>{let I=Number(_),P=Number(O);if(!Number.isInteger(I)||!Number.isInteger(P)){if(A.strictRanges===!0)throw m([_,O]);return[]}I===0&&(I=0),P===0&&(P=0);let L=I>P,$=String(_),x=String(O),M=String(w);w=Math.max(Math.abs(w),1);let U=n($)||n(x)||n(M),V=U?Math.max($.length,x.length,M.length):0,B=U===!1&&o(_,O,A)===!1,G=A.transform||a(B);if(A.toRegex&&w===1)return d(h(_,V),h(O,V),!0,A);let W={negatives:[],positives:[]},N=se(C=>W[C<0?"negatives":"positives"].push(Math.abs(C)),"push"),D=[],T=0;for(;L?I>=P:I<=P;)A.toRegex===!0&&w>1?N(I):D.push(l(G(I,T),V,B)),I=L?I-w:I+w,T++;return A.toRegex===!0?w>1?p(W,A,V):g(D,null,{wrap:!1,...A}):D},"fillNumbers"),E=se((_,O,w=1,A={})=>{if(!r(_)&&_.length>1||!r(O)&&O.length>1)return f(_,O,A);let I=A.transform||(B=>String.fromCharCode(B)),P=`${_}`.charCodeAt(0),L=`${O}`.charCodeAt(0),$=P>L,x=Math.min(P,L),M=Math.max(P,L);if(A.toRegex&&w===1)return d(x,M,!1,A);let U=[],V=0;for(;$?P>=L:P<=L;)U.push(I(P,V)),P=$?P-w:P+w,V++;return A.toRegex===!0?g(U,null,{wrap:!1,options:A}):U},"fillLetters"),b=se((_,O,w,A={})=>{if(O==null&&c(_))return[_];if(!c(_)||!c(O))return f(_,O,A);if(typeof w=="function")return b(_,O,1,{transform:w});if(i(w))return b(_,O,0,w);let I={...A};return I.capture===!0&&(I.wrap=!0),w=w||I.step||1,r(w)?r(_)&&r(O)?S(_,O,w,I):E(_,O,Math.max(Math.abs(w),1),I):w!=null&&!i(w)?y(w,I):b(_,O,1,w)},"fill");t.exports=b}),n1=ve((e,t)=>{"use strict";var s=vp(),u=fa(),i=se((a,c={})=>{let r=se((n,o={})=>{let l=u.isInvalidBrace(o),h=n.invalid===!0&&c.escapeInvalid===!0,p=l===!0||h===!0,d=c.escapeInvalid===!0?"\\":"",g="";if(n.isOpen===!0||n.isClose===!0)return d+n.value;if(n.type==="open")return p?d+n.value:"(";if(n.type==="close")return p?d+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":p?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let m=u.reduce(n.nodes),f=s(...m,{...c,wrap:!1,toRegex:!0,strictZeros:!0});if(f.length!==0)return m.length>1&&f.length>1?`(${f})`:f}if(n.nodes)for(let m of n.nodes)g+=r(m,n);return g},"walk");return r(a)},"compile");t.exports=i}),o1=ve((e,t)=>{"use strict";var s=vp(),u=ga(),i=fa(),a=se((r="",n="",o=!1)=>{let l=[];if(r=[].concat(r),n=[].concat(n),!n.length)return r;if(!r.length)return o?i.flatten(n).map(h=>`{${h}}`):n;for(let h of r)if(Array.isArray(h))for(let p of h)l.push(a(p,n,o));else for(let p of n)o===!0&&typeof p=="string"&&(p=`{${p}}`),l.push(Array.isArray(p)?a(h,p,o):h+p);return i.flatten(l)},"append"),c=se((r,n={})=>{let o=n.rangeLimit===void 0?1e3:n.rangeLimit,l=se((h,p={})=>{h.queue=[];let d=p,g=p.queue;for(;d.type!=="brace"&&d.type!=="root"&&d.parent;)d=d.parent,g=d.queue;if(h.invalid||h.dollar){g.push(a(g.pop(),u(h,n)));return}if(h.type==="brace"&&h.invalid!==!0&&h.nodes.length===2){g.push(a(g.pop(),["{}"]));return}if(h.nodes&&h.ranges>0){let S=i.reduce(h.nodes);if(i.exceedsLimit(...S,n.step,o))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let E=s(...S,n);E.length===0&&(E=u(h,n)),g.push(a(g.pop(),E)),h.nodes=[];return}let m=i.encloseBrace(h),f=h.queue,y=h;for(;y.type!=="brace"&&y.type!=="root"&&y.parent;)y=y.parent,f=y.queue;for(let S=0;S<h.nodes.length;S++){let E=h.nodes[S];if(E.type==="comma"&&h.type==="brace"){S===1&&f.push(""),f.push("");continue}if(E.type==="close"){g.push(a(g.pop(),f,m));continue}if(E.value&&E.type!=="open"){f.push(a(f.pop(),E.value));continue}E.nodes&&l(E,h)}return f},"walk");return i.flatten(l(r))},"expand");t.exports=c}),a1=ve((e,t)=>{"use strict";t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
7
|
+
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}}),l1=ve((e,t)=>{"use strict";var s=ga(),{MAX_LENGTH:u,CHAR_BACKSLASH:i,CHAR_BACKTICK:a,CHAR_COMMA:c,CHAR_DOT:r,CHAR_LEFT_PARENTHESES:n,CHAR_RIGHT_PARENTHESES:o,CHAR_LEFT_CURLY_BRACE:l,CHAR_RIGHT_CURLY_BRACE:h,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:g,CHAR_SINGLE_QUOTE:m,CHAR_NO_BREAK_SPACE:f,CHAR_ZERO_WIDTH_NOBREAK_SPACE:y}=a1(),S=se((E,b={})=>{if(typeof E!="string")throw new TypeError("Expected a string");let _=b||{},O=typeof _.maxLength=="number"?Math.min(u,_.maxLength):u;if(E.length>O)throw new SyntaxError(`Input length (${E.length}), exceeds max characters (${O})`);let w={type:"root",input:E,nodes:[]},A=[w],I=w,P=w,L=0,$=E.length,x=0,M=0,U,V=se(()=>E[x++],"advance"),B=se(G=>{if(G.type==="text"&&P.type==="dot"&&(P.type="text"),P&&P.type==="text"&&G.type==="text"){P.value+=G.value;return}return I.nodes.push(G),G.parent=I,G.prev=P,P=G,G},"push");for(B({type:"bos"});x<$;)if(I=A[A.length-1],U=V(),!(U===y||U===f)){if(U===i){B({type:"text",value:(b.keepEscaping?U:"")+V()});continue}if(U===d){B({type:"text",value:"\\"+U});continue}if(U===p){L++;let G;for(;x<$&&(G=V());){if(U+=G,G===p){L++;continue}if(G===i){U+=V();continue}if(G===d&&(L--,L===0))break}B({type:"text",value:U});continue}if(U===n){I=B({type:"paren",nodes:[]}),A.push(I),B({type:"text",value:U});continue}if(U===o){if(I.type!=="paren"){B({type:"text",value:U});continue}I=A.pop(),B({type:"text",value:U}),I=A[A.length-1];continue}if(U===g||U===m||U===a){let G=U,W;for(b.keepQuotes!==!0&&(U="");x<$&&(W=V());){if(W===i){U+=W+V();continue}if(W===G){b.keepQuotes===!0&&(U+=W);break}U+=W}B({type:"text",value:U});continue}if(U===l){M++;let G={type:"brace",open:!0,close:!1,dollar:P.value&&P.value.slice(-1)==="$"||I.dollar===!0,depth:M,commas:0,ranges:0,nodes:[]};I=B(G),A.push(I),B({type:"open",value:U});continue}if(U===h){if(I.type!=="brace"){B({type:"text",value:U});continue}let G="close";I=A.pop(),I.close=!0,B({type:G,value:U}),M--,I=A[A.length-1];continue}if(U===c&&M>0){if(I.ranges>0){I.ranges=0;let G=I.nodes.shift();I.nodes=[G,{type:"text",value:s(I)}]}B({type:"comma",value:U}),I.commas++;continue}if(U===r&&M>0&&I.commas===0){let G=I.nodes;if(M===0||G.length===0){B({type:"text",value:U});continue}if(P.type==="dot"){if(I.range=[],P.value+=U,P.type="range",I.nodes.length!==3&&I.nodes.length!==5){I.invalid=!0,I.ranges=0,P.type="text";continue}I.ranges++,I.args=[];continue}if(P.type==="range"){G.pop();let W=G[G.length-1];W.value+=P.value+U,P=W,I.ranges--;continue}B({type:"dot",value:U});continue}B({type:"text",value:U})}do if(I=A.pop(),I.type!=="root"){I.nodes.forEach(N=>{N.nodes||(N.type==="open"&&(N.isOpen=!0),N.type==="close"&&(N.isClose=!0),N.nodes||(N.type="text"),N.invalid=!0)});let G=A[A.length-1],W=G.nodes.indexOf(I);G.nodes.splice(W,1,...I.nodes)}while(A.length>0);return B({type:"eos"}),w},"parse");t.exports=S}),c1=ve((e,t)=>{"use strict";var s=ga(),u=n1(),i=o1(),a=l1(),c=se((r,n={})=>{let o=[];if(Array.isArray(r))for(let l of r){let h=c.create(l,n);Array.isArray(h)?o.push(...h):o.push(h)}else o=[].concat(c.create(r,n));return n&&n.expand===!0&&n.nodupes===!0&&(o=[...new Set(o)]),o},"braces");c.parse=(r,n={})=>a(r,n),c.stringify=(r,n={})=>s(typeof r=="string"?c.parse(r,n):r,n),c.compile=(r,n={})=>(typeof r=="string"&&(r=c.parse(r,n)),u(r,n)),c.expand=(r,n={})=>{typeof r=="string"&&(r=c.parse(r,n));let o=i(r,n);return n.noempty===!0&&(o=o.filter(Boolean)),n.nodupes===!0&&(o=[...new Set(o)]),o},c.create=(r,n={})=>r===""||r.length<3?[r]:n.expand!==!0?c.compile(r,n):c.expand(r,n),t.exports=c}),vi=ve((e,t)=>{"use strict";var s=require("path"),u="\\\\/",i=`[^${u}]`,a="\\.",c="\\+",r="\\?",n="\\/",o="(?=.)",l="[^/]",h=`(?:${n}|$)`,p=`(?:^|${n})`,d=`${a}{1,2}${h}`,g=`(?!${a})`,m=`(?!${p}${d})`,f=`(?!${a}{0,1}${h})`,y=`(?!${d})`,S=`[^.${n}]`,E=`${l}*?`,b={DOT_LITERAL:a,PLUS_LITERAL:c,QMARK_LITERAL:r,SLASH_LITERAL:n,ONE_CHAR:o,QMARK:l,END_ANCHOR:h,DOTS_SLASH:d,NO_DOT:g,NO_DOTS:m,NO_DOT_SLASH:f,NO_DOTS_SLASH:y,QMARK_NO_DOT:S,STAR:E,START_ANCHOR:p},_={...b,SLASH_LITERAL:`[${u}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${a}{1,2}(?:[${u}]|$)`,NO_DOT:`(?!${a})`,NO_DOTS:`(?!(?:^|[${u}])${a}{1,2}(?:[${u}]|$))`,NO_DOT_SLASH:`(?!${a}{0,1}(?:[${u}]|$))`,NO_DOTS_SLASH:`(?!${a}{1,2}(?:[${u}]|$))`,QMARK_NO_DOT:`[^.${u}]`,START_ANCHOR:`(?:^|[${u}])`,END_ANCHOR:`(?:[${u}]|$)`},O={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:O,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:s.sep,extglobChars(w){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${w.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(w){return w===!0?_:b}}}),Si=ve(e=>{"use strict";var t=require("path"),s=process.platform==="win32",{REGEX_BACKSLASH:u,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:c}=vi();e.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),e.hasRegexChars=r=>a.test(r),e.isRegexChar=r=>r.length===1&&e.hasRegexChars(r),e.escapeRegex=r=>r.replace(c,"\\$1"),e.toPosixSlashes=r=>r.replace(u,"/"),e.removeBackslashes=r=>r.replace(i,n=>n==="\\"?"":n),e.supportsLookbehinds=()=>{let r=process.version.slice(1).split(".").map(Number);return r.length===3&&r[0]>=9||r[0]===8&&r[1]>=10},e.isWindows=r=>r&&typeof r.windows=="boolean"?r.windows:s===!0||t.sep==="\\",e.escapeLast=(r,n,o)=>{let l=r.lastIndexOf(n,o);return l===-1?r:r[l-1]==="\\"?e.escapeLast(r,n,l-1):`${r.slice(0,l)}\\${r.slice(l)}`},e.removePrefix=(r,n={})=>{let o=r;return o.startsWith("./")&&(o=o.slice(2),n.prefix="./"),o},e.wrapOutput=(r,n={},o={})=>{let l=o.contains?"":"^",h=o.contains?"":"$",p=`${l}(?:${r})${h}`;return n.negated===!0&&(p=`(?:^(?!${p}).*$)`),p}}),u1=ve((e,t)=>{"use strict";var s=Si(),{CHAR_ASTERISK:u,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:c,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:n,CHAR_FORWARD_SLASH:o,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:d,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:y}=vi(),S=se(_=>_===o||_===a,"isPathSeparator"),E=se(_=>{_.isPrefix!==!0&&(_.depth=_.isGlobstar?1/0:1)},"depth"),b=se((_,O)=>{let w=O||{},A=_.length-1,I=w.parts===!0||w.scanToEnd===!0,P=[],L=[],$=[],x=_,M=-1,U=0,V=0,B=!1,G=!1,W=!1,N=!1,D=!1,T=!1,C=!1,Z=!1,X=!1,Q=!1,k=0,F,z,j={value:"",depth:0,isGlob:!1},q=se(()=>M>=A,"eos"),J=se(()=>x.charCodeAt(M+1),"peek"),Y=se(()=>(F=z,x.charCodeAt(++M)),"advance");for(;M<A;){z=Y();let te;if(z===a){C=j.backslashes=!0,z=Y(),z===l&&(T=!0);continue}if(T===!0||z===l){for(k++;q()!==!0&&(z=Y());){if(z===a){C=j.backslashes=!0,Y();continue}if(z===l){k++;continue}if(T!==!0&&z===r&&(z=Y())===r){if(B=j.isBrace=!0,W=j.isGlob=!0,Q=!0,I===!0)continue;break}if(T!==!0&&z===c){if(B=j.isBrace=!0,W=j.isGlob=!0,Q=!0,I===!0)continue;break}if(z===m&&(k--,k===0)){T=!1,B=j.isBrace=!0,Q=!0;break}}if(I===!0)continue;break}if(z===o){if(P.push(M),L.push(j),j={value:"",depth:0,isGlob:!1},Q===!0)continue;if(F===r&&M===U+1){U+=2;continue}V=M+1;continue}if(w.noext!==!0&&(z===d||z===i||z===u||z===g||z===n)&&J()===h){if(W=j.isGlob=!0,N=j.isExtglob=!0,Q=!0,z===n&&M===U&&(X=!0),I===!0){for(;q()!==!0&&(z=Y());){if(z===a){C=j.backslashes=!0,z=Y();continue}if(z===f){W=j.isGlob=!0,Q=!0;break}}continue}break}if(z===u){if(F===u&&(D=j.isGlobstar=!0),W=j.isGlob=!0,Q=!0,I===!0)continue;break}if(z===g){if(W=j.isGlob=!0,Q=!0,I===!0)continue;break}if(z===p){for(;q()!==!0&&(te=Y());){if(te===a){C=j.backslashes=!0,Y();continue}if(te===y){G=j.isBracket=!0,W=j.isGlob=!0,Q=!0;break}}if(I===!0)continue;break}if(w.nonegate!==!0&&z===n&&M===U){Z=j.negated=!0,U++;continue}if(w.noparen!==!0&&z===h){if(W=j.isGlob=!0,I===!0){for(;q()!==!0&&(z=Y());){if(z===h){C=j.backslashes=!0,z=Y();continue}if(z===f){Q=!0;break}}continue}break}if(W===!0){if(Q=!0,I===!0)continue;break}}w.noext===!0&&(N=!1,W=!1);let R=x,H="",ee="";U>0&&(H=x.slice(0,U),x=x.slice(U),V-=U),R&&W===!0&&V>0?(R=x.slice(0,V),ee=x.slice(V)):W===!0?(R="",ee=x):R=x,R&&R!==""&&R!=="/"&&R!==x&&S(R.charCodeAt(R.length-1))&&(R=R.slice(0,-1)),w.unescape===!0&&(ee&&(ee=s.removeBackslashes(ee)),R&&C===!0&&(R=s.removeBackslashes(R)));let ne={prefix:H,input:_,start:U,base:R,glob:ee,isBrace:B,isBracket:G,isGlob:W,isExtglob:N,isGlobstar:D,negated:Z,negatedExtglob:X};if(w.tokens===!0&&(ne.maxDepth=0,S(z)||L.push(j),ne.tokens=L),w.parts===!0||w.tokens===!0){let te;for(let ae=0;ae<P.length;ae++){let he=te?te+1:U,re=P[ae],ue=_.slice(he,re);w.tokens&&(ae===0&&U!==0?(L[ae].isPrefix=!0,L[ae].value=H):L[ae].value=ue,E(L[ae]),ne.maxDepth+=L[ae].depth),(ae!==0||ue!=="")&&$.push(ue),te=re}if(te&&te+1<_.length){let ae=_.slice(te+1);$.push(ae),w.tokens&&(L[L.length-1].value=ae,E(L[L.length-1]),ne.maxDepth+=L[L.length-1].depth)}ne.slashes=P,ne.parts=$}return ne},"scan");t.exports=b}),h1=ve((e,t)=>{"use strict";var s=vi(),u=Si(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:n}=s,o=se((p,d)=>{if(typeof d.expandRange=="function")return d.expandRange(...p,d);p.sort();let g=`[${p.join("-")}]`;try{new RegExp(g)}catch{return p.map(m=>u.escapeRegex(m)).join("..")}return g},"expandRange"),l=se((p,d)=>`Missing ${p}: "${d}" - use "\\\\${d}" to match literal characters`,"syntaxError"),h=se((p,d)=>{if(typeof p!="string")throw new TypeError("Expected a string");p=n[p]||p;let g={...d},m=typeof g.maxLength=="number"?Math.min(i,g.maxLength):i,f=p.length;if(f>m)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${m}`);let y={type:"bos",value:"",output:g.prepend||""},S=[y],E=g.capture?"":"?:",b=u.isWindows(d),_=s.globChars(b),O=s.extglobChars(_),{DOT_LITERAL:w,PLUS_LITERAL:A,SLASH_LITERAL:I,ONE_CHAR:P,DOTS_SLASH:L,NO_DOT:$,NO_DOT_SLASH:x,NO_DOTS_SLASH:M,QMARK:U,QMARK_NO_DOT:V,STAR:B,START_ANCHOR:G}=_,W=se(re=>`(${E}(?:(?!${G}${re.dot?L:w}).)*?)`,"globstar"),N=g.dot?"":$,D=g.dot?U:V,T=g.bash===!0?W(g):B;g.capture&&(T=`(${T})`),typeof g.noext=="boolean"&&(g.noextglob=g.noext);let C={input:p,index:-1,start:0,dot:g.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:S};p=u.removePrefix(p,C),f=p.length;let Z=[],X=[],Q=[],k=y,F,z=se(()=>C.index===f-1,"eos"),j=C.peek=(re=1)=>p[C.index+re],q=C.advance=()=>p[++C.index]||"",J=se(()=>p.slice(C.index+1),"remaining"),Y=se((re="",ue=0)=>{C.consumed+=re,C.index+=ue},"consume"),R=se(re=>{C.output+=re.output!=null?re.output:re.value,Y(re.value)},"append"),H=se(()=>{let re=1;for(;j()==="!"&&(j(2)!=="("||j(3)==="?");)q(),C.start++,re++;return re%2===0?!1:(C.negated=!0,C.start++,!0)},"negate"),ee=se(re=>{C[re]++,Q.push(re)},"increment"),ne=se(re=>{C[re]--,Q.pop()},"decrement"),te=se(re=>{if(k.type==="globstar"){let ue=C.braces>0&&(re.type==="comma"||re.type==="brace"),ie=re.extglob===!0||Z.length&&(re.type==="pipe"||re.type==="paren");re.type!=="slash"&&re.type!=="paren"&&!ue&&!ie&&(C.output=C.output.slice(0,-k.output.length),k.type="star",k.value="*",k.output=T,C.output+=k.output)}if(Z.length&&re.type!=="paren"&&(Z[Z.length-1].inner+=re.value),(re.value||re.output)&&R(re),k&&k.type==="text"&&re.type==="text"){k.value+=re.value,k.output=(k.output||"")+re.value;return}re.prev=k,S.push(re),k=re},"push"),ae=se((re,ue)=>{let ie={...O[ue],conditions:1,inner:""};ie.prev=k,ie.parens=C.parens,ie.output=C.output;let le=(g.capture?"(":"")+ie.open;ee("parens"),te({type:re,value:ue,output:C.output?"":P}),te({type:"paren",extglob:!0,value:q(),output:le}),Z.push(ie)},"extglobOpen"),he=se(re=>{let ue=re.close+(g.capture?")":""),ie;if(re.type==="negate"){let le=T;if(re.inner&&re.inner.length>1&&re.inner.includes("/")&&(le=W(g)),(le!==T||z()||/^\)+$/.test(J()))&&(ue=re.close=`)$))${le}`),re.inner.includes("*")&&(ie=J())&&/^\.[^\\/.]+$/.test(ie)){let fe=h(ie,{...d,fastpaths:!1}).output;ue=re.close=`)${fe})${le})`}re.prev.type==="bos"&&(C.negatedExtglob=!0)}te({type:"paren",extglob:!0,value:F,output:ue}),ne("parens")},"extglobClose");if(g.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(p)){let re=!1,ue=p.replace(r,(ie,le,fe,me,ce,pe)=>me==="\\"?(re=!0,ie):me==="?"?le?le+me+(ce?U.repeat(ce.length):""):pe===0?D+(ce?U.repeat(ce.length):""):U.repeat(fe.length):me==="."?w.repeat(fe.length):me==="*"?le?le+me+(ce?T:""):T:le?ie:`\\${ie}`);return re===!0&&(g.unescape===!0?ue=ue.replace(/\\/g,""):ue=ue.replace(/\\+/g,ie=>ie.length%2===0?"\\\\":ie?"\\":"")),ue===p&&g.contains===!0?(C.output=p,C):(C.output=u.wrapOutput(ue,C,d),C)}for(;!z();){if(F=q(),F==="\0")continue;if(F==="\\"){let ie=j();if(ie==="/"&&g.bash!==!0||ie==="."||ie===";")continue;if(!ie){F+="\\",te({type:"text",value:F});continue}let le=/^\\+/.exec(J()),fe=0;if(le&&le[0].length>2&&(fe=le[0].length,C.index+=fe,fe%2!==0&&(F+="\\")),g.unescape===!0?F=q():F+=q(),C.brackets===0){te({type:"text",value:F});continue}}if(C.brackets>0&&(F!=="]"||k.value==="["||k.value==="[^")){if(g.posix!==!1&&F===":"){let ie=k.value.slice(1);if(ie.includes("[")&&(k.posix=!0,ie.includes(":"))){let le=k.value.lastIndexOf("["),fe=k.value.slice(0,le),me=k.value.slice(le+2),ce=a[me];if(ce){k.value=fe+ce,C.backtrack=!0,q(),!y.output&&S.indexOf(k)===1&&(y.output=P);continue}}}(F==="["&&j()!==":"||F==="-"&&j()==="]")&&(F=`\\${F}`),F==="]"&&(k.value==="["||k.value==="[^")&&(F=`\\${F}`),g.posix===!0&&F==="!"&&k.value==="["&&(F="^"),k.value+=F,R({value:F});continue}if(C.quotes===1&&F!=='"'){F=u.escapeRegex(F),k.value+=F,R({value:F});continue}if(F==='"'){C.quotes=C.quotes===1?0:1,g.keepQuotes===!0&&te({type:"text",value:F});continue}if(F==="("){ee("parens"),te({type:"paren",value:F});continue}if(F===")"){if(C.parens===0&&g.strictBrackets===!0)throw new SyntaxError(l("opening","("));let ie=Z[Z.length-1];if(ie&&C.parens===ie.parens+1){he(Z.pop());continue}te({type:"paren",value:F,output:C.parens?")":"\\)"}),ne("parens");continue}if(F==="["){if(g.nobracket===!0||!J().includes("]")){if(g.nobracket!==!0&&g.strictBrackets===!0)throw new SyntaxError(l("closing","]"));F=`\\${F}`}else ee("brackets");te({type:"bracket",value:F});continue}if(F==="]"){if(g.nobracket===!0||k&&k.type==="bracket"&&k.value.length===1){te({type:"text",value:F,output:`\\${F}`});continue}if(C.brackets===0){if(g.strictBrackets===!0)throw new SyntaxError(l("opening","["));te({type:"text",value:F,output:`\\${F}`});continue}ne("brackets");let ie=k.value.slice(1);if(k.posix!==!0&&ie[0]==="^"&&!ie.includes("/")&&(F=`/${F}`),k.value+=F,R({value:F}),g.literalBrackets===!1||u.hasRegexChars(ie))continue;let le=u.escapeRegex(k.value);if(C.output=C.output.slice(0,-k.value.length),g.literalBrackets===!0){C.output+=le,k.value=le;continue}k.value=`(${E}${le}|${k.value})`,C.output+=k.value;continue}if(F==="{"&&g.nobrace!==!0){ee("braces");let ie={type:"brace",value:F,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};X.push(ie),te(ie);continue}if(F==="}"){let ie=X[X.length-1];if(g.nobrace===!0||!ie){te({type:"text",value:F,output:F});continue}let le=")";if(ie.dots===!0){let fe=S.slice(),me=[];for(let ce=fe.length-1;ce>=0&&(S.pop(),fe[ce].type!=="brace");ce--)fe[ce].type!=="dots"&&me.unshift(fe[ce].value);le=o(me,g),C.backtrack=!0}if(ie.comma!==!0&&ie.dots!==!0){let fe=C.output.slice(0,ie.outputIndex),me=C.tokens.slice(ie.tokensIndex);ie.value=ie.output="\\{",F=le="\\}",C.output=fe;for(let ce of me)C.output+=ce.output||ce.value}te({type:"brace",value:F,output:le}),ne("braces"),X.pop();continue}if(F==="|"){Z.length>0&&Z[Z.length-1].conditions++,te({type:"text",value:F});continue}if(F===","){let ie=F,le=X[X.length-1];le&&Q[Q.length-1]==="braces"&&(le.comma=!0,ie="|"),te({type:"comma",value:F,output:ie});continue}if(F==="/"){if(k.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",S.pop(),k=y;continue}te({type:"slash",value:F,output:I});continue}if(F==="."){if(C.braces>0&&k.type==="dot"){k.value==="."&&(k.output=w);let ie=X[X.length-1];k.type="dots",k.output+=F,k.value+=F,ie.dots=!0;continue}if(C.braces+C.parens===0&&k.type!=="bos"&&k.type!=="slash"){te({type:"text",value:F,output:w});continue}te({type:"dot",value:F,output:w});continue}if(F==="?"){if(!(k&&k.value==="(")&&g.noextglob!==!0&&j()==="("&&j(2)!=="?"){ae("qmark",F);continue}if(k&&k.type==="paren"){let ie=j(),le=F;if(ie==="<"&&!u.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(k.value==="("&&!/[!=<:]/.test(ie)||ie==="<"&&!/<([!=]|\w+>)/.test(J()))&&(le=`\\${F}`),te({type:"text",value:F,output:le});continue}if(g.dot!==!0&&(k.type==="slash"||k.type==="bos")){te({type:"qmark",value:F,output:V});continue}te({type:"qmark",value:F,output:U});continue}if(F==="!"){if(g.noextglob!==!0&&j()==="("&&(j(2)!=="?"||!/[!=<:]/.test(j(3)))){ae("negate",F);continue}if(g.nonegate!==!0&&C.index===0){H();continue}}if(F==="+"){if(g.noextglob!==!0&&j()==="("&&j(2)!=="?"){ae("plus",F);continue}if(k&&k.value==="("||g.regex===!1){te({type:"plus",value:F,output:A});continue}if(k&&(k.type==="bracket"||k.type==="paren"||k.type==="brace")||C.parens>0){te({type:"plus",value:F});continue}te({type:"plus",value:A});continue}if(F==="@"){if(g.noextglob!==!0&&j()==="("&&j(2)!=="?"){te({type:"at",extglob:!0,value:F,output:""});continue}te({type:"text",value:F});continue}if(F!=="*"){(F==="$"||F==="^")&&(F=`\\${F}`);let ie=c.exec(J());ie&&(F+=ie[0],C.index+=ie[0].length),te({type:"text",value:F});continue}if(k&&(k.type==="globstar"||k.star===!0)){k.type="star",k.star=!0,k.value+=F,k.output=T,C.backtrack=!0,C.globstar=!0,Y(F);continue}let re=J();if(g.noextglob!==!0&&/^\([^?]/.test(re)){ae("star",F);continue}if(k.type==="star"){if(g.noglobstar===!0){Y(F);continue}let ie=k.prev,le=ie.prev,fe=ie.type==="slash"||ie.type==="bos",me=le&&(le.type==="star"||le.type==="globstar");if(g.bash===!0&&(!fe||re[0]&&re[0]!=="/")){te({type:"star",value:F,output:""});continue}let ce=C.braces>0&&(ie.type==="comma"||ie.type==="brace"),pe=Z.length&&(ie.type==="pipe"||ie.type==="paren");if(!fe&&ie.type!=="paren"&&!ce&&!pe){te({type:"star",value:F,output:""});continue}for(;re.slice(0,3)==="/**";){let de=p[C.index+4];if(de&&de!=="/")break;re=re.slice(3),Y("/**",3)}if(ie.type==="bos"&&z()){k.type="globstar",k.value+=F,k.output=W(g),C.output=k.output,C.globstar=!0,Y(F);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&!me&&z()){C.output=C.output.slice(0,-(ie.output+k.output).length),ie.output=`(?:${ie.output}`,k.type="globstar",k.output=W(g)+(g.strictSlashes?")":"|$)"),k.value+=F,C.globstar=!0,C.output+=ie.output+k.output,Y(F);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&re[0]==="/"){let de=re[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(ie.output+k.output).length),ie.output=`(?:${ie.output}`,k.type="globstar",k.output=`${W(g)}${I}|${I}${de})`,k.value+=F,C.output+=ie.output+k.output,C.globstar=!0,Y(F+q()),te({type:"slash",value:"/",output:""});continue}if(ie.type==="bos"&&re[0]==="/"){k.type="globstar",k.value+=F,k.output=`(?:^|${I}|${W(g)}${I})`,C.output=k.output,C.globstar=!0,Y(F+q()),te({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-k.output.length),k.type="globstar",k.output=W(g),k.value+=F,C.output+=k.output,C.globstar=!0,Y(F);continue}let ue={type:"star",value:F,output:T};if(g.bash===!0){ue.output=".*?",(k.type==="bos"||k.type==="slash")&&(ue.output=N+ue.output),te(ue);continue}if(k&&(k.type==="bracket"||k.type==="paren")&&g.regex===!0){ue.output=F,te(ue);continue}(C.index===C.start||k.type==="slash"||k.type==="dot")&&(k.type==="dot"?(C.output+=x,k.output+=x):g.dot===!0?(C.output+=M,k.output+=M):(C.output+=N,k.output+=N),j()!=="*"&&(C.output+=P,k.output+=P)),te(ue)}for(;C.brackets>0;){if(g.strictBrackets===!0)throw new SyntaxError(l("closing","]"));C.output=u.escapeLast(C.output,"["),ne("brackets")}for(;C.parens>0;){if(g.strictBrackets===!0)throw new SyntaxError(l("closing",")"));C.output=u.escapeLast(C.output,"("),ne("parens")}for(;C.braces>0;){if(g.strictBrackets===!0)throw new SyntaxError(l("closing","}"));C.output=u.escapeLast(C.output,"{"),ne("braces")}if(g.strictSlashes!==!0&&(k.type==="star"||k.type==="bracket")&&te({type:"maybe_slash",value:"",output:`${I}?`}),C.backtrack===!0){C.output="";for(let re of C.tokens)C.output+=re.output!=null?re.output:re.value,re.suffix&&(C.output+=re.suffix)}return C},"parse");h.fastpaths=(p,d)=>{let g={...d},m=typeof g.maxLength=="number"?Math.min(i,g.maxLength):i,f=p.length;if(f>m)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${m}`);p=n[p]||p;let y=u.isWindows(d),{DOT_LITERAL:S,SLASH_LITERAL:E,ONE_CHAR:b,DOTS_SLASH:_,NO_DOT:O,NO_DOTS:w,NO_DOTS_SLASH:A,STAR:I,START_ANCHOR:P}=s.globChars(y),L=g.dot?w:O,$=g.dot?A:O,x=g.capture?"":"?:",M={negated:!1,prefix:""},U=g.bash===!0?".*?":I;g.capture&&(U=`(${U})`);let V=se(N=>N.noglobstar===!0?U:`(${x}(?:(?!${P}${N.dot?_:S}).)*?)`,"globstar"),B=se(N=>{switch(N){case"*":return`${L}${b}${U}`;case".*":return`${S}${b}${U}`;case"*.*":return`${L}${U}${S}${b}${U}`;case"*/*":return`${L}${U}${E}${b}${$}${U}`;case"**":return L+V(g);case"**/*":return`(?:${L}${V(g)}${E})?${$}${b}${U}`;case"**/*.*":return`(?:${L}${V(g)}${E})?${$}${U}${S}${b}${U}`;case"**/.*":return`(?:${L}${V(g)}${E})?${S}${b}${U}`;default:{let D=/^(.*?)\.(\w+)$/.exec(N);if(!D)return;let T=B(D[1]);return T?T+S+D[2]:void 0}}},"create"),G=u.removePrefix(p,M),W=B(G);return W&&g.strictSlashes!==!0&&(W+=`${E}?`),W},t.exports=h}),p1=ve((e,t)=>{"use strict";var s=require("path"),u=u1(),i=h1(),a=Si(),c=vi(),r=se(o=>o&&typeof o=="object"&&!Array.isArray(o),"isObject"),n=se((o,l,h=!1)=>{if(Array.isArray(o)){let E=o.map(b=>n(b,l,h));return se(b=>{for(let _ of E){let O=_(b);if(O)return O}return!1},"arrayMatcher")}let p=r(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!p)throw new TypeError("Expected pattern to be a non-empty string");let d=l||{},g=a.isWindows(l),m=p?n.compileRe(o,l):n.makeRe(o,l,!1,!0),f=m.state;delete m.state;let y=se(()=>!1,"isIgnored");if(d.ignore){let E={...l,ignore:null,onMatch:null,onResult:null};y=n(d.ignore,E,h)}let S=se((E,b=!1)=>{let{isMatch:_,match:O,output:w}=n.test(E,m,l,{glob:o,posix:g}),A={glob:o,state:f,regex:m,posix:g,input:E,output:w,match:O,isMatch:_};return typeof d.onResult=="function"&&d.onResult(A),_===!1?(A.isMatch=!1,b?A:!1):y(E)?(typeof d.onIgnore=="function"&&d.onIgnore(A),A.isMatch=!1,b?A:!1):(typeof d.onMatch=="function"&&d.onMatch(A),b?A:!0)},"matcher");return h&&(S.state=f),S},"picomatch");n.test=(o,l,h,{glob:p,posix:d}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};let g=h||{},m=g.format||(d?a.toPosixSlashes:null),f=o===p,y=f&&m?m(o):o;return f===!1&&(y=m?m(o):o,f=y===p),(f===!1||g.capture===!0)&&(g.matchBase===!0||g.basename===!0?f=n.matchBase(o,l,h,d):f=l.exec(y)),{isMatch:!!f,match:f,output:y}},n.matchBase=(o,l,h,p=a.isWindows(h))=>(l instanceof RegExp?l:n.makeRe(l,h)).test(s.basename(o)),n.isMatch=(o,l,h)=>n(l,h)(o),n.parse=(o,l)=>Array.isArray(o)?o.map(h=>n.parse(h,l)):i(o,{...l,fastpaths:!1}),n.scan=(o,l)=>u(o,l),n.compileRe=(o,l,h=!1,p=!1)=>{if(h===!0)return o.output;let d=l||{},g=d.contains?"":"^",m=d.contains?"":"$",f=`${g}(?:${o.output})${m}`;o&&o.negated===!0&&(f=`^(?!${f}).*$`);let y=n.toRegex(f,l);return p===!0&&(y.state=o),y},n.makeRe=(o,l={},h=!1,p=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let d={negated:!1,fastpaths:!0};return l.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(d.output=i.fastpaths(o,l)),d.output||(d=i(o,l)),n.compileRe(d,l,h,p)},n.toRegex=(o,l)=>{try{let h=l||{};return new RegExp(o,h.flags||(h.nocase?"i":""))}catch(h){if(l&&l.debug===!0)throw h;return/$^/}},n.constants=c,t.exports=n}),d1=ve((e,t)=>{"use strict";t.exports=p1()}),f1=ve((e,t)=>{"use strict";var s=require("util"),u=c1(),i=d1(),a=Si(),c=se(o=>o===""||o==="./","isEmptyString"),r=se(o=>{let l=o.indexOf("{");return l>-1&&o.indexOf("}",l)>-1},"hasBraces"),n=se((o,l,h)=>{l=[].concat(l),o=[].concat(o);let p=new Set,d=new Set,g=new Set,m=0,f=se(S=>{g.add(S.output),h&&h.onResult&&h.onResult(S)},"onResult");for(let S=0;S<l.length;S++){let E=i(String(l[S]),{...h,onResult:f},!0),b=E.state.negated||E.state.negatedExtglob;b&&m++;for(let _ of o){let O=E(_,!0);(b?!O.isMatch:O.isMatch)&&(b?p.add(O.output):(p.delete(O.output),d.add(O.output)))}}let y=(m===l.length?[...g]:[...d]).filter(S=>!p.has(S));if(h&&y.length===0){if(h.failglob===!0)throw new Error(`No matches found for "${l.join(", ")}"`);if(h.nonull===!0||h.nullglob===!0)return h.unescape?l.map(S=>S.replace(/\\/g,"")):l}return y},"micromatch");n.match=n,n.matcher=(o,l)=>i(o,l),n.isMatch=(o,l,h)=>i(l,h)(o),n.any=n.isMatch,n.not=(o,l,h={})=>{l=[].concat(l).map(String);let p=new Set,d=[],g=se(f=>{h.onResult&&h.onResult(f),d.push(f.output)},"onResult"),m=new Set(n(o,l,{...h,onResult:g}));for(let f of d)m.has(f)||p.add(f);return[...p]},n.contains=(o,l,h)=>{if(typeof o!="string")throw new TypeError(`Expected a string: "${s.inspect(o)}"`);if(Array.isArray(l))return l.some(p=>n.contains(o,p,h));if(typeof l=="string"){if(c(o)||c(l))return!1;if(o.includes(l)||o.startsWith("./")&&o.slice(2).includes(l))return!0}return n.isMatch(o,l,{...h,contains:!0})},n.matchKeys=(o,l,h)=>{if(!a.isObject(o))throw new TypeError("Expected the first argument to be an object");let p=n(Object.keys(o),l,h),d={};for(let g of p)d[g]=o[g];return d},n.some=(o,l,h)=>{let p=[].concat(o);for(let d of[].concat(l)){let g=i(String(d),h);if(p.some(m=>g(m)))return!0}return!1},n.every=(o,l,h)=>{let p=[].concat(o);for(let d of[].concat(l)){let g=i(String(d),h);if(!p.every(m=>g(m)))return!1}return!0},n.all=(o,l,h)=>{if(typeof o!="string")throw new TypeError(`Expected a string: "${s.inspect(o)}"`);return[].concat(l).every(p=>i(p,h)(o))},n.capture=(o,l,h)=>{let p=a.isWindows(h),d=i.makeRe(String(o),{...h,capture:!0}).exec(p?a.toPosixSlashes(l):l);if(d)return d.slice(1).map(g=>g===void 0?"":g)},n.makeRe=(...o)=>i.makeRe(...o),n.scan=(...o)=>i.scan(...o),n.parse=(o,l)=>{let h=[];for(let p of[].concat(o||[]))for(let d of u(String(p),l))h.push(i.parse(d,l));return h},n.braces=(o,l)=>{if(typeof o!="string")throw new TypeError("Expected a string");return l&&l.nobrace===!0||!r(o)?[o]:u(o,l)},n.braceExpand=(o,l)=>{if(typeof o!="string")throw new TypeError("Expected a string");return n.braces(o,{...l,expand:!0})},n.hasBraces=r,t.exports=n}),g1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAbsolute=e.partitionAbsoluteAndRelative=e.removeDuplicateSlashes=e.matchAny=e.convertPatternsToRe=e.makeRe=e.getPatternParts=e.expandBraceExpansion=e.expandPatternsWithBraceExpansion=e.isAffectDepthOfReadingPattern=e.endsWithSlashGlobStar=e.hasGlobStar=e.getBaseDirectory=e.isPatternRelatedToParentDirectory=e.getPatternsOutsideCurrentDirectory=e.getPatternsInsideCurrentDirectory=e.getPositivePatterns=e.getNegativePatterns=e.isPositivePattern=e.isNegativePattern=e.convertToNegativePattern=e.convertToPositivePattern=e.isDynamicPattern=e.isStaticPattern=void 0;var t=require("path"),s=r1(),u=f1(),i="**",a="\\",c=/[*?]|^!/,r=/\[[^[]*]/,n=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,o=/[!*+?@]\([^(]*\)/,l=/,|\.\./,h=/(?!^)\/{2,}/g;function p(D,T={}){return!d(D,T)}se(p,"isStaticPattern"),e.isStaticPattern=p;function d(D,T={}){return D===""?!1:!!(T.caseSensitiveMatch===!1||D.includes(a)||c.test(D)||r.test(D)||n.test(D)||T.extglob!==!1&&o.test(D)||T.braceExpansion!==!1&&g(D))}se(d,"isDynamicPattern"),e.isDynamicPattern=d;function g(D){let T=D.indexOf("{");if(T===-1)return!1;let C=D.indexOf("}",T+1);if(C===-1)return!1;let Z=D.slice(T,C);return l.test(Z)}se(g,"hasBraceExpansion");function m(D){return y(D)?D.slice(1):D}se(m,"convertToPositivePattern"),e.convertToPositivePattern=m;function f(D){return"!"+D}se(f,"convertToNegativePattern"),e.convertToNegativePattern=f;function y(D){return D.startsWith("!")&&D[1]!=="("}se(y,"isNegativePattern"),e.isNegativePattern=y;function S(D){return!y(D)}se(S,"isPositivePattern"),e.isPositivePattern=S;function E(D){return D.filter(y)}se(E,"getNegativePatterns"),e.getNegativePatterns=E;function b(D){return D.filter(S)}se(b,"getPositivePatterns"),e.getPositivePatterns=b;function _(D){return D.filter(T=>!w(T))}se(_,"getPatternsInsideCurrentDirectory"),e.getPatternsInsideCurrentDirectory=_;function O(D){return D.filter(w)}se(O,"getPatternsOutsideCurrentDirectory"),e.getPatternsOutsideCurrentDirectory=O;function w(D){return D.startsWith("..")||D.startsWith("./..")}se(w,"isPatternRelatedToParentDirectory"),e.isPatternRelatedToParentDirectory=w;function A(D){return s(D,{flipBackslashes:!1})}se(A,"getBaseDirectory"),e.getBaseDirectory=A;function I(D){return D.includes(i)}se(I,"hasGlobStar"),e.hasGlobStar=I;function P(D){return D.endsWith("/"+i)}se(P,"endsWithSlashGlobStar"),e.endsWithSlashGlobStar=P;function L(D){let T=t.basename(D);return P(D)||p(T)}se(L,"isAffectDepthOfReadingPattern"),e.isAffectDepthOfReadingPattern=L;function $(D){return D.reduce((T,C)=>T.concat(x(C)),[])}se($,"expandPatternsWithBraceExpansion"),e.expandPatternsWithBraceExpansion=$;function x(D){let T=u.braces(D,{expand:!0,nodupes:!0,keepEscaping:!0});return T.sort((C,Z)=>C.length-Z.length),T.filter(C=>C!=="")}se(x,"expandBraceExpansion"),e.expandBraceExpansion=x;function M(D,T){let{parts:C}=u.scan(D,Object.assign(Object.assign({},T),{parts:!0}));return C.length===0&&(C=[D]),C[0].startsWith("/")&&(C[0]=C[0].slice(1),C.unshift("")),C}se(M,"getPatternParts"),e.getPatternParts=M;function U(D,T){return u.makeRe(D,T)}se(U,"makeRe"),e.makeRe=U;function V(D,T){return D.map(C=>U(C,T))}se(V,"convertPatternsToRe"),e.convertPatternsToRe=V;function B(D,T){return T.some(C=>C.test(D))}se(B,"matchAny"),e.matchAny=B;function G(D){return D.replace(h,"/")}se(G,"removeDuplicateSlashes"),e.removeDuplicateSlashes=G;function W(D){let T=[],C=[];for(let Z of D)N(Z)?T.push(Z):C.push(Z);return[T,C]}se(W,"partitionAbsoluteAndRelative"),e.partitionAbsoluteAndRelative=W;function N(D){return t.isAbsolute(D)}se(N,"isAbsolute"),e.isAbsolute=N}),m1=ve((e,t)=>{"use strict";var s=require("stream"),u=s.PassThrough,i=Array.prototype.slice;t.exports=a;function a(){let r=[],n=i.call(arguments),o=!1,l=n[n.length-1];l&&!Array.isArray(l)&&l.pipe==null?n.pop():l={};let h=l.end!==!1,p=l.pipeError===!0;l.objectMode==null&&(l.objectMode=!0),l.highWaterMark==null&&(l.highWaterMark=64*1024);let d=u(l);function g(){for(let y=0,S=arguments.length;y<S;y++)r.push(c(arguments[y],l));return m(),this}se(g,"addStream");function m(){if(o)return;o=!0;let y=r.shift();if(!y){process.nextTick(f);return}Array.isArray(y)||(y=[y]);let S=y.length+1;function E(){--S>0||(o=!1,m())}se(E,"next");function b(_){function O(){_.removeListener("merge2UnpipeEnd",O),_.removeListener("end",O),p&&_.removeListener("error",w),E()}se(O,"onend");function w(A){d.emit("error",A)}if(se(w,"onerror"),_._readableState.endEmitted)return E();_.on("merge2UnpipeEnd",O),_.on("end",O),p&&_.on("error",w),_.pipe(d,{end:!1}),_.resume()}se(b,"pipe");for(let _=0;_<y.length;_++)b(y[_]);E()}se(m,"mergeStream");function f(){o=!1,d.emit("queueDrain"),h&&d.end()}return se(f,"endStream"),d.setMaxListeners(0),d.add=g,d.on("unpipe",function(y){y.emit("merge2UnpipeEnd")}),n.length&&g.apply(null,n),d}se(a,"merge2");function c(r,n){if(Array.isArray(r))for(let o=0,l=r.length;o<l;o++)r[o]=c(r[o],n);else{if(!r._readableState&&r.pipe&&(r=r.pipe(u(n))),!r._readableState||!r.pause||!r.pipe)throw new Error("Only readable stream can be merged.");r.pause()}return r}se(c,"pauseStreams")}),y1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;var t=m1();function s(i){let a=t(i);return i.forEach(c=>{c.once("error",r=>a.emit("error",r))}),a.once("close",()=>u(i)),a.once("end",()=>u(i)),a}se(s,"merge"),e.merge=s;function u(i){i.forEach(a=>a.emit("close"))}se(u,"propagateCloseEventToSources")}),v1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEmpty=e.isString=void 0;function t(u){return typeof u=="string"}se(t,"isString"),e.isString=t;function s(u){return u===""}se(s,"isEmpty"),e.isEmpty=s}),$t=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.string=e.stream=e.pattern=e.path=e.fs=e.errno=e.array=void 0;var t=XC();e.array=t;var s=YC();e.errno=s;var u=QC();e.fs=u;var i=e1();e.path=i;var a=g1();e.pattern=a;var c=y1();e.stream=c;var r=v1();e.string=r}),S1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertPatternGroupToTask=e.convertPatternGroupsToTasks=e.groupPatternsByBaseDirectory=e.getNegativePatternsAsPositive=e.getPositivePatterns=e.convertPatternsToTasks=e.generate=void 0;var t=$t();function s(l,h){let p=u(l,h),d=u(h.ignore,h),g=a(p),m=c(p,d),f=g.filter(b=>t.pattern.isStaticPattern(b,h)),y=g.filter(b=>t.pattern.isDynamicPattern(b,h)),S=i(f,m,!1),E=i(y,m,!0);return S.concat(E)}se(s,"generate"),e.generate=s;function u(l,h){let p=l;return h.braceExpansion&&(p=t.pattern.expandPatternsWithBraceExpansion(p)),h.baseNameMatch&&(p=p.map(d=>d.includes("/")?d:`**/${d}`)),p.map(d=>t.pattern.removeDuplicateSlashes(d))}se(u,"processPatterns");function i(l,h,p){let d=[],g=t.pattern.getPatternsOutsideCurrentDirectory(l),m=t.pattern.getPatternsInsideCurrentDirectory(l),f=r(g),y=r(m);return d.push(...n(f,h,p)),"."in y?d.push(o(".",m,h,p)):d.push(...n(y,h,p)),d}se(i,"convertPatternsToTasks"),e.convertPatternsToTasks=i;function a(l){return t.pattern.getPositivePatterns(l)}se(a,"getPositivePatterns"),e.getPositivePatterns=a;function c(l,h){return t.pattern.getNegativePatterns(l).concat(h).map(t.pattern.convertToPositivePattern)}se(c,"getNegativePatternsAsPositive"),e.getNegativePatternsAsPositive=c;function r(l){let h={};return l.reduce((p,d)=>{let g=t.pattern.getBaseDirectory(d);return g in p?p[g].push(d):p[g]=[d],p},h)}se(r,"groupPatternsByBaseDirectory"),e.groupPatternsByBaseDirectory=r;function n(l,h,p){return Object.keys(l).map(d=>o(d,l[d],h,p))}se(n,"convertPatternGroupsToTasks"),e.convertPatternGroupsToTasks=n;function o(l,h,p,d){return{dynamic:d,positive:h,negative:p,base:l,patterns:[].concat(h,p.map(t.pattern.convertToNegativePattern))}}se(o,"convertPatternGroupToTask"),e.convertPatternGroupToTask=o}),E1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.read=void 0;function t(i,a,c){a.fs.lstat(i,(r,n)=>{if(r!==null){s(c,r);return}if(!n.isSymbolicLink()||!a.followSymbolicLink){u(c,n);return}a.fs.stat(i,(o,l)=>{if(o!==null){if(a.throwErrorOnBrokenSymbolicLink){s(c,o);return}u(c,n);return}a.markSymbolicLink&&(l.isSymbolicLink=()=>!0),u(c,l)})})}se(t,"read"),e.read=t;function s(i,a){i(a)}se(s,"callFailureCallback");function u(i,a){i(null,a)}se(u,"callSuccessCallback")}),b1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.read=void 0;function t(s,u){let i=u.fs.lstatSync(s);if(!i.isSymbolicLink()||!u.followSymbolicLink)return i;try{let a=u.fs.statSync(s);return u.markSymbolicLink&&(a.isSymbolicLink=()=>!0),a}catch(a){if(!u.throwErrorOnBrokenSymbolicLink)return i;throw a}}se(t,"read"),e.read=t}),_1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;var t=require("fs");e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync};function s(u){return u===void 0?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),u)}se(s,"createFileSystemAdapter"),e.createFileSystemAdapter=s}),w1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=_1(),s=class{static{se(this,"Settings")}constructor(u={}){this._options=u,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=t.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(u,i){return u??i}};e.default=s}),pr=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.statSync=e.stat=e.Settings=void 0;var t=E1(),s=b1(),u=w1();e.Settings=u.default;function i(r,n,o){if(typeof n=="function"){t.read(r,c(),n);return}t.read(r,c(n),o)}se(i,"stat"),e.stat=i;function a(r,n){let o=c(n);return s.read(r,o)}se(a,"statSync"),e.statSync=a;function c(r={}){return r instanceof u.default?r:new u.default(r)}se(c,"getSettings")}),O1=ve((e,t)=>{var s;t.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(global):u=>(s||(s=Promise.resolve())).then(u).catch(i=>setTimeout(()=>{throw i},0))}),R1=ve((e,t)=>{t.exports=u;var s=O1();function u(i,a){let c,r,n,o=!0;Array.isArray(i)?(c=[],r=i.length):(n=Object.keys(i),c={},r=n.length);function l(p){function d(){a&&a(p,c),a=null}se(d,"end"),o?s(d):d()}se(l,"done");function h(p,d,g){c[p]=g,(--r===0||d)&&l(d)}se(h,"each"),r?n?n.forEach(function(p){i[p](function(d,g){h(p,d,g)})}):i.forEach(function(p,d){p(function(g,m){h(d,g,m)})}):l(null),o=!1}se(u,"runParallel")}),Sp=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var t=process.versions.node.split(".");if(t[0]===void 0||t[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var s=Number.parseInt(t[0],10),u=Number.parseInt(t[1],10),i=10,a=10,c=s>i,r=s===i&&u>=a;e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=c||r}),A1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDirentFromStats=void 0;var t=class{static{se(this,"DirentFromStats")}constructor(u,i){this.name=u,this.isBlockDevice=i.isBlockDevice.bind(i),this.isCharacterDevice=i.isCharacterDevice.bind(i),this.isDirectory=i.isDirectory.bind(i),this.isFIFO=i.isFIFO.bind(i),this.isFile=i.isFile.bind(i),this.isSocket=i.isSocket.bind(i),this.isSymbolicLink=i.isSymbolicLink.bind(i)}};function s(u,i){return new t(u,i)}se(s,"createDirentFromStats"),e.createDirentFromStats=s}),Ep=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fs=void 0;var t=A1();e.fs=t}),bp=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.joinPathSegments=void 0;function t(s,u,i){return s.endsWith(i)?s+u:s+i+u}se(t,"joinPathSegments"),e.joinPathSegments=t}),C1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readdir=e.readdirWithFileTypes=e.read=void 0;var t=pr(),s=R1(),u=Sp(),i=Ep(),a=bp();function c(p,d,g){if(!d.stats&&u.IS_SUPPORT_READDIR_WITH_FILE_TYPES){r(p,d,g);return}o(p,d,g)}se(c,"read"),e.read=c;function r(p,d,g){d.fs.readdir(p,{withFileTypes:!0},(m,f)=>{if(m!==null){l(g,m);return}let y=f.map(E=>({dirent:E,name:E.name,path:a.joinPathSegments(p,E.name,d.pathSegmentSeparator)}));if(!d.followSymbolicLinks){h(g,y);return}let S=y.map(E=>n(E,d));s(S,(E,b)=>{if(E!==null){l(g,E);return}h(g,b)})})}se(r,"readdirWithFileTypes"),e.readdirWithFileTypes=r;function n(p,d){return g=>{if(!p.dirent.isSymbolicLink()){g(null,p);return}d.fs.stat(p.path,(m,f)=>{if(m!==null){if(d.throwErrorOnBrokenSymbolicLink){g(m);return}g(null,p);return}p.dirent=i.fs.createDirentFromStats(p.name,f),g(null,p)})}}se(n,"makeRplTaskEntry");function o(p,d,g){d.fs.readdir(p,(m,f)=>{if(m!==null){l(g,m);return}let y=f.map(S=>{let E=a.joinPathSegments(p,S,d.pathSegmentSeparator);return b=>{t.stat(E,d.fsStatSettings,(_,O)=>{if(_!==null){b(_);return}let w={name:S,path:E,dirent:i.fs.createDirentFromStats(S,O)};d.stats&&(w.stats=O),b(null,w)})}});s(y,(S,E)=>{if(S!==null){l(g,S);return}h(g,E)})})}se(o,"readdir"),e.readdir=o;function l(p,d){p(d)}se(l,"callFailureCallback");function h(p,d){p(null,d)}se(h,"callSuccessCallback")}),I1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readdir=e.readdirWithFileTypes=e.read=void 0;var t=pr(),s=Sp(),u=Ep(),i=bp();function a(n,o){return!o.stats&&s.IS_SUPPORT_READDIR_WITH_FILE_TYPES?c(n,o):r(n,o)}se(a,"read"),e.read=a;function c(n,o){return o.fs.readdirSync(n,{withFileTypes:!0}).map(l=>{let h={dirent:l,name:l.name,path:i.joinPathSegments(n,l.name,o.pathSegmentSeparator)};if(h.dirent.isSymbolicLink()&&o.followSymbolicLinks)try{let p=o.fs.statSync(h.path);h.dirent=u.fs.createDirentFromStats(h.name,p)}catch(p){if(o.throwErrorOnBrokenSymbolicLink)throw p}return h})}se(c,"readdirWithFileTypes"),e.readdirWithFileTypes=c;function r(n,o){return o.fs.readdirSync(n).map(l=>{let h=i.joinPathSegments(n,l,o.pathSegmentSeparator),p=t.statSync(h,o.fsStatSettings),d={name:l,path:h,dirent:u.fs.createDirentFromStats(l,p)};return o.stats&&(d.stats=p),d})}se(r,"readdir"),e.readdir=r}),T1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;var t=require("fs");e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync};function s(u){return u===void 0?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),u)}se(s,"createFileSystemAdapter"),e.createFileSystemAdapter=s}),P1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),s=pr(),u=T1(),i=class{static{se(this,"Settings")}constructor(a={}){this._options=a,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=u.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new s.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(a,c){return a??c}};e.default=i}),ma=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Settings=e.scandirSync=e.scandir=void 0;var t=C1(),s=I1(),u=P1();e.Settings=u.default;function i(r,n,o){if(typeof n=="function"){t.read(r,c(),n);return}t.read(r,c(n),o)}se(i,"scandir"),e.scandir=i;function a(r,n){let o=c(n);return s.read(r,o)}se(a,"scandirSync"),e.scandirSync=a;function c(r={}){return r instanceof u.default?r:new u.default(r)}se(c,"getSettings")}),x1=ve((e,t)=>{"use strict";function s(u){var i=new u,a=i;function c(){var n=i;return n.next?i=n.next:(i=new u,a=i),n.next=null,n}se(c,"get");function r(n){a.next=n,a=n}return se(r,"release"),{get:c,release:r}}se(s,"reusify"),t.exports=s}),N1=ve((e,t)=>{"use strict";var s=x1();function u(r,n,o){if(typeof r=="function"&&(o=n,n=r,r=null),!(o>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var l=s(a),h=null,p=null,d=0,g=null,m={push:O,drain:i,saturated:i,pause:y,paused:!1,get concurrency(){return o},set concurrency($){if(!($>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(o=$,!m.paused)for(;h&&d<o;)d++,A()},running:f,resume:b,idle:_,length:S,getQueue:E,unshift:w,empty:i,kill:I,killAndDrain:P,error:L};return m;function f(){return d}function y(){m.paused=!0}function S(){for(var $=h,x=0;$;)$=$.next,x++;return x}function E(){for(var $=h,x=[];$;)x.push($.value),$=$.next;return x}function b(){if(m.paused){if(m.paused=!1,h===null){d++,A();return}for(;h&&d<o;)d++,A()}}function _(){return d===0&&m.length()===0}function O($,x){var M=l.get();M.context=r,M.release=A,M.value=$,M.callback=x||i,M.errorHandler=g,d>=o||m.paused?p?(p.next=M,p=M):(h=M,p=M,m.saturated()):(d++,n.call(r,M.value,M.worked))}function w($,x){var M=l.get();M.context=r,M.release=A,M.value=$,M.callback=x||i,M.errorHandler=g,d>=o||m.paused?h?(M.next=h,h=M):(h=M,p=M,m.saturated()):(d++,n.call(r,M.value,M.worked))}function A($){$&&l.release($);var x=h;x&&d<=o?m.paused?d--:(p===h&&(p=null),h=x.next,x.next=null,n.call(r,x.value,x.worked),p===null&&m.empty()):--d===0&&m.drain()}function I(){h=null,p=null,m.drain=i}function P(){h=null,p=null,m.drain(),m.drain=i}function L($){g=$}}se(u,"fastqueue");function i(){}se(i,"noop");function a(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var r=this;this.worked=se(function(n,o){var l=r.callback,h=r.errorHandler,p=r.value;r.value=null,r.callback=i,r.errorHandler&&h(n,p),l.call(r.context,n,o),r.release(r)},"worked")}se(a,"Task");function c(r,n,o){typeof r=="function"&&(o=n,n=r,r=null);function l(y,S){n.call(this,y).then(function(E){S(null,E)},S)}se(l,"asyncWrapper");var h=u(r,l,o),p=h.push,d=h.unshift;return h.push=g,h.unshift=m,h.drained=f,h;function g(y){var S=new Promise(function(E,b){p(y,function(_,O){if(_){b(_);return}E(O)})});return S.catch(i),S}function m(y){var S=new Promise(function(E,b){d(y,function(_,O){if(_){b(_);return}E(O)})});return S.catch(i),S}function f(){var y=new Promise(function(S){process.nextTick(function(){if(h.idle())S();else{var E=h.drain;h.drain=function(){typeof E=="function"&&E(),S(),h.drain=E}}})});return y}}se(c,"queueAsPromised"),t.exports=u,t.exports.promise=c}),ya=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.joinPathSegments=e.replacePathSegmentSeparator=e.isAppliedFilter=e.isFatalError=void 0;function t(a,c){return a.errorFilter===null?!0:!a.errorFilter(c)}se(t,"isFatalError"),e.isFatalError=t;function s(a,c){return a===null||a(c)}se(s,"isAppliedFilter"),e.isAppliedFilter=s;function u(a,c){return a.split(/[/\\]/).join(c)}se(u,"replacePathSegmentSeparator"),e.replacePathSegmentSeparator=u;function i(a,c,r){return a===""?c:a.endsWith(r)?a+c:a+r+c}se(i,"joinPathSegments"),e.joinPathSegments=i}),_p=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=ya(),s=class{static{se(this,"Reader")}constructor(u,i){this._root=u,this._settings=i,this._root=t.replacePathSegmentSeparator(u,i.pathSegmentSeparator)}};e.default=s}),wp=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("events"),s=ma(),u=N1(),i=ya(),a=_p(),c=class extends a.default{static{se(this,"AsyncReader")}constructor(r,n){super(r,n),this._settings=n,this._scandir=s.scandir,this._emitter=new t.EventEmitter,this._queue=u(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(r){this._emitter.on("entry",r)}onError(r){this._emitter.once("error",r)}onEnd(r){this._emitter.once("end",r)}_pushToQueue(r,n){let o={directory:r,base:n};this._queue.push(o,l=>{l!==null&&this._handleError(l)})}_worker(r,n){this._scandir(r.directory,this._settings.fsScandirSettings,(o,l)=>{if(o!==null){n(o,void 0);return}for(let h of l)this._handleEntry(h,r.base);n(null,void 0)})}_handleError(r){this._isDestroyed||!i.isFatalError(this._settings,r)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",r))}_handleEntry(r,n){if(this._isDestroyed||this._isFatalError)return;let o=r.path;n!==void 0&&(r.path=i.joinPathSegments(n,r.name,this._settings.pathSegmentSeparator)),i.isAppliedFilter(this._settings.entryFilter,r)&&this._emitEntry(r),r.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,r)&&this._pushToQueue(o,n===void 0?void 0:r.path)}_emitEntry(r){this._emitter.emit("entry",r)}};e.default=c}),k1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=wp(),s=class{static{se(this,"AsyncProvider")}constructor(a,c){this._root=a,this._settings=c,this._reader=new t.default(this._root,this._settings),this._storage=[]}read(a){this._reader.onError(c=>{u(a,c)}),this._reader.onEntry(c=>{this._storage.push(c)}),this._reader.onEnd(()=>{i(a,this._storage)}),this._reader.read()}};e.default=s;function u(a,c){a(c)}se(u,"callFailureCallback");function i(a,c){a(null,c)}se(i,"callSuccessCallback")}),L1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("stream"),s=wp(),u=class{static{se(this,"StreamProvider")}constructor(i,a){this._root=i,this._settings=a,this._reader=new s.default(this._root,this._settings),this._stream=new t.Readable({objectMode:!0,read:se(()=>{},"read"),destroy:se(()=>{this._reader.isDestroyed||this._reader.destroy()},"destroy")})}read(){return this._reader.onError(i=>{this._stream.emit("error",i)}),this._reader.onEntry(i=>{this._stream.push(i)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};e.default=u}),D1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=ma(),s=ya(),u=_p(),i=class extends u.default{static{se(this,"SyncReader")}constructor(){super(...arguments),this._scandir=t.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(a,c){this._queue.add({directory:a,base:c})}_handleQueue(){for(let a of this._queue.values())this._handleDirectory(a.directory,a.base)}_handleDirectory(a,c){try{let r=this._scandir(a,this._settings.fsScandirSettings);for(let n of r)this._handleEntry(n,c)}catch(r){this._handleError(r)}}_handleError(a){if(s.isFatalError(this._settings,a))throw a}_handleEntry(a,c){let r=a.path;c!==void 0&&(a.path=s.joinPathSegments(c,a.name,this._settings.pathSegmentSeparator)),s.isAppliedFilter(this._settings.entryFilter,a)&&this._pushToStorage(a),a.dirent.isDirectory()&&s.isAppliedFilter(this._settings.deepFilter,a)&&this._pushToQueue(r,c===void 0?void 0:a.path)}_pushToStorage(a){this._storage.push(a)}};e.default=i}),$1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=D1(),s=class{static{se(this,"SyncProvider")}constructor(u,i){this._root=u,this._settings=i,this._reader=new t.default(this._root,this._settings)}read(){return this._reader.read()}};e.default=s}),M1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),s=ma(),u=class{static{se(this,"Settings")}constructor(i={}){this._options=i,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.fsScandirSettings=new s.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(i,a){return i??a}};e.default=u}),va=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Settings=e.walkStream=e.walkSync=e.walk=void 0;var t=k1(),s=L1(),u=$1(),i=M1();e.Settings=i.default;function a(o,l,h){if(typeof l=="function"){new t.default(o,n()).read(l);return}new t.default(o,n(l)).read(h)}se(a,"walk"),e.walk=a;function c(o,l){let h=n(l);return new u.default(o,h).read()}se(c,"walkSync"),e.walkSync=c;function r(o,l){let h=n(l);return new s.default(o,h).read()}se(r,"walkStream"),e.walkStream=r;function n(o={}){return o instanceof i.default?o:new i.default(o)}se(n,"getSettings")}),Sa=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),s=pr(),u=$t(),i=class{static{se(this,"Reader")}constructor(a){this._settings=a,this._fsStatSettings=new s.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(a){return t.resolve(this._settings.cwd,a)}_makeEntry(a,c){let r={name:c,path:c,dirent:u.fs.createDirentFromStats(c,a)};return this._settings.stats&&(r.stats=a),r}_isFatalError(a){return!u.errno.isEnoentCodeError(a)&&!this._settings.suppressErrors}};e.default=i}),Op=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("stream"),s=pr(),u=va(),i=Sa(),a=class extends i.default{static{se(this,"ReaderStream")}constructor(){super(...arguments),this._walkStream=u.walkStream,this._stat=s.stat}dynamic(c,r){return this._walkStream(c,r)}static(c,r){let n=c.map(this._getFullEntryPath,this),o=new t.PassThrough({objectMode:!0});o._write=(l,h,p)=>this._getEntry(n[l],c[l],r).then(d=>{d!==null&&r.entryFilter(d)&&o.push(d),l===n.length-1&&o.end(),p()}).catch(p);for(let l=0;l<n.length;l++)o.write(l);return o}_getEntry(c,r,n){return this._getStat(c).then(o=>this._makeEntry(o,r)).catch(o=>{if(n.errorFilter(o))return null;throw o})}_getStat(c){return new Promise((r,n)=>{this._stat(c,this._fsStatSettings,(o,l)=>o===null?r(l):n(o))})}};e.default=a}),j1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=va(),s=Sa(),u=Op(),i=class extends s.default{static{se(this,"ReaderAsync")}constructor(){super(...arguments),this._walkAsync=t.walk,this._readerStream=new u.default(this._settings)}dynamic(a,c){return new Promise((r,n)=>{this._walkAsync(a,c,(o,l)=>{o===null?r(l):n(o)})})}async static(a,c){let r=[],n=this._readerStream.static(a,c);return new Promise((o,l)=>{n.once("error",l),n.on("data",h=>r.push(h)),n.once("end",()=>o(r))})}};e.default=i}),B1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=$t(),s=class{static{se(this,"Matcher")}constructor(u,i,a){this._patterns=u,this._settings=i,this._micromatchOptions=a,this._storage=[],this._fillStorage()}_fillStorage(){for(let u of this._patterns){let i=this._getPatternSegments(u),a=this._splitSegmentsIntoSections(i);this._storage.push({complete:a.length<=1,pattern:u,segments:i,sections:a})}}_getPatternSegments(u){return t.pattern.getPatternParts(u,this._micromatchOptions).map(i=>t.pattern.isDynamicPattern(i,this._settings)?{dynamic:!0,pattern:i,patternRe:t.pattern.makeRe(i,this._micromatchOptions)}:{dynamic:!1,pattern:i})}_splitSegmentsIntoSections(u){return t.array.splitWhen(u,i=>i.dynamic&&t.pattern.hasGlobStar(i.pattern))}};e.default=s}),U1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=B1(),s=class extends t.default{static{se(this,"PartialMatcher")}match(u){let i=u.split("/"),a=i.length,c=this._storage.filter(r=>!r.complete||r.segments.length>a);for(let r of c){let n=r.sections[0];if(!r.complete&&a>n.length||i.every((o,l)=>{let h=r.segments[l];return!!(h.dynamic&&h.patternRe.test(o)||!h.dynamic&&h.pattern===o)}))return!0}return!1}};e.default=s}),F1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=$t(),s=U1(),u=class{static{se(this,"DeepFilter")}constructor(i,a){this._settings=i,this._micromatchOptions=a}getFilter(i,a,c){let r=this._getMatcher(a),n=this._getNegativePatternsRe(c);return o=>this._filter(i,o,r,n)}_getMatcher(i){return new s.default(i,this._settings,this._micromatchOptions)}_getNegativePatternsRe(i){let a=i.filter(t.pattern.isAffectDepthOfReadingPattern);return t.pattern.convertPatternsToRe(a,this._micromatchOptions)}_filter(i,a,c,r){if(this._isSkippedByDeep(i,a.path)||this._isSkippedSymbolicLink(a))return!1;let n=t.path.removeLeadingDotSegment(a.path);return this._isSkippedByPositivePatterns(n,c)?!1:this._isSkippedByNegativePatterns(n,r)}_isSkippedByDeep(i,a){return this._settings.deep===1/0?!1:this._getEntryLevel(i,a)>=this._settings.deep}_getEntryLevel(i,a){let c=a.split("/").length;if(i==="")return c;let r=i.split("/").length;return c-r}_isSkippedSymbolicLink(i){return!this._settings.followSymbolicLinks&&i.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(i,a){return!this._settings.baseNameMatch&&!a.match(i)}_isSkippedByNegativePatterns(i,a){return!t.pattern.matchAny(i,a)}};e.default=u}),H1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=$t(),s=class{static{se(this,"EntryFilter")}constructor(u,i){this._settings=u,this._micromatchOptions=i,this.index=new Map}getFilter(u,i){let[a,c]=t.pattern.partitionAbsoluteAndRelative(i),r={positive:{all:t.pattern.convertPatternsToRe(u,this._micromatchOptions)},negative:{absolute:t.pattern.convertPatternsToRe(a,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:t.pattern.convertPatternsToRe(c,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return n=>this._filter(n,r)}_filter(u,i){let a=t.path.removeLeadingDotSegment(u.path);if(this._settings.unique&&this._isDuplicateEntry(a)||this._onlyFileFilter(u)||this._onlyDirectoryFilter(u))return!1;let c=this._isMatchToPatternsSet(a,i,u.dirent.isDirectory());return this._settings.unique&&c&&this._createIndexRecord(a),c}_isDuplicateEntry(u){return this.index.has(u)}_createIndexRecord(u){this.index.set(u,void 0)}_onlyFileFilter(u){return this._settings.onlyFiles&&!u.dirent.isFile()}_onlyDirectoryFilter(u){return this._settings.onlyDirectories&&!u.dirent.isDirectory()}_isMatchToPatternsSet(u,i,a){return!(!this._isMatchToPatterns(u,i.positive.all,a)||this._isMatchToPatterns(u,i.negative.relative,a)||this._isMatchToAbsoluteNegative(u,i.negative.absolute,a))}_isMatchToAbsoluteNegative(u,i,a){if(i.length===0)return!1;let c=t.path.makeAbsolute(this._settings.cwd,u);return this._isMatchToPatterns(c,i,a)}_isMatchToPatterns(u,i,a){if(i.length===0)return!1;let c=t.pattern.matchAny(u,i);return!c&&a?t.pattern.matchAny(u+"/",i):c}};e.default=s}),G1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=$t(),s=class{static{se(this,"ErrorFilter")}constructor(u){this._settings=u}getFilter(){return u=>this._isNonFatalError(u)}_isNonFatalError(u){return t.errno.isEnoentCodeError(u)||this._settings.suppressErrors}};e.default=s}),V1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=$t(),s=class{static{se(this,"EntryTransformer")}constructor(u){this._settings=u}getTransformer(){return u=>this._transform(u)}_transform(u){let i=u.path;return this._settings.absolute&&(i=t.path.makeAbsolute(this._settings.cwd,i),i=t.path.unixify(i)),this._settings.markDirectories&&u.dirent.isDirectory()&&(i+="/"),this._settings.objectMode?Object.assign(Object.assign({},u),{path:i}):i}};e.default=s}),Ea=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),s=F1(),u=H1(),i=G1(),a=V1(),c=class{static{se(this,"Provider")}constructor(r){this._settings=r,this.errorFilter=new i.default(this._settings),this.entryFilter=new u.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new s.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new a.default(this._settings)}_getRootDirectory(r){return t.resolve(this._settings.cwd,r.base)}_getReaderOptions(r){let n=r.base==="."?"":r.base;return{basePath:n,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(n,r.positive,r.negative),entryFilter:this.entryFilter.getFilter(r.positive,r.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};e.default=c}),W1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=j1(),s=Ea(),u=class extends s.default{static{se(this,"ProviderAsync")}constructor(){super(...arguments),this._reader=new t.default(this._settings)}async read(i){let a=this._getRootDirectory(i),c=this._getReaderOptions(i);return(await this.api(a,i,c)).map(r=>c.transform(r))}api(i,a,c){return a.dynamic?this._reader.dynamic(i,c):this._reader.static(a.patterns,c)}};e.default=u}),z1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("stream"),s=Op(),u=Ea(),i=class extends u.default{static{se(this,"ProviderStream")}constructor(){super(...arguments),this._reader=new s.default(this._settings)}read(a){let c=this._getRootDirectory(a),r=this._getReaderOptions(a),n=this.api(c,a,r),o=new t.Readable({objectMode:!0,read:se(()=>{},"read")});return n.once("error",l=>o.emit("error",l)).on("data",l=>o.emit("data",r.transform(l))).once("end",()=>o.emit("end")),o.once("close",()=>n.destroy()),o}api(a,c,r){return c.dynamic?this._reader.dynamic(a,r):this._reader.static(c.patterns,r)}};e.default=i}),q1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=pr(),s=va(),u=Sa(),i=class extends u.default{static{se(this,"ReaderSync")}constructor(){super(...arguments),this._walkSync=s.walkSync,this._statSync=t.statSync}dynamic(a,c){return this._walkSync(a,c)}static(a,c){let r=[];for(let n of a){let o=this._getFullEntryPath(n),l=this._getEntry(o,n,c);l===null||!c.entryFilter(l)||r.push(l)}return r}_getEntry(a,c,r){try{let n=this._getStat(a);return this._makeEntry(n,c)}catch(n){if(r.errorFilter(n))return null;throw n}}_getStat(a){return this._statSync(a,this._fsStatSettings)}};e.default=i}),K1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=q1(),s=Ea(),u=class extends s.default{static{se(this,"ProviderSync")}constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(i){let a=this._getRootDirectory(i),c=this._getReaderOptions(i);return this.api(a,i,c).map(c.transform)}api(i,a,c){return a.dynamic?this._reader.dynamic(i,c):this._reader.static(a.patterns,c)}};e.default=u}),J1=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var t=require("fs"),s=require("os"),u=Math.max(s.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:t.lstat,lstatSync:t.lstatSync,stat:t.stat,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync};var i=class{static{se(this,"Settings")}constructor(a={}){this._options=a,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,u),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(a,c){return a===void 0?c:a}_getFileSystemMethods(a={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),a)}};e.default=i}),Rp=ve((e,t)=>{"use strict";var s=S1(),u=W1(),i=z1(),a=K1(),c=J1(),r=$t();async function n(h,p){l(h);let d=o(h,u.default,p),g=await Promise.all(d);return r.array.flatten(g)}se(n,"FastGlob"),function(h){h.glob=h,h.globSync=p,h.globStream=d,h.async=h;function p(b,_){l(b);let O=o(b,a.default,_);return r.array.flatten(O)}se(p,"sync"),h.sync=p;function d(b,_){l(b);let O=o(b,i.default,_);return r.stream.merge(O)}se(d,"stream"),h.stream=d;function g(b,_){l(b);let O=[].concat(b),w=new c.default(_);return s.generate(O,w)}se(g,"generateTasks"),h.generateTasks=g;function m(b,_){l(b);let O=new c.default(_);return r.pattern.isDynamicPattern(b,O)}se(m,"isDynamicPattern"),h.isDynamicPattern=m;function f(b){return l(b),r.path.escape(b)}se(f,"escapePath"),h.escapePath=f;function y(b){return l(b),r.path.convertPathToPattern(b)}se(y,"convertPathToPattern"),h.convertPathToPattern=y;let S;(function(b){function _(w){return l(w),r.path.escapePosixPath(w)}se(_,"escapePath"),b.escapePath=_;function O(w){return l(w),r.path.convertPosixPathToPattern(w)}se(O,"convertPathToPattern"),b.convertPathToPattern=O})(S=h.posix||(h.posix={}));let E;(function(b){function _(w){return l(w),r.path.escapeWindowsPath(w)}se(_,"escapePath"),b.escapePath=_;function O(w){return l(w),r.path.convertWindowsPathToPattern(w)}se(O,"convertPathToPattern"),b.convertPathToPattern=O})(E=h.win32||(h.win32={}))}(n||(n={}));function o(h,p,d){let g=[].concat(h),m=new c.default(d),f=s.generate(g,m),y=new p(m);return f.map(y.read,y)}se(o,"getWorks");function l(h){if(![].concat(h).every(p=>r.string.isString(p)&&!r.string.isEmpty(p)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}se(l,"assertPatternsInput"),t.exports=n}),Z1=ve((e,t)=>{function s(Q){return Array.isArray(Q)?Q:[Q]}se(s,"makeArray");var u=void 0,i="",a=" ",c="\\",r=/^\s+$/,n=/(?:[^\\]|^)\\$/,o=/^\\!/,l=/^\\#/,h=/\r?\n/g,p=/^\.{0,2}\/|^\.{1,2}$/,d=/\/$/,g="/",m="node-ignore";typeof Symbol<"u"&&(m=Symbol.for("node-ignore"));var f=m,y=se((Q,k,F)=>(Object.defineProperty(Q,k,{value:F}),F),"define"),S=/([0-z])-([0-z])/g,E=se(()=>!1,"RETURN_FALSE"),b=se(Q=>Q.replace(S,(k,F,z)=>F.charCodeAt(0)<=z.charCodeAt(0)?k:i),"sanitizeRange"),_=se(Q=>{let{length:k}=Q;return Q.slice(0,k-k%2)},"cleanRangeBackSlash"),O=[[/^\uFEFF/,()=>i],[/((?:\\\\)*?)(\\?\s+)$/,(Q,k,F)=>k+(F.indexOf("\\")===0?a:i)],[/(\\+?)\s/g,(Q,k)=>{let{length:F}=k;return k.slice(0,F-F%2)+a}],[/[\\$.|*+(){^]/g,Q=>`\\${Q}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,se(function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"},"startingReplacer")],[/\\\/\\\*\\\*(?=\\\/|$)/g,(Q,k,F)=>k+6<F.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(Q,k,F)=>{let z=F.replace(/\\\*/g,"[^\\/]*");return k+z}],[/\\\\\\(?=[$.|*+(){^])/g,()=>c],[/\\\\/g,()=>c],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(Q,k,F,z,j)=>k===c?`\\[${F}${_(z)}${j}`:j==="]"&&z.length%2===0?`[${b(F)}${z}]`:"[]"],[/(?:[^*])$/,Q=>/\/$/.test(Q)?`${Q}$`:`${Q}(?=$|\\/$)`]],w=/(^|\\\/)?\\\*$/,A="regex",I="checkRegex",P="_",L={[A](Q,k){return`${k?`${k}[^/]+`:"[^/]*"}(?=$|\\/$)`},[I](Q,k){return`${k?`${k}[^/]*`:"[^/]*"}(?=$|\\/$)`}},$=se(Q=>O.reduce((k,[F,z])=>k.replace(F,z.bind(Q)),Q),"makeRegexPrefix"),x=se(Q=>typeof Q=="string","isString"),M=se(Q=>Q&&x(Q)&&!r.test(Q)&&!n.test(Q)&&Q.indexOf("#")!==0,"checkPattern"),U=se(Q=>Q.split(h).filter(Boolean),"splitPattern"),V=class{static{se(this,"IgnoreRule")}constructor(Q,k,F,z,j,q){this.pattern=Q,this.mark=k,this.negative=j,y(this,"body",F),y(this,"ignoreCase",z),y(this,"regexPrefix",q)}get regex(){let Q=P+A;return this[Q]?this[Q]:this._make(A,Q)}get checkRegex(){let Q=P+I;return this[Q]?this[Q]:this._make(I,Q)}_make(Q,k){let F=this.regexPrefix.replace(w,L[Q]),z=this.ignoreCase?new RegExp(F,"i"):new RegExp(F);return y(this,k,z)}},B=se(({pattern:Q,mark:k},F)=>{let z=!1,j=Q;j.indexOf("!")===0&&(z=!0,j=j.substr(1)),j=j.replace(o,"!").replace(l,"#");let q=$(j);return new V(Q,k,j,F,z,q)},"createRule"),G=class{static{se(this,"RuleManager")}constructor(Q){this._ignoreCase=Q,this._rules=[]}_add(Q){if(Q&&Q[f]){this._rules=this._rules.concat(Q._rules._rules),this._added=!0;return}if(x(Q)&&(Q={pattern:Q}),M(Q.pattern)){let k=B(Q,this._ignoreCase);this._added=!0,this._rules.push(k)}}add(Q){return this._added=!1,s(x(Q)?U(Q):Q).forEach(this._add,this),this._added}test(Q,k,F){let z=!1,j=!1,q;this._rules.forEach(Y=>{let{negative:R}=Y;j===R&&z!==j||R&&!z&&!j&&!k||!Y[F].test(Q)||(z=!R,j=R,q=R?u:Y)});let J={ignored:z,unignored:j};return q&&(J.rule=q),J}},W=se((Q,k)=>{throw new k(Q)},"throwError"),N=se((Q,k,F)=>x(Q)?Q?N.isNotRelative(Q)?F(`path should be a \`path.relative()\`d string, but got "${k}"`,RangeError):!0:F("path must not be empty",TypeError):F(`path must be a string, but got \`${k}\``,TypeError),"checkPath"),D=se(Q=>p.test(Q),"isNotRelative");N.isNotRelative=D,N.convert=Q=>Q;var T=class{static{se(this,"Ignore")}constructor({ignorecase:Q=!0,ignoreCase:k=Q,allowRelativePaths:F=!1}={}){y(this,f,!0),this._rules=new G(k),this._strictPathCheck=!F,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(Q){return this._rules.add(Q)&&this._initCache(),this}addPattern(Q){return this.add(Q)}_test(Q,k,F,z){let j=Q&&N.convert(Q);return N(j,Q,this._strictPathCheck?W:E),this._t(j,k,F,z)}checkIgnore(Q){if(!d.test(Q))return this.test(Q);let k=Q.split(g).filter(Boolean);if(k.pop(),k.length){let F=this._t(k.join(g)+g,this._testCache,!0,k);if(F.ignored)return F}return this._rules.test(Q,!1,I)}_t(Q,k,F,z){if(Q in k)return k[Q];if(z||(z=Q.split(g).filter(Boolean)),z.pop(),!z.length)return k[Q]=this._rules.test(Q,F,A);let j=this._t(z.join(g)+g,k,F,z);return k[Q]=j.ignored?j:this._rules.test(Q,F,A)}ignores(Q){return this._test(Q,this._ignoreCache,!1).ignored}createFilter(){return Q=>!this.ignores(Q)}filter(Q){return s(Q).filter(this.createFilter())}test(Q){return this._test(Q,this._testCache,!0)}},C=se(Q=>new T(Q),"factory"),Z=se(Q=>N(Q&&N.convert(Q),Q,E),"isPathValid"),X=se(()=>{let Q=se(F=>/^\\\\\?\\/.test(F)||/["<>|\u0000-\u001F]+/u.test(F)?F:F.replace(/\\/g,"/"),"makePosix");N.convert=Q;let k=/^[a-z]:\//i;N.isNotRelative=F=>k.test(F)||D(F)},"setupWindows");typeof process<"u"&&process.platform==="win32"&&X(),t.exports=C,C.default=C,t.exports.isPathValid=Z,y(t.exports,Symbol.for("setupWindows"),X)}),Ap={};JC(Ap,{deleteAsync:()=>td,deleteSync:()=>rd});sd.exports=ZC(Ap);var X1=De(require("fs"),1),Y1=De(require("internal/fs/promises"),1),Cp=De(require("path"),1),ba=De(require("process"),1),Ip=De(require("process"),1),Q1=De(require("fs"),1),cr=De(require("path"),1),Tp=require("events"),eI=require("stream"),Pp=require("internal/streams/promises");function xp(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(let i of e)pa(i);let t=e.some(({readableObjectMode:i})=>i),s=tI(e,t),u=new rI({objectMode:t,writableHighWaterMark:s,readableHighWaterMark:s});for(let i of e)u.add(i);return e.length===0&&Lp(u),u}se(xp,"mergeStreams");var tI=se((e,t)=>{if(e.length===0)return 16384;let s=e.filter(({readableObjectMode:u})=>u===t).map(({readableHighWaterMark:u})=>u);return Math.max(...s)},"getHighWaterMark"),rI=class extends eI.PassThrough{static{se(this,"MergedStream")}#e=new Set([]);#t=new Set([]);#r=new Set([]);#s;add(e){pa(e),!this.#e.has(e)&&(this.#e.add(e),this.#s??=sI(this,this.#e),oI({passThroughStream:this,stream:e,streams:this.#e,ended:this.#t,aborted:this.#r,onFinished:this.#s}),e.pipe(this,{end:!1}))}remove(e){return pa(e),this.#e.has(e)?(e.unpipe(this),!0):!1}},sI=se(async(e,t)=>{yi(e,cp);let s=new AbortController;try{await Promise.race([iI(e,s),nI(e,t,s)])}finally{s.abort(),yi(e,-cp)}},"onMergedStreamFinished"),iI=se(async(e,{signal:t})=>{await(0,Pp.finished)(e,{signal:t,cleanup:!0})},"onMergedStreamEnd"),nI=se(async(e,t,{signal:s})=>{for await(let[u]of(0,Tp.on)(e,"unpipe",{signal:s}))t.has(u)&&u.emit(kp)},"onInputStreamsUnpipe"),pa=se(e=>{if(typeof e?.pipe!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},"validateStream"),oI=se(async({passThroughStream:e,stream:t,streams:s,ended:u,aborted:i,onFinished:a})=>{yi(e,up);let c=new AbortController;try{await Promise.race([aI(a,t),lI({passThroughStream:e,stream:t,streams:s,ended:u,aborted:i,controller:c}),cI({stream:t,streams:s,ended:u,aborted:i,controller:c})])}finally{c.abort(),yi(e,-up)}s.size===u.size+i.size&&(u.size===0&&i.size>0?da(e):Lp(e))},"endWhenStreamsDone"),Np=se(e=>e?.code==="ERR_STREAM_PREMATURE_CLOSE","isAbortError"),aI=se(async(e,t)=>{try{await e,da(t)}catch(s){Np(s)?da(t):Dp(t,s)}},"afterMergedStreamFinished"),lI=se(async({passThroughStream:e,stream:t,streams:s,ended:u,aborted:i,controller:{signal:a}})=>{try{await(0,Pp.finished)(t,{signal:a,cleanup:!0,readable:!0,writable:!1}),s.has(t)&&u.add(t)}catch(c){if(a.aborted||!s.has(t))return;Np(c)?i.add(t):Dp(e,c)}},"onInputStreamEnd"),cI=se(async({stream:e,streams:t,ended:s,aborted:u,controller:{signal:i}})=>{await(0,Tp.once)(e,kp,{signal:i}),t.delete(e),s.delete(e),u.delete(e)},"onInputStreamUnpipe"),kp=Symbol("unpipe"),Lp=se(e=>{e.writable&&e.end()},"endStream"),da=se(e=>{(e.readable||e.writable)&&e.destroy()},"abortStream"),Dp=se((e,t)=>{e.destroyed||(e.once("error",uI),e.destroy(t))},"errorStream"),uI=se(()=>{},"noop"),yi=se((e,t)=>{let s=e.getMaxListeners();s!==0&&s!==Number.POSITIVE_INFINITY&&e.setMaxListeners(s+t)},"updateMaxListeners"),cp=2,up=1,Yr=De(Rp(),1),hI=De(require("fs"),1),pI=De(require("internal/fs/promises"),1);async function Ei(e,t,s){if(typeof s!="string")throw new TypeError(`Expected a string, got ${typeof s}`);try{return(await pI.default[e](s))[t]()}catch(u){if(u.code==="ENOENT")return!1;throw u}}se(Ei,"isType");function bi(e,t,s){if(typeof s!="string")throw new TypeError(`Expected a string, got ${typeof s}`);try{return hI.default[e](s)[t]()}catch(u){if(u.code==="ENOENT")return!1;throw u}}se(bi,"isTypeSync");var WH=Ei.bind(void 0,"stat","isFile"),dI=Ei.bind(void 0,"stat","isDirectory"),zH=Ei.bind(void 0,"lstat","isSymbolicLink"),qH=bi.bind(void 0,"statSync","isFile"),fI=bi.bind(void 0,"statSync","isDirectory"),KH=bi.bind(void 0,"lstatSync","isSymbolicLink"),gI=require("util"),mI=require("internal/child_process"),JH=De(require("path"),1),yI=require("url"),ZH=(0,gI.promisify)(mI.execFile);function _i(e){return e instanceof URL?(0,yI.fileURLToPath)(e):e}se(_i,"toPath");var XH=10*1024*1024,vI=De(require("process"),1),SI=De(require("fs"),1),EI=De(require("internal/fs/promises"),1),ur=De(require("path"),1),$p=De(Rp(),1),bI=De(Z1(),1);function hr(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}se(hr,"slash");var _a=se(e=>e[0]==="!","isNegativePattern"),_I=["**/node_modules","**/flow-typed","**/coverage","**/.git"],Mp={absolute:!0,dot:!0},wI="**/.gitignore",OI=se((e,t)=>_a(e)?"!"+ur.default.posix.join(t,e.slice(1)):ur.default.posix.join(t,e),"applyBaseToPattern"),RI=se((e,t)=>{let s=hr(ur.default.relative(t,ur.default.dirname(e.filePath)));return e.content.split(/\r?\n/).filter(u=>u&&!u.startsWith("#")).map(u=>OI(u,s))},"parseIgnoreFile"),AI=se((e,t)=>{if(t=hr(t),ur.default.isAbsolute(e)){if(hr(e).startsWith(t))return ur.default.relative(t,e);throw new Error(`Path ${e} is not in cwd ${t}`)}return e},"toRelativePath"),jp=se((e,t)=>{let s=e.flatMap(i=>RI(i,t)),u=(0,bI.default)().add(s);return i=>(i=_i(i),i=AI(i,t),i?u.ignores(hr(i)):!1)},"getIsIgnoredPredicate"),Bp=se((e={})=>({cwd:_i(e.cwd)??vI.default.cwd(),suppressErrors:!!e.suppressErrors,deep:typeof e.deep=="number"?e.deep:Number.POSITIVE_INFINITY,ignore:[...e.ignore??[],..._I]}),"normalizeOptions"),CI=se(async(e,t)=>{let{cwd:s,suppressErrors:u,deep:i,ignore:a}=Bp(t),c=await(0,$p.default)(e,{cwd:s,suppressErrors:u,deep:i,ignore:a,...Mp}),r=await Promise.all(c.map(async n=>({filePath:n,content:await EI.default.readFile(n,"utf8")})));return jp(r,s)},"isIgnoredByIgnoreFiles"),II=se((e,t)=>{let{cwd:s,suppressErrors:u,deep:i,ignore:a}=Bp(t),c=$p.default.sync(e,{cwd:s,suppressErrors:u,deep:i,ignore:a,...Mp}).map(r=>({filePath:r,content:SI.default.readFileSync(r,"utf8")}));return jp(c,s)},"isIgnoredByIgnoreFilesSync"),TI=se(e=>{if(e.some(t=>typeof t!="string"))throw new TypeError("Patterns must be a string or an array of strings")},"assertPatternsInput"),Up=se((e,t)=>{let s=_a(e)?e.slice(1):e;return cr.default.isAbsolute(s)?s:cr.default.join(t,s)},"normalizePathForDirectoryGlob"),Fp=se(({directoryPath:e,files:t,extensions:s})=>{let u=s?.length>0?`.${s.length>1?`{${s.join(",")}}`:s[0]}`:"";return t?t.map(i=>cr.default.posix.join(e,`**/${cr.default.extname(i)?i:`${i}${u}`}`)):[cr.default.posix.join(e,`**${u?`/*${u}`:""}`)]},"getDirectoryGlob"),hp=se(async(e,{cwd:t=Ip.default.cwd(),files:s,extensions:u}={})=>(await Promise.all(e.map(async i=>await dI(Up(i,t))?Fp({directoryPath:i,files:s,extensions:u}):i))).flat(),"directoryToGlob"),pp=se((e,{cwd:t=Ip.default.cwd(),files:s,extensions:u}={})=>e.flatMap(i=>fI(Up(i,t))?Fp({directoryPath:i,files:s,extensions:u}):i),"directoryToGlobSync"),wa=se(e=>(e=[...new Set([e].flat())],TI(e),e),"toPatternsArray"),PI=se(e=>{if(!e)return;let t;try{t=Q1.default.statSync(e)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},"checkCwdOption"),Hp=se((e={})=>(e={...e,ignore:e.ignore??[],expandDirectories:e.expandDirectories??!0,cwd:_i(e.cwd)},PI(e.cwd),e),"normalizeOptions"),Gp=se(e=>async(t,s)=>e(wa(t),Hp(s)),"normalizeArguments"),wi=se(e=>(t,s)=>e(wa(t),Hp(s)),"normalizeArgumentsSync"),Vp=se(e=>{let{ignoreFiles:t,gitignore:s}=e,u=t?wa(t):[];return s&&u.push(wI),u},"getIgnoreFilesPatterns"),xI=se(async e=>{let t=Vp(e);return zp(t.length>0&&await CI(t,e))},"getFilter"),Wp=se(e=>{let t=Vp(e);return zp(t.length>0&&II(t,e))},"getFilterSync"),zp=se(e=>{let t=new Set;return s=>{let u=cr.default.normalize(s.path??s);return t.has(u)||e&&e(u)?!1:(t.add(u),!0)}},"createFilterFunction"),qp=se((e,t)=>e.flat().filter(s=>t(s)),"unionFastGlobResults"),Kp=se((e,t)=>{let s=[];for(;e.length>0;){let u=e.findIndex(a=>_a(a));if(u===-1){s.push({patterns:e,options:t});break}let i=e[u].slice(1);for(let a of s)a.options.ignore.push(i);u!==0&&s.push({patterns:e.slice(0,u),options:{...t,ignore:[...t.ignore,i]}}),e=e.slice(u+1)}return s},"convertNegativePatterns"),Jp=se((e,t)=>({...t?{cwd:t}:{},...Array.isArray(e)?{files:e}:e}),"normalizeExpandDirectoriesOption"),Zp=se(async(e,t)=>{let s=Kp(e,t),{cwd:u,expandDirectories:i}=t;if(!i)return s;let a=Jp(i,u);return Promise.all(s.map(async c=>{let{patterns:r,options:n}=c;return[r,n.ignore]=await Promise.all([hp(r,a),hp(n.ignore,{cwd:u})]),{patterns:r,options:n}}))},"generateTasks"),Oa=se((e,t)=>{let s=Kp(e,t),{cwd:u,expandDirectories:i}=t;if(!i)return s;let a=Jp(i,u);return s.map(c=>{let{patterns:r,options:n}=c;return r=pp(r,a),n.ignore=pp(n.ignore,{cwd:u}),{patterns:r,options:n}})},"generateTasksSync"),NI=Gp(async(e,t)=>{let[s,u]=await Promise.all([Zp(e,t),xI(t)]),i=await Promise.all(s.map(a=>(0,Yr.default)(a.patterns,a.options)));return qp(i,u)}),kI=wi((e,t)=>{let s=Oa(e,t),u=Wp(t),i=s.map(a=>Yr.default.sync(a.patterns,a.options));return qp(i,u)}),YH=wi((e,t)=>{let s=Oa(e,t),u=Wp(t),i=s.map(a=>Yr.default.stream(a.patterns,a.options));return xp(i).filter(a=>u(a))}),QH=wi((e,t)=>e.some(s=>Yr.default.isDynamicPattern(s,t))),eG=Gp(Zp),tG=wi(Oa),{convertPathToPattern:rG}=Yr.default,LI=De(yp(),1),dp=De(require("process"),1),DI=De(require("path"),1);function Xp(e){let t=dp.default.cwd();return e=DI.default.resolve(e),dp.default.platform==="win32"&&(t=t.toLowerCase(),e=e.toLowerCase()),e===t}se(Xp,"isPathCwd");var ha=De(require("path"),1);function Yp(e,t){let s=ha.default.relative(t,e);return!!(s&&s!==".."&&!s.startsWith(`..${ha.default.sep}`)&&s!==ha.default.resolve(e))}se(Yp,"isPathInside");async function Qp(e,t,{concurrency:s=Number.POSITIVE_INFINITY,stopOnError:u=!0,signal:i}={}){return new Promise((a,c)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(s)&&s>=1||s===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${s}\` (${typeof s})`);let r=[],n=[],o=new Map,l=!1,h=!1,p=!1,d=0,g=0,m=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),f=se(()=>{E(i.reason)},"signalListener"),y=se(()=>{i?.removeEventListener("abort",f)},"cleanup"),S=se(_=>{a(_),y()},"resolve"),E=se(_=>{l=!0,h=!0,c(_),y()},"reject");i&&(i.aborted&&E(i.reason),i.addEventListener("abort",f,{once:!0}));let b=se(async()=>{if(h)return;let _=await m.next(),O=g;if(g++,_.done){if(p=!0,d===0&&!h){if(!u&&n.length>0){E(new AggregateError(n));return}if(h=!0,o.size===0){S(r);return}let w=[];for(let[A,I]of r.entries())o.get(A)!==fp&&w.push(I);S(w)}return}d++,(async()=>{try{let w=await _.value;if(h)return;let A=await t(w,O);A===fp&&o.set(O,A),r[O]=A,d--,await b()}catch(w){if(u)E(w);else{n.push(w),d--;try{await b()}catch(A){E(A)}}}})()},"next");(async()=>{for(let _=0;_<s;_++){try{await b()}catch(O){E(O);break}if(p||l)break}})()})}se(Qp,"pMap");var fp=Symbol("skip"),{toString:sG}=Object.prototype,gp=class ed extends Error{static{se(this,"PresentableError")}constructor(t,{cause:s}={}){if(super(),t instanceof ed)return t;if(typeof t!="string")throw new TypeError("Message required.");this.name="PresentableError",this.message=t,this.cause=s}get isPresentable(){return!0}};function Ra(e,t){if(Xp(e))throw new gp("Cannot delete the current working directory. Can be overridden with the `force` option.");if(!Yp(e,t))throw new gp("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option.")}se(Ra,"safeCheck");function Aa(e){return e=Array.isArray(e)?e:[e],e=e.map(t=>ba.default.platform==="win32"&&(0,LI.default)(t)===!1?hr(t):t),e}se(Aa,"normalizePatterns");async function td(e,{force:t,dryRun:s,cwd:u=ba.default.cwd(),onProgress:i=se(()=>{},"onProgress"),...a}={}){a={expandDirectories:!1,onlyFiles:!1,followSymbolicLinks:!1,cwd:u,...a},e=Aa(e);let c=(await NI(e,a)).sort((o,l)=>l.localeCompare(o));c.length===0&&i({totalCount:0,deletedCount:0,percent:1});let r=0,n=await Qp(c,se(async o=>(o=Cp.default.resolve(u,o),t||Ra(o,u),s||await Y1.default.rm(o,{recursive:!0,force:!0}),r+=1,i({totalCount:c.length,deletedCount:r,percent:r/c.length,path:o}),o),"mapper"),a);return n.sort((o,l)=>o.localeCompare(l)),n}se(td,"deleteAsync");function rd(e,{force:t,dryRun:s,cwd:u=ba.default.cwd(),...i}={}){i={expandDirectories:!1,onlyFiles:!1,followSymbolicLinks:!1,cwd:u,...i},e=Aa(e);let a=kI(e,i).sort((c,r)=>r.localeCompare(c)).map(c=>(c=Cp.default.resolve(u,c),t||Ra(c,u),s||X1.default.rmSync(c,{recursive:!0,force:!0}),c));return a.sort((c,r)=>c.localeCompare(r)),a}se(rd,"deleteSync");});var Qr=ge((DG,gd)=>{var Pa=Object.defineProperty,$I=Object.getOwnPropertyDescriptor,MI=Object.getOwnPropertyNames,jI=Object.prototype.hasOwnProperty,BI=(e,t)=>{for(var s in t)Pa(e,s,{get:t[s],enumerable:!0})},UI=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of MI(t))!jI.call(e,i)&&i!==s&&Pa(e,i,{get:()=>t[i],enumerable:!(u=$I(t,i))||u.enumerable});return e},FI=e=>UI(Pa({},"__esModule",{value:!0}),e),nd={};BI(nd,{findUp:()=>zI,findUpSync:()=>qI,invalidatePathCache:()=>pd,isDir:()=>KI,isDirEmptySync:()=>ud,isDirSync:()=>JI,isSymLinkSync:()=>ZI,readDirNames:()=>YI,readDirNamesSync:()=>QI,readFileBinary:()=>eT,readFileBinarySync:()=>rT,readFileUtf8:()=>tT,readFileUtf8Sync:()=>sT,readJson:()=>iT,readJsonSync:()=>nT,safeDelete:()=>oT,safeDeleteSync:()=>aT,safeReadFile:()=>lT,safeReadFileSync:()=>cT,safeStats:()=>dd,safeStatsSync:()=>fd,uniqueSync:()=>uT,validateFiles:()=>XI,writeJson:()=>hT,writeJsonSync:()=>pT});gd.exports=FI(nd);var HI=tr(),Ri=rr(),id=vh(),od=kh(),GI=Vt(),et=ar(),VI=sa(),WI=Eo(),Ai=(0,HI.getAbortSignal)(),ad=(0,GI.objectFreeze)({__proto__:null,force:!0,maxRetries:3,recursive:!0,retryDelay:200}),Ia;function Me(){return Ia===void 0&&(Ia=require("fs")),Ia}var Ta;function Kt(){return Ta===void 0&&(Ta=require("path")),Ta}function ld(e,t,s){let{ignore:u,includeEmpty:i=!0,sort:a=!0}={__proto__:null,...s},c=Kt(),r=e.filter(n=>n.isDirectory()&&(i||!ud(c.join(t||n.parentPath,n.name),{ignore:u}))).map(n=>n.name);return a?r.sort(WI.naturalCompare):r}function cd(e,t,s,u,i=2){let a=s?t:"";return`${JSON.stringify(e,u,i).replace(/\n/g,t)}${a}`}async function zI(e,t){let{cwd:s=process.cwd(),signal:u=Ai}={__proto__:null,...t},{onlyDirectories:i=!1,onlyFiles:a=!0}={__proto__:null,...t};i&&(a=!1),a&&(i=!1);let c=Me(),r=Kt(),n=r.resolve(s),{root:o}=r.parse(n),l=(0,Ri.isArray)(e)?e:[e];for(;n&&n!==o;){for(let h of l){if(u?.aborted)return;let p=r.join(n,h);try{let d=await c.promises.stat(p);if(!i&&d.isFile()||!a&&d.isDirectory())return(0,et.normalizePath)(p)}catch{}}n=r.dirname(n)}}function qI(e,t){let{cwd:s=process.cwd(),stopAt:u}={__proto__:null,...t},{onlyDirectories:i=!1,onlyFiles:a=!0}={__proto__:null,...t};i&&(a=!1),a&&(i=!1);let c=Me(),r=Kt(),n=r.resolve(s),{root:o}=r.parse(n),l=u?r.resolve(u):void 0,h=(0,Ri.isArray)(e)?e:[e];for(;n&&n!==o;){if(l&&n===l){for(let p of h){let d=r.join(n,p);try{let g=c.statSync(d);if(!i&&g.isFile()||!a&&g.isDirectory())return(0,et.normalizePath)(d)}catch{}}return}for(let p of h){let d=r.join(n,p);try{let g=c.statSync(d);if(!i&&g.isFile()||!a&&g.isDirectory())return(0,et.normalizePath)(d)}catch{}}n=r.dirname(n)}}async function KI(e){return!!(await dd(e))?.isDirectory()}function JI(e){return!!fd(e)?.isDirectory()}function ud(e,t){let{ignore:s=id.defaultIgnore}={__proto__:null,...t},u=Me();try{let i=u.readdirSync(e),{length:a}=i;if(a===0)return!0;let c=(0,id.getGlobMatcher)(s,{cwd:(0,et.pathLikeToString)(e)}),r=0;for(let n=0;n<a;n+=1){let o=i[n];o&&c(o)&&(r+=1)}return r===a}catch{return!1}}function ZI(e){let t=Me();try{return t.lstatSync(e).isSymbolicLink()}catch{}return!1}function XI(e){let t=Me(),s=[],u=[],{R_OK:i}=t.constants;for(let a of e)try{t.accessSync(a,i),s.push(a)}catch{u.push(a)}return{__proto__:null,validPaths:s,invalidPaths:u}}async function YI(e,t){let s=Me();try{return ld(await s.promises.readdir(e,{__proto__:null,encoding:"utf8",withFileTypes:!0}),String(e),t)}catch{}return[]}function QI(e,t){let s=Me();try{return ld(s.readdirSync(e,{__proto__:null,encoding:"utf8",withFileTypes:!0}),String(e),t)}catch{}return[]}async function eT(e,t){let s=typeof t=="string"?{encoding:t}:t;return await Me().promises.readFile(e,{signal:Ai,...s,encoding:null})}async function tT(e,t){let s=typeof t=="string"?{encoding:t}:t;return await Me().promises.readFile(e,{signal:Ai,...s,encoding:"utf8"})}function rT(e,t){let s=typeof t=="string"?{encoding:t}:t;return Me().readFileSync(e,{...s,encoding:null})}function sT(e,t){let s=typeof t=="string"?{encoding:t}:t;return Me().readFileSync(e,{...s,encoding:"utf8"})}async function iT(e,t){let s=typeof t=="string"?{encoding:t}:t,{reviver:u,throws:i,...a}={__proto__:null,...s},c=i===void 0||!!i,r=Me(),n="";try{n=await r.promises.readFile(e,{__proto__:null,encoding:"utf8",...a})}catch(o){if(c){let l=o.code;throw l==="ENOENT"?new Error(`JSON file not found: ${e}
|
|
8
|
+
Ensure the file exists or create it with the expected structure.`,{cause:o}):l==="EACCES"||l==="EPERM"?new Error(`Permission denied reading JSON file: ${e}
|
|
9
|
+
Check file permissions or run with appropriate access.`,{cause:o}):o}return}return(0,od.jsonParse)(n,{filepath:String(e),reviver:u,throws:c})}function nT(e,t){let s=typeof t=="string"?{encoding:t}:t,{reviver:u,throws:i,...a}={__proto__:null,...s},c=i===void 0||!!i,r=Me(),n="";try{n=r.readFileSync(e,{__proto__:null,encoding:"utf8",...a})}catch(o){if(c){let l=o.code;throw l==="ENOENT"?new Error(`JSON file not found: ${e}
|
|
10
|
+
Ensure the file exists or create it with the expected structure.`,{cause:o}):l==="EACCES"||l==="EPERM"?new Error(`Permission denied reading JSON file: ${e}
|
|
11
|
+
Check file permissions or run with appropriate access.`,{cause:o}):o}return}return(0,od.jsonParse)(n,{filepath:String(e),reviver:u,throws:c})}var Oi;function hd(){if(Oi===void 0){let e=Kt(),{getOsTmpDir:t,getSocketCacacheDir:s,getSocketUserDir:u}=mi();Oi=[e.resolve(t()),e.resolve(s()),e.resolve(u())]}return Oi}function pd(){Oi=void 0}(0,VI.registerCacheInvalidation)(pd);async function oT(e,t){let s=Ca(),{deleteAsync:u}=s,i={__proto__:null,...t},a=(0,Ri.isArray)(e)?e.map(et.pathLikeToString):[(0,et.pathLikeToString)(e)],c=i.force!==!1;if(!c&&a.length>0){let r=Kt(),n=hd();a.every(o=>{let l=r.resolve(o);for(let h of n){let p=l.startsWith(h+r.sep)||l===h,d=r.relative(h,l).startsWith("..");if(p&&!d)return!0}return!1})&&(c=!0)}await u(a,{concurrency:i.maxRetries||ad.maxRetries,dryRun:!1,force:c,onlyFiles:!1})}function aT(e,t){let s=Ca(),{deleteSync:u}=s,i={__proto__:null,...t},a=(0,Ri.isArray)(e)?e.map(et.pathLikeToString):[(0,et.pathLikeToString)(e)],c=i.force!==!1;if(!c&&a.length>0){let r=Kt(),n=hd();a.every(o=>{let l=r.resolve(o);for(let h of n){let p=l.startsWith(h+r.sep)||l===h,d=r.relative(h,l).startsWith("..");if(p&&!d)return!0}return!1})&&(c=!0)}u(a,{concurrency:i.maxRetries||ad.maxRetries,dryRun:!1,force:c,onlyFiles:!1})}async function lT(e,t){let s=typeof t=="string"?{encoding:t}:t,u=Me();try{return await u.promises.readFile(e,{signal:Ai,...s})}catch{}}async function dd(e){let t=Me();try{return await t.promises.stat(e)}catch{}}function fd(e,t){let s=typeof t=="string"?{encoding:t}:t,u=Me();try{return u.statSync(e,{__proto__:null,throwIfNoEntry:!1,...s})}catch{}}function cT(e,t){let s=typeof t=="string"?{encoding:t}:t,u=Me();try{return u.readFileSync(e,{__proto__:null,...s})}catch{}}function uT(e){let t=Me(),s=Kt(),u=String(e);if(!t.existsSync(u))return(0,et.normalizePath)(u);let i=s.dirname(u),a=s.extname(u),c=s.basename(u,a),r=1,n;do n=s.join(i,`${c}-${r}${a}`),r++;while(t.existsSync(n));return(0,et.normalizePath)(n)}async function hT(e,t,s){let u=typeof s=="string"?{encoding:s}:s,{EOL:i,finalEOL:a,replacer:c,spaces:r,...n}={__proto__:null,...u},o=Me(),l=cd(t,i||`
|
|
12
|
+
`,a!==void 0?a:!0,c,r);await o.promises.writeFile(e,l,{encoding:"utf8",...n,__proto__:null})}function pT(e,t,s){let u=typeof s=="string"?{encoding:s}:s,{EOL:i,finalEOL:a,replacer:c,spaces:r,...n}={__proto__:null,...u},o=Me(),l=cd(t,i||`
|
|
13
|
+
`,a!==void 0?a:!0,c,r);o.writeFileSync(e,l,{encoding:"utf8",...n,__proto__:null})}});var Ed=ge(($G,Sd)=>{"use strict";var dT=Object.defineProperty,Le=(e,t)=>dT(e,"name",{value:t,configurable:!0}),dr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fT=dr(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=void 0;var t=require("fs"),s=require("internal/fs/promises"),u=Le(async(r,n={})=>{let{ignoreErrors:o=!1}=n;try{return a(await(0,s.stat)(r),n)}catch(l){let h=l;if(o||h.code==="EACCES")return!1;throw h}},"isexe");e.isexe=u;var i=Le((r,n={})=>{let{ignoreErrors:o=!1}=n;try{return a((0,t.statSync)(r),n)}catch(l){let h=l;if(o||h.code==="EACCES")return!1;throw h}},"sync");e.sync=i;var a=Le((r,n)=>r.isFile()&&c(r,n),"checkStat"),c=Le((r,n)=>{let o=n.uid??process.getuid?.(),l=n.groups??process.getgroups?.()??[],h=n.gid??process.getgid?.()??l[0];if(o===void 0||h===void 0)throw new Error("cannot get uid or gid");let p=new Set([h,...l]),d=r.mode,g=r.uid,m=r.gid,f=parseInt("100",8),y=parseInt("010",8),S=parseInt("001",8),E=f|y;return!!(d&S||d&y&&p.has(m)||d&f&&g===o||d&E&&o===0)},"checkMode")}),gT=dr(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=void 0;var t=require("fs"),s=require("internal/fs/promises"),u=Le(async(r,n={})=>{let{ignoreErrors:o=!1}=n;try{return c(await(0,s.stat)(r),r,n)}catch(l){let h=l;if(o||h.code==="EACCES")return!1;throw h}},"isexe");e.isexe=u;var i=Le((r,n={})=>{let{ignoreErrors:o=!1}=n;try{return c((0,t.statSync)(r),r,n)}catch(l){let h=l;if(o||h.code==="EACCES")return!1;throw h}},"sync");e.sync=i;var a=Le((r,n)=>{let{pathExt:o=process.env.PATHEXT||""}=n,l=o.split(";");if(l.indexOf("")!==-1)return!0;for(let h=0;h<l.length;h++){let p=l[h].toLowerCase(),d=r.substring(r.length-p.length).toLowerCase();if(p&&d===p)return!0}return!1},"checkPathExt"),c=Le((r,n,o)=>r.isFile()&&a(n,o),"checkStat")}),mT=dr(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),yT=dr(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(o,l,h,p){p===void 0&&(p=h);var d=Object.getOwnPropertyDescriptor(l,h);(!d||("get"in d?!l.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:Le(function(){return l[h]},"get")}),Object.defineProperty(o,p,d)}:function(o,l,h,p){p===void 0&&(p=h),o[p]=l[h]}),s=e&&e.__setModuleDefault||(Object.create?function(o,l){Object.defineProperty(o,"default",{enumerable:!0,value:l})}:function(o,l){o.default=l}),u=e&&e.__importStar||function(o){if(o&&o.__esModule)return o;var l={};if(o!=null)for(var h in o)h!=="default"&&Object.prototype.hasOwnProperty.call(o,h)&&t(l,o,h);return s(l,o),l},i=e&&e.__exportStar||function(o,l){for(var h in o)h!=="default"&&!Object.prototype.hasOwnProperty.call(l,h)&&t(l,o,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=e.posix=e.win32=void 0;var a=u(fT());e.posix=a;var c=u(gT());e.win32=c,i(mT(),e);var r=process.env._ISEXE_TEST_PLATFORM_||process.platform,n=r==="win32"?c:a;e.isexe=n.isexe,e.sync=n.sync}),vT=dr((e,t)=>{var{isexe:s,sync:u}=yT(),{join:i,delimiter:a,sep:c,posix:r}=require("path"),n=process.platform==="win32",o=new RegExp(`[${r.sep}${c===r.sep?"":c}]`.replace(/(\\)/g,"\\$1")),l=new RegExp(`^\\.${o.source}`),h=Le(f=>Object.assign(new Error(`not found: ${f}`),{code:"ENOENT"}),"getNotFoundError"),p=Le((f,{path:y=process.env.PATH,pathExt:S=process.env.PATHEXT,delimiter:E=a})=>{let b=f.match(o)?[""]:[...n?[process.cwd()]:[],...(y||"").split(E)];if(n){let _=S||[".EXE",".CMD",".BAT",".COM"].join(E),O=_.split(E).flatMap(w=>[w,w.toLowerCase()]);return f.includes(".")&&O[0]!==""&&O.unshift(""),{pathEnv:b,pathExt:O,pathExtExe:_}}return{pathEnv:b,pathExt:[""]}},"getPathInfo"),d=Le((f,y)=>{let S=/^".*"$/.test(f)?f.slice(1,-1):f;return(!S&&l.test(y)?y.slice(0,2):"")+i(S,y)},"getPathPart"),g=Le(async(f,y={})=>{let{pathEnv:S,pathExt:E,pathExtExe:b}=p(f,y),_=[];for(let O of S){let w=d(O,f);for(let A of E){let I=w+A;if(await s(I,{pathExt:b,ignoreErrors:!0})){if(!y.all)return I;_.push(I)}}}if(y.all&&_.length)return _;if(y.nothrow)return null;throw h(f)},"which"),m=Le((f,y={})=>{let{pathEnv:S,pathExt:E,pathExtExe:b}=p(f,y),_=[];for(let O of S){let w=d(O,f);for(let A of E){let I=w+A;if(u(I,{pathExt:b,ignoreErrors:!0})){if(!y.all)return I;_.push(I)}}}if(y.all&&_.length)return _;if(y.nothrow)return null;throw h(f)},"whichSync");t.exports=g,g.sync=m}),ST=dr((e,t)=>{"use strict";var s=Le((i,a)=>{if(!i.length)return'""';let c;if(!/[ \t\n\v"]/.test(i))c=i;else{c='"';for(let r=0;r<=i.length;++r){let n=0;for(;i[r]==="\\";)++r,++n;if(r===i.length){c+="\\".repeat(n*2);break}i[r]==='"'?(c+="\\".repeat(n*2+1),c+=i[r]):(c+="\\".repeat(n),c+=i[r])}c+='"'}return c=c.replace(/[ !%^&()<>|"]/g,"^$&"),a&&(c=c.replace(/[ !%^&()<>|"]/g,"^$&")),c},"cmd"),u=Le(i=>i.length?/[\t\n\r "#$&'()*;<>?\\`|~]/.test(i)?`'${i.replace(/'/g,"'\\''")}'`.replace(/^(?:'')+(?!$)/,"").replace(/\\'''/g,"\\'"):i:"''","sh");t.exports={cmd:s,sh:u}}),{spawn:ET}=require("internal/child_process"),bT=require("os"),_T=vT(),md=ST(),Na=Le((e,t,s={},u={})=>{if(s.shell)return vd(e,t,s,u);let i,a,c=new Promise((d,g)=>{i=d,a=g}),r=new Error("command failed"),n=[],o=[],l=Le(d=>({cmd:e,args:t,...d,...OT(n,o,s),...u}),"getResult"),h=Le((d,g)=>{let m=l(g);a(Object.assign(d,m))},"rejectWithOpts"),p=ET(e,t,s);return c.stdin=p.stdin,c.process=p,p.on("error",h),p.stdout&&(p.stdout.on("data",d=>n.push(d)),p.stdout.on("error",h)),p.stderr&&(p.stderr.on("data",d=>o.push(d)),p.stderr.on("error",h)),p.on("close",(d,g)=>{d||g?h(r,{code:d,signal:g}):i(l({code:d,signal:g}))}),c},"promiseSpawn"),vd=Le((e,t,s,u)=>{let i=s.shell;i===!0&&(i=process.platform==="win32"?process.env.ComSpec||"cmd.exe":"sh");let a={...s,shell:!1},c=[],r=e;if(/(?:^|\\)cmd(?:\.exe)?$/i.test(i)){let n=!1,o="",l=!1;for(let p=0;p<e.length;++p){let d=e.charAt(p);if(d===" "&&!l)break;o+=d,(d==='"'||d==="'")&&(l=!l)}let h;try{h=_T.sync(o,{path:a.env&&yd(a.env,"PATH")||process.env.PATH,pathext:a.env&&yd(a.env,"PATHEXT")||process.env.PATHEXT}).toLowerCase()}catch{h=o.toLowerCase()}n=h.endsWith(".cmd")||h.endsWith(".bat");for(let p of t)r+=` ${md.cmd(p,n)}`;c.push("/d","/s","/c",r),a.windowsVerbatimArguments=!0}else{for(let n of t)r+=` ${md.sh(n)}`;c.push("-c",r)}return Na(i,c,a,u)},"spawnWithShell"),wT=Le((e,t={},s={})=>{let u={...t,shell:!0},i=[].concat(e),a=process.platform;if(a==="linux"&&bT.release().toLowerCase().includes("microsoft")&&(a="wsl",!process.env.BROWSER))return Promise.reject(new Error("Set the BROWSER environment variable to your desired browser."));let c=u.command;return c||(a==="win32"?(u.shell=process.env.ComSpec,c='start ""'):a==="wsl"?c="sensible-browser":a==="darwin"?c="open":c="xdg-open"),vd(c,i,u,s)},"open");Na.open=wT;var xa=Le((e="pipe",t)=>e==="pipe"||e===null?!0:Array.isArray(e)?xa(e[t],t):!1,"isPipe"),OT=Le((e,t,{stdioString:s=!0,stdio:u})=>{let i={stdout:null,stderr:null};return xa(u,1)&&(i.stdout=Buffer.concat(e),s&&(i.stdout=i.stdout.toString().trim())),xa(u,2)&&(i.stderr=Buffer.concat(t),s&&(i.stderr=i.stderr.toString().trim())),i},"stdioResult"),yd=Le((e,t)=>{t=t.toLowerCase();for(let s of Object.keys(e).sort())if(s.toLowerCase()===t)return e[s]},"findInObject");Sd.exports=Na});var Ci=ge((MG,Ad)=>{var ja=Object.defineProperty,RT=Object.getOwnPropertyDescriptor,AT=Object.getOwnPropertyNames,CT=Object.prototype.hasOwnProperty,IT=(e,t)=>{for(var s in t)ja(e,s,{get:t[s],enumerable:!0})},TT=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of AT(t))!CT.call(e,i)&&i!==s&&ja(e,i,{get:()=>t[i],enumerable:!(u=RT(t,i))||u.enumerable});return e},PT=e=>TT(ja({},"__esModule",{value:!0}),e),_d={};IT(_d,{isSpawnError:()=>$T,isStdioType:()=>$a,spawn:()=>MT,spawnSync:()=>jT});Ad.exports=PT(_d);var wd=tr(),xT=rr(),es=Vt(),bd=zt(),NT=(0,wd.getAbortSignal)(),kT=(0,wd.getSpinner)(),Od=/\.(?:cmd|bat|ps1)$/i,ka;function LT(){return ka===void 0&&(ka=require("internal/child_process")),ka}var La;function DT(){return La===void 0&&(La=Ed()),La}var Da;function Rd(){return Da===void 0&&(Da=require("path")),Da}function $T(e){if(e===null||typeof e!="object")return!1;let t=e;return(0,es.hasOwn)(t,"code")&&typeof t.code<"u"||(0,es.hasOwn)(t,"errno")&&typeof t.errno<"u"||(0,es.hasOwn)(t,"syscall")&&typeof t.syscall=="string"}function $a(e,t){return arguments.length===1?typeof e=="string"&&["pipe","ignore","inherit","overlapped"].includes(e):e===t||e==null&&t==="pipe"||(0,xT.isArray)(e)&&e.length>2&&e[0]===t&&e[1]===t&&e[2]===t}function Ma(e){let t=e,{stderr:s,stdout:u}=t;return typeof u=="string"&&(t.stdout=(0,bd.stripAnsi)(u)),typeof s=="string"&&(t.stderr=(0,bd.stripAnsi)(s)),t}function MT(e,t,s,u){let i=(0,es.getOwn)(s,"shell"),a=process.platform==="win32",c=e;if(a&&i&&Od.test(c)){let O=Rd();c=O.basename(c,O.extname(c))}let{spinner:r=kT,stripAnsi:n=!0,...o}={__proto__:null,...s},l=r,{env:h,stdio:p,stdioString:d=!0}=o,g=!!l?.isSpinning&&!$a(p,"ignore")&&!$a(p,"pipe"),m=g;g&&l.stop();let f=DT(),y=h?{__proto__:null,...process.env,...h}:process.env,S={__proto__:null,cwd:typeof o.cwd=="string"?o.cwd:void 0,env:y,signal:NT,stdio:o.stdio,stdioString:d,shell:o.shell,timeout:o.timeout,uid:o.uid,gid:o.gid},E=f(c,t?[...t]:[],S,u),b=E,_;return n&&d?_=E.then(O=>{let w=Ma(O);return"code"in w&&(w.exitCode=w.code),w}).catch(O=>{throw Ma(O)}):_=E.then(O=>{if("code"in O){let w=O;return w.exitCode=O.code,w}return O}),m&&(_=_.finally(()=>{l.start()})),_.process=b.process,_.stdin=b.stdin,_}function jT(e,t,s){let u=(0,es.getOwn)(s,"shell"),i=process.platform==="win32",a=e;if(i&&u&&Od.test(a)){let p=Rd();a=p.basename(a,p.extname(a))}let{stripAnsi:c=!0,...r}={__proto__:null,...s},{stdioString:n=!0}=r,o={encoding:n?"utf8":"buffer",...r},l=o.encoding!=="buffer",h=LT().spawnSync(a,t,o);if(l){let{stderr:p,stdout:d}=h;d&&(h.stdout=d.toString().trim()),p&&(h.stderr=p.toString().trim())}return c&&l?Ma(h):h}});var $d=ge((jG,Dd)=>{var BT=Object.defineProperty,Xe=(e,t)=>BT(e,"name",{value:t,configurable:!0}),Ii=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),UT=Ii(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=void 0;var t=require("fs"),s=require("internal/fs/promises"),u=Xe(async(r,n={})=>{let{ignoreErrors:o=!1}=n;try{return a(await(0,s.stat)(r),n)}catch(l){let h=l;if(o||h.code==="EACCES")return!1;throw h}},"isexe");e.isexe=u;var i=Xe((r,n={})=>{let{ignoreErrors:o=!1}=n;try{return a((0,t.statSync)(r),n)}catch(l){let h=l;if(o||h.code==="EACCES")return!1;throw h}},"sync");e.sync=i;var a=Xe((r,n)=>r.isFile()&&c(r,n),"checkStat"),c=Xe((r,n)=>{let o=n.uid??process.getuid?.(),l=n.groups??process.getgroups?.()??[],h=n.gid??process.getgid?.()??l[0];if(o===void 0||h===void 0)throw new Error("cannot get uid or gid");let p=new Set([h,...l]),d=r.mode,g=r.uid,m=r.gid,f=parseInt("100",8),y=parseInt("010",8),S=parseInt("001",8),E=f|y;return!!(d&S||d&y&&p.has(m)||d&f&&g===o||d&E&&o===0)},"checkMode")}),FT=Ii(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=void 0;var t=require("fs"),s=require("internal/fs/promises"),u=Xe(async(r,n={})=>{let{ignoreErrors:o=!1}=n;try{return c(await(0,s.stat)(r),r,n)}catch(l){let h=l;if(o||h.code==="EACCES")return!1;throw h}},"isexe");e.isexe=u;var i=Xe((r,n={})=>{let{ignoreErrors:o=!1}=n;try{return c((0,t.statSync)(r),r,n)}catch(l){let h=l;if(o||h.code==="EACCES")return!1;throw h}},"sync");e.sync=i;var a=Xe((r,n)=>{let{pathExt:o=process.env.PATHEXT||""}=n,l=o.split(";");if(l.indexOf("")!==-1)return!0;for(let h=0;h<l.length;h++){let p=l[h].toLowerCase(),d=r.substring(r.length-p.length).toLowerCase();if(p&&d===p)return!0}return!1},"checkPathExt"),c=Xe((r,n,o)=>r.isFile()&&a(n,o),"checkStat")}),HT=Ii(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),GT=Ii(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(o,l,h,p){p===void 0&&(p=h);var d=Object.getOwnPropertyDescriptor(l,h);(!d||("get"in d?!l.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:Xe(function(){return l[h]},"get")}),Object.defineProperty(o,p,d)}:function(o,l,h,p){p===void 0&&(p=h),o[p]=l[h]}),s=e&&e.__setModuleDefault||(Object.create?function(o,l){Object.defineProperty(o,"default",{enumerable:!0,value:l})}:function(o,l){o.default=l}),u=e&&e.__importStar||function(o){if(o&&o.__esModule)return o;var l={};if(o!=null)for(var h in o)h!=="default"&&Object.prototype.hasOwnProperty.call(o,h)&&t(l,o,h);return s(l,o),l},i=e&&e.__exportStar||function(o,l){for(var h in o)h!=="default"&&!Object.prototype.hasOwnProperty.call(l,h)&&t(l,o,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=e.posix=e.win32=void 0;var a=u(UT());e.posix=a;var c=u(FT());e.win32=c,i(HT(),e);var r=process.env._ISEXE_TEST_PLATFORM_||process.platform,n=r==="win32"?c:a;e.isexe=n.isexe,e.sync=n.sync}),{isexe:VT,sync:WT}=GT(),{join:zT,delimiter:qT,sep:Cd,posix:Id}=require("path"),Td=process.platform==="win32",Pd=new RegExp(`[${Id.sep}${Cd===Id.sep?"":Cd}]`.replace(/(\\)/g,"\\$1")),KT=new RegExp(`^\\.${Pd.source}`),xd=Xe(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),Nd=Xe((e,{path:t=process.env.PATH,pathExt:s=process.env.PATHEXT,delimiter:u=qT})=>{let i=e.match(Pd)?[""]:[...Td?[process.cwd()]:[],...(t||"").split(u)];if(Td){let a=s||[".EXE",".CMD",".BAT",".COM"].join(u),c=a.split(u).flatMap(r=>[r,r.toLowerCase()]);return e.includes(".")&&c[0]!==""&&c.unshift(""),{pathEnv:i,pathExt:c,pathExtExe:a}}return{pathEnv:i,pathExt:[""]}},"getPathInfo"),kd=Xe((e,t)=>{let s=/^".*"$/.test(e)?e.slice(1,-1):e;return(!s&&KT.test(t)?t.slice(0,2):"")+zT(s,t)},"getPathPart"),Ld=Xe(async(e,t={})=>{let{pathEnv:s,pathExt:u,pathExtExe:i}=Nd(e,t),a=[];for(let c of s){let r=kd(c,e);for(let n of u){let o=r+n;if(await VT(o,{pathExt:i,ignoreErrors:!0})){if(!t.all)return o;a.push(o)}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw xd(e)},"which"),JT=Xe((e,t={})=>{let{pathEnv:s,pathExt:u,pathExtExe:i}=Nd(e,t),a=[];for(let c of s){let r=kd(c,e);for(let n of u){let o=r+n;if(WT(o,{pathExt:i,ignoreErrors:!0})){if(!t.all)return o;a.push(o)}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw xd(e)},"whichSync");Dd.exports=Ld;Ld.sync=JT});var Hd=ge((BG,Fd)=>{var Ga=Object.defineProperty,ZT=Object.getOwnPropertyDescriptor,XT=Object.getOwnPropertyNames,YT=Object.prototype.hasOwnProperty,QT=(e,t)=>{for(var s in t)Ga(e,s,{get:t[s],enumerable:!0})},eP=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of XT(t))!YT.call(e,i)&&i!==s&&Ga(e,i,{get:()=>t[i],enumerable:!(u=ZT(t,i))||u.enumerable});return e},tP=e=>eP(Ga({},"__esModule",{value:!0}),e),jd={};QT(jd,{execBin:()=>iP,findRealBin:()=>Ni,findRealNpm:()=>oP,findRealPnpm:()=>aP,findRealYarn:()=>lP,isShadowBinPath:()=>Ha,resolveBinPathSync:()=>fr,which:()=>nP,whichBin:()=>Ud,whichBinSync:()=>za,whichSync:()=>Bd});Fd.exports=tP(jd);var Pi=Vn(),Ti=zn(),rP=bu(),Va=Fs(),Md=Qr(),Mt=ar(),sP=Ci(),Ba;function Wa(){return Ba===void 0&&(Ba=require("fs")),Ba}var Ua;function ts(){return Ua===void 0&&(Ua=require("path")),Ua}var Fa;function xi(){return Fa===void 0&&(Fa=$d()),Fa}async function iP(e,t,s){let u=(0,Mt.isPath)(e)?fr(e):await Ud(e);if(!u){let a=new Error(`Binary not found: ${e}
|
|
14
|
+
Possible causes:
|
|
15
|
+
- Binary "${e}" is not installed or not in PATH
|
|
16
|
+
- Binary name is incorrect or misspelled
|
|
17
|
+
- Installation directory is not in system PATH
|
|
18
|
+
To resolve:
|
|
19
|
+
1. Verify "${e}" is installed: which ${e} (Unix) or where ${e} (Windows)
|
|
20
|
+
2. Install the binary if missing, ex: npm install -g ${e}
|
|
21
|
+
3. Check PATH environment variable includes the binary location`);throw a.code="ENOENT",a}let i=Array.isArray(u)?u[0]:u;return await(0,sP.spawn)(i,t??[],{shell:Va.WIN32,...s})}async function nP(e,t){return await xi()(e,t)}function Bd(e,t){return xi().sync(e,t)}async function Ud(e,t){let s=xi(),u={nothrow:!0,...t},i=await s(e,u);if(u?.all){let a=Array.isArray(i)?i:typeof i=="string"?[i]:void 0;return a?.length?a.map(c=>fr(c)):a}if(i)return fr(i)}function za(e,t){let s={nothrow:!0,...t},u=Bd(e,s);if(s.all){let i=Array.isArray(u)?u:typeof u=="string"?[u]:void 0;return i?.length?i.map(a=>fr(a)):i}if(u)return fr(u)}function Ha(e){return e?e.replace(/\\/g,"/").includes("node_modules/.bin"):!1}function Ni(e,t=[]){let s=Wa(),u=ts(),i=xi();for(let c of t)if(s?.existsSync(c))return c;let a=i?.sync(e,{nothrow:!0});if(a){let c=u?.dirname(a);if(Ha(c)){let r=i?.sync(e,{all:!0,nothrow:!0})||[],n=Array.isArray(r)?r:typeof r=="string"?[r]:[];for(let o of n){let l=u?.dirname(o);if(!Ha(l))return o}}return a}}function oP(){let e=Wa(),t=ts(),s=t?.dirname(process.execPath),u=t?.join(s,"npm");if(e?.existsSync(u))return u;let i=Ni("npm",["/usr/local/bin/npm","/usr/bin/npm"]);if(i&&e?.existsSync(i))return i;let a=za("npm",{nothrow:!0});return a&&typeof a=="string"&&e?.existsSync(a)?a:"npm"}function aP(){let e=ts(),t=Va.WIN32?[e?.join((0,Ti.getAppdata)(),"npm","pnpm.cmd"),e?.join((0,Ti.getAppdata)(),"npm","pnpm"),e?.join((0,Ti.getLocalappdata)(),"pnpm","pnpm.cmd"),e?.join((0,Ti.getLocalappdata)(),"pnpm","pnpm"),"C:\\Program Files\\nodejs\\pnpm.cmd","C:\\Program Files\\nodejs\\pnpm"].filter(Boolean):["/usr/local/bin/pnpm","/usr/bin/pnpm",e?.join((0,rP.getXdgDataHome)()||`${(0,Pi.getHome)()}/.local/share`,"pnpm/pnpm"),e?.join((0,Pi.getHome)(),".pnpm/pnpm")].filter(Boolean);return Ni("pnpm",t)??""}function lP(){let e=ts(),t=["/usr/local/bin/yarn","/usr/bin/yarn",e?.join((0,Pi.getHome)(),".yarn/bin/yarn"),e?.join((0,Pi.getHome)(),".config/yarn/global/node_modules/.bin/yarn")].filter(Boolean);return Ni("yarn",t)??""}function fr(e){let t=Wa(),s=ts();if(!s?.isAbsolute(e))try{let r=za(e);r&&(e=r)}catch{}if(e=(0,Mt.normalizePath)(e),e===".")return e;let u=s?.extname(e),i=u.toLowerCase(),a=s?.basename(e,u),c=a==="node"?-1:/(?<=\/)\.volta\//i.exec(e)?.index??-1;if(c!==-1){let r=e.slice(0,c),n=s?.join(r,"tools"),o=s?.join(n,"image"),l=s?.join(n,"user"),h=(0,Md.readJsonSync)(s?.join(l,"platform.json"),{throws:!1}),p=h?.node?.runtime,d=h?.node?.npm,g="";if(a==="npm"||a==="npx"){if(d){let m=`bin/${a}-cli.js`;g=s?.join(o,`npm/${d}/${m}`),p&&!t?.existsSync(g)&&(g=s?.join(o,`node/${p}/lib/node_modules/npm/${m}`),t?.existsSync(g)||(g=""))}}else{let m=s?.join(l,"bin"),f=(0,Md.readJsonSync)(s?.join(m,`${a}.json`),{throws:!1})?.package;f&&(g=s?.join(o,`packages/${f}/bin/${a}`),t?.existsSync(g)||(g=`${g}.cmd`,t?.existsSync(g)||(g="")))}if(g){try{return(0,Mt.normalizePath)(t?.realpathSync.native(g))}catch{}return g}}if(Va.WIN32){let r=i===""||i===".cmd"||i===".exe"||i===".ps1",n=a==="npm"||a==="npx",o=a==="pnpm"||a==="yarn";if(r&&n){let h=s?.join(s?.dirname(e),`node_modules/npm/bin/${a}-cli.js`);if(t?.existsSync(h)){try{return t?.realpathSync.native(h)}catch{}return h}}let l="";if(r&&i!==".exe"&&t?.existsSync(e)){let h=t?.readFileSync(e,"utf8");n?i===".cmd"?l=a==="npm"?/(?<="NPM_CLI_JS=%~dp0\\).*(?=")/.exec(h)?.[0]||"":/(?<="NPX_CLI_JS=%~dp0\\).*(?=")/.exec(h)?.[0]||"":i===""?l=a==="npm"?/(?<=NPM_CLI_JS="\$CLI_BASEDIR\/).*(?=")/.exec(h)?.[0]||"":/(?<=NPX_CLI_JS="\$CLI_BASEDIR\/).*(?=")/.exec(h)?.[0]||"":i===".ps1"&&(l=a==="npm"?/(?<=\$NPM_CLI_JS="\$PSScriptRoot\/).*(?=")/.exec(h)?.[0]||"":/(?<=\$NPX_CLI_JS="\$PSScriptRoot\/).*(?=")/.exec(h)?.[0]||""):o?i===".cmd"?(l=/(?<=node\s+")%~dp0\\([^"]+)(?="\s+%\*)/.exec(h)?.[1]||"",l||(l=/(?<="%~dp0\\[^"]*node[^"]*"\s+")%~dp0\\([^"]+)(?="\s+%\*)/.exec(h)?.[1]||""),l||(l=/(?<="%dp0%\\).*(?=" %\*\r\n)/.exec(h)?.[0]||"")):i===""?(l=/(?<="\$basedir\/)\.tools\/pnpm\/[^"]+(?="\s+"\$@")/.exec(h)?.[0]||"",l||(l=/(?<=exec\s+node\s+"\$basedir\/)\.tools\/pnpm\/[^"]+(?="\s+"\$@")/.exec(h)?.[0]||""),l||(l=/(?<="\$basedir\/).*(?=" "\$@"\n)/.exec(h)?.[0]||"")):i===".ps1"&&(l=/(?<="\$basedir\/).*(?=" $args\n)/.exec(h)?.[0]||""):i===".cmd"?l=/(?<="%dp0%\\).*(?=" %\*\r\n)/.exec(h)?.[0]||"":i===""?l=/(?<="$basedir\/).*(?=" "\$@"\n)/.exec(h)?.[0]||"":i===".ps1"&&(l=/(?<="\$basedir\/).*(?=" $args\n)/.exec(h)?.[0]||""),l&&(e=(0,Mt.normalizePath)(s?.resolve(s?.dirname(e),l)))}}else{let r=i==="",n=a==="pnpm"||a==="yarn",o=a==="npm"||a==="npx";if(n&&e.includes("/.bin/pnpm/bin/")){let l=e.indexOf("/.bin/pnpm");if(l!==-1){let h=e.slice(0,l+10);try{(t?.statSync(h)).isFile()&&(e=(0,Mt.normalizePath)(h),r=!s?.extname(e))}catch{}}}if(r&&(n||o)&&t?.existsSync(e)){let l=t?.readFileSync(e,"utf8"),h="";if(n){if(h=/(?<="\$basedir\/)\.tools\/[^"]+(?="\s+"\$@")/.exec(l)?.[0]||"",h||(h=/(?<="\$basedir\/)[^"]+(?="\s+"\$@")/.exec(l)?.[0]||""),!h){let p=/exec\s+node\s+"?\$basedir\/([^"]+)"?\s+"\$@"/.exec(l);p&&(h=p[1]||"")}h&&a==="pnpm"&&h.startsWith("pnpm/")&&(h=`../${h}`)}else o&&(h=a==="npm"?/(?<=NPM_CLI_JS="\$CLI_BASEDIR\/).*(?=")/.exec(l)?.[0]||"":/(?<=NPX_CLI_JS="\$CLI_BASEDIR\/).*(?=")/.exec(l)?.[0]||"");h&&(e=(0,Mt.normalizePath)(s?.resolve(s?.dirname(e),h)))}}try{let r=t?.realpathSync.native(e);return(0,Mt.normalizePath)(r)}catch{}return(0,Mt.normalizePath)(e)}});var Wd=ge((UG,Vd)=>{var qa=Object.defineProperty,cP=Object.getOwnPropertyDescriptor,uP=Object.getOwnPropertyNames,hP=Object.prototype.hasOwnProperty,pP=(e,t)=>{for(var s in t)qa(e,s,{get:t[s],enumerable:!0})},dP=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of uP(t))!hP.call(e,i)&&i!==s&&qa(e,i,{get:()=>t[i],enumerable:!(u=cP(t,i))||u.enumerable});return e},fP=e=>dP(qa({},"__esModule",{value:!0}),e),Gd={};pP(Gd,{getNpmConfigRegistry:()=>gP,getNpmConfigUserAgent:()=>mP,getNpmLifecycleEvent:()=>yP,getNpmRegistry:()=>vP,getNpmToken:()=>SP});Vd.exports=fP(Gd);var rs=xt();function gP(){return(0,rs.getEnvValue)("npm_config_registry")}function mP(){return(0,rs.getEnvValue)("npm_config_user_agent")}function yP(){return(0,rs.getEnvValue)("npm_lifecycle_event")}function vP(){return(0,rs.getEnvValue)("NPM_REGISTRY")}function SP(){return(0,rs.getEnvValue)("NPM_TOKEN")}});var rc=ge((FG,im)=>{var rf=Object.defineProperty,v=(e,t)=>rf(e,"name",{value:t,configurable:!0}),EP=(e,t)=>()=>(e&&(t=e(e=0)),t),K=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),bP=(e,t)=>{for(var s in t)rf(e,s,{get:t[s],enumerable:!0})},sf=K((e,t)=>{"use strict";var s=Symbol.for("indent"),u=Symbol.for("newline"),i=`
|
|
22
|
+
`,a=" ",c=/^\uFEFF/,r=/^\s*[{[]((?:\r?\n)+)([\s\t]*)/,n=/^(?:\{\}|\[\])((?:\r?\n)+)?$/,o=/^Unexpected token '?(.)'?(,)? /i,l=v(y=>{let S=y.charCodeAt(0).toString(16).toUpperCase();return`0x${S.length%2?"0":""}${S}`},"hexify"),h=v(y=>String(y).replace(c,""),"stripBOM"),p=v((y,S,E=0)=>({message:`${y} while parsing ${S}`,position:E}),"makeParsedError"),d=v((y,S,E=20)=>{let b=y.message;if(!S)return p(b,"empty string");let _=b.match(o),O=b.match(/ position\s+(\d+)/i);_&&(b=b.replace(o,`Unexpected token ${JSON.stringify(_[1])} (${l(_[1])})$2 `));let w;if(O?w=+O[1]:b.match(/^Unexpected end of JSON.*/i)&&(w=S.length-1),w==null)return p(b,`'${S.slice(0,E*2)}'`);let A=w<=E?0:w-E,I=w+E>=S.length?S.length:w+E,P=`${A?"...":""}${S.slice(A,I)}${I===S.length?"":"..."}`;return p(b,`${S===P?"":"near "}${JSON.stringify(P)}`,w)},"parseError"),g=class extends SyntaxError{static{v(this,"JSONParseError")}constructor(y,S,E,b){let _=d(y,S,E);super(_.message),Object.assign(this,_),this.code="EJSONPARSE",this.systemError=y,Error.captureStackTrace(this,b||this.constructor)}get name(){return this.constructor.name}set name(y){}get[Symbol.toStringTag](){return this.constructor.name}},m=v((y,S)=>{let E=JSON.parse(y,S);if(E&&typeof E=="object"){let b=y.match(n)||y.match(r)||[null,"",""];E[u]=b[1]??i,E[s]=b[2]??a}return E},"parseJson"),f=v((y,S,E)=>{let b=h(y);try{return m(b,S)}catch(_){if(typeof y!="string"&&!Buffer.isBuffer(y)){let O=Array.isArray(y)&&y.length===0?"an empty array":String(y);throw Object.assign(new TypeError(`Cannot parse ${O}`),{code:"EJSONPARSE",systemError:_})}throw new g(_,b,E,f)}},"parseJsonError");t.exports=f,f.JSONParseError=g,f.noExceptions=(y,S)=>{try{return m(h(y),S)}catch{}}}),_P=K((e,t)=>{var s=new Set(["dependencies","optionalDependencies","devDependencies","peerDependencies"]),u=v(a=>{for(let c of s)a&&a[c]&&(a[c]=Object.keys(a[c]).sort((r,n)=>r.localeCompare(n,"en")).reduce((r,n)=>(r[n]=a[c][n],r),{}));return a},"orderDeps"),i=v(({content:a,originalContent:c})=>{let r=u({...a});if(r.dependencies&&r.optionalDependencies)for(let p of Object.keys(r.optionalDependencies))delete r.dependencies[p];let n={...c};for(let p of s)r[p]&&(n[p]=r[p]),r[p]&&typeof r=="object"&&Object.keys(r[p]).length===0&&delete n[p];let{dependencies:o,peerDependencies:l}=c||{},{peerDependencies:h}=n;if(o&&l&&h)for(let p of Object.keys(l))o[p]!==void 0&&h[p]!==void 0&&(n.dependencies=n.dependencies||{},n.dependencies[p]=h[p]);return n},"updateDependencies");i.knownKeys=s,t.exports=i}),wP=K((e,t)=>{var s=v(({content:u,originalContent:i={}})=>{let a=u.scripts;if(!a)return i;if(v(()=>Object.entries(a).some(([c,r])=>typeof c!="string"||typeof r!="string"),"hasInvalidScripts")())throw Object.assign(new TypeError("package.json scripts should be a key-value pair of strings."),{code:"ESCRIPTSINVALID"});return{...i,scripts:{...a}}},"updateScripts");t.exports=s}),OP=K((e,t)=>{var s=v(({content:u,originalContent:i={}})=>{let a=u.workspaces;if(!a)return i;let c=v(()=>a.some(r=>typeof r!="string"),"hasInvalidWorkspaces");if(!a.length||c())throw Object.assign(new TypeError("workspaces should be an array of strings."),{code:"EWORKSPACESINVALID"});return{...i,workspaces:[...a]}},"updateWorkspaces");t.exports=s}),Di=K((e,t)=>{"use strict";var s=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...u)=>{}:()=>{};t.exports=s}),$i=K((e,t)=>{"use strict";var s="2.0.0",u=Number.MAX_SAFE_INTEGER||9007199254740991,i=16,a=250,c=["major","premajor","minor","preminor","patch","prepatch","prerelease"];t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:a,MAX_SAFE_INTEGER:u,RELEASE_TYPES:c,SEMVER_SPEC_VERSION:s,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}),os=K((e,t)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:u,MAX_LENGTH:i}=$i(),a=Di();e=t.exports={};var c=e.re=[],r=e.safeRe=[],n=e.src=[],o=e.safeSrc=[],l=e.t={},h=0,p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",i],[p,u]],g=v(f=>{for(let[y,S]of d)f=f.split(`${y}*`).join(`${y}{0,${S}}`).split(`${y}+`).join(`${y}{1,${S}}`);return f},"makeSafeRegex"),m=v((f,y,S)=>{let E=g(y),b=h++;a(f,b,y),l[f]=b,n[b]=y,o[b]=E,c[b]=new RegExp(y,S?"g":void 0),r[b]=new RegExp(E,S?"g":void 0)},"createToken");m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),m("MAINVERSION",`(${n[l.NUMERICIDENTIFIER]})\\.(${n[l.NUMERICIDENTIFIER]})\\.(${n[l.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${n[l.NUMERICIDENTIFIERLOOSE]})\\.(${n[l.NUMERICIDENTIFIERLOOSE]})\\.(${n[l.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${n[l.NONNUMERICIDENTIFIER]}|${n[l.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${n[l.NONNUMERICIDENTIFIER]}|${n[l.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${n[l.PRERELEASEIDENTIFIER]}(?:\\.${n[l.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${n[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${n[l.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${p}+`),m("BUILD",`(?:\\+(${n[l.BUILDIDENTIFIER]}(?:\\.${n[l.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${n[l.MAINVERSION]}${n[l.PRERELEASE]}?${n[l.BUILD]}?`),m("FULL",`^${n[l.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${n[l.MAINVERSIONLOOSE]}${n[l.PRERELEASELOOSE]}?${n[l.BUILD]}?`),m("LOOSE",`^${n[l.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${n[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${n[l.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${n[l.XRANGEIDENTIFIER]})(?:\\.(${n[l.XRANGEIDENTIFIER]})(?:\\.(${n[l.XRANGEIDENTIFIER]})(?:${n[l.PRERELEASE]})?${n[l.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${n[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[l.XRANGEIDENTIFIERLOOSE]})(?:${n[l.PRERELEASELOOSE]})?${n[l.BUILD]}?)?)?`),m("XRANGE",`^${n[l.GTLT]}\\s*${n[l.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${n[l.GTLT]}\\s*${n[l.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${s}})(?:\\.(\\d{1,${s}}))?(?:\\.(\\d{1,${s}}))?`),m("COERCE",`${n[l.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",n[l.COERCEPLAIN]+`(?:${n[l.PRERELEASE]})?(?:${n[l.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",n[l.COERCE],!0),m("COERCERTLFULL",n[l.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${n[l.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",m("TILDE",`^${n[l.LONETILDE]}${n[l.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${n[l.LONETILDE]}${n[l.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${n[l.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",m("CARET",`^${n[l.LONECARET]}${n[l.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${n[l.LONECARET]}${n[l.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${n[l.GTLT]}\\s*(${n[l.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${n[l.GTLT]}\\s*(${n[l.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${n[l.GTLT]}\\s*(${n[l.LOOSEPLAIN]}|${n[l.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${n[l.XRANGEPLAIN]})\\s+-\\s+(${n[l.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${n[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${n[l.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}),vl=K((e,t)=>{"use strict";var s=Object.freeze({loose:!0}),u=Object.freeze({}),i=v(a=>a?typeof a!="object"?s:a:u,"parseOptions");t.exports=i}),nf=K((e,t)=>{"use strict";var s=/^[0-9]+$/,u=v((a,c)=>{let r=s.test(a),n=s.test(c);return r&&n&&(a=+a,c=+c),a===c?0:r&&!n?-1:n&&!r?1:a<c?-1:1},"compareIdentifiers"),i=v((a,c)=>u(c,a),"rcompareIdentifiers");t.exports={compareIdentifiers:u,rcompareIdentifiers:i}}),qe=K((e,t)=>{"use strict";var s=Di(),{MAX_LENGTH:u,MAX_SAFE_INTEGER:i}=$i(),{safeRe:a,t:c}=os(),r=vl(),{compareIdentifiers:n}=nf(),o=class St{static{v(this,"SemVer")}constructor(h,p){if(p=r(p),h instanceof St){if(h.loose===!!p.loose&&h.includePrerelease===!!p.includePrerelease)return h;h=h.version}else if(typeof h!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof h}".`);if(h.length>u)throw new TypeError(`version is longer than ${u} characters`);s("SemVer",h,p),this.options=p,this.loose=!!p.loose,this.includePrerelease=!!p.includePrerelease;let d=h.trim().match(p.loose?a[c.LOOSE]:a[c.FULL]);if(!d)throw new TypeError(`Invalid Version: ${h}`);if(this.raw=h,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(g=>{if(/^[0-9]+$/.test(g)){let m=+g;if(m>=0&&m<i)return m}return g}):this.prerelease=[],this.build=d[5]?d[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(h){if(s("SemVer.compare",this.version,this.options,h),!(h instanceof St)){if(typeof h=="string"&&h===this.version)return 0;h=new St(h,this.options)}return h.version===this.version?0:this.compareMain(h)||this.comparePre(h)}compareMain(h){return h instanceof St||(h=new St(h,this.options)),n(this.major,h.major)||n(this.minor,h.minor)||n(this.patch,h.patch)}comparePre(h){if(h instanceof St||(h=new St(h,this.options)),this.prerelease.length&&!h.prerelease.length)return-1;if(!this.prerelease.length&&h.prerelease.length)return 1;if(!this.prerelease.length&&!h.prerelease.length)return 0;let p=0;do{let d=this.prerelease[p],g=h.prerelease[p];if(s("prerelease compare",p,d,g),d===void 0&&g===void 0)return 0;if(g===void 0)return 1;if(d===void 0)return-1;if(d!==g)return n(d,g)}while(++p)}compareBuild(h){h instanceof St||(h=new St(h,this.options));let p=0;do{let d=this.build[p],g=h.build[p];if(s("build compare",p,d,g),d===void 0&&g===void 0)return 0;if(g===void 0)return 1;if(d===void 0)return-1;if(d!==g)return n(d,g)}while(++p)}inc(h,p,d){if(h.startsWith("pre")){if(!p&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(p){let g=`-${p}`.match(this.options.loose?a[c.PRERELEASELOOSE]:a[c.PRERELEASE]);if(!g||g[1]!==p)throw new Error(`invalid identifier: ${p}`)}}switch(h){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",p,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",p,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",p,d),this.inc("pre",p,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",p,d),this.inc("pre",p,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let g=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[g];else{let m=this.prerelease.length;for(;--m>=0;)typeof this.prerelease[m]=="number"&&(this.prerelease[m]++,m=-2);if(m===-1){if(p===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(g)}}if(p){let m=[p,g];d===!1&&(m=[p]),n(this.prerelease[0],p)===0?isNaN(this.prerelease[1])&&(this.prerelease=m):this.prerelease=m}break}default:throw new Error(`invalid increment argument: ${h}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};t.exports=o}),Sr=K((e,t)=>{"use strict";var s=qe(),u=v((i,a,c=!1)=>{if(i instanceof s)return i;try{return new s(i,a)}catch(r){if(!c)return null;throw r}},"parse");t.exports=u}),of=K((e,t)=>{"use strict";var s=Sr(),u=v((i,a)=>{let c=s(i,a);return c?c.version:null},"valid");t.exports=u}),af=K((e,t)=>{"use strict";var s=Sr(),u=v((i,a)=>{let c=s(i.trim().replace(/^[=v]+/,""),a);return c?c.version:null},"clean");t.exports=u}),ft=K((e,t)=>{var s=Symbol("proc-log.meta");t.exports={META:s,output:{LEVELS:["standard","error","buffer","flush"],KEYS:{standard:"standard",error:"error",buffer:"buffer",flush:"flush"},standard:v(function(...u){return process.emit("output","standard",...u)},"standard"),error:v(function(...u){return process.emit("output","error",...u)},"error"),buffer:v(function(...u){return process.emit("output","buffer",...u)},"buffer"),flush:v(function(...u){return process.emit("output","flush",...u)},"flush")},log:{LEVELS:["notice","error","warn","info","verbose","http","silly","timing","pause","resume"],KEYS:{notice:"notice",error:"error",warn:"warn",info:"info",verbose:"verbose",http:"http",silly:"silly",timing:"timing",pause:"pause",resume:"resume"},error:v(function(...u){return process.emit("log","error",...u)},"error"),notice:v(function(...u){return process.emit("log","notice",...u)},"notice"),warn:v(function(...u){return process.emit("log","warn",...u)},"warn"),info:v(function(...u){return process.emit("log","info",...u)},"info"),verbose:v(function(...u){return process.emit("log","verbose",...u)},"verbose"),http:v(function(...u){return process.emit("log","http",...u)},"http"),silly:v(function(...u){return process.emit("log","silly",...u)},"silly"),timing:v(function(...u){return process.emit("log","timing",...u)},"timing"),pause:v(function(){return process.emit("log","pause")},"pause"),resume:v(function(){return process.emit("log","resume")},"resume")},time:{LEVELS:["start","end"],KEYS:{start:"start",end:"end"},start:v(function(u,i){process.emit("time","start",u);function a(){return process.emit("time","end",u)}if(v(a,"end"),typeof i=="function"){let c=i();return c&&c.finally?c.finally(a):(a(),c)}return a},"start"),end:v(function(u){return process.emit("time","end",u)},"end")},input:{LEVELS:["start","end","read"],KEYS:{start:"start",end:"end",read:"read"},start:v(function(u){process.emit("input","start");function i(){return process.emit("input","end")}if(v(i,"end"),typeof u=="function"){let a=u();return a&&a.finally?a.finally(i):(i(),a)}return i},"start"),end:v(function(){return process.emit("input","end")},"end"),read:v(function(...u){let i,a,c=new Promise((r,n)=>{i=r,a=n});return process.emit("input","read",i,a,...u),c},"read")}}}),Er=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var t=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,s=new Set,u=typeof process=="object"&&process?process:{},i=v((g,m,f,y)=>{typeof u.emitWarning=="function"&&u.emitWarning(g,m,f,y)},"emitWarning"),a=globalThis.AbortController,c=globalThis.AbortSignal;if(typeof a>"u"){c=class{static{v(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(f,y){this._onabort.push(y)}},a=class{static{v(this,"AbortController")}constructor(){m()}signal=new c;abort(f){if(!this.signal.aborted){this.signal.reason=f,this.signal.aborted=!0;for(let y of this.signal._onabort)y(f);this.signal.onabort?.(f)}}};let g=u.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",m=v(()=>{g&&(g=!1,i("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",m))},"warnACPolyfill")}var r=v(g=>!s.has(g),"shouldWarn"),n=Symbol("type"),o=v(g=>g&&g===Math.floor(g)&&g>0&&isFinite(g),"isPosInt"),l=v(g=>o(g)?g<=Math.pow(2,8)?Uint8Array:g<=Math.pow(2,16)?Uint16Array:g<=Math.pow(2,32)?Uint32Array:g<=Number.MAX_SAFE_INTEGER?h:null:null,"getUintArray"),h=class extends Array{static{v(this,"ZeroArray")}constructor(g){super(g),this.fill(0)}},p=class ss{static{v(this,"Stack")}heap;length;static#e=!1;static create(m){let f=l(m);if(!f)return[];ss.#e=!0;let y=new ss(m,f);return ss.#e=!1,y}constructor(m,f){if(!ss.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new f(m),this.length=0}push(m){this.heap[this.length++]=m}pop(){return this.heap[--this.length]}},d=class lf{static{v(this,"LRUCache")}#e;#t;#r;#s;#i;#l;#c;#h;get perf(){return this.#h}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#p;#o;#u;#a;#f;#g;#b;#m;#R;#E;#v;#S;#O;#w;#P;#A;#d;static unsafeExposeInternals(m){return{starts:m.#S,ttls:m.#O,sizes:m.#v,keyMap:m.#o,keyList:m.#u,valList:m.#a,next:m.#f,prev:m.#g,get head(){return m.#b},get tail(){return m.#m},free:m.#R,isBackgroundFetch:v(f=>m.#y(f),"isBackgroundFetch"),backgroundFetch:v((f,y,S,E)=>m.#U(f,y,S,E),"backgroundFetch"),moveToTail:v(f=>m.#G(f),"moveToTail"),indexes:v(f=>m.#N(f),"indexes"),rindexes:v(f=>m.#L(f),"rindexes"),isStale:v(f=>m.#I(f),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#p}get size(){return this.#n}get fetchMethod(){return this.#l}get memoMethod(){return this.#c}get dispose(){return this.#r}get onInsert(){return this.#s}get disposeAfter(){return this.#i}constructor(m){let{max:f=0,ttl:y,ttlResolution:S=1,ttlAutopurge:E,updateAgeOnGet:b,updateAgeOnHas:_,allowStale:O,dispose:w,onInsert:A,disposeAfter:I,noDisposeOnSet:P,noUpdateTTL:L,maxSize:$=0,maxEntrySize:x=0,sizeCalculation:M,fetchMethod:U,memoMethod:V,noDeleteOnFetchRejection:B,noDeleteOnStaleGet:G,allowStaleOnFetchRejection:W,allowStaleOnFetchAbort:N,ignoreFetchAbort:D,perf:T}=m;if(T!==void 0&&typeof T?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#h=T??t,f!==0&&!o(f))throw new TypeError("max option must be a nonnegative integer");let C=f?l(f):Array;if(!C)throw new Error("invalid max value: "+f);if(this.#e=f,this.#t=$,this.maxEntrySize=x||this.#t,this.sizeCalculation=M,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(V!==void 0&&typeof V!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#c=V,U!==void 0&&typeof U!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#l=U,this.#P=!!U,this.#o=new Map,this.#u=new Array(f).fill(void 0),this.#a=new Array(f).fill(void 0),this.#f=new C(f),this.#g=new C(f),this.#b=0,this.#m=0,this.#R=p.create(f),this.#n=0,this.#p=0,typeof w=="function"&&(this.#r=w),typeof A=="function"&&(this.#s=A),typeof I=="function"?(this.#i=I,this.#E=[]):(this.#i=void 0,this.#E=void 0),this.#w=!!this.#r,this.#d=!!this.#s,this.#A=!!this.#i,this.noDisposeOnSet=!!P,this.noUpdateTTL=!!L,this.noDeleteOnFetchRejection=!!B,this.allowStaleOnFetchRejection=!!W,this.allowStaleOnFetchAbort=!!N,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(this.#t!==0&&!o(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!o(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#F()}if(this.allowStale=!!O,this.noDeleteOnStaleGet=!!G,this.updateAgeOnGet=!!b,this.updateAgeOnHas=!!_,this.ttlResolution=o(S)||S===0?S:1,this.ttlAutopurge=!!E,this.ttl=y||0,this.ttl){if(!o(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#$()}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 Z="LRU_CACHE_UNBOUNDED";r(Z)&&(s.add(Z),i("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Z,lf))}}getRemainingTTL(m){return this.#o.has(m)?1/0:0}#$(){let m=new h(this.#e),f=new h(this.#e);this.#O=m,this.#S=f,this.#M=(E,b,_=this.#h.now())=>{if(f[E]=b!==0?_:0,m[E]=b,b!==0&&this.ttlAutopurge){let O=setTimeout(()=>{this.#I(E)&&this.#D(this.#u[E],"expire")},b+1);O.unref&&O.unref()}},this.#C=E=>{f[E]=m[E]!==0?this.#h.now():0},this.#T=(E,b)=>{if(m[b]){let _=m[b],O=f[b];if(!_||!O)return;E.ttl=_,E.start=O,E.now=y||S();let w=E.now-O;E.remainingTTL=_-w}};let y=0,S=v(()=>{let E=this.#h.now();if(this.ttlResolution>0){y=E;let b=setTimeout(()=>y=0,this.ttlResolution);b.unref&&b.unref()}return E},"getNow");this.getRemainingTTL=E=>{let b=this.#o.get(E);if(b===void 0)return 0;let _=m[b],O=f[b];if(!_||!O)return 1/0;let w=(y||S())-O;return _-w},this.#I=E=>{let b=f[E],_=m[E];return!!_&&!!b&&(y||S())-b>_}}#C=v(()=>{},"#updateItemAge");#T=v(()=>{},"#statusTTL");#M=v(()=>{},"#setItemTTL");#I=v(()=>!1,"#isStale");#F(){let m=new h(this.#e);this.#p=0,this.#v=m,this.#x=f=>{this.#p-=m[f],m[f]=0},this.#j=(f,y,S,E)=>{if(this.#y(y))return 0;if(!o(S))if(E){if(typeof E!="function")throw new TypeError("sizeCalculation must be a function");if(S=E(y,f),!o(S))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 S},this.#k=(f,y,S)=>{if(m[f]=y,this.#t){let E=this.#t-m[f];for(;this.#p>E;)this.#B(!0)}this.#p+=m[f],S&&(S.entrySize=y,S.totalCalculatedSize=this.#p)}}#x=v(m=>{},"#removeItemSize");#k=v((m,f,y)=>{},"#addItemSize");#j=v((m,f,y,S)=>{if(y||S)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#N({allowStale:m=this.allowStale}={}){if(this.#n)for(let f=this.#m;!(!this.#_(f)||((m||!this.#I(f))&&(yield f),f===this.#b));)f=this.#g[f]}*#L({allowStale:m=this.allowStale}={}){if(this.#n)for(let f=this.#b;!(!this.#_(f)||((m||!this.#I(f))&&(yield f),f===this.#m));)f=this.#f[f]}#_(m){return m!==void 0&&this.#o.get(this.#u[m])===m}*entries(){for(let m of this.#N())this.#a[m]!==void 0&&this.#u[m]!==void 0&&!this.#y(this.#a[m])&&(yield[this.#u[m],this.#a[m]])}*rentries(){for(let m of this.#L())this.#a[m]!==void 0&&this.#u[m]!==void 0&&!this.#y(this.#a[m])&&(yield[this.#u[m],this.#a[m]])}*keys(){for(let m of this.#N()){let f=this.#u[m];f!==void 0&&!this.#y(this.#a[m])&&(yield f)}}*rkeys(){for(let m of this.#L()){let f=this.#u[m];f!==void 0&&!this.#y(this.#a[m])&&(yield f)}}*values(){for(let m of this.#N())this.#a[m]!==void 0&&!this.#y(this.#a[m])&&(yield this.#a[m])}*rvalues(){for(let m of this.#L())this.#a[m]!==void 0&&!this.#y(this.#a[m])&&(yield this.#a[m])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(m,f={}){for(let y of this.#N()){let S=this.#a[y],E=this.#y(S)?S.__staleWhileFetching:S;if(E!==void 0&&m(E,this.#u[y],this))return this.get(this.#u[y],f)}}forEach(m,f=this){for(let y of this.#N()){let S=this.#a[y],E=this.#y(S)?S.__staleWhileFetching:S;E!==void 0&&m.call(f,E,this.#u[y],this)}}rforEach(m,f=this){for(let y of this.#L()){let S=this.#a[y],E=this.#y(S)?S.__staleWhileFetching:S;E!==void 0&&m.call(f,E,this.#u[y],this)}}purgeStale(){let m=!1;for(let f of this.#L({allowStale:!0}))this.#I(f)&&(this.#D(this.#u[f],"expire"),m=!0);return m}info(m){let f=this.#o.get(m);if(f===void 0)return;let y=this.#a[f],S=this.#y(y)?y.__staleWhileFetching:y;if(S===void 0)return;let E={value:S};if(this.#O&&this.#S){let b=this.#O[f],_=this.#S[f];if(b&&_){let O=b-(this.#h.now()-_);E.ttl=O,E.start=Date.now()}}return this.#v&&(E.size=this.#v[f]),E}dump(){let m=[];for(let f of this.#N({allowStale:!0})){let y=this.#u[f],S=this.#a[f],E=this.#y(S)?S.__staleWhileFetching:S;if(E===void 0||y===void 0)continue;let b={value:E};if(this.#O&&this.#S){b.ttl=this.#O[f];let _=this.#h.now()-this.#S[f];b.start=Math.floor(Date.now()-_)}this.#v&&(b.size=this.#v[f]),m.unshift([y,b])}return m}load(m){this.clear();for(let[f,y]of m){if(y.start){let S=Date.now()-y.start;y.start=this.#h.now()-S}this.set(f,y.value,y)}}set(m,f,y={}){if(f===void 0)return this.delete(m),this;let{ttl:S=this.ttl,start:E,noDisposeOnSet:b=this.noDisposeOnSet,sizeCalculation:_=this.sizeCalculation,status:O}=y,{noUpdateTTL:w=this.noUpdateTTL}=y,A=this.#j(m,f,y.size||0,_);if(this.maxEntrySize&&A>this.maxEntrySize)return O&&(O.set="miss",O.maxEntrySizeExceeded=!0),this.#D(m,"set"),this;let I=this.#n===0?void 0:this.#o.get(m);if(I===void 0)I=this.#n===0?this.#m:this.#R.length!==0?this.#R.pop():this.#n===this.#e?this.#B(!1):this.#n,this.#u[I]=m,this.#a[I]=f,this.#o.set(m,I),this.#f[this.#m]=I,this.#g[I]=this.#m,this.#m=I,this.#n++,this.#k(I,A,O),O&&(O.set="add"),w=!1,this.#d&&this.#s?.(f,m,"add");else{this.#G(I);let P=this.#a[I];if(f!==P){if(this.#P&&this.#y(P)){P.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:L}=P;L!==void 0&&!b&&(this.#w&&this.#r?.(L,m,"set"),this.#A&&this.#E?.push([L,m,"set"]))}else b||(this.#w&&this.#r?.(P,m,"set"),this.#A&&this.#E?.push([P,m,"set"]));if(this.#x(I),this.#k(I,A,O),this.#a[I]=f,O){O.set="replace";let L=P&&this.#y(P)?P.__staleWhileFetching:P;L!==void 0&&(O.oldValue=L)}}else O&&(O.set="update");this.#d&&this.onInsert?.(f,m,f===P?"update":"replace")}if(S!==0&&!this.#O&&this.#$(),this.#O&&(w||this.#M(I,S,E),O&&this.#T(O,I)),!b&&this.#A&&this.#E){let P=this.#E,L;for(;L=P?.shift();)this.#i?.(...L)}return this}pop(){try{for(;this.#n;){let m=this.#a[this.#b];if(this.#B(!0),this.#y(m)){if(m.__staleWhileFetching)return m.__staleWhileFetching}else if(m!==void 0)return m}}finally{if(this.#A&&this.#E){let m=this.#E,f;for(;f=m?.shift();)this.#i?.(...f)}}}#B(m){let f=this.#b,y=this.#u[f],S=this.#a[f];return this.#P&&this.#y(S)?S.__abortController.abort(new Error("evicted")):(this.#w||this.#A)&&(this.#w&&this.#r?.(S,y,"evict"),this.#A&&this.#E?.push([S,y,"evict"])),this.#x(f),m&&(this.#u[f]=void 0,this.#a[f]=void 0,this.#R.push(f)),this.#n===1?(this.#b=this.#m=0,this.#R.length=0):this.#b=this.#f[f],this.#o.delete(y),this.#n--,f}has(m,f={}){let{updateAgeOnHas:y=this.updateAgeOnHas,status:S}=f,E=this.#o.get(m);if(E!==void 0){let b=this.#a[E];if(this.#y(b)&&b.__staleWhileFetching===void 0)return!1;if(this.#I(E))S&&(S.has="stale",this.#T(S,E));else return y&&this.#C(E),S&&(S.has="hit",this.#T(S,E)),!0}else S&&(S.has="miss");return!1}peek(m,f={}){let{allowStale:y=this.allowStale}=f,S=this.#o.get(m);if(S===void 0||!y&&this.#I(S))return;let E=this.#a[S];return this.#y(E)?E.__staleWhileFetching:E}#U(m,f,y,S){let E=f===void 0?void 0:this.#a[f];if(this.#y(E))return E;let b=new a,{signal:_}=y;_?.addEventListener("abort",()=>b.abort(_.reason),{signal:b.signal});let O={signal:b.signal,options:y,context:S},w=v((x,M=!1)=>{let{aborted:U}=b.signal,V=y.ignoreFetchAbort&&x!==void 0;if(y.status&&(U&&!M?(y.status.fetchAborted=!0,y.status.fetchError=b.signal.reason,V&&(y.status.fetchAbortIgnored=!0)):y.status.fetchResolved=!0),U&&!V&&!M)return I(b.signal.reason);let B=L,G=this.#a[f];return(G===L||V&&M&&G===void 0)&&(x===void 0?B.__staleWhileFetching!==void 0?this.#a[f]=B.__staleWhileFetching:this.#D(m,"fetch"):(y.status&&(y.status.fetchUpdated=!0),this.set(m,x,O.options))),x},"cb"),A=v(x=>(y.status&&(y.status.fetchRejected=!0,y.status.fetchError=x),I(x)),"eb"),I=v(x=>{let{aborted:M}=b.signal,U=M&&y.allowStaleOnFetchAbort,V=U||y.allowStaleOnFetchRejection,B=V||y.noDeleteOnFetchRejection,G=L;if(this.#a[f]===L&&(!B||G.__staleWhileFetching===void 0?this.#D(m,"fetch"):U||(this.#a[f]=G.__staleWhileFetching)),V)return y.status&&G.__staleWhileFetching!==void 0&&(y.status.returnedStale=!0),G.__staleWhileFetching;if(G.__returned===G)throw x},"fetchFail"),P=v((x,M)=>{let U=this.#l?.(m,E,O);U&&U instanceof Promise&&U.then(V=>x(V===void 0?void 0:V),M),b.signal.addEventListener("abort",()=>{(!y.ignoreFetchAbort||y.allowStaleOnFetchAbort)&&(x(void 0),y.allowStaleOnFetchAbort&&(x=v(V=>w(V,!0),"res")))})},"pcall");y.status&&(y.status.fetchDispatched=!0);let L=new Promise(P).then(w,A),$=Object.assign(L,{__abortController:b,__staleWhileFetching:E,__returned:void 0});return f===void 0?(this.set(m,$,{...O.options,status:void 0}),f=this.#o.get(m)):this.#a[f]=$,$}#y(m){if(!this.#P)return!1;let f=m;return!!f&&f instanceof Promise&&f.hasOwnProperty("__staleWhileFetching")&&f.__abortController instanceof a}async fetch(m,f={}){let{allowStale:y=this.allowStale,updateAgeOnGet:S=this.updateAgeOnGet,noDeleteOnStaleGet:E=this.noDeleteOnStaleGet,ttl:b=this.ttl,noDisposeOnSet:_=this.noDisposeOnSet,size:O=0,sizeCalculation:w=this.sizeCalculation,noUpdateTTL:A=this.noUpdateTTL,noDeleteOnFetchRejection:I=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:P=this.allowStaleOnFetchRejection,ignoreFetchAbort:L=this.ignoreFetchAbort,allowStaleOnFetchAbort:$=this.allowStaleOnFetchAbort,context:x,forceRefresh:M=!1,status:U,signal:V}=f;if(!this.#P)return U&&(U.fetch="get"),this.get(m,{allowStale:y,updateAgeOnGet:S,noDeleteOnStaleGet:E,status:U});let B={allowStale:y,updateAgeOnGet:S,noDeleteOnStaleGet:E,ttl:b,noDisposeOnSet:_,size:O,sizeCalculation:w,noUpdateTTL:A,noDeleteOnFetchRejection:I,allowStaleOnFetchRejection:P,allowStaleOnFetchAbort:$,ignoreFetchAbort:L,status:U,signal:V},G=this.#o.get(m);if(G===void 0){U&&(U.fetch="miss");let W=this.#U(m,G,B,x);return W.__returned=W}else{let W=this.#a[G];if(this.#y(W)){let C=y&&W.__staleWhileFetching!==void 0;return U&&(U.fetch="inflight",C&&(U.returnedStale=!0)),C?W.__staleWhileFetching:W.__returned=W}let N=this.#I(G);if(!M&&!N)return U&&(U.fetch="hit"),this.#G(G),S&&this.#C(G),U&&this.#T(U,G),W;let D=this.#U(m,G,B,x),T=D.__staleWhileFetching!==void 0&&y;return U&&(U.fetch=N?"stale":"refresh",T&&N&&(U.returnedStale=!0)),T?D.__staleWhileFetching:D.__returned=D}}async forceFetch(m,f={}){let y=await this.fetch(m,f);if(y===void 0)throw new Error("fetch() returned undefined");return y}memo(m,f={}){let y=this.#c;if(!y)throw new Error("no memoMethod provided to constructor");let{context:S,forceRefresh:E,...b}=f,_=this.get(m,b);if(!E&&_!==void 0)return _;let O=y(m,_,{options:b,context:S});return this.set(m,O,b),O}get(m,f={}){let{allowStale:y=this.allowStale,updateAgeOnGet:S=this.updateAgeOnGet,noDeleteOnStaleGet:E=this.noDeleteOnStaleGet,status:b}=f,_=this.#o.get(m);if(_!==void 0){let O=this.#a[_],w=this.#y(O);return b&&this.#T(b,_),this.#I(_)?(b&&(b.get="stale"),w?(b&&y&&O.__staleWhileFetching!==void 0&&(b.returnedStale=!0),y?O.__staleWhileFetching:void 0):(E||this.#D(m,"expire"),b&&y&&(b.returnedStale=!0),y?O:void 0)):(b&&(b.get="hit"),w?O.__staleWhileFetching:(this.#G(_),S&&this.#C(_),O))}else b&&(b.get="miss")}#H(m,f){this.#g[f]=m,this.#f[m]=f}#G(m){m!==this.#m&&(m===this.#b?this.#b=this.#f[m]:this.#H(this.#g[m],this.#f[m]),this.#H(this.#m,m),this.#m=m)}delete(m){return this.#D(m,"delete")}#D(m,f){let y=!1;if(this.#n!==0){let S=this.#o.get(m);if(S!==void 0)if(y=!0,this.#n===1)this.#V(f);else{this.#x(S);let E=this.#a[S];if(this.#y(E)?E.__abortController.abort(new Error("deleted")):(this.#w||this.#A)&&(this.#w&&this.#r?.(E,m,f),this.#A&&this.#E?.push([E,m,f])),this.#o.delete(m),this.#u[S]=void 0,this.#a[S]=void 0,S===this.#m)this.#m=this.#g[S];else if(S===this.#b)this.#b=this.#f[S];else{let b=this.#g[S];this.#f[b]=this.#f[S];let _=this.#f[S];this.#g[_]=this.#g[S]}this.#n--,this.#R.push(S)}}if(this.#A&&this.#E?.length){let S=this.#E,E;for(;E=S?.shift();)this.#i?.(...E)}return y}clear(){return this.#V("delete")}#V(m){for(let f of this.#L({allowStale:!0})){let y=this.#a[f];if(this.#y(y))y.__abortController.abort(new Error("deleted"));else{let S=this.#u[f];this.#w&&this.#r?.(y,S,m),this.#A&&this.#E?.push([y,S,m])}}if(this.#o.clear(),this.#a.fill(void 0),this.#u.fill(void 0),this.#O&&this.#S&&(this.#O.fill(0),this.#S.fill(0)),this.#v&&this.#v.fill(0),this.#b=0,this.#m=0,this.#R.length=0,this.#p=0,this.#n=0,this.#A&&this.#E){let f=this.#E,y;for(;y=f?.shift();)this.#i?.(...y)}}};e.LRUCache=d}),RP=K((e,t)=>{"use strict";var s=v((...r)=>r.every(n=>n)?r.join(""):"","maybeJoin"),u=v(r=>r?encodeURIComponent(r):"","maybeEncode"),i=v(r=>r.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),"formatHashFragment"),a={sshtemplate:v(({domain:r,user:n,project:o,committish:l})=>`git@${r}:${n}/${o}.git${s("#",l)}`,"sshtemplate"),sshurltemplate:v(({domain:r,user:n,project:o,committish:l})=>`git+ssh://git@${r}/${n}/${o}.git${s("#",l)}`,"sshurltemplate"),edittemplate:v(({domain:r,user:n,project:o,committish:l,editpath:h,path:p})=>`https://${r}/${n}/${o}${s("/",h,"/",u(l||"HEAD"),"/",p)}`,"edittemplate"),browsetemplate:v(({domain:r,user:n,project:o,committish:l,treepath:h})=>`https://${r}/${n}/${o}${s("/",h,"/",u(l))}`,"browsetemplate"),browsetreetemplate:v(({domain:r,user:n,project:o,committish:l,treepath:h,path:p,fragment:d,hashformat:g})=>`https://${r}/${n}/${o}/${h}/${u(l||"HEAD")}/${p}${s("#",g(d||""))}`,"browsetreetemplate"),browseblobtemplate:v(({domain:r,user:n,project:o,committish:l,blobpath:h,path:p,fragment:d,hashformat:g})=>`https://${r}/${n}/${o}/${h}/${u(l||"HEAD")}/${p}${s("#",g(d||""))}`,"browseblobtemplate"),docstemplate:v(({domain:r,user:n,project:o,treepath:l,committish:h})=>`https://${r}/${n}/${o}${s("/",l,"/",u(h))}#readme`,"docstemplate"),httpstemplate:v(({auth:r,domain:n,user:o,project:l,committish:h})=>`git+https://${s(r,"@")}${n}/${o}/${l}.git${s("#",h)}`,"httpstemplate"),filetemplate:v(({domain:r,user:n,project:o,committish:l,path:h})=>`https://${r}/${n}/${o}/raw/${u(l||"HEAD")}/${h}`,"filetemplate"),shortcuttemplate:v(({type:r,user:n,project:o,committish:l})=>`${r}:${n}/${o}${s("#",l)}`,"shortcuttemplate"),pathtemplate:v(({user:r,project:n,committish:o})=>`${r}/${n}${s("#",o)}`,"pathtemplate"),bugstemplate:v(({domain:r,user:n,project:o})=>`https://${r}/${n}/${o}/issues`,"bugstemplate"),hashformat:i},c={};c.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:v(({auth:r,user:n,project:o,committish:l,path:h})=>`https://${s(r,"@")}raw.githubusercontent.com/${n}/${o}/${u(l||"HEAD")}/${h}`,"filetemplate"),gittemplate:v(({auth:r,domain:n,user:o,project:l,committish:h})=>`git://${s(r,"@")}${n}/${o}/${l}.git${s("#",h)}`,"gittemplate"),tarballtemplate:v(({domain:r,user:n,project:o,committish:l})=>`https://codeload.${r}/${n}/${o}/tar.gz/${u(l||"HEAD")}`,"tarballtemplate"),extract:v(r=>{let[,n,o,l,h]=r.pathname.split("/",5);if(!(l&&l!=="tree")&&(l||(h=r.hash.slice(1)),o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!n||!o)))return{user:n,project:o,committish:h}},"extract")},c.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:v(({domain:r,user:n,project:o,committish:l,treepath:h,path:p,editpath:d})=>`https://${r}/${n}/${o}${s("/",h,"/",u(l||"HEAD"),"/",p,d)}`,"edittemplate"),tarballtemplate:v(({domain:r,user:n,project:o,committish:l})=>`https://${r}/${n}/${o}/get/${u(l||"HEAD")}.tar.gz`,"tarballtemplate"),extract:v(r=>{let[,n,o,l]=r.pathname.split("/",4);if(!["get"].includes(l)&&(o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!n||!o)))return{user:n,project:o,committish:r.hash.slice(1)}},"extract")},c.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",tarballtemplate:v(({domain:r,user:n,project:o,committish:l})=>`https://${r}/${n}/${o}/repository/archive.tar.gz?ref=${u(l||"HEAD")}`,"tarballtemplate"),extract:v(r=>{let n=r.pathname.slice(1);if(n.includes("/-/")||n.includes("/archive.tar.gz"))return;let o=n.split("/"),l=o.pop();l.endsWith(".git")&&(l=l.slice(0,-4));let h=o.join("/");if(!(!h||!l))return{user:h,project:l,committish:r.hash.slice(1)}},"extract")},c.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:v(({domain:r,project:n,committish:o})=>`git@${r}:${n}.git${s("#",o)}`,"sshtemplate"),sshurltemplate:v(({domain:r,project:n,committish:o})=>`git+ssh://git@${r}/${n}.git${s("#",o)}`,"sshurltemplate"),edittemplate:v(({domain:r,user:n,project:o,committish:l,editpath:h})=>`https://${r}/${n}/${o}${s("/",u(l))}/${h}`,"edittemplate"),browsetemplate:v(({domain:r,project:n,committish:o})=>`https://${r}/${n}${s("/",u(o))}`,"browsetemplate"),browsetreetemplate:v(({domain:r,project:n,committish:o,path:l,hashformat:h})=>`https://${r}/${n}${s("/",u(o))}${s("#",h(l))}`,"browsetreetemplate"),browseblobtemplate:v(({domain:r,project:n,committish:o,path:l,hashformat:h})=>`https://${r}/${n}${s("/",u(o))}${s("#",h(l))}`,"browseblobtemplate"),docstemplate:v(({domain:r,project:n,committish:o})=>`https://${r}/${n}${s("/",u(o))}`,"docstemplate"),httpstemplate:v(({domain:r,project:n,committish:o})=>`git+https://${r}/${n}.git${s("#",o)}`,"httpstemplate"),filetemplate:v(({user:r,project:n,committish:o,path:l})=>`https://gist.githubusercontent.com/${r}/${n}/raw${s("/",u(o))}/${l}`,"filetemplate"),shortcuttemplate:v(({type:r,project:n,committish:o})=>`${r}:${n}${s("#",o)}`,"shortcuttemplate"),pathtemplate:v(({project:r,committish:n})=>`${r}${s("#",n)}`,"pathtemplate"),bugstemplate:v(({domain:r,project:n})=>`https://${r}/${n}`,"bugstemplate"),gittemplate:v(({domain:r,project:n,committish:o})=>`git://${r}/${n}.git${s("#",o)}`,"gittemplate"),tarballtemplate:v(({project:r,committish:n})=>`https://codeload.github.com/gist/${r}/tar.gz/${u(n||"HEAD")}`,"tarballtemplate"),extract:v(r=>{let[,n,o,l]=r.pathname.split("/",4);if(l!=="raw"){if(!o){if(!n)return;o=n,n=null}return o.endsWith(".git")&&(o=o.slice(0,-4)),{user:n,project:o,committish:r.hash.slice(1)}}},"extract"),hashformat:v(function(r){return r&&"file-"+i(r)},"hashformat")},c.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:v(({domain:r,user:n,project:o,committish:l,path:h})=>`https://${r}/${n}/${o}/blob/${u(l)||"HEAD"}/${h}`,"filetemplate"),httpstemplate:v(({domain:r,user:n,project:o,committish:l})=>`https://${r}/${n}/${o}.git${s("#",l)}`,"httpstemplate"),tarballtemplate:v(({domain:r,user:n,project:o,committish:l})=>`https://${r}/${n}/${o}/archive/${u(l)||"HEAD"}.tar.gz`,"tarballtemplate"),bugstemplate:v(()=>null,"bugstemplate"),extract:v(r=>{let[,n,o,l]=r.pathname.split("/",4);if(!["archive"].includes(l)&&(o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!n||!o)))return{user:n,project:o,committish:r.hash.slice(1)}},"extract")};for(let[r,n]of Object.entries(c))c[r]=Object.assign({},a,n);t.exports=c}),cf=K((e,t)=>{var s=require("url"),u=v((r,n,o)=>{let l=r.indexOf(o);return r.lastIndexOf(n,l>-1?l:1/0)},"lastIndexOfBefore"),i=v(r=>{try{return new s.URL(r)}catch{}},"safeUrl"),a=v((r,n)=>{let o=r.indexOf(":"),l=r.slice(0,o+1);if(Object.prototype.hasOwnProperty.call(n,l)||r.substr(o,3)==="://")return r;let h=r.indexOf("@");return h>-1?h>o?`git+ssh://${r}`:r:`${r.slice(0,o+1)}//${r.slice(o+1)}`},"correctProtocol"),c=v(r=>{let n=u(r,"@","#"),o=u(r,":","#");return o>n&&(r=r.slice(0,o)+"/"+r.slice(o+1)),u(r,":","#")===-1&&r.indexOf("//")===-1&&(r=`git+ssh://${r}`),r},"correctUrl");t.exports=(r,n)=>{let o=n?a(r,n):r;return i(o)||i(c(o))}}),AP=K((e,t)=>{"use strict";var s=cf(),u=v(i=>{let a=i.indexOf("#"),c=i.indexOf("/"),r=i.indexOf("/",c+1),n=i.indexOf(":"),o=/\s/.exec(i),l=i.indexOf("@"),h=!o||a>-1&&o.index>a,p=l===-1||a>-1&&l>a,d=n===-1||a>-1&&n>a,g=r===-1||a>-1&&r>a,m=c>0,f=a>-1?i[a-1]!=="/":!i.endsWith("/"),y=!i.startsWith(".");return h&&m&&f&&y&&p&&d&&g},"isGitHubShorthand");t.exports=(i,a,{gitHosts:c,protocols:r})=>{if(!i)return;let n=u(i)?`github:${i}`:i,o=s(n,r);if(!o)return;let l=c.byShortcut[o.protocol],h=c.byDomain[o.hostname.startsWith("www.")?o.hostname.slice(4):o.hostname],p=l||h;if(!p)return;let d=c[l||h],g=null;r[o.protocol]?.auth&&(o.username||o.password)&&(g=`${o.username}${o.password?":"+o.password:""}`);let m=null,f=null,y=null,S=null;try{if(l){let E=o.pathname.startsWith("/")?o.pathname.slice(1):o.pathname,b=E.indexOf("@");b>-1&&(E=E.slice(b+1));let _=E.lastIndexOf("/");_>-1?(f=decodeURIComponent(E.slice(0,_)),f||(f=null),y=decodeURIComponent(E.slice(_+1))):y=decodeURIComponent(E),y.endsWith(".git")&&(y=y.slice(0,-4)),o.hash&&(m=decodeURIComponent(o.hash.slice(1))),S="shortcut"}else{if(!d.protocols.includes(o.protocol))return;let E=d.extract(o);if(!E)return;f=E.user&&decodeURIComponent(E.user),y=decodeURIComponent(E.project),m=decodeURIComponent(E.committish),S=r[o.protocol]?.name||o.protocol.slice(0,-1)}}catch(E){if(E instanceof URIError)return;throw E}return[p,f,g,y,m,S,a]}}),Sl=K((e,t)=>{"use strict";var{LRUCache:s}=Er(),u=RP(),i=AP(),a=cf(),c=new s({max:1e3});function r(o){try{let{protocol:l,hostname:h,pathname:p}=new URL(o);if(!h)return null;let d=/(?:git\+)http:$/.test(l)?"http:":"https:",g=p.replace(/\.git$/,"");return`${d}//${h}${g}`}catch{return null}}v(r,"unknownHostedUrl");var n=class ht{static{v(this,"GitHost")}constructor(l,h,p,d,g,m,f={}){Object.assign(this,ht.#e[l],{type:l,user:h,auth:p,project:d,committish:g,default:m,opts:f})}static#e={byShortcut:{},byDomain:{}};static#t={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(l,h){ht.#e[l]=h,ht.#e.byDomain[h.domain]=l,ht.#e.byShortcut[`${l}:`]=l,ht.#t[`${l}:`]={name:l}}static fromUrl(l,h){if(typeof l!="string")return;let p=l+JSON.stringify(h||{});if(!c.has(p)){let d=i(l,h,{gitHosts:ht.#e,protocols:ht.#t});c.set(p,d?new ht(...d):void 0)}return c.get(p)}static fromManifest(l,h={}){if(!l||typeof l!="object")return;let p=l.repository,d=p&&(typeof p=="string"?p:typeof p=="object"&&typeof p.url=="string"?p.url:null);if(!d)throw new Error("no repository");let g=d&&ht.fromUrl(d.replace(/^git\+/,""),h)||null;if(g)return g;let m=r(d);return ht.fromUrl(m,h)||m}static parseUrl(l){return a(l)}#r(l,h){if(typeof l!="function")return null;let p={...this,...this.opts,...h};p.path||(p.path=""),p.path.startsWith("/")&&(p.path=p.path.slice(1)),p.noCommittish&&(p.committish=null);let d=l(p);return p.noGitPlus&&d.startsWith("git+")?d.slice(4):d}hash(){return this.committish?`#${this.committish}`:""}ssh(l){return this.#r(this.sshtemplate,l)}sshurl(l){return this.#r(this.sshurltemplate,l)}browse(l,...h){return typeof l!="string"?this.#r(this.browsetemplate,l):typeof h[0]!="string"?this.#r(this.browsetreetemplate,{...h[0],path:l}):this.#r(this.browsetreetemplate,{...h[1],fragment:h[0],path:l})}browseFile(l,...h){return typeof h[0]!="string"?this.#r(this.browseblobtemplate,{...h[0],path:l}):this.#r(this.browseblobtemplate,{...h[1],fragment:h[0],path:l})}docs(l){return this.#r(this.docstemplate,l)}bugs(l){return this.#r(this.bugstemplate,l)}https(l){return this.#r(this.httpstemplate,l)}git(l){return this.#r(this.gittemplate,l)}shortcut(l){return this.#r(this.shortcuttemplate,l)}path(l){return this.#r(this.pathtemplate,l)}tarball(l){return this.#r(this.tarballtemplate,{...l,noCommittish:!1})}file(l,h){return this.#r(this.filetemplate,{...h,path:l})}edit(l,h){return this.#r(this.edittemplate,{...h,path:l})}getDefaultRepresentation(){return this.default}toString(l){return this.default&&typeof this[this.default]=="function"?this[this.default](l):this.sshurl(l)}};for(let[o,l]of Object.entries(u))n.addHost(o,l);t.exports=n}),CP=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.range=e.balanced=void 0;var t=v((i,a,c)=>{let r=i instanceof RegExp?s(i,c):i,n=a instanceof RegExp?s(a,c):a,o=r!==null&&n!=null&&(0,e.range)(r,n,c);return o&&{start:o[0],end:o[1],pre:c.slice(0,o[0]),body:c.slice(o[0]+r.length,o[1]),post:c.slice(o[1]+n.length)}},"balanced");e.balanced=t;var s=v((i,a)=>{let c=a.match(i);return c?c[0]:null},"maybeMatch"),u=v((i,a,c)=>{let r,n,o,l,h,p=c.indexOf(i),d=c.indexOf(a,p+1),g=p;if(p>=0&&d>0){if(i===a)return[p,d];for(r=[],o=c.length;g>=0&&!h;){if(g===p)r.push(g),p=c.indexOf(i,g+1);else if(r.length===1){let m=r.pop();m!==void 0&&(h=[m,d])}else n=r.pop(),n!==void 0&&n<o&&(o=n,l=d),d=c.indexOf(a,g+1);g=p<d&&p>=0?p:d}r.length&&l!==void 0&&(h=[o,l])}return h},"range");e.range=u}),IP=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.expand=_;var t=CP(),s="\0SLASH"+Math.random()+"\0",u="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0",r=new RegExp(s,"g"),n=new RegExp(u,"g"),o=new RegExp(i,"g"),l=new RegExp(a,"g"),h=new RegExp(c,"g"),p=/\\\\/g,d=/\\{/g,g=/\\}/g,m=/\\,/g,f=/\\./g;function y(L){return isNaN(L)?L.charCodeAt(0):parseInt(L,10)}v(y,"numeric");function S(L){return L.replace(p,s).replace(d,u).replace(g,i).replace(m,a).replace(f,c)}v(S,"escapeBraces");function E(L){return L.replace(r,"\\").replace(n,"{").replace(o,"}").replace(l,",").replace(h,".")}v(E,"unescapeBraces");function b(L){if(!L)return[""];let $=[],x=(0,t.balanced)("{","}",L);if(!x)return L.split(",");let{pre:M,body:U,post:V}=x,B=M.split(",");B[B.length-1]+="{"+U+"}";let G=b(V);return V.length&&(B[B.length-1]+=G.shift(),B.push.apply(B,G)),$.push.apply($,B),$}v(b,"parseCommaParts");function _(L){return L?(L.slice(0,2)==="{}"&&(L="\\{\\}"+L.slice(2)),P(S(L),!0).map(E)):[]}v(_,"expand");function O(L){return"{"+L+"}"}v(O,"embrace");function w(L){return/^-?0\d/.test(L)}v(w,"isPadded");function A(L,$){return L<=$}v(A,"lte");function I(L,$){return L>=$}v(I,"gte");function P(L,$){let x=[],M=(0,t.balanced)("{","}",L);if(!M)return[L];let U=M.pre,V=M.post.length?P(M.post,!1):[""];if(/\$$/.test(M.pre))for(let B=0;B<V.length;B++){let G=U+"{"+M.body+"}"+V[B];x.push(G)}else{let B=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(M.body),G=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(M.body),W=B||G,N=M.body.indexOf(",")>=0;if(!W&&!N)return M.post.match(/,(?!,).*\}/)?(L=M.pre+"{"+M.body+i+M.post,P(L)):[L];let D;if(W)D=M.body.split(/\.\./);else if(D=b(M.body),D.length===1&&D[0]!==void 0&&(D=P(D[0],!1).map(O),D.length===1))return V.map(C=>M.pre+D[0]+C);let T;if(W&&D[0]!==void 0&&D[1]!==void 0){let C=y(D[0]),Z=y(D[1]),X=Math.max(D[0].length,D[1].length),Q=D.length===3&&D[2]!==void 0?Math.abs(y(D[2])):1,k=A;Z<C&&(Q*=-1,k=I);let F=D.some(w);T=[];for(let z=C;k(z,Z);z+=Q){let j;if(G)j=String.fromCharCode(z),j==="\\"&&(j="");else if(j=String(z),F){let q=X-j.length;if(q>0){let J=new Array(q+1).join("0");z<0?j="-"+J+j.slice(1):j=J+j}}T.push(j)}}else{T=[];for(let C=0;C<D.length;C++)T.push.apply(T,P(D[C],!1))}for(let C=0;C<T.length;C++)for(let Z=0;Z<V.length;Z++){let X=U+T[C]+V[Z];(!$||W||X)&&x.push(X)}}return x}v(P,"expand_")}),TP=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertValidPattern=void 0;var t=1024*64,s=v(u=>{if(typeof u!="string")throw new TypeError("invalid pattern");if(u.length>t)throw new TypeError("pattern is too long")},"assertValidPattern");e.assertValidPattern=s}),PP=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseClass=void 0;var t={"[: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]},s=v(c=>c.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),u=v(c=>c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),i=v(c=>c.join(""),"rangesToString"),a=v((c,r)=>{let n=r;if(c.charAt(n)!=="[")throw new Error("not in a brace expression");let o=[],l=[],h=n+1,p=!1,d=!1,g=!1,m=!1,f=n,y="";e:for(;h<c.length;){let b=c.charAt(h);if((b==="!"||b==="^")&&h===n+1){m=!0,h++;continue}if(b==="]"&&p&&!g){f=h+1;break}if(p=!0,b==="\\"&&!g){g=!0,h++;continue}if(b==="["&&!g){for(let[_,[O,w,A]]of Object.entries(t))if(c.startsWith(_,h)){if(y)return["$.",!1,c.length-n,!0];h+=_.length,A?l.push(O):o.push(O),d=d||w;continue e}}if(g=!1,y){b>y?o.push(s(y)+"-"+s(b)):b===y&&o.push(s(b)),y="",h++;continue}if(c.startsWith("-]",h+1)){o.push(s(b+"-")),h+=2;continue}if(c.startsWith("-",h+1)){y=b,h+=2;continue}o.push(s(b)),h++}if(f<h)return["",!1,0,!1];if(!o.length&&!l.length)return["$.",!1,c.length-n,!0];if(l.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!m){let b=o[0].length===2?o[0].slice(-1):o[0];return[u(b),!1,f-n,!1]}let S="["+(m?"^":"")+i(o)+"]",E="["+(m?"":"^")+i(l)+"]";return[o.length&&l.length?"("+S+"|"+E+")":o.length?S:E,d,f-n,!0]},"parseClass");e.parseClass=a}),Ka=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=void 0;var t=v((s,{windowsPathsNoEscape:u=!1}={})=>u?s.replace(/\[([^\/\\])\]/g,"$1"):s.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");e.unescape=t}),zd=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AST=void 0;var t=PP(),s=Ka(),u=new Set(["!","?","+","*","@"]),i=v(m=>u.has(m),"isExtglobType"),a="(?!(?:^|/)\\.\\.?(?:$|/))",c="(?!\\.)",r=new Set(["[","."]),n=new Set(["..","."]),o=new Set("().*{}+?[]^$\\!"),l=v(m=>m.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),h="[^/]",p=h+"*?",d=h+"+?",g=class tt{static{v(this,"AST")}type;#e;#t;#r=!1;#s=[];#i;#l;#c;#h=!1;#n;#p;#o=!1;constructor(f,y,S={}){this.type=f,f&&(this.#t=!0),this.#i=y,this.#e=this.#i?this.#i.#e:this,this.#n=this.#e===this?S:this.#e.#n,this.#c=this.#e===this?[]:this.#e.#c,f==="!"&&!this.#e.#h&&this.#c.push(this),this.#l=this.#i?this.#i.#s.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let f of this.#s)if(typeof f!="string"&&(f.type||f.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#p!==void 0?this.#p:this.type?this.#p=this.type+"("+this.#s.map(f=>String(f)).join("|")+")":this.#p=this.#s.map(f=>String(f)).join("")}#u(){if(this!==this.#e)throw new Error("should only call on root");if(this.#h)return this;this.toString(),this.#h=!0;let f;for(;f=this.#c.pop();){if(f.type!=="!")continue;let y=f,S=y.#i;for(;S;){for(let E=y.#l+1;!S.type&&E<S.#s.length;E++)for(let b of f.#s){if(typeof b=="string")throw new Error("string part in extglob AST??");b.copyIn(S.#s[E])}y=S,S=y.#i}}return this}push(...f){for(let y of f)if(y!==""){if(typeof y!="string"&&!(y instanceof tt&&y.#i===this))throw new Error("invalid part: "+y);this.#s.push(y)}}toJSON(){let f=this.type===null?this.#s.slice().map(y=>typeof y=="string"?y:y.toJSON()):[this.type,...this.#s.map(y=>y.toJSON())];return this.isStart()&&!this.type&&f.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#h&&this.#i?.type==="!")&&f.push({}),f}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#l===0)return!0;let f=this.#i;for(let y=0;y<this.#l;y++){let S=f.#s[y];if(!(S instanceof tt&&S.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let f=this.#i?this.#i.#s.length:0;return this.#l===f-1}copyIn(f){typeof f=="string"?this.push(f):this.push(f.clone(this))}clone(f){let y=new tt(this.type,f);for(let S of this.#s)y.copyIn(S);return y}static#a(f,y,S,E){let b=!1,_=!1,O=-1,w=!1;if(y.type===null){let $=S,x="";for(;$<f.length;){let M=f.charAt($++);if(b||M==="\\"){b=!b,x+=M;continue}if(_){$===O+1?(M==="^"||M==="!")&&(w=!0):M==="]"&&!($===O+2&&w)&&(_=!1),x+=M;continue}else if(M==="["){_=!0,O=$,w=!1,x+=M;continue}if(!E.noext&&i(M)&&f.charAt($)==="("){y.push(x),x="";let U=new tt(M,y);$=tt.#a(f,U,$,E),y.push(U);continue}x+=M}return y.push(x),$}let A=S+1,I=new tt(null,y),P=[],L="";for(;A<f.length;){let $=f.charAt(A++);if(b||$==="\\"){b=!b,L+=$;continue}if(_){A===O+1?($==="^"||$==="!")&&(w=!0):$==="]"&&!(A===O+2&&w)&&(_=!1),L+=$;continue}else if($==="["){_=!0,O=A,w=!1,L+=$;continue}if(i($)&&f.charAt(A)==="("){I.push(L),L="";let x=new tt($,I);I.push(x),A=tt.#a(f,x,A,E);continue}if($==="|"){I.push(L),L="",P.push(I),I=new tt(null,y);continue}if($===")")return L===""&&y.#s.length===0&&(y.#o=!0),I.push(L),L="",y.push(...P,I),A;L+=$}return y.type=null,y.#t=void 0,y.#s=[f.substring(S-1)],A}static fromGlob(f,y={}){let S=new tt(null,void 0,y);return tt.#a(f,S,0,y),S}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let f=this.toString(),[y,S,E,b]=this.toRegExpSource();if(!(E||this.#t||this.#n.nocase&&!this.#n.nocaseMagicOnly&&f.toUpperCase()!==f.toLowerCase()))return S;let _=(this.#n.nocase?"i":"")+(b?"u":"");return Object.assign(new RegExp(`^${y}$`,_),{_src:y,_glob:f})}get options(){return this.#n}toRegExpSource(f){let y=f??!!this.#n.dot;if(this.#e===this&&this.#u(),!this.type){let w=this.isStart()&&this.isEnd(),A=this.#s.map(L=>{let[$,x,M,U]=typeof L=="string"?tt.#g(L,this.#t,w):L.toRegExpSource(f);return this.#t=this.#t||M,this.#r=this.#r||U,$}).join(""),I="";if(this.isStart()&&typeof this.#s[0]=="string"&&!(this.#s.length===1&&n.has(this.#s[0]))){let L=r,$=y&&L.has(A.charAt(0))||A.startsWith("\\.")&&L.has(A.charAt(2))||A.startsWith("\\.\\.")&&L.has(A.charAt(4)),x=!y&&!f&&L.has(A.charAt(0));I=$?a:x?c:""}let P="";return this.isEnd()&&this.#e.#h&&this.#i?.type==="!"&&(P="(?:$|\\/)"),[I+A+P,(0,s.unescape)(A),this.#t=!!this.#t,this.#r]}let S=this.type==="*"||this.type==="+",E=this.type==="!"?"(?:(?!(?:":"(?:",b=this.#f(y);if(this.isStart()&&this.isEnd()&&!b&&this.type!=="!"){let w=this.toString();return this.#s=[w],this.type=null,this.#t=void 0,[w,(0,s.unescape)(this.toString()),!1,!1]}let _=!S||f||y||!c?"":this.#f(!0);_===b&&(_=""),_&&(b=`(?:${b})(?:${_})*?`);let O="";if(this.type==="!"&&this.#o)O=(this.isStart()&&!y?c:"")+d;else{let w=this.type==="!"?"))"+(this.isStart()&&!y&&!f?c:"")+p+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&_?")":this.type==="*"&&_?")?":`)${this.type}`;O=E+b+w}return[O,(0,s.unescape)(b),this.#t=!!this.#t,this.#r]}#f(f){return this.#s.map(y=>{if(typeof y=="string")throw new Error("string type in extglob ast??");let[S,E,b,_]=y.toRegExpSource(f);return this.#r=this.#r||_,S}).filter(y=>!(this.isStart()&&this.isEnd())||!!y).join("|")}static#g(f,y,S=!1){let E=!1,b="",_=!1;for(let O=0;O<f.length;O++){let w=f.charAt(O);if(E){E=!1,b+=(o.has(w)?"\\":"")+w;continue}if(w==="\\"){O===f.length-1?b+="\\\\":E=!0;continue}if(w==="["){let[A,I,P,L]=(0,t.parseClass)(f,O);if(P){b+=A,_=_||I,O+=P-1,y=y||L;continue}}if(w==="*"){S&&f==="*"?b+=d:b+=p,y=!0;continue}if(w==="?"){b+=h,y=!0;continue}b+=l(w)}return[b,(0,s.unescape)(f),!!y,_]}};e.AST=g}),qd=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.escape=void 0;var t=v((s,{windowsPathsNoEscape:u=!1}={})=>u?s.replace(/[?*()[\]]/g,"[$&]"):s.replace(/[?*()[\]\\]/g,"\\$&"),"escape");e.escape=t}),jt=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;var t=IP(),s=TP(),u=zd(),i=qd(),a=Ka(),c=v((z,j,q={})=>((0,s.assertValidPattern)(j),!q.nocomment&&j.charAt(0)==="#"?!1:new X(j,q).match(z)),"minimatch");e.minimatch=c;var r=/^\*+([^+@!?\*\[\(]*)$/,n=v(z=>j=>!j.startsWith(".")&&j.endsWith(z),"starDotExtTest"),o=v(z=>j=>j.endsWith(z),"starDotExtTestDot"),l=v(z=>(z=z.toLowerCase(),j=>!j.startsWith(".")&&j.toLowerCase().endsWith(z)),"starDotExtTestNocase"),h=v(z=>(z=z.toLowerCase(),j=>j.toLowerCase().endsWith(z)),"starDotExtTestNocaseDot"),p=/^\*+\.\*+$/,d=v(z=>!z.startsWith(".")&&z.includes("."),"starDotStarTest"),g=v(z=>z!=="."&&z!==".."&&z.includes("."),"starDotStarTestDot"),m=/^\.\*+$/,f=v(z=>z!=="."&&z!==".."&&z.startsWith("."),"dotStarTest"),y=/^\*+$/,S=v(z=>z.length!==0&&!z.startsWith("."),"starTest"),E=v(z=>z.length!==0&&z!=="."&&z!=="..","starTestDot"),b=/^\?+([^+@!?\*\[\(]*)?$/,_=v(([z,j=""])=>{let q=I([z]);return j?(j=j.toLowerCase(),J=>q(J)&&J.toLowerCase().endsWith(j)):q},"qmarksTestNocase"),O=v(([z,j=""])=>{let q=P([z]);return j?(j=j.toLowerCase(),J=>q(J)&&J.toLowerCase().endsWith(j)):q},"qmarksTestNocaseDot"),w=v(([z,j=""])=>{let q=P([z]);return j?J=>q(J)&&J.endsWith(j):q},"qmarksTestDot"),A=v(([z,j=""])=>{let q=I([z]);return j?J=>q(J)&&J.endsWith(j):q},"qmarksTest"),I=v(([z])=>{let j=z.length;return q=>q.length===j&&!q.startsWith(".")},"qmarksTestNoExt"),P=v(([z])=>{let j=z.length;return q=>q.length===j&&q!=="."&&q!==".."},"qmarksTestNoExtDot"),L=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",$={win32:{sep:"\\"},posix:{sep:"/"}};e.sep=L==="win32"?$.win32.sep:$.posix.sep,e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol("globstar **"),e.minimatch.GLOBSTAR=e.GLOBSTAR;var x="[^/]",M=x+"*?",U="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",V="(?:(?!(?:\\/|^)\\.).)*?",B=v((z,j={})=>q=>(0,e.minimatch)(q,z,j),"filter");e.filter=B,e.minimatch.filter=e.filter;var G=v((z,j={})=>Object.assign({},z,j),"ext"),W=v(z=>{if(!z||typeof z!="object"||!Object.keys(z).length)return e.minimatch;let j=e.minimatch;return Object.assign(v((q,J,Y={})=>j(q,J,G(z,Y)),"m"),{Minimatch:class extends j.Minimatch{static{v(this,"Minimatch")}constructor(q,J={}){super(q,G(z,J))}static defaults(q){return j.defaults(G(z,q)).Minimatch}},AST:class extends j.AST{static{v(this,"AST")}constructor(q,J,Y={}){super(q,J,G(z,Y))}static fromGlob(q,J={}){return j.AST.fromGlob(q,G(z,J))}},unescape:v((q,J={})=>j.unescape(q,G(z,J)),"unescape"),escape:v((q,J={})=>j.escape(q,G(z,J)),"escape"),filter:v((q,J={})=>j.filter(q,G(z,J)),"filter"),defaults:v(q=>j.defaults(G(z,q)),"defaults"),makeRe:v((q,J={})=>j.makeRe(q,G(z,J)),"makeRe"),braceExpand:v((q,J={})=>j.braceExpand(q,G(z,J)),"braceExpand"),match:v((q,J,Y={})=>j.match(q,J,G(z,Y)),"match"),sep:j.sep,GLOBSTAR:e.GLOBSTAR})},"defaults");e.defaults=W,e.minimatch.defaults=e.defaults;var N=v((z,j={})=>((0,s.assertValidPattern)(z),j.nobrace||!/\{(?:(?!\{).)*\}/.test(z)?[z]:(0,t.expand)(z)),"braceExpand");e.braceExpand=N,e.minimatch.braceExpand=e.braceExpand;var D=v((z,j={})=>new X(z,j).makeRe(),"makeRe");e.makeRe=D,e.minimatch.makeRe=e.makeRe;var T=v((z,j,q={})=>{let J=new X(j,q);return z=z.filter(Y=>J.match(Y)),J.options.nonull&&!z.length&&z.push(j),z},"match");e.match=T,e.minimatch.match=e.match;var C=/[?*]|[+@!]\(.*?\)|\[|\]/,Z=v(z=>z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),X=class{static{v(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(z,j={}){(0,s.assertValidPattern)(z),j=j||{},this.options=j,this.pattern=z,this.platform=j.platform||L,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!j.windowsPathsNoEscape||j.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!j.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!j.nonegate,this.comment=!1,this.empty=!1,this.partial=!!j.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=j.windowsNoMagicRoot!==void 0?j.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 z of this.set)for(let j of z)if(typeof j!="string")return!0;return!1}debug(...z){}make(){let z=this.pattern,j=this.options;if(!j.nocomment&&z.charAt(0)==="#"){this.comment=!0;return}if(!z){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],j.debug&&(this.debug=(...Y)=>{}),this.debug(this.pattern,this.globSet);let q=this.globSet.map(Y=>this.slashSplit(Y));this.globParts=this.preprocess(q),this.debug(this.pattern,this.globParts);let J=this.globParts.map((Y,R,H)=>{if(this.isWindows&&this.windowsNoMagicRoot){let ee=Y[0]===""&&Y[1]===""&&(Y[2]==="?"||!C.test(Y[2]))&&!C.test(Y[3]),ne=/^[a-z]:/i.test(Y[0]);if(ee)return[...Y.slice(0,4),...Y.slice(4).map(te=>this.parse(te))];if(ne)return[Y[0],...Y.slice(1).map(te=>this.parse(te))]}return Y.map(ee=>this.parse(ee))});if(this.debug(this.pattern,J),this.set=J.filter(Y=>Y.indexOf(!1)===-1),this.isWindows)for(let Y=0;Y<this.set.length;Y++){let R=this.set[Y];R[0]===""&&R[1]===""&&this.globParts[Y][2]==="?"&&typeof R[3]=="string"&&/^[a-z]:$/i.test(R[3])&&(R[2]="?")}this.debug(this.pattern,this.set)}preprocess(z){if(this.options.noglobstar)for(let q=0;q<z.length;q++)for(let J=0;J<z[q].length;J++)z[q][J]==="**"&&(z[q][J]="*");let{optimizationLevel:j=1}=this.options;return j>=2?(z=this.firstPhasePreProcess(z),z=this.secondPhasePreProcess(z)):j>=1?z=this.levelOneOptimize(z):z=this.adjascentGlobstarOptimize(z),z}adjascentGlobstarOptimize(z){return z.map(j=>{let q=-1;for(;(q=j.indexOf("**",q+1))!==-1;){let J=q;for(;j[J+1]==="**";)J++;J!==q&&j.splice(q,J-q)}return j})}levelOneOptimize(z){return z.map(j=>(j=j.reduce((q,J)=>{let Y=q[q.length-1];return J==="**"&&Y==="**"?q:J===".."&&Y&&Y!==".."&&Y!=="."&&Y!=="**"?(q.pop(),q):(q.push(J),q)},[]),j.length===0?[""]:j))}levelTwoFileOptimize(z){Array.isArray(z)||(z=this.slashSplit(z));let j=!1;do{if(j=!1,!this.preserveMultipleSlashes){for(let J=1;J<z.length-1;J++){let Y=z[J];J===1&&Y===""&&z[0]===""||(Y==="."||Y==="")&&(j=!0,z.splice(J,1),J--)}z[0]==="."&&z.length===2&&(z[1]==="."||z[1]==="")&&(j=!0,z.pop())}let q=0;for(;(q=z.indexOf("..",q+1))!==-1;){let J=z[q-1];J&&J!=="."&&J!==".."&&J!=="**"&&(j=!0,z.splice(q-1,2),q-=2)}}while(j);return z.length===0?[""]:z}firstPhasePreProcess(z){let j=!1;do{j=!1;for(let q of z){let J=-1;for(;(J=q.indexOf("**",J+1))!==-1;){let R=J;for(;q[R+1]==="**";)R++;R>J&&q.splice(J+1,R-J);let H=q[J+1],ee=q[J+2],ne=q[J+3];if(H!==".."||!ee||ee==="."||ee===".."||!ne||ne==="."||ne==="..")continue;j=!0,q.splice(J,1);let te=q.slice(0);te[J]="**",z.push(te),J--}if(!this.preserveMultipleSlashes){for(let R=1;R<q.length-1;R++){let H=q[R];R===1&&H===""&&q[0]===""||(H==="."||H==="")&&(j=!0,q.splice(R,1),R--)}q[0]==="."&&q.length===2&&(q[1]==="."||q[1]==="")&&(j=!0,q.pop())}let Y=0;for(;(Y=q.indexOf("..",Y+1))!==-1;){let R=q[Y-1];if(R&&R!=="."&&R!==".."&&R!=="**"){j=!0;let H=Y===1&&q[Y+1]==="**"?["."]:[];q.splice(Y-1,2,...H),q.length===0&&q.push(""),Y-=2}}}}while(j);return z}secondPhasePreProcess(z){for(let j=0;j<z.length-1;j++)for(let q=j+1;q<z.length;q++){let J=this.partsMatch(z[j],z[q],!this.preserveMultipleSlashes);if(J){z[j]=[],z[q]=J;break}}return z.filter(j=>j.length)}partsMatch(z,j,q=!1){let J=0,Y=0,R=[],H="";for(;J<z.length&&Y<j.length;)if(z[J]===j[Y])R.push(H==="b"?j[Y]:z[J]),J++,Y++;else if(q&&z[J]==="**"&&j[Y]===z[J+1])R.push(z[J]),J++;else if(q&&j[Y]==="**"&&z[J]===j[Y+1])R.push(j[Y]),Y++;else if(z[J]==="*"&&j[Y]&&(this.options.dot||!j[Y].startsWith("."))&&j[Y]!=="**"){if(H==="b")return!1;H="a",R.push(z[J]),J++,Y++}else if(j[Y]==="*"&&z[J]&&(this.options.dot||!z[J].startsWith("."))&&z[J]!=="**"){if(H==="a")return!1;H="b",R.push(j[Y]),J++,Y++}else return!1;return z.length===j.length&&R}parseNegate(){if(this.nonegate)return;let z=this.pattern,j=!1,q=0;for(let J=0;J<z.length&&z.charAt(J)==="!";J++)j=!j,q++;q&&(this.pattern=z.slice(q)),this.negate=j}matchOne(z,j,q=!1){let J=this.options;if(this.isWindows){let ie=typeof z[0]=="string"&&/^[a-z]:$/i.test(z[0]),le=!ie&&z[0]===""&&z[1]===""&&z[2]==="?"&&/^[a-z]:$/i.test(z[3]),fe=typeof j[0]=="string"&&/^[a-z]:$/i.test(j[0]),me=!fe&&j[0]===""&&j[1]===""&&j[2]==="?"&&typeof j[3]=="string"&&/^[a-z]:$/i.test(j[3]),ce=le?3:ie?0:void 0,pe=me?3:fe?0:void 0;if(typeof ce=="number"&&typeof pe=="number"){let[de,ye]=[z[ce],j[pe]];de.toLowerCase()===ye.toLowerCase()&&(j[pe]=de,pe>ce?j=j.slice(pe):ce>pe&&(z=z.slice(ce)))}}let{optimizationLevel:Y=1}=this.options;Y>=2&&(z=this.levelTwoFileOptimize(z)),this.debug("matchOne",this,{file:z,pattern:j}),this.debug("matchOne",z.length,j.length);for(var R=0,H=0,ee=z.length,ne=j.length;R<ee&&H<ne;R++,H++){this.debug("matchOne loop");var te=j[H],ae=z[R];if(this.debug(j,te,ae),te===!1)return!1;if(te===e.GLOBSTAR){this.debug("GLOBSTAR",[j,te,ae]);var he=R,re=H+1;if(re===ne){for(this.debug("** at the end");R<ee;R++)if(z[R]==="."||z[R]===".."||!J.dot&&z[R].charAt(0)===".")return!1;return!0}for(;he<ee;){var ue=z[he];if(this.debug(`
|
|
23
|
+
globstar while`,z,he,j,re,ue),this.matchOne(z.slice(he),j.slice(re),q))return this.debug("globstar found match!",he,ee,ue),!0;if(ue==="."||ue===".."||!J.dot&&ue.charAt(0)==="."){this.debug("dot detected!",z,he,j,re);break}this.debug("globstar swallow a segment, and continue"),he++}return!!(q&&(this.debug(`
|
|
24
|
+
>>> no match, partial?`,z,he,j,re),he===ee))}let ie;if(typeof te=="string"?(ie=ae===te,this.debug("string match",te,ae,ie)):(ie=te.test(ae),this.debug("pattern match",te,ae,ie)),!ie)return!1}if(R===ee&&H===ne)return!0;if(R===ee)return q;if(H===ne)return R===ee-1&&z[R]==="";throw new Error("wtf?")}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(z){(0,s.assertValidPattern)(z);let j=this.options;if(z==="**")return e.GLOBSTAR;if(z==="")return"";let q,J=null;(q=z.match(y))?J=j.dot?E:S:(q=z.match(r))?J=(j.nocase?j.dot?h:l:j.dot?o:n)(q[1]):(q=z.match(b))?J=(j.nocase?j.dot?O:_:j.dot?w:A)(q):(q=z.match(p))?J=j.dot?g:d:(q=z.match(m))&&(J=f);let Y=u.AST.fromGlob(z,this.options).toMMPattern();return J&&typeof Y=="object"&&Reflect.defineProperty(Y,"test",{value:J}),Y}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let z=this.set;if(!z.length)return this.regexp=!1,this.regexp;let j=this.options,q=j.noglobstar?M:j.dot?U:V,J=new Set(j.nocase?["i"]:[]),Y=z.map(ee=>{let ne=ee.map(te=>{if(te instanceof RegExp)for(let ae of te.flags.split(""))J.add(ae);return typeof te=="string"?Z(te):te===e.GLOBSTAR?e.GLOBSTAR:te._src});return ne.forEach((te,ae)=>{let he=ne[ae+1],re=ne[ae-1];te!==e.GLOBSTAR||re===e.GLOBSTAR||(re===void 0?he!==void 0&&he!==e.GLOBSTAR?ne[ae+1]="(?:\\/|"+q+"\\/)?"+he:ne[ae]=q:he===void 0?ne[ae-1]=re+"(?:\\/|"+q+")?":he!==e.GLOBSTAR&&(ne[ae-1]=re+"(?:\\/|\\/"+q+"\\/)"+he,ne[ae+1]=e.GLOBSTAR))}),ne.filter(te=>te!==e.GLOBSTAR).join("/")}).join("|"),[R,H]=z.length>1?["(?:",")"]:["",""];Y="^"+R+Y+H+"$",this.negate&&(Y="^(?!"+Y+").+$");try{this.regexp=new RegExp(Y,[...J].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(z){return this.preserveMultipleSlashes?z.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(z)?["",...z.split(/\/+/)]:z.split(/\/+/)}match(z,j=this.partial){if(this.debug("match",z,this.pattern),this.comment)return!1;if(this.empty)return z==="";if(z==="/"&&j)return!0;let q=this.options;this.isWindows&&(z=z.split("\\").join("/"));let J=this.slashSplit(z);this.debug(this.pattern,"split",J);let Y=this.set;this.debug(this.pattern,"set",Y);let R=J[J.length-1];if(!R)for(let H=J.length-2;!R&&H>=0;H--)R=J[H];for(let H=0;H<Y.length;H++){let ee=Y[H],ne=J;if(q.matchBase&&ee.length===1&&(ne=[R]),this.matchOne(ne,ee,j))return q.flipNegate?!0:!this.negate}return q.flipNegate?!1:this.negate}static defaults(z){return e.minimatch.defaults(z).Minimatch}};e.Minimatch=X;var Q=zd();Object.defineProperty(e,"AST",{enumerable:!0,get:v(function(){return Q.AST},"get")});var k=qd();Object.defineProperty(e,"escape",{enumerable:!0,get:v(function(){return k.escape},"get")});var F=Ka();Object.defineProperty(e,"unescape",{enumerable:!0,get:v(function(){return F.unescape},"get")}),e.minimatch.AST=u.AST,e.minimatch.Minimatch=X,e.minimatch.escape=i.escape,e.minimatch.unescape=a.unescape}),xe=K(e=>{"use strict";var t=e&&e.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(e,"__esModule",{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;var s=typeof process=="object"&&process?process:{stdout:null,stderr:null},u=require("events"),i=t(require("stream")),a=require("string_decoder"),c=v(R=>!!R&&typeof R=="object"&&(R instanceof Y||R instanceof i.default||(0,e.isReadable)(R)||(0,e.isWritable)(R)),"isStream");e.isStream=c;var r=v(R=>!!R&&typeof R=="object"&&R instanceof u.EventEmitter&&typeof R.pipe=="function"&&R.pipe!==i.default.Writable.prototype.pipe,"isReadable");e.isReadable=r;var n=v(R=>!!R&&typeof R=="object"&&R instanceof u.EventEmitter&&typeof R.write=="function"&&typeof R.end=="function","isWritable");e.isWritable=n;var o=Symbol("EOF"),l=Symbol("maybeEmitEnd"),h=Symbol("emittedEnd"),p=Symbol("emittingEnd"),d=Symbol("emittedError"),g=Symbol("closed"),m=Symbol("read"),f=Symbol("flush"),y=Symbol("flushChunk"),S=Symbol("encoding"),E=Symbol("decoder"),b=Symbol("flowing"),_=Symbol("paused"),O=Symbol("resume"),w=Symbol("buffer"),A=Symbol("pipes"),I=Symbol("bufferLength"),P=Symbol("bufferPush"),L=Symbol("bufferShift"),$=Symbol("objectMode"),x=Symbol("destroyed"),M=Symbol("error"),U=Symbol("emitData"),V=Symbol("emitEnd"),B=Symbol("emitEnd2"),G=Symbol("async"),W=Symbol("abort"),N=Symbol("aborted"),D=Symbol("signal"),T=Symbol("dataListeners"),C=Symbol("discarded"),Z=v(R=>Promise.resolve().then(R),"defer"),X=v(R=>R(),"nodefer"),Q=v(R=>R==="end"||R==="finish"||R==="prefinish","isEndish"),k=v(R=>R instanceof ArrayBuffer||!!R&&typeof R=="object"&&R.constructor&&R.constructor.name==="ArrayBuffer"&&R.byteLength>=0,"isArrayBufferLike"),F=v(R=>!Buffer.isBuffer(R)&&ArrayBuffer.isView(R),"isArrayBufferView"),z=class{static{v(this,"Pipe")}src;dest;opts;ondrain;constructor(R,H,ee){this.src=R,this.dest=H,this.opts=ee,this.ondrain=()=>R[O](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(R){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},j=class extends z{static{v(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(R,H,ee){super(R,H,ee),this.proxyErrors=ne=>H.emit("error",ne),R.on("error",this.proxyErrors)}},q=v(R=>!!R.objectMode,"isObjectModeOptions"),J=v(R=>!R.objectMode&&!!R.encoding&&R.encoding!=="buffer","isEncodingOptions"),Y=class extends u.EventEmitter{static{v(this,"Minipass")}[b]=!1;[_]=!1;[A]=[];[w]=[];[$];[S];[G];[E];[o]=!1;[h]=!1;[p]=!1;[g]=!1;[d]=null;[I]=0;[x]=!1;[D];[N]=!1;[T]=0;[C]=!1;writable=!0;readable=!0;constructor(...R){let H=R[0]||{};if(super(),H.objectMode&&typeof H.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");q(H)?(this[$]=!0,this[S]=null):J(H)?(this[S]=H.encoding,this[$]=!1):(this[$]=!1,this[S]=null),this[G]=!!H.async,this[E]=this[S]?new a.StringDecoder(this[S]):null,H&&H.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:v(()=>this[w],"get")}),H&&H.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:v(()=>this[A],"get")});let{signal:ee}=H;ee&&(this[D]=ee,ee.aborted?this[W]():ee.addEventListener("abort",()=>this[W]()))}get bufferLength(){return this[I]}get encoding(){return this[S]}set encoding(R){throw new Error("Encoding must be set at instantiation time")}setEncoding(R){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[$]}set objectMode(R){throw new Error("objectMode must be set at instantiation time")}get async(){return this[G]}set async(R){this[G]=this[G]||!!R}[W](){this[N]=!0,this.emit("abort",this[D]?.reason),this.destroy(this[D]?.reason)}get aborted(){return this[N]}set aborted(R){}write(R,H,ee){if(this[N])return!1;if(this[o])throw new Error("write after end");if(this[x])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof H=="function"&&(ee=H,H="utf8"),H||(H="utf8");let ne=this[G]?Z:X;if(!this[$]&&!Buffer.isBuffer(R)){if(F(R))R=Buffer.from(R.buffer,R.byteOffset,R.byteLength);else if(k(R))R=Buffer.from(R);else if(typeof R!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[$]?(this[b]&&this[I]!==0&&this[f](!0),this[b]?this.emit("data",R):this[P](R),this[I]!==0&&this.emit("readable"),ee&&ne(ee),this[b]):R.length?(typeof R=="string"&&!(H===this[S]&&!this[E]?.lastNeed)&&(R=Buffer.from(R,H)),Buffer.isBuffer(R)&&this[S]&&(R=this[E].write(R)),this[b]&&this[I]!==0&&this[f](!0),this[b]?this.emit("data",R):this[P](R),this[I]!==0&&this.emit("readable"),ee&&ne(ee),this[b]):(this[I]!==0&&this.emit("readable"),ee&&ne(ee),this[b])}read(R){if(this[x])return null;if(this[C]=!1,this[I]===0||R===0||R&&R>this[I])return this[l](),null;this[$]&&(R=null),this[w].length>1&&!this[$]&&(this[w]=[this[S]?this[w].join(""):Buffer.concat(this[w],this[I])]);let H=this[m](R||null,this[w][0]);return this[l](),H}[m](R,H){if(this[$])this[L]();else{let ee=H;R===ee.length||R===null?this[L]():typeof ee=="string"?(this[w][0]=ee.slice(R),H=ee.slice(0,R),this[I]-=R):(this[w][0]=ee.subarray(R),H=ee.subarray(0,R),this[I]-=R)}return this.emit("data",H),!this[w].length&&!this[o]&&this.emit("drain"),H}end(R,H,ee){return typeof R=="function"&&(ee=R,R=void 0),typeof H=="function"&&(ee=H,H="utf8"),R!==void 0&&this.write(R,H),ee&&this.once("end",ee),this[o]=!0,this.writable=!1,(this[b]||!this[_])&&this[l](),this}[O](){this[x]||(!this[T]&&!this[A].length&&(this[C]=!0),this[_]=!1,this[b]=!0,this.emit("resume"),this[w].length?this[f]():this[o]?this[l]():this.emit("drain"))}resume(){return this[O]()}pause(){this[b]=!1,this[_]=!0,this[C]=!1}get destroyed(){return this[x]}get flowing(){return this[b]}get paused(){return this[_]}[P](R){this[$]?this[I]+=1:this[I]+=R.length,this[w].push(R)}[L](){return this[$]?this[I]-=1:this[I]-=this[w][0].length,this[w].shift()}[f](R=!1){do;while(this[y](this[L]())&&this[w].length);!R&&!this[w].length&&!this[o]&&this.emit("drain")}[y](R){return this.emit("data",R),this[b]}pipe(R,H){if(this[x])return R;this[C]=!1;let ee=this[h];return H=H||{},R===s.stdout||R===s.stderr?H.end=!1:H.end=H.end!==!1,H.proxyErrors=!!H.proxyErrors,ee?H.end&&R.end():(this[A].push(H.proxyErrors?new j(this,R,H):new z(this,R,H)),this[G]?Z(()=>this[O]()):this[O]()),R}unpipe(R){let H=this[A].find(ee=>ee.dest===R);H&&(this[A].length===1?(this[b]&&this[T]===0&&(this[b]=!1),this[A]=[]):this[A].splice(this[A].indexOf(H),1),H.unpipe())}addListener(R,H){return this.on(R,H)}on(R,H){let ee=super.on(R,H);if(R==="data")this[C]=!1,this[T]++,!this[A].length&&!this[b]&&this[O]();else if(R==="readable"&&this[I]!==0)super.emit("readable");else if(Q(R)&&this[h])super.emit(R),this.removeAllListeners(R);else if(R==="error"&&this[d]){let ne=H;this[G]?Z(()=>ne.call(this,this[d])):ne.call(this,this[d])}return ee}removeListener(R,H){return this.off(R,H)}off(R,H){let ee=super.off(R,H);return R==="data"&&(this[T]=this.listeners("data").length,this[T]===0&&!this[C]&&!this[A].length&&(this[b]=!1)),ee}removeAllListeners(R){let H=super.removeAllListeners(R);return(R==="data"||R===void 0)&&(this[T]=0,!this[C]&&!this[A].length&&(this[b]=!1)),H}get emittedEnd(){return this[h]}[l](){!this[p]&&!this[h]&&!this[x]&&this[w].length===0&&this[o]&&(this[p]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[g]&&this.emit("close"),this[p]=!1)}emit(R,...H){let ee=H[0];if(R!=="error"&&R!=="close"&&R!==x&&this[x])return!1;if(R==="data")return!this[$]&&!ee?!1:this[G]?(Z(()=>this[U](ee)),!0):this[U](ee);if(R==="end")return this[V]();if(R==="close"){if(this[g]=!0,!this[h]&&!this[x])return!1;let te=super.emit("close");return this.removeAllListeners("close"),te}else if(R==="error"){this[d]=ee,super.emit(M,ee);let te=!this[D]||this.listeners("error").length?super.emit("error",ee):!1;return this[l](),te}else if(R==="resume"){let te=super.emit("resume");return this[l](),te}else if(R==="finish"||R==="prefinish"){let te=super.emit(R);return this.removeAllListeners(R),te}let ne=super.emit(R,...H);return this[l](),ne}[U](R){for(let ee of this[A])ee.dest.write(R)===!1&&this.pause();let H=this[C]?!1:super.emit("data",R);return this[l](),H}[V](){return this[h]?!1:(this[h]=!0,this.readable=!1,this[G]?(Z(()=>this[B]()),!0):this[B]())}[B](){if(this[E]){let H=this[E].end();if(H){for(let ee of this[A])ee.dest.write(H);this[C]||super.emit("data",H)}}for(let H of this[A])H.end();let R=super.emit("end");return this.removeAllListeners("end"),R}async collect(){let R=Object.assign([],{dataLength:0});this[$]||(R.dataLength=0);let H=this.promise();return this.on("data",ee=>{R.push(ee),this[$]||(R.dataLength+=ee.length)}),await H,R}async concat(){if(this[$])throw new Error("cannot concat in objectMode");let R=await this.collect();return this[S]?R.join(""):Buffer.concat(R,R.dataLength)}async promise(){return new Promise((R,H)=>{this.on(x,()=>H(new Error("stream destroyed"))),this.on("error",ee=>H(ee)),this.on("end",()=>R())})}[Symbol.asyncIterator](){this[C]=!1;let R=!1,H=v(async()=>(this.pause(),R=!0,{value:void 0,done:!0}),"stop");return{next:v(()=>{if(R)return H();let ee=this.read();if(ee!==null)return Promise.resolve({done:!1,value:ee});if(this[o])return H();let ne,te,ae=v(ie=>{this.off("data",he),this.off("end",re),this.off(x,ue),H(),te(ie)},"onerr"),he=v(ie=>{this.off("error",ae),this.off("end",re),this.off(x,ue),this.pause(),ne({value:ie,done:!!this[o]})},"ondata"),re=v(()=>{this.off("error",ae),this.off("data",he),this.off(x,ue),H(),ne({done:!0,value:void 0})},"onend"),ue=v(()=>ae(new Error("stream destroyed")),"ondestroy");return new Promise((ie,le)=>{te=le,ne=ie,this.once(x,ue),this.once("error",ae),this.once("end",re),this.once("data",he)})},"next"),throw:H,return:H,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[C]=!1;let R=!1,H=v(()=>(this.pause(),this.off(M,H),this.off(x,H),this.off("end",H),R=!0,{done:!0,value:void 0}),"stop"),ee=v(()=>{if(R)return H();let ne=this.read();return ne===null?H():{done:!1,value:ne}},"next");return this.once("end",H),this.once(M,H),this.once(x,H),{next:ee,throw:H,return:H,[Symbol.iterator](){return this}}}destroy(R){if(this[x])return R?this.emit("error",R):this.emit(x),this;this[x]=!0,this[C]=!0,this[w].length=0,this[I]=0;let H=this;return typeof H.close=="function"&&!this[g]&&H.close(),R?this.emit("error",R):this.emit(x),this}static get isStream(){return e.isStream}};e.Minipass=Y}),xP=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(R,H,ee,ne){ne===void 0&&(ne=ee);var te=Object.getOwnPropertyDescriptor(H,ee);(!te||("get"in te?!H.__esModule:te.writable||te.configurable))&&(te={enumerable:!0,get:v(function(){return H[ee]},"get")}),Object.defineProperty(R,ne,te)}:function(R,H,ee,ne){ne===void 0&&(ne=ee),R[ne]=H[ee]}),s=e&&e.__setModuleDefault||(Object.create?function(R,H){Object.defineProperty(R,"default",{enumerable:!0,value:H})}:function(R,H){R.default=H}),u=e&&e.__importStar||function(R){if(R&&R.__esModule)return R;var H={};if(R!=null)for(var ee in R)ee!=="default"&&Object.prototype.hasOwnProperty.call(R,ee)&&t(H,R,ee);return s(H,R),H};Object.defineProperty(e,"__esModule",{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;var i=Er(),a=require("path"),c=require("url"),r=require("fs"),n=u(require("fs")),o=r.realpathSync.native,l=require("internal/fs/promises"),h=xe(),p={lstatSync:r.lstatSync,readdir:r.readdir,readdirSync:r.readdirSync,readlinkSync:r.readlinkSync,realpathSync:o,promises:{lstat:l.lstat,readdir:l.readdir,readlink:l.readlink,realpath:l.realpath}},d=v(R=>!R||R===p||R===n?p:{...p,...R,promises:{...p.promises,...R.promises||{}}},"fsFromOption"),g=/^\\\\\?\\([a-z]:)\\?$/i,m=v(R=>R.replace(/\//g,"\\").replace(g,"$1\\"),"uncToDrive"),f=/[\\\/]/,y=0,S=1,E=2,b=4,_=6,O=8,w=10,A=12,I=15,P=~I,L=16,$=32,x=64,M=128,U=256,V=512,B=x|M|V,G=1023,W=v(R=>R.isFile()?O:R.isDirectory()?b:R.isSymbolicLink()?w:R.isCharacterDevice()?E:R.isBlockDevice()?_:R.isSocket()?A:R.isFIFO()?S:y,"entToType"),N=new Map,D=v(R=>{let H=N.get(R);if(H)return H;let ee=R.normalize("NFKD");return N.set(R,ee),ee},"normalize"),T=new Map,C=v(R=>{let H=T.get(R);if(H)return H;let ee=D(R.toLowerCase());return T.set(R,ee),ee},"normalizeNocase"),Z=class extends i.LRUCache{static{v(this,"ResolveCache")}constructor(){super({max:256})}};e.ResolveCache=Z;var X=class extends i.LRUCache{static{v(this,"ChildrenCache")}constructor(R=16*1024){super({maxSize:R,sizeCalculation:v(H=>H.length+1,"sizeCalculation")})}};e.ChildrenCache=X;var Q=Symbol("PathScurry setAsCwd"),k=class{static{v(this,"PathBase")}name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#r;get mode(){return this.#r}#s;get nlink(){return this.#s}#i;get uid(){return this.#i}#l;get gid(){return this.#l}#c;get rdev(){return this.#c}#h;get blksize(){return this.#h}#n;get ino(){return this.#n}#p;get size(){return this.#p}#o;get blocks(){return this.#o}#u;get atimeMs(){return this.#u}#a;get mtimeMs(){return this.#a}#f;get ctimeMs(){return this.#f}#g;get birthtimeMs(){return this.#g}#b;get atime(){return this.#b}#m;get mtime(){return this.#m}#R;get ctime(){return this.#R}#E;get birthtime(){return this.#E}#v;#S;#O;#w;#P;#A;#d;#$;#C;#T;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(R,H=y,ee,ne,te,ae,he){this.name=R,this.#v=te?C(R):D(R),this.#d=H&G,this.nocase=te,this.roots=ne,this.root=ee||this,this.#$=ae,this.#O=he.fullpath,this.#P=he.relative,this.#A=he.relativePosix,this.parent=he.parent,this.parent?this.#e=this.parent.#e:this.#e=d(he.fs)}depth(){return this.#S!==void 0?this.#S:this.parent?this.#S=this.parent.depth()+1:this.#S=0}childrenCache(){return this.#$}resolve(R){if(!R)return this;let H=this.getRootString(R),ee=R.substring(H.length).split(this.splitSep);return H?this.getRoot(H).#M(ee):this.#M(ee)}#M(R){let H=this;for(let ee of R)H=H.child(ee);return H}children(){let R=this.#$.get(this);if(R)return R;let H=Object.assign([],{provisional:0});return this.#$.set(this,H),this.#d&=~L,H}child(R,H){if(R===""||R===".")return this;if(R==="..")return this.parent||this;let ee=this.children(),ne=this.nocase?C(R):D(R);for(let re of ee)if(re.#v===ne)return re;let te=this.parent?this.sep:"",ae=this.#O?this.#O+te+R:void 0,he=this.newChild(R,y,{...H,parent:this,fullpath:ae});return this.canReaddir()||(he.#d|=M),ee.push(he),he}relative(){if(this.isCWD)return"";if(this.#P!==void 0)return this.#P;let R=this.name,H=this.parent;if(!H)return this.#P=this.name;let ee=H.relative();return ee+(!ee||!H.parent?"":this.sep)+R}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let R=this.name,H=this.parent;if(!H)return this.#A=this.fullpathPosix();let ee=H.relativePosix();return ee+(!ee||!H.parent?"":"/")+R}fullpath(){if(this.#O!==void 0)return this.#O;let R=this.name,H=this.parent;if(!H)return this.#O=this.name;let ee=H.fullpath()+(H.parent?this.sep:"")+R;return this.#O=ee}fullpathPosix(){if(this.#w!==void 0)return this.#w;if(this.sep==="/")return this.#w=this.fullpath();if(!this.parent){let ne=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(ne)?this.#w=`//?/${ne}`:this.#w=ne}let R=this.parent,H=R.fullpathPosix(),ee=H+(!H||!R.parent?"":"/")+this.name;return this.#w=ee}isUnknown(){return(this.#d&I)===y}isType(R){return this[`is${R}`]()}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.#d&I)===O}isDirectory(){return(this.#d&I)===b}isCharacterDevice(){return(this.#d&I)===E}isBlockDevice(){return(this.#d&I)===_}isFIFO(){return(this.#d&I)===S}isSocket(){return(this.#d&I)===A}isSymbolicLink(){return(this.#d&w)===w}lstatCached(){return this.#d&$?this:void 0}readlinkCached(){return this.#C}realpathCached(){return this.#T}readdirCached(){let R=this.children();return R.slice(0,R.provisional)}canReadlink(){if(this.#C)return!0;if(!this.parent)return!1;let R=this.#d&I;return!(R!==y&&R!==w||this.#d&U||this.#d&M)}calledReaddir(){return!!(this.#d&L)}isENOENT(){return!!(this.#d&M)}isNamed(R){return this.nocase?this.#v===C(R):this.#v===D(R)}async readlink(){let R=this.#C;if(R)return R;if(this.canReadlink()&&this.parent)try{let H=await this.#e.promises.readlink(this.fullpath()),ee=(await this.parent.realpath())?.resolve(H);if(ee)return this.#C=ee}catch(H){this.#_(H.code);return}}readlinkSync(){let R=this.#C;if(R)return R;if(this.canReadlink()&&this.parent)try{let H=this.#e.readlinkSync(this.fullpath()),ee=this.parent.realpathSync()?.resolve(H);if(ee)return this.#C=ee}catch(H){this.#_(H.code);return}}#I(R){this.#d|=L;for(let H=R.provisional;H<R.length;H++){let ee=R[H];ee&&ee.#F()}}#F(){this.#d&M||(this.#d=(this.#d|M)&P,this.#x())}#x(){let R=this.children();R.provisional=0;for(let H of R)H.#F()}#k(){this.#d|=V,this.#j()}#j(){if(this.#d&x)return;let R=this.#d;(R&I)===b&&(R&=P),this.#d=R|x,this.#x()}#N(R=""){R==="ENOTDIR"||R==="EPERM"?this.#j():R==="ENOENT"?this.#F():this.children().provisional=0}#L(R=""){R==="ENOTDIR"?this.parent.#j():R==="ENOENT"&&this.#F()}#_(R=""){let H=this.#d;H|=U,R==="ENOENT"&&(H|=M),(R==="EINVAL"||R==="UNKNOWN")&&(H&=P),this.#d=H,R==="ENOTDIR"&&this.parent&&this.parent.#j()}#B(R,H){return this.#y(R,H)||this.#U(R,H)}#U(R,H){let ee=W(R),ne=this.newChild(R.name,ee,{parent:this}),te=ne.#d&I;return te!==b&&te!==w&&te!==y&&(ne.#d|=x),H.unshift(ne),H.provisional++,ne}#y(R,H){for(let ee=H.provisional;ee<H.length;ee++){let ne=H[ee];if((this.nocase?C(R.name):D(R.name))===ne.#v)return this.#H(R,ne,ee,H)}}#H(R,H,ee,ne){let te=H.name;return H.#d=H.#d&P|W(R),te!==R.name&&(H.name=R.name),ee!==ne.provisional&&(ee===ne.length-1?ne.pop():ne.splice(ee,1),ne.unshift(H)),ne.provisional++,H}async lstat(){if(!(this.#d&M))try{return this.#G(await this.#e.promises.lstat(this.fullpath())),this}catch(R){this.#L(R.code)}}lstatSync(){if(!(this.#d&M))try{return this.#G(this.#e.lstatSync(this.fullpath())),this}catch(R){this.#L(R.code)}}#G(R){let{atime:H,atimeMs:ee,birthtime:ne,birthtimeMs:te,blksize:ae,blocks:he,ctime:re,ctimeMs:ue,dev:ie,gid:le,ino:fe,mode:me,mtime:ce,mtimeMs:pe,nlink:de,rdev:ye,size:Ee,uid:Te}=R;this.#b=H,this.#u=ee,this.#E=ne,this.#g=te,this.#h=ae,this.#o=he,this.#R=re,this.#f=ue,this.#t=ie,this.#l=le,this.#n=fe,this.#r=me,this.#m=ce,this.#a=pe,this.#s=de,this.#c=ye,this.#p=Ee,this.#i=Te;let Ue=W(R);this.#d=this.#d&P|Ue|$,Ue!==y&&Ue!==b&&Ue!==w&&(this.#d|=x)}#D=[];#V=!1;#z(R){this.#V=!1;let H=this.#D.slice();this.#D.length=0,H.forEach(ee=>ee(null,R))}readdirCB(R,H=!1){if(!this.canReaddir()){H?R(null,[]):queueMicrotask(()=>R(null,[]));return}let ee=this.children();if(this.calledReaddir()){let te=ee.slice(0,ee.provisional);H?R(null,te):queueMicrotask(()=>R(null,te));return}if(this.#D.push(R),this.#V)return;this.#V=!0;let ne=this.fullpath();this.#e.readdir(ne,{withFileTypes:!0},(te,ae)=>{if(te)this.#N(te.code),ee.provisional=0;else{for(let he of ae)this.#B(he,ee);this.#I(ee)}this.#z(ee.slice(0,ee.provisional))})}#W;async readdir(){if(!this.canReaddir())return[];let R=this.children();if(this.calledReaddir())return R.slice(0,R.provisional);let H=this.fullpath();if(this.#W)await this.#W;else{let ee=v(()=>{},"resolve");this.#W=new Promise(ne=>ee=ne);try{for(let ne of await this.#e.promises.readdir(H,{withFileTypes:!0}))this.#B(ne,R);this.#I(R)}catch(ne){this.#N(ne.code),R.provisional=0}this.#W=void 0,ee()}return R.slice(0,R.provisional)}readdirSync(){if(!this.canReaddir())return[];let R=this.children();if(this.calledReaddir())return R.slice(0,R.provisional);let H=this.fullpath();try{for(let ee of this.#e.readdirSync(H,{withFileTypes:!0}))this.#B(ee,R);this.#I(R)}catch(ee){this.#N(ee.code),R.provisional=0}return R.slice(0,R.provisional)}canReaddir(){if(this.#d&B)return!1;let R=I&this.#d;return R===y||R===b||R===w}shouldWalk(R,H){return(this.#d&b)===b&&!(this.#d&B)&&!R.has(this)&&(!H||H(this))}async realpath(){if(this.#T)return this.#T;if(!((V|U|M)&this.#d))try{let R=await this.#e.promises.realpath(this.fullpath());return this.#T=this.resolve(R)}catch{this.#k()}}realpathSync(){if(this.#T)return this.#T;if(!((V|U|M)&this.#d))try{let R=this.#e.realpathSync(this.fullpath());return this.#T=this.resolve(R)}catch{this.#k()}}[Q](R){if(R===this)return;R.isCWD=!1,this.isCWD=!0;let H=new Set([]),ee=[],ne=this;for(;ne&&ne.parent;)H.add(ne),ne.#P=ee.join(this.sep),ne.#A=ee.join("/"),ne=ne.parent,ee.push("..");for(ne=R;ne&&ne.parent&&!H.has(ne);)ne.#P=void 0,ne.#A=void 0,ne=ne.parent}};e.PathBase=k;var F=class uf extends k{static{v(this,"PathWin32")}sep="\\";splitSep=f;constructor(H,ee=y,ne,te,ae,he,re){super(H,ee,ne,te,ae,he,re)}newChild(H,ee=y,ne={}){return new uf(H,ee,this.root,this.roots,this.nocase,this.childrenCache(),ne)}getRootString(H){return a.win32.parse(H).root}getRoot(H){if(H=m(H.toUpperCase()),H===this.root.name)return this.root;for(let[ee,ne]of Object.entries(this.roots))if(this.sameRoot(H,ee))return this.roots[H]=ne;return this.roots[H]=new q(H,this).root}sameRoot(H,ee=this.root.name){return H=H.toUpperCase().replace(/\//g,"\\").replace(g,"$1\\"),H===ee}};e.PathWin32=F;var z=class hf extends k{static{v(this,"PathPosix")}splitSep="/";sep="/";constructor(H,ee=y,ne,te,ae,he,re){super(H,ee,ne,te,ae,he,re)}getRootString(H){return H.startsWith("/")?"/":""}getRoot(H){return this.root}newChild(H,ee=y,ne={}){return new hf(H,ee,this.root,this.roots,this.nocase,this.childrenCache(),ne)}};e.PathPosix=z;var j=class{static{v(this,"PathScurryBase")}root;rootPath;roots;cwd;#e;#t;#r;nocase;#s;constructor(R=process.cwd(),H,ee,{nocase:ne,childrenCacheSize:te=16*1024,fs:ae=p}={}){this.#s=d(ae),(R instanceof URL||R.startsWith("file://"))&&(R=(0,c.fileURLToPath)(R));let he=H.resolve(R);this.roots=Object.create(null),this.rootPath=this.parseRootPath(he),this.#e=new Z,this.#t=new Z,this.#r=new X(te);let re=he.substring(this.rootPath.length).split(ee);if(re.length===1&&!re[0]&&re.pop(),ne===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=ne,this.root=this.newRoot(this.#s),this.roots[this.rootPath]=this.root;let ue=this.root,ie=re.length-1,le=H.sep,fe=this.rootPath,me=!1;for(let ce of re){let pe=ie--;ue=ue.child(ce,{relative:new Array(pe).fill("..").join(le),relativePosix:new Array(pe).fill("..").join("/"),fullpath:fe+=(me?"":le)+ce}),me=!0}this.cwd=ue}depth(R=this.cwd){return typeof R=="string"&&(R=this.cwd.resolve(R)),R.depth()}childrenCache(){return this.#r}resolve(...R){let H="";for(let te=R.length-1;te>=0;te--){let ae=R[te];if(!(!ae||ae===".")&&(H=H?`${ae}/${H}`:ae,this.isAbsolute(ae)))break}let ee=this.#e.get(H);if(ee!==void 0)return ee;let ne=this.cwd.resolve(H).fullpath();return this.#e.set(H,ne),ne}resolvePosix(...R){let H="";for(let te=R.length-1;te>=0;te--){let ae=R[te];if(!(!ae||ae===".")&&(H=H?`${ae}/${H}`:ae,this.isAbsolute(ae)))break}let ee=this.#t.get(H);if(ee!==void 0)return ee;let ne=this.cwd.resolve(H).fullpathPosix();return this.#t.set(H,ne),ne}relative(R=this.cwd){return typeof R=="string"&&(R=this.cwd.resolve(R)),R.relative()}relativePosix(R=this.cwd){return typeof R=="string"&&(R=this.cwd.resolve(R)),R.relativePosix()}basename(R=this.cwd){return typeof R=="string"&&(R=this.cwd.resolve(R)),R.name}dirname(R=this.cwd){return typeof R=="string"&&(R=this.cwd.resolve(R)),(R.parent||R).fullpath()}async readdir(R=this.cwd,H={withFileTypes:!0}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof k||(H=R,R=this.cwd);let{withFileTypes:ee}=H;if(R.canReaddir()){let ne=await R.readdir();return ee?ne:ne.map(te=>te.name)}else return[]}readdirSync(R=this.cwd,H={withFileTypes:!0}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof k||(H=R,R=this.cwd);let{withFileTypes:ee=!0}=H;return R.canReaddir()?ee?R.readdirSync():R.readdirSync().map(ne=>ne.name):[]}async lstat(R=this.cwd){return typeof R=="string"&&(R=this.cwd.resolve(R)),R.lstat()}lstatSync(R=this.cwd){return typeof R=="string"&&(R=this.cwd.resolve(R)),R.lstatSync()}async readlink(R=this.cwd,{withFileTypes:H}={withFileTypes:!1}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof k||(H=R.withFileTypes,R=this.cwd);let ee=await R.readlink();return H?ee:ee?.fullpath()}readlinkSync(R=this.cwd,{withFileTypes:H}={withFileTypes:!1}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof k||(H=R.withFileTypes,R=this.cwd);let ee=R.readlinkSync();return H?ee:ee?.fullpath()}async realpath(R=this.cwd,{withFileTypes:H}={withFileTypes:!1}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof k||(H=R.withFileTypes,R=this.cwd);let ee=await R.realpath();return H?ee:ee?.fullpath()}realpathSync(R=this.cwd,{withFileTypes:H}={withFileTypes:!1}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof k||(H=R.withFileTypes,R=this.cwd);let ee=R.realpathSync();return H?ee:ee?.fullpath()}async walk(R=this.cwd,H={}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof k||(H=R,R=this.cwd);let{withFileTypes:ee=!0,follow:ne=!1,filter:te,walkFilter:ae}=H,he=[];(!te||te(R))&&he.push(ee?R:R.fullpath());let re=new Set,ue=v((le,fe)=>{re.add(le),le.readdirCB((me,ce)=>{if(me)return fe(me);let pe=ce.length;if(!pe)return fe();let de=v(()=>{--pe===0&&fe()},"next");for(let ye of ce)(!te||te(ye))&&he.push(ee?ye:ye.fullpath()),ne&&ye.isSymbolicLink()?ye.realpath().then(Ee=>Ee?.isUnknown()?Ee.lstat():Ee).then(Ee=>Ee?.shouldWalk(re,ae)?ue(Ee,de):de()):ye.shouldWalk(re,ae)?ue(ye,de):de()},!0)},"walk"),ie=R;return new Promise((le,fe)=>{ue(ie,me=>{if(me)return fe(me);le(he)})})}walkSync(R=this.cwd,H={}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof k||(H=R,R=this.cwd);let{withFileTypes:ee=!0,follow:ne=!1,filter:te,walkFilter:ae}=H,he=[];(!te||te(R))&&he.push(ee?R:R.fullpath());let re=new Set([R]);for(let ue of re){let ie=ue.readdirSync();for(let le of ie){(!te||te(le))&&he.push(ee?le:le.fullpath());let fe=le;if(le.isSymbolicLink()){if(!(ne&&(fe=le.realpathSync())))continue;fe.isUnknown()&&fe.lstatSync()}fe.shouldWalk(re,ae)&&re.add(fe)}}return he}[Symbol.asyncIterator](){return this.iterate()}iterate(R=this.cwd,H={}){return typeof R=="string"?R=this.cwd.resolve(R):R instanceof k||(H=R,R=this.cwd),this.stream(R,H)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(R=this.cwd,H={}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof k||(H=R,R=this.cwd);let{withFileTypes:ee=!0,follow:ne=!1,filter:te,walkFilter:ae}=H;(!te||te(R))&&(yield ee?R:R.fullpath());let he=new Set([R]);for(let re of he){let ue=re.readdirSync();for(let ie of ue){(!te||te(ie))&&(yield ee?ie:ie.fullpath());let le=ie;if(ie.isSymbolicLink()){if(!(ne&&(le=ie.realpathSync())))continue;le.isUnknown()&&le.lstatSync()}le.shouldWalk(he,ae)&&he.add(le)}}}stream(R=this.cwd,H={}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof k||(H=R,R=this.cwd);let{withFileTypes:ee=!0,follow:ne=!1,filter:te,walkFilter:ae}=H,he=new h.Minipass({objectMode:!0});(!te||te(R))&&he.write(ee?R:R.fullpath());let re=new Set,ue=[R],ie=0,le=v(()=>{let fe=!1;for(;!fe;){let me=ue.shift();if(!me){ie===0&&he.end();return}ie++,re.add(me);let ce=v((de,ye,Ee=!1)=>{if(de)return he.emit("error",de);if(ne&&!Ee){let Te=[];for(let Ue of ye)Ue.isSymbolicLink()&&Te.push(Ue.realpath().then(Qt=>Qt?.isUnknown()?Qt.lstat():Qt));if(Te.length){Promise.all(Te).then(()=>ce(null,ye,!0));return}}for(let Te of ye)Te&&(!te||te(Te))&&(he.write(ee?Te:Te.fullpath())||(fe=!0));ie--;for(let Te of ye){let Ue=Te.realpathCached()||Te;Ue.shouldWalk(re,ae)&&ue.push(Ue)}fe&&!he.flowing?he.once("drain",le):pe||le()},"onReaddir"),pe=!0;me.readdirCB(ce,!0),pe=!1}},"process");return le(),he}streamSync(R=this.cwd,H={}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof k||(H=R,R=this.cwd);let{withFileTypes:ee=!0,follow:ne=!1,filter:te,walkFilter:ae}=H,he=new h.Minipass({objectMode:!0}),re=new Set;(!te||te(R))&&he.write(ee?R:R.fullpath());let ue=[R],ie=0,le=v(()=>{let fe=!1;for(;!fe;){let me=ue.shift();if(!me){ie===0&&he.end();return}ie++,re.add(me);let ce=me.readdirSync();for(let pe of ce)(!te||te(pe))&&(he.write(ee?pe:pe.fullpath())||(fe=!0));ie--;for(let pe of ce){let de=pe;if(pe.isSymbolicLink()){if(!(ne&&(de=pe.realpathSync())))continue;de.isUnknown()&&de.lstatSync()}de.shouldWalk(re,ae)&&ue.push(de)}}fe&&!he.flowing&&he.once("drain",le)},"process");return le(),he}chdir(R=this.cwd){let H=this.cwd;this.cwd=typeof R=="string"?this.cwd.resolve(R):R,this.cwd[Q](H)}};e.PathScurryBase=j;var q=class extends j{static{v(this,"PathScurryWin32")}sep="\\";constructor(R=process.cwd(),H={}){let{nocase:ee=!0}=H;super(R,a.win32,"\\",{...H,nocase:ee}),this.nocase=ee;for(let ne=this.cwd;ne;ne=ne.parent)ne.nocase=this.nocase}parseRootPath(R){return a.win32.parse(R).root.toUpperCase()}newRoot(R){return new F(this.rootPath,b,void 0,this.roots,this.nocase,this.childrenCache(),{fs:R})}isAbsolute(R){return R.startsWith("/")||R.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(R)}};e.PathScurryWin32=q;var J=class extends j{static{v(this,"PathScurryPosix")}sep="/";constructor(R=process.cwd(),H={}){let{nocase:ee=!1}=H;super(R,a.posix,"/",{...H,nocase:ee}),this.nocase=ee}parseRootPath(R){return"/"}newRoot(R){return new z(this.rootPath,b,void 0,this.roots,this.nocase,this.childrenCache(),{fs:R})}isAbsolute(R){return R.startsWith("/")}};e.PathScurryPosix=J;var Y=class extends J{static{v(this,"PathScurryDarwin")}constructor(R=process.cwd(),H={}){let{nocase:ee=!0}=H;super(R,{...H,nocase:ee})}};e.PathScurryDarwin=Y,e.Path=process.platform==="win32"?F:z,e.PathScurry=process.platform==="win32"?q:process.platform==="darwin"?Y:J}),pf=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pattern=void 0;var t=jt(),s=v(a=>a.length>=1,"isPatternList"),u=v(a=>a.length>=1,"isGlobList"),i=class df{static{v(this,"Pattern")}#e;#t;#r;length;#s;#i;#l;#c;#h;#n;#p=!0;constructor(c,r,n,o){if(!s(c))throw new TypeError("empty pattern list");if(!u(r))throw new TypeError("empty glob list");if(r.length!==c.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=c.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#e=c,this.#t=r,this.#r=n,this.#s=o,this.#r===0){if(this.isUNC()){let[l,h,p,d,...g]=this.#e,[m,f,y,S,...E]=this.#t;g[0]===""&&(g.shift(),E.shift());let b=[l,h,p,d,""].join("/"),_=[m,f,y,S,""].join("/");this.#e=[b,...g],this.#t=[_,...E],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[l,...h]=this.#e,[p,...d]=this.#t;h[0]===""&&(h.shift(),d.shift());let g=l+"/",m=p+"/";this.#e=[g,...h],this.#t=[m,...d],this.length=this.#e.length}}}pattern(){return this.#e[this.#r]}isString(){return typeof this.#e[this.#r]=="string"}isGlobstar(){return this.#e[this.#r]===t.GLOBSTAR}isRegExp(){return this.#e[this.#r]instanceof RegExp}globString(){return this.#l=this.#l||(this.#r===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#r).join("/"))}hasMore(){return this.length>this.#r+1}rest(){return this.#i!==void 0?this.#i:this.hasMore()?(this.#i=new df(this.#e,this.#t,this.#r+1,this.#s),this.#i.#n=this.#n,this.#i.#h=this.#h,this.#i.#c=this.#c,this.#i):this.#i=null}isUNC(){let c=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#s==="win32"&&this.#r===0&&c[0]===""&&c[1]===""&&typeof c[2]=="string"&&!!c[2]&&typeof c[3]=="string"&&!!c[3]}isDrive(){let c=this.#e;return this.#c!==void 0?this.#c:this.#c=this.#s==="win32"&&this.#r===0&&this.length>1&&typeof c[0]=="string"&&/^[a-z]:$/i.test(c[0])}isAbsolute(){let c=this.#e;return this.#n!==void 0?this.#n:this.#n=c[0]===""&&c.length>1||this.isDrive()||this.isUNC()}root(){let c=this.#e[0];return typeof c=="string"&&this.isAbsolute()&&this.#r===0?c:""}checkFollowGlobstar(){return!(this.#r===0||!this.isGlobstar()||!this.#p)}markFollowGlobstar(){return this.#r===0||!this.isGlobstar()||!this.#p?!1:(this.#p=!1,!0)}};e.Pattern=i}),ff=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ignore=void 0;var t=jt(),s=pf(),u=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",i=class{static{v(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(a,{nobrace:c,nocase:r,noext:n,noglobstar:o,platform:l=u}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=l,this.mmopts={dot:!0,nobrace:c,nocase:r,noext:n,noglobstar:o,optimizationLevel:2,platform:l,nocomment:!0,nonegate:!0};for(let h of a)this.add(h)}add(a){let c=new t.Minimatch(a,this.mmopts);for(let r=0;r<c.set.length;r++){let n=c.set[r],o=c.globParts[r];if(!n||!o)throw new Error("invalid pattern object");for(;n[0]==="."&&o[0]===".";)n.shift(),o.shift();let l=new s.Pattern(n,o,0,this.platform),h=new t.Minimatch(l.globString(),this.mmopts),p=o[o.length-1]==="**",d=l.isAbsolute();d?this.absolute.push(h):this.relative.push(h),p&&(d?this.absoluteChildren.push(h):this.relativeChildren.push(h))}}ignored(a){let c=a.fullpath(),r=`${c}/`,n=a.relative()||".",o=`${n}/`;for(let l of this.relative)if(l.match(n)||l.match(o))return!0;for(let l of this.absolute)if(l.match(c)||l.match(r))return!0;return!1}childrenIgnored(a){let c=a.fullpath()+"/",r=(a.relative()||".")+"/";for(let n of this.relativeChildren)if(n.match(r))return!0;for(let n of this.absoluteChildren)if(n.match(c))return!0;return!1}};e.Ignore=i}),NP=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;var t=jt(),s=class gf{static{v(this,"HasWalkedCache")}store;constructor(r=new Map){this.store=r}copy(){return new gf(new Map(this.store))}hasWalked(r,n){return this.store.get(r.fullpath())?.has(n.globString())}storeWalked(r,n){let o=r.fullpath(),l=this.store.get(o);l?l.add(n.globString()):this.store.set(o,new Set([n.globString()]))}};e.HasWalkedCache=s;var u=class{static{v(this,"MatchRecord")}store=new Map;add(c,r,n){let o=(r?2:0)|(n?1:0),l=this.store.get(c);this.store.set(c,l===void 0?o:o&l)}entries(){return[...this.store.entries()].map(([c,r])=>[c,!!(r&2),!!(r&1)])}};e.MatchRecord=u;var i=class{static{v(this,"SubWalks")}store=new Map;add(c,r){if(!c.canReaddir())return;let n=this.store.get(c);n?n.find(o=>o.globString()===r.globString())||n.push(r):this.store.set(c,[r])}get(c){let r=this.store.get(c);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(c=>[c,this.store.get(c)])}keys(){return[...this.store.keys()].filter(c=>c.canReaddir())}};e.SubWalks=i;var a=class mf{static{v(this,"Processor")}hasWalkedCache;matches=new u;subwalks=new i;patterns;follow;dot;opts;constructor(r,n){this.opts=r,this.follow=!!r.follow,this.dot=!!r.dot,this.hasWalkedCache=n?n.copy():new s}processPatterns(r,n){this.patterns=n;let o=n.map(l=>[r,l]);for(let[l,h]of o){this.hasWalkedCache.storeWalked(l,h);let p=h.root(),d=h.isAbsolute()&&this.opts.absolute!==!1;if(p){l=l.resolve(p==="/"&&this.opts.root!==void 0?this.opts.root:p);let y=h.rest();if(y)h=y;else{this.matches.add(l,!0,!1);continue}}if(l.isENOENT())continue;let g,m,f=!1;for(;typeof(g=h.pattern())=="string"&&(m=h.rest());)l=l.resolve(g),h=m,f=!0;if(g=h.pattern(),m=h.rest(),f){if(this.hasWalkedCache.hasWalked(l,h))continue;this.hasWalkedCache.storeWalked(l,h)}if(typeof g=="string"){let y=g===".."||g===""||g===".";this.matches.add(l.resolve(g),d,y);continue}else if(g===t.GLOBSTAR){(!l.isSymbolicLink()||this.follow||h.checkFollowGlobstar())&&this.subwalks.add(l,h);let y=m?.pattern(),S=m?.rest();if(!m||(y===""||y===".")&&!S)this.matches.add(l,d,y===""||y===".");else if(y===".."){let E=l.parent||l;S?this.hasWalkedCache.hasWalked(E,S)||this.subwalks.add(E,S):this.matches.add(E,d,!0)}}else g instanceof RegExp&&this.subwalks.add(l,h)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new mf(this.opts,this.hasWalkedCache)}filterEntries(r,n){let o=this.subwalks.get(r),l=this.child();for(let h of n)for(let p of o){let d=p.isAbsolute(),g=p.pattern(),m=p.rest();g===t.GLOBSTAR?l.testGlobstar(h,p,m,d):g instanceof RegExp?l.testRegExp(h,g,m,d):l.testString(h,g,m,d)}return l}testGlobstar(r,n,o,l){if((this.dot||!r.name.startsWith("."))&&(n.hasMore()||this.matches.add(r,l,!1),r.canReaddir()&&(this.follow||!r.isSymbolicLink()?this.subwalks.add(r,n):r.isSymbolicLink()&&(o&&n.checkFollowGlobstar()?this.subwalks.add(r,o):n.markFollowGlobstar()&&this.subwalks.add(r,n)))),o){let h=o.pattern();if(typeof h=="string"&&h!==".."&&h!==""&&h!==".")this.testString(r,h,o.rest(),l);else if(h===".."){let p=r.parent||r;this.subwalks.add(p,o)}else h instanceof RegExp&&this.testRegExp(r,h,o.rest(),l)}}testRegExp(r,n,o,l){n.test(r.name)&&(o?this.subwalks.add(r,o):this.matches.add(r,l,!1))}testString(r,n,o,l){r.isNamed(n)&&(o?this.subwalks.add(r,o):this.matches.add(r,l,!1))}};e.Processor=a}),kP=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;var t=xe(),s=ff(),u=NP(),i=v((n,o)=>typeof n=="string"?new s.Ignore([n],o):Array.isArray(n)?new s.Ignore(n,o):n,"makeIgnore"),a=class{static{v(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#r;signal;maxDepth;includeChildMatches;constructor(n,o,l){if(this.patterns=n,this.path=o,this.opts=l,this.#r=!l.posix&&l.platform==="win32"?"\\":"/",this.includeChildMatches=l.includeChildMatches!==!1,(l.ignore||!this.includeChildMatches)&&(this.#t=i(l.ignore??[],l),!this.includeChildMatches&&typeof this.#t.add!="function")){let h="cannot ignore child matches, ignore lacks add() method.";throw new Error(h)}this.maxDepth=l.maxDepth||1/0,l.signal&&(this.signal=l.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#s(n){return this.seen.has(n)||!!this.#t?.ignored?.(n)}#i(n){return!!this.#t?.childrenIgnored?.(n)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let n;for(;!this.paused&&(n=this.#e.shift());)n()}onResume(n){this.signal?.aborted||(this.paused?this.#e.push(n):n())}async matchCheck(n,o){if(o&&this.opts.nodir)return;let l;if(this.opts.realpath){if(l=n.realpathCached()||await n.realpath(),!l)return;n=l}let h=n.isUnknown()||this.opts.stat?await n.lstat():n;if(this.opts.follow&&this.opts.nodir&&h?.isSymbolicLink()){let p=await h.realpath();p&&(p.isUnknown()||this.opts.stat)&&await p.lstat()}return this.matchCheckTest(h,o)}matchCheckTest(n,o){return n&&(this.maxDepth===1/0||n.depth()<=this.maxDepth)&&(!o||n.canReaddir())&&(!this.opts.nodir||!n.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!n.isSymbolicLink()||!n.realpathCached()?.isDirectory())&&!this.#s(n)?n:void 0}matchCheckSync(n,o){if(o&&this.opts.nodir)return;let l;if(this.opts.realpath){if(l=n.realpathCached()||n.realpathSync(),!l)return;n=l}let h=n.isUnknown()||this.opts.stat?n.lstatSync():n;if(this.opts.follow&&this.opts.nodir&&h?.isSymbolicLink()){let p=h.realpathSync();p&&(p?.isUnknown()||this.opts.stat)&&p.lstatSync()}return this.matchCheckTest(h,o)}matchFinish(n,o){if(this.#s(n))return;if(!this.includeChildMatches&&this.#t?.add){let p=`${n.relativePosix()}/**`;this.#t.add(p)}let l=this.opts.absolute===void 0?o:this.opts.absolute;this.seen.add(n);let h=this.opts.mark&&n.isDirectory()?this.#r:"";if(this.opts.withFileTypes)this.matchEmit(n);else if(l){let p=this.opts.posix?n.fullpathPosix():n.fullpath();this.matchEmit(p+h)}else{let p=this.opts.posix?n.relativePosix():n.relative(),d=this.opts.dotRelative&&!p.startsWith(".."+this.#r)?"."+this.#r:"";this.matchEmit(p?d+p+h:"."+h)}}async match(n,o,l){let h=await this.matchCheck(n,l);h&&this.matchFinish(h,o)}matchSync(n,o,l){let h=this.matchCheckSync(n,l);h&&this.matchFinish(h,o)}walkCB(n,o,l){this.signal?.aborted&&l(),this.walkCB2(n,o,new u.Processor(this.opts),l)}walkCB2(n,o,l,h){if(this.#i(n))return h();if(this.signal?.aborted&&h(),this.paused){this.onResume(()=>this.walkCB2(n,o,l,h));return}l.processPatterns(n,o);let p=1,d=v(()=>{--p===0&&h()},"next");for(let[g,m,f]of l.matches.entries())this.#s(g)||(p++,this.match(g,m,f).then(()=>d()));for(let g of l.subwalkTargets()){if(this.maxDepth!==1/0&&g.depth()>=this.maxDepth)continue;p++;let m=g.readdirCached();g.calledReaddir()?this.walkCB3(g,m,l,d):g.readdirCB((f,y)=>this.walkCB3(g,y,l,d),!0)}d()}walkCB3(n,o,l,h){l=l.filterEntries(n,o);let p=1,d=v(()=>{--p===0&&h()},"next");for(let[g,m,f]of l.matches.entries())this.#s(g)||(p++,this.match(g,m,f).then(()=>d()));for(let[g,m]of l.subwalks.entries())p++,this.walkCB2(g,m,l.child(),d);d()}walkCBSync(n,o,l){this.signal?.aborted&&l(),this.walkCB2Sync(n,o,new u.Processor(this.opts),l)}walkCB2Sync(n,o,l,h){if(this.#i(n))return h();if(this.signal?.aborted&&h(),this.paused){this.onResume(()=>this.walkCB2Sync(n,o,l,h));return}l.processPatterns(n,o);let p=1,d=v(()=>{--p===0&&h()},"next");for(let[g,m,f]of l.matches.entries())this.#s(g)||this.matchSync(g,m,f);for(let g of l.subwalkTargets()){if(this.maxDepth!==1/0&&g.depth()>=this.maxDepth)continue;p++;let m=g.readdirSync();this.walkCB3Sync(g,m,l,d)}d()}walkCB3Sync(n,o,l,h){l=l.filterEntries(n,o);let p=1,d=v(()=>{--p===0&&h()},"next");for(let[g,m,f]of l.matches.entries())this.#s(g)||this.matchSync(g,m,f);for(let[g,m]of l.subwalks.entries())p++,this.walkCB2Sync(g,m,l.child(),d);d()}};e.GlobUtil=a;var c=class extends a{static{v(this,"GlobWalker")}matches=new Set;constructor(n,o,l){super(n,o,l)}matchEmit(n){this.matches.add(n)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((n,o)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?o(this.signal.reason):n(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};e.GlobWalker=c;var r=class extends a{static{v(this,"GlobStream")}results;constructor(n,o,l){super(n,o,l),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(n){this.results.write(n),this.results.flowing||this.pause()}stream(){let n=this.path;return n.isUnknown()?n.lstat().then(()=>{this.walkCB(n,this.patterns,()=>this.results.end())}):this.walkCB(n,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}};e.GlobStream=r}),Kd=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Glob=void 0;var t=jt(),s=require("url"),u=xP(),i=pf(),a=kP(),c=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",r=class{static{v(this,"Glob")}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(n,o){if(!o)throw new TypeError("glob options required");if(this.withFileTypes=!!o.withFileTypes,this.signal=o.signal,this.follow=!!o.follow,this.dot=!!o.dot,this.dotRelative=!!o.dotRelative,this.nodir=!!o.nodir,this.mark=!!o.mark,o.cwd?(o.cwd instanceof URL||o.cwd.startsWith("file://"))&&(o.cwd=(0,s.fileURLToPath)(o.cwd)):this.cwd="",this.cwd=o.cwd||"",this.root=o.root,this.magicalBraces=!!o.magicalBraces,this.nobrace=!!o.nobrace,this.noext=!!o.noext,this.realpath=!!o.realpath,this.absolute=o.absolute,this.includeChildMatches=o.includeChildMatches!==!1,this.noglobstar=!!o.noglobstar,this.matchBase=!!o.matchBase,this.maxDepth=typeof o.maxDepth=="number"?o.maxDepth:1/0,this.stat=!!o.stat,this.ignore=o.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof n=="string"&&(n=[n]),this.windowsPathsNoEscape=!!o.windowsPathsNoEscape||o.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(n=n.map(m=>m.replace(/\\/g,"/"))),this.matchBase){if(o.noglobstar)throw new TypeError("base matching requires globstar");n=n.map(m=>m.includes("/")?m:`./**/${m}`)}if(this.pattern=n,this.platform=o.platform||c,this.opts={...o,platform:this.platform},o.scurry){if(this.scurry=o.scurry,o.nocase!==void 0&&o.nocase!==o.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let m=o.platform==="win32"?u.PathScurryWin32:o.platform==="darwin"?u.PathScurryDarwin:o.platform?u.PathScurryPosix:u.PathScurry;this.scurry=new m(this.cwd,{nocase:o.nocase,fs:o.fs})}this.nocase=this.scurry.nocase;let l=this.platform==="darwin"||this.platform==="win32",h={...o,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:l,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},p=this.pattern.map(m=>new t.Minimatch(m,h)),[d,g]=p.reduce((m,f)=>(m[0].push(...f.set),m[1].push(...f.globParts),m),[[],[]]);this.patterns=d.map((m,f)=>{let y=g[f];if(!y)throw new Error("invalid pattern object");return new i.Pattern(m,y,0,this.platform)})}async walk(){return[...await new a.GlobWalker(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 a.GlobWalker(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 a.GlobStream(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 a.GlobStream(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()}};e.Glob=r}),Jd=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasMagic=void 0;var t=jt(),s=v((u,i={})=>{Array.isArray(u)||(u=[u]);for(let a of u)if(new t.Minimatch(a,i).hasMagic())return!0;return!1},"hasMagic");e.hasMagic=s}),yf=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.glob=e.sync=e.iterate=e.iterateSync=e.stream=e.streamSync=e.Ignore=e.hasMagic=e.Glob=e.unescape=e.escape=void 0,e.globStreamSync=n,e.globStream=o,e.globSync=l,e.globIterateSync=p,e.globIterate=d;var t=jt(),s=Kd(),u=Jd(),i=jt();Object.defineProperty(e,"escape",{enumerable:!0,get:v(function(){return i.escape},"get")}),Object.defineProperty(e,"unescape",{enumerable:!0,get:v(function(){return i.unescape},"get")});var a=Kd();Object.defineProperty(e,"Glob",{enumerable:!0,get:v(function(){return a.Glob},"get")});var c=Jd();Object.defineProperty(e,"hasMagic",{enumerable:!0,get:v(function(){return c.hasMagic},"get")});var r=ff();Object.defineProperty(e,"Ignore",{enumerable:!0,get:v(function(){return r.Ignore},"get")});function n(g,m={}){return new s.Glob(g,m).streamSync()}v(n,"globStreamSync");function o(g,m={}){return new s.Glob(g,m).stream()}v(o,"globStream");function l(g,m={}){return new s.Glob(g,m).walkSync()}v(l,"globSync");async function h(g,m={}){return new s.Glob(g,m).walk()}v(h,"glob_");function p(g,m={}){return new s.Glob(g,m).iterateSync()}v(p,"globIterateSync");function d(g,m={}){return new s.Glob(g,m).iterate()}v(d,"globIterate"),e.streamSync=n,e.stream=Object.assign(o,{sync:n}),e.iterateSync=p,e.iterate=Object.assign(d,{sync:p}),e.sync=Object.assign(l,{stream:n,iterate:p}),e.glob=Object.assign(h,{glob:h,globSync:l,sync:e.sync,globStream:o,stream:e.stream,globStreamSync:n,streamSync:e.streamSync,globIterate:d,iterate:e.iterate,globIterateSync:p,iterateSync:e.iterateSync,Glob:s.Glob,hasMagic:u.hasMagic,escape:t.escape,unescape:t.unescape}),e.glob.glob=e.glob}),vf=K((e,t)=>{t.exports=["0BSD","3D-Slicer-1.0","AAL","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AGPL-1.0-only","AGPL-1.0-or-later","AGPL-3.0-only","AGPL-3.0-or-later","AMD-newlib","AMDPLPA","AML","AML-glslang","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","ASWF-Digital-Assets-1.0","ASWF-Digital-Assets-1.1","Abstyles","AdaCore-doc","Adobe-2006","Adobe-Display-PostScript","Adobe-Glyph","Adobe-Utopia","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","App-s2p","Arphic-1999","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","Artistic-dist","Aspell-RU","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","BSD-2-Clause-pkgconf-disclaimer","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-HP","BSD-3-Clause-LBNL","BSD-3-Clause-Modification","BSD-3-Clause-No-Military-License","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-Open-MPI","BSD-3-Clause-Sun","BSD-3-Clause-acpica","BSD-3-Clause-flex","BSD-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-4.3RENO","BSD-4.3TAHOE","BSD-Advertising-Acknowledgement","BSD-Attribution-HPND-disclaimer","BSD-Inferno-Nettverk","BSD-Protection","BSD-Source-Code","BSD-Source-beginning-file","BSD-Systemics","BSD-Systemics-W3Works","BSL-1.0","BUSL-1.1","Baekmuk","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Bitstream-Charter","Bitstream-Vera","BlueOak-1.0.0","Boehm-GC","Boehm-GC-without-fee","Borceux","Brian-Gladman-2-Clause","Brian-Gladman-3-Clause","C-UDA-1.0","CAL-1.0","CAL-1.0-Combined-Work-Exception","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-2.5-AU","CC-BY-3.0","CC-BY-3.0-AT","CC-BY-3.0-AU","CC-BY-3.0-DE","CC-BY-3.0-IGO","CC-BY-3.0-NL","CC-BY-3.0-US","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-3.0-DE","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-3.0-DE","CC-BY-NC-ND-3.0-IGO","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.0-DE","CC-BY-NC-SA-2.0-FR","CC-BY-NC-SA-2.0-UK","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-3.0-DE","CC-BY-NC-SA-3.0-IGO","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-3.0-DE","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.0-UK","CC-BY-SA-2.1-JP","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-3.0-AT","CC-BY-SA-3.0-DE","CC-BY-SA-3.0-IGO","CC-BY-SA-4.0","CC-PDDC","CC-PDM-1.0","CC-SA-1.0","CC0-1.0","CDDL-1.0","CDDL-1.1","CDL-1.0","CDLA-Permissive-1.0","CDLA-Permissive-2.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","CERN-OHL-1.1","CERN-OHL-1.2","CERN-OHL-P-2.0","CERN-OHL-S-2.0","CERN-OHL-W-2.0","CFITSIO","CMU-Mach","CMU-Mach-nodoc","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","COIL-1.0","CPAL-1.0","CPL-1.0","CPOL-1.02","CUA-OPL-1.0","Caldera","Caldera-no-preamble","Catharon","ClArtistic","Clips","Community-Spec-1.0","Condor-1.1","Cornell-Lossless-JPEG","Cronyx","Crossword","CryptoSwift","CrystalStacker","Cube","D-FSL-1.0","DEC-3-Clause","DL-DE-BY-2.0","DL-DE-ZERO-2.0","DOC","DRL-1.0","DRL-1.1","DSDP","DocBook-DTD","DocBook-Schema","DocBook-Stylesheet","DocBook-XML","Dotseqn","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","EPICS","EPL-1.0","EPL-2.0","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Elastic-2.0","Entessa","ErlPL-1.1","Eurosym","FBM","FDK-AAC","FSFAP","FSFAP-no-warranty-disclaimer","FSFUL","FSFULLR","FSFULLRSD","FSFULLRWD","FSL-1.1-ALv2","FSL-1.1-MIT","FTL","Fair","Ferguson-Twofish","Frameworx-1.0","FreeBSD-DOC","FreeImage","Furuseth","GCR-docs","GD","GFDL-1.1-invariants-only","GFDL-1.1-invariants-or-later","GFDL-1.1-no-invariants-only","GFDL-1.1-no-invariants-or-later","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-invariants-only","GFDL-1.2-invariants-or-later","GFDL-1.2-no-invariants-only","GFDL-1.2-no-invariants-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-invariants-only","GFDL-1.3-invariants-or-later","GFDL-1.3-no-invariants-only","GFDL-1.3-no-invariants-or-later","GFDL-1.3-only","GFDL-1.3-or-later","GL2PS","GLWTPL","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","Game-Programming-Gems","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","HDF5","HIDAPI","HP-1986","HP-1989","HPND","HPND-DEC","HPND-Fenneberg-Livingston","HPND-INRIA-IMAG","HPND-Intel","HPND-Kevlin-Henney","HPND-MIT-disclaimer","HPND-Markus-Kuhn","HPND-Netrek","HPND-Pbmplus","HPND-UC","HPND-UC-export-US","HPND-doc","HPND-doc-sell","HPND-export-US","HPND-export-US-acknowledgement","HPND-export-US-modify","HPND-export2-US","HPND-merchantability-variant","HPND-sell-MIT-disclaimer-xserver","HPND-sell-regexpr","HPND-sell-variant","HPND-sell-variant-MIT-disclaimer","HPND-sell-variant-MIT-disclaimer-rev","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IEC-Code-Components-EULA","IJG","IJG-short","IPA","IPL-1.0","ISC","ISC-Veillard","ImageMagick","Imlib2","Info-ZIP","Inner-Net-2.0","InnoSetup","Intel","Intel-ACPI","Interbase-1.0","JPL-image","JPNIC","JSON","Jam","JasPer-2.0","Kastrup","Kazlib","Knuth-CTAN","LAL-1.2","LAL-1.3","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","LOOP","LPD-document","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","LZMA-SDK-9.11-to-9.20","LZMA-SDK-9.22","Latex2e","Latex2e-translated-notice","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-1-para","Linux-man-pages-copyleft","Linux-man-pages-copyleft-2-para","Linux-man-pages-copyleft-var","Lucida-Bitmap-Fonts","MIPS","MIT","MIT-0","MIT-CMU","MIT-Click","MIT-Festival","MIT-Khronos-old","MIT-Modern-Variant","MIT-Wu","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MIT-testregex","MITNFA","MMIXware","MPEG-SSG","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-LPL","MS-PL","MS-RL","MTLL","Mackerras-3-Clause","Mackerras-3-Clause-acknowledgment","MakeIndex","Martin-Birgmeier","McPhee-slideshow","Minpack","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCBI-PD","NCGL-UK-2.0","NCL","NCSA","NGPL","NICTA-1.0","NIST-PD","NIST-PD-fallback","NIST-Software","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTIA-PD","NTP","NTP-0","Naumen","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OAR","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","OFFIS","OFL-1.0","OFL-1.0-RFN","OFL-1.0-no-RFN","OFL-1.1","OFL-1.1-RFN","OFL-1.1-no-RFN","OGC-1.0","OGDL-Taiwan-1.0","OGL-Canada-2.0","OGL-UK-1.0","OGL-UK-2.0","OGL-UK-3.0","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OLFL-1.3","OML","OPL-1.0","OPL-UK-3.0","OPUBL-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OpenPBS-2.3","OpenSSL","OpenSSL-standalone","OpenVision","PADL","PDDL-1.0","PHP-3.0","PHP-3.01","PPL","PSF-2.0","Parity-6.0.0","Parity-7.0.0","Pixar","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","Python-2.0.1","QPL-1.0","QPL-1.0-INRIA-2004","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","Ruby-pty","SAX-PD","SAX-PD-2.0","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SGI-OpenGL","SGP4","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SL","SMAIL-GPL","SMLNJ","SMPPL","SNIA","SOFA","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-1.0","SUL-1.0","SWL","Saxpath","SchemeReport","Sendmail","Sendmail-8.23","Sendmail-Open-Source-1.1","SimPL-2.0","Sleepycat","Soundex","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","Sun-PPP","Sun-PPP-2000","SunPro","Symlinks","TAPR-OHL-1.0","TCL","TCP-wrappers","TGPPL-1.0","TMate","TORQUE-1.1","TOSL","TPDL","TPL-1.0","TTWL","TTYP0","TU-Berlin-1.0","TU-Berlin-2.0","TermReadKey","ThirdEye","TrustedQSL","UCAR","UCL-1.0","UMich-Merit","UPL-1.0","URT-RLE","Ubuntu-font-1.0","Unicode-3.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","UnixCrypt","Unlicense","Unlicense-libtelnet","Unlicense-libwhirlpool","VOSTROM","VSL-1.0","Vim","W3C","W3C-19980720","W3C-20150513","WTFPL","Watcom-1.0","Widget-Workshop","Wsuipa","X11","X11-distribute-modifications-variant","X11-swapped","XFree86-1.1","XSkat","Xdebug-1.03","Xerox","Xfig","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zeeff","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","any-OSI","any-OSI-perl-modules","bcrypt-Solar-Designer","blessing","bzip2-1.0.6","check-cvs","checkmk","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","cve-tou","diffmark","dtoa","dvipdfm","eGenix","etalab-2.0","fwlw","gSOAP-1.3b","generic-xts","gnuplot","gtkbook","hdparm","iMatix","jove","libpng-1.6.35","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","man2html","metamail","mpi-permissive","mpich2","mplus","ngrep","pkgconf","pnmstitch","psfrag","psutils","python-ldap","radvd","snprintf","softSurfer","ssh-keyscan","swrule","threeparttable","ulem","w3m","wwl","xinetd","xkeyboard-config-Zinoviev","xlock","xpp","xzoom","zlib-acknowledgement"]}),LP=K((e,t)=>{t.exports=["AGPL-1.0","AGPL-3.0","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-2.0-with-GCC-exception","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-3.0","GPL-3.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","LGPL-2.0","LGPL-2.1","LGPL-3.0","Net-SNMP","Nunit","StandardML-NJ","bzip2-1.0.5","eCos-2.0","wxWindows"]}),DP=K((e,t)=>{t.exports=["389-exception","Asterisk-exception","Autoconf-exception-2.0","Autoconf-exception-3.0","Autoconf-exception-generic","Autoconf-exception-generic-3.0","Autoconf-exception-macro","Bison-exception-1.24","Bison-exception-2.2","Bootloader-exception","Classpath-exception-2.0","CLISP-exception-2.0","cryptsetup-OpenSSL-exception","DigiRule-FOSS-exception","eCos-exception-2.0","Fawkes-Runtime-exception","FLTK-exception","fmt-exception","Font-exception-2.0","freertos-exception-2.0","GCC-exception-2.0","GCC-exception-2.0-note","GCC-exception-3.1","Gmsh-exception","GNAT-exception","GNOME-examples-exception","GNU-compiler-exception","gnu-javamail-exception","GPL-3.0-interface-exception","GPL-3.0-linking-exception","GPL-3.0-linking-source-exception","GPL-CC-1.0","GStreamer-exception-2005","GStreamer-exception-2008","i2p-gpl-java-exception","KiCad-libraries-exception","LGPL-3.0-linking-exception","libpri-OpenH323-exception","Libtool-exception","Linux-syscall-note","LLGPL","LLVM-exception","LZMA-exception","mif-exception","OCaml-LGPL-linking-exception","OCCT-exception-1.0","OpenJDK-assembly-exception-1.0","openvpn-openssl-exception","PS-or-PDF-font-exception-20170817","QPL-1.0-INRIA-2004-exception","Qt-GPL-exception-1.0","Qt-LGPL-exception-1.1","Qwt-exception-1.0","SANE-exception","SHL-2.0","SHL-2.1","stunnel-exception","SWI-exception","Swift-exception","Texinfo-exception","u-boot-exception-2.0","UBDL-exception","Universal-FOSS-exception-1.0","vsftpd-openssl-exception","WxWindows-exception-3.1","x11vnc-openssl-exception"]}),$P=K((e,t)=>{"use strict";var s=[].concat(vf()).concat(LP()),u=DP();t.exports=function(i){var a=0;function c(){return a<i.length}v(c,"hasMore");function r(S){if(S instanceof RegExp){var E=i.slice(a),b=E.match(S);if(b)return a+=b[0].length,b[0]}else if(i.indexOf(S,a)===a)return a+=S.length,S}v(r,"read");function n(){r(/[ ]*/)}v(n,"skipWhitespace");function o(){for(var S,E=["WITH","AND","OR","(",")",":","+"],b=0;b<E.length&&(S=r(E[b]),!S);b++);if(S==="+"&&a>1&&i[a-2]===" ")throw new Error("Space before `+`");return S&&{type:"OPERATOR",string:S}}v(o,"operator");function l(){return r(/[A-Za-z0-9-.]+/)}v(l,"idstring");function h(){var S=l();if(!S)throw new Error("Expected idstring at offset "+a);return S}v(h,"expectIdstring");function p(){if(r("DocumentRef-")){var S=h();return{type:"DOCUMENTREF",string:S}}}v(p,"documentRef");function d(){if(r("LicenseRef-")){var S=h();return{type:"LICENSEREF",string:S}}}v(d,"licenseRef");function g(){var S=a,E=l();if(s.indexOf(E)!==-1)return{type:"LICENSE",string:E};if(u.indexOf(E)!==-1)return{type:"EXCEPTION",string:E};a=S}v(g,"identifier");function m(){return o()||p()||d()||g()}v(m,"parseToken");for(var f=[];c()&&(n(),!!c());){var y=m();if(!y)throw new Error("Unexpected `"+i[a]+"` at offset "+a);f.push(y)}return f}}),MP=K((e,t)=>{"use strict";t.exports=function(s){var u=0;function i(){return u<s.length}v(i,"hasMore");function a(){return i()?s[u]:null}v(a,"token");function c(){if(!i())throw new Error;u++}v(c,"next");function r(y){var S=a();if(S&&S.type==="OPERATOR"&&y===S.string)return c(),S.string}v(r,"parseOperator");function n(){if(r("WITH")){var y=a();if(y&&y.type==="EXCEPTION")return c(),y.string;throw new Error("Expected exception after `WITH`")}}v(n,"parseWith");function o(){var y=u,S="",E=a();if(E.type==="DOCUMENTREF"&&(c(),S+="DocumentRef-"+E.string+":",!r(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(E=a(),E.type==="LICENSEREF")return c(),S+="LicenseRef-"+E.string,{license:S};u=y}v(o,"parseLicenseRef");function l(){var y=a();if(y&&y.type==="LICENSE"){c();var S={license:y.string};r("+")&&(S.plus=!0);var E=n();return E&&(S.exception=E),S}}v(l,"parseLicense");function h(){var y=r("(");if(y){var S=m();if(!r(")"))throw new Error("Expected `)`");return S}}v(h,"parseParenthesizedExpression");function p(){return h()||o()||l()}v(p,"parseAtom");function d(y,S){return v(function E(){var b=S();if(b){if(!r(y))return b;var _=E();if(!_)throw new Error("Expected expression");return{left:b,conjunction:y.toLowerCase(),right:_}}},"parseBinaryOp")}v(d,"makeBinaryOpParser");var g=d("AND",p),m=d("OR",g),f=m();if(!f||i())throw new Error("Syntax error");return f}}),Sf=K((e,t)=>{"use strict";var s=$P(),u=MP();t.exports=function(i){return u(s(i))}}),jP=K((e,t)=>{var s=Sf(),u=vf();function i(E){try{return s(E),!0}catch{return!1}}v(i,"valid");function a(E,b){var _=b[0].length-E[0].length;return _!==0?_:E[0].toUpperCase().localeCompare(b[0].toUpperCase())}v(a,"sortTranspositions");var c=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(a),r=0,n=1,o=[function(E){return E.toUpperCase()},function(E){return E.trim()},function(E){return E.replace(/\./g,"")},function(E){return E.replace(/\s+/g,"")},function(E){return E.replace(/\s+/g,"-")},function(E){return E.replace("v","-")},function(E){return E.replace(/,?\s*(\d)/,"-$1")},function(E){return E.replace(/,?\s*(\d)/,"-$1.0")},function(E){return E.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(E){return E.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(E){return E[0].toUpperCase()+E.slice(1)},function(E){return E.replace("/","-")},function(E){return E.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(E){return E.indexOf("3.0")!==-1?E+"-or-later":E+"-only"},function(E){return E+"only"},function(E){return E.replace(/(\d)$/,"-$1.0")},function(E){return E.replace(/(-| )?(\d)$/,"-$2-Clause")},function(E){return E.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(E){return E.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(E){return E.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(E){return E.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(E){return E.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(E){return E.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(E){return"CC-"+E},function(E){return"CC-"+E+"-4.0"},function(E){return E.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(E){return"CC-"+E.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],l=u.map(function(E){var b=/^(.*)-\d+\.\d+$/.exec(E);return b?[b[0],b[1]]:[E,null]}).reduce(function(E,b){var _=b[1];return E[_]=E[_]||[],E[_].push(b[0]),E},{}),h=Object.keys(l).map(v(function(E){return[E,l[E]]},"makeEntries")).filter(v(function(E){return E[1].length===1&&E[0]!==null&&E[0]!=="APL"},"identifySoleVersions")).map(v(function(E){return[E[0],E[1][0]]},"createLastResorts"));l=void 0;var p=[["UNLI","Unlicense"],["WTF","WTFPL"],["2 CLAUSE","BSD-2-Clause"],["2-CLAUSE","BSD-2-Clause"],["3 CLAUSE","BSD-3-Clause"],["3-CLAUSE","BSD-3-Clause"],["AFFERO","AGPL-3.0-or-later"],["AGPL","AGPL-3.0-or-later"],["APACHE","Apache-2.0"],["ARTISTIC","Artistic-2.0"],["Affero","AGPL-3.0-or-later"],["BEER","Beerware"],["BOOST","BSL-1.0"],["BSD","BSD-2-Clause"],["CDDL","CDDL-1.1"],["ECLIPSE","EPL-1.0"],["FUCK","WTFPL"],["GNU","GPL-3.0-or-later"],["LGPL","LGPL-3.0-or-later"],["GPLV1","GPL-1.0-only"],["GPL-1","GPL-1.0-only"],["GPLV2","GPL-2.0-only"],["GPL-2","GPL-2.0-only"],["GPL","GPL-3.0-or-later"],["MIT +NO-FALSE-ATTRIBS","MITNFA"],["MIT","MIT"],["MPL","MPL-2.0"],["X11","X11"],["ZLIB","Zlib"]].concat(h).sort(a),d=0,g=1,m=v(function(E){for(var b=0;b<o.length;b++){var _=o[b](E).trim();if(_!==E&&i(_))return _}return null},"validTransformation"),f=v(function(E){for(var b=E.toUpperCase(),_=0;_<p.length;_++){var O=p[_];if(b.indexOf(O[d])>-1)return O[g]}return null},"validLastResort"),y=v(function(E,b){for(var _=0;_<c.length;_++){var O=c[_],w=O[r];if(E.indexOf(w)>-1){var A=E.replace(w,O[n]),I=b(A);if(I!==null)return I}}return null},"anyCorrection");t.exports=function(E,b){b=b||{};var _=b.upgrade===void 0?!0:!!b.upgrade;function O(P){return _?S(P):P}v(O,"postprocess");var w=typeof E=="string"&&E.trim().length!==0;if(!w)throw Error("Invalid argument. Expected non-empty string.");if(E=E.trim(),i(E))return O(E);var A=E.replace(/\+$/,"").trim();if(i(A))return O(A);var I=m(E);return I!==null||(I=y(E,function(P){return i(P)?P:m(P)}),I!==null)||(I=f(E),I!==null)||(I=y(E,f),I!==null)?O(I):null};function S(E){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(E)!==-1?E+"-only":["GPL-1.0+","GPL-2.0+","GPL-3.0+","LGPL-2.0+","LGPL-2.1+","LGPL-3.0+","AGPL-1.0+","AGPL-3.0+"].indexOf(E)!==-1?E.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(E)!==-1?E+"-or-later":E}v(S,"upgradeGPLs")}),BP=K((e,t)=>{var s=Sf(),u=jP(),i='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',a=/^SEE LICEN[CS]E IN (.+)$/;function c(n,o){return o.slice(0,n.length)===n}v(c,"startsWith");function r(n){if(n.hasOwnProperty("license")){var o=n.license;return c("LicenseRef",o)||c("DocumentRef",o)}else return r(n.left)||r(n.right)}v(r,"usesLicenseRef"),t.exports=function(n){var o;try{o=s(n)}catch{var l;if(n==="UNLICENSED"||n==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(l=a.exec(n))return{validForOldPackages:!0,validForNewPackages:!0,inFile:l[1]};var h={validForOldPackages:!1,validForNewPackages:!1,warnings:[i]};if(n.trim().length!==0){var p=u(n);p&&h.warnings.push('license is similar to the valid expression "'+p+'"')}return h}return r(o)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[i]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}}}),UP=K((e,t)=>{var{URL:s}=require("url"),u=Sl(),i=BP(),a={dependancies:"dependencies",dependecies:"dependencies",depdenencies:"dependencies",devEependencies:"devDependencies",depends:"dependencies","dev-dependencies":"devDependencies",devDependences:"devDependencies",devDepenencies:"devDependencies",devdependencies:"devDependencies",repostitory:"repository",repo:"repository",prefereGlobal:"preferGlobal",hompage:"homepage",hampage:"homepage",autohr:"author",autor:"author",contributers:"contributors",publicationConfig:"publishConfig",script:"scripts"},c=v(l=>l.includes("@")&&l.indexOf("@")<l.lastIndexOf("."),"isEmail");function r(l){let h=l.trim().split(`
|
|
25
|
+
`),p=0;for(;h[p]?.trim().match(/^(#|$)/);)p++;let d=p+1;for(;d<h.length&&h[d].trim();)d++;return h.slice(p,d).join(" ").trim()}v(r,"extractDescription");function n(l){if(typeof l!="string"){let m=l.name||"",f=l.url||l.web,y=f?" ("+f+")":"",S=l.email||l.mail,E=S?" <"+S+">":"";l=m+E+y}let h=l.match(/^([^(<]+)/),p=l.match(/\(([^()]+)\)/),d=l.match(/<([^<>]+)>/),g={};return h?.[0].trim()&&(g.name=h[0].trim()),d&&(g.email=d[1]),p&&(g.url=p[1]),g}v(n,"stringifyPerson");function o(l,h){l.description&&typeof l.description!="string"&&(h?.push("'description' field should be a string"),delete l.description),l.readme&&!l.description&&l.readme!=="ERROR: No README data found!"&&(l.description=r(l.readme)),l.description===void 0&&delete l.description,l.description||h?.push("No description"),l.modules&&(h?.push("modules field is deprecated"),delete l.modules);let p=l.files;if(p&&!Array.isArray(p)?(h?.push("Invalid 'files' member"),delete l.files):l.files&&(l.files=l.files.filter(function(f){return!f||typeof f!="string"?(h?.push(`Invalid filename in 'files' list: ${f}`),!1):!0})),l.man&&typeof l.man=="string"&&(l.man=[l.man]),!l.bugs&&l.repository?.url){let f=u.fromUrl(l.repository.url);f&&f.bugs()&&(l.bugs={url:f.bugs()})}else if(l.bugs){if(typeof l.bugs=="string")c(l.bugs)?l.bugs={email:l.bugs}:s.canParse(l.bugs)?l.bugs={url:l.bugs}:h?.push("Bug string field must be url, email, or {email,url}");else{for(let y in l.bugs)["web","name"].includes(y)&&(h?.push(`bugs['${y}'] should probably be bugs['url'].`),l.bugs.url=l.bugs[y],delete l.bugs[y]);let f=l.bugs;l.bugs={},f.url&&(s.canParse(f.url)?l.bugs.url=f.url:h?.push("bugs.url field must be a string url. Deleted.")),f.email&&(typeof f.email=="string"&&c(f.email)?l.bugs.email=f.email:h?.push("bugs.email field must be a string email. Deleted."))}!l.bugs.email&&!l.bugs.url&&(delete l.bugs,h?.push("Normalized value of bugs field is an empty object. Deleted."))}typeof l.keywords=="string"&&(l.keywords=l.keywords.split(/,\s+/)),l.keywords&&!Array.isArray(l.keywords)?(delete l.keywords,h?.push("keywords should be an array of strings")):l.keywords&&(l.keywords=l.keywords.filter(function(f){return typeof f!="string"||!f?(h?.push("keywords should be an array of strings"),!1):!0}));let d="bundledDependencies",g="bundleDependencies";if(l[d]&&!l[g]&&(l[g]=l[d],delete l[d]),l[g]&&!Array.isArray(l[g])?(h?.push("Invalid 'bundleDependencies' list. Must be array of package names"),delete l[g]):l[g]&&(l[g]=l[g].filter(function(f){return!f||typeof f!="string"?(h?.push(`Invalid bundleDependencies member: ${f}`),!1):(l.dependencies||(l.dependencies={}),Object.prototype.hasOwnProperty.call(l.dependencies,f)||(h?.push(`Non-dependency in bundleDependencies: ${f}`),l.dependencies[f]="*"),!0)})),!l.homepage&&l.repository&&l.repository.url){let f=u.fromUrl(l.repository.url);f&&(l.homepage=f.docs())}l.homepage&&(typeof l.homepage!="string"?(h?.push("homepage field must be a string url. Deleted."),delete l.homepage):s.canParse(l.homepage)||(l.homepage="http://"+l.homepage)),l.readme||(h?.push("No README data"),l.readme="ERROR: No README data found!");let m=l.license||l.licence;m?typeof m!="string"||m.length<1||m.trim()===""?h?.push("license should be a valid SPDX license expression"):i(m).validForNewPackages||h?.push("license should be a valid SPDX license expression"):h?.push("No license field."),l.author&&(l.author=n(l.author)),["maintainers","contributors"].forEach(function(f){Array.isArray(l[f])&&(l[f]=l[f].map(n))});for(let f in a)Object.prototype.hasOwnProperty.call(l,f)&&h?.push(`${f} should probably be ${a[f]}.`)}v(o,"normalizeData"),t.exports={normalizeData:o}}),FP=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=void 0;var t=require("fs"),s=require("internal/fs/promises"),u=v(async(r,n={})=>{let{ignoreErrors:o=!1}=n;try{return a(await(0,s.stat)(r),n)}catch(l){let h=l;if(o||h.code==="EACCES")return!1;throw h}},"isexe");e.isexe=u;var i=v((r,n={})=>{let{ignoreErrors:o=!1}=n;try{return a((0,t.statSync)(r),n)}catch(l){let h=l;if(o||h.code==="EACCES")return!1;throw h}},"sync");e.sync=i;var a=v((r,n)=>r.isFile()&&c(r,n),"checkStat"),c=v((r,n)=>{let o=n.uid??process.getuid?.(),l=n.groups??process.getgroups?.()??[],h=n.gid??process.getgid?.()??l[0];if(o===void 0||h===void 0)throw new Error("cannot get uid or gid");let p=new Set([h,...l]),d=r.mode,g=r.uid,m=r.gid,f=parseInt("100",8),y=parseInt("010",8),S=parseInt("001",8),E=f|y;return!!(d&S||d&y&&p.has(m)||d&f&&g===o||d&E&&o===0)},"checkMode")}),HP=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=void 0;var t=require("fs"),s=require("internal/fs/promises"),u=v(async(r,n={})=>{let{ignoreErrors:o=!1}=n;try{return c(await(0,s.stat)(r),r,n)}catch(l){let h=l;if(o||h.code==="EACCES")return!1;throw h}},"isexe");e.isexe=u;var i=v((r,n={})=>{let{ignoreErrors:o=!1}=n;try{return c((0,t.statSync)(r),r,n)}catch(l){let h=l;if(o||h.code==="EACCES")return!1;throw h}},"sync");e.sync=i;var a=v((r,n)=>{let{pathExt:o=process.env.PATHEXT||""}=n,l=o.split(";");if(l.indexOf("")!==-1)return!0;for(let h=0;h<l.length;h++){let p=l[h].toLowerCase(),d=r.substring(r.length-p.length).toLowerCase();if(p&&d===p)return!0}return!1},"checkPathExt"),c=v((r,n,o)=>r.isFile()&&a(n,o),"checkStat")}),GP=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),VP=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(o,l,h,p){p===void 0&&(p=h);var d=Object.getOwnPropertyDescriptor(l,h);(!d||("get"in d?!l.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:v(function(){return l[h]},"get")}),Object.defineProperty(o,p,d)}:function(o,l,h,p){p===void 0&&(p=h),o[p]=l[h]}),s=e&&e.__setModuleDefault||(Object.create?function(o,l){Object.defineProperty(o,"default",{enumerable:!0,value:l})}:function(o,l){o.default=l}),u=e&&e.__importStar||function(o){if(o&&o.__esModule)return o;var l={};if(o!=null)for(var h in o)h!=="default"&&Object.prototype.hasOwnProperty.call(o,h)&&t(l,o,h);return s(l,o),l},i=e&&e.__exportStar||function(o,l){for(var h in o)h!=="default"&&!Object.prototype.hasOwnProperty.call(l,h)&&t(l,o,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=e.posix=e.win32=void 0;var a=u(FP());e.posix=a;var c=u(HP());e.win32=c,i(GP(),e);var r=process.env._ISEXE_TEST_PLATFORM_||process.platform,n=r==="win32"?c:a;e.isexe=n.isexe,e.sync=n.sync}),Ef=K((e,t)=>{var{isexe:s,sync:u}=VP(),{join:i,delimiter:a,sep:c,posix:r}=require("path"),n=process.platform==="win32",o=new RegExp(`[${r.sep}${c===r.sep?"":c}]`.replace(/(\\)/g,"\\$1")),l=new RegExp(`^\\.${o.source}`),h=v(f=>Object.assign(new Error(`not found: ${f}`),{code:"ENOENT"}),"getNotFoundError"),p=v((f,{path:y=process.env.PATH,pathExt:S=process.env.PATHEXT,delimiter:E=a})=>{let b=f.match(o)?[""]:[...n?[process.cwd()]:[],...(y||"").split(E)];if(n){let _=S||[".EXE",".CMD",".BAT",".COM"].join(E),O=_.split(E).flatMap(w=>[w,w.toLowerCase()]);return f.includes(".")&&O[0]!==""&&O.unshift(""),{pathEnv:b,pathExt:O,pathExtExe:_}}return{pathEnv:b,pathExt:[""]}},"getPathInfo"),d=v((f,y)=>{let S=/^".*"$/.test(f)?f.slice(1,-1):f;return(!S&&l.test(y)?y.slice(0,2):"")+i(S,y)},"getPathPart"),g=v(async(f,y={})=>{let{pathEnv:S,pathExt:E,pathExtExe:b}=p(f,y),_=[];for(let O of S){let w=d(O,f);for(let A of E){let I=w+A;if(await s(I,{pathExt:b,ignoreErrors:!0})){if(!y.all)return I;_.push(I)}}}if(y.all&&_.length)return _;if(y.nothrow)return null;throw h(f)},"which"),m=v((f,y={})=>{let{pathEnv:S,pathExt:E,pathExtExe:b}=p(f,y),_=[];for(let O of S){let w=d(O,f);for(let A of E){let I=w+A;if(u(I,{pathExt:b,ignoreErrors:!0})){if(!y.all)return I;_.push(I)}}}if(y.all&&_.length)return _;if(y.nothrow)return null;throw h(f)},"whichSync");t.exports=g,g.sync=m}),WP=K((e,t)=>{"use strict";var s=v((i,a)=>{if(!i.length)return'""';let c;if(!/[ \t\n\v"]/.test(i))c=i;else{c='"';for(let r=0;r<=i.length;++r){let n=0;for(;i[r]==="\\";)++r,++n;if(r===i.length){c+="\\".repeat(n*2);break}i[r]==='"'?(c+="\\".repeat(n*2+1),c+=i[r]):(c+="\\".repeat(n),c+=i[r])}c+='"'}return c=c.replace(/[ !%^&()<>|"]/g,"^$&"),a&&(c=c.replace(/[ !%^&()<>|"]/g,"^$&")),c},"cmd"),u=v(i=>i.length?/[\t\n\r "#$&'()*;<>?\\`|~]/.test(i)?`'${i.replace(/'/g,"'\\''")}'`.replace(/^(?:'')+(?!$)/,"").replace(/\\'''/g,"\\'"):i:"''","sh");t.exports={cmd:s,sh:u}}),El=K((e,t)=>{"use strict";var{spawn:s}=require("internal/child_process"),u=require("os"),i=Ef(),a=WP(),c=v((p,d,g={},m={})=>{if(g.shell)return r(p,d,g,m);let f,y,S=new Promise((I,P)=>{f=I,y=P}),E=new Error("command failed"),b=[],_=[],O=v(I=>({cmd:p,args:d,...I,...l(b,_,g),...m}),"getResult"),w=v((I,P)=>{let L=O(P);y(Object.assign(I,L))},"rejectWithOpts"),A=s(p,d,g);return S.stdin=A.stdin,S.process=A,A.on("error",w),A.stdout&&(A.stdout.on("data",I=>b.push(I)),A.stdout.on("error",w)),A.stderr&&(A.stderr.on("data",I=>_.push(I)),A.stderr.on("error",w)),A.on("close",(I,P)=>{I||P?w(E,{code:I,signal:P}):f(O({code:I,signal:P}))}),S},"promiseSpawn"),r=v((p,d,g,m)=>{let f=g.shell;f===!0&&(f=process.platform==="win32"?process.env.ComSpec||"cmd.exe":"sh");let y={...g,shell:!1},S=[],E=p;if(/(?:^|\\)cmd(?:\.exe)?$/i.test(f)){let b=!1,_="",O=!1;for(let A=0;A<p.length;++A){let I=p.charAt(A);if(I===" "&&!O)break;_+=I,(I==='"'||I==="'")&&(O=!O)}let w;try{w=i.sync(_,{path:y.env&&h(y.env,"PATH")||process.env.PATH,pathext:y.env&&h(y.env,"PATHEXT")||process.env.PATHEXT}).toLowerCase()}catch{w=_.toLowerCase()}b=w.endsWith(".cmd")||w.endsWith(".bat");for(let A of d)E+=` ${a.cmd(A,b)}`;S.push("/d","/s","/c",E),y.windowsVerbatimArguments=!0}else{for(let b of d)E+=` ${a.sh(b)}`;S.push("-c",E)}return c(f,S,y,m)},"spawnWithShell"),n=v((p,d={},g={})=>{let m={...d,shell:!0},f=[].concat(p),y=process.platform;if(y==="linux"&&u.release().toLowerCase().includes("microsoft")&&(y="wsl",!process.env.BROWSER))return Promise.reject(new Error("Set the BROWSER environment variable to your desired browser."));let S=m.command;return S||(y==="win32"?(m.shell=process.env.ComSpec,S='start ""'):y==="wsl"?S="sensible-browser":y==="darwin"?S="open":S="xdg-open"),r(S,f,m,g)},"open");c.open=n;var o=v((p="pipe",d)=>p==="pipe"||p===null?!0:Array.isArray(p)?o(p[d],d):!1,"isPipe"),l=v((p,d,{stdioString:g=!0,stdio:m})=>{let f={stdout:null,stderr:null};return o(m,1)&&(f.stdout=Buffer.concat(p),g&&(f.stdout=f.stdout.toString().trim())),o(m,2)&&(f.stderr=Buffer.concat(d),g&&(f.stderr=f.stderr.toString().trim())),f},"stdioResult"),h=v((p,d)=>{d=d.toLowerCase();for(let g of Object.keys(p).sort())if(g.toLowerCase()===d)return p[g]},"findInObject");t.exports=c}),zP=K((e,t)=>{"use strict";function s(i,a){for(let c in a)Object.defineProperty(i,c,{value:a[c],enumerable:!0,configurable:!0});return i}v(s,"assign");function u(i,a,c){if(!i||typeof i=="string")throw new TypeError("Please pass an Error to err-code");c||(c={}),typeof a=="object"&&(c=a,a=void 0),a!=null&&(c.code=a);try{return s(i,c)}catch{c.message=i.message,c.stack=i.stack;let r=v(function(){},"ErrClass");return r.prototype=Object.create(Object.getPrototypeOf(i)),s(new r,c)}}v(u,"createError"),t.exports=u}),qP=K((e,t)=>{function s(u,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(u)),this._timeouts=u,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}v(s,"RetryOperation"),t.exports=s,s.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts},s.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null},s.prototype.retry=function(u){if(this._timeout&&clearTimeout(this._timeout),!u)return!1;var i=new Date().getTime();if(u&&i-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(u);var a=this._timeouts.shift();if(a===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),a=this._timeouts.shift();else return!1;var c=this,r=setTimeout(function(){c._attempts++,c._operationTimeoutCb&&(c._timeout=setTimeout(function(){c._operationTimeoutCb(c._attempts)},c._operationTimeout),c._options.unref&&c._timeout.unref()),c._fn(c._attempts)},a);return this._options.unref&&r.unref(),!0},s.prototype.attempt=function(u,i){this._fn=u,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var a=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){a._operationTimeoutCb()},a._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},s.prototype.try=function(u){this.attempt(u)},s.prototype.start=function(u){this.attempt(u)},s.prototype.start=s.prototype.try,s.prototype.errors=function(){return this._errors},s.prototype.attempts=function(){return this._attempts},s.prototype.mainError=function(){if(this._errors.length===0)return null;for(var u={},i=null,a=0,c=0;c<this._errors.length;c++){var r=this._errors[c],n=r.message,o=(u[n]||0)+1;u[n]=o,o>=a&&(i=r,a=o)}return i}}),KP=K(e=>{var t=qP();e.operation=function(s){var u=e.timeouts(s);return new t(u,{forever:s&&s.forever,unref:s&&s.unref,maxRetryTime:s&&s.maxRetryTime})},e.timeouts=function(s){if(s instanceof Array)return[].concat(s);var u={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in s)u[i]=s[i];if(u.minTimeout>u.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var a=[],c=0;c<u.retries;c++)a.push(this.createTimeout(c,u));return s&&s.forever&&!a.length&&a.push(this.createTimeout(c,u)),a.sort(function(r,n){return r-n}),a},e.createTimeout=function(s,u){var i=u.randomize?Math.random()+1:1,a=Math.round(i*u.minTimeout*Math.pow(u.factor,s));return a=Math.min(a,u.maxTimeout),a},e.wrap=function(s,u,i){if(u instanceof Array&&(i=u,u=null),!i){i=[];for(var a in s)typeof s[a]=="function"&&i.push(a)}for(var c=0;c<i.length;c++){var r=i[c],n=s[r];s[r]=v(function(o){var l=e.operation(u),h=Array.prototype.slice.call(arguments,1),p=h.pop();h.push(function(d){l.retry(d)||(d&&(arguments[0]=l.mainError()),p.apply(this,arguments))}),l.attempt(function(){o.apply(s,h)})},"retryWrapper").bind(s,n),s[r].options=u}}}),JP=K((e,t)=>{t.exports=KP()}),Mi=K((e,t)=>{"use strict";var s=zP(),u=JP(),i=Object.prototype.hasOwnProperty;function a(r){return r&&r.code==="EPROMISERETRY"&&i.call(r,"retried")}v(a,"isRetryError");function c(r,n){var o,l;return typeof r=="object"&&typeof n=="function"&&(o=n,n=r,r=o),l=u.operation(n),new Promise(function(h,p){l.attempt(function(d){Promise.resolve().then(function(){return r(function(g){throw a(g)&&(g=g.retried),s(new Error("Retrying"),"EPROMISERETRY",{retried:g})},d)}).then(h,function(g){a(g)&&(g=g.retried,l.retry(g||new Error))||p(g)})})})}v(c,"promiseRetry"),t.exports=c}),bf=K((e,t)=>{var s=class extends Error{static{v(this,"GitError")}shouldRetry(){return!1}},u=class extends s{static{v(this,"GitConnectionError")}constructor(){super("A git connection error occurred")}shouldRetry(c){return c<3}},i=class extends s{static{v(this,"GitPathspecError")}constructor(){super("The git reference could not be found")}},a=class extends s{static{v(this,"GitUnknownError")}constructor(){super("An unknown git error occurred")}};t.exports={GitConnectionError:u,GitPathspecError:i,GitUnknownError:a}}),ZP=K((e,t)=>{var{GitConnectionError:s,GitPathspecError:u,GitUnknownError:i}=bf(),a=new RegExp(["remote error: Internal Server Error","The remote end hung up unexpectedly","Connection timed out","Operation timed out","Failed to connect to .* Timed out","Connection reset by peer","SSL_ERROR_SYSCALL","The requested URL returned error: 503"].join("|")),c=/pathspec .* did not match any file\(s\) known to git/;function r(n){let o=n.stderr,l;return a.test(o)?l=new s(o):c.test(o)?l=new u(o):l=new i(o),Object.assign(l,n)}v(r,"makeError"),t.exports=r}),XP=K((e,t)=>{var{hasOwnProperty:s}=Object.prototype,u=v((o,l={})=>{typeof l=="string"&&(l={section:l}),l.align=l.align===!0,l.newline=l.newline===!0,l.sort=l.sort===!0,l.whitespace=l.whitespace===!0||l.align===!0,l.platform=l.platform||typeof process<"u"&&process.platform,l.bracketedArray=l.bracketedArray!==!1;let h=l.platform==="win32"?`\r
|
|
26
|
+
`:`
|
|
27
|
+
`,p=l.whitespace?" = ":"=",d=[],g=l.sort?Object.keys(o).sort():Object.keys(o),m=0;l.align&&(m=r(g.filter(S=>o[S]===null||Array.isArray(o[S])||typeof o[S]!="object").map(S=>Array.isArray(o[S])?`${S}[]`:S).concat([""]).reduce((S,E)=>r(S).length>=r(E).length?S:E)).length);let f="",y=l.bracketedArray?"[]":"";for(let S of g){let E=o[S];if(E&&Array.isArray(E))for(let b of E)f+=r(`${S}${y}`).padEnd(m," ")+p+r(b)+h;else E&&typeof E=="object"?d.push(S):f+=r(S).padEnd(m," ")+p+r(E)+h}l.section&&f.length&&(f="["+r(l.section)+"]"+(l.newline?h+h:h)+f);for(let S of d){let E=i(S,".").join("\\."),b=(l.section?l.section+".":"")+E,_=u(o[S],{...l,section:b});f.length&&_.length&&(f+=h),f+=_}return f},"encode");function i(o,l){var h=0,p=0,d=0,g=[];do if(d=o.indexOf(l,h),d!==-1){if(h=d+l.length,d>0&&o[d-1]==="\\")continue;g.push(o.slice(p,d)),p=d+l.length}while(d!==-1);return g.push(o.slice(p)),g}v(i,"splitSections");var a=v((o,l={})=>{l.bracketedArray=l.bracketedArray!==!1;let h=Object.create(null),p=h,d=null,g=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,m=o.split(/[\r\n]+/g),f={};for(let S of m){if(!S||S.match(/^\s*[;#]/)||S.match(/^\s*$/))continue;let E=S.match(g);if(!E)continue;if(E[1]!==void 0){if(d=n(E[1]),d==="__proto__"){p=Object.create(null);continue}p=h[d]=h[d]||Object.create(null);continue}let b=n(E[2]),_;l.bracketedArray?_=b.length>2&&b.slice(-2)==="[]":(f[b]=(f?.[b]||0)+1,_=f[b]>1);let O=_&&b.endsWith("[]")?b.slice(0,-2):b;if(O==="__proto__")continue;let w=E[3]?n(E[4]):!0,A=w==="true"||w==="false"||w==="null"?JSON.parse(w):w;_&&(s.call(p,O)?Array.isArray(p[O])||(p[O]=[p[O]]):p[O]=[]),Array.isArray(p[O])?p[O].push(A):p[O]=A}let y=[];for(let S of Object.keys(h)){if(!s.call(h,S)||typeof h[S]!="object"||Array.isArray(h[S]))continue;let E=i(S,".");p=h;let b=E.pop(),_=b.replace(/\\\./g,".");for(let O of E)O!=="__proto__"&&((!s.call(p,O)||typeof p[O]!="object")&&(p[O]=Object.create(null)),p=p[O]);p===h&&_===b||(p[_]=h[S],y.push(S))}for(let S of y)delete h[S];return h},"decode"),c=v(o=>o.startsWith('"')&&o.endsWith('"')||o.startsWith("'")&&o.endsWith("'"),"isQuoted"),r=v(o=>typeof o!="string"||o.match(/[=\r\n]/)||o.match(/^\[/)||o.length>1&&c(o)||o!==o.trim()?JSON.stringify(o):o.split(";").join("\\;").split("#").join("\\#"),"safe"),n=v(o=>{if(o=(o||"").trim(),c(o)){o.charAt(0)==="'"&&(o=o.slice(1,-1));try{o=JSON.parse(o)}catch{}}else{let l=!1,h="";for(let p=0,d=o.length;p<d;p++){let g=o.charAt(p);if(l)"\\;#".indexOf(g)!==-1?h+=g:h+="\\"+g,l=!1;else{if(";#".indexOf(g)!==-1)break;g==="\\"?l=!0:h+=g}}return l&&(h+="\\"),h.trim()}return o},"unsafe");t.exports={parse:a,decode:a,stringify:u,encode:u,safe:r,unsafe:n}}),YP=K((e,t)=>{var s=require("fs"),u=require("os"),i=require("path"),a=XP(),c=i.join(u.homedir(),".gitconfig"),r=null,n=v(()=>{if(r===null)try{if(r={},s.existsSync(c)){let m=s.readFileSync(c,"utf-8");r=a.parse(m)}}catch{r={}}return r},"loadGitConfig"),o=v(()=>{let m=n();return{sshCommandSetInConfig:m?.core?.sshCommand!==void 0,askPassSetInConfig:m?.core?.askpass!==void 0}},"checkGitConfigs"),l=process.env.GIT_SSH_COMMAND!==void 0,h=process.env.GIT_ASKPASS!==void 0,{sshCommandSetInConfig:p,askPassSetInConfig:d}=o(),g={...h||d?{}:{GIT_ASKPASS:"echo"},...l||p?{}:{GIT_SSH_COMMAND:"ssh -oStrictHostKeyChecking=accept-new"}};t.exports=(m={})=>({stdioString:!0,...m,shell:!1,env:m.env||{...g,...process.env}}),t.exports.loadGitConfig=n}),QP=K((e,t)=>{var s=Ef(),u;try{u=s.sync("git")}catch{}t.exports=(i={})=>i.git?i.git:!u||i.git===!1?Object.assign(new Error("No git binary found in $PATH"),{code:"ENOGIT"}):u}),ji=K((e,t)=>{var s=El(),u=Mi(),{log:i}=ft(),a=ZP(),c=YP();t.exports=(r,n={})=>{let o=QP()(n);if(o instanceof Error)return Promise.reject(o);let l=n.allowReplace||r[0]==="--no-replace-objects"?r:["--no-replace-objects",...r],h=n.retry;return h==null&&(h={retries:n.fetchRetries||2,factor:n.fetchRetryFactor||10,maxTimeout:n.fetchRetryMaxtimeout||6e4,minTimeout:n.fetchRetryMintimeout||1e3}),u((p,d)=>(d!==1&&i.silly("git",`Retrying git command: ${l.join(" ")} attempt # ${d}`),s(o,l,c(n)).catch(g=>{let m=a(g);if(!m.shouldRetry(d))throw m;p(m)})),h)}}),_f=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var t=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,s=new Set,u=typeof process=="object"&&process?process:{},i=v((g,m,f,y)=>{typeof u.emitWarning=="function"&&u.emitWarning(g,m,f,y)},"emitWarning"),a=globalThis.AbortController,c=globalThis.AbortSignal;if(typeof a>"u"){c=class{static{v(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(f,y){this._onabort.push(y)}},a=class{static{v(this,"AbortController")}constructor(){m()}signal=new c;abort(f){if(!this.signal.aborted){this.signal.reason=f,this.signal.aborted=!0;for(let y of this.signal._onabort)y(f);this.signal.onabort?.(f)}}};let g=u.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",m=v(()=>{g&&(g=!1,i("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",m))},"warnACPolyfill")}var r=v(g=>!s.has(g),"shouldWarn"),n=Symbol("type"),o=v(g=>g&&g===Math.floor(g)&&g>0&&isFinite(g),"isPosInt"),l=v(g=>o(g)?g<=Math.pow(2,8)?Uint8Array:g<=Math.pow(2,16)?Uint16Array:g<=Math.pow(2,32)?Uint32Array:g<=Number.MAX_SAFE_INTEGER?h:null:null,"getUintArray"),h=class extends Array{static{v(this,"ZeroArray")}constructor(g){super(g),this.fill(0)}},p=class is{static{v(this,"Stack")}heap;length;static#e=!1;static create(m){let f=l(m);if(!f)return[];is.#e=!0;let y=new is(m,f);return is.#e=!1,y}constructor(m,f){if(!is.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new f(m),this.length=0}push(m){this.heap[this.length++]=m}pop(){return this.heap[--this.length]}},d=class wf{static{v(this,"LRUCache")}#e;#t;#r;#s;#i;#l;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#h;#n;#p;#o;#u;#a;#f;#g;#b;#m;#R;#E;#v;#S;#O;#w;static unsafeExposeInternals(m){return{starts:m.#E,ttls:m.#v,sizes:m.#R,keyMap:m.#n,keyList:m.#p,valList:m.#o,next:m.#u,prev:m.#a,get head(){return m.#f},get tail(){return m.#g},free:m.#b,isBackgroundFetch:v(f=>m.#_(f),"isBackgroundFetch"),backgroundFetch:v((f,y,S,E)=>m.#L(f,y,S,E),"backgroundFetch"),moveToTail:v(f=>m.#U(f),"moveToTail"),indexes:v(f=>m.#x(f),"indexes"),rindexes:v(f=>m.#k(f),"rindexes"),isStale:v(f=>m.#C(f),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#h}get size(){return this.#c}get fetchMethod(){return this.#i}get memoMethod(){return this.#l}get dispose(){return this.#r}get disposeAfter(){return this.#s}constructor(m){let{max:f=0,ttl:y,ttlResolution:S=1,ttlAutopurge:E,updateAgeOnGet:b,updateAgeOnHas:_,allowStale:O,dispose:w,disposeAfter:A,noDisposeOnSet:I,noUpdateTTL:P,maxSize:L=0,maxEntrySize:$=0,sizeCalculation:x,fetchMethod:M,memoMethod:U,noDeleteOnFetchRejection:V,noDeleteOnStaleGet:B,allowStaleOnFetchRejection:G,allowStaleOnFetchAbort:W,ignoreFetchAbort:N}=m;if(f!==0&&!o(f))throw new TypeError("max option must be a nonnegative integer");let D=f?l(f):Array;if(!D)throw new Error("invalid max value: "+f);if(this.#e=f,this.#t=L,this.maxEntrySize=$||this.#t,this.sizeCalculation=x,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(U!==void 0&&typeof U!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#l=U,M!==void 0&&typeof M!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#i=M,this.#O=!!M,this.#n=new Map,this.#p=new Array(f).fill(void 0),this.#o=new Array(f).fill(void 0),this.#u=new D(f),this.#a=new D(f),this.#f=0,this.#g=0,this.#b=p.create(f),this.#c=0,this.#h=0,typeof w=="function"&&(this.#r=w),typeof A=="function"?(this.#s=A,this.#m=[]):(this.#s=void 0,this.#m=void 0),this.#S=!!this.#r,this.#w=!!this.#s,this.noDisposeOnSet=!!I,this.noUpdateTTL=!!P,this.noDeleteOnFetchRejection=!!V,this.allowStaleOnFetchRejection=!!G,this.allowStaleOnFetchAbort=!!W,this.ignoreFetchAbort=!!N,this.maxEntrySize!==0){if(this.#t!==0&&!o(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!o(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#T()}if(this.allowStale=!!O,this.noDeleteOnStaleGet=!!B,this.updateAgeOnGet=!!b,this.updateAgeOnHas=!!_,this.ttlResolution=o(S)||S===0?S:1,this.ttlAutopurge=!!E,this.ttl=y||0,this.ttl){if(!o(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}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 T="LRU_CACHE_UNBOUNDED";r(T)&&(s.add(T),i("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",T,wf))}}getRemainingTTL(m){return this.#n.has(m)?1/0:0}#P(){let m=new h(this.#e),f=new h(this.#e);this.#v=m,this.#E=f,this.#$=(E,b,_=t.now())=>{if(f[E]=b!==0?_:0,m[E]=b,b!==0&&this.ttlAutopurge){let O=setTimeout(()=>{this.#C(E)&&this.#y(this.#p[E],"expire")},b+1);O.unref&&O.unref()}},this.#A=E=>{f[E]=m[E]!==0?t.now():0},this.#d=(E,b)=>{if(m[b]){let _=m[b],O=f[b];if(!_||!O)return;E.ttl=_,E.start=O,E.now=y||S();let w=E.now-O;E.remainingTTL=_-w}};let y=0,S=v(()=>{let E=t.now();if(this.ttlResolution>0){y=E;let b=setTimeout(()=>y=0,this.ttlResolution);b.unref&&b.unref()}return E},"getNow");this.getRemainingTTL=E=>{let b=this.#n.get(E);if(b===void 0)return 0;let _=m[b],O=f[b];if(!_||!O)return 1/0;let w=(y||S())-O;return _-w},this.#C=E=>{let b=f[E],_=m[E];return!!_&&!!b&&(y||S())-b>_}}#A=v(()=>{},"#updateItemAge");#d=v(()=>{},"#statusTTL");#$=v(()=>{},"#setItemTTL");#C=v(()=>!1,"#isStale");#T(){let m=new h(this.#e);this.#h=0,this.#R=m,this.#M=f=>{this.#h-=m[f],m[f]=0},this.#F=(f,y,S,E)=>{if(this.#_(y))return 0;if(!o(S))if(E){if(typeof E!="function")throw new TypeError("sizeCalculation must be a function");if(S=E(y,f),!o(S))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 S},this.#I=(f,y,S)=>{if(m[f]=y,this.#t){let E=this.#t-m[f];for(;this.#h>E;)this.#N(!0)}this.#h+=m[f],S&&(S.entrySize=y,S.totalCalculatedSize=this.#h)}}#M=v(m=>{},"#removeItemSize");#I=v((m,f,y)=>{},"#addItemSize");#F=v((m,f,y,S)=>{if(y||S)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#x({allowStale:m=this.allowStale}={}){if(this.#c)for(let f=this.#g;!(!this.#j(f)||((m||!this.#C(f))&&(yield f),f===this.#f));)f=this.#a[f]}*#k({allowStale:m=this.allowStale}={}){if(this.#c)for(let f=this.#f;!(!this.#j(f)||((m||!this.#C(f))&&(yield f),f===this.#g));)f=this.#u[f]}#j(m){return m!==void 0&&this.#n.get(this.#p[m])===m}*entries(){for(let m of this.#x())this.#o[m]!==void 0&&this.#p[m]!==void 0&&!this.#_(this.#o[m])&&(yield[this.#p[m],this.#o[m]])}*rentries(){for(let m of this.#k())this.#o[m]!==void 0&&this.#p[m]!==void 0&&!this.#_(this.#o[m])&&(yield[this.#p[m],this.#o[m]])}*keys(){for(let m of this.#x()){let f=this.#p[m];f!==void 0&&!this.#_(this.#o[m])&&(yield f)}}*rkeys(){for(let m of this.#k()){let f=this.#p[m];f!==void 0&&!this.#_(this.#o[m])&&(yield f)}}*values(){for(let m of this.#x())this.#o[m]!==void 0&&!this.#_(this.#o[m])&&(yield this.#o[m])}*rvalues(){for(let m of this.#k())this.#o[m]!==void 0&&!this.#_(this.#o[m])&&(yield this.#o[m])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(m,f={}){for(let y of this.#x()){let S=this.#o[y],E=this.#_(S)?S.__staleWhileFetching:S;if(E!==void 0&&m(E,this.#p[y],this))return this.get(this.#p[y],f)}}forEach(m,f=this){for(let y of this.#x()){let S=this.#o[y],E=this.#_(S)?S.__staleWhileFetching:S;E!==void 0&&m.call(f,E,this.#p[y],this)}}rforEach(m,f=this){for(let y of this.#k()){let S=this.#o[y],E=this.#_(S)?S.__staleWhileFetching:S;E!==void 0&&m.call(f,E,this.#p[y],this)}}purgeStale(){let m=!1;for(let f of this.#k({allowStale:!0}))this.#C(f)&&(this.#y(this.#p[f],"expire"),m=!0);return m}info(m){let f=this.#n.get(m);if(f===void 0)return;let y=this.#o[f],S=this.#_(y)?y.__staleWhileFetching:y;if(S===void 0)return;let E={value:S};if(this.#v&&this.#E){let b=this.#v[f],_=this.#E[f];if(b&&_){let O=b-(t.now()-_);E.ttl=O,E.start=Date.now()}}return this.#R&&(E.size=this.#R[f]),E}dump(){let m=[];for(let f of this.#x({allowStale:!0})){let y=this.#p[f],S=this.#o[f],E=this.#_(S)?S.__staleWhileFetching:S;if(E===void 0||y===void 0)continue;let b={value:E};if(this.#v&&this.#E){b.ttl=this.#v[f];let _=t.now()-this.#E[f];b.start=Math.floor(Date.now()-_)}this.#R&&(b.size=this.#R[f]),m.unshift([y,b])}return m}load(m){this.clear();for(let[f,y]of m){if(y.start){let S=Date.now()-y.start;y.start=t.now()-S}this.set(f,y.value,y)}}set(m,f,y={}){if(f===void 0)return this.delete(m),this;let{ttl:S=this.ttl,start:E,noDisposeOnSet:b=this.noDisposeOnSet,sizeCalculation:_=this.sizeCalculation,status:O}=y,{noUpdateTTL:w=this.noUpdateTTL}=y,A=this.#F(m,f,y.size||0,_);if(this.maxEntrySize&&A>this.maxEntrySize)return O&&(O.set="miss",O.maxEntrySizeExceeded=!0),this.#y(m,"set"),this;let I=this.#c===0?void 0:this.#n.get(m);if(I===void 0)I=this.#c===0?this.#g:this.#b.length!==0?this.#b.pop():this.#c===this.#e?this.#N(!1):this.#c,this.#p[I]=m,this.#o[I]=f,this.#n.set(m,I),this.#u[this.#g]=I,this.#a[I]=this.#g,this.#g=I,this.#c++,this.#I(I,A,O),O&&(O.set="add"),w=!1;else{this.#U(I);let P=this.#o[I];if(f!==P){if(this.#O&&this.#_(P)){P.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:L}=P;L!==void 0&&!b&&(this.#S&&this.#r?.(L,m,"set"),this.#w&&this.#m?.push([L,m,"set"]))}else b||(this.#S&&this.#r?.(P,m,"set"),this.#w&&this.#m?.push([P,m,"set"]));if(this.#M(I),this.#I(I,A,O),this.#o[I]=f,O){O.set="replace";let L=P&&this.#_(P)?P.__staleWhileFetching:P;L!==void 0&&(O.oldValue=L)}}else O&&(O.set="update")}if(S!==0&&!this.#v&&this.#P(),this.#v&&(w||this.#$(I,S,E),O&&this.#d(O,I)),!b&&this.#w&&this.#m){let P=this.#m,L;for(;L=P?.shift();)this.#s?.(...L)}return this}pop(){try{for(;this.#c;){let m=this.#o[this.#f];if(this.#N(!0),this.#_(m)){if(m.__staleWhileFetching)return m.__staleWhileFetching}else if(m!==void 0)return m}}finally{if(this.#w&&this.#m){let m=this.#m,f;for(;f=m?.shift();)this.#s?.(...f)}}}#N(m){let f=this.#f,y=this.#p[f],S=this.#o[f];return this.#O&&this.#_(S)?S.__abortController.abort(new Error("evicted")):(this.#S||this.#w)&&(this.#S&&this.#r?.(S,y,"evict"),this.#w&&this.#m?.push([S,y,"evict"])),this.#M(f),m&&(this.#p[f]=void 0,this.#o[f]=void 0,this.#b.push(f)),this.#c===1?(this.#f=this.#g=0,this.#b.length=0):this.#f=this.#u[f],this.#n.delete(y),this.#c--,f}has(m,f={}){let{updateAgeOnHas:y=this.updateAgeOnHas,status:S}=f,E=this.#n.get(m);if(E!==void 0){let b=this.#o[E];if(this.#_(b)&&b.__staleWhileFetching===void 0)return!1;if(this.#C(E))S&&(S.has="stale",this.#d(S,E));else return y&&this.#A(E),S&&(S.has="hit",this.#d(S,E)),!0}else S&&(S.has="miss");return!1}peek(m,f={}){let{allowStale:y=this.allowStale}=f,S=this.#n.get(m);if(S===void 0||!y&&this.#C(S))return;let E=this.#o[S];return this.#_(E)?E.__staleWhileFetching:E}#L(m,f,y,S){let E=f===void 0?void 0:this.#o[f];if(this.#_(E))return E;let b=new a,{signal:_}=y;_?.addEventListener("abort",()=>b.abort(_.reason),{signal:b.signal});let O={signal:b.signal,options:y,context:S},w=v((x,M=!1)=>{let{aborted:U}=b.signal,V=y.ignoreFetchAbort&&x!==void 0;if(y.status&&(U&&!M?(y.status.fetchAborted=!0,y.status.fetchError=b.signal.reason,V&&(y.status.fetchAbortIgnored=!0)):y.status.fetchResolved=!0),U&&!V&&!M)return I(b.signal.reason);let B=L;return this.#o[f]===L&&(x===void 0?B.__staleWhileFetching?this.#o[f]=B.__staleWhileFetching:this.#y(m,"fetch"):(y.status&&(y.status.fetchUpdated=!0),this.set(m,x,O.options))),x},"cb"),A=v(x=>(y.status&&(y.status.fetchRejected=!0,y.status.fetchError=x),I(x)),"eb"),I=v(x=>{let{aborted:M}=b.signal,U=M&&y.allowStaleOnFetchAbort,V=U||y.allowStaleOnFetchRejection,B=V||y.noDeleteOnFetchRejection,G=L;if(this.#o[f]===L&&(!B||G.__staleWhileFetching===void 0?this.#y(m,"fetch"):U||(this.#o[f]=G.__staleWhileFetching)),V)return y.status&&G.__staleWhileFetching!==void 0&&(y.status.returnedStale=!0),G.__staleWhileFetching;if(G.__returned===G)throw x},"fetchFail"),P=v((x,M)=>{let U=this.#i?.(m,E,O);U&&U instanceof Promise&&U.then(V=>x(V===void 0?void 0:V),M),b.signal.addEventListener("abort",()=>{(!y.ignoreFetchAbort||y.allowStaleOnFetchAbort)&&(x(void 0),y.allowStaleOnFetchAbort&&(x=v(V=>w(V,!0),"res")))})},"pcall");y.status&&(y.status.fetchDispatched=!0);let L=new Promise(P).then(w,A),$=Object.assign(L,{__abortController:b,__staleWhileFetching:E,__returned:void 0});return f===void 0?(this.set(m,$,{...O.options,status:void 0}),f=this.#n.get(m)):this.#o[f]=$,$}#_(m){if(!this.#O)return!1;let f=m;return!!f&&f instanceof Promise&&f.hasOwnProperty("__staleWhileFetching")&&f.__abortController instanceof a}async fetch(m,f={}){let{allowStale:y=this.allowStale,updateAgeOnGet:S=this.updateAgeOnGet,noDeleteOnStaleGet:E=this.noDeleteOnStaleGet,ttl:b=this.ttl,noDisposeOnSet:_=this.noDisposeOnSet,size:O=0,sizeCalculation:w=this.sizeCalculation,noUpdateTTL:A=this.noUpdateTTL,noDeleteOnFetchRejection:I=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:P=this.allowStaleOnFetchRejection,ignoreFetchAbort:L=this.ignoreFetchAbort,allowStaleOnFetchAbort:$=this.allowStaleOnFetchAbort,context:x,forceRefresh:M=!1,status:U,signal:V}=f;if(!this.#O)return U&&(U.fetch="get"),this.get(m,{allowStale:y,updateAgeOnGet:S,noDeleteOnStaleGet:E,status:U});let B={allowStale:y,updateAgeOnGet:S,noDeleteOnStaleGet:E,ttl:b,noDisposeOnSet:_,size:O,sizeCalculation:w,noUpdateTTL:A,noDeleteOnFetchRejection:I,allowStaleOnFetchRejection:P,allowStaleOnFetchAbort:$,ignoreFetchAbort:L,status:U,signal:V},G=this.#n.get(m);if(G===void 0){U&&(U.fetch="miss");let W=this.#L(m,G,B,x);return W.__returned=W}else{let W=this.#o[G];if(this.#_(W)){let C=y&&W.__staleWhileFetching!==void 0;return U&&(U.fetch="inflight",C&&(U.returnedStale=!0)),C?W.__staleWhileFetching:W.__returned=W}let N=this.#C(G);if(!M&&!N)return U&&(U.fetch="hit"),this.#U(G),S&&this.#A(G),U&&this.#d(U,G),W;let D=this.#L(m,G,B,x),T=D.__staleWhileFetching!==void 0&&y;return U&&(U.fetch=N?"stale":"refresh",T&&N&&(U.returnedStale=!0)),T?D.__staleWhileFetching:D.__returned=D}}async forceFetch(m,f={}){let y=await this.fetch(m,f);if(y===void 0)throw new Error("fetch() returned undefined");return y}memo(m,f={}){let y=this.#l;if(!y)throw new Error("no memoMethod provided to constructor");let{context:S,forceRefresh:E,...b}=f,_=this.get(m,b);if(!E&&_!==void 0)return _;let O=y(m,_,{options:b,context:S});return this.set(m,O,b),O}get(m,f={}){let{allowStale:y=this.allowStale,updateAgeOnGet:S=this.updateAgeOnGet,noDeleteOnStaleGet:E=this.noDeleteOnStaleGet,status:b}=f,_=this.#n.get(m);if(_!==void 0){let O=this.#o[_],w=this.#_(O);return b&&this.#d(b,_),this.#C(_)?(b&&(b.get="stale"),w?(b&&y&&O.__staleWhileFetching!==void 0&&(b.returnedStale=!0),y?O.__staleWhileFetching:void 0):(E||this.#y(m,"expire"),b&&y&&(b.returnedStale=!0),y?O:void 0)):(b&&(b.get="hit"),w?O.__staleWhileFetching:(this.#U(_),S&&this.#A(_),O))}else b&&(b.get="miss")}#B(m,f){this.#a[f]=m,this.#u[m]=f}#U(m){m!==this.#g&&(m===this.#f?this.#f=this.#u[m]:this.#B(this.#a[m],this.#u[m]),this.#B(this.#g,m),this.#g=m)}delete(m){return this.#y(m,"delete")}#y(m,f){let y=!1;if(this.#c!==0){let S=this.#n.get(m);if(S!==void 0)if(y=!0,this.#c===1)this.#H(f);else{this.#M(S);let E=this.#o[S];if(this.#_(E)?E.__abortController.abort(new Error("deleted")):(this.#S||this.#w)&&(this.#S&&this.#r?.(E,m,f),this.#w&&this.#m?.push([E,m,f])),this.#n.delete(m),this.#p[S]=void 0,this.#o[S]=void 0,S===this.#g)this.#g=this.#a[S];else if(S===this.#f)this.#f=this.#u[S];else{let b=this.#a[S];this.#u[b]=this.#u[S];let _=this.#u[S];this.#a[_]=this.#a[S]}this.#c--,this.#b.push(S)}}if(this.#w&&this.#m?.length){let S=this.#m,E;for(;E=S?.shift();)this.#s?.(...E)}return y}clear(){return this.#H("delete")}#H(m){for(let f of this.#k({allowStale:!0})){let y=this.#o[f];if(this.#_(y))y.__abortController.abort(new Error("deleted"));else{let S=this.#p[f];this.#S&&this.#r?.(y,S,m),this.#w&&this.#m?.push([y,S,m])}}if(this.#n.clear(),this.#o.fill(void 0),this.#p.fill(void 0),this.#v&&this.#E&&(this.#v.fill(0),this.#E.fill(0)),this.#R&&this.#R.fill(0),this.#f=0,this.#g=0,this.#b.length=0,this.#h=0,this.#c=0,this.#w&&this.#m){let f=this.#m,y;for(;y=f?.shift();)this.#s?.(...y)}}};e.LRUCache=d}),ex=K((e,t)=>{"use strict";var s=qe(),u=v((i,a,c,r,n)=>{typeof c=="string"&&(n=r,r=c,c=void 0);try{return new s(i instanceof s?i.version:i,c).inc(a,r,n).version}catch{return null}},"inc");t.exports=u}),tx=K((e,t)=>{"use strict";var s=Sr(),u=v((i,a)=>{let c=s(i,null,!0),r=s(a,null,!0),n=c.compare(r);if(n===0)return null;let o=n>0,l=o?c:r,h=o?r:c,p=!!l.prerelease.length;if(h.prerelease.length&&!p){if(!h.patch&&!h.minor)return"major";if(h.compareMain(l)===0)return h.minor&&!h.patch?"minor":"patch"}let d=p?"pre":"";return c.major!==r.major?d+"major":c.minor!==r.minor?d+"minor":c.patch!==r.patch?d+"patch":"prerelease"},"diff");t.exports=u}),rx=K((e,t)=>{"use strict";var s=qe(),u=v((i,a)=>new s(i,a).major,"major");t.exports=u}),sx=K((e,t)=>{"use strict";var s=qe(),u=v((i,a)=>new s(i,a).minor,"minor");t.exports=u}),ix=K((e,t)=>{"use strict";var s=qe(),u=v((i,a)=>new s(i,a).patch,"patch");t.exports=u}),nx=K((e,t)=>{"use strict";var s=Sr(),u=v((i,a)=>{let c=s(i,a);return c&&c.prerelease.length?c.prerelease:null},"prerelease");t.exports=u}),gt=K((e,t)=>{"use strict";var s=qe(),u=v((i,a,c)=>new s(i,c).compare(new s(a,c)),"compare");t.exports=u}),ox=K((e,t)=>{"use strict";var s=gt(),u=v((i,a,c)=>s(a,i,c),"rcompare");t.exports=u}),ax=K((e,t)=>{"use strict";var s=gt(),u=v((i,a)=>s(i,a,!0),"compareLoose");t.exports=u}),bl=K((e,t)=>{"use strict";var s=qe(),u=v((i,a,c)=>{let r=new s(i,c),n=new s(a,c);return r.compare(n)||r.compareBuild(n)},"compareBuild");t.exports=u}),lx=K((e,t)=>{"use strict";var s=bl(),u=v((i,a)=>i.sort((c,r)=>s(c,r,a)),"sort");t.exports=u}),cx=K((e,t)=>{"use strict";var s=bl(),u=v((i,a)=>i.sort((c,r)=>s(r,c,a)),"rsort");t.exports=u}),Bi=K((e,t)=>{"use strict";var s=gt(),u=v((i,a,c)=>s(i,a,c)>0,"gt");t.exports=u}),_l=K((e,t)=>{"use strict";var s=gt(),u=v((i,a,c)=>s(i,a,c)<0,"lt");t.exports=u}),Of=K((e,t)=>{"use strict";var s=gt(),u=v((i,a,c)=>s(i,a,c)===0,"eq");t.exports=u}),Rf=K((e,t)=>{"use strict";var s=gt(),u=v((i,a,c)=>s(i,a,c)!==0,"neq");t.exports=u}),wl=K((e,t)=>{"use strict";var s=gt(),u=v((i,a,c)=>s(i,a,c)>=0,"gte");t.exports=u}),Ol=K((e,t)=>{"use strict";var s=gt(),u=v((i,a,c)=>s(i,a,c)<=0,"lte");t.exports=u}),Af=K((e,t)=>{"use strict";var s=Of(),u=Rf(),i=Bi(),a=wl(),c=_l(),r=Ol(),n=v((o,l,h,p)=>{switch(l){case"===":return typeof o=="object"&&(o=o.version),typeof h=="object"&&(h=h.version),o===h;case"!==":return typeof o=="object"&&(o=o.version),typeof h=="object"&&(h=h.version),o!==h;case"":case"=":case"==":return s(o,h,p);case"!=":return u(o,h,p);case">":return i(o,h,p);case">=":return a(o,h,p);case"<":return c(o,h,p);case"<=":return r(o,h,p);default:throw new TypeError(`Invalid operator: ${l}`)}},"cmp");t.exports=n}),ux=K((e,t)=>{"use strict";var s=qe(),u=Sr(),{safeRe:i,t:a}=os(),c=v((r,n)=>{if(r instanceof s)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;n=n||{};let o=null;if(!n.rtl)o=r.match(n.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let m=n.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],f;for(;(f=m.exec(r))&&(!o||o.index+o[0].length!==r.length);)(!o||f.index+f[0].length!==o.index+o[0].length)&&(o=f),m.lastIndex=f.index+f[1].length+f[2].length;m.lastIndex=-1}if(o===null)return null;let l=o[2],h=o[3]||"0",p=o[4]||"0",d=n.includePrerelease&&o[5]?`-${o[5]}`:"",g=n.includePrerelease&&o[6]?`+${o[6]}`:"";return u(`${l}.${h}.${p}${d}${g}`,n)},"coerce");t.exports=c}),hx=K((e,t)=>{"use strict";var s=class{static{v(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(u){let i=this.map.get(u);if(i!==void 0)return this.map.delete(u),this.map.set(u,i),i}delete(u){return this.map.delete(u)}set(u,i){if(!this.delete(u)&&i!==void 0){if(this.map.size>=this.max){let a=this.map.keys().next().value;this.delete(a)}this.map.set(u,i)}return this}};t.exports=s}),mt=K((e,t)=>{"use strict";var s=/\s+/g,u=class ki{static{v(this,"Range")}constructor(B,G){if(G=c(G),B instanceof ki)return B.loose===!!G.loose&&B.includePrerelease===!!G.includePrerelease?B:new ki(B.raw,G);if(B instanceof r)return this.raw=B.value,this.set=[[B]],this.formatted=void 0,this;if(this.options=G,this.loose=!!G.loose,this.includePrerelease=!!G.includePrerelease,this.raw=B.trim().replace(s," "),this.set=this.raw.split("||").map(W=>this.parseRange(W.trim())).filter(W=>W.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let W=this.set[0];if(this.set=this.set.filter(N=>!y(N[0])),this.set.length===0)this.set=[W];else if(this.set.length>1){for(let N of this.set)if(N.length===1&&S(N[0])){this.set=[N];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let B=0;B<this.set.length;B++){B>0&&(this.formatted+="||");let G=this.set[B];for(let W=0;W<G.length;W++)W>0&&(this.formatted+=" "),this.formatted+=G[W].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(B){let G=((this.options.includePrerelease&&m)|(this.options.loose&&f))+":"+B,W=a.get(G);if(W)return W;let N=this.options.loose,D=N?l[h.HYPHENRANGELOOSE]:l[h.HYPHENRANGE];B=B.replace(D,M(this.options.includePrerelease)),n("hyphen replace",B),B=B.replace(l[h.COMPARATORTRIM],p),n("comparator trim",B),B=B.replace(l[h.TILDETRIM],d),n("tilde trim",B),B=B.replace(l[h.CARETTRIM],g),n("caret trim",B);let T=B.split(" ").map(Q=>b(Q,this.options)).join(" ").split(/\s+/).map(Q=>x(Q,this.options));N&&(T=T.filter(Q=>(n("loose invalid filter",Q,this.options),!!Q.match(l[h.COMPARATORLOOSE])))),n("range list",T);let C=new Map,Z=T.map(Q=>new r(Q,this.options));for(let Q of Z){if(y(Q))return[Q];C.set(Q.value,Q)}C.size>1&&C.has("")&&C.delete("");let X=[...C.values()];return a.set(G,X),X}intersects(B,G){if(!(B instanceof ki))throw new TypeError("a Range is required");return this.set.some(W=>E(W,G)&&B.set.some(N=>E(N,G)&&W.every(D=>N.every(T=>D.intersects(T,G)))))}test(B){if(!B)return!1;if(typeof B=="string")try{B=new o(B,this.options)}catch{return!1}for(let G=0;G<this.set.length;G++)if(U(this.set[G],B,this.options))return!0;return!1}};t.exports=u;var i=hx(),a=new i,c=vl(),r=Ui(),n=Di(),o=qe(),{safeRe:l,t:h,comparatorTrimReplace:p,tildeTrimReplace:d,caretTrimReplace:g}=os(),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:f}=$i(),y=v(V=>V.value==="<0.0.0-0","isNullSet"),S=v(V=>V.value==="","isAny"),E=v((V,B)=>{let G=!0,W=V.slice(),N=W.pop();for(;G&&W.length;)G=W.every(D=>N.intersects(D,B)),N=W.pop();return G},"isSatisfiable"),b=v((V,B)=>(n("comp",V,B),V=A(V,B),n("caret",V),V=O(V,B),n("tildes",V),V=P(V,B),n("xrange",V),V=$(V,B),n("stars",V),V),"parseComparator"),_=v(V=>!V||V.toLowerCase()==="x"||V==="*","isX"),O=v((V,B)=>V.trim().split(/\s+/).map(G=>w(G,B)).join(" "),"replaceTildes"),w=v((V,B)=>{let G=B.loose?l[h.TILDELOOSE]:l[h.TILDE];return V.replace(G,(W,N,D,T,C)=>{n("tilde",V,W,N,D,T,C);let Z;return _(N)?Z="":_(D)?Z=`>=${N}.0.0 <${+N+1}.0.0-0`:_(T)?Z=`>=${N}.${D}.0 <${N}.${+D+1}.0-0`:C?(n("replaceTilde pr",C),Z=`>=${N}.${D}.${T}-${C} <${N}.${+D+1}.0-0`):Z=`>=${N}.${D}.${T} <${N}.${+D+1}.0-0`,n("tilde return",Z),Z})},"replaceTilde"),A=v((V,B)=>V.trim().split(/\s+/).map(G=>I(G,B)).join(" "),"replaceCarets"),I=v((V,B)=>{n("caret",V,B);let G=B.loose?l[h.CARETLOOSE]:l[h.CARET],W=B.includePrerelease?"-0":"";return V.replace(G,(N,D,T,C,Z)=>{n("caret",V,N,D,T,C,Z);let X;return _(D)?X="":_(T)?X=`>=${D}.0.0${W} <${+D+1}.0.0-0`:_(C)?D==="0"?X=`>=${D}.${T}.0${W} <${D}.${+T+1}.0-0`:X=`>=${D}.${T}.0${W} <${+D+1}.0.0-0`:Z?(n("replaceCaret pr",Z),D==="0"?T==="0"?X=`>=${D}.${T}.${C}-${Z} <${D}.${T}.${+C+1}-0`:X=`>=${D}.${T}.${C}-${Z} <${D}.${+T+1}.0-0`:X=`>=${D}.${T}.${C}-${Z} <${+D+1}.0.0-0`):(n("no pr"),D==="0"?T==="0"?X=`>=${D}.${T}.${C}${W} <${D}.${T}.${+C+1}-0`:X=`>=${D}.${T}.${C}${W} <${D}.${+T+1}.0-0`:X=`>=${D}.${T}.${C} <${+D+1}.0.0-0`),n("caret return",X),X})},"replaceCaret"),P=v((V,B)=>(n("replaceXRanges",V,B),V.split(/\s+/).map(G=>L(G,B)).join(" ")),"replaceXRanges"),L=v((V,B)=>{V=V.trim();let G=B.loose?l[h.XRANGELOOSE]:l[h.XRANGE];return V.replace(G,(W,N,D,T,C,Z)=>{n("xRange",V,W,N,D,T,C,Z);let X=_(D),Q=X||_(T),k=Q||_(C),F=k;return N==="="&&F&&(N=""),Z=B.includePrerelease?"-0":"",X?N===">"||N==="<"?W="<0.0.0-0":W="*":N&&F?(Q&&(T=0),C=0,N===">"?(N=">=",Q?(D=+D+1,T=0,C=0):(T=+T+1,C=0)):N==="<="&&(N="<",Q?D=+D+1:T=+T+1),N==="<"&&(Z="-0"),W=`${N+D}.${T}.${C}${Z}`):Q?W=`>=${D}.0.0${Z} <${+D+1}.0.0-0`:k&&(W=`>=${D}.${T}.0${Z} <${D}.${+T+1}.0-0`),n("xRange return",W),W})},"replaceXRange"),$=v((V,B)=>(n("replaceStars",V,B),V.trim().replace(l[h.STAR],"")),"replaceStars"),x=v((V,B)=>(n("replaceGTE0",V,B),V.trim().replace(l[B.includePrerelease?h.GTE0PRE:h.GTE0],"")),"replaceGTE0"),M=v(V=>(B,G,W,N,D,T,C,Z,X,Q,k,F)=>(_(W)?G="":_(N)?G=`>=${W}.0.0${V?"-0":""}`:_(D)?G=`>=${W}.${N}.0${V?"-0":""}`:T?G=`>=${G}`:G=`>=${G}${V?"-0":""}`,_(X)?Z="":_(Q)?Z=`<${+X+1}.0.0-0`:_(k)?Z=`<${X}.${+Q+1}.0-0`:F?Z=`<=${X}.${Q}.${k}-${F}`:V?Z=`<${X}.${Q}.${+k+1}-0`:Z=`<=${Z}`,`${G} ${Z}`.trim()),"hyphenReplace"),U=v((V,B,G)=>{for(let W=0;W<V.length;W++)if(!V[W].test(B))return!1;if(B.prerelease.length&&!G.includePrerelease){for(let W=0;W<V.length;W++)if(n(V[W].semver),V[W].semver!==r.ANY&&V[W].semver.prerelease.length>0){let N=V[W].semver;if(N.major===B.major&&N.minor===B.minor&&N.patch===B.patch)return!0}return!1}return!0},"testSet")}),Ui=K((e,t)=>{"use strict";var s=Symbol("SemVer ANY"),u=class Ja{static{v(this,"Comparator")}static get ANY(){return s}constructor(p,d){if(d=i(d),p instanceof Ja){if(p.loose===!!d.loose)return p;p=p.value}p=p.trim().split(/\s+/).join(" "),n("comparator",p,d),this.options=d,this.loose=!!d.loose,this.parse(p),this.semver===s?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}parse(p){let d=this.options.loose?a[c.COMPARATORLOOSE]:a[c.COMPARATOR],g=p.match(d);if(!g)throw new TypeError(`Invalid comparator: ${p}`);this.operator=g[1]!==void 0?g[1]:"",this.operator==="="&&(this.operator=""),g[2]?this.semver=new o(g[2],this.options.loose):this.semver=s}toString(){return this.value}test(p){if(n("Comparator.test",p,this.options.loose),this.semver===s||p===s)return!0;if(typeof p=="string")try{p=new o(p,this.options)}catch{return!1}return r(p,this.operator,this.semver,this.options)}intersects(p,d){if(!(p instanceof Ja))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(p.value,d).test(this.value):p.operator===""?p.value===""?!0:new l(this.value,d).test(p.semver):(d=i(d),d.includePrerelease&&(this.value==="<0.0.0-0"||p.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||p.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&p.operator.startsWith(">")||this.operator.startsWith("<")&&p.operator.startsWith("<")||this.semver.version===p.semver.version&&this.operator.includes("=")&&p.operator.includes("=")||r(this.semver,"<",p.semver,d)&&this.operator.startsWith(">")&&p.operator.startsWith("<")||r(this.semver,">",p.semver,d)&&this.operator.startsWith("<")&&p.operator.startsWith(">")))}};t.exports=u;var i=vl(),{safeRe:a,t:c}=os(),r=Af(),n=Di(),o=qe(),l=mt()}),as=K((e,t)=>{"use strict";var s=mt(),u=v((i,a,c)=>{try{a=new s(a,c)}catch{return!1}return a.test(i)},"satisfies");t.exports=u}),px=K((e,t)=>{"use strict";var s=mt(),u=v((i,a)=>new s(i,a).set.map(c=>c.map(r=>r.value).join(" ").trim().split(" ")),"toComparators");t.exports=u}),dx=K((e,t)=>{"use strict";var s=qe(),u=mt(),i=v((a,c,r)=>{let n=null,o=null,l=null;try{l=new u(c,r)}catch{return null}return a.forEach(h=>{l.test(h)&&(!n||o.compare(h)===-1)&&(n=h,o=new s(n,r))}),n},"maxSatisfying");t.exports=i}),fx=K((e,t)=>{"use strict";var s=qe(),u=mt(),i=v((a,c,r)=>{let n=null,o=null,l=null;try{l=new u(c,r)}catch{return null}return a.forEach(h=>{l.test(h)&&(!n||o.compare(h)===1)&&(n=h,o=new s(n,r))}),n},"minSatisfying");t.exports=i}),gx=K((e,t)=>{"use strict";var s=qe(),u=mt(),i=Bi(),a=v((c,r)=>{c=new u(c,r);let n=new s("0.0.0");if(c.test(n)||(n=new s("0.0.0-0"),c.test(n)))return n;n=null;for(let o=0;o<c.set.length;++o){let l=c.set[o],h=null;l.forEach(p=>{let d=new s(p.semver.version);switch(p.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!h||i(d,h))&&(h=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${p.operator}`)}}),h&&(!n||i(n,h))&&(n=h)}return n&&c.test(n)?n:null},"minVersion");t.exports=a}),Cf=K((e,t)=>{"use strict";var s=mt(),u=v((i,a)=>{try{return new s(i,a).range||"*"}catch{return null}},"validRange");t.exports=u}),Rl=K((e,t)=>{"use strict";var s=qe(),u=Ui(),{ANY:i}=u,a=mt(),c=as(),r=Bi(),n=_l(),o=Ol(),l=wl(),h=v((p,d,g,m)=>{p=new s(p,m),d=new a(d,m);let f,y,S,E,b;switch(g){case">":f=r,y=o,S=n,E=">",b=">=";break;case"<":f=n,y=l,S=r,E="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(c(p,d,m))return!1;for(let _=0;_<d.set.length;++_){let O=d.set[_],w=null,A=null;if(O.forEach(I=>{I.semver===i&&(I=new u(">=0.0.0")),w=w||I,A=A||I,f(I.semver,w.semver,m)?w=I:S(I.semver,A.semver,m)&&(A=I)}),w.operator===E||w.operator===b||(!A.operator||A.operator===E)&&y(p,A.semver)||A.operator===b&&S(p,A.semver))return!1}return!0},"outside");t.exports=h}),mx=K((e,t)=>{"use strict";var s=Rl(),u=v((i,a,c)=>s(i,a,">",c),"gtr");t.exports=u}),yx=K((e,t)=>{"use strict";var s=Rl(),u=v((i,a,c)=>s(i,a,"<",c),"ltr");t.exports=u}),vx=K((e,t)=>{"use strict";var s=mt(),u=v((i,a,c)=>(i=new s(i,c),a=new s(a,c),i.intersects(a,c)),"intersects");t.exports=u}),Sx=K((e,t)=>{"use strict";var s=as(),u=gt();t.exports=(i,a,c)=>{let r=[],n=null,o=null,l=i.sort((g,m)=>u(g,m,c));for(let g of l)s(g,a,c)?(o=g,n||(n=g)):(o&&r.push([n,o]),o=null,n=null);n&&r.push([n,null]);let h=[];for(let[g,m]of r)g===m?h.push(g):!m&&g===l[0]?h.push("*"):m?g===l[0]?h.push(`<=${m}`):h.push(`${g} - ${m}`):h.push(`>=${g}`);let p=h.join(" || "),d=typeof a.raw=="string"?a.raw:String(a);return p.length<d.length?p:a}}),Ex=K((e,t)=>{"use strict";var s=mt(),u=Ui(),{ANY:i}=u,a=as(),c=gt(),r=v((d,g,m={})=>{if(d===g)return!0;d=new s(d,m),g=new s(g,m);let f=!1;e:for(let y of d.set){for(let S of g.set){let E=l(y,S,m);if(f=f||E!==null,E)continue e}if(f)return!1}return!0},"subset"),n=[new u(">=0.0.0-0")],o=[new u(">=0.0.0")],l=v((d,g,m)=>{if(d===g)return!0;if(d.length===1&&d[0].semver===i){if(g.length===1&&g[0].semver===i)return!0;m.includePrerelease?d=n:d=o}if(g.length===1&&g[0].semver===i){if(m.includePrerelease)return!0;g=o}let f=new Set,y,S;for(let P of d)P.operator===">"||P.operator===">="?y=h(y,P,m):P.operator==="<"||P.operator==="<="?S=p(S,P,m):f.add(P.semver);if(f.size>1)return null;let E;if(y&&S&&(E=c(y.semver,S.semver,m),E>0||E===0&&(y.operator!==">="||S.operator!=="<=")))return null;for(let P of f){if(y&&!a(P,String(y),m)||S&&!a(P,String(S),m))return null;for(let L of g)if(!a(P,String(L),m))return!1;return!0}let b,_,O,w,A=S&&!m.includePrerelease&&S.semver.prerelease.length?S.semver:!1,I=y&&!m.includePrerelease&&y.semver.prerelease.length?y.semver:!1;A&&A.prerelease.length===1&&S.operator==="<"&&A.prerelease[0]===0&&(A=!1);for(let P of g){if(w=w||P.operator===">"||P.operator===">=",O=O||P.operator==="<"||P.operator==="<=",y){if(I&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===I.major&&P.semver.minor===I.minor&&P.semver.patch===I.patch&&(I=!1),P.operator===">"||P.operator===">="){if(b=h(y,P,m),b===P&&b!==y)return!1}else if(y.operator===">="&&!a(y.semver,String(P),m))return!1}if(S){if(A&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===A.major&&P.semver.minor===A.minor&&P.semver.patch===A.patch&&(A=!1),P.operator==="<"||P.operator==="<="){if(_=p(S,P,m),_===P&&_!==S)return!1}else if(S.operator==="<="&&!a(S.semver,String(P),m))return!1}if(!P.operator&&(S||y)&&E!==0)return!1}return!(y&&O&&!S&&E!==0||S&&w&&!y&&E!==0||I||A)},"simpleSubset"),h=v((d,g,m)=>{if(!d)return g;let f=c(d.semver,g.semver,m);return f>0?d:f<0||g.operator===">"&&d.operator===">="?g:d},"higherGT"),p=v((d,g,m)=>{if(!d)return g;let f=c(d.semver,g.semver,m);return f<0?d:f>0||g.operator==="<"&&d.operator==="<="?g:d},"lowerLT");t.exports=r}),br=K((e,t)=>{"use strict";var s=os(),u=$i(),i=qe(),a=nf(),c=Sr(),r=of(),n=af(),o=ex(),l=tx(),h=rx(),p=sx(),d=ix(),g=nx(),m=gt(),f=ox(),y=ax(),S=bl(),E=lx(),b=cx(),_=Bi(),O=_l(),w=Of(),A=Rf(),I=wl(),P=Ol(),L=Af(),$=ux(),x=Ui(),M=mt(),U=as(),V=px(),B=dx(),G=fx(),W=gx(),N=Cf(),D=Rl(),T=mx(),C=yx(),Z=vx(),X=Sx(),Q=Ex();t.exports={parse:c,valid:r,clean:n,inc:o,diff:l,major:h,minor:p,patch:d,prerelease:g,compare:m,rcompare:f,compareLoose:y,compareBuild:S,sort:E,rsort:b,gt:_,lt:O,eq:w,neq:A,gte:I,lte:P,cmp:L,coerce:$,Comparator:x,Range:M,satisfies:U,toComparators:V,maxSatisfying:B,minSatisfying:G,minVersion:W,validRange:N,outside:D,gtr:T,ltr:C,intersects:Z,simplifyRange:X,subset:Q,SemVer:i,re:s.re,src:s.src,tokens:s.t,SEMVER_SPEC_VERSION:u.SEMVER_SPEC_VERSION,RELEASE_TYPES:u.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}),bx=K((e,t)=>{var s=br();t.exports=l=>u(l.reduce(o,{versions:{},"dist-tags":{},refs:{},shas:{}}));var u=v(l=>c(i(a(l))),"finish"),i=v(l=>(Object.keys(l.refs).forEach(h=>{let p=l.refs[h];l.shas[p.sha]?l.shas[p.sha].push(h):l.shas[p.sha]=[h]}),l),"shaList"),a=v(l=>(Object.keys(l.refs).filter(h=>h.endsWith("^{}")).forEach(h=>{let p=l.refs[h],d=l.refs[h.replace(/\^\{\}$/,"")];d&&(d.sha=p.sha,delete l.refs[h])}),l),"peelTags"),c=v(l=>{let h=l.refs.HEAD||{};return Object.keys(l.versions).forEach(p=>{let d=l.versions[p];l.refs.latest&&d.sha===l.refs.latest.sha?l["dist-tags"].latest=p:d.sha===h.sha&&(l["dist-tags"].HEAD=p,l.refs.latest||(l["dist-tags"].latest=p))}),l},"distTags"),r=v(l=>l.startsWith("refs/tags/")?"tag":l.startsWith("refs/heads/")?"branch":l.startsWith("refs/pull/")?"pull":l==="HEAD"?"head":"other","refType"),n=v(l=>{let h=l.trim().split(/\s+/,2);if(h.length<2)return null;let p=h[0].trim(),d=h[1].trim(),g=r(d);if(g==="tag"){let m=d.slice(10);return{sha:p,ref:m,rawRef:d,type:g}}if(g==="branch"){let m=d.slice(11);return{sha:p,ref:m,rawRef:d,type:g}}if(g==="pull"){let m=d.slice(5).replace(/\/head$/,"");return{sha:p,ref:m,rawRef:d,type:g}}return g==="head"?{sha:p,ref:"HEAD",rawRef:d,type:g}:{sha:p,ref:d,rawRef:d,type:g}},"lineToRevDoc"),o=v((l,h)=>{let p=n(h);if(!p)return l;if(l.refs[p.ref]=p,l.refs[p.rawRef]=p,p.type==="tag"){let d=!p.ref.endsWith("^{}")&&p.ref.match(/v?(\d+\.\d+\.\d+(?:[-+].+)?)$/);d&&s.valid(d[1],!0)&&(l.versions[s.clean(d[1],!0)]=p)}return l},"linesToRevsReducer")}),If=K((e,t)=>{var s=ji(),{LRUCache:u}=_f(),i=bx(),a=new u({max:100,ttl:300*1e3});t.exports=async(c,r={})=>{if(!r.noGitRevCache){let l=a.get(c);if(l)return l}let{stdout:n}=await s(["ls-remote",c],r),o=i(n.trim().split(`
|
|
28
|
+
`));return a.set(c,o),o}}),_x=K(e=>{var t=v(s=>(s.fakePlatform||process.platform)==="win32","isWindows");e.isWindows=t}),wx=K((e,t)=>{"use strict";var s=v((...r)=>r.every(n=>n)?r.join(""):"","maybeJoin"),u=v(r=>r?encodeURIComponent(r):"","maybeEncode"),i=v(r=>r.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),"formatHashFragment"),a={sshtemplate:v(({domain:r,user:n,project:o,committish:l})=>`git@${r}:${n}/${o}.git${s("#",l)}`,"sshtemplate"),sshurltemplate:v(({domain:r,user:n,project:o,committish:l})=>`git+ssh://git@${r}/${n}/${o}.git${s("#",l)}`,"sshurltemplate"),edittemplate:v(({domain:r,user:n,project:o,committish:l,editpath:h,path:p})=>`https://${r}/${n}/${o}${s("/",h,"/",u(l||"HEAD"),"/",p)}`,"edittemplate"),browsetemplate:v(({domain:r,user:n,project:o,committish:l,treepath:h})=>`https://${r}/${n}/${o}${s("/",h,"/",u(l))}`,"browsetemplate"),browsetreetemplate:v(({domain:r,user:n,project:o,committish:l,treepath:h,path:p,fragment:d,hashformat:g})=>`https://${r}/${n}/${o}/${h}/${u(l||"HEAD")}/${p}${s("#",g(d||""))}`,"browsetreetemplate"),browseblobtemplate:v(({domain:r,user:n,project:o,committish:l,blobpath:h,path:p,fragment:d,hashformat:g})=>`https://${r}/${n}/${o}/${h}/${u(l||"HEAD")}/${p}${s("#",g(d||""))}`,"browseblobtemplate"),docstemplate:v(({domain:r,user:n,project:o,treepath:l,committish:h})=>`https://${r}/${n}/${o}${s("/",l,"/",u(h))}#readme`,"docstemplate"),httpstemplate:v(({auth:r,domain:n,user:o,project:l,committish:h})=>`git+https://${s(r,"@")}${n}/${o}/${l}.git${s("#",h)}`,"httpstemplate"),filetemplate:v(({domain:r,user:n,project:o,committish:l,path:h})=>`https://${r}/${n}/${o}/raw/${u(l||"HEAD")}/${h}`,"filetemplate"),shortcuttemplate:v(({type:r,user:n,project:o,committish:l})=>`${r}:${n}/${o}${s("#",l)}`,"shortcuttemplate"),pathtemplate:v(({user:r,project:n,committish:o})=>`${r}/${n}${s("#",o)}`,"pathtemplate"),bugstemplate:v(({domain:r,user:n,project:o})=>`https://${r}/${n}/${o}/issues`,"bugstemplate"),hashformat:i},c={};c.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:v(({auth:r,user:n,project:o,committish:l,path:h})=>`https://${s(r,"@")}raw.githubusercontent.com/${n}/${o}/${u(l||"HEAD")}/${h}`,"filetemplate"),gittemplate:v(({auth:r,domain:n,user:o,project:l,committish:h})=>`git://${s(r,"@")}${n}/${o}/${l}.git${s("#",h)}`,"gittemplate"),tarballtemplate:v(({domain:r,user:n,project:o,committish:l})=>`https://codeload.${r}/${n}/${o}/tar.gz/${u(l||"HEAD")}`,"tarballtemplate"),extract:v(r=>{let[,n,o,l,h]=r.pathname.split("/",5);if(!(l&&l!=="tree")&&(l||(h=r.hash.slice(1)),o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!n||!o)))return{user:n,project:o,committish:h}},"extract")},c.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:v(({domain:r,user:n,project:o,committish:l,treepath:h,path:p,editpath:d})=>`https://${r}/${n}/${o}${s("/",h,"/",u(l||"HEAD"),"/",p,d)}`,"edittemplate"),tarballtemplate:v(({domain:r,user:n,project:o,committish:l})=>`https://${r}/${n}/${o}/get/${u(l||"HEAD")}.tar.gz`,"tarballtemplate"),extract:v(r=>{let[,n,o,l]=r.pathname.split("/",4);if(!["get"].includes(l)&&(o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!n||!o)))return{user:n,project:o,committish:r.hash.slice(1)}},"extract")},c.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:v(({auth:r,domain:n,user:o,project:l,committish:h})=>`git+https://${s(r,"@")}${n}/${o}/${l}.git${s("#",h)}`,"httpstemplate"),tarballtemplate:v(({domain:r,user:n,project:o,committish:l})=>`https://${r}/${n}/${o}/repository/archive.tar.gz?ref=${u(l||"HEAD")}`,"tarballtemplate"),extract:v(r=>{let n=r.pathname.slice(1);if(n.includes("/-/")||n.includes("/archive.tar.gz"))return;let o=n.split("/"),l=o.pop();l.endsWith(".git")&&(l=l.slice(0,-4));let h=o.join("/");if(!(!h||!l))return{user:h,project:l,committish:r.hash.slice(1)}},"extract")},c.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:v(({domain:r,project:n,committish:o})=>`git@${r}:${n}.git${s("#",o)}`,"sshtemplate"),sshurltemplate:v(({domain:r,project:n,committish:o})=>`git+ssh://git@${r}/${n}.git${s("#",o)}`,"sshurltemplate"),edittemplate:v(({domain:r,user:n,project:o,committish:l,editpath:h})=>`https://${r}/${n}/${o}${s("/",u(l))}/${h}`,"edittemplate"),browsetemplate:v(({domain:r,project:n,committish:o})=>`https://${r}/${n}${s("/",u(o))}`,"browsetemplate"),browsetreetemplate:v(({domain:r,project:n,committish:o,path:l,hashformat:h})=>`https://${r}/${n}${s("/",u(o))}${s("#",h(l))}`,"browsetreetemplate"),browseblobtemplate:v(({domain:r,project:n,committish:o,path:l,hashformat:h})=>`https://${r}/${n}${s("/",u(o))}${s("#",h(l))}`,"browseblobtemplate"),docstemplate:v(({domain:r,project:n,committish:o})=>`https://${r}/${n}${s("/",u(o))}`,"docstemplate"),httpstemplate:v(({domain:r,project:n,committish:o})=>`git+https://${r}/${n}.git${s("#",o)}`,"httpstemplate"),filetemplate:v(({user:r,project:n,committish:o,path:l})=>`https://gist.githubusercontent.com/${r}/${n}/raw${s("/",u(o))}/${l}`,"filetemplate"),shortcuttemplate:v(({type:r,project:n,committish:o})=>`${r}:${n}${s("#",o)}`,"shortcuttemplate"),pathtemplate:v(({project:r,committish:n})=>`${r}${s("#",n)}`,"pathtemplate"),bugstemplate:v(({domain:r,project:n})=>`https://${r}/${n}`,"bugstemplate"),gittemplate:v(({domain:r,project:n,committish:o})=>`git://${r}/${n}.git${s("#",o)}`,"gittemplate"),tarballtemplate:v(({project:r,committish:n})=>`https://codeload.github.com/gist/${r}/tar.gz/${u(n||"HEAD")}`,"tarballtemplate"),extract:v(r=>{let[,n,o,l]=r.pathname.split("/",4);if(l!=="raw"){if(!o){if(!n)return;o=n,n=null}return o.endsWith(".git")&&(o=o.slice(0,-4)),{user:n,project:o,committish:r.hash.slice(1)}}},"extract"),hashformat:v(function(r){return r&&"file-"+i(r)},"hashformat")},c.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:v(({domain:r,user:n,project:o,committish:l,path:h})=>`https://${r}/${n}/${o}/blob/${u(l)||"HEAD"}/${h}`,"filetemplate"),httpstemplate:v(({domain:r,user:n,project:o,committish:l})=>`https://${r}/${n}/${o}.git${s("#",l)}`,"httpstemplate"),tarballtemplate:v(({domain:r,user:n,project:o,committish:l})=>`https://${r}/${n}/${o}/archive/${u(l)||"HEAD"}.tar.gz`,"tarballtemplate"),bugstemplate:v(()=>null,"bugstemplate"),extract:v(r=>{let[,n,o,l]=r.pathname.split("/",4);if(!["archive"].includes(l)&&(o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!n||!o)))return{user:n,project:o,committish:r.hash.slice(1)}},"extract")};for(let[r,n]of Object.entries(c))c[r]=Object.assign({},a,n);t.exports=c}),Tf=K((e,t)=>{var s=require("url"),u=v((r,n,o)=>{let l=r.indexOf(o);return r.lastIndexOf(n,l>-1?l:1/0)},"lastIndexOfBefore"),i=v(r=>{try{return new s.URL(r)}catch{}},"safeUrl"),a=v((r,n)=>{let o=r.indexOf(":"),l=r.slice(0,o+1);if(Object.prototype.hasOwnProperty.call(n,l))return r;let h=r.indexOf("@");return h>-1?h>o?`git+ssh://${r}`:r:r.indexOf("//")===o+1?r:`${r.slice(0,o+1)}//${r.slice(o+1)}`},"correctProtocol"),c=v(r=>{let n=u(r,"@","#"),o=u(r,":","#");return o>n&&(r=r.slice(0,o)+"/"+r.slice(o+1)),u(r,":","#")===-1&&r.indexOf("//")===-1&&(r=`git+ssh://${r}`),r},"correctUrl");t.exports=(r,n)=>{let o=n?a(r,n):r;return i(o)||i(c(o))}}),Ox=K((e,t)=>{"use strict";var s=Tf(),u=v(i=>{let a=i.indexOf("#"),c=i.indexOf("/"),r=i.indexOf("/",c+1),n=i.indexOf(":"),o=/\s/.exec(i),l=i.indexOf("@"),h=!o||a>-1&&o.index>a,p=l===-1||a>-1&&l>a,d=n===-1||a>-1&&n>a,g=r===-1||a>-1&&r>a,m=c>0,f=a>-1?i[a-1]!=="/":!i.endsWith("/"),y=!i.startsWith(".");return h&&m&&f&&y&&p&&d&&g},"isGitHubShorthand");t.exports=(i,a,{gitHosts:c,protocols:r})=>{if(!i)return;let n=u(i)?`github:${i}`:i,o=s(n,r);if(!o)return;let l=c.byShortcut[o.protocol],h=c.byDomain[o.hostname.startsWith("www.")?o.hostname.slice(4):o.hostname],p=l||h;if(!p)return;let d=c[l||h],g=null;r[o.protocol]?.auth&&(o.username||o.password)&&(g=`${o.username}${o.password?":"+o.password:""}`);let m=null,f=null,y=null,S=null;try{if(l){let E=o.pathname.startsWith("/")?o.pathname.slice(1):o.pathname,b=E.indexOf("@");b>-1&&(E=E.slice(b+1));let _=E.lastIndexOf("/");_>-1?(f=decodeURIComponent(E.slice(0,_)),f||(f=null),y=decodeURIComponent(E.slice(_+1))):y=decodeURIComponent(E),y.endsWith(".git")&&(y=y.slice(0,-4)),o.hash&&(m=decodeURIComponent(o.hash.slice(1))),S="shortcut"}else{if(!d.protocols.includes(o.protocol))return;let E=d.extract(o);if(!E)return;f=E.user&&decodeURIComponent(E.user),y=decodeURIComponent(E.project),m=decodeURIComponent(E.committish),S=r[o.protocol]?.name||o.protocol.slice(0,-1)}}catch(E){if(E instanceof URIError)return;throw E}return[p,f,g,y,m,S,a]}}),Rx=K((e,t)=>{"use strict";var{LRUCache:s}=_f(),u=wx(),i=Ox(),a=Tf(),c=new s({max:1e3});function r(o){try{let{protocol:l,hostname:h,pathname:p}=new URL(o);if(!h)return null;let d=/(?:git\+)http:$/.test(l)?"http:":"https:",g=p.replace(/\.git$/,"");return`${d}//${h}${g}`}catch{return null}}v(r,"unknownHostedUrl");var n=class pt{static{v(this,"GitHost")}constructor(l,h,p,d,g,m,f={}){Object.assign(this,pt.#e[l],{type:l,user:h,auth:p,project:d,committish:g,default:m,opts:f})}static#e={byShortcut:{},byDomain:{}};static#t={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(l,h){pt.#e[l]=h,pt.#e.byDomain[h.domain]=l,pt.#e.byShortcut[`${l}:`]=l,pt.#t[`${l}:`]={name:l}}static fromUrl(l,h){if(typeof l!="string")return;let p=l+JSON.stringify(h||{});if(!c.has(p)){let d=i(l,h,{gitHosts:pt.#e,protocols:pt.#t});c.set(p,d?new pt(...d):void 0)}return c.get(p)}static fromManifest(l,h={}){if(!l||typeof l!="object")return;let p=l.repository,d=p&&(typeof p=="string"?p:typeof p=="object"&&typeof p.url=="string"?p.url:null);if(!d)throw new Error("no repository");let g=d&&pt.fromUrl(d.replace(/^git\+/,""),h)||null;if(g)return g;let m=r(d);return pt.fromUrl(m,h)||m}static parseUrl(l){return a(l)}#r(l,h){if(typeof l!="function")return null;let p={...this,...this.opts,...h};p.path||(p.path=""),p.path.startsWith("/")&&(p.path=p.path.slice(1)),p.noCommittish&&(p.committish=null);let d=l(p);return p.noGitPlus&&d.startsWith("git+")?d.slice(4):d}hash(){return this.committish?`#${this.committish}`:""}ssh(l){return this.#r(this.sshtemplate,l)}sshurl(l){return this.#r(this.sshurltemplate,l)}browse(l,...h){return typeof l!="string"?this.#r(this.browsetemplate,l):typeof h[0]!="string"?this.#r(this.browsetreetemplate,{...h[0],path:l}):this.#r(this.browsetreetemplate,{...h[1],fragment:h[0],path:l})}browseFile(l,...h){return typeof h[0]!="string"?this.#r(this.browseblobtemplate,{...h[0],path:l}):this.#r(this.browseblobtemplate,{...h[1],fragment:h[0],path:l})}docs(l){return this.#r(this.docstemplate,l)}bugs(l){return this.#r(this.bugstemplate,l)}https(l){return this.#r(this.httpstemplate,l)}git(l){return this.#r(this.gittemplate,l)}shortcut(l){return this.#r(this.shortcuttemplate,l)}path(l){return this.#r(this.pathtemplate,l)}tarball(l){return this.#r(this.tarballtemplate,{...l,noCommittish:!1})}file(l,h){return this.#r(this.filetemplate,{...h,path:l})}edit(l,h){return this.#r(this.edittemplate,{...h,path:l})}getDefaultRepresentation(){return this.default}toString(l){return this.default&&typeof this[this.default]=="function"?this[this.default](l):this.sshurl(l)}};for(let[o,l]of Object.entries(u))n.addHost(o,l);t.exports=n}),Pf=K((e,t)=>{"use strict";var{builtinModules:s}=require("module"),u=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),i=["node_modules","favicon.ico"];function a(r){var n=[],o=[];if(r===null)return o.push("name cannot be null"),c(n,o);if(r===void 0)return o.push("name cannot be undefined"),c(n,o);if(typeof r!="string")return o.push("name must be a string"),c(n,o);if(r.length||o.push("name length must be greater than zero"),r.startsWith(".")&&o.push("name cannot start with a period"),r.match(/^_/)&&o.push("name cannot start with an underscore"),r.trim()!==r&&o.push("name cannot contain leading or trailing spaces"),i.forEach(function(d){r.toLowerCase()===d&&o.push(d+" is not a valid package name")}),s.includes(r.toLowerCase())&&n.push(r+" is a core module name"),r.length>214&&n.push("name can no longer contain more than 214 characters"),r.toLowerCase()!==r&&n.push("name can no longer contain capital letters"),/[~'!()*]/.test(r.split("/").slice(-1)[0])&&n.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(r)!==r){var l=r.match(u);if(l){var h=l[1],p=l[2];if(p.startsWith(".")&&o.push("name cannot start with a period"),encodeURIComponent(h)===h&&encodeURIComponent(p)===p)return c(n,o)}o.push("name can only contain URL-friendly characters")}return c(n,o)}v(a,"validate");var c=v(function(r,n){var o={validForNewPackages:n.length===0&&r.length===0,validForOldPackages:n.length===0,warnings:r,errors:n};return o.warnings.length||delete o.warnings,o.errors.length||delete o.errors,o},"done");t.exports=a}),Ax=K((e,t)=>{"use strict";var s=process.platform==="win32",{URL:u}=require("url"),i=s?require("path"):require("path"),{homedir:a}=require("os"),c=Rx(),r=br(),n=Pf(),{log:o}=ft(),l=s?/\\|[/]/:/[/]/,h=/^(?:git[+])?[a-z]+:/i,p=/^[^@]+@[^:.]+\.[^:]+:.+$/i,d=/[.](?:tgz|tar.gz|tar)$/i,g=/:[0-9]+(\/|$)/i,m=/^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/,f=/^(?:[.]|~[/]|[/]|[a-zA-Z]:)/,y="https://registry.npmjs.org";function S(N,D){let T,C;if(typeof N=="object")return N instanceof P&&(!D||D===N.where)?N:N.name&&N.rawSpec?S.resolve(N.name,N.rawSpec,D||N.where):S(N.raw,D||N.where);let Z=N.indexOf("@",1),X=Z>0?N.slice(0,Z):N;return h.test(N)?C=N:p.test(N)?C=`git+ssh://${N}`:!X.startsWith("@")&&(l.test(X)||d.test(X))?C=N:Z>0?(T=X,C=N.slice(Z+1)||"*"):n(N).validForOldPackages?(T=N,C="*"):C=N,_(T,C,D,N)}v(S,"npa");function E(N){return N?N.toLowerCase().startsWith("file:")?!0:s?m.test(N):f.test(N):!1}v(E,"isFileSpec");function b(N){return N?N.toLowerCase().startsWith("npm:"):!1}v(b,"isAliasSpec");function _(N,D,T,C){let Z=new P({raw:C,name:N,rawSpec:D,fromArgument:C!=null});if(N&&(Z.name=N),T||(T=process.cwd()),E(D))return M(Z,T);if(b(D))return G(Z,T);let X=c.fromUrl(D,{noGitPlus:!0,noCommittish:!0});return X?U(Z,X):D&&h.test(D)?B(Z):D&&(l.test(D)||d.test(D))?M(Z,T):W(Z)}v(_,"resolve");function O(N,D=y){let T=S(N);if(T.type!=="version")throw I(T.type,T.raw);let C="pkg:npm/"+T.name.replace(/^@/,"%40")+"@"+T.rawSpec;return D!==y&&(C+="?repository_url="+D),C}v(O,"toPurl");function w(N,D,T){let C=new Error(`Invalid package name "${N}" of package "${T}": ${D.errors.join("; ")}.`);return C.code="EINVALIDPACKAGENAME",C}v(w,"invalidPackageName");function A(N,D){let T=new Error(`Invalid tag name "${N}" of package "${D}": Tags may not have any characters that encodeURIComponent encodes.`);return T.code="EINVALIDTAGNAME",T}v(A,"invalidTagName");function I(N,D){let T=new Error(`Invalid type "${N}" of package "${D}": Purl can only be generated for "version" types.`);return T.code="EINVALIDPURLTYPE",T}v(I,"invalidPurlType");var P=class{static{v(this,"Result")}constructor(N){this.type=N.type,this.registry=N.registry,this.where=N.where,N.raw==null?this.raw=N.name?`${N.name}@${N.rawSpec}`:N.rawSpec:this.raw=N.raw,this.name=void 0,this.escapedName=void 0,this.scope=void 0,this.rawSpec=N.rawSpec||"",this.saveSpec=N.saveSpec,this.fetchSpec=N.fetchSpec,N.name&&this.setName(N.name),this.gitRange=N.gitRange,this.gitCommittish=N.gitCommittish,this.gitSubdir=N.gitSubdir,this.hosted=N.hosted}setName(N){let D=n(N);if(!D.validForOldPackages)throw w(N,D,this.raw);return this.name=N,this.scope=N[0]==="@"?N.slice(0,N.indexOf("/")):void 0,this.escapedName=N.replace("/","%2f"),this}toString(){let N=[];this.name!=null&&this.name!==""&&N.push(this.name);let D=this.saveSpec||this.fetchSpec||this.rawSpec;return D!=null&&D!==""&&N.push(D),N.length?N.join("@"):this.raw}toJSON(){let N=Object.assign({},this);return delete N.hosted,N}};function L(N,D){if(!D){N.gitCommittish=null;return}for(let T of D.split("::")){if(!T.includes(":")){if(N.gitRange)throw new Error("cannot override existing semver range with a committish");if(N.gitCommittish)throw new Error("cannot override existing committish with a second committish");N.gitCommittish=T;continue}let[C,Z]=T.split(":");if(C==="semver"){if(N.gitCommittish)throw new Error("cannot override existing committish with a semver range");if(N.gitRange)throw new Error("cannot override existing semver range with a second semver range");N.gitRange=decodeURIComponent(Z);continue}if(C==="path"){if(N.gitSubdir)throw new Error("cannot override existing path with a second path");N.gitSubdir=`/${Z}`;continue}o.warn("npm-package-arg",`ignoring unknown key "${C}"`)}}v(L,"setGitAttrs");var $=new Map([["\0","%00"],[" ","%09"],[`
|
|
29
|
+
`,"%0A"],["\r","%0D"],[" ","%20"],['"',"%22"],["#","%23"],["%","%25"],["?","%3F"],["[","%5B"],["\\",s?"/":"%5C"],["]","%5D"],["^","%5E"],["|","%7C"],["~","%7E"]]);function x(N){let D="";for(let T=0;T<N.length;T++)D=`${D}${$.get(N[T])??N[T]}`;return D.startsWith("file:")?D:`file:${D}`}v(x,"pathToFileURL");function M(N,D){N.type=d.test(N.rawSpec)?"file":"directory",N.where=D;let T=x(N.rawSpec);T.startsWith("file:/")&&(/^file:\/\/[^/]/.test(T)&&(T=`file:/${T.slice(5)}`),/^\/{1,3}\.\.?(\/|$)/.test(T.slice(5))&&(T=T.replace(/^file:\/{1,3}/,"file:")));let C,Z;try{C=new u(T,`${x(i.resolve(D))}/`),Z=new u(T)}catch(k){let F=new Error("Invalid file: URL, must comply with RFC 8089");throw Object.assign(F,{raw:N.rawSpec,spec:N,where:D,originalError:k})}let X=decodeURIComponent(Z.pathname),Q=decodeURIComponent(C.pathname);return s&&(X=X.replace(/^\/+([a-z]:\/)/i,"$1"),Q=Q.replace(/^\/+([a-z]:\/)/i,"$1")),/^\/~(\/|$)/.test(X)?(N.saveSpec=`file:${X.substr(1)}`,Q=i.resolve(a(),X.substr(3))):i.isAbsolute(T.slice(5))?N.saveSpec=`file:${i.resolve(Q)}`:N.saveSpec=`file:${i.relative(D,Q)}`,N.fetchSpec=i.resolve(D,Q),N.saveSpec=N.saveSpec.split("\\").join("/"),N.saveSpec.startsWith("file://")&&(N.saveSpec=`file:/${N.saveSpec.slice(7)}`),N}v(M,"fromFile");function U(N,D){return N.type="git",N.hosted=D,N.saveSpec=D.toString({noGitPlus:!1,noCommittish:!1}),N.fetchSpec=D.getDefaultRepresentation()==="shortcut"?null:D.toString(),L(N,D.committish),N}v(U,"fromHostedGit");function V(N,D){let T=new Error(`Unsupported URL Type "${N}": ${D}`);return T.code="EUNSUPPORTEDPROTOCOL",T}v(V,"unsupportedURLType");function B(N){let D=N.rawSpec;if(N.saveSpec=D,D.startsWith("git+ssh:")){let C=D.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i);if(C&&!C[1].match(g))return N.type="git",L(N,C[2]),N.fetchSpec=C[1],N}else D.startsWith("git+file://")&&(D=D.replace(/\\/g,"/"));let T=new u(D);switch(T.protocol){case"git:":case"git+http:":case"git+https:":case"git+rsync:":case"git+ftp:":case"git+file:":case"git+ssh:":N.type="git",L(N,T.hash.slice(1)),T.protocol==="git+file:"&&/^git\+file:\/\/[a-z]:/i.test(D)?N.fetchSpec=`git+file://${T.host.toLowerCase()}:${T.pathname}`:(T.hash="",N.fetchSpec=T.toString()),N.fetchSpec.startsWith("git+")&&(N.fetchSpec=N.fetchSpec.slice(4));break;case"http:":case"https:":N.type="remote",N.fetchSpec=N.saveSpec;break;default:throw V(T.protocol,D)}return N}v(B,"fromURL");function G(N,D){let T=S(N.rawSpec.substr(4),D);if(T.type==="alias")throw new Error("nested aliases not supported");if(!T.registry)throw new Error("aliases only work for registry deps");if(!T.name)throw new Error("aliases must have a name");return N.subSpec=T,N.registry=!0,N.type="alias",N.saveSpec=null,N.fetchSpec=null,N}v(G,"fromAlias");function W(N){N.registry=!0;let D=N.rawSpec.trim();N.saveSpec=null,N.fetchSpec=D;let T=r.valid(D,!0),C=r.validRange(D,!0);if(T)N.type="version";else if(C)N.type="range";else{if(encodeURIComponent(D)!==D)throw A(D,N.raw);N.type="tag"}return N}v(W,"fromRegistry"),t.exports=S,t.exports.resolve=_,t.exports.toPurl=O,t.exports.Result=P}),Cx=K((e,t)=>{var s=require("process"),u=require("os"),i=require("fs");function a(g){return g.includes("libc.musl-")||g.includes("ld-musl-")}v(a,"isMusl");function c(){return s.platform}v(c,"os");function r(){return s.arch}v(r,"cpu");var n="/usr/bin/ldd";function o(){try{let g=i.readFileSync(n,"utf-8");return g.includes("musl")?"musl":g.includes("GNU C Library")?"glibc":null}catch{return}}v(o,"getFamilyFromFilesystem");function l(){let g=s.report.excludeNetwork;s.report.excludeNetwork=!0;let m=s.report.getReport();return s.report.excludeNetwork=g,m.header?.glibcVersionRuntime?h="glibc":Array.isArray(m.sharedObjects)&&m.sharedObjects.some(a)?h="musl":h=null,h}v(l,"getFamilyFromReport");var h;function p(g){if(g==="linux")return h===void 0&&(h=o(),h===void 0&&(h=l())),h}v(p,"libc");function d(g={}){let m=g.os||c();return{cpu:{name:g.cpu||r()},libc:{name:g.libc||p(m)},os:{name:m,version:g.osVersion||u.release()},packageManager:{name:"npm",version:g.npmVersion},runtime:{name:"node",version:g.nodeVersion||s.version}}}v(d,"devEngines"),t.exports={cpu:r,libc:p,os:c,devEngines:d}}),Ix=K((e,t)=>{var s=as(),u=Cf(),i=["ignore","warn","error","download"],a=["name","version","onFail"],c=["packageManager","runtime","cpu","libc","os"];function r(o,l,h){let{engine:p}=h;if(typeof o!="object"||o===null||Array.isArray(o))throw new Error(`Invalid non-object value for "${p}"`);let d=Object.keys(o);for(let g of d)if(!a.includes(g))throw new Error(`Invalid property "${g}" for "${p}"`);if(!d.includes("name"))throw new Error(`Missing "name" property for "${p}"`);if(typeof o.name!="string")throw new Error(`Invalid non-string value for "name" within "${p}"`);if(typeof l.name!="string"||l.name==="")throw new Error(`Unable to determine "name" for "${p}"`);if(d.includes("onFail")){if(typeof o.onFail!="string")throw new Error(`Invalid non-string value for "onFail" within "${p}"`);if(!i.includes(o.onFail))throw new Error(`Invalid onFail value "${o.onFail}" for "${p}"`)}if(o.name!==l.name)return new Error(`Invalid name "${o.name}" does not match "${l.name}" for "${p}"`);if(d.includes("version")){if(typeof o.version!="string")throw new Error(`Invalid non-string value for "version" within "${p}"`);if(typeof l.version!="string"||l.version==="")throw new Error(`Unable to determine "version" for "${p}" "${o.name}"`);if(u(o.version)){if(!s(l.version,o.version,h.semver))return new Error(`Invalid semver version "${o.version}" does not match "${l.version}" for "${p}"`)}else if(o.version!==l.version)return new Error(`Invalid version "${o.version}" does not match "${l.version}" for "${p}"`)}}v(r,"checkDependency");function n(o,l={},h={}){if(typeof o!="object"||o===null||Array.isArray(o))throw new Error('Invalid non-object value for "devEngines"');let p=[];for(let d of Object.keys(o)){if(!c.includes(d))throw new Error(`Invalid property "devEngines.${d}"`);let g=o[d],m=[g].flat(),f=l[d]||{};if(m.length===0)continue;let y=[];for(let S of m){let E=r(S,f,{...h,engine:d});E&&y.push(E)}if(y.length===m.length){let S=m[m.length-1].onFail||"error";S==="download"&&(S="error");let E=Object.assign(new Error(`Invalid devEngines.${d}`),{errors:y,engine:d,isWarn:S==="warn",isError:S==="error",current:f,required:g});p.push(E)}}return p}v(n,"checkDevEngines"),t.exports={checkDevEngines:n}}),Tx=K((e,t)=>{var s=br(),u=Cx(),{checkDevEngines:i}=Ix(),a=v((n,o,l,h=!1)=>{let p=h?null:l,d=n.engines,g={includePrerelease:!0};if(!d)return;let m=p&&d.node&&!s.satisfies(p,d.node,g),f=o&&d.npm&&!s.satisfies(o,d.npm,g);if(m||f)throw Object.assign(new Error("Unsupported engine"),{pkgid:n._id,current:{node:l,npm:o},required:d,code:"EBADENGINE"})},"checkEngine"),c=v((n,o=!1,l={})=>{if(o)return;let h=l.os||u.os(),p=l.cpu||u.cpu(),d=l.libc||u.libc(h),g=n.os?r(h,n.os):!0,m=n.cpu?r(p,n.cpu):!0,f=n.libc?r(d,n.libc):!0;if(n.libc&&!d&&(f=!1),!g||!m||!f)throw Object.assign(new Error("Unsupported platform"),{pkgid:n._id,current:{os:h,cpu:p,libc:d},required:{os:n.os,cpu:n.cpu,libc:n.libc},code:"EBADPLATFORM"})},"checkPlatform"),r=v((n,o)=>{if(typeof o=="string"&&(o=[o]),o.length===1&&o[0]==="any")return!0;let l=0,h=!1;for(let p of o){let d=p.charAt(0)==="!",g=d?p.slice(1):p;if(d){if(l++,n===g)return!1}else h=h||n===g}return h||l===o.length},"checkList");t.exports={checkEngine:a,checkPlatform:c,checkDevEngines:i,currentEnv:u}}),Al=K((e,t)=>{var{join:s,basename:u}=require("path"),i=v(o=>o.bin?typeof o.bin=="string"?a(o):Array.isArray(o.bin)?c(o):typeof o.bin=="object"?n(o):r(o):r(o),"normalize"),a=v(o=>o.name?(o.bin={[o.name]:o.bin},n(o)):r(o),"normalizeString"),c=v(o=>(o.bin=o.bin.reduce((l,h)=>(l[u(h)]=h,l),{}),n(o)),"normalizeArray"),r=v(o=>(delete o.bin,o),"removeBin"),n=v(o=>{let l=o.bin,h={},p=!1;return Object.keys(l).forEach(d=>{let g=s("/",u(d.replace(/\\|:/g,"/"))).slice(1);if(typeof l[d]!="string"||!g)return;let m=s("/",l[d].replace(/\\/g,"/")).replace(/\\/g,"/").slice(1);m&&(h[g]=m,p=!0)}),p?o.bin=h:delete o.bin,o},"normalizeObject");t.exports=i}),Cl=K((e,t)=>{"use strict";var s=Ax(),u=br(),{checkEngine:i}=Tx(),a=Al(),c=v((p,d,g)=>{try{return i(p,d,g),!0}catch{return!1}},"engineOk"),r=v((p,d,g)=>!p||!p[d]||Date.parse(p[d])<=g,"isBefore"),n={includePrerelease:!0,loose:!0},o=v((p,d)=>d&&u.satisfies(p,d,n),"shouldAvoid"),l=v((p,d)=>p&&o(p.version,d)?{...p,_shouldAvoid:!0}:p,"decorateAvoid"),h=v((p,d,g)=>{let{defaultTag:m="latest",before:f=null,nodeVersion:y=process.version,npmVersion:S=null,includeStaged:E=!1,avoid:b=null,avoidStrict:_=!1}=g,{name:O,time:w}=p,A=p.versions||{};if(_){let W={...g,avoidStrict:!1},N=h(p,d,W);if(!N||!N._shouldAvoid)return N;let D=h(p,`^${N.version}`,W);if(!D||!D._shouldAvoid)return{...D,_outsideDependencyRange:!0,_isSemVerMajor:!1};let T=h(p,"*",W);if(!T||!T._shouldAvoid)return{...T,_outsideDependencyRange:!0,_isSemVerMajor:!0};throw Object.assign(new Error(`No avoidable versions for ${O}`),{code:"ETARGET",name:O,wanted:d,avoid:b,before:f,versions:Object.keys(A)})}let I=E&&p.stagedVersions&&p.stagedVersions.versions||{},P=p.policyRestrictions&&p.policyRestrictions.versions||{},L=f&&w?+new Date(f):1/0,$=s.resolve(O,d||m).type,x=p["dist-tags"]||{};if($!=="tag"&&$!=="version"&&$!=="range")throw new Error("Only tag, version, and range are supported");if(d&&$==="tag"){let W=x[d];return r(w,W,L)?l(A[W]||I[W]||P[W],b):h(p,`<=${W}`,g)}if(d&&$==="version"){let W=u.clean(d,{loose:!0}),N=A[W]||I[W]||P[W];return r(w,W,L)?l(N,b):null}let M=$==="range"?d:"*",U=x[m];if(U&&(M==="*"||u.satisfies(U,M,{loose:!0}))&&!P[U]&&!o(U,b)){let W=A[U];if(W&&r(w,U,L)&&c(W,S,y)&&!W.deprecated&&!I[U])return W}let V=Object.entries(A).concat(Object.entries(I)).concat(Object.entries(P)).filter(([W])=>r(w,W,L));if(!V.length)throw Object.assign(new Error(`No versions available for ${O}`),{code:"ENOVERSIONS",name:O,type:$,wanted:d,before:f,versions:Object.keys(A)});let B={loose:!0},G=V.filter(([W])=>u.satisfies(W,M,{loose:!0})).sort((W,N)=>{let[D,T]=W,[C,Z]=N,X=!o(D,b),Q=!o(C,b),k=!P[D],F=!P[C],z=!I[D],j=!I[C],q=!T.deprecated,J=!Z.deprecated,Y=c(T,S,y),R=c(Z,S,y);return Q-X||F-k||j-z||(J&&R)-(q&&Y)||R-Y||J-q||u.rcompare(D,C,B)});return l(G[0]&&G[0][1],b)},"pickManifest");t.exports=(p,d,g={})=>{let m=h(p,d,g),f=m&&a(m),y=p.policyRestrictions,S=y&&y.versions||{};if(f&&!S[f.version])return f;let{before:E=null,defaultTag:b="latest"}=g,_=E?new Date(E).toLocaleString():"",{name:O}=p,w=`${O}@${d}`+(E?` with a date before ${_}`:""),A=f&&!!S[f.version],I=A?y.message:"",P=A?`Could not download ${w} due to policy violations:
|
|
30
|
+
${I}`:`No matching version found for ${w}.`,L=A?"E403":"ETARGET";throw Object.assign(new Error(P),{code:L,type:s.resolve(p.name,d).type,wanted:d,versions:Object.keys(p.versions??{}),name:O,distTags:p["dist-tags"],defaultTag:b})}}),Px=K((e,t)=>{var s=new Set(["github.com","gist.github.com","gitlab.com","bitbucket.com","bitbucket.org"]),{parse:u}=require("url"),i=require("path"),a=If(),c=ji(),{isWindows:r}=_x(),n=Cl(),o=require("internal/fs/promises");t.exports=(E,b="HEAD",_=null,O={})=>a(E,O).then(w=>p(E,w,b,d(w,b,O),_||h(E,O.cwd),O));var l=v((E,b)=>b.gitShallow===!1||b.gitShallow?b.gitShallow:s.has(u(E).host),"maybeShallow"),h=v((E,b=process.cwd())=>i.resolve(b,i.basename(E.replace(/[/\\]?\.git$/,""))),"defaultTarget"),p=v((E,b,_,O,w,A)=>O?O.sha===b.refs.HEAD.sha?f(E,O,w,A):O.type==="tag"||O.type==="branch"?m(E,O,w,A):g(E,O,w,A):S(E,_,w,A),"clone"),d=v((E,b,_)=>{let{spec:O={}}=_;return b=O.gitCommittish||b,E?O.gitRange?n(E,O.gitRange,_):b?E.refs[b]?E.refs[b]:E.shas[b]?E.refs[E.shas[b][0]]:null:E.refs.HEAD:null},"resolveRef"),g=v((E,b,_,O)=>{let w=l(E,O),A=["fetch","origin",b.rawRef].concat(w?["--depth=1"]:[]),I=v(P=>c(P,{...O,cwd:_}),"git");return o.mkdir(_,{recursive:!0}).then(()=>I(["init"])).then(()=>r(O)?I(["config","--local","--add","core.longpaths","true"]):null).then(()=>I(["remote","add","origin",E])).then(()=>I(A)).then(()=>I(["checkout",b.sha])).then(()=>y(_,O)).then(()=>b.sha)},"other"),m=v((E,b,_,O)=>{let w=["clone","-b",b.ref,E,_,"--recurse-submodules"];return l(E,O)&&w.push("--depth=1"),r(O)&&w.push("--config","core.longpaths=true"),c(w,O).then(()=>b.sha)},"branch"),f=v((E,b,_,O)=>{let w=["clone",E,_,"--recurse-submodules"];return l(E,O)&&w.push("--depth=1"),r(O)&&w.push("--config","core.longpaths=true"),c(w,O).then(()=>b.sha)},"plain"),y=v(async(E,b)=>await o.stat(`${E}/.gitmodules`).then(()=>!0).catch(()=>!1)?c(["submodule","update","-q","--init","--recursive"],{...b,cwd:E}):null,"updateSubmodules"),S=v((E,b,_,O)=>{let w=r(O)?["--config","core.longpaths=true"]:[],A=["clone","--mirror","-q",E,_+"/.git"],I=v(P=>c(P,{...O,cwd:_}),"git");return o.mkdir(_,{recursive:!0}).then(()=>I(A.concat(w))).then(()=>I(["init"])).then(()=>I(["checkout",b])).then(()=>y(_,O)).then(()=>I(["rev-parse","--revs-only","HEAD"])).then(({stdout:P})=>P.trim())},"unresolved")}),xf=K((e,t)=>{var{stat:s}=require("internal/fs/promises");t.exports=({cwd:u=process.cwd()}={})=>s(u+"/.git").then(()=>!0,()=>!1)}),xx=K((e,t)=>{var s=xf(),{dirname:u}=require("path");t.exports=async({cwd:i=process.cwd(),root:a}={})=>{for(;;){if(await s({cwd:i}))return i;let c=u(i);if(i===a||i===c)return null;i=c}}}),Nx=K((e,t)=>{var s=ji();t.exports=(u={})=>s(["status","--porcelain=v1","-uno"],u).then(i=>!i.stdout.trim().split(/\r?\n+/).map(a=>a.trim()).filter(a=>a).length)}),Nf=K((e,t)=>{t.exports={clone:Px(),revs:If(),spawn:ji(),is:xf(),find:xx(),isClean:Nx(),errors:bf()}}),kx=K((e,t)=>{var s=of(),u=af(),i=require("internal/fs/promises"),a=require("path"),{log:c}=ft(),r=require("module"),n;function o(){return n||(n=Sl()),n}v(o,"lazyHostedGitInfo");var l;function h(){return l||(l=yf().glob),l}v(h,"lazyLoadGlob");function p(O,w){if(O.bin&&(typeof O.bin=="string"&&O.name?(w?.push('"bin" was converted to an object'),O.bin={[O.name]:O.bin}):Array.isArray(O.bin)&&(w?.push('"bin" was converted to an object'),O.bin=O.bin.reduce((A,I)=>(A[a.basename(I)]=I,A),{})),typeof O.bin=="object")){for(let A in O.bin){if(typeof O.bin[A]!="string"){delete O.bin[A],w?.push(`removed invalid "bin[${A}]"`);continue}let I=a.basename(y(A));if(!I){delete O.bin[A],w?.push(`removed invalid "bin[${A}]"`);continue}let P=y(O.bin[A]);if(!P){delete O.bin[A],w?.push(`removed invalid "bin[${A}]"`);continue}I!==A&&(delete O.bin[A],w?.push(`"bin[${A}]" was renamed to "bin[${I}]"`)),P!==O.bin[A]&&w?.push(`"bin[${I}]" script name ${P} was invalid and removed`),O.bin[I]=P}return Object.keys(O.bin).length===0&&(w?.push('empty "bin" was removed'),delete O.bin),O}delete O.bin}v(p,"normalizePackageBin");function d(O,w){if(O.man){let A=[];for(let I of Array.isArray(O.man)?O.man:[O.man])typeof I!="string"?w?.push(`removed invalid "man [${I}]"`):A.push(y(I));if(!A.length)w?.push('empty "man" was removed');else return O.man=A,O}delete O.man}v(d,"normalizePackageMan");function g(O){return!O.match(/[/@\s+%:]/)&&O===encodeURIComponent(O)}v(g,"isCorrectlyEncodedName");function m(O){if(O.charAt(0)!=="@")return!1;let w=O.slice(1).split("/");return w.length!==2?!1:w[0]&&w[1]&&w[0]===encodeURIComponent(w[0])&&w[1]===encodeURIComponent(w[1])}v(m,"isValidScopedPackageName");function f(O){return O.replace(/\\|:/g,"/")}v(f,"unixifyPath");function y(O){let w=f(a.join(".",a.join("/",f(O))));return w.startsWith("./")?"":w}v(y,"secureAndUnixifyPath");function S(O,{strict:w,steps:A,changes:I,allowLegacyCase:P}){let L=O.content,$=`${L.name??""}@${L.version??""}`;if(A.includes("fixName")||A.includes("fixNameField")||A.includes("normalizeData"))if(!L.name&&!w)I?.push('Missing "name" field was set to an empty string'),L.name="";else{if(typeof L.name!="string")throw new Error("name field must be a string.");if(!w){let x=L.name.trim();L.name!==x&&(I?.push('Whitespace was trimmed from "name"'),L.name=x)}if(L.name.startsWith(".")||!(m(L.name)||g(L.name))||w&&!P&&L.name!==L.name.toLowerCase()||L.name.toLowerCase()==="node_modules"||L.name.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(L.name))}if(A.includes("fixName")&&r.builtinModules.includes(L.name)&&c.warn("package-json",$,`Package name "${L.name}" conflicts with a Node.js built-in module name`),A.includes("fixVersionField")||A.includes("normalizeData")){let x=!w;if(!L.version)L.version="";else{if(!s(L.version,x))throw new Error(`Invalid version: "${L.version}"`);let M=u(L.version,x);M!==L.version&&(I?.push(`"version" was cleaned and set to "${M}"`),L.version=M)}}if(A.includes("_attributes"))for(let x in L)x.startsWith("_")&&(I?.push(`"${x}" was removed`),delete O.content[x]);if(A.includes("_id")&&L.name&&L.version&&(I?.push(`"_id" was set to ${$}`),L._id=$),A.includes("bundledDependencies")&&(L.bundleDependencies===void 0&&L.bundledDependencies!==void 0&&(L.bundleDependencies=L.bundledDependencies,I?.push('Deleted incorrect "bundledDependencies"')),delete L.bundledDependencies),A.includes("bundleDependencies")){let x=L.bundleDependencies;x===!1&&!A.includes("bundleDependenciesDeleteFalse")?(I?.push('"bundleDependencies" was changed from "false" to "[]"'),L.bundleDependencies=[]):x===!0?(I?.push('"bundleDependencies" was auto-populated from "dependencies"'),L.bundleDependencies=Object.keys(L.dependencies||{})):x&&typeof x=="object"?Array.isArray(x)||(I?.push('"bundleDependencies" was changed from an object to an array'),L.bundleDependencies=Object.keys(x)):"bundleDependencies"in L&&(I?.push('"bundleDependencies" was removed'),delete L.bundleDependencies)}if(A.includes("optionalDedupe")&&L.dependencies&&L.optionalDependencies&&typeof L.optionalDependencies=="object"){for(let x in L.optionalDependencies)I?.push(`optionalDependencies."${x}" was removed`),delete L.dependencies[x];Object.keys(L.dependencies).length||(I?.push('Empty "optionalDependencies" was removed'),delete L.dependencies)}if((A.includes("scripts")||A.includes("scriptpath"))&&L.scripts!==void 0){let x=/^(\.[/\\])?node_modules[/\\].bin[\\/]/;if(typeof L.scripts=="object")for(let M in L.scripts)typeof L.scripts[M]!="string"?(delete L.scripts[M],I?.push(`Invalid scripts."${M}" was removed`)):A.includes("scriptpath")&&x.test(L.scripts[M])&&(L.scripts[M]=L.scripts[M].replace(x,""),I?.push(`scripts entry "${M}" was fixed to remove node_modules/.bin reference`));else I?.push('Removed invalid "scripts"'),delete L.scripts}if(A.includes("funding")&&L.funding&&typeof L.funding=="string"&&(L.funding={url:L.funding},I?.push('"funding" was changed to an object with a url attribute')),(A.includes("fixRepositoryField")||A.includes("normalizeData"))&&(L.repositories&&(I?.push(`"repository" was set to the first entry in "repositories" (${L.repository})`),L.repository=L.repositories[0]),L.repository&&(typeof L.repository=="string"&&(I?.push('"repository" was changed from a string to an object'),L.repository={type:"git",url:L.repository}),L.repository.url))){let x=o().fromUrl(L.repository.url),M;x&&(x.getDefaultRepresentation()==="shortcut"?M=x.https():M=x.toString(),M!==L.repository.url&&(I?.push(`"repository.url" was normalized to "${M}"`),L.repository.url=M))}if(A.includes("fixDependencies")||A.includes("normalizeData")){for(let x of["dependencies","devDependencies","optionalDependencies"])if(L[x]){let M=!0;if(typeof L[x]=="string"&&(I?.push(`"${x}" was converted from a string into an object`),L[x]=L[x].trim().split(/[\n\r\s\t ,]+/),M=!1),Array.isArray(L[x])){M&&I?.push(`"${x}" was converted from an array into an object`);let U={};for(let V of L[x])if(typeof V=="string"){let B=V.trim().split(/(:?[@\s><=])/),G=B.shift(),W=B.join("").replace(/^@/,"").trim();U[G]=W}L[x]=U}}for(let x of["dependencies","devDependencies"])if(x in L)if(!L[x]||typeof L[x]!="object")I?.push(`Removed invalid "${x}"`),delete L[x];else for(let M in L[x]){typeof L[x][M]!="string"&&(I?.push(`Removed invalid "${x}.${M}"`),delete L[x][M]);let U=o().fromUrl(L[x][M])?.toString();U&&U!==L[x][M]&&(I?.push(`Normalized git reference to "${x}.${M}"`),L[x][M]=U.toString())}}if(A.includes("normalizeData")){let{normalizeData:x}=UP();x(L,I)}}v(S,"syncSteps");async function E(O,{steps:w,root:A,changes:I}){let P=O.content,L=P.scripts||{},$=`${P.name??""}@${P.version??""}`;if(w.includes("gypfile")&&!L.install&&!L.preinstall&&P.gypfile!==!1&&(await h()("*.gyp",{cwd:O.path})).length&&(L.install="node-gyp rebuild",P.scripts=L,P.gypfile=!0,I?.push('"scripts.install" was set to "node-gyp rebuild"'),I?.push('"gypfile" was set to "true"')),w.includes("serverjs")&&!L.start)try{await i.access(a.join(O.path,"server.js")),L.start="node server.js",P.scripts=L,I?.push('"scripts.start" was set to "node server.js"')}catch{}if(w.includes("authors")&&!P.contributors)try{let x=(await i.readFile(a.join(O.path,"AUTHORS"),"utf8")).split(/\r?\n/g).map(M=>M.replace(/^\s*#.*$/,"").trim()).filter(M=>M);P.contributors=x,I?.push('"contributors" was auto-populated with the contents of the "AUTHORS" file')}catch{}if(w.includes("readme")&&!P.readme){let x=/\.m?a?r?k?d?o?w?n?$/i,M=await h()("{README,README.*}",{cwd:O.path,nocase:!0,mark:!0}),U;for(let V of M)if(!V.endsWith(a.sep)){if(V.match(x)){U=V;break}V.endsWith("README")&&(U=V)}if(U){let V=await i.readFile(a.join(O.path,U),"utf8");P.readme=V,P.readmeFilename=U,I?.push(`"readme" was set to the contents of ${U}`),I?.push(`"readmeFilename" was set to ${U}`)}P.readme||(P.readme="ERROR: No README data found!")}if(w.includes("mans")){if(P.directories?.man&&!P.man){let x=y(P.directories.man),M=a.resolve(O.path,x),U=await h()("**/*.[0-9]",{cwd:M});P.man=U.map(V=>a.relative(O.path,a.join(M,V)).split(a.sep).join("/"))}d(P,I)}if(w.includes("binDir")&&P.directories?.bin&&!P.bin){let x=y(P.directories.bin),M=await h()("**",{cwd:a.resolve(O.path,x)});P.bin=M.reduce((U,V)=>{if(V&&!V.startsWith(".")){let B=a.basename(V);U[B]=`${x}/${y(V)}`}return U},{})}else(w.includes("bin")||w.includes("binDir")||w.includes("binRefs"))&&p(P,I);if(w.includes("gitHead")&&!P.gitHead){let x=await Nf().find({cwd:O.path,root:A}),M;if(x)try{M=await i.readFile(a.resolve(x,".git/HEAD"),"utf8")}catch{}let U;if(M)if(M.startsWith("ref: ")){let V=M.replace(/^ref: /,"").trim(),B=a.resolve(x,".git",V);try{U=await i.readFile(B,"utf8"),U=U.replace(/^ref: /,"").trim()}catch{}if(!U){let G=a.resolve(x,".git/packed-refs");try{let W=await i.readFile(G,"utf8");if(W){W=W.split(`
|
|
31
|
+
`);for(let N=0;N<W.length;N++){let D=W[N].match(/^([0-9a-f]{40}) (.+)$/);if(D&&D[2].trim()===V){U=D[1];break}}}}catch{}}}else U=M.trim();U&&(P.gitHead=U)}if(w.includes("fillTypes")){let x=P.main||"index.js";if(typeof x!="string")throw new TypeError('The "main" attribute must be of type string.');let M=`./${a.join(a.dirname(x),a.basename(x,a.extname(x)))}.d.ts`;if(!("types"in P||"typings"in P))try{await i.access(a.join(O.path,M)),P.types=M.split(a.sep).join("/")}catch{}}if(w.includes("binRefs")&&P.bin instanceof Object)for(let x in P.bin)try{await i.access(a.resolve(O.path,P.bin[x]))}catch{c.warn("package-json",$,`No bin file found at ${P.bin[x]}`)}}v(E,"asyncSteps");async function b(O,w){if(!O.content)throw new Error("Can not normalize without content");await E(O,w),S(O,w)}v(b,"normalize");function _(O,w){S(O,w)}v(_,"syncNormalize"),t.exports={normalize:b,syncNormalize:_}}),Lx=K((e,t)=>{var{readFile:s}=require("internal/fs/promises"),u=sf();async function i(r){try{return await s(r,"utf8")}catch(n){throw n.message=`Could not read package.json: ${n}`,n}}v(i,"read");function a(r){try{return u(r)}catch(n){throw n.message=`Invalid package.json: ${n}`,n}}v(a,"parse");async function c(r){let n=await i(r);return a(n)}v(c,"readPackage"),t.exports={read:i,parse:a,readPackage:c}}),Dx=K((e,t)=>{function s(u){let{name:i,version:a,private:c,description:r,keywords:n,homepage:o,bugs:l,repository:h,funding:p,license:d,author:g,maintainers:m,contributors:f,type:y,imports:S,exports:E,main:b,browser:_,types:O,bin:w,man:A,directories:I,files:P,workspaces:L,scripts:$,config:x,dependencies:M,devDependencies:U,peerDependencies:V,peerDependenciesMeta:B,optionalDependencies:G,bundledDependencies:W,bundleDependencies:N,engines:D,os:T,cpu:C,publishConfig:Z,devEngines:X,licenses:Q,overrides:k,...F}=u;return{...typeof i<"u"?{name:i}:{},...typeof a<"u"?{version:a}:{},...typeof c<"u"?{private:c}:{},...typeof r<"u"?{description:r}:{},...typeof n<"u"?{keywords:n}:{},...typeof o<"u"?{homepage:o}:{},...typeof l<"u"?{bugs:l}:{},...typeof h<"u"?{repository:h}:{},...typeof p<"u"?{funding:p}:{},...typeof d<"u"?{license:d}:{},...typeof g<"u"?{author:g}:{},...typeof m<"u"?{maintainers:m}:{},...typeof f<"u"?{contributors:f}:{},...typeof y<"u"?{type:y}:{},...typeof S<"u"?{imports:S}:{},...typeof E<"u"?{exports:E}:{},...typeof b<"u"?{main:b}:{},...typeof _<"u"?{browser:_}:{},...typeof O<"u"?{types:O}:{},...typeof w<"u"?{bin:w}:{},...typeof A<"u"?{man:A}:{},...typeof I<"u"?{directories:I}:{},...typeof P<"u"?{files:P}:{},...typeof L<"u"?{workspaces:L}:{},...typeof $<"u"?{scripts:$}:{},...typeof x<"u"?{config:x}:{},...typeof M<"u"?{dependencies:M}:{},...typeof U<"u"?{devDependencies:U}:{},...typeof V<"u"?{peerDependencies:V}:{},...typeof B<"u"?{peerDependenciesMeta:B}:{},...typeof G<"u"?{optionalDependencies:G}:{},...typeof W<"u"?{bundledDependencies:W}:{},...typeof N<"u"?{bundleDependencies:N}:{},...typeof D<"u"?{engines:D}:{},...typeof T<"u"?{os:T}:{},...typeof C<"u"?{cpu:C}:{},...typeof Z<"u"?{publishConfig:Z}:{},...typeof X<"u"?{devEngines:X}:{},...typeof Q<"u"?{licenses:Q}:{},...typeof k<"u"?{overrides:k}:{},...F}}v(s,"packageSort"),t.exports={packageSort:s}}),Il=K((e,t)=>{var{readFile:s,writeFile:u}=require("internal/fs/promises"),{resolve:i}=require("path"),a=sf(),c=_P(),r=wP(),n=OP(),{normalize:o,syncNormalize:l}=kx(),{read:h,parse:p}=Lx(),{packageSort:d}=Dx(),g=new Set([c,r,n]),m=new Set([...c.knownKeys,"scripts","workspaces"]),f=class gr{static{v(this,"PackageJson")}static fixSteps=Object.freeze(["binRefs","bundleDependencies","fixName","fixVersionField","fixRepositoryField","fixDependencies","devDependencies","scriptpath"]);static normalizeSteps=Object.freeze(["_id","_attributes","bundledDependencies","bundleDependencies","optionalDedupe","scripts","funding","bin","binDir"]);static prepareSteps=Object.freeze(["_id","_attributes","bundledDependencies","bundleDependencies","bundleDependenciesDeleteFalse","gypfile","serverjs","scriptpath","authors","readme","mans","binDir","gitHead","fillTypes","normalizeData","binRefs"]);static async create(S,E={}){let b=new gr;return await b.create(S),E.data?b.update(E.data):b}static async load(S,E={}){let b=new gr;if(!E.create)return b.load(S);try{return await b.load(S)}catch(_){if(!_.message.startsWith("Could not read package.json"))throw _;return await b.create(S)}}static async fix(S,E){let b=new gr;return await b.load(S,!0),b.fix(E)}static async prepare(S,E){let b=new gr;return await b.load(S,!0),b.prepare(E)}static async normalize(S,E){let b=new gr;return await b.load(S),b.normalize(E)}#e;#t;#r="";#s=!0;async load(S,E){this.#e=S;let b;try{this.#r=await h(this.filename)}catch(_){if(!E)throw _;b=_}if(b){let _=i(this.path,"index.js"),O;try{O=await s(_,"utf8")}catch{throw b}try{this.fromComment(O)}catch{throw b}return this.#s=!1,this}return this.fromJSON(this.#r)}fromJSON(S){return this.#t=p(S),this}fromContent(S){if(!S||typeof S!="object")throw new Error("Content data must be an object");return this.#t=S,this.#s=!1,this}fromComment(S){if(S=S.split(/^\/\*\*package(?:\s|$)/m),S.length<2)throw new Error("File has no package in comments");if(S=S[1],S=S.split(/\*\*\/$/m),S.length<2)throw new Error("File has no package in comments");return S=S[0],S=S.replace(/^\s*\*/mg,""),this.#t=a(S),this}get content(){return this.#t}get path(){return this.#e}get filename(){if(this.path)return i(this.path,"package.json")}create(S){return this.#e=S,this.#t={},this}update(S){if(!this.content)throw new Error("Can not update without content. Please `load` or `create`");for(let E of g)this.#t=E({content:S,originalContent:this.content});for(let[E,b]of Object.entries(S))m.has(E)||(this.content[E]=b);return this}async save({sort:S}={}){if(!this.#s)throw new Error("No package.json to save to");let{[Symbol.for("indent")]:E,[Symbol.for("newline")]:b,..._}=this.content,O=E===void 0?" ":E,w=b===void 0?`
|
|
32
|
+
`:b,A=S?d(_):_,I=`${JSON.stringify(A,null,O)}
|
|
33
|
+
`.replace(/\n/g,w);if(I.trim()!==this.#r.trim()){let P=await u(this.filename,I);return this.#r=I,P}}syncNormalize(S={}){return S.steps=this.constructor.normalizeSteps.filter(E=>E!=="_attributes"),l(this,S),this}async normalize(S={}){return S.steps||(S.steps=this.constructor.normalizeSteps),await o(this,S),this}async prepare(S={}){return S.steps||(S.steps=this.constructor.prepareSteps),await o(this,S),this}async fix(S={}){return S.steps=this.constructor.fixSteps,await o(this,S),this}};t.exports=f}),kf=K((e,t)=>{var{Minipass:s}=xe(),u=Symbol("_data"),i=Symbol("_length"),a=class extends s{static{v(this,"Collect")}constructor(r){super(r),this[u]=[],this[i]=0}write(r,n,o){typeof n=="function"&&(o=n,n="utf8"),n||(n="utf8");let l=Buffer.isBuffer(r)?r:Buffer.from(r,n);return this[u].push(l),this[i]+=l.length,o&&o(),!0}end(r,n,o){typeof r=="function"&&(o=r,r=null),typeof n=="function"&&(o=n,n="utf8"),r&&this.write(r,n);let l=Buffer.concat(this[u],this[i]);return super.write(l),super.end(o)}};t.exports=a;var c=class extends s{static{v(this,"CollectPassThrough")}constructor(r){super(r),this[u]=[],this[i]=0}write(r,n,o){typeof n=="function"&&(o=n,n="utf8"),n||(n="utf8");let l=Buffer.isBuffer(r)?r:Buffer.from(r,n);return this[u].push(l),this[i]+=l.length,super.write(r,n,o)}end(r,n,o){typeof r=="function"&&(o=r,r=null),typeof n=="function"&&(o=n,n="utf8"),r&&this.write(r,n);let l=Buffer.concat(this[u],this[i]);return this.emit("collect",l),super.end(o)}};t.exports.PassThrough=c}),Tl=K((e,t)=>{"use strict";var s=typeof process=="object"&&process?process:{stdout:null,stderr:null},u=require("events"),i=require("stream"),a=require("string_decoder").StringDecoder,c=Symbol("EOF"),r=Symbol("maybeEmitEnd"),n=Symbol("emittedEnd"),o=Symbol("emittingEnd"),l=Symbol("emittedError"),h=Symbol("closed"),p=Symbol("read"),d=Symbol("flush"),g=Symbol("flushChunk"),m=Symbol("encoding"),f=Symbol("decoder"),y=Symbol("flowing"),S=Symbol("paused"),E=Symbol("resume"),b=Symbol("bufferLength"),_=Symbol("bufferPush"),O=Symbol("bufferShift"),w=Symbol("objectMode"),A=Symbol("destroyed"),I=Symbol("emitData"),P=Symbol("emitEnd"),L=Symbol("emitEnd2"),$=Symbol("async"),x=v(T=>Promise.resolve().then(T),"defer"),M=global._MP_NO_ITERATOR_SYMBOLS_!=="1",U=M&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),V=M&&Symbol.iterator||Symbol("iterator not implemented"),B=v(T=>T==="end"||T==="finish"||T==="prefinish","isEndish"),G=v(T=>T instanceof ArrayBuffer||typeof T=="object"&&T.constructor&&T.constructor.name==="ArrayBuffer"&&T.byteLength>=0,"isArrayBuffer"),W=v(T=>!Buffer.isBuffer(T)&&ArrayBuffer.isView(T),"isArrayBufferView"),N=class{static{v(this,"Pipe")}constructor(T,C,Z){this.src=T,this.dest=C,this.opts=Z,this.ondrain=()=>T[E](),C.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},D=class extends N{static{v(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(T,C,Z){super(T,C,Z),this.proxyErrors=X=>C.emit("error",X),T.on("error",this.proxyErrors)}};t.exports=class Lf extends i{static{v(this,"Minipass")}constructor(C){super(),this[y]=!1,this[S]=!1,this.pipes=[],this.buffer=[],this[w]=C&&C.objectMode||!1,this[w]?this[m]=null:this[m]=C&&C.encoding||null,this[m]==="buffer"&&(this[m]=null),this[$]=C&&!!C.async||!1,this[f]=this[m]?new a(this[m]):null,this[c]=!1,this[n]=!1,this[o]=!1,this[h]=!1,this[l]=null,this.writable=!0,this.readable=!0,this[b]=0,this[A]=!1}get bufferLength(){return this[b]}get encoding(){return this[m]}set encoding(C){if(this[w])throw new Error("cannot set encoding in objectMode");if(this[m]&&C!==this[m]&&(this[f]&&this[f].lastNeed||this[b]))throw new Error("cannot change encoding");this[m]!==C&&(this[f]=C?new a(C):null,this.buffer.length&&(this.buffer=this.buffer.map(Z=>this[f].write(Z)))),this[m]=C}setEncoding(C){this.encoding=C}get objectMode(){return this[w]}set objectMode(C){this[w]=this[w]||!!C}get async(){return this[$]}set async(C){this[$]=this[$]||!!C}write(C,Z,X){if(this[c])throw new Error("write after end");if(this[A])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof Z=="function"&&(X=Z,Z="utf8"),Z||(Z="utf8");let Q=this[$]?x:k=>k();return!this[w]&&!Buffer.isBuffer(C)&&(W(C)?C=Buffer.from(C.buffer,C.byteOffset,C.byteLength):G(C)?C=Buffer.from(C):typeof C!="string"&&(this.objectMode=!0)),this[w]?(this.flowing&&this[b]!==0&&this[d](!0),this.flowing?this.emit("data",C):this[_](C),this[b]!==0&&this.emit("readable"),X&&Q(X),this.flowing):C.length?(typeof C=="string"&&!(Z===this[m]&&!this[f].lastNeed)&&(C=Buffer.from(C,Z)),Buffer.isBuffer(C)&&this[m]&&(C=this[f].write(C)),this.flowing&&this[b]!==0&&this[d](!0),this.flowing?this.emit("data",C):this[_](C),this[b]!==0&&this.emit("readable"),X&&Q(X),this.flowing):(this[b]!==0&&this.emit("readable"),X&&Q(X),this.flowing)}read(C){if(this[A])return null;if(this[b]===0||C===0||C>this[b])return this[r](),null;this[w]&&(C=null),this.buffer.length>1&&!this[w]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[b])]);let Z=this[p](C||null,this.buffer[0]);return this[r](),Z}[p](C,Z){return C===Z.length||C===null?this[O]():(this.buffer[0]=Z.slice(C),Z=Z.slice(0,C),this[b]-=C),this.emit("data",Z),!this.buffer.length&&!this[c]&&this.emit("drain"),Z}end(C,Z,X){return typeof C=="function"&&(X=C,C=null),typeof Z=="function"&&(X=Z,Z="utf8"),C&&this.write(C,Z),X&&this.once("end",X),this[c]=!0,this.writable=!1,(this.flowing||!this[S])&&this[r](),this}[E](){this[A]||(this[S]=!1,this[y]=!0,this.emit("resume"),this.buffer.length?this[d]():this[c]?this[r]():this.emit("drain"))}resume(){return this[E]()}pause(){this[y]=!1,this[S]=!0}get destroyed(){return this[A]}get flowing(){return this[y]}get paused(){return this[S]}[_](C){this[w]?this[b]+=1:this[b]+=C.length,this.buffer.push(C)}[O](){return this.buffer.length&&(this[w]?this[b]-=1:this[b]-=this.buffer[0].length),this.buffer.shift()}[d](C){do;while(this[g](this[O]()));!C&&!this.buffer.length&&!this[c]&&this.emit("drain")}[g](C){return C?(this.emit("data",C),this.flowing):!1}pipe(C,Z){if(this[A])return;let X=this[n];return Z=Z||{},C===s.stdout||C===s.stderr?Z.end=!1:Z.end=Z.end!==!1,Z.proxyErrors=!!Z.proxyErrors,X?Z.end&&C.end():(this.pipes.push(Z.proxyErrors?new D(this,C,Z):new N(this,C,Z)),this[$]?x(()=>this[E]()):this[E]()),C}unpipe(C){let Z=this.pipes.find(X=>X.dest===C);Z&&(this.pipes.splice(this.pipes.indexOf(Z),1),Z.unpipe())}addListener(C,Z){return this.on(C,Z)}on(C,Z){let X=super.on(C,Z);return C==="data"&&!this.pipes.length&&!this.flowing?this[E]():C==="readable"&&this[b]!==0?super.emit("readable"):B(C)&&this[n]?(super.emit(C),this.removeAllListeners(C)):C==="error"&&this[l]&&(this[$]?x(()=>Z.call(this,this[l])):Z.call(this,this[l])),X}get emittedEnd(){return this[n]}[r](){!this[o]&&!this[n]&&!this[A]&&this.buffer.length===0&&this[c]&&(this[o]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[h]&&this.emit("close"),this[o]=!1)}emit(C,Z,...X){if(C!=="error"&&C!=="close"&&C!==A&&this[A])return;if(C==="data")return Z?this[$]?x(()=>this[I](Z)):this[I](Z):!1;if(C==="end")return this[P]();if(C==="close"){if(this[h]=!0,!this[n]&&!this[A])return;let k=super.emit("close");return this.removeAllListeners("close"),k}else if(C==="error"){this[l]=Z;let k=super.emit("error",Z);return this[r](),k}else if(C==="resume"){let k=super.emit("resume");return this[r](),k}else if(C==="finish"||C==="prefinish"){let k=super.emit(C);return this.removeAllListeners(C),k}let Q=super.emit(C,Z,...X);return this[r](),Q}[I](C){for(let X of this.pipes)X.dest.write(C)===!1&&this.pause();let Z=super.emit("data",C);return this[r](),Z}[P](){this[n]||(this[n]=!0,this.readable=!1,this[$]?x(()=>this[L]()):this[L]())}[L](){if(this[f]){let Z=this[f].end();if(Z){for(let X of this.pipes)X.dest.write(Z);super.emit("data",Z)}}for(let Z of this.pipes)Z.end();let C=super.emit("end");return this.removeAllListeners("end"),C}collect(){let C=[];this[w]||(C.dataLength=0);let Z=this.promise();return this.on("data",X=>{C.push(X),this[w]||(C.dataLength+=X.length)}),Z.then(()=>C)}concat(){return this[w]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(C=>this[w]?Promise.reject(new Error("cannot concat in objectMode")):this[m]?C.join(""):Buffer.concat(C,C.dataLength))}promise(){return new Promise((C,Z)=>{this.on(A,()=>Z(new Error("stream destroyed"))),this.on("error",X=>Z(X)),this.on("end",()=>C())})}[U](){return{next:v(()=>{let C=this.read();if(C!==null)return Promise.resolve({done:!1,value:C});if(this[c])return Promise.resolve({done:!0});let Z=null,X=null,Q=v(j=>{this.removeListener("data",k),this.removeListener("end",F),X(j)},"onerr"),k=v(j=>{this.removeListener("error",Q),this.removeListener("end",F),this.pause(),Z({value:j,done:!!this[c]})},"ondata"),F=v(()=>{this.removeListener("error",Q),this.removeListener("data",k),Z({done:!0})},"onend"),z=v(()=>Q(new Error("stream destroyed")),"ondestroy");return new Promise((j,q)=>{X=q,Z=j,this.once(A,z),this.once("error",Q),this.once("end",F),this.once("data",k)})},"next")}}[V](){return{next:v(()=>{let C=this.read();return{value:C,done:C===null}},"next")}}destroy(C){return this[A]?(C?this.emit("error",C):this.emit(A),this):(this[A]=!0,this.buffer.length=0,this[b]=0,typeof this.close=="function"&&!this[h]&&this.close(),C?this.emit("error",C):this.emit(A),this)}static isStream(C){return!!C&&(C instanceof Lf||C instanceof i||C instanceof u&&(typeof C.pipe=="function"||typeof C.write=="function"&&typeof C.end=="function"))}}}),ls=K((e,t)=>{var s=Tl(),u=require("events"),i=v(f=>f&&f instanceof u&&(typeof f.pipe=="function"||typeof f.write=="function"&&typeof f.end=="function"),"isStream"),a=Symbol("_head"),c=Symbol("_tail"),r=Symbol("_linkStreams"),n=Symbol("_setHead"),o=Symbol("_setTail"),l=Symbol("_onError"),h=Symbol("_onData"),p=Symbol("_onEnd"),d=Symbol("_onDrain"),g=Symbol("_streams"),m=class extends s{static{v(this,"Pipeline")}constructor(f,...y){i(f)&&(y.unshift(f),f={}),super(f),this[g]=[],y.length&&this.push(...y)}[r](f){return f.reduce((y,S)=>(y.on("error",E=>S.emit("error",E)),y.pipe(S),S))}push(...f){this[g].push(...f),this[c]&&f.unshift(this[c]);let y=this[r](f);this[o](y),this[a]||this[n](f[0])}unshift(...f){this[g].unshift(...f),this[a]&&f.push(this[a]);let y=this[r](f);this[n](f[0]),this[c]||this[o](y)}destroy(f){return this[g].forEach(y=>typeof y.destroy=="function"&&y.destroy()),super.destroy(f)}[o](f){this[c]=f,f.on("error",y=>this[l](f,y)),f.on("data",y=>this[h](f,y)),f.on("end",()=>this[p](f)),f.on("finish",()=>this[p](f))}[l](f,y){f===this[c]&&this.emit("error",y)}[h](f,y){f===this[c]&&super.write(y)}[p](f){f===this[c]&&super.end()}pause(){return super.pause(),this[c]&&this[c].pause&&this[c].pause()}emit(f,...y){return f==="resume"&&this[c]&&this[c].resume&&this[c].resume(),super.emit(f,...y)}[n](f){this[a]=f,f.on("drain",()=>this[d](f))}[d](f){f===this[a]&&this.emit("drain")}write(f,y,S){return this[a].write(f,y,S)&&(this.flowing||this.buffer.length===0)}end(f,y,S){return this[a].end(f,y,S),this}};t.exports=m}),It=K((e,t)=>{"use strict";var s=require("crypto"),{Minipass:u}=xe(),i=["sha512","sha384","sha256"],a=["sha512"],c=/^[a-z0-9+/]+(?:=?=?)$/i,r=/^([a-z0-9]+)-([^?]+)([?\S*]*)$/,n=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/,o=/^[\x21-\x7E]+$/,l=v($=>$?.length?`?${$.join("?")}`:"","getOptString"),h=class extends u{static{v(this,"IntegrityStream")}#e;#t;#r;constructor($){super(),this.size=0,this.opts=$,this.#s(),$?.algorithms?this.algorithms=[...$.algorithms]:this.algorithms=[...a],this.algorithm!==null&&!this.algorithms.includes(this.algorithm)&&this.algorithms.push(this.algorithm),this.hashes=this.algorithms.map(s.createHash)}#s(){this.sri=this.opts?.integrity?m(this.opts?.integrity,this.opts):null,this.expectedSize=this.opts?.size,this.sri?this.sri.isHash?(this.goodSri=!0,this.algorithm=this.sri.algorithm):(this.goodSri=!this.sri.isEmpty(),this.algorithm=this.sri.pickAlgorithm(this.opts)):this.algorithm=null,this.digests=this.goodSri?this.sri[this.algorithm]:null,this.optString=l(this.opts?.options)}on($,x){return $==="size"&&this.#t?x(this.#t):$==="integrity"&&this.#e?x(this.#e):$==="verified"&&this.#r?x(this.#r):super.on($,x)}emit($,x){return $==="end"&&this.#i(),super.emit($,x)}write($){return this.size+=$.length,this.hashes.forEach(x=>x.update($)),super.write($)}#i(){this.goodSri||this.#s();let $=m(this.hashes.map((M,U)=>`${this.algorithms[U]}-${M.digest("base64")}${this.optString}`).join(" "),this.opts),x=this.goodSri&&$.match(this.sri,this.opts);if(typeof this.expectedSize=="number"&&this.size!==this.expectedSize){let M=new Error(`stream size mismatch when checking ${this.sri}.
|
|
34
|
+
Wanted: ${this.expectedSize}
|
|
35
|
+
Found: ${this.size}`);M.code="EBADSIZE",M.found=this.size,M.expected=this.expectedSize,M.sri=this.sri,this.emit("error",M)}else if(this.sri&&!x){let M=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${$}. (${this.size} bytes)`);M.code="EINTEGRITY",M.found=$,M.expected=this.digests,M.algorithm=this.algorithm,M.sri=this.sri,this.emit("error",M)}else this.#t=this.size,this.emit("size",this.size),this.#e=$,this.emit("integrity",$),x&&(this.#r=x,this.emit("verified",x))}},p=class{static{v(this,"Hash")}get isHash(){return!0}constructor($,x){let M=x?.strict;this.source=$.trim(),this.digest="",this.algorithm="",this.options=[];let U=this.source.match(M?n:r);if(!U||M&&!i.includes(U[1]))return;this.algorithm=U[1],this.digest=U[2];let V=U[3];V&&(this.options=V.slice(1).split("?"))}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}match($,x){let M=m($,x);if(!M)return!1;if(M.isIntegrity){let U=M.pickAlgorithm(x,[this.algorithm]);return U&&M[U].find(B=>B.digest===this.digest)||!1}return M.digest===this.digest?M:!1}toString($){return $?.strict&&!(i.includes(this.algorithm)&&this.digest.match(c)&&this.options.every(x=>x.match(o)))?"":`${this.algorithm}-${this.digest}${l(this.options)}`}};function d($,x,M,U){let V=$!=="",B=!1,G="",W=U.length-1;for(let D=0;D<W;D++){let T=p.prototype.toString.call(U[D],M);T&&(B=!0,G+=T,G+=x)}let N=p.prototype.toString.call(U[W],M);return N&&(B=!0,G+=N),V&&B?$+x+G:$+G}v(d,"integrityHashToString");var g=class{static{v(this,"Integrity")}get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString($){let x=$?.sep||" ",M="";if($?.strict){x=x.replace(/\S+/g," ");for(let U of i)this[U]&&(M=d(M,x,$,this[U]))}else for(let U of Object.keys(this))M=d(M,x,$,this[U]);return M}concat($,x){let M=typeof $=="string"?$:y($,x);return m(`${this.toString(x)} ${M}`,x)}hexDigest(){return m(this,{single:!0}).hexDigest()}merge($,x){let M=m($,x);for(let U in M)if(this[U]){if(!this[U].find(V=>M[U].find(B=>V.digest===B.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[U]=M[U]}match($,x){let M=m($,x);if(!M)return!1;let U=M.pickAlgorithm(x,Object.keys(this));return!!U&&this[U]&&M[U]&&this[U].find(V=>M[U].find(B=>V.digest===B.digest))||!1}pickAlgorithm($,x){let M=$?.pickAlgorithm||L,U=Object.keys(this).filter(V=>x?.length?x.includes(V):!0);return U.length?U.reduce((V,B)=>M(V,B)||V):null}};t.exports.parse=m;function m($,x){if(!$)return null;if(typeof $=="string")return f($,x);if($.algorithm&&$.digest){let M=new g;return M[$.algorithm]=[$],f(y(M,x),x)}else return f(y($,x),x)}v(m,"parse");function f($,x){if(x?.single)return new p($,x);let M=$.trim().split(/\s+/).reduce((U,V)=>{let B=new p(V,x);if(B.algorithm&&B.digest){let G=B.algorithm;U[G]||(U[G]=[]),U[G].push(B)}return U},new g);return M.isEmpty()?null:M}v(f,"_parse"),t.exports.stringify=y;function y($,x){return $.algorithm&&$.digest?p.prototype.toString.call($,x):typeof $=="string"?y(m($,x),x):g.prototype.toString.call($,x)}v(y,"stringify"),t.exports.fromHex=S;function S($,x,M){let U=l(M?.options);return m(`${x}-${Buffer.from($,"hex").toString("base64")}${U}`,M)}v(S,"fromHex"),t.exports.fromData=E;function E($,x){let M=x?.algorithms||[...a],U=l(x?.options);return M.reduce((V,B)=>{let G=s.createHash(B).update($).digest("base64"),W=new p(`${B}-${G}${U}`,x);if(W.algorithm&&W.digest){let N=W.algorithm;V[N]||(V[N]=[]),V[N].push(W)}return V},new g)}v(E,"fromData"),t.exports.fromStream=b;function b($,x){let M=w(x);return new Promise((U,V)=>{$.pipe(M),$.on("error",V),M.on("error",V);let B;M.on("integrity",G=>{B=G}),M.on("end",()=>U(B)),M.resume()})}v(b,"fromStream"),t.exports.checkData=_;function _($,x,M){if(x=m(x,M),!x||!Object.keys(x).length){if(M?.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let U=x.pickAlgorithm(M),V=s.createHash(U).update($).digest("base64"),B=m({algorithm:U,digest:V}),G=B.match(x,M);if(M=M||{},G||!M.error)return G;if(typeof M.size=="number"&&$.length!==M.size){let W=new Error(`data size mismatch when checking ${x}.
|
|
36
|
+
Wanted: ${M.size}
|
|
37
|
+
Found: ${$.length}`);throw W.code="EBADSIZE",W.found=$.length,W.expected=M.size,W.sri=x,W}else{let W=new Error(`Integrity checksum failed when using ${U}: Wanted ${x}, but got ${B}. (${$.length} bytes)`);throw W.code="EINTEGRITY",W.found=B,W.expected=x,W.algorithm=U,W.sri=x,W}}v(_,"checkData"),t.exports.checkStream=O;function O($,x,M){if(M=M||Object.create(null),M.integrity=x,x=m(x,M),!x||!Object.keys(x).length)return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}));let U=w(M);return new Promise((V,B)=>{$.pipe(U),$.on("error",B),U.on("error",B);let G;U.on("verified",W=>{G=W}),U.on("end",()=>V(G)),U.resume()})}v(O,"checkStream"),t.exports.integrityStream=w;function w($=Object.create(null)){return new h($)}v(w,"integrityStream"),t.exports.create=A;function A($){let x=$?.algorithms||[...a],M=l($?.options),U=x.map(s.createHash);return{update:v(function(V,B){return U.forEach(G=>G.update(V,B)),this},"update"),digest:v(function(){return x.reduce((V,B)=>{let G=U.shift().digest("base64"),W=new p(`${B}-${G}${M}`,$);if(W.algorithm&&W.digest){let N=W.algorithm;V[N]||(V[N]=[]),V[N].push(W)}return V},new g)},"digest")}}v(A,"createIntegrity");var I=s.getHashes(),P=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter($=>I.includes($));function L($,x){return P.indexOf($.toLowerCase())>=P.indexOf(x.toLowerCase())?$:x}v(L,"getPrioritizedHash")}),$x=K((e,t)=>{(function(){var s;function u(i,a){var c=this instanceof u?this:s;if(c.reset(a),typeof i=="string"&&i.length>0&&c.hash(i),c!==this)return c}v(u,"MurmurHash3"),u.prototype.hash=function(i){var a,c,r,n,o;switch(o=i.length,this.len+=o,c=this.k1,r=0,this.rem){case 0:c^=o>r?i.charCodeAt(r++)&65535:0;case 1:c^=o>r?(i.charCodeAt(r++)&65535)<<8:0;case 2:c^=o>r?(i.charCodeAt(r++)&65535)<<16:0;case 3:c^=o>r?(i.charCodeAt(r)&255)<<24:0,c^=o>r?(i.charCodeAt(r++)&65280)>>8:0}if(this.rem=o+this.rem&3,o-=this.rem,o>0){for(a=this.h1;c=c*11601+(c&65535)*3432906752&4294967295,c=c<<15|c>>>17,c=c*13715+(c&65535)*461832192&4294967295,a^=c,a=a<<13|a>>>19,a=a*5+3864292196&4294967295,!(r>=o);)c=i.charCodeAt(r++)&65535^(i.charCodeAt(r++)&65535)<<8^(i.charCodeAt(r++)&65535)<<16,n=i.charCodeAt(r++),c^=(n&255)<<24^(n&65280)>>8;switch(c=0,this.rem){case 3:c^=(i.charCodeAt(r+2)&65535)<<16;case 2:c^=(i.charCodeAt(r+1)&65535)<<8;case 1:c^=i.charCodeAt(r)&65535}this.h1=a}return this.k1=c,this},u.prototype.result=function(){var i,a;return i=this.k1,a=this.h1,i>0&&(i=i*11601+(i&65535)*3432906752&4294967295,i=i<<15|i>>>17,i=i*13715+(i&65535)*461832192&4294967295,a^=i),a^=this.len,a^=a>>>16,a=a*51819+(a&65535)*2246770688&4294967295,a^=a>>>13,a=a*44597+(a&65535)*3266445312&4294967295,a^=a>>>16,a>>>0},u.prototype.reset=function(i){return this.h1=typeof i=="number"?i:0,this.rem=this.k1=this.len=0,this},s=new u,typeof t<"u"?t.exports=u:this.MurmurHash3=u})()}),Mx=K((e,t)=>{"use strict";var s=$x();t.exports=function(u){if(u){var i=new s(u);return("00000000"+i.result().toString(16)).slice(-8)}else return(Math.random().toString(16)+"0000000").slice(2,10)}}),Df=K((e,t)=>{var s=require("path"),u=Mx();t.exports=function(i,a,c){return s.join(i,(a?a+"-":"")+u(c))}}),$f=K((e,t)=>{t.exports={name:"cacache",version:"20.0.1","cache-version":{content:"2",index:"5"},description:"Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.",main:"lib/index.js",files:["bin/","lib/"],scripts:{test:"tap",snap:"tap",coverage:"tap","test-docker":'docker run -it --rm --name pacotest -v "$PWD":/tmp -w /tmp node:latest npm test',lint:"npm run eslint",npmclilint:"npmcli-lint",lintfix:"npm run eslint -- --fix",postsnap:"npm run lintfix --",postlint:"template-oss-check",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},repository:{type:"git",url:"git+https://github.com/npm/cacache.git"},keywords:["cache","caching","content-addressable","sri","sri hash","subresource integrity","cache","storage","store","file store","filesystem","disk cache","disk storage"],license:"ISC",dependencies:{"@npmcli/fs":"^4.0.0","fs-minipass":"^3.0.0",glob:"^11.0.3","lru-cache":"^11.1.0",minipass:"^7.0.3","minipass-collect":"^2.0.1","minipass-flush":"^1.0.5","minipass-pipeline":"^1.2.4","p-map":"^7.0.2",ssri:"^12.0.0","unique-filename":"^4.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",tap:"^16.0.0"},engines:{node:"^20.17.0 || >=22.9.0"},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",windowsCI:!1,version:"4.25.0",publish:"true"},author:"GitHub Inc.",tap:{"nyc-arg":["--exclude","tap-snapshots/**"]}}}),Mf=K((e,t)=>{"use strict";t.exports=s;function s(u){return[u.slice(0,2),u.slice(2,4),u.slice(4)]}v(s,"hashToSegments")}),cs=K((e,t)=>{"use strict";var s=$f()["cache-version"].content,u=Mf(),i=require("path"),a=It();t.exports=c;function c(n,o){let l=a.parse(o,{single:!0});return i.join(r(n),l.algorithm,...u(l.hexDigest()))}v(c,"contentPath"),t.exports.contentDir=r;function r(n){return i.join(n,`content-v${s}`)}v(r,"contentDir")}),jf=K((e,t)=>{var s=v((u,{copy:i,wrap:a})=>{let c={};if(u&&typeof u=="object")for(let r of i)u[r]!==void 0&&(c[r]=u[r]);else c[a]=u;return c},"getOptions");t.exports=s}),jx=K((e,t)=>{var s=br(),u=v(i=>s.satisfies(process.version,i,{includePrerelease:!0}),"satisfies");t.exports={satisfies:u}}),Bx=K((e,t)=>{"use strict";var{inspect:s}=require("util"),u=class{static{v(this,"SystemError")}constructor(a,c,r){let n=`${c}: ${r.syscall} returned ${r.code} (${r.message})`;r.path!==void 0&&(n+=` ${r.path}`),r.dest!==void 0&&(n+=` => ${r.dest}`),this.code=a,Object.defineProperties(this,{name:{value:"SystemError",enumerable:!1,writable:!0,configurable:!0},message:{value:n,enumerable:!1,writable:!0,configurable:!0},info:{value:r,enumerable:!0,configurable:!0,writable:!1},errno:{get(){return r.errno},set(o){r.errno=o},enumerable:!0,configurable:!0},syscall:{get(){return r.syscall},set(o){r.syscall=o},enumerable:!0,configurable:!0}}),r.path!==void 0&&Object.defineProperty(this,"path",{get(){return r.path},set(o){r.path=o},enumerable:!0,configurable:!0}),r.dest!==void 0&&Object.defineProperty(this,"dest",{get(){return r.dest},set(o){r.dest=o},enumerable:!0,configurable:!0})}toString(){return`${this.name} [${this.code}]: ${this.message}`}[Symbol.for("nodejs.util.inspect.custom")](a,c){return s(this,{...c,getters:!0,customInspect:!1})}};function i(a,c){t.exports[a]=class extends u{static{v(this,"NodeError")}constructor(r){super(a,c,r)}}}v(i,"E"),i("ERR_FS_CP_DIR_TO_NON_DIR","Cannot overwrite directory with non-directory"),i("ERR_FS_CP_EEXIST","Target already exists"),i("ERR_FS_CP_EINVAL","Invalid src or dest"),i("ERR_FS_CP_FIFO_PIPE","Cannot copy a FIFO pipe"),i("ERR_FS_CP_NON_DIR_TO_DIR","Cannot overwrite non-directory with directory"),i("ERR_FS_CP_SOCKET","Cannot copy a socket file"),i("ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY","Cannot overwrite symlink in subdirectory of self"),i("ERR_FS_CP_UNKNOWN","Cannot copy an unknown file type"),i("ERR_FS_EISDIR","Path is a directory"),t.exports.ERR_INVALID_ARG_TYPE=class extends Error{static{v(this,"ERR_INVALID_ARG_TYPE")}constructor(a,c,r){super(),this.code="ERR_INVALID_ARG_TYPE",this.message=`The ${a} argument must be ${c}. Received ${typeof r}`}}}),Ux=K((e,t)=>{"use strict";var{ERR_FS_CP_DIR_TO_NON_DIR:s,ERR_FS_CP_EEXIST:u,ERR_FS_CP_EINVAL:i,ERR_FS_CP_FIFO_PIPE:a,ERR_FS_CP_NON_DIR_TO_DIR:c,ERR_FS_CP_SOCKET:r,ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY:n,ERR_FS_CP_UNKNOWN:o,ERR_FS_EISDIR:l,ERR_INVALID_ARG_TYPE:h}=Bx(),{constants:{errno:{EEXIST:p,EISDIR:d,EINVAL:g,ENOTDIR:m}}}=require("os"),{chmod:f,copyFile:y,lstat:S,mkdir:E,readdir:b,readlink:_,stat:O,symlink:w,unlink:A,utimes:I}=require("internal/fs/promises"),{dirname:P,isAbsolute:L,join:$,parse:x,resolve:M,sep:U,toNamespacedPath:V}=require("path"),{fileURLToPath:B}=require("url"),G={dereference:!1,errorOnExist:!1,filter:void 0,force:!0,preserveTimestamps:!1,recursive:!1};async function W(ce,pe,de){if(de!=null&&typeof de!="object")throw new h("options",["Object"],de);return D(V(N(ce)),V(N(pe)),{...G,...de})}v(W,"cp");function N(ce){return ce!=null&&ce.href&&ce.origin?B(ce):ce}v(N,"getValidatedPath");async function D(ce,pe,de){de.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended","TimestampPrecisionWarning");let ye=await T(ce,pe,de),{srcStat:Ee,destStat:Te}=ye;return await k(ce,Ee,pe),de.filter?j(X,Te,ce,pe,de):X(Te,ce,pe,de)}v(D,"cpFn");async function T(ce,pe,de){let{0:ye,1:Ee}=await Z(ce,pe,de);if(Ee){if(C(ye,Ee))throw new i({message:"src and dest cannot be the same",path:pe,syscall:"cp",errno:g});if(ye.isDirectory()&&!Ee.isDirectory())throw new s({message:`cannot overwrite directory ${ce} with non-directory ${pe}`,path:pe,syscall:"cp",errno:d});if(!ye.isDirectory()&&Ee.isDirectory())throw new c({message:`cannot overwrite non-directory ${ce} with directory ${pe}`,path:pe,syscall:"cp",errno:m})}if(ye.isDirectory()&&z(ce,pe))throw new i({message:`cannot copy ${ce} to a subdirectory of self ${pe}`,path:pe,syscall:"cp",errno:g});return{srcStat:ye,destStat:Ee}}v(T,"checkPaths");function C(ce,pe){return pe.ino&&pe.dev&&pe.ino===ce.ino&&pe.dev===ce.dev}v(C,"areIdentical");function Z(ce,pe,de){let ye=de.dereference?Ee=>O(Ee,{bigint:!0}):Ee=>S(Ee,{bigint:!0});return Promise.all([ye(ce),ye(pe).catch(Ee=>{if(Ee.code==="ENOENT")return null;throw Ee})])}v(Z,"getStats");async function X(ce,pe,de,ye){let Ee=P(de);return await Q(Ee)||await E(Ee,{recursive:!0}),J(ce,pe,de,ye)}v(X,"checkParentDir");function Q(ce){return O(ce).then(()=>!0,pe=>pe.code==="ENOENT"?!1:Promise.reject(pe))}v(Q,"pathExists");async function k(ce,pe,de){let ye=M(P(ce)),Ee=M(P(de));if(Ee===ye||Ee===x(Ee).root)return;let Te;try{Te=await O(Ee,{bigint:!0})}catch(Ue){if(Ue.code==="ENOENT")return;throw Ue}if(C(pe,Te))throw new i({message:`cannot copy ${ce} to a subdirectory of self ${de}`,path:de,syscall:"cp",errno:g});return k(ce,pe,Ee)}v(k,"checkParentPaths");var F=v(ce=>M(ce).split(U).filter(Boolean),"normalizePathToArray");function z(ce,pe){let de=F(ce),ye=F(pe);return de.every((Ee,Te)=>ye[Te]===Ee)}v(z,"isSrcSubdir");async function j(ce,pe,de,ye,Ee,Te){if(await Ee.filter(de,ye))return ce(pe,de,ye,Ee,Te)}v(j,"handleFilter");function q(ce,pe,de,ye){return ye.filter?j(J,ce,pe,de,ye):J(ce,pe,de,ye)}v(q,"startCopy");async function J(ce,pe,de,ye){let Ee=await(ye.dereference?O:S)(pe);if(Ee.isDirectory()&&ye.recursive)return ue(Ee,ce,pe,de,ye);if(Ee.isDirectory())throw new l({message:`${pe} is a directory (not copied)`,path:pe,syscall:"cp",errno:g});if(Ee.isFile()||Ee.isCharacterDevice()||Ee.isBlockDevice())return Y(Ee,ce,pe,de,ye);if(Ee.isSymbolicLink())return fe(ce,pe,de);throw Ee.isSocket()?new r({message:`cannot copy a socket file: ${de}`,path:de,syscall:"cp",errno:g}):Ee.isFIFO()?new a({message:`cannot copy a FIFO pipe: ${de}`,path:de,syscall:"cp",errno:g}):new o({message:`cannot copy an unknown file type: ${de}`,path:de,syscall:"cp",errno:g})}v(J,"getStatsForCopy");function Y(ce,pe,de,ye,Ee){return pe?R(ce,de,ye,Ee):H(ce,de,ye,Ee)}v(Y,"onFile");async function R(ce,pe,de,ye){if(ye.force)return await A(de),H(ce,pe,de,ye);if(ye.errorOnExist)throw new u({message:`${de} already exists`,path:de,syscall:"cp",errno:p})}v(R,"mayCopyFile");async function H(ce,pe,de,ye){return await y(pe,de),ye.preserveTimestamps?ee(ce.mode,pe,de):he(de,ce.mode)}v(H,"_copyFile");async function ee(ce,pe,de){return ne(ce)&&await te(de,ce),ae(ce,pe,de)}v(ee,"handleTimestampsAndMode");function ne(ce){return(ce&128)===0}v(ne,"fileIsNotWritable");function te(ce,pe){return he(ce,pe|128)}v(te,"makeFileWritable");async function ae(ce,pe,de){return await re(pe,de),he(de,ce)}v(ae,"setDestTimestampsAndMode");function he(ce,pe){return f(ce,pe)}v(he,"setDestMode");async function re(ce,pe){let de=await O(ce);return I(pe,de.atime,de.mtime)}v(re,"setDestTimestamps");function ue(ce,pe,de,ye,Ee){return pe?le(de,ye,Ee):ie(ce.mode,de,ye,Ee)}v(ue,"onDir");async function ie(ce,pe,de,ye){return await E(de),await le(pe,de,ye),he(de,ce)}v(ie,"mkDirAndCopy");async function le(ce,pe,de){let ye=await b(ce);for(let Ee=0;Ee<ye.length;Ee++){let Te=ye[Ee],Ue=$(ce,Te),Qt=$(pe,Te),{destStat:Hv}=await T(Ue,Qt,de);await q(Hv,Ue,Qt,de)}}v(le,"copyDir");async function fe(ce,pe,de){let ye=await _(pe);if(L(ye)||(ye=M(P(pe),ye)),!ce)return w(ye,de);let Ee;try{Ee=await _(de)}catch(Te){if(Te.code==="EINVAL"||Te.code==="UNKNOWN")return w(ye,de);throw Te}if(L(Ee)||(Ee=M(P(de),Ee)),z(ye,Ee))throw new i({message:`cannot copy ${ye} to a subdirectory of self ${Ee}`,path:de,syscall:"cp",errno:g});if((await O(pe)).isDirectory()&&z(Ee,ye))throw new n({message:`cannot overwrite ${Ee} with ${ye}`,path:de,syscall:"cp",errno:g});return me(ye,de)}v(fe,"onLink");async function me(ce,pe){return await A(pe),w(ce,pe)}v(me,"copyLink"),t.exports=W}),Fx=K((e,t)=>{var s=require("internal/fs/promises"),u=jf(),i=jx(),a=Ux(),c=i.satisfies(">=16.7.0"),r=v(async(n,o,l)=>{let h=u(l,{copy:["dereference","errorOnExist","filter","force","preserveTimestamps","recursive"]});return c?s.cp(n,o,h):a(n,o,h)},"cp");t.exports=r}),Hx=K((e,t)=>{var{join:s,sep:u}=require("path"),i=jf(),{mkdir:a,mkdtemp:c,rm:r}=require("internal/fs/promises"),n=v(async(o,l,h)=>{let p=i(h,{copy:["tmpPrefix"]});await a(o,{recursive:!0});let d=await c(s(`${o}${u}`,p.tmpPrefix||"")),g,m;try{m=await l(d)}catch(f){g=f}try{await r(d,{force:!0,recursive:!0})}catch{}if(g)throw g;return m},"withTempDir");t.exports=n}),Gx=K((e,t)=>{var{readdir:s}=require("internal/fs/promises"),{join:u}=require("path"),i=v(async a=>{let c=[];for(let r of await s(a))if(r.startsWith("@"))for(let n of await s(u(a,r)))c.push(u(r,n));else c.push(r);return c},"readdirScoped");t.exports=i}),Vx=K((e,t)=>{var{dirname:s,join:u,resolve:i,relative:a,isAbsolute:c}=require("path"),r=require("internal/fs/promises"),n=v(async l=>{try{return await r.access(l),!0}catch(h){return h.code!=="ENOENT"}},"pathExists"),o=v(async(l,h,p={},d=!0,g=[])=>{if(!l||!h)throw new TypeError("`source` and `destination` file required");if(p={overwrite:!0,...p},!p.overwrite&&await n(h))throw new Error(`The destination file exists: ${h}`);await r.mkdir(s(h),{recursive:!0});try{await r.rename(l,h)}catch(m){if(m.code==="EXDEV"||m.code==="EPERM"){let f=await r.lstat(l);if(f.isDirectory()){let y=await r.readdir(l);await Promise.all(y.map(S=>o(u(l,S),u(h,S),p,!1,g)))}else f.isSymbolicLink()?g.push({source:l,destination:h}):await r.copyFile(l,h)}else throw m}d&&(await Promise.all(g.map(async({source:m,destination:f})=>{let y=await r.readlink(m);c(y)&&(y=i(f,a(m,y)));let S="file";try{S=await r.stat(i(s(m),y)),S.isDirectory()&&(S="junction")}catch{}await r.symlink(y,f,S)})),await r.rm(l,{recursive:!0,force:!0}))},"moveFile");t.exports=o}),Pl=K((e,t)=>{"use strict";var s=Fx(),u=Hx(),i=Gx(),a=Vx();t.exports={cp:s,withTempDir:u,readdirScoped:i,moveFile:a}}),Li={};bP(Li,{default:()=>Bf,pMapIterable:()=>Uf,pMapSkip:()=>vr});async function Bf(e,t,{concurrency:s=Number.POSITIVE_INFINITY,stopOnError:u=!0,signal:i}={}){return new Promise((a,c)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(s)&&s>=1||s===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${s}\` (${typeof s})`);let r=[],n=[],o=new Map,l=!1,h=!1,p=!1,d=0,g=0,m=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),f=v(()=>{E(i.reason)},"signalListener"),y=v(()=>{i?.removeEventListener("abort",f)},"cleanup"),S=v(_=>{a(_),y()},"resolve"),E=v(_=>{l=!0,h=!0,c(_),y()},"reject");i&&(i.aborted&&E(i.reason),i.addEventListener("abort",f,{once:!0}));let b=v(async()=>{if(h)return;let _=await m.next(),O=g;if(g++,_.done){if(p=!0,d===0&&!h){if(!u&&n.length>0){E(new AggregateError(n));return}if(h=!0,o.size===0){S(r);return}let w=[];for(let[A,I]of r.entries())o.get(A)!==vr&&w.push(I);S(w)}return}d++,(async()=>{try{let w=await _.value;if(h)return;let A=await t(w,O);A===vr&&o.set(O,A),r[O]=A,d--,await b()}catch(w){if(u)E(w);else{n.push(w),d--;try{await b()}catch(A){E(A)}}}})()},"next");(async()=>{for(let _=0;_<s;_++){try{await b()}catch(O){E(O);break}if(p||l)break}})()})}function Uf(e,t,{concurrency:s=Number.POSITIVE_INFINITY,backpressure:u=s}={}){if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(s)&&s>=1||s===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${s}\` (${typeof s})`);if(!(Number.isSafeInteger(u)&&u>=s||u===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${s}) and up or \`Infinity\`, got \`${u}\` (${typeof u})`);return{async*[Symbol.asyncIterator](){let i=e[Symbol.asyncIterator]===void 0?e[Symbol.iterator]():e[Symbol.asyncIterator](),a=[],c=0,r=!1,n=0;function o(){if(r||!(c<s&&a.length<u))return;let l=(async()=>{let{done:h,value:p}=await i.next();if(h)return{done:!0};c++,o();try{let d=await t(await p,n++);if(c--,d===vr){let g=a.indexOf(l);g>0&&a.splice(g,1)}return o(),{done:!1,value:d}}catch(d){return r=!0,{error:d}}})();a.push(l)}for(v(o,"trySpawn"),o();a.length>0;){let{error:l,done:h,value:p}=await a[0];if(a.shift(),l)throw l;if(h)return;o(),p!==vr&&(yield p)}}}}var vr,Za=EP(()=>{v(Bf,"pMap"),v(Uf,"pMapIterable"),vr=Symbol("skip")}),us=K((e,t)=>{"use strict";var s=require("crypto"),{appendFile:u,mkdir:i,readFile:a,readdir:c,rm:r,writeFile:n}=require("internal/fs/promises"),{Minipass:o}=xe(),l=require("path"),h=It(),p=Df(),d=cs(),g=Mf(),m=$f()["cache-version"].index,{moveFile:f}=Pl(),y=5;t.exports.NotFoundError=class extends Error{static{v(this,"NotFoundError")}constructor(B,G){super(`No cache entry for ${G} found in ${B}`),this.code="ENOENT",this.cache=B,this.key=G}},t.exports.compact=S;async function S(B,G,W,N={}){let D=L(B,G),T=await A(D),C=[];for(let z=T.length-1;z>=0;--z){let j=T[z];if(j.integrity===null&&!N.validateEntry)break;(!N.validateEntry||N.validateEntry(j)===!0)&&(C.length===0||!C.find(q=>W(q,j)))&&C.unshift(j)}let Z=`
|
|
38
|
+
`+C.map(z=>{let j=JSON.stringify(z);return`${x(j)} ${j}`}).join(`
|
|
39
|
+
`),X=v(async()=>{let z=p(l.join(B,"tmp"),N.tmpPrefix);return await i(l.dirname(z),{recursive:!0}),{target:z,moved:!1}},"setup"),Q=v(async z=>{if(!z.moved)return r(z.target,{recursive:!0,force:!0})},"teardown"),k=v(async z=>{await n(z.target,Z,{flag:"wx"}),await i(l.dirname(D),{recursive:!0}),await f(z.target,D),z.moved=!0},"write"),F=await X();try{await k(F)}finally{await Q(F)}return C.reverse().map(z=>U(B,z,!0))}v(S,"compact"),t.exports.insert=E;async function E(B,G,W,N={}){let{metadata:D,size:T,time:C}=N,Z=L(B,G),X={key:G,integrity:W&&h.stringify(W),time:C||Date.now(),size:T,metadata:D};try{await i(l.dirname(Z),{recursive:!0});let Q=JSON.stringify(X);await u(Z,`
|
|
40
|
+
${x(Q)} ${Q}`)}catch(Q){if(Q.code==="ENOENT")return;throw Q}return U(B,X)}v(E,"insert"),t.exports.find=b;async function b(B,G){let W=L(B,G);try{return(await A(W)).reduce((N,D)=>D&&D.key===G?U(B,D):N,null)}catch(N){if(N.code==="ENOENT")return null;throw N}}v(b,"find"),t.exports.delete=_;function _(B,G,W={}){if(!W.removeFully)return E(B,G,null,W);let N=L(B,G);return r(N,{recursive:!0,force:!0})}v(_,"del"),t.exports.lsStream=O;function O(B){let G=P(B),W=new o({objectMode:!0});return Promise.resolve().then(async()=>{let{default:N}=await Promise.resolve().then(()=>(Za(),Li)),D=await V(G);return await N(D,async T=>{let C=l.join(G,T),Z=await V(C);await N(Z,async X=>{let Q=l.join(C,X),k=await V(Q);await N(k,async F=>{let z=l.join(Q,F);try{let j=(await A(z)).reduce((q,J)=>(q.set(J.key,J),q),new Map);for(let q of j.values()){let J=U(B,q);J&&W.write(J)}}catch(j){if(j.code==="ENOENT")return;throw j}},{concurrency:y})},{concurrency:y})},{concurrency:y}),W.end(),W}).catch(N=>W.emit("error",N)),W}v(O,"lsStream"),t.exports.ls=w;async function w(B){return(await O(B).collect()).reduce((G,W)=>(G[W.key]=W,G),{})}v(w,"ls"),t.exports.bucketEntries=A;async function A(B,G){let W=await a(B,"utf8");return I(W,G)}v(A,"bucketEntries");function I(B){let G=[];return B.split(`
|
|
41
|
+
`).forEach(W=>{if(!W)return;let N=W.split(" ");if(!N[1]||x(N[1])!==N[0])return;let D;try{D=JSON.parse(N[1])}catch{}D&&G.push(D)}),G}v(I,"_bucketEntries"),t.exports.bucketDir=P;function P(B){return l.join(B,`index-v${m}`)}v(P,"bucketDir"),t.exports.bucketPath=L;function L(B,G){let W=$(G);return l.join.apply(l,[P(B)].concat(g(W)))}v(L,"bucketPath"),t.exports.hashKey=$;function $(B){return M(B,"sha256")}v($,"hashKey"),t.exports.hashEntry=x;function x(B){return M(B,"sha1")}v(x,"hashEntry");function M(B,G){return s.createHash(G).update(B).digest("hex")}v(M,"hash");function U(B,G,W){return!G.integrity&&!W?null:{key:G.key,integrity:G.integrity,path:G.integrity?d(B,G.integrity):void 0,size:G.size,time:G.time,metadata:G.metadata}}v(U,"formatEntry");function V(B){return c(B).catch(G=>{if(G.code==="ENOENT"||G.code==="ENOTDIR")return[];throw G})}v(V,"readdirOrEmpty")}),Fi=K((e,t)=>{"use strict";var{LRUCache:s}=Er(),u=new s({max:500,maxSize:50*1024*1024,ttl:180*1e3,sizeCalculation:v((h,p)=>p.startsWith("key:")?h.data.length:h.length,"sizeCalculation")});t.exports.clearMemoized=i;function i(){let h={};return u.forEach((p,d)=>{h[d]=p}),u.clear(),h}v(i,"clearMemoized"),t.exports.put=a;function a(h,p,d,g){l(g).set(`key:${h}:${p.key}`,{entry:p,data:d}),c(h,p.integrity,d,g)}v(a,"put"),t.exports.put.byDigest=c;function c(h,p,d,g){l(g).set(`digest:${h}:${p}`,d)}v(c,"putDigest"),t.exports.get=r;function r(h,p,d){return l(d).get(`key:${h}:${p}`)}v(r,"get"),t.exports.get.byDigest=n;function n(h,p,d){return l(d).get(`digest:${h}:${p}`)}v(n,"getDigest");var o=class{static{v(this,"ObjProxy")}constructor(h){this.obj=h}get(h){return this.obj[h]}set(h,p){this.obj[h]=p}};function l(h){return!h||!h.memoize?u:h.memoize.get&&h.memoize.set?h.memoize:typeof h.memoize=="object"?new o(h.memoize):u}v(l,"pickMem")}),hs=K(e=>{"use strict";var{Minipass:t}=xe(),s=require("events").EventEmitter,u=require("fs"),i=u.writev,a=Symbol("_autoClose"),c=Symbol("_close"),r=Symbol("_ended"),n=Symbol("_fd"),o=Symbol("_finished"),l=Symbol("_flags"),h=Symbol("_flush"),p=Symbol("_handleChunk"),d=Symbol("_makeBuf"),g=Symbol("_mode"),m=Symbol("_needDrain"),f=Symbol("_onerror"),y=Symbol("_onopen"),S=Symbol("_onread"),E=Symbol("_onwrite"),b=Symbol("_open"),_=Symbol("_path"),O=Symbol("_pos"),w=Symbol("_queue"),A=Symbol("_read"),I=Symbol("_readSize"),P=Symbol("_reading"),L=Symbol("_remain"),$=Symbol("_size"),x=Symbol("_write"),M=Symbol("_writing"),U=Symbol("_defaultFlag"),V=Symbol("_errored"),B=class extends t{static{v(this,"ReadStream")}constructor(D,T){if(T=T||{},super(T),this.readable=!0,this.writable=!1,typeof D!="string")throw new TypeError("path must be a string");this[V]=!1,this[n]=typeof T.fd=="number"?T.fd:null,this[_]=D,this[I]=T.readSize||16*1024*1024,this[P]=!1,this[$]=typeof T.size=="number"?T.size:1/0,this[L]=this[$],this[a]=typeof T.autoClose=="boolean"?T.autoClose:!0,typeof this[n]=="number"?this[A]():this[b]()}get fd(){return this[n]}get path(){return this[_]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[b](){u.open(this[_],"r",(D,T)=>this[y](D,T))}[y](D,T){D?this[f](D):(this[n]=T,this.emit("open",T),this[A]())}[d](){return Buffer.allocUnsafe(Math.min(this[I],this[L]))}[A](){if(!this[P]){this[P]=!0;let D=this[d]();if(D.length===0)return process.nextTick(()=>this[S](null,0,D));u.read(this[n],D,0,D.length,null,(T,C,Z)=>this[S](T,C,Z))}}[S](D,T,C){this[P]=!1,D?this[f](D):this[p](T,C)&&this[A]()}[c](){if(this[a]&&typeof this[n]=="number"){let D=this[n];this[n]=null,u.close(D,T=>T?this.emit("error",T):this.emit("close"))}}[f](D){this[P]=!0,this[c](),this.emit("error",D)}[p](D,T){let C=!1;return this[L]-=D,D>0&&(C=super.write(D<T.length?T.slice(0,D):T)),(D===0||this[L]<=0)&&(C=!1,this[c](),super.end()),C}emit(D,T){switch(D){case"prefinish":case"finish":break;case"drain":typeof this[n]=="number"&&this[A]();break;case"error":return this[V]?void 0:(this[V]=!0,super.emit(D,T));default:return super.emit(D,T)}}},G=class extends B{static{v(this,"ReadStreamSync")}[b](){let D=!0;try{this[y](null,u.openSync(this[_],"r")),D=!1}finally{D&&this[c]()}}[A](){let D=!0;try{if(!this[P]){this[P]=!0;do{let T=this[d](),C=T.length===0?0:u.readSync(this[n],T,0,T.length,null);if(!this[p](C,T))break}while(!0);this[P]=!1}D=!1}finally{D&&this[c]()}}[c](){if(this[a]&&typeof this[n]=="number"){let D=this[n];this[n]=null,u.closeSync(D),this.emit("close")}}},W=class extends s{static{v(this,"WriteStream")}constructor(D,T){T=T||{},super(T),this.readable=!1,this.writable=!0,this[V]=!1,this[M]=!1,this[r]=!1,this[m]=!1,this[w]=[],this[_]=D,this[n]=typeof T.fd=="number"?T.fd:null,this[g]=T.mode===void 0?438:T.mode,this[O]=typeof T.start=="number"?T.start:null,this[a]=typeof T.autoClose=="boolean"?T.autoClose:!0;let C=this[O]!==null?"r+":"w";this[U]=T.flags===void 0,this[l]=this[U]?C:T.flags,this[n]===null&&this[b]()}emit(D,T){if(D==="error"){if(this[V])return;this[V]=!0}return super.emit(D,T)}get fd(){return this[n]}get path(){return this[_]}[f](D){this[c](),this[M]=!0,this.emit("error",D)}[b](){u.open(this[_],this[l],this[g],(D,T)=>this[y](D,T))}[y](D,T){this[U]&&this[l]==="r+"&&D&&D.code==="ENOENT"?(this[l]="w",this[b]()):D?this[f](D):(this[n]=T,this.emit("open",T),this[M]||this[h]())}end(D,T){return D&&this.write(D,T),this[r]=!0,!this[M]&&!this[w].length&&typeof this[n]=="number"&&this[E](null,0),this}write(D,T){return typeof D=="string"&&(D=Buffer.from(D,T)),this[r]?(this.emit("error",new Error("write() after end()")),!1):this[n]===null||this[M]||this[w].length?(this[w].push(D),this[m]=!0,!1):(this[M]=!0,this[x](D),!0)}[x](D){u.write(this[n],D,0,D.length,this[O],(T,C)=>this[E](T,C))}[E](D,T){D?this[f](D):(this[O]!==null&&(this[O]+=T),this[w].length?this[h]():(this[M]=!1,this[r]&&!this[o]?(this[o]=!0,this[c](),this.emit("finish")):this[m]&&(this[m]=!1,this.emit("drain"))))}[h](){if(this[w].length===0)this[r]&&this[E](null,0);else if(this[w].length===1)this[x](this[w].pop());else{let D=this[w];this[w]=[],i(this[n],D,this[O],(T,C)=>this[E](T,C))}}[c](){if(this[a]&&typeof this[n]=="number"){let D=this[n];this[n]=null,u.close(D,T=>T?this.emit("error",T):this.emit("close"))}}},N=class extends W{static{v(this,"WriteStreamSync")}[b](){let D;if(this[U]&&this[l]==="r+")try{D=u.openSync(this[_],this[l],this[g])}catch(T){if(T.code==="ENOENT")return this[l]="w",this[b]();throw T}else D=u.openSync(this[_],this[l],this[g]);this[y](null,D)}[c](){if(this[a]&&typeof this[n]=="number"){let D=this[n];this[n]=null,u.closeSync(D),this.emit("close")}}[x](D){let T=!0;try{this[E](null,u.writeSync(this[n],D,0,D.length,this[O])),T=!1}finally{if(T)try{this[c]()}catch{}}}};e.ReadStream=B,e.ReadStreamSync=G,e.WriteStream=W,e.WriteStreamSync=N}),Ff=K((e,t)=>{"use strict";var s=require("internal/fs/promises"),u=hs(),i=It(),a=cs(),c=ls();t.exports=n;var r=64*1024*1024;async function n(f,y,S={}){let{size:E}=S,{stat:b,cpath:_,sri:O}=await d(f,y,async(A,I)=>({stat:E?{size:E}:await s.stat(A),cpath:A,sri:I}));if(b.size>r)return o(_,b.size,O,new c).concat();let w=await s.readFile(_,{encoding:null});if(b.size!==w.length)throw g(b.size,w.length);if(!i.checkData(w,O))throw m(O,_);return w}v(n,"read");var o=v((f,y,S,E)=>(E.push(new u.ReadStream(f,{size:y,readSize:r}),i.integrityStream({integrity:S,size:y})),E),"readPipeline");t.exports.stream=l,t.exports.readStream=l;function l(f,y,S={}){let{size:E}=S,b=new c;return Promise.resolve().then(async()=>{let{stat:_,cpath:O,sri:w}=await d(f,y,async(A,I)=>({stat:E?{size:E}:await s.stat(A),cpath:A,sri:I}));return o(O,_.size,w,b)}).catch(_=>b.emit("error",_)),b}v(l,"readStream"),t.exports.copy=h;function h(f,y,S){return d(f,y,E=>s.copyFile(E,S))}v(h,"copy"),t.exports.hasContent=p;async function p(f,y){if(!y)return!1;try{return await d(f,y,async(S,E)=>{let b=await s.stat(S);return{size:b.size,sri:E,stat:b}})}catch(S){if(S.code==="ENOENT")return!1;if(S.code==="EPERM"){if(process.platform!=="win32")throw S;return!1}}}v(p,"hasContent");async function d(f,y,S){let E=i.parse(y),b=E.pickAlgorithm(),_=E[b];if(_.length<=1){let O=a(f,_[0]);return S(O,_[0])}else{let O=await Promise.all(_.map(async I=>{try{return await d(f,I,S)}catch(P){return P.code==="ENOENT"?Object.assign(new Error("No matching content found for "+E.toString()),{code:"ENOENT"}):P}})),w=O.find(I=>!(I instanceof Error));if(w)return w;throw O.find(I=>I.code==="ENOENT")||O.find(I=>I instanceof Error)}}v(d,"withContentSri");function g(f,y){let S=new Error(`Bad data size: expected inserted data to be ${f} bytes, but got ${y} instead`);return S.expected=f,S.found=y,S.code="EBADSIZE",S}v(g,"sizeError");function m(f,y){let S=new Error(`Integrity verification failed for ${f} (${y})`);return S.code="EINTEGRITY",S.sri=f,S.path=y,S}v(m,"integrityError")}),Wx=K((e,t)=>{"use strict";var s=kf(),{Minipass:u}=xe(),i=ls(),a=us(),c=Fi(),r=Ff();async function n(f,y,S={}){let{integrity:E,memoize:b,size:_}=S,O=c.get(f,y,S);if(O&&b!==!1)return{metadata:O.entry.metadata,data:O.data,integrity:O.entry.integrity,size:O.entry.size};let w=await a.find(f,y,S);if(!w)throw new a.NotFoundError(f,y);let A=await r(f,w.integrity,{integrity:E,size:_});return b&&c.put(f,w,A,S),{data:A,metadata:w.metadata,size:w.size,integrity:w.integrity}}v(n,"getData"),t.exports=n;async function o(f,y,S={}){let{integrity:E,memoize:b,size:_}=S,O=c.get.byDigest(f,y,S);if(O&&b!==!1)return O;let w=await r(f,y,{integrity:E,size:_});return b&&c.put.byDigest(f,y,w,S),w}v(o,"getDataByDigest"),t.exports.byDigest=o;var l=v(f=>{let y=new u;return y.on("newListener",function(S,E){S==="metadata"&&E(f.entry.metadata),S==="integrity"&&E(f.entry.integrity),S==="size"&&E(f.entry.size)}),y.end(f.data),y},"getMemoizedStream");function h(f,y,S={}){let{memoize:E,size:b}=S,_=c.get(f,y,S);if(_&&E!==!1)return l(_);let O=new i;return Promise.resolve().then(async()=>{let w=await a.find(f,y);if(!w)throw new a.NotFoundError(f,y);O.emit("metadata",w.metadata),O.emit("integrity",w.integrity),O.emit("size",w.size),O.on("newListener",function(I,P){I==="metadata"&&P(w.metadata),I==="integrity"&&P(w.integrity),I==="size"&&P(w.size)});let A=r.readStream(f,w.integrity,{...S,size:typeof b!="number"?w.size:b});if(E){let I=new s.PassThrough;I.on("collect",P=>c.put(f,w,P,S)),O.unshift(I)}return O.unshift(A),O}).catch(w=>O.emit("error",w)),O}v(h,"getStream"),t.exports.stream=h;function p(f,y,S={}){let{memoize:E}=S,b=c.get.byDigest(f,y,S);if(b&&E!==!1){let _=new u;return _.end(b),_}else{let _=r.readStream(f,y,S);if(!E)return _;let O=new s.PassThrough;return O.on("collect",w=>c.put.byDigest(f,y,w,S)),new i(_,O)}}v(p,"getStreamDigest"),t.exports.stream.byDigest=p;function d(f,y,S={}){let{memoize:E}=S,b=c.get(f,y,S);return b&&E!==!1?Promise.resolve(b.entry):a.find(f,y)}v(d,"info"),t.exports.info=d;async function g(f,y,S,E={}){let b=await a.find(f,y,E);if(!b)throw new a.NotFoundError(f,y);return await r.copy(f,b.integrity,S,E),{metadata:b.metadata,size:b.size,integrity:b.integrity}}v(g,"copy"),t.exports.copy=g;async function m(f,y,S,E={}){return await r.copy(f,y,S,E),y}v(m,"copyByDigest"),t.exports.copy.byDigest=m,t.exports.hasContent=r.hasContent}),xl=K((e,t)=>{var s=Tl(),u=Symbol("_flush"),i=Symbol("_flushed"),a=Symbol("_flushing"),c=class extends s{static{v(this,"Flush")}constructor(r={}){if(typeof r=="function"&&(r={flush:r}),super(r),typeof r.flush!="function"&&typeof this.flush!="function")throw new TypeError("must provide flush function in options");this[u]=r.flush||this.flush}emit(r,...n){if(r!=="end"&&r!=="finish"||this[i])return super.emit(r,...n);if(this[a])return;this[a]=!0;let o=v(h=>{this[i]=!0,h?super.emit("error",h):super.emit("end")},"afterFlush"),l=this[u](o);l&&l.then&&l.then(()=>o(),h=>o(h))}};t.exports=c}),zx=K((e,t)=>{"use strict";var s=require("events"),u=cs(),i=require("internal/fs/promises"),{moveFile:a}=Pl(),{Minipass:c}=xe(),r=ls(),n=xl(),o=require("path"),l=It(),h=Df(),p=hs();t.exports=g;var d=new Map;async function g(w,A,I={}){let{algorithms:P,size:L,integrity:$}=I;if(typeof L=="number"&&A.length!==L)throw _(L,A.length);let x=l.fromData(A,P?{algorithms:P}:{});if($&&!l.checkData(A,$,I))throw O($,x);for(let M in x){let U=await E(w,I),V=x[M].toString();try{await i.writeFile(U.target,A,{flag:"wx"}),await b(U,w,V,I)}finally{U.moved||await i.rm(U.target,{recursive:!0,force:!0})}}return{integrity:x,size:A.length}}v(g,"write"),t.exports.stream=f;var m=class extends n{static{v(this,"CacacheWriteStream")}constructor(w,A){super(),this.opts=A,this.cache=w,this.inputStream=new c,this.inputStream.on("error",I=>this.emit("error",I)),this.inputStream.on("drain",()=>this.emit("drain")),this.handleContentP=null}write(w,A,I){return this.handleContentP||(this.handleContentP=y(this.inputStream,this.cache,this.opts),this.handleContentP.catch(P=>this.emit("error",P))),this.inputStream.write(w,A,I)}flush(w){this.inputStream.end(()=>{if(!this.handleContentP){let A=new Error("Cache input stream was empty");return A.code="ENODATA",Promise.reject(A).catch(w)}this.handleContentP.then(A=>{A.integrity&&this.emit("integrity",A.integrity),A.size!==null&&this.emit("size",A.size),w()},A=>w(A))})}};function f(w,A={}){return new m(w,A)}v(f,"writeStream");async function y(w,A,I){let P=await E(A,I);try{let L=await S(w,A,P.target,I);return await b(P,A,L.integrity,I),L}finally{P.moved||await i.rm(P.target,{recursive:!0,force:!0})}}v(y,"handleContent");async function S(w,A,I,P){let L=new p.WriteStream(I,{flags:"wx"});if(P.integrityEmitter){let[U,V]=await Promise.all([s.once(P.integrityEmitter,"integrity").then(B=>B[0]),s.once(P.integrityEmitter,"size").then(B=>B[0]),new r(w,L).promise()]);return{integrity:U,size:V}}let $,x,M=l.integrityStream({integrity:P.integrity,algorithms:P.algorithms,size:P.size});return M.on("integrity",U=>{$=U}),M.on("size",U=>{x=U}),await new r(w,M,L).promise(),{integrity:$,size:x}}v(S,"pipeToTmp");async function E(w,A){let I=h(o.join(w,"tmp"),A.tmpPrefix);return await i.mkdir(o.dirname(I),{recursive:!0}),{target:I,moved:!1}}v(E,"makeTmp");async function b(w,A,I){let P=u(A,I),L=o.dirname(P);return d.has(P)||d.set(P,i.mkdir(L,{recursive:!0}).then(async()=>(await a(w.target,P,{overwrite:!1}),w.moved=!0,w.moved)).catch($=>{if(!$.message.startsWith("The destination file exists"))throw Object.assign($,{code:"EEXIST"})}).finally(()=>{d.delete(P)})),d.get(P)}v(b,"moveToDestination");function _(w,A){let I=new Error(`Bad data size: expected inserted data to be ${w} bytes, but got ${A} instead`);return I.expected=w,I.found=A,I.code="EBADSIZE",I}v(_,"sizeError");function O(w,A){let I=new Error(`Integrity check failed:
|
|
42
|
+
Wanted: ${w}
|
|
43
|
+
Found: ${A}`);return I.code="EINTEGRITY",I.expected=w,I.found=A,I}v(O,"checksumError")}),qx=K((e,t)=>{"use strict";var s=us(),u=Fi(),i=zx(),a=xl(),{PassThrough:c}=kf(),r=ls(),n=v(h=>({algorithms:["sha512"],...h}),"putOpts");t.exports=o;async function o(h,p,d,g={}){let{memoize:m}=g;g=n(g);let f=await i(h,d,g),y=await s.insert(h,p,f.integrity,{...g,size:f.size});return m&&u.put(h,y,d,g),f.integrity}v(o,"putData"),t.exports.stream=l;function l(h,p,d={}){let{memoize:g}=d;d=n(d);let m,f,y,S,E=new r;if(g){let _=new c().on("collect",O=>{S=O});E.push(_)}let b=i.stream(h,d).on("integrity",_=>{m=_}).on("size",_=>{f=_}).on("error",_=>{y=_});return E.push(b),E.push(new a({async flush(){if(!y){let _=await s.insert(h,p,m,{...d,size:f});g&&S&&u.put(h,_,S,d),E.emit("integrity",m),E.emit("size",f)}}})),E}v(l,"putStream")}),Hf=K((e,t)=>{"use strict";var{glob:s}=yf(),u=require("path"),i=v(a=>a.split(u.win32.sep).join(u.posix.sep),"globify");t.exports=(a,c)=>s(i(a),c)}),Kx=K((e,t)=>{"use strict";var s=require("internal/fs/promises"),u=cs(),{hasContent:i}=Ff();t.exports=a;async function a(c,r){let n=await i(c,r);return n&&n.sri?(await s.rm(u(c,n.sri),{recursive:!0,force:!0}),!0):!1}v(a,"rm")}),Jx=K((e,t)=>{"use strict";var{rm:s}=require("internal/fs/promises"),u=Hf(),i=us(),a=Fi(),c=require("path"),r=Kx();t.exports=n,t.exports.entry=n;function n(h,p,d){return a.clearMemoized(),i.delete(h,p,d)}v(n,"entry"),t.exports.content=o;function o(h,p){return a.clearMemoized(),r(h,p)}v(o,"content"),t.exports.all=l;async function l(h){a.clearMemoized();let p=await u(c.join(h,"*(content-*|index-*)"),{silent:!0,nosort:!0});return Promise.all(p.map(d=>s(d,{recursive:!0,force:!0})))}v(l,"all")}),Zx=K((e,t)=>{"use strict";var{mkdir:s,readFile:u,rm:i,stat:a,truncate:c,writeFile:r}=require("internal/fs/promises"),n=cs(),o=hs(),l=Hf(),h=us(),p=require("path"),d=It(),g=v((L,$)=>Object.prototype.hasOwnProperty.call(L,$),"hasOwnProperty"),m=v(L=>({concurrency:20,log:{silly(){}},...L}),"verifyOpts");t.exports=f;async function f(L,$){$=m($),$.log.silly("verify","verifying cache at",L);let x=[y,E,b,O,A,I,S],M={};for(let U of x){let V=U.name,B=new Date,G=await U(L,$);G&&Object.keys(G).forEach(N=>{M[N]=G[N]});let W=new Date;M.runTime||(M.runTime={}),M.runTime[V]=W-B}return M.runTime.total=M.endTime-M.startTime,$.log.silly("verify","verification finished for",L,"in",`${M.runTime.total}ms`),M}v(f,"verify");async function y(){return{startTime:new Date}}v(y,"markStartTime");async function S(){return{endTime:new Date}}v(S,"markEndTime");async function E(L,$){return $.log.silly("verify","fixing cache permissions"),await s(L,{recursive:!0}),null}v(E,"fixPerms");async function b(L,$){$.log.silly("verify","garbage collecting content");let{default:x}=await Promise.resolve().then(()=>(Za(),Li)),M=h.lsStream(L),U=new Set;M.on("data",W=>{if($.filter&&!$.filter(W))return;let N=d.parse(W.integrity);for(let D in N)U.add(N[D].toString())}),await new Promise((W,N)=>{M.on("end",W).on("error",N)});let V=n.contentDir(L),B=await l(p.join(V,"**"),{follow:!1,nodir:!0,nosort:!0}),G={verifiedContent:0,reclaimedCount:0,reclaimedSize:0,badContentCount:0,keptSize:0};return await x(B,async W=>{let N=W.split(/[/\\]/),D=N.slice(N.length-3).join(""),T=N[N.length-4],C=d.fromHex(D,T);if(U.has(C.toString())){let Z=await _(W,C);Z.valid?(G.verifiedContent++,G.keptSize+=Z.size):(G.reclaimedCount++,G.badContentCount++,G.reclaimedSize+=Z.size)}else{G.reclaimedCount++;let Z=await a(W);await i(W,{recursive:!0,force:!0}),G.reclaimedSize+=Z.size}return G},{concurrency:$.concurrency}),G}v(b,"garbageCollect");async function _(L,$){let x={};try{let{size:M}=await a(L);x.size=M,x.valid=!0,await d.checkStream(new o.ReadStream(L),$)}catch(M){if(M.code==="ENOENT")return{size:0,valid:!1};if(M.code!=="EINTEGRITY")throw M;await i(L,{recursive:!0,force:!0}),x.valid=!1}return x}v(_,"verifyContent");async function O(L,$){$.log.silly("verify","rebuilding index");let{default:x}=await Promise.resolve().then(()=>(Za(),Li)),M=await h.ls(L),U={missingContent:0,rejectedEntries:0,totalEntries:0},V={};for(let B in M)if(g(M,B)){let G=h.hashKey(B),W=M[B],N=$.filter&&!$.filter(W);N&&U.rejectedEntries++,V[G]&&!N?V[G].push(W):V[G]&&N||(N?(V[G]=[],V[G]._path=h.bucketPath(L,B)):(V[G]=[W],V[G]._path=h.bucketPath(L,B)))}return await x(Object.keys(V),B=>w(L,V[B],U,$),{concurrency:$.concurrency}),U}v(O,"rebuildIndex");async function w(L,$,x){await c($._path);for(let M of $){let U=n(L,M.integrity);try{await a(U),await h.insert(L,M.key,M.integrity,{metadata:M.metadata,size:M.size,time:M.time}),x.totalEntries++}catch(V){if(V.code==="ENOENT")x.rejectedEntries++,x.missingContent++;else throw V}}}v(w,"rebuildBucket");function A(L,$){return $.log.silly("verify","cleaning tmp directory"),i(p.join(L,"tmp"),{recursive:!0,force:!0})}v(A,"cleanTmp");async function I(L,$){let x=p.join(L,"_lastverified");return $.log.silly("verify","writing verifile to "+x),r(x,`${Date.now()}`)}v(I,"writeVerifile"),t.exports.lastRun=P;async function P(L){let $=await u(p.join(L,"_lastverified"),{encoding:"utf8"});return new Date(+$)}v(P,"lastRun")}),Xx=K((e,t)=>{"use strict";var{withTempDir:s}=Pl(),u=require("internal/fs/promises"),i=require("path");t.exports.mkdir=a;async function a(r,n={}){let{tmpPrefix:o}=n,l=i.join(r,"tmp");await u.mkdir(l,{recursive:!0,owner:"inherit"});let h=`${l}${i.sep}${o||""}`;return u.mkdtemp(h,{owner:"inherit"})}v(a,"mktmpdir"),t.exports.withTmp=c;function c(r,n,o){return o||(o=n,n={}),s(i.join(r,"tmp"),o,n)}v(c,"withTmp")}),Hi=K((e,t)=>{"use strict";var s=Wx(),u=qx(),i=Jx(),a=Zx(),{clearMemoized:c}=Fi(),r=Xx(),n=us();t.exports.index={},t.exports.index.compact=n.compact,t.exports.index.insert=n.insert,t.exports.ls=n.ls,t.exports.ls.stream=n.lsStream,t.exports.get=s,t.exports.get.byDigest=s.byDigest,t.exports.get.stream=s.stream,t.exports.get.stream.byDigest=s.stream.byDigest,t.exports.get.copy=s.copy,t.exports.get.copy.byDigest=s.copy.byDigest,t.exports.get.info=s.info,t.exports.get.hasContent=s.hasContent,t.exports.put=u,t.exports.put.stream=u.stream,t.exports.rm=i.entry,t.exports.rm.all=i.all,t.exports.rm.entry=t.exports.rm,t.exports.rm.content=i.content,t.exports.clearMemoized=c,t.exports.tmp={},t.exports.tmp.mkdir=r.mkdir,t.exports.tmp.withTmp=r.withTmp,t.exports.verify=a,t.exports.verify.lastRun=a.lastRun}),Yx=K((e,t)=>{"use strict";var s=require("fs"),u=require("path"),i=require("events").EventEmitter,a=Al(),c=class Gf extends i{static{v(this,"BundleWalker")}constructor(d){if(d=d||{},super(d),this.path=u.resolve(d.path||process.cwd()),this.parent=d.parent||null,this.parent){if(this.result=this.parent.result,!this.parent.parent){let g=u.basename(this.path),m=u.basename(u.dirname(this.path));this.result.add(/^@/.test(m)?m+"/"+g:g)}this.root=this.parent.root,this.packageJsonCache=this.parent.packageJsonCache}else this.result=new Set,this.root=this.path,this.packageJsonCache=d.packageJsonCache||new Map;this.seen=new Set,this.didDone=!1,this.children=0,this.node_modules=[],this.package=null,this.bundle=null}addListener(d,g){return this.on(d,g)}on(d,g){let m=super.on(d,g);return d==="done"&&this.didDone&&this.emit("done",this.result),m}done(){if(!this.didDone)if(this.didDone=!0,this.parent)this.emit("done");else{let d=Array.from(this.result);this.result=d,this.emit("done",d)}}start(){let d=u.resolve(this.path,"package.json");return this.packageJsonCache.has(d)?this.onPackage(this.packageJsonCache.get(d)):this.readPackageJson(d),this}readPackageJson(d){s.readFile(d,(g,m)=>g?this.done():this.onPackageJson(d,m))}onPackageJson(d,g){try{this.package=a(JSON.parse(g+""))}catch{return this.done()}this.packageJsonCache.set(d,this.package),this.onPackage(this.package)}allDepsBundled(d){return Object.keys(d.dependencies||{}).concat(Object.keys(d.optionalDependencies||{}))}onPackage(d){let g=this.parent?this.allDepsBundled(d):d.bundleDependencies||d.bundledDependencies||[],m=Array.from(new Set(Array.isArray(g)?g:g===!0?this.allDepsBundled(d):Object.keys(g)));if(!m.length)return this.done();this.bundle=m,this.readModules()}readModules(){n(this.path+"/node_modules",(d,g)=>d?this.onReaddir([]):this.onReaddir(g))}onReaddir(d){this.node_modules=d,this.bundle.forEach(g=>this.childDep(g)),this.children===0&&this.done()}childDep(d){this.node_modules.indexOf(d)!==-1?this.seen.has(d)||(this.seen.add(d),this.child(d)):this.parent&&this.parent.childDep(d)}child(d){let g=this.path+"/node_modules/"+d;this.children+=1;let m=new Gf({path:g,parent:this});m.on("done",()=>{--this.children===0&&this.done()}),m.start()}},r=class Vf extends c{static{v(this,"BundleWalkerSync")}start(){return super.start(),this.done(),this}readPackageJson(d){try{this.onPackageJson(d,s.readFileSync(d))}catch{}return this}readModules(){try{this.onReaddir(o(this.path+"/node_modules"))}catch{this.onReaddir([])}}child(d){new Vf({path:this.path+"/node_modules/"+d,parent:this}).start()}},n=v((p,d)=>{s.readdir(p,(g,m)=>{if(g)d(g);else{let f=m.filter(y=>/^@/.test(y));if(!f.length)d(null,m);else{let y=m.filter(E=>!/^@/.test(E)),S=f.length;f.forEach(E=>{s.readdir(p+"/"+E,(b,_)=>{b||!_.length?y.push(E):y.push.apply(y,_.map(O=>E+"/"+O)),--S===0&&d(null,y)})})}}})},"readdirNodeModules"),o=v(p=>{let d=s.readdirSync(p),g=d.filter(f=>!/^@/.test(f)),m=d.filter(f=>/^@/.test(f)).map(f=>{try{let y=s.readdirSync(p+"/"+f);return y.length?y.map(S=>f+"/"+S):[f]}catch{return[f]}}).reduce((f,y)=>f.concat(y),[]);return g.concat(m)},"readdirNodeModulesSync"),l=v((p,d)=>{let g=new Promise((m,f)=>{new c(p).on("done",m).on("error",f).start()});return d?g.then(m=>d(null,m),d):g},"walk"),h=v(p=>new r(p).start().result,"walkSync");t.exports=l,l.sync=h,l.BundleWalker=c,l.BundleWalkerSync=r}),Qx=K((e,t)=>{var s=Yx(),{readFile:u,readdir:i,stat:a}=require("internal/fs/promises"),{resolve:c,basename:r,dirname:n}=require("path"),o=Al(),l=v(({path:g,packageJsonCache:m})=>m.has(g)?Promise.resolve(m.get(g)):u(g).then(f=>{let y=o(JSON.parse(f));return m.set(g,y),y}).catch(()=>null),"readPackage"),h=Symbol("package data has been normalized"),p=v(({path:g,packageJsonCache:m})=>l({path:g,packageJsonCache:m}).then(f=>{if(!f||f[h])return f;f.bundledDependencies&&!f.bundleDependencies&&(f.bundleDependencies=f.bundledDependencies,delete f.bundledDependencies);let y=f.bundleDependencies;return y===!0&&(f.bundleDependencies=[...Object.keys(f.dependencies||{}),...Object.keys(f.optionalDependencies||{})]),typeof y=="object"&&!Array.isArray(y)&&(f.bundleDependencies=Object.keys(y)),f[h]=!0,f}),"rpj"),d=v(async({path:g,depth:m=1,currentDepth:f=0,pkg:y=null,result:S=null,packageJsonCache:E=null})=>{if(S||(S=new Set),E||(E=new Map),y===!0)return p({path:g+"/package.json",packageJsonCache:E}).then(w=>d({path:g,depth:m,currentDepth:f,pkg:w,result:S,packageJsonCache:E}));if(y&&y.bin){let w=n(g),A=r(w),I=/^@.+/.test(A)?n(w):w,P=[];Object.keys(y.bin).forEach(L=>{let $=c(I,".bin",L);P.push($,$+".cmd",$+".ps1")}),(await Promise.all(P.map(L=>a(L).then(()=>L).catch(()=>null)))).filter(L=>L).forEach(L=>S.add(L))}if(f>=m)return S.add(g),S;let[b,_]=await Promise.all([i(g,{withFileTypes:!0}),f===0&&y&&y.bundleDependencies?s({path:g,packageJsonCache:E}):null]).catch(()=>[]);if(!b)return S;if(!b.length&&!_&&f!==0)return S.add(g),S;let O=[];for(let w of b){let A=c(g,w.name);if(w.isDirectory()===!1){S.add(A);continue}if(f!==0||w.name!=="node_modules"){f<m-1?O.push(d({path:A,packageJsonCache:E,depth:m,currentDepth:f+1,result:S})):S.add(A);continue}}return _&&O.push(..._.map(w=>{let A=c(g,"node_modules",w);return d({path:A,packageJsonCache:E,pkg:!0,depth:m,currentDepth:f+1,result:S})})),O.length&&await Promise.all(O),S},"pkgContents");t.exports=({path:g,...m})=>d({path:c(g),...m,pkg:!0}).then(f=>[...f])}),ps=K((e,t)=>{"use strict";var s=process.platform==="win32",{URL:u}=require("url"),i=s?require("path"):require("path"),{homedir:a}=require("os"),c=Sl(),r=br(),n=Pf(),{log:o}=ft(),l=s?/\\|[/]/:/[/]/,h=/^(?:git[+])?[a-z]+:/i,p=/^[^@]+@[^:.]+\.[^:]+:.+$/i,d=/[.](?:tgz|tar.gz|tar)$/i,g=/:[0-9]+(\/|$)/i,m=/^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/,f=/^(?:[.]|~[/]|[/]|[a-zA-Z]:)/,y="https://registry.npmjs.org";function S(N,D){let T,C;if(typeof N=="object")return N instanceof P&&(!D||D===N.where)?N:N.name&&N.rawSpec?S.resolve(N.name,N.rawSpec,D||N.where):S(N.raw,D||N.where);let Z=N.indexOf("@",1),X=Z>0?N.slice(0,Z):N;return h.test(N)?C=N:p.test(N)?C=`git+ssh://${N}`:!X.startsWith("@")&&(l.test(X)||d.test(X))?C=N:Z>0?(T=X,C=N.slice(Z+1)||"*"):n(N).validForOldPackages?(T=N,C="*"):C=N,_(T,C,D,N)}v(S,"npa");function E(N){return N?N.toLowerCase().startsWith("file:")?!0:s?m.test(N):f.test(N):!1}v(E,"isFileSpec");function b(N){return N?N.toLowerCase().startsWith("npm:"):!1}v(b,"isAliasSpec");function _(N,D,T,C){let Z=new P({raw:C,name:N,rawSpec:D,fromArgument:C!=null});if(N&&(Z.name=N),T||(T=process.cwd()),E(D))return M(Z,T);if(b(D))return G(Z,T);let X=c.fromUrl(D,{noGitPlus:!0,noCommittish:!0});return X?U(Z,X):D&&h.test(D)?B(Z):D&&(l.test(D)||d.test(D))?M(Z,T):W(Z)}v(_,"resolve");function O(N,D=y){let T=S(N);if(T.type!=="version")throw I(T.type,T.raw);let C="pkg:npm/"+T.name.replace(/^@/,"%40")+"@"+T.rawSpec;return D!==y&&(C+="?repository_url="+D),C}v(O,"toPurl");function w(N,D,T){let C=new Error(`Invalid package name "${N}" of package "${T}": ${D.errors.join("; ")}.`);return C.code="EINVALIDPACKAGENAME",C}v(w,"invalidPackageName");function A(N,D){let T=new Error(`Invalid tag name "${N}" of package "${D}": Tags may not have any characters that encodeURIComponent encodes.`);return T.code="EINVALIDTAGNAME",T}v(A,"invalidTagName");function I(N,D){let T=new Error(`Invalid type "${N}" of package "${D}": Purl can only be generated for "version" types.`);return T.code="EINVALIDPURLTYPE",T}v(I,"invalidPurlType");var P=class{static{v(this,"Result")}constructor(N){this.type=N.type,this.registry=N.registry,this.where=N.where,N.raw==null?this.raw=N.name?`${N.name}@${N.rawSpec}`:N.rawSpec:this.raw=N.raw,this.name=void 0,this.escapedName=void 0,this.scope=void 0,this.rawSpec=N.rawSpec||"",this.saveSpec=N.saveSpec,this.fetchSpec=N.fetchSpec,N.name&&this.setName(N.name),this.gitRange=N.gitRange,this.gitCommittish=N.gitCommittish,this.gitSubdir=N.gitSubdir,this.hosted=N.hosted}setName(N){let D=n(N);if(!D.validForOldPackages)throw w(N,D,this.raw);return this.name=N,this.scope=N[0]==="@"?N.slice(0,N.indexOf("/")):void 0,this.escapedName=N.replace("/","%2f"),this}toString(){let N=[];this.name!=null&&this.name!==""&&N.push(this.name);let D=this.saveSpec||this.fetchSpec||this.rawSpec;return D!=null&&D!==""&&N.push(D),N.length?N.join("@"):this.raw}toJSON(){let N=Object.assign({},this);return delete N.hosted,N}};function L(N,D){if(!D){N.gitCommittish=null;return}for(let T of D.split("::")){if(!T.includes(":")){if(N.gitRange)throw new Error("cannot override existing semver range with a committish");if(N.gitCommittish)throw new Error("cannot override existing committish with a second committish");N.gitCommittish=T;continue}let[C,Z]=T.split(":");if(C==="semver"){if(N.gitCommittish)throw new Error("cannot override existing committish with a semver range");if(N.gitRange)throw new Error("cannot override existing semver range with a second semver range");N.gitRange=decodeURIComponent(Z);continue}if(C==="path"){if(N.gitSubdir)throw new Error("cannot override existing path with a second path");N.gitSubdir=`/${Z}`;continue}o.warn("npm-package-arg",`ignoring unknown key "${C}"`)}}v(L,"setGitAttrs");var $=new Map([["\0","%00"],[" ","%09"],[`
|
|
44
|
+
`,"%0A"],["\r","%0D"],[" ","%20"],['"',"%22"],["#","%23"],["%","%25"],["?","%3F"],["[","%5B"],["\\",s?"/":"%5C"],["]","%5D"],["^","%5E"],["|","%7C"],["~","%7E"]]);function x(N){let D="";for(let T=0;T<N.length;T++)D=`${D}${$.get(N[T])??N[T]}`;return D.startsWith("file:")?D:`file:${D}`}v(x,"pathToFileURL");function M(N,D){N.type=d.test(N.rawSpec)?"file":"directory",N.where=D;let T=x(N.rawSpec);T.startsWith("file:/")&&(/^file:\/\/[^/]/.test(T)&&(T=`file:/${T.slice(5)}`),/^\/{1,3}\.\.?(\/|$)/.test(T.slice(5))&&(T=T.replace(/^file:\/{1,3}/,"file:")));let C,Z;try{C=new u(T,`${x(i.resolve(D))}/`),Z=new u(T)}catch(k){let F=new Error("Invalid file: URL, must comply with RFC 8089");throw Object.assign(F,{raw:N.rawSpec,spec:N,where:D,originalError:k})}let X=decodeURIComponent(Z.pathname),Q=decodeURIComponent(C.pathname);return s&&(X=X.replace(/^\/+([a-z]:\/)/i,"$1"),Q=Q.replace(/^\/+([a-z]:\/)/i,"$1")),/^\/~(\/|$)/.test(X)?(N.saveSpec=`file:${X.substr(1)}`,Q=i.resolve(a(),X.substr(3))):i.isAbsolute(T.slice(5))?N.saveSpec=`file:${i.resolve(Q)}`:N.saveSpec=`file:${i.relative(D,Q)}`,N.fetchSpec=i.resolve(D,Q),N.saveSpec=N.saveSpec.split("\\").join("/"),N.saveSpec.startsWith("file://")&&(N.saveSpec=`file:/${N.saveSpec.slice(7)}`),N}v(M,"fromFile");function U(N,D){return N.type="git",N.hosted=D,N.saveSpec=D.toString({noGitPlus:!1,noCommittish:!1}),N.fetchSpec=D.getDefaultRepresentation()==="shortcut"?null:D.toString(),L(N,D.committish),N}v(U,"fromHostedGit");function V(N,D){let T=new Error(`Unsupported URL Type "${N}": ${D}`);return T.code="EUNSUPPORTEDPROTOCOL",T}v(V,"unsupportedURLType");function B(N){let D=N.rawSpec;if(N.saveSpec=D,D.startsWith("git+ssh:")){let C=D.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i);if(C&&!C[1].match(g))return N.type="git",L(N,C[2]),N.fetchSpec=C[1],N}else D.startsWith("git+file://")&&(D=D.replace(/\\/g,"/"));let T=new u(D);switch(T.protocol){case"git:":case"git+http:":case"git+https:":case"git+rsync:":case"git+ftp:":case"git+file:":case"git+ssh:":N.type="git",L(N,T.hash.slice(1)),T.protocol==="git+file:"&&/^git\+file:\/\/[a-z]:/i.test(D)?N.fetchSpec=`git+file://${T.host.toLowerCase()}:${T.pathname}`:(T.hash="",N.fetchSpec=T.toString()),N.fetchSpec.startsWith("git+")&&(N.fetchSpec=N.fetchSpec.slice(4));break;case"http:":case"https:":N.type="remote",N.fetchSpec=N.saveSpec;break;default:throw V(T.protocol,D)}return N}v(B,"fromURL");function G(N,D){let T=S(N.rawSpec.substr(4),D);if(T.type==="alias")throw new Error("nested aliases not supported");if(!T.registry)throw new Error("aliases only work for registry deps");if(!T.name)throw new Error("aliases must have a name");return N.subSpec=T,N.registry=!0,N.type="alias",N.saveSpec=null,N.fetchSpec=null,N}v(G,"fromAlias");function W(N){N.registry=!0;let D=N.rawSpec.trim();N.saveSpec=null,N.fetchSpec=D;let T=r.valid(D,!0),C=r.validRange(D,!0);if(T)N.type="version";else if(C)N.type="range";else{if(encodeURIComponent(D)!==D)throw A(D,N.raw);N.type="tag"}return N}v(W,"fromRegistry"),t.exports=S,t.exports.resolve=_,t.exports.toPurl=O,t.exports.Result=P}),ds=K(e=>{"use strict";var t=e&&e.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(e,"__esModule",{value:!0}),e.WriteStreamSync=e.WriteStream=e.ReadStreamSync=e.ReadStream=void 0;var s=t(require("events")),u=t(require("fs")),i=xe(),a=u.default.writev,c=Symbol("_autoClose"),r=Symbol("_close"),n=Symbol("_ended"),o=Symbol("_fd"),l=Symbol("_finished"),h=Symbol("_flags"),p=Symbol("_flush"),d=Symbol("_handleChunk"),g=Symbol("_makeBuf"),m=Symbol("_mode"),f=Symbol("_needDrain"),y=Symbol("_onerror"),S=Symbol("_onopen"),E=Symbol("_onread"),b=Symbol("_onwrite"),_=Symbol("_open"),O=Symbol("_path"),w=Symbol("_pos"),A=Symbol("_queue"),I=Symbol("_read"),P=Symbol("_readSize"),L=Symbol("_reading"),$=Symbol("_remain"),x=Symbol("_size"),M=Symbol("_write"),U=Symbol("_writing"),V=Symbol("_defaultFlag"),B=Symbol("_errored"),G=class extends i.Minipass{static{v(this,"ReadStream")}[B]=!1;[o];[O];[P];[L]=!1;[x];[$];[c];constructor(T,C){if(C=C||{},super(C),this.readable=!0,this.writable=!1,typeof T!="string")throw new TypeError("path must be a string");this[B]=!1,this[o]=typeof C.fd=="number"?C.fd:void 0,this[O]=T,this[P]=C.readSize||16*1024*1024,this[L]=!1,this[x]=typeof C.size=="number"?C.size:1/0,this[$]=this[x],this[c]=typeof C.autoClose=="boolean"?C.autoClose:!0,typeof this[o]=="number"?this[I]():this[_]()}get fd(){return this[o]}get path(){return this[O]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[_](){u.default.open(this[O],"r",(T,C)=>this[S](T,C))}[S](T,C){T?this[y](T):(this[o]=C,this.emit("open",C),this[I]())}[g](){return Buffer.allocUnsafe(Math.min(this[P],this[$]))}[I](){if(!this[L]){this[L]=!0;let T=this[g]();if(T.length===0)return process.nextTick(()=>this[E](null,0,T));u.default.read(this[o],T,0,T.length,null,(C,Z,X)=>this[E](C,Z,X))}}[E](T,C,Z){this[L]=!1,T?this[y](T):this[d](C,Z)&&this[I]()}[r](){if(this[c]&&typeof this[o]=="number"){let T=this[o];this[o]=void 0,u.default.close(T,C=>C?this.emit("error",C):this.emit("close"))}}[y](T){this[L]=!0,this[r](),this.emit("error",T)}[d](T,C){let Z=!1;return this[$]-=T,T>0&&(Z=super.write(T<C.length?C.subarray(0,T):C)),(T===0||this[$]<=0)&&(Z=!1,this[r](),super.end()),Z}emit(T,...C){switch(T){case"prefinish":case"finish":return!1;case"drain":return typeof this[o]=="number"&&this[I](),!1;case"error":return this[B]?!1:(this[B]=!0,super.emit(T,...C));default:return super.emit(T,...C)}}};e.ReadStream=G;var W=class extends G{static{v(this,"ReadStreamSync")}[_](){let T=!0;try{this[S](null,u.default.openSync(this[O],"r")),T=!1}finally{T&&this[r]()}}[I](){let T=!0;try{if(!this[L]){this[L]=!0;do{let C=this[g](),Z=C.length===0?0:u.default.readSync(this[o],C,0,C.length,null);if(!this[d](Z,C))break}while(!0);this[L]=!1}T=!1}finally{T&&this[r]()}}[r](){if(this[c]&&typeof this[o]=="number"){let T=this[o];this[o]=void 0,u.default.closeSync(T),this.emit("close")}}};e.ReadStreamSync=W;var N=class extends s.default{static{v(this,"WriteStream")}readable=!1;writable=!0;[B]=!1;[U]=!1;[n]=!1;[A]=[];[f]=!1;[O];[m];[c];[o];[V];[h];[l]=!1;[w];constructor(T,C){C=C||{},super(C),this[O]=T,this[o]=typeof C.fd=="number"?C.fd:void 0,this[m]=C.mode===void 0?438:C.mode,this[w]=typeof C.start=="number"?C.start:void 0,this[c]=typeof C.autoClose=="boolean"?C.autoClose:!0;let Z=this[w]!==void 0?"r+":"w";this[V]=C.flags===void 0,this[h]=C.flags===void 0?Z:C.flags,this[o]===void 0&&this[_]()}emit(T,...C){if(T==="error"){if(this[B])return!1;this[B]=!0}return super.emit(T,...C)}get fd(){return this[o]}get path(){return this[O]}[y](T){this[r](),this[U]=!0,this.emit("error",T)}[_](){u.default.open(this[O],this[h],this[m],(T,C)=>this[S](T,C))}[S](T,C){this[V]&&this[h]==="r+"&&T&&T.code==="ENOENT"?(this[h]="w",this[_]()):T?this[y](T):(this[o]=C,this.emit("open",C),this[U]||this[p]())}end(T,C){return T&&this.write(T,C),this[n]=!0,!this[U]&&!this[A].length&&typeof this[o]=="number"&&this[b](null,0),this}write(T,C){return typeof T=="string"&&(T=Buffer.from(T,C)),this[n]?(this.emit("error",new Error("write() after end()")),!1):this[o]===void 0||this[U]||this[A].length?(this[A].push(T),this[f]=!0,!1):(this[U]=!0,this[M](T),!0)}[M](T){u.default.write(this[o],T,0,T.length,this[w],(C,Z)=>this[b](C,Z))}[b](T,C){T?this[y](T):(this[w]!==void 0&&typeof C=="number"&&(this[w]+=C),this[A].length?this[p]():(this[U]=!1,this[n]&&!this[l]?(this[l]=!0,this[r](),this.emit("finish")):this[f]&&(this[f]=!1,this.emit("drain"))))}[p](){if(this[A].length===0)this[n]&&this[b](null,0);else if(this[A].length===1)this[M](this[A].pop());else{let T=this[A];this[A]=[],a(this[o],T,this[w],(C,Z)=>this[b](C,Z))}}[r](){if(this[c]&&typeof this[o]=="number"){let T=this[o];this[o]=void 0,u.default.close(T,C=>C?this.emit("error",C):this.emit("close"))}}};e.WriteStream=N;var D=class extends N{static{v(this,"WriteStreamSync")}[_](){let T;if(this[V]&&this[h]==="r+")try{T=u.default.openSync(this[O],this[h],this[m])}catch(C){if(C?.code==="ENOENT")return this[h]="w",this[_]();throw C}else T=u.default.openSync(this[O],this[h],this[m]);this[S](null,T)}[r](){if(this[c]&&typeof this[o]=="number"){let T=this[o];this[o]=void 0,u.default.closeSync(T),this.emit("close")}}[M](T){let C=!0;try{this[b](null,u.default.writeSync(this[o],T,0,T.length,this[w])),C=!1}finally{if(C)try{this[r]()}catch{}}}};e.WriteStreamSync=D}),Nl=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dealias=e.isNoFile=e.isFile=e.isAsync=e.isSync=e.isAsyncNoFile=e.isSyncNoFile=e.isAsyncFile=e.isSyncFile=void 0;var t=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),s=v(p=>!!p.sync&&!!p.file,"isSyncFile");e.isSyncFile=s;var u=v(p=>!p.sync&&!!p.file,"isAsyncFile");e.isAsyncFile=u;var i=v(p=>!!p.sync&&!p.file,"isSyncNoFile");e.isSyncNoFile=i;var a=v(p=>!p.sync&&!p.file,"isAsyncNoFile");e.isAsyncNoFile=a;var c=v(p=>!!p.sync,"isSync");e.isSync=c;var r=v(p=>!p.sync,"isAsync");e.isAsync=r;var n=v(p=>!!p.file,"isFile");e.isFile=n;var o=v(p=>!p.file,"isNoFile");e.isNoFile=o;var l=v(p=>t.get(p)||p,"dealiasKey"),h=v((p={})=>{if(!p)return{};let d={};for(let[g,m]of Object.entries(p)){let f=l(g);d[f]=m}return d.chmod===void 0&&d.noChmod===!1&&(d.chmod=!0),delete d.noChmod,d},"dealias");e.dealias=h}),fs=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makeCommand=void 0;var t=Nl(),s=v((u,i,a,c,r)=>Object.assign((n=[],o,l)=>{Array.isArray(n)&&(o=n,n={}),typeof o=="function"&&(l=o,o=void 0),o?o=Array.from(o):o=[];let h=(0,t.dealias)(n);if(r?.(h,o),(0,t.isSyncFile)(h)){if(typeof l=="function")throw new TypeError("callback not supported for sync tar functions");return u(h,o)}else if((0,t.isAsyncFile)(h)){let p=i(h,o),d=l||void 0;return d?p.then(()=>d(),d):p}else if((0,t.isSyncNoFile)(h)){if(typeof l=="function")throw new TypeError("callback not supported for sync tar functions");return a(h,o)}else if((0,t.isAsyncNoFile)(h)){if(typeof l=="function")throw new TypeError("callback only supported with file option");return c(h,o)}else throw new Error("impossible options??")},{syncFile:u,asyncFile:i,syncNoFile:a,asyncNoFile:c,validate:r}),"makeCommand");e.makeCommand=s}),Zd=K(e=>{"use strict";var t=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.constants=void 0;var s=t(require("zlib")),u=s.default.constants||{ZLIB_VERNUM:4736};e.constants=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},u))}),Gi=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(B,G,W,N){N===void 0&&(N=W);var D=Object.getOwnPropertyDescriptor(G,W);(!D||("get"in D?!G.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:v(function(){return G[W]},"get")}),Object.defineProperty(B,N,D)}:function(B,G,W,N){N===void 0&&(N=W),B[N]=G[W]}),s=e&&e.__setModuleDefault||(Object.create?function(B,G){Object.defineProperty(B,"default",{enumerable:!0,value:G})}:function(B,G){B.default=G}),u=e&&e.__importStar||function(){var B=v(function(G){return B=Object.getOwnPropertyNames||function(W){var N=[];for(var D in W)Object.prototype.hasOwnProperty.call(W,D)&&(N[N.length]=D);return N},B(G)},"ownKeys");return function(G){if(G&&G.__esModule)return G;var W={};if(G!=null)for(var N=B(G),D=0;D<N.length;D++)N[D]!=="default"&&t(W,G,N[D]);return s(W,G),W}}(),i=e&&e.__importDefault||function(B){return B&&B.__esModule?B:{default:B}};Object.defineProperty(e,"__esModule",{value:!0}),e.ZstdDecompress=e.ZstdCompress=e.BrotliDecompress=e.BrotliCompress=e.Unzip=e.InflateRaw=e.DeflateRaw=e.Gunzip=e.Gzip=e.Inflate=e.Deflate=e.Zlib=e.ZlibError=e.constants=void 0;var a=i(require("assert")),c=require("buffer"),r=xe(),n=u(require("zlib")),o=Zd(),l=Zd();Object.defineProperty(e,"constants",{enumerable:!0,get:v(function(){return l.constants},"get")});var h=c.Buffer.concat,p=Object.getOwnPropertyDescriptor(c.Buffer,"concat"),d=v(B=>B,"noop"),g=p?.writable===!0||p?.set!==void 0?B=>{c.Buffer.concat=B?d:h}:B=>{},m=Symbol("_superWrite"),f=class extends Error{static{v(this,"ZlibError")}code;errno;constructor(B,G){super("zlib: "+B.message,{cause:B}),this.code=B.code,this.errno=B.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+B.message,Error.captureStackTrace(this,G??this.constructor)}get name(){return"ZlibError"}};e.ZlibError=f;var y=Symbol("flushFlag"),S=class extends r.Minipass{static{v(this,"ZlibBase")}#e=!1;#t=!1;#r;#s;#i;#l;#c;get sawError(){return this.#e}get handle(){return this.#l}get flushFlag(){return this.#r}constructor(B,G){if(!B||typeof B!="object")throw new TypeError("invalid options for ZlibBase constructor");if(super(B),this.#r=B.flush??0,this.#s=B.finishFlush??0,this.#i=B.fullFlushFlag??0,typeof n[G]!="function")throw new TypeError("Compression method not supported: "+G);try{this.#l=new n[G](B)}catch(W){throw new f(W,this.constructor)}this.#c=W=>{this.#e||(this.#e=!0,this.close(),this.emit("error",W))},this.#l?.on("error",W=>this.#c(new f(W))),this.once("end",()=>this.close)}close(){this.#l&&(this.#l.close(),this.#l=void 0,this.emit("close"))}reset(){if(!this.#e)return(0,a.default)(this.#l,"zlib binding closed"),this.#l.reset?.()}flush(B){this.ended||(typeof B!="number"&&(B=this.#i),this.write(Object.assign(c.Buffer.alloc(0),{[y]:B})))}end(B,G,W){return typeof B=="function"&&(W=B,G=void 0,B=void 0),typeof G=="function"&&(W=G,G=void 0),B&&(G?this.write(B,G):this.write(B)),this.flush(this.#s),this.#t=!0,super.end(W)}get ended(){return this.#t}[m](B){return super.write(B)}write(B,G,W){if(typeof G=="function"&&(W=G,G="utf8"),typeof B=="string"&&(B=c.Buffer.from(B,G)),this.#e)return;(0,a.default)(this.#l,"zlib binding closed");let N=this.#l._handle,D=N.close;N.close=()=>{};let T=this.#l.close;this.#l.close=()=>{},g(!0);let C;try{let X=typeof B[y]=="number"?B[y]:this.#r;C=this.#l._processChunk(B,X),g(!1)}catch(X){g(!1),this.#c(new f(X,this.write))}finally{this.#l&&(this.#l._handle=N,N.close=D,this.#l.close=T,this.#l.removeAllListeners("error"))}this.#l&&this.#l.on("error",X=>this.#c(new f(X,this.write)));let Z;if(C)if(Array.isArray(C)&&C.length>0){let X=C[0];Z=this[m](c.Buffer.from(X));for(let Q=1;Q<C.length;Q++)Z=this[m](C[Q])}else Z=this[m](c.Buffer.from(C));return W&&W(),Z}},E=class extends S{static{v(this,"Zlib")}#e;#t;constructor(B,G){B=B||{},B.flush=B.flush||o.constants.Z_NO_FLUSH,B.finishFlush=B.finishFlush||o.constants.Z_FINISH,B.fullFlushFlag=o.constants.Z_FULL_FLUSH,super(B,G),this.#e=B.level,this.#t=B.strategy}params(B,G){if(!this.sawError){if(!this.handle)throw new Error("cannot switch params when binding is closed");if(!this.handle.params)throw new Error("not supported in this implementation");if(this.#e!==B||this.#t!==G){this.flush(o.constants.Z_SYNC_FLUSH),(0,a.default)(this.handle,"zlib binding closed");let W=this.handle.flush;this.handle.flush=(N,D)=>{typeof N=="function"&&(D=N,N=this.flushFlag),this.flush(N),D?.()};try{this.handle.params(B,G)}finally{this.handle.flush=W}this.handle&&(this.#e=B,this.#t=G)}}}};e.Zlib=E;var b=class extends E{static{v(this,"Deflate")}constructor(B){super(B,"Deflate")}};e.Deflate=b;var _=class extends E{static{v(this,"Inflate")}constructor(B){super(B,"Inflate")}};e.Inflate=_;var O=class extends E{static{v(this,"Gzip")}#e;constructor(B){super(B,"Gzip"),this.#e=B&&!!B.portable}[m](B){return this.#e?(this.#e=!1,B[9]=255,super[m](B)):super[m](B)}};e.Gzip=O;var w=class extends E{static{v(this,"Gunzip")}constructor(B){super(B,"Gunzip")}};e.Gunzip=w;var A=class extends E{static{v(this,"DeflateRaw")}constructor(B){super(B,"DeflateRaw")}};e.DeflateRaw=A;var I=class extends E{static{v(this,"InflateRaw")}constructor(B){super(B,"InflateRaw")}};e.InflateRaw=I;var P=class extends E{static{v(this,"Unzip")}constructor(B){super(B,"Unzip")}};e.Unzip=P;var L=class extends S{static{v(this,"Brotli")}constructor(B,G){B=B||{},B.flush=B.flush||o.constants.BROTLI_OPERATION_PROCESS,B.finishFlush=B.finishFlush||o.constants.BROTLI_OPERATION_FINISH,B.fullFlushFlag=o.constants.BROTLI_OPERATION_FLUSH,super(B,G)}},$=class extends L{static{v(this,"BrotliCompress")}constructor(B){super(B,"BrotliCompress")}};e.BrotliCompress=$;var x=class extends L{static{v(this,"BrotliDecompress")}constructor(B){super(B,"BrotliDecompress")}};e.BrotliDecompress=x;var M=class extends S{static{v(this,"Zstd")}constructor(B,G){B=B||{},B.flush=B.flush||o.constants.ZSTD_e_continue,B.finishFlush=B.finishFlush||o.constants.ZSTD_e_end,B.fullFlushFlag=o.constants.ZSTD_e_flush,super(B,G)}},U=class extends M{static{v(this,"ZstdCompress")}constructor(B){super(B,"ZstdCompress")}};e.ZstdCompress=U;var V=class extends M{static{v(this,"ZstdDecompress")}constructor(B){super(B,"ZstdDecompress")}};e.ZstdDecompress=V}),eN=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parse=e.encode=void 0;var t=v((o,l)=>{if(Number.isSafeInteger(o))o<0?u(o,l):s(o,l);else throw Error("cannot encode number outside of javascript safe integer range");return l},"encode");e.encode=t;var s=v((o,l)=>{l[0]=128;for(var h=l.length;h>1;h--)l[h-1]=o&255,o=Math.floor(o/256)},"encodePositive"),u=v((o,l)=>{l[0]=255;var h=!1;o=o*-1;for(var p=l.length;p>1;p--){var d=o&255;o=Math.floor(o/256),h?l[p-1]=r(d):d===0?l[p-1]=0:(h=!0,l[p-1]=n(d))}},"encodeNegative"),i=v(o=>{let l=o[0],h=l===128?c(o.subarray(1,o.length)):l===255?a(o):null;if(h===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(h))throw Error("parsed number outside of javascript safe integer range");return h},"parse");e.parse=i;var a=v(o=>{for(var l=o.length,h=0,p=!1,d=l-1;d>-1;d--){var g=Number(o[d]),m;p?m=r(g):g===0?m=g:(p=!0,m=n(g)),m!==0&&(h-=m*Math.pow(256,l-d-1))}return h},"twos"),c=v(o=>{for(var l=o.length,h=0,p=l-1;p>-1;p--){var d=Number(o[p]);d!==0&&(h+=d*Math.pow(256,l-p-1))}return h},"pos"),r=v(o=>(255^o)&255,"onesComp"),n=v(o=>(255^o)+1&255,"twosComp")}),Wf=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.code=e.name=e.isName=e.isCode=void 0;var t=v(u=>e.name.has(u),"isCode");e.isCode=t;var s=v(u=>e.code.has(u),"isName");e.isName=s,e.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),e.code=new Map(Array.from(e.name).map(u=>[u[1],u[0]]))}),gs=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(w,A,I,P){P===void 0&&(P=I);var L=Object.getOwnPropertyDescriptor(A,I);(!L||("get"in L?!A.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:v(function(){return A[I]},"get")}),Object.defineProperty(w,P,L)}:function(w,A,I,P){P===void 0&&(P=I),w[P]=A[I]}),s=e&&e.__setModuleDefault||(Object.create?function(w,A){Object.defineProperty(w,"default",{enumerable:!0,value:A})}:function(w,A){w.default=A}),u=e&&e.__importStar||function(w){if(w&&w.__esModule)return w;var A={};if(w!=null)for(var I in w)I!=="default"&&Object.prototype.hasOwnProperty.call(w,I)&&t(A,w,I);return s(A,w),A};Object.defineProperty(e,"__esModule",{value:!0}),e.Header=void 0;var i=require("path"),a=u(eN()),c=u(Wf()),r=class{static{v(this,"Header")}cksumValid=!1;needPax=!1;nullBlock=!1;block;path;mode;uid;gid;size;cksum;#e="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(w,A=0,I,P){Buffer.isBuffer(w)?this.decode(w,A||0,I,P):w&&this.#t(w)}decode(w,A,I,P){if(A||(A=0),!w||!(w.length>=A+512))throw new Error("need 512 bytes for header");this.path=o(w,A,100),this.mode=p(w,A+100,8),this.uid=p(w,A+108,8),this.gid=p(w,A+116,8),this.size=p(w,A+124,12),this.mtime=l(w,A+136,12),this.cksum=p(w,A+148,12),P&&this.#t(P,!0),I&&this.#t(I);let L=o(w,A+156,1);if(c.isCode(L)&&(this.#e=L||"0"),this.#e==="0"&&this.path.slice(-1)==="/"&&(this.#e="5"),this.#e==="5"&&(this.size=0),this.linkpath=o(w,A+157,100),w.subarray(A+257,A+265).toString()==="ustar\x0000")if(this.uname=o(w,A+265,32),this.gname=o(w,A+297,32),this.devmaj=p(w,A+329,8)??0,this.devmin=p(w,A+337,8)??0,w[A+475]!==0){let x=o(w,A+345,155);this.path=x+"/"+this.path}else{let x=o(w,A+345,130);x&&(this.path=x+"/"+this.path),this.atime=l(w,A+476,12),this.ctime=l(w,A+488,12)}let $=256;for(let x=A;x<A+148;x++)$+=w[x];for(let x=A+156;x<A+512;x++)$+=w[x];this.cksumValid=$===this.cksum,this.cksum===void 0&&$===256&&(this.nullBlock=!0)}#t(w,A=!1){Object.assign(this,Object.fromEntries(Object.entries(w).filter(([I,P])=>!(P==null||I==="path"&&A||I==="linkpath"&&A||I==="global"))))}encode(w,A=0){if(w||(w=this.block=Buffer.alloc(512)),this.#e==="Unsupported"&&(this.#e="0"),!(w.length>=A+512))throw new Error("need 512 bytes for header");let I=this.ctime||this.atime?130:155,P=n(this.path||"",I),L=P[0],$=P[1];this.needPax=!!P[2],this.needPax=O(w,A,100,L)||this.needPax,this.needPax=f(w,A+100,8,this.mode)||this.needPax,this.needPax=f(w,A+108,8,this.uid)||this.needPax,this.needPax=f(w,A+116,8,this.gid)||this.needPax,this.needPax=f(w,A+124,12,this.size)||this.needPax,this.needPax=b(w,A+136,12,this.mtime)||this.needPax,w[A+156]=this.#e.charCodeAt(0),this.needPax=O(w,A+157,100,this.linkpath)||this.needPax,w.write("ustar\x0000",A+257,8),this.needPax=O(w,A+265,32,this.uname)||this.needPax,this.needPax=O(w,A+297,32,this.gname)||this.needPax,this.needPax=f(w,A+329,8,this.devmaj)||this.needPax,this.needPax=f(w,A+337,8,this.devmin)||this.needPax,this.needPax=O(w,A+345,I,$)||this.needPax,w[A+475]!==0?this.needPax=O(w,A+345,155,$)||this.needPax:(this.needPax=O(w,A+345,130,$)||this.needPax,this.needPax=b(w,A+476,12,this.atime)||this.needPax,this.needPax=b(w,A+488,12,this.ctime)||this.needPax);let x=256;for(let M=A;M<A+148;M++)x+=w[M];for(let M=A+156;M<A+512;M++)x+=w[M];return this.cksum=x,f(w,A+148,8,this.cksum),this.cksumValid=!0,this.needPax}get type(){return this.#e==="Unsupported"?this.#e:c.name.get(this.#e)}get typeKey(){return this.#e}set type(w){let A=String(c.code.get(w));if(c.isCode(A)||A==="Unsupported")this.#e=A;else if(c.isCode(w))this.#e=w;else throw new TypeError("invalid entry type: "+w)}};e.Header=r;var n=v((w,A)=>{let I=w,P="",L,$=i.posix.parse(w).root||".";if(Buffer.byteLength(I)<100)L=[I,P,!1];else{P=i.posix.dirname(I),I=i.posix.basename(I);do Buffer.byteLength(I)<=100&&Buffer.byteLength(P)<=A?L=[I,P,!1]:Buffer.byteLength(I)>100&&Buffer.byteLength(P)<=A?L=[I.slice(0,99),P,!0]:(I=i.posix.join(i.posix.basename(P),I),P=i.posix.dirname(P));while(P!==$&&L===void 0);L||(L=[w.slice(0,99),"",!0])}return L},"splitPrefix"),o=v((w,A,I)=>w.subarray(A,A+I).toString("utf8").replace(/\0.*/,""),"decString"),l=v((w,A,I)=>h(p(w,A,I)),"decDate"),h=v(w=>w===void 0?void 0:new Date(w*1e3),"numToDate"),p=v((w,A,I)=>Number(w[A])&128?a.parse(w.subarray(A,A+I)):g(w,A,I),"decNumber"),d=v(w=>isNaN(w)?void 0:w,"nanUndef"),g=v((w,A,I)=>d(parseInt(w.subarray(A,A+I).toString("utf8").replace(/\0.*$/,"").trim(),8)),"decSmallNumber"),m={12:8589934591,8:2097151},f=v((w,A,I,P)=>P===void 0?!1:P>m[I]||P<0?(a.encode(P,w.subarray(A,A+I)),!0):(y(w,A,I,P),!1),"encNumber"),y=v((w,A,I,P)=>w.write(S(P,I),A,I,"ascii"),"encSmallNumber"),S=v((w,A)=>E(Math.floor(w).toString(8),A),"octalString"),E=v((w,A)=>(w.length===A-1?w:new Array(A-w.length-1).join("0")+w+" ")+"\0","padOctal"),b=v((w,A,I,P)=>P===void 0?!1:f(w,A,I,P.getTime()/1e3),"encDate"),_=new Array(156).join("\0"),O=v((w,A,I,P)=>P===void 0?!1:(w.write(P+_,A,I,"utf8"),P.length!==Buffer.byteLength(P)||P.length>I),"encString")}),kl=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pax=void 0;var t=require("path"),s=gs(),u=class zf{static{v(this,"Pax")}atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(n,o=!1){this.atime=n.atime,this.charset=n.charset,this.comment=n.comment,this.ctime=n.ctime,this.dev=n.dev,this.gid=n.gid,this.global=o,this.gname=n.gname,this.ino=n.ino,this.linkpath=n.linkpath,this.mtime=n.mtime,this.nlink=n.nlink,this.path=n.path,this.size=n.size,this.uid=n.uid,this.uname=n.uname}encode(){let n=this.encodeBody();if(n==="")return Buffer.allocUnsafe(0);let o=Buffer.byteLength(n),l=512*Math.ceil(1+o/512),h=Buffer.allocUnsafe(l);for(let p=0;p<512;p++)h[p]=0;new s.Header({path:("PaxHeader/"+(0,t.basename)(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:o,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(h),h.write(n,512,o,"utf8");for(let p=o+512;p<h.length;p++)h[p]=0;return h}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(n){if(this[n]===void 0)return"";let o=this[n],l=o instanceof Date?o.getTime()/1e3:o,h=" "+(n==="dev"||n==="ino"||n==="nlink"?"SCHILY.":"")+n+"="+l+`
|
|
45
|
+
`,p=Buffer.byteLength(h),d=Math.floor(Math.log(p)/Math.log(10))+1;return p+d>=Math.pow(10,d)&&(d+=1),d+p+h}static parse(n,o,l=!1){return new zf(i(a(n),o),l)}};e.Pax=u;var i=v((r,n)=>n?Object.assign({},n,r):r,"merge"),a=v(r=>r.replace(/\n$/,"").split(`
|
|
46
|
+
`).reduce(c,Object.create(null)),"parseKV"),c=v((r,n)=>{let o=parseInt(n,10);if(o!==Buffer.byteLength(n)+1)return r;n=n.slice((o+" ").length);let l=n.split("="),h=l.shift();if(!h)return r;let p=h.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),d=l.join("=");return r[p]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(p)?new Date(Number(d)*1e3):/^[0-9]+$/.test(d)?+d:d,r},"parseKVLine")}),ms=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeWindowsPath=void 0;var t=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.normalizeWindowsPath=t!=="win32"?s=>s:s=>s&&s.replace(/\\/g,"/")}),Ll=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadEntry=void 0;var t=xe(),s=ms(),u=class extends t.Minipass{static{v(this,"ReadEntry")}extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(i,a,c){switch(super({}),this.pause(),this.extended=a,this.globalExtended=c,this.header=i,this.remain=i.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=i.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!i.path)throw new Error("no path provided for tar.ReadEntry");this.path=(0,s.normalizeWindowsPath)(i.path),this.mode=i.mode,this.mode&&(this.mode=this.mode&4095),this.uid=i.uid,this.gid=i.gid,this.uname=i.uname,this.gname=i.gname,this.size=this.remain,this.mtime=i.mtime,this.atime=i.atime,this.ctime=i.ctime,this.linkpath=i.linkpath?(0,s.normalizeWindowsPath)(i.linkpath):void 0,this.uname=i.uname,this.gname=i.gname,a&&this.#e(a),c&&this.#e(c,!0)}write(i){let a=i.length;if(a>this.blockRemain)throw new Error("writing more to entry than is appropriate");let c=this.remain,r=this.blockRemain;return this.remain=Math.max(0,c-a),this.blockRemain=Math.max(0,r-a),this.ignore?!0:c>=a?super.write(i):super.write(i.subarray(0,c))}#e(i,a=!1){i.path&&(i.path=(0,s.normalizeWindowsPath)(i.path)),i.linkpath&&(i.linkpath=(0,s.normalizeWindowsPath)(i.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(i).filter(([c,r])=>!(r==null||c==="path"&&a))))}};e.ReadEntry=u}),Dl=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.warnMethod=void 0;var t=v((s,u,i,a={})=>{s.file&&(a.file=s.file),s.cwd&&(a.cwd=s.cwd),a.code=i instanceof Error&&i.code||u,a.tarCode=u,!s.strict&&a.recoverable!==!1?(i instanceof Error&&(a=Object.assign(i,a),i=i.message),s.emit("warn",u,i,a)):i instanceof Error?s.emit("error",Object.assign(i,a)):s.emit("error",Object.assign(new Error(`${u}: ${i}`),a))},"warnMethod");e.warnMethod=t}),$l=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=void 0;var t=require("events"),s=Gi(),u=gs(),i=kl(),a=Ll(),c=Dl(),r=1024*1024,n=Buffer.from([31,139]),o=Buffer.from([40,181,47,253]),l=Math.max(n.length,o.length),h=Symbol("state"),p=Symbol("writeEntry"),d=Symbol("readEntry"),g=Symbol("nextEntry"),m=Symbol("processEntry"),f=Symbol("extendedHeader"),y=Symbol("globalExtendedHeader"),S=Symbol("meta"),E=Symbol("emitMeta"),b=Symbol("buffer"),_=Symbol("queue"),O=Symbol("ended"),w=Symbol("emittedEnd"),A=Symbol("emit"),I=Symbol("unzip"),P=Symbol("consumeChunk"),L=Symbol("consumeChunkSub"),$=Symbol("consumeBody"),x=Symbol("consumeMeta"),M=Symbol("consumeHeader"),U=Symbol("consuming"),V=Symbol("bufferConcat"),B=Symbol("maybeEnd"),G=Symbol("writing"),W=Symbol("aborted"),N=Symbol("onDone"),D=Symbol("sawValidEntry"),T=Symbol("sawNullBlock"),C=Symbol("sawEOF"),Z=Symbol("closeStream"),X=v(()=>!0,"noop"),Q=class extends t.EventEmitter{static{v(this,"Parser")}file;strict;maxMetaEntrySize;filter;brotli;zstd;writable=!0;readable=!1;[_]=[];[b];[d];[p];[h]="begin";[S]="";[f];[y];[O]=!1;[I];[W]=!1;[D];[T]=!1;[C]=!1;[G]=!1;[U]=!1;[w]=!1;constructor(k={}){super(),this.file=k.file||"",this.on(N,()=>{(this[h]==="begin"||this[D]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),k.ondone?this.on(N,k.ondone):this.on(N,()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!k.strict,this.maxMetaEntrySize=k.maxMetaEntrySize||r,this.filter=typeof k.filter=="function"?k.filter:X;let F=k.file&&(k.file.endsWith(".tar.br")||k.file.endsWith(".tbr"));this.brotli=!(k.gzip||k.zstd)&&k.brotli!==void 0?k.brotli:F?void 0:!1;let z=k.file&&(k.file.endsWith(".tar.zst")||k.file.endsWith(".tzst"));this.zstd=!(k.gzip||k.brotli)&&k.zstd!==void 0?k.zstd:z?!0:void 0,this.on("end",()=>this[Z]()),typeof k.onwarn=="function"&&this.on("warn",k.onwarn),typeof k.onReadEntry=="function"&&this.on("entry",k.onReadEntry)}warn(k,F,z={}){(0,c.warnMethod)(this,k,F,z)}[M](k,F){this[D]===void 0&&(this[D]=!1);let z;try{z=new u.Header(k,F,this[f],this[y])}catch(j){return this.warn("TAR_ENTRY_INVALID",j)}if(z.nullBlock)this[T]?(this[C]=!0,this[h]==="begin"&&(this[h]="header"),this[A]("eof")):(this[T]=!0,this[A]("nullBlock"));else if(this[T]=!1,!z.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:z});else if(!z.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:z});else{let j=z.type;if(/^(Symbolic)?Link$/.test(j)&&!z.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:z});else if(!/^(Symbolic)?Link$/.test(j)&&!/^(Global)?ExtendedHeader$/.test(j)&&z.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:z});else{let q=this[p]=new a.ReadEntry(z,this[f],this[y]);if(!this[D])if(q.remain){let J=v(()=>{q.invalid||(this[D]=!0)},"onend");q.on("end",J)}else this[D]=!0;q.meta?q.size>this.maxMetaEntrySize?(q.ignore=!0,this[A]("ignoredEntry",q),this[h]="ignore",q.resume()):q.size>0&&(this[S]="",q.on("data",J=>this[S]+=J),this[h]="meta"):(this[f]=void 0,q.ignore=q.ignore||!this.filter(q.path,q),q.ignore?(this[A]("ignoredEntry",q),this[h]=q.remain?"ignore":"header",q.resume()):(q.remain?this[h]="body":(this[h]="header",q.end()),this[d]?this[_].push(q):(this[_].push(q),this[g]())))}}}[Z](){queueMicrotask(()=>this.emit("close"))}[m](k){let F=!0;if(!k)this[d]=void 0,F=!1;else if(Array.isArray(k)){let[z,...j]=k;this.emit(z,...j)}else this[d]=k,this.emit("entry",k),k.emittedEnd||(k.on("end",()=>this[g]()),F=!1);return F}[g](){do;while(this[m](this[_].shift()));if(!this[_].length){let k=this[d];!k||k.flowing||k.size===k.remain?this[G]||this.emit("drain"):k.once("drain",()=>this.emit("drain"))}}[$](k,F){let z=this[p];if(!z)throw new Error("attempt to consume body without entry??");let j=z.blockRemain??0,q=j>=k.length&&F===0?k:k.subarray(F,F+j);return z.write(q),z.blockRemain||(this[h]="header",this[p]=void 0,z.end()),q.length}[x](k,F){let z=this[p],j=this[$](k,F);return!this[p]&&z&&this[E](z),j}[A](k,F,z){!this[_].length&&!this[d]?this.emit(k,F,z):this[_].push([k,F,z])}[E](k){switch(this[A]("meta",this[S]),k.type){case"ExtendedHeader":case"OldExtendedHeader":this[f]=i.Pax.parse(this[S],this[f],!1);break;case"GlobalExtendedHeader":this[y]=i.Pax.parse(this[S],this[y],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{let F=this[f]??Object.create(null);this[f]=F,F.path=this[S].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{let F=this[f]||Object.create(null);this[f]=F,F.linkpath=this[S].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+k.type)}}abort(k){this[W]=!0,this.emit("abort",k),this.warn("TAR_ABORT",k,{recoverable:!1})}write(k,F,z){if(typeof F=="function"&&(z=F,F=void 0),typeof k=="string"&&(k=Buffer.from(k,typeof F=="string"?F:"utf8")),this[W])return z?.(),!1;if((this[I]===void 0||this.brotli===void 0&&this[I]===!1)&&k){if(this[b]&&(k=Buffer.concat([this[b],k]),this[b]=void 0),k.length<l)return this[b]=k,z?.(),!0;for(let Y=0;this[I]===void 0&&Y<n.length;Y++)k[Y]!==n[Y]&&(this[I]=!1);let q=!1;if(this[I]===!1&&this.zstd!==!1){q=!0;for(let Y=0;Y<o.length;Y++)if(k[Y]!==o[Y]){q=!1;break}}let J=this.brotli===void 0&&!q;if(this[I]===!1&&J)if(k.length<512)if(this[O])this.brotli=!0;else return this[b]=k,z?.(),!0;else try{new u.Header(k.subarray(0,512)),this.brotli=!1}catch{this.brotli=!0}if(this[I]===void 0||this[I]===!1&&(this.brotli||q)){let Y=this[O];this[O]=!1,this[I]=this[I]===void 0?new s.Unzip({}):q?new s.ZstdDecompress({}):new s.BrotliDecompress({}),this[I].on("data",H=>this[P](H)),this[I].on("error",H=>this.abort(H)),this[I].on("end",()=>{this[O]=!0,this[P]()}),this[G]=!0;let R=!!this[I][Y?"end":"write"](k);return this[G]=!1,z?.(),R}}this[G]=!0,this[I]?this[I].write(k):this[P](k),this[G]=!1;let j=this[_].length?!1:this[d]?this[d].flowing:!0;return!j&&!this[_].length&&this[d]?.once("drain",()=>this.emit("drain")),z?.(),j}[V](k){k&&!this[W]&&(this[b]=this[b]?Buffer.concat([this[b],k]):k)}[B](){if(this[O]&&!this[w]&&!this[W]&&!this[U]){this[w]=!0;let k=this[p];if(k&&k.blockRemain){let F=this[b]?this[b].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${k.blockRemain} more bytes, only ${F} available)`,{entry:k}),this[b]&&k.write(this[b]),k.end()}this[A](N)}}[P](k){if(this[U]&&k)this[V](k);else if(!k&&!this[b])this[B]();else if(k){if(this[U]=!0,this[b]){this[V](k);let F=this[b];this[b]=void 0,this[L](F)}else this[L](k);for(;this[b]&&this[b]?.length>=512&&!this[W]&&!this[C];){let F=this[b];this[b]=void 0,this[L](F)}this[U]=!1}(!this[b]||this[O])&&this[B]()}[L](k){let F=0,z=k.length;for(;F+512<=z&&!this[W]&&!this[C];)switch(this[h]){case"begin":case"header":this[M](k,F),F+=512;break;case"ignore":case"body":F+=this[$](k,F);break;case"meta":F+=this[x](k,F);break;default:throw new Error("invalid state: "+this[h])}F<z&&(this[b]?this[b]=Buffer.concat([k.subarray(F),this[b]]):this[b]=k.subarray(F))}end(k,F,z){return typeof k=="function"&&(z=k,F=void 0,k=void 0),typeof F=="function"&&(z=F,F=void 0),typeof k=="string"&&(k=Buffer.from(k,F)),z&&this.once("finish",z),this[W]||(this[I]?(k&&this[I].write(k),this[I].end()):(this[O]=!0,(this.brotli===void 0||this.zstd===void 0)&&(k=k||Buffer.alloc(0)),k&&this.write(k),this[B]())),this}};e.Parser=Q}),Ml=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stripTrailingSlashes=void 0;var t=v(s=>{let u=s.length-1,i=-1;for(;u>-1&&s.charAt(u)==="/";)i=u,u--;return i===-1?s:s.slice(0,i)},"stripTrailingSlashes");e.stripTrailingSlashes=t}),ns=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(m,f,y,S){S===void 0&&(S=y);var E=Object.getOwnPropertyDescriptor(f,y);(!E||("get"in E?!f.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:v(function(){return f[y]},"get")}),Object.defineProperty(m,S,E)}:function(m,f,y,S){S===void 0&&(S=y),m[S]=f[y]}),s=e&&e.__setModuleDefault||(Object.create?function(m,f){Object.defineProperty(m,"default",{enumerable:!0,value:f})}:function(m,f){m.default=f}),u=e&&e.__importStar||function(m){if(m&&m.__esModule)return m;var f={};if(m!=null)for(var y in m)y!=="default"&&Object.prototype.hasOwnProperty.call(m,y)&&t(f,m,y);return s(f,m),f},i=e&&e.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(e,"__esModule",{value:!0}),e.list=e.filesFilter=void 0;var a=u(ds()),c=i(require("fs")),r=require("path"),n=fs(),o=$l(),l=Ml(),h=v(m=>{let f=m.onReadEntry;m.onReadEntry=f?y=>{f(y),y.resume()}:y=>y.resume()},"onReadEntryFunction"),p=v((m,f)=>{let y=new Map(f.map(b=>[(0,l.stripTrailingSlashes)(b),!0])),S=m.filter,E=v((b,_="")=>{let O=_||(0,r.parse)(b).root||".",w;if(b===O)w=!1;else{let A=y.get(b);A!==void 0?w=A:w=E((0,r.dirname)(b),O)}return y.set(b,w),w},"mapHas");m.filter=S?(b,_)=>S(b,_)&&E((0,l.stripTrailingSlashes)(b)):b=>E((0,l.stripTrailingSlashes)(b))},"filesFilter");e.filesFilter=p;var d=v(m=>{let f=new o.Parser(m),y=m.file,S;try{S=c.default.openSync(y,"r");let E=c.default.fstatSync(S),b=m.maxReadSize||16*1024*1024;if(E.size<b){let _=Buffer.allocUnsafe(E.size);c.default.readSync(S,_,0,E.size,0),f.end(_)}else{let _=0,O=Buffer.allocUnsafe(b);for(;_<E.size;){let w=c.default.readSync(S,O,0,b,_);_+=w,f.write(O.subarray(0,w))}f.end()}}finally{if(typeof S=="number")try{c.default.closeSync(S)}catch{}}},"listFileSync"),g=v((m,f)=>{let y=new o.Parser(m),S=m.maxReadSize||16*1024*1024,E=m.file;return new Promise((b,_)=>{y.on("error",_),y.on("end",b),c.default.stat(E,(O,w)=>{if(O)_(O);else{let A=new a.ReadStream(E,{readSize:S,size:w.size});A.on("error",_),A.pipe(y)}})})},"listFile");e.list=(0,n.makeCommand)(d,g,m=>new o.Parser(m),m=>new o.Parser(m),(m,f)=>{f?.length&&(0,e.filesFilter)(m,f),m.noResume||h(m)})}),tN=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.modeFix=void 0;var t=v((s,u,i)=>(s&=4095,i&&(s=(s|384)&-19),u&&(s&256&&(s|=64),s&32&&(s|=8),s&4&&(s|=1)),s),"modeFix");e.modeFix=t}),qf=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stripAbsolutePath=void 0;var t=require("path"),{isAbsolute:s,parse:u}=t.win32,i=v(a=>{let c="",r=u(a);for(;s(a)||r.root;){let n=a.charAt(0)==="/"&&a.slice(0,4)!=="//?/"?"/":r.root;a=a.slice(n.length),c+=n,r=u(a)}return[c,a]},"stripAbsolutePath");e.stripAbsolutePath=i}),Kf=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0;var t=["|","<",">","?",":"],s=t.map(r=>String.fromCharCode(61440+r.charCodeAt(0))),u=new Map(t.map((r,n)=>[r,s[n]])),i=new Map(s.map((r,n)=>[r,t[n]])),a=v(r=>t.reduce((n,o)=>n.split(o).join(u.get(o)),r),"encode");e.encode=a;var c=v(r=>s.reduce((n,o)=>n.split(o).join(i.get(o)),r),"decode");e.decode=c}),Jf=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(X,Q,k,F){F===void 0&&(F=k);var z=Object.getOwnPropertyDescriptor(Q,k);(!z||("get"in z?!Q.__esModule:z.writable||z.configurable))&&(z={enumerable:!0,get:v(function(){return Q[k]},"get")}),Object.defineProperty(X,F,z)}:function(X,Q,k,F){F===void 0&&(F=k),X[F]=Q[k]}),s=e&&e.__setModuleDefault||(Object.create?function(X,Q){Object.defineProperty(X,"default",{enumerable:!0,value:Q})}:function(X,Q){X.default=Q}),u=e&&e.__importStar||function(X){if(X&&X.__esModule)return X;var Q={};if(X!=null)for(var k in X)k!=="default"&&Object.prototype.hasOwnProperty.call(X,k)&&t(Q,X,k);return s(Q,X),Q},i=e&&e.__importDefault||function(X){return X&&X.__esModule?X:{default:X}};Object.defineProperty(e,"__esModule",{value:!0}),e.WriteEntryTar=e.WriteEntrySync=e.WriteEntry=void 0;var a=i(require("fs")),c=xe(),r=i(require("path")),n=gs(),o=tN(),l=ms(),h=Nl(),p=kl(),d=qf(),g=Ml(),m=Dl(),f=u(Kf()),y=v((X,Q)=>Q?(X=(0,l.normalizeWindowsPath)(X).replace(/^\.(\/|$)/,""),(0,g.stripTrailingSlashes)(Q)+"/"+X):(0,l.normalizeWindowsPath)(X),"prefixPath"),S=16*1024*1024,E=Symbol("process"),b=Symbol("file"),_=Symbol("directory"),O=Symbol("symlink"),w=Symbol("hardlink"),A=Symbol("header"),I=Symbol("read"),P=Symbol("lstat"),L=Symbol("onlstat"),$=Symbol("onread"),x=Symbol("onreadlink"),M=Symbol("openfile"),U=Symbol("onopenfile"),V=Symbol("close"),B=Symbol("mode"),G=Symbol("awaitDrain"),W=Symbol("ondrain"),N=Symbol("prefix"),D=class extends c.Minipass{static{v(this,"WriteEntry")}path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#e=!1;constructor(X,Q={}){let k=(0,h.dealias)(Q);super(),this.path=(0,l.normalizeWindowsPath)(X),this.portable=!!k.portable,this.maxReadSize=k.maxReadSize||S,this.linkCache=k.linkCache||new Map,this.statCache=k.statCache||new Map,this.preservePaths=!!k.preservePaths,this.cwd=(0,l.normalizeWindowsPath)(k.cwd||process.cwd()),this.strict=!!k.strict,this.noPax=!!k.noPax,this.noMtime=!!k.noMtime,this.mtime=k.mtime,this.prefix=k.prefix?(0,l.normalizeWindowsPath)(k.prefix):void 0,this.onWriteEntry=k.onWriteEntry,typeof k.onwarn=="function"&&this.on("warn",k.onwarn);let F=!1;if(!this.preservePaths){let[j,q]=(0,d.stripAbsolutePath)(this.path);j&&typeof q=="string"&&(this.path=q,F=j)}this.win32=!!k.win32||process.platform==="win32",this.win32&&(this.path=f.decode(this.path.replace(/\\/g,"/")),X=X.replace(/\\/g,"/")),this.absolute=(0,l.normalizeWindowsPath)(k.absolute||r.default.resolve(this.cwd,X)),this.path===""&&(this.path="./"),F&&this.warn("TAR_ENTRY_INFO",`stripping ${F} from absolute path`,{entry:this,path:F+this.path});let z=this.statCache.get(this.absolute);z?this[L](z):this[P]()}warn(X,Q,k={}){return(0,m.warnMethod)(this,X,Q,k)}emit(X,...Q){return X==="error"&&(this.#e=!0),super.emit(X,...Q)}[P](){a.default.lstat(this.absolute,(X,Q)=>{if(X)return this.emit("error",X);this[L](Q)})}[L](X){this.statCache.set(this.absolute,X),this.stat=X,X.isFile()||(X.size=0),this.type=Z(X),this.emit("stat",X),this[E]()}[E](){switch(this.type){case"File":return this[b]();case"Directory":return this[_]();case"SymbolicLink":return this[O]();default:return this.end()}}[B](X){return(0,o.modeFix)(X,this.type==="Directory",this.portable)}[N](X){return y(X,this.prefix)}[A](){if(!this.stat)throw new Error("cannot write header before stat");this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new n.Header({path:this[N](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[N](this.linkpath):this.linkpath,mode:this[B](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:this.type==="Unsupported"?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new p.Pax({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[N](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[N](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());let X=this.header?.block;if(!X)throw new Error("failed to encode header");super.write(X)}[_](){if(!this.stat)throw new Error("cannot create directory entry without stat");this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[A](),this.end()}[O](){a.default.readlink(this.absolute,(X,Q)=>{if(X)return this.emit("error",X);this[x](Q)})}[x](X){this.linkpath=(0,l.normalizeWindowsPath)(X),this[A](),this.end()}[w](X){if(!this.stat)throw new Error("cannot create link entry without stat");this.type="Link",this.linkpath=(0,l.normalizeWindowsPath)(r.default.relative(this.cwd,X)),this.stat.size=0,this[A](),this.end()}[b](){if(!this.stat)throw new Error("cannot create file entry without stat");if(this.stat.nlink>1){let X=`${this.stat.dev}:${this.stat.ino}`,Q=this.linkCache.get(X);if(Q?.indexOf(this.cwd)===0)return this[w](Q);this.linkCache.set(X,this.absolute)}if(this[A](),this.stat.size===0)return this.end();this[M]()}[M](){a.default.open(this.absolute,"r",(X,Q)=>{if(X)return this.emit("error",X);this[U](Q)})}[U](X){if(this.fd=X,this.#e)return this[V]();if(!this.stat)throw new Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let Q=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(Q),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[I]()}[I](){let{fd:X,buf:Q,offset:k,length:F,pos:z}=this;if(X===void 0||Q===void 0)throw new Error("cannot read file without first opening");a.default.read(X,Q,k,F,z,(j,q)=>{if(j)return this[V](()=>this.emit("error",j));this[$](q)})}[V](X=()=>{}){this.fd!==void 0&&a.default.close(this.fd,X)}[$](X){if(X<=0&&this.remain>0){let k=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[V](()=>this.emit("error",k))}if(X>this.remain){let k=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[V](()=>this.emit("error",k))}if(!this.buf)throw new Error("should have created buffer prior to reading");if(X===this.remain)for(let k=X;k<this.length&&X<this.blockRemain;k++)this.buf[k+this.offset]=0,X++,this.remain++;let Q=this.offset===0&&X===this.buf.length?this.buf:this.buf.subarray(this.offset,this.offset+X);this.write(Q)?this[W]():this[G](()=>this[W]())}[G](X){this.once("drain",X)}write(X,Q,k){if(typeof Q=="function"&&(k=Q,Q=void 0),typeof X=="string"&&(X=Buffer.from(X,typeof Q=="string"?Q:"utf8")),this.blockRemain<X.length){let F=Object.assign(new Error("writing more data than expected"),{path:this.absolute});return this.emit("error",F)}return this.remain-=X.length,this.blockRemain-=X.length,this.pos+=X.length,this.offset+=X.length,super.write(X,null,k)}[W](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[V](X=>X?this.emit("error",X):this.end());if(!this.buf)throw new Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[I]()}};e.WriteEntry=D;var T=class extends D{static{v(this,"WriteEntrySync")}sync=!0;[P](){this[L](a.default.lstatSync(this.absolute))}[O](){this[x](a.default.readlinkSync(this.absolute))}[M](){this[U](a.default.openSync(this.absolute,"r"))}[I](){let X=!0;try{let{fd:Q,buf:k,offset:F,length:z,pos:j}=this;if(Q===void 0||k===void 0)throw new Error("fd and buf must be set in READ method");let q=a.default.readSync(Q,k,F,z,j);this[$](q),X=!1}finally{if(X)try{this[V](()=>{})}catch{}}}[G](X){X()}[V](X=()=>{}){this.fd!==void 0&&a.default.closeSync(this.fd),X()}};e.WriteEntrySync=T;var C=class extends c.Minipass{static{v(this,"WriteEntryTar")}blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(X,Q,k={}){return(0,m.warnMethod)(this,X,Q,k)}constructor(X,Q={}){let k=(0,h.dealias)(Q);super(),this.preservePaths=!!k.preservePaths,this.portable=!!k.portable,this.strict=!!k.strict,this.noPax=!!k.noPax,this.noMtime=!!k.noMtime,this.onWriteEntry=k.onWriteEntry,this.readEntry=X;let{type:F}=X;if(F==="Unsupported")throw new Error("writing entry that should be ignored");this.type=F,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=k.prefix,this.path=(0,l.normalizeWindowsPath)(X.path),this.mode=X.mode!==void 0?this[B](X.mode):void 0,this.uid=this.portable?void 0:X.uid,this.gid=this.portable?void 0:X.gid,this.uname=this.portable?void 0:X.uname,this.gname=this.portable?void 0:X.gname,this.size=X.size,this.mtime=this.noMtime?void 0:k.mtime||X.mtime,this.atime=this.portable?void 0:X.atime,this.ctime=this.portable?void 0:X.ctime,this.linkpath=X.linkpath!==void 0?(0,l.normalizeWindowsPath)(X.linkpath):void 0,typeof k.onwarn=="function"&&this.on("warn",k.onwarn);let z=!1;if(!this.preservePaths){let[q,J]=(0,d.stripAbsolutePath)(this.path);q&&typeof J=="string"&&(this.path=J,z=q)}this.remain=X.size,this.blockRemain=X.startBlockSize,this.onWriteEntry?.(this),this.header=new n.Header({path:this[N](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[N](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),z&&this.warn("TAR_ENTRY_INFO",`stripping ${z} from absolute path`,{entry:this,path:z+this.path}),this.header.encode()&&!this.noPax&&super.write(new p.Pax({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[N](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[N](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());let j=this.header?.block;if(!j)throw new Error("failed to encode header");super.write(j),X.pipe(this)}[N](X){return y(X,this.prefix)}[B](X){return(0,o.modeFix)(X,this.type==="Directory",this.portable)}write(X,Q,k){typeof Q=="function"&&(k=Q,Q=void 0),typeof X=="string"&&(X=Buffer.from(X,typeof Q=="string"?Q:"utf8"));let F=X.length;if(F>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=F,super.write(X,k)}end(X,Q,k){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),typeof X=="function"&&(k=X,Q=void 0,X=void 0),typeof Q=="function"&&(k=Q,Q=void 0),typeof X=="string"&&(X=Buffer.from(X,Q??"utf8")),k&&this.once("finish",k),X?super.end(X,k):super.end(k),this}};e.WriteEntryTar=C;var Z=v(X=>X.isFile()?"File":X.isDirectory()?"Directory":X.isSymbolicLink()?"SymbolicLink":"Unsupported","getType")}),rN=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Node=e.Yallist=void 0;var t=class mr{static{v(this,"Yallist")}tail;head;length=0;static create(r=[]){return new mr(r)}constructor(r=[]){for(let n of r)this.push(n)}*[Symbol.iterator](){for(let r=this.head;r;r=r.next)yield r.value}removeNode(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");let n=r.next,o=r.prev;return n&&(n.prev=o),o&&(o.next=n),r===this.head&&(this.head=n),r===this.tail&&(this.tail=o),this.length--,r.next=void 0,r.prev=void 0,r.list=void 0,n}unshiftNode(r){if(r===this.head)return;r.list&&r.list.removeNode(r);let n=this.head;r.list=this,r.next=n,n&&(n.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}pushNode(r){if(r===this.tail)return;r.list&&r.list.removeNode(r);let n=this.tail;r.list=this,r.prev=n,n&&(n.next=r),this.tail=r,this.head||(this.head=r),this.length++}push(...r){for(let n=0,o=r.length;n<o;n++)u(this,r[n]);return this.length}unshift(...r){for(var n=0,o=r.length;n<o;n++)i(this,r[n]);return this.length}pop(){if(!this.tail)return;let r=this.tail.value,n=this.tail;return this.tail=this.tail.prev,this.tail?this.tail.next=void 0:this.head=void 0,n.list=void 0,this.length--,r}shift(){if(!this.head)return;let r=this.head.value,n=this.head;return this.head=this.head.next,this.head?this.head.prev=void 0:this.tail=void 0,n.list=void 0,this.length--,r}forEach(r,n){n=n||this;for(let o=this.head,l=0;o;l++)r.call(n,o.value,l,this),o=o.next}forEachReverse(r,n){n=n||this;for(let o=this.tail,l=this.length-1;o;l--)r.call(n,o.value,l,this),o=o.prev}get(r){let n=0,o=this.head;for(;o&&n<r;n++)o=o.next;if(n===r&&o)return o.value}getReverse(r){let n=0,o=this.tail;for(;o&&n<r;n++)o=o.prev;if(n===r&&o)return o.value}map(r,n){n=n||this;let o=new mr;for(let l=this.head;l;)o.push(r.call(n,l.value,this)),l=l.next;return o}mapReverse(r,n){n=n||this;var o=new mr;for(let l=this.tail;l;)o.push(r.call(n,l.value,this)),l=l.prev;return o}reduce(r,n){let o,l=this.head;if(arguments.length>1)o=n;else if(this.head)l=this.head.next,o=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var h=0;l;h++)o=r(o,l.value,h),l=l.next;return o}reduceReverse(r,n){let o,l=this.tail;if(arguments.length>1)o=n;else if(this.tail)l=this.tail.prev,o=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(let h=this.length-1;l;h--)o=r(o,l.value,h),l=l.prev;return o}toArray(){let r=new Array(this.length);for(let n=0,o=this.head;o;n++)r[n]=o.value,o=o.next;return r}toArrayReverse(){let r=new Array(this.length);for(let n=0,o=this.tail;o;n++)r[n]=o.value,o=o.prev;return r}slice(r=0,n=this.length){n<0&&(n+=this.length),r<0&&(r+=this.length);let o=new mr;if(n<r||n<0)return o;r<0&&(r=0),n>this.length&&(n=this.length);let l=this.head,h=0;for(h=0;l&&h<r;h++)l=l.next;for(;l&&h<n;h++,l=l.next)o.push(l.value);return o}sliceReverse(r=0,n=this.length){n<0&&(n+=this.length),r<0&&(r+=this.length);let o=new mr;if(n<r||n<0)return o;r<0&&(r=0),n>this.length&&(n=this.length);let l=this.length,h=this.tail;for(;h&&l>n;l--)h=h.prev;for(;h&&l>r;l--,h=h.prev)o.push(h.value);return o}splice(r,n=0,...o){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);let l=this.head;for(let p=0;l&&p<r;p++)l=l.next;let h=[];for(let p=0;l&&p<n;p++)h.push(l.value),l=this.removeNode(l);l?l!==this.tail&&(l=l.prev):l=this.tail;for(let p of o)l=s(this,l,p);return h}reverse(){let r=this.head,n=this.tail;for(let o=r;o;o=o.prev){let l=o.prev;o.prev=o.next,o.next=l}return this.head=n,this.tail=r,this}};e.Yallist=t;function s(c,r,n){let o=r,l=r?r.next:c.head,h=new a(n,o,l,c);return h.next===void 0&&(c.tail=h),h.prev===void 0&&(c.head=h),c.length++,h}v(s,"insertAfter");function u(c,r){c.tail=new a(r,c.tail,void 0,c),c.head||(c.head=c.tail),c.length++}v(u,"push");function i(c,r){c.head=new a(r,void 0,c.head,c),c.tail||(c.tail=c.head),c.length++}v(i,"unshift");var a=class{static{v(this,"Node")}list;next;prev;value;constructor(c,r,n,o){this.list=o,this.value=c,r?(r.next=this,this.prev=r):this.prev=void 0,n?(n.prev=this,this.next=n):this.next=void 0}};e.Node=a}),jl=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(T,C,Z,X){X===void 0&&(X=Z);var Q=Object.getOwnPropertyDescriptor(C,Z);(!Q||("get"in Q?!C.__esModule:Q.writable||Q.configurable))&&(Q={enumerable:!0,get:v(function(){return C[Z]},"get")}),Object.defineProperty(T,X,Q)}:function(T,C,Z,X){X===void 0&&(X=Z),T[X]=C[Z]}),s=e&&e.__setModuleDefault||(Object.create?function(T,C){Object.defineProperty(T,"default",{enumerable:!0,value:C})}:function(T,C){T.default=C}),u=e&&e.__importStar||function(T){if(T&&T.__esModule)return T;var C={};if(T!=null)for(var Z in T)Z!=="default"&&Object.prototype.hasOwnProperty.call(T,Z)&&t(C,T,Z);return s(C,T),C},i=e&&e.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(e,"__esModule",{value:!0}),e.PackSync=e.Pack=e.PackJob=void 0;var a=i(require("fs")),c=Jf(),r=class{static{v(this,"PackJob")}path;absolute;entry;stat;readdir;pending=!1;ignore=!1;piped=!1;constructor(T,C){this.path=T||"./",this.absolute=C}};e.PackJob=r;var n=xe(),o=u(Gi()),l=rN(),h=Ll(),p=Dl(),d=Buffer.alloc(1024),g=Symbol("onStat"),m=Symbol("ended"),f=Symbol("queue"),y=Symbol("current"),S=Symbol("process"),E=Symbol("processing"),b=Symbol("processJob"),_=Symbol("jobs"),O=Symbol("jobDone"),w=Symbol("addFSEntry"),A=Symbol("addTarEntry"),I=Symbol("stat"),P=Symbol("readdir"),L=Symbol("onreaddir"),$=Symbol("pipe"),x=Symbol("entry"),M=Symbol("entryOpt"),U=Symbol("writeEntryClass"),V=Symbol("write"),B=Symbol("ondrain"),G=i(require("path")),W=ms(),N=class extends n.Minipass{static{v(this,"Pack")}opt;cwd;maxReadSize;preservePaths;strict;noPax;prefix;linkCache;statCache;file;portable;zip;readdirCache;noDirRecurse;follow;noMtime;mtime;filter;jobs;[U];onWriteEntry;[f];[_]=0;[E]=!1;[m]=!1;constructor(T={}){if(super(),this.opt=T,this.file=T.file||"",this.cwd=T.cwd||process.cwd(),this.maxReadSize=T.maxReadSize,this.preservePaths=!!T.preservePaths,this.strict=!!T.strict,this.noPax=!!T.noPax,this.prefix=(0,W.normalizeWindowsPath)(T.prefix||""),this.linkCache=T.linkCache||new Map,this.statCache=T.statCache||new Map,this.readdirCache=T.readdirCache||new Map,this.onWriteEntry=T.onWriteEntry,this[U]=c.WriteEntry,typeof T.onwarn=="function"&&this.on("warn",T.onwarn),this.portable=!!T.portable,T.gzip||T.brotli||T.zstd){if((T.gzip?1:0)+(T.brotli?1:0)+(T.zstd?1:0)>1)throw new TypeError("gzip, brotli, zstd are mutually exclusive");if(T.gzip&&(typeof T.gzip!="object"&&(T.gzip={}),this.portable&&(T.gzip.portable=!0),this.zip=new o.Gzip(T.gzip)),T.brotli&&(typeof T.brotli!="object"&&(T.brotli={}),this.zip=new o.BrotliCompress(T.brotli)),T.zstd&&(typeof T.zstd!="object"&&(T.zstd={}),this.zip=new o.ZstdCompress(T.zstd)),!this.zip)throw new Error("impossible");let C=this.zip;C.on("data",Z=>super.write(Z)),C.on("end",()=>super.end()),C.on("drain",()=>this[B]()),this.on("resume",()=>C.resume())}else this.on("drain",this[B]);this.noDirRecurse=!!T.noDirRecurse,this.follow=!!T.follow,this.noMtime=!!T.noMtime,T.mtime&&(this.mtime=T.mtime),this.filter=typeof T.filter=="function"?T.filter:()=>!0,this[f]=new l.Yallist,this[_]=0,this.jobs=Number(T.jobs)||4,this[E]=!1,this[m]=!1}[V](T){return super.write(T)}add(T){return this.write(T),this}end(T,C,Z){return typeof T=="function"&&(Z=T,T=void 0),typeof C=="function"&&(Z=C,C=void 0),T&&this.add(T),this[m]=!0,this[S](),Z&&Z(),this}write(T){if(this[m])throw new Error("write after end");return T instanceof h.ReadEntry?this[A](T):this[w](T),this.flowing}[A](T){let C=(0,W.normalizeWindowsPath)(G.default.resolve(this.cwd,T.path));if(!this.filter(T.path,T))T.resume();else{let Z=new r(T.path,C);Z.entry=new c.WriteEntryTar(T,this[M](Z)),Z.entry.on("end",()=>this[O](Z)),this[_]+=1,this[f].push(Z)}this[S]()}[w](T){let C=(0,W.normalizeWindowsPath)(G.default.resolve(this.cwd,T));this[f].push(new r(T,C)),this[S]()}[I](T){T.pending=!0,this[_]+=1;let C=this.follow?"stat":"lstat";a.default[C](T.absolute,(Z,X)=>{T.pending=!1,this[_]-=1,Z?this.emit("error",Z):this[g](T,X)})}[g](T,C){this.statCache.set(T.absolute,C),T.stat=C,this.filter(T.path,C)||(T.ignore=!0),this[S]()}[P](T){T.pending=!0,this[_]+=1,a.default.readdir(T.absolute,(C,Z)=>{if(T.pending=!1,this[_]-=1,C)return this.emit("error",C);this[L](T,Z)})}[L](T,C){this.readdirCache.set(T.absolute,C),T.readdir=C,this[S]()}[S](){if(!this[E]){this[E]=!0;for(let T=this[f].head;T&&this[_]<this.jobs;T=T.next)if(this[b](T.value),T.value.ignore){let C=T.next;this[f].removeNode(T),T.next=C}this[E]=!1,this[m]&&!this[f].length&&this[_]===0&&(this.zip?this.zip.end(d):(super.write(d),super.end()))}}get[y](){return this[f]&&this[f].head&&this[f].head.value}[O](T){this[f].shift(),this[_]-=1,this[S]()}[b](T){if(!T.pending){if(T.entry){T===this[y]&&!T.piped&&this[$](T);return}if(!T.stat){let C=this.statCache.get(T.absolute);C?this[g](T,C):this[I](T)}if(T.stat&&!T.ignore){if(!this.noDirRecurse&&T.stat.isDirectory()&&!T.readdir){let C=this.readdirCache.get(T.absolute);if(C?this[L](T,C):this[P](T),!T.readdir)return}if(T.entry=this[x](T),!T.entry){T.ignore=!0;return}T===this[y]&&!T.piped&&this[$](T)}}}[M](T){return{onwarn:v((C,Z,X)=>this.warn(C,Z,X),"onwarn"),noPax:this.noPax,cwd:this.cwd,absolute:T.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[x](T){this[_]+=1;try{return new this[U](T.path,this[M](T)).on("end",()=>this[O](T)).on("error",C=>this.emit("error",C))}catch(C){this.emit("error",C)}}[B](){this[y]&&this[y].entry&&this[y].entry.resume()}[$](T){T.piped=!0,T.readdir&&T.readdir.forEach(X=>{let Q=T.path,k=Q==="./"?"":Q.replace(/\/*$/,"/");this[w](k+X)});let C=T.entry,Z=this.zip;if(!C)throw new Error("cannot pipe without source");Z?C.on("data",X=>{Z.write(X)||C.pause()}):C.on("data",X=>{super.write(X)||C.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(T,C,Z={}){(0,p.warnMethod)(this,T,C,Z)}};e.Pack=N;var D=class extends N{static{v(this,"PackSync")}sync=!0;constructor(T){super(T),this[U]=c.WriteEntrySync}pause(){}resume(){}[I](T){let C=this.follow?"statSync":"lstatSync";this[g](T,a.default[C](T.absolute))}[P](T){this[L](T,a.default.readdirSync(T.absolute))}[$](T){let C=T.entry,Z=this.zip;if(T.readdir&&T.readdir.forEach(X=>{let Q=T.path,k=Q==="./"?"":Q.replace(/\/*$/,"/");this[w](k+X)}),!C)throw new Error("Cannot pipe without source");Z?C.on("data",X=>{Z.write(X)}):C.on("data",X=>{super[V](X)})}};e.PackSync=D}),Xd=K(e=>{"use strict";var t=e&&e.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.create=void 0;var s=ds(),u=t(require("path")),i=ns(),a=fs(),c=jl(),r=v((d,g)=>{let m=new c.PackSync(d),f=new s.WriteStreamSync(d.file,{mode:d.mode||438});m.pipe(f),o(m,g)},"createFileSync"),n=v((d,g)=>{let m=new c.Pack(d),f=new s.WriteStream(d.file,{mode:d.mode||438});m.pipe(f);let y=new Promise((S,E)=>{f.on("error",E),f.on("close",S),m.on("error",E)});return l(m,g),y},"createFile"),o=v((d,g)=>{g.forEach(m=>{m.charAt(0)==="@"?(0,i.list)({file:u.default.resolve(d.cwd,m.slice(1)),sync:!0,noResume:!0,onReadEntry:v(f=>d.add(f),"onReadEntry")}):d.add(m)}),d.end()},"addFilesSync"),l=v(async(d,g)=>{for(let m=0;m<g.length;m++){let f=String(g[m]);f.charAt(0)==="@"?await(0,i.list)({file:u.default.resolve(String(d.cwd),f.slice(1)),noResume:!0,onReadEntry:v(y=>{d.add(y)},"onReadEntry")}):d.add(f)}d.end()},"addFilesAsync"),h=v((d,g)=>{let m=new c.PackSync(d);return o(m,g),m},"createSync"),p=v((d,g)=>{let m=new c.Pack(d);return l(m,g),m},"createAsync");e.create=(0,a.makeCommand)(r,n,h,p,(d,g)=>{if(!g?.length)throw new TypeError("no paths specified to add to archive")})}),sN=K(e=>{"use strict";var t=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.getWriteFlag=void 0;var s=t(require("fs")),u=process.env.__FAKE_PLATFORM__||process.platform,i=u==="win32",{O_CREAT:a,O_TRUNC:c,O_WRONLY:r}=s.default.constants,n=Number(process.env.__FAKE_FS_O_FILENAME__)||s.default.constants.UV_FS_O_FILEMAP||0,o=i&&!!n,l=512*1024,h=n|c|a|r;e.getWriteFlag=o?p=>p<l?h:"w":()=>"w"}),iN=K(e=>{"use strict";var t=e&&e.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.chownrSync=e.chownr=void 0;var s=t(require("fs")),u=t(require("path")),i=v((l,h,p)=>{try{return s.default.lchownSync(l,h,p)}catch(d){if(d?.code!=="ENOENT")throw d}},"lchownSync"),a=v((l,h,p,d)=>{s.default.lchown(l,h,p,g=>{d(g&&g?.code!=="ENOENT"?g:null)})},"chown"),c=v((l,h,p,d,g)=>{if(h.isDirectory())(0,e.chownr)(u.default.resolve(l,h.name),p,d,m=>{if(m)return g(m);let f=u.default.resolve(l,h.name);a(f,p,d,g)});else{let m=u.default.resolve(l,h.name);a(m,p,d,g)}},"chownrKid"),r=v((l,h,p,d)=>{s.default.readdir(l,{withFileTypes:!0},(g,m)=>{if(g){if(g.code==="ENOENT")return d();if(g.code!=="ENOTDIR"&&g.code!=="ENOTSUP")return d(g)}if(g||!m.length)return a(l,h,p,d);let f=m.length,y=null,S=v(E=>{if(!y){if(E)return d(y=E);if(--f===0)return a(l,h,p,d)}},"then");for(let E of m)c(l,E,h,p,S)})},"chownr");e.chownr=r;var n=v((l,h,p,d)=>{h.isDirectory()&&(0,e.chownrSync)(u.default.resolve(l,h.name),p,d),i(u.default.resolve(l,h.name),p,d)},"chownrKidSync"),o=v((l,h,p)=>{let d;try{d=s.default.readdirSync(l,{withFileTypes:!0})}catch(g){let m=g;if(m?.code==="ENOENT")return;if(m?.code==="ENOTDIR"||m?.code==="ENOTSUP")return i(l,h,p);throw m}for(let g of d)n(l,g,h,p);return i(l,h,p)},"chownrSync");e.chownrSync=o}),nN=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CwdError=void 0;var t=class extends Error{static{v(this,"CwdError")}path;code;syscall="chdir";constructor(s,u){super(`${u}: Cannot cd into '${s}'`),this.path=s,this.code=u}get name(){return"CwdError"}};e.CwdError=t}),oN=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SymlinkError=void 0;var t=class extends Error{static{v(this,"SymlinkError")}path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(s,u){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=s,this.path=u}get name(){return"SymlinkError"}};e.SymlinkError=t}),aN=K(e=>{"use strict";var t=e&&e.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(e,"__esModule",{value:!0}),e.mkdirSync=e.mkdir=void 0;var s=iN(),u=t(require("fs")),i=t(require("internal/fs/promises")),a=t(require("path")),c=nN(),r=ms(),n=oN(),o=v((m,f)=>{u.default.stat(m,(y,S)=>{(y||!S.isDirectory())&&(y=new c.CwdError(m,y?.code||"ENOTDIR")),f(y)})},"checkCwd"),l=v((m,f,y)=>{m=(0,r.normalizeWindowsPath)(m);let S=f.umask??18,E=f.mode|448,b=(E&S)!==0,_=f.uid,O=f.gid,w=typeof _=="number"&&typeof O=="number"&&(_!==f.processUid||O!==f.processGid),A=f.preserve,I=f.unlink,P=(0,r.normalizeWindowsPath)(f.cwd),L=v((x,M)=>{x?y(x):M&&w?(0,s.chownr)(M,_,O,U=>L(U)):b?u.default.chmod(m,E,y):y()},"done");if(m===P)return o(m,L);if(A)return i.default.mkdir(m,{mode:E,recursive:!0}).then(x=>L(null,x??void 0),L);let $=(0,r.normalizeWindowsPath)(a.default.relative(P,m)).split("/");h(P,$,E,I,P,void 0,L)},"mkdir");e.mkdir=l;var h=v((m,f,y,S,E,b,_)=>{if(!f.length)return _(null,b);let O=f.shift(),w=(0,r.normalizeWindowsPath)(a.default.resolve(m+"/"+O));u.default.mkdir(w,y,p(w,f,y,S,E,b,_))},"mkdir_"),p=v((m,f,y,S,E,b,_)=>O=>{O?u.default.lstat(m,(w,A)=>{if(w)w.path=w.path&&(0,r.normalizeWindowsPath)(w.path),_(w);else if(A.isDirectory())h(m,f,y,S,E,b,_);else if(S)u.default.unlink(m,I=>{if(I)return _(I);u.default.mkdir(m,y,p(m,f,y,S,E,b,_))});else{if(A.isSymbolicLink())return _(new n.SymlinkError(m,m+"/"+f.join("/")));_(O)}}):(b=b||m,h(m,f,y,S,E,b,_))},"onmkdir"),d=v(m=>{let f=!1,y;try{f=u.default.statSync(m).isDirectory()}catch(S){y=S?.code}finally{if(!f)throw new c.CwdError(m,y??"ENOTDIR")}},"checkCwdSync"),g=v((m,f)=>{m=(0,r.normalizeWindowsPath)(m);let y=f.umask??18,S=f.mode|448,E=(S&y)!==0,b=f.uid,_=f.gid,O=typeof b=="number"&&typeof _=="number"&&(b!==f.processUid||_!==f.processGid),w=f.preserve,A=f.unlink,I=(0,r.normalizeWindowsPath)(f.cwd),P=v(x=>{x&&O&&(0,s.chownrSync)(x,b,_),E&&u.default.chmodSync(m,S)},"done");if(m===I)return d(I),P();if(w)return P(u.default.mkdirSync(m,{mode:S,recursive:!0})??void 0);let L=(0,r.normalizeWindowsPath)(a.default.relative(I,m)).split("/"),$;for(let x=L.shift(),M=I;x&&(M+="/"+x);x=L.shift()){M=(0,r.normalizeWindowsPath)(a.default.resolve(M));try{u.default.mkdirSync(M,S),$=$||M}catch{let U=u.default.lstatSync(M);if(U.isDirectory())continue;if(A){u.default.unlinkSync(M),u.default.mkdirSync(M,S),$=$||M;continue}else if(U.isSymbolicLink())return new n.SymlinkError(M,M+"/"+L.join("/"))}}return P($)},"mkdirSync");e.mkdirSync=g}),lN=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeUnicode=void 0;var t=Object.create(null),s=1e4,u=new Set,i=v(a=>{u.has(a)?u.delete(a):t[a]=a.normalize("NFD"),u.add(a);let c=t[a],r=u.size-s;if(r>s/10){for(let n of u)if(u.delete(n),delete t[n],--r<=0)break}return c},"normalizeUnicode");e.normalizeUnicode=i}),cN=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PathReservations=void 0;var t=require("path"),s=lN(),u=Ml(),i=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,a=i==="win32",c=v(n=>n.split("/").slice(0,-1).reduce((o,l)=>{let h=o[o.length-1];return h!==void 0&&(l=(0,t.join)(h,l)),o.push(l||"/"),o},[]),"getDirs"),r=class{static{v(this,"PathReservations")}#e=new Map;#t=new Map;#r=new Set;reserve(n,o){n=a?["win32 parallelization disabled"]:n.map(h=>(0,u.stripTrailingSlashes)((0,t.join)((0,s.normalizeUnicode)(h))).toLowerCase());let l=new Set(n.map(h=>c(h)).reduce((h,p)=>h.concat(p)));this.#t.set(o,{dirs:l,paths:n});for(let h of n){let p=this.#e.get(h);p?p.push(o):this.#e.set(h,[o])}for(let h of l){let p=this.#e.get(h);if(!p)this.#e.set(h,[new Set([o])]);else{let d=p[p.length-1];d instanceof Set?d.add(o):p.push(new Set([o]))}}return this.#i(o)}#s(n){let o=this.#t.get(n);if(!o)throw new Error("function does not have any path reservations");return{paths:o.paths.map(l=>this.#e.get(l)),dirs:[...o.dirs].map(l=>this.#e.get(l))}}check(n){let{paths:o,dirs:l}=this.#s(n);return o.every(h=>h&&h[0]===n)&&l.every(h=>h&&h[0]instanceof Set&&h[0].has(n))}#i(n){return this.#r.has(n)||!this.check(n)?!1:(this.#r.add(n),n(()=>this.#l(n)),!0)}#l(n){if(!this.#r.has(n))return!1;let o=this.#t.get(n);if(!o)throw new Error("invalid reservation");let{paths:l,dirs:h}=o,p=new Set;for(let d of l){let g=this.#e.get(d);if(!g||g?.[0]!==n)continue;let m=g[1];if(!m){this.#e.delete(d);continue}if(g.shift(),typeof m=="function")p.add(m);else for(let f of m)p.add(f)}for(let d of h){let g=this.#e.get(d),m=g?.[0];if(!(!g||!(m instanceof Set)))if(m.size===1&&g.length===1){this.#e.delete(d);continue}else if(m.size===1){g.shift();let f=g[0];typeof f=="function"&&p.add(f)}else m.delete(n)}return this.#r.delete(n),p.forEach(d=>this.#i(d)),!0}};e.PathReservations=r}),Zf=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(R,H,ee,ne){ne===void 0&&(ne=ee);var te=Object.getOwnPropertyDescriptor(H,ee);(!te||("get"in te?!H.__esModule:te.writable||te.configurable))&&(te={enumerable:!0,get:v(function(){return H[ee]},"get")}),Object.defineProperty(R,ne,te)}:function(R,H,ee,ne){ne===void 0&&(ne=ee),R[ne]=H[ee]}),s=e&&e.__setModuleDefault||(Object.create?function(R,H){Object.defineProperty(R,"default",{enumerable:!0,value:H})}:function(R,H){R.default=H}),u=e&&e.__importStar||function(R){if(R&&R.__esModule)return R;var H={};if(R!=null)for(var ee in R)ee!=="default"&&Object.prototype.hasOwnProperty.call(R,ee)&&t(H,R,ee);return s(H,R),H},i=e&&e.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(e,"__esModule",{value:!0}),e.UnpackSync=e.Unpack=void 0;var a=u(ds()),c=i(require("assert")),r=require("crypto"),n=i(require("fs")),o=i(require("path")),l=sN(),h=aN(),p=ms(),d=$l(),g=qf(),m=u(Kf()),f=cN(),y=Symbol("onEntry"),S=Symbol("checkFs"),E=Symbol("checkFs2"),b=Symbol("isReusable"),_=Symbol("makeFs"),O=Symbol("file"),w=Symbol("directory"),A=Symbol("link"),I=Symbol("symlink"),P=Symbol("hardlink"),L=Symbol("unsupported"),$=Symbol("checkPath"),x=Symbol("mkdir"),M=Symbol("onError"),U=Symbol("pending"),V=Symbol("pend"),B=Symbol("unpend"),G=Symbol("ended"),W=Symbol("maybeClose"),N=Symbol("skip"),D=Symbol("doChown"),T=Symbol("uid"),C=Symbol("gid"),Z=Symbol("checkedCwd"),X=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Q=X==="win32",k=1024,F=v((R,H)=>{if(!Q)return n.default.unlink(R,H);let ee=R+".DELETE."+(0,r.randomBytes)(16).toString("hex");n.default.rename(R,ee,ne=>{if(ne)return H(ne);n.default.unlink(ee,H)})},"unlinkFile"),z=v(R=>{if(!Q)return n.default.unlinkSync(R);let H=R+".DELETE."+(0,r.randomBytes)(16).toString("hex");n.default.renameSync(R,H),n.default.unlinkSync(H)},"unlinkFileSync"),j=v((R,H,ee)=>R!==void 0&&R===R>>>0?R:H!==void 0&&H===H>>>0?H:ee,"uint32"),q=class extends d.Parser{static{v(this,"Unpack")}[G]=!1;[Z]=!1;[U]=0;reservations=new f.PathReservations;transform;writable=!0;readable=!1;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(R={}){if(R.ondone=()=>{this[G]=!0,this[W]()},super(R),this.transform=R.transform,this.chmod=!!R.chmod,typeof R.uid=="number"||typeof R.gid=="number"){if(typeof R.uid!="number"||typeof R.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(R.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=R.uid,this.gid=R.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;R.preserveOwner===void 0&&typeof R.uid!="number"?this.preserveOwner=!!(process.getuid&&process.getuid()===0):this.preserveOwner=!!R.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth=typeof R.maxDepth=="number"?R.maxDepth:k,this.forceChown=R.forceChown===!0,this.win32=!!R.win32||Q,this.newer=!!R.newer,this.keep=!!R.keep,this.noMtime=!!R.noMtime,this.preservePaths=!!R.preservePaths,this.unlink=!!R.unlink,this.cwd=(0,p.normalizeWindowsPath)(o.default.resolve(R.cwd||process.cwd())),this.strip=Number(R.strip)||0,this.processUmask=this.chmod?typeof R.processUmask=="number"?R.processUmask:process.umask():0,this.umask=typeof R.umask=="number"?R.umask:this.processUmask,this.dmode=R.dmode||511&~this.umask,this.fmode=R.fmode||438&~this.umask,this.on("entry",H=>this[y](H))}warn(R,H,ee={}){return(R==="TAR_BAD_ARCHIVE"||R==="TAR_ABORT")&&(ee.recoverable=!1),super.warn(R,H,ee)}[W](){this[G]&&this[U]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[$](R){let H=(0,p.normalizeWindowsPath)(R.path),ee=H.split("/");if(this.strip){if(ee.length<this.strip)return!1;if(R.type==="Link"){let ne=(0,p.normalizeWindowsPath)(String(R.linkpath)).split("/");if(ne.length>=this.strip)R.linkpath=ne.slice(this.strip).join("/");else return!1}ee.splice(0,this.strip),R.path=ee.join("/")}if(isFinite(this.maxDepth)&&ee.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:R,path:H,depth:ee.length,maxDepth:this.maxDepth}),!1;if(!this.preservePaths){if(ee.includes("..")||Q&&/^[a-z]:\.\.$/i.test(ee[0]??""))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:R,path:H}),!1;let[ne,te]=(0,g.stripAbsolutePath)(H);ne&&(R.path=String(te),this.warn("TAR_ENTRY_INFO",`stripping ${ne} from absolute path`,{entry:R,path:H}))}if(o.default.isAbsolute(R.path)?R.absolute=(0,p.normalizeWindowsPath)(o.default.resolve(R.path)):R.absolute=(0,p.normalizeWindowsPath)(o.default.resolve(this.cwd,R.path)),!this.preservePaths&&typeof R.absolute=="string"&&R.absolute.indexOf(this.cwd+"/")!==0&&R.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:R,path:(0,p.normalizeWindowsPath)(R.path),resolvedPath:R.absolute,cwd:this.cwd}),!1;if(R.absolute===this.cwd&&R.type!=="Directory"&&R.type!=="GNUDumpDir")return!1;if(this.win32){let{root:ne}=o.default.win32.parse(String(R.absolute));R.absolute=ne+m.encode(String(R.absolute).slice(ne.length));let{root:te}=o.default.win32.parse(R.path);R.path=te+m.encode(R.path.slice(te.length))}return!0}[y](R){if(!this[$](R))return R.resume();switch(c.default.equal(typeof R.absolute,"string"),R.type){case"Directory":case"GNUDumpDir":R.mode&&(R.mode=R.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[S](R);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[L](R)}}[M](R,H){R.name==="CwdError"?this.emit("error",R):(this.warn("TAR_ENTRY_ERROR",R,{entry:H}),this[B](),H.resume())}[x](R,H,ee){(0,h.mkdir)((0,p.normalizeWindowsPath)(R),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:H},ee)}[D](R){return this.forceChown||this.preserveOwner&&(typeof R.uid=="number"&&R.uid!==this.processUid||typeof R.gid=="number"&&R.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[T](R){return j(this.uid,R.uid,this.processUid)}[C](R){return j(this.gid,R.gid,this.processGid)}[O](R,H){let ee=typeof R.mode=="number"?R.mode&4095:this.fmode,ne=new a.WriteStream(String(R.absolute),{flags:(0,l.getWriteFlag)(R.size),mode:ee,autoClose:!1});ne.on("error",re=>{ne.fd&&n.default.close(ne.fd,()=>{}),ne.write=()=>!0,this[M](re,R),H()});let te=1,ae=v(re=>{if(re){ne.fd&&n.default.close(ne.fd,()=>{}),this[M](re,R),H();return}--te===0&&ne.fd!==void 0&&n.default.close(ne.fd,ue=>{ue?this[M](ue,R):this[B](),H()})},"done");ne.on("finish",()=>{let re=String(R.absolute),ue=ne.fd;if(typeof ue=="number"&&R.mtime&&!this.noMtime){te++;let ie=R.atime||new Date,le=R.mtime;n.default.futimes(ue,ie,le,fe=>fe?n.default.utimes(re,ie,le,me=>ae(me&&fe)):ae())}if(typeof ue=="number"&&this[D](R)){te++;let ie=this[T](R),le=this[C](R);typeof ie=="number"&&typeof le=="number"&&n.default.fchown(ue,ie,le,fe=>fe?n.default.chown(re,ie,le,me=>ae(me&&fe)):ae())}ae()});let he=this.transform&&this.transform(R)||R;he!==R&&(he.on("error",re=>{this[M](re,R),H()}),R.pipe(he)),he.pipe(ne)}[w](R,H){let ee=typeof R.mode=="number"?R.mode&4095:this.dmode;this[x](String(R.absolute),ee,ne=>{if(ne){this[M](ne,R),H();return}let te=1,ae=v(()=>{--te===0&&(H(),this[B](),R.resume())},"done");R.mtime&&!this.noMtime&&(te++,n.default.utimes(String(R.absolute),R.atime||new Date,R.mtime,ae)),this[D](R)&&(te++,n.default.chown(String(R.absolute),Number(this[T](R)),Number(this[C](R)),ae)),ae()})}[L](R){R.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${R.type}`,{entry:R}),R.resume()}[I](R,H){this[A](R,String(R.linkpath),"symlink",H)}[P](R,H){let ee=(0,p.normalizeWindowsPath)(o.default.resolve(this.cwd,String(R.linkpath)));this[A](R,ee,"link",H)}[V](){this[U]++}[B](){this[U]--,this[W]()}[N](R){this[B](),R.resume()}[b](R,H){return R.type==="File"&&!this.unlink&&H.isFile()&&H.nlink<=1&&!Q}[S](R){this[V]();let H=[R.path];R.linkpath&&H.push(R.linkpath),this.reservations.reserve(H,ee=>this[E](R,ee))}[E](R,H){let ee=v(he=>{H(he)},"done"),ne=v(()=>{this[x](this.cwd,this.dmode,he=>{if(he){this[M](he,R),ee();return}this[Z]=!0,te()})},"checkCwd"),te=v(()=>{if(R.absolute!==this.cwd){let he=(0,p.normalizeWindowsPath)(o.default.dirname(String(R.absolute)));if(he!==this.cwd)return this[x](he,this.dmode,re=>{if(re){this[M](re,R),ee();return}ae()})}ae()},"start"),ae=v(()=>{n.default.lstat(String(R.absolute),(he,re)=>{if(re&&(this.keep||this.newer&&re.mtime>(R.mtime??re.mtime))){this[N](R),ee();return}if(he||this[b](R,re))return this[_](null,R,ee);if(re.isDirectory()){if(R.type==="Directory"){let ue=this.chmod&&R.mode&&(re.mode&4095)!==R.mode,ie=v(le=>this[_](le??null,R,ee),"afterChmod");return ue?n.default.chmod(String(R.absolute),Number(R.mode),ie):ie()}if(R.absolute!==this.cwd)return n.default.rmdir(String(R.absolute),ue=>this[_](ue??null,R,ee))}if(R.absolute===this.cwd)return this[_](null,R,ee);F(String(R.absolute),ue=>this[_](ue??null,R,ee))})},"afterMakeParent");this[Z]?te():ne()}[_](R,H,ee){if(R){this[M](R,H),ee();return}switch(H.type){case"File":case"OldFile":case"ContiguousFile":return this[O](H,ee);case"Link":return this[P](H,ee);case"SymbolicLink":return this[I](H,ee);case"Directory":case"GNUDumpDir":return this[w](H,ee)}}[A](R,H,ee,ne){n.default[ee](H,String(R.absolute),te=>{te?this[M](te,R):(this[B](),R.resume()),ne()})}};e.Unpack=q;var J=v(R=>{try{return[null,R()]}catch(H){return[H,null]}},"callSync"),Y=class extends q{static{v(this,"UnpackSync")}sync=!0;[_](R,H){return super[_](R,H,()=>{})}[S](R){if(!this[Z]){let te=this[x](this.cwd,this.dmode);if(te)return this[M](te,R);this[Z]=!0}if(R.absolute!==this.cwd){let te=(0,p.normalizeWindowsPath)(o.default.dirname(String(R.absolute)));if(te!==this.cwd){let ae=this[x](te,this.dmode);if(ae)return this[M](ae,R)}}let[H,ee]=J(()=>n.default.lstatSync(String(R.absolute)));if(ee&&(this.keep||this.newer&&ee.mtime>(R.mtime??ee.mtime)))return this[N](R);if(H||this[b](R,ee))return this[_](null,R);if(ee.isDirectory()){if(R.type==="Directory"){let ae=this.chmod&&R.mode&&(ee.mode&4095)!==R.mode,[he]=ae?J(()=>{n.default.chmodSync(String(R.absolute),Number(R.mode))}):[];return this[_](he,R)}let[te]=J(()=>n.default.rmdirSync(String(R.absolute)));this[_](te,R)}let[ne]=R.absolute===this.cwd?[]:J(()=>z(String(R.absolute)));this[_](ne,R)}[O](R,H){let ee=typeof R.mode=="number"?R.mode&4095:this.fmode,ne=v(he=>{let re;try{n.default.closeSync(te)}catch(ue){re=ue}(he||re)&&this[M](he||re,R),H()},"oner"),te;try{te=n.default.openSync(String(R.absolute),(0,l.getWriteFlag)(R.size),ee)}catch(he){return ne(he)}let ae=this.transform&&this.transform(R)||R;ae!==R&&(ae.on("error",he=>this[M](he,R)),R.pipe(ae)),ae.on("data",he=>{try{n.default.writeSync(te,he,0,he.length)}catch(re){ne(re)}}),ae.on("end",()=>{let he=null;if(R.mtime&&!this.noMtime){let re=R.atime||new Date,ue=R.mtime;try{n.default.futimesSync(te,re,ue)}catch(ie){try{n.default.utimesSync(String(R.absolute),re,ue)}catch{he=ie}}}if(this[D](R)){let re=this[T](R),ue=this[C](R);try{n.default.fchownSync(te,Number(re),Number(ue))}catch(ie){try{n.default.chownSync(String(R.absolute),Number(re),Number(ue))}catch{he=he||ie}}}ne(he)})}[w](R,H){let ee=typeof R.mode=="number"?R.mode&4095:this.dmode,ne=this[x](String(R.absolute),ee);if(ne){this[M](ne,R),H();return}if(R.mtime&&!this.noMtime)try{n.default.utimesSync(String(R.absolute),R.atime||new Date,R.mtime)}catch{}if(this[D](R))try{n.default.chownSync(String(R.absolute),Number(this[T](R)),Number(this[C](R)))}catch{}H(),R.resume()}[x](R,H){try{return(0,h.mkdirSync)((0,p.normalizeWindowsPath)(R),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:H})}catch(ee){return ee}}[A](R,H,ee,ne){let te=`${ee}Sync`;try{n.default[te](H,String(R.absolute)),ne(),R.resume()}catch(ae){return this[M](ae,R)}}};e.UnpackSync=Y}),Yd=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(p,d,g,m){m===void 0&&(m=g);var f=Object.getOwnPropertyDescriptor(d,g);(!f||("get"in f?!d.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:v(function(){return d[g]},"get")}),Object.defineProperty(p,m,f)}:function(p,d,g,m){m===void 0&&(m=g),p[m]=d[g]}),s=e&&e.__setModuleDefault||(Object.create?function(p,d){Object.defineProperty(p,"default",{enumerable:!0,value:d})}:function(p,d){p.default=d}),u=e&&e.__importStar||function(p){if(p&&p.__esModule)return p;var d={};if(p!=null)for(var g in p)g!=="default"&&Object.prototype.hasOwnProperty.call(p,g)&&t(d,p,g);return s(d,p),d},i=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.extract=void 0;var a=u(ds()),c=i(require("fs")),r=ns(),n=fs(),o=Zf(),l=v(p=>{let d=new o.UnpackSync(p),g=p.file,m=c.default.statSync(g),f=p.maxReadSize||16*1024*1024;new a.ReadStreamSync(g,{readSize:f,size:m.size}).pipe(d)},"extractFileSync"),h=v((p,d)=>{let g=new o.Unpack(p),m=p.maxReadSize||16*1024*1024,f=p.file;return new Promise((y,S)=>{g.on("error",S),g.on("close",y),c.default.stat(f,(E,b)=>{if(E)S(E);else{let _=new a.ReadStream(f,{readSize:m,size:b.size});_.on("error",S),_.pipe(g)}})})},"extractFile");e.extract=(0,n.makeCommand)(l,h,p=>new o.UnpackSync(p),p=>new o.Unpack(p),(p,d)=>{d?.length&&(0,r.filesFilter)(p,d)})}),Xa=K(e=>{"use strict";var t=e&&e.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(e,"__esModule",{value:!0}),e.replace=void 0;var s=ds(),u=t(require("fs")),i=t(require("path")),a=gs(),c=ns(),r=fs(),n=Nl(),o=jl(),l=v((m,f)=>{let y=new o.PackSync(m),S=!0,E,b;try{try{E=u.default.openSync(m.file,"r+")}catch(w){if(w?.code==="ENOENT")E=u.default.openSync(m.file,"w+");else throw w}let _=u.default.fstatSync(E),O=Buffer.alloc(512);e:for(b=0;b<_.size;b+=512){for(let I=0,P=0;I<512;I+=P){if(P=u.default.readSync(E,O,I,O.length-I,b+I),b===0&&O[0]===31&&O[1]===139)throw new Error("cannot append to compressed archives");if(!P)break e}let w=new a.Header(O);if(!w.cksumValid)break;let A=512*Math.ceil((w.size||0)/512);if(b+A+512>_.size)break;b+=A,m.mtimeCache&&w.mtime&&m.mtimeCache.set(String(w.path),w.mtime)}S=!1,h(m,y,b,E,f)}finally{if(S)try{u.default.closeSync(E)}catch{}}},"replaceSync"),h=v((m,f,y,S,E)=>{let b=new s.WriteStreamSync(m.file,{fd:S,start:y});f.pipe(b),d(f,E)},"streamSync"),p=v((m,f)=>{f=Array.from(f);let y=new o.Pack(m),S=v((E,b,_)=>{let O=v((L,$)=>{L?u.default.close(E,x=>_(L)):_(null,$)},"cb"),w=0;if(b===0)return O(null,0);let A=0,I=Buffer.alloc(512),P=v((L,$)=>{if(L||typeof $>"u")return O(L);if(A+=$,A<512&&$)return u.default.read(E,I,A,I.length-A,w+A,P);if(w===0&&I[0]===31&&I[1]===139)return O(new Error("cannot append to compressed archives"));if(A<512)return O(null,w);let x=new a.Header(I);if(!x.cksumValid)return O(null,w);let M=512*Math.ceil((x.size??0)/512);if(w+M+512>b||(w+=M+512,w>=b))return O(null,w);m.mtimeCache&&x.mtime&&m.mtimeCache.set(String(x.path),x.mtime),A=0,u.default.read(E,I,0,512,w,P)},"onread");u.default.read(E,I,0,512,w,P)},"getPos");return new Promise((E,b)=>{y.on("error",b);let _="r+",O=v((w,A)=>{if(w&&w.code==="ENOENT"&&_==="r+")return _="w+",u.default.open(m.file,_,O);if(w||!A)return b(w);u.default.fstat(A,(I,P)=>{if(I)return u.default.close(A,()=>b(I));S(A,P.size,(L,$)=>{if(L)return b(L);let x=new s.WriteStream(m.file,{fd:A,start:$});y.pipe(x),x.on("error",b),x.on("close",E),g(y,f)})})},"onopen");u.default.open(m.file,_,O)})},"replaceAsync"),d=v((m,f)=>{f.forEach(y=>{y.charAt(0)==="@"?(0,c.list)({file:i.default.resolve(m.cwd,y.slice(1)),sync:!0,noResume:!0,onReadEntry:v(S=>m.add(S),"onReadEntry")}):m.add(y)}),m.end()},"addFilesSync"),g=v(async(m,f)=>{for(let y=0;y<f.length;y++){let S=String(f[y]);S.charAt(0)==="@"?await(0,c.list)({file:i.default.resolve(String(m.cwd),S.slice(1)),noResume:!0,onReadEntry:v(E=>m.add(E),"onReadEntry")}):m.add(S)}m.end()},"addFilesAsync");e.replace=(0,r.makeCommand)(l,p,()=>{throw new TypeError("file is required")},()=>{throw new TypeError("file is required")},(m,f)=>{if(!(0,n.isFile)(m))throw new TypeError("file is required");if(m.gzip||m.brotli||m.zstd||m.file.endsWith(".br")||m.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!f?.length)throw new TypeError("no paths specified to add/replace")})}),Qd=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.update=void 0;var t=fs(),s=Xa();e.update=(0,t.makeCommand)(s.replace.syncFile,s.replace.asyncFile,s.replace.syncNoFile,s.replace.asyncNoFile,(i,a=[])=>{s.replace.validate?.(i,a),u(i)});var u=v(i=>{let a=i.filter;i.mtimeCache||(i.mtimeCache=new Map),i.filter=a?(c,r)=>a(c,r)&&!((i.mtimeCache?.get(c)??r.mtime??0)>(r.mtime??0)):(c,r)=>!((i.mtimeCache?.get(c)??r.mtime??0)>(r.mtime??0))},"mtimeFilter")}),Xf=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(l,h,p,d){d===void 0&&(d=p);var g=Object.getOwnPropertyDescriptor(h,p);(!g||("get"in g?!h.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:v(function(){return h[p]},"get")}),Object.defineProperty(l,d,g)}:function(l,h,p,d){d===void 0&&(d=p),l[d]=h[p]}),s=e&&e.__setModuleDefault||(Object.create?function(l,h){Object.defineProperty(l,"default",{enumerable:!0,value:h})}:function(l,h){l.default=h}),u=e&&e.__exportStar||function(l,h){for(var p in l)p!=="default"&&!Object.prototype.hasOwnProperty.call(h,p)&&t(h,l,p)},i=e&&e.__importStar||function(l){if(l&&l.__esModule)return l;var h={};if(l!=null)for(var p in l)p!=="default"&&Object.prototype.hasOwnProperty.call(l,p)&&t(h,l,p);return s(h,l),h};Object.defineProperty(e,"__esModule",{value:!0}),e.u=e.types=e.r=e.t=e.x=e.c=void 0,u(Xd(),e);var a=Xd();Object.defineProperty(e,"c",{enumerable:!0,get:v(function(){return a.create},"get")}),u(Yd(),e);var c=Yd();Object.defineProperty(e,"x",{enumerable:!0,get:v(function(){return c.extract},"get")}),u(gs(),e),u(ns(),e);var r=ns();Object.defineProperty(e,"t",{enumerable:!0,get:v(function(){return r.list},"get")}),u(jl(),e),u($l(),e),u(kl(),e),u(Ll(),e),u(Xa(),e);var n=Xa();Object.defineProperty(e,"r",{enumerable:!0,get:v(function(){return n.replace},"get")}),e.types=i(Wf()),u(Zf(),e),u(Qd(),e);var o=Qd();Object.defineProperty(e,"u",{enumerable:!0,get:v(function(){return o.update},"get")}),u(Jf(),e)}),_r=K((e,t)=>{t.exports={cacheFetches:Symbol.for("pacote.Fetcher._cacheFetches"),readPackageJson:Symbol.for("package.Fetcher._readPackageJson"),tarballFromResolved:Symbol.for("pacote.Fetcher._tarballFromResolved")}}),uN=K((e,t)=>{var{resolve:s}=require("path"),{tmpdir:u,homedir:i}=require("os");t.exports=(a=!1)=>{let c=u(),r=process.getuid?process.getuid():process.pid,n=i()||s(c,"npm-"+r),o=a||process.platform,l=o==="win32"?"npm-cache":".npm",h=o==="win32"&&process.env.LOCALAPPDATA||n;return{cacache:s(h,l,"_cacache"),tufcache:s(h,l,"_tuf")}}}),Yf=K((e,t)=>{var s=v((i,a)=>typeof a=="string"?{[i]:a}:a,"binObj"),u=v((i,a)=>{let c=s(i.name,i.bin),r=a.replace(/^[^\\/]*\//,"");for(let n of Object.entries(c))if(n[1]===r)return!0;return!1},"hasBin");t.exports=(i,a)=>i&&i.bin?u(i,a):!1}),Qf=K((e,t)=>{var s=v(u=>{let i=u;for(;i.endsWith("/");)i=i.slice(0,-1);return i},"removeTrailingSlashes");t.exports=s}),hN=K((e,t)=>{"use strict";var s=require("fs"),u=require("path"),i=require("events").EventEmitter,a=jt().Minimatch,c=class eg extends i{static{v(this,"Walker")}constructor(h){h=h||{},super(h),this.isSymbolicLink=h.isSymbolicLink,this.path=h.path||process.cwd(),this.basename=u.basename(this.path),this.ignoreFiles=h.ignoreFiles||[".ignore"],this.ignoreRules={},this.parent=h.parent||null,this.includeEmpty=!!h.includeEmpty,this.root=this.parent?this.parent.root:this.path,this.follow=!!h.follow,this.result=this.parent?this.parent.result:new Set,this.entries=null,this.sawError=!1,this.exact=h.exact}sort(h,p){return h.localeCompare(p,"en")}emit(h,p){let d=!1;return this.sawError&&h==="error"||(h==="error"?this.sawError=!0:h==="done"&&!this.parent&&(p=Array.from(p).map(g=>/^@/.test(g)?`./${g}`:g).sort(this.sort),this.result=p),h==="error"&&this.parent?d=this.parent.emit("error",p):d=super.emit(h,p)),d}start(){return s.readdir(this.path,(h,p)=>h?this.emit("error",h):this.onReaddir(p)),this}isIgnoreFile(h){return h!=="."&&h!==".."&&this.ignoreFiles.indexOf(h)!==-1}onReaddir(h){this.entries=h,h.length===0?(this.includeEmpty&&this.result.add(this.path.slice(this.root.length+1)),this.emit("done",this.result)):this.entries.some(p=>this.isIgnoreFile(p))?this.addIgnoreFiles():this.filterEntries()}addIgnoreFiles(){let h=this.entries.filter(g=>this.isIgnoreFile(g)),p=h.length,d=v(()=>{--p===0&&this.filterEntries()},"then");h.forEach(g=>this.addIgnoreFile(g,d))}addIgnoreFile(h,p){let d=u.resolve(this.path,h);s.readFile(d,"utf8",(g,m)=>g?this.emit("error",g):this.onReadIgnoreFile(h,m,p))}onReadIgnoreFile(h,p,d){let g={matchBase:!0,dot:!0,flipNegate:!0,nocase:!0},m=p.split(/\r?\n/).filter(f=>!/^#|^$/.test(f.trim())).map(f=>new a(f.trim(),g));this.ignoreRules[h]=m,d()}filterEntries(){let h=this.entries.map(d=>{let g=this.filterEntry(d),m=this.filterEntry(d,!0);return g||m?[d,g,m]:!1}).filter(d=>d),p=h.length;if(p===0)this.emit("done",this.result);else{let d=v(()=>{--p===0&&this.emit("done",this.result)},"then");h.forEach(g=>{let m=g[0],f=g[1],y=g[2];this.stat({entry:m,file:f,dir:y},d)})}}onstat({st:h,entry:p,file:d,dir:g,isSymbolicLink:m},f){let y=this.path+"/"+p;h.isDirectory()?g?this.walker(p,{isSymbolicLink:m,exact:d||this.filterEntry(p+"/")},f):f():(d&&this.result.add(y.slice(this.root.length+1)),f())}stat({entry:h,file:p,dir:d},g){let m=this.path+"/"+h;s.lstat(m,(f,y)=>{if(f)this.emit("error",f);else{let S=y.isSymbolicLink();this.follow&&S?s.stat(m,(E,b)=>{E?this.emit("error",E):this.onstat({st:b,entry:h,file:p,dir:d,isSymbolicLink:S},g)}):this.onstat({st:y,entry:h,file:p,dir:d,isSymbolicLink:S},g)}})}walkerOpt(h,p){return{path:this.path+"/"+h,parent:this,ignoreFiles:this.ignoreFiles,follow:this.follow,includeEmpty:this.includeEmpty,...p}}walker(h,p,d){new eg(this.walkerOpt(h,p)).on("done",d).start()}filterEntry(h,p,d){let g=!0;if(this.parent&&this.parent.filterEntry){let m=this.basename+"/"+h,f=d||h;if(g=this.parent.filterEntry(m,p,f),!g&&!this.exact)return!1}return this.ignoreFiles.forEach(m=>{this.ignoreRules[m]&&this.ignoreRules[m].forEach(f=>{if(f.negate!==g){let y=d&&f.globParts.some(S=>S.length<=(S.slice(-1)[0]?1:2));(f.match("/"+h)||f.match(h)||p&&(f.match("/"+h+"/")||f.match(h+"/")||f.negate&&(f.match("/"+h,!0)||f.match(h,!0))||y&&(f.match("/"+d+"/")||f.match(d+"/")||f.negate&&(f.match("/"+d,!0)||f.match(d,!0)))))&&(g=f.negate)}})}),g}},r=class tg extends c{static{v(this,"WalkerSync")}start(){return this.onReaddir(s.readdirSync(this.path)),this}addIgnoreFile(h,p){let d=u.resolve(this.path,h);this.onReadIgnoreFile(h,s.readFileSync(d,"utf8"),p)}stat({entry:h,file:p,dir:d},g){let m=this.path+"/"+h,f=s.lstatSync(m),y=f.isSymbolicLink();this.follow&&y&&(f=s.statSync(m)),this.onstat({st:f,entry:h,file:p,dir:d,isSymbolicLink:y},g)}walker(h,p,d){new tg(this.walkerOpt(h,p)).start(),d()}},n=v((l,h)=>{let p=new Promise((d,g)=>{new c(l).on("done",d).on("error",g).start()});return h?p.then(d=>h(null,d),h):p},"walk"),o=v(l=>new r(l).start().result,"walkSync");t.exports=n,n.sync=o,n.Walker=c,n.WalkerSync=r}),pN=K((e,t)=>{"use strict";var{Walker:s}=hN(),{lstatSync:u,readFileSync:i}=require("fs"),{basename:a,dirname:c,extname:r,join:n,relative:o,resolve:l,sep:h}=require("path"),{log:p}=ft(),d=Symbol("npm-packlist.rules.default"),g=Symbol("npm-packlist.rules.strict"),m=v(O=>/\*/.test(O),"nameIsBadForWindows"),f=[".npmignore",".gitignore","**/.git","**/.svn","**/.hg","**/CVS","**/.git/**","**/.svn/**","**/.hg/**","**/CVS/**","/.lock-wscript","/.wafpickle-*","/build/config.gypi","npm-debug.log","**/.npmrc",".*.swp",".DS_Store","**/.DS_Store/**","._*","**/._*/**","*.orig","/archived-packages/**"],y=["/.git"],S=v(O=>O.split("\\").join("/"),"normalizePath"),E=v((O,w,A=[])=>{for(let $ of[".npmignore",".gitignore"])try{let x=i(n(O,$),{encoding:"utf8"});A.push(x);break}catch(x){if(x.code!=="ENOENT")throw x}if(!w)return A;let I=w.split(h,1)[0],P=n(O,I),L=o(P,n(O,w));return E(P,L,A)},"readOutOfTreeIgnoreFiles"),b=class Ya extends s{static{v(this,"PackWalker")}constructor(w,A){let I={...A,includeEmpty:!1,follow:!1,path:l(A?.path||w.path).replace(/\\/g,"/"),ignoreFiles:A?.ignoreFiles||[d,"package.json",".npmignore",".gitignore",g]};super(I),this.isPackage=I.isPackage,this.seen=I.seen||new Set,this.tree=w,this.requiredFiles=I.requiredFiles||[];let P=[];if(I.prefix&&I.workspaces){let L=S(I.path),$=S(I.prefix),x=I.workspaces.map(M=>S(M));if(L!==$&&x.includes(L)){let M=o(I.prefix,c(I.path));P.push(...E(I.prefix,M))}else L===$&&P.push(...x.map(M=>S(o(I.path,M))))}this.injectRules(d,[...f,...P]),this.isPackage||this.injectRules(g,[...y,...this.requiredFiles.map(L=>`!${L}`)])}addIgnoreFile(w,A){return w!=="package.json"||!this.isPackage?super.addIgnoreFile(w,A):this.processPackage(A)}emit(w,A){return w!=="done"||!this.isPackage?super.emit(w,A):(this.gatherBundles().then(()=>{super.emit("done",this.result)}),!0)}filterEntries(){return this.ignoreRules["package.json"]?(this.ignoreRules[".npmignore"]=null,this.ignoreRules[".gitignore"]=null):this.ignoreRules[".npmignore"]?this.ignoreRules[".gitignore"]=null:this.ignoreRules[".gitignore"]&&!this.ignoreRules[".npmignore"]&&p.warn("gitignore-fallback","No .npmignore file found, using .gitignore for file exclusion. Consider creating a .npmignore file to explicitly control published files."),super.filterEntries()}onstat(w,A){return!w.st.isFile()&&!w.st.isDirectory()?A():super.onstat(w,A)}stat(w,A){return m(w.entry)?A():super.stat(w,A)}walkerOpt(w,A){let I=null;if(this.tree.workspaces){let P=[...this.tree.workspaces.values()].map($=>$.replace(/\\/g,"/")),L=n(this.path,w).replace(/\\/g,"/");P.includes(L)&&(I=[d,"package.json",".npmignore",".gitignore",g])}else I=[d,".npmignore",".gitignore",g];return{...super.walkerOpt(w,A),ignoreFiles:I,requiredFiles:this.requiredFiles.map(P=>o(P,w)===".."?o(w,P).replace(/\\/g,"/"):!1).filter(Boolean)}}walker(w,A,I){new Ya(this.tree,this.walkerOpt(w,A)).on("done",I).start()}sort(w,A){let I=r(w).toLowerCase(),P=r(A).toLowerCase(),L=a(w).toLowerCase(),$=a(A).toLowerCase();return I.localeCompare(P,"en")||L.localeCompare($,"en")||w.localeCompare(A,"en")}injectRules(w,A,I=()=>{}){this.onReadIgnoreFile(w,`${A.join(`
|
|
47
|
+
`)}
|
|
48
|
+
`,I)}processPackage(w){let{bin:A,browser:I,files:P,main:L}=this.tree.package,$=[],x=[...y,"!/package.json","!/readme{,.*[^~$]}","!/copying{,.*[^~$]}","!/license{,.*[^~$]}","!/licence{,.*[^~$]}","/.git","/node_modules",".npmrc","/package-lock.json","/yarn.lock","/pnpm-lock.yaml","/bun.lockb"];if(P){for(let M of P){M.startsWith("./")&&(M=M.slice(1)),M.endsWith("/*")&&(M+="*");let U=`!${M}`;try{let V=u(n(this.path,M.replace(/^!+/,"")).replace(/\\/g,"/"));V.isFile()?(x.unshift(U),this.requiredFiles.push(M.startsWith("/")?M.slice(1):M)):V.isDirectory()&&($.push(U),$.push(`${U}/**`))}catch{$.push(U)}}this.injectRules("package.json",["*",...$])}if(I&&x.push(`!/${I}`),L&&x.push(`!/${L}`),A)for(let M in A)x.push(`!/${A[M]}`);this.injectRules(g,x,w)}async gatherBundles(){if(this.seen.has(this.tree))return;this.seen.add(this.tree);let w;if(this.tree.isProjectRoot){let{bundleDependencies:A}=this.tree.package;w=A||[]}else{let{dependencies:A,optionalDependencies:I}=this.tree.package;w=Object.keys(A||{}).concat(Object.keys(I||{}))}for(let A of w){let I=this.tree.edgesOut.get(A);if(!I||I.peer||I.dev)continue;let P=this.tree.edgesOut.get(A).to;if(!P)continue;let L=P.path,$=P.target,x={path:L,isPackage:!0,ignoreFiles:[],seen:this.seen};P.isLink&&x.ignoreFiles.push(d),x.ignoreFiles.push("package.json"),P.isLink&&(x.ignoreFiles.push(".npmignore"),x.ignoreFiles.push(".gitignore")),x.ignoreFiles.push(g);let M=new Ya($,x),U=await new Promise((B,G)=>{M.on("error",G),M.on("done",B),M.start()}),V=o(this.root,M.path);for(let B of U)this.result.add(n(V,B).replace(/\\/g,"/"))}}},_=v((O,w,A)=>{typeof w=="function"&&(A=w,w={});let I=new Promise((P,L)=>{new b(O,{...w,isPackage:!0}).on("done",P).on("error",L).start()});return A?I.then(P=>A(null,P),A):I},"walk");t.exports=_,_.Walker=b}),dN=K((e,t)=>{var{resolve:s,dirname:u,delimiter:i}=require("path"),a=s(__dirname,"../lib/node-gyp-bin"),c=v((r,n,o)=>{let l=Object.keys(o).filter(m=>/^path$/i.test(m)&&o[m]).map(m=>o[m].split(i)).reduce((m,f)=>m.concat(f.filter(y=>!m.includes(y))),[]).join(i),h=[];n&&h.push(...n);let p=r,d;do h.push(s(p,"node_modules",".bin")),d=p,p=u(p);while(p!==d);h.push(a,l);let g=h.join(i);for(let m of Object.keys(o))/^path$/i.test(m)&&(o[m]=g);return o},"setPATH");t.exports=c}),fN=K((e,t)=>{var s=dN(),{resolve:u}=require("path"),i,a=v(c=>{let{args:r,binPaths:n,cmd:o,env:l,event:h,nodeGyp:p,path:d,scriptShell:g=!0,stdio:m,stdioString:f}=c;p?i=p:l.npm_config_node_gyp?i=l.npm_config_node_gyp:i=require.resolve("node-gyp/bin/node-gyp.js");let y={env:s(d,n,{...process.env,...l,npm_package_json:u(d,"package.json"),npm_lifecycle_event:h,npm_lifecycle_script:o,npm_config_node_gyp:i}),stdioString:f,stdio:m,cwd:d,shell:g};return[o,r,y]},"makeSpawnArgs");t.exports=a}),gN=K((e,t)=>{var s=v((u,i,a={})=>{for(let[c,r]of Object.entries(u))r!==void 0&&(r===null||r===!1?a[`${i}${c}`]="":Array.isArray(r)?r.forEach((n,o)=>{s({[`${c}_${o}`]:n},`${i}`,a)}):typeof r=="object"?s(r,`${i}${c}_`,a):a[`${i}${c}`]=String(r));return a},"packageEnvs");t.exports=u=>s({name:u.name,version:u.version,config:u.config,engines:u.engines,bin:u.bin},"npm_package_")}),mN=K((e,t)=>{var s=require("util"),u=require("fs"),{stat:i}=u.promises||{stat:s.promisify(u.stat)};async function a(c){return await i(`${c}/binding.gyp`).then(r=>r.isFile()).catch(()=>!1)}v(a,"isNodeGypPackage"),t.exports={isNodeGypPackage:a,defaultGypInstallScript:"node-gyp rebuild"}}),yN=K((e,t)=>{var s=new Set,u=!1,i=["SIGINT","SIGTERM"],a=v(o=>{for(let l of s)l.kill(o)},"handleSignal"),c=v(()=>{for(let o of i)process.on(o,a);u=!0},"setupListeners"),r=v(()=>{if(s.size===0){for(let o of i)process.removeListener(o,a);u=!1}},"cleanupListeners"),n=v(o=>{s.add(o),u||c(),o.once("exit",()=>{s.delete(o),r()})},"add");t.exports={add:n,handleSignal:a,forwardedSignals:i}}),rg=K((e,t)=>{var{stat:s}=require("internal/fs/promises"),{resolve:u}=require("path");t.exports=async i=>{try{return(await s(u(i,"server.js"))).isFile()}catch{return!1}}}),vN=K((e,t)=>{var s=fN(),u=El(),i=gN(),{isNodeGypPackage:a,defaultGypInstallScript:c}=mN(),r=yN(),n=rg(),o=v(async l=>{let{args:h=[],binPaths:p=!1,env:d={},event:g,nodeGyp:m,path:f,pkg:y,scriptShell:S,signalTimeout:E=500,stdio:b="pipe",stdioString:_}=l,{scripts:O={},gypfile:w}=y,A=null;if(l.cmd?A=l.cmd:y.scripts&&y.scripts[g]?A=y.scripts[g]:g==="install"&&!O.install&&!O.preinstall&&w!==!1&&await a(f)?A=c:g==="start"&&await n(f)&&(A="node server.js"),!A)return{code:0,signal:null};let I=v(()=>{},"inputEnd");if(b==="inherit"){let M;y._id?M=`
|
|
49
|
+
> ${y._id} ${g}
|
|
50
|
+
`:M=`
|
|
51
|
+
> ${g}
|
|
52
|
+
`,M+=`> ${A.trim().replace(/\n/g,`
|
|
53
|
+
> `)}`,h.length&&(M+=` ${h.join(" ")}`),M+=`
|
|
54
|
+
`;let{output:U,input:V}=ft();U.standard(M),I=V.start()}let[P,L,$]=s({args:h,binPaths:p,cmd:A,env:{...d,...i(y)},event:g,nodeGyp:m,path:f,scriptShell:S,stdio:b,stdioString:_}),x=u(P,L,$,{event:g,script:A,pkgid:y._id,path:f});return b==="inherit"&&r.add(x.process),x.stdin&&x.stdin.end(),x.catch(M=>{let{signal:U}=M;if(b==="inherit"&&U)return process.kill(process.pid,U),new Promise((V,B)=>setTimeout(()=>B(M),E));throw M}).finally(I)},"runScriptPkg");t.exports=o}),SN=K((e,t)=>{var s=v(u=>{if(typeof u!="object"||!u)throw new TypeError("invalid options object provided to runScript");let{event:i,path:a,scriptShell:c,env:r={},stdio:n="pipe",args:o=[],cmd:l}=u;if(!i||typeof i!="string")throw new TypeError("valid event not provided to runScript");if(!a||typeof a!="string")throw new TypeError("valid path not provided to runScript");if(c!==void 0&&typeof c!="string")throw new TypeError("invalid scriptShell option provided to runScript");if(typeof r!="object"||!r)throw new TypeError("invalid env option provided to runScript");if(typeof n!="string"&&!Array.isArray(n))throw new TypeError("invalid stdio option provided to runScript");if(!Array.isArray(o)||o.some(h=>typeof h!="string"))throw new TypeError("invalid args option provided to runScript");if(l!==void 0&&typeof l!="string")throw new TypeError("invalid cmd option provided to runScript")},"validateOptions");t.exports=s}),EN=K((e,t)=>{var s=Il(),u=vN(),i=SN(),a=rg(),c=v(async r=>{if(i(r),r.pkg)return u(r);let{content:n}=await s.normalize(r.path);return u({...r,pkg:n})},"runScript");t.exports=Object.assign(c,{isServerPackage:a})}),ys=K((e,t)=>{var{resolve:s}=require("path"),{stat:u,chmod:i}=require("internal/fs/promises"),a=Hi(),c=hs(),r=Ar(),n=_r(),o=class extends r{static{v(this,"FileFetcher")}constructor(l,h){super(l,h),this.resolved=this.spec.fetchSpec}get types(){return["file"]}manifest(){return this.package?Promise.resolve(this.package):a.tmp.withTmp(this.cache,this.opts,l=>this.extract(l).then(()=>this[n.readPackageJson](l)).then(h=>this.package={...h,_integrity:this.integrity&&String(this.integrity),_resolved:this.resolved,_from:this.from}))}#e(l,h){return l.bin?Promise.all(Object.keys(l.bin).map(async p=>{let d=s(h,l.bin[p]);try{let g=await u(d),m=g.mode|73;if(m===g.mode)return;await i(d,m)}catch{}})):Promise.resolve()}extract(l){return super.extract(l).then(h=>this.package?h:this[n.readPackageJson](l).then(p=>this.#e(p,l)).then(()=>h))}[n.tarballFromResolved](){return new c.ReadStream(this.resolved)}packument(){return this.manifest().then(l=>({name:l.name,"dist-tags":{[this.defaultTag]:l.version},versions:{[l.version]:{...l,dist:{tarball:`file:${this.resolved}`,integrity:this.integrity&&String(this.integrity)}}}}))}};t.exports=o}),bN=K((e,t)=>{var s=Yf(),u=v(i=>({cwd:i._resolved,prefix:"package/",portable:!0,gzip:{level:9},filter:v((a,c)=>(s(i,a)&&(c.mode|=73),!0),"filter"),mtime:new Date("1985-10-26T08:15:00.000Z")}),"tarCreateOptions");t.exports=u}),Bl=K((e,t)=>{var{resolve:s}=require("path"),u=pN(),i=EN(),a=Xf(),{Minipass:c}=xe(),r=Ar(),n=ys(),o=_r(),l=bN(),h=class extends r{static{v(this,"DirFetcher")}constructor(p,d){super(p,d),this.resolved=this.spec.fetchSpec,this.tree=d.tree||null,this.Arborist=d.Arborist||null}static tarCreateOptions(p){return l(p)}get types(){return["directory"]}#e(){return this.manifest().then(p=>{if(!p.scripts||!p.scripts.prepare||this.opts.ignoreScripts)return;let d=this.opts.foregroundScripts?"inherit":"pipe";return i({scriptShell:this.opts.scriptShell||void 0,pkg:p,event:"prepare",path:this.resolved,stdio:d,env:{npm_package_resolved:this.resolved,npm_package_integrity:this.integrity,npm_package_json:s(this.resolved,"package.json")}})})}[o.tarballFromResolved](){if(!this.tree&&!this.Arborist)throw new Error("DirFetcher requires either a tree or an Arborist constructor to pack");let p=new c;p.resolved=this.resolved,p.integrity=this.integrity;let{prefix:d,workspaces:g}=this.opts;return this.#e().then(async()=>{if(!this.tree){let m=new this.Arborist({path:this.resolved});this.tree=await m.loadActual()}return u(this.tree,{path:this.resolved,prefix:d,workspaces:g})}).then(m=>a.c(l(this.package),m).on("error",f=>p.emit("error",f)).pipe(p)).catch(m=>p.emit("error",m)),p}manifest(){return this.package?Promise.resolve(this.package):this[o.readPackageJson](this.resolved).then(p=>this.package={...p,_integrity:this.integrity&&String(this.integrity),_resolved:this.resolved,_from:this.from})}packument(){return n.prototype.packument.apply(this)}};t.exports=h}),sg=K((e,t)=>{"use strict";var{URL:s}=require("url");function u(o){try{let h=new s(o).pathname.slice(1);if(!h.match(/^-/)){h=h.split("/");var l=h.indexOf("_rewrite");return l===-1?l=h.length-1:l++,decodeURIComponent(h[l])}}catch{}}v(u,"packageName");var i=class extends Error{static{v(this,"HttpErrorBase")}constructor(o,l,h,p){super(),this.name=this.constructor.name,this.headers=typeof l.headers?.raw=="function"?l.headers.raw():l.headers,this.statusCode=l.status,this.code=`E${l.status}`,this.method=o,this.uri=l.url,this.body=h,this.pkgid=p?p.toString():u(l.url),Error.captureStackTrace(this,this.constructor)}},a=class extends i{static{v(this,"HttpErrorGeneral")}constructor(o,l,h,p){super(o,l,h,p),this.message=`${l.status} ${l.statusText} - ${this.method.toUpperCase()} ${this.spec||this.uri}${h&&h.error?" - "+h.error:""}`}},c=class extends i{static{v(this,"HttpErrorAuthOTP")}constructor(o,l,h,p){super(o,l,h,p),this.message="OTP required for authentication",this.code="EOTP"}},r=class extends i{static{v(this,"HttpErrorAuthIPAddress")}constructor(o,l,h,p){super(o,l,h,p),this.message="Login is not allowed from your IP address",this.code="EAUTHIP"}},n=class extends i{static{v(this,"HttpErrorAuthUnknown")}constructor(o,l,h,p){super(o,l,h,p),this.message="Unable to authenticate, need: "+l.headers.get("www-authenticate")}};t.exports={HttpErrorBase:i,HttpErrorGeneral:a,HttpErrorAuthOTP:c,HttpErrorAuthIPAddress:r,HttpErrorAuthUnknown:n}}),_N=K((e,t)=>{var s=Tl(),u=class extends Error{static{v(this,"SizeError")}constructor(a,c){super(`Bad data size: expected ${c} bytes, but got ${a}`),this.expect=c,this.found=a,this.code="EBADSIZE",Error.captureStackTrace(this,this.constructor)}get name(){return"SizeError"}},i=class extends s{static{v(this,"MinipassSized")}constructor(a={}){if(super(a),a.objectMode)throw new TypeError(`${this.constructor.name} streams only work with string and buffer data`);if(this.found=0,this.expect=a.size,typeof this.expect!="number"||this.expect>Number.MAX_SAFE_INTEGER||isNaN(this.expect)||this.expect<0||!isFinite(this.expect)||this.expect!==Math.floor(this.expect))throw new Error("invalid expected size: "+this.expect)}write(a,c,r){let n=Buffer.isBuffer(a)?a:typeof a=="string"?Buffer.from(a,typeof c=="string"?c:"utf8"):a;return Buffer.isBuffer(n)?(this.found+=n.length,this.found>this.expect&&this.emit("error",new u(this.found,this.expect)),super.write(a,c,r)):(this.emit("error",new TypeError(`${this.constructor.name} streams only work with string and buffer data`)),!1)}emit(a,...c){return a==="end"&&this.found!==this.expect&&this.emit("error",new u(this.found,this.expect)),super.emit(a,...c)}};i.SizeError=u,t.exports=i}),wN=K((e,t)=>{"use strict";var{Minipass:s}=xe(),u=Symbol("type"),i=Symbol("buffer"),a=class Qa{static{v(this,"Blob")}constructor(r,n){this[u]="";let o=[],l=0;if(r){let p=r,d=Number(p.length);for(let g=0;g<d;g++){let m=p[g],f=m instanceof Buffer?m:ArrayBuffer.isView(m)?Buffer.from(m.buffer,m.byteOffset,m.byteLength):m instanceof ArrayBuffer?Buffer.from(m):m instanceof Qa?m[i]:typeof m=="string"?Buffer.from(m):Buffer.from(String(m));l+=f.length,o.push(f)}}this[i]=Buffer.concat(o,l);let h=n&&n.type!==void 0&&String(n.type).toLowerCase();h&&!/[^\u0020-\u007E]/.test(h)&&(this[u]=h)}get size(){return this[i].length}get type(){return this[u]}text(){return Promise.resolve(this[i].toString())}arrayBuffer(){let r=this[i],n=r.byteOffset,o=r.byteLength,l=r.buffer.slice(n,n+o);return Promise.resolve(l)}stream(){return new s().end(this[i])}slice(r,n,o){let l=this.size,h=r===void 0?0:r<0?Math.max(l+r,0):Math.min(r,l),p=n===void 0?l:n<0?Math.max(l+n,0):Math.min(n,l),d=Math.max(p-h,0),g=this[i].slice(h,h+d),m=new Qa([],{type:o});return m[i]=g,m}get[Symbol.toStringTag](){return"Blob"}static get BUFFER(){return i}};Object.defineProperties(a.prototype,{size:{enumerable:!0},type:{enumerable:!0}}),t.exports=a}),ig=K((e,t)=>{"use strict";var s=class extends Error{static{v(this,"FetchError")}constructor(u,i,a){super(u),this.code="FETCH_ERROR",a&&Object.assign(this,a),this.errno=this.code,this.type=this.code==="EBADSIZE"&&this.found>this.expect?"max-size":i,this.message=u,Error.captureStackTrace(this,this.constructor)}get name(){return"FetchError"}set name(u){}get[Symbol.toStringTag](){return"FetchError"}};t.exports=s}),ON=K((e,t)=>{t.exports={}}),Ul=K((e,t)=>{"use strict";var{Minipass:s}=xe(),u=_N(),i=wN(),{BUFFER:a}=i,c=ig(),r;try{r=ON().convert}catch{}var n=Symbol("Body internals"),o=Symbol("consumeBody"),l=class{static{v(this,"Body")}constructor(g,m={}){let{size:f=0,timeout:y=0}=m,S=g==null?null:h(g)?Buffer.from(g.toString()):p(g)||Buffer.isBuffer(g)?g:Object.prototype.toString.call(g)==="[object ArrayBuffer]"?Buffer.from(g):ArrayBuffer.isView(g)?Buffer.from(g.buffer,g.byteOffset,g.byteLength):s.isStream(g)?g:Buffer.from(String(g));this[n]={body:S,disturbed:!1,error:null},this.size=f,this.timeout=y,s.isStream(S)&&S.on("error",E=>{let b=E.name==="AbortError"?E:new c(`Invalid response while trying to fetch ${this.url}: ${E.message}`,"system",E);this[n].error=b})}get body(){return this[n].body}get bodyUsed(){return this[n].disturbed}arrayBuffer(){return this[o]().then(g=>g.buffer.slice(g.byteOffset,g.byteOffset+g.byteLength))}blob(){let g=this.headers&&this.headers.get("content-type")||"";return this[o]().then(m=>Object.assign(new i([],{type:g.toLowerCase()}),{[a]:m}))}async json(){let g=await this[o]();try{return JSON.parse(g.toString())}catch(m){throw new c(`invalid json response body at ${this.url} reason: ${m.message}`,"invalid-json")}}text(){return this[o]().then(g=>g.toString())}buffer(){return this[o]()}textConverted(){return this[o]().then(g=>d(g,this.headers))}[o](){if(this[n].disturbed)return Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[n].disturbed=!0,this[n].error)return Promise.reject(this[n].error);if(this.body===null)return Promise.resolve(Buffer.alloc(0));if(Buffer.isBuffer(this.body))return Promise.resolve(this.body);let g=p(this.body)?this.body.stream():this.body;if(!s.isStream(g))return Promise.resolve(Buffer.alloc(0));let m=this.size&&g instanceof u||!this.size&&g instanceof s&&!(g instanceof u)?g:this.size?new u({size:this.size}):new s,f=this.timeout&&m.writable?setTimeout(()=>{m.emit("error",new c(`Response timeout while trying to fetch ${this.url} (over ${this.timeout}ms)`,"body-timeout"))},this.timeout):null;return f&&f.unref&&f.unref(),new Promise(y=>{m!==g&&(g.on("error",S=>m.emit("error",S)),g.pipe(m)),y()}).then(()=>m.concat()).then(y=>(clearTimeout(f),y)).catch(y=>{throw clearTimeout(f),y.name==="AbortError"||y.name==="FetchError"?y:y.name==="RangeError"?new c(`Could not create Buffer from response body for ${this.url}: ${y.message}`,"system",y):new c(`Invalid response body while trying to fetch ${this.url}: ${y.message}`,"system",y)})}static clone(g){if(g.bodyUsed)throw new Error("cannot clone body after it is used");let m=g.body;if(s.isStream(m)&&typeof m.getBoundary!="function"){let f=new s,y=new s,S=new s;return f.on("error",E=>{y.emit("error",E),S.emit("error",E)}),m.on("error",E=>f.emit("error",E)),f.pipe(y),f.pipe(S),m.pipe(f),g[n].body=y,S}else return g.body}static extractContentType(g){return g==null?null:typeof g=="string"?"text/plain;charset=UTF-8":h(g)?"application/x-www-form-urlencoded;charset=UTF-8":p(g)?g.type||null:Buffer.isBuffer(g)||Object.prototype.toString.call(g)==="[object ArrayBuffer]"||ArrayBuffer.isView(g)?null:typeof g.getBoundary=="function"?`multipart/form-data;boundary=${g.getBoundary()}`:s.isStream(g)?null:"text/plain;charset=UTF-8"}static getTotalBytes(g){let{body:m}=g;return m==null?0:p(m)?m.size:Buffer.isBuffer(m)?m.length:m&&typeof m.getLengthSync=="function"&&(m._lengthRetrievers&&m._lengthRetrievers.length===0||m.hasKnownLength&&m.hasKnownLength())?m.getLengthSync():null}static writeToStream(g,m){let{body:f}=m;return f==null?g.end():Buffer.isBuffer(f)||typeof f=="string"?g.end(f):(p(f)?f.stream():f).on("error",y=>g.emit("error",y)).pipe(g),g}};Object.defineProperties(l.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}});var h=v(g=>typeof g!="object"||typeof g.append!="function"||typeof g.delete!="function"||typeof g.get!="function"||typeof g.getAll!="function"||typeof g.has!="function"||typeof g.set!="function"?!1:g.constructor.name==="URLSearchParams"||Object.prototype.toString.call(g)==="[object URLSearchParams]"||typeof g.sort=="function","isURLSearchParams"),p=v(g=>typeof g=="object"&&typeof g.arrayBuffer=="function"&&typeof g.type=="string"&&typeof g.stream=="function"&&typeof g.constructor=="function"&&typeof g.constructor.name=="string"&&/^(Blob|File)$/.test(g.constructor.name)&&/^(Blob|File)$/.test(g[Symbol.toStringTag]),"isBlob"),d=v((g,m)=>{if(typeof r!="function")throw new Error("The package `encoding` must be installed to use the textConverted() function");let f=m&&m.get("content-type"),y="utf-8",S;f&&(S=/charset=([^;]*)/i.exec(f));let E=g.slice(0,1024).toString();return!S&&E&&(S=/<meta.+?charset=(['"])(.+?)\1/i.exec(E)),!S&&E&&(S=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(E),S||(S=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(E),S&&S.pop()),S&&(S=/charset=(.*)/i.exec(S.pop()))),!S&&E&&(S=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(E)),S&&(y=S.pop(),(y==="gb2312"||y==="gbk")&&(y="gb18030")),r(g,"UTF-8",y).toString()},"convertBody");t.exports=l}),Fl=K((e,t)=>{"use strict";var s=/[^^_`a-zA-Z\-0-9!#$%&'*+.|~]/,u=/[^\t\x20-\x7e\x80-\xff]/,i=v(p=>{if(p=`${p}`,s.test(p)||p==="")throw new TypeError(`${p} is not a legal HTTP header name`)},"validateName"),a=v(p=>{if(p=`${p}`,u.test(p))throw new TypeError(`${p} is not a legal HTTP header value`)},"validateValue"),c=v((p,d)=>{d=d.toLowerCase();for(let g in p)if(g.toLowerCase()===d)return g},"find"),r=Symbol("map"),n=class el{static{v(this,"Headers")}constructor(d=void 0){if(this[r]=Object.create(null),d instanceof el){let g=d.raw(),m=Object.keys(g);for(let f of m)for(let y of g[f])this.append(f,y);return}if(d!=null)if(typeof d=="object"){let g=d[Symbol.iterator];if(g!=null){if(typeof g!="function")throw new TypeError("Header pairs must be iterable");let m=[];for(let f of d){if(typeof f!="object"||typeof f[Symbol.iterator]!="function")throw new TypeError("Each header pair must be iterable");let y=Array.from(f);if(y.length!==2)throw new TypeError("Each header pair must be a name/value tuple");m.push(y)}for(let f of m)this.append(f[0],f[1])}else for(let m of Object.keys(d))this.append(m,d[m])}else throw new TypeError("Provided initializer must be an object")}get(d){d=`${d}`,i(d);let g=c(this[r],d);return g===void 0?null:this[r][g].join(", ")}forEach(d,g=void 0){let m=o(this);for(let f=0;f<m.length;f++){let[y,S]=m[f];d.call(g,S,y,this),m=o(this)}}set(d,g){d=`${d}`,g=`${g}`,i(d),a(g);let m=c(this[r],d);this[r][m!==void 0?m:d]=[g]}append(d,g){d=`${d}`,g=`${g}`,i(d),a(g);let m=c(this[r],d);m!==void 0?this[r][m].push(g):this[r][d]=[g]}has(d){return d=`${d}`,i(d),c(this[r],d)!==void 0}delete(d){d=`${d}`,i(d);let g=c(this[r],d);g!==void 0&&delete this[r][g]}raw(){return this[r]}keys(){return new h(this,"key")}values(){return new h(this,"value")}[Symbol.iterator](){return new h(this,"key+value")}entries(){return new h(this,"key+value")}get[Symbol.toStringTag](){return"Headers"}static exportNodeCompatibleHeaders(d){let g=Object.assign(Object.create(null),d[r]),m=c(d[r],"Host");return m!==void 0&&(g[m]=g[m][0]),g}static createHeadersLenient(d){let g=new el;for(let m of Object.keys(d))if(!s.test(m))if(Array.isArray(d[m]))for(let f of d[m])u.test(f)||(g[r][m]===void 0?g[r][m]=[f]:g[r][m].push(f));else u.test(d[m])||(g[r][m]=[d[m]]);return g}};Object.defineProperties(n.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});var o=v((p,d="key+value")=>Object.keys(p[r]).sort().map(d==="key"?g=>g.toLowerCase():d==="value"?g=>p[r][g].join(", "):g=>[g.toLowerCase(),p[r][g].join(", ")]),"getHeaders"),l=Symbol("internal"),h=class ng{static{v(this,"HeadersIterator")}constructor(d,g){this[l]={target:d,kind:g,index:0}}get[Symbol.toStringTag](){return"HeadersIterator"}next(){if(!this||Object.getPrototypeOf(this)!==ng.prototype)throw new TypeError("Value of `this` is not a HeadersIterator");let{target:d,kind:g,index:m}=this[l],f=o(d,g),y=f.length;return m>=y?{value:void 0,done:!0}:(this[l].index++,{value:f[m],done:!1})}};Object.setPrototypeOf(h.prototype,Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))),t.exports=n}),RN=K((e,t)=>{"use strict";var s=require("http"),{STATUS_CODES:u}=s,i=Fl(),a=Ul(),{clone:c,extractContentType:r}=a,n=Symbol("Response internals"),o=class og extends a{static{v(this,"Response")}constructor(h=null,p={}){super(h,p);let d=p.status||200,g=new i(p.headers);if(h!=null&&!g.has("Content-Type")){let m=r(h);m&&g.append("Content-Type",m)}this[n]={url:p.url,status:d,statusText:p.statusText||u[d],headers:g,counter:p.counter,trailer:Promise.resolve(p.trailer||new i)}}get trailer(){return this[n].trailer}get url(){return this[n].url||""}get status(){return this[n].status}get ok(){return this[n].status>=200&&this[n].status<300}get redirected(){return this[n].counter>0}get statusText(){return this[n].statusText}get headers(){return this[n].headers}clone(){return new og(c(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,trailer:this.trailer})}get[Symbol.toStringTag](){return"Response"}};t.exports=o,Object.defineProperties(o.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})}),AN=K((e,t)=>{t.exports={name:"minipass-fetch",version:"4.0.1",description:"An implementation of window.fetch in Node.js using Minipass streams",license:"MIT",main:"lib/index.js",scripts:{"test:tls-fixtures":"./test/fixtures/tls/setup.sh",test:"tap",snap:"tap",lint:"npm run eslint",postlint:"template-oss-check",lintfix:"npm run eslint -- --fix",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},tap:{"coverage-map":"map.js","check-coverage":!0,"nyc-arg":["--exclude","tap-snapshots/**"]},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.23.3","@ungap/url-search-params":"^0.2.2","abort-controller":"^3.0.0","abortcontroller-polyfill":"~1.7.3",encoding:"^0.1.13","form-data":"^4.0.0",nock:"^13.2.4",parted:"^0.1.1","string-to-arraybuffer":"^1.0.2",tap:"^16.0.0"},dependencies:{minipass:"^7.0.3","minipass-sized":"^1.0.3",minizlib:"^3.0.1"},optionalDependencies:{encoding:"^0.1.13"},repository:{type:"git",url:"git+https://github.com/npm/minipass-fetch.git"},keywords:["fetch","minipass","node-fetch","window.fetch"],files:["bin/","lib/"],engines:{node:"^18.17.0 || >=20.5.0"},author:"GitHub Inc.",templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.23.3",publish:"true"}}}),CN=K((e,t)=>{"use strict";var{URL:s}=require("url"),{Minipass:u}=xe(),i=Fl(),{exportNodeCompatibleHeaders:a}=i,c=Ul(),{clone:r,extractContentType:n,getTotalBytes:o}=c,l=AN().version,h=`minipass-fetch/${l} (+https://github.com/isaacs/minipass-fetch)`,p=Symbol("Request internals"),d=v(f=>typeof f=="object"&&typeof f[p]=="object","isRequest"),g=v(f=>{let y=f&&typeof f=="object"&&Object.getPrototypeOf(f);return!!(y&&y.constructor.name==="AbortSignal")},"isAbortSignal"),m=class ag extends c{static{v(this,"Request")}constructor(y,S={}){let E=d(y)?new s(y.url):y&&y.href?new s(y.href):new s(`${y}`);d(y)?S={...y[p],...S}:(!y||typeof y=="string")&&(y={});let b=(S.method||y.method||"GET").toUpperCase(),_=b==="GET"||b==="HEAD";if((S.body!==null&&S.body!==void 0||d(y)&&y.body!==null)&&_)throw new TypeError("Request with GET/HEAD method cannot have body");let O=S.body!==null&&S.body!==void 0?S.body:d(y)&&y.body!==null?r(y):null;super(O,{timeout:S.timeout||y.timeout||0,size:S.size||y.size||0});let w=new i(S.headers||y.headers||{});if(O!=null&&!w.has("Content-Type")){let Q=n(O);Q&&w.append("Content-Type",Q)}let A="signal"in S?S.signal:null;if(A!=null&&!g(A))throw new TypeError("Expected signal must be an instanceof AbortSignal");let{ca:I,cert:P,ciphers:L,clientCertEngine:$,crl:x,dhparam:M,ecdhCurve:U,family:V,honorCipherOrder:B,key:G,passphrase:W,pfx:N,rejectUnauthorized:D=process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0",secureOptions:T,secureProtocol:C,servername:Z,sessionIdContext:X}=S;this[p]={method:b,redirect:S.redirect||y.redirect||"follow",headers:w,parsedURL:E,signal:A,ca:I,cert:P,ciphers:L,clientCertEngine:$,crl:x,dhparam:M,ecdhCurve:U,family:V,honorCipherOrder:B,key:G,passphrase:W,pfx:N,rejectUnauthorized:D,secureOptions:T,secureProtocol:C,servername:Z,sessionIdContext:X},this.follow=S.follow!==void 0?S.follow:y.follow!==void 0?y.follow:20,this.compress=S.compress!==void 0?S.compress:y.compress!==void 0?y.compress:!0,this.counter=S.counter||y.counter||0,this.agent=S.agent||y.agent}get method(){return this[p].method}get url(){return this[p].parsedURL.toString()}get headers(){return this[p].headers}get redirect(){return this[p].redirect}get signal(){return this[p].signal}clone(){return new ag(this)}get[Symbol.toStringTag](){return"Request"}static getNodeRequestOptions(y){let S=y[p].parsedURL,E=new i(y[p].headers);if(E.has("Accept")||E.set("Accept","*/*"),!/^https?:$/.test(S.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(y.signal&&u.isStream(y.body)&&typeof y.body.destroy!="function")throw new Error("Cancellation of streamed requests with AbortSignal is not supported");let b=(y.body===null||y.body===void 0)&&/^(POST|PUT)$/i.test(y.method)?"0":y.body!==null&&y.body!==void 0?o(y):null;b&&E.set("Content-Length",b+""),E.has("User-Agent")||E.set("User-Agent",h),y.compress&&!E.has("Accept-Encoding")&&E.set("Accept-Encoding","gzip,deflate");let _=typeof y.agent=="function"?y.agent(S):y.agent;!E.has("Connection")&&!_&&E.set("Connection","close");let{ca:O,cert:w,ciphers:A,clientCertEngine:I,crl:P,dhparam:L,ecdhCurve:$,family:x,honorCipherOrder:M,key:U,passphrase:V,pfx:B,rejectUnauthorized:G,secureOptions:W,secureProtocol:N,servername:D,sessionIdContext:T}=y[p];return{auth:S.username||S.password?`${S.username}:${S.password}`:"",host:S.host,hostname:S.hostname,path:`${S.pathname}${S.search}`,port:S.port,protocol:S.protocol,method:y.method,headers:a(E),agent:_,ca:O,cert:w,ciphers:A,clientCertEngine:I,crl:P,dhparam:L,ecdhCurve:$,family:x,honorCipherOrder:M,key:U,passphrase:V,pfx:B,rejectUnauthorized:G,secureOptions:W,secureProtocol:N,servername:D,sessionIdContext:T,timeout:y.timeout}}};t.exports=m,Object.defineProperties(m.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}})}),IN=K((e,t)=>{"use strict";var s=class extends Error{static{v(this,"AbortError")}constructor(u){super(u),this.code="FETCH_ABORTED",this.type="aborted",Error.captureStackTrace(this,this.constructor)}get name(){return"AbortError"}set name(u){}};t.exports=s}),vs=K((e,t)=>{"use strict";var{URL:s}=require("url"),u=require("http"),i=require("https"),a=Gi(),{Minipass:c}=xe(),r=Ul(),{writeToStream:n,getTotalBytes:o}=r,l=RN(),h=Fl(),{createHeadersLenient:p}=h,d=CN(),{getNodeRequestOptions:g}=d,m=ig(),f=IN(),y=v(async(S,E)=>{if(/^data:/.test(S)){let b=new d(S,E);return Promise.resolve().then(()=>new Promise((_,O)=>{let w,A;try{let{pathname:L,search:$}=new s(S),x=L.split(",");if(x.length<2)throw new Error("invalid data: URI");let M=x.shift(),U=/;base64$/.test(M);w=U?M.slice(0,-7):M;let V=decodeURIComponent(x.join(",")+$);A=U?Buffer.from(V,"base64"):Buffer.from(V)}catch(L){return O(new m(`[${b.method}] ${b.url} invalid URL, ${L.message}`,"system",L))}let{signal:I}=b;if(I&&I.aborted)return O(new f("The user aborted a request."));let P={"Content-Length":A.length};return w&&(P["Content-Type"]=w),_(new l(A,{headers:P}))}))}return new Promise((b,_)=>{let O=new d(S,E),w;try{w=g(O)}catch(V){return _(V)}let A=(w.protocol==="https:"?i:u).request,{signal:I}=O,P=null,L=v(()=>{let V=new f("The user aborted a request.");_(V),c.isStream(O.body)&&typeof O.body.destroy=="function"&&O.body.destroy(V),P&&P.body&&P.body.emit("error",V)},"abort");if(I&&I.aborted)return L();let $=v(()=>{L(),x()},"abortAndFinalize"),x=v(()=>{M.abort(),I&&I.removeEventListener("abort",$),clearTimeout(U)},"finalize"),M=A(w);I&&I.addEventListener("abort",$);let U=null;O.timeout&&M.once("socket",()=>{U=setTimeout(()=>{_(new m(`network timeout at: ${O.url}`,"request-timeout")),x()},O.timeout)}),M.on("error",V=>{M.res&&M.res.emit("error",V),_(new m(`request to ${O.url} failed, reason: ${V.message}`,"system",V)),x()}),M.on("response",V=>{clearTimeout(U);let B=p(V.headers);if(y.isRedirect(V.statusCode)){let C=B.get("Location"),Z=null;try{Z=C===null?null:new s(C,O.url).toString()}catch{if(O.redirect!=="manual"){_(new m(`uri requested responds with an invalid redirect URL: ${C}`,"invalid-redirect")),x();return}}if(O.redirect==="error"){_(new m(`uri requested responds with a redirect, redirect mode is set to error: ${O.url}`,"no-redirect")),x();return}else if(O.redirect==="manual"){if(Z!==null)try{B.set("Location",Z)}catch(X){_(X)}}else if(O.redirect==="follow"&&Z!==null){if(O.counter>=O.follow){_(new m(`maximum redirect reached at: ${O.url}`,"max-redirect")),x();return}if(V.statusCode!==303&&O.body&&o(O)===null){_(new m("Cannot follow redirect with body being a readable stream","unsupported-redirect")),x();return}O.headers.set("host",new s(Z).host);let X={headers:new h(O.headers),follow:O.follow,counter:O.counter+1,agent:O.agent,compress:O.compress,method:O.method,body:O.body,signal:O.signal,timeout:O.timeout},Q=new s(O.url),k=new s(Z);Q.hostname!==k.hostname&&(X.headers.delete("authorization"),X.headers.delete("cookie")),(V.statusCode===303||(V.statusCode===301||V.statusCode===302)&&O.method==="POST")&&(X.method="GET",X.body=void 0,X.headers.delete("content-length")),b(y(new d(Z,X))),x();return}}V.once("end",()=>I&&I.removeEventListener("abort",$));let G=new c;G.on("error",x),V.on("error",C=>G.emit("error",C)),V.on("data",C=>G.write(C)),V.on("end",()=>G.end());let W={url:O.url,status:V.statusCode,statusText:V.statusMessage,headers:B,size:O.size,timeout:O.timeout,counter:O.counter,trailer:new Promise(C=>V.on("end",()=>C(p(V.trailers))))},N=B.get("Content-Encoding");if(!O.compress||O.method==="HEAD"||N===null||V.statusCode===204||V.statusCode===304){P=new l(G,W),b(P);return}let D={flush:a.constants.Z_SYNC_FLUSH,finishFlush:a.constants.Z_SYNC_FLUSH};if(N==="gzip"||N==="x-gzip"){let C=new a.Gunzip(D);P=new l(G.on("error",Z=>C.emit("error",Z)).pipe(C),W),b(P);return}if(N==="deflate"||N==="x-deflate"){V.once("data",C=>{let Z=(C[0]&15)===8?new a.Inflate:new a.InflateRaw;G.on("error",X=>Z.emit("error",X)).pipe(Z),P=new l(Z,W),b(P)});return}if(N==="br"){try{var T=new a.BrotliDecompress}catch(C){_(C),x();return}G.on("error",C=>T.emit("error",C)).pipe(T),P=new l(T,W),b(P);return}P=new l(G,W),b(P)}),n(M,O)})},"fetch");t.exports=y,y.isRedirect=S=>S===301||S===302||S===303||S===307||S===308,y.Headers=h,y.Request=d,y.Response=l,y.FetchError=m,y.AbortError=f}),TN=K((e,t)=>{t.exports={name:"npm-registry-fetch",version:"19.0.0",description:"Fetch-based http client for use with npm registry APIs",main:"lib",files:["bin/","lib/"],scripts:{eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"',lint:"npm run eslint",lintfix:"npm run eslint -- --fix",test:"tap",posttest:"npm run lint",npmclilint:"npmcli-lint",postsnap:"npm run lintfix --",postlint:"template-oss-check",snap:"tap","template-oss-apply":"template-oss-apply --force"},repository:{type:"git",url:"git+https://github.com/npm/npm-registry-fetch.git"},keywords:["npm","registry","fetch"],author:"GitHub Inc.",license:"ISC",dependencies:{"@npmcli/redact":"^3.0.0",jsonparse:"^1.3.1","make-fetch-happen":"^15.0.0",minipass:"^7.0.2","minipass-fetch":"^4.0.0",minizlib:"^3.0.1","npm-package-arg":"^13.0.0","proc-log":"^5.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",cacache:"^20.0.0",nock:"^13.2.4","require-inject":"^1.4.4",ssri:"^12.0.0",tap:"^16.0.1"},tap:{"check-coverage":!0,"test-ignore":"test[\\\\/](util|cache)[\\\\/]","nyc-arg":["--exclude","tap-snapshots/**"]},engines:{node:"^20.17.0 || >=22.9.0"},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.25.0",publish:"true"}}}),lg=K((e,t)=>{var s=TN();t.exports={maxSockets:12,method:"GET",registry:"https://registry.npmjs.org/",timeout:300*1e3,strictSSL:!0,noProxy:process.env.NOPROXY,userAgent:`${s.name}@${s.version}/node@${process.version}+${process.arch} (${process.platform})`}}),cg=K((e,t)=>{var s="regex",u="path",i={type:s,pattern:/\b(npms?_)[a-zA-Z0-9]{36,48}\b/gi,replacement:"[REDACTED_NPM_SECRET]"},a={type:s,pattern:/\b(Basic\s+|Bearer\s+)[\w+=\-.]+\b/gi,replacement:"[REDACTED_AUTH_HEADER]"},c={type:s,pattern:/\b[A-Za-z0-9-_]{10,}(?!\.\d+\.)\.[A-Za-z0-9-_]{3,}\.[A-Za-z0-9-_]{20,}\b/gi,replacement:"[REDACTED_JSON_WEB_TOKEN]"},r={type:s,pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,replacement:"[REDACTED_UUID]"},n={type:s,pattern:/(?:https?|ftp):\/\/[^\s/"$.?#].[^\s"]*/gi,replacement:"[REDACTED_URL]"},o={type:u,predicate:v(({path:g})=>g.endsWith(".headers.authorization"),"predicate"),replacement:"[REDACTED_HEADER_AUTHORIZATION]"},l={type:u,predicate:v(({path:g})=>g.endsWith(".headers.set-cookie"),"predicate"),replacement:"[REDACTED_HEADER_SET_COOKIE]"},h={type:u,predicate:v(({path:g})=>g.endsWith(".headers.cookie"),"predicate"),replacement:"[REDACTED_HEADER_COOKIE]"},p={type:u,predicate:v(({path:g})=>g.endsWith(".request"),"predicate"),replacement:v(g=>({method:g?.method,path:g?.path,headers:g?.headers,url:g?.url}),"replacement")},d={type:u,predicate:v(({path:g})=>g.endsWith(".response"),"predicate"),replacement:v(g=>({data:g?.data,status:g?.status,headers:g?.headers}),"replacement")};t.exports={TYPE_REGEX:s,TYPE_URL:"url",TYPE_PATH:u,NPM_SECRET:i,AUTH_HEADER:a,JSON_WEB_TOKEN:c,UUID:r,URL_MATCHER:n,DEEP_HEADER_AUTHORIZATION:o,DEEP_HEADER_SET_COOKIE:l,DEEP_HEADER_COOKIE:h,REWRITE_REQUEST:p,REWRITE_RESPONSE:d}}),PN=K((e,t)=>{var{URL_MATCHER:s,TYPE_URL:u,TYPE_REGEX:i,TYPE_PATH:a}=cg(),c=v((_=0)=>(_=typeof _=="string"?_.length:_,_<8?"*".repeat(8):"*".repeat(_)),"asterisk"),r=v(_=>_.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"escapeRegExp"),n=v(_=>{let O=decodeURIComponent(_),w=encodeURIComponent(_);return[...new Set([w,O,_])].map(r).join("|")},"urlEncodeRegexGroup"),o=v((_,...O)=>{let w="";for(let A=0;A<O.length;A++)w+=_[A]+`(${n(O[A])})`;return w+=_[_.length-1],new RegExp(w)},"urlEncodeRegexTag"),l=v(({hostname:_,replacement:O}={})=>({type:u,predicate:v(({url:w})=>w.hostname===_,"predicate"),pattern:v(({url:w})=>o`(^${w.protocol}//${w.username}:.+@)?${w.hostname}`,"pattern"),replacement:`$1${O||c()}`}),"redactUrlHostnameMatcher"),h=v(({param:_,replacement:O}={})=>({type:u,predicate:v(({url:w})=>w.searchParams.has(_),"predicate"),pattern:v(({url:w})=>o`(${_}=)${w.searchParams.get(_)}`,"pattern"),replacement:`$1${O||c()}`}),"redactUrlSearchParamsMatcher"),p=v(({replacement:_}={})=>({type:u,predicate:v(({url:O})=>O.password,"predicate"),pattern:v(({url:O})=>o`(^${O.protocol}//${O.username}:)${O.password}`,"pattern"),replacement:`$1${_||c()}`}),"redactUrlPasswordMatcher"),d=v((..._)=>O=>{try{let w=new URL(O);return y(..._)(O,{url:w})}catch{return O}},"redactUrlReplacement"),g=v((..._)=>({...s,replacement:d(..._)}),"redactUrlMatcher"),m={[i]:_=>O=>(typeof O=="string"&&(O=O.replace(_.pattern,_.replacement)),O),[u]:_=>(O,w)=>{if(typeof O=="string")try{let A=w?.url||new URL(O),{predicate:I,pattern:P}=_;I({url:A})&&(O=O.replace(P({url:A}),_.replacement))}catch{return O}return O},[a]:_=>(O,w)=>{let A=w?.path,I=A.join(".").toLowerCase(),{predicate:P,replacement:L}=_,$=typeof L=="function"?L:()=>L;return P({rawPath:A,path:I})&&(O=$(O,{rawPath:A,path:I})),O}},f=v(_=>m[_.type](_),"redactMatcher"),y=v((..._)=>(O,w)=>_.flat().reduce((A,I)=>(typeof I=="function"?I:f(I))(A,w),O),"redactMatchers"),S=v(()=>(_,O)=>typeof O=="number"?c(_):O+c(_.substring(O.length).length),"redactDynamicReplacement"),E=v(_=>(O,w)=>typeof w=="number"?c(_):w+c(_),"redactFixedReplacement"),b=v((_,O)=>y(p({replacement:O}))(_),"redactUrlPassword");t.exports={asterisk:c,escapeRegExp:r,urlEncodeRegexGroup:n,urlEncodeRegexTag:o,redactUrlHostnameMatcher:l,redactUrlSearchParamsMatcher:h,redactUrlPasswordMatcher:p,redactUrlMatcher:g,redactUrlReplacement:d,redactDynamicReplacement:S,redactFixedReplacement:E,redactMatchers:y,redactUrlPassword:b}}),xN=K((e,t)=>{var s=cg(),{redactUrlPassword:u}=PN(),i="***",a=v(n=>typeof n!="string"||!n?n:u(n,i).replace(s.NPM_SECRET.pattern,`npm_${i}`).replace(s.UUID.pattern,i),"redact"),c=v(n=>{let o=/[\s=]/g,l=null,h="",p=0;for(;l=o.exec(n);)h+=a(n.slice(p,l.index))+l[0],p=o.lastIndex;return h+a(n.slice(p))},"splitAndRedact"),r=v(n=>typeof n=="string"?c(n):Array.isArray(n)?n.map(o=>typeof o=="string"?c(o):o):n,"redactLog");t.exports={redact:a,redactLog:r}}),NN=K((e,t)=>{"use strict";var s=sg(),{Response:u}=vs(),i=lg(),{log:a}=ft(),{redact:c}=xN(),r="https://github.com/npm/cli/wiki/No-auth-for-URI,-but-auth-present-for-scoped-registry",n=v(async({method:h,uri:p,res:d,startTime:g,auth:m,opts:f})=>(f={...i,...f},d.headers.has("npm-notice")&&!d.headers.has("x-local-cache")&&a.notice("",d.headers.get("npm-notice")),d.status>=400?(o(h,d,g),m&&m.scopeAuthKey&&!m.token&&!m.auth&&a.warn("registry",`No auth for URI, but auth present for scoped registry.
|
|
55
|
+
|
|
56
|
+
URI: ${p}
|
|
57
|
+
Scoped Registry Key: ${m.scopeAuthKey}
|
|
58
|
+
|
|
59
|
+
More info here: ${r}`),l(h,d,g,f)):(d.body.on("end",()=>o(h,d,g,f)),f.ignoreBody?(d.body.resume(),new u(null,d)):d)),"checkResponse");t.exports=n;function o(h,p,d){let g=Date.now()-d,m=p.headers.get("x-fetch-attempts"),f=m&&m>1?` attempt #${m}`:"",y=p.headers.get("x-local-cache-status"),S=y?` (cache ${y})`:"",E=c(p.url);y==="hit"?a.http("cache",`${E} ${g}ms${f}${S}`):a.http("fetch",`${h.toUpperCase()} ${p.status} ${E} ${g}ms${f}${S}`)}v(o,"logRequest");function l(h,p,d,g){return p.buffer().catch(()=>null).then(m=>{let f=m;try{f=JSON.parse(m.toString("utf8"))}catch{}if(p.status===401&&p.headers.get("www-authenticate")){let y=p.headers.get("www-authenticate").split(/,\s*/).map(S=>S.toLowerCase());throw y.indexOf("ipaddress")!==-1?new s.HttpErrorAuthIPAddress(h,p,f,g.spec):y.indexOf("otp")!==-1?new s.HttpErrorAuthOTP(h,p,f,g.spec):new s.HttpErrorAuthUnknown(h,p,f,g.spec)}else throw p.status===401&&m!=null&&/one-time pass/.test(m.toString("utf8"))?new s.HttpErrorAuthOTP(h,p,f,g.spec):new s.HttpErrorGeneral(h,p,f,g.spec)})}v(l,"checkErrors")}),kN=K((e,t)=>{"use strict";var s=require("fs"),u=ps(),{URL:i}=require("url"),a=v((p,d)=>{let g=new i(p),m=`//${g.host}${g.pathname}`;for(;m.length>2;){let f=c(m,d);if(f)return{regKey:m,authKey:f};m=m.replace(/([^/]+|\/)$/,"")}return{regKey:!1,authKey:null}},"regFromURI"),c=v((p,d)=>d[`${p}:_authToken`]?"_authToken":d[`${p}:_auth`]?"_auth":d[`${p}:username`]&&d[`${p}:_password`]?"username":d[`${p}:certfile`]&&d[`${p}:keyfile`]?"certfile":!1,"hasAuth"),r=v((p,d)=>{let g=new i(p),m=new i(d);return g.host===m.host},"sameHost"),n=v(p=>{let{spec:d}=p,{scope:g,subSpec:m}=d?u(d):{},f=m&&m.scope,y=m?f:g;return y&&p[`${y}:registry`]||p.registry},"getRegistry"),o=v(p=>{try{return s.readFileSync(p,"utf8")}catch(d){if(d.code!=="ENOENT")throw d;return null}},"maybeReadFile"),l=v((p,d={})=>{let{forceAuth:g}=d;if(!p)throw new Error("URI is required");let{regKey:m,authKey:f}=a(p,g||d);if(g&&!m)return new h({regKey:!1,authKey:null,scopeAuthKey:null,token:g._authToken||g.token,username:g.username,password:g._password||g.password,auth:g._auth||g.auth,certfile:g.certfile,keyfile:g.keyfile});if(!m){let w=n(d);if(w&&p!==w&&r(p,w))return l(w,d);if(w!==d.registry){let{regKey:A,authKey:I}=a(w,d);return new h({scopeAuthKey:A,regKey:A,authKey:I})}}let{[`${m}:_authToken`]:y,[`${m}:username`]:S,[`${m}:_password`]:E,[`${m}:_auth`]:b,[`${m}:certfile`]:_,[`${m}:keyfile`]:O}=d;return new h({scopeAuthKey:null,regKey:m,authKey:f,token:y,auth:b,username:S,password:E,certfile:_,keyfile:O})},"getAuth"),h=class{static{v(this,"Auth")}constructor({token:p,auth:d,username:g,password:m,scopeAuthKey:f,certfile:y,keyfile:S,regKey:E,authKey:b}){if(this.scopeAuthKey=f,this.regKey=E,this.authKey=b,this.token=null,this.auth=null,this.isBasicAuth=!1,this.cert=null,this.key=null,p)this.token=p;else if(d)this.auth=d;else if(g&&m){let _=Buffer.from(m,"base64").toString("utf8");this.auth=Buffer.from(`${g}:${_}`,"utf8").toString("base64"),this.isBasicAuth=!0}if(y&&S){let _=o(y,"utf-8"),O=o(S,"utf-8");_&&O&&(this.cert=_,this.key=O)}}};t.exports=l}),LN=K((e,t)=>{var s=require("dns"),u=["if-modified-since","if-none-match","if-unmodified-since","if-match","if-range"],i=v(a=>{let{strictSSL:c,...r}={...a};if(r.method=r.method?r.method.toUpperCase():"GET",c==null?r.rejectUnauthorized=process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0":r.rejectUnauthorized=c!==!1,!r.retry)r.retry={retries:0};else if(typeof r.retry=="string"){let n=parseInt(r.retry,10);isFinite(n)?r.retry={retries:n}:r.retry={retries:0}}else typeof r.retry=="number"?r.retry={retries:r.retry}:r.retry={retries:0,...r.retry};return r.dns={ttl:300*1e3,lookup:s.lookup,...r.dns},r.cache=r.cache||"default",r.cache==="default"&&Object.keys(r.headers||{}).some(n=>u.includes(n.toLowerCase()))&&(r.cache="no-store"),r.cacheAdditionalHeaders=r.cacheAdditionalHeaders||[],r.cacheManager&&!r.cachePath&&(r.cachePath=r.cacheManager),r},"configureOptions");t.exports=i}),DN=K((e,t)=>{"use strict";var s=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),u=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),i=new Set([500,502,503,504]),a={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},c={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function r(h){let p=parseInt(h,10);return isFinite(p)?p:0}v(r,"toNumberOrZero");function n(h){return h?i.has(h.status):!0}v(n,"isErrorResponse");function o(h){let p={};if(!h)return p;let d=h.trim().split(/,/);for(let g of d){let[m,f]=g.split(/=/,2);p[m.trim()]=f===void 0?!0:f.trim().replace(/^"|"$/g,"")}return p}v(o,"parseCacheControl");function l(h){let p=[];for(let d in h){let g=h[d];p.push(g===!0?d:d+"="+g)}if(p.length)return p.join(", ")}v(l,"formatCacheControl"),t.exports=class{static{v(this,"CachePolicy")}constructor(h,p,{shared:d,cacheHeuristic:g,immutableMinTimeToLive:m,ignoreCargoCult:f,_fromObject:y}={}){if(y){this._fromObject(y);return}if(!p||!p.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(h),this._responseTime=this.now(),this._isShared=d!==!1,this._ignoreCargoCult=!!f,this._cacheHeuristic=g!==void 0?g:.1,this._immutableMinTtl=m!==void 0?m:24*3600*1e3,this._status="status"in p?p.status:200,this._resHeaders=p.headers,this._rescc=o(p.headers["cache-control"]),this._method="method"in h?h.method:"GET",this._url=h.url,this._host=h.headers.host,this._noAuthorization=!h.headers.authorization,this._reqHeaders=p.headers.vary?h.headers:null,this._reqcc=o(h.headers["cache-control"]),this._ignoreCargoCult&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":l(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),p.headers["cache-control"]==null&&/no-cache/.test(p.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&u.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||s.has(this._status)))}_hasExplicitExpiration(){return!!(this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires)}_assertRequestHasHeaders(h){if(!h||!h.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(h){return!this.evaluateRequest(h).revalidation}_evaluateRequestHitResult(h){return{response:{headers:this.responseHeaders()},revalidation:h}}_evaluateRequestRevalidation(h,p){return{synchronous:p,headers:this.revalidationHeaders(h)}}_evaluateRequestMissResult(h){return{response:void 0,revalidation:this._evaluateRequestRevalidation(h,!0)}}evaluateRequest(h){if(this._assertRequestHasHeaders(h),this._rescc["must-revalidate"])return this._evaluateRequestMissResult(h);if(!this._requestMatches(h,!1))return this._evaluateRequestMissResult(h);let p=o(h.headers["cache-control"]);return p["no-cache"]||/no-cache/.test(h.headers.pragma)?this._evaluateRequestMissResult(h):p["max-age"]&&this.age()>r(p["max-age"])?this._evaluateRequestMissResult(h):p["min-fresh"]&&this.maxAge()-this.age()<r(p["min-fresh"])?this._evaluateRequestMissResult(h):this.stale()?"max-stale"in p&&(p["max-stale"]===!0||p["max-stale"]>this.age()-this.maxAge())?this._evaluateRequestHitResult(void 0):this.useStaleWhileRevalidate()?this._evaluateRequestHitResult(this._evaluateRequestRevalidation(h,!1)):this._evaluateRequestMissResult(h):this._evaluateRequestHitResult(void 0)}_requestMatches(h,p){return!!((!this._url||this._url===h.url)&&this._host===h.headers.host&&(!h.method||this._method===h.method||p&&h.method==="HEAD")&&this._varyMatches(h))}_allowsStoringAuthenticated(){return!!(this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"])}_varyMatches(h){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let p=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let d of p)if(h.headers[d]!==this._reqHeaders[d])return!1;return!0}_copyWithoutHopByHopHeaders(h){let p={};for(let d in h)a[d]||(p[d]=h[d]);if(h.connection){let d=h.connection.trim().split(/\s*,\s*/);for(let g of d)delete p[g]}if(p.warning){let d=p.warning.split(/,/).filter(g=>!/^\s*1[0-9][0-9]/.test(g));d.length?p.warning=d.join(",").trim():delete p.warning}return p}responseHeaders(){let h=this._copyWithoutHopByHopHeaders(this._resHeaders),p=this.age();return p>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(h.warning=(h.warning?`${h.warning}, `:"")+'113 - "rfc7234 5.5.4"'),h.age=`${Math.round(p)}`,h.date=new Date(this.now()).toUTCString(),h}date(){let h=Date.parse(this._resHeaders.date);return isFinite(h)?h:this._responseTime}age(){let h=this._ageValue(),p=(this.now()-this._responseTime)/1e3;return h+p}_ageValue(){return r(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return r(this._rescc["s-maxage"])}if(this._rescc["max-age"])return r(this._rescc["max-age"]);let h=this._rescc.immutable?this._immutableMinTtl:0,p=this.date();if(this._resHeaders.expires){let d=Date.parse(this._resHeaders.expires);return Number.isNaN(d)||d<p?0:Math.max(h,(d-p)/1e3)}if(this._resHeaders["last-modified"]){let d=Date.parse(this._resHeaders["last-modified"]);if(isFinite(d)&&p>d)return Math.max(h,(p-d)/1e3*this._cacheHeuristic)}return h}timeToLive(){let h=this.maxAge()-this.age(),p=h+r(this._rescc["stale-if-error"]),d=h+r(this._rescc["stale-while-revalidate"]);return Math.round(Math.max(0,h,p,d)*1e3)}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+r(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){let h=r(this._rescc["stale-while-revalidate"]);return h>0&&this.maxAge()+h>this.age()}static fromObject(h){return new this(void 0,void 0,{_fromObject:h})}_fromObject(h){if(this._responseTime)throw Error("Reinitialized");if(!h||h.v!==1)throw Error("Invalid serialization");this._responseTime=h.t,this._isShared=h.sh,this._cacheHeuristic=h.ch,this._immutableMinTtl=h.imm!==void 0?h.imm:24*3600*1e3,this._ignoreCargoCult=!!h.icc,this._status=h.st,this._resHeaders=h.resh,this._rescc=h.rescc,this._method=h.m,this._url=h.u,this._host=h.h,this._noAuthorization=h.a,this._reqHeaders=h.reqh,this._reqcc=h.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,icc:this._ignoreCargoCult,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(h){this._assertRequestHasHeaders(h);let p=this._copyWithoutHopByHopHeaders(h.headers);if(delete p["if-range"],!this._requestMatches(h,!0)||!this.storable())return delete p["if-none-match"],delete p["if-modified-since"],p;if(this._resHeaders.etag&&(p["if-none-match"]=p["if-none-match"]?`${p["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),p["accept-ranges"]||p["if-match"]||p["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete p["if-modified-since"],p["if-none-match"]){let d=p["if-none-match"].split(/,/).filter(g=>!/^\s*W\//.test(g));d.length?p["if-none-match"]=d.join(",").trim():delete p["if-none-match"]}}else this._resHeaders["last-modified"]&&!p["if-modified-since"]&&(p["if-modified-since"]=this._resHeaders["last-modified"]);return p}revalidatedPolicy(h,p){if(this._assertRequestHasHeaders(h),this._useStaleIfError()&&n(p))return{policy:this,modified:!1,matches:!0};if(!p||!p.headers)throw Error("Response headers missing");let d=!1;p.status!==void 0&&p.status!=304?d=!1:p.headers.etag&&!/^\s*W\//.test(p.headers.etag)?d=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===p.headers.etag:this._resHeaders.etag&&p.headers.etag?d=this._resHeaders.etag.replace(/^\s*W\//,"")===p.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?d=this._resHeaders["last-modified"]===p.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!p.headers.etag&&!p.headers["last-modified"]&&(d=!0);let g={shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl,ignoreCargoCult:this._ignoreCargoCult};if(!d)return{policy:new this.constructor(h,p,g),modified:p.status!=304,matches:!1};let m={};for(let y in this._resHeaders)m[y]=y in p.headers&&!c[y]?p.headers[y]:this._resHeaders[y];let f=Object.assign({},p,{status:this._status,method:this._method,headers:m});return{policy:new this.constructor(h,f,g),modified:!1,matches:!0}}}}),$N=K((e,t)=>{"use strict";t.exports=r,t.exports.preferredCharsets=r;var s=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function u(h){for(var p=h.split(","),d=0,g=0;d<p.length;d++){var m=i(p[d].trim(),d);m&&(p[g++]=m)}return p.length=g,p}v(u,"parseAcceptCharset");function i(h,p){var d=s.exec(h);if(!d)return null;var g=d[1],m=1;if(d[2])for(var f=d[2].split(";"),y=0;y<f.length;y++){var S=f[y].trim().split("=");if(S[0]==="q"){m=parseFloat(S[1]);break}}return{charset:g,q:m,i:p}}v(i,"parseCharset");function a(h,p,d){for(var g={o:-1,q:0,s:0},m=0;m<p.length;m++){var f=c(h,p[m],d);f&&(g.s-f.s||g.q-f.q||g.o-f.o)<0&&(g=f)}return g}v(a,"getCharsetPriority");function c(h,p,d){var g=0;if(p.charset.toLowerCase()===h.toLowerCase())g|=1;else if(p.charset!=="*")return null;return{i:d,o:p.i,q:p.q,s:g}}v(c,"specify");function r(h,p){var d=u(h===void 0?"*":h||"");if(!p)return d.filter(l).sort(n).map(o);var g=p.map(v(function(m,f){return a(m,d,f)},"getPriority"));return g.filter(l).sort(n).map(v(function(m){return p[g.indexOf(m)]},"getCharset"))}v(r,"preferredCharsets");function n(h,p){return p.q-h.q||p.s-h.s||h.o-p.o||h.i-p.i||0}v(n,"compareSpecs");function o(h){return h.charset}v(o,"getFullCharset");function l(h){return h.q>0}v(l,"isQuality")}),MN=K((e,t)=>{"use strict";t.exports=r,t.exports.preferredEncodings=r;var s=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function u(h){for(var p=h.split(","),d=!1,g=1,m=0,f=0;m<p.length;m++){var y=i(p[m].trim(),m);y&&(p[f++]=y,d=d||c("identity",y),g=Math.min(g,y.q||1))}return d||(p[f++]={encoding:"identity",q:g,i:m}),p.length=f,p}v(u,"parseAcceptEncoding");function i(h,p){var d=s.exec(h);if(!d)return null;var g=d[1],m=1;if(d[2])for(var f=d[2].split(";"),y=0;y<f.length;y++){var S=f[y].trim().split("=");if(S[0]==="q"){m=parseFloat(S[1]);break}}return{encoding:g,q:m,i:p}}v(i,"parseEncoding");function a(h,p,d){for(var g={encoding:h,o:-1,q:0,s:0},m=0;m<p.length;m++){var f=c(h,p[m],d);f&&(g.s-f.s||g.q-f.q||g.o-f.o)<0&&(g=f)}return g}v(a,"getEncodingPriority");function c(h,p,d){var g=0;if(p.encoding.toLowerCase()===h.toLowerCase())g|=1;else if(p.encoding!=="*")return null;return{encoding:h,i:d,o:p.i,q:p.q,s:g}}v(c,"specify");function r(h,p,d){var g=u(h||""),m=d?v(function(y,S){if(y.q!==S.q)return S.q-y.q;var E=d.indexOf(y.encoding),b=d.indexOf(S.encoding);return E===-1&&b===-1?S.s-y.s||y.o-S.o||y.i-S.i:E!==-1&&b!==-1?E-b:E===-1?1:-1},"comparator"):n;if(!p)return g.filter(l).sort(m).map(o);var f=p.map(v(function(y,S){return a(y,g,S)},"getPriority"));return f.filter(l).sort(m).map(v(function(y){return p[f.indexOf(y)]},"getEncoding"))}v(r,"preferredEncodings");function n(h,p){return p.q-h.q||p.s-h.s||h.o-p.o||h.i-p.i}v(n,"compareSpecs");function o(h){return h.encoding}v(o,"getFullEncoding");function l(h){return h.q>0}v(l,"isQuality")}),jN=K((e,t)=>{"use strict";t.exports=r,t.exports.preferredLanguages=r;var s=/^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;function u(h){for(var p=h.split(","),d=0,g=0;d<p.length;d++){var m=i(p[d].trim(),d);m&&(p[g++]=m)}return p.length=g,p}v(u,"parseAcceptLanguage");function i(h,p){var d=s.exec(h);if(!d)return null;var g=d[1],m=d[2],f=g;m&&(f+="-"+m);var y=1;if(d[3])for(var S=d[3].split(";"),E=0;E<S.length;E++){var b=S[E].split("=");b[0]==="q"&&(y=parseFloat(b[1]))}return{prefix:g,suffix:m,q:y,i:p,full:f}}v(i,"parseLanguage");function a(h,p,d){for(var g={o:-1,q:0,s:0},m=0;m<p.length;m++){var f=c(h,p[m],d);f&&(g.s-f.s||g.q-f.q||g.o-f.o)<0&&(g=f)}return g}v(a,"getLanguagePriority");function c(h,p,d){var g=i(h);if(!g)return null;var m=0;if(p.full.toLowerCase()===g.full.toLowerCase())m|=4;else if(p.prefix.toLowerCase()===g.full.toLowerCase())m|=2;else if(p.full.toLowerCase()===g.prefix.toLowerCase())m|=1;else if(p.full!=="*")return null;return{i:d,o:p.i,q:p.q,s:m}}v(c,"specify");function r(h,p){var d=u(h===void 0?"*":h||"");if(!p)return d.filter(l).sort(n).map(o);var g=p.map(v(function(m,f){return a(m,d,f)},"getPriority"));return g.filter(l).sort(n).map(v(function(m){return p[g.indexOf(m)]},"getLanguage"))}v(r,"preferredLanguages");function n(h,p){return p.q-h.q||p.s-h.s||h.o-p.o||h.i-p.i||0}v(n,"compareSpecs");function o(h){return h.full}v(o,"getFullLanguage");function l(h){return h.q>0}v(l,"isQuality")}),BN=K((e,t)=>{"use strict";t.exports=r,t.exports.preferredMediaTypes=r;var s=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;function u(m){for(var f=d(m),y=0,S=0;y<f.length;y++){var E=i(f[y].trim(),y);E&&(f[S++]=E)}return f.length=S,f}v(u,"parseAccept");function i(m,f){var y=s.exec(m);if(!y)return null;var S=Object.create(null),E=1,b=y[2],_=y[1];if(y[3])for(var O=g(y[3]).map(p),w=0;w<O.length;w++){var A=O[w],I=A[0].toLowerCase(),P=A[1],L=P&&P[0]==='"'&&P[P.length-1]==='"'?P.slice(1,-1):P;if(I==="q"){E=parseFloat(L);break}S[I]=L}return{type:_,subtype:b,params:S,q:E,i:f}}v(i,"parseMediaType");function a(m,f,y){for(var S={o:-1,q:0,s:0},E=0;E<f.length;E++){var b=c(m,f[E],y);b&&(S.s-b.s||S.q-b.q||S.o-b.o)<0&&(S=b)}return S}v(a,"getMediaTypePriority");function c(m,f,y){var S=i(m),E=0;if(!S)return null;if(f.type.toLowerCase()==S.type.toLowerCase())E|=4;else if(f.type!="*")return null;if(f.subtype.toLowerCase()==S.subtype.toLowerCase())E|=2;else if(f.subtype!="*")return null;var b=Object.keys(f.params);if(b.length>0)if(b.every(function(_){return f.params[_]=="*"||(f.params[_]||"").toLowerCase()==(S.params[_]||"").toLowerCase()}))E|=1;else return null;return{i:y,o:f.i,q:f.q,s:E}}v(c,"specify");function r(m,f){var y=u(m===void 0?"*/*":m||"");if(!f)return y.filter(l).sort(n).map(o);var S=f.map(v(function(E,b){return a(E,y,b)},"getPriority"));return S.filter(l).sort(n).map(v(function(E){return f[S.indexOf(E)]},"getType"))}v(r,"preferredMediaTypes");function n(m,f){return f.q-m.q||f.s-m.s||m.o-f.o||m.i-f.i||0}v(n,"compareSpecs");function o(m){return m.type+"/"+m.subtype}v(o,"getFullType");function l(m){return m.q>0}v(l,"isQuality");function h(m){for(var f=0,y=0;(y=m.indexOf('"',y))!==-1;)f++,y++;return f}v(h,"quoteCount");function p(m){var f=m.indexOf("="),y,S;return f===-1?y=m:(y=m.slice(0,f),S=m.slice(f+1)),[y,S]}v(p,"splitKeyValuePair");function d(m){for(var f=m.split(","),y=1,S=0;y<f.length;y++)h(f[S])%2==0?f[++S]=f[y]:f[S]+=","+f[y];return f.length=S+1,f}v(d,"splitMediaTypes");function g(m){for(var f=m.split(";"),y=1,S=0;y<f.length;y++)h(f[S])%2==0?f[++S]=f[y]:f[S]+=";"+f[y];f.length=S+1;for(var y=0;y<f.length;y++)f[y]=f[y].trim();return f}v(g,"splitParameters")}),UN=K((e,t)=>{"use strict";var s=$N(),u=MN(),i=jN(),a=BN();t.exports=c,t.exports.Negotiator=c;function c(r){if(!(this instanceof c))return new c(r);this.request=r}v(c,"Negotiator"),c.prototype.charset=v(function(r){var n=this.charsets(r);return n&&n[0]},"charset"),c.prototype.charsets=v(function(r){return s(this.request.headers["accept-charset"],r)},"charsets"),c.prototype.encoding=v(function(r,n){var o=this.encodings(r,n);return o&&o[0]},"encoding"),c.prototype.encodings=v(function(r,n){var o=n||{};return u(this.request.headers["accept-encoding"],r,o.preferred)},"encodings"),c.prototype.language=v(function(r){var n=this.languages(r);return n&&n[0]},"language"),c.prototype.languages=v(function(r){return i(this.request.headers["accept-language"],r)},"languages"),c.prototype.mediaType=v(function(r){var n=this.mediaTypes(r);return n&&n[0]},"mediaType"),c.prototype.mediaTypes=v(function(r){return a(this.request.headers.accept,r)},"mediaTypes"),c.prototype.preferredCharset=c.prototype.charset,c.prototype.preferredCharsets=c.prototype.charsets,c.prototype.preferredEncoding=c.prototype.encoding,c.prototype.preferredEncodings=c.prototype.encodings,c.prototype.preferredLanguage=c.prototype.language,c.prototype.preferredLanguages=c.prototype.languages,c.prototype.preferredMediaType=c.prototype.mediaType,c.prototype.preferredMediaTypes=c.prototype.mediaTypes}),ug=K((e,t)=>{var s=DN(),u=UN(),i=It(),a={shared:!1,ignoreCargoCult:!0},c={status:200,headers:{}},r=v(l=>{let h={method:l.method,url:l.url,headers:{},compress:l.compress};return l.headers.forEach((p,d)=>{h.headers[d]=p}),h},"requestObject"),n=v(l=>{let h={status:l.status,headers:{}};return l.headers.forEach((p,d)=>{h.headers[d]=p}),h},"responseObject"),o=class{static{v(this,"CachePolicy")}constructor({entry:l,request:h,response:p,options:d}){this.entry=l,this.request=r(h),this.response=n(p),this.options=d,this.policy=new s(this.request,this.response,a),this.entry&&(this.policy._responseTime=this.entry.metadata.time)}static storable(l,h){return!h.cachePath||h.cache==="no-store"||!["GET","HEAD"].includes(l.method)?!1:new s(r(l),c,a).storable()}satisfies(l){let h=r(l);if(this.request.headers.host!==h.headers.host||this.request.compress!==h.compress)return!1;let p=new u(this.request),d=new u(h);return JSON.stringify(p.mediaTypes())!==JSON.stringify(d.mediaTypes())||JSON.stringify(p.languages())!==JSON.stringify(d.languages())||JSON.stringify(p.encodings())!==JSON.stringify(d.encodings())?!1:this.options.integrity?i.parse(this.options.integrity).match(this.entry.integrity):!0}storable(){return this.policy.storable()}get mustRevalidate(){return!!this.policy._rescc["must-revalidate"]}needsRevalidation(l){let h=r(l);return h.method="GET",!this.policy.satisfiesWithoutRevalidation(h)}responseHeaders(){return this.policy.responseHeaders()}revalidationHeaders(l){let h=r(l);return this.policy.revalidationHeaders(h)}revalidated(l,h){let p=r(l),d=n(h);return!this.policy.revalidatedPolicy(p,d).modified}};t.exports=o}),FN=K((e,t)=>{var s=class extends Error{static{v(this,"NotCachedError")}constructor(u){super(`request to ${u} failed: cache mode is 'only-if-cached' but no cached response is available.`),this.code="ENOTCACHED"}};t.exports={NotCachedError:s}}),hg=K((e,t)=>{"use strict";var s=ls(),u=class extends s{static{v(this,"CachingMinipassPipeline")}#e=[];#t=new Map;constructor(i,...a){super(),this.#e=i.events,a.length&&this.push(...a)}on(i,a){return this.#e.includes(i)&&this.#t.has(i)?a(...this.#t.get(i)):super.on(i,a)}emit(i,...a){return this.#e.includes(i)&&this.#t.set(i,a),super.emit(i,...a)}};t.exports=u}),HN=K((e,t)=>{var{URL:s,format:u}=require("url"),i={auth:!1,fragment:!1,search:!0,unicode:!1},a=v(c=>{let r=new s(c.url);return`make-fetch-happen:request-cache:${u(r,i)}`},"cacheKey");t.exports=a}),pg=K((e,t)=>{"use strict";var{LRUCache:s}=Er(),u=require("dns"),i=new s({max:50}),a=v(({family:c=0,hints:r=u.ADDRCONFIG,all:n=!1,verbatim:o=void 0,ttl:l=300*1e3,lookup:h=u.lookup})=>({hints:r,lookup:v((p,...d)=>{let g=d.pop(),m=d[0]??{},f={family:c,hints:r,all:n,verbatim:o,...typeof m=="number"?{family:m}:m},y=JSON.stringify({hostname:p,...f});if(i.has(y)){let S=i.get(y);return process.nextTick(g,null,...S)}h(p,f,(S,...E)=>S?g(S):(i.set(y,E,{ttl:l}),g(null,...E)))},"lookup")}),"getOptions");t.exports={cache:i,getOptions:a}}),dg=K((e,t)=>{"use strict";var s=pg(),u=v(c=>{let r=parseInt(c.family??"0",10),n=c.keepAlive??!0,o={keepAliveMsecs:n?1e3:void 0,maxSockets:c.maxSockets??15,maxTotalSockets:1/0,maxFreeSockets:n?256:void 0,scheduling:"fifo",...c,family:r,keepAlive:n,timeouts:{idle:c.timeout??0,connection:0,response:0,transfer:0,...c.timeouts},...s.getOptions({family:r,...c.dns})};return delete o.timeout,o},"normalizeOptions"),i=v(c=>{let r="",n=Object.entries(c).sort((o,l)=>o[0]-l[0]);for(let[o,l]of n)l==null?l="null":l instanceof URL?l=l.toString():typeof l=="object"&&(l=i(l)),r+=`${o}:${l}:`;return r},"createKey"),a=v(({secureEndpoint:c,...r})=>i({secureEndpoint:!!c,family:r.family,hints:r.hints,localAddress:r.localAddress,strictSsl:c?!!r.rejectUnauthorized:!1,ca:c?r.ca:null,cert:c?r.cert:null,key:c?r.key:null,keepAlive:r.keepAlive,keepAliveMsecs:r.keepAliveMsecs,maxSockets:r.maxSockets,maxTotalSockets:r.maxTotalSockets,maxFreeSockets:r.maxFreeSockets,scheduling:r.scheduling,timeouts:r.timeouts,proxy:r.proxy}),"cacheOptions");t.exports={normalizeOptions:u,cacheOptions:a}}),GN=K((e,t)=>{var s=1e3,u=s*60,i=u*60,a=i*24,c=a*7,r=a*365.25;t.exports=function(p,d){d=d||{};var g=typeof p;if(g==="string"&&p.length>0)return n(p);if(g==="number"&&isFinite(p))return d.long?l(p):o(p);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))};function n(p){if(p=String(p),!(p.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(p);if(d){var g=parseFloat(d[1]),m=(d[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return g*r;case"weeks":case"week":case"w":return g*c;case"days":case"day":case"d":return g*a;case"hours":case"hour":case"hrs":case"hr":case"h":return g*i;case"minutes":case"minute":case"mins":case"min":case"m":return g*u;case"seconds":case"second":case"secs":case"sec":case"s":return g*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}v(n,"parse");function o(p){var d=Math.abs(p);return d>=a?Math.round(p/a)+"d":d>=i?Math.round(p/i)+"h":d>=u?Math.round(p/u)+"m":d>=s?Math.round(p/s)+"s":p+"ms"}v(o,"fmtShort");function l(p){var d=Math.abs(p);return d>=a?h(p,d,a,"day"):d>=i?h(p,d,i,"hour"):d>=u?h(p,d,u,"minute"):d>=s?h(p,d,s,"second"):p+" ms"}v(l,"fmtLong");function h(p,d,g,m){var f=d>=g*1.5;return Math.round(p/g)+" "+m+(f?"s":"")}v(h,"plural")}),fg=K((e,t)=>{function s(u){a.debug=a,a.default=a,a.coerce=h,a.disable=o,a.enable=r,a.enabled=l,a.humanize=GN(),a.destroy=p,Object.keys(u).forEach(d=>{a[d]=u[d]}),a.names=[],a.skips=[],a.formatters={};function i(d){let g=0;for(let m=0;m<d.length;m++)g=(g<<5)-g+d.charCodeAt(m),g|=0;return a.colors[Math.abs(g)%a.colors.length]}v(i,"selectColor"),a.selectColor=i;function a(d){let g,m=null,f,y;function S(...E){if(!S.enabled)return;let b=S,_=Number(new Date),O=_-(g||_);b.diff=O,b.prev=g,b.curr=_,g=_,E[0]=a.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let w=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(A,I)=>{if(A==="%%")return"%";w++;let P=a.formatters[I];if(typeof P=="function"){let L=E[w];A=P.call(b,L),E.splice(w,1),w--}return A}),a.formatArgs.call(b,E),(b.log||a.log).apply(b,E)}return v(S,"debug"),S.namespace=d,S.useColors=a.useColors(),S.color=a.selectColor(d),S.extend=c,S.destroy=a.destroy,Object.defineProperty(S,"enabled",{enumerable:!0,configurable:!1,get:v(()=>m!==null?m:(f!==a.namespaces&&(f=a.namespaces,y=a.enabled(d)),y),"get"),set:v(E=>{m=E},"set")}),typeof a.init=="function"&&a.init(S),S}v(a,"createDebug");function c(d,g){let m=a(this.namespace+(typeof g>"u"?":":g)+d);return m.log=this.log,m}v(c,"extend");function r(d){a.save(d),a.namespaces=d,a.names=[],a.skips=[];let g=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of g)m[0]==="-"?a.skips.push(m.slice(1)):a.names.push(m)}v(r,"enable");function n(d,g){let m=0,f=0,y=-1,S=0;for(;m<d.length;)if(f<g.length&&(g[f]===d[m]||g[f]==="*"))g[f]==="*"?(y=f,S=m,f++):(m++,f++);else if(y!==-1)f=y+1,S++,m=S;else return!1;for(;f<g.length&&g[f]==="*";)f++;return f===g.length}v(n,"matchesTemplate");function o(){let d=[...a.names,...a.skips.map(g=>"-"+g)].join(",");return a.enable(""),d}v(o,"disable");function l(d){for(let g of a.skips)if(n(d,g))return!1;for(let g of a.names)if(n(d,g))return!0;return!1}v(l,"enabled");function h(d){return d instanceof Error?d.stack||d.message:d}v(h,"coerce");function p(){}return v(p,"destroy"),a.enable(a.load()),a}v(s,"setup"),t.exports=s}),VN=K((e,t)=>{e.formatArgs=u,e.save=i,e.load=a,e.useColors=s,e.storage=c(),e.destroy=(()=>{let n=!1;return()=>{n||(n=!0)}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function s(){let n;return!1}v(s,"useColors");function u(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let o="color: "+this.color;n.splice(1,0,o,"color: inherit");let l=0,h=0;n[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(l++,p==="%c"&&(h=l))}),n.splice(h,0,o)}v(u,"formatArgs"),e.log=console.debug||console.log||(()=>{});function i(n){try{n?e.storage.setItem("debug",n):e.storage.removeItem("debug")}catch{}}v(i,"save");function a(){let n;try{n=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=void 0),n}v(a,"load");function c(){try{return}catch{}}v(c,"localstorage"),t.exports=fg()(e);var{formatters:r}=t.exports;r.j=function(n){try{return JSON.stringify(n)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}}}),WN=K((e,t)=>{"use strict";t.exports=(s,u=process.argv)=>{let i=s.startsWith("-")?"":s.length===1?"-":"--",a=u.indexOf(i+s),c=u.indexOf("--");return a!==-1&&(c===-1||a<c)}}),zN=K((e,t)=>{"use strict";var s=require("os"),u=require("tty"),i=WN(),{env:a}=process,c;i("no-color")||i("no-colors")||i("color=false")||i("color=never")?c=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(c=1),"FORCE_COLOR"in a&&(a.FORCE_COLOR==="true"?c=1:a.FORCE_COLOR==="false"?c=0:c=a.FORCE_COLOR.length===0?1:Math.min(parseInt(a.FORCE_COLOR,10),3));function r(l){return l===0?!1:{level:l,hasBasic:!0,has256:l>=2,has16m:l>=3}}v(r,"translateLevel");function n(l,h){if(c===0)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(l&&!h&&c===void 0)return 0;let p=c||0;if(a.TERM==="dumb")return p;if(process.platform==="win32"){let d=s.release().split(".");return Number(d[0])>=10&&Number(d[2])>=10586?Number(d[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(d=>d in a)||a.CI_NAME==="codeship"?1:p;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if(a.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in a){let d=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return d>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:p}v(n,"supportsColor");function o(l){let h=n(l,l&&l.isTTY);return r(h)}v(o,"getSupportLevel"),t.exports={supportsColor:o,stdout:r(n(!0,u.isatty(1))),stderr:r(n(!0,u.isatty(2)))}}),qN=K((e,t)=>{var s=require("tty"),u=require("util");e.init=l,e.log=r,e.formatArgs=a,e.save=n,e.load=o,e.useColors=i,e.destroy=u.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{let p=zN();p&&(p.stderr||p).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(p=>/^debug_/i.test(p)).reduce((p,d)=>{let g=d.substring(6).toLowerCase().replace(/_([a-z])/g,(f,y)=>y.toUpperCase()),m=process.env[d];return/^(yes|on|true|enabled)$/i.test(m)?m=!0:/^(no|off|false|disabled)$/i.test(m)?m=!1:m==="null"?m=null:m=Number(m),p[g]=m,p},{});function i(){return"colors"in e.inspectOpts?!!e.inspectOpts.colors:s.isatty(process.stderr.fd)}v(i,"useColors");function a(p){let{namespace:d,useColors:g}=this;if(g){let m=this.color,f="\x1B[3"+(m<8?m:"8;5;"+m),y=` ${f};1m${d} \x1B[0m`;p[0]=y+p[0].split(`
|
|
60
|
+
`).join(`
|
|
61
|
+
`+y),p.push(f+"m+"+t.exports.humanize(this.diff)+"\x1B[0m")}else p[0]=c()+d+" "+p[0]}v(a,"formatArgs");function c(){return e.inspectOpts.hideDate?"":new Date().toISOString()+" "}v(c,"getDate");function r(...p){return process.stderr.write(u.formatWithOptions(e.inspectOpts,...p)+`
|
|
62
|
+
`)}v(r,"log");function n(p){p?process.env.DEBUG=p:delete void 0}v(n,"save");function o(){}v(o,"load");function l(p){p.inspectOpts={};let d=Object.keys(e.inspectOpts);for(let g=0;g<d.length;g++)p.inspectOpts[d[g]]=e.inspectOpts[d[g]]}v(l,"init"),t.exports=fg()(e);var{formatters:h}=t.exports;h.o=function(p){return this.inspectOpts.colors=this.useColors,u.inspect(p,this.inspectOpts).split(`
|
|
63
|
+
`).map(d=>d.trim()).join(" ")},h.O=function(p){return this.inspectOpts.colors=this.useColors,u.inspect(p,this.inspectOpts)}}),wr=K((e,t)=>{typeof process>"u"||process.type==="renderer"||process.__nwjs?t.exports=VN():t.exports=qN()}),KN=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(o,l,h,p){p===void 0&&(p=h);var d=Object.getOwnPropertyDescriptor(l,h);(!d||("get"in d?!l.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:v(function(){return l[h]},"get")}),Object.defineProperty(o,p,d)}:function(o,l,h,p){p===void 0&&(p=h),o[p]=l[h]}),s=e&&e.__setModuleDefault||(Object.create?function(o,l){Object.defineProperty(o,"default",{enumerable:!0,value:l})}:function(o,l){o.default=l}),u=e&&e.__importStar||function(o){if(o&&o.__esModule)return o;var l={};if(o!=null)for(var h in o)h!=="default"&&Object.prototype.hasOwnProperty.call(o,h)&&t(l,o,h);return s(l,o),l};Object.defineProperty(e,"__esModule",{value:!0}),e.req=e.json=e.toBuffer=void 0;var i=u(require("http")),a=u(require("https"));async function c(o){let l=0,h=[];for await(let p of o)l+=p.length,h.push(p);return Buffer.concat(h,l)}v(c,"toBuffer"),e.toBuffer=c;async function r(o){let l=(await c(o)).toString("utf8");try{return JSON.parse(l)}catch(h){let p=h;throw p.message+=` (input: ${l})`,p}}v(r,"json"),e.json=r;function n(o,l={}){let h=((typeof o=="string"?o:o.href).startsWith("https:")?a:i).request(o,l),p=new Promise((d,g)=>{h.once("response",d).once("error",g).end()});return h.then=p.then.bind(p),h}v(n,"req"),e.req=n}),Vi=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(l,h,p,d){d===void 0&&(d=p);var g=Object.getOwnPropertyDescriptor(h,p);(!g||("get"in g?!h.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:v(function(){return h[p]},"get")}),Object.defineProperty(l,d,g)}:function(l,h,p,d){d===void 0&&(d=p),l[d]=h[p]}),s=e&&e.__setModuleDefault||(Object.create?function(l,h){Object.defineProperty(l,"default",{enumerable:!0,value:h})}:function(l,h){l.default=h}),u=e&&e.__importStar||function(l){if(l&&l.__esModule)return l;var h={};if(l!=null)for(var p in l)p!=="default"&&Object.prototype.hasOwnProperty.call(l,p)&&t(h,l,p);return s(h,l),h},i=e&&e.__exportStar||function(l,h){for(var p in l)p!=="default"&&!Object.prototype.hasOwnProperty.call(h,p)&&t(h,l,p)};Object.defineProperty(e,"__esModule",{value:!0}),e.Agent=void 0;var a=u(require("net")),c=u(require("http")),r=require("https");i(KN(),e);var n=Symbol("AgentBaseInternalState"),o=class extends c.Agent{static{v(this,"Agent")}constructor(l){super(l),this[n]={}}isSecureEndpoint(l){if(l){if(typeof l.secureEndpoint=="boolean")return l.secureEndpoint;if(typeof l.protocol=="string")return l.protocol==="https:"}let{stack:h}=new Error;return typeof h!="string"?!1:h.split(`
|
|
64
|
+
`).some(p=>p.indexOf("(https.js:")!==-1||p.indexOf("node:https:")!==-1)}incrementSockets(l){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[l]||(this.sockets[l]=[]);let h=new a.Socket({writable:!1});return this.sockets[l].push(h),this.totalSocketCount++,h}decrementSockets(l,h){if(!this.sockets[l]||h===null)return;let p=this.sockets[l],d=p.indexOf(h);d!==-1&&(p.splice(d,1),this.totalSocketCount--,p.length===0&&delete this.sockets[l])}getName(l){return this.isSecureEndpoint(l)?r.Agent.prototype.getName.call(this,l):super.getName(l)}createSocket(l,h,p){let d={...h,secureEndpoint:this.isSecureEndpoint(h)},g=this.getName(d),m=this.incrementSockets(g);Promise.resolve().then(()=>this.connect(l,d)).then(f=>{if(this.decrementSockets(g,m),f instanceof c.Agent)try{return f.addRequest(l,d)}catch(y){return p(y)}this[n].currentSocket=f,super.createSocket(l,h,p)},f=>{this.decrementSockets(g,m),p(f)})}createConnection(){let l=this[n].currentSocket;if(this[n].currentSocket=void 0,!l)throw new Error("No socket was returned in the `connect()` function");return l}get defaultPort(){return this[n].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(l){this[n]&&(this[n].defaultPort=l)}get protocol(){return this[n].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(l){this[n]&&(this[n].protocol=l)}};e.Agent=o}),JN=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(g,m,f,y){y===void 0&&(y=f);var S=Object.getOwnPropertyDescriptor(m,f);(!S||("get"in S?!m.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:v(function(){return m[f]},"get")}),Object.defineProperty(g,y,S)}:function(g,m,f,y){y===void 0&&(y=f),g[y]=m[f]}),s=e&&e.__setModuleDefault||(Object.create?function(g,m){Object.defineProperty(g,"default",{enumerable:!0,value:m})}:function(g,m){g.default=m}),u=e&&e.__importStar||function(g){if(g&&g.__esModule)return g;var m={};if(g!=null)for(var f in g)f!=="default"&&Object.prototype.hasOwnProperty.call(g,f)&&t(m,g,f);return s(m,g),m},i=e&&e.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.HttpProxyAgent=void 0;var a=u(require("net")),c=u(require("tls")),r=i(wr()),n=require("events"),o=Vi(),l=require("url"),h=(0,r.default)("http-proxy-agent"),p=class extends o.Agent{static{v(this,"HttpProxyAgent")}constructor(g,m){super(m),this.proxy=typeof g=="string"?new l.URL(g):g,this.proxyHeaders=m?.headers??{},h("Creating new HttpProxyAgent instance: %o",this.proxy.href);let f=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),y=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...m?d(m,"headers"):null,host:f,port:y}}addRequest(g,m){g._header=null,this.setRequestProps(g,m),super.addRequest(g,m)}setRequestProps(g,m){let{proxy:f}=this,y=m.secureEndpoint?"https:":"http:",S=g.getHeader("host")||"localhost",E=`${y}//${S}`,b=new l.URL(g.path,E);m.port!==80&&(b.port=String(m.port)),g.path=String(b);let _=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(f.username||f.password){let O=`${decodeURIComponent(f.username)}:${decodeURIComponent(f.password)}`;_["Proxy-Authorization"]=`Basic ${Buffer.from(O).toString("base64")}`}_["Proxy-Connection"]||(_["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let O of Object.keys(_)){let w=_[O];w&&g.setHeader(O,w)}}async connect(g,m){g._header=null,g.path.includes("://")||this.setRequestProps(g,m);let f,y;h("Regenerating stored HTTP header string for request"),g._implicitHeader(),g.outputData&&g.outputData.length>0&&(h("Patching connection write() output buffer with updated header"),f=g.outputData[0].data,y=f.indexOf(`\r
|
|
65
|
+
\r
|
|
66
|
+
`)+4,g.outputData[0].data=g._header+f.substring(y),h("Output buffer: %o",g.outputData[0].data));let S;return this.proxy.protocol==="https:"?(h("Creating `tls.Socket`: %o",this.connectOpts),S=c.connect(this.connectOpts)):(h("Creating `net.Socket`: %o",this.connectOpts),S=a.connect(this.connectOpts)),await(0,n.once)(S,"connect"),S}};p.protocols=["http","https"],e.HttpProxyAgent=p;function d(g,...m){let f={},y;for(y in g)m.includes(y)||(f[y]=g[y]);return f}v(d,"omit")}),ZN=K(e=>{"use strict";var t=e&&e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseProxyResponse=void 0;var s=t(wr()),u=(0,s.default)("https-proxy-agent:parse-proxy-response");function i(a){return new Promise((c,r)=>{let n=0,o=[];function l(){let m=a.read();m?g(m):a.once("readable",l)}v(l,"read");function h(){a.removeListener("end",p),a.removeListener("error",d),a.removeListener("readable",l)}v(h,"cleanup");function p(){h(),u("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}v(p,"onend");function d(m){h(),u("onerror %o",m),r(m)}v(d,"onerror");function g(m){o.push(m),n+=m.length;let f=Buffer.concat(o,n),y=f.indexOf(`\r
|
|
67
|
+
\r
|
|
68
|
+
`);if(y===-1){u("have not received end of HTTP headers yet..."),l();return}let S=f.slice(0,y).toString("ascii").split(`\r
|
|
69
|
+
`),E=S.shift();if(!E)return a.destroy(),r(new Error("No header received from proxy CONNECT response"));let b=E.split(" "),_=+b[1],O=b.slice(2).join(" "),w={};for(let A of S){if(!A)continue;let I=A.indexOf(":");if(I===-1)return a.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${A}"`));let P=A.slice(0,I).toLowerCase(),L=A.slice(I+1).trimStart(),$=w[P];typeof $=="string"?w[P]=[$,L]:Array.isArray($)?$.push(L):w[P]=L}u("got proxy server response: %o %o",E,w),h(),c({connect:{statusCode:_,statusText:O,headers:w},buffered:f})}v(g,"ondata"),a.on("error",d),a.on("end",p),l()})}v(i,"parseProxyResponse"),e.parseProxyResponse=i}),XN=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(y,S,E,b){b===void 0&&(b=E);var _=Object.getOwnPropertyDescriptor(S,E);(!_||("get"in _?!S.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:v(function(){return S[E]},"get")}),Object.defineProperty(y,b,_)}:function(y,S,E,b){b===void 0&&(b=E),y[b]=S[E]}),s=e&&e.__setModuleDefault||(Object.create?function(y,S){Object.defineProperty(y,"default",{enumerable:!0,value:S})}:function(y,S){y.default=S}),u=e&&e.__importStar||function(y){if(y&&y.__esModule)return y;var S={};if(y!=null)for(var E in y)E!=="default"&&Object.prototype.hasOwnProperty.call(y,E)&&t(S,y,E);return s(S,y),S},i=e&&e.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.HttpsProxyAgent=void 0;var a=u(require("net")),c=u(require("tls")),r=i(require("assert")),n=i(wr()),o=Vi(),l=require("url"),h=ZN(),p=(0,n.default)("https-proxy-agent"),d=v(y=>y.servername===void 0&&y.host&&!a.isIP(y.host)?{...y,servername:y.host}:y,"setServernameFromNonIpHost"),g=class extends o.Agent{static{v(this,"HttpsProxyAgent")}constructor(y,S){super(S),this.options={path:void 0},this.proxy=typeof y=="string"?new l.URL(y):y,this.proxyHeaders=S?.headers??{},p("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let E=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),b=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...S?f(S,"headers"):null,host:E,port:b}}async connect(y,S){let{proxy:E}=this;if(!S.host)throw new TypeError('No "host" provided');let b;E.protocol==="https:"?(p("Creating `tls.Socket`: %o",this.connectOpts),b=c.connect(d(this.connectOpts))):(p("Creating `net.Socket`: %o",this.connectOpts),b=a.connect(this.connectOpts));let _=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},O=a.isIPv6(S.host)?`[${S.host}]`:S.host,w=`CONNECT ${O}:${S.port} HTTP/1.1\r
|
|
70
|
+
`;if(E.username||E.password){let $=`${decodeURIComponent(E.username)}:${decodeURIComponent(E.password)}`;_["Proxy-Authorization"]=`Basic ${Buffer.from($).toString("base64")}`}_.Host=`${O}:${S.port}`,_["Proxy-Connection"]||(_["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let $ of Object.keys(_))w+=`${$}: ${_[$]}\r
|
|
71
|
+
`;let A=(0,h.parseProxyResponse)(b);b.write(`${w}\r
|
|
72
|
+
`);let{connect:I,buffered:P}=await A;if(y.emit("proxyConnect",I),this.emit("proxyConnect",I,y),I.statusCode===200)return y.once("socket",m),S.secureEndpoint?(p("Upgrading socket connection to TLS"),c.connect({...f(d(S),"host","path","port"),socket:b})):b;b.destroy();let L=new a.Socket({writable:!1});return L.readable=!0,y.once("socket",$=>{p("Replaying proxy buffer for failed request"),(0,r.default)($.listenerCount("data")>0),$.push(P),$.push(null)}),L}};g.protocols=["http","https"],e.HttpsProxyAgent=g;function m(y){y.resume()}v(m,"resume");function f(y,...S){let E={},b;for(b in y)S.includes(b)||(E[b]=y[b]);return E}v(f,"omit")}),YN=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("buffer"),s={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};e.ERRORS=s;function u(h){if(!t.Buffer.isEncoding(h))throw new Error(s.INVALID_ENCODING)}v(u,"checkEncoding"),e.checkEncoding=u;function i(h){return typeof h=="number"&&isFinite(h)&&o(h)}v(i,"isFiniteInteger"),e.isFiniteInteger=i;function a(h,p){if(typeof h=="number"){if(!i(h)||h<0)throw new Error(p?s.INVALID_OFFSET:s.INVALID_LENGTH)}else throw new Error(p?s.INVALID_OFFSET_NON_NUMBER:s.INVALID_LENGTH_NON_NUMBER)}v(a,"checkOffsetOrLengthValue");function c(h){a(h,!1)}v(c,"checkLengthValue"),e.checkLengthValue=c;function r(h){a(h,!0)}v(r,"checkOffsetValue"),e.checkOffsetValue=r;function n(h,p){if(h<0||h>p.length)throw new Error(s.INVALID_TARGET_OFFSET)}v(n,"checkTargetOffset"),e.checkTargetOffset=n;function o(h){return typeof h=="number"&&isFinite(h)&&Math.floor(h)===h}v(o,"isInteger");function l(h){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof t.Buffer.prototype[h]>"u")throw new Error(`Platform does not support Buffer.prototype.${h}.`)}v(l,"bigIntAndBufferInt64Check"),e.bigIntAndBufferInt64Check=l}),QN=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=YN(),s=4096,u="utf8",i=class gg{static{v(this,"SmartBuffer")}constructor(c){if(this.length=0,this._encoding=u,this._writeOffset=0,this._readOffset=0,gg.isSmartBufferOptions(c))if(c.encoding&&(t.checkEncoding(c.encoding),this._encoding=c.encoding),c.size)if(t.isFiniteInteger(c.size)&&c.size>0)this._buff=Buffer.allocUnsafe(c.size);else throw new Error(t.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(c.buff)if(Buffer.isBuffer(c.buff))this._buff=c.buff,this.length=c.buff.length;else throw new Error(t.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(s);else{if(typeof c<"u")throw new Error(t.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(s)}}static fromSize(c,r){return new this({size:c,encoding:r})}static fromBuffer(c,r){return new this({buff:c,encoding:r})}static fromOptions(c){return new this(c)}static isSmartBufferOptions(c){let r=c;return r&&(r.encoding!==void 0||r.size!==void 0||r.buff!==void 0)}readInt8(c){return this._readNumberValue(Buffer.prototype.readInt8,1,c)}readInt16BE(c){return this._readNumberValue(Buffer.prototype.readInt16BE,2,c)}readInt16LE(c){return this._readNumberValue(Buffer.prototype.readInt16LE,2,c)}readInt32BE(c){return this._readNumberValue(Buffer.prototype.readInt32BE,4,c)}readInt32LE(c){return this._readNumberValue(Buffer.prototype.readInt32LE,4,c)}readBigInt64BE(c){return t.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,c)}readBigInt64LE(c){return t.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,c)}writeInt8(c,r){return this._writeNumberValue(Buffer.prototype.writeInt8,1,c,r),this}insertInt8(c,r){return this._insertNumberValue(Buffer.prototype.writeInt8,1,c,r)}writeInt16BE(c,r){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,c,r)}insertInt16BE(c,r){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,c,r)}writeInt16LE(c,r){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,c,r)}insertInt16LE(c,r){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,c,r)}writeInt32BE(c,r){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,c,r)}insertInt32BE(c,r){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,c,r)}writeInt32LE(c,r){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,c,r)}insertInt32LE(c,r){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,c,r)}writeBigInt64BE(c,r){return t.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,c,r)}insertBigInt64BE(c,r){return t.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,c,r)}writeBigInt64LE(c,r){return t.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,c,r)}insertBigInt64LE(c,r){return t.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,c,r)}readUInt8(c){return this._readNumberValue(Buffer.prototype.readUInt8,1,c)}readUInt16BE(c){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,c)}readUInt16LE(c){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,c)}readUInt32BE(c){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,c)}readUInt32LE(c){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,c)}readBigUInt64BE(c){return t.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,c)}readBigUInt64LE(c){return t.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,c)}writeUInt8(c,r){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,c,r)}insertUInt8(c,r){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,c,r)}writeUInt16BE(c,r){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,c,r)}insertUInt16BE(c,r){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,c,r)}writeUInt16LE(c,r){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,c,r)}insertUInt16LE(c,r){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,c,r)}writeUInt32BE(c,r){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,c,r)}insertUInt32BE(c,r){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,c,r)}writeUInt32LE(c,r){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,c,r)}insertUInt32LE(c,r){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,c,r)}writeBigUInt64BE(c,r){return t.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,c,r)}insertBigUInt64BE(c,r){return t.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,c,r)}writeBigUInt64LE(c,r){return t.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,c,r)}insertBigUInt64LE(c,r){return t.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,c,r)}readFloatBE(c){return this._readNumberValue(Buffer.prototype.readFloatBE,4,c)}readFloatLE(c){return this._readNumberValue(Buffer.prototype.readFloatLE,4,c)}writeFloatBE(c,r){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,c,r)}insertFloatBE(c,r){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,c,r)}writeFloatLE(c,r){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,c,r)}insertFloatLE(c,r){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,c,r)}readDoubleBE(c){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,c)}readDoubleLE(c){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,c)}writeDoubleBE(c,r){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,c,r)}insertDoubleBE(c,r){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,c,r)}writeDoubleLE(c,r){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,c,r)}insertDoubleLE(c,r){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,c,r)}readString(c,r){let n;typeof c=="number"?(t.checkLengthValue(c),n=Math.min(c,this.length-this._readOffset)):(r=c,n=this.length-this._readOffset),typeof r<"u"&&t.checkEncoding(r);let o=this._buff.slice(this._readOffset,this._readOffset+n).toString(r||this._encoding);return this._readOffset+=n,o}insertString(c,r,n){return t.checkOffsetValue(r),this._handleString(c,!0,r,n)}writeString(c,r,n){return this._handleString(c,!1,r,n)}readStringNT(c){typeof c<"u"&&t.checkEncoding(c);let r=this.length;for(let o=this._readOffset;o<this.length;o++)if(this._buff[o]===0){r=o;break}let n=this._buff.slice(this._readOffset,r);return this._readOffset=r+1,n.toString(c||this._encoding)}insertStringNT(c,r,n){return t.checkOffsetValue(r),this.insertString(c,r,n),this.insertUInt8(0,r+c.length),this}writeStringNT(c,r,n){return this.writeString(c,r,n),this.writeUInt8(0,typeof r=="number"?r+c.length:this.writeOffset),this}readBuffer(c){typeof c<"u"&&t.checkLengthValue(c);let r=typeof c=="number"?c:this.length,n=Math.min(this.length,this._readOffset+r),o=this._buff.slice(this._readOffset,n);return this._readOffset=n,o}insertBuffer(c,r){return t.checkOffsetValue(r),this._handleBuffer(c,!0,r)}writeBuffer(c,r){return this._handleBuffer(c,!1,r)}readBufferNT(){let c=this.length;for(let n=this._readOffset;n<this.length;n++)if(this._buff[n]===0){c=n;break}let r=this._buff.slice(this._readOffset,c);return this._readOffset=c+1,r}insertBufferNT(c,r){return t.checkOffsetValue(r),this.insertBuffer(c,r),this.insertUInt8(0,r+c.length),this}writeBufferNT(c,r){return typeof r<"u"&&t.checkOffsetValue(r),this.writeBuffer(c,r),this.writeUInt8(0,typeof r=="number"?r+c.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(c){t.checkOffsetValue(c),t.checkTargetOffset(c,this),this._readOffset=c}get writeOffset(){return this._writeOffset}set writeOffset(c){t.checkOffsetValue(c),t.checkTargetOffset(c,this),this._writeOffset=c}get encoding(){return this._encoding}set encoding(c){t.checkEncoding(c),this._encoding=c}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(c){let r=typeof c=="string"?c:this._encoding;return t.checkEncoding(r),this._buff.toString(r,0,this.length)}destroy(){return this.clear(),this}_handleString(c,r,n,o){let l=this._writeOffset,h=this._encoding;typeof n=="number"?l=n:typeof n=="string"&&(t.checkEncoding(n),h=n),typeof o=="string"&&(t.checkEncoding(o),h=o);let p=Buffer.byteLength(c,h);return r?this.ensureInsertable(p,l):this._ensureWriteable(p,l),this._buff.write(c,l,p,h),r?this._writeOffset+=p:typeof n=="number"?this._writeOffset=Math.max(this._writeOffset,l+p):this._writeOffset+=p,this}_handleBuffer(c,r,n){let o=typeof n=="number"?n:this._writeOffset;return r?this.ensureInsertable(c.length,o):this._ensureWriteable(c.length,o),c.copy(this._buff,o),r?this._writeOffset+=c.length:typeof n=="number"?this._writeOffset=Math.max(this._writeOffset,o+c.length):this._writeOffset+=c.length,this}ensureReadable(c,r){let n=this._readOffset;if(typeof r<"u"&&(t.checkOffsetValue(r),n=r),n<0||n+c>this.length)throw new Error(t.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(c,r){t.checkOffsetValue(r),this._ensureCapacity(this.length+c),r<this.length&&this._buff.copy(this._buff,r+c,r,this._buff.length),r+c>this.length?this.length=r+c:this.length+=c}_ensureWriteable(c,r){let n=typeof r=="number"?r:this._writeOffset;this._ensureCapacity(n+c),n+c>this.length&&(this.length=n+c)}_ensureCapacity(c){let r=this._buff.length;if(c>r){let n=this._buff,o=r*3/2+1;o<c&&(o=c),this._buff=Buffer.allocUnsafe(o),n.copy(this._buff,0,0,r)}}_readNumberValue(c,r,n){this.ensureReadable(r,n);let o=c.call(this._buff,typeof n=="number"?n:this._readOffset);return typeof n>"u"&&(this._readOffset+=r),o}_insertNumberValue(c,r,n,o){return t.checkOffsetValue(o),this.ensureInsertable(r,o),c.call(this._buff,n,o),this._writeOffset+=r,this}_writeNumberValue(c,r,n,o){if(typeof o=="number"){if(o<0)throw new Error(t.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);t.checkOffsetValue(o)}let l=typeof o=="number"?o:this._writeOffset;return this._ensureWriteable(r,l),c.call(this._buff,n,l),typeof o=="number"?this._writeOffset=Math.max(this._writeOffset,l+r):this._writeOffset+=r,this}};e.SmartBuffer=i}),mg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SOCKS5_NO_ACCEPTABLE_AUTH=e.SOCKS5_CUSTOM_AUTH_END=e.SOCKS5_CUSTOM_AUTH_START=e.SOCKS_INCOMING_PACKET_SIZES=e.SocksClientState=e.Socks5Response=e.Socks5HostType=e.Socks5Auth=e.Socks4Response=e.SocksCommand=e.ERRORS=e.DEFAULT_TIMEOUT=void 0;var t=3e4;e.DEFAULT_TIMEOUT=t;var s={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};e.ERRORS=s;var u={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:v(d=>d+7,"Socks5ResponseHostname"),Socks4Response:8};e.SOCKS_INCOMING_PACKET_SIZES=u;var i;(function(d){d[d.connect=1]="connect",d[d.bind=2]="bind",d[d.associate=3]="associate"})(i||(e.SocksCommand=i={}));var a;(function(d){d[d.Granted=90]="Granted",d[d.Failed=91]="Failed",d[d.Rejected=92]="Rejected",d[d.RejectedIdent=93]="RejectedIdent"})(a||(e.Socks4Response=a={}));var c;(function(d){d[d.NoAuth=0]="NoAuth",d[d.GSSApi=1]="GSSApi",d[d.UserPass=2]="UserPass"})(c||(e.Socks5Auth=c={}));var r=128;e.SOCKS5_CUSTOM_AUTH_START=r;var n=254;e.SOCKS5_CUSTOM_AUTH_END=n;var o=255;e.SOCKS5_NO_ACCEPTABLE_AUTH=o;var l;(function(d){d[d.Granted=0]="Granted",d[d.Failure=1]="Failure",d[d.NotAllowed=2]="NotAllowed",d[d.NetworkUnreachable=3]="NetworkUnreachable",d[d.HostUnreachable=4]="HostUnreachable",d[d.ConnectionRefused=5]="ConnectionRefused",d[d.TTLExpired=6]="TTLExpired",d[d.CommandNotSupported=7]="CommandNotSupported",d[d.AddressNotSupported=8]="AddressNotSupported"})(l||(e.Socks5Response=l={}));var h;(function(d){d[d.IPv4=1]="IPv4",d[d.Hostname=3]="Hostname",d[d.IPv6=4]="IPv6"})(h||(e.Socks5HostType=h={}));var p;(function(d){d[d.Created=0]="Created",d[d.Connecting=1]="Connecting",d[d.Connected=2]="Connected",d[d.SentInitialHandshake=3]="SentInitialHandshake",d[d.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",d[d.SentAuthentication=5]="SentAuthentication",d[d.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",d[d.SentFinalHandshake=7]="SentFinalHandshake",d[d.ReceivedFinalResponse=8]="ReceivedFinalResponse",d[d.BoundWaitingForConnection=9]="BoundWaitingForConnection",d[d.Established=10]="Established",d[d.Disconnected=11]="Disconnected",d[d.Error=99]="Error"})(p||(e.SocksClientState=p={}))}),yg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shuffleArray=e.SocksClientError=void 0;var t=class extends Error{static{v(this,"SocksClientError")}constructor(u,i){super(u),this.options=i}};e.SocksClientError=t;function s(u){for(let i=u.length-1;i>0;i--){let a=Math.floor(Math.random()*(i+1));[u[i],u[a]]=[u[a],u[i]]}}v(s,"shuffleArray"),e.shuffleArray=s}),tl=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isInSubnet=t,e.isCorrect=s,e.numberToPaddedHex=u,e.stringToPaddedHex=i,e.testBit=a;function t(c){return this.subnetMask<c.subnetMask?!1:this.mask(c.subnetMask)===c.mask()}v(t,"isInSubnet");function s(c){return function(){return this.addressMinusSuffix!==this.correctForm()?!1:this.subnetMask===c&&!this.parsedSubnet?!0:this.parsedSubnet===String(this.subnetMask)}}v(s,"isCorrect");function u(c){return c.toString(16).padStart(2,"0")}v(u,"numberToPaddedHex");function i(c){return u(parseInt(c,10))}v(i,"stringToPaddedHex");function a(c,r){let{length:n}=c;if(r>n)return!1;let o=n-r;return c.substring(o,o+1)==="1"}v(a,"testBit")}),vg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RE_SUBNET_STRING=e.RE_ADDRESS=e.GROUPS=e.BITS=void 0,e.BITS=32,e.GROUPS=4,e.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g,e.RE_SUBNET_STRING=/\/\d{1,2}$/}),Hl=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AddressError=void 0;var t=class extends Error{static{v(this,"AddressError")}constructor(s,u){super(s),this.name="AddressError",this.parseMessage=u}};e.AddressError=t}),Sg=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(n,o,l,h){h===void 0&&(h=l);var p=Object.getOwnPropertyDescriptor(o,l);(!p||("get"in p?!o.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:v(function(){return o[l]},"get")}),Object.defineProperty(n,h,p)}:function(n,o,l,h){h===void 0&&(h=l),n[h]=o[l]}),s=e&&e.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),u=e&&e.__importStar||function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var l in n)l!=="default"&&Object.prototype.hasOwnProperty.call(n,l)&&t(o,n,l);return s(o,n),o};Object.defineProperty(e,"__esModule",{value:!0}),e.Address4=void 0;var i=u(tl()),a=u(vg()),c=Hl(),r=class dt{static{v(this,"Address4")}constructor(o){this.groups=a.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=i.isCorrect(a.BITS),this.isInSubnet=i.isInSubnet,this.address=o;let l=a.RE_SUBNET_STRING.exec(o);if(l){if(this.parsedSubnet=l[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>a.BITS)throw new c.AddressError("Invalid subnet mask.");o=o.replace(a.RE_SUBNET_STRING,"")}this.addressMinusSuffix=o,this.parsedAddress=this.parse(o)}static isValid(o){try{return new dt(o),!0}catch{return!1}}parse(o){let l=o.split(".");if(!o.match(a.RE_ADDRESS))throw new c.AddressError("Invalid IPv4 address.");return l}correctForm(){return this.parsedAddress.map(o=>parseInt(o,10)).join(".")}static fromHex(o){let l=o.replace(/:/g,"").padStart(8,"0"),h=[],p;for(p=0;p<8;p+=2){let d=l.slice(p,p+2);h.push(parseInt(d,16))}return new dt(h.join("."))}static fromInteger(o){return dt.fromHex(o.toString(16))}static fromArpa(o){let l=o.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new dt(l)}toHex(){return this.parsedAddress.map(o=>i.stringToPaddedHex(o)).join(":")}toArray(){return this.parsedAddress.map(o=>parseInt(o,10))}toGroup6(){let o=[],l;for(l=0;l<a.GROUPS;l+=2)o.push(`${i.stringToPaddedHex(this.parsedAddress[l])}${i.stringToPaddedHex(this.parsedAddress[l+1])}`);return o.join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(o=>i.stringToPaddedHex(o)).join("")}`)}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat(a.BITS-this.subnetMask)}`)}startAddress(){return dt.fromBigInt(this._startAddress())}startAddressExclusive(){let o=BigInt("1");return dt.fromBigInt(this._startAddress()+o)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat(a.BITS-this.subnetMask)}`)}endAddress(){return dt.fromBigInt(this._endAddress())}endAddressExclusive(){let o=BigInt("1");return dt.fromBigInt(this._endAddress()-o)}static fromBigInt(o){return dt.fromHex(o.toString(16))}mask(o){return o===void 0&&(o=this.subnetMask),this.getBitsBase2(0,o)}getBitsBase2(o,l){return this.binaryZeroPad().slice(o,l)}reverseForm(o){o||(o={});let l=this.correctForm().split(".").reverse().join(".");return o.omitSuffix?l:`${l}.in-addr.arpa.`}isMulticast(){return this.isInSubnet(new dt("224.0.0.0/4"))}binaryZeroPad(){return this.bigInt().toString(2).padStart(a.BITS,"0")}groupForV6(){let o=this.parsedAddress;return this.address.replace(a.RE_ADDRESS,`<span class="hover-group group-v4 group-6">${o.slice(0,2).join(".")}</span>.<span class="hover-group group-v4 group-7">${o.slice(2,4).join(".")}</span>`)}};e.Address4=r}),Eg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RE_URL_WITH_PORT=e.RE_URL=e.RE_ZONE_STRING=e.RE_SUBNET_STRING=e.RE_BAD_ADDRESS=e.RE_BAD_CHARACTERS=e.TYPES=e.SCOPES=e.GROUPS=e.BITS=void 0,e.BITS=128,e.GROUPS=8,e.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"},e.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"},e.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi,e.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi,e.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/,e.RE_ZONE_STRING=/%.*$/,e.RE_URL=/^\[{0,1}([0-9a-f:]+)\]{0,1}/,e.RE_URL_WITH_PORT=/\[([0-9a-f:]+)\]:([0-9]{1,5})/}),bg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.spanAllZeroes=t,e.spanAll=s,e.spanLeadingZeroes=i,e.simpleGroup=a;function t(c){return c.replace(/(0+)/g,'<span class="zero">$1</span>')}v(t,"spanAllZeroes");function s(c,r=0){return c.split("").map((n,o)=>`<span class="digit value-${n} position-${o+r}">${t(n)}</span>`).join("")}v(s,"spanAll");function u(c){return c.replace(/^(0+)/,'<span class="zero">$1</span>')}v(u,"spanLeadingZeroesSimple");function i(c){return c.split(":").map(r=>u(r)).join(":")}v(i,"spanLeadingZeroes");function a(c,r=0){return c.split(":").map((n,o)=>/group-v4/.test(n)?n:`<span class="hover-group group-${o+r}">${u(n)}</span>`)}v(a,"simpleGroup")}),ek=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(o,l,h,p){p===void 0&&(p=h);var d=Object.getOwnPropertyDescriptor(l,h);(!d||("get"in d?!l.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:v(function(){return l[h]},"get")}),Object.defineProperty(o,p,d)}:function(o,l,h,p){p===void 0&&(p=h),o[p]=l[h]}),s=e&&e.__setModuleDefault||(Object.create?function(o,l){Object.defineProperty(o,"default",{enumerable:!0,value:l})}:function(o,l){o.default=l}),u=e&&e.__importStar||function(o){if(o&&o.__esModule)return o;var l={};if(o!=null)for(var h in o)h!=="default"&&Object.prototype.hasOwnProperty.call(o,h)&&t(l,o,h);return s(l,o),l};Object.defineProperty(e,"__esModule",{value:!0}),e.ADDRESS_BOUNDARY=void 0,e.groupPossibilities=a,e.padGroup=c,e.simpleRegularExpression=r,e.possibleElisions=n;var i=u(Eg());function a(o){return`(${o.join("|")})`}v(a,"groupPossibilities");function c(o){return o.length<4?`0{0,${4-o.length}}${o}`:o}v(c,"padGroup"),e.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function r(o){let l=[];o.forEach((p,d)=>{parseInt(p,16)===0&&l.push(d)});let h=l.map(p=>o.map((d,g)=>{if(g===p){let m=g===0||g===i.GROUPS-1?":":"";return a([c(d),m])}return c(d)}).join(":"));return h.push(o.map(c).join(":")),a(h)}v(r,"simpleRegularExpression");function n(o,l,h){let p=l?"":":",d=h?"":":",g=[];!l&&!h&&g.push("::"),l&&h&&g.push(""),(h&&!l||!h&&l)&&g.push(":"),g.push(`${p}(:0{1,4}){1,${o-1}}`),g.push(`(0{1,4}:){1,${o-1}}${d}`),g.push(`(0{1,4}:){${o-1}}0{1,4}`);for(let m=1;m<o-1;m++)for(let f=1;f<o-m;f++)g.push(`(0{1,4}:){${f}}:(0{1,4}:){${o-f-m-1}}0{1,4}`);return a(g)}v(n,"possibleElisions")}),tk=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(E,b,_,O){O===void 0&&(O=_);var w=Object.getOwnPropertyDescriptor(b,_);(!w||("get"in w?!b.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:v(function(){return b[_]},"get")}),Object.defineProperty(E,O,w)}:function(E,b,_,O){O===void 0&&(O=_),E[O]=b[_]}),s=e&&e.__setModuleDefault||(Object.create?function(E,b){Object.defineProperty(E,"default",{enumerable:!0,value:b})}:function(E,b){E.default=b}),u=e&&e.__importStar||function(E){if(E&&E.__esModule)return E;var b={};if(E!=null)for(var _ in E)_!=="default"&&Object.prototype.hasOwnProperty.call(E,_)&&t(b,E,_);return s(b,E),b};Object.defineProperty(e,"__esModule",{value:!0}),e.Address6=void 0;var i=u(tl()),a=u(vg()),c=u(Eg()),r=u(bg()),n=Sg(),o=ek(),l=Hl(),h=tl();function p(E){if(!E)throw new Error("Assertion failed.")}v(p,"assert");function d(E){let b=/(\d+)(\d{3})/;for(;b.test(E);)E=E.replace(b,"$1,$2");return E}v(d,"addCommas");function g(E){return E=E.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),E=E.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),E}v(g,"spanLeadingZeroes4");function m(E,b){let _=[],O=[],w;for(w=0;w<E.length;w++)w<b[0]?_.push(E[w]):w>b[1]&&O.push(E[w]);return _.concat(["compact"]).concat(O)}v(m,"compact");function f(E){return parseInt(E,16).toString(16).padStart(4,"0")}v(f,"paddedHex");function y(E){return E&255}v(y,"unsignByte");var S=class je{static{v(this,"Address6")}constructor(b,_){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=i.isInSubnet,this.isCorrect=i.isCorrect(c.BITS),_===void 0?this.groups=c.GROUPS:this.groups=_,this.address=b;let O=c.RE_SUBNET_STRING.exec(b);if(O){if(this.parsedSubnet=O[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>c.BITS)throw new l.AddressError("Invalid subnet mask.");b=b.replace(c.RE_SUBNET_STRING,"")}else if(/\//.test(b))throw new l.AddressError("Invalid subnet mask.");let w=c.RE_ZONE_STRING.exec(b);w&&(this.zone=w[0],b=b.replace(c.RE_ZONE_STRING,"")),this.addressMinusSuffix=b,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(b){try{return new je(b),!0}catch{return!1}}static fromBigInt(b){let _=b.toString(16).padStart(32,"0"),O=[],w;for(w=0;w<c.GROUPS;w++)O.push(_.slice(w*4,(w+1)*4));return new je(O.join(":"))}static fromURL(b){let _,O=null,w;if(b.indexOf("[")!==-1&&b.indexOf("]:")!==-1){if(w=c.RE_URL_WITH_PORT.exec(b),w===null)return{error:"failed to parse address with port",address:null,port:null};_=w[1],O=w[2]}else if(b.indexOf("/")!==-1){if(b=b.replace(/^[a-z0-9]+:\/\//,""),w=c.RE_URL.exec(b),w===null)return{error:"failed to parse address from URL",address:null,port:null};_=w[1]}else _=b;return O?(O=parseInt(O,10),(O<0||O>65536)&&(O=null)):O=null,{address:new je(_),port:O}}static fromAddress4(b){let _=new n.Address4(b),O=c.BITS-(a.BITS-_.subnetMask);return new je(`::ffff:${_.correctForm()}/${O}`)}static fromArpa(b){let _=b.replace(/(\.ip6\.arpa)?\.$/,""),O=7;if(_.length!==63)throw new l.AddressError("Invalid 'ip6.arpa' form.");let w=_.split(".").reverse();for(let A=O;A>0;A--){let I=A*4;w.splice(I,0,":")}return _=w.join(""),new je(_)}microsoftTranscription(){return`${this.correctForm().replace(/:/g,"-")}.ipv6-literal.net`}mask(b=this.subnetMask){return this.getBitsBase2(0,b)}possibleSubnets(b=128){let _=c.BITS-this.subnetMask,O=Math.abs(b-c.BITS),w=_-O;return w<0?"0":d((BigInt("2")**BigInt(w)).toString(10))}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat(c.BITS-this.subnetMask)}`)}startAddress(){return je.fromBigInt(this._startAddress())}startAddressExclusive(){let b=BigInt("1");return je.fromBigInt(this._startAddress()+b)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat(c.BITS-this.subnetMask)}`)}endAddress(){return je.fromBigInt(this._endAddress())}endAddressExclusive(){let b=BigInt("1");return je.fromBigInt(this._endAddress()-b)}getScope(){let b=c.SCOPES[parseInt(this.getBits(12,16).toString(10),10)];return this.getType()==="Global unicast"&&b!=="Link local"&&(b="Global"),b||"Unknown"}getType(){for(let b of Object.keys(c.TYPES))if(this.isInSubnet(new je(b)))return c.TYPES[b];return"Global unicast"}getBits(b,_){return BigInt(`0b${this.getBitsBase2(b,_)}`)}getBitsBase2(b,_){return this.binaryZeroPad().slice(b,_)}getBitsBase16(b,_){let O=_-b;if(O%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(b,_).toString(16).padStart(O/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,c.BITS)}reverseForm(b){b||(b={});let _=Math.floor(this.subnetMask/4),O=this.canonicalForm().replace(/:/g,"").split("").slice(0,_).reverse().join(".");return _>0?b.omitSuffix?O:`${O}.ip6.arpa.`:b.omitSuffix?"":"ip6.arpa."}correctForm(){let b,_=[],O=0,w=[];for(b=0;b<this.parsedAddress.length;b++){let P=parseInt(this.parsedAddress[b],16);P===0&&O++,P!==0&&O>0&&(O>1&&w.push([b-O,b-1]),O=0)}O>1&&w.push([this.parsedAddress.length-O,this.parsedAddress.length-1]);let A=w.map(P=>P[1]-P[0]+1);if(w.length>0){let P=A.indexOf(Math.max(...A));_=m(this.parsedAddress,w[P])}else _=this.parsedAddress;for(b=0;b<_.length;b++)_[b]!=="compact"&&(_[b]=parseInt(_[b],16).toString(16));let I=_.join(":");return I=I.replace(/^compact$/,"::"),I=I.replace(/(^compact)|(compact$)/,":"),I=I.replace(/compact/,""),I}binaryZeroPad(){return this.bigInt().toString(2).padStart(c.BITS,"0")}parse4in6(b){let _=b.split(":"),O=_.slice(-1)[0].match(a.RE_ADDRESS);if(O){this.parsedAddress4=O[0],this.address4=new n.Address4(this.parsedAddress4);for(let w=0;w<this.address4.groups;w++)if(/^0[0-9]+/.test(this.address4.parsedAddress[w]))throw new l.AddressError("IPv4 addresses can't have leading zeroes.",b.replace(a.RE_ADDRESS,this.address4.parsedAddress.map(g).join(".")));this.v4=!0,_[_.length-1]=this.address4.toGroup6(),b=_.join(":")}return b}parse(b){b=this.parse4in6(b);let _=b.match(c.RE_BAD_CHARACTERS);if(_)throw new l.AddressError(`Bad character${_.length>1?"s":""} detected in address: ${_.join("")}`,b.replace(c.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));let O=b.match(c.RE_BAD_ADDRESS);if(O)throw new l.AddressError(`Address failed regex: ${O.join("")}`,b.replace(c.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let w=[],A=b.split("::");if(A.length===2){let I=A[0].split(":"),P=A[1].split(":");I.length===1&&I[0]===""&&(I=[]),P.length===1&&P[0]===""&&(P=[]);let L=this.groups-(I.length+P.length);if(!L)throw new l.AddressError("Error parsing groups");this.elidedGroups=L,this.elisionBegin=I.length,this.elisionEnd=I.length+this.elidedGroups,w=w.concat(I);for(let $=0;$<L;$++)w.push("0");w=w.concat(P)}else if(A.length===1)w=b.split(":"),this.elidedGroups=0;else throw new l.AddressError("Too many :: groups found");if(w=w.map(I=>parseInt(I,16).toString(16)),w.length!==this.groups)throw new l.AddressError("Incorrect number of groups found");return w}canonicalForm(){return this.parsedAddress.map(f).join(":")}decimal(){return this.parsedAddress.map(b=>parseInt(b,16).toString(10).padStart(5,"0")).join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(f).join("")}`)}to4(){let b=this.binaryZeroPad().split("");return n.Address4.fromHex(BigInt(`0b${b.slice(96,128).join("")}`).toString(16))}to4in6(){let b=this.to4(),_=new je(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),O="";return/:$/.test(_)||(O=":"),_+O+b.address}inspectTeredo(){let b=this.getBitsBase16(0,32),_=(this.getBits(80,96)^BigInt("0xffff")).toString(),O=n.Address4.fromHex(this.getBitsBase16(32,64)),w=this.getBits(96,128),A=n.Address4.fromHex((w^BigInt("0xffffffff")).toString(16)),I=this.getBitsBase2(64,80),P=(0,h.testBit)(I,15),L=(0,h.testBit)(I,14),$=(0,h.testBit)(I,8),x=(0,h.testBit)(I,9),M=BigInt(`0b${I.slice(2,6)+I.slice(8,16)}`).toString(10);return{prefix:`${b.slice(0,4)}:${b.slice(4,8)}`,server4:O.address,client4:A.address,flags:I,coneNat:P,microsoft:{reserved:L,universalLocal:x,groupIndividual:$,nonce:M},udpPort:_}}inspect6to4(){let b=this.getBitsBase16(0,16),_=n.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:b.slice(0,4),gateway:_.address}}to6to4(){if(!this.is4())return null;let b=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new je(b)}toByteArray(){let b=this.bigInt().toString(16),_=`${"0".repeat(b.length%2)}${b}`,O=[];for(let w=0,A=_.length;w<A;w+=2)O.push(parseInt(_.substring(w,w+2),16));return O}toUnsignedByteArray(){return this.toByteArray().map(y)}static fromByteArray(b){return this.fromUnsignedByteArray(b.map(y))}static fromUnsignedByteArray(b){let _=BigInt("256"),O=BigInt("0"),w=BigInt("1");for(let A=b.length-1;A>=0;A--)O+=w*BigInt(b[A].toString(10)),w*=_;return je.fromBigInt(O)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){return this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000"}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new je("2001::/32"))}is6to4(){return this.isInSubnet(new je("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(b){return b===void 0?b="":b=`:${b}`,`http://[${this.correctForm()}]${b}/`}link(b){b||(b={}),b.className===void 0&&(b.className=""),b.prefix===void 0&&(b.prefix="/#address="),b.v4===void 0&&(b.v4=!1);let _=this.correctForm;b.v4&&(_=this.to4in6);let O=_.call(this);return b.className?`<a href="${b.prefix}${O}" class="${b.className}">${O}</a>`:`<a href="${b.prefix}${O}">${O}</a>`}group(){if(this.elidedGroups===0)return r.simpleGroup(this.address).join(":");p(typeof this.elidedGroups=="number"),p(typeof this.elisionBegin=="number");let b=[],[_,O]=this.address.split("::");_.length?b.push(...r.simpleGroup(_)):b.push("");let w=["hover-group"];for(let A=this.elisionBegin;A<this.elisionBegin+this.elidedGroups;A++)w.push(`group-${A}`);return b.push(`<span class="${w.join(" ")}"></span>`),O.length?b.push(...r.simpleGroup(O,this.elisionEnd)):b.push(""),this.is4()&&(p(this.address4 instanceof n.Address4),b.pop(),b.push(this.address4.groupForV6())),b.join(":")}regularExpressionString(b=!1){let _=[],O=new je(this.correctForm());if(O.elidedGroups===0)_.push((0,o.simpleRegularExpression)(O.parsedAddress));else if(O.elidedGroups===c.GROUPS)_.push((0,o.possibleElisions)(c.GROUPS));else{let w=O.address.split("::");w[0].length&&_.push((0,o.simpleRegularExpression)(w[0].split(":"))),p(typeof O.elidedGroups=="number"),_.push((0,o.possibleElisions)(O.elidedGroups,w[0].length!==0,w[1].length!==0)),w[1].length&&_.push((0,o.simpleRegularExpression)(w[1].split(":"))),_=[_.join(":")]}return b||(_=["(?=^|",o.ADDRESS_BOUNDARY,"|[^\\w\\:])(",..._,")(?=[^\\w\\:]|",o.ADDRESS_BOUNDARY,"|$)"]),_.join("")}regularExpression(b=!1){return new RegExp(this.regularExpressionString(b),"i")}};e.Address6=S}),_g=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(n,o,l,h){h===void 0&&(h=l);var p=Object.getOwnPropertyDescriptor(o,l);(!p||("get"in p?!o.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:v(function(){return o[l]},"get")}),Object.defineProperty(n,h,p)}:function(n,o,l,h){h===void 0&&(h=l),n[h]=o[l]}),s=e&&e.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),u=e&&e.__importStar||function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var l in n)l!=="default"&&Object.prototype.hasOwnProperty.call(n,l)&&t(o,n,l);return s(o,n),o};Object.defineProperty(e,"__esModule",{value:!0}),e.v6=e.AddressError=e.Address6=e.Address4=void 0;var i=Sg();Object.defineProperty(e,"Address4",{enumerable:!0,get:v(function(){return i.Address4},"get")});var a=tk();Object.defineProperty(e,"Address6",{enumerable:!0,get:v(function(){return a.Address6},"get")});var c=Hl();Object.defineProperty(e,"AddressError",{enumerable:!0,get:v(function(){return c.AddressError},"get")});var r=u(bg());e.v6={helpers:r}}),rk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ipToBuffer=e.int32ToIpv4=e.ipv4ToInt32=e.validateSocksClientChainOptions=e.validateSocksClientOptions=void 0;var t=yg(),s=mg(),u=require("stream"),i=_g(),a=require("net");function c(m,f=["connect","bind","associate"]){if(!s.SocksCommand[m.command])throw new t.SocksClientError(s.ERRORS.InvalidSocksCommand,m);if(f.indexOf(m.command)===-1)throw new t.SocksClientError(s.ERRORS.InvalidSocksCommandForOperation,m);if(!o(m.destination))throw new t.SocksClientError(s.ERRORS.InvalidSocksClientOptionsDestination,m);if(!l(m.proxy))throw new t.SocksClientError(s.ERRORS.InvalidSocksClientOptionsProxy,m);if(n(m.proxy,m),m.timeout&&!h(m.timeout))throw new t.SocksClientError(s.ERRORS.InvalidSocksClientOptionsTimeout,m);if(m.existing_socket&&!(m.existing_socket instanceof u.Duplex))throw new t.SocksClientError(s.ERRORS.InvalidSocksClientOptionsExistingSocket,m)}v(c,"validateSocksClientOptions"),e.validateSocksClientOptions=c;function r(m){if(m.command!=="connect")throw new t.SocksClientError(s.ERRORS.InvalidSocksCommandChain,m);if(!o(m.destination))throw new t.SocksClientError(s.ERRORS.InvalidSocksClientOptionsDestination,m);if(!(m.proxies&&Array.isArray(m.proxies)&&m.proxies.length>=2))throw new t.SocksClientError(s.ERRORS.InvalidSocksClientOptionsProxiesLength,m);if(m.proxies.forEach(f=>{if(!l(f))throw new t.SocksClientError(s.ERRORS.InvalidSocksClientOptionsProxy,m);n(f,m)}),m.timeout&&!h(m.timeout))throw new t.SocksClientError(s.ERRORS.InvalidSocksClientOptionsTimeout,m)}v(r,"validateSocksClientChainOptions"),e.validateSocksClientChainOptions=r;function n(m,f){if(m.custom_auth_method!==void 0){if(m.custom_auth_method<s.SOCKS5_CUSTOM_AUTH_START||m.custom_auth_method>s.SOCKS5_CUSTOM_AUTH_END)throw new t.SocksClientError(s.ERRORS.InvalidSocksClientOptionsCustomAuthRange,f);if(m.custom_auth_request_handler===void 0||typeof m.custom_auth_request_handler!="function")throw new t.SocksClientError(s.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,f);if(m.custom_auth_response_size===void 0)throw new t.SocksClientError(s.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,f);if(m.custom_auth_response_handler===void 0||typeof m.custom_auth_response_handler!="function")throw new t.SocksClientError(s.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,f)}}v(n,"validateCustomProxyAuth");function o(m){return m&&typeof m.host=="string"&&Buffer.byteLength(m.host)<256&&typeof m.port=="number"&&m.port>=0&&m.port<=65535}v(o,"isValidSocksRemoteHost");function l(m){return m&&(typeof m.host=="string"||typeof m.ipaddress=="string")&&typeof m.port=="number"&&m.port>=0&&m.port<=65535&&(m.type===4||m.type===5)}v(l,"isValidSocksProxy");function h(m){return typeof m=="number"&&m>0}v(h,"isValidTimeoutValue");function p(m){return new i.Address4(m).toArray().reduce((f,y)=>(f<<8)+y,0)>>>0}v(p,"ipv4ToInt32"),e.ipv4ToInt32=p;function d(m){let f=m>>>24&255,y=m>>>16&255,S=m>>>8&255,E=m&255;return[f,y,S,E].join(".")}v(d,"int32ToIpv4"),e.int32ToIpv4=d;function g(m){if(a.isIPv4(m)){let f=new i.Address4(m);return Buffer.from(f.toArray())}else if(a.isIPv6(m)){let f=new i.Address6(m);return Buffer.from(f.canonicalForm().split(":").map(y=>y.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}v(g,"ipToBuffer"),e.ipToBuffer=g}),sk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReceiveBuffer=void 0;var t=class{static{v(this,"ReceiveBuffer")}constructor(s=4096){this.buffer=Buffer.allocUnsafe(s),this.offset=0,this.originalSize=s}get length(){return this.offset}append(s){if(!Buffer.isBuffer(s))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+s.length>=this.buffer.length){let u=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+s.length)),u.copy(this.buffer)}return s.copy(this.buffer,this.offset),this.offset+=s.length}peek(s){if(s>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,s)}get(s){if(s>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");let u=Buffer.allocUnsafe(s);return this.buffer.slice(0,s).copy(u),this.buffer.copyWithin(0,s,s+this.offset-s),this.offset-=s,u}};e.ReceiveBuffer=t}),ik=K(e=>{"use strict";var t=e&&e.__awaiter||function(h,p,d,g){function m(f){return f instanceof d?f:new d(function(y){y(f)})}return v(m,"adopt"),new(d||(d=Promise))(function(f,y){function S(_){try{b(g.next(_))}catch(O){y(O)}}v(S,"fulfilled");function E(_){try{b(g.throw(_))}catch(O){y(O)}}v(E,"rejected");function b(_){_.done?f(_.value):m(_.value).then(S,E)}v(b,"step"),b((g=g.apply(h,p||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.SocksClientError=e.SocksClient=void 0;var s=require("events"),u=require("net"),i=QN(),a=mg(),c=rk(),r=sk(),n=yg();Object.defineProperty(e,"SocksClientError",{enumerable:!0,get:v(function(){return n.SocksClientError},"get")});var o=_g(),l=class rl extends s.EventEmitter{static{v(this,"SocksClient")}constructor(p){super(),this.options=Object.assign({},p),(0,c.validateSocksClientOptions)(p),this.setState(a.SocksClientState.Created)}static createConnection(p,d){return new Promise((g,m)=>{try{(0,c.validateSocksClientOptions)(p,["connect"])}catch(y){return typeof d=="function"?(d(y),g(y)):m(y)}let f=new rl(p);f.connect(p.existing_socket),f.once("established",y=>{f.removeAllListeners(),typeof d=="function"&&d(null,y),g(y)}),f.once("error",y=>{f.removeAllListeners(),typeof d=="function"?(d(y),g(y)):m(y)})})}static createConnectionChain(p,d){return new Promise((g,m)=>t(this,void 0,void 0,function*(){try{(0,c.validateSocksClientChainOptions)(p)}catch(f){return typeof d=="function"?(d(f),g(f)):m(f)}p.randomizeChain&&(0,n.shuffleArray)(p.proxies);try{let f;for(let y=0;y<p.proxies.length;y++){let S=p.proxies[y],E=y===p.proxies.length-1?p.destination:{host:p.proxies[y+1].host||p.proxies[y+1].ipaddress,port:p.proxies[y+1].port},b=yield rl.createConnection({command:"connect",proxy:S,destination:E,existing_socket:f});f=f||b.socket}typeof d=="function"?(d(null,{socket:f}),g({socket:f})):g({socket:f})}catch(f){typeof d=="function"?(d(f),g(f)):m(f)}}))}static createUDPFrame(p){let d=new i.SmartBuffer;return d.writeUInt16BE(0),d.writeUInt8(p.frameNumber||0),u.isIPv4(p.remoteHost.host)?(d.writeUInt8(a.Socks5HostType.IPv4),d.writeUInt32BE((0,c.ipv4ToInt32)(p.remoteHost.host))):u.isIPv6(p.remoteHost.host)?(d.writeUInt8(a.Socks5HostType.IPv6),d.writeBuffer((0,c.ipToBuffer)(p.remoteHost.host))):(d.writeUInt8(a.Socks5HostType.Hostname),d.writeUInt8(Buffer.byteLength(p.remoteHost.host)),d.writeString(p.remoteHost.host)),d.writeUInt16BE(p.remoteHost.port),d.writeBuffer(p.data),d.toBuffer()}static parseUDPFrame(p){let d=i.SmartBuffer.fromBuffer(p);d.readOffset=2;let g=d.readUInt8(),m=d.readUInt8(),f;m===a.Socks5HostType.IPv4?f=(0,c.int32ToIpv4)(d.readUInt32BE()):m===a.Socks5HostType.IPv6?f=o.Address6.fromByteArray(Array.from(d.readBuffer(16))).canonicalForm():f=d.readString(d.readUInt8());let y=d.readUInt16BE();return{frameNumber:g,remoteHost:{host:f,port:y},data:d.readBuffer()}}setState(p){this.state!==a.SocksClientState.Error&&(this.state=p)}connect(p){this.onDataReceived=g=>this.onDataReceivedHandler(g),this.onClose=()=>this.onCloseHandler(),this.onError=g=>this.onErrorHandler(g),this.onConnect=()=>this.onConnectHandler();let d=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||a.DEFAULT_TIMEOUT);d.unref&&typeof d.unref=="function"&&d.unref(),p?this.socket=p:this.socket=new u.Socket,this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(a.SocksClientState.Connecting),this.receiveBuffer=new r.ReceiveBuffer,p?this.socket.emit("connect"):(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null&&this.socket.setNoDelay(!!this.options.set_tcp_nodelay)),this.prependOnceListener("established",g=>{setImmediate(()=>{if(this.receiveBuffer.length>0){let m=this.receiveBuffer.get(this.receiveBuffer.length);g.socket.emit("data",m)}g.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){this.state!==a.SocksClientState.Established&&this.state!==a.SocksClientState.BoundWaitingForConnection&&this.closeSocket(a.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){this.setState(a.SocksClientState.Connected),this.options.proxy.type===4?this.sendSocks4InitialHandshake():this.sendSocks5InitialHandshake(),this.setState(a.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(p){this.receiveBuffer.append(p),this.processData()}processData(){for(;this.state!==a.SocksClientState.Established&&this.state!==a.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize;)if(this.state===a.SocksClientState.SentInitialHandshake)this.options.proxy.type===4?this.handleSocks4FinalHandshakeResponse():this.handleInitialSocks5HandshakeResponse();else if(this.state===a.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===a.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===a.SocksClientState.BoundWaitingForConnection)this.options.proxy.type===4?this.handleSocks4IncomingConnectionResponse():this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(a.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(a.ERRORS.SocketClosed)}onErrorHandler(p){this.closeSocket(p.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(p){this.state!==a.SocksClientState.Error&&(this.setState(a.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new n.SocksClientError(p,this.options)))}sendSocks4InitialHandshake(){let p=this.options.proxy.userId||"",d=new i.SmartBuffer;d.writeUInt8(4),d.writeUInt8(a.SocksCommand[this.options.command]),d.writeUInt16BE(this.options.destination.port),u.isIPv4(this.options.destination.host)?(d.writeBuffer((0,c.ipToBuffer)(this.options.destination.host)),d.writeStringNT(p)):(d.writeUInt8(0),d.writeUInt8(0),d.writeUInt8(0),d.writeUInt8(1),d.writeStringNT(p),d.writeStringNT(this.options.destination.host)),this.nextRequiredPacketBufferSize=a.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(d.toBuffer())}handleSocks4FinalHandshakeResponse(){let p=this.receiveBuffer.get(8);if(p[1]!==a.Socks4Response.Granted)this.closeSocket(`${a.ERRORS.Socks4ProxyRejectedConnection} - (${a.Socks4Response[p[1]]})`);else if(a.SocksCommand[this.options.command]===a.SocksCommand.bind){let d=i.SmartBuffer.fromBuffer(p);d.readOffset=2;let g={port:d.readUInt16BE(),host:(0,c.int32ToIpv4)(d.readUInt32BE())};g.host==="0.0.0.0"&&(g.host=this.options.proxy.ipaddress),this.setState(a.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:g,socket:this.socket})}else this.setState(a.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let p=this.receiveBuffer.get(8);if(p[1]!==a.Socks4Response.Granted)this.closeSocket(`${a.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${a.Socks4Response[p[1]]})`);else{let d=i.SmartBuffer.fromBuffer(p);d.readOffset=2;let g={port:d.readUInt16BE(),host:(0,c.int32ToIpv4)(d.readUInt32BE())};this.setState(a.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:g,socket:this.socket})}}sendSocks5InitialHandshake(){let p=new i.SmartBuffer,d=[a.Socks5Auth.NoAuth];(this.options.proxy.userId||this.options.proxy.password)&&d.push(a.Socks5Auth.UserPass),this.options.proxy.custom_auth_method!==void 0&&d.push(this.options.proxy.custom_auth_method),p.writeUInt8(5),p.writeUInt8(d.length);for(let g of d)p.writeUInt8(g);this.nextRequiredPacketBufferSize=a.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(p.toBuffer()),this.setState(a.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let p=this.receiveBuffer.get(2);p[0]!==5?this.closeSocket(a.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion):p[1]===a.SOCKS5_NO_ACCEPTABLE_AUTH?this.closeSocket(a.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType):p[1]===a.Socks5Auth.NoAuth?(this.socks5ChosenAuthType=a.Socks5Auth.NoAuth,this.sendSocks5CommandRequest()):p[1]===a.Socks5Auth.UserPass?(this.socks5ChosenAuthType=a.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication()):p[1]===this.options.proxy.custom_auth_method?(this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication()):this.closeSocket(a.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let p=this.options.proxy.userId||"",d=this.options.proxy.password||"",g=new i.SmartBuffer;g.writeUInt8(1),g.writeUInt8(Buffer.byteLength(p)),g.writeString(p),g.writeUInt8(Buffer.byteLength(d)),g.writeString(d),this.nextRequiredPacketBufferSize=a.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(g.toBuffer()),this.setState(a.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return t(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(a.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(p){return t(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(p)})}handleSocks5AuthenticationNoAuthHandshakeResponse(p){return t(this,void 0,void 0,function*(){return p[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(p){return t(this,void 0,void 0,function*(){return p[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return t(this,void 0,void 0,function*(){this.setState(a.SocksClientState.ReceivedAuthenticationResponse);let p=!1;this.socks5ChosenAuthType===a.Socks5Auth.NoAuth?p=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===a.Socks5Auth.UserPass?p=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===this.options.proxy.custom_auth_method&&(p=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))),p?this.sendSocks5CommandRequest():this.closeSocket(a.ERRORS.Socks5AuthenticationFailed)})}sendSocks5CommandRequest(){let p=new i.SmartBuffer;p.writeUInt8(5),p.writeUInt8(a.SocksCommand[this.options.command]),p.writeUInt8(0),u.isIPv4(this.options.destination.host)?(p.writeUInt8(a.Socks5HostType.IPv4),p.writeBuffer((0,c.ipToBuffer)(this.options.destination.host))):u.isIPv6(this.options.destination.host)?(p.writeUInt8(a.Socks5HostType.IPv6),p.writeBuffer((0,c.ipToBuffer)(this.options.destination.host))):(p.writeUInt8(a.Socks5HostType.Hostname),p.writeUInt8(this.options.destination.host.length),p.writeString(this.options.destination.host)),p.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(p.toBuffer()),this.setState(a.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let p=this.receiveBuffer.peek(5);if(p[0]!==5||p[1]!==a.Socks5Response.Granted)this.closeSocket(`${a.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${a.Socks5Response[p[1]]}`);else{let d=p[3],g,m;if(d===a.Socks5HostType.IPv4){let f=a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<f){this.nextRequiredPacketBufferSize=f;return}m=i.SmartBuffer.fromBuffer(this.receiveBuffer.get(f).slice(4)),g={host:(0,c.int32ToIpv4)(m.readUInt32BE()),port:m.readUInt16BE()},g.host==="0.0.0.0"&&(g.host=this.options.proxy.ipaddress)}else if(d===a.Socks5HostType.Hostname){let f=p[4],y=a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(f);if(this.receiveBuffer.length<y){this.nextRequiredPacketBufferSize=y;return}m=i.SmartBuffer.fromBuffer(this.receiveBuffer.get(y).slice(5)),g={host:m.readString(f),port:m.readUInt16BE()}}else if(d===a.Socks5HostType.IPv6){let f=a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<f){this.nextRequiredPacketBufferSize=f;return}m=i.SmartBuffer.fromBuffer(this.receiveBuffer.get(f).slice(4)),g={host:o.Address6.fromByteArray(Array.from(m.readBuffer(16))).canonicalForm(),port:m.readUInt16BE()}}this.setState(a.SocksClientState.ReceivedFinalResponse),a.SocksCommand[this.options.command]===a.SocksCommand.connect?(this.setState(a.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:g,socket:this.socket})):a.SocksCommand[this.options.command]===a.SocksCommand.bind?(this.setState(a.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:g,socket:this.socket})):a.SocksCommand[this.options.command]===a.SocksCommand.associate&&(this.setState(a.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:g,socket:this.socket}))}}handleSocks5IncomingConnectionResponse(){let p=this.receiveBuffer.peek(5);if(p[0]!==5||p[1]!==a.Socks5Response.Granted)this.closeSocket(`${a.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${a.Socks5Response[p[1]]}`);else{let d=p[3],g,m;if(d===a.Socks5HostType.IPv4){let f=a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<f){this.nextRequiredPacketBufferSize=f;return}m=i.SmartBuffer.fromBuffer(this.receiveBuffer.get(f).slice(4)),g={host:(0,c.int32ToIpv4)(m.readUInt32BE()),port:m.readUInt16BE()},g.host==="0.0.0.0"&&(g.host=this.options.proxy.ipaddress)}else if(d===a.Socks5HostType.Hostname){let f=p[4],y=a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(f);if(this.receiveBuffer.length<y){this.nextRequiredPacketBufferSize=y;return}m=i.SmartBuffer.fromBuffer(this.receiveBuffer.get(y).slice(5)),g={host:m.readString(f),port:m.readUInt16BE()}}else if(d===a.Socks5HostType.IPv6){let f=a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<f){this.nextRequiredPacketBufferSize=f;return}m=i.SmartBuffer.fromBuffer(this.receiveBuffer.get(f).slice(4)),g={host:o.Address6.fromByteArray(Array.from(m.readBuffer(16))).canonicalForm(),port:m.readUInt16BE()}}this.setState(a.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:g,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}};e.SocksClient=l}),nk=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(u,i,a,c){c===void 0&&(c=a);var r=Object.getOwnPropertyDescriptor(i,a);(!r||("get"in r?!i.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:v(function(){return i[a]},"get")}),Object.defineProperty(u,c,r)}:function(u,i,a,c){c===void 0&&(c=a),u[c]=i[a]}),s=e&&e.__exportStar||function(u,i){for(var a in u)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,u,a)};Object.defineProperty(e,"__esModule",{value:!0}),s(ik(),e)}),ok=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(y,S,E,b){b===void 0&&(b=E);var _=Object.getOwnPropertyDescriptor(S,E);(!_||("get"in _?!S.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:v(function(){return S[E]},"get")}),Object.defineProperty(y,b,_)}:function(y,S,E,b){b===void 0&&(b=E),y[b]=S[E]}),s=e&&e.__setModuleDefault||(Object.create?function(y,S){Object.defineProperty(y,"default",{enumerable:!0,value:S})}:function(y,S){y.default=S}),u=e&&e.__importStar||function(y){if(y&&y.__esModule)return y;var S={};if(y!=null)for(var E in y)E!=="default"&&Object.prototype.hasOwnProperty.call(y,E)&&t(S,y,E);return s(S,y),S},i=e&&e.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.SocksProxyAgent=void 0;var a=nk(),c=Vi(),r=i(wr()),n=u(require("dns")),o=u(require("net")),l=u(require("tls")),h=require("url"),p=(0,r.default)("socks-proxy-agent"),d=v(y=>y.servername===void 0&&y.host&&!o.isIP(y.host)?{...y,servername:y.host}:y,"setServernameFromNonIpHost");function g(y){let S=!1,E=5,b=y.hostname,_=parseInt(y.port,10)||1080;switch(y.protocol.replace(":","")){case"socks4":S=!0,E=4;break;case"socks4a":E=4;break;case"socks5":S=!0,E=5;break;case"socks":E=5;break;case"socks5h":E=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${String(y.protocol)}`)}let O={host:b,port:_,type:E};return y.username&&Object.defineProperty(O,"userId",{value:decodeURIComponent(y.username),enumerable:!1}),y.password!=null&&Object.defineProperty(O,"password",{value:decodeURIComponent(y.password),enumerable:!1}),{lookup:S,proxy:O}}v(g,"parseSocksURL");var m=class extends c.Agent{static{v(this,"SocksProxyAgent")}constructor(y,S){super(S);let E=typeof y=="string"?new h.URL(y):y,{proxy:b,lookup:_}=g(E);this.shouldLookup=_,this.proxy=b,this.timeout=S?.timeout??null,this.socketOptions=S?.socketOptions??null}async connect(y,S){let{shouldLookup:E,proxy:b,timeout:_}=this;if(!S.host)throw new Error("No `host` defined!");let{host:O}=S,{port:w,lookup:A=n.lookup}=S;E&&(O=await new Promise(($,x)=>{A(O,{},(M,U)=>{M?x(M):$(U)})}));let I={proxy:b,destination:{host:O,port:typeof w=="number"?w:parseInt(w,10)},command:"connect",timeout:_??void 0,socket_options:this.socketOptions??void 0},P=v($=>{y.destroy(),L.destroy(),$&&$.destroy()},"cleanup");p("Creating socks proxy connection: %o",I);let{socket:L}=await a.SocksClient.createConnection(I);if(p("Successfully created socks proxy connection"),_!==null&&(L.setTimeout(_),L.on("timeout",()=>P())),S.secureEndpoint){p("Upgrading socket connection to TLS");let $=l.connect({...f(d(S),"host","path","port"),socket:L});return $.once("error",x=>{p("Socket TLS error",x.message),P($)}),$}return L}};m.protocols=["socks","socks4","socks4a","socks5","socks5h"],e.SocksProxyAgent=m;function f(y,...S){let E={},b;for(b in y)S.includes(b)||(E[b]=y[b]);return E}v(f,"omit")}),wg=K((e,t)=>{"use strict";var s=class extends Error{static{v(this,"InvalidProxyProtocolError")}constructor(r){super(`Invalid protocol \`${r.protocol}\` connecting to proxy \`${r.host}\``),this.code="EINVALIDPROXY",this.proxy=r}},u=class extends Error{static{v(this,"ConnectionTimeoutError")}constructor(r){super(`Timeout connecting to host \`${r}\``),this.code="ECONNECTIONTIMEOUT",this.host=r}},i=class extends Error{static{v(this,"IdleTimeoutError")}constructor(r){super(`Idle timeout reached for host \`${r}\``),this.code="EIDLETIMEOUT",this.host=r}},a=class extends Error{static{v(this,"ResponseTimeoutError")}constructor(r,n){let o="Response timeout ";n&&(o+=`from proxy \`${n.host}\` `),o+=`connecting to host \`${r.host}\``,super(o),this.code="ERESPONSETIMEOUT",this.proxy=n,this.request=r}},c=class extends Error{static{v(this,"TransferTimeoutError")}constructor(r,n){let o="Transfer timeout ";n&&(o+=`from proxy \`${n.host}\` `),o+=`for \`${r.host}\``,super(o),this.code="ETRANSFERTIMEOUT",this.proxy=n,this.request=r}};t.exports={InvalidProxyProtocolError:s,ConnectionTimeoutError:u,IdleTimeoutError:i,ResponseTimeoutError:a,TransferTimeoutError:c}}),Og=K((e,t)=>{"use strict";var{HttpProxyAgent:s}=JN(),{HttpsProxyAgent:u}=XN(),{SocksProxyAgent:i}=ok(),{LRUCache:a}=Er(),{InvalidProxyProtocolError:c}=wg(),r=new a({max:20}),n=new Set(i.protocols),o=new Set(["https_proxy","http_proxy","proxy","no_proxy"]),l=Object.entries(process.env).reduce((g,[m,f])=>(m=m.toLowerCase(),o.has(m)&&(g[m]=f),g),{}),h=v(g=>{g=new URL(g);let m=g.protocol.slice(0,-1);if(n.has(m))return i;if(m==="https"||m==="http")return[s,u];throw new c(g)},"getProxyAgent"),p=v((g,m)=>{if(typeof m=="string"&&(m=m.split(",").map(y=>y.trim()).filter(Boolean)),!m||!m.length)return!1;let f=g.hostname.split(".").reverse();return m.some(y=>{let S=y.split(".").filter(Boolean).reverse();if(!S.length)return!1;for(let E=0;E<S.length;E++)if(f[E]!==S[E])return!1;return!0})},"isNoProxy"),d=v((g,{proxy:m,noProxy:f})=>(g=new URL(g),m||(m=g.protocol==="https:"?l.https_proxy:l.https_proxy||l.http_proxy||l.proxy),f||(f=l.no_proxy),!m||p(g,f)?null:new URL(m)),"getProxy");t.exports={getProxyAgent:h,getProxy:d,proxyCache:r}}),ak=K((e,t)=>{"use strict";var s=require("net"),u=require("tls"),{once:i}=require("events"),a=require("timers/promises"),{normalizeOptions:c,cacheOptions:r}=dg(),{getProxy:n,getProxyAgent:o,proxyCache:l}=Og(),h=wg(),{Agent:p}=Vi();t.exports=class extends p{static{v(this,"Agent")}#e;#t;#r;#s;#i;constructor(d={}){let{timeouts:g,proxy:m,noProxy:f,...y}=c(d);super(y),this.#e=y,this.#t=g,m&&(this.#r=new URL(m),this.#s=f,this.#i=o(m))}get proxy(){return this.#r?{url:this.#r}:{}}#l(d){if(!this.#r)return;let g=n(`${d.protocol}//${d.host}:${d.port}`,{proxy:this.#r,noProxy:this.#s});if(!g)return;let m=r({...d,...this.#e,timeouts:this.#t,proxy:g});if(l.has(m))return l.get(m);let f=this.#i;Array.isArray(f)&&(f=this.isSecureEndpoint(d)?f[1]:f[0]);let y=new f(g,{...this.#e,socketOptions:{family:this.#e.family}});return l.set(m,y),y}async#c({promises:d,options:g,timeout:m},f=new AbortController){if(m){let S=a.setTimeout(m,null,{signal:f.signal}).then(()=>{throw new h.ConnectionTimeoutError(`${g.host}:${g.port}`)}).catch(E=>{if(E.name!=="AbortError")throw E});d.push(S)}let y;try{y=await Promise.race(d),f.abort()}catch(S){throw f.abort(),S}return y}async connect(d,g){g.lookup??=this.#e.lookup;let m,f=this.#t.connection,y=this.isSecureEndpoint(g),S=this.#l(g);if(S){let O=Date.now();m=await this.#c({options:g,timeout:f,promises:[S.connect(d,g)]}),f&&(f=f-(Date.now()-O))}else m=(y?u:s).connect(g);m.setKeepAlive(this.keepAlive,this.keepAliveMsecs),m.setNoDelay(this.keepAlive);let E=new AbortController,{signal:b}=E,_=m[y?"secureConnecting":"connecting"]?i(m,y?"secureConnect":"connect",{signal:b}):Promise.resolve();return await this.#c({options:g,timeout:f,promises:[_,i(m,"error",{signal:b}).then(O=>{throw O[0]})]},E),this.#t.idle&&m.setTimeout(this.#t.idle,()=>{m.destroy(new h.IdleTimeoutError(`${g.host}:${g.port}`))}),m}addRequest(d,g){let m=this.#l(g);if(m?.setRequestProps&&m.setRequestProps(d,g),d.setHeader("connection",this.keepAlive?"keep-alive":"close"),this.#t.response){let f;d.once("finish",()=>{setTimeout(()=>{d.destroy(new h.ResponseTimeoutError(d,this.#r))},this.#t.response)}),d.once("response",()=>{clearTimeout(f)})}if(this.#t.transfer){let f;d.once("response",y=>{setTimeout(()=>{y.destroy(new h.TransferTimeoutError(d,this.#r))},this.#t.transfer),y.once("close",()=>{clearTimeout(f)})})}return super.addRequest(d,g)}}}),lk=K((e,t)=>{"use strict";var{LRUCache:s}=Er(),{normalizeOptions:u,cacheOptions:i}=dg(),{getProxy:a,proxyCache:c}=Og(),r=pg(),n=ak(),o=new s({max:20}),l=v((h,{agent:p,proxy:d,noProxy:g,...m}={})=>{if(p!=null)return p;h=new URL(h);let f=a(h,{proxy:d,noProxy:g}),y={...u(m),proxy:f},S=i({...y,secureEndpoint:h.protocol==="https:"});if(o.has(S))return o.get(S);let E=new n(y);return o.set(S,E),E},"getAgent");t.exports={getAgent:l,Agent:n,HttpAgent:n,HttpsAgent:n,cache:{proxy:c,agent:o,dns:r.cache,clear:v(()=>{c.clear(),o.clear(),r.cache.clear()},"clear")}}}),ck=K((e,t)=>{t.exports={name:"make-fetch-happen",version:"15.0.2",description:"Opinionated, caching, retrying fetch client",main:"lib/index.js",files:["bin/","lib/"],scripts:{test:"tap",posttest:"npm run lint",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"',lint:"npm run eslint",lintfix:"npm run eslint -- --fix",postlint:"template-oss-check",snap:"tap","template-oss-apply":"template-oss-apply --force"},repository:{type:"git",url:"git+https://github.com/npm/make-fetch-happen.git"},keywords:["http","request","fetch","mean girls","caching","cache","subresource integrity"],author:"GitHub Inc.",license:"ISC",dependencies:{"@npmcli/agent":"^4.0.0",cacache:"^20.0.1","http-cache-semantics":"^4.1.1",minipass:"^7.0.2","minipass-fetch":"^4.0.0","minipass-flush":"^1.0.5","minipass-pipeline":"^1.2.4",negotiator:"^1.0.0","proc-log":"^5.0.0","promise-retry":"^2.0.1",ssri:"^12.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",nock:"^13.2.4","safe-buffer":"^5.2.1","standard-version":"^9.3.2",tap:"^16.0.0"},engines:{node:"^20.17.0 || >=22.9.0"},tap:{color:1,files:"test/*.js","check-coverage":!0,timeout:60,"nyc-arg":["--exclude","tap-snapshots/**"]},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.25.0",publish:"true"}}}),Gl=K((e,t)=>{var{Minipass:s}=xe(),u=vs(),i=Mi(),a=It(),{log:c}=ft(),r=hg(),{getAgent:n}=lk(),o=ck(),l=`${o.name}/${o.version} (+https://npm.im/${o.name})`,h=["ECONNRESET","ECONNREFUSED","EADDRINUSE","ETIMEDOUT","ECONNECTIONTIMEOUT","EIDLETIMEOUT","ERESPONSETIMEOUT","ETRANSFERTIMEOUT"],p=["request-timeout"],d=v((g,m)=>{let f=n(g.url,{...m,signal:void 0});g.headers.has("connection")||g.headers.set("connection",f?"keep-alive":"close"),g.headers.has("user-agent")||g.headers.set("user-agent",l);let y={...m,agent:f,redirect:"manual"};return i(async(S,E)=>{let b=new u.Request(g,y);try{let _=await u(b,y);if(y.integrity&&_.status===200){let w=a.integrityStream({algorithms:y.algorithms,integrity:y.integrity,size:y.size}),A=new r({events:["integrity","size"]},_.body,w);w.on("integrity",I=>A.emit("integrity",I)),w.on("size",I=>A.emit("size",I)),_=new u.Response(A,_),_.body.hasIntegrityEmitter=!0}_.headers.set("x-fetch-attempts",E);let O=s.isStream(b.body);return b.method!=="POST"&&!O&&([408,420,429].includes(_.status)||_.status>=500)?(typeof m.onRetry=="function"&&m.onRetry(_),c.http("fetch",`${b.method} ${b.url} attempt ${E} failed with ${_.status}`),S(_)):_}catch(_){let O=_.code==="EPROMISERETRY"?_.retried.code:_.code,w=_.retried instanceof u.Response||h.includes(O)&&p.includes(_.type);if(b.method==="POST"||w)throw _;return typeof m.onRetry=="function"&&m.onRetry(_),c.http("fetch",`${b.method} ${b.url} attempt ${E} failed with ${_.code}`),S(_)}},m.retry).catch(S=>{if(S.status>=400&&S.type!=="system")return S;throw S})},"remoteFetch");t.exports=d}),uk=K((e,t)=>{var{Request:s,Response:u}=vs(),{Minipass:i}=xe(),a=xl(),c=Hi(),r=require("url"),n=hg(),o=ug(),l=HN(),h=Gl(),p=v((b,_)=>Object.prototype.hasOwnProperty.call(b,_),"hasOwnProperty"),d=["accept-charset","accept-encoding","accept-language","accept","cache-control"],g=["cache-control","content-encoding","content-language","content-type","date","etag","expires","last-modified","link","location","pragma","vary"],m=v((b,_,O)=>{let w={time:Date.now(),url:b.url,reqHeaders:{},resHeaders:{},options:{compress:O.compress!=null?O.compress:b.compress}};_.status!==200&&_.status!==304&&(w.status=_.status);for(let P of d)b.headers.has(P)&&(w.reqHeaders[P]=b.headers.get(P));let A=b.headers.get("host"),I=new r.URL(b.url);if(A&&I.host!==A&&(w.reqHeaders.host=A),_.headers.has("vary")){let P=_.headers.get("vary");if(P!=="*"){let L=P.trim().toLowerCase().split(/\s*,\s*/);for(let $ of L)b.headers.has($)&&(w.reqHeaders[$]=b.headers.get($))}}for(let P of g)_.headers.has(P)&&(w.resHeaders[P]=_.headers.get(P));for(let P of O.cacheAdditionalHeaders)_.headers.has(P)&&(w.resHeaders[P]=_.headers.get(P));return w},"getMetadata"),f=Symbol("request"),y=Symbol("response"),S=Symbol("policy"),E=class yr{static{v(this,"CacheEntry")}constructor({entry:_,request:O,response:w,options:A}){_?(this.key=_.key,this.entry=_,this.entry.metadata.time=this.entry.metadata.time||this.entry.time):this.key=l(O),this.options=A,this[f]=O,this[y]=w,this[S]=null}static async find(_,O){try{var w=await c.index.compact(O.cachePath,l(_),(I,P)=>{let L=new yr({entry:I,options:O}),$=new yr({entry:P,options:O});return L.policy.satisfies($.request)},{validateEntry:v(I=>I.metadata&&I.metadata.resHeaders&&I.metadata.resHeaders["content-encoding"]===null?!1:I.integrity===null?!!(I.metadata&&I.metadata.status):!0,"validateEntry")})}catch{return}if(O.cache==="reload")return;let A;for(let I of w){let P=new yr({entry:I,options:O});if(P.policy.satisfies(_)){A=P;break}}return A}static async invalidate(_,O){let w=l(_);try{await c.rm.entry(O.cachePath,w,{removeFully:!0})}catch{}}get request(){return this[f]||(this[f]=new s(this.entry.metadata.url,{method:"GET",headers:this.entry.metadata.reqHeaders,...this.entry.metadata.options})),this[f]}get response(){return this[y]||(this[y]=new u(null,{url:this.entry.metadata.url,counter:this.options.counter,status:this.entry.metadata.status||200,headers:{...this.entry.metadata.resHeaders,"content-length":this.entry.size}})),this[y]}get policy(){return this[S]||(this[S]=new o({entry:this.entry,request:this.request,response:this.response,options:this.options})),this[S]}async store(_){if(this.request.method!=="GET"||![200,301,308].includes(this.response.status)||!this.policy.storable())return this.response.headers.set("x-local-cache-status","skip"),this.response;let O=this.response.headers.get("content-length"),w={algorithms:this.options.algorithms,metadata:m(this.request,this.response,this.options),size:O,integrity:this.options.integrity,integrityEmitter:this.response.body.hasIntegrityEmitter&&this.response.body},A=null;if(this.response.status===200){let I,P,L=new Promise((x,M)=>{I=x,P=M}).catch(x=>{A.emit("error",x)});A=new n({events:["integrity","size"]},new a({flush(){return L}})),A.hasIntegrityEmitter=!0;let $=v(()=>{let x=new i,M=c.put.stream(this.options.cachePath,this.key,w);M.on("integrity",U=>A.emit("integrity",U)),M.on("size",U=>A.emit("size",U)),x.pipe(M),M.promise().then(I,P),A.unshift(x),A.unshift(this.response.body)},"onResume");A.once("resume",$),A.once("end",()=>A.removeListener("resume",$))}else await c.index.insert(this.options.cachePath,this.key,null,w);return this.response.headers.set("x-local-cache",encodeURIComponent(this.options.cachePath)),this.response.headers.set("x-local-cache-key",encodeURIComponent(this.key)),this.response.headers.set("x-local-cache-mode","stream"),this.response.headers.set("x-local-cache-status",_),this.response.headers.set("x-local-cache-time",new Date().toISOString()),new u(A,{url:this.response.url,status:this.response.status,headers:this.response.headers,counter:this.options.counter})}async respond(_,O,w){let A;if(_==="HEAD"||[301,308].includes(this.response.status))A=this.response;else{let I=new i,P={...this.policy.responseHeaders()},L=v(()=>{let $=c.get.stream.byDigest(this.options.cachePath,this.entry.integrity,{memoize:this.options.memoize});$.on("error",async x=>{$.pause(),x.code==="EINTEGRITY"&&await c.rm.content(this.options.cachePath,this.entry.integrity,{memoize:this.options.memoize}),(x.code==="ENOENT"||x.code==="EINTEGRITY")&&await yr.invalidate(this.request,this.options),I.emit("error",x),$.resume()}),I.emit("integrity",this.entry.integrity),I.emit("size",Number(P["content-length"])),$.pipe(I)},"onResume");I.once("resume",L),I.once("end",()=>I.removeListener("resume",L)),A=new u(I,{url:this.entry.metadata.url,counter:O.counter,status:200,headers:P})}return A.headers.set("x-local-cache",encodeURIComponent(this.options.cachePath)),A.headers.set("x-local-cache-hash",encodeURIComponent(this.entry.integrity)),A.headers.set("x-local-cache-key",encodeURIComponent(this.key)),A.headers.set("x-local-cache-mode","stream"),A.headers.set("x-local-cache-status",w),A.headers.set("x-local-cache-time",new Date(this.entry.metadata.time).toUTCString()),A}async revalidate(_,O){let w=new s(_,{headers:this.policy.revalidationHeaders(_)});try{var A=await h(w,{...O,headers:void 0})}catch(I){if(!this.policy.mustRevalidate)return this.respond(_.method,O,"stale");throw I}if(this.policy.revalidated(w,A)){let I=m(_,A,O);for(let P of g)!p(I.resHeaders,P)&&p(this.entry.metadata.resHeaders,P)&&(I.resHeaders[P]=this.entry.metadata.resHeaders[P]);for(let P of O.cacheAdditionalHeaders){let L=p(I.resHeaders,P),$=p(this.entry.metadata.resHeaders,P),x=p(this.policy.response.headers,P);!L&&$&&(I.resHeaders[P]=this.entry.metadata.resHeaders[P]),!x&&L&&(this.policy.response.headers[P]=I.resHeaders[P])}try{await c.index.insert(O.cachePath,this.key,this.entry.integrity,{size:this.entry.size,metadata:I})}catch{}return this.respond(_.method,O,"revalidated")}return new yr({request:_,response:A,options:O}).store("updated")}};t.exports=E}),hk=K((e,t)=>{var{NotCachedError:s}=FN(),u=uk(),i=Gl(),a=v(async(c,r)=>{let n=await u.find(c,r);if(!n){if(r.cache==="only-if-cached")throw new s(c.url);let l=await i(c,r);return new u({request:c,response:l,options:r}).store("miss")}if(r.cache==="no-cache")return n.revalidate(c,r);let o=n.policy.needsRevalidation(c);return r.cache==="force-cache"||r.cache==="only-if-cached"||!o?n.respond(c.method,r,o?"stale":"hit"):n.revalidate(c,r)},"cacheFetch");a.invalidate=async(c,r)=>{if(r.cachePath)return u.invalidate(c,r)},t.exports=a}),pk=K((e,t)=>{"use strict";var{FetchError:s,Request:u,isRedirect:i}=vs(),a=require("url"),c=ug(),r=hk(),n=Gl(),o=v((p,d,g)=>{if(!i(d.status)||g.redirect==="manual")return!1;if(g.redirect==="error")throw new s(`redirect mode is set to error: ${p.url}`,"no-redirect",{code:"ENOREDIRECT"});if(!d.headers.has("location"))throw new s(`redirect location header missing for: ${p.url}`,"no-location",{code:"EINVALIDREDIRECT"});if(p.counter>=p.follow)throw new s(`maximum redirect reached at: ${p.url}`,"max-redirect",{code:"EMAXREDIRECT"});return!0},"canFollowRedirect"),l=v((p,d,g)=>{let m={...g},f=d.headers.get("location"),y=new a.URL(f,/^https?:/.test(f)?void 0:p.url);return new a.URL(p.url).hostname!==y.hostname&&(p.headers.delete("authorization"),p.headers.delete("cookie")),(d.status===303||p.method==="POST"&&[301,302].includes(d.status))&&(m.method="GET",m.body=null,p.headers.delete("content-length")),m.headers={},p.headers.forEach((S,E)=>{m.headers[E]=S}),m.counter=++p.counter,{request:new u(a.format(y),m),options:m}},"getRedirect"),h=v(async(p,d)=>{let g=c.storable(p,d)?await r(p,d):await n(p,d);if(!["GET","HEAD"].includes(p.method)&&g.status>=200&&g.status<=399&&await r.invalidate(p,d),!o(p,g,d))return g;let m=l(p,g,d);return h(m.request,m.options)},"fetch");t.exports=h}),Wi=K((e,t)=>{var{FetchError:s,Headers:u,Request:i,Response:a}=vs(),c=LN(),r=pk(),n=v((o,l)=>{let h=c(l),p=new i(o,h);return r(p,h)},"makeFetchHappen");n.defaults=(o,l={},h=n)=>{typeof o=="object"&&(l=o,o=null);let p=v((d,g={})=>{let m=d||o,f={...l,...g,headers:{...l.headers,...g.headers}};return h(m,f)},"defaultedFetch");return p.defaults=(d,g={})=>n.defaults(d,g,p),p},t.exports=n,t.exports.FetchError=s,t.exports.Headers=u,t.exports.Request=i,t.exports.Response=a}),dk=K((e,t)=>{var s={},u=s.LEFT_BRACE=1,i=s.RIGHT_BRACE=2,a=s.LEFT_BRACKET=3,c=s.RIGHT_BRACKET=4,r=s.COLON=5,n=s.COMMA=6,o=s.TRUE=7,l=s.FALSE=8,h=s.NULL=9,p=s.STRING=10,d=s.NUMBER=11,g=s.START=17,m=s.STOP=18,f=s.TRUE1=33,y=s.TRUE2=34,S=s.TRUE3=35,E=s.FALSE1=49,b=s.FALSE2=50,_=s.FALSE3=51,O=s.FALSE4=52,w=s.NULL1=65,A=s.NULL2=66,I=s.NULL3=67,P=s.NUMBER1=81,L=s.NUMBER3=83,$=s.STRING1=97,x=s.STRING2=98,M=s.STRING3=99,U=s.STRING4=100,V=s.STRING5=101,B=s.STRING6=102,G=s.VALUE=113,W=s.KEY=114,N=s.OBJECT=129,D=s.ARRAY=130,T=92,C=47,Z=8,X=12,Q=10,k=13,F=9,z=64*1024;function j(){this.tState=g,this.value=void 0,this.string=void 0,this.stringBuffer=Buffer.alloc?Buffer.alloc(z):new Buffer(z),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=G,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new Buffer(2),3:new Buffer(3),4:new Buffer(4)},this.offset=-1}v(j,"Parser"),j.toknam=function(J){for(var Y=Object.keys(s),R=0,H=Y.length;R<H;R++){var ee=Y[R];if(s[ee]===J)return ee}return J&&"0x"+J.toString(16)};var q=j.prototype;q.onError=function(J){throw J},q.charError=function(J,Y){this.tState=m,this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(J[Y]))+" at position "+Y+" in state "+j.toknam(this.tState)))},q.appendStringChar=function(J){this.stringBufferOffset>=z&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=J},q.appendStringBuf=function(J,Y,R){var H=J.length;typeof Y=="number"&&(typeof R=="number"?R<0?H=J.length-Y+R:H=R-Y:H=J.length-Y),H<0&&(H=0),this.stringBufferOffset+H>z&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),J.copy(this.stringBuffer,this.stringBufferOffset,Y,R),this.stringBufferOffset+=H},q.write=function(J){typeof J=="string"&&(J=new Buffer(J));for(var Y,R=0,H=J.length;R<H;R++)if(this.tState===g){if(Y=J[R],this.offset++,Y===123)this.onToken(u,"{");else if(Y===125)this.onToken(i,"}");else if(Y===91)this.onToken(a,"[");else if(Y===93)this.onToken(c,"]");else if(Y===58)this.onToken(r,":");else if(Y===44)this.onToken(n,",");else if(Y===116)this.tState=f;else if(Y===102)this.tState=E;else if(Y===110)this.tState=w;else if(Y===34)this.string="",this.stringBufferOffset=0,this.tState=$;else if(Y===45)this.string="-",this.tState=P;else if(Y>=48&&Y<64)this.string=String.fromCharCode(Y),this.tState=L;else if(!(Y===32||Y===9||Y===10||Y===13))return this.charError(J,R)}else if(this.tState===$)if(Y=J[R],this.bytes_remaining>0){for(var ee=0;ee<this.bytes_remaining;ee++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+ee]=J[ee];this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]),this.bytes_in_sequence=this.bytes_remaining=0,R=R+ee-1}else if(this.bytes_remaining===0&&Y>=128){if(Y<=193||Y>244)return this.onError(new Error("Invalid UTF-8 character at position "+R+" in state "+j.toknam(this.tState)));if(Y>=194&&Y<=223&&(this.bytes_in_sequence=2),Y>=224&&Y<=239&&(this.bytes_in_sequence=3),Y>=240&&Y<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+R>J.length){for(var ne=0;ne<=J.length-1-R;ne++)this.temp_buffs[this.bytes_in_sequence][ne]=J[R+ne];this.bytes_remaining=R+this.bytes_in_sequence-J.length,R=J.length-1}else this.appendStringBuf(J,R,R+this.bytes_in_sequence),R=R+this.bytes_in_sequence-1}else if(Y===34)this.tState=g,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(p,this.string),this.offset+=Buffer.byteLength(this.string,"utf8")+1,this.string=void 0;else if(Y===92)this.tState=x;else if(Y>=32)this.appendStringChar(Y);else return this.charError(J,R);else if(this.tState===x)if(Y=J[R],Y===34)this.appendStringChar(Y),this.tState=$;else if(Y===92)this.appendStringChar(T),this.tState=$;else if(Y===47)this.appendStringChar(C),this.tState=$;else if(Y===98)this.appendStringChar(Z),this.tState=$;else if(Y===102)this.appendStringChar(X),this.tState=$;else if(Y===110)this.appendStringChar(Q),this.tState=$;else if(Y===114)this.appendStringChar(k),this.tState=$;else if(Y===116)this.appendStringChar(F),this.tState=$;else if(Y===117)this.unicode="",this.tState=M;else return this.charError(J,R);else if(this.tState===M||this.tState===U||this.tState===V||this.tState===B)if(Y=J[R],Y>=48&&Y<64||Y>64&&Y<=70||Y>96&&Y<=102){if(this.unicode+=String.fromCharCode(Y),this.tState++===B){var te=parseInt(this.unicode,16);this.unicode=void 0,this.highSurrogate!==void 0&&te>=56320&&te<57344?(this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate,te))),this.highSurrogate=void 0):this.highSurrogate===void 0&&te>=55296&&te<56320?this.highSurrogate=te:(this.highSurrogate!==void 0&&(this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new Buffer(String.fromCharCode(te)))),this.tState=$}}else return this.charError(J,R);else if(this.tState===P||this.tState===L)switch(Y=J[R],Y){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 46:case 101:case 69:case 43:case 45:this.string+=String.fromCharCode(Y),this.tState=L;break;default:this.tState=g;var ae=Number(this.string);if(isNaN(ae))return this.charError(J,R);this.string.match(/[0-9]+/)==this.string&&ae.toString()!=this.string?this.onToken(p,this.string):this.onToken(d,ae),this.offset+=this.string.length-1,this.string=void 0,R--;break}else if(this.tState===f)if(J[R]===114)this.tState=y;else return this.charError(J,R);else if(this.tState===y)if(J[R]===117)this.tState=S;else return this.charError(J,R);else if(this.tState===S)if(J[R]===101)this.tState=g,this.onToken(o,!0),this.offset+=3;else return this.charError(J,R);else if(this.tState===E)if(J[R]===97)this.tState=b;else return this.charError(J,R);else if(this.tState===b)if(J[R]===108)this.tState=_;else return this.charError(J,R);else if(this.tState===_)if(J[R]===115)this.tState=O;else return this.charError(J,R);else if(this.tState===O)if(J[R]===101)this.tState=g,this.onToken(l,!1),this.offset+=4;else return this.charError(J,R);else if(this.tState===w)if(J[R]===117)this.tState=A;else return this.charError(J,R);else if(this.tState===A)if(J[R]===108)this.tState=I;else return this.charError(J,R);else if(this.tState===I)if(J[R]===108)this.tState=g,this.onToken(h,null),this.offset+=3;else return this.charError(J,R)},q.onToken=function(J,Y){},q.parseError=function(J,Y){this.tState=m,this.onError(new Error("Unexpected "+j.toknam(J)+(Y?"("+JSON.stringify(Y)+")":"")+" in state "+j.toknam(this.state)))},q.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},q.pop=function(){var J=this.value,Y=this.stack.pop();this.value=Y.value,this.key=Y.key,this.mode=Y.mode,this.emit(J),this.mode||(this.state=G)},q.emit=function(J){this.mode&&(this.state=n),this.onValue(J)},q.onValue=function(J){},q.onToken=function(J,Y){if(this.state===G)if(J===p||J===d||J===o||J===l||J===h)this.value&&(this.value[this.key]=Y),this.emit(Y);else if(J===u)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=W,this.mode=N;else if(J===a)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=D,this.state=G;else if(J===i)if(this.mode===N)this.pop();else return this.parseError(J,Y);else if(J===c)if(this.mode===D)this.pop();else return this.parseError(J,Y);else return this.parseError(J,Y);else if(this.state===W)if(J===p)this.key=Y,this.state=r;else if(J===i)this.pop();else return this.parseError(J,Y);else if(this.state===r)if(J===r)this.state=G;else return this.parseError(J,Y);else if(this.state===n)if(J===n)this.mode===D?(this.key++,this.state=G):this.mode===N&&(this.state=W);else if(J===c&&this.mode===D||J===i&&this.mode===N)this.pop();else return this.parseError(J,Y);else return this.parseError(J,Y)},j.C=s,t.exports=j}),fk=K((e,t)=>{var s=dk(),{Minipass:u}=xe(),i=class extends Error{static{v(this,"JSONStreamError")}constructor(r,n){super(r.message),Error.captureStackTrace(this,n||this.constructor)}get name(){return"JSONStreamError"}},a=v((r,n)=>typeof r=="string"?String(n)===r:r&&typeof r.test=="function"?r.test(n):typeof r=="boolean"||typeof r=="object"?r:typeof r=="function"?r(n):!1,"check"),c=class Rg extends u{static{v(this,"JSONStream")}#e=0;#t=!1;#r=null;#s=null;#i=null;#l;#c;#h=null;#n=null;constructor(n){super({...n,objectMode:!0});let o=this.#c=new s;o.onValue=l=>this.#a(l),this.#l=o.onToken,o.onToken=(l,h)=>this.#u(l,h),o.onError=l=>this.#o(l),this.#h=typeof n.path=="string"?n.path.split(".").map(l=>l==="$*"?{emitKey:!0}:l==="*"?!0:l===""?{recurse:!0}:l):Array.isArray(n.path)&&n.path.length?n.path:null,typeof n.map=="function"&&(this.#i=n.map)}#p(n,o){this.#s!==!1&&(this.#s=this.#s||{},this.#s[n]=o),this.#r!==!1&&this.#s===!1&&(this.#r=this.#r||{},this.#r[n]=o)}#o(n){let o=this.#t?this.end:this.write;return this.#t=!1,this.emit("error",new i(n,o))}#u(n,o){let l=this.#c;if(this.#l.call(this.#c,n,o),l.stack.length===0&&this.#n){let h=this.#n;this.#h||super.write(h),this.#n=null,this.#e=0}}#a(n){let o=this.#c;if(this.#n=n,!this.#h)return;let l=0,h=0,p=!1;for(;l<this.#h.length;){let g=this.#h[l];if(h++,g&&!g.recurse){let m=h===o.stack.length?o:o.stack[h];if(!m)return;if(!a(g,m.key)){this.#p(m.key,n);return}p=!!g.emitKey,l++}else{if(l++,l>=this.#h.length)return;let m=this.#h[l];if(!m)return;for(;;){let f=h===o.stack.length?o:o.stack[h];if(!f)return;if(a(m,f.key)){l++,Object.isFrozen(o.stack[h])||(o.stack[h].value=null);break}else this.#p(f.key,n);h++}}}if(this.#s){let g=this.#s;this.#s=!1,this.emit("header",g)}if(h!==o.stack.length)return;this.#e++;let d=o.stack.slice(1).map(g=>g.key).concat([o.key]);if(n!=null){let g=this.#i?this.#i(n,d):n;if(g!=null){let m=p?{value:g}:g;p&&(m.key=o.key),super.write(m)}}o.value&&delete o.value[o.key];for(let g of o.stack)g.value=null}write(n,o){if(typeof n=="string")n=Buffer.from(n,o);else if(!Buffer.isBuffer(n))return this.emit("error",new TypeError("Can only parse JSON from string or buffer input"));return this.#c.write(n),this.flowing}end(n,o){this.#t=!0,n&&this.write(n,o);let l=this.#s;this.#s=null;let h=this.#r;return this.#r=null,l&&this.emit("header",l),h&&this.emit("footer",h),super.end()}static get JSONStreamError(){return i}static parse(n,o){return new Rg({path:n,map:o})}};t.exports=c}),Ag=K((e,t)=>{"use strict";var{HttpErrorAuthOTP:s}=sg(),u=NN(),i=kN(),a=Wi(),c=fk(),r=ps(),n=require("querystring"),o=require("url"),l=Gi(),{Minipass:h}=xe(),p=lg(),d=v(b=>{try{return!!new o.URL(b)}catch{return!1}},"urlIsValid");t.exports=g;function g(b,_={}){let O={...p,..._},w=d(b),A=O.registry||p.registry;w||(A=O.registry=O.spec&&y(O.spec,O)||O.registry||A,b=`${A.trim().replace(/\/?$/g,"")}/${b.trim().replace(/^\//,"")}`,new o.URL(b));let I=O.method||"GET",P=Date.now(),L=i(b,O),$=E(b,L,O),x=O.body,M=h.isStream(x),U=x&&typeof x=="object"&&typeof x.then=="function";if(x&&!M&&!U&&typeof x!="string"&&!Buffer.isBuffer(x)?($["content-type"]=$["content-type"]||"application/json",x=JSON.stringify(x)):x&&!$["content-type"]&&($["content-type"]="application/octet-stream"),O.gzip)if($["content-encoding"]="gzip",M){let G=new l.Gzip;x.on("error",W=>G.emit("error",W)),x=x.pipe(G)}else U||(x=new l.Gzip().end(x).concat());let V=new o.URL(b);if(O.query){let G=typeof O.query=="string"?n.parse(O.query):O.query;Object.keys(G).forEach(W=>{G[W]!==void 0&&V.searchParams.set(W,G[W])}),b=o.format(V)}V.searchParams.get("write")==="true"&&I==="GET"&&(O.offline=!1,O.preferOffline=!1,O.preferOnline=!0);let B=v(async G=>{let W=a(b,{agent:O.agent,algorithms:O.algorithms,body:G,cache:S(O),cachePath:O.cache,ca:O.ca,cert:L.cert||O.cert,headers:$,integrity:O.integrity,key:L.key||O.key,localAddress:O.localAddress,maxSockets:O.maxSockets,memoize:O.memoize,method:I,noProxy:O.noProxy,proxy:O.httpsProxy||O.proxy,retry:O.retry?O.retry:{retries:O.fetchRetries,factor:O.fetchRetryFactor,minTimeout:O.fetchRetryMintimeout,maxTimeout:O.fetchRetryMaxtimeout},strictSSL:O.strictSSL,timeout:O.timeout||3e4}).then(N=>u({method:I,uri:b,res:N,registry:A,startTime:P,auth:L,opts:O}));return typeof O.otpPrompt=="function"?W.catch(async N=>{if(N instanceof s){let D;try{D=await O.otpPrompt()}catch{}if(!D)throw N;return g(b,{...O,otp:D})}throw N}):W},"doFetch");return Promise.resolve(x).then(B)}v(g,"regFetch"),t.exports.getAuth=i,t.exports.json=m;function m(b,_){return g(b,_).then(O=>O.json())}v(m,"fetchJSON"),t.exports.json.stream=f;function f(b,_,O={}){let w={...p,...O},A=c.parse(_,w.mapJSON);return g(b,w).then(I=>I.body.on("error",P=>A.emit("error",P)).pipe(A)).catch(I=>A.emit("error",I)),A}v(f,"fetchJSONStream"),t.exports.pickRegistry=y;function y(b,_={}){b=r(b);let O=b.scope&&_[b.scope.replace(/^@?/,"@")+":registry"];return!O&&_.scope&&(O=_[_.scope.replace(/^@?/,"@")+":registry"]),O||(O=_.registry||p.registry),O}v(y,"pickRegistry");function S(b){return b.offline?"only-if-cached":b.preferOffline?"force-cache":b.preferOnline?"no-cache":"default"}v(S,"getCacheMode");function E(b,_,O){let w=Object.assign({"user-agent":O.userAgent},O.headers||{});return O.authType&&(w["npm-auth-type"]=O.authType),O.scope&&(w["npm-scope"]=O.scope),O.npmSession&&(w["npm-session"]=O.npmSession),O.npmCommand&&(w["npm-command"]=O.npmCommand),_.token?w.authorization=`Bearer ${_.token}`:_.auth&&(w.authorization=`Basic ${_.auth}`),O.otp&&(w["npm-otp"]=O.otp),w}v(E,"getHeaders")}),Cg=K((e,t)=>{t.exports={name:"pacote",version:"21.0.1",description:"JavaScript package downloader",author:"GitHub Inc.",bin:{pacote:"bin/index.js"},license:"ISC",main:"lib/index.js",scripts:{test:"tap",snap:"tap",lint:"npm run eslint",postlint:"template-oss-check",lintfix:"npm run eslint -- --fix",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},tap:{timeout:300,"nyc-arg":["--exclude","tap-snapshots/**"]},devDependencies:{"@npmcli/arborist":"^9.0.2","@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.23.4","hosted-git-info":"^9.0.0","mutate-fs":"^2.1.1",nock:"^13.2.4","npm-registry-mock":"^1.3.2",rimraf:"^6.0.1",tap:"^16.0.1"},files:["bin/","lib/"],keywords:["packages","npm","git"],dependencies:{"@npmcli/git":"^6.0.0","@npmcli/installed-package-contents":"^3.0.0","@npmcli/package-json":"^7.0.0","@npmcli/promise-spawn":"^8.0.0","@npmcli/run-script":"^10.0.0",cacache:"^20.0.0","fs-minipass":"^3.0.0",minipass:"^7.0.2","npm-package-arg":"^13.0.0","npm-packlist":"^10.0.1","npm-pick-manifest":"^10.0.0","npm-registry-fetch":"^19.0.0","proc-log":"^5.0.0","promise-retry":"^2.0.1",sigstore:"^4.0.0",ssri:"^12.0.0",tar:"^7.4.3"},engines:{node:"^20.17.0 || >=22.9.0"},repository:{type:"git",url:"git+https://github.com/npm/pacote.git"},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.23.4",windowsCI:!1,publish:"true"}}}),zi=K((e,t)=>{var s=Ag(),{Minipass:u}=xe(),i=Ar(),a=ys(),c=_r(),r=Cg().version,n=class extends i{static{v(this,"RemoteFetcher")}constructor(o,l){super(o,l),this.resolved=this.spec.fetchSpec;let h=new URL(this.resolved);this.replaceRegistryHost!=="never"&&(this.replaceRegistryHost==="always"||this.replaceRegistryHost===h.host)&&(this.resolved=new URL(h.pathname,this.registry).href);let p=this.spec.name?`${this.spec.name}@`:"";this.pkgid=l.pkgid?l.pkgid:`remote:${p}${this.resolved}`}get[c.cacheFetches](){return!1}[c.tarballFromResolved](){let o=new u;o.hasIntegrityEmitter=!0;let l={...this.opts,headers:this.#e(),spec:this.spec,integrity:this.integrity,algorithms:[this.pickIntegrityAlgorithm()]};return s(this.resolved,l).then(h=>{h.body.on("error",p=>o.emit("error",p)),h.body.on("integrity",p=>{this.integrity=p,o.emit("integrity",p)}),h.body.pipe(o)}).catch(h=>o.emit("error",h)),o}#e(){return{"user-agent":this.opts.userAgent||`pacote/${r} node/${process.version}`,...this.opts.headers||{},"pacote-version":r,"pacote-req-type":"tarball","pacote-pkg-id":this.pkgid,...this.integrity?{"pacote-integrity":String(this.integrity)}:{},...this.opts.headers||{}}}get types(){return["remote"]}packument(){return a.prototype.packument.apply(this)}manifest(){return a.prototype.manifest.apply(this)}};t.exports=n}),gk=K((e,t)=>{var s=v((u,i)=>{if(u.hosted){let a=u.hosted,c={noCommittish:!0};return`${a.https&&a.auth?a.https(c):a.shortcut(c)}#${i}`}else return u.rawSpec.replace(/#.*$/,"")+`#${i}`},"addGitSha");t.exports=s}),mk=K((e,t)=>{var s=El();t.exports=(u,i,a,c,r)=>{let n=u.endsWith(".js"),o=n?process.execPath:u,l=(n?[u]:[]).concat(i);return s(o,l,{cwd:a,env:c},r)}}),Ig=K((e,t)=>{var s=Hi(),u=Nf(),i=ps(),a=Cl(),{Minipass:c}=xe(),{log:r}=ft(),n=Bl(),o=Ar(),l=ys(),h=zi(),p=_r(),d=gk(),g=mk(),m=/^[a-f0-9]{40}$/,f=v((E,b)=>E.sshurl&&!(E.https&&E.auth)&&y(E.sshurl(b))||E.https&&y(E.https(b)),"repoUrl"),y=v(E=>E&&`git+${E}`.replace(/^(git\+)+/,"git+"),"addGitPlus"),S=class extends o{static{v(this,"GitFetcher")}constructor(E,b){super(E,b),this.opts.integrity&&(delete this.opts.integrity,r.warn(`skipping integrity check for git dependency ${this.spec.fetchSpec}`)),this.resolvedRef=null,this.spec.hosted&&(this.from=this.spec.hosted.shortcut({noCommittish:!1})),this.spec.gitCommittish&&m.test(this.spec.gitCommittish)?(this.resolvedSha=this.spec.gitCommittish,this.resolved=this.spec.hosted?f(this.spec.hosted,{noCommittish:!1}):this.spec.rawSpec):this.resolvedSha="",this.Arborist=b.Arborist||null}static repoUrl(E,b){return f(E,b)}get types(){return["git"]}resolve(){if(this.resolved)return super.resolve();let E=this.spec.hosted;return E?this.#e(E):this.#t(this.spec.fetchSpec)}#e(E){return this.#t(E.https&&E.https()).catch(b=>{if(b instanceof u.errors.GitPathspecError)throw b;let _=E.sshurl&&E.sshurl();if(!_||E.auth)throw b;return this.#t(_)})}#t(E){if(!E)return Promise.reject(new Error(`No git url for ${this.spec}`));let b=this.spec.gitRange,_=this.spec.name;return u.revs(E,this.opts).then(O=>b?a({versions:O.versions,"dist-tags":O["dist-tags"],name:_},b,this.opts):this.spec.gitCommittish?O.refs[this.spec.gitCommittish]||O.refs[O.shas[this.spec.gitCommittish]]:O.refs.HEAD).then(O=>!O||!O.sha?this.#i():(this.resolvedRef=O,this.resolvedSha=O.sha,this.#s(O.sha),this.resolved))}#r(E){this.resolved=this.spec.hosted?f(i(E).hosted,{noCommittish:!1}):E}#s(E){this.#r(d(this.spec,E))}#i(){return this.#c(()=>this.resolved)}#l(E){return this[p.readPackageJson](E).then(b=>{let _=b.scripts;if(!b.workspaces&&(!_||!(_.postinstall||_.build||_.preinstall||_.install||_.prepack||_.prepare)))return;let O=process.env._PACOTE_NO_PREPARE_?process.env._PACOTE_NO_PREPARE_.split(`
|
|
73
|
+
`):[];if(O.includes(this.resolved)){r.info("prepare","skip prepare, already seen",this.resolved);return}return O.push(this.resolved),g(this.npmBin,[].concat(this.npmInstallCmd).concat(this.npmCliConfig),E,{...process.env,_PACOTE_NO_PREPARE_:O.join(`
|
|
74
|
+
`)},{message:"git dep preparation failed"})})}[p.tarballFromResolved](){let E=new c;return E.resolved=this.resolved,E.from=this.from,this.#c(b=>this.#l(b).then(()=>new Promise((_,O)=>{if(!this.Arborist)throw new Error("GitFetcher requires an Arborist constructor to pack a tarball");let w=new n(`file:${b}`,{...this.opts,Arborist:this.Arborist,resolved:null,integrity:null})[p.tarballFromResolved]();w.on("error",O),w.on("end",_),w.pipe(E)}))).catch(b=>E.emit("error",b)),E}#c(E,b=!0){let _={tmpPrefix:"git-clone"},O=this.resolvedSha||this.spec.gitCommittish,w=this.spec.hosted,A=this.resolved;return b=b&&w&&A===f(w,{noCommittish:!1})&&w.tarball,s.tmp.withTmp(this.cache,_,async I=>{if(b){let L=this.spec.name?`${this.spec.name}@`:"";return new h(w.tarball({noCommittish:!1}),{...this.opts,allowGitIgnore:!0,pkgid:`git:${L}${this.resolved}`,resolved:this.resolved,integrity:null}).extract(I).then(()=>E(I),$=>{if($.constructor.name.match(/^Http/))return this.#c(E,!1);throw $})}let P=await(w?this.#h(O,I):this.#n(this.spec.fetchSpec,O,I));return this.resolvedSha=P,this.resolved||await this.#s(P),E(I)})}#h(E,b){let _=this.spec.hosted;return this.#n(_.https({noCommittish:!0}),E,b).catch(O=>{if(O instanceof u.errors.GitPathspecError)throw O;let w=_.sshurl&&_.sshurl({noCommittish:!0});if(!w||_.auth)throw O;return this.#n(w,E,b)})}#n(E,b,_){let{opts:O,spec:w}=this;return u.clone(E,b,_,{...O,spec:w})}manifest(){return this.package?Promise.resolve(this.package):this.spec.hosted&&this.resolved?l.prototype.manifest.apply(this):this.#c(E=>this[p.readPackageJson](E).then(b=>this.package={...b,_resolved:this.resolved,_from:this.from}))}packument(){return l.prototype.packument.apply(this)}};t.exports=S}),Tg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Signature=e.Envelope=void 0,e.Envelope={fromJSON(i){return{payload:u(i.payload)?Buffer.from(t(i.payload)):Buffer.alloc(0),payloadType:u(i.payloadType)?globalThis.String(i.payloadType):"",signatures:globalThis.Array.isArray(i?.signatures)?i.signatures.map(a=>e.Signature.fromJSON(a)):[]}},toJSON(i){let a={};return i.payload.length!==0&&(a.payload=s(i.payload)),i.payloadType!==""&&(a.payloadType=i.payloadType),i.signatures?.length&&(a.signatures=i.signatures.map(c=>e.Signature.toJSON(c))),a}},e.Signature={fromJSON(i){return{sig:u(i.sig)?Buffer.from(t(i.sig)):Buffer.alloc(0),keyid:u(i.keyid)?globalThis.String(i.keyid):""}},toJSON(i){let a={};return i.sig.length!==0&&(a.sig=s(i.sig)),i.keyid!==""&&(a.keyid=i.keyid),a}};function t(i){return Uint8Array.from(globalThis.Buffer.from(i,"base64"))}v(t,"bytesFromBase64");function s(i){return globalThis.Buffer.from(i).toString("base64")}v(s,"base64FromBytes");function u(i){return i!=null}v(u,"isSet")}),yk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Timestamp=void 0,e.Timestamp={fromJSON(s){return{seconds:t(s.seconds)?globalThis.String(s.seconds):"0",nanos:t(s.nanos)?globalThis.Number(s.nanos):0}},toJSON(s){let u={};return s.seconds!=="0"&&(u.seconds=s.seconds),s.nanos!==0&&(u.nanos=Math.round(s.nanos)),u}};function t(s){return s!=null}v(t,"isSet")}),Ss=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimeRange=e.X509CertificateChain=e.SubjectAlternativeName=e.X509Certificate=e.DistinguishedName=e.ObjectIdentifierValuePair=e.ObjectIdentifier=e.PublicKeyIdentifier=e.PublicKey=e.RFC3161SignedTimestamp=e.LogId=e.MessageSignature=e.HashOutput=e.SubjectAlternativeNameType=e.PublicKeyDetails=e.HashAlgorithm=void 0,e.hashAlgorithmFromJSON=u,e.hashAlgorithmToJSON=i,e.publicKeyDetailsFromJSON=c,e.publicKeyDetailsToJSON=r,e.subjectAlternativeNameTypeFromJSON=o,e.subjectAlternativeNameTypeToJSON=l;var t=yk(),s;(function(f){f[f.HASH_ALGORITHM_UNSPECIFIED=0]="HASH_ALGORITHM_UNSPECIFIED",f[f.SHA2_256=1]="SHA2_256",f[f.SHA2_384=2]="SHA2_384",f[f.SHA2_512=3]="SHA2_512",f[f.SHA3_256=4]="SHA3_256",f[f.SHA3_384=5]="SHA3_384"})(s||(e.HashAlgorithm=s={}));function u(f){switch(f){case 0:case"HASH_ALGORITHM_UNSPECIFIED":return s.HASH_ALGORITHM_UNSPECIFIED;case 1:case"SHA2_256":return s.SHA2_256;case 2:case"SHA2_384":return s.SHA2_384;case 3:case"SHA2_512":return s.SHA2_512;case 4:case"SHA3_256":return s.SHA3_256;case 5:case"SHA3_384":return s.SHA3_384;default:throw new globalThis.Error("Unrecognized enum value "+f+" for enum HashAlgorithm")}}v(u,"hashAlgorithmFromJSON");function i(f){switch(f){case s.HASH_ALGORITHM_UNSPECIFIED:return"HASH_ALGORITHM_UNSPECIFIED";case s.SHA2_256:return"SHA2_256";case s.SHA2_384:return"SHA2_384";case s.SHA2_512:return"SHA2_512";case s.SHA3_256:return"SHA3_256";case s.SHA3_384:return"SHA3_384";default:throw new globalThis.Error("Unrecognized enum value "+f+" for enum HashAlgorithm")}}v(i,"hashAlgorithmToJSON");var a;(function(f){f[f.PUBLIC_KEY_DETAILS_UNSPECIFIED=0]="PUBLIC_KEY_DETAILS_UNSPECIFIED",f[f.PKCS1_RSA_PKCS1V5=1]="PKCS1_RSA_PKCS1V5",f[f.PKCS1_RSA_PSS=2]="PKCS1_RSA_PSS",f[f.PKIX_RSA_PKCS1V5=3]="PKIX_RSA_PKCS1V5",f[f.PKIX_RSA_PSS=4]="PKIX_RSA_PSS",f[f.PKIX_RSA_PKCS1V15_2048_SHA256=9]="PKIX_RSA_PKCS1V15_2048_SHA256",f[f.PKIX_RSA_PKCS1V15_3072_SHA256=10]="PKIX_RSA_PKCS1V15_3072_SHA256",f[f.PKIX_RSA_PKCS1V15_4096_SHA256=11]="PKIX_RSA_PKCS1V15_4096_SHA256",f[f.PKIX_RSA_PSS_2048_SHA256=16]="PKIX_RSA_PSS_2048_SHA256",f[f.PKIX_RSA_PSS_3072_SHA256=17]="PKIX_RSA_PSS_3072_SHA256",f[f.PKIX_RSA_PSS_4096_SHA256=18]="PKIX_RSA_PSS_4096_SHA256",f[f.PKIX_ECDSA_P256_HMAC_SHA_256=6]="PKIX_ECDSA_P256_HMAC_SHA_256",f[f.PKIX_ECDSA_P256_SHA_256=5]="PKIX_ECDSA_P256_SHA_256",f[f.PKIX_ECDSA_P384_SHA_384=12]="PKIX_ECDSA_P384_SHA_384",f[f.PKIX_ECDSA_P521_SHA_512=13]="PKIX_ECDSA_P521_SHA_512",f[f.PKIX_ED25519=7]="PKIX_ED25519",f[f.PKIX_ED25519_PH=8]="PKIX_ED25519_PH",f[f.PKIX_ECDSA_P384_SHA_256=19]="PKIX_ECDSA_P384_SHA_256",f[f.PKIX_ECDSA_P521_SHA_256=20]="PKIX_ECDSA_P521_SHA_256",f[f.LMS_SHA256=14]="LMS_SHA256",f[f.LMOTS_SHA256=15]="LMOTS_SHA256",f[f.ML_DSA_65=21]="ML_DSA_65",f[f.ML_DSA_87=22]="ML_DSA_87"})(a||(e.PublicKeyDetails=a={}));function c(f){switch(f){case 0:case"PUBLIC_KEY_DETAILS_UNSPECIFIED":return a.PUBLIC_KEY_DETAILS_UNSPECIFIED;case 1:case"PKCS1_RSA_PKCS1V5":return a.PKCS1_RSA_PKCS1V5;case 2:case"PKCS1_RSA_PSS":return a.PKCS1_RSA_PSS;case 3:case"PKIX_RSA_PKCS1V5":return a.PKIX_RSA_PKCS1V5;case 4:case"PKIX_RSA_PSS":return a.PKIX_RSA_PSS;case 9:case"PKIX_RSA_PKCS1V15_2048_SHA256":return a.PKIX_RSA_PKCS1V15_2048_SHA256;case 10:case"PKIX_RSA_PKCS1V15_3072_SHA256":return a.PKIX_RSA_PKCS1V15_3072_SHA256;case 11:case"PKIX_RSA_PKCS1V15_4096_SHA256":return a.PKIX_RSA_PKCS1V15_4096_SHA256;case 16:case"PKIX_RSA_PSS_2048_SHA256":return a.PKIX_RSA_PSS_2048_SHA256;case 17:case"PKIX_RSA_PSS_3072_SHA256":return a.PKIX_RSA_PSS_3072_SHA256;case 18:case"PKIX_RSA_PSS_4096_SHA256":return a.PKIX_RSA_PSS_4096_SHA256;case 6:case"PKIX_ECDSA_P256_HMAC_SHA_256":return a.PKIX_ECDSA_P256_HMAC_SHA_256;case 5:case"PKIX_ECDSA_P256_SHA_256":return a.PKIX_ECDSA_P256_SHA_256;case 12:case"PKIX_ECDSA_P384_SHA_384":return a.PKIX_ECDSA_P384_SHA_384;case 13:case"PKIX_ECDSA_P521_SHA_512":return a.PKIX_ECDSA_P521_SHA_512;case 7:case"PKIX_ED25519":return a.PKIX_ED25519;case 8:case"PKIX_ED25519_PH":return a.PKIX_ED25519_PH;case 19:case"PKIX_ECDSA_P384_SHA_256":return a.PKIX_ECDSA_P384_SHA_256;case 20:case"PKIX_ECDSA_P521_SHA_256":return a.PKIX_ECDSA_P521_SHA_256;case 14:case"LMS_SHA256":return a.LMS_SHA256;case 15:case"LMOTS_SHA256":return a.LMOTS_SHA256;case 21:case"ML_DSA_65":return a.ML_DSA_65;case 22:case"ML_DSA_87":return a.ML_DSA_87;default:throw new globalThis.Error("Unrecognized enum value "+f+" for enum PublicKeyDetails")}}v(c,"publicKeyDetailsFromJSON");function r(f){switch(f){case a.PUBLIC_KEY_DETAILS_UNSPECIFIED:return"PUBLIC_KEY_DETAILS_UNSPECIFIED";case a.PKCS1_RSA_PKCS1V5:return"PKCS1_RSA_PKCS1V5";case a.PKCS1_RSA_PSS:return"PKCS1_RSA_PSS";case a.PKIX_RSA_PKCS1V5:return"PKIX_RSA_PKCS1V5";case a.PKIX_RSA_PSS:return"PKIX_RSA_PSS";case a.PKIX_RSA_PKCS1V15_2048_SHA256:return"PKIX_RSA_PKCS1V15_2048_SHA256";case a.PKIX_RSA_PKCS1V15_3072_SHA256:return"PKIX_RSA_PKCS1V15_3072_SHA256";case a.PKIX_RSA_PKCS1V15_4096_SHA256:return"PKIX_RSA_PKCS1V15_4096_SHA256";case a.PKIX_RSA_PSS_2048_SHA256:return"PKIX_RSA_PSS_2048_SHA256";case a.PKIX_RSA_PSS_3072_SHA256:return"PKIX_RSA_PSS_3072_SHA256";case a.PKIX_RSA_PSS_4096_SHA256:return"PKIX_RSA_PSS_4096_SHA256";case a.PKIX_ECDSA_P256_HMAC_SHA_256:return"PKIX_ECDSA_P256_HMAC_SHA_256";case a.PKIX_ECDSA_P256_SHA_256:return"PKIX_ECDSA_P256_SHA_256";case a.PKIX_ECDSA_P384_SHA_384:return"PKIX_ECDSA_P384_SHA_384";case a.PKIX_ECDSA_P521_SHA_512:return"PKIX_ECDSA_P521_SHA_512";case a.PKIX_ED25519:return"PKIX_ED25519";case a.PKIX_ED25519_PH:return"PKIX_ED25519_PH";case a.PKIX_ECDSA_P384_SHA_256:return"PKIX_ECDSA_P384_SHA_256";case a.PKIX_ECDSA_P521_SHA_256:return"PKIX_ECDSA_P521_SHA_256";case a.LMS_SHA256:return"LMS_SHA256";case a.LMOTS_SHA256:return"LMOTS_SHA256";case a.ML_DSA_65:return"ML_DSA_65";case a.ML_DSA_87:return"ML_DSA_87";default:throw new globalThis.Error("Unrecognized enum value "+f+" for enum PublicKeyDetails")}}v(r,"publicKeyDetailsToJSON");var n;(function(f){f[f.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED=0]="SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED",f[f.EMAIL=1]="EMAIL",f[f.URI=2]="URI",f[f.OTHER_NAME=3]="OTHER_NAME"})(n||(e.SubjectAlternativeNameType=n={}));function o(f){switch(f){case 0:case"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED":return n.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED;case 1:case"EMAIL":return n.EMAIL;case 2:case"URI":return n.URI;case 3:case"OTHER_NAME":return n.OTHER_NAME;default:throw new globalThis.Error("Unrecognized enum value "+f+" for enum SubjectAlternativeNameType")}}v(o,"subjectAlternativeNameTypeFromJSON");function l(f){switch(f){case n.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED:return"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED";case n.EMAIL:return"EMAIL";case n.URI:return"URI";case n.OTHER_NAME:return"OTHER_NAME";default:throw new globalThis.Error("Unrecognized enum value "+f+" for enum SubjectAlternativeNameType")}}v(l,"subjectAlternativeNameTypeToJSON"),e.HashOutput={fromJSON(f){return{algorithm:m(f.algorithm)?u(f.algorithm):0,digest:m(f.digest)?Buffer.from(h(f.digest)):Buffer.alloc(0)}},toJSON(f){let y={};return f.algorithm!==0&&(y.algorithm=i(f.algorithm)),f.digest.length!==0&&(y.digest=p(f.digest)),y}},e.MessageSignature={fromJSON(f){return{messageDigest:m(f.messageDigest)?e.HashOutput.fromJSON(f.messageDigest):void 0,signature:m(f.signature)?Buffer.from(h(f.signature)):Buffer.alloc(0)}},toJSON(f){let y={};return f.messageDigest!==void 0&&(y.messageDigest=e.HashOutput.toJSON(f.messageDigest)),f.signature.length!==0&&(y.signature=p(f.signature)),y}},e.LogId={fromJSON(f){return{keyId:m(f.keyId)?Buffer.from(h(f.keyId)):Buffer.alloc(0)}},toJSON(f){let y={};return f.keyId.length!==0&&(y.keyId=p(f.keyId)),y}},e.RFC3161SignedTimestamp={fromJSON(f){return{signedTimestamp:m(f.signedTimestamp)?Buffer.from(h(f.signedTimestamp)):Buffer.alloc(0)}},toJSON(f){let y={};return f.signedTimestamp.length!==0&&(y.signedTimestamp=p(f.signedTimestamp)),y}},e.PublicKey={fromJSON(f){return{rawBytes:m(f.rawBytes)?Buffer.from(h(f.rawBytes)):void 0,keyDetails:m(f.keyDetails)?c(f.keyDetails):0,validFor:m(f.validFor)?e.TimeRange.fromJSON(f.validFor):void 0}},toJSON(f){let y={};return f.rawBytes!==void 0&&(y.rawBytes=p(f.rawBytes)),f.keyDetails!==0&&(y.keyDetails=r(f.keyDetails)),f.validFor!==void 0&&(y.validFor=e.TimeRange.toJSON(f.validFor)),y}},e.PublicKeyIdentifier={fromJSON(f){return{hint:m(f.hint)?globalThis.String(f.hint):""}},toJSON(f){let y={};return f.hint!==""&&(y.hint=f.hint),y}},e.ObjectIdentifier={fromJSON(f){return{id:globalThis.Array.isArray(f?.id)?f.id.map(y=>globalThis.Number(y)):[]}},toJSON(f){let y={};return f.id?.length&&(y.id=f.id.map(S=>Math.round(S))),y}},e.ObjectIdentifierValuePair={fromJSON(f){return{oid:m(f.oid)?e.ObjectIdentifier.fromJSON(f.oid):void 0,value:m(f.value)?Buffer.from(h(f.value)):Buffer.alloc(0)}},toJSON(f){let y={};return f.oid!==void 0&&(y.oid=e.ObjectIdentifier.toJSON(f.oid)),f.value.length!==0&&(y.value=p(f.value)),y}},e.DistinguishedName={fromJSON(f){return{organization:m(f.organization)?globalThis.String(f.organization):"",commonName:m(f.commonName)?globalThis.String(f.commonName):""}},toJSON(f){let y={};return f.organization!==""&&(y.organization=f.organization),f.commonName!==""&&(y.commonName=f.commonName),y}},e.X509Certificate={fromJSON(f){return{rawBytes:m(f.rawBytes)?Buffer.from(h(f.rawBytes)):Buffer.alloc(0)}},toJSON(f){let y={};return f.rawBytes.length!==0&&(y.rawBytes=p(f.rawBytes)),y}},e.SubjectAlternativeName={fromJSON(f){return{type:m(f.type)?o(f.type):0,identity:m(f.regexp)?{$case:"regexp",regexp:globalThis.String(f.regexp)}:m(f.value)?{$case:"value",value:globalThis.String(f.value)}:void 0}},toJSON(f){let y={};return f.type!==0&&(y.type=l(f.type)),f.identity?.$case==="regexp"?y.regexp=f.identity.regexp:f.identity?.$case==="value"&&(y.value=f.identity.value),y}},e.X509CertificateChain={fromJSON(f){return{certificates:globalThis.Array.isArray(f?.certificates)?f.certificates.map(y=>e.X509Certificate.fromJSON(y)):[]}},toJSON(f){let y={};return f.certificates?.length&&(y.certificates=f.certificates.map(S=>e.X509Certificate.toJSON(S))),y}},e.TimeRange={fromJSON(f){return{start:m(f.start)?g(f.start):void 0,end:m(f.end)?g(f.end):void 0}},toJSON(f){let y={};return f.start!==void 0&&(y.start=f.start.toISOString()),f.end!==void 0&&(y.end=f.end.toISOString()),y}};function h(f){return Uint8Array.from(globalThis.Buffer.from(f,"base64"))}v(h,"bytesFromBase64");function p(f){return globalThis.Buffer.from(f).toString("base64")}v(p,"base64FromBytes");function d(f){let y=(globalThis.Number(f.seconds)||0)*1e3;return y+=(f.nanos||0)/1e6,new globalThis.Date(y)}v(d,"fromTimestamp");function g(f){return f instanceof globalThis.Date?f:typeof f=="string"?new globalThis.Date(f):d(t.Timestamp.fromJSON(f))}v(g,"fromJsonTimestamp");function m(f){return f!=null}v(m,"isSet")}),Pg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TransparencyLogEntry=e.InclusionPromise=e.InclusionProof=e.Checkpoint=e.KindVersion=void 0;var t=Ss();e.KindVersion={fromJSON(a){return{kind:i(a.kind)?globalThis.String(a.kind):"",version:i(a.version)?globalThis.String(a.version):""}},toJSON(a){let c={};return a.kind!==""&&(c.kind=a.kind),a.version!==""&&(c.version=a.version),c}},e.Checkpoint={fromJSON(a){return{envelope:i(a.envelope)?globalThis.String(a.envelope):""}},toJSON(a){let c={};return a.envelope!==""&&(c.envelope=a.envelope),c}},e.InclusionProof={fromJSON(a){return{logIndex:i(a.logIndex)?globalThis.String(a.logIndex):"0",rootHash:i(a.rootHash)?Buffer.from(s(a.rootHash)):Buffer.alloc(0),treeSize:i(a.treeSize)?globalThis.String(a.treeSize):"0",hashes:globalThis.Array.isArray(a?.hashes)?a.hashes.map(c=>Buffer.from(s(c))):[],checkpoint:i(a.checkpoint)?e.Checkpoint.fromJSON(a.checkpoint):void 0}},toJSON(a){let c={};return a.logIndex!=="0"&&(c.logIndex=a.logIndex),a.rootHash.length!==0&&(c.rootHash=u(a.rootHash)),a.treeSize!=="0"&&(c.treeSize=a.treeSize),a.hashes?.length&&(c.hashes=a.hashes.map(r=>u(r))),a.checkpoint!==void 0&&(c.checkpoint=e.Checkpoint.toJSON(a.checkpoint)),c}},e.InclusionPromise={fromJSON(a){return{signedEntryTimestamp:i(a.signedEntryTimestamp)?Buffer.from(s(a.signedEntryTimestamp)):Buffer.alloc(0)}},toJSON(a){let c={};return a.signedEntryTimestamp.length!==0&&(c.signedEntryTimestamp=u(a.signedEntryTimestamp)),c}},e.TransparencyLogEntry={fromJSON(a){return{logIndex:i(a.logIndex)?globalThis.String(a.logIndex):"0",logId:i(a.logId)?t.LogId.fromJSON(a.logId):void 0,kindVersion:i(a.kindVersion)?e.KindVersion.fromJSON(a.kindVersion):void 0,integratedTime:i(a.integratedTime)?globalThis.String(a.integratedTime):"0",inclusionPromise:i(a.inclusionPromise)?e.InclusionPromise.fromJSON(a.inclusionPromise):void 0,inclusionProof:i(a.inclusionProof)?e.InclusionProof.fromJSON(a.inclusionProof):void 0,canonicalizedBody:i(a.canonicalizedBody)?Buffer.from(s(a.canonicalizedBody)):Buffer.alloc(0)}},toJSON(a){let c={};return a.logIndex!=="0"&&(c.logIndex=a.logIndex),a.logId!==void 0&&(c.logId=t.LogId.toJSON(a.logId)),a.kindVersion!==void 0&&(c.kindVersion=e.KindVersion.toJSON(a.kindVersion)),a.integratedTime!=="0"&&(c.integratedTime=a.integratedTime),a.inclusionPromise!==void 0&&(c.inclusionPromise=e.InclusionPromise.toJSON(a.inclusionPromise)),a.inclusionProof!==void 0&&(c.inclusionProof=e.InclusionProof.toJSON(a.inclusionProof)),a.canonicalizedBody.length!==0&&(c.canonicalizedBody=u(a.canonicalizedBody)),c}};function s(a){return Uint8Array.from(globalThis.Buffer.from(a,"base64"))}v(s,"bytesFromBase64");function u(a){return globalThis.Buffer.from(a).toString("base64")}v(u,"base64FromBytes");function i(a){return a!=null}v(i,"isSet")}),xg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Bundle=e.VerificationMaterial=e.TimestampVerificationData=void 0;var t=Tg(),s=Ss(),u=Pg();e.TimestampVerificationData={fromJSON(a){return{rfc3161Timestamps:globalThis.Array.isArray(a?.rfc3161Timestamps)?a.rfc3161Timestamps.map(c=>s.RFC3161SignedTimestamp.fromJSON(c)):[]}},toJSON(a){let c={};return a.rfc3161Timestamps?.length&&(c.rfc3161Timestamps=a.rfc3161Timestamps.map(r=>s.RFC3161SignedTimestamp.toJSON(r))),c}},e.VerificationMaterial={fromJSON(a){return{content:i(a.publicKey)?{$case:"publicKey",publicKey:s.PublicKeyIdentifier.fromJSON(a.publicKey)}:i(a.x509CertificateChain)?{$case:"x509CertificateChain",x509CertificateChain:s.X509CertificateChain.fromJSON(a.x509CertificateChain)}:i(a.certificate)?{$case:"certificate",certificate:s.X509Certificate.fromJSON(a.certificate)}:void 0,tlogEntries:globalThis.Array.isArray(a?.tlogEntries)?a.tlogEntries.map(c=>u.TransparencyLogEntry.fromJSON(c)):[],timestampVerificationData:i(a.timestampVerificationData)?e.TimestampVerificationData.fromJSON(a.timestampVerificationData):void 0}},toJSON(a){let c={};return a.content?.$case==="publicKey"?c.publicKey=s.PublicKeyIdentifier.toJSON(a.content.publicKey):a.content?.$case==="x509CertificateChain"?c.x509CertificateChain=s.X509CertificateChain.toJSON(a.content.x509CertificateChain):a.content?.$case==="certificate"&&(c.certificate=s.X509Certificate.toJSON(a.content.certificate)),a.tlogEntries?.length&&(c.tlogEntries=a.tlogEntries.map(r=>u.TransparencyLogEntry.toJSON(r))),a.timestampVerificationData!==void 0&&(c.timestampVerificationData=e.TimestampVerificationData.toJSON(a.timestampVerificationData)),c}},e.Bundle={fromJSON(a){return{mediaType:i(a.mediaType)?globalThis.String(a.mediaType):"",verificationMaterial:i(a.verificationMaterial)?e.VerificationMaterial.fromJSON(a.verificationMaterial):void 0,content:i(a.messageSignature)?{$case:"messageSignature",messageSignature:s.MessageSignature.fromJSON(a.messageSignature)}:i(a.dsseEnvelope)?{$case:"dsseEnvelope",dsseEnvelope:t.Envelope.fromJSON(a.dsseEnvelope)}:void 0}},toJSON(a){let c={};return a.mediaType!==""&&(c.mediaType=a.mediaType),a.verificationMaterial!==void 0&&(c.verificationMaterial=e.VerificationMaterial.toJSON(a.verificationMaterial)),a.content?.$case==="messageSignature"?c.messageSignature=s.MessageSignature.toJSON(a.content.messageSignature):a.content?.$case==="dsseEnvelope"&&(c.dsseEnvelope=t.Envelope.toJSON(a.content.dsseEnvelope)),c}};function i(a){return a!=null}v(i,"isSet")}),Ng=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientTrustConfig=e.ServiceConfiguration=e.Service=e.SigningConfig=e.TrustedRoot=e.CertificateAuthority=e.TransparencyLogInstance=e.ServiceSelector=void 0,e.serviceSelectorFromJSON=u,e.serviceSelectorToJSON=i;var t=Ss(),s;(function(c){c[c.SERVICE_SELECTOR_UNDEFINED=0]="SERVICE_SELECTOR_UNDEFINED",c[c.ALL=1]="ALL",c[c.ANY=2]="ANY",c[c.EXACT=3]="EXACT"})(s||(e.ServiceSelector=s={}));function u(c){switch(c){case 0:case"SERVICE_SELECTOR_UNDEFINED":return s.SERVICE_SELECTOR_UNDEFINED;case 1:case"ALL":return s.ALL;case 2:case"ANY":return s.ANY;case 3:case"EXACT":return s.EXACT;default:throw new globalThis.Error("Unrecognized enum value "+c+" for enum ServiceSelector")}}v(u,"serviceSelectorFromJSON");function i(c){switch(c){case s.SERVICE_SELECTOR_UNDEFINED:return"SERVICE_SELECTOR_UNDEFINED";case s.ALL:return"ALL";case s.ANY:return"ANY";case s.EXACT:return"EXACT";default:throw new globalThis.Error("Unrecognized enum value "+c+" for enum ServiceSelector")}}v(i,"serviceSelectorToJSON"),e.TransparencyLogInstance={fromJSON(c){return{baseUrl:a(c.baseUrl)?globalThis.String(c.baseUrl):"",hashAlgorithm:a(c.hashAlgorithm)?(0,t.hashAlgorithmFromJSON)(c.hashAlgorithm):0,publicKey:a(c.publicKey)?t.PublicKey.fromJSON(c.publicKey):void 0,logId:a(c.logId)?t.LogId.fromJSON(c.logId):void 0,checkpointKeyId:a(c.checkpointKeyId)?t.LogId.fromJSON(c.checkpointKeyId):void 0,operator:a(c.operator)?globalThis.String(c.operator):""}},toJSON(c){let r={};return c.baseUrl!==""&&(r.baseUrl=c.baseUrl),c.hashAlgorithm!==0&&(r.hashAlgorithm=(0,t.hashAlgorithmToJSON)(c.hashAlgorithm)),c.publicKey!==void 0&&(r.publicKey=t.PublicKey.toJSON(c.publicKey)),c.logId!==void 0&&(r.logId=t.LogId.toJSON(c.logId)),c.checkpointKeyId!==void 0&&(r.checkpointKeyId=t.LogId.toJSON(c.checkpointKeyId)),c.operator!==""&&(r.operator=c.operator),r}},e.CertificateAuthority={fromJSON(c){return{subject:a(c.subject)?t.DistinguishedName.fromJSON(c.subject):void 0,uri:a(c.uri)?globalThis.String(c.uri):"",certChain:a(c.certChain)?t.X509CertificateChain.fromJSON(c.certChain):void 0,validFor:a(c.validFor)?t.TimeRange.fromJSON(c.validFor):void 0,operator:a(c.operator)?globalThis.String(c.operator):""}},toJSON(c){let r={};return c.subject!==void 0&&(r.subject=t.DistinguishedName.toJSON(c.subject)),c.uri!==""&&(r.uri=c.uri),c.certChain!==void 0&&(r.certChain=t.X509CertificateChain.toJSON(c.certChain)),c.validFor!==void 0&&(r.validFor=t.TimeRange.toJSON(c.validFor)),c.operator!==""&&(r.operator=c.operator),r}},e.TrustedRoot={fromJSON(c){return{mediaType:a(c.mediaType)?globalThis.String(c.mediaType):"",tlogs:globalThis.Array.isArray(c?.tlogs)?c.tlogs.map(r=>e.TransparencyLogInstance.fromJSON(r)):[],certificateAuthorities:globalThis.Array.isArray(c?.certificateAuthorities)?c.certificateAuthorities.map(r=>e.CertificateAuthority.fromJSON(r)):[],ctlogs:globalThis.Array.isArray(c?.ctlogs)?c.ctlogs.map(r=>e.TransparencyLogInstance.fromJSON(r)):[],timestampAuthorities:globalThis.Array.isArray(c?.timestampAuthorities)?c.timestampAuthorities.map(r=>e.CertificateAuthority.fromJSON(r)):[]}},toJSON(c){let r={};return c.mediaType!==""&&(r.mediaType=c.mediaType),c.tlogs?.length&&(r.tlogs=c.tlogs.map(n=>e.TransparencyLogInstance.toJSON(n))),c.certificateAuthorities?.length&&(r.certificateAuthorities=c.certificateAuthorities.map(n=>e.CertificateAuthority.toJSON(n))),c.ctlogs?.length&&(r.ctlogs=c.ctlogs.map(n=>e.TransparencyLogInstance.toJSON(n))),c.timestampAuthorities?.length&&(r.timestampAuthorities=c.timestampAuthorities.map(n=>e.CertificateAuthority.toJSON(n))),r}},e.SigningConfig={fromJSON(c){return{mediaType:a(c.mediaType)?globalThis.String(c.mediaType):"",caUrls:globalThis.Array.isArray(c?.caUrls)?c.caUrls.map(r=>e.Service.fromJSON(r)):[],oidcUrls:globalThis.Array.isArray(c?.oidcUrls)?c.oidcUrls.map(r=>e.Service.fromJSON(r)):[],rekorTlogUrls:globalThis.Array.isArray(c?.rekorTlogUrls)?c.rekorTlogUrls.map(r=>e.Service.fromJSON(r)):[],rekorTlogConfig:a(c.rekorTlogConfig)?e.ServiceConfiguration.fromJSON(c.rekorTlogConfig):void 0,tsaUrls:globalThis.Array.isArray(c?.tsaUrls)?c.tsaUrls.map(r=>e.Service.fromJSON(r)):[],tsaConfig:a(c.tsaConfig)?e.ServiceConfiguration.fromJSON(c.tsaConfig):void 0}},toJSON(c){let r={};return c.mediaType!==""&&(r.mediaType=c.mediaType),c.caUrls?.length&&(r.caUrls=c.caUrls.map(n=>e.Service.toJSON(n))),c.oidcUrls?.length&&(r.oidcUrls=c.oidcUrls.map(n=>e.Service.toJSON(n))),c.rekorTlogUrls?.length&&(r.rekorTlogUrls=c.rekorTlogUrls.map(n=>e.Service.toJSON(n))),c.rekorTlogConfig!==void 0&&(r.rekorTlogConfig=e.ServiceConfiguration.toJSON(c.rekorTlogConfig)),c.tsaUrls?.length&&(r.tsaUrls=c.tsaUrls.map(n=>e.Service.toJSON(n))),c.tsaConfig!==void 0&&(r.tsaConfig=e.ServiceConfiguration.toJSON(c.tsaConfig)),r}},e.Service={fromJSON(c){return{url:a(c.url)?globalThis.String(c.url):"",majorApiVersion:a(c.majorApiVersion)?globalThis.Number(c.majorApiVersion):0,validFor:a(c.validFor)?t.TimeRange.fromJSON(c.validFor):void 0,operator:a(c.operator)?globalThis.String(c.operator):""}},toJSON(c){let r={};return c.url!==""&&(r.url=c.url),c.majorApiVersion!==0&&(r.majorApiVersion=Math.round(c.majorApiVersion)),c.validFor!==void 0&&(r.validFor=t.TimeRange.toJSON(c.validFor)),c.operator!==""&&(r.operator=c.operator),r}},e.ServiceConfiguration={fromJSON(c){return{selector:a(c.selector)?u(c.selector):0,count:a(c.count)?globalThis.Number(c.count):0}},toJSON(c){let r={};return c.selector!==0&&(r.selector=i(c.selector)),c.count!==0&&(r.count=Math.round(c.count)),r}},e.ClientTrustConfig={fromJSON(c){return{mediaType:a(c.mediaType)?globalThis.String(c.mediaType):"",trustedRoot:a(c.trustedRoot)?e.TrustedRoot.fromJSON(c.trustedRoot):void 0,signingConfig:a(c.signingConfig)?e.SigningConfig.fromJSON(c.signingConfig):void 0}},toJSON(c){let r={};return c.mediaType!==""&&(r.mediaType=c.mediaType),c.trustedRoot!==void 0&&(r.trustedRoot=e.TrustedRoot.toJSON(c.trustedRoot)),c.signingConfig!==void 0&&(r.signingConfig=e.SigningConfig.toJSON(c.signingConfig)),r}};function a(c){return c!=null}v(a,"isSet")}),vk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Input=e.Artifact=e.ArtifactVerificationOptions_ObserverTimestampOptions=e.ArtifactVerificationOptions_TlogIntegratedTimestampOptions=e.ArtifactVerificationOptions_TimestampAuthorityOptions=e.ArtifactVerificationOptions_CtlogOptions=e.ArtifactVerificationOptions_TlogOptions=e.ArtifactVerificationOptions=e.PublicKeyIdentities=e.CertificateIdentities=e.CertificateIdentity=void 0;var t=xg(),s=Ss(),u=Ng();e.CertificateIdentity={fromJSON(r){return{issuer:c(r.issuer)?globalThis.String(r.issuer):"",san:c(r.san)?s.SubjectAlternativeName.fromJSON(r.san):void 0,oids:globalThis.Array.isArray(r?.oids)?r.oids.map(n=>s.ObjectIdentifierValuePair.fromJSON(n)):[]}},toJSON(r){let n={};return r.issuer!==""&&(n.issuer=r.issuer),r.san!==void 0&&(n.san=s.SubjectAlternativeName.toJSON(r.san)),r.oids?.length&&(n.oids=r.oids.map(o=>s.ObjectIdentifierValuePair.toJSON(o))),n}},e.CertificateIdentities={fromJSON(r){return{identities:globalThis.Array.isArray(r?.identities)?r.identities.map(n=>e.CertificateIdentity.fromJSON(n)):[]}},toJSON(r){let n={};return r.identities?.length&&(n.identities=r.identities.map(o=>e.CertificateIdentity.toJSON(o))),n}},e.PublicKeyIdentities={fromJSON(r){return{publicKeys:globalThis.Array.isArray(r?.publicKeys)?r.publicKeys.map(n=>s.PublicKey.fromJSON(n)):[]}},toJSON(r){let n={};return r.publicKeys?.length&&(n.publicKeys=r.publicKeys.map(o=>s.PublicKey.toJSON(o))),n}},e.ArtifactVerificationOptions={fromJSON(r){return{signers:c(r.certificateIdentities)?{$case:"certificateIdentities",certificateIdentities:e.CertificateIdentities.fromJSON(r.certificateIdentities)}:c(r.publicKeys)?{$case:"publicKeys",publicKeys:e.PublicKeyIdentities.fromJSON(r.publicKeys)}:void 0,tlogOptions:c(r.tlogOptions)?e.ArtifactVerificationOptions_TlogOptions.fromJSON(r.tlogOptions):void 0,ctlogOptions:c(r.ctlogOptions)?e.ArtifactVerificationOptions_CtlogOptions.fromJSON(r.ctlogOptions):void 0,tsaOptions:c(r.tsaOptions)?e.ArtifactVerificationOptions_TimestampAuthorityOptions.fromJSON(r.tsaOptions):void 0,integratedTsOptions:c(r.integratedTsOptions)?e.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.fromJSON(r.integratedTsOptions):void 0,observerOptions:c(r.observerOptions)?e.ArtifactVerificationOptions_ObserverTimestampOptions.fromJSON(r.observerOptions):void 0}},toJSON(r){let n={};return r.signers?.$case==="certificateIdentities"?n.certificateIdentities=e.CertificateIdentities.toJSON(r.signers.certificateIdentities):r.signers?.$case==="publicKeys"&&(n.publicKeys=e.PublicKeyIdentities.toJSON(r.signers.publicKeys)),r.tlogOptions!==void 0&&(n.tlogOptions=e.ArtifactVerificationOptions_TlogOptions.toJSON(r.tlogOptions)),r.ctlogOptions!==void 0&&(n.ctlogOptions=e.ArtifactVerificationOptions_CtlogOptions.toJSON(r.ctlogOptions)),r.tsaOptions!==void 0&&(n.tsaOptions=e.ArtifactVerificationOptions_TimestampAuthorityOptions.toJSON(r.tsaOptions)),r.integratedTsOptions!==void 0&&(n.integratedTsOptions=e.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.toJSON(r.integratedTsOptions)),r.observerOptions!==void 0&&(n.observerOptions=e.ArtifactVerificationOptions_ObserverTimestampOptions.toJSON(r.observerOptions)),n}},e.ArtifactVerificationOptions_TlogOptions={fromJSON(r){return{threshold:c(r.threshold)?globalThis.Number(r.threshold):0,performOnlineVerification:c(r.performOnlineVerification)?globalThis.Boolean(r.performOnlineVerification):!1,disable:c(r.disable)?globalThis.Boolean(r.disable):!1}},toJSON(r){let n={};return r.threshold!==0&&(n.threshold=Math.round(r.threshold)),r.performOnlineVerification!==!1&&(n.performOnlineVerification=r.performOnlineVerification),r.disable!==!1&&(n.disable=r.disable),n}},e.ArtifactVerificationOptions_CtlogOptions={fromJSON(r){return{threshold:c(r.threshold)?globalThis.Number(r.threshold):0,disable:c(r.disable)?globalThis.Boolean(r.disable):!1}},toJSON(r){let n={};return r.threshold!==0&&(n.threshold=Math.round(r.threshold)),r.disable!==!1&&(n.disable=r.disable),n}},e.ArtifactVerificationOptions_TimestampAuthorityOptions={fromJSON(r){return{threshold:c(r.threshold)?globalThis.Number(r.threshold):0,disable:c(r.disable)?globalThis.Boolean(r.disable):!1}},toJSON(r){let n={};return r.threshold!==0&&(n.threshold=Math.round(r.threshold)),r.disable!==!1&&(n.disable=r.disable),n}},e.ArtifactVerificationOptions_TlogIntegratedTimestampOptions={fromJSON(r){return{threshold:c(r.threshold)?globalThis.Number(r.threshold):0,disable:c(r.disable)?globalThis.Boolean(r.disable):!1}},toJSON(r){let n={};return r.threshold!==0&&(n.threshold=Math.round(r.threshold)),r.disable!==!1&&(n.disable=r.disable),n}},e.ArtifactVerificationOptions_ObserverTimestampOptions={fromJSON(r){return{threshold:c(r.threshold)?globalThis.Number(r.threshold):0,disable:c(r.disable)?globalThis.Boolean(r.disable):!1}},toJSON(r){let n={};return r.threshold!==0&&(n.threshold=Math.round(r.threshold)),r.disable!==!1&&(n.disable=r.disable),n}},e.Artifact={fromJSON(r){return{data:c(r.artifactUri)?{$case:"artifactUri",artifactUri:globalThis.String(r.artifactUri)}:c(r.artifact)?{$case:"artifact",artifact:Buffer.from(i(r.artifact))}:c(r.artifactDigest)?{$case:"artifactDigest",artifactDigest:s.HashOutput.fromJSON(r.artifactDigest)}:void 0}},toJSON(r){let n={};return r.data?.$case==="artifactUri"?n.artifactUri=r.data.artifactUri:r.data?.$case==="artifact"?n.artifact=a(r.data.artifact):r.data?.$case==="artifactDigest"&&(n.artifactDigest=s.HashOutput.toJSON(r.data.artifactDigest)),n}},e.Input={fromJSON(r){return{artifactTrustRoot:c(r.artifactTrustRoot)?u.TrustedRoot.fromJSON(r.artifactTrustRoot):void 0,artifactVerificationOptions:c(r.artifactVerificationOptions)?e.ArtifactVerificationOptions.fromJSON(r.artifactVerificationOptions):void 0,bundle:c(r.bundle)?t.Bundle.fromJSON(r.bundle):void 0,artifact:c(r.artifact)?e.Artifact.fromJSON(r.artifact):void 0}},toJSON(r){let n={};return r.artifactTrustRoot!==void 0&&(n.artifactTrustRoot=u.TrustedRoot.toJSON(r.artifactTrustRoot)),r.artifactVerificationOptions!==void 0&&(n.artifactVerificationOptions=e.ArtifactVerificationOptions.toJSON(r.artifactVerificationOptions)),r.bundle!==void 0&&(n.bundle=t.Bundle.toJSON(r.bundle)),r.artifact!==void 0&&(n.artifact=e.Artifact.toJSON(r.artifact)),n}};function i(r){return Uint8Array.from(globalThis.Buffer.from(r,"base64"))}v(i,"bytesFromBase64");function a(r){return globalThis.Buffer.from(r).toString("base64")}v(a,"base64FromBytes");function c(r){return r!=null}v(c,"isSet")}),qi=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(u,i,a,c){c===void 0&&(c=a);var r=Object.getOwnPropertyDescriptor(i,a);(!r||("get"in r?!i.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:v(function(){return i[a]},"get")}),Object.defineProperty(u,c,r)}:function(u,i,a,c){c===void 0&&(c=a),u[c]=i[a]}),s=e&&e.__exportStar||function(u,i){for(var a in u)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,u,a)};Object.defineProperty(e,"__esModule",{value:!0}),s(Tg(),e),s(xg(),e),s(Ss(),e),s(Pg(),e),s(Ng(),e),s(vk(),e)}),Vl=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BUNDLE_V03_MEDIA_TYPE=e.BUNDLE_V03_LEGACY_MEDIA_TYPE=e.BUNDLE_V02_MEDIA_TYPE=e.BUNDLE_V01_MEDIA_TYPE=void 0,e.isBundleWithCertificateChain=t,e.isBundleWithPublicKey=s,e.isBundleWithMessageSignature=u,e.isBundleWithDsseEnvelope=i,e.BUNDLE_V01_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.1",e.BUNDLE_V02_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.2",e.BUNDLE_V03_LEGACY_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.3",e.BUNDLE_V03_MEDIA_TYPE="application/vnd.dev.sigstore.bundle.v0.3+json";function t(a){return a.verificationMaterial.content.$case==="x509CertificateChain"}v(t,"isBundleWithCertificateChain");function s(a){return a.verificationMaterial.content.$case==="publicKey"}v(s,"isBundleWithPublicKey");function u(a){return a.content.$case==="messageSignature"}v(u,"isBundleWithMessageSignature");function i(a){return a.content.$case==="dsseEnvelope"}v(i,"isBundleWithDsseEnvelope")}),Sk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMessageSignatureBundle=u,e.toDSSEBundle=i;var t=qi(),s=Vl();function u(o){return{mediaType:o.certificateChain?s.BUNDLE_V02_MEDIA_TYPE:s.BUNDLE_V03_MEDIA_TYPE,content:{$case:"messageSignature",messageSignature:{messageDigest:{algorithm:t.HashAlgorithm.SHA2_256,digest:o.digest},signature:o.signature}},verificationMaterial:r(o)}}v(u,"toMessageSignatureBundle");function i(o){return{mediaType:o.certificateChain?s.BUNDLE_V02_MEDIA_TYPE:s.BUNDLE_V03_MEDIA_TYPE,content:{$case:"dsseEnvelope",dsseEnvelope:a(o)},verificationMaterial:r(o)}}v(i,"toDSSEBundle");function a(o){return{payloadType:o.artifactType,payload:o.artifact,signatures:[c(o)]}}v(a,"toEnvelope");function c(o){return{keyid:o.keyHint||"",sig:o.signature}}v(c,"toSignature");function r(o){return{content:n(o),tlogEntries:[],timestampVerificationData:{rfc3161Timestamps:[]}}}v(r,"toVerificationMaterial");function n(o){return o.certificate?o.certificateChain?{$case:"x509CertificateChain",x509CertificateChain:{certificates:[{rawBytes:o.certificate}]}}:{$case:"certificate",certificate:{rawBytes:o.certificate}}:{$case:"publicKey",publicKey:{hint:o.keyHint||""}}}v(n,"toKeyContent")}),kg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ValidationError=void 0;var t=class extends Error{static{v(this,"ValidationError")}constructor(s,u){super(s),this.fields=u}};e.ValidationError=t}),Lg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertBundle=s,e.assertBundleV01=u,e.isBundleV01=i,e.assertBundleV02=a,e.assertBundleLatest=c;var t=kg();function s(h){let p=r(h);if(p.length>0)throw new t.ValidationError("invalid bundle",p)}v(s,"assertBundle");function u(h){let p=[];if(p.push(...r(h)),p.push(...n(h)),p.length>0)throw new t.ValidationError("invalid v0.1 bundle",p)}v(u,"assertBundleV01");function i(h){try{return u(h),!0}catch{return!1}}v(i,"isBundleV01");function a(h){let p=[];if(p.push(...r(h)),p.push(...o(h)),p.length>0)throw new t.ValidationError("invalid v0.2 bundle",p)}v(a,"assertBundleV02");function c(h){let p=[];if(p.push(...r(h)),p.push(...o(h)),p.push(...l(h)),p.length>0)throw new t.ValidationError("invalid bundle",p)}v(c,"assertBundleLatest");function r(h){let p=[];if((h.mediaType===void 0||!h.mediaType.match(/^application\/vnd\.dev\.sigstore\.bundle\+json;version=\d\.\d/)&&!h.mediaType.match(/^application\/vnd\.dev\.sigstore\.bundle\.v\d\.\d\+json/))&&p.push("mediaType"),h.content===void 0)p.push("content");else switch(h.content.$case){case"messageSignature":h.content.messageSignature.messageDigest===void 0?p.push("content.messageSignature.messageDigest"):h.content.messageSignature.messageDigest.digest.length===0&&p.push("content.messageSignature.messageDigest.digest"),h.content.messageSignature.signature.length===0&&p.push("content.messageSignature.signature");break;case"dsseEnvelope":h.content.dsseEnvelope.payload.length===0&&p.push("content.dsseEnvelope.payload"),h.content.dsseEnvelope.signatures.length!==1?p.push("content.dsseEnvelope.signatures"):h.content.dsseEnvelope.signatures[0].sig.length===0&&p.push("content.dsseEnvelope.signatures[0].sig");break}if(h.verificationMaterial===void 0)p.push("verificationMaterial");else{if(h.verificationMaterial.content===void 0)p.push("verificationMaterial.content");else switch(h.verificationMaterial.content.$case){case"x509CertificateChain":h.verificationMaterial.content.x509CertificateChain.certificates.length===0&&p.push("verificationMaterial.content.x509CertificateChain.certificates"),h.verificationMaterial.content.x509CertificateChain.certificates.forEach((d,g)=>{d.rawBytes.length===0&&p.push(`verificationMaterial.content.x509CertificateChain.certificates[${g}].rawBytes`)});break;case"certificate":h.verificationMaterial.content.certificate.rawBytes.length===0&&p.push("verificationMaterial.content.certificate.rawBytes");break}h.verificationMaterial.tlogEntries===void 0?p.push("verificationMaterial.tlogEntries"):h.verificationMaterial.tlogEntries.length>0&&h.verificationMaterial.tlogEntries.forEach((d,g)=>{d.logId===void 0&&p.push(`verificationMaterial.tlogEntries[${g}].logId`),d.kindVersion===void 0&&p.push(`verificationMaterial.tlogEntries[${g}].kindVersion`)})}return p}v(r,"validateBundleBase");function n(h){let p=[];return h.verificationMaterial&&h.verificationMaterial.tlogEntries?.length>0&&h.verificationMaterial.tlogEntries.forEach((d,g)=>{d.inclusionPromise===void 0&&p.push(`verificationMaterial.tlogEntries[${g}].inclusionPromise`)}),p}v(n,"validateInclusionPromise");function o(h){let p=[];return h.verificationMaterial&&h.verificationMaterial.tlogEntries?.length>0&&h.verificationMaterial.tlogEntries.forEach((d,g)=>{d.inclusionProof===void 0?p.push(`verificationMaterial.tlogEntries[${g}].inclusionProof`):d.inclusionProof.checkpoint===void 0&&p.push(`verificationMaterial.tlogEntries[${g}].inclusionProof.checkpoint`)}),p}v(o,"validateInclusionProof");function l(h){let p=[];return h.verificationMaterial?.content?.$case==="x509CertificateChain"&&p.push("verificationMaterial.content.$case"),p}v(l,"validateNoCertificateChain")}),Ek=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.envelopeToJSON=e.envelopeFromJSON=e.bundleToJSON=e.bundleFromJSON=void 0;var t=qi(),s=Vl(),u=Lg(),i=v(n=>{let o=t.Bundle.fromJSON(n);switch(o.mediaType){case s.BUNDLE_V01_MEDIA_TYPE:(0,u.assertBundleV01)(o);break;case s.BUNDLE_V02_MEDIA_TYPE:(0,u.assertBundleV02)(o);break;default:(0,u.assertBundleLatest)(o);break}return o},"bundleFromJSON");e.bundleFromJSON=i;var a=v(n=>t.Bundle.toJSON(n),"bundleToJSON");e.bundleToJSON=a;var c=v(n=>t.Envelope.fromJSON(n),"envelopeFromJSON");e.envelopeFromJSON=c;var r=v(n=>t.Envelope.toJSON(n),"envelopeToJSON");e.envelopeToJSON=r}),Ki=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isBundleV01=e.assertBundleV02=e.assertBundleV01=e.assertBundleLatest=e.assertBundle=e.envelopeToJSON=e.envelopeFromJSON=e.bundleToJSON=e.bundleFromJSON=e.ValidationError=e.isBundleWithPublicKey=e.isBundleWithMessageSignature=e.isBundleWithDsseEnvelope=e.isBundleWithCertificateChain=e.BUNDLE_V03_MEDIA_TYPE=e.BUNDLE_V03_LEGACY_MEDIA_TYPE=e.BUNDLE_V02_MEDIA_TYPE=e.BUNDLE_V01_MEDIA_TYPE=e.toMessageSignatureBundle=e.toDSSEBundle=void 0;var t=Sk();Object.defineProperty(e,"toDSSEBundle",{enumerable:!0,get:v(function(){return t.toDSSEBundle},"get")}),Object.defineProperty(e,"toMessageSignatureBundle",{enumerable:!0,get:v(function(){return t.toMessageSignatureBundle},"get")});var s=Vl();Object.defineProperty(e,"BUNDLE_V01_MEDIA_TYPE",{enumerable:!0,get:v(function(){return s.BUNDLE_V01_MEDIA_TYPE},"get")}),Object.defineProperty(e,"BUNDLE_V02_MEDIA_TYPE",{enumerable:!0,get:v(function(){return s.BUNDLE_V02_MEDIA_TYPE},"get")}),Object.defineProperty(e,"BUNDLE_V03_LEGACY_MEDIA_TYPE",{enumerable:!0,get:v(function(){return s.BUNDLE_V03_LEGACY_MEDIA_TYPE},"get")}),Object.defineProperty(e,"BUNDLE_V03_MEDIA_TYPE",{enumerable:!0,get:v(function(){return s.BUNDLE_V03_MEDIA_TYPE},"get")}),Object.defineProperty(e,"isBundleWithCertificateChain",{enumerable:!0,get:v(function(){return s.isBundleWithCertificateChain},"get")}),Object.defineProperty(e,"isBundleWithDsseEnvelope",{enumerable:!0,get:v(function(){return s.isBundleWithDsseEnvelope},"get")}),Object.defineProperty(e,"isBundleWithMessageSignature",{enumerable:!0,get:v(function(){return s.isBundleWithMessageSignature},"get")}),Object.defineProperty(e,"isBundleWithPublicKey",{enumerable:!0,get:v(function(){return s.isBundleWithPublicKey},"get")});var u=kg();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:v(function(){return u.ValidationError},"get")});var i=Ek();Object.defineProperty(e,"bundleFromJSON",{enumerable:!0,get:v(function(){return i.bundleFromJSON},"get")}),Object.defineProperty(e,"bundleToJSON",{enumerable:!0,get:v(function(){return i.bundleToJSON},"get")}),Object.defineProperty(e,"envelopeFromJSON",{enumerable:!0,get:v(function(){return i.envelopeFromJSON},"get")}),Object.defineProperty(e,"envelopeToJSON",{enumerable:!0,get:v(function(){return i.envelopeToJSON},"get")});var a=Lg();Object.defineProperty(e,"assertBundle",{enumerable:!0,get:v(function(){return a.assertBundle},"get")}),Object.defineProperty(e,"assertBundleLatest",{enumerable:!0,get:v(function(){return a.assertBundleLatest},"get")}),Object.defineProperty(e,"assertBundleV01",{enumerable:!0,get:v(function(){return a.assertBundleV01},"get")}),Object.defineProperty(e,"assertBundleV02",{enumerable:!0,get:v(function(){return a.assertBundleV02},"get")}),Object.defineProperty(e,"isBundleV01",{enumerable:!0,get:v(function(){return a.isBundleV01},"get")})}),Ji=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ByteStream=void 0;var t=class extends Error{static{v(this,"StreamError")}},s=class sl{static{v(this,"ByteStream")}constructor(i){this.start=0,i?(this.buf=i,this.view=Buffer.from(i)):(this.buf=new ArrayBuffer(0),this.view=Buffer.from(this.buf))}get buffer(){return this.view.subarray(0,this.start)}get length(){return this.view.byteLength}get position(){return this.start}seek(i){this.start=i}slice(i,a){let c=i+a;if(c>this.length)throw new t("request past end of buffer");return this.view.subarray(i,c)}appendChar(i){this.ensureCapacity(1),this.view[this.start]=i,this.start+=1}appendUint16(i){this.ensureCapacity(2);let a=new Uint16Array([i]),c=new Uint8Array(a.buffer);this.view[this.start]=c[1],this.view[this.start+1]=c[0],this.start+=2}appendUint24(i){this.ensureCapacity(3);let a=new Uint32Array([i]),c=new Uint8Array(a.buffer);this.view[this.start]=c[2],this.view[this.start+1]=c[1],this.view[this.start+2]=c[0],this.start+=3}appendView(i){this.ensureCapacity(i.length),this.view.set(i,this.start),this.start+=i.length}getBlock(i){if(i<=0)return Buffer.alloc(0);if(this.start+i>this.view.length)throw new Error("request past end of buffer");let a=this.view.subarray(this.start,this.start+i);return this.start+=i,a}getUint8(){return this.getBlock(1)[0]}getUint16(){let i=this.getBlock(2);return i[0]<<8|i[1]}ensureCapacity(i){if(this.start+i>this.view.byteLength){let a=sl.BLOCK_SIZE+(i>sl.BLOCK_SIZE?i:0);this.realloc(this.view.byteLength+a)}}realloc(i){let a=new ArrayBuffer(i),c=Buffer.from(a);c.set(this.view),this.buf=a,this.view=c}};e.ByteStream=s,s.BLOCK_SIZE=1024}),Wl=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ASN1TypeError=e.ASN1ParseError=void 0;var t=class extends Error{static{v(this,"ASN1ParseError")}};e.ASN1ParseError=t;var s=class extends Error{static{v(this,"ASN1TypeError")}};e.ASN1TypeError=s}),bk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeLength=s,e.encodeLength=u;var t=Wl();function s(i){let a=i.getUint8();if(!(a&128))return a;let c=a&127;if(c>6)throw new t.ASN1ParseError("length exceeds 6 byte limit");let r=0;for(let n=0;n<c;n++)r=r*256+i.getUint8();if(r===0)throw new t.ASN1ParseError("indefinite length encoding not supported");return r}v(s,"decodeLength");function u(i){if(i<128)return Buffer.from([i]);let a=BigInt(i),c=[];for(;a>0n;)c.unshift(Number(a&255n)),a=a>>8n;return Buffer.from([128|c.length,...c])}v(u,"encodeLength")}),_k=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseInteger=u,e.parseStringASCII=i,e.parseTime=a,e.parseOID=c,e.parseBoolean=r,e.parseBitString=n;var t=/^(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\.\d{3})?Z$/,s=/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\.\d{3})?Z$/;function u(o){let l=0,h=o.length,p=o[l],d=p>127,g=d?255:0;for(;p==g&&++l<h;)p=o[l];if(h-l===0)return BigInt(d?-1:0);p=d?p-256:p;let m=BigInt(p);for(let f=l+1;f<h;++f)m=m*BigInt(256)+BigInt(o[f]);return m}v(u,"parseInteger");function i(o){return o.toString("ascii")}v(i,"parseStringASCII");function a(o,l){let h=i(o),p=l?t.exec(h):s.exec(h);if(!p)throw new Error("invalid time");if(l){let d=Number(p[1]);d+=d>=50?1900:2e3,p[1]=d.toString()}return new Date(`${p[1]}-${p[2]}-${p[3]}T${p[4]}:${p[5]}:${p[6]}Z`)}v(a,"parseTime");function c(o){let l=0,h=o.length,p=o[l++],d=Math.floor(p/40),g=p%40,m=`${d}.${g}`,f=0;for(;l<h;++l)p=o[l],f=(f<<7)+(p&127),!(p&128)&&(m+=`.${f}`,f=0);return m}v(c,"parseOID");function r(o){return o[0]!==0}v(r,"parseBoolean");function n(o){let l=o[0],h=1,p=o.length,d=[];for(let g=h;g<p;++g){let m=o[g],f=g===p-1?l:0;for(let y=7;y>=f;--y)d.push(m>>y&1)}return d}v(n,"parseBitString")}),wk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ASN1Tag=void 0;var t=Wl(),s={BOOLEAN:1,INTEGER:2,BIT_STRING:3,OCTET_STRING:4,OBJECT_IDENTIFIER:6,SEQUENCE:16,SET:17,PRINTABLE_STRING:19,UTC_TIME:23,GENERALIZED_TIME:24},u={UNIVERSAL:0,APPLICATION:1,CONTEXT_SPECIFIC:2,PRIVATE:3},i=class{static{v(this,"ASN1Tag")}constructor(a){if(this.number=a&31,this.constructed=(a&32)===32,this.class=a>>6,this.number===31)throw new t.ASN1ParseError("long form tags not supported");if(this.class===u.UNIVERSAL&&this.number===0)throw new t.ASN1ParseError("unsupported tag 0x00")}isUniversal(){return this.class===u.UNIVERSAL}isContextSpecific(a){let c=this.class===u.CONTEXT_SPECIFIC;return a!==void 0?c&&this.number===a:c}isBoolean(){return this.isUniversal()&&this.number===s.BOOLEAN}isInteger(){return this.isUniversal()&&this.number===s.INTEGER}isBitString(){return this.isUniversal()&&this.number===s.BIT_STRING}isOctetString(){return this.isUniversal()&&this.number===s.OCTET_STRING}isOID(){return this.isUniversal()&&this.number===s.OBJECT_IDENTIFIER}isUTCTime(){return this.isUniversal()&&this.number===s.UTC_TIME}isGeneralizedTime(){return this.isUniversal()&&this.number===s.GENERALIZED_TIME}toDER(){return this.number|(this.constructed?32:0)|this.class<<6}};e.ASN1Tag=i}),Ok=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ASN1Obj=void 0;var t=Ji(),s=Wl(),u=bk(),i=_k(),a=wk(),c=class{static{v(this,"ASN1Obj")}constructor(o,l,h){this.tag=o,this.value=l,this.subs=h}static parseBuffer(o){return r(new t.ByteStream(o))}toDER(){let o=new t.ByteStream;if(this.subs.length>0)for(let p of this.subs)o.appendView(p.toDER());else o.appendView(this.value);let l=o.buffer,h=new t.ByteStream;return h.appendChar(this.tag.toDER()),h.appendView((0,u.encodeLength)(l.length)),h.appendView(l),h.buffer}toBoolean(){if(!this.tag.isBoolean())throw new s.ASN1TypeError("not a boolean");return(0,i.parseBoolean)(this.value)}toInteger(){if(!this.tag.isInteger())throw new s.ASN1TypeError("not an integer");return(0,i.parseInteger)(this.value)}toOID(){if(!this.tag.isOID())throw new s.ASN1TypeError("not an OID");return(0,i.parseOID)(this.value)}toDate(){switch(!0){case this.tag.isUTCTime():return(0,i.parseTime)(this.value,!0);case this.tag.isGeneralizedTime():return(0,i.parseTime)(this.value,!1);default:throw new s.ASN1TypeError("not a date")}}toBitString(){if(!this.tag.isBitString())throw new s.ASN1TypeError("not a bit string");return(0,i.parseBitString)(this.value)}};e.ASN1Obj=c;function r(o){let l=new a.ASN1Tag(o.getUint8()),h=(0,u.decodeLength)(o),p=o.slice(o.position,h),d=o.position,g=[];if(l.constructed)g=n(o,h);else if(l.isOctetString())try{g=n(o,h)}catch{}return g.length===0&&o.seek(d+h),new c(l,p,g)}v(r,"parseStream");function n(o,l){let h=o.position+l;if(h>o.length)throw new s.ASN1ParseError("invalid length");let p=[];for(;o.position<h;)p.push(r(o));if(o.position!==h)throw new s.ASN1ParseError("invalid length");return p}v(n,"collectSubs")}),zl=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ASN1Obj=void 0;var t=Ok();Object.defineProperty(e,"ASN1Obj",{enumerable:!0,get:v(function(){return t.ASN1Obj},"get")})}),Es=K(e=>{"use strict";var t=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.createPublicKey=u,e.digest=i,e.verify=a,e.bufferEqual=c;var s=t(require("crypto"));function u(r,n="spki"){return typeof r=="string"?s.default.createPublicKey(r):s.default.createPublicKey({key:r,format:"der",type:n})}v(u,"createPublicKey");function i(r,...n){let o=s.default.createHash(r);for(let l of n)o.update(l);return o.digest()}v(i,"digest");function a(r,n,o,l){try{return s.default.verify(l,r,n,o)}catch{return!1}}v(a,"verify");function c(r,n){try{return s.default.timingSafeEqual(r,n)}catch{return!1}}v(c,"bufferEqual")}),Rk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preAuthEncoding=s;var t="DSSEv1";function s(u,i){let a=[t,u.length,u,i.length,""].join(" ");return Buffer.concat([Buffer.from(a,"ascii"),i])}v(s,"preAuthEncoding")}),Ak=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.base64Encode=u,e.base64Decode=i;var t="base64",s="utf-8";function u(a){return Buffer.from(a,s).toString(t)}v(u,"base64Encode");function i(a){return Buffer.from(a,t).toString(s)}v(i,"base64Decode")}),Ck=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.canonicalize=t;function t(s){let u="";if(s===null||typeof s!="object"||s.toJSON!=null)u+=JSON.stringify(s);else if(Array.isArray(s)){u+="[";let i=!0;s.forEach(a=>{i||(u+=","),i=!1,u+=t(a)}),u+="]"}else{u+="{";let i=!0;Object.keys(s).sort().forEach(a=>{i||(u+=","),i=!1,u+=JSON.stringify(a),u+=":",u+=t(s[a])}),u+="}"}return u}v(t,"canonicalize")}),Dg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toDER=u,e.fromDER=i;var t=/-----BEGIN (.*)-----/,s=/-----END (.*)-----/;function u(a){let c="";return a.split(`
|
|
75
|
+
`).forEach(r=>{r.match(t)||r.match(s)||(c+=r)}),Buffer.from(c,"base64")}v(u,"toDER");function i(a,c="CERTIFICATE"){let r=a.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${c}-----`,...r,`-----END ${c}-----`].join(`
|
|
76
|
+
`).concat(`
|
|
77
|
+
`)}v(i,"fromDER")}),ql=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHA2_HASH_ALGOS=e.ECDSA_SIGNATURE_ALGOS=void 0,e.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"},e.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}}),$g=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RFC3161TimestampVerificationError=void 0;var t=class extends Error{static{v(this,"RFC3161TimestampVerificationError")}};e.RFC3161TimestampVerificationError=t}),Ik=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(n,o,l,h){h===void 0&&(h=l);var p=Object.getOwnPropertyDescriptor(o,l);(!p||("get"in p?!o.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:v(function(){return o[l]},"get")}),Object.defineProperty(n,h,p)}:function(n,o,l,h){h===void 0&&(h=l),n[h]=o[l]}),s=e&&e.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),u=e&&e.__importStar||function(){var n=v(function(o){return n=Object.getOwnPropertyNames||function(l){var h=[];for(var p in l)Object.prototype.hasOwnProperty.call(l,p)&&(h[h.length]=p);return h},n(o)},"ownKeys");return function(o){if(o&&o.__esModule)return o;var l={};if(o!=null)for(var h=n(o),p=0;p<h.length;p++)h[p]!=="default"&&t(l,o,h[p]);return s(l,o),l}}();Object.defineProperty(e,"__esModule",{value:!0}),e.TSTInfo=void 0;var i=u(Es()),a=ql(),c=$g(),r=class{static{v(this,"TSTInfo")}constructor(n){this.root=n}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let n=this.messageImprintObj.subs[0].subs[0].toOID();return a.SHA2_HASH_ALGOS[n]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(n){let o=i.digest(this.messageImprintHashAlgorithm,n);if(!i.bufferEqual(o,this.messageImprintHashedMessage))throw new c.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};e.TSTInfo=r}),Tk=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(d,g,m,f){f===void 0&&(f=m);var y=Object.getOwnPropertyDescriptor(g,m);(!y||("get"in y?!g.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:v(function(){return g[m]},"get")}),Object.defineProperty(d,f,y)}:function(d,g,m,f){f===void 0&&(f=m),d[f]=g[m]}),s=e&&e.__setModuleDefault||(Object.create?function(d,g){Object.defineProperty(d,"default",{enumerable:!0,value:g})}:function(d,g){d.default=g}),u=e&&e.__importStar||function(){var d=v(function(g){return d=Object.getOwnPropertyNames||function(m){var f=[];for(var y in m)Object.prototype.hasOwnProperty.call(m,y)&&(f[f.length]=y);return f},d(g)},"ownKeys");return function(g){if(g&&g.__esModule)return g;var m={};if(g!=null)for(var f=d(g),y=0;y<f.length;y++)f[y]!=="default"&&t(m,g,f[y]);return s(m,g),m}}();Object.defineProperty(e,"__esModule",{value:!0}),e.RFC3161Timestamp=void 0;var i=zl(),a=u(Es()),c=ql(),r=$g(),n=Ik(),o="1.2.840.113549.1.7.2",l="1.2.840.113549.1.9.16.1.4",h="1.2.840.113549.1.9.4",p=class Mg{static{v(this,"RFC3161Timestamp")}constructor(g){this.root=g}static parse(g){let m=i.ASN1Obj.parseBuffer(g);return new Mg(m)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let g=this.signerDigestAlgorithmObj.subs[0].toOID();return c.SHA2_HASH_ALGOS[g]}get signatureAlgorithm(){let g=this.signatureAlgorithmObj.subs[0].toOID();return c.ECDSA_SIGNATURE_ALGOS[g]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new n.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(g,m){if(!this.timeStampTokenObj)throw new r.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==o)throw new r.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==l)throw new r.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(g),this.verifyMessageDigest(),this.verifySignature(m)}verifyMessageDigest(){let g=a.digest(this.signerDigestAlgorithm,this.tstInfo.raw),m=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!a.bufferEqual(g,m))throw new r.RFC3161TimestampVerificationError("signed data does not match tstInfo")}verifySignature(g){let m=this.signedAttrsObj.toDER();if(m[0]=49,!a.verify(m,g,this.signatureValue,this.signatureAlgorithm))throw new r.RFC3161TimestampVerificationError("signature verification failed")}get pkiStatusInfoObj(){return this.root.subs[0]}get timeStampTokenObj(){return this.root.subs[1]}get contentTypeObj(){return this.timeStampTokenObj.subs[0]}get signedDataObj(){return this.timeStampTokenObj.subs.find(g=>g.tag.isContextSpecific(0)).subs[0]}get encapContentInfoObj(){return this.signedDataObj.subs[2]}get signerInfosObj(){let g=this.signedDataObj;return g.subs[g.subs.length-1]}get signerInfoObj(){return this.signerInfosObj.subs[0]}get eContentTypeObj(){return this.encapContentInfoObj.subs[0]}get eContentObj(){return this.encapContentInfoObj.subs[1]}get signedAttrsObj(){return this.signerInfoObj.subs.find(g=>g.tag.isContextSpecific(0))}get messageDigestAttributeObj(){return this.signedAttrsObj.subs.find(g=>g.subs[0].tag.isOID()&&g.subs[0].toOID()===h)}get signerSidObj(){return this.signerInfoObj.subs[1]}get signerDigestAlgorithmObj(){return this.signerInfoObj.subs[2]}get signatureAlgorithmObj(){return this.signerInfoObj.subs[4]}get signatureValueObj(){return this.signerInfoObj.subs[5]}};e.RFC3161Timestamp=p}),Pk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RFC3161Timestamp=void 0;var t=Tk();Object.defineProperty(e,"RFC3161Timestamp",{enumerable:!0,get:v(function(){return t.RFC3161Timestamp},"get")})}),xk=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(r,n,o,l){l===void 0&&(l=o);var h=Object.getOwnPropertyDescriptor(n,o);(!h||("get"in h?!n.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:v(function(){return n[o]},"get")}),Object.defineProperty(r,l,h)}:function(r,n,o,l){l===void 0&&(l=o),r[l]=n[o]}),s=e&&e.__setModuleDefault||(Object.create?function(r,n){Object.defineProperty(r,"default",{enumerable:!0,value:n})}:function(r,n){r.default=n}),u=e&&e.__importStar||function(){var r=v(function(n){return r=Object.getOwnPropertyNames||function(o){var l=[];for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&(l[l.length]=h);return l},r(n)},"ownKeys");return function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var l=r(n),h=0;h<l.length;h++)l[h]!=="default"&&t(o,n,l[h]);return s(o,n),o}}();Object.defineProperty(e,"__esModule",{value:!0}),e.SignedCertificateTimestamp=void 0;var i=u(Es()),a=Ji(),c=class jg{static{v(this,"SignedCertificateTimestamp")}constructor(n){this.version=n.version,this.logID=n.logID,this.timestamp=n.timestamp,this.extensions=n.extensions,this.hashAlgorithm=n.hashAlgorithm,this.signatureAlgorithm=n.signatureAlgorithm,this.signature=n.signature}get datetime(){return new Date(Number(this.timestamp.readBigInt64BE()))}get algorithm(){switch(this.hashAlgorithm){case 0:return"none";case 1:return"md5";case 2:return"sha1";case 3:return"sha224";case 4:return"sha256";case 5:return"sha384";case 6:return"sha512";default:return"unknown"}}verify(n,o){let l=new a.ByteStream;return l.appendChar(this.version),l.appendChar(0),l.appendView(this.timestamp),l.appendUint16(1),l.appendView(n),l.appendUint16(this.extensions.byteLength),this.extensions.byteLength>0&&l.appendView(this.extensions),i.verify(l.buffer,o,this.signature,this.algorithm)}static parse(n){let o=new a.ByteStream(n),l=o.getUint8(),h=o.getBlock(32),p=o.getBlock(8),d=o.getUint16(),g=o.getBlock(d),m=o.getUint8(),f=o.getUint8(),y=o.getUint16(),S=o.getBlock(y);if(o.position!==n.length)throw new Error("SCT buffer length mismatch");return new jg({version:l,logID:h,timestamp:p,extensions:g,hashAlgorithm:m,signatureAlgorithm:f,signature:S})}};e.SignedCertificateTimestamp=c}),Bg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.X509SCTExtension=e.X509SubjectKeyIDExtension=e.X509AuthorityKeyIDExtension=e.X509SubjectAlternativeNameExtension=e.X509KeyUsageExtension=e.X509BasicConstraintsExtension=e.X509Extension=void 0;var t=Ji(),s=xk(),u=class{static{v(this,"X509Extension")}constructor(l){this.root=l}get oid(){return this.root.subs[0].toOID()}get critical(){return this.root.subs.length===3?this.root.subs[1].toBoolean():!1}get value(){return this.extnValueObj.value}get valueObj(){return this.extnValueObj}get extnValueObj(){return this.root.subs[this.root.subs.length-1]}};e.X509Extension=u;var i=class extends u{static{v(this,"X509BasicConstraintsExtension")}get isCA(){return this.sequence.subs[0]?.toBoolean()??!1}get pathLenConstraint(){return this.sequence.subs.length>1?this.sequence.subs[1].toInteger():void 0}get sequence(){return this.extnValueObj.subs[0]}};e.X509BasicConstraintsExtension=i;var a=class extends u{static{v(this,"X509KeyUsageExtension")}get digitalSignature(){return this.bitString[0]===1}get keyCertSign(){return this.bitString[5]===1}get crlSign(){return this.bitString[6]===1}get bitString(){return this.extnValueObj.subs[0].toBitString()}};e.X509KeyUsageExtension=a;var c=class extends u{static{v(this,"X509SubjectAlternativeNameExtension")}get rfc822Name(){return this.findGeneralName(1)?.value.toString("ascii")}get uri(){return this.findGeneralName(6)?.value.toString("ascii")}otherName(l){let h=this.findGeneralName(0);return h===void 0||h.subs[0].toOID()!==l?void 0:h.subs[1].subs[0].value.toString("ascii")}findGeneralName(l){return this.generalNames.find(h=>h.tag.isContextSpecific(l))}get generalNames(){return this.extnValueObj.subs[0].subs}};e.X509SubjectAlternativeNameExtension=c;var r=class extends u{static{v(this,"X509AuthorityKeyIDExtension")}get keyIdentifier(){return this.findSequenceMember(0)?.value}findSequenceMember(l){return this.sequence.subs.find(h=>h.tag.isContextSpecific(l))}get sequence(){return this.extnValueObj.subs[0]}};e.X509AuthorityKeyIDExtension=r;var n=class extends u{static{v(this,"X509SubjectKeyIDExtension")}get keyIdentifier(){return this.extnValueObj.subs[0].value}};e.X509SubjectKeyIDExtension=n;var o=class extends u{static{v(this,"X509SCTExtension")}constructor(l){super(l)}get signedCertificateTimestamps(){let l=this.extnValueObj.subs[0].value,h=new t.ByteStream(l),p=h.getUint16()+2,d=[];for(;h.position<p;){let g=h.getUint16(),m=h.getBlock(g);d.push(s.SignedCertificateTimestamp.parse(m))}if(h.position!==p)throw new Error("SCT list length does not match actual length");return d}};e.X509SCTExtension=o}),Nk=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(m,f,y,S){S===void 0&&(S=y);var E=Object.getOwnPropertyDescriptor(f,y);(!E||("get"in E?!f.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:v(function(){return f[y]},"get")}),Object.defineProperty(m,S,E)}:function(m,f,y,S){S===void 0&&(S=y),m[S]=f[y]}),s=e&&e.__setModuleDefault||(Object.create?function(m,f){Object.defineProperty(m,"default",{enumerable:!0,value:f})}:function(m,f){m.default=f}),u=e&&e.__importStar||function(){var m=v(function(f){return m=Object.getOwnPropertyNames||function(y){var S=[];for(var E in y)Object.prototype.hasOwnProperty.call(y,E)&&(S[S.length]=E);return S},m(f)},"ownKeys");return function(f){if(f&&f.__esModule)return f;var y={};if(f!=null)for(var S=m(f),E=0;E<S.length;E++)S[E]!=="default"&&t(y,f,S[E]);return s(y,f),y}}();Object.defineProperty(e,"__esModule",{value:!0}),e.X509Certificate=e.EXTENSION_OID_SCT=void 0;var i=zl(),a=u(Es()),c=ql(),r=u(Dg()),n=Bg(),o="2.5.29.14",l="2.5.29.15",h="2.5.29.17",p="2.5.29.19",d="2.5.29.35";e.EXTENSION_OID_SCT="1.3.6.1.4.1.11129.2.4.2";var g=class il{static{v(this,"X509Certificate")}constructor(f){this.root=f}static parse(f){let y=typeof f=="string"?r.toDER(f):f,S=i.ASN1Obj.parseBuffer(y);return new il(S)}get tbsCertificate(){return this.tbsCertificateObj}get version(){return`v${(this.versionObj.subs[0].toInteger()+BigInt(1)).toString()}`}get serialNumber(){return this.serialNumberObj.value}get notBefore(){return this.validityObj.subs[0].toDate()}get notAfter(){return this.validityObj.subs[1].toDate()}get issuer(){return this.issuerObj.value}get subject(){return this.subjectObj.value}get publicKey(){return this.subjectPublicKeyInfoObj.toDER()}get signatureAlgorithm(){let f=this.signatureAlgorithmObj.subs[0].toOID();return c.ECDSA_SIGNATURE_ALGOS[f]}get signatureValue(){return this.signatureValueObj.value.subarray(1)}get subjectAltName(){let f=this.extSubjectAltName;return f?.uri||f?.rfc822Name}get extensions(){return this.extensionsObj?.subs[0]?.subs||[]}get extKeyUsage(){let f=this.findExtension(l);return f?new n.X509KeyUsageExtension(f):void 0}get extBasicConstraints(){let f=this.findExtension(p);return f?new n.X509BasicConstraintsExtension(f):void 0}get extSubjectAltName(){let f=this.findExtension(h);return f?new n.X509SubjectAlternativeNameExtension(f):void 0}get extAuthorityKeyID(){let f=this.findExtension(d);return f?new n.X509AuthorityKeyIDExtension(f):void 0}get extSubjectKeyID(){let f=this.findExtension(o);return f?new n.X509SubjectKeyIDExtension(f):void 0}get extSCT(){let f=this.findExtension(e.EXTENSION_OID_SCT);return f?new n.X509SCTExtension(f):void 0}get isCA(){let f=this.extBasicConstraints?.isCA||!1;return this.extKeyUsage?f&&this.extKeyUsage.keyCertSign:f}extension(f){let y=this.findExtension(f);return y?new n.X509Extension(y):void 0}verify(f){let y=f?.publicKey||this.publicKey,S=a.createPublicKey(y);return a.verify(this.tbsCertificate.toDER(),S,this.signatureValue,this.signatureAlgorithm)}validForDate(f){return this.notBefore<=f&&f<=this.notAfter}equals(f){return this.root.toDER().equals(f.root.toDER())}clone(){let f=this.root.toDER(),y=Buffer.alloc(f.length);return f.copy(y),il.parse(y)}findExtension(f){return this.extensions.find(y=>y.subs[0].toOID()===f)}get tbsCertificateObj(){return this.root.subs[0]}get signatureAlgorithmObj(){return this.root.subs[1]}get signatureValueObj(){return this.root.subs[2]}get versionObj(){return this.tbsCertificateObj.subs[0]}get serialNumberObj(){return this.tbsCertificateObj.subs[1]}get issuerObj(){return this.tbsCertificateObj.subs[3]}get validityObj(){return this.tbsCertificateObj.subs[4]}get subjectObj(){return this.tbsCertificateObj.subs[5]}get subjectPublicKeyInfoObj(){return this.tbsCertificateObj.subs[6]}get extensionsObj(){return this.tbsCertificateObj.subs.find(f=>f.tag.isContextSpecific(3))}};e.X509Certificate=g}),kk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.X509SCTExtension=e.X509Certificate=e.EXTENSION_OID_SCT=void 0;var t=Nk();Object.defineProperty(e,"EXTENSION_OID_SCT",{enumerable:!0,get:v(function(){return t.EXTENSION_OID_SCT},"get")}),Object.defineProperty(e,"X509Certificate",{enumerable:!0,get:v(function(){return t.X509Certificate},"get")});var s=Bg();Object.defineProperty(e,"X509SCTExtension",{enumerable:!0,get:v(function(){return s.X509SCTExtension},"get")})}),st=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(n,o,l,h){h===void 0&&(h=l);var p=Object.getOwnPropertyDescriptor(o,l);(!p||("get"in p?!o.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:v(function(){return o[l]},"get")}),Object.defineProperty(n,h,p)}:function(n,o,l,h){h===void 0&&(h=l),n[h]=o[l]}),s=e&&e.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),u=e&&e.__importStar||function(){var n=v(function(o){return n=Object.getOwnPropertyNames||function(l){var h=[];for(var p in l)Object.prototype.hasOwnProperty.call(l,p)&&(h[h.length]=p);return h},n(o)},"ownKeys");return function(o){if(o&&o.__esModule)return o;var l={};if(o!=null)for(var h=n(o),p=0;p<h.length;p++)h[p]!=="default"&&t(l,o,h[p]);return s(l,o),l}}();Object.defineProperty(e,"__esModule",{value:!0}),e.X509SCTExtension=e.X509Certificate=e.EXTENSION_OID_SCT=e.ByteStream=e.RFC3161Timestamp=e.pem=e.json=e.encoding=e.dsse=e.crypto=e.ASN1Obj=void 0;var i=zl();Object.defineProperty(e,"ASN1Obj",{enumerable:!0,get:v(function(){return i.ASN1Obj},"get")}),e.crypto=u(Es()),e.dsse=u(Rk()),e.encoding=u(Ak()),e.json=u(Ck()),e.pem=u(Dg());var a=Pk();Object.defineProperty(e,"RFC3161Timestamp",{enumerable:!0,get:v(function(){return a.RFC3161Timestamp},"get")});var c=Ji();Object.defineProperty(e,"ByteStream",{enumerable:!0,get:v(function(){return c.ByteStream},"get")});var r=kk();Object.defineProperty(e,"EXTENSION_OID_SCT",{enumerable:!0,get:v(function(){return r.EXTENSION_OID_SCT},"get")}),Object.defineProperty(e,"X509Certificate",{enumerable:!0,get:v(function(){return r.X509Certificate},"get")}),Object.defineProperty(e,"X509SCTExtension",{enumerable:!0,get:v(function(){return r.X509SCTExtension},"get")})}),Lk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extractJWTSubject=s;var t=st();function s(u){let i=u.split(".",3),a=JSON.parse(t.encoding.base64Decode(i[1]));if(a.email){if(!a.email_verified)throw new Error("JWT email not verified by issuer");return a.email}if(a.sub)return a.sub;throw new Error("JWT subject not found")}v(s,"extractJWTSubject")}),Dk=K((e,t)=>{t.exports={name:"@sigstore/sign",version:"4.0.1",description:"Sigstore signing library",main:"dist/index.js",types:"dist/index.d.ts",scripts:{clean:"shx rm -rf dist *.tsbuildinfo",build:"tsc --build",test:"jest"},files:["dist"],author:"bdehamer@github.com",license:"Apache-2.0",repository:{type:"git",url:"git+https://github.com/sigstore/sigstore-js.git"},bugs:{url:"https://github.com/sigstore/sigstore-js/issues"},homepage:"https://github.com/sigstore/sigstore-js/tree/main/packages/sign#readme",publishConfig:{provenance:!0},devDependencies:{"@sigstore/jest":"^0.0.0","@sigstore/mock":"^0.11.0","@sigstore/rekor-types":"^4.0.0","@types/make-fetch-happen":"^10.0.4","@types/promise-retry":"^1.1.6"},dependencies:{"@sigstore/bundle":"^4.0.0","@sigstore/core":"^3.0.0","@sigstore/protobuf-specs":"^0.5.0","make-fetch-happen":"^15.0.2","proc-log":"^5.0.0","promise-retry":"^2.0.1"},engines:{node:"^20.17.0 || >=22.9.0"}}}),$k=K(e=>{"use strict";var t=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.getUserAgent=void 0;var s=t(require("os")),u=v(()=>{let i=Dk().version,a=process.version,c=s.default.platform(),r=s.default.arch();return`sigstore-js/${i} (Node ${a}) (${c}/${r})`},"getUserAgent");e.getUserAgent=u}),Zt=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(a,c,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(c,r);(!o||("get"in o?!c.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:v(function(){return c[r]},"get")}),Object.defineProperty(a,n,o)}:function(a,c,r,n){n===void 0&&(n=r),a[n]=c[r]}),s=e&&e.__setModuleDefault||(Object.create?function(a,c){Object.defineProperty(a,"default",{enumerable:!0,value:c})}:function(a,c){a.default=c}),u=e&&e.__importStar||function(){var a=v(function(c){return a=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},a(c)},"ownKeys");return function(c){if(c&&c.__esModule)return c;var r={};if(c!=null)for(var n=a(c),o=0;o<n.length;o++)n[o]!=="default"&&t(r,c,n[o]);return s(r,c),r}}();Object.defineProperty(e,"__esModule",{value:!0}),e.ua=e.oidc=e.pem=e.json=e.encoding=e.dsse=e.crypto=void 0;var i=st();Object.defineProperty(e,"crypto",{enumerable:!0,get:v(function(){return i.crypto},"get")}),Object.defineProperty(e,"dsse",{enumerable:!0,get:v(function(){return i.dsse},"get")}),Object.defineProperty(e,"encoding",{enumerable:!0,get:v(function(){return i.encoding},"get")}),Object.defineProperty(e,"json",{enumerable:!0,get:v(function(){return i.json},"get")}),Object.defineProperty(e,"pem",{enumerable:!0,get:v(function(){return i.pem},"get")}),e.oidc=u(Lk()),e.ua=u($k())}),Ug=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseBundleBuilder=void 0;var t=class{static{v(this,"BaseBundleBuilder")}constructor(u){this.signer=u.signer,this.witnesses=u.witnesses}async create(u){let i=await this.prepare(u).then(o=>this.signer.sign(o)),a=await this.package(u,i),c=await Promise.all(this.witnesses.map(o=>o.testify(a.content,s(i.key)))),r=[],n=[];return c.forEach(({tlogEntries:o,rfc3161Timestamps:l})=>{r.push(...o??[]),n.push(...l??[])}),a.verificationMaterial.tlogEntries=r,a.verificationMaterial.timestampVerificationData={rfc3161Timestamps:n},a}async prepare(u){return u.data}};e.BaseBundleBuilder=t;function s(u){switch(u.$case){case"publicKey":return u.publicKey;case"x509Certificate":return u.certificate}}v(s,"publicKey")}),Fg=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(n,o,l,h){h===void 0&&(h=l);var p=Object.getOwnPropertyDescriptor(o,l);(!p||("get"in p?!o.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:v(function(){return o[l]},"get")}),Object.defineProperty(n,h,p)}:function(n,o,l,h){h===void 0&&(h=l),n[h]=o[l]}),s=e&&e.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),u=e&&e.__importStar||function(){var n=v(function(o){return n=Object.getOwnPropertyNames||function(l){var h=[];for(var p in l)Object.prototype.hasOwnProperty.call(l,p)&&(h[h.length]=p);return h},n(o)},"ownKeys");return function(o){if(o&&o.__esModule)return o;var l={};if(o!=null)for(var h=n(o),p=0;p<h.length;p++)h[p]!=="default"&&t(l,o,h[p]);return s(l,o),l}}();Object.defineProperty(e,"__esModule",{value:!0}),e.toMessageSignatureBundle=c,e.toDSSEBundle=r;var i=u(Ki()),a=Zt();function c(n,o){let l=a.crypto.digest("sha256",n.data);return i.toMessageSignatureBundle({digest:l,signature:o.signature,certificate:o.key.$case==="x509Certificate"?a.pem.toDER(o.key.certificate):void 0,keyHint:o.key.$case==="publicKey"?o.key.hint:void 0,certificateChain:!0})}v(c,"toMessageSignatureBundle");function r(n,o,l){return i.toDSSEBundle({artifact:n.data,artifactType:n.type,signature:o.signature,certificate:o.key.$case==="x509Certificate"?a.pem.toDER(o.key.certificate):void 0,keyHint:o.key.$case==="publicKey"?o.key.hint:void 0,certificateChain:l})}v(r,"toDSSEBundle")}),Mk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DSSEBundleBuilder=void 0;var t=Zt(),s=Ug(),u=Fg(),i=class extends s.BaseBundleBuilder{static{v(this,"DSSEBundleBuilder")}constructor(c){super(c),this.certificateChain=c.certificateChain??!1}async prepare(c){let r=a(c);return t.dsse.preAuthEncoding(r.type,r.data)}async package(c,r){return(0,u.toDSSEBundle)(a(c),r,this.certificateChain)}};e.DSSEBundleBuilder=i;function a(c){return{...c,type:c.type??""}}v(a,"artifactDefaults")}),jk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageSignatureBundleBuilder=void 0;var t=Ug(),s=Fg(),u=class extends t.BaseBundleBuilder{static{v(this,"MessageSignatureBundleBuilder")}constructor(i){super(i)}async package(i,a){return(0,s.toMessageSignatureBundle)(i,a)}};e.MessageSignatureBundleBuilder=u}),Bk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageSignatureBundleBuilder=e.DSSEBundleBuilder=void 0;var t=Mk();Object.defineProperty(e,"DSSEBundleBuilder",{enumerable:!0,get:v(function(){return t.DSSEBundleBuilder},"get")});var s=jk();Object.defineProperty(e,"MessageSignatureBundleBuilder",{enumerable:!0,get:v(function(){return s.MessageSignatureBundleBuilder},"get")})}),Kl=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HTTPError=void 0;var t=class extends Error{static{v(this,"HTTPError")}constructor({status:s,message:u,location:i}){super(`(${s}) ${u}`),this.statusCode=s,this.location=i}};e.HTTPError=t}),bs=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalError=void 0,e.internalError=u;var t=Kl(),s=class extends Error{static{v(this,"InternalError")}constructor({code:i,message:a,cause:c}){super(a),this.name=this.constructor.name,this.cause=c,this.code=i}};e.InternalError=s;function u(i,a,c){throw i instanceof t.HTTPError&&(c+=` - ${i.message}`),new s({code:a,message:c,cause:i})}v(u,"internalError")}),Uk=K(e=>{"use strict";var t=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.CIContextProvider=void 0;var s=t(Wi()),u=[a,c],i=class{static{v(this,"CIContextProvider")}constructor(r="sigstore"){this.audience=r}async getToken(){return Promise.any(u.map(r=>r(this.audience))).catch(()=>Promise.reject("CI: no tokens available"))}};e.CIContextProvider=i;async function a(r){if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL||!process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN)return Promise.reject("no token available");let n=new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);return n.searchParams.append("audience",r),(await(0,s.default)(n.href,{retry:2,headers:{Accept:"application/json",Authorization:`Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`}})).json().then(o=>o.value)}v(a,"getGHAToken");async function c(){return process.env.SIGSTORE_ID_TOKEN?process.env.SIGSTORE_ID_TOKEN:Promise.reject("no token available")}v(c,"getEnv")}),Fk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CIContextProvider=void 0;var t=Uk();Object.defineProperty(e,"CIContextProvider",{enumerable:!0,get:v(function(){return t.CIContextProvider},"get")})}),Jl=K(e=>{"use strict";var t=e&&e.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(e,"__esModule",{value:!0}),e.fetchWithRetry=g;var s=require("http2"),u=t(Wi()),i=ft(),a=t(Mi()),c=Zt(),r=Kl(),{HTTP2_HEADER_LOCATION:n,HTTP2_HEADER_CONTENT_TYPE:o,HTTP2_HEADER_USER_AGENT:l,HTTP_STATUS_INTERNAL_SERVER_ERROR:h,HTTP_STATUS_TOO_MANY_REQUESTS:p,HTTP_STATUS_REQUEST_TIMEOUT:d}=s.constants;async function g(S,E){return(0,a.default)(async(b,_)=>{let O=E.method||"POST",w={[l]:c.ua.getUserAgent(),...E.headers},A=await(0,u.default)(S,{method:O,headers:w,body:E.body,timeout:E.timeout,retry:!1}).catch(I=>(i.log.http("fetch",`${O} ${S} attempt ${_} failed with ${I}`),b(I)));if(A.ok)return A;{let I=await m(A);if(i.log.http("fetch",`${O} ${S} attempt ${_} failed with ${A.status}`),f(A.status))return b(I);throw I}},y(E.retry))}v(g,"fetchWithRetry");var m=v(async S=>{let E=S.statusText,b=S.headers.get(n)||void 0;if(S.headers.get(o)?.includes("application/json"))try{E=(await S.json()).message||E}catch{}return new r.HTTPError({status:S.status,message:E,location:b})},"errorFromResponse"),f=v(S=>[d,p].includes(S)||S>=h,"retryable"),y=v(S=>typeof S=="boolean"?{retries:S?1:0}:typeof S=="number"?{retries:S}:{retries:0,...S},"retryOpts")}),Hk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Fulcio=void 0;var t=Jl(),s=class{static{v(this,"Fulcio")}constructor(u){this.options=u}async createSigningCertificate(u){let{baseURL:i,retry:a,timeout:c}=this.options,r=`${i}/api/v2/signingCert`;return(await(0,t.fetchWithRetry)(r,{headers:{"Content-Type":"application/json"},body:JSON.stringify(u),timeout:c,retry:a})).json()}};e.Fulcio=s}),Gk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CAClient=void 0;var t=bs(),s=Hk(),u=class{static{v(this,"CAClient")}constructor(a){this.fulcio=new s.Fulcio({baseURL:a.fulcioBaseURL,retry:a.retry,timeout:a.timeout})}async createSigningCertificate(a,c,r){let n=i(a,c,r);try{let o=await this.fulcio.createSigningCertificate(n);return(o.signedCertificateEmbeddedSct?o.signedCertificateEmbeddedSct:o.signedCertificateDetachedSct).chain.certificates}catch(o){(0,t.internalError)(o,"CA_CREATE_SIGNING_CERTIFICATE_ERROR","error creating signing certificate")}}};e.CAClient=u;function i(a,c,r){return{credentials:{oidcIdentityToken:a},publicKeyRequest:{publicKey:{algorithm:"ECDSA",content:c},proofOfPossession:r.toString("base64")}}}v(i,"toCertificateRequest")}),Vk=K(e=>{"use strict";var t=e&&e.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.EphemeralSigner=void 0;var s=t(require("crypto")),u="ec",i="P-256",a=class{static{v(this,"EphemeralSigner")}constructor(){this.keypair=s.default.generateKeyPairSync(u,{namedCurve:i})}async sign(c){let r=s.default.sign(null,c,this.keypair.privateKey),n=this.keypair.publicKey.export({format:"pem",type:"spki"}).toString("ascii");return{signature:r,key:{$case:"publicKey",publicKey:n}}}};e.EphemeralSigner=a}),Wk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FulcioSigner=e.DEFAULT_FULCIO_URL=void 0;var t=bs(),s=Zt(),u=Gk(),i=Vk();e.DEFAULT_FULCIO_URL="https://fulcio.sigstore.dev";var a=class{static{v(this,"FulcioSigner")}constructor(c){this.ca=new u.CAClient({...c,fulcioBaseURL:c.fulcioBaseURL||e.DEFAULT_FULCIO_URL}),this.identityProvider=c.identityProvider,this.keyHolder=c.keyHolder||new i.EphemeralSigner}async sign(c){let r=await this.getIdentityToken(),n;try{n=s.oidc.extractJWTSubject(r)}catch(h){throw new t.InternalError({code:"IDENTITY_TOKEN_PARSE_ERROR",message:`invalid identity token: ${r}`,cause:h})}let o=await this.keyHolder.sign(Buffer.from(n));if(o.key.$case!=="publicKey")throw new t.InternalError({code:"CA_CREATE_SIGNING_CERTIFICATE_ERROR",message:"unexpected format for signing key"});let l=await this.ca.createSigningCertificate(r,o.key.publicKey,o.signature);return{signature:(await this.keyHolder.sign(c)).signature,key:{$case:"x509Certificate",certificate:l[0]}}}async getIdentityToken(){try{return await this.identityProvider.getToken()}catch(c){throw new t.InternalError({code:"IDENTITY_TOKEN_READ_ERROR",message:"error retrieving identity token",cause:c})}}};e.FulcioSigner=a}),zk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FulcioSigner=e.DEFAULT_FULCIO_URL=void 0;var t=Wk();Object.defineProperty(e,"DEFAULT_FULCIO_URL",{enumerable:!0,get:v(function(){return t.DEFAULT_FULCIO_URL},"get")}),Object.defineProperty(e,"FulcioSigner",{enumerable:!0,get:v(function(){return t.FulcioSigner},"get")})}),qk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rekor=void 0;var t=Jl(),s=class{static{v(this,"Rekor")}constructor(i){this.options=i}async createEntry(i){let{baseURL:a,timeout:c,retry:r}=this.options,n=`${a}/api/v1/log/entries`,o=await(await(0,t.fetchWithRetry)(n,{headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(i),timeout:c,retry:r})).json();return u(o)}async getEntry(i){let{baseURL:a,timeout:c,retry:r}=this.options,n=`${a}/api/v1/log/entries/${i}`,o=await(await(0,t.fetchWithRetry)(n,{method:"GET",headers:{Accept:"application/json"},timeout:c,retry:r})).json();return u(o)}};e.Rekor=s;function u(i){let a=Object.entries(i);if(a.length!=1)throw new Error("Received multiple entries in Rekor response");let[c,r]=a[0];return{...r,uuid:c}}v(u,"entryFromResponse")}),Kk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TLogClient=void 0;var t=bs(),s=Kl(),u=qk(),i=class{static{v(this,"TLogClient")}constructor(c){this.fetchOnConflict=c.fetchOnConflict??!1,this.rekor=new u.Rekor({baseURL:c.rekorBaseURL,retry:c.retry,timeout:c.timeout})}async createEntry(c){let r;try{r=await this.rekor.createEntry(c)}catch(n){if(a(n)&&this.fetchOnConflict){let o=n.location.split("/").pop()||"";try{r=await this.rekor.getEntry(o)}catch(l){(0,t.internalError)(l,"TLOG_FETCH_ENTRY_ERROR","error fetching tlog entry")}}else(0,t.internalError)(n,"TLOG_CREATE_ENTRY_ERROR","error creating tlog entry")}return r}};e.TLogClient=i;function a(c){return c instanceof s.HTTPError&&c.statusCode===409&&c.location!==void 0}v(a,"entryExistsError")}),Jk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toProposedEntry=i;var t=Ki(),s=Zt(),u="sha256";function i(o,l,h="dsse"){switch(o.$case){case"dsseEnvelope":return h==="intoto"?r(o.dsseEnvelope,l):c(o.dsseEnvelope,l);case"messageSignature":return a(o.messageSignature,l)}}v(i,"toProposedEntry");function a(o,l){let h=o.messageDigest.digest.toString("hex"),p=o.signature.toString("base64"),d=s.encoding.base64Encode(l);return{apiVersion:"0.0.1",kind:"hashedrekord",spec:{data:{hash:{algorithm:u,value:h}},signature:{content:p,publicKey:{content:d}}}}}v(a,"toProposedHashedRekordEntry");function c(o,l){let h=JSON.stringify((0,t.envelopeToJSON)(o)),p=s.encoding.base64Encode(l);return{apiVersion:"0.0.1",kind:"dsse",spec:{proposedContent:{envelope:h,verifiers:[p]}}}}v(c,"toProposedDSSEEntry");function r(o,l){let h=s.crypto.digest(u,o.payload).toString("hex"),p=n(o,l),d=s.encoding.base64Encode(o.payload.toString("base64")),g=s.encoding.base64Encode(o.signatures[0].sig.toString("base64")),m=o.signatures[0].keyid,f=s.encoding.base64Encode(l),y={payloadType:o.payloadType,payload:d,signatures:[{sig:g,publicKey:f}]};return m.length>0&&(y.signatures[0].keyid=m),{apiVersion:"0.0.2",kind:"intoto",spec:{content:{envelope:y,hash:{algorithm:u,value:p},payloadHash:{algorithm:u,value:h}}}}}v(r,"toProposedIntotoEntry");function n(o,l){let h={payloadType:o.payloadType,payload:o.payload.toString("base64"),signatures:[{sig:o.signatures[0].sig.toString("base64"),publicKey:l}]};return o.signatures[0].keyid.length>0&&(h.signatures[0].keyid=o.signatures[0].keyid),s.crypto.digest(u,s.json.canonicalize(h)).toString("hex")}v(n,"calculateDSSEHash")}),Zk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RekorWitness=e.DEFAULT_REKOR_URL=void 0;var t=Zt(),s=Kk(),u=Jk();e.DEFAULT_REKOR_URL="https://rekor.sigstore.dev";var i=class{static{v(this,"RekorWitness")}constructor(n){this.entryType=n.entryType,this.tlog=new s.TLogClient({...n,rekorBaseURL:n.rekorBaseURL||e.DEFAULT_REKOR_URL})}async testify(n,o){let l=(0,u.toProposedEntry)(n,o,this.entryType),h=await this.tlog.createEntry(l);return a(h)}};e.RekorWitness=i;function a(n){let o=Buffer.from(n.logID,"hex"),l=t.encoding.base64Decode(n.body),h=JSON.parse(l),p=n?.verification?.signedEntryTimestamp?c(n.verification.signedEntryTimestamp):void 0,d=n?.verification?.inclusionProof?r(n.verification.inclusionProof):void 0;return{tlogEntries:[{logIndex:n.logIndex.toString(),logId:{keyId:o},integratedTime:n.integratedTime.toString(),kindVersion:{kind:h.kind,version:h.apiVersion},inclusionPromise:p,inclusionProof:d,canonicalizedBody:Buffer.from(n.body,"base64")}]}}v(a,"toTransparencyLogEntry");function c(n){return{signedEntryTimestamp:Buffer.from(n,"base64")}}v(c,"inclusionPromise");function r(n){return{logIndex:n.logIndex.toString(),treeSize:n.treeSize.toString(),rootHash:Buffer.from(n.rootHash,"hex"),hashes:n.hashes.map(o=>Buffer.from(o,"hex")),checkpoint:{envelope:n.checkpoint}}}v(r,"inclusionProof")}),Xk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampAuthority=void 0;var t=Jl(),s=class{static{v(this,"TimestampAuthority")}constructor(u){this.options=u}async createTimestamp(u){let{baseURL:i,timeout:a,retry:c}=this.options,r=`${i}/api/v1/timestamp`;return(await(0,t.fetchWithRetry)(r,{headers:{"Content-Type":"application/json"},body:JSON.stringify(u),timeout:a,retry:c})).buffer()}};e.TimestampAuthority=s}),Yk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TSAClient=void 0;var t=bs(),s=Xk(),u=Zt(),i="sha256",a=class{static{v(this,"TSAClient")}constructor(c){this.tsa=new s.TimestampAuthority({baseURL:c.tsaBaseURL,retry:c.retry,timeout:c.timeout})}async createTimestamp(c){let r={artifactHash:u.crypto.digest(i,c).toString("base64"),hashAlgorithm:i};try{return await this.tsa.createTimestamp(r)}catch(n){(0,t.internalError)(n,"TSA_CREATE_TIMESTAMP_ERROR","error creating timestamp")}}};e.TSAClient=a}),Qk=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TSAWitness=void 0;var t=Yk(),s=class{static{v(this,"TSAWitness")}constructor(i){this.tsa=new t.TSAClient({tsaBaseURL:i.tsaBaseURL,retry:i.retry,timeout:i.timeout})}async testify(i){let a=u(i);return{rfc3161Timestamps:[{signedTimestamp:await this.tsa.createTimestamp(a)}]}}};e.TSAWitness=s;function u(i){switch(i.$case){case"dsseEnvelope":return i.dsseEnvelope.signatures[0].sig;case"messageSignature":return i.messageSignature.signature}}v(u,"extractSignature")}),eL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TSAWitness=e.RekorWitness=e.DEFAULT_REKOR_URL=void 0;var t=Zk();Object.defineProperty(e,"DEFAULT_REKOR_URL",{enumerable:!0,get:v(function(){return t.DEFAULT_REKOR_URL},"get")}),Object.defineProperty(e,"RekorWitness",{enumerable:!0,get:v(function(){return t.RekorWitness},"get")});var s=Qk();Object.defineProperty(e,"TSAWitness",{enumerable:!0,get:v(function(){return s.TSAWitness},"get")})}),Hg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TSAWitness=e.RekorWitness=e.DEFAULT_REKOR_URL=e.FulcioSigner=e.DEFAULT_FULCIO_URL=e.CIContextProvider=e.InternalError=e.MessageSignatureBundleBuilder=e.DSSEBundleBuilder=void 0;var t=Bk();Object.defineProperty(e,"DSSEBundleBuilder",{enumerable:!0,get:v(function(){return t.DSSEBundleBuilder},"get")}),Object.defineProperty(e,"MessageSignatureBundleBuilder",{enumerable:!0,get:v(function(){return t.MessageSignatureBundleBuilder},"get")});var s=bs();Object.defineProperty(e,"InternalError",{enumerable:!0,get:v(function(){return s.InternalError},"get")});var u=Fk();Object.defineProperty(e,"CIContextProvider",{enumerable:!0,get:v(function(){return u.CIContextProvider},"get")});var i=zk();Object.defineProperty(e,"DEFAULT_FULCIO_URL",{enumerable:!0,get:v(function(){return i.DEFAULT_FULCIO_URL},"get")}),Object.defineProperty(e,"FulcioSigner",{enumerable:!0,get:v(function(){return i.FulcioSigner},"get")});var a=eL();Object.defineProperty(e,"DEFAULT_REKOR_URL",{enumerable:!0,get:v(function(){return a.DEFAULT_REKOR_URL},"get")}),Object.defineProperty(e,"RekorWitness",{enumerable:!0,get:v(function(){return a.RekorWitness},"get")}),Object.defineProperty(e,"TSAWitness",{enumerable:!0,get:v(function(){return a.TSAWitness},"get")})}),tL=K(e=>{"use strict";var t=e&&e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.appDataPath=i;var s=t(require("os")),u=t(require("path"));function i(a){let c=s.default.homedir();switch(process.platform){case"darwin":{let r=u.default.join(c,"Library","Application Support");return u.default.join(r,a)}case"win32":{let r=process.env.LOCALAPPDATA||u.default.join(c,"AppData","Local");return u.default.join(r,a,"Data")}default:{let r=process.env.XDG_DATA_HOME||u.default.join(c,".local","share");return u.default.join(r,a)}}}v(i,"appDataPath")}),Tt=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnsupportedAlgorithmError=e.CryptoError=e.LengthOrHashMismatchError=e.UnsignedMetadataError=e.RepositoryError=e.ValueError=void 0;var t=class extends Error{static{v(this,"ValueError")}};e.ValueError=t;var s=class extends Error{static{v(this,"RepositoryError")}};e.RepositoryError=s;var u=class extends s{static{v(this,"UnsignedMetadataError")}};e.UnsignedMetadataError=u;var i=class extends s{static{v(this,"LengthOrHashMismatchError")}};e.LengthOrHashMismatchError=i;var a=class extends Error{static{v(this,"CryptoError")}};e.CryptoError=a;var c=class extends a{static{v(this,"UnsupportedAlgorithmError")}};e.UnsupportedAlgorithmError=c}),rL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDefined=t,e.isObject=s,e.isStringArray=u,e.isObjectArray=i,e.isStringRecord=a,e.isObjectRecord=c;function t(r){return r!==void 0}v(t,"isDefined");function s(r){return typeof r=="object"&&r!==null}v(s,"isObject");function u(r){return Array.isArray(r)&&r.every(n=>typeof n=="string")}v(u,"isStringArray");function i(r){return Array.isArray(r)&&r.every(s)}v(i,"isObjectArray");function a(r){return typeof r=="object"&&r!==null&&Object.keys(r).every(n=>typeof n=="string")&&Object.values(r).every(n=>typeof n=="string")}v(a,"isStringRecord");function c(r){return typeof r=="object"&&r!==null&&Object.keys(r).every(n=>typeof n=="string")&&Object.values(r).every(n=>typeof n=="object"&&n!==null)}v(c,"isObjectRecord")}),Gg=K((e,t)=>{function s(i){let a=[];if(typeof i=="string")a.push(u(i));else if(typeof i=="boolean")a.push(JSON.stringify(i));else if(Number.isInteger(i))a.push(JSON.stringify(i));else if(i===null)a.push(JSON.stringify(i));else if(Array.isArray(i)){a.push("[");let c=!0;i.forEach(r=>{c||a.push(","),c=!1,a.push(s(r))}),a.push("]")}else if(typeof i=="object"){a.push("{");let c=!0;Object.keys(i).sort().forEach(r=>{c||a.push(","),c=!1,a.push(u(r)),a.push(":"),a.push(s(i[r]))}),a.push("}")}else throw new TypeError("cannot encode "+i.toString());return a.join("")}v(s,"canonicalize");function u(i){return'"'+i.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}v(u,"canonicalizeString"),t.exports={canonicalize:s}}),sL=K(e=>{"use strict";var t=e&&e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.verifySignature=void 0;var s=Gg(),u=t(require("crypto")),i=v((a,c,r)=>{let n=Buffer.from((0,s.canonicalize)(a));return u.default.verify(void 0,n,c,Buffer.from(r,"hex"))},"verifySignature");e.verifySignature=i}),Et=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(i,a,c,r){r===void 0&&(r=c);var n=Object.getOwnPropertyDescriptor(a,c);(!n||("get"in n?!a.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:v(function(){return a[c]},"get")}),Object.defineProperty(i,r,n)}:function(i,a,c,r){r===void 0&&(r=c),i[r]=a[c]}),s=e&&e.__setModuleDefault||(Object.create?function(i,a){Object.defineProperty(i,"default",{enumerable:!0,value:a})}:function(i,a){i.default=a}),u=e&&e.__importStar||function(){var i=v(function(a){return i=Object.getOwnPropertyNames||function(c){var r=[];for(var n in c)Object.prototype.hasOwnProperty.call(c,n)&&(r[r.length]=n);return r},i(a)},"ownKeys");return function(a){if(a&&a.__esModule)return a;var c={};if(a!=null)for(var r=i(a),n=0;n<r.length;n++)r[n]!=="default"&&t(c,a,r[n]);return s(c,a),c}}();Object.defineProperty(e,"__esModule",{value:!0}),e.crypto=e.guard=void 0,e.guard=u(rL()),e.crypto=u(sL())}),Or=K(e=>{"use strict";var t=e&&e.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.Signed=e.MetadataKind=void 0,e.isMetadataKind=r;var s=t(require("util")),u=Tt(),i=Et(),a=["1","0","31"],c;(function(l){l.Root="root",l.Timestamp="timestamp",l.Snapshot="snapshot",l.Targets="targets"})(c||(e.MetadataKind=c={}));function r(l){return typeof l=="string"&&Object.values(c).includes(l)}v(r,"isMetadataKind");var n=class Vg{static{v(this,"Signed")}specVersion;expires;version;unrecognizedFields;constructor(h){this.specVersion=h.specVersion||a.join(".");let p=this.specVersion.split(".");if(!(p.length===2||p.length===3)||!p.every(d=>o(d)))throw new u.ValueError("Failed to parse specVersion");if(p[0]!=a[0])throw new u.ValueError("Unsupported specVersion");this.expires=h.expires,this.version=h.version,this.unrecognizedFields=h.unrecognizedFields||{}}equals(h){return h instanceof Vg?this.specVersion===h.specVersion&&this.expires===h.expires&&this.version===h.version&&s.default.isDeepStrictEqual(this.unrecognizedFields,h.unrecognizedFields):!1}isExpired(h){return h||(h=new Date),h>=new Date(this.expires)}static commonFieldsFromJSON(h){let{spec_version:p,expires:d,version:g,...m}=h;if(i.guard.isDefined(p)){if(typeof p!="string")throw new TypeError("spec_version must be a string")}else throw new u.ValueError("spec_version is not defined");if(i.guard.isDefined(d)){if(typeof d!="string")throw new TypeError("expires must be a string")}else throw new u.ValueError("expires is not defined");if(i.guard.isDefined(g)){if(typeof g!="number")throw new TypeError("version must be a number")}else throw new u.ValueError("version is not defined");return{specVersion:p,expires:d,version:g,unrecognizedFields:m}}};e.Signed=n;function o(l){return!isNaN(Number(l))}v(o,"isNumeric")}),Zi=K(e=>{"use strict";var t=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.TargetFile=e.MetaFile=void 0;var s=t(require("crypto")),u=t(require("util")),i=Tt(),a=Et(),c=class nl{static{v(this,"MetaFile")}version;length;hashes;unrecognizedFields;constructor(l){if(l.version<=0)throw new i.ValueError("Metafile version must be at least 1");l.length!==void 0&&n(l.length),this.version=l.version,this.length=l.length,this.hashes=l.hashes,this.unrecognizedFields=l.unrecognizedFields||{}}equals(l){return l instanceof nl?this.version===l.version&&this.length===l.length&&u.default.isDeepStrictEqual(this.hashes,l.hashes)&&u.default.isDeepStrictEqual(this.unrecognizedFields,l.unrecognizedFields):!1}verify(l){if(this.length!==void 0&&l.length!==this.length)throw new i.LengthOrHashMismatchError(`Expected length ${this.length} but got ${l.length}`);this.hashes&&Object.entries(this.hashes).forEach(([h,p])=>{let d;try{d=s.default.createHash(h)}catch{throw new i.LengthOrHashMismatchError(`Hash algorithm ${h} not supported`)}let g=d.update(l).digest("hex");if(g!==p)throw new i.LengthOrHashMismatchError(`Expected hash ${p} but got ${g}`)})}toJSON(){let l={version:this.version,...this.unrecognizedFields};return this.length!==void 0&&(l.length=this.length),this.hashes&&(l.hashes=this.hashes),l}static fromJSON(l){let{version:h,length:p,hashes:d,...g}=l;if(typeof h!="number")throw new TypeError("version must be a number");if(a.guard.isDefined(p)&&typeof p!="number")throw new TypeError("length must be a number");if(a.guard.isDefined(d)&&!a.guard.isStringRecord(d))throw new TypeError("hashes must be string keys and values");return new nl({version:h,length:p,hashes:d,unrecognizedFields:g})}};e.MetaFile=c;var r=class ol{static{v(this,"TargetFile")}length;path;hashes;unrecognizedFields;constructor(l){n(l.length),this.length=l.length,this.path=l.path,this.hashes=l.hashes,this.unrecognizedFields=l.unrecognizedFields||{}}get custom(){let l=this.unrecognizedFields.custom;return!l||Array.isArray(l)||typeof l!="object"?{}:l}equals(l){return l instanceof ol?this.length===l.length&&this.path===l.path&&u.default.isDeepStrictEqual(this.hashes,l.hashes)&&u.default.isDeepStrictEqual(this.unrecognizedFields,l.unrecognizedFields):!1}async verify(l){let h=0,p=Object.keys(this.hashes).reduce((d,g)=>{try{d[g]=s.default.createHash(g)}catch{throw new i.LengthOrHashMismatchError(`Hash algorithm ${g} not supported`)}return d},{});for await(let d of l)h+=d.length,Object.values(p).forEach(g=>{g.update(d)});if(h!==this.length)throw new i.LengthOrHashMismatchError(`Expected length ${this.length} but got ${h}`);Object.entries(p).forEach(([d,g])=>{let m=this.hashes[d],f=g.digest("hex");if(f!==m)throw new i.LengthOrHashMismatchError(`Expected hash ${m} but got ${f}`)})}toJSON(){return{length:this.length,hashes:this.hashes,...this.unrecognizedFields}}static fromJSON(l,h){let{length:p,hashes:d,...g}=h;if(typeof p!="number")throw new TypeError("length must be a number");if(!a.guard.isStringRecord(d))throw new TypeError("hashes must have string keys and values");return new ol({length:p,path:l,hashes:d,unrecognizedFields:g})}};e.TargetFile=r;function n(o){if(o<0)throw new i.ValueError("Length must be at least 0")}v(n,"validateLength")}),iL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeOIDString=s;var t=6;function s(i){let a=i.split("."),c=parseInt(a[0],10)*40+parseInt(a[1],10),r=[];a.slice(2).forEach(o=>{let l=u(parseInt(o,10));r.push(...l)});let n=Buffer.from([c,...r]);return Buffer.from([t,n.length,...n])}v(s,"encodeOIDString");function u(i){let a=[],c=0;for(;i>0;)a.unshift(i&127|c),i>>=7,c=128;return a}v(u,"encodeVariableLengthInteger")}),nL=K(e=>{"use strict";var t=e&&e.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(e,"__esModule",{value:!0}),e.getPublicKey=p;var s=t(require("crypto")),u=Tt(),i=iL(),a=48,c=3,r=0,n="1.3.101.112",o="1.2.840.10045.2.1",l="1.2.840.10045.3.1.7",h="-----BEGIN PUBLIC KEY-----";function p(E){switch(E.keyType){case"rsa":return d(E);case"ed25519":return g(E);case"ecdsa":case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":return m(E);default:throw new u.UnsupportedAlgorithmError(`Unsupported key type: ${E.keyType}`)}}v(p,"getPublicKey");function d(E){if(!E.keyVal.startsWith(h))throw new u.CryptoError("Invalid key format");let b=s.default.createPublicKey(E.keyVal);switch(E.scheme){case"rsassa-pss-sha256":return{key:b,padding:s.default.constants.RSA_PKCS1_PSS_PADDING};default:throw new u.UnsupportedAlgorithmError(`Unsupported RSA scheme: ${E.scheme}`)}}v(d,"getRSAPublicKey");function g(E){let b;if(E.keyVal.startsWith(h))b=s.default.createPublicKey(E.keyVal);else{if(!S(E.keyVal))throw new u.CryptoError("Invalid key format");b=s.default.createPublicKey({key:f.hexToDER(E.keyVal),format:"der",type:"spki"})}return{key:b}}v(g,"getED25519PublicKey");function m(E){let b;if(E.keyVal.startsWith(h))b=s.default.createPublicKey(E.keyVal);else{if(!S(E.keyVal))throw new u.CryptoError("Invalid key format");b=s.default.createPublicKey({key:y.hexToDER(E.keyVal),format:"der",type:"spki"})}return{key:b}}v(m,"getECDCSAPublicKey");var f={hexToDER:v(E=>{let b=Buffer.from(E,"hex"),_=(0,i.encodeOIDString)(n),O=Buffer.concat([Buffer.concat([Buffer.from([a]),Buffer.from([_.length]),_]),Buffer.concat([Buffer.from([c]),Buffer.from([b.length+1]),Buffer.from([r]),b])]);return Buffer.concat([Buffer.from([a]),Buffer.from([O.length]),O])},"hexToDER")},y={hexToDER:v(E=>{let b=Buffer.from(E,"hex"),_=Buffer.concat([Buffer.from([c]),Buffer.from([b.length+1]),Buffer.from([r]),b]),O=Buffer.concat([(0,i.encodeOIDString)(o),(0,i.encodeOIDString)(l)]),w=Buffer.concat([Buffer.from([a]),Buffer.from([O.length]),O]);return Buffer.concat([Buffer.from([a]),Buffer.from([w.length+_.length]),w,_])},"hexToDER")},S=v(E=>/^[0-9a-fA-F]+$/.test(E),"isHex")}),Zl=K(e=>{"use strict";var t=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.Key=void 0;var s=t(require("util")),u=Tt(),i=Et(),a=nL(),c=class al{static{v(this,"Key")}keyID;keyType;scheme;keyVal;unrecognizedFields;constructor(n){let{keyID:o,keyType:l,scheme:h,keyVal:p,unrecognizedFields:d}=n;this.keyID=o,this.keyType=l,this.scheme=h,this.keyVal=p,this.unrecognizedFields=d||{}}verifySignature(n){let o=n.signatures[this.keyID];if(!o)throw new u.UnsignedMetadataError("no signature for key found in metadata");if(!this.keyVal.public)throw new u.UnsignedMetadataError("no public key found");let l=(0,a.getPublicKey)({keyType:this.keyType,scheme:this.scheme,keyVal:this.keyVal.public}),h=n.signed.toJSON();try{if(!i.crypto.verifySignature(h,l,o.sig))throw new u.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}catch(p){throw p instanceof u.UnsignedMetadataError?p:new u.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}}equals(n){return n instanceof al?this.keyID===n.keyID&&this.keyType===n.keyType&&this.scheme===n.scheme&&s.default.isDeepStrictEqual(this.keyVal,n.keyVal)&&s.default.isDeepStrictEqual(this.unrecognizedFields,n.unrecognizedFields):!1}toJSON(){return{keytype:this.keyType,scheme:this.scheme,keyval:this.keyVal,...this.unrecognizedFields}}static fromJSON(n,o){let{keytype:l,scheme:h,keyval:p,...d}=o;if(typeof l!="string")throw new TypeError("keytype must be a string");if(typeof h!="string")throw new TypeError("scheme must be a string");if(!i.guard.isStringRecord(p))throw new TypeError("keyval must be a string record");return new al({keyID:n,keyType:l,scheme:h,keyVal:p,unrecognizedFields:d})}};e.Key=c}),oL=K((e,t)=>{"use strict";t.exports=s;function s(a,c,r){a instanceof RegExp&&(a=u(a,r)),c instanceof RegExp&&(c=u(c,r));var n=i(a,c,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+a.length,n[1]),post:r.slice(n[1]+c.length)}}v(s,"balanced");function u(a,c){var r=c.match(a);return r?r[0]:null}v(u,"maybeMatch"),s.range=i;function i(a,c,r){var n,o,l,h,p,d=r.indexOf(a),g=r.indexOf(c,d+1),m=d;if(d>=0&&g>0){if(a===c)return[d,g];for(n=[],l=r.length;m>=0&&!p;)m==d?(n.push(m),d=r.indexOf(a,m+1)):n.length==1?p=[n.pop(),g]:(o=n.pop(),o<l&&(l=o,h=g),g=r.indexOf(c,m+1)),m=d<g&&d>=0?d:g;n.length&&(p=[l,h])}return p}v(i,"range")}),aL=K((e,t)=>{var s=oL();t.exports=p;var u="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",c="\0COMMA"+Math.random()+"\0",r="\0PERIOD"+Math.random()+"\0";function n(S){return parseInt(S,10)==S?parseInt(S,10):S.charCodeAt(0)}v(n,"numeric");function o(S){return S.split("\\\\").join(u).split("\\{").join(i).split("\\}").join(a).split("\\,").join(c).split("\\.").join(r)}v(o,"escapeBraces");function l(S){return S.split(u).join("\\").split(i).join("{").split(a).join("}").split(c).join(",").split(r).join(".")}v(l,"unescapeBraces");function h(S){if(!S)return[""];var E=[],b=s("{","}",S);if(!b)return S.split(",");var _=b.pre,O=b.body,w=b.post,A=_.split(",");A[A.length-1]+="{"+O+"}";var I=h(w);return w.length&&(A[A.length-1]+=I.shift(),A.push.apply(A,I)),E.push.apply(E,A),E}v(h,"parseCommaParts");function p(S){return S?(S.substr(0,2)==="{}"&&(S="\\{\\}"+S.substr(2)),y(o(S),!0).map(l)):[]}v(p,"expandTop");function d(S){return"{"+S+"}"}v(d,"embrace");function g(S){return/^-?0\d/.test(S)}v(g,"isPadded");function m(S,E){return S<=E}v(m,"lte");function f(S,E){return S>=E}v(f,"gte");function y(S,E){var b=[],_=s("{","}",S);if(!_)return[S];var O=_.pre,w=_.post.length?y(_.post,!1):[""];if(/\$$/.test(_.pre))for(var A=0;A<w.length;A++){var I=O+"{"+_.body+"}"+w[A];b.push(I)}else{var P=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(_.body),L=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(_.body),$=P||L,x=_.body.indexOf(",")>=0;if(!$&&!x)return _.post.match(/,(?!,).*\}/)?(S=_.pre+"{"+_.body+a+_.post,y(S)):[S];var M;if($)M=_.body.split(/\.\./);else if(M=h(_.body),M.length===1&&(M=y(M[0],!1).map(d),M.length===1))return w.map(function(F){return _.pre+M[0]+F});var U;if($){var V=n(M[0]),B=n(M[1]),G=Math.max(M[0].length,M[1].length),W=M.length==3?Math.abs(n(M[2])):1,N=m,D=B<V;D&&(W*=-1,N=f);var T=M.some(g);U=[];for(var C=V;N(C,B);C+=W){var Z;if(L)Z=String.fromCharCode(C),Z==="\\"&&(Z="");else if(Z=String(C),T){var X=G-Z.length;if(X>0){var Q=new Array(X+1).join("0");C<0?Z="-"+Q+Z.slice(1):Z=Q+Z}}U.push(Z)}}else{U=[];for(var k=0;k<M.length;k++)U.push.apply(U,y(M[k],!1))}for(var k=0;k<U.length;k++)for(var A=0;A<w.length;A++){var I=O+U[k]+w[A];(!E||$||I)&&b.push(I)}}return b}v(y,"expand")}),lL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertValidPattern=void 0;var t=1024*64,s=v(u=>{if(typeof u!="string")throw new TypeError("invalid pattern");if(u.length>t)throw new TypeError("pattern is too long")},"assertValidPattern");e.assertValidPattern=s}),cL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseClass=void 0;var t={"[: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]},s=v(c=>c.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),u=v(c=>c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),i=v(c=>c.join(""),"rangesToString"),a=v((c,r)=>{let n=r;if(c.charAt(n)!=="[")throw new Error("not in a brace expression");let o=[],l=[],h=n+1,p=!1,d=!1,g=!1,m=!1,f=n,y="";e:for(;h<c.length;){let b=c.charAt(h);if((b==="!"||b==="^")&&h===n+1){m=!0,h++;continue}if(b==="]"&&p&&!g){f=h+1;break}if(p=!0,b==="\\"&&!g){g=!0,h++;continue}if(b==="["&&!g){for(let[_,[O,w,A]]of Object.entries(t))if(c.startsWith(_,h)){if(y)return["$.",!1,c.length-n,!0];h+=_.length,A?l.push(O):o.push(O),d=d||w;continue e}}if(g=!1,y){b>y?o.push(s(y)+"-"+s(b)):b===y&&o.push(s(b)),y="",h++;continue}if(c.startsWith("-]",h+1)){o.push(s(b+"-")),h+=2;continue}if(c.startsWith("-",h+1)){y=b,h+=2;continue}o.push(s(b)),h++}if(f<h)return["",!1,0,!1];if(!o.length&&!l.length)return["$.",!1,c.length-n,!0];if(l.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!m){let b=o[0].length===2?o[0].slice(-1):o[0];return[u(b),!1,f-n,!1]}let S="["+(m?"^":"")+i(o)+"]",E="["+(m?"":"^")+i(l)+"]";return[o.length&&l.length?"("+S+"|"+E+")":o.length?S:E,d,f-n,!0]},"parseClass");e.parseClass=a}),ll=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=void 0;var t=v((s,{windowsPathsNoEscape:u=!1}={})=>u?s.replace(/\[([^\/\\])\]/g,"$1"):s.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");e.unescape=t}),ef=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AST=void 0;var t=cL(),s=ll(),u=new Set(["!","?","+","*","@"]),i=v(m=>u.has(m),"isExtglobType"),a="(?!(?:^|/)\\.\\.?(?:$|/))",c="(?!\\.)",r=new Set(["[","."]),n=new Set(["..","."]),o=new Set("().*{}+?[]^$\\!"),l=v(m=>m.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),h="[^/]",p=h+"*?",d=h+"+?",g=class rt{static{v(this,"AST")}type;#e;#t;#r=!1;#s=[];#i;#l;#c;#h=!1;#n;#p;#o=!1;constructor(f,y,S={}){this.type=f,f&&(this.#t=!0),this.#i=y,this.#e=this.#i?this.#i.#e:this,this.#n=this.#e===this?S:this.#e.#n,this.#c=this.#e===this?[]:this.#e.#c,f==="!"&&!this.#e.#h&&this.#c.push(this),this.#l=this.#i?this.#i.#s.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let f of this.#s)if(typeof f!="string"&&(f.type||f.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#p!==void 0?this.#p:this.type?this.#p=this.type+"("+this.#s.map(f=>String(f)).join("|")+")":this.#p=this.#s.map(f=>String(f)).join("")}#u(){if(this!==this.#e)throw new Error("should only call on root");if(this.#h)return this;this.toString(),this.#h=!0;let f;for(;f=this.#c.pop();){if(f.type!=="!")continue;let y=f,S=y.#i;for(;S;){for(let E=y.#l+1;!S.type&&E<S.#s.length;E++)for(let b of f.#s){if(typeof b=="string")throw new Error("string part in extglob AST??");b.copyIn(S.#s[E])}y=S,S=y.#i}}return this}push(...f){for(let y of f)if(y!==""){if(typeof y!="string"&&!(y instanceof rt&&y.#i===this))throw new Error("invalid part: "+y);this.#s.push(y)}}toJSON(){let f=this.type===null?this.#s.slice().map(y=>typeof y=="string"?y:y.toJSON()):[this.type,...this.#s.map(y=>y.toJSON())];return this.isStart()&&!this.type&&f.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#h&&this.#i?.type==="!")&&f.push({}),f}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#l===0)return!0;let f=this.#i;for(let y=0;y<this.#l;y++){let S=f.#s[y];if(!(S instanceof rt&&S.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let f=this.#i?this.#i.#s.length:0;return this.#l===f-1}copyIn(f){typeof f=="string"?this.push(f):this.push(f.clone(this))}clone(f){let y=new rt(this.type,f);for(let S of this.#s)y.copyIn(S);return y}static#a(f,y,S,E){let b=!1,_=!1,O=-1,w=!1;if(y.type===null){let $=S,x="";for(;$<f.length;){let M=f.charAt($++);if(b||M==="\\"){b=!b,x+=M;continue}if(_){$===O+1?(M==="^"||M==="!")&&(w=!0):M==="]"&&!($===O+2&&w)&&(_=!1),x+=M;continue}else if(M==="["){_=!0,O=$,w=!1,x+=M;continue}if(!E.noext&&i(M)&&f.charAt($)==="("){y.push(x),x="";let U=new rt(M,y);$=rt.#a(f,U,$,E),y.push(U);continue}x+=M}return y.push(x),$}let A=S+1,I=new rt(null,y),P=[],L="";for(;A<f.length;){let $=f.charAt(A++);if(b||$==="\\"){b=!b,L+=$;continue}if(_){A===O+1?($==="^"||$==="!")&&(w=!0):$==="]"&&!(A===O+2&&w)&&(_=!1),L+=$;continue}else if($==="["){_=!0,O=A,w=!1,L+=$;continue}if(i($)&&f.charAt(A)==="("){I.push(L),L="";let x=new rt($,I);I.push(x),A=rt.#a(f,x,A,E);continue}if($==="|"){I.push(L),L="",P.push(I),I=new rt(null,y);continue}if($===")")return L===""&&y.#s.length===0&&(y.#o=!0),I.push(L),L="",y.push(...P,I),A;L+=$}return y.type=null,y.#t=void 0,y.#s=[f.substring(S-1)],A}static fromGlob(f,y={}){let S=new rt(null,void 0,y);return rt.#a(f,S,0,y),S}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let f=this.toString(),[y,S,E,b]=this.toRegExpSource();if(!(E||this.#t||this.#n.nocase&&!this.#n.nocaseMagicOnly&&f.toUpperCase()!==f.toLowerCase()))return S;let _=(this.#n.nocase?"i":"")+(b?"u":"");return Object.assign(new RegExp(`^${y}$`,_),{_src:y,_glob:f})}get options(){return this.#n}toRegExpSource(f){let y=f??!!this.#n.dot;if(this.#e===this&&this.#u(),!this.type){let w=this.isStart()&&this.isEnd(),A=this.#s.map(L=>{let[$,x,M,U]=typeof L=="string"?rt.#g(L,this.#t,w):L.toRegExpSource(f);return this.#t=this.#t||M,this.#r=this.#r||U,$}).join(""),I="";if(this.isStart()&&typeof this.#s[0]=="string"&&!(this.#s.length===1&&n.has(this.#s[0]))){let L=r,$=y&&L.has(A.charAt(0))||A.startsWith("\\.")&&L.has(A.charAt(2))||A.startsWith("\\.\\.")&&L.has(A.charAt(4)),x=!y&&!f&&L.has(A.charAt(0));I=$?a:x?c:""}let P="";return this.isEnd()&&this.#e.#h&&this.#i?.type==="!"&&(P="(?:$|\\/)"),[I+A+P,(0,s.unescape)(A),this.#t=!!this.#t,this.#r]}let S=this.type==="*"||this.type==="+",E=this.type==="!"?"(?:(?!(?:":"(?:",b=this.#f(y);if(this.isStart()&&this.isEnd()&&!b&&this.type!=="!"){let w=this.toString();return this.#s=[w],this.type=null,this.#t=void 0,[w,(0,s.unescape)(this.toString()),!1,!1]}let _=!S||f||y||!c?"":this.#f(!0);_===b&&(_=""),_&&(b=`(?:${b})(?:${_})*?`);let O="";if(this.type==="!"&&this.#o)O=(this.isStart()&&!y?c:"")+d;else{let w=this.type==="!"?"))"+(this.isStart()&&!y&&!f?c:"")+p+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&_?")":this.type==="*"&&_?")?":`)${this.type}`;O=E+b+w}return[O,(0,s.unescape)(b),this.#t=!!this.#t,this.#r]}#f(f){return this.#s.map(y=>{if(typeof y=="string")throw new Error("string type in extglob ast??");let[S,E,b,_]=y.toRegExpSource(f);return this.#r=this.#r||_,S}).filter(y=>!(this.isStart()&&this.isEnd())||!!y).join("|")}static#g(f,y,S=!1){let E=!1,b="",_=!1;for(let O=0;O<f.length;O++){let w=f.charAt(O);if(E){E=!1,b+=(o.has(w)?"\\":"")+w;continue}if(w==="\\"){O===f.length-1?b+="\\\\":E=!0;continue}if(w==="["){let[A,I,P,L]=(0,t.parseClass)(f,O);if(P){b+=A,_=_||I,O+=P-1,y=y||L;continue}}if(w==="*"){S&&f==="*"?b+=d:b+=p,y=!0;continue}if(w==="?"){b+=h,y=!0;continue}b+=l(w)}return[b,(0,s.unescape)(f),!!y,_]}};e.AST=g}),tf=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.escape=void 0;var t=v((s,{windowsPathsNoEscape:u=!1}={})=>u?s.replace(/[?*()[\]]/g,"[$&]"):s.replace(/[?*()[\]\\]/g,"\\$&"),"escape");e.escape=t}),uL=K(e=>{"use strict";var t=e&&e.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;var s=t(aL()),u=lL(),i=ef(),a=tf(),c=ll(),r=v((j,q,J={})=>((0,u.assertValidPattern)(q),!J.nocomment&&q.charAt(0)==="#"?!1:new Q(q,J).match(j)),"minimatch");e.minimatch=r;var n=/^\*+([^+@!?\*\[\(]*)$/,o=v(j=>q=>!q.startsWith(".")&&q.endsWith(j),"starDotExtTest"),l=v(j=>q=>q.endsWith(j),"starDotExtTestDot"),h=v(j=>(j=j.toLowerCase(),q=>!q.startsWith(".")&&q.toLowerCase().endsWith(j)),"starDotExtTestNocase"),p=v(j=>(j=j.toLowerCase(),q=>q.toLowerCase().endsWith(j)),"starDotExtTestNocaseDot"),d=/^\*+\.\*+$/,g=v(j=>!j.startsWith(".")&&j.includes("."),"starDotStarTest"),m=v(j=>j!=="."&&j!==".."&&j.includes("."),"starDotStarTestDot"),f=/^\.\*+$/,y=v(j=>j!=="."&&j!==".."&&j.startsWith("."),"dotStarTest"),S=/^\*+$/,E=v(j=>j.length!==0&&!j.startsWith("."),"starTest"),b=v(j=>j.length!==0&&j!=="."&&j!=="..","starTestDot"),_=/^\?+([^+@!?\*\[\(]*)?$/,O=v(([j,q=""])=>{let J=P([j]);return q?(q=q.toLowerCase(),Y=>J(Y)&&Y.toLowerCase().endsWith(q)):J},"qmarksTestNocase"),w=v(([j,q=""])=>{let J=L([j]);return q?(q=q.toLowerCase(),Y=>J(Y)&&Y.toLowerCase().endsWith(q)):J},"qmarksTestNocaseDot"),A=v(([j,q=""])=>{let J=L([j]);return q?Y=>J(Y)&&Y.endsWith(q):J},"qmarksTestDot"),I=v(([j,q=""])=>{let J=P([j]);return q?Y=>J(Y)&&Y.endsWith(q):J},"qmarksTest"),P=v(([j])=>{let q=j.length;return J=>J.length===q&&!J.startsWith(".")},"qmarksTestNoExt"),L=v(([j])=>{let q=j.length;return J=>J.length===q&&J!=="."&&J!==".."},"qmarksTestNoExtDot"),$=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",x={win32:{sep:"\\"},posix:{sep:"/"}};e.sep=$==="win32"?x.win32.sep:x.posix.sep,e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol("globstar **"),e.minimatch.GLOBSTAR=e.GLOBSTAR;var M="[^/]",U=M+"*?",V="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",B="(?:(?!(?:\\/|^)\\.).)*?",G=v((j,q={})=>J=>(0,e.minimatch)(J,j,q),"filter");e.filter=G,e.minimatch.filter=e.filter;var W=v((j,q={})=>Object.assign({},j,q),"ext"),N=v(j=>{if(!j||typeof j!="object"||!Object.keys(j).length)return e.minimatch;let q=e.minimatch;return Object.assign(v((J,Y,R={})=>q(J,Y,W(j,R)),"m"),{Minimatch:class extends q.Minimatch{static{v(this,"Minimatch")}constructor(J,Y={}){super(J,W(j,Y))}static defaults(J){return q.defaults(W(j,J)).Minimatch}},AST:class extends q.AST{static{v(this,"AST")}constructor(J,Y,R={}){super(J,Y,W(j,R))}static fromGlob(J,Y={}){return q.AST.fromGlob(J,W(j,Y))}},unescape:v((J,Y={})=>q.unescape(J,W(j,Y)),"unescape"),escape:v((J,Y={})=>q.escape(J,W(j,Y)),"escape"),filter:v((J,Y={})=>q.filter(J,W(j,Y)),"filter"),defaults:v(J=>q.defaults(W(j,J)),"defaults"),makeRe:v((J,Y={})=>q.makeRe(J,W(j,Y)),"makeRe"),braceExpand:v((J,Y={})=>q.braceExpand(J,W(j,Y)),"braceExpand"),match:v((J,Y,R={})=>q.match(J,Y,W(j,R)),"match"),sep:q.sep,GLOBSTAR:e.GLOBSTAR})},"defaults");e.defaults=N,e.minimatch.defaults=e.defaults;var D=v((j,q={})=>((0,u.assertValidPattern)(j),q.nobrace||!/\{(?:(?!\{).)*\}/.test(j)?[j]:(0,s.default)(j)),"braceExpand");e.braceExpand=D,e.minimatch.braceExpand=e.braceExpand;var T=v((j,q={})=>new Q(j,q).makeRe(),"makeRe");e.makeRe=T,e.minimatch.makeRe=e.makeRe;var C=v((j,q,J={})=>{let Y=new Q(q,J);return j=j.filter(R=>Y.match(R)),Y.options.nonull&&!j.length&&j.push(q),j},"match");e.match=C,e.minimatch.match=e.match;var Z=/[?*]|[+@!]\(.*?\)|\[|\]/,X=v(j=>j.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Q=class{static{v(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(j,q={}){(0,u.assertValidPattern)(j),q=q||{},this.options=q,this.pattern=j,this.platform=q.platform||$,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!q.windowsPathsNoEscape||q.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!q.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!q.nonegate,this.comment=!1,this.empty=!1,this.partial=!!q.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=q.windowsNoMagicRoot!==void 0?q.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 j of this.set)for(let q of j)if(typeof q!="string")return!0;return!1}debug(...j){}make(){let j=this.pattern,q=this.options;if(!q.nocomment&&j.charAt(0)==="#"){this.comment=!0;return}if(!j){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],q.debug&&(this.debug=(...R)=>{}),this.debug(this.pattern,this.globSet);let J=this.globSet.map(R=>this.slashSplit(R));this.globParts=this.preprocess(J),this.debug(this.pattern,this.globParts);let Y=this.globParts.map((R,H,ee)=>{if(this.isWindows&&this.windowsNoMagicRoot){let ne=R[0]===""&&R[1]===""&&(R[2]==="?"||!Z.test(R[2]))&&!Z.test(R[3]),te=/^[a-z]:/i.test(R[0]);if(ne)return[...R.slice(0,4),...R.slice(4).map(ae=>this.parse(ae))];if(te)return[R[0],...R.slice(1).map(ae=>this.parse(ae))]}return R.map(ne=>this.parse(ne))});if(this.debug(this.pattern,Y),this.set=Y.filter(R=>R.indexOf(!1)===-1),this.isWindows)for(let R=0;R<this.set.length;R++){let H=this.set[R];H[0]===""&&H[1]===""&&this.globParts[R][2]==="?"&&typeof H[3]=="string"&&/^[a-z]:$/i.test(H[3])&&(H[2]="?")}this.debug(this.pattern,this.set)}preprocess(j){if(this.options.noglobstar)for(let J=0;J<j.length;J++)for(let Y=0;Y<j[J].length;Y++)j[J][Y]==="**"&&(j[J][Y]="*");let{optimizationLevel:q=1}=this.options;return q>=2?(j=this.firstPhasePreProcess(j),j=this.secondPhasePreProcess(j)):q>=1?j=this.levelOneOptimize(j):j=this.adjascentGlobstarOptimize(j),j}adjascentGlobstarOptimize(j){return j.map(q=>{let J=-1;for(;(J=q.indexOf("**",J+1))!==-1;){let Y=J;for(;q[Y+1]==="**";)Y++;Y!==J&&q.splice(J,Y-J)}return q})}levelOneOptimize(j){return j.map(q=>(q=q.reduce((J,Y)=>{let R=J[J.length-1];return Y==="**"&&R==="**"?J:Y===".."&&R&&R!==".."&&R!=="."&&R!=="**"?(J.pop(),J):(J.push(Y),J)},[]),q.length===0?[""]:q))}levelTwoFileOptimize(j){Array.isArray(j)||(j=this.slashSplit(j));let q=!1;do{if(q=!1,!this.preserveMultipleSlashes){for(let Y=1;Y<j.length-1;Y++){let R=j[Y];Y===1&&R===""&&j[0]===""||(R==="."||R==="")&&(q=!0,j.splice(Y,1),Y--)}j[0]==="."&&j.length===2&&(j[1]==="."||j[1]==="")&&(q=!0,j.pop())}let J=0;for(;(J=j.indexOf("..",J+1))!==-1;){let Y=j[J-1];Y&&Y!=="."&&Y!==".."&&Y!=="**"&&(q=!0,j.splice(J-1,2),J-=2)}}while(q);return j.length===0?[""]:j}firstPhasePreProcess(j){let q=!1;do{q=!1;for(let J of j){let Y=-1;for(;(Y=J.indexOf("**",Y+1))!==-1;){let H=Y;for(;J[H+1]==="**";)H++;H>Y&&J.splice(Y+1,H-Y);let ee=J[Y+1],ne=J[Y+2],te=J[Y+3];if(ee!==".."||!ne||ne==="."||ne===".."||!te||te==="."||te==="..")continue;q=!0,J.splice(Y,1);let ae=J.slice(0);ae[Y]="**",j.push(ae),Y--}if(!this.preserveMultipleSlashes){for(let H=1;H<J.length-1;H++){let ee=J[H];H===1&&ee===""&&J[0]===""||(ee==="."||ee==="")&&(q=!0,J.splice(H,1),H--)}J[0]==="."&&J.length===2&&(J[1]==="."||J[1]==="")&&(q=!0,J.pop())}let R=0;for(;(R=J.indexOf("..",R+1))!==-1;){let H=J[R-1];if(H&&H!=="."&&H!==".."&&H!=="**"){q=!0;let ee=R===1&&J[R+1]==="**"?["."]:[];J.splice(R-1,2,...ee),J.length===0&&J.push(""),R-=2}}}}while(q);return j}secondPhasePreProcess(j){for(let q=0;q<j.length-1;q++)for(let J=q+1;J<j.length;J++){let Y=this.partsMatch(j[q],j[J],!this.preserveMultipleSlashes);if(Y){j[q]=[],j[J]=Y;break}}return j.filter(q=>q.length)}partsMatch(j,q,J=!1){let Y=0,R=0,H=[],ee="";for(;Y<j.length&&R<q.length;)if(j[Y]===q[R])H.push(ee==="b"?q[R]:j[Y]),Y++,R++;else if(J&&j[Y]==="**"&&q[R]===j[Y+1])H.push(j[Y]),Y++;else if(J&&q[R]==="**"&&j[Y]===q[R+1])H.push(q[R]),R++;else if(j[Y]==="*"&&q[R]&&(this.options.dot||!q[R].startsWith("."))&&q[R]!=="**"){if(ee==="b")return!1;ee="a",H.push(j[Y]),Y++,R++}else if(q[R]==="*"&&j[Y]&&(this.options.dot||!j[Y].startsWith("."))&&j[Y]!=="**"){if(ee==="a")return!1;ee="b",H.push(q[R]),Y++,R++}else return!1;return j.length===q.length&&H}parseNegate(){if(this.nonegate)return;let j=this.pattern,q=!1,J=0;for(let Y=0;Y<j.length&&j.charAt(Y)==="!";Y++)q=!q,J++;J&&(this.pattern=j.slice(J)),this.negate=q}matchOne(j,q,J=!1){let Y=this.options;if(this.isWindows){let le=typeof j[0]=="string"&&/^[a-z]:$/i.test(j[0]),fe=!le&&j[0]===""&&j[1]===""&&j[2]==="?"&&/^[a-z]:$/i.test(j[3]),me=typeof q[0]=="string"&&/^[a-z]:$/i.test(q[0]),ce=!me&&q[0]===""&&q[1]===""&&q[2]==="?"&&typeof q[3]=="string"&&/^[a-z]:$/i.test(q[3]),pe=fe?3:le?0:void 0,de=ce?3:me?0:void 0;if(typeof pe=="number"&&typeof de=="number"){let[ye,Ee]=[j[pe],q[de]];ye.toLowerCase()===Ee.toLowerCase()&&(q[de]=ye,de>pe?q=q.slice(de):pe>de&&(j=j.slice(pe)))}}let{optimizationLevel:R=1}=this.options;R>=2&&(j=this.levelTwoFileOptimize(j)),this.debug("matchOne",this,{file:j,pattern:q}),this.debug("matchOne",j.length,q.length);for(var H=0,ee=0,ne=j.length,te=q.length;H<ne&&ee<te;H++,ee++){this.debug("matchOne loop");var ae=q[ee],he=j[H];if(this.debug(q,ae,he),ae===!1)return!1;if(ae===e.GLOBSTAR){this.debug("GLOBSTAR",[q,ae,he]);var re=H,ue=ee+1;if(ue===te){for(this.debug("** at the end");H<ne;H++)if(j[H]==="."||j[H]===".."||!Y.dot&&j[H].charAt(0)===".")return!1;return!0}for(;re<ne;){var ie=j[re];if(this.debug(`
|
|
78
|
+
globstar while`,j,re,q,ue,ie),this.matchOne(j.slice(re),q.slice(ue),J))return this.debug("globstar found match!",re,ne,ie),!0;if(ie==="."||ie===".."||!Y.dot&&ie.charAt(0)==="."){this.debug("dot detected!",j,re,q,ue);break}this.debug("globstar swallow a segment, and continue"),re++}return!!(J&&(this.debug(`
|
|
79
|
+
>>> no match, partial?`,j,re,q,ue),re===ne))}let le;if(typeof ae=="string"?(le=he===ae,this.debug("string match",ae,he,le)):(le=ae.test(he),this.debug("pattern match",ae,he,le)),!le)return!1}if(H===ne&&ee===te)return!0;if(H===ne)return J;if(ee===te)return H===ne-1&&j[H]==="";throw new Error("wtf?")}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(j){(0,u.assertValidPattern)(j);let q=this.options;if(j==="**")return e.GLOBSTAR;if(j==="")return"";let J,Y=null;(J=j.match(S))?Y=q.dot?b:E:(J=j.match(n))?Y=(q.nocase?q.dot?p:h:q.dot?l:o)(J[1]):(J=j.match(_))?Y=(q.nocase?q.dot?w:O:q.dot?A:I)(J):(J=j.match(d))?Y=q.dot?m:g:(J=j.match(f))&&(Y=y);let R=i.AST.fromGlob(j,this.options).toMMPattern();return Y&&typeof R=="object"&&Reflect.defineProperty(R,"test",{value:Y}),R}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let j=this.set;if(!j.length)return this.regexp=!1,this.regexp;let q=this.options,J=q.noglobstar?U:q.dot?V:B,Y=new Set(q.nocase?["i"]:[]),R=j.map(ne=>{let te=ne.map(ae=>{if(ae instanceof RegExp)for(let he of ae.flags.split(""))Y.add(he);return typeof ae=="string"?X(ae):ae===e.GLOBSTAR?e.GLOBSTAR:ae._src});return te.forEach((ae,he)=>{let re=te[he+1],ue=te[he-1];ae!==e.GLOBSTAR||ue===e.GLOBSTAR||(ue===void 0?re!==void 0&&re!==e.GLOBSTAR?te[he+1]="(?:\\/|"+J+"\\/)?"+re:te[he]=J:re===void 0?te[he-1]=ue+"(?:\\/|"+J+")?":re!==e.GLOBSTAR&&(te[he-1]=ue+"(?:\\/|\\/"+J+"\\/)"+re,te[he+1]=e.GLOBSTAR))}),te.filter(ae=>ae!==e.GLOBSTAR).join("/")}).join("|"),[H,ee]=j.length>1?["(?:",")"]:["",""];R="^"+H+R+ee+"$",this.negate&&(R="^(?!"+R+").+$");try{this.regexp=new RegExp(R,[...Y].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(j){return this.preserveMultipleSlashes?j.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(j)?["",...j.split(/\/+/)]:j.split(/\/+/)}match(j,q=this.partial){if(this.debug("match",j,this.pattern),this.comment)return!1;if(this.empty)return j==="";if(j==="/"&&q)return!0;let J=this.options;this.isWindows&&(j=j.split("\\").join("/"));let Y=this.slashSplit(j);this.debug(this.pattern,"split",Y);let R=this.set;this.debug(this.pattern,"set",R);let H=Y[Y.length-1];if(!H)for(let ee=Y.length-2;!H&&ee>=0;ee--)H=Y[ee];for(let ee=0;ee<R.length;ee++){let ne=R[ee],te=Y;if(J.matchBase&&ne.length===1&&(te=[H]),this.matchOne(te,ne,q))return J.flipNegate?!0:!this.negate}return J.flipNegate?!1:this.negate}static defaults(j){return e.minimatch.defaults(j).Minimatch}};e.Minimatch=Q;var k=ef();Object.defineProperty(e,"AST",{enumerable:!0,get:v(function(){return k.AST},"get")});var F=tf();Object.defineProperty(e,"escape",{enumerable:!0,get:v(function(){return F.escape},"get")});var z=ll();Object.defineProperty(e,"unescape",{enumerable:!0,get:v(function(){return z.unescape},"get")}),e.minimatch.AST=i.AST,e.minimatch.Minimatch=Q,e.minimatch.escape=a.escape,e.minimatch.unescape=c.unescape}),Wg=K(e=>{"use strict";var t=e&&e.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.SuccinctRoles=e.DelegatedRole=e.Role=e.TOP_LEVEL_ROLE_NAMES=void 0;var s=t(require("crypto")),u=uL(),i=t(require("util")),a=Tt(),c=Et();e.TOP_LEVEL_ROLE_NAMES=["root","targets","snapshot","timestamp"];var r=class cl{static{v(this,"Role")}keyIDs;threshold;unrecognizedFields;constructor(g){let{keyIDs:m,threshold:f,unrecognizedFields:y}=g;if(n(m))throw new a.ValueError("duplicate key IDs found");if(f<1)throw new a.ValueError("threshold must be at least 1");this.keyIDs=m,this.threshold=f,this.unrecognizedFields=y||{}}equals(g){return g instanceof cl?this.threshold===g.threshold&&i.default.isDeepStrictEqual(this.keyIDs,g.keyIDs)&&i.default.isDeepStrictEqual(this.unrecognizedFields,g.unrecognizedFields):!1}toJSON(){return{keyids:this.keyIDs,threshold:this.threshold,...this.unrecognizedFields}}static fromJSON(g){let{keyids:m,threshold:f,...y}=g;if(!c.guard.isStringArray(m))throw new TypeError("keyids must be an array");if(typeof f!="number")throw new TypeError("threshold must be a number");return new cl({keyIDs:m,threshold:f,unrecognizedFields:y})}};e.Role=r;function n(d){return new Set(d).size!==d.length}v(n,"hasDuplicates");var o=class ul extends r{static{v(this,"DelegatedRole")}name;terminating;paths;pathHashPrefixes;constructor(g){super(g);let{name:m,terminating:f,paths:y,pathHashPrefixes:S}=g;if(this.name=m,this.terminating=f,g.paths&&g.pathHashPrefixes)throw new a.ValueError("paths and pathHashPrefixes are mutually exclusive");this.paths=y,this.pathHashPrefixes=S}equals(g){return g instanceof ul?super.equals(g)&&this.name===g.name&&this.terminating===g.terminating&&i.default.isDeepStrictEqual(this.paths,g.paths)&&i.default.isDeepStrictEqual(this.pathHashPrefixes,g.pathHashPrefixes):!1}isDelegatedPath(g){if(this.paths)return this.paths.some(m=>h(g,m));if(this.pathHashPrefixes){let m=s.default.createHash("sha256").update(g).digest("hex");return this.pathHashPrefixes.some(f=>m.startsWith(f))}return!1}toJSON(){let g={...super.toJSON(),name:this.name,terminating:this.terminating};return this.paths&&(g.paths=this.paths),this.pathHashPrefixes&&(g.path_hash_prefixes=this.pathHashPrefixes),g}static fromJSON(g){let{keyids:m,threshold:f,name:y,terminating:S,paths:E,path_hash_prefixes:b,..._}=g;if(!c.guard.isStringArray(m))throw new TypeError("keyids must be an array of strings");if(typeof f!="number")throw new TypeError("threshold must be a number");if(typeof y!="string")throw new TypeError("name must be a string");if(typeof S!="boolean")throw new TypeError("terminating must be a boolean");if(c.guard.isDefined(E)&&!c.guard.isStringArray(E))throw new TypeError("paths must be an array of strings");if(c.guard.isDefined(b)&&!c.guard.isStringArray(b))throw new TypeError("path_hash_prefixes must be an array of strings");return new ul({keyIDs:m,threshold:f,name:y,terminating:S,paths:E,pathHashPrefixes:b,unrecognizedFields:_})}};e.DelegatedRole=o;var l=v((d,g)=>d.map((m,f)=>[m,g[f]]),"zip");function h(d,g){let m=d.split("/"),f=g.split("/");return f.length!=m.length?!1:l(m,f).every(([y,S])=>(0,u.minimatch)(y,S))}v(h,"isTargetInPathPattern");var p=class hl extends r{static{v(this,"SuccinctRoles")}bitLength;namePrefix;numberOfBins;suffixLen;constructor(g){super(g);let{bitLength:m,namePrefix:f}=g;if(m<=0||m>32)throw new a.ValueError("bitLength must be between 1 and 32");this.bitLength=m,this.namePrefix=f,this.numberOfBins=Math.pow(2,m),this.suffixLen=(this.numberOfBins-1).toString(16).length}equals(g){return g instanceof hl?super.equals(g)&&this.bitLength===g.bitLength&&this.namePrefix===g.namePrefix:!1}getRoleForTarget(g){let m=s.default.createHash("sha256").update(g).digest().subarray(0,4),f=32-this.bitLength,y=(m.readUInt32BE()>>>f).toString(16).padStart(this.suffixLen,"0");return`${this.namePrefix}-${y}`}*getRoles(){for(let g=0;g<this.numberOfBins;g++){let m=g.toString(16).padStart(this.suffixLen,"0");yield`${this.namePrefix}-${m}`}}isDelegatedRole(g){let m=this.namePrefix+"-";if(!g.startsWith(m))return!1;let f=g.slice(m.length,g.length);if(f.length!=this.suffixLen||!f.match(/^[0-9a-fA-F]+$/))return!1;let y=parseInt(f,16);return 0<=y&&y<this.numberOfBins}toJSON(){return{...super.toJSON(),bit_length:this.bitLength,name_prefix:this.namePrefix}}static fromJSON(g){let{keyids:m,threshold:f,bit_length:y,name_prefix:S,...E}=g;if(!c.guard.isStringArray(m))throw new TypeError("keyids must be an array of strings");if(typeof f!="number")throw new TypeError("threshold must be a number");if(typeof y!="number")throw new TypeError("bit_length must be a number");if(typeof S!="string")throw new TypeError("name_prefix must be a string");return new hl({keyIDs:m,threshold:f,bitLength:y,namePrefix:S,unrecognizedFields:E})}};e.SuccinctRoles=p}),zg=K(e=>{"use strict";var t=e&&e.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.Root=void 0;var s=t(require("util")),u=Or(),i=Tt(),a=Zl(),c=Wg(),r=Et(),n=class pl extends u.Signed{static{v(this,"Root")}type=u.MetadataKind.Root;keys;roles;consistentSnapshot;constructor(g){if(super(g),this.keys=g.keys||{},this.consistentSnapshot=g.consistentSnapshot??!0,!g.roles)this.roles=c.TOP_LEVEL_ROLE_NAMES.reduce((m,f)=>({...m,[f]:new c.Role({keyIDs:[],threshold:1})}),{});else{let m=new Set(Object.keys(g.roles));if(!c.TOP_LEVEL_ROLE_NAMES.every(f=>m.has(f)))throw new i.ValueError("missing top-level role");this.roles=g.roles}}addKey(g,m){if(!this.roles[m])throw new i.ValueError(`role ${m} does not exist`);this.roles[m].keyIDs.includes(g.keyID)||this.roles[m].keyIDs.push(g.keyID),this.keys[g.keyID]=g}equals(g){return g instanceof pl?super.equals(g)&&this.consistentSnapshot===g.consistentSnapshot&&s.default.isDeepStrictEqual(this.keys,g.keys)&&s.default.isDeepStrictEqual(this.roles,g.roles):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,keys:o(this.keys),roles:l(this.roles),consistent_snapshot:this.consistentSnapshot,...this.unrecognizedFields}}static fromJSON(g){let{unrecognizedFields:m,...f}=u.Signed.commonFieldsFromJSON(g),{keys:y,roles:S,consistent_snapshot:E,...b}=m;if(typeof E!="boolean")throw new TypeError("consistent_snapshot must be a boolean");return new pl({...f,keys:h(y),roles:p(S),consistentSnapshot:E,unrecognizedFields:b})}};e.Root=n;function o(d){return Object.entries(d).reduce((g,[m,f])=>({...g,[m]:f.toJSON()}),{})}v(o,"keysToJSON");function l(d){return Object.entries(d).reduce((g,[m,f])=>({...g,[m]:f.toJSON()}),{})}v(l,"rolesToJSON");function h(d){let g;if(r.guard.isDefined(d)){if(!r.guard.isObjectRecord(d))throw new TypeError("keys must be an object");g=Object.entries(d).reduce((m,[f,y])=>({...m,[f]:a.Key.fromJSON(f,y)}),{})}return g}v(h,"keysFromJSON");function p(d){let g;if(r.guard.isDefined(d)){if(!r.guard.isObjectRecord(d))throw new TypeError("roles must be an object");g=Object.entries(d).reduce((m,[f,y])=>({...m,[f]:c.Role.fromJSON(y)}),{})}return g}v(p,"rolesFromJSON")}),qg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Signature=void 0;var t=class Kg{static{v(this,"Signature")}keyID;sig;constructor(u){let{keyID:i,sig:a}=u;this.keyID=i,this.sig=a}toJSON(){return{keyid:this.keyID,sig:this.sig}}static fromJSON(u){let{keyid:i,sig:a}=u;if(typeof i!="string")throw new TypeError("keyid must be a string");if(typeof a!="string")throw new TypeError("sig must be a string");return new Kg({keyID:i,sig:a})}};e.Signature=t}),Jg=K(e=>{"use strict";var t=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.Snapshot=void 0;var s=t(require("util")),u=Or(),i=Zi(),a=Et(),c=class dl extends u.Signed{static{v(this,"Snapshot")}type=u.MetadataKind.Snapshot;meta;constructor(l){super(l),this.meta=l.meta||{"targets.json":new i.MetaFile({version:1})}}equals(l){return l instanceof dl?super.equals(l)&&s.default.isDeepStrictEqual(this.meta,l.meta):!1}toJSON(){return{_type:this.type,meta:r(this.meta),spec_version:this.specVersion,version:this.version,expires:this.expires,...this.unrecognizedFields}}static fromJSON(l){let{unrecognizedFields:h,...p}=u.Signed.commonFieldsFromJSON(l),{meta:d,...g}=h;return new dl({...p,meta:n(d),unrecognizedFields:g})}};e.Snapshot=c;function r(o){return Object.entries(o).reduce((l,[h,p])=>({...l,[h]:p.toJSON()}),{})}v(r,"metaToJSON");function n(o){let l;if(a.guard.isDefined(o))if(a.guard.isObjectRecord(o))l=Object.entries(o).reduce((h,[p,d])=>({...h,[p]:i.MetaFile.fromJSON(d)}),{});else throw new TypeError("meta field is malformed");return l}v(n,"metaFromJSON")}),hL=K(e=>{"use strict";var t=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.Delegations=void 0;var s=t(require("util")),u=Tt(),i=Zl(),a=Wg(),c=Et(),r=class fl{static{v(this,"Delegations")}keys;roles;unrecognizedFields;succinctRoles;constructor(d){if(this.keys=d.keys,this.unrecognizedFields=d.unrecognizedFields||{},d.roles&&Object.keys(d.roles).some(g=>a.TOP_LEVEL_ROLE_NAMES.includes(g)))throw new u.ValueError("Delegated role name conflicts with top-level role name");this.succinctRoles=d.succinctRoles,this.roles=d.roles}equals(d){return d instanceof fl?s.default.isDeepStrictEqual(this.keys,d.keys)&&s.default.isDeepStrictEqual(this.roles,d.roles)&&s.default.isDeepStrictEqual(this.unrecognizedFields,d.unrecognizedFields)&&s.default.isDeepStrictEqual(this.succinctRoles,d.succinctRoles):!1}*rolesForTarget(d){if(this.roles)for(let g of Object.values(this.roles))g.isDelegatedPath(d)&&(yield{role:g.name,terminating:g.terminating});else this.succinctRoles&&(yield{role:this.succinctRoles.getRoleForTarget(d),terminating:!0})}toJSON(){let d={keys:n(this.keys),...this.unrecognizedFields};return this.roles?d.roles=o(this.roles):this.succinctRoles&&(d.succinct_roles=this.succinctRoles.toJSON()),d}static fromJSON(d){let{keys:g,roles:m,succinct_roles:f,...y}=d,S;return c.guard.isObject(f)&&(S=a.SuccinctRoles.fromJSON(f)),new fl({keys:l(g),roles:h(m),unrecognizedFields:y,succinctRoles:S})}};e.Delegations=r;function n(p){return Object.entries(p).reduce((d,[g,m])=>({...d,[g]:m.toJSON()}),{})}v(n,"keysToJSON");function o(p){return Object.values(p).map(d=>d.toJSON())}v(o,"rolesToJSON");function l(p){if(!c.guard.isObjectRecord(p))throw new TypeError("keys is malformed");return Object.entries(p).reduce((d,[g,m])=>({...d,[g]:i.Key.fromJSON(g,m)}),{})}v(l,"keysFromJSON");function h(p){let d;if(c.guard.isDefined(p)){if(!c.guard.isObjectArray(p))throw new TypeError("roles is malformed");d=p.reduce((g,m)=>{let f=a.DelegatedRole.fromJSON(m);return{...g,[f.name]:f}},{})}return d}v(h,"rolesFromJSON")}),Zg=K(e=>{"use strict";var t=e&&e.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0}),e.Targets=void 0;var s=t(require("util")),u=Or(),i=hL(),a=Zi(),c=Et(),r=class gl extends u.Signed{static{v(this,"Targets")}type=u.MetadataKind.Targets;targets;delegations;constructor(p){super(p),this.targets=p.targets||{},this.delegations=p.delegations}addTarget(p){this.targets[p.path]=p}equals(p){return p instanceof gl?super.equals(p)&&s.default.isDeepStrictEqual(this.targets,p.targets)&&s.default.isDeepStrictEqual(this.delegations,p.delegations):!1}toJSON(){let p={_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,targets:n(this.targets),...this.unrecognizedFields};return this.delegations&&(p.delegations=this.delegations.toJSON()),p}static fromJSON(p){let{unrecognizedFields:d,...g}=u.Signed.commonFieldsFromJSON(p),{targets:m,delegations:f,...y}=d;return new gl({...g,targets:o(m),delegations:l(f),unrecognizedFields:y})}};e.Targets=r;function n(h){return Object.entries(h).reduce((p,[d,g])=>({...p,[d]:g.toJSON()}),{})}v(n,"targetsToJSON");function o(h){let p;if(c.guard.isDefined(h))if(c.guard.isObjectRecord(h))p=Object.entries(h).reduce((d,[g,m])=>({...d,[g]:a.TargetFile.fromJSON(g,m)}),{});else throw new TypeError("targets must be an object");return p}v(o,"targetsFromJSON");function l(h){let p;if(c.guard.isDefined(h))if(c.guard.isObject(h))p=i.Delegations.fromJSON(h);else throw new TypeError("delegations must be an object");return p}v(l,"delegationsFromJSON")}),Xg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Timestamp=void 0;var t=Or(),s=Zi(),u=Et(),i=class ml extends t.Signed{static{v(this,"Timestamp")}type=t.MetadataKind.Timestamp;snapshotMeta;constructor(r){super(r),this.snapshotMeta=r.snapshotMeta||new s.MetaFile({version:1})}equals(r){return r instanceof ml?super.equals(r)&&this.snapshotMeta.equals(r.snapshotMeta):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,meta:{"snapshot.json":this.snapshotMeta.toJSON()},...this.unrecognizedFields}}static fromJSON(r){let{unrecognizedFields:n,...o}=t.Signed.commonFieldsFromJSON(r),{meta:l,...h}=n;return new ml({...o,snapshotMeta:a(l),unrecognizedFields:h})}};e.Timestamp=i;function a(c){let r;if(u.guard.isDefined(c)){let n=c["snapshot.json"];if(!u.guard.isDefined(n)||!u.guard.isObject(n))throw new TypeError("missing snapshot.json in meta");r=s.MetaFile.fromJSON(n)}return r}v(a,"snapshotMetaFromJSON")}),pL=K(e=>{"use strict";var t=e&&e.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var s=Gg(),u=t(require("util")),i=Or(),a=Tt(),c=zg(),r=qg(),n=Jg(),o=Zg(),l=Xg(),h=Et(),p=class yl{static{v(this,"Metadata")}signed;signatures;unrecognizedFields;constructor(g,m,f){this.signed=g,this.signatures=m||{},this.unrecognizedFields=f||{}}sign(g,m=!0){let f=Buffer.from((0,s.canonicalize)(this.signed.toJSON())),y=g(f);m||(this.signatures={}),this.signatures[y.keyID]=y}verifyDelegate(g,m){let f,y={};switch(this.signed.type){case i.MetadataKind.Root:y=this.signed.keys,f=this.signed.roles[g];break;case i.MetadataKind.Targets:if(!this.signed.delegations)throw new a.ValueError(`No delegations found for ${g}`);y=this.signed.delegations.keys,this.signed.delegations.roles?f=this.signed.delegations.roles[g]:this.signed.delegations.succinctRoles&&this.signed.delegations.succinctRoles.isDelegatedRole(g)&&(f=this.signed.delegations.succinctRoles);break;default:throw new TypeError("invalid metadata type")}if(!f)throw new a.ValueError(`no delegation found for ${g}`);let S=new Set;if(f.keyIDs.forEach(E=>{let b=y[E];if(b)try{b.verifySignature(m),S.add(b.keyID)}catch{}}),S.size<f.threshold)throw new a.UnsignedMetadataError(`${g} was signed by ${S.size}/${f.threshold} keys`)}equals(g){return g instanceof yl?this.signed.equals(g.signed)&&u.default.isDeepStrictEqual(this.signatures,g.signatures)&&u.default.isDeepStrictEqual(this.unrecognizedFields,g.unrecognizedFields):!1}toJSON(){return{signatures:Object.values(this.signatures).map(g=>g.toJSON()),signed:this.signed.toJSON(),...this.unrecognizedFields}}static fromJSON(g,m){let{signed:f,signatures:y,...S}=m;if(!h.guard.isDefined(f)||!h.guard.isObject(f))throw new TypeError("signed is not defined");if(g!==f._type)throw new a.ValueError(`expected '${g}', got ${f._type}`);if(!h.guard.isObjectArray(y))throw new TypeError("signatures is not an array");let E;switch(g){case i.MetadataKind.Root:E=c.Root.fromJSON(f);break;case i.MetadataKind.Timestamp:E=l.Timestamp.fromJSON(f);break;case i.MetadataKind.Snapshot:E=n.Snapshot.fromJSON(f);break;case i.MetadataKind.Targets:E=o.Targets.fromJSON(f);break;default:throw new TypeError("invalid metadata type")}let b={};return y.forEach(_=>{let O=r.Signature.fromJSON(_);if(b[O.keyID])throw new a.ValueError(`multiple signatures found for keyid: ${O.keyID}`);b[O.keyID]=O}),new yl(E,b,S)}};e.Metadata=p}),Xl=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Timestamp=e.Targets=e.Snapshot=e.Signature=e.Root=e.Metadata=e.Key=e.TargetFile=e.MetaFile=e.ValueError=e.MetadataKind=void 0;var t=Or();Object.defineProperty(e,"MetadataKind",{enumerable:!0,get:v(function(){return t.MetadataKind},"get")});var s=Tt();Object.defineProperty(e,"ValueError",{enumerable:!0,get:v(function(){return s.ValueError},"get")});var u=Zi();Object.defineProperty(e,"MetaFile",{enumerable:!0,get:v(function(){return u.MetaFile},"get")}),Object.defineProperty(e,"TargetFile",{enumerable:!0,get:v(function(){return u.TargetFile},"get")});var i=Zl();Object.defineProperty(e,"Key",{enumerable:!0,get:v(function(){return i.Key},"get")});var a=pL();Object.defineProperty(e,"Metadata",{enumerable:!0,get:v(function(){return a.Metadata},"get")});var c=zg();Object.defineProperty(e,"Root",{enumerable:!0,get:v(function(){return c.Root},"get")});var r=qg();Object.defineProperty(e,"Signature",{enumerable:!0,get:v(function(){return r.Signature},"get")});var n=Jg();Object.defineProperty(e,"Snapshot",{enumerable:!0,get:v(function(){return n.Snapshot},"get")});var o=Zg();Object.defineProperty(e,"Targets",{enumerable:!0,get:v(function(){return o.Targets},"get")});var l=Xg();Object.defineProperty(e,"Timestamp",{enumerable:!0,get:v(function(){return l.Timestamp},"get")})}),Yl=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DownloadHTTPError=e.DownloadLengthMismatchError=e.DownloadError=e.ExpiredMetadataError=e.EqualVersionError=e.BadVersionError=e.RepositoryError=e.PersistError=e.RuntimeError=e.ValueError=void 0;var t=class extends Error{static{v(this,"ValueError")}};e.ValueError=t;var s=class extends Error{static{v(this,"RuntimeError")}};e.RuntimeError=s;var u=class extends Error{static{v(this,"PersistError")}};e.PersistError=u;var i=class extends Error{static{v(this,"RepositoryError")}};e.RepositoryError=i;var a=class extends i{static{v(this,"BadVersionError")}};e.BadVersionError=a;var c=class extends a{static{v(this,"EqualVersionError")}};e.EqualVersionError=c;var r=class extends i{static{v(this,"ExpiredMetadataError")}};e.ExpiredMetadataError=r;var n=class extends Error{static{v(this,"DownloadError")}};e.DownloadError=n;var o=class extends n{static{v(this,"DownloadLengthMismatchError")}};e.DownloadLengthMismatchError=o;var l=class extends n{static{v(this,"DownloadHTTPError")}statusCode;constructor(h,p){super(h),this.statusCode=p}};e.DownloadHTTPError=l}),dL=K(e=>{"use strict";var t=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.withTempFile=void 0;var s=t(require("internal/fs/promises")),u=t(require("os")),i=t(require("path")),a=v(async r=>c(async n=>r(i.default.join(n,"tempfile"))),"withTempFile");e.withTempFile=a;var c=v(async r=>{let n=await s.default.realpath(u.default.tmpdir()),o=await s.default.mkdtemp(n+i.default.sep);try{return await r(o)}finally{await s.default.rm(o,{force:!0,recursive:!0,maxRetries:3})}},"withTempDir")}),Yg=K(e=>{"use strict";var t=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultFetcher=e.BaseFetcher=void 0;var s=t(wr()),u=t(require("fs")),i=t(Wi()),a=t(require("util")),c=Yl(),r=dL(),n=(0,s.default)("tuf:fetch"),o=class{static{v(this,"BaseFetcher")}async downloadFile(p,d,g){return(0,r.withTempFile)(async m=>{let f=await this.fetch(p),y=0,S=u.default.createWriteStream(m);try{for await(let E of f){if(y+=E.length,y>d)throw new c.DownloadLengthMismatchError("Max length reached");await h(S,E)}}finally{await a.default.promisify(S.close).bind(S)()}return g(m)})}async downloadBytes(p,d){return this.downloadFile(p,d,async g=>{let m=u.default.createReadStream(g),f=[];for await(let y of m)f.push(y);return Buffer.concat(f)})}};e.BaseFetcher=o;var l=class extends o{static{v(this,"DefaultFetcher")}timeout;retry;constructor(p={}){super(),this.timeout=p.timeout,this.retry=p.retry}async fetch(p){n("GET %s",p);let d=await(0,i.default)(p,{timeout:this.timeout,retry:this.retry});if(!d.ok||!d?.body)throw new c.DownloadHTTPError("Failed to download",d.status);return d.body}};e.DefaultFetcher=l;var h=v(async(p,d)=>new Promise((g,m)=>{p.write(d,f=>{f&&m(f),g(!0)})}),"writeBufferToStream")}),fL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultConfig=void 0,e.defaultConfig={maxRootRotations:256,maxDelegations:32,rootMaxLength:512e3,timestampMaxLength:16384,snapshotMaxLength:2e6,targetsMaxLength:5e6,prefixTargetsWithHash:!0,fetchTimeout:1e5,fetchRetries:void 0,fetchRetry:2}}),gL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TrustedMetadataStore=void 0;var t=Xl(),s=Yl(),u=class{static{v(this,"TrustedMetadataStore")}trustedSet={};referenceTime;constructor(i){this.referenceTime=new Date,this.loadTrustedRoot(i)}get root(){if(!this.trustedSet.root)throw new ReferenceError("No trusted root metadata");return this.trustedSet.root}get timestamp(){return this.trustedSet.timestamp}get snapshot(){return this.trustedSet.snapshot}get targets(){return this.trustedSet.targets}getRole(i){return this.trustedSet[i]}updateRoot(i){let a=JSON.parse(i.toString("utf8")),c=t.Metadata.fromJSON(t.MetadataKind.Root,a);if(c.signed.type!=t.MetadataKind.Root)throw new s.RepositoryError(`Expected 'root', got ${c.signed.type}`);if(this.root.verifyDelegate(t.MetadataKind.Root,c),c.signed.version!=this.root.signed.version+1)throw new s.BadVersionError(`Expected version ${this.root.signed.version+1}, got ${c.signed.version}`);return c.verifyDelegate(t.MetadataKind.Root,c),this.trustedSet.root=c,c}updateTimestamp(i){if(this.snapshot)throw new s.RuntimeError("Cannot update timestamp after snapshot");if(this.root.signed.isExpired(this.referenceTime))throw new s.ExpiredMetadataError("Final root.json is expired");let a=JSON.parse(i.toString("utf8")),c=t.Metadata.fromJSON(t.MetadataKind.Timestamp,a);if(c.signed.type!=t.MetadataKind.Timestamp)throw new s.RepositoryError(`Expected 'timestamp', got ${c.signed.type}`);if(this.root.verifyDelegate(t.MetadataKind.Timestamp,c),this.timestamp){if(c.signed.version<this.timestamp.signed.version)throw new s.BadVersionError(`New timestamp version ${c.signed.version} is less than current version ${this.timestamp.signed.version}`);if(c.signed.version===this.timestamp.signed.version)throw new s.EqualVersionError(`New timestamp version ${c.signed.version} is equal to current version ${this.timestamp.signed.version}`);let r=this.timestamp.signed.snapshotMeta,n=c.signed.snapshotMeta;if(n.version<r.version)throw new s.BadVersionError(`New snapshot version ${n.version} is less than current version ${r.version}`)}return this.trustedSet.timestamp=c,this.checkFinalTimestamp(),c}updateSnapshot(i,a=!1){if(!this.timestamp)throw new s.RuntimeError("Cannot update snapshot before timestamp");if(this.targets)throw new s.RuntimeError("Cannot update snapshot after targets");this.checkFinalTimestamp();let c=this.timestamp.signed.snapshotMeta;a||c.verify(i);let r=JSON.parse(i.toString("utf8")),n=t.Metadata.fromJSON(t.MetadataKind.Snapshot,r);if(n.signed.type!=t.MetadataKind.Snapshot)throw new s.RepositoryError(`Expected 'snapshot', got ${n.signed.type}`);return this.root.verifyDelegate(t.MetadataKind.Snapshot,n),this.snapshot&&Object.entries(this.snapshot.signed.meta).forEach(([o,l])=>{let h=n.signed.meta[o];if(!h)throw new s.RepositoryError(`Missing file ${o} in new snapshot`);if(h.version<l.version)throw new s.BadVersionError(`New version ${h.version} of ${o} is less than current version ${l.version}`)}),this.trustedSet.snapshot=n,this.checkFinalSnapsnot(),n}updateDelegatedTargets(i,a,c){if(!this.snapshot)throw new s.RuntimeError("Cannot update delegated targets before snapshot");this.checkFinalSnapsnot();let r=this.trustedSet[c];if(!r)throw new s.RuntimeError(`No trusted ${c} metadata`);let n=this.snapshot.signed.meta?.[`${a}.json`];if(!n)throw new s.RepositoryError(`Missing ${a}.json in snapshot`);n.verify(i);let o=JSON.parse(i.toString("utf8")),l=t.Metadata.fromJSON(t.MetadataKind.Targets,o);if(l.signed.type!=t.MetadataKind.Targets)throw new s.RepositoryError(`Expected 'targets', got ${l.signed.type}`);r.verifyDelegate(a,l);let h=l.signed.version;if(h!=n.version)throw new s.BadVersionError(`Version ${h} of ${a} does not match snapshot version ${n.version}`);if(l.signed.isExpired(this.referenceTime))throw new s.ExpiredMetadataError(`${a}.json is expired`);this.trustedSet[a]=l}loadTrustedRoot(i){let a=JSON.parse(i.toString("utf8")),c=t.Metadata.fromJSON(t.MetadataKind.Root,a);if(c.signed.type!=t.MetadataKind.Root)throw new s.RepositoryError(`Expected 'root', got ${c.signed.type}`);c.verifyDelegate(t.MetadataKind.Root,c),this.trustedSet.root=c}checkFinalTimestamp(){if(!this.timestamp)throw new ReferenceError("No trusted timestamp metadata");if(this.timestamp.signed.isExpired(this.referenceTime))throw new s.ExpiredMetadataError("Final timestamp.json is expired")}checkFinalSnapsnot(){if(!this.snapshot)throw new ReferenceError("No trusted snapshot metadata");if(!this.timestamp)throw new ReferenceError("No trusted timestamp metadata");if(this.snapshot.signed.isExpired(this.referenceTime))throw new s.ExpiredMetadataError("snapshot.json is expired");let i=this.timestamp.signed.snapshotMeta;if(this.snapshot.signed.version!==i.version)throw new s.BadVersionError("Snapshot version doesn't match timestamp")}};e.TrustedMetadataStore=u}),mL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.join=s;var t=require("url");function s(a,c){return new t.URL(u(a)+i(c)).toString()}v(s,"join");function u(a){return a.endsWith("/")?a:a+"/"}v(u,"ensureTrailingSlash");function i(a){return a.startsWith("/")?a.slice(1):a}v(i,"removeLeadingSlash")}),yL=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(f,y,S,E){E===void 0&&(E=S);var b=Object.getOwnPropertyDescriptor(y,S);(!b||("get"in b?!y.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:v(function(){return y[S]},"get")}),Object.defineProperty(f,E,b)}:function(f,y,S,E){E===void 0&&(E=S),f[E]=y[S]}),s=e&&e.__setModuleDefault||(Object.create?function(f,y){Object.defineProperty(f,"default",{enumerable:!0,value:y})}:function(f,y){f.default=y}),u=e&&e.__importStar||function(){var f=v(function(y){return f=Object.getOwnPropertyNames||function(S){var E=[];for(var b in S)Object.prototype.hasOwnProperty.call(S,b)&&(E[E.length]=b);return E},f(y)},"ownKeys");return function(y){if(y&&y.__esModule)return y;var S={};if(y!=null)for(var E=f(y),b=0;b<E.length;b++)E[b]!=="default"&&t(S,y,E[b]);return s(S,y),S}}(),i=e&&e.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.Updater=void 0;var a=Xl(),c=i(wr()),r=u(require("fs")),n=u(require("path")),o=fL(),l=Yl(),h=Yg(),p=gL(),d=u(mL()),g=(0,c.default)("tuf:cache"),m=class{static{v(this,"Updater")}dir;metadataBaseUrl;targetDir;targetBaseUrl;forceCache;trustedSet;config;fetcher;constructor(f){let{metadataDir:y,metadataBaseUrl:S,targetDir:E,targetBaseUrl:b,fetcher:_,config:O}=f;this.dir=y,this.metadataBaseUrl=S,this.targetDir=E,this.targetBaseUrl=b,this.forceCache=f.forceCache??!1;let w=this.loadLocalMetadata(a.MetadataKind.Root);this.trustedSet=new p.TrustedMetadataStore(w),this.config={...o.defaultConfig,...O},this.fetcher=_||new h.DefaultFetcher({timeout:this.config.fetchTimeout,retry:this.config.fetchRetries??this.config.fetchRetry})}async refresh(){if(this.forceCache)try{await this.loadTimestamp({checkRemote:!1})}catch{await this.loadRoot(),await this.loadTimestamp()}else await this.loadRoot(),await this.loadTimestamp();await this.loadSnapshot(),await this.loadTargets(a.MetadataKind.Targets,a.MetadataKind.Root)}async getTargetInfo(f){return this.trustedSet.targets||await this.refresh(),this.preorderDepthFirstWalk(f)}async downloadTarget(f,y,S){let E=y||this.generateTargetPath(f);if(!S){if(!this.targetBaseUrl)throw new l.ValueError("Target base URL not set");S=this.targetBaseUrl}let b=f.path;if(this.trustedSet.root.signed.consistentSnapshot&&this.config.prefixTargetsWithHash){let O=Object.values(f.hashes),{dir:w,base:A}=n.parse(b),I=`${O[0]}.${A}`;b=w?`${w}/${I}`:I}let _=d.join(S,b);return await this.fetcher.downloadFile(_,f.length,async O=>{await f.verify(r.createReadStream(O)),g("WRITE %s",E),r.copyFileSync(O,E)}),E}async findCachedTarget(f,y){y||(y=this.generateTargetPath(f));try{if(r.existsSync(y))return await f.verify(r.createReadStream(y)),y}catch{return}}loadLocalMetadata(f){let y=n.join(this.dir,`${f}.json`);return g("READ %s",y),r.readFileSync(y)}async loadRoot(){let f=this.trustedSet.root.signed.version+1,y=f+this.config.maxRootRotations;for(let S=f;S<y;S++){let E=d.join(this.metadataBaseUrl,`${S}.root.json`);try{let b=await this.fetcher.downloadBytes(E,this.config.rootMaxLength);this.trustedSet.updateRoot(b),this.persistMetadata(a.MetadataKind.Root,b)}catch(b){if(b instanceof l.DownloadHTTPError&&[403,404].includes(b.statusCode))break;throw b}}}async loadTimestamp({checkRemote:f}={checkRemote:!0}){try{let E=this.loadLocalMetadata(a.MetadataKind.Timestamp);if(this.trustedSet.updateTimestamp(E),!f)return}catch{}let y=d.join(this.metadataBaseUrl,"timestamp.json"),S=await this.fetcher.downloadBytes(y,this.config.timestampMaxLength);try{this.trustedSet.updateTimestamp(S)}catch(E){if(E instanceof l.EqualVersionError)return;throw E}this.persistMetadata(a.MetadataKind.Timestamp,S)}async loadSnapshot(){try{let f=this.loadLocalMetadata(a.MetadataKind.Snapshot);this.trustedSet.updateSnapshot(f,!0)}catch{if(!this.trustedSet.timestamp)throw new ReferenceError("No timestamp metadata");let f=this.trustedSet.timestamp.signed.snapshotMeta,y=f.length||this.config.snapshotMaxLength,S=this.trustedSet.root.signed.consistentSnapshot?f.version:void 0,E=d.join(this.metadataBaseUrl,S?`${S}.snapshot.json`:"snapshot.json");try{let b=await this.fetcher.downloadBytes(E,y);this.trustedSet.updateSnapshot(b),this.persistMetadata(a.MetadataKind.Snapshot,b)}catch(b){throw new l.RuntimeError(`Unable to load snapshot metadata error ${b}`)}}}async loadTargets(f,y){if(this.trustedSet.getRole(f))return this.trustedSet.getRole(f);try{let S=this.loadLocalMetadata(f);this.trustedSet.updateDelegatedTargets(S,f,y)}catch{if(!this.trustedSet.snapshot)throw new ReferenceError("No snapshot metadata");let S=this.trustedSet.snapshot.signed.meta[`${f}.json`],E=S.length||this.config.targetsMaxLength,b=this.trustedSet.root.signed.consistentSnapshot?S.version:void 0,_=encodeURIComponent(f),O=d.join(this.metadataBaseUrl,b?`${b}.${_}.json`:`${_}.json`);try{let w=await this.fetcher.downloadBytes(O,E);this.trustedSet.updateDelegatedTargets(w,f,y),this.persistMetadata(f,w)}catch(w){throw new l.RuntimeError(`Unable to load targets error ${w}`)}}return this.trustedSet.getRole(f)}async preorderDepthFirstWalk(f){let y=[{roleName:a.MetadataKind.Targets,parentRoleName:a.MetadataKind.Root}],S=new Set;for(;S.size<=this.config.maxDelegations&&y.length>0;){let{roleName:E,parentRoleName:b}=y.pop();if(S.has(E))continue;let _=(await this.loadTargets(E,b))?.signed;if(!_)continue;let O=_.targets?.[f];if(O)return O;if(S.add(E),_.delegations){let w=[],A=_.delegations.rolesForTarget(f);for(let{role:I,terminating:P}of A)if(w.push({roleName:I,parentRoleName:E}),P){y.splice(0);break}w.reverse(),y.push(...w)}}}generateTargetPath(f){if(!this.targetDir)throw new l.ValueError("Target directory not set");let y=encodeURIComponent(f.path);return n.join(this.targetDir,y)}persistMetadata(f,y){let S=encodeURIComponent(f);try{let E=n.join(this.dir,`${S}.json`);g("WRITE %s",E),r.writeFileSync(E,y.toString("utf8"))}catch(E){throw new l.PersistError(`Failed to persist metadata ${S} error: ${E}`)}}};e.Updater=m}),vL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Updater=e.BaseFetcher=e.TargetFile=void 0;var t=Xl();Object.defineProperty(e,"TargetFile",{enumerable:!0,get:v(function(){return t.TargetFile},"get")});var s=Yg();Object.defineProperty(e,"BaseFetcher",{enumerable:!0,get:v(function(){return s.BaseFetcher},"get")});var u=yL();Object.defineProperty(e,"Updater",{enumerable:!0,get:v(function(){return u.Updater},"get")})}),Qg=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TUFError=void 0;var t=class extends Error{static{v(this,"TUFError")}constructor({code:s,message:u,cause:i}){super(u),this.code=s,this.cause=i,this.name=this.constructor.name}};e.TUFError=t}),SL=K(e=>{"use strict";var t=e&&e.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.readTarget=i;var s=t(require("fs")),u=Qg();async function i(c,r){let n=await a(c,r);return new Promise((o,l)=>{s.default.readFile(n,"utf-8",(h,p)=>{h?l(new u.TUFError({code:"TUF_READ_TARGET_ERROR",message:`error reading target ${n}`,cause:h})):o(p)})})}v(i,"readTarget");async function a(c,r){let n;try{n=await c.getTargetInfo(r)}catch(l){throw new u.TUFError({code:"TUF_REFRESH_METADATA_ERROR",message:"error refreshing TUF metadata",cause:l})}if(!n)throw new u.TUFError({code:"TUF_FIND_TARGET_ERROR",message:`target ${r} not found`});let o=await c.findCachedTarget(n);if(!o)try{o=await c.downloadTarget(n)}catch(l){throw new u.TUFError({code:"TUF_DOWNLOAD_TARGET_ERROR",message:`error downloading target ${o}`,cause:l})}return o}v(a,"getTargetPath")}),EL=K((e,t)=>{t.exports={"https://tuf-repo-cdn.sigstore.dev":{"root.json":"ewogInNpZ25hdHVyZXMiOiBbCiAgewogICAia2V5aWQiOiAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyIsCiAgICJzaWciOiAiIgogIH0sCiAgewogICAia2V5aWQiOiAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICJzaWciOiAiMzA0NTAyMjEwMGJiZGRkNDY0ZjgwNjZjZWI4OGJhNzg3Mzc1YzEyY2Q2MzMwNjgwZTA4YzI5MTA3MDNlNjUzOGM3MWNjNzlhZDIwMjIwNTE5MGIwNmU0NTM3ZmU5NjFiM2VmODFmZTY4ZWRjZDAwODljMTlmOTE5YWZlZDQyM2I5YWFmZDcwMDY0MTE1MyIKICB9LAogIHsKICAgImtleWlkIjogIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAic2lnIjogIjMwNDQwMjIwNjkzMDZjZDUyNTdmNzMyYTc0MGMxYWZlNjBhOGU0MzNjNWRlNThlYWZlYWRiZTk5YzMzNmM5YzcxZDE5OGNmODAyMjAwZDc3Mzk1M2FlN2RiYzQ4ZDNlNWJhZDlhNmY2NGJhZmZmMTk2YjdlMmFkNGE1MmExOTUxOTM2N2Q0N2RjMDQyIgogIH0sCiAgewogICAia2V5aWQiOiAiNjE2NDM4MzgxMjViNDQwYjQwZGI2OTQyZjVjYjVhMzFjMGRjMDQzNjgzMTZlYjJhYWE1OGI5NTkwNGE1ODIyMiIsCiAgICJzaWciOiAiMzA0NDAyMjA0ZDIxYTJlYzgwZGY2NmU2MWY2ZmUyOTEyOTUxZGM0N2RmODM2MDM2ZjhjMGFiMTA4MTZkMzc1ZTcxZGJmNzllMDIyMDU0N2FkY2UxYWZkZjA0ZTY3OTRlZmEyMDNkZDUyNjRjNmY3ZTBlZjc4ZTU3ZmU5MzRiMGQyNmNiOTk0ZWVjNzYiCiAgfSwKICB7CiAgICJrZXlpZCI6ICJhNjg3ZTViZjRmYWI4MmIwZWU1OGQ0NmUwNWM5NTM1MTQ1YTJjOWFmYjQ1OGY0M2Q0MmI0NWNhMGZkY2UyYTcwIiwKICAgInNpZyI6ICIzMDQ1MDIyMDYwODI2NDk2NTU3MTQ0ZWIxNjQ5ODkzZWQ1ZjZmNGVhNTQ1MzZmZWIwY2E4MmY4Yjg5YWU2NDFiZTM5NzQzZTUwMjIxMDBhZDcxMThiNWU5ZDQ4MzczMjYyMDZlNDEyZmM2ZGEyOTk5OTI1ZDExMDMyOGE3YzE2NmIwNmM2MjQzMzZjOTNmIgogIH0sCiAgewogICAia2V5aWQiOiAiMTgzZTY0ZjM3NjcwZGMxM2NhMGQyODk5NWEzMDUzZjM3NDA5NTRkZGNlNDQzMjFhNDFlNDY1MzRjZjQ0ZTYzMiIsCiAgICJzaWciOiAiMzA0NjAyMjEwMGQ4MTc5NDM5YzJlNzNlYjBjMTczM2FiZWU3ZmFmODMyZGNhZWE3MjYzZWRjYjQ5MTk4OTFjM2EyNDdmMDU5MjMwMjIxMDBlMWE0MzdlMDc5N2U4MDNmOWI3MmRjOWQyZDkyMTU1YjBhMjI3MGMyNGVmZGQ1ZjRiM2E1ZDhmMGIwZjQzMWE3IgogIH0KIF0sCiAic2lnbmVkIjogewogICJfdHlwZSI6ICJyb290IiwKICAiY29uc2lzdGVudF9zbmFwc2hvdCI6IHRydWUsCiAgImV4cGlyZXMiOiAiMjAyNi0wMS0yMlQxMzowNTo1OVoiLAogICJrZXlzIjogewogICAiMGM4NzQzMmMzYmYwOWZkOTkxODlmZGMzMmZhNWVhZWRmNGU0YTVmYWM3YmFiNzNmYTA0YTJlMGZjNjRhZjZmNSI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVdSaUdyNStqKzNKNVNzSCtadHI1bkUySDJ3TzdcbkJWK25PM3M5M2dMY2ExOHFUT3pIWTFvV3lBR0R5a01Tc0dUVUJTdDlEK0FuMEtmS3NEMm1mU000MlE9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1vbmxpbmUtdXJpIjogImdjcGttczpwcm9qZWN0cy9zaWdzdG9yZS1yb290LXNpZ25pbmcvbG9jYXRpb25zL2dsb2JhbC9rZXlSaW5ncy9yb290L2NyeXB0b0tleXMvdGltZXN0YW1wL2NyeXB0b0tleVZlcnNpb25zLzEiCiAgIH0sCiAgICIxODNlNjRmMzc2NzBkYzEzY2EwZDI4OTk1YTMwNTNmMzc0MDk1NGRkY2U0NDMyMWE0MWU0NjUzNGNmNDRlNjMyIjogewogICAgImtleXR5cGUiOiAiZWNkc2EiLAogICAgImtleXZhbCI6IHsKICAgICAicHVibGljIjogIi0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tXG5NRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVNeHBQT0pDSVo1b3RHNDEwNmZHSnNlRVFpM1Y5XG5wa01ZUTR1eVY5VGoxTTdXSFhJeUxHK2prZnZ1RzBnbFExSlpiUlpaQlYzZ0FSNHNvamRHSElTZW93PT1cbi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLVxuIgogICAgfSwKICAgICJzY2hlbWUiOiAiZWNkc2Etc2hhMi1uaXN0cDI1NiIsCiAgICAieC10dWYtb24tY2kta2V5b3duZXIiOiAiQGxhbmNlIgogICB9LAogICAiMjJmNGNhZWM2ZDhlNmY5NTU1YWY2NmIzZDRjM2NiMDZhM2JiMjNmZGM3ZTM5YzkxNmM2MWY0NjJlNmY1MmIwNiI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRXpCelZPbUhDUG9qTVZMU0kzNjRXaWlWOE5QckRcbjZJZ1J4Vmxpc2t6L3YreTNKRVI1bWNWR2NPTmxpRGNXTUM1SjJsZkhtalBOUGhiNEg3eG04THpmU0E9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1rZXlvd25lciI6ICJAc2FudGlhZ290b3JyZXMiCiAgIH0sCiAgICI2MTY0MzgzODEyNWI0NDBiNDBkYjY5NDJmNWNiNWEzMWMwZGMwNDM2ODMxNmViMmFhYTU4Yjk1OTA0YTU4MjIyIjogewogICAgImtleWlkX2hhc2hfYWxnb3JpdGhtcyI6IFsKICAgICAic2hhMjU2IiwKICAgICAic2hhNTEyIgogICAgXSwKICAgICJrZXl0eXBlIjogImVjZHNhIiwKICAgICJrZXl2YWwiOiB7CiAgICAgInB1YmxpYyI6ICItLS0tLUJFR0lOIFBVQkxJQyBLRVktLS0tLVxuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFaW5pa1NzQVFtWWtOZUg1ZVlxL0NuSXpMYWFjT1xueGxTYWF3UURPd3FLeS90Q3F4cTV4eFBTSmMyMUs0V0loczlHeU9rS2Z6dWVZM0dJTHpjTUpaNGNXdz09XG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS1cbiIKICAgIH0sCiAgICAic2NoZW1lIjogImVjZHNhLXNoYTItbmlzdHAyNTYiLAogICAgIngtdHVmLW9uLWNpLWtleW93bmVyIjogIkBib2JjYWxsYXdheSIKICAgfSwKICAgImE2ODdlNWJmNGZhYjgyYjBlZTU4ZDQ2ZTA1Yzk1MzUxNDVhMmM5YWZiNDU4ZjQzZDQyYjQ1Y2EwZmRjZTJhNzAiOiB7CiAgICAia2V5aWRfaGFzaF9hbGdvcml0aG1zIjogWwogICAgICJzaGEyNTYiLAogICAgICJzaGE1MTIiCiAgICBdLAogICAgImtleXR5cGUiOiAiZWNkc2EiLAogICAgImtleXZhbCI6IHsKICAgICAicHVibGljIjogIi0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tXG5NRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUwZ2hyaDkyTHcxWXIzaWRHVjVXcUN0TURCOEN4XG4rRDhoZEM0dzJaTE5JcGxWUm9WR0xza1lhM2doZU15T2ppSjhrUGkxNWFRMi8vN1Arb2o3VXZKUEd3PT1cbi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLVxuIgogICAgfSwKICAgICJzY2hlbWUiOiAiZWNkc2Etc2hhMi1uaXN0cDI1NiIsCiAgICAieC10dWYtb24tY2kta2V5b3duZXIiOiAiQGpvc2h1YWdsIgogICB9LAogICAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRUVYc3ozU1pYRmI4ak1WNDJqNnBKbHlqYmpSOEtcbk4zQndvY2V4cTZMTUliNXFzV0tPUXZMTjE2TlVlZkxjNEhzd09vdW1Sc1ZWYWFqU3BRUzZmb2JrUnc9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1rZXlvd25lciI6ICJAbW5tNjc4IgogICB9CiAgfSwKICAicm9sZXMiOiB7CiAgICJyb290IjogewogICAgImtleWlkcyI6IFsKICAgICAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICAgIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAgICI2MTY0MzgzODEyNWI0NDBiNDBkYjY5NDJmNWNiNWEzMWMwZGMwNDM2ODMxNmViMmFhYTU4Yjk1OTA0YTU4MjIyIiwKICAgICAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCIsCiAgICAgIjE4M2U2NGYzNzY3MGRjMTNjYTBkMjg5OTVhMzA1M2YzNzQwOTU0ZGRjZTQ0MzIxYTQxZTQ2NTM0Y2Y0NGU2MzIiCiAgICBdLAogICAgInRocmVzaG9sZCI6IDMKICAgfSwKICAgInNuYXBzaG90IjogewogICAgImtleWlkcyI6IFsKICAgICAiMGM4NzQzMmMzYmYwOWZkOTkxODlmZGMzMmZhNWVhZWRmNGU0YTVmYWM3YmFiNzNmYTA0YTJlMGZjNjRhZjZmNSIKICAgIF0sCiAgICAidGhyZXNob2xkIjogMSwKICAgICJ4LXR1Zi1vbi1jaS1leHBpcnktcGVyaW9kIjogMzY1MCwKICAgICJ4LXR1Zi1vbi1jaS1zaWduaW5nLXBlcmlvZCI6IDM2NQogICB9LAogICAidGFyZ2V0cyI6IHsKICAgICJrZXlpZHMiOiBbCiAgICAgImU3MWE1NGQ1NDM4MzViYTg2YWRhZDk0NjAzNzljNzY0MWZiODcyNmQxNjRlYTc2NjgwMWExYzUyMmFiYTdlYTIiLAogICAgICIyMmY0Y2FlYzZkOGU2Zjk1NTVhZjY2YjNkNGMzY2IwNmEzYmIyM2ZkYzdlMzljOTE2YzYxZjQ2MmU2ZjUyYjA2IiwKICAgICAiNjE2NDM4MzgxMjViNDQwYjQwZGI2OTQyZjVjYjVhMzFjMGRjMDQzNjgzMTZlYjJhYWE1OGI5NTkwNGE1ODIyMiIsCiAgICAgImE2ODdlNWJmNGZhYjgyYjBlZTU4ZDQ2ZTA1Yzk1MzUxNDVhMmM5YWZiNDU4ZjQzZDQyYjQ1Y2EwZmRjZTJhNzAiLAogICAgICIxODNlNjRmMzc2NzBkYzEzY2EwZDI4OTk1YTMwNTNmMzc0MDk1NGRkY2U0NDMyMWE0MWU0NjUzNGNmNDRlNjMyIgogICAgXSwKICAgICJ0aHJlc2hvbGQiOiAzCiAgIH0sCiAgICJ0aW1lc3RhbXAiOiB7CiAgICAia2V5aWRzIjogWwogICAgICIwYzg3NDMyYzNiZjA5ZmQ5OTE4OWZkYzMyZmE1ZWFlZGY0ZTRhNWZhYzdiYWI3M2ZhMDRhMmUwZmM2NGFmNmY1IgogICAgXSwKICAgICJ0aHJlc2hvbGQiOiAxLAogICAgIngtdHVmLW9uLWNpLWV4cGlyeS1wZXJpb2QiOiA3LAogICAgIngtdHVmLW9uLWNpLXNpZ25pbmctcGVyaW9kIjogNgogICB9CiAgfSwKICAic3BlY192ZXJzaW9uIjogIjEuMCIsCiAgInZlcnNpb24iOiAxMywKICAieC10dWYtb24tY2ktZXhwaXJ5LXBlcmlvZCI6IDE5NywKICAieC10dWYtb24tY2ktc2lnbmluZy1wZXJpb2QiOiA0NgogfQp9",targets:{"trusted_root.json":"ewogICJtZWRpYVR5cGUiOiAiYXBwbGljYXRpb24vdm5kLmRldi5zaWdzdG9yZS50cnVzdGVkcm9vdCtqc29uO3ZlcnNpb249MC4xIiwKICAidGxvZ3MiOiBbCiAgICB7CiAgICAgICJiYXNlVXJsIjogImh0dHBzOi8vcmVrb3Iuc2lnc3RvcmUuZGV2IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUyRzJZKzJ0YWJkVFY1QmNHaUJJeDBhOWZBRndya0JibUxTR3RrczRMM3FYNnlZWTB6dWZCbmhDOFVyL2l5NTVHaFdQLzlBL2JZMkxoQzMwTTkrUll0dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDEtMTJUMTE6NTM6MjdaIgogICAgICAgIH0KICAgICAgfSwKICAgICAgImxvZ0lkIjogewogICAgICAgICJrZXlJZCI6ICJ3Tkk5YXRRR2x6K1ZXZk82TFJ5Z0g0UVVmWS84VzRSRndpVDVpNVdSZ0IwPSIKICAgICAgfQogICAgfQogIF0sCiAgImNlcnRpZmljYXRlQXV0aG9yaXRpZXMiOiBbCiAgICB7CiAgICAgICJzdWJqZWN0IjogewogICAgICAgICJvcmdhbml6YXRpb24iOiAic2lnc3RvcmUuZGV2IiwKICAgICAgICAiY29tbW9uTmFtZSI6ICJzaWdzdG9yZSIKICAgICAgfSwKICAgICAgInVyaSI6ICJodHRwczovL2Z1bGNpby5zaWdzdG9yZS5kZXYiLAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlCK0RDQ0FYNmdBd0lCQWdJVE5Wa0Rab0Npb2ZQRHN5N2RmbTZnZUxidWh6QUtCZ2dxaGtqT1BRUURBekFxTVJVd0V3WURWUVFLRXd4emFXZHpkRzl5WlM1a1pYWXhFVEFQQmdOVkJBTVRDSE5wWjNOMGIzSmxNQjRYRFRJeE1ETXdOekF6TWpBeU9Wb1hEVE14TURJeU16QXpNakF5T1Zvd0tqRVZNQk1HQTFVRUNoTU1jMmxuYzNSdmNtVXVaR1YyTVJFd0R3WURWUVFERXdoemFXZHpkRzl5WlRCMk1CQUdCeXFHU000OUFnRUdCU3VCQkFBaUEySUFCTFN5QTdJaTVrK3BOTzhaRVdZMHlsZW1XRG93T2tOYTNrTCtHWkU1WjVHV2VoTDkvQTliUk5BM1JicnNaNWkwSmNhc3RhUkw3U3A1ZnAvakQ1ZHhxYy9VZFRWbmx2UzE2YW4rMllmc3dlL1F1TG9sUlVDcmNPRTIrMmlBNSt0emQ2Tm1NR1F3RGdZRFZSMFBBUUgvQkFRREFnRUdNQklHQTFVZEV3RUIvd1FJTUFZQkFmOENBUUV3SFFZRFZSME9CQllFRk1qRkhRQkJtaVFwTWxFazZ3MnVTdTFLQnRQc01COEdBMVVkSXdRWU1CYUFGTWpGSFFCQm1pUXBNbEVrNncydVN1MUtCdFBzTUFvR0NDcUdTTTQ5QkFNREEyZ0FNR1VDTUg4bGlXSmZNdWk2dlhYQmhqRGdZNE13c2xtTi9USnhWZS84M1dyRm9td21OZjA1NnkxWDQ4RjljNG0zYTNvelhBSXhBS2pSYXk1L2FqL2pzS0tHSWttUWF0akk4dXVwSHIvK0N4RnZhSldtcFlxTmtMREdSVSs5b3J6aDVoSTJScmN1YVE9PSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAic3RhcnQiOiAiMjAyMS0wMy0wN1QwMzoyMDoyOVoiLAogICAgICAgICJlbmQiOiAiMjAyMi0xMi0zMVQyMzo1OTo1OS45OTlaIgogICAgICB9CiAgICB9LAogICAgewogICAgICAic3ViamVjdCI6IHsKICAgICAgICAib3JnYW5pemF0aW9uIjogInNpZ3N0b3JlLmRldiIsCiAgICAgICAgImNvbW1vbk5hbWUiOiAic2lnc3RvcmUiCiAgICAgIH0sCiAgICAgICJ1cmkiOiAiaHR0cHM6Ly9mdWxjaW8uc2lnc3RvcmUuZGV2IiwKICAgICAgImNlcnRDaGFpbiI6IHsKICAgICAgICAiY2VydGlmaWNhdGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAicmF3Qnl0ZXMiOiAiTUlJQ0dqQ0NBYUdnQXdJQkFnSVVBTG5WaVZmblUwYnJKYXNtUmtIcm4vVW5mYVF3Q2dZSUtvWkl6ajBFQXdNd0tqRVZNQk1HQTFVRUNoTU1jMmxuYzNSdmNtVXVaR1YyTVJFd0R3WURWUVFERXdoemFXZHpkRzl5WlRBZUZ3MHlNakEwTVRNeU1EQTJNVFZhRncwek1URXdNRFV4TXpVMk5UaGFNRGN4RlRBVEJnTlZCQW9UREhOcFozTjBiM0psTG1SbGRqRWVNQndHQTFVRUF4TVZjMmxuYzNSdmNtVXRhVzUwWlhKdFpXUnBZWFJsTUhZd0VBWUhLb1pJemowQ0FRWUZLNEVFQUNJRFlnQUU4UlZTL3lzSCtOT3Z1RFp5UEladGlsZ1VGOU5sYXJZcEFkOUhQMXZCQkgxVTVDVjc3TFNTN3MwWmlING5FN0h2N3B0UzZMdnZSL1NUazc5OExWZ016TGxKNEhlSWZGM3RIU2FleExjWXBTQVNyMWtTME4vUmdCSnovOWpXQ2lYbm8zc3dlVEFPQmdOVkhROEJBZjhFQkFNQ0FRWXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUhBd013RWdZRFZSMFRBUUgvQkFnd0JnRUIvd0lCQURBZEJnTlZIUTRFRmdRVTM5UHB6MVlrRVpiNXFOanBLRldpeGk0WVpEOHdId1lEVlIwakJCZ3dGb0FVV01BZVg1RkZwV2FwZXN5UW9aTWkwQ3JGeGZvd0NnWUlLb1pJemowRUF3TURad0F3WkFJd1BDc1FLNERZaVpZRFBJYURpNUhGS25meFh4NkFTU1ZtRVJmc3luWUJpWDJYNlNKUm5aVTg0LzlEWmRuRnZ2eG1BakJPdDZRcEJsYzRKLzBEeHZrVENxcGNsdnppTDZCQ0NQbmpkbElCM1B1M0J4c1BteWdVWTdJaTJ6YmRDZGxpaW93PSIKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlCOXpDQ0FYeWdBd0lCQWdJVUFMWk5BUEZkeEhQd2plRGxvRHd5WUNoQU8vNHdDZ1lJS29aSXpqMEVBd013S2pFVk1CTUdBMVVFQ2hNTWMybG5jM1J2Y21VdVpHVjJNUkV3RHdZRFZRUURFd2h6YVdkemRHOXlaVEFlRncweU1URXdNRGN4TXpVMk5UbGFGdzB6TVRFd01EVXhNelUyTlRoYU1Db3hGVEFUQmdOVkJBb1RESE5wWjNOMGIzSmxMbVJsZGpFUk1BOEdBMVVFQXhNSWMybG5jM1J2Y21Vd2RqQVFCZ2NxaGtqT1BRSUJCZ1VyZ1FRQUlnTmlBQVQ3WGVGVDRyYjNQUUd3UzRJYWp0TGszL09sbnBnYW5nYUJjbFlwc1lCcjVpKzR5bkIwN2NlYjNMUDBPSU9aZHhleFg2OWM1aVZ1eUpSUStIejA1eWkrVUYzdUJXQWxIcGlTNXNoMCtIMkdIRTdTWHJrMUVDNW0xVHIxOUw5Z2c5MmpZekJoTUE0R0ExVWREd0VCL3dRRUF3SUJCakFQQmdOVkhSTUJBZjhFQlRBREFRSC9NQjBHQTFVZERnUVdCQlJZd0I1ZmtVV2xacWw2ekpDaGt5TFFLc1hGK2pBZkJnTlZIU01FR0RBV2dCUll3QjVma1VXbFpxbDZ6SkNoa3lMUUtzWEYrakFLQmdncWhrak9QUVFEQXdOcEFEQm1BakVBajFuSGVYWnArMTNOV0JOYStFRHNEUDhHMVdXZzF0Q01XUC9XSFBxcGFWbzBqaHN3ZU5GWmdTczBlRTd3WUk0cUFqRUEyV0I5b3Q5OHNJa29GM3ZaWWRkMy9WdFdCNWI5VE5NZWE3SXgvc3RKNVRmY0xMZUFCTEU0Qk5KT3NRNHZuQkhKIgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgInZhbGlkRm9yIjogewogICAgICAgICJzdGFydCI6ICIyMDIyLTA0LTEzVDIwOjA2OjE1WiIKICAgICAgfQogICAgfQogIF0sCiAgImN0bG9ncyI6IFsKICAgIHsKICAgICAgImJhc2VVcmwiOiAiaHR0cHM6Ly9jdGZlLnNpZ3N0b3JlLmRldi90ZXN0IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUViZndSK1JKdWRYc2NnUkJScEtYMVhGRHkzUHl1ZER4ei9TZm5SaTFmVDhla3BmQmQyTzF1b3o3anIzWjhuS3p4QTY5RVVRK2VGQ0ZJM3pldWJQV1U3dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDMtMTRUMDA6MDA6MDBaIiwKICAgICAgICAgICJlbmQiOiAiMjAyMi0xMC0zMVQyMzo1OTo1OS45OTlaIgogICAgICAgIH0KICAgICAgfSwKICAgICAgImxvZ0lkIjogewogICAgICAgICJrZXlJZCI6ICJDR0NTOENoUy8yaEYwZEZySjRTY1JXY1lyQlk5d3pqU2JlYThJZ1kyYjNJPSIKICAgICAgfQogICAgfSwKICAgIHsKICAgICAgImJhc2VVcmwiOiAiaHR0cHM6Ly9jdGZlLnNpZ3N0b3JlLmRldi8yMDIyIiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVpUFNsRmkwQ21GVGZFakNVcUY5SHVDRWNZWE5LQWFZYWxJSm1CWjh5eWV6UGpUcWh4cktCcE1uYW9jVnRMSkJJMWVNM3VYblF6UUdBSmRKNGdzOUZ5dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjItMTAtMjBUMDA6MDA6MDBaIgogICAgICAgIH0KICAgICAgfSwKICAgICAgImxvZ0lkIjogewogICAgICAgICJrZXlJZCI6ICIzVDB3YXNiSEVUSmpHUjRjbVdjM0FxSktYcmplUEszL2g0cHlnQzhwN280PSIKICAgICAgfQogICAgfQogIF0sCiAgInRpbWVzdGFtcEF1dGhvcml0aWVzIjogWwogICAgewogICAgICAic3ViamVjdCI6IHsKICAgICAgICAib3JnYW5pemF0aW9uIjogInNpZ3N0b3JlLmRldiIsCiAgICAgICAgImNvbW1vbk5hbWUiOiAic2lnc3RvcmUtdHNhLXNlbGZzaWduZWQiCiAgICAgIH0sCiAgICAgICJ1cmkiOiAiaHR0cHM6Ly90aW1lc3RhbXAuc2lnc3RvcmUuZGV2L2FwaS92MS90aW1lc3RhbXAiLAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlDRURDQ0FaYWdBd0lCQWdJVU9oTlVMd3lRWWU2OHdVTXZ5NHFPaXlvaml3d3dDZ1lJS29aSXpqMEVBd013T1RFVk1CTUdBMVVFQ2hNTWMybG5jM1J2Y21VdVpHVjJNU0F3SGdZRFZRUURFeGR6YVdkemRHOXlaUzEwYzJFdGMyVnNabk5wWjI1bFpEQWVGdzB5TlRBME1EZ3dOalU1TkROYUZ3MHpOVEEwTURZd05qVTVORE5hTUM0eEZUQVRCZ05WQkFvVERITnBaM04wYjNKbExtUmxkakVWTUJNR0ExVUVBeE1NYzJsbmMzUnZjbVV0ZEhOaE1IWXdFQVlIS29aSXpqMENBUVlGSzRFRUFDSURZZ0FFNHJhMlo4aEtOaWcyVDlrRmpDQVRvR0czMGpreStXUXYzQnpMK21LdmgxU0tOUi9Vd3V3c2ZOQ2c0c3J5b1lBZDhFNmlzb3ZWQTNNNGFvTmRtOVFEaTUwWjhuVEV5dnFnZkRQdFRJd1hJdGZpVy9BRmYxVjd1d2tia0FvajB4eGNvMm93YURBT0JnTlZIUThCQWY4RUJBTUNCNEF3SFFZRFZSME9CQllFRkluOWVVT0h6OUJsUnNNQ1JzY3NjMXQ5dE9zRE1COEdBMVVkSXdRWU1CYUFGSmpzQWU5L3UxSC8xSlVlYjRxSW1GTUhpYzYvTUJZR0ExVWRKUUVCL3dRTU1Bb0dDQ3NHQVFVRkJ3TUlNQW9HQ0NxR1NNNDlCQU1EQTJnQU1HVUNNRHRwc1YvNkthTzBxeUYvVU1zWDJhU1VYS1FGZG9HVHB0UUdjMGZ0cTFjc3VsSFBHRzZkc215TU5kM0pCK0czRVFJeEFPYWp2QmNqcEptS2I0TnYrMlRhb2o4VWM1K2I2aWg2RlhDQ0tyYVNxdXBlMDd6cXN3TWNYSlRlMWNFeHZIdnZsdz09IgogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgInJhd0J5dGVzIjogIk1JSUI5ekNDQVh5Z0F3SUJBZ0lVVjdmMEdMRE9vRXpJaDhMWFNXODBPSmlVcDE0d0NnWUlLb1pJemowRUF3TXdPVEVWTUJNR0ExVUVDaE1NYzJsbmMzUnZjbVV1WkdWMk1TQXdIZ1lEVlFRREV4ZHphV2R6ZEc5eVpTMTBjMkV0YzJWc1puTnBaMjVsWkRBZUZ3MHlOVEEwTURnd05qVTVORE5hRncwek5UQTBNRFl3TmpVNU5ETmFNRGt4RlRBVEJnTlZCQW9UREhOcFozTjBiM0psTG1SbGRqRWdNQjRHQTFVRUF4TVhjMmxuYzNSdmNtVXRkSE5oTFhObGJHWnphV2R1WldRd2RqQVFCZ2NxaGtqT1BRSUJCZ1VyZ1FRQUlnTmlBQVFVUU50ZlJUL291M1lBVGE2d0Iva0tUZTcwY2ZKd3lSSUJvdk1udDhSY0pwaC9DT0U4MnV5UzZGbXBwTExMMVZCUEdjUGZwUVBZSk5Yeld3aThpY3doS1E2Vy9RZTJoM29lYkJiMkZIcHdOSkRxbytUTWFDL3RkZmt2L0VsSkI3MmpSVEJETUE0R0ExVWREd0VCL3dRRUF3SUJCakFTQmdOVkhSTUJBZjhFQ0RBR0FRSC9BZ0VBTUIwR0ExVWREZ1FXQkJTWTdBSHZmN3RSLzlTVkhtK0tpSmhUQjRuT3Z6QUtCZ2dxaGtqT1BRUURBd05wQURCbUFqRUF3R0VHcmZHWlIxY2VuMVI4L0RUVk1JOTQzTHNzWm1KUnREcC9pN1NmR0htR1JQNmdSYnVqOXZPSzNiNjdaMFFRQWpFQXVUMkg2NzNMUUVhSFRjeVFTWnJrcDRtWDdXd2ttRitzVmJrWVk1bVhOK1JNSDEzS1VFSEhPcUFTYWVtWVdLL0UiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICAidmFsaWRGb3IiOiB7CiAgICAgICAgInN0YXJ0IjogIjIwMjUtMDctMDRUMDA6MDA6MDBaIgogICAgICB9CiAgICB9CiAgXQp9Cg==","registry.npmjs.org%2Fkeys.json":"ewogICAgImtleXMiOiBbCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OmpsM2J3c3d1ODBQampva0NnaDBvMnc1YzJVNExoUUFFNTdnajljejFrekEiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTFPbGIzek1BRkZ4WEtIaUlrUU81Y0ozWWhsNWk2VVBwK0lodXRlQkpidUhjQTVVb2dLbzBFV3RsV3dXNktTYUtvVE5FWUw3SmxDUWlWbmtoQmt0VWdnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIxOTk5LTAxLTAxVDAwOjAwOjAwLjAwMFoiLAogICAgICAgICAgICAgICAgICAgICJlbmQiOiAiMjAyNS0wMS0yOVQwMDowMDowMC4wMDBaIgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJrZXlJZCI6ICJTSEEyNTY6amwzYndzd3U4MFBqam9rQ2doMG8ydzVjMlU0TGhRQUU1N2dqOWN6MWt6QSIsCiAgICAgICAgICAgICJrZXlVc2FnZSI6ICJucG06YXR0ZXN0YXRpb25zIiwKICAgICAgICAgICAgInB1YmxpY0tleSI6IHsKICAgICAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUxT2xiM3pNQUZGeFhLSGlJa1FPNWNKM1lobDVpNlVQcCtJaHV0ZUJKYnVIY0E1VW9nS28wRVd0bFd3VzZLU2FLb1RORVlMN0psQ1FpVm5raEJrdFVnZz09IiwKICAgICAgICAgICAgICAgICJrZXlEZXRhaWxzIjogIlBLSVhfRUNEU0FfUDI1Nl9TSEFfMjU2IiwKICAgICAgICAgICAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAgICAgICAgICAgICAic3RhcnQiOiAiMjAyMi0xMi0wMVQwMDowMDowMC4wMDBaIiwKICAgICAgICAgICAgICAgICAgICAiZW5kIjogIjIwMjUtMDEtMjlUMDA6MDA6MDAuMDAwWiIKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OkRoUTh3UjVBUEJ2RkhMRi8rVGMrQVl2UE9kVHBjSURxT2h4c0JIUndDN1UiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgImtleUlkIjogIlNIQTI1NjpEaFE4d1I1QVBCdkZITEYvK1RjK0FZdlBPZFRwY0lEcU9oeHNCSFJ3QzdVIiwKICAgICAgICAgICAgImtleVVzYWdlIjogIm5wbTphdHRlc3RhdGlvbnMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICBdCn0K"}}}}),bL=K(e=>{"use strict";var t=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.TUFClient=void 0;var s=t(require("fs")),u=t(require("path")),i=vL(),a=Ql(),c=SL(),r="targets",n=class{static{v(this,"TUFClient")}constructor(p){let d=new URL(p.mirrorURL),g=encodeURIComponent(d.host+d.pathname.replace(/\/$/,"")),m=u.default.join(p.cachePath,g);o(m),l({cachePath:m,mirrorURL:p.mirrorURL,tufRootPath:p.rootPath,forceInit:p.forceInit}),this.updater=h({mirrorURL:p.mirrorURL,cachePath:m,forceCache:p.forceCache,retry:p.retry,timeout:p.timeout})}async refresh(){return this.updater.refresh()}getTarget(p){return(0,c.readTarget)(this.updater,p)}};e.TUFClient=n;function o(p){let d=u.default.join(p,r);s.default.existsSync(p)||s.default.mkdirSync(p,{recursive:!0}),s.default.existsSync(d)||s.default.mkdirSync(d)}v(o,"initTufCache");function l({cachePath:p,mirrorURL:d,tufRootPath:g,forceInit:m}){let f=u.default.join(p,"root.json");if(!s.default.existsSync(f)||m)if(g)s.default.copyFileSync(g,f);else{let y=EL()[d];if(!y)throw new a.TUFError({code:"TUF_INIT_CACHE_ERROR",message:`No root.json found for mirror: ${d}`});s.default.writeFileSync(f,Buffer.from(y["root.json"],"base64")),Object.entries(y.targets).forEach(([S,E])=>{s.default.writeFileSync(u.default.join(p,r,S),Buffer.from(E,"base64"))})}}v(l,"seedCache");function h(p){let d={fetchTimeout:p.timeout,fetchRetry:p.retry};return new i.Updater({metadataBaseUrl:p.mirrorURL,targetBaseUrl:`${p.mirrorURL}/targets`,metadataDir:p.cachePath,targetDir:u.default.join(p.cachePath,r),forceCache:p.forceCache,config:d})}v(h,"initClient")}),Ql=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TUFError=e.DEFAULT_MIRROR_URL=void 0,e.getTrustedRoot=n,e.initTUF=o;var t=qi(),s=tL(),u=bL();e.DEFAULT_MIRROR_URL="https://tuf-repo-cdn.sigstore.dev";var i="sigstore-js",a={retries:2},c=5e3,r="trusted_root.json";async function n(p={}){let d=await l(p).getTarget(r);return t.TrustedRoot.fromJSON(JSON.parse(d))}v(n,"getTrustedRoot");async function o(p={}){let d=l(p);return d.refresh().then(()=>d)}v(o,"initTUF");function l(p){return new u.TUFClient({cachePath:p.cachePath||(0,s.appDataPath)(i),rootPath:p.rootPath,mirrorURL:p.mirrorURL||e.DEFAULT_MIRROR_URL,retry:p.retry??a,timeout:p.timeout??c,forceCache:p.forceCache??!1,forceInit:p.forceInit??p.force??!1})}v(l,"createClient");var h=Qg();Object.defineProperty(e,"TUFError",{enumerable:!0,get:v(function(){return h.TUFError},"get")})}),_L=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DSSESignatureContent=void 0;var t=st(),s=class{static{v(this,"DSSESignatureContent")}constructor(u){this.env=u}compareDigest(u){return t.crypto.bufferEqual(u,t.crypto.digest("sha256",this.env.payload))}compareSignature(u){return t.crypto.bufferEqual(u,this.signature)}verifySignature(u){return t.crypto.verify(this.preAuthEncoding,u,this.signature)}get signature(){return this.env.signatures.length>0?this.env.signatures[0].sig:Buffer.from("")}get preAuthEncoding(){return t.dsse.preAuthEncoding(this.env.payloadType,this.env.payload)}};e.DSSESignatureContent=s}),wL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageSignatureContent=void 0;var t=st(),s=class{static{v(this,"MessageSignatureContent")}constructor(u,i){this.signature=u.signature,this.messageDigest=u.messageDigest.digest,this.artifact=i}compareSignature(u){return t.crypto.bufferEqual(u,this.signature)}compareDigest(u){return t.crypto.bufferEqual(u,this.messageDigest)}verifySignature(u){return t.crypto.verify(this.artifact,u,this.signature)}};e.MessageSignatureContent=s}),OL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toSignedEntity=i,e.signatureContent=a;var t=st(),s=_L(),u=wL();function i(r,n){let{tlogEntries:o,timestampVerificationData:l}=r.verificationMaterial,h=[];for(let p of o)h.push({$case:"transparency-log",tlogEntry:p});for(let p of l?.rfc3161Timestamps??[])h.push({$case:"timestamp-authority",timestamp:t.RFC3161Timestamp.parse(p.signedTimestamp)});return{signature:a(r,n),key:c(r),tlogEntries:o,timestamps:h}}v(i,"toSignedEntity");function a(r,n){switch(r.content.$case){case"dsseEnvelope":return new s.DSSESignatureContent(r.content.dsseEnvelope);case"messageSignature":return new u.MessageSignatureContent(r.content.messageSignature,n)}}v(a,"signatureContent");function c(r){switch(r.verificationMaterial.content.$case){case"publicKey":return{$case:"public-key",hint:r.verificationMaterial.content.publicKey.hint};case"x509CertificateChain":return{$case:"certificate",certificate:t.X509Certificate.parse(r.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes)};case"certificate":return{$case:"certificate",certificate:t.X509Certificate.parse(r.verificationMaterial.content.certificate.rawBytes)}}}v(c,"key")}),Fe=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolicyError=e.VerificationError=void 0;var t=class extends Error{static{v(this,"BaseError")}constructor({code:i,message:a,cause:c}){super(a),this.code=i,this.cause=c,this.name=this.constructor.name}},s=class extends t{static{v(this,"VerificationError")}};e.VerificationError=s;var u=class extends t{static{v(this,"PolicyError")}};e.PolicyError=u}),RL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.filterCertAuthorities=t,e.filterTLogAuthorities=s;function t(u,i){return u.filter(a=>a.validFor.start<=i&&a.validFor.end>=i)}v(t,"filterCertAuthorities");function s(u,i){return u.filter(a=>i.logID&&!a.logID.equals(i.logID)?!1:a.validFor.start<=i.targetDate&&i.targetDate<=a.validFor.end)}v(s,"filterTLogAuthorities")}),Rr=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.filterTLogAuthorities=e.filterCertAuthorities=void 0,e.toTrustMaterial=r;var t=st(),s=qi(),u=Fe(),i=new Date(0),a=new Date(864e13),c=RL();Object.defineProperty(e,"filterCertAuthorities",{enumerable:!0,get:v(function(){return c.filterCertAuthorities},"get")}),Object.defineProperty(e,"filterTLogAuthorities",{enumerable:!0,get:v(function(){return c.filterTLogAuthorities},"get")});function r(h,p){let d=typeof p=="function"?p:l(p);return{certificateAuthorities:h.certificateAuthorities.map(o),timestampAuthorities:h.timestampAuthorities.map(o),tlogs:h.tlogs.map(n),ctlogs:h.ctlogs.map(n),publicKey:d}}v(r,"toTrustMaterial");function n(h){let p=h.publicKey.keyDetails,d=p===s.PublicKeyDetails.PKCS1_RSA_PKCS1V5||p===s.PublicKeyDetails.PKIX_RSA_PKCS1V5||p===s.PublicKeyDetails.PKIX_RSA_PKCS1V15_2048_SHA256||p===s.PublicKeyDetails.PKIX_RSA_PKCS1V15_3072_SHA256||p===s.PublicKeyDetails.PKIX_RSA_PKCS1V15_4096_SHA256?"pkcs1":"spki";return{logID:h.logId.keyId,publicKey:t.crypto.createPublicKey(h.publicKey.rawBytes,d),validFor:{start:h.publicKey.validFor?.start||i,end:h.publicKey.validFor?.end||a}}}v(n,"createTLogAuthority");function o(h){return{certChain:h.certChain.certificates.map(p=>t.X509Certificate.parse(p.rawBytes)),validFor:{start:h.validFor?.start||i,end:h.validFor?.end||a}}}v(o,"createCertAuthority");function l(h){return p=>{let d=(h||{})[p];if(!d)throw new u.VerificationError({code:"PUBLIC_KEY_ERROR",message:`key not found: ${p}`});return{publicKey:t.crypto.createPublicKey(d.rawBytes),validFor:v(g=>(d.validFor?.start||i)<=g&&(d.validFor?.end||a)>=g,"validFor")}}}v(l,"keyLocator")}),em=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CertificateChainVerifier=void 0,e.verifyCertificateChain=u;var t=Fe(),s=Rr();function u(c,r,n){let o=(0,s.filterCertAuthorities)(n,c),l;for(let h of o)try{return new i({trustedCerts:h.certChain,untrustedCert:r,timestamp:c}).verify()}catch(p){l=p}throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"Failed to verify certificate chain",cause:l})}v(u,"verifyCertificateChain");var i=class{static{v(this,"CertificateChainVerifier")}constructor(c){this.untrustedCert=c.untrustedCert,this.trustedCerts=c.trustedCerts,this.localCerts=a([...c.trustedCerts,c.untrustedCert]),this.timestamp=c.timestamp}verify(){let c=this.sort();if(this.checkPath(c),!c.every(r=>r.validForDate(this.timestamp)))throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"certificate is not valid or expired at the specified date"});return c}sort(){let c=this.untrustedCert,r=this.buildPaths(c);if(r=r.filter(o=>o.some(l=>this.trustedCerts.includes(l))),r.length===0)throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"no trusted certificate path found"});let n=r.reduce((o,l)=>o.length<l.length?o:l);return[c,...n].slice(0,-1)}buildPaths(c){let r=[],n=this.findIssuer(c);if(n.length===0)throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"no valid certificate path found"});for(let o=0;o<n.length;o++){let l=n[o];if(l.equals(c)){r.push([c]);continue}let h=this.buildPaths(l);for(let p=0;p<h.length;p++)r.push([l,...h[p]])}return r}findIssuer(c){let r=[],n;return c.subject.equals(c.issuer)&&c.verify()?[c]:(c.extAuthorityKeyID&&(n=c.extAuthorityKeyID.keyIdentifier),this.localCerts.forEach(o=>{if(n&&o.extSubjectKeyID){o.extSubjectKeyID.keyIdentifier.equals(n)&&r.push(o);return}o.subject.equals(c.issuer)&&r.push(o)}),r=r.filter(o=>{try{return c.verify(o)}catch{return!1}}),r)}checkPath(c){if(c.length<1)throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"certificate chain must contain at least one certificate"});if(!c.slice(1).every(r=>r.isCA))throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"intermediate certificate is not a CA"});for(let r=c.length-2;r>=0;r--)if(!c[r].issuer.equals(c[r+1].subject))throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"incorrect certificate name chaining"});for(let r=0;r<c.length;r++){let n=c[r];if(n.extBasicConstraints?.isCA){let o=n.extBasicConstraints.pathLenConstraint;if(o!==void 0&&o<r-1)throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"path length constraint exceeded"})}}}};e.CertificateChainVerifier=i;function a(c){for(let r=0;r<c.length;r++)for(let n=r+1;n<c.length;n++)c[r].equals(c[n])&&(c.splice(n,1),n--);return c}v(a,"dedupeCertificates")}),AL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifySCTs=i;var t=st(),s=Fe(),u=Rr();function i(a,c,r){let n,o=a.clone();for(let d=0;d<o.extensions.length;d++){let g=o.extensions[d];if(g.subs[0].toOID()===t.EXTENSION_OID_SCT){n=new t.X509SCTExtension(g),o.extensions.splice(d,1);break}}if(!n)return[];if(n.signedCertificateTimestamps.length===0)return[];let l=new t.ByteStream,h=t.crypto.digest("sha256",c.publicKey);l.appendView(h);let p=o.tbsCertificate.toDER();return l.appendUint24(p.length),l.appendView(p),n.signedCertificateTimestamps.map(d=>{if(!(0,u.filterTLogAuthorities)(r,{logID:d.logID,targetDate:d.datetime}).some(g=>d.verify(l.buffer,g.publicKey)))throw new s.VerificationError({code:"CERTIFICATE_ERROR",message:"SCT verification failed"});return d.logID})}v(i,"verifySCTs")}),CL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyPublicKey=r,e.verifyCertificate=n;var t=st(),s=Fe(),u=em(),i=AL(),a="1.3.6.1.4.1.57264.1.1",c="1.3.6.1.4.1.57264.1.8";function r(l,h,p){let d=p.publicKey(l);return h.forEach(g=>{if(!d.validFor(g))throw new s.VerificationError({code:"PUBLIC_KEY_ERROR",message:`Public key is not valid for timestamp: ${g.toISOString()}`})}),{key:d.publicKey}}v(r,"verifyPublicKey");function n(l,h,p){let d=[];return h.forEach(g=>{d=(0,u.verifyCertificateChain)(g,l,p.certificateAuthorities)}),{scts:(0,i.verifySCTs)(d[0],d[1],p.ctlogs),signer:o(d[0])}}v(n,"verifyCertificate");function o(l){let h,p=l.extension(c);p?h=p.valueObj.subs?.[0]?.value.toString("ascii"):h=l.extension(a)?.value.toString("ascii");let d={extensions:{issuer:h},subjectAlternativeName:l.subjectAltName};return{key:t.crypto.createPublicKey(l.publicKey),identity:d}}v(o,"getSigner")}),IL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifySubjectAlternativeName=s,e.verifyExtensions=u;var t=Fe();function s(i,a){if(a===void 0||!a.match(i))throw new t.PolicyError({code:"UNTRUSTED_SIGNER_ERROR",message:`certificate identity error - expected ${i}, got ${a}`})}v(s,"verifySubjectAlternativeName");function u(i,a={}){let c;for(c in i)if(a[c]!==i[c])throw new t.PolicyError({code:"UNTRUSTED_SIGNER_ERROR",message:`invalid certificate extension - expected ${c}=${i[c]}, got ${c}=${a[c]}`})}v(u,"verifyExtensions")}),TL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyCheckpoint=c;var t=st(),s=Fe(),u=Rr(),i=`
|
|
80
|
+
|
|
81
|
+
`,a=/\u2014 (\S+) (\S+)\n/g;function c(l,h){let p=(0,u.filterTLogAuthorities)(h,{targetDate:new Date(Number(l.integratedTime)*1e3)}),d=l.inclusionProof,g=n.fromString(d.checkpoint.envelope),m=o.fromString(g.note);if(!r(g,p))throw new s.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});if(!t.crypto.bufferEqual(m.logHash,d.rootHash))throw new s.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"root hash mismatch"})}v(c,"verifyCheckpoint");function r(l,h){let p=Buffer.from(l.note,"utf-8");return l.signatures.every(d=>{let g=h.find(m=>t.crypto.bufferEqual(m.logID.subarray(0,4),d.keyHint));return g?t.crypto.verify(p,g.publicKey,d.signature):!1})}v(r,"verifySignedNote");var n=class tm{static{v(this,"SignedNote")}constructor(h,p){this.note=h,this.signatures=p}static fromString(h){if(!h.includes(i))throw new s.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let p=h.indexOf(i),d=h.slice(0,p+1),g=h.slice(p+i.length).matchAll(a),m=Array.from(g,f=>{let[,y,S]=f,E=Buffer.from(S,"base64");if(E.length<5)throw new s.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:y,keyHint:E.subarray(0,4),signature:E.subarray(4)}});if(m.length===0)throw new s.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new tm(d,m)}},o=class rm{static{v(this,"LogCheckpoint")}constructor(h,p,d,g){this.origin=h,this.logSize=p,this.logHash=d,this.rest=g}static fromString(h){let p=h.trimEnd().split(`
|
|
82
|
+
`);if(p.length<3)throw new s.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let d=p[0],g=BigInt(p[1]),m=Buffer.from(p[2],"base64"),f=p.slice(3);return new rm(d,g,m,f)}}}),PL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyMerkleInclusion=a;var t=st(),s=Fe(),u=Buffer.from([0]),i=Buffer.from([1]);function a(g){let m=g.inclusionProof,f=BigInt(m.logIndex),y=BigInt(m.treeSize);if(f<0n||f>=y)throw new s.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${f}`});let{inner:S,border:E}=c(f,y);if(m.hashes.length!==S+E)throw new s.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let b=m.hashes.slice(0,S),_=m.hashes.slice(S),O=d(g.canonicalizedBody),w=n(r(O,b,f),_);if(!t.crypto.bufferEqual(w,m.rootHash))throw new s.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}v(a,"verifyMerkleInclusion");function c(g,m){let f=o(g,m),y=l(g>>BigInt(f));return{inner:f,border:y}}v(c,"decompInclProof");function r(g,m,f){return m.reduce((y,S,E)=>f>>BigInt(E)&BigInt(1)?p(S,y):p(y,S),g)}v(r,"chainInner");function n(g,m){return m.reduce((f,y)=>p(y,f),g)}v(n,"chainBorderRight");function o(g,m){return h(g^m-BigInt(1))}v(o,"innerProofSize");function l(g){return g.toString(2).split("1").length-1}v(l,"onesCount");function h(g){return g===0n?0:g.toString(2).length}v(h,"bitLength");function p(g,m){return t.crypto.digest("sha256",i,g,m)}v(p,"hashChildren");function d(g){return t.crypto.digest("sha256",u,g)}v(d,"hashLeaf")}),xL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyTLogSET=i;var t=st(),s=Fe(),u=Rr();function i(c,r){if(!(0,u.filterTLogAuthorities)(r,{logID:c.logId.keyId,targetDate:new Date(Number(c.integratedTime)*1e3)}).some(n=>{let o=a(c),l=Buffer.from(t.json.canonicalize(o),"utf8"),h=c.inclusionPromise.signedEntryTimestamp;return t.crypto.verify(l,n.publicKey,h)}))throw new s.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}v(i,"verifyTLogSET");function a(c){let{integratedTime:r,logIndex:n,logId:o,canonicalizedBody:l}=c;return{body:l.toString("base64"),integratedTime:Number(r),logIndex:Number(n),logID:o.keyId.toString("hex")}}v(a,"toVerificationPayload")}),NL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyRFC3161Timestamp=a;var t=st(),s=Fe(),u=em(),i=Rr();function a(n,o,l){let h=n.signingTime;if(l=(0,i.filterCertAuthorities)(l,h),l=r(l,{serialNumber:n.signerSerialNumber,issuer:n.signerIssuer}),!l.some(p=>{try{return c(n,o,p),!0}catch{return!1}}))throw new s.VerificationError({code:"TIMESTAMP_ERROR",message:"timestamp could not be verified"})}v(a,"verifyRFC3161Timestamp");function c(n,o,l){let[h,...p]=l.certChain,d=t.crypto.createPublicKey(h.publicKey),g=n.signingTime;try{new u.CertificateChainVerifier({untrustedCert:h,trustedCerts:p,timestamp:g}).verify()}catch{throw new s.VerificationError({code:"TIMESTAMP_ERROR",message:"invalid certificate chain"})}n.verify(o,d)}v(c,"verifyTimestampForCA");function r(n,o){return n.filter(l=>l.certChain.length>0&&t.crypto.bufferEqual(l.certChain[0].serialNumber,o.serialNumber)&&t.crypto.bufferEqual(l.certChain[0].issuer,o.issuer))}v(r,"filterCAsBySerialAndIssuer")}),kL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyTSATimestamp=c,e.verifyTLogTimestamp=r;var t=Fe(),s=TL(),u=PL(),i=xL(),a=NL();function c(l,h,p){return(0,a.verifyRFC3161Timestamp)(l,h,p),{type:"timestamp-authority",logID:l.signerSerialNumber,timestamp:l.signingTime}}v(c,"verifyTSATimestamp");function r(l,h){let p=!1;if(n(l)&&((0,i.verifyTLogSET)(l,h),p=!0),o(l)&&((0,u.verifyMerkleInclusion)(l),(0,s.verifyCheckpoint)(l,h),p=!0),!p)throw new t.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"});return{type:"transparency-log",logID:l.logId.keyId,timestamp:new Date(Number(l.integratedTime)*1e3)}}v(r,"verifyTLogTimestamp");function n(l){return l.inclusionPromise!==void 0}v(n,"isTLogEntryWithInclusionPromise");function o(l){return l.inclusionProof!==void 0}v(o,"isTLogEntryWithInclusionProof")}),LL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyDSSETLogBody=s;var t=Fe();function s(i,a){switch(i.apiVersion){case"0.0.1":return u(i,a);default:throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported dsse version: ${i.apiVersion}`})}}v(s,"verifyDSSETLogBody");function u(i,a){if(i.spec.signatures?.length!==1)throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"});let c=i.spec.signatures[0].signature;if(!a.compareSignature(Buffer.from(c,"base64")))throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});let r=i.spec.payloadHash?.value||"";if(!a.compareDigest(Buffer.from(r,"hex")))throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}v(u,"verifyDSSE001TLogBody")}),DL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyHashedRekordTLogBody=s;var t=Fe();function s(i,a){switch(i.apiVersion){case"0.0.1":return u(i,a);default:throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported hashedrekord version: ${i.apiVersion}`})}}v(s,"verifyHashedRekordTLogBody");function u(i,a){let c=i.spec.signature.content||"";if(!a.compareSignature(Buffer.from(c,"base64")))throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"signature mismatch"});let r=i.spec.data.hash?.value||"";if(!a.compareDigest(Buffer.from(r,"hex")))throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"digest mismatch"})}v(u,"verifyHashedrekord001TLogBody")}),$L=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyIntotoTLogBody=s;var t=Fe();function s(a,c){switch(a.apiVersion){case"0.0.2":return u(a,c);default:throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported intoto version: ${a.apiVersion}`})}}v(s,"verifyIntotoTLogBody");function u(a,c){if(a.spec.content.envelope.signatures?.length!==1)throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"});let r=i(a.spec.content.envelope.signatures[0].sig);if(!c.compareSignature(Buffer.from(r,"base64")))throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});let n=a.spec.content.payloadHash?.value||"";if(!c.compareDigest(Buffer.from(n,"hex")))throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}v(u,"verifyIntoto002TLogBody");function i(a){return Buffer.from(a,"base64").toString("utf-8")}v(i,"base64Decode")}),ML=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyTLogBody=a;var t=Fe(),s=LL(),u=DL(),i=$L();function a(c,r){let{kind:n,version:o}=c.kindVersion,l=JSON.parse(c.canonicalizedBody.toString("utf8"));if(n!==l.kind||o!==l.apiVersion)throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${n}/${o}, received: ${l.kind}/${l.apiVersion}`});switch(l.kind){case"dsse":return(0,s.verifyDSSETLogBody)(l,r);case"intoto":return(0,i.verifyIntotoTLogBody)(l,r);case"hashedrekord":return(0,u.verifyHashedRekordTLogBody)(l,r);default:throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${n}`})}}v(a,"verifyTLogBody")}),jL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Verifier=void 0;var t=require("util"),s=Fe(),u=CL(),i=IL(),a=kL(),c=ML(),r=class{static{v(this,"Verifier")}constructor(o,l={}){this.trustMaterial=o,this.options={ctlogThreshold:l.ctlogThreshold??1,tlogThreshold:l.tlogThreshold??1,tsaThreshold:l.tsaThreshold??0}}verify(o,l){let h=this.verifyTimestamps(o),p=this.verifySigningKey(o,h);return this.verifyTLogs(o),this.verifySignature(o,p),l&&this.verifyPolicy(l,p.identity||{}),p}verifyTimestamps(o){let l=0,h=0,p=o.timestamps.map(d=>{switch(d.$case){case"timestamp-authority":return h++,(0,a.verifyTSATimestamp)(d.timestamp,o.signature.signature,this.trustMaterial.timestampAuthorities);case"transparency-log":return l++,(0,a.verifyTLogTimestamp)(d.tlogEntry,this.trustMaterial.tlogs)}});if(n(p))throw new s.VerificationError({code:"TIMESTAMP_ERROR",message:"duplicate timestamp"});if(l<this.options.tlogThreshold)throw new s.VerificationError({code:"TIMESTAMP_ERROR",message:`expected ${this.options.tlogThreshold} tlog timestamps, got ${l}`});if(h<this.options.tsaThreshold)throw new s.VerificationError({code:"TIMESTAMP_ERROR",message:`expected ${this.options.tsaThreshold} tsa timestamps, got ${h}`});return p.map(d=>d.timestamp)}verifySigningKey({key:o},l){switch(o.$case){case"public-key":return(0,u.verifyPublicKey)(o.hint,l,this.trustMaterial);case"certificate":{let h=(0,u.verifyCertificate)(o.certificate,l,this.trustMaterial);if(n(h.scts))throw new s.VerificationError({code:"CERTIFICATE_ERROR",message:"duplicate SCT"});if(h.scts.length<this.options.ctlogThreshold)throw new s.VerificationError({code:"CERTIFICATE_ERROR",message:`expected ${this.options.ctlogThreshold} SCTs, got ${h.scts.length}`});return h.signer}}}verifyTLogs({signature:o,tlogEntries:l}){l.forEach(h=>(0,c.verifyTLogBody)(h,o))}verifySignature(o,l){if(!o.signature.verifySignature(l.key))throw new s.VerificationError({code:"SIGNATURE_ERROR",message:"signature verification failed"})}verifyPolicy(o,l){o.subjectAlternativeName&&(0,i.verifySubjectAlternativeName)(o.subjectAlternativeName,l.subjectAlternativeName),o.extensions&&(0,i.verifyExtensions)(o.extensions,l.extensions)}};e.Verifier=r;function n(o){for(let l=0;l<o.length;l++)for(let h=l+1;h<o.length;h++)if((0,t.isDeepStrictEqual)(o[l],o[h]))return!0;return!1}v(n,"containsDupes")}),ec=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Verifier=e.toTrustMaterial=e.VerificationError=e.PolicyError=e.toSignedEntity=void 0;var t=OL();Object.defineProperty(e,"toSignedEntity",{enumerable:!0,get:v(function(){return t.toSignedEntity},"get")});var s=Fe();Object.defineProperty(e,"PolicyError",{enumerable:!0,get:v(function(){return s.PolicyError},"get")}),Object.defineProperty(e,"VerificationError",{enumerable:!0,get:v(function(){return s.VerificationError},"get")});var u=Rr();Object.defineProperty(e,"toTrustMaterial",{enumerable:!0,get:v(function(){return u.toTrustMaterial},"get")});var i=jL();Object.defineProperty(e,"Verifier",{enumerable:!0,get:v(function(){return i.Verifier},"get")})}),BL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_TIMEOUT=e.DEFAULT_RETRY=void 0,e.createBundleBuilder=i,e.createKeyFinder=a,e.createVerificationPolicy=c;var t=st(),s=Hg(),u=ec();e.DEFAULT_RETRY={retries:2},e.DEFAULT_TIMEOUT=5e3;function i(p,d){let g={signer:r(d),witnesses:o(d)};switch(p){case"messageSignature":return new s.MessageSignatureBundleBuilder(g);case"dsseEnvelope":return new s.DSSEBundleBuilder({...g,certificateChain:d.legacyCompatibility})}}v(i,"createBundleBuilder");function a(p){return d=>{let g=p(d);if(!g)throw new u.VerificationError({code:"PUBLIC_KEY_ERROR",message:`key not found: ${d}`});return{publicKey:t.crypto.createPublicKey(g),validFor:v(()=>!0,"validFor")}}}v(a,"createKeyFinder");function c(p){let d={},g=p.certificateIdentityEmail||p.certificateIdentityURI;return g&&(d.subjectAlternativeName=g),p.certificateIssuer&&(d.extensions={issuer:p.certificateIssuer}),d}v(c,"createVerificationPolicy");function r(p){return new s.FulcioSigner({fulcioBaseURL:p.fulcioURL,identityProvider:p.identityProvider||n(p),retry:p.retry??e.DEFAULT_RETRY,timeout:p.timeout??e.DEFAULT_TIMEOUT})}v(r,"initSigner");function n(p){let d=p.identityToken;return d?{getToken:v(()=>Promise.resolve(d),"getToken")}:new s.CIContextProvider("sigstore")}v(n,"initIdentityProvider");function o(p){let d=[];return l(p)&&d.push(new s.RekorWitness({rekorBaseURL:p.rekorURL,entryType:p.legacyCompatibility?"intoto":"dsse",fetchOnConflict:!1,retry:p.retry??e.DEFAULT_RETRY,timeout:p.timeout??e.DEFAULT_TIMEOUT})),h(p)&&d.push(new s.TSAWitness({tsaBaseURL:p.tsaServerURL,retry:p.retry??e.DEFAULT_RETRY,timeout:p.timeout??e.DEFAULT_TIMEOUT})),d}v(o,"initWitnesses");function l(p){return p.tlogUpload!==!1}v(l,"isRekorEnabled");function h(p){return p.tsaServerURL!==void 0}v(h,"isTSAEnabled")}),UL=K(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(p,d,g,m){m===void 0&&(m=g);var f=Object.getOwnPropertyDescriptor(d,g);(!f||("get"in f?!d.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:v(function(){return d[g]},"get")}),Object.defineProperty(p,m,f)}:function(p,d,g,m){m===void 0&&(m=g),p[m]=d[g]}),s=e&&e.__setModuleDefault||(Object.create?function(p,d){Object.defineProperty(p,"default",{enumerable:!0,value:d})}:function(p,d){p.default=d}),u=e&&e.__importStar||function(){var p=v(function(d){return p=Object.getOwnPropertyNames||function(g){var m=[];for(var f in g)Object.prototype.hasOwnProperty.call(g,f)&&(m[m.length]=f);return m},p(d)},"ownKeys");return function(d){if(d&&d.__esModule)return d;var g={};if(d!=null)for(var m=p(d),f=0;f<m.length;f++)m[f]!=="default"&&t(g,d,m[f]);return s(g,d),g}}();Object.defineProperty(e,"__esModule",{value:!0}),e.sign=n,e.attest=o,e.verify=l,e.createVerifier=h;var i=Ki(),a=u(Ql()),c=ec(),r=u(BL());async function n(p,d={}){let g=await r.createBundleBuilder("messageSignature",d).create({data:p});return(0,i.bundleToJSON)(g)}v(n,"sign");async function o(p,d,g={}){let m=await r.createBundleBuilder("dsseEnvelope",g).create({data:p,type:d});return(0,i.bundleToJSON)(m)}v(o,"attest");async function l(p,d,g){let m;return Buffer.isBuffer(d)?m=d:g=d,h(g).then(f=>f.verify(p,m))}v(l,"verify");async function h(p={}){let d=await a.getTrustedRoot({mirrorURL:p.tufMirrorURL,rootPath:p.tufRootPath,cachePath:p.tufCachePath,forceCache:p.tufForceCache,retry:p.retry??r.DEFAULT_RETRY,timeout:p.timeout??r.DEFAULT_TIMEOUT}),g=p.keySelector?r.createKeyFinder(p.keySelector):void 0,m=(0,c.toTrustMaterial)(d,g),f={ctlogThreshold:p.ctLogThreshold,tlogThreshold:p.tlogThreshold},y=new c.Verifier(m,f),S=r.createVerificationPolicy(p);return{verify:v((E,b)=>{let _=(0,i.bundleFromJSON)(E),O=(0,c.toSignedEntity)(_,b);y.verify(O,S)},"verify")}}v(h,"createVerifier")}),FL=K(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verify=e.sign=e.createVerifier=e.attest=e.VerificationError=e.PolicyError=e.TUFError=e.InternalError=e.DEFAULT_REKOR_URL=e.DEFAULT_FULCIO_URL=e.ValidationError=void 0;var t=Ki();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:v(function(){return t.ValidationError},"get")});var s=Hg();Object.defineProperty(e,"DEFAULT_FULCIO_URL",{enumerable:!0,get:v(function(){return s.DEFAULT_FULCIO_URL},"get")}),Object.defineProperty(e,"DEFAULT_REKOR_URL",{enumerable:!0,get:v(function(){return s.DEFAULT_REKOR_URL},"get")}),Object.defineProperty(e,"InternalError",{enumerable:!0,get:v(function(){return s.InternalError},"get")});var u=Ql();Object.defineProperty(e,"TUFError",{enumerable:!0,get:v(function(){return u.TUFError},"get")});var i=ec();Object.defineProperty(e,"PolicyError",{enumerable:!0,get:v(function(){return i.PolicyError},"get")}),Object.defineProperty(e,"VerificationError",{enumerable:!0,get:v(function(){return i.VerificationError},"get")});var a=UL();Object.defineProperty(e,"attest",{enumerable:!0,get:v(function(){return a.attest},"get")}),Object.defineProperty(e,"createVerifier",{enumerable:!0,get:v(function(){return a.createVerifier},"get")}),Object.defineProperty(e,"sign",{enumerable:!0,get:v(function(){return a.sign},"get")}),Object.defineProperty(e,"verify",{enumerable:!0,get:v(function(){return a.verify},"get")})}),sm=K((e,t)=>{var s=require("crypto"),u=Il(),i=Cl(),a=It(),c=ps(),r=FL(),n=Ag(),o=Ar(),l=zi(),h=Cg().version,p=Qf(),d=_r(),g="application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*",m="application/json",f="2015-01-01T00:00:00.000Z",y=class extends o{static{v(this,"RegistryFetcher")}#e;constructor(S,E){super(S,E),this.packumentCache=this.opts.packumentCache||null,this.registry=n.pickRegistry(S,E),this.packumentUrl=`${p(this.registry)}/${this.spec.escapedName}`,this.#e=`${this.fullMetadata?"full":"corgi"}:${this.packumentUrl}`;let b=new URL(this.registry),_=`//${b.host}${b.pathname}`;this.opts[`${_}:_keys`]&&(this.registryKeys=this.opts[`${_}:_keys`])}async resolve(){if(await this.manifest(),!this.resolved)throw Object.assign(new Error("Invalid package manifest: no `dist.tarball` field"),{package:this.spec.toString()});return this.resolved}#t(){return{"user-agent":this.opts.userAgent||`pacote/${h} node/${process.version}`,...this.opts.headers||{},"pacote-version":h,"pacote-req-type":"packument","pacote-pkg-id":`registry:${this.spec.name}`,accept:this.fullMetadata?m:g}}async packument(){if(this.packumentCache?.has(this.#e))return this.packumentCache.get(this.#e);try{let S=await n(this.packumentUrl,{...this.opts,headers:this.#t(),spec:this.spec,integrity:null}),E=await S.json(),b=S.headers.get("content-length");return b&&(E._contentLength=Number(b)),this.packumentCache?.set(this.#e,E),E}catch(S){if(this.packumentCache?.delete(this.#e),S.code!=="E404"||this.fullMetadata)throw S;return this.fullMetadata=!0,this.packument()}}async manifest(){if(this.package)return this.package;this.opts.verifySignatures&&(this.fullMetadata=!0);let S=await this.packument(),E=u.normalizeSteps.filter(w=>w!=="_attributes"),b=await new u().fromContent(i(S,this.spec.fetchSpec,{...this.opts,defaultTag:this.defaultTag,before:this.before})).normalize({steps:E}).then(w=>w.content),_=S.time?.[b.version];_&&(b._time=_);let{dist:O}=b;if(O){this.resolved=b._resolved=O.tarball,b._from=this.from;let w=O.integrity?a.parse(O.integrity):O.shasum?a.fromHex(O.shasum,"sha1",{...this.opts}):null;if(w){if(this.integrity&&!this.integrity.match(w)){for(let A of Object.keys(this.integrity))if(w[A])throw Object.assign(new Error(`Integrity checksum failed when using ${A}: wanted ${this.integrity} but got ${w}.`),{code:"EINTEGRITY"})}this.integrity=w}}if(this.integrity){if(b._integrity=String(this.integrity),O.signatures)if(this.opts.verifySignatures){let w=`${b._id}:${b._integrity}`;for(let A of O.signatures){let I=this.registryKeys&&this.registryKeys.filter($=>$.keyid===A.keyid)[0];if(!I)throw Object.assign(new Error(`${b._id} has a registry signature with keyid: ${A.keyid} but no corresponding public key can be found`),{code:"EMISSINGSIGNATUREKEY"});let P=Date.parse(b._time||f);if(!(!I.expires||P<Date.parse(I.expires)))throw Object.assign(new Error(`${b._id} has a registry signature with keyid: ${A.keyid} but the corresponding public key has expired ${I.expires}`),{code:"EEXPIREDSIGNATUREKEY"});let L=s.createVerify("SHA256");if(L.write(w),L.end(),!L.verify(I.pemkey,A.sig,"base64"))throw Object.assign(new Error(`${b._id} has an invalid registry signature with keyid: ${I.keyid} and signature: ${A.sig}`),{code:"EINTEGRITYSIGNATURE",keyid:I.keyid,signature:A.sig,resolved:b._resolved,integrity:b._integrity})}b._signatures=O.signatures}else b._signatures=O.signatures;if(O.attestations)if(this.opts.verifyAttestations){let w=new URL(O.attestations.url).pathname,A=p(this.registry)+w,I=await n(A,{...this.opts,integrity:null}),{attestations:P}=await I.json(),L=P.map(({predicateType:M,bundle:U})=>{let V=JSON.parse(Buffer.from(U.dsseEnvelope.payload,"base64").toString("utf8")),B=U.dsseEnvelope.signatures[0].keyid,G=U.dsseEnvelope.signatures[0].sig;return{predicateType:M,bundle:U,statement:V,keyid:B,signature:G}}),$=L.map(M=>M.keyid).filter(M=>!!M),x=(this.registryKeys||[]).filter(M=>$.includes(M.keyid));if(!x.length)throw Object.assign(new Error(`${b._id} has attestations but no corresponding public key(s) can be found`),{code:"EMISSINGSIGNATUREKEY"});for(let{predicateType:M,bundle:U,keyid:V,signature:B,statement:G}of L){let W=x.find(C=>C.keyid===V);if(V){if(!W)throw Object.assign(new Error(`${b._id} has attestations with keyid: ${V} but no corresponding public key can be found`),{code:"EMISSINGSIGNATUREKEY"});let C=new Date(Number(U.verificationMaterial.tlogEntries[0].integratedTime)*1e3);if(!(!W.expires||C<Date.parse(W.expires)))throw Object.assign(new Error(`${b._id} has attestations with keyid: ${V} but the corresponding public key has expired ${W.expires}`),{code:"EEXPIREDSIGNATUREKEY"})}let N={name:G.subject[0].name,sha512:G.subject[0].digest.sha512},D=this.spec.type==="version"?c.toPurl(this.spec):this.spec;if(N.name!==D)throw Object.assign(new Error(`${b._id} package name and version (PURL): ${D} doesn't match what was signed: ${N.name}`),{code:"EATTESTATIONSUBJECT"});let T=a.parse(this.integrity).hexDigest();if(N.sha512!==T)throw Object.assign(new Error(`${b._id} package integrity (hex digest): ${T} doesn't match what was signed: ${N.sha512}`),{code:"EATTESTATIONSUBJECT"});try{let C={tufCachePath:this.tufCache,tufForceCache:!0,keySelector:W?()=>W.pemkey:void 0};await r.verify(U,C)}catch(C){throw Object.assign(new Error(`${b._id} failed to verify attestation: ${C.message}`),{code:"EATTESTATIONVERIFY",predicateType:M,keyid:V,signature:B,resolved:b._resolved,integrity:b._integrity})}}b._attestations=O.attestations}else b._attestations=O.attestations}return this.package=b,this.package}[d.tarballFromResolved](){return new l(this.resolved,{...this.opts,resolved:this.resolved,pkgid:`registry:${this.spec.name}@${this.resolved}`})[d.tarballFromResolved]()}get types(){return["tag","version","range"]}};t.exports=y}),Ar=K((e,t)=>{var{basename:s,dirname:u}=require("path"),{rm:i,mkdir:a}=require("internal/fs/promises"),c=Il(),r=Hi(),n=hs(),o=Qx(),l=ps(),h=Mi(),p=It(),d=Xf(),{Minipass:g}=xe(),{log:m}=ft(),f=_r(),y=uN(),S=Yf(),E=Qf(),b=v($=>c.prepare($).then(x=>x.content),"packageJsonPrepare"),_=v($=>c.normalize($).then(x=>x.content),"packageJsonNormalize"),O=class{static{v(this,"FetcherBase")}constructor($,x){if(!x||typeof x!="object")throw new TypeError("options object is required");this.spec=l($,x.where),this.allowGitIgnore=!!x.allowGitIgnore,this.from=this.spec.registry?`${this.spec.name}@${this.spec.rawSpec}`:this.spec.saveSpec,this.#r(),this.opts={...x},this.cache=x.cache||y().cacache,this.tufCache=x.tufCache||y().tufcache,this.resolved=x.resolved||null,this.defaultIntegrityAlgorithm=x.defaultIntegrityAlgorithm||"sha512",typeof x.integrity=="string"&&(this.opts.integrity=p.parse(x.integrity)),this.package=null,this.type=this.constructor.name,this.fmode=x.fmode||438,this.dmode=x.dmode||511,this.umask=x.umask||0,this.preferOnline=!!x.preferOnline,this.preferOffline=!!x.preferOffline,this.offline=!!x.offline,this.before=x.before,this.fullMetadata=this.before?!0:!!x.fullMetadata,this.fullReadJson=!!x.fullReadJson,this[f.readPackageJson]=this.fullReadJson?b:_,this.replaceRegistryHost=!x.replaceRegistryHost||x.replaceRegistryHost==="npmjs"?"registry.npmjs.org":x.replaceRegistryHost,this.defaultTag=x.defaultTag||"latest",this.registry=E(x.registry||"https://registry.npmjs.org"),this.npmBin=x.npmBin||"npm",this.npmInstallCmd=x.npmInstallCmd||["install","--force"],this.npmCliConfig=x.npmCliConfig||[`--cache=${u(this.cache)}`,`--prefer-offline=${!!this.preferOffline}`,`--prefer-online=${!!this.preferOnline}`,`--offline=${!!this.offline}`,...this.before?[`--before=${this.before.toISOString()}`]:[],"--no-progress","--no-save","--no-audit","--include=dev","--include=peer","--include=optional","--no-package-lock-only","--no-dry-run"]}get integrity(){return this.opts.integrity||null}set integrity($){if(!$)return;$=p.parse($);let x=this.opts.integrity;x?x.merge($):this.opts.integrity=$}get notImplementedError(){return new Error("not implemented in this fetcher type: "+this.type)}resolve(){return this.resolved?Promise.resolve(this.resolved):Promise.reject(this.notImplementedError)}packument(){return Promise.reject(this.notImplementedError)}manifest(){return Promise.reject(this.notImplementedError)}[f.tarballFromResolved](){throw this.notImplementedError}tarball(){return this.tarballStream($=>$.concat().then(x=>(x.integrity=this.integrity&&String(this.integrity),x.resolved=this.resolved,x.from=this.from,x)))}#e(){let $=Date.now(),x=r.get.stream.byDigest(this.cache,this.integrity,this.opts),M=Date.now()-$;return m.http("cache",`${this.spec} ${M}ms (cache hit)`),x}get[f.cacheFetches](){return!0}#t($){if(!this.opts.cache||!this[f.cacheFetches]){if($.hasIntegrityEmitter)return $.on("integrity",V=>this.integrity=V),$;let U=p.integrityStream(this.opts);return U.on("integrity",V=>this.integrity=V),$.on("error",V=>U.emit("error",V)),$.pipe(U)}let x=new g;$.on("error",U=>x.emit("error",U)),$.pipe(x,{end:!1});let M=r.put.stream(this.opts.cache,`pacote:tarball:${this.from}`,this.opts);return M.on("integrity",U=>this.integrity=U),M.on("error",U=>$.emit("error",U)),$.pipe(M),M.promise().catch(()=>{}).then(()=>x.end()),x}pickIntegrityAlgorithm(){return this.integrity?this.integrity.pickAlgorithm(this.opts):this.defaultIntegrityAlgorithm}isDataCorruptionError($){return $.code==="EINTEGRITY"||$.code==="Z_DATA_ERROR"}get types(){return!1}#r(){if(this.types&&!this.types.includes(this.spec.type))throw new TypeError(`Wrong spec type (${this.spec.type}) for ${this.constructor.name}. Supported types: ${this.types.join(", ")}`)}isRetriableError($){return this.isDataCorruptionError($)||$.code==="ENOENT"||$.code==="EISDIR"}tarballStream($){let x=!this.preferOnline&&this.integrity&&this.resolved?$(this.#e()).catch(U=>{if(this.isDataCorruptionError(U))return m.warn("tarball",`cached data for ${this.spec} (${this.integrity}) seems to be corrupted. Refreshing cache.`),this.cleanupCached().then(()=>{throw U});throw U}):null,M=v(U=>{if(U){if(!this.isRetriableError(U))throw U;m.silly("tarball",`no local data for ${this.spec}. Extracting by manifest.`)}return this.resolve().then(()=>h(V=>$(this.#t(this[f.tarballFromResolved]())).catch(B=>{if(this.isRetriableError(B))return m.warn("tarball",`tarball data for ${this.spec} (${this.integrity}) seems to be corrupted. Trying again.`),this.cleanupCached().then(()=>V(B));throw B}),{retries:1,minTimeout:0,maxTimeout:0}))},"fromResolved");return x?x.catch(M):M()}cleanupCached(){return r.rm.content(this.cache,this.integrity,this.opts)}#s($){return o({path:$,depth:1}).then(x=>Promise.all(x.map(M=>i(M,{recursive:!0,force:!0}))))}async#i($){return await this.#s($),await a($,{recursive:!0})}async extract($){return await this.#i($),this.tarballStream(x=>this.#c($,x))}#l($){return this.tarballStream(x=>new Promise((M,U)=>{let V=new n.WriteStream($);x.on("error",B=>V.emit("error",B)),V.on("error",B=>U(B)),V.on("close",()=>M({integrity:this.integrity&&String(this.integrity),resolved:this.resolved,from:this.from})),x.pipe(V)}))}async tarballFile($){let x=u($);return await a(x,{recursive:!0}),this.#l($)}#c($,x){let M=d.x(this.#n({cwd:$})),U=new Promise((V,B)=>{M.on("end",()=>{V({resolved:this.resolved,integrity:this.integrity&&String(this.integrity),from:this.from})}),M.on("error",G=>{m.warn("tar",G.message),m.silly("tar",G),B(G)}),x.on("error",G=>B(G))});return x.pipe(M),U}#h($,x,M){let U=/Directory|GNUDumpDir/.test(M)?this.dmode:/File$/.test(M)?this.fmode:0,V=S(this.package,$)?73:0;return(x|U)&~this.umask|V|384}#n({cwd:$}){let x=new Set;return{cwd:$,noChmod:!0,noMtime:!0,filter:v((M,U)=>{if(/Link$/.test(U.type))return!1;if(U.mode=this.#h(U.path,U.mode,U.type),/File$/.test(U.type)){let V=s(U.path);if(V===".npmignore")x.add(U.path);else if(V===".gitignore"&&!this.allowGitIgnore){let B=U.path.replace(/\.gitignore$/,".npmignore");if(x.has(B))return!1;U.path=B}return!0}},"filter"),strip:1,onwarn:v((M,U,V)=>{m.warn("tar",M,U),m.silly("tar",M,U,V)},"onwarn"),umask:this.umask,preserveOwner:!1}}};t.exports=O;var w=Ig(),A=sm(),I=ys(),P=Bl(),L=zi();O.get=($,x={})=>{let M=l($,x.where);switch(M.type){case"git":return new w(M,x);case"remote":return new L(M,x);case"version":case"range":case"tag":case"alias":return new A(M.subSpec||M,x);case"file":return new I(M,x);case"directory":return new P(M,x);default:throw new TypeError("Unknown spec type: "+M.type)}}}),{get:Jt}=Ar(),HL=Ig(),GL=sm(),VL=ys(),WL=Bl(),zL=zi(),tc=v((e,t)=>Jt(e,t).tarball(),"tarball");tc.stream=(e,t,s)=>Jt(e,s).tarballStream(t);tc.file=(e,t,s)=>Jt(e,s).tarballFile(t);im.exports={GitFetcher:HL,RegistryFetcher:GL,FileFetcher:VL,DirFetcher:WL,RemoteFetcher:zL,resolve:v((e,t)=>Jt(e,t).resolve(),"resolve"),extract:v((e,t,s)=>Jt(e,s).extract(t),"extract"),manifest:v((e,t)=>Jt(e,t).manifest(),"manifest"),packument:v((e,t)=>Jt(e,t).packument(),"packument"),tarball:tc};});var am=ge((pW,om)=>{var ic=Object.defineProperty,qL=Object.getOwnPropertyDescriptor,KL=Object.getOwnPropertyNames,JL=Object.prototype.hasOwnProperty,ZL=(e,t)=>{for(var s in t)ic(e,s,{get:t[s],enumerable:!0})},XL=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of KL(t))!JL.call(e,i)&&i!==s&&ic(e,i,{get:()=>t[i],enumerable:!(u=qL(t,i))||u.enumerable});return e},YL=e=>XL(ic({},"__esModule",{value:!0}),e),nm={};ZL(nm,{AT_LATEST:()=>tD,LATEST:()=>rD,PACKAGE:()=>eD,PACKAGE_DEFAULT_VERSION:()=>sD,getLifecycleScriptNames:()=>lD,getNpmLifecycleEvent:()=>aD,getPackageDefaultNodeRange:()=>iD,getPackageDefaultSocketCategories:()=>nD,getPackageExtensions:()=>oD,getPackumentCache:()=>cD,getPacoteCachePath:()=>uD});om.exports=YL(nm);var QL=Wd(),Xi,Yi,Qi,en,tn,sc,eD="package",tD="@latest",rD="latest",sD="1.0.0";function iD(){if(Yi===void 0)try{Yi=require("../lib/package-default-node-range")}catch{Yi=">=18"}return Yi}function nD(){if(Qi===void 0)try{Qi=require("../lib/package-default-socket-categories")}catch{Qi=[]}return Qi}function oD(){if(en===void 0)try{let e=require("../lib/package-extensions");en=Object.entries(e)}catch{en=[]}return en}function aD(){return(0,QL.getNpmLifecycleEvent)()}function lD(){if(Xi===void 0)try{Xi=require("../lib/lifecycle-script-names")}catch{Xi=[]}return Xi}function cD(){return sc===void 0&&(sc=new Map),sc}function uD(){if(tn===void 0)try{let e=rc(),{normalizePath:t}=require("../lib/path"),s=Reflect.getPrototypeOf(e.RegistryFetcher.prototype)?.constructor,u=s?new s("x",{}).cache:"";tn=t(u)}catch{tn=""}return tn}});var hc=ge((dW,hm)=>{var ac=Object.defineProperty,hD=Object.getOwnPropertyDescriptor,pD=Object.getOwnPropertyNames,dD=Object.prototype.hasOwnProperty,fD=(e,t)=>{for(var s in t)ac(e,s,{get:t[s],enumerable:!0})},gD=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pD(t))!dD.call(e,i)&&i!==s&&ac(e,i,{get:()=>t[i],enumerable:!(u=hD(t,i))||u.enumerable});return e},mD=e=>gD(ac({},"__esModule",{value:!0}),e),lm={};fD(lm,{normalizeIterationOptions:()=>cc,normalizeRetryOptions:()=>_s,pEach:()=>SD,pEachChunk:()=>bD,pFilter:()=>ED,pFilterChunk:()=>um,pRetry:()=>rn,resolveRetryOptions:()=>uc});hm.exports=mD(lm);var nc=ro(),yD=tr(),lc=rr(),cm=(0,yD.getAbortSignal)(),oc;function vD(){return oc===void 0&&(oc=require("timers/promises")),oc}function cc(e){let t=typeof e=="number"?{concurrency:e}:e,{concurrency:s=1,retries:u,signal:i=cm}={__proto__:null,...t};return{__proto__:null,concurrency:Math.max(1,s),retries:_s({signal:i,...uc(u)}),signal:i}}function _s(e){let t=uc(e),{args:s=[],backoffFactor:u=t.factor||2,baseDelayMs:i=t.minTimeout||200,jitter:a=!0,maxDelayMs:c=t.maxTimeout||1e4,onRetry:r,onRetryCancelOnFalse:n=!1,onRetryRethrow:o=!1,retries:l=t.retries||0,signal:h=cm}=t;return{args:s,backoffFactor:u,baseDelayMs:i,jitter:a,maxDelayMs:c,minTimeout:i,maxTimeout:c,onRetry:r,onRetryCancelOnFalse:n,onRetryRethrow:o,retries:l,signal:h}}function uc(e){let t={__proto__:null,retries:0,minTimeout:200,maxTimeout:1e4,factor:2};return typeof e=="number"?{...t,retries:e}:e?{...t,...e}:t}async function SD(e,t,s){let u=cc(s),{concurrency:i,retries:a,signal:c}=u,r=(0,lc.arrayChunk)(e,i);for(let n of r){if(c?.aborted)return;await Promise.all(n.map(o=>rn((...l)=>t(l[0]),{...a,args:[o],signal:c})))}}async function ED(e,t,s){let u=cc(s);return(await um((0,lc.arrayChunk)(e,u.concurrency),t,u.retries)).flat()}async function bD(e,t,s){let{chunkSize:u=100,...i}=s||{},a=(0,lc.arrayChunk)(e,u),c=_s(i),{signal:r}=c;for(let n of a){if(r?.aborted)return;await rn((...o)=>t(o[0]),{...c,args:[n]})}}async function um(e,t,s){let u=_s(s),{signal:i}=u,{length:a}=e,c=Array(a);for(let r=0;r<a;r+=1)if(i?.aborted)c[r]=[];else{let n=e[r],o=await Promise.all(n.map(l=>rn((...h)=>t(h[0]),{...u,args:[l]})));c[r]=n.filter((l,h)=>o[h])}return c}async function rn(e,t){let{args:s,backoffFactor:u,baseDelayMs:i,jitter:a,maxDelayMs:c,onRetry:r,onRetryCancelOnFalse:n,onRetryRethrow:o,retries:l,signal:h}=_s(t);if(h?.aborted)return;if(l===0)return await e(...s||[],{signal:h});let p=vD(),d=l,g=i,m=nc.UNDEFINED_TOKEN;for(;d-->=0;){if(h?.aborted)return;try{return await e(...s||[],{signal:h})}catch(f){if(m===nc.UNDEFINED_TOKEN&&(m=f),d<0)break;let y=g;if(a&&(y+=Math.floor(Math.random()*g)),y=Math.min(y,c),typeof r=="function")try{let S=r(l-d,f,y);if(S===!1&&n)break;typeof S=="number"&&S>=0&&(y=Math.min(S,c))}catch(S){if(o)throw S}try{await p.setTimeout(y,void 0,{signal:h})}catch{return}if(h?.aborted)return;g=Math.min(g*u,c)}}if(m!==nc.UNDEFINED_TOKEN)throw m}});var Em=ge((fW,Sm)=>{var dc=Object.defineProperty,_D=Object.getOwnPropertyDescriptor,wD=Object.getOwnPropertyNames,OD=Object.prototype.hasOwnProperty,RD=(e,t)=>{for(var s in t)dc(e,s,{get:t[s],enumerable:!0})},AD=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of wD(t))!OD.call(e,i)&&i!==s&&dc(e,i,{get:()=>t[i],enumerable:!(u=_D(t,i))||u.enumerable});return e},CD=e=>AD(dc({},"__esModule",{value:!0}),e),pm={};RD(pm,{clearDlx:()=>xD,clearDlxSync:()=>ND,dlxDirExists:()=>kD,dlxDirExistsAsync:()=>LD,ensureDlxDir:()=>DD,ensureDlxDirSync:()=>$D,generateCacheKey:()=>PD,getDlxInstalledPackageDir:()=>nn,getDlxPackageDir:()=>on,getDlxPackageJsonPath:()=>MD,getDlxPackageNodeModulesDir:()=>fm,isDlxPackageInstalled:()=>BD,isDlxPackageInstalledAsync:()=>UD,isInSocketDlx:()=>jD,listDlxPackages:()=>gm,listDlxPackagesAsync:()=>mm,removeDlxPackage:()=>ym,removeDlxPackageSync:()=>vm});Sm.exports=CD(pm);var ID=require("crypto"),Cr=require("fs"),dm=Qr(),sn=ar(),Bt=mi(),TD=hc();function PD(e){return(0,ID.createHash)("sha512").update(e).digest("hex").substring(0,16)}var pc;function ws(){return pc===void 0&&(pc=require("path")),pc}async function xD(){let e=await mm();await(0,TD.pEach)(e,t=>ym(t))}function ND(){let e=gm();for(let t of e)vm(t)}function kD(){return(0,Cr.existsSync)((0,Bt.getSocketDlxDir)())}async function LD(){try{return await Cr.promises.access((0,Bt.getSocketDlxDir)()),!0}catch{return!1}}async function DD(){await Cr.promises.mkdir((0,Bt.getSocketDlxDir)(),{recursive:!0})}function $D(){let{mkdirSync:e}=require("fs");e((0,Bt.getSocketDlxDir)(),{recursive:!0})}function nn(e){return(0,sn.normalizePath)(ws().join(fm(e),e))}function on(e){return(0,sn.normalizePath)(ws().join((0,Bt.getSocketDlxDir)(),e))}function MD(e){return(0,sn.normalizePath)(ws().join(nn(e),"package.json"))}function fm(e){return(0,sn.normalizePath)(ws().join(on(e),"node_modules"))}function jD(e){if(!e)return!1;let t=ws(),s=(0,Bt.getSocketDlxDir)();return t.resolve(e).startsWith(s+t.sep)}function BD(e){return(0,Cr.existsSync)(nn(e))}async function UD(e){try{return await Cr.promises.access(nn(e)),!0}catch{return!1}}function gm(){try{return(0,dm.readDirNamesSync)((0,Bt.getSocketDlxDir)(),{sort:!0})}catch{return[]}}async function mm(){try{return(await Cr.promises.readdir((0,Bt.getSocketDlxDir)(),{withFileTypes:!0})).filter(e=>e.isDirectory()).map(e=>e.name).sort()}catch{return[]}}async function ym(e){let t=on(e);try{await(0,dm.safeDelete)(t,{recursive:!0,force:!0})}catch(s){throw new Error(`Failed to remove DLX package "${e}"`,{cause:s})}}function vm(e){let{rmSync:t}=require("fs"),s=on(e);try{t(s,{recursive:!0,force:!0})}catch(u){let i=u.code;throw i==="EACCES"||i==="EPERM"?new Error(`Permission denied removing DLX package "${e}"
|
|
83
|
+
Directory: ${s}
|
|
84
|
+
To resolve:
|
|
85
|
+
1. Check file/directory permissions
|
|
86
|
+
2. Close any programs using files in this directory
|
|
87
|
+
3. Try running with elevated privileges if necessary
|
|
88
|
+
4. Manually remove: rm -rf "${s}"`,{cause:u}):i==="EROFS"?new Error(`Cannot remove DLX package "${e}" from read-only filesystem
|
|
89
|
+
Directory: ${s}
|
|
90
|
+
The filesystem is mounted read-only.`,{cause:u}):new Error(`Failed to remove DLX package "${e}"
|
|
91
|
+
Directory: ${s}
|
|
92
|
+
Check permissions and ensure no programs are using this directory.`,{cause:u})}}});var fc=ge((gW,Rm)=>{var FD=Object.create,Os=Object.defineProperty,HD=Object.getOwnPropertyDescriptor,GD=Object.getOwnPropertyNames,VD=Object.getPrototypeOf,WD=Object.prototype.hasOwnProperty,bm=(e,t)=>Os(e,"name",{value:t,configurable:!0}),zD=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qD=(e,t)=>{for(var s in t)Os(e,s,{get:t[s],enumerable:!0})},wm=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of GD(t))!WD.call(e,i)&&i!==s&&Os(e,i,{get:()=>t[i],enumerable:!(u=HD(t,i))||u.enumerable});return e},KD=(e,t,s)=>(s=e!=null?FD(VD(e)):{},wm(t||!e||!e.__esModule?Os(s,"default",{value:e,enumerable:!0}):s,e)),JD=e=>wm(Os({},"__esModule",{value:!0}),e),ZD=zD((e,t)=>{"use strict";var s;function u(){return s===void 0&&(s=require("process")),s}bm(u,"getProcess"),t.exports=bm(function(){let i=u();if(i.platform!=="win32")return i.env.TERM!=="linux";let{env:a}=i;if(a.WT_SESSION||a.TERMINUS_SUBLIME||a.ConEmuTask==="{cmd::Cmder}")return!0;let{TERM:c,TERM_PROGRAM:r}=a;return r==="Terminus-Sublime"||r==="vscode"||c==="xterm-256color"||c==="alacritty"||c==="rxvt-unicode"||c==="rxvt-unicode-256color"||a.TERMINAL_EMULATOR==="JetBrains-JediTerm"},"isUnicodeSupported")}),Om={};qD(Om,{default:()=>_m.default,"module.exports":()=>_m.default});Rm.exports=JD(Om);var _m=KD(ZD(),1)});var gc=ge((mW,Am)=>{var XD=Object.defineProperty,YD=(e,t)=>XD(e,"name",{value:t,configurable:!0}),QD=require("tty"),e$=QD?.WriteStream?.prototype?.hasColors?.()??!1,Ce=YD((e,t)=>{if(!e$)return i=>i;let s=`\x1B[${e}m`,u=`\x1B[${t}m`;return i=>{let a=i+"",c=a.indexOf(u);if(c===-1)return s+a+u;let r=s,n=0,o=(t===22?u:"")+s;for(;c!==-1;)r+=a.slice(n,c)+o,n=c+u.length,c=a.indexOf(u,n);return r+=a.slice(n)+u,r}},"format"),Ae={};Ae.reset=Ce(0,0);Ae.bold=Ce(1,22);Ae.dim=Ce(2,22);Ae.italic=Ce(3,23);Ae.underline=Ce(4,24);Ae.overline=Ce(53,55);Ae.inverse=Ce(7,27);Ae.hidden=Ce(8,28);Ae.strikethrough=Ce(9,29);Ae.black=Ce(30,39);Ae.red=Ce(31,39);Ae.green=Ce(32,39);Ae.yellow=Ce(33,39);Ae.blue=Ce(34,39);Ae.magenta=Ce(35,39);Ae.cyan=Ce(36,39);Ae.white=Ce(37,39);Ae.gray=Ce(90,39);Ae.bgBlack=Ce(40,49);Ae.bgRed=Ce(41,49);Ae.bgGreen=Ce(42,49);Ae.bgYellow=Ce(43,49);Ae.bgBlue=Ce(44,49);Ae.bgMagenta=Ce(45,49);Ae.bgCyan=Ce(46,49);Ae.bgWhite=Ce(47,49);Ae.bgGray=Ce(100,49);Ae.redBright=Ce(91,39);Ae.greenBright=Ce(92,39);Ae.yellowBright=Ce(93,39);Ae.blueBright=Ce(94,39);Ae.magentaBright=Ce(95,39);Ae.cyanBright=Ce(96,39);Ae.whiteBright=Ce(97,39);Ae.bgRedBright=Ce(101,49);Ae.bgGreenBright=Ce(102,49);Ae.bgYellowBright=Ce(103,49);Ae.bgBlueBright=Ce(104,49);Ae.bgMagentaBright=Ce(105,49);Ae.bgCyanBright=Ce(106,49);Ae.bgWhiteBright=Ce(107,49);Am.exports=Ae});var Pt=ge((yW,Lm)=>{var t$=Object.create,hn=Object.defineProperty,r$=Object.getOwnPropertyDescriptor,s$=Object.getOwnPropertyNames,i$=Object.getPrototypeOf,n$=Object.prototype.hasOwnProperty,o$=(e,t)=>{for(var s in t)hn(e,s,{get:t[s],enumerable:!0})},Pm=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of s$(t))!n$.call(e,i)&&i!==s&&hn(e,i,{get:()=>t[i],enumerable:!(u=r$(t,i))||u.enumerable});return e},xm=(e,t,s)=>(s=e!=null?t$(i$(e)):{},Pm(t||!e||!e.__esModule?hn(s,"default",{value:e,enumerable:!0}):s,e)),a$=e=>Pm(hn({},"__esModule",{value:!0}),e),Nm={};o$(Nm,{LOG_SYMBOLS:()=>ln,Logger:()=>Ir,incLogCallCountSymbol:()=>Ye,lastWasBlankSymbol:()=>Be,logger:()=>g$});Lm.exports=a$(Nm);var l$=xm(fc()),c$=xm(gc()),Cm=Vt(),an=zt(),Rs=console,mc=Reflect.apply,u$=Reflect.construct,yc;function cn(...e){return yc===void 0&&(yc=require("console").Console),u$(yc,e)}function h$(){return c$.default}var ln=(()=>{let e={__proto__:null},t={__proto__:null},s=()=>{let u=(0,l$.default)(),i=h$();(0,Cm.objectAssign)(e,{fail:i.red(u?"\u2716":"\xD7"),info:i.blue(u?"\u2139":"i"),step:i.cyan(u?"\u2192":">"),success:i.green(u?"\u2714":"\u221A"),warn:i.yellow(u?"\u26A0":"\u203C")}),(0,Cm.objectFreeze)(e);for(let a in t)delete t[a]};for(let u of Reflect.ownKeys(Reflect)){let i=Reflect[u];typeof i=="function"&&(t[u]=(...a)=>(s(),i(...a)))}return new Proxy(e,t)})(),km=["_stderrErrorHandler","_stdoutErrorHandler","assert","clear","count","countReset","createTask","debug","dir","dirxml","error","info","log","table","time","timeEnd","timeLog","trace","warn"].filter(e=>typeof Rs[e]=="function").map(e=>[e,Rs[e].bind(Rs)]),Im={__proto__:null,writable:!0,enumerable:!1,configurable:!0},p$=1e3,un=new WeakMap,Ut=new WeakMap,vc;function d$(){return vc===void 0&&(vc=Object.getOwnPropertySymbols(Rs)),vc}var Ye=Symbol.for("logger.logCallCount++"),Sc;function Ec(){return Sc===void 0&&(Sc=d$().find(e=>e.label==="kGroupIndentWidth")??Symbol("kGroupIndentWidth")),Sc}var Be=Symbol.for("logger.lastWasBlank"),Ir=class e{static LOG_SYMBOLS=ln;#e;#t;#r;#s;#i="";#l="";#c=!1;#h=!1;#n=0;#p;#o;constructor(...t){Ut.set(this,t);let s=t[0];typeof s=="object"&&s!==null?(this.#p={__proto__:null,...s},this.#o=s.stdout):this.#p={__proto__:null}}#u(){f$();let t=un.get(this);if(!t){let s=Ut.get(this)??[];if(s.length)t=cn(...s);else{t=cn({stdout:process.stdout,stderr:process.stderr});for(let{0:u,1:i}of km)t[u]=i}un.set(this,t),Ut.delete(this)}return t}get stderr(){if(!this.#r){let t=Ut.get(this)??[],s=new e(...t);s.#e=this,s.#t="stderr",s.#p={__proto__:null,...this.#p},this.#r=s}return this.#r}get stdout(){if(!this.#s){let t=Ut.get(this)??[],s=new e(...t);s.#e=this,s.#t="stdout",s.#p={__proto__:null,...this.#p},this.#s=s}return this.#s}#a(){return this.#e||this}#f(t){let s=this.#a();return t==="stderr"?s.#i:s.#l}#g(t,s){let u=this.#a();t==="stderr"?u.#i=s:u.#l=s}#b(t){let s=this.#a();return t==="stderr"?s.#c:s.#h}#m(t,s){let u=this.#a();t==="stderr"?u.#c=s:u.#h=s}#R(){return this.#t||"stderr"}#E(t,s,u){let i=this.#u(),a=s.at(0),c=typeof a=="string",r=u||(t==="log"?"stdout":"stderr"),n=this.#f(r),o=c?[(0,an.applyLinePrefix)(a,{prefix:n}),...s.slice(1)]:s;return mc(i[t],i,o),this[Be](c&&(0,an.isBlankString)(o[0]),r),this[Ye](),this}#v(t){return t.replace(/^[✖✗×⚠‼✔✓√ℹ→]\uFE0F?\s*/u,"")}#S(t,s){let u=this.#u(),i=s.at(0),a;typeof i=="string"?(i=this.#v(i),a=s.slice(1)):(a=s,i="");let c=this.#f("stderr");return u.error((0,an.applyLinePrefix)(`${ln[t]} ${i}`,{prefix:c}),...a),this[Be](!1,"stderr"),this[Ye](),this}get logCallCount(){return this.#a().#n}[Ye](){let t=this.#a();return t.#n+=1,this}[Be](t,s){return s?this.#m(s,!!t):this.#t?this.#m(this.#t,!!t):(this.#m("stderr",!!t),this.#m("stdout",!!t)),this}assert(t,...s){return this.#u().assert(t,s[0],...s.slice(1)),this[Be](!1),t?this:this[Ye]()}clearVisible(){if(this.#t)throw new Error("clearVisible() is only available on the main logger instance, not on stream-bound instances");let t=this.#u();return t.clear(),t._stdout.isTTY&&(this[Be](!0),this.#n=0),this}count(t){return this.#u().count(t),this[Be](!1),this[Ye]()}createTask(t){return{run:s=>{this.log(`Starting task: ${t}`);let u=s();return this.log(`Completed task: ${t}`),u}}}dedent(t=2){if(this.#t){let s=this.#f(this.#t);this.#g(this.#t,s.slice(0,-t))}else{let s=this.#f("stderr"),u=this.#f("stdout");this.#g("stderr",s.slice(0,-t)),this.#g("stdout",u.slice(0,-t))}return this}dir(t,s){return this.#u().dir(t,s),this[Be](!1),this[Ye]()}dirxml(...t){return this.#u().dirxml(t),this[Be](!1),this[Ye]()}error(...t){return this.#E("error",t)}errorNewline(){return this.#b("stderr")?this:this.error("")}fail(...t){return this.#S("fail",t)}group(...t){let{length:s}=t;return s&&mc(this.log,this,t),this.indent(this[Ec()]),s&&(this[Be](!1),this[Ye]()),this}groupCollapsed(...t){return mc(this.group,this,t)}groupEnd(){return this.dedent(this[Ec()]),this}indent(t=2){let s=" ".repeat(Math.min(t,p$));if(this.#t){let u=this.#f(this.#t);this.#g(this.#t,u+s)}else{let u=this.#f("stderr"),i=this.#f("stdout");this.#g("stderr",u+s),this.#g("stdout",i+s)}return this}info(...t){return this.#S("info",t)}log(...t){return this.#E("log",t)}logNewline(){return this.#b("stdout")?this:this.log("")}resetIndent(){return this.#t?this.#g(this.#t,""):(this.#g("stderr",""),this.#g("stdout","")),this}step(t,...s){this.#b("stdout")||this.log("");let u=this.#v(t),i=this.#f("stdout");return this.#u().log((0,an.applyLinePrefix)(`${ln.step} ${u}`,{prefix:i}),...s),this[Be](!1,"stdout"),this[Ye](),this}substep(t,...s){let u=` ${t}`;return this.log(u,...s)}success(...t){return this.#S("success",t)}done(...t){return this.#S("success",t)}table(t,s){return this.#u().table(t,s),this[Be](!1),this[Ye]()}timeEnd(t){return this.#u().timeEnd(t),this[Be](!1),this[Ye]()}timeLog(t,...s){return this.#u().timeLog(t,...s),this[Be](!1),this[Ye]()}trace(t,...s){return this.#u().trace(t,...s),this[Be](!1),this[Ye]()}warn(...t){return this.#S("warn",t)}write(t){let s=this.#u(),u=Ut.get(this)??[];return(this.#o||u[0]?.stdout||s._stdout).write(t),this[Be](!1),this}progress(t){let s=this.#u();return(this.#R()==="stderr"?s._stderr:s._stdout).write(`\u2234 ${t}`),this[Be](!1),this}clearLine(){let t=this.#u(),s=this.#R()==="stderr"?t._stderr:t._stdout;return s.isTTY?(s.cursorTo(0),s.clearLine(0)):s.write("\r\x1B[K"),this}},Tm=!1;function f$(){if(Tm)return;Tm=!0;let e=[[Ec(),{...Im,value:2}],[Symbol.toStringTag,{__proto__:null,configurable:!0,value:"logger"}]];for(let{0:t,1:s}of Object.entries(Rs))if(!Ir.prototype[t]&&typeof s=="function"){let{[t]:u}={[t](...i){let a=un.get(this);if(a===void 0){let r=Ut.get(this)??[];if(Ut.delete(this),r.length)a=cn(...r);else{a=cn({stdout:process.stdout,stderr:process.stderr});for(let{0:n,1:o}of km)a[n]=o}un.set(this,a)}let c=a[t](...i);return c===void 0||c===a?this:c}};e.push([t,{...Im,value:u}])}Object.defineProperties(Ir.prototype,Object.fromEntries(e))}var g$=new Ir});var Um=ge((vW,Bm)=>{var Rc=Object.defineProperty,m$=Object.getOwnPropertyDescriptor,y$=Object.getOwnPropertyNames,v$=Object.prototype.hasOwnProperty,S$=(e,t)=>{for(var s in t)Rc(e,s,{get:t[s],enumerable:!0})},E$=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of y$(t))!v$.call(e,i)&&i!==s&&Rc(e,i,{get:()=>t[i],enumerable:!(u=m$(t,i))||u.enumerable});return e},b$=e=>E$(Rc({},"__esModule",{value:!0}),e),Dm={};S$(Dm,{load:()=>w$,onExit:()=>A$,signals:()=>C$,unload:()=>I$});Bm.exports=b$(Dm);var _c=Reflect.apply,Ne=globalThis.process,wc=Ne?.emit,$m=Ne?.platform??"",Oc=Ne?.reallyExit,Mm=$m==="win32",bc;function _$(){return bc===void 0&&(bc=require("events")),bc}var bt;function fn(){if(bt===void 0){if(Ne?.__signal_exit_emitter__)bt=Ne.__signal_exit_emitter__;else if(Ne){let e=_$().EventEmitter;bt=Ne.__signal_exit_emitter__=new e,bt.count=0,bt.emitted={__proto__:null}}bt&&!bt.infinite&&(bt.setMaxListeners(Number.POSITIVE_INFINITY),bt.infinite=!0)}return bt}var pn;function jm(){if(pn===void 0){pn={__proto__:null};let e=fn(),t=Ac();for(let s of t)pn[s]=function(){if((Ne?.listeners(s)||[]).length===e.count){let u=Mm&&s==="SIGHUP"?"SIGINT":s;Ne?.kill(Ne?.pid,u)}}}return pn}var Xt;function Ac(){return Xt===void 0&&(Xt=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],Mm||Xt.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),$m==="linux"&&Xt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),Xt}var dn=!1;function w$(){if(dn||!Ne)return;dn=!0;let e=fn();e.count!==void 0&&(e.count+=1);let t=Ac(),s=jm();Xt=t.filter(u=>{try{return Ne.on(u,s[u]),!0}catch{}return!1}),Ne.emit=O$,Ne.reallyExit=R$}function O$(e,t,...s){if(e==="exit"){let u=t;if(u===void 0){let c=Ne?.exitCode;u=typeof c=="number"?c:void 0}else Ne&&(Ne.exitCode=u);let i=_c(wc,this,[e,u,...s]),a=typeof u=="number"?u:null;return i}return _c(wc,this,[e,t,...s])}function R$(e){let t=e||0;throw Ne&&(Ne.exitCode=t),_c(Oc,Ne,[t]),new Error("processReallyExit should never return")}function A$(e,t){if(!Ne)return function(){};if(typeof e!="function")throw new TypeError("a callback must be provided for exit handler");let{alwaysLast:s}={__proto__:null,...t},u="exit";s&&(u="afterexit");let i=fn();return i.on(u,e),function(){i.removeListener(u,e),!i.listeners("exit").length&&i.listeners("afterexit").length}}function C$(){return Xt}function I$(){if(!dn||!Ne)return;dn=!1;let e=Ac(),t=jm();for(let u of e)try{Ne.removeListener(u,t[u])}catch{}Ne.emit=wc,Oc!==void 0&&(Ne.reallyExit=Oc);let s=fn();s.count!==void 0&&(s.count-=1)}});var Gm=ge((SW,Hm)=>{var Pc=Object.defineProperty,T$=Object.getOwnPropertyDescriptor,P$=Object.getOwnPropertyNames,x$=Object.prototype.hasOwnProperty,N$=(e,t)=>{for(var s in t)Pc(e,s,{get:t[s],enumerable:!0})},k$=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of P$(t))!x$.call(e,i)&&i!==s&&Pc(e,i,{get:()=>t[i],enumerable:!(u=T$(t,i))||u.enumerable});return e},L$=e=>k$(Pc({},"__esModule",{value:!0}),e),Fm={};N$(Fm,{processLock:()=>M$});Hm.exports=L$(Fm);var Ft=require("fs"),Cc=Qr(),Ic=Pt(),D$=hc(),$$=Um(),Tc=class{activeLocks=new Set;touchTimers=new Map;exitHandlerRegistered=!1;ensureExitHandler(){this.exitHandlerRegistered||((0,$$.onExit)(()=>{for(let t of this.touchTimers.values())clearInterval(t);this.touchTimers.clear();for(let t of this.activeLocks)try{(0,Ft.existsSync)(t)&&(0,Cc.safeDeleteSync)(t,{recursive:!0})}catch{}}),this.exitHandlerRegistered=!0)}touchLock(t){try{if((0,Ft.existsSync)(t)){let s=new Date;(0,Ft.utimesSync)(t,s,s)}}catch(s){Ic.logger.warn(`Failed to touch lock ${t}: ${s instanceof Error?s.message:String(s)}`)}}startTouchTimer(t,s){if(s<=0||this.touchTimers.has(t))return;let u=setInterval(()=>{this.touchLock(t)},s);u.unref(),this.touchTimers.set(t,u)}stopTouchTimer(t){let s=this.touchTimers.get(t);s&&(clearInterval(s),this.touchTimers.delete(t))}isStale(t,s){try{if(!(0,Ft.existsSync)(t))return!1;let u=(0,Ft.statSync)(t),i=Math.floor((Date.now()-u.mtime.getTime())/1e3),a=Math.floor(s/1e3);return i>a}catch{return!1}}async acquire(t,s={}){let{baseDelayMs:u=100,maxDelayMs:i=1e3,retries:a=3,staleMs:c=5e3,touchIntervalMs:r=2e3}=s;return this.ensureExitHandler(),await(0,D$.pRetry)(async()=>{try{if((0,Ft.existsSync)(t)&&this.isStale(t,c)){Ic.logger.log(`Removing stale lock: ${t}`);try{(0,Cc.safeDeleteSync)(t,{recursive:!0})}catch{}}return(0,Ft.mkdirSync)(t,{recursive:!1}),this.activeLocks.add(t),this.startTouchTimer(t,r),()=>this.release(t)}catch(n){let o=n.code;if(o==="EEXIST")throw this.isStale(t,c)?new Error(`Stale lock detected: ${t}`):new Error(`Lock already exists: ${t}`);if(o==="EACCES"||o==="EPERM")throw new Error(`Permission denied creating lock: ${t}. Check directory permissions or run with appropriate access.`,{cause:n});if(o==="EROFS")throw new Error(`Cannot create lock on read-only filesystem: ${t}`,{cause:n});if(o==="ENOTDIR"){let l=t.slice(0,t.lastIndexOf("/"));throw new Error(`Cannot create lock directory: ${t}
|
|
93
|
+
A path component is a file when it should be a directory.
|
|
94
|
+
Parent path: ${l}
|
|
95
|
+
To resolve:
|
|
96
|
+
1. Check if "${l}" contains a file instead of a directory
|
|
97
|
+
2. Remove any conflicting files in the path
|
|
98
|
+
3. Ensure the full parent directory structure exists`,{cause:n})}if(o==="ENOENT"){let l=t.slice(0,t.lastIndexOf("/"));throw new Error(`Cannot create lock directory: ${t}
|
|
99
|
+
Parent directory does not exist: ${l}
|
|
100
|
+
To resolve:
|
|
101
|
+
1. Ensure the parent directory "${l}" exists
|
|
102
|
+
2. Create the directory structure: mkdir -p "${l}"
|
|
103
|
+
3. Check filesystem permissions allow directory creation`,{cause:n})}throw new Error(`Failed to acquire lock: ${t}`,{cause:n})}},{retries:a,baseDelayMs:u,maxDelayMs:i,jitter:!0})}release(t){this.stopTouchTimer(t);try{(0,Ft.existsSync)(t)&&(0,Cc.safeDeleteSync)(t,{recursive:!0}),this.activeLocks.delete(t)}catch(s){Ic.logger.warn(`Failed to release lock ${t}: ${s instanceof Error?s.message:String(s)}`)}}async withLock(t,s,u){let i=await this.acquire(t,u);try{return await s()}finally{i()}}},M$=new Tc});var Zm=ge((EW,Jm)=>{var j$=Object.create,yn=Object.defineProperty,B$=Object.getOwnPropertyDescriptor,U$=Object.getOwnPropertyNames,F$=Object.getPrototypeOf,H$=Object.prototype.hasOwnProperty,G$=(e,t)=>{for(var s in t)yn(e,s,{get:t[s],enumerable:!0})},Vm=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of U$(t))!H$.call(e,i)&&i!==s&&yn(e,i,{get:()=>t[i],enumerable:!(u=B$(t,i))||u.enumerable});return e},Wm=(e,t,s)=>(s=e!=null?j$(F$(e)):{},Vm(t||!e||!e.__esModule?yn(s,"default",{value:e,enumerable:!0}):s,e)),V$=e=>Vm(yn({},"__esModule",{value:!0}),e),zm={};G$(zm,{dlxPackage:()=>sM,downloadPackage:()=>qm,executePackage:()=>Km});Jm.exports=V$(zm);var gn=require("fs"),Ht=Wm(require("path")),W$=Fs(),z$=am(),q$=Em(),K$=Wm(rc()),J$=Qr(),mn=ar(),Z$=mi(),X$=Gm(),Y$=Ci(),Q$=/[~^><=xX* ]|\|\|/;function eM(e){if(e.startsWith("@")){let s=e.split("@");return s.length===3?{name:s[1],version:s[2]}:s.length===2?{name:`@${s[1]}`,version:void 0}:{name:`@${s[1]}`,version:s[2]}}let t=e.lastIndexOf("@");return t===-1?{name:e,version:void 0}:{name:e.slice(0,t),version:e.slice(t+1)}}async function tM(e,t,s){let u=(0,q$.generateCacheKey)(t),i=(0,mn.normalizePath)(Ht.default.join((0,Z$.getSocketDlxDir)(),u)),a=(0,mn.normalizePath)(Ht.default.join(i,"node_modules",e));try{await gn.promises.mkdir(i,{recursive:!0})}catch(r){let n=r.code;throw n==="EACCES"||n==="EPERM"?new Error(`Permission denied creating package directory: ${i}
|
|
104
|
+
Please check directory permissions or run with appropriate access.`,{cause:r}):n==="EROFS"?new Error(`Cannot create package directory on read-only filesystem: ${i}
|
|
105
|
+
Ensure the filesystem is writable or set SOCKET_DLX_DIR to a writable location.`,{cause:r}):new Error(`Failed to create package directory: ${i}`,{cause:r})}let c=Ht.default.join(i,"concurrency.lock");return await X$.processLock.withLock(c,async()=>{if(!s&&(0,gn.existsSync)(a)){let n=Ht.default.join(a,"package.json");if((0,gn.existsSync)(n))return{installed:!1,packageDir:i}}let r=(0,z$.getPacoteCachePath)();try{await K$.default.extract(t,a,{cache:r||Ht.default.join(i,".cache")})}catch(n){let o=n.code;throw o==="E404"||o==="ETARGET"?new Error(`Package not found: ${t}
|
|
106
|
+
Verify the package exists on npm registry and check the version.
|
|
107
|
+
Visit https://www.npmjs.com/package/${e} to see available versions.`,{cause:n}):o==="ENOTFOUND"||o==="ETIMEDOUT"||o==="EAI_AGAIN"?new Error(`Network error installing ${t}
|
|
108
|
+
Check your internet connection and try again.`,{cause:n}):new Error(`Failed to install package: ${t}
|
|
109
|
+
Destination: ${a}
|
|
110
|
+
Check npm registry connectivity or package name.`,{cause:n})}return{installed:!0,packageDir:i}},{staleMs:5e3,touchIntervalMs:2e3})}function rM(e,t,s){let u=(0,mn.normalizePath)(Ht.default.join(e,"node_modules",t)),i=Ht.default.join(u,"package.json"),a=(0,J$.readJsonSync)(i).bin,c;if(typeof a=="string")c=a;else if(typeof a=="object"&&a!==null){let r=a,n=Object.keys(r);if(n.length===1)c=r[n[0]];else{let o=t.split("/").pop(),l=[s,o,t.replace(/^@[^/]+\//,"")].filter(Boolean);for(let h of l)if(h&&r[h]){c=r[h];break}!c&&n.length>0&&(c=r[n[0]])}}if(!c)throw new Error(`No binary found for package "${t}"`);return(0,mn.normalizePath)(Ht.default.join(u,c))}async function sM(e,t,s){let u=await qm(t),i=Km(u.binaryPath,e,t?.spawnOptions,s);return{...u,spawnPromise:i}}async function qm(e){let{binaryName:t,force:s,package:u}={__proto__:null,...e},{name:i,version:a}=eM(u),c=a!==void 0&&Q$.test(a),r=s!==void 0?s:c,n=a?`${i}@${a}`:i,{installed:o,packageDir:l}=await tM(i,n,r),h=rM(l,i,t);if(!W$.WIN32&&(0,gn.existsSync)(h)){let{chmodSync:p}=require("fs");try{p(h,493)}catch{}}return{binaryPath:h,installed:o,packageDir:l}}function Km(e,t,s,u){return(0,Y$.spawn)(e,t,s,u)}});var ty=ge((bW,ey)=>{var xc=Object.defineProperty,iM=Object.getOwnPropertyDescriptor,nM=Object.getOwnPropertyNames,oM=Object.prototype.hasOwnProperty,aM=(e,t)=>{for(var s in t)xc(e,s,{get:t[s],enumerable:!0})},lM=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of nM(t))!oM.call(e,i)&&i!==s&&xc(e,i,{get:()=>t[i],enumerable:!(u=iM(t,i))||u.enumerable});return e},cM=e=>lM(xc({},"__esModule",{value:!0}),e),Qm={};aM(Qm,{createEnvProxy:()=>dM,envAsBoolean:()=>fM,envAsNumber:()=>gM,envAsString:()=>mM,findCaseInsensitiveEnvKey:()=>As});ey.exports=cM(Qm);var uM=Number,hM=Number.isFinite,pM=Number.parseInt,Xm=String,Ym=new Set(["APPDATA","COMSPEC","HOME","LOCALAPPDATA","PATH","PATHEXT","PROGRAMFILES","SYSTEMROOT","TEMP","TMP","USERPROFILE","WINDIR"]);function dM(e,t){return new Proxy({},{get(s,u){if(typeof u!="string")return;if(t&&u in t)return t[u];if(u in e)return e[u];let i=u.toUpperCase();if(Ym.has(i)){if(t){let c=As(t,i);if(c!==void 0)return t[c]}let a=As(e,i);if(a!==void 0)return e[a]}},ownKeys(s){return[...new Set([...Object.keys(e),...t?Object.keys(t):[]])]},getOwnPropertyDescriptor(s,u){if(typeof u!="string")return;let i=this.get?.(s,u,s);return i!==void 0?{enumerable:!0,configurable:!0,writable:!0,value:i}:void 0},has(s,u){if(typeof u!="string")return!1;if(t&&u in t||u in e)return!0;let i=u.toUpperCase();return!!(Ym.has(i)&&(t&&As(t,i)!==void 0||As(e,i)!==void 0))},set(s,u,i){return typeof u=="string"&&t?(t[u]=i,!0):!1}})}function fM(e,t=!1){if(typeof e=="string"){let s=e.trim();return s==="1"||s.toLowerCase()==="true"}return e==null?!!t:!!e}function gM(e,t=0){let s=pM(String(e),10);return(hM(s)?s:uM(t))||0}function mM(e,t=""){return typeof e=="string"?e.trim():e==null?t===""?t:Xm(t).trim():Xm(e).trim()}function As(e,t){let s=t.length;for(let u of Object.keys(e))if(u.length===s&&u.toUpperCase()===t)return u}});var kc=ge((_W,sy)=>{var Nc=Object.defineProperty,yM=Object.getOwnPropertyDescriptor,vM=Object.getOwnPropertyNames,SM=Object.prototype.hasOwnProperty,EM=(e,t)=>{for(var s in t)Nc(e,s,{get:t[s],enumerable:!0})},bM=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of vM(t))!SM.call(e,i)&&i!==s&&Nc(e,i,{get:()=>t[i],enumerable:!(u=yM(t,i))||u.enumerable});return e},_M=e=>bM(Nc({},"__esModule",{value:!0}),e),ry={};EM(ry,{getCI:()=>RM});sy.exports=_M(ry);var wM=na(),OM=xt();function RM(){return(0,wM.envAsBoolean)((0,OM.getEnvValue)("CI"))}});var oy=ge((wW,ny)=>{var Lc=Object.defineProperty,AM=Object.getOwnPropertyDescriptor,CM=Object.getOwnPropertyNames,IM=Object.prototype.hasOwnProperty,TM=(e,t)=>{for(var s in t)Lc(e,s,{get:t[s],enumerable:!0})},PM=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of CM(t))!IM.call(e,i)&&i!==s&&Lc(e,i,{get:()=>t[i],enumerable:!(u=AM(t,i))||u.enumerable});return e},xM=e=>PM(Lc({},"__esModule",{value:!0}),e),iy={};TM(iy,{generateSocketSpinnerFrames:()=>NM});ny.exports=xM(iy);function NM(e){let t={__proto__:null,...e}.interval??50,s="\x1B[1m",u="\x1B[2m",i="\x1B[0m",a="\u26A1\uFE0E",c="\u2726\uFE0E",r="\u2727\uFE0E",n="\u22C6\uFE0E";return{__proto__:null,frames:[`${u}${r}${i}`,`${u}${r}${i}`,`${u}${n}${i}`,`${c}${i}`,`${c}${i}`,`${s}${c}${i}`,`${s}${c}${i}`,`${s}${a}${i}`,`${s}${a}${i}`,`${s}${a}${i}`,`${s}${a}${i}`,`${s}${a}${i}`,`${s}${c}${i}`,`${s}${c}${i}`,`${c}${i}`,`${c}${i}`,`${u}${n}${i}`,`${u}${r}${i}`],interval:t}}});var py=ge((OW,hy)=>{var $c=Object.defineProperty,kM=Object.getOwnPropertyDescriptor,LM=Object.getOwnPropertyNames,DM=Object.prototype.hasOwnProperty,$M=(e,t)=>{for(var s in t)$c(e,s,{get:t[s],enumerable:!0})},MM=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of LM(t))!DM.call(e,i)&&i!==s&&$c(e,i,{get:()=>t[i],enumerable:!(u=kM(t,i))||u.enumerable});return e},jM=e=>MM($c({},"__esModule",{value:!0}),e),ay={};$M(ay,{COLOR_INHERIT:()=>FM,DIR_LTR:()=>Cs,DIR_NONE:()=>Dc,DIR_RANDOM:()=>Sn,DIR_RTL:()=>Tr,MODE_BI:()=>uy,applyShimmer:()=>qM});hy.exports=jM(ay);var vn=Fo(),ly=rr(),BM=kc();function UM(e){return{__proto__:null,bold:/\x1b\[1m/.test(e),dim:/\x1b\[2m/.test(e),italic:/\x1b\[3m/.test(e),strikethrough:/\x1b\[9m/.test(e),underline:/\x1b\[4m/.test(e)}}function cy(e){let t="";return e.bold&&(t+="\x1B[1m"),e.dim&&(t+="\x1B[2m"),e.italic&&(t+="\x1B[3m"),e.underline&&(t+="\x1B[4m"),e.strikethrough&&(t+="\x1B[9m"),t}var FM="inherit",Cs="ltr",Dc="none",Sn="random",Tr="rtl",uy="bi";function HM(e,t=2.5){return e>t?0:(1-e/t)**2.5}function GM(e,t,s){let u=Math.round(e[0]+(t[0]-e[0])*s),i=Math.round(e[1]+(t[1]-e[1])*s),a=Math.round(e[2]+(t[2]-e[2])*s);return[u,i,a]}function VM(e,t,s,u,i){let a=Math.abs(t-s),c=HM(a),r=cy(i),n=(0,ly.isArray)(u[0])?u[t%u.length]??[140,82,255]:u;if(c===0){let h=`\x1B[38;2;${n[0]};${n[1]};${n[2]}m`;return`${r}${h}${e}${vn.ANSI_RESET}`}let o=GM(n,[255,255,255],c),l=`\x1B[38;2;${o[0]};${o[1]};${o[2]}m`;return`${r}${l}${e}${vn.ANSI_RESET}`}function WM(e,t,s,u=2.5){let i=e+u+2;return s===Tr?e-t%i:t%i}function zM(e){return e===Sn?Math.random()<.5?Cs:Tr:e===Tr?Tr:Cs}function qM(e,t,s){let u={__proto__:null,...s},i=u.direction??Dc,a=u.shimmerWidth??2.5,c=u.color??[140,82,255],r=u.styles??UM(e),n=(0,vn.stripAnsi)(e);if((0,BM.getCI)()||!n||i===Dc){let p=cy(r),d=(0,ly.isArray)(c[0]);return n.split("").map((g,m)=>{let f=d?c[m%c.length]??[140,82,255]:c,y=`\x1B[38;2;${f[0]};${f[1]};${f[2]}m`;return`${p}${y}${g}${vn.ANSI_RESET}`}).join("")}let o=WM(n.length,t.step,t.currentDir,a),l=n.split("").map((p,d)=>VM(p,d,o,c,r)).join("");t.step+=t.speed;let h=n.length+a+2;return t.mode===uy?t.step>=h&&(t.step=0,t.currentDir=t.currentDir===Cs?Tr:Cs):t.mode===Sn?t.step>=h&&(t.step=0,t.currentDir=zM(Sn)):t.step>=h&&(t.step=0),l}});var vy=ge((RW,yy)=>{var KM=Object.create,Is=Object.defineProperty,JM=Object.getOwnPropertyDescriptor,ZM=Object.getOwnPropertyNames,XM=Object.getPrototypeOf,YM=Object.prototype.hasOwnProperty,_t=(e,t)=>Is(e,"name",{value:t,configurable:!0}),fy=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),QM=(e,t)=>{for(var s in t)Is(e,s,{get:t[s],enumerable:!0})},gy=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ZM(t))!YM.call(e,i)&&i!==s&&Is(e,i,{get:()=>t[i],enumerable:!(u=JM(t,i))||u.enumerable});return e},ej=(e,t,s)=>(s=e!=null?KM(XM(e)):{},gy(t||!e||!e.__esModule?Is(s,"default",{value:e,enumerable:!0}):s,e)),tj=e=>gy(Is({},"__esModule",{value:!0}),e),rj=fy((e,t)=>{var s=require("tty"),u=s?.WriteStream?.prototype?.hasColors?.()??!1,i=_t((c,r)=>{if(!u)return l=>l;let n=`\x1B[${c}m`,o=`\x1B[${r}m`;return l=>{let h=l+"",p=h.indexOf(o);if(p===-1)return n+h+o;let d=n,g=0,m=(r===22?o:"")+n;for(;p!==-1;)d+=h.slice(g,p)+m,g=p+o.length,p=h.indexOf(o,g);return d+=h.slice(g)+o,d}},"format"),a={};a.reset=i(0,0),a.bold=i(1,22),a.dim=i(2,22),a.italic=i(3,23),a.underline=i(4,24),a.overline=i(53,55),a.inverse=i(7,27),a.hidden=i(8,28),a.strikethrough=i(9,29),a.black=i(30,39),a.red=i(31,39),a.green=i(32,39),a.yellow=i(33,39),a.blue=i(34,39),a.magenta=i(35,39),a.cyan=i(36,39),a.white=i(37,39),a.gray=i(90,39),a.bgBlack=i(40,49),a.bgRed=i(41,49),a.bgGreen=i(42,49),a.bgYellow=i(43,49),a.bgBlue=i(44,49),a.bgMagenta=i(45,49),a.bgCyan=i(46,49),a.bgWhite=i(47,49),a.bgGray=i(100,49),a.redBright=i(91,39),a.greenBright=i(92,39),a.yellowBright=i(93,39),a.blueBright=i(94,39),a.magentaBright=i(95,39),a.cyanBright=i(96,39),a.whiteBright=i(97,39),a.bgRedBright=i(101,49),a.bgGreenBright=i(102,49),a.bgYellowBright=i(103,49),a.bgBlueBright=i(104,49),a.bgMagentaBright=i(105,49),a.bgCyanBright=i(106,49),a.bgWhiteBright=i(107,49),t.exports=a}),sj=fy((e,t)=>{"use strict";var s;function u(){return s===void 0&&(s={frames:d()?["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]:["-","\\","|","/"],interval:80}),s}_t(u,"getDefaultSpinner");var i;function a(){if(i===void 0){let y=d(),S=o();i={error:S.red(y?"\u2716":"\xD7"),info:S.blue(y?"\u2139":"i"),success:S.green(y?"\u2714":"\u221A"),warning:S.yellow(y?"\u26A0":"\u203C")}}return i}_t(a,"getLogSymbols");var c;function r(){return c===void 0&&(c=require("process")),c}_t(r,"getProcess");var n;function o(){return n===void 0&&(n={...rj()}),n}_t(o,"getYoctocolors");var l;function h(){if(l===void 0){let{env:y}=r();l=y.TERM!=="dumb"&&!("CI"in y)}return l}_t(h,"isProcessInteractive");var p;function d(){if(p===void 0){let y=r();if(y.platform!=="win32")return p=y.env.TERM!=="linux",p;let{env:S}=y;if(S.WT_SESSION||S.TERMINUS_SUBLIME||S.ConEmuTask==="{cmd::Cmder}")return p=!0,p;let{TERM:E,TERM_PROGRAM:b}=S;p=b==="Terminus-Sublime"||b==="vscode"||E==="xterm-256color"||E==="alacritty"||E==="rxvt-unicode"||E==="rxvt-unicode-256color"||S.TERMINAL_EMULATOR==="JetBrains-JediTerm"}return p}_t(d,"isUnicodeSupported");var g;function m(y){return g===void 0&&(g=require("util").stripVTControlCharacters),g(y)}_t(m,"stripVTControlCharacters");var f=class{static{_t(this,"YoctoSpinner")}#e;#t=-1;#r;#s;#i="";#l;#c;#h=!1;#n=0;#p=0;#o;#u;#a;constructor(y={}){let S={__proto__:null,...y},E=S.spinner??u(),b=S.stream??r().stderr;this.#s=E.frames,this.#l=E.interval,this.#u=y.text??"",this.#o=b??process.stderr,this.#e=y.color??"cyan",this.#c=!!b.isTTY&&h(),this.#r=this.#f.bind(this)}#f(y){this.isSpinning&&this.stop();let S=y==="SIGINT"?130:y==="SIGTERM"?143:1;process.exit(S)}#g(){this.#c&&this.#S("\x1B[?25l")}#b(y){let S=this.#o.columns??80,E=m(y).split(`
|
|
111
|
+
`),b=0;for(let _ of E)b+=Math.max(1,Math.ceil(_.length/S));return b}#m(){let y=Date.now();(this.#t===-1||y-this.#n>=this.#l)&&(this.#t=++this.#t%this.#s.length,this.#n=y);let S=o(),E=S[this.#e]??S.cyan,b=this.#s[this.#t],_=`${E(b)} ${this.#u}`;_&&(this.#i.length&&(_=`${this.#i}${_}`),this.#c||(_+=`
|
|
112
|
+
`)),this.clear(),this.#S(_),this.#c&&(this.#p=this.#b(_))}#R(){this.#c&&this.#S("\x1B[?25h")}#E(){process.once("SIGINT",this.#r),process.once("SIGTERM",this.#r)}#v(y,S){let E=a();return this.stop(`${E[y]} ${S??this.#u}`)}#S(y){this.#o.write(y)}#O(){process.off("SIGINT",this.#r),process.off("SIGTERM",this.#r)}get color(){return this.#e}set color(y){this.#e=y,this.#m()}get isSpinning(){return this.#h}get text(){return this.#u}set text(y){this.#u=y??"",this.#m()}clear(){if(!this.#c)return this;this.#o.cursorTo(0);for(let y=0;y<this.#p;y++)y>0&&this.#o.moveCursor(0,-1),this.#o.clearLine(1);return this.#p=0,this}dedent(y=2){return this.#i=this.#i.slice(0,-y),this}error(y){return this.#v("error",y)}indent(y=2){return this.#i+=" ".repeat(y),this}info(y){return this.#v("info",y)}resetIndent(){return this.#i="",this}start(y){return y&&(this.#u=y),this.isSpinning?this:(this.#h=!0,this.#g(),this.#m(),this.#E(),this.#c&&(this.#a=setInterval(()=>{this.#m()},this.#l)),this)}stop(y){return this.isSpinning?(this.#h=!1,this.#a&&(clearInterval(this.#a),this.#a=void 0),this.#R(),this.clear(),this.#O(),y&&this.#S(`${this.#i}${y}
|
|
113
|
+
`),this):this}success(y){return this.#v("success",y)}warning(y){return this.#v("warning",y)}};t.exports=_t(function(y){return new f(y)},"yoctoSpinner")}),my={};QM(my,{default:()=>dy.default,"module.exports":()=>dy.default});yy.exports=tj(my);var dy=ej(sj(),1)});var by=ge((CW,Ey)=>{var Mc=Object.defineProperty,ij=Object.getOwnPropertyDescriptor,nj=Object.getOwnPropertyNames,oj=Object.prototype.hasOwnProperty,aj=(e,t)=>{for(var s in t)Mc(e,s,{get:t[s],enumerable:!0})},lj=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of nj(t))!oj.call(e,i)&&i!==s&&Mc(e,i,{get:()=>t[i],enumerable:!(u=ij(t,i))||u.enumerable});return e},cj=e=>lj(Mc({},"__esModule",{value:!0}),e),Sy={};aj(Sy,{getDebug:()=>hj});Ey.exports=cj(Sy);var uj=xt();function hj(){return(0,uj.getEnvValue)("DEBUG")}});var wy=ge((IW,jc)=>{var pj=Object.defineProperty,Ie=(e,t)=>pj(e,"name",{value:t,configurable:!0}),Pr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),dj=Pr((e,t)=>{var s=1e3,u=s*60,i=u*60,a=i*24,c=a*7,r=a*365.25;t.exports=function(p,d){d=d||{};var g=typeof p;if(g==="string"&&p.length>0)return n(p);if(g==="number"&&isFinite(p))return d.long?l(p):o(p);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))};function n(p){if(p=String(p),!(p.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(p);if(d){var g=parseFloat(d[1]),m=(d[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return g*r;case"weeks":case"week":case"w":return g*c;case"days":case"day":case"d":return g*a;case"hours":case"hour":case"hrs":case"hr":case"h":return g*i;case"minutes":case"minute":case"mins":case"min":case"m":return g*u;case"seconds":case"second":case"secs":case"sec":case"s":return g*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}Ie(n,"parse");function o(p){var d=Math.abs(p);return d>=a?Math.round(p/a)+"d":d>=i?Math.round(p/i)+"h":d>=u?Math.round(p/u)+"m":d>=s?Math.round(p/s)+"s":p+"ms"}Ie(o,"fmtShort");function l(p){var d=Math.abs(p);return d>=a?h(p,d,a,"day"):d>=i?h(p,d,i,"hour"):d>=u?h(p,d,u,"minute"):d>=s?h(p,d,s,"second"):p+" ms"}Ie(l,"fmtLong");function h(p,d,g,m){var f=d>=g*1.5;return Math.round(p/g)+" "+m+(f?"s":"")}Ie(h,"plural")}),_y=Pr((e,t)=>{function s(u){a.debug=a,a.default=a,a.coerce=h,a.disable=o,a.enable=r,a.enabled=l,a.humanize=dj(),a.destroy=p,Object.keys(u).forEach(d=>{a[d]=u[d]}),a.names=[],a.skips=[],a.formatters={};function i(d){let g=0;for(let m=0;m<d.length;m++)g=(g<<5)-g+d.charCodeAt(m),g|=0;return a.colors[Math.abs(g)%a.colors.length]}Ie(i,"selectColor"),a.selectColor=i;function a(d){let g,m=null,f,y;function S(...E){if(!S.enabled)return;let b=S,_=Number(new Date),O=_-(g||_);b.diff=O,b.prev=g,b.curr=_,g=_,E[0]=a.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let w=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(A,I)=>{if(A==="%%")return"%";w++;let P=a.formatters[I];if(typeof P=="function"){let L=E[w];A=P.call(b,L),E.splice(w,1),w--}return A}),a.formatArgs.call(b,E),(b.log||a.log).apply(b,E)}return Ie(S,"debug"),S.namespace=d,S.useColors=a.useColors(),S.color=a.selectColor(d),S.extend=c,S.destroy=a.destroy,Object.defineProperty(S,"enabled",{enumerable:!0,configurable:!1,get:Ie(()=>m!==null?m:(f!==a.namespaces&&(f=a.namespaces,y=a.enabled(d)),y),"get"),set:Ie(E=>{m=E},"set")}),typeof a.init=="function"&&a.init(S),S}Ie(a,"createDebug");function c(d,g){let m=a(this.namespace+(typeof g>"u"?":":g)+d);return m.log=this.log,m}Ie(c,"extend");function r(d){a.save(d),a.namespaces=d,a.names=[],a.skips=[];let g=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of g)m[0]==="-"?a.skips.push(m.slice(1)):a.names.push(m)}Ie(r,"enable");function n(d,g){let m=0,f=0,y=-1,S=0;for(;m<d.length;)if(f<g.length&&(g[f]===d[m]||g[f]==="*"))g[f]==="*"?(y=f,S=m,f++):(m++,f++);else if(y!==-1)f=y+1,S++,m=S;else return!1;for(;f<g.length&&g[f]==="*";)f++;return f===g.length}Ie(n,"matchesTemplate");function o(){let d=[...a.names,...a.skips.map(g=>"-"+g)].join(",");return a.enable(""),d}Ie(o,"disable");function l(d){for(let g of a.skips)if(n(d,g))return!1;for(let g of a.names)if(n(d,g))return!0;return!1}Ie(l,"enabled");function h(d){return d instanceof Error?d.stack||d.message:d}Ie(h,"coerce");function p(){}return Ie(p,"destroy"),a.enable(a.load()),a}Ie(s,"setup"),t.exports=s}),fj=Pr((e,t)=>{e.formatArgs=u,e.save=i,e.load=a,e.useColors=s,e.storage=c(),e.destroy=(()=>{let n=!1;return()=>{n||(n=!0)}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function s(){let n;return!1}Ie(s,"useColors");function u(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let o="color: "+this.color;n.splice(1,0,o,"color: inherit");let l=0,h=0;n[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(l++,p==="%c"&&(h=l))}),n.splice(h,0,o)}Ie(u,"formatArgs"),e.log=console.debug||console.log||(()=>{});function i(n){try{n?e.storage.setItem("debug",n):e.storage.removeItem("debug")}catch{}}Ie(i,"save");function a(){let n;try{n=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=void 0),n}Ie(a,"load");function c(){try{return}catch{}}Ie(c,"localstorage"),t.exports=_y()(e);var{formatters:r}=t.exports;r.j=function(n){try{return JSON.stringify(n)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}}}),gj=Pr((e,t)=>{"use strict";t.exports=(s,u=process.argv)=>{let i=s.startsWith("-")?"":s.length===1?"-":"--",a=u.indexOf(i+s),c=u.indexOf("--");return a!==-1&&(c===-1||a<c)}}),mj=Pr((e,t)=>{"use strict";var s=require("os"),u=require("tty"),i=gj(),{env:a}=process,c;i("no-color")||i("no-colors")||i("color=false")||i("color=never")?c=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(c=1),"FORCE_COLOR"in a&&(a.FORCE_COLOR==="true"?c=1:a.FORCE_COLOR==="false"?c=0:c=a.FORCE_COLOR.length===0?1:Math.min(parseInt(a.FORCE_COLOR,10),3));function r(l){return l===0?!1:{level:l,hasBasic:!0,has256:l>=2,has16m:l>=3}}Ie(r,"translateLevel");function n(l,h){if(c===0)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(l&&!h&&c===void 0)return 0;let p=c||0;if(a.TERM==="dumb")return p;if(process.platform==="win32"){let d=s.release().split(".");return Number(d[0])>=10&&Number(d[2])>=10586?Number(d[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(d=>d in a)||a.CI_NAME==="codeship"?1:p;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if(a.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in a){let d=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return d>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:p}Ie(n,"supportsColor");function o(l){let h=n(l,l&&l.isTTY);return r(h)}Ie(o,"getSupportLevel"),t.exports={supportsColor:o,stdout:r(n(!0,u.isatty(1))),stderr:r(n(!0,u.isatty(2)))}}),yj=Pr((e,t)=>{var s=require("tty"),u=require("util");e.init=l,e.log=r,e.formatArgs=a,e.save=n,e.load=o,e.useColors=i,e.destroy=u.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{let p=mj();p&&(p.stderr||p).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(p=>/^debug_/i.test(p)).reduce((p,d)=>{let g=d.substring(6).toLowerCase().replace(/_([a-z])/g,(f,y)=>y.toUpperCase()),m=process.env[d];return/^(yes|on|true|enabled)$/i.test(m)?m=!0:/^(no|off|false|disabled)$/i.test(m)?m=!1:m==="null"?m=null:m=Number(m),p[g]=m,p},{});function i(){return"colors"in e.inspectOpts?!!e.inspectOpts.colors:s.isatty(process.stderr.fd)}Ie(i,"useColors");function a(p){let{namespace:d,useColors:g}=this;if(g){let m=this.color,f="\x1B[3"+(m<8?m:"8;5;"+m),y=` ${f};1m${d} \x1B[0m`;p[0]=y+p[0].split(`
|
|
114
|
+
`).join(`
|
|
115
|
+
`+y),p.push(f+"m+"+t.exports.humanize(this.diff)+"\x1B[0m")}else p[0]=c()+d+" "+p[0]}Ie(a,"formatArgs");function c(){return e.inspectOpts.hideDate?"":new Date().toISOString()+" "}Ie(c,"getDate");function r(...p){return process.stderr.write(u.formatWithOptions(e.inspectOpts,...p)+`
|
|
116
|
+
`)}Ie(r,"log");function n(p){p?process.env.DEBUG=p:delete void 0}Ie(n,"save");function o(){}Ie(o,"load");function l(p){p.inspectOpts={};let d=Object.keys(e.inspectOpts);for(let g=0;g<d.length;g++)p.inspectOpts[d[g]]=e.inspectOpts[d[g]]}Ie(l,"init"),t.exports=_y()(e);var{formatters:h}=t.exports;h.o=function(p){return this.inspectOpts.colors=this.useColors,u.inspect(p,this.inspectOpts).split(`
|
|
117
|
+
`).map(d=>d.trim()).join(" ")},h.O=function(p){return this.inspectOpts.colors=this.useColors,u.inspect(p,this.inspectOpts)}});typeof process>"u"||process.type==="renderer"||process.__nwjs?jc.exports=fj():jc.exports=yj()});var Fc=ge((TW,ky)=>{var vj=Object.create,En=Object.defineProperty,Sj=Object.getOwnPropertyDescriptor,Ej=Object.getOwnPropertyNames,bj=Object.getPrototypeOf,_j=Object.prototype.hasOwnProperty,wj=(e,t)=>{for(var s in t)En(e,s,{get:t[s],enumerable:!0})},Ay=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ej(t))!_j.call(e,i)&&i!==s&&En(e,i,{get:()=>t[i],enumerable:!(u=Sj(t,i))||u.enumerable});return e},Cy=(e,t,s)=>(s=e!=null?vj(bj(e)):{},Ay(t||!e||!e.__esModule?En(s,"default",{value:e,enumerable:!0}):s,e)),Oj=e=>Ay(En({},"__esModule",{value:!0}),e),Iy={};wj(Iy,{debug:()=>xj,debugCache:()=>Tj,debugCacheNs:()=>Ij,debugDir:()=>Nj,debugDirNs:()=>Py,debugLog:()=>kj,debugLogNs:()=>Ny,debugNs:()=>xy,debuglog:()=>Dj,debugtime:()=>$j,isDebug:()=>Lj,isDebugNs:()=>Pj});ky.exports=Oj(Iy);var bn=tr(),Rj=by(),Ts=aa(),Ps=Cy(fc()),wt=Cy(wy()),Ot=Pt(),Aj=Vt(),Ty=zt(),_n=Reflect.apply,Oy=new Map;function Ry(e){let t=Oy.get(e);return t||(!(0,Rj.getDebug)()&&(0,Ts.getSocketDebug)()&&(e==="error"||e==="notice")&&wt.default.enable(e),t=(0,wt.default)(e),t.log=Cj,Oy.set(e,t),t)}var Bc;function Uc(){return Bc===void 0&&(Bc=require("util")),Bc}function xr(e=3){let t="",s=Error.captureStackTrace;if(typeof s=="function"){let u={};s(u,xr);let i=u.stack;if(typeof i=="string"){let a=0,c=0;for(let r=0,{length:n}=i;r<n;r+=1)if(i[r]===`
|
|
118
|
+
`)if(a+=1,a<e)c=r+1;else{let o=i.slice(c,r).trimStart(),l=/(?<=^at\s+).*?(?=\s+\(|$)/.exec(o)?.[0];if(l&&(t=l.replace(/^(?:async|bound|get|new|set)\s+/,""),t.startsWith("Object."))){let h=t.slice(7);(0,Aj.hasOwn)(Object,h)||(t=h)}break}}}return t}function Cj(...e){let t=Uc(),s=wt.default.inspectOpts?{...wt.default.inspectOpts,showHidden:wt.default.inspectOpts.showHidden===null?void 0:wt.default.inspectOpts.showHidden,depth:wt.default.inspectOpts.depth===null||typeof wt.default.inspectOpts.depth=="boolean"?void 0:wt.default.inspectOpts.depth}:{};_n(Ot.logger.info,Ot.logger,[t.formatWithOptions(s,...e)])}function wn(e){return e!==null&&typeof e=="object"?{__proto__:null,...e}:{__proto__:null,namespaces:e}}function xs(e){if(!(0,Ts.getSocketDebug)())return!1;if(typeof e!="string"||!e||e==="*")return!0;let t=e.trim().replace(/\s+/g,",").split(",").filter(Boolean),s=[],u=[];for(let i of t)i.startsWith("-")?u.push(i.slice(1)):s.push(i);return s.length&&!s.some(i=>Ry(i).enabled)?!1:u.every(i=>!Ry(i).enabled)}function Py(e,t,s){let u=wn(e),{namespaces:i}=u;if(!xs(i))return;let a=xr(4)||"anonymous";He===void 0&&(He=(0,Ps.default)()?"\u25B8":">");let c=s;if(c===void 0){let o=wt.default.inspectOpts;o&&(c={...o,showHidden:o.showHidden===null?void 0:o.showHidden,depth:o.depth===null||typeof o.depth=="boolean"?null:o.depth})}let r=u.spinner||(0,bn.getSpinner)(),n=r?.isSpinning;r?.stop(),Ot.logger.info(`[DEBUG] ${a} ${He} object inspection:`),Ot.logger.dir(t,s),n&&r?.start()}var He;function xy(e,...t){let s=wn(e),{namespaces:u}=s;if(!xs(u))return;let i=xr(4)||"anonymous";He===void 0&&(He=(0,Ps.default)()?"\u25B8":">");let a=t.at(0),c=typeof a=="string"?[(0,Ty.applyLinePrefix)(`${i?`${i} ${He} `:""}${a}`,{prefix:"[DEBUG] "}),...t.slice(1)]:t,r=s.spinner||(0,bn.getSpinner)(),n=r?.isSpinning;r?.stop(),_n(Ot.logger.info,Ot.logger,c),n&&r?.start()}function Ny(e,...t){let s=wn(e),{namespaces:u}=s;if(!xs(u))return;let i=xr(4)||"anonymous";He===void 0&&(He=(0,Ps.default)()?"\u25B8":">");let a=t.at(0),c=typeof a=="string"?[(0,Ty.applyLinePrefix)(`${i?`${i} ${He} `:""}${a}`,{prefix:"[DEBUG] "}),...t.slice(1)]:[`[DEBUG] ${i} ${He}`,...t],r=s.spinner||(0,bn.getSpinner)(),n=r?.isSpinning;r?.stop(),_n(Ot.logger.info,Ot.logger,c),n&&r?.start()}function Ij(e,t,s,u){let i=wn(e),{namespaces:a}=i;if(!xs(a))return;let c=xr(4)||"cache";He===void 0&&(He=(0,Ps.default)()?"\u25B8":">");let r=`[CACHE] ${c} ${He} ${t}: ${s}`,n=u!==void 0?[r,u]:[r],o=i.spinner||(0,bn.getSpinner)(),l=o?.isSpinning;o?.stop(),_n(Ot.logger.info,Ot.logger,n),l&&o?.start()}function Tj(e,t,s){if(!(0,Ts.getSocketDebug)())return;let u=xr(3)||"cache";He===void 0&&(He=(0,Ps.default)()?"\u25B8":">");let i=`[CACHE] ${u} ${He} ${e}: ${t}`;console.log(...s!==void 0?[i,s]:[i])}function Pj(e){return!!(0,Ts.getSocketDebug)()&&xs(e)}function xj(...e){xy("*",...e)}function Nj(e,t){Py("*",e,t)}function kj(...e){Ny("*",...e)}function Lj(){return!!(0,Ts.getSocketDebug)()}function Dj(e){return Uc().debuglog(e)}function $j(e){let t=Uc(),s,u=()=>{if(s===void 0)s=Date.now();else{let i=Date.now()-s;t.debuglog("time")(`${e}: ${i}ms`),s=void 0}};return u.start=()=>{s=Date.now()},u.end=()=>{if(s!==void 0){let i=Date.now()-s;t.debuglog("time")(`${e}: ${i}ms`),s=void 0}},u}});var Gy=ge((PW,Hy)=>{var Mj=Object.create,Cn=Object.defineProperty,jj=Object.getOwnPropertyDescriptor,Bj=Object.getOwnPropertyNames,Uj=Object.getPrototypeOf,Fj=Object.prototype.hasOwnProperty,Hj=(e,t)=>{for(var s in t)Cn(e,s,{get:t[s],enumerable:!0})},My=(e,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Bj(t))!Fj.call(e,i)&&i!==s&&Cn(e,i,{get:()=>t[i],enumerable:!(u=jj(t,i))||u.enumerable});return e},Gj=(e,t,s)=>(s=e!=null?Mj(Uj(e)):{},My(t||!e||!e.__esModule?Cn(s,"default",{value:e,enumerable:!0}):s,e)),Vj=e=>My(Cn({},"__esModule",{value:!0}),e),jy={};Hj(jy,{Spinner:()=>Gc,ciSpinner:()=>Uy,getCliSpinners:()=>Fy,getDefaultSpinner:()=>Xj,spinner:()=>Yj,withSpinner:()=>Qj,withSpinnerRestore:()=>eB,withSpinnerSync:()=>tB});Hy.exports=Vj(jy);var Wj=kc(),zj=oy(),Ke=py(),By=Gj(vy()),qj=Vt(),Ly=zt(),Kj={__proto__:null,black:[0,0,0],blue:[0,0,255],blueBright:[100,149,237],cyan:[0,255,255],cyanBright:[0,255,255],gray:[128,128,128],green:[0,128,0],greenBright:[0,255,0],magenta:[255,0,255],magentaBright:[255,105,180],red:[255,0,0],redBright:[255,69,0],white:[255,255,255],whiteBright:[255,255,255],yellow:[255,255,0],yellowBright:[255,255,153]};function An(e){return Array.isArray(e)}function On(e){return An(e)?e:Kj[e]}var Uy={frames:[""],interval:2147483647};function Rn(e){return{__proto__:null,configurable:!0,value:e,writable:!0}}function Dy(e){return typeof e=="string"?e.trimStart():""}function Jj(e){let{current:t,total:s,unit:u}=e,i=Math.round(t/s*100),a=Zj(i),c=u?`${t}/${s} ${u}`:`${t}/${s}`;return`${a} ${i}% (${c})`}function Zj(e,t=20){let s=Math.round(e/100*t),u=t-s,i="\u2588".repeat(s)+"\u2591".repeat(u);return gc().cyan(i)}var Nr;function Fy(e){return Nr===void 0&&(Nr={__proto__:null,...(0,By.default)({}).constructor.spinners,socket:(0,zj.generateSocketSpinnerFrames)()}),typeof e=="string"&&Nr?(0,qj.hasOwn)(Nr,e)?Nr[e]:void 0:Nr}var Gt,$y;function Gc(e){if(Gt===void 0){let t=(0,By.default)({}).constructor;Gt=class extends t{#e="";#t="";#r;#s;#i;constructor(s){let u={__proto__:null,...s},i=u.color??[140,82,255];if(An(i)&&(i.length!==3||!i.every(r=>typeof r=="number"&&r>=0&&r<=255)))throw new TypeError("RGB color must be an array of 3 numbers between 0 and 255");let a=On(i),c;if(u.shimmer){let r,n,o=.3333333333333333;if(typeof u.shimmer=="string")r=u.shimmer;else{let l={__proto__:null,...u.shimmer};r=l.dir??Ke.DIR_LTR,n=l.color??Ke.COLOR_INHERIT,o=l.speed??1/3}c={__proto__:null,color:n===void 0?Ke.COLOR_INHERIT:n,currentDir:Ke.DIR_LTR,mode:r,speed:o,step:0}}super({signal:tr().getAbortSignal(),...u,color:a,onRenderFrame:(r,n,o)=>{let l=(0,Ly.stringWidth)(r)===1?" ":" ";return r?`${o(r)}${l}${n}`:n},onFrameUpdate:c?()=>{this.#e&&(super.text=this.#c())}:void 0}),this.#s=c,this.#i=c}get color(){let s=super.color;return An(s)?s:On(s)}set color(s){super.color=An(s)?s:On(s)}#l(s,u){let i,a=u.at(0);typeof a=="string"?i=u.slice(1):(i=u,a="");let c=this.isSpinning,r=Dy(a);super[s](r);let{incLogCallCountSymbol:n,lastWasBlankSymbol:o,logger:l}=Pt();return s==="stop"?c&&r&&(l[o]((0,Ly.isBlankString)(r)),l[n]()):(l[o](!1),l[n]()),i.length&&(l.log(...i),l[o](!1)),this}#c(){let s=this.#e;if(this.#r){let u=Jj(this.#r);s=s?`${s} ${u}`:u}if(s&&this.#s){let u;this.#s.color===Ke.COLOR_INHERIT?u=this.color:Array.isArray(this.#s.color[0])?u=this.#s.color:u=On(this.#s.color),s=(0,Ke.applyShimmer)(s,this.#s,{color:u,direction:this.#s.mode})}return this.#t&&s&&(s=this.#t+s),s}#h(s,u){let i=u.at(0),a;typeof i=="string"?a=u.slice(1):(a=u,i="");let{LOG_SYMBOLS:c,logger:r}=Pt();return r.error(`${c[s]} ${i}`,...a),this}#n(){super.text=this.#c()}debug(s,...u){let{isDebug:i}=Fc();return i()?this.#h("info",[s,...u]):this}debugAndStop(s,...u){let{isDebug:i}=Fc();return i()?this.#l("info",[s,...u]):this}dedent(s){if(s===0)this.#t="";else{let u=s??2,i=Math.max(0,this.#t.length-u);this.#t=this.#t.slice(0,i)}return this.#n(),this}done(s,...u){return this.#h("success",[s,...u])}doneAndStop(s,...u){return this.#l("success",[s,...u])}fail(s,...u){return this.#h("fail",[s,...u])}failAndStop(s,...u){return this.#l("error",[s,...u])}indent(s){if(s===0)this.#t="";else{let u=s??2;this.#t+=" ".repeat(u)}return this.#n(),this}info(s,...u){return this.#h("info",[s,...u])}infoAndStop(s,...u){return this.#l("info",[s,...u])}log(...s){let{logger:u}=Pt();return u.log(...s),this}logAndStop(s,...u){return this.#l("stop",[s,...u])}progress=(s,u,i)=>(this.#r={__proto__:null,current:s,total:u,...i?{unit:i}:{}},this.#n(),this);progressStep(s=1){if(this.#r){let u=this.#r.current+s;this.#r={__proto__:null,current:Math.max(0,Math.min(u,this.#r.total)),total:this.#r.total,...this.#r.unit?{unit:this.#r.unit}:{}},this.#n()}return this}start(...s){if(s.length){let u=s.at(0),i=Dy(u);i?this.#e=i:(this.#e="",super.text="")}return this.#n(),this.#l("start",s)}step(s,...u){let{logger:i}=Pt();return typeof s=="string"&&(i.error(""),i.error(s,...u)),this}substep(s,...u){if(typeof s=="string"){let{logger:i}=Pt();i.error(` ${s}`,...u)}return this}stop(...s){this.#e="",this.#r=void 0,this.#s&&(this.#s.currentDir=Ke.DIR_LTR,this.#s.step=0);let u=this.#l("stop",s);return super.text="",u}success(s,...u){return this.#h("success",[s,...u])}successAndStop(s,...u){return this.#l("success",[s,...u])}text(s){return arguments.length===0?this.#e:(this.#e=s??"",this.#n(),this)}warn(s,...u){return this.#h("warn",[s,...u])}warnAndStop(s,...u){return this.#l("warning",[s,...u])}shimmer(s){if(s===!1)this.#s=void 0;else if(s===!0)this.#i?this.#s={...this.#i}:(this.#s={color:Ke.COLOR_INHERIT,currentDir:Ke.DIR_LTR,mode:Ke.DIR_LTR,speed:1/3,step:0},this.#i=this.#s);else if(typeof s=="string")this.#s?(this.#s={...this.#s,mode:s},this.#i=this.#s):this.#i?(this.#s={...this.#i,mode:s},this.#i=this.#s):(this.#s={color:Ke.COLOR_INHERIT,currentDir:Ke.DIR_LTR,mode:s,speed:1/3,step:0},this.#i=this.#s);else if(s&&typeof s=="object"){let u={__proto__:null,...s};this.#s?(this.#s={...this.#s,...u.color!==void 0?{color:u.color}:{},...u.dir!==void 0?{mode:u.dir}:{},...u.speed!==void 0?{speed:u.speed}:{}},this.#i=this.#s):this.#i?(this.#s={...this.#i,...u.color!==void 0?{color:u.color}:{},...u.dir!==void 0?{mode:u.dir}:{},...u.speed!==void 0?{speed:u.speed}:{}},this.#i=this.#s):(this.#s={color:u.color??Ke.COLOR_INHERIT,currentDir:Ke.DIR_LTR,mode:u.dir??Ke.DIR_LTR,speed:u.speed??1/3,step:0},this.#i=this.#s)}return this.#n(),this}},Object.defineProperties(Gt.prototype,{error:Rn(Gt.prototype.fail),errorAndStop:Rn(Gt.prototype.failAndStop),warning:Rn(Gt.prototype.warn),warningAndStop:Rn(Gt.prototype.warnAndStop)}),$y=(0,Wj.getCI)()?Uy:Fy("socket")}return new Gt({spinner:$y,...e})}var Hc;function Xj(){return Hc===void 0&&(Hc=Gc()),Hc}var Yj=(()=>{let e;return new Proxy({},{get(t,s){e===void 0&&(e=Gc());let u=e[s];return typeof u=="function"?u.bind(e):u}})})();async function Qj(e){let{message:t,operation:s,spinner:u}={__proto__:null,...e};if(!u)return await s();u.start(t);try{return await s()}finally{u.stop()}}async function eB(e){let{operation:t,spinner:s,wasSpinning:u}={__proto__:null,...e};try{return await t()}finally{s&&u&&s.start()}}function tB(e){let{message:t,operation:s,spinner:u}={__proto__:null,...e};if(!u)return s();u.start(t);try{return s()}finally{u.stop()}}});var Ns=ge((NW,Vy)=>{"use strict";var rB="2.0.0",sB=Number.MAX_SAFE_INTEGER||9007199254740991,iB=16,nB=250,oB=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Vy.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:iB,MAX_SAFE_BUILD_LENGTH:nB,MAX_SAFE_INTEGER:sB,RELEASE_TYPES:oB,SEMVER_SPEC_VERSION:rB,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var ks=ge((kW,Wy)=>{"use strict";var aB=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};Wy.exports=aB});var kr=ge((Rt,zy)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Vc,MAX_SAFE_BUILD_LENGTH:lB,MAX_LENGTH:cB}=Ns(),uB=ks();Rt=zy.exports={};var hB=Rt.re=[],pB=Rt.safeRe=[],be=Rt.src=[],dB=Rt.safeSrc=[],_e=Rt.t={},fB=0,Wc="[a-zA-Z0-9-]",gB=[["\\s",1],["\\d",cB],[Wc,lB]],mB=e=>{for(let[t,s]of gB)e=e.split(`${t}*`).join(`${t}{0,${s}}`).split(`${t}+`).join(`${t}{1,${s}}`);return e},Re=(e,t,s)=>{let u=mB(t),i=fB++;uB(e,i,t),_e[e]=i,be[i]=t,dB[i]=u,hB[i]=new RegExp(t,s?"g":void 0),pB[i]=new RegExp(u,s?"g":void 0)};Re("NUMERICIDENTIFIER","0|[1-9]\\d*");Re("NUMERICIDENTIFIERLOOSE","\\d+");Re("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Wc}*`);Re("MAINVERSION",`(${be[_e.NUMERICIDENTIFIER]})\\.(${be[_e.NUMERICIDENTIFIER]})\\.(${be[_e.NUMERICIDENTIFIER]})`);Re("MAINVERSIONLOOSE",`(${be[_e.NUMERICIDENTIFIERLOOSE]})\\.(${be[_e.NUMERICIDENTIFIERLOOSE]})\\.(${be[_e.NUMERICIDENTIFIERLOOSE]})`);Re("PRERELEASEIDENTIFIER",`(?:${be[_e.NONNUMERICIDENTIFIER]}|${be[_e.NUMERICIDENTIFIER]})`);Re("PRERELEASEIDENTIFIERLOOSE",`(?:${be[_e.NONNUMERICIDENTIFIER]}|${be[_e.NUMERICIDENTIFIERLOOSE]})`);Re("PRERELEASE",`(?:-(${be[_e.PRERELEASEIDENTIFIER]}(?:\\.${be[_e.PRERELEASEIDENTIFIER]})*))`);Re("PRERELEASELOOSE",`(?:-?(${be[_e.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${be[_e.PRERELEASEIDENTIFIERLOOSE]})*))`);Re("BUILDIDENTIFIER",`${Wc}+`);Re("BUILD",`(?:\\+(${be[_e.BUILDIDENTIFIER]}(?:\\.${be[_e.BUILDIDENTIFIER]})*))`);Re("FULLPLAIN",`v?${be[_e.MAINVERSION]}${be[_e.PRERELEASE]}?${be[_e.BUILD]}?`);Re("FULL",`^${be[_e.FULLPLAIN]}$`);Re("LOOSEPLAIN",`[v=\\s]*${be[_e.MAINVERSIONLOOSE]}${be[_e.PRERELEASELOOSE]}?${be[_e.BUILD]}?`);Re("LOOSE",`^${be[_e.LOOSEPLAIN]}$`);Re("GTLT","((?:<|>)?=?)");Re("XRANGEIDENTIFIERLOOSE",`${be[_e.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Re("XRANGEIDENTIFIER",`${be[_e.NUMERICIDENTIFIER]}|x|X|\\*`);Re("XRANGEPLAIN",`[v=\\s]*(${be[_e.XRANGEIDENTIFIER]})(?:\\.(${be[_e.XRANGEIDENTIFIER]})(?:\\.(${be[_e.XRANGEIDENTIFIER]})(?:${be[_e.PRERELEASE]})?${be[_e.BUILD]}?)?)?`);Re("XRANGEPLAINLOOSE",`[v=\\s]*(${be[_e.XRANGEIDENTIFIERLOOSE]})(?:\\.(${be[_e.XRANGEIDENTIFIERLOOSE]})(?:\\.(${be[_e.XRANGEIDENTIFIERLOOSE]})(?:${be[_e.PRERELEASELOOSE]})?${be[_e.BUILD]}?)?)?`);Re("XRANGE",`^${be[_e.GTLT]}\\s*${be[_e.XRANGEPLAIN]}$`);Re("XRANGELOOSE",`^${be[_e.GTLT]}\\s*${be[_e.XRANGEPLAINLOOSE]}$`);Re("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Vc}})(?:\\.(\\d{1,${Vc}}))?(?:\\.(\\d{1,${Vc}}))?`);Re("COERCE",`${be[_e.COERCEPLAIN]}(?:$|[^\\d])`);Re("COERCEFULL",be[_e.COERCEPLAIN]+`(?:${be[_e.PRERELEASE]})?(?:${be[_e.BUILD]})?(?:$|[^\\d])`);Re("COERCERTL",be[_e.COERCE],!0);Re("COERCERTLFULL",be[_e.COERCEFULL],!0);Re("LONETILDE","(?:~>?)");Re("TILDETRIM",`(\\s*)${be[_e.LONETILDE]}\\s+`,!0);Rt.tildeTrimReplace="$1~";Re("TILDE",`^${be[_e.LONETILDE]}${be[_e.XRANGEPLAIN]}$`);Re("TILDELOOSE",`^${be[_e.LONETILDE]}${be[_e.XRANGEPLAINLOOSE]}$`);Re("LONECARET","(?:\\^)");Re("CARETTRIM",`(\\s*)${be[_e.LONECARET]}\\s+`,!0);Rt.caretTrimReplace="$1^";Re("CARET",`^${be[_e.LONECARET]}${be[_e.XRANGEPLAIN]}$`);Re("CARETLOOSE",`^${be[_e.LONECARET]}${be[_e.XRANGEPLAINLOOSE]}$`);Re("COMPARATORLOOSE",`^${be[_e.GTLT]}\\s*(${be[_e.LOOSEPLAIN]})$|^$`);Re("COMPARATOR",`^${be[_e.GTLT]}\\s*(${be[_e.FULLPLAIN]})$|^$`);Re("COMPARATORTRIM",`(\\s*)${be[_e.GTLT]}\\s*(${be[_e.LOOSEPLAIN]}|${be[_e.XRANGEPLAIN]})`,!0);Rt.comparatorTrimReplace="$1$2$3";Re("HYPHENRANGE",`^\\s*(${be[_e.XRANGEPLAIN]})\\s+-\\s+(${be[_e.XRANGEPLAIN]})\\s*$`);Re("HYPHENRANGELOOSE",`^\\s*(${be[_e.XRANGEPLAINLOOSE]})\\s+-\\s+(${be[_e.XRANGEPLAINLOOSE]})\\s*$`);Re("STAR","(<|>)?=?\\s*\\*");Re("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Re("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var In=ge((LW,qy)=>{"use strict";var yB=Object.freeze({loose:!0}),vB=Object.freeze({}),SB=e=>e?typeof e!="object"?yB:e:vB;qy.exports=SB});var zc=ge((DW,Zy)=>{"use strict";var Ky=/^[0-9]+$/,Jy=(e,t)=>{let s=Ky.test(e),u=Ky.test(t);return s&&u&&(e=+e,t=+t),e===t?0:s&&!u?-1:u&&!s?1:e<t?-1:1},EB=(e,t)=>Jy(t,e);Zy.exports={compareIdentifiers:Jy,rcompareIdentifiers:EB}});var Ge=ge(($W,Yy)=>{"use strict";var Tn=ks(),{MAX_LENGTH:Xy,MAX_SAFE_INTEGER:Pn}=Ns(),{safeRe:xn,t:Nn}=kr(),bB=In(),{compareIdentifiers:Lr}=zc(),qc=class e{constructor(t,s){if(s=bB(s),t instanceof e){if(t.loose===!!s.loose&&t.includePrerelease===!!s.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Xy)throw new TypeError(`version is longer than ${Xy} characters`);Tn("SemVer",t,s),this.options=s,this.loose=!!s.loose,this.includePrerelease=!!s.includePrerelease;let u=t.trim().match(s.loose?xn[Nn.LOOSE]:xn[Nn.FULL]);if(!u)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>Pn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Pn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Pn||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let a=+i;if(a>=0&&a<Pn)return a}return i}):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Tn("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),Lr(this.major,t.major)||Lr(this.minor,t.minor)||Lr(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let s=0;do{let u=this.prerelease[s],i=t.prerelease[s];if(Tn("prerelease compare",s,u,i),u===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(u===void 0)return-1;if(u===i)continue;return Lr(u,i)}while(++s)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let s=0;do{let u=this.build[s],i=t.build[s];if(Tn("build compare",s,u,i),u===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(u===void 0)return-1;if(u===i)continue;return Lr(u,i)}while(++s)}inc(t,s,u){if(t.startsWith("pre")){if(!s&&u===!1)throw new Error("invalid increment argument: identifier is empty");if(s){let i=`-${s}`.match(this.options.loose?xn[Nn.PRERELEASELOOSE]:xn[Nn.PRERELEASE]);if(!i||i[1]!==s)throw new Error(`invalid identifier: ${s}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",s,u);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",s,u);break;case"prepatch":this.prerelease.length=0,this.inc("patch",s,u),this.inc("pre",s,u);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",s,u),this.inc("pre",s,u);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(u)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let a=this.prerelease.length;for(;--a>=0;)typeof this.prerelease[a]=="number"&&(this.prerelease[a]++,a=-2);if(a===-1){if(s===this.prerelease.join(".")&&u===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(s){let a=[s,i];u===!1&&(a=[s]),Lr(this.prerelease[0],s)===0?isNaN(this.prerelease[1])&&(this.prerelease=a):this.prerelease=a}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Yy.exports=qc});var Yt=ge((MW,e0)=>{"use strict";var Qy=Ge(),_B=(e,t,s=!1)=>{if(e instanceof Qy)return e;try{return new Qy(e,t)}catch(u){if(!s)return null;throw u}};e0.exports=_B});var r0=ge((jW,t0)=>{"use strict";var wB=Yt(),OB=(e,t)=>{let s=wB(e,t);return s?s.version:null};t0.exports=OB});var i0=ge((BW,s0)=>{"use strict";var RB=Yt(),AB=(e,t)=>{let s=RB(e.trim().replace(/^[=v]+/,""),t);return s?s.version:null};s0.exports=AB});var a0=ge((UW,o0)=>{"use strict";var n0=Ge(),CB=(e,t,s,u,i)=>{typeof s=="string"&&(i=u,u=s,s=void 0);try{return new n0(e instanceof n0?e.version:e,s).inc(t,u,i).version}catch{return null}};o0.exports=CB});var u0=ge((FW,c0)=>{"use strict";var l0=Yt(),IB=(e,t)=>{let s=l0(e,null,!0),u=l0(t,null,!0),i=s.compare(u);if(i===0)return null;let a=i>0,c=a?s:u,r=a?u:s,n=!!c.prerelease.length;if(!!r.prerelease.length&&!n){if(!r.patch&&!r.minor)return"major";if(r.compareMain(c)===0)return r.minor&&!r.patch?"minor":"patch"}let l=n?"pre":"";return s.major!==u.major?l+"major":s.minor!==u.minor?l+"minor":s.patch!==u.patch?l+"patch":"prerelease"};c0.exports=IB});var p0=ge((HW,h0)=>{"use strict";var TB=Ge(),PB=(e,t)=>new TB(e,t).major;h0.exports=PB});var f0=ge((GW,d0)=>{"use strict";var xB=Ge(),NB=(e,t)=>new xB(e,t).minor;d0.exports=NB});var m0=ge((VW,g0)=>{"use strict";var kB=Ge(),LB=(e,t)=>new kB(e,t).patch;g0.exports=LB});var v0=ge((WW,y0)=>{"use strict";var DB=Yt(),$B=(e,t)=>{let s=DB(e,t);return s&&s.prerelease.length?s.prerelease:null};y0.exports=$B});var at=ge((zW,E0)=>{"use strict";var S0=Ge(),MB=(e,t,s)=>new S0(e,s).compare(new S0(t,s));E0.exports=MB});var _0=ge((qW,b0)=>{"use strict";var jB=at(),BB=(e,t,s)=>jB(t,e,s);b0.exports=BB});var O0=ge((KW,w0)=>{"use strict";var UB=at(),FB=(e,t)=>UB(e,t,!0);w0.exports=FB});var kn=ge((JW,A0)=>{"use strict";var R0=Ge(),HB=(e,t,s)=>{let u=new R0(e,s),i=new R0(t,s);return u.compare(i)||u.compareBuild(i)};A0.exports=HB});var I0=ge((ZW,C0)=>{"use strict";var GB=kn(),VB=(e,t)=>e.sort((s,u)=>GB(s,u,t));C0.exports=VB});var P0=ge((XW,T0)=>{"use strict";var WB=kn(),zB=(e,t)=>e.sort((s,u)=>WB(u,s,t));T0.exports=zB});var Ls=ge((YW,x0)=>{"use strict";var qB=at(),KB=(e,t,s)=>qB(e,t,s)>0;x0.exports=KB});var Ln=ge((QW,N0)=>{"use strict";var JB=at(),ZB=(e,t,s)=>JB(e,t,s)<0;N0.exports=ZB});var Kc=ge((ez,k0)=>{"use strict";var XB=at(),YB=(e,t,s)=>XB(e,t,s)===0;k0.exports=YB});var Jc=ge((tz,L0)=>{"use strict";var QB=at(),e2=(e,t,s)=>QB(e,t,s)!==0;L0.exports=e2});var Dn=ge((rz,D0)=>{"use strict";var t2=at(),r2=(e,t,s)=>t2(e,t,s)>=0;D0.exports=r2});var $n=ge((sz,$0)=>{"use strict";var s2=at(),i2=(e,t,s)=>s2(e,t,s)<=0;$0.exports=i2});var Zc=ge((iz,M0)=>{"use strict";var n2=Kc(),o2=Jc(),a2=Ls(),l2=Dn(),c2=Ln(),u2=$n(),h2=(e,t,s,u)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof s=="object"&&(s=s.version),e===s;case"!==":return typeof e=="object"&&(e=e.version),typeof s=="object"&&(s=s.version),e!==s;case"":case"=":case"==":return n2(e,s,u);case"!=":return o2(e,s,u);case">":return a2(e,s,u);case">=":return l2(e,s,u);case"<":return c2(e,s,u);case"<=":return u2(e,s,u);default:throw new TypeError(`Invalid operator: ${t}`)}};M0.exports=h2});var B0=ge((nz,j0)=>{"use strict";var p2=Ge(),d2=Yt(),{safeRe:Mn,t:jn}=kr(),f2=(e,t)=>{if(e instanceof p2)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let s=null;if(!t.rtl)s=e.match(t.includePrerelease?Mn[jn.COERCEFULL]:Mn[jn.COERCE]);else{let n=t.includePrerelease?Mn[jn.COERCERTLFULL]:Mn[jn.COERCERTL],o;for(;(o=n.exec(e))&&(!s||s.index+s[0].length!==e.length);)(!s||o.index+o[0].length!==s.index+s[0].length)&&(s=o),n.lastIndex=o.index+o[1].length+o[2].length;n.lastIndex=-1}if(s===null)return null;let u=s[2],i=s[3]||"0",a=s[4]||"0",c=t.includePrerelease&&s[5]?`-${s[5]}`:"",r=t.includePrerelease&&s[6]?`+${s[6]}`:"";return d2(`${u}.${i}.${a}${c}${r}`,t)};j0.exports=f2});var F0=ge((oz,U0)=>{"use strict";var Xc=class{constructor(){this.max=1e3,this.map=new Map}get(t){let s=this.map.get(t);if(s!==void 0)return this.map.delete(t),this.map.set(t,s),s}delete(t){return this.map.delete(t)}set(t,s){if(!this.delete(t)&&s!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(t,s)}return this}};U0.exports=Xc});var lt=ge((az,W0)=>{"use strict";var g2=/\s+/g,Yc=class e{constructor(t,s){if(s=y2(s),t instanceof e)return t.loose===!!s.loose&&t.includePrerelease===!!s.includePrerelease?t:new e(t.raw,s);if(t instanceof Qc)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=s,this.loose=!!s.loose,this.includePrerelease=!!s.includePrerelease,this.raw=t.trim().replace(g2," "),this.set=this.raw.split("||").map(u=>this.parseRange(u.trim())).filter(u=>u.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let u=this.set[0];if(this.set=this.set.filter(i=>!G0(i[0])),this.set.length===0)this.set=[u];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&O2(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let s=this.set[t];for(let u=0;u<s.length;u++)u>0&&(this.formatted+=" "),this.formatted+=s[u].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){let u=((this.options.includePrerelease&&_2)|(this.options.loose&&w2))+":"+t,i=H0.get(u);if(i)return i;let a=this.options.loose,c=a?Qe[Je.HYPHENRANGELOOSE]:Qe[Je.HYPHENRANGE];t=t.replace(c,L2(this.options.includePrerelease)),ke("hyphen replace",t),t=t.replace(Qe[Je.COMPARATORTRIM],S2),ke("comparator trim",t),t=t.replace(Qe[Je.TILDETRIM],E2),ke("tilde trim",t),t=t.replace(Qe[Je.CARETTRIM],b2),ke("caret trim",t);let r=t.split(" ").map(h=>R2(h,this.options)).join(" ").split(/\s+/).map(h=>k2(h,this.options));a&&(r=r.filter(h=>(ke("loose invalid filter",h,this.options),!!h.match(Qe[Je.COMPARATORLOOSE])))),ke("range list",r);let n=new Map,o=r.map(h=>new Qc(h,this.options));for(let h of o){if(G0(h))return[h];n.set(h.value,h)}n.size>1&&n.has("")&&n.delete("");let l=[...n.values()];return H0.set(u,l),l}intersects(t,s){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(u=>V0(u,s)&&t.set.some(i=>V0(i,s)&&u.every(a=>i.every(c=>a.intersects(c,s)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new v2(t,this.options)}catch{return!1}for(let s=0;s<this.set.length;s++)if(D2(this.set[s],t,this.options))return!0;return!1}};W0.exports=Yc;var m2=F0(),H0=new m2,y2=In(),Qc=Ds(),ke=ks(),v2=Ge(),{safeRe:Qe,t:Je,comparatorTrimReplace:S2,tildeTrimReplace:E2,caretTrimReplace:b2}=kr(),{FLAG_INCLUDE_PRERELEASE:_2,FLAG_LOOSE:w2}=Ns(),G0=e=>e.value==="<0.0.0-0",O2=e=>e.value==="",V0=(e,t)=>{let s=!0,u=e.slice(),i=u.pop();for(;s&&u.length;)s=u.every(a=>i.intersects(a,t)),i=u.pop();return s},R2=(e,t)=>(ke("comp",e,t),e=I2(e,t),ke("caret",e),e=A2(e,t),ke("tildes",e),e=P2(e,t),ke("xrange",e),e=N2(e,t),ke("stars",e),e),Ze=e=>!e||e.toLowerCase()==="x"||e==="*",A2=(e,t)=>e.trim().split(/\s+/).map(s=>C2(s,t)).join(" "),C2=(e,t)=>{let s=t.loose?Qe[Je.TILDELOOSE]:Qe[Je.TILDE];return e.replace(s,(u,i,a,c,r)=>{ke("tilde",e,u,i,a,c,r);let n;return Ze(i)?n="":Ze(a)?n=`>=${i}.0.0 <${+i+1}.0.0-0`:Ze(c)?n=`>=${i}.${a}.0 <${i}.${+a+1}.0-0`:r?(ke("replaceTilde pr",r),n=`>=${i}.${a}.${c}-${r} <${i}.${+a+1}.0-0`):n=`>=${i}.${a}.${c} <${i}.${+a+1}.0-0`,ke("tilde return",n),n})},I2=(e,t)=>e.trim().split(/\s+/).map(s=>T2(s,t)).join(" "),T2=(e,t)=>{ke("caret",e,t);let s=t.loose?Qe[Je.CARETLOOSE]:Qe[Je.CARET],u=t.includePrerelease?"-0":"";return e.replace(s,(i,a,c,r,n)=>{ke("caret",e,i,a,c,r,n);let o;return Ze(a)?o="":Ze(c)?o=`>=${a}.0.0${u} <${+a+1}.0.0-0`:Ze(r)?a==="0"?o=`>=${a}.${c}.0${u} <${a}.${+c+1}.0-0`:o=`>=${a}.${c}.0${u} <${+a+1}.0.0-0`:n?(ke("replaceCaret pr",n),a==="0"?c==="0"?o=`>=${a}.${c}.${r}-${n} <${a}.${c}.${+r+1}-0`:o=`>=${a}.${c}.${r}-${n} <${a}.${+c+1}.0-0`:o=`>=${a}.${c}.${r}-${n} <${+a+1}.0.0-0`):(ke("no pr"),a==="0"?c==="0"?o=`>=${a}.${c}.${r}${u} <${a}.${c}.${+r+1}-0`:o=`>=${a}.${c}.${r}${u} <${a}.${+c+1}.0-0`:o=`>=${a}.${c}.${r} <${+a+1}.0.0-0`),ke("caret return",o),o})},P2=(e,t)=>(ke("replaceXRanges",e,t),e.split(/\s+/).map(s=>x2(s,t)).join(" ")),x2=(e,t)=>{e=e.trim();let s=t.loose?Qe[Je.XRANGELOOSE]:Qe[Je.XRANGE];return e.replace(s,(u,i,a,c,r,n)=>{ke("xRange",e,u,i,a,c,r,n);let o=Ze(a),l=o||Ze(c),h=l||Ze(r),p=h;return i==="="&&p&&(i=""),n=t.includePrerelease?"-0":"",o?i===">"||i==="<"?u="<0.0.0-0":u="*":i&&p?(l&&(c=0),r=0,i===">"?(i=">=",l?(a=+a+1,c=0,r=0):(c=+c+1,r=0)):i==="<="&&(i="<",l?a=+a+1:c=+c+1),i==="<"&&(n="-0"),u=`${i+a}.${c}.${r}${n}`):l?u=`>=${a}.0.0${n} <${+a+1}.0.0-0`:h&&(u=`>=${a}.${c}.0${n} <${a}.${+c+1}.0-0`),ke("xRange return",u),u})},N2=(e,t)=>(ke("replaceStars",e,t),e.trim().replace(Qe[Je.STAR],"")),k2=(e,t)=>(ke("replaceGTE0",e,t),e.trim().replace(Qe[t.includePrerelease?Je.GTE0PRE:Je.GTE0],"")),L2=e=>(t,s,u,i,a,c,r,n,o,l,h,p)=>(Ze(u)?s="":Ze(i)?s=`>=${u}.0.0${e?"-0":""}`:Ze(a)?s=`>=${u}.${i}.0${e?"-0":""}`:c?s=`>=${s}`:s=`>=${s}${e?"-0":""}`,Ze(o)?n="":Ze(l)?n=`<${+o+1}.0.0-0`:Ze(h)?n=`<${o}.${+l+1}.0-0`:p?n=`<=${o}.${l}.${h}-${p}`:e?n=`<${o}.${l}.${+h+1}-0`:n=`<=${n}`,`${s} ${n}`.trim()),D2=(e,t,s)=>{for(let u=0;u<e.length;u++)if(!e[u].test(t))return!1;if(t.prerelease.length&&!s.includePrerelease){for(let u=0;u<e.length;u++)if(ke(e[u].semver),e[u].semver!==Qc.ANY&&e[u].semver.prerelease.length>0){let i=e[u].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}});var Ds=ge((lz,X0)=>{"use strict";var $s=Symbol("SemVer ANY"),ru=class e{static get ANY(){return $s}constructor(t,s){if(s=z0(s),t instanceof e){if(t.loose===!!s.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),tu("comparator",t,s),this.options=s,this.loose=!!s.loose,this.parse(t),this.semver===$s?this.value="":this.value=this.operator+this.semver.version,tu("comp",this)}parse(t){let s=this.options.loose?q0[K0.COMPARATORLOOSE]:q0[K0.COMPARATOR],u=t.match(s);if(!u)throw new TypeError(`Invalid comparator: ${t}`);this.operator=u[1]!==void 0?u[1]:"",this.operator==="="&&(this.operator=""),u[2]?this.semver=new J0(u[2],this.options.loose):this.semver=$s}toString(){return this.value}test(t){if(tu("Comparator.test",t,this.options.loose),this.semver===$s||t===$s)return!0;if(typeof t=="string")try{t=new J0(t,this.options)}catch{return!1}return eu(t,this.operator,this.semver,this.options)}intersects(t,s){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Z0(t.value,s).test(this.value):t.operator===""?t.value===""?!0:new Z0(this.value,s).test(t.semver):(s=z0(s),s.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!s.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||eu(this.semver,"<",t.semver,s)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||eu(this.semver,">",t.semver,s)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};X0.exports=ru;var z0=In(),{safeRe:q0,t:K0}=kr(),eu=Zc(),tu=ks(),J0=Ge(),Z0=lt()});var Ms=ge((cz,Y0)=>{"use strict";var $2=lt(),M2=(e,t,s)=>{try{t=new $2(t,s)}catch{return!1}return t.test(e)};Y0.exports=M2});var ev=ge((uz,Q0)=>{"use strict";var j2=lt(),B2=(e,t)=>new j2(e,t).set.map(s=>s.map(u=>u.value).join(" ").trim().split(" "));Q0.exports=B2});var rv=ge((hz,tv)=>{"use strict";var U2=Ge(),F2=lt(),H2=(e,t,s)=>{let u=null,i=null,a=null;try{a=new F2(t,s)}catch{return null}return e.forEach(c=>{a.test(c)&&(!u||i.compare(c)===-1)&&(u=c,i=new U2(u,s))}),u};tv.exports=H2});var iv=ge((pz,sv)=>{"use strict";var G2=Ge(),V2=lt(),W2=(e,t,s)=>{let u=null,i=null,a=null;try{a=new V2(t,s)}catch{return null}return e.forEach(c=>{a.test(c)&&(!u||i.compare(c)===1)&&(u=c,i=new G2(u,s))}),u};sv.exports=W2});var av=ge((dz,ov)=>{"use strict";var su=Ge(),z2=lt(),nv=Ls(),q2=(e,t)=>{e=new z2(e,t);let s=new su("0.0.0");if(e.test(s)||(s=new su("0.0.0-0"),e.test(s)))return s;s=null;for(let u=0;u<e.set.length;++u){let i=e.set[u],a=null;i.forEach(c=>{let r=new su(c.semver.version);switch(c.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!a||nv(r,a))&&(a=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),a&&(!s||nv(s,a))&&(s=a)}return s&&e.test(s)?s:null};ov.exports=q2});var cv=ge((fz,lv)=>{"use strict";var K2=lt(),J2=(e,t)=>{try{return new K2(e,t).range||"*"}catch{return null}};lv.exports=J2});var Bn=ge((gz,dv)=>{"use strict";var Z2=Ge(),pv=Ds(),{ANY:X2}=pv,Y2=lt(),Q2=Ms(),uv=Ls(),hv=Ln(),eU=$n(),tU=Dn(),rU=(e,t,s,u)=>{e=new Z2(e,u),t=new Y2(t,u);let i,a,c,r,n;switch(s){case">":i=uv,a=eU,c=hv,r=">",n=">=";break;case"<":i=hv,a=tU,c=uv,r="<",n="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Q2(e,t,u))return!1;for(let o=0;o<t.set.length;++o){let l=t.set[o],h=null,p=null;if(l.forEach(d=>{d.semver===X2&&(d=new pv(">=0.0.0")),h=h||d,p=p||d,i(d.semver,h.semver,u)?h=d:c(d.semver,p.semver,u)&&(p=d)}),h.operator===r||h.operator===n||(!p.operator||p.operator===r)&&a(e,p.semver))return!1;if(p.operator===n&&c(e,p.semver))return!1}return!0};dv.exports=rU});var gv=ge((mz,fv)=>{"use strict";var sU=Bn(),iU=(e,t,s)=>sU(e,t,">",s);fv.exports=iU});var yv=ge((yz,mv)=>{"use strict";var nU=Bn(),oU=(e,t,s)=>nU(e,t,"<",s);mv.exports=oU});var Ev=ge((vz,Sv)=>{"use strict";var vv=lt(),aU=(e,t,s)=>(e=new vv(e,s),t=new vv(t,s),e.intersects(t,s));Sv.exports=aU});var _v=ge((Sz,bv)=>{"use strict";var lU=Ms(),cU=at();bv.exports=(e,t,s)=>{let u=[],i=null,a=null,c=e.sort((l,h)=>cU(l,h,s));for(let l of c)lU(l,t,s)?(a=l,i||(i=l)):(a&&u.push([i,a]),a=null,i=null);i&&u.push([i,null]);let r=[];for(let[l,h]of u)l===h?r.push(l):!h&&l===c[0]?r.push("*"):h?l===c[0]?r.push(`<=${h}`):r.push(`${l} - ${h}`):r.push(`>=${l}`);let n=r.join(" || "),o=typeof t.raw=="string"?t.raw:String(t);return n.length<o.length?n:t}});var Iv=ge((Ez,Cv)=>{"use strict";var wv=lt(),nu=Ds(),{ANY:iu}=nu,js=Ms(),ou=at(),uU=(e,t,s={})=>{if(e===t)return!0;e=new wv(e,s),t=new wv(t,s);let u=!1;e:for(let i of e.set){for(let a of t.set){let c=pU(i,a,s);if(u=u||c!==null,c)continue e}if(u)return!1}return!0},hU=[new nu(">=0.0.0-0")],Ov=[new nu(">=0.0.0")],pU=(e,t,s)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===iu){if(t.length===1&&t[0].semver===iu)return!0;s.includePrerelease?e=hU:e=Ov}if(t.length===1&&t[0].semver===iu){if(s.includePrerelease)return!0;t=Ov}let u=new Set,i,a;for(let d of e)d.operator===">"||d.operator===">="?i=Rv(i,d,s):d.operator==="<"||d.operator==="<="?a=Av(a,d,s):u.add(d.semver);if(u.size>1)return null;let c;if(i&&a){if(c=ou(i.semver,a.semver,s),c>0)return null;if(c===0&&(i.operator!==">="||a.operator!=="<="))return null}for(let d of u){if(i&&!js(d,String(i),s)||a&&!js(d,String(a),s))return null;for(let g of t)if(!js(d,String(g),s))return!1;return!0}let r,n,o,l,h=a&&!s.includePrerelease&&a.semver.prerelease.length?a.semver:!1,p=i&&!s.includePrerelease&&i.semver.prerelease.length?i.semver:!1;h&&h.prerelease.length===1&&a.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let d of t){if(l=l||d.operator===">"||d.operator===">=",o=o||d.operator==="<"||d.operator==="<=",i){if(p&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===p.major&&d.semver.minor===p.minor&&d.semver.patch===p.patch&&(p=!1),d.operator===">"||d.operator===">="){if(r=Rv(i,d,s),r===d&&r!==i)return!1}else if(i.operator===">="&&!js(i.semver,String(d),s))return!1}if(a){if(h&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===h.major&&d.semver.minor===h.minor&&d.semver.patch===h.patch&&(h=!1),d.operator==="<"||d.operator==="<="){if(n=Av(a,d,s),n===d&&n!==a)return!1}else if(a.operator==="<="&&!js(a.semver,String(d),s))return!1}if(!d.operator&&(a||i)&&c!==0)return!1}return!(i&&o&&!a&&c!==0||a&&l&&!i&&c!==0||p||h)},Rv=(e,t,s)=>{if(!e)return t;let u=ou(e.semver,t.semver,s);return u>0?e:u<0||t.operator===">"&&e.operator===">="?t:e},Av=(e,t,s)=>{if(!e)return t;let u=ou(e.semver,t.semver,s);return u<0?e:u>0||t.operator==="<"&&e.operator==="<="?t:e};Cv.exports=uU});var Nv=ge((bz,xv)=>{"use strict";var au=kr(),Tv=Ns(),dU=Ge(),Pv=zc(),fU=Yt(),gU=r0(),mU=i0(),yU=a0(),vU=u0(),SU=p0(),EU=f0(),bU=m0(),_U=v0(),wU=at(),OU=_0(),RU=O0(),AU=kn(),CU=I0(),IU=P0(),TU=Ls(),PU=Ln(),xU=Kc(),NU=Jc(),kU=Dn(),LU=$n(),DU=Zc(),$U=B0(),MU=Ds(),jU=lt(),BU=Ms(),UU=ev(),FU=rv(),HU=iv(),GU=av(),VU=cv(),WU=Bn(),zU=gv(),qU=yv(),KU=Ev(),JU=_v(),ZU=Iv();xv.exports={parse:fU,valid:gU,clean:mU,inc:yU,diff:vU,major:SU,minor:EU,patch:bU,prerelease:_U,compare:wU,rcompare:OU,compareLoose:RU,compareBuild:AU,sort:CU,rsort:IU,gt:TU,lt:PU,eq:xU,neq:NU,gte:kU,lte:LU,cmp:DU,coerce:$U,Comparator:MU,Range:jU,satisfies:BU,toComparators:UU,maxSatisfying:FU,minSatisfying:HU,minVersion:GU,validRange:VU,outside:WU,gtr:zU,ltr:qU,intersects:KU,simplifyRange:JU,subset:ZU,SemVer:dU,re:au.re,src:au.src,tokens:au.t,SEMVER_SPEC_VERSION:Tv.SEMVER_SPEC_VERSION,RELEASE_TYPES:Tv.RELEASE_TYPES,compareIdentifiers:Pv.compareIdentifiers,rcompareIdentifiers:Pv.rcompareIdentifiers}});var $e=class{};var Dr=class extends $e{locale;options;constructor(t,s){super(),this.locale="en-US",this.options=s||{}}compare(t,s){return t<s?-1:t>s?1:0}resolvedOptions(){return{caseFirst:"false",collation:"default",ignorePunctuation:!1,locale:"en-US",numeric:!1,sensitivity:"variant",usage:"sort"}}};var $r=class extends $e{locale;options;constructor(t,s){super(),this.locale="en-US",this.options=s||{}}format(t){return t instanceof Date||(t=new Date(t||Date.now())),t.toISOString()}formatToParts(t){return[{type:"literal",value:this.format(t)}]}resolvedOptions(){return{calendar:"gregory",locale:"en-US",numberingSystem:"latn",timeZone:"UTC"}}};var Mr=class extends $e{locale;type;constructor(t,s){super(),this.locale="en-US",this.type=s?.type||"language"}of(t){return t}resolvedOptions(){return{fallback:"code",locale:"en-US",style:"long",type:this.type}}};var jr=class extends $e{locale;type;constructor(t,s){super(),this.locale="en-US",this.type=s?.type||"conjunction"}format(t){if(!Array.isArray(t)||t.length===0)return"";if(t.length===1)return String(t[0]);if(t.length===2)return`${t[0]} and ${t[1]}`;let s=t[t.length-1];return`${t.slice(0,-1).join(", ")}, and ${s}`}formatToParts(t){return[{type:"element",value:this.format(t)}]}resolvedOptions(){return{locale:"en-US",style:"long",type:this.type}}};var Br=class extends $e{baseName;language;constructor(t,s){super(),this.baseName="en-US",this.language="en"}toString(){return this.baseName}};var Ur=class extends $e{currency;locale;options;style;constructor(t,s){super(),this.locale="en-US",this.options=s||{},this.style=s?.style||"decimal",this.currency=s?.currency}format(t){return this.style==="currency"&&this.currency?`${this.currency} ${t.toFixed(2)}`:this.style==="percent"?`${(t*100).toFixed(0)}%`:String(t)}formatToParts(t){return[{type:"integer",value:this.format(t)}]}resolvedOptions(){return{compactDisplay:"short",currency:this.currency,currencyDisplay:"symbol",currencySign:"standard",locale:"en-US",maximumFractionDigits:3,maximumSignificantDigits:21,minimumFractionDigits:0,minimumIntegerDigits:1,minimumSignificantDigits:1,notation:"standard",numberingSystem:"latn",roundingIncrement:1,roundingMode:"halfExpand",roundingPriority:"auto",signDisplay:"auto",style:this.style,trailingZeroDisplay:"auto",useGrouping:"auto"}}};var Fr=class extends $e{locale;constructor(t,s){super(),this.locale="en-US"}select(t){return t===1?"one":"other"}resolvedOptions(){return{locale:"en-US",maximumFractionDigits:3,minimumFractionDigits:0,minimumIntegerDigits:1,pluralCategories:["one","other"],type:"cardinal"}}};var Hr=class extends $e{locale;numeric;constructor(t,s){super(),this.locale="en-US",this.numeric=s?.numeric||"always"}format(t,s){let u=Math.abs(t),i=t<0?"":"in ",a=t<0?" ago":"";return`${i}${u} ${s}${u!==1?"s":""}${a}`}formatToParts(t,s){return[{type:"literal",value:this.format(t,s)}]}resolvedOptions(){return{locale:"en-US",numberingSystem:"latn",numeric:this.numeric,style:"long"}}};var Gr=class extends $e{granularity;locale;constructor(t,s){super(),this.locale="en-US",this.granularity=s?.granularity||"grapheme"}segment(t){let s=[];for(let u=0;u<t.length;u++)s.push({index:u,input:t,segment:t[u]});return s}resolvedOptions(){return{granularity:this.granularity,locale:"en-US"}}};function hu(e){return Array.isArray(e)?e.length>0?["en-US"]:[]:e?["en-US"]:[]}function pu(e){return{calendar:["gregory"],collation:["default"],currency:["USD"],numberingSystem:["latn"],timeZone:["UTC"],unit:["meter","second","byte"]}[e]||[]}typeof globalThis.Intl>"u"&&(globalThis.Intl={Collator:Dr,DateTimeFormat:$r,DisplayNames:Mr,ListFormat:jr,Locale:Br,NumberFormat:Ur,PluralRules:Fr,RelativeTimeFormat:Hr,Segmenter:Gr,getCanonicalLocales:hu,supportedValuesOf:pu},Object.defineProperty(globalThis,"Intl",{configurable:!1,enumerable:!1,value:globalThis.Intl,writable:!1}));var Un=require("fs"),Lv=require("os"),cu=yt(require("path"),1),Dv=yt(Hd(),1),$v=yt(At(),1),Mv=yt(Zm(),1),jv=yt(ty(),1),Ve=yt(Pt(),1),Fn=yt(Gy(),1),Bv=yt(Ci(),1),YU=yt(Nv(),1);var XU="sktsec_",_z=XU.length;var kv="https://github.com/SocketDev/socket-cli/issues";var lu=cu.default.join((0,Lv.homedir)(),".socket","_dlx"),Rz=(0,jv.envAsBoolean)(process.env.SOCKET_CLI_DISABLE_NODE_FORWARDING);function QU(e){if(!e)throw new Error("CLI package directory not initialized");return{cliEntry:cu.default.join(e,"node_modules","@socketsecurity","cli","dist","index.js")}}function Uv(){return process.argv?process.argv.slice(2):[]}async function eF(){try{let e=await(0,Dv.which)("node",{all:!0,nothrow:!0});if(!e)return;let t=Array.isArray(e)?e:[e],s=process.execPath;return t.find(i=>i!==s)}catch{return}}async function tF(e,t){let u=await eF()??process.execPath,i=await(0,Bv.spawn)(u,[e,...t],{stdio:["inherit","inherit","inherit","ipc"]});i.process&&typeof i.process.send=="function"&&i.process.send({[$v.SOCKET_IPC_HANDSHAKE]:{subprocess:!0,parent_pid:process.pid}}),process.exit(i.code??0)}async function rF(){try{(0,Un.mkdirSync)(lu,{recursive:!0})}catch(e){Ve.logger.error("Failed to create Socket directory"),Ve.logger.error(` Error: ${e instanceof Error?e.message:String(e)}`),Ve.logger.error(` Path: ${lu}`),process.exit(1)}try{let e=await(0,Fn.withSpinner)({message:"Socket powering up\u2026",spinner:(0,Fn.Spinner)({shimmer:{dir:"random"}}),operation:async()=>await(0,Mv.downloadPackage)({package:"@socketsecurity/cli",binaryName:"socket",force:!1})});return Ve.logger.log(""),e}catch(e){Ve.logger.error("Failed to download Socket CLI"),Ve.logger.error(` Error: ${e instanceof Error?e.message:String(e)}`),Ve.logger.error(""),Ve.logger.error("This may be a temporary issue. Please try:"),Ve.logger.error(" 1. Check your internet connection"),Ve.logger.error(" 2. Try running the command again"),Ve.logger.error(` 3. Manually create directory: mkdir -p "${lu}"`),Ve.logger.error(` 4. Report issue at: ${kv}`),process.exit(1)}}async function Fv(e){let s=(await rF()).packageDir,{cliEntry:u}=QU(s);(0,Un.existsSync)(u)&&await tF(u,e),Ve.logger.error("Socket CLI installation failed"),Ve.logger.error(" CLI entry point not found after installation"),Ve.logger.error(` Looked in: ${u}`),process.exit(1)}async function sF(){let e=Uv();await Fv(e)}sF().catch(e=>{process.stderr.write(`Bootstrap error: ${e instanceof Error?e.message:String(e)}
|
|
119
|
+
`),process.exit(1)});
|
|
120
|
+
/*! Bundled license information:
|
|
121
|
+
|
|
122
|
+
@socketsecurity/lib/dist/external/fast-glob.js:
|
|
123
|
+
(*! Bundled license information:
|
|
124
|
+
|
|
125
|
+
is-extglob/index.js:
|
|
126
|
+
(*!
|
|
127
|
+
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
128
|
+
*
|
|
129
|
+
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
130
|
+
* Licensed under the MIT License.
|
|
131
|
+
*)
|
|
132
|
+
|
|
133
|
+
is-glob/index.js:
|
|
134
|
+
(*!
|
|
135
|
+
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
136
|
+
*
|
|
137
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
138
|
+
* Released under the MIT License.
|
|
139
|
+
*)
|
|
140
|
+
|
|
141
|
+
is-number/index.js:
|
|
142
|
+
(*!
|
|
143
|
+
* is-number <https://github.com/jonschlinkert/is-number>
|
|
144
|
+
*
|
|
145
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
146
|
+
* Released under the MIT License.
|
|
147
|
+
*)
|
|
148
|
+
|
|
149
|
+
to-regex-range/index.js:
|
|
150
|
+
(*!
|
|
151
|
+
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
152
|
+
*
|
|
153
|
+
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
154
|
+
* Released under the MIT License.
|
|
155
|
+
*)
|
|
156
|
+
|
|
157
|
+
fill-range/index.js:
|
|
158
|
+
(*!
|
|
159
|
+
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
160
|
+
*
|
|
161
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
162
|
+
* Licensed under the MIT License.
|
|
163
|
+
*)
|
|
164
|
+
|
|
165
|
+
queue-microtask/index.js:
|
|
166
|
+
(*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
167
|
+
|
|
168
|
+
run-parallel/index.js:
|
|
169
|
+
(*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
170
|
+
*)
|
|
171
|
+
|
|
172
|
+
@socketsecurity/lib/dist/external/del.js:
|
|
173
|
+
(*! Bundled license information:
|
|
174
|
+
|
|
175
|
+
is-extglob/index.js:
|
|
176
|
+
(*!
|
|
177
|
+
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
178
|
+
*
|
|
179
|
+
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
180
|
+
* Licensed under the MIT License.
|
|
181
|
+
*)
|
|
182
|
+
|
|
183
|
+
is-glob/index.js:
|
|
184
|
+
(*!
|
|
185
|
+
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
186
|
+
*
|
|
187
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
188
|
+
* Released under the MIT License.
|
|
189
|
+
*)
|
|
190
|
+
|
|
191
|
+
is-number/index.js:
|
|
192
|
+
(*!
|
|
193
|
+
* is-number <https://github.com/jonschlinkert/is-number>
|
|
194
|
+
*
|
|
195
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
196
|
+
* Released under the MIT License.
|
|
197
|
+
*)
|
|
198
|
+
|
|
199
|
+
to-regex-range/index.js:
|
|
200
|
+
(*!
|
|
201
|
+
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
202
|
+
*
|
|
203
|
+
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
204
|
+
* Released under the MIT License.
|
|
205
|
+
*)
|
|
206
|
+
|
|
207
|
+
fill-range/index.js:
|
|
208
|
+
(*!
|
|
209
|
+
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
210
|
+
*
|
|
211
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
212
|
+
* Licensed under the MIT License.
|
|
213
|
+
*)
|
|
214
|
+
|
|
215
|
+
queue-microtask/index.js:
|
|
216
|
+
(*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
217
|
+
|
|
218
|
+
run-parallel/index.js:
|
|
219
|
+
(*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
220
|
+
*)
|
|
221
|
+
|
|
222
|
+
@socketsecurity/lib/dist/external/pacote.js:
|
|
223
|
+
(*! Bundled license information:
|
|
224
|
+
|
|
225
|
+
imurmurhash/imurmurhash.js:
|
|
226
|
+
(**
|
|
227
|
+
* @preserve
|
|
228
|
+
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
|
|
229
|
+
*
|
|
230
|
+
* @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
|
|
231
|
+
* @see http://github.com/homebrewing/brauhaus-diff
|
|
232
|
+
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
|
|
233
|
+
* @see http://github.com/garycourt/murmurhash-js
|
|
234
|
+
* @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
|
|
235
|
+
* @see http://sites.google.com/site/murmurhash/
|
|
236
|
+
*)
|
|
237
|
+
|
|
238
|
+
negotiator/index.js:
|
|
239
|
+
(*!
|
|
240
|
+
* negotiator
|
|
241
|
+
* Copyright(c) 2012 Federico Romero
|
|
242
|
+
* Copyright(c) 2012-2014 Isaac Z. Schlueter
|
|
243
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
244
|
+
* MIT Licensed
|
|
245
|
+
*)
|
|
246
|
+
|
|
247
|
+
make-fetch-happen/lib/fetch.js:
|
|
248
|
+
(**
|
|
249
|
+
* @license
|
|
250
|
+
* Copyright (c) 2010-2012 Mikeal Rogers
|
|
251
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
252
|
+
* you may not use this file except in compliance with the License.
|
|
253
|
+
* You may obtain a copy of the License at
|
|
254
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
255
|
+
* Unless required by applicable law or agreed to in writing,
|
|
256
|
+
* software distributed under the License is distributed on an "AS
|
|
257
|
+
* IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
258
|
+
* express or implied. See the License for the specific language
|
|
259
|
+
* governing permissions and limitations under the License.
|
|
260
|
+
*)
|
|
261
|
+
*)
|
|
262
|
+
*/
|