@gadgetinc/ggt 1.6.0 → 1.6.1
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/README.md +1 -0
- package/dist/{add-FGXJSCE2.js → add-ERWYPHIS.js} +2 -2
- package/dist/{chunk-5NCJDCIZ.js → chunk-24OT7GHO.js} +15 -15
- package/dist/{chunk-5NCJDCIZ.js.map → chunk-24OT7GHO.js.map} +3 -3
- package/dist/{chunk-F4S4AEEO.js → chunk-DYAWQS24.js} +2 -2
- package/dist/{chunk-PA2LOSVH.js → chunk-FILWLZUN.js} +2 -2
- package/dist/chunk-GCO2TOVZ.js +50 -0
- package/dist/{chunk-LPBWX353.js.map → chunk-GCO2TOVZ.js.map} +3 -3
- package/dist/{chunk-JHWQLV6Y.js → chunk-ILB6CSBN.js} +2 -2
- package/dist/{chunk-IYQBG4II.js → chunk-JBY5A44K.js} +2 -2
- package/dist/{chunk-YT2LSGNB.js → chunk-JSGXXXFU.js} +2 -2
- package/dist/chunk-KMNQ3LJT.js +12 -0
- package/dist/{chunk-VJVFVZNR.js.map → chunk-KMNQ3LJT.js.map} +1 -1
- package/dist/chunk-KS2O3TJA.js +116 -0
- package/dist/{chunk-I6BQ7MRE.js.map → chunk-KS2O3TJA.js.map} +3 -3
- package/dist/{chunk-2CKK6A2Y.js → chunk-OGQ5LIYM.js} +2 -2
- package/dist/{chunk-2CKK6A2Y.js.map → chunk-OGQ5LIYM.js.map} +1 -1
- package/dist/chunk-QXWICGG6.js +2 -0
- package/dist/{chunk-72YIA2TT.js.map → chunk-QXWICGG6.js.map} +1 -1
- package/dist/{chunk-L2MG47NS.js → chunk-UCJDY73U.js} +2 -2
- package/dist/{chunk-4WFO3NAS.js → chunk-WNAYBYSG.js} +2 -2
- package/dist/{chunk-SIAMHUOB.js → chunk-WZ3Q7TTB.js} +2 -2
- package/dist/{chunk-XK6JJEHJ.js → chunk-XGQQOMPO.js} +2 -2
- package/dist/{configure-L4U26WFP.js → configure-LD5XC2MR.js} +2 -2
- package/dist/{deploy-6JWXSMQJ.js → deploy-7Q7RRIXS.js} +2 -2
- package/dist/{dev-M2PFPQXX.js → dev-MQ76B6CR.js} +2 -2
- package/dist/{list-LNXNHS2W.js → list-YXCTVLRH.js} +2 -2
- package/dist/{list-LNXNHS2W.js.map → list-YXCTVLRH.js.map} +1 -1
- package/dist/login-XIEASAMY.js +2 -0
- package/dist/{logout-JA5JBU3G.js → logout-ACRXIJEF.js} +2 -2
- package/dist/main.js +3 -2
- package/dist/main.js.map +2 -2
- package/dist/{open-TWQBAPIT.js → open-5CYXKN42.js} +2 -2
- package/dist/{pull-VWGETR4M.js → pull-STASHXEL.js} +2 -2
- package/dist/push-6WUPKY5W.js +2 -0
- package/dist/{status-OYEFON4A.js → status-SB22V3DI.js} +2 -2
- package/dist/{version-4QPNJ5VH.js → version-NZHW3VLV.js} +2 -2
- package/dist/{whoami-TIGWXVEY.js → whoami-AA3ISE77.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-72YIA2TT.js +0 -2
- package/dist/chunk-I6BQ7MRE.js +0 -116
- package/dist/chunk-LPBWX353.js +0 -50
- package/dist/chunk-VJVFVZNR.js +0 -12
- package/dist/login-4F3H443A.js +0 -2
- package/dist/push-KWUMHQCJ.js +0 -2
- /package/dist/{add-FGXJSCE2.js.map → add-ERWYPHIS.js.map} +0 -0
- /package/dist/{chunk-F4S4AEEO.js.map → chunk-DYAWQS24.js.map} +0 -0
- /package/dist/{chunk-PA2LOSVH.js.map → chunk-FILWLZUN.js.map} +0 -0
- /package/dist/{chunk-JHWQLV6Y.js.map → chunk-ILB6CSBN.js.map} +0 -0
- /package/dist/{chunk-IYQBG4II.js.map → chunk-JBY5A44K.js.map} +0 -0
- /package/dist/{chunk-YT2LSGNB.js.map → chunk-JSGXXXFU.js.map} +0 -0
- /package/dist/{chunk-L2MG47NS.js.map → chunk-UCJDY73U.js.map} +0 -0
- /package/dist/{chunk-4WFO3NAS.js.map → chunk-WNAYBYSG.js.map} +0 -0
- /package/dist/{chunk-SIAMHUOB.js.map → chunk-WZ3Q7TTB.js.map} +0 -0
- /package/dist/{chunk-XK6JJEHJ.js.map → chunk-XGQQOMPO.js.map} +0 -0
- /package/dist/{configure-L4U26WFP.js.map → configure-LD5XC2MR.js.map} +0 -0
- /package/dist/{deploy-6JWXSMQJ.js.map → deploy-7Q7RRIXS.js.map} +0 -0
- /package/dist/{dev-M2PFPQXX.js.map → dev-MQ76B6CR.js.map} +0 -0
- /package/dist/{login-4F3H443A.js.map → login-XIEASAMY.js.map} +0 -0
- /package/dist/{logout-JA5JBU3G.js.map → logout-ACRXIJEF.js.map} +0 -0
- /package/dist/{open-TWQBAPIT.js.map → open-5CYXKN42.js.map} +0 -0
- /package/dist/{pull-VWGETR4M.js.map → pull-STASHXEL.js.map} +0 -0
- /package/dist/{push-KWUMHQCJ.js.map → push-6WUPKY5W.js.map} +0 -0
- /package/dist/{status-OYEFON4A.js.map → status-SB22V3DI.js.map} +0 -0
- /package/dist/{version-4QPNJ5VH.js.map → version-NZHW3VLV.js.map} +0 -0
- /package/dist/{whoami-TIGWXVEY.js.map → whoami-AA3ISE77.js.map} +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import{a as o,b as R,d as b,f as Se,h as c}from"./chunk-7DYQUG5M.js";var ce=b(Us=>{"use strict";c();Us.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((r,n)=>{e.push((s,i)=>s!=null?n(s):r(i)),t.apply(this,e)})},"name",{value:t.name})};Us.fromPromise=function(t){return Object.defineProperty(function(...e){let r=e[e.length-1];if(typeof r!="function")return t.apply(this,e);e.pop(),t.apply(this,e).then(n=>r(null,n),r)},"name",{value:t.name})}});var Iu=b((
|
|
2
|
-
GFS4: `),console.error(t)},"debug"));ne[De]||(qu=global[De]||[],zu(ne,qu),ne.close=function(t){function e(r,n){return t.call(ne,r,function(s){s||Hu(),typeof n=="function"&&n.apply(this,arguments)})}return o(e,"close"),Object.defineProperty(e,xn,{value:t}),e}(ne.close),ne.closeSync=function(t){function e(r){t.apply(ne,arguments),Hu()}return o(e,"closeSync"),Object.defineProperty(e,xn,{value:t}),e}(ne.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Rt(ne[De]),R("assert").equal(ne[De].length,0)}));var qu;global[De]||zu(global,ne[De]);zs.exports=qs(zp(ne));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!ne.__patched&&(zs.exports=qs(ne),ne.__patched=!0);function qs(t){qp(t),t.gracefulify=qs,t.createReadStream=U,t.createWriteStream=te;var e=t.readFile;t.readFile=r;function r(B,q,W){return typeof q=="function"&&(W=q,q=null),fe(B,q,W);function fe(he,ae,re,se){return e(he,ae,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?tr([fe,[he,ae,re],Y,se||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}o(fe,"go$readFile")}o(r,"readFile");var n=t.writeFile;t.writeFile=s;function s(B,q,W,fe){return typeof W=="function"&&(fe=W,W=null),he(B,q,W,fe);function he(ae,re,se,Y,de){return n(ae,re,se,function(X){X&&(X.code==="EMFILE"||X.code==="ENFILE")?tr([he,[ae,re,se,Y],X,de||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments)})}o(he,"go$writeFile")}o(s,"writeFile");var i=t.appendFile;i&&(t.appendFile=u);function u(B,q,W,fe){return typeof W=="function"&&(fe=W,W=null),he(B,q,W,fe);function he(ae,re,se,Y,de){return i(ae,re,se,function(X){X&&(X.code==="EMFILE"||X.code==="ENFILE")?tr([he,[ae,re,se,Y],X,de||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments)})}o(he,"go$appendFile")}o(u,"appendFile");var a=t.copyFile;a&&(t.copyFile=l);function l(B,q,W,fe){return typeof W=="function"&&(fe=W,W=0),he(B,q,W,fe);function he(ae,re,se,Y,de){return a(ae,re,se,function(X){X&&(X.code==="EMFILE"||X.code==="ENFILE")?tr([he,[ae,re,se,Y],X,de||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments)})}o(he,"go$copyFile")}o(l,"copyFile");var f=t.readdir;t.readdir=g;var h=/^v[0-5]\./;function g(B,q,W){typeof q=="function"&&(W=q,q=null);var fe=h.test(process.version)?o(function(re,se,Y,de){return f(re,he(re,se,Y,de))},"go$readdir"):o(function(re,se,Y,de){return f(re,se,he(re,se,Y,de))},"go$readdir");return fe(B,q,W);function he(ae,re,se,Y){return function(de,X){de&&(de.code==="EMFILE"||de.code==="ENFILE")?tr([fe,[ae,re,se],de,Y||Date.now(),Date.now()]):(X&&X.sort&&X.sort(),typeof se=="function"&&se.call(this,de,X))}}}if(o(g,"readdir"),process.version.substr(0,4)==="v0.8"){var m=Hp(t);F=m.ReadStream,S=m.WriteStream}var y=t.ReadStream;y&&(F.prototype=Object.create(y.prototype),F.prototype.open=O);var E=t.WriteStream;E&&(S.prototype=Object.create(E.prototype),S.prototype.open=k),Object.defineProperty(t,"ReadStream",{get:o(function(){return F},"get"),set:o(function(B){F=B},"set"),enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:o(function(){return S},"get"),set:o(function(B){S=B},"set"),enumerable:!0,configurable:!0});var D=F;Object.defineProperty(t,"FileReadStream",{get:o(function(){return D},"get"),set:o(function(B){D=B},"set"),enumerable:!0,configurable:!0});var C=S;Object.defineProperty(t,"FileWriteStream",{get:o(function(){return C},"get"),set:o(function(B){C=B},"set"),enumerable:!0,configurable:!0});function F(B,q){return this instanceof F?(y.apply(this,arguments),this):F.apply(Object.create(F.prototype),arguments)}o(F,"ReadStream");function O(){var B=this;Ue(B.path,B.flags,B.mode,function(q,W){q?(B.autoClose&&B.destroy(),B.emit("error",q)):(B.fd=W,B.emit("open",W),B.read())})}o(O,"ReadStream$open");function S(B,q){return this instanceof S?(E.apply(this,arguments),this):S.apply(Object.create(S.prototype),arguments)}o(S,"WriteStream");function k(){var B=this;Ue(B.path,B.flags,B.mode,function(q,W){q?(B.destroy(),B.emit("error",q)):(B.fd=W,B.emit("open",W))})}o(k,"WriteStream$open");function U(B,q){return new t.ReadStream(B,q)}o(U,"createReadStream");function te(B,q){return new t.WriteStream(B,q)}o(te,"createWriteStream");var ue=t.open;t.open=Ue;function Ue(B,q,W,fe){return typeof W=="function"&&(fe=W,W=null),he(B,q,W,fe);function he(ae,re,se,Y,de){return ue(ae,re,se,function(X,jb){X&&(X.code==="EMFILE"||X.code==="ENFILE")?tr([he,[ae,re,se,Y],X,de||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments)})}o(he,"go$open")}return o(Ue,"open"),t}o(qs,"patch");function tr(t){Rt("ENQUEUE",t[0].name,t[1]),ne[De].push(t),Hs()}o(tr,"enqueue");var _n;function Hu(){for(var t=Date.now(),e=0;e<ne[De].length;++e)ne[De][e].length>2&&(ne[De][e][3]=t,ne[De][e][4]=t);Hs()}o(Hu,"resetQueue");function Hs(){if(clearTimeout(_n),_n=void 0,ne[De].length!==0){var t=ne[De].shift(),e=t[0],r=t[1],n=t[2],s=t[3],i=t[4];if(s===void 0)Rt("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-s>=6e4){Rt("TIMEOUT",e.name,r);var u=r.pop();typeof u=="function"&&u.call(null,n)}else{var a=Date.now()-i,l=Math.max(i-s,1),f=Math.min(l*1.2,100);a>=f?(Rt("RETRY",e.name,r),e.apply(null,r.concat([s]))):ne[De].push(t)}_n===void 0&&(_n=setTimeout(Hs,0))}}o(Hs,"retry")});var Ce=b(Ke=>{"use strict";c();var Wu=ce().fromCallback,Fe=rr(),Vp=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(t=>typeof Fe[t]=="function");Object.assign(Ke,Fe);Vp.forEach(t=>{Ke[t]=Wu(Fe[t])});Ke.exists=function(t,e){return typeof e=="function"?Fe.exists(t,e):new Promise(r=>Fe.exists(t,r))};Ke.read=function(t,e,r,n,s,i){return typeof i=="function"?Fe.read(t,e,r,n,s,i):new Promise((u,a)=>{Fe.read(t,e,r,n,s,(l,f,h)=>{if(l)return a(l);u({bytesRead:f,buffer:h})})})};Ke.write=function(t,e,...r){return typeof r[r.length-1]=="function"?Fe.write(t,e,...r):new Promise((n,s)=>{Fe.write(t,e,...r,(i,u,a)=>{if(i)return s(i);n({bytesWritten:u,buffer:a})})})};Ke.readv=function(t,e,...r){return typeof r[r.length-1]=="function"?Fe.readv(t,e,...r):new Promise((n,s)=>{Fe.readv(t,e,...r,(i,u,a)=>{if(i)return s(i);n({bytesRead:u,buffers:a})})})};Ke.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?Fe.writev(t,e,...r):new Promise((n,s)=>{Fe.writev(t,e,...r,(i,u,a)=>{if(i)return s(i);n({bytesWritten:u,buffers:a})})})};typeof Fe.realpath.native=="function"?Ke.realpath.native=Wu(Fe.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var Zu=b((O_,Vu)=>{"use strict";c();var Zp=R("path");Vu.exports.checkPath=o(function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(Zp.parse(e).root,""))){let n=new Error(`Path contains invalid characters: ${e}`);throw n.code="EINVAL",n}},"checkPath")});var Xu=b((R_,Ws)=>{"use strict";c();var Yu=Ce(),{checkPath:Ju}=Zu(),Ku=o(t=>{let e={mode:511};return typeof t=="number"?t:{...e,...t}.mode},"getMode");Ws.exports.makeDir=async(t,e)=>(Ju(t),Yu.mkdir(t,{mode:Ku(e),recursive:!0}));Ws.exports.makeDirSync=(t,e)=>(Ju(t),Yu.mkdirSync(t,{mode:Ku(e),recursive:!0}))});var $e=b((I_,Qu)=>{"use strict";c();var Yp=ce().fromPromise,{makeDir:Jp,makeDirSync:Vs}=Xu(),Zs=Yp(Jp);Qu.exports={mkdirs:Zs,mkdirsSync:Vs,mkdirp:Zs,mkdirpSync:Vs,ensureDir:Zs,ensureDirSync:Vs}});var it=b((j_,ta)=>{"use strict";c();var Kp=ce().fromPromise,ea=Ce();function Xp(t){return ea.access(t).then(()=>!0).catch(()=>!1)}o(Xp,"pathExists");ta.exports={pathExists:Kp(Xp),pathExistsSync:ea.existsSync}});var Ys=b((G_,ra)=>{"use strict";c();var nr=Ce(),Qp=ce().fromPromise;async function em(t,e,r){let n=await nr.open(t,"r+"),s=null;try{await nr.futimes(n,e,r)}finally{try{await nr.close(n)}catch(i){s=i}}if(s)throw s}o(em,"utimesMillis");function tm(t,e,r){let n=nr.openSync(t,"r+");return nr.futimesSync(n,e,r),nr.closeSync(n)}o(tm,"utimesMillisSync");ra.exports={utimesMillis:Qp(em),utimesMillisSync:tm}});var Bt=b((z_,oa)=>{"use strict";c();var sr=Ce(),le=R("path"),na=ce().fromPromise;function rm(t,e,r){let n=r.dereference?s=>sr.stat(s,{bigint:!0}):s=>sr.lstat(s,{bigint:!0});return Promise.all([n(t),n(e).catch(s=>{if(s.code==="ENOENT")return null;throw s})]).then(([s,i])=>({srcStat:s,destStat:i}))}o(rm,"getStats");function nm(t,e,r){let n,s=r.dereference?u=>sr.statSync(u,{bigint:!0}):u=>sr.lstatSync(u,{bigint:!0}),i=s(t);try{n=s(e)}catch(u){if(u.code==="ENOENT")return{srcStat:i,destStat:null};throw u}return{srcStat:i,destStat:n}}o(nm,"getStatsSync");async function sm(t,e,r,n){let{srcStat:s,destStat:i}=await rm(t,e,n);if(i){if(kr(s,i)){let u=le.basename(t),a=le.basename(e);if(r==="move"&&u!==a&&u.toLowerCase()===a.toLowerCase())return{srcStat:s,destStat:i,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(s.isDirectory()&&!i.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!s.isDirectory()&&i.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(s.isDirectory()&&Js(t,e))throw new Error(Sn(t,e,r));return{srcStat:s,destStat:i}}o(sm,"checkPaths");function im(t,e,r,n){let{srcStat:s,destStat:i}=nm(t,e,n);if(i){if(kr(s,i)){let u=le.basename(t),a=le.basename(e);if(r==="move"&&u!==a&&u.toLowerCase()===a.toLowerCase())return{srcStat:s,destStat:i,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(s.isDirectory()&&!i.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!s.isDirectory()&&i.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(s.isDirectory()&&Js(t,e))throw new Error(Sn(t,e,r));return{srcStat:s,destStat:i}}o(im,"checkPathsSync");async function sa(t,e,r,n){let s=le.resolve(le.dirname(t)),i=le.resolve(le.dirname(r));if(i===s||i===le.parse(i).root)return;let u;try{u=await sr.stat(i,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(kr(e,u))throw new Error(Sn(t,r,n));return sa(t,e,i,n)}o(sa,"checkParentPaths");function ia(t,e,r,n){let s=le.resolve(le.dirname(t)),i=le.resolve(le.dirname(r));if(i===s||i===le.parse(i).root)return;let u;try{u=sr.statSync(i,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(kr(e,u))throw new Error(Sn(t,r,n));return ia(t,e,i,n)}o(ia,"checkParentPathsSync");function kr(t,e){return e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev}o(kr,"areIdentical");function Js(t,e){let r=le.resolve(t).split(le.sep).filter(s=>s),n=le.resolve(e).split(le.sep).filter(s=>s);return r.every((s,i)=>n[i]===s)}o(Js,"isSrcSubdir");function Sn(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}o(Sn,"errMsg");oa.exports={checkPaths:na(sm),checkPathsSync:im,checkParentPaths:na(sa),checkParentPathsSync:ia,isSrcSubdir:Js,areIdentical:kr}});var fa=b((Z_,la)=>{"use strict";c();var ge=Ce(),Rr=R("path"),{mkdirs:om}=$e(),{pathExists:um}=it(),{utimesMillis:am}=Ys(),Br=Bt();async function cm(t,e,r={}){typeof r=="function"&&(r={filter:r}),r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
1
|
+
import{a as o,b as R,d as b,f as Se,h as c}from"./chunk-7DYQUG5M.js";var ce=b(Us=>{"use strict";c();Us.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((r,n)=>{e.push((s,i)=>s!=null?n(s):r(i)),t.apply(this,e)})},"name",{value:t.name})};Us.fromPromise=function(t){return Object.defineProperty(function(...e){let r=e[e.length-1];if(typeof r!="function")return t.apply(this,e);e.pop(),t.apply(this,e).then(n=>r(null,n),r)},"name",{value:t.name})}});var Iu=b((g_,Nu)=>{c();var st=R("constants"),Ip=process.cwd,bn=null,$p=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return bn||(bn=Ip.call(process)),bn};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Gs=process.chdir,process.chdir=function(t){bn=null,Gs.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Gs));var Gs;Nu.exports=jp;function jp(t){st.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=i(t.chown),t.fchown=i(t.fchown),t.lchown=i(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=u(t.chownSync),t.fchownSync=u(t.fchownSync),t.lchownSync=u(t.lchownSync),t.chmodSync=s(t.chmodSync),t.fchmodSync=s(t.fchmodSync),t.lchmodSync=s(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=l(t.statSync),t.fstatSync=l(t.fstatSync),t.lstatSync=l(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(h,g,m){m&&process.nextTick(m)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(h,g,m,y){y&&process.nextTick(y)},t.lchownSync=function(){}),$p==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(h){function g(m,y,E){var D=Date.now(),C=0;h(m,y,o(function F(O){if(O&&(O.code==="EACCES"||O.code==="EPERM"||O.code==="EBUSY")&&Date.now()-D<6e4){setTimeout(function(){t.stat(y,function(S,k){S&&S.code==="ENOENT"?h(m,y,F):E(O)})},C),C<100&&(C+=10);return}E&&E(O)},"CB"))}return o(g,"rename"),Object.setPrototypeOf&&Object.setPrototypeOf(g,h),g}(t.rename)),t.read=typeof t.read!="function"?t.read:function(h){function g(m,y,E,D,C,F){var O;if(F&&typeof F=="function"){var S=0;O=o(function(k,U,te){if(k&&k.code==="EAGAIN"&&S<10)return S++,h.call(t,m,y,E,D,C,O);F.apply(this,arguments)},"callback")}return h.call(t,m,y,E,D,C,O)}return o(g,"read"),Object.setPrototypeOf&&Object.setPrototypeOf(g,h),g}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(h){return function(g,m,y,E,D){for(var C=0;;)try{return h.call(t,g,m,y,E,D)}catch(F){if(F.code==="EAGAIN"&&C<10){C++;continue}throw F}}}(t.readSync);function e(h){h.lchmod=function(g,m,y){h.open(g,st.O_WRONLY|st.O_SYMLINK,m,function(E,D){if(E){y&&y(E);return}h.fchmod(D,m,function(C){h.close(D,function(F){y&&y(C||F)})})})},h.lchmodSync=function(g,m){var y=h.openSync(g,st.O_WRONLY|st.O_SYMLINK,m),E=!0,D;try{D=h.fchmodSync(y,m),E=!1}finally{if(E)try{h.closeSync(y)}catch{}else h.closeSync(y)}return D}}o(e,"patchLchmod");function r(h){st.hasOwnProperty("O_SYMLINK")&&h.futimes?(h.lutimes=function(g,m,y,E){h.open(g,st.O_SYMLINK,function(D,C){if(D){E&&E(D);return}h.futimes(C,m,y,function(F){h.close(C,function(O){E&&E(F||O)})})})},h.lutimesSync=function(g,m,y){var E=h.openSync(g,st.O_SYMLINK),D,C=!0;try{D=h.futimesSync(E,m,y),C=!1}finally{if(C)try{h.closeSync(E)}catch{}else h.closeSync(E)}return D}):h.futimes&&(h.lutimes=function(g,m,y,E){E&&process.nextTick(E)},h.lutimesSync=function(){})}o(r,"patchLutimes");function n(h){return h&&function(g,m,y){return h.call(t,g,m,function(E){f(E)&&(E=null),y&&y.apply(this,arguments)})}}o(n,"chmodFix");function s(h){return h&&function(g,m){try{return h.call(t,g,m)}catch(y){if(!f(y))throw y}}}o(s,"chmodFixSync");function i(h){return h&&function(g,m,y,E){return h.call(t,g,m,y,function(D){f(D)&&(D=null),E&&E.apply(this,arguments)})}}o(i,"chownFix");function u(h){return h&&function(g,m,y){try{return h.call(t,g,m,y)}catch(E){if(!f(E))throw E}}}o(u,"chownFixSync");function a(h){return h&&function(g,m,y){typeof m=="function"&&(y=m,m=null);function E(D,C){C&&(C.uid<0&&(C.uid+=4294967296),C.gid<0&&(C.gid+=4294967296)),y&&y.apply(this,arguments)}return o(E,"callback"),m?h.call(t,g,m,E):h.call(t,g,E)}}o(a,"statFix");function l(h){return h&&function(g,m){var y=m?h.call(t,g,m):h.call(t,g);return y&&(y.uid<0&&(y.uid+=4294967296),y.gid<0&&(y.gid+=4294967296)),y}}o(l,"statFixSync");function f(h){if(!h||h.code==="ENOSYS")return!0;var g=!process.getuid||process.getuid()!==0;return!!(g&&(h.code==="EINVAL"||h.code==="EPERM"))}o(f,"chownErOk")}o(jp,"patch")});var Mu=b((C_,ju)=>{c();var $u=R("stream").Stream;ju.exports=Mp;function Mp(t){return{ReadStream:e,WriteStream:r};function e(n,s){if(!(this instanceof e))return new e(n,s);$u.call(this);var i=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,s=s||{};for(var u=Object.keys(s),a=0,l=u.length;a<l;a++){var f=u[a];this[f]=s[f]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){i._read()});return}t.open(this.path,this.flags,this.mode,function(h,g){if(h){i.emit("error",h),i.readable=!1;return}i.fd=g,i.emit("open",g),i._read()})}function r(n,s){if(!(this instanceof r))return new r(n,s);$u.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,s=s||{};for(var i=Object.keys(s),u=0,a=i.length;u<a;u++){var l=i[u];this[l]=s[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}o(Mp,"legacy")});var Gu=b((__,Uu)=>{"use strict";c();Uu.exports=Gp;var Up=Object.getPrototypeOf||function(t){return t.__proto__};function Gp(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:Up(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}o(Gp,"clone")});var rr=b((v_,zs)=>{c();var ne=R("fs"),qp=Iu(),Hp=Mu(),zp=Gu(),wn=R("util"),De,xn;typeof Symbol=="function"&&typeof Symbol.for=="function"?(De=Symbol.for("graceful-fs.queue"),xn=Symbol.for("graceful-fs.previous")):(De="___graceful-fs.queue",xn="___graceful-fs.previous");function Wp(){}o(Wp,"noop");function zu(t,e){Object.defineProperty(t,De,{get:o(function(){return e},"get")})}o(zu,"publishQueue");var Rt=Wp;wn.debuglog?Rt=wn.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Rt=o(function(){var t=wn.format.apply(wn,arguments);t="GFS4: "+t.split(/\n/).join(`
|
|
2
|
+
GFS4: `),console.error(t)},"debug"));ne[De]||(qu=global[De]||[],zu(ne,qu),ne.close=function(t){function e(r,n){return t.call(ne,r,function(s){s||Hu(),typeof n=="function"&&n.apply(this,arguments)})}return o(e,"close"),Object.defineProperty(e,xn,{value:t}),e}(ne.close),ne.closeSync=function(t){function e(r){t.apply(ne,arguments),Hu()}return o(e,"closeSync"),Object.defineProperty(e,xn,{value:t}),e}(ne.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Rt(ne[De]),R("assert").equal(ne[De].length,0)}));var qu;global[De]||zu(global,ne[De]);zs.exports=qs(zp(ne));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!ne.__patched&&(zs.exports=qs(ne),ne.__patched=!0);function qs(t){qp(t),t.gracefulify=qs,t.createReadStream=U,t.createWriteStream=te;var e=t.readFile;t.readFile=r;function r(B,H,W){return typeof H=="function"&&(W=H,H=null),fe(B,H,W);function fe(he,ae,re,se){return e(he,ae,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?tr([fe,[he,ae,re],Y,se||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}o(fe,"go$readFile")}o(r,"readFile");var n=t.writeFile;t.writeFile=s;function s(B,H,W,fe){return typeof W=="function"&&(fe=W,W=null),he(B,H,W,fe);function he(ae,re,se,Y,de){return n(ae,re,se,function(X){X&&(X.code==="EMFILE"||X.code==="ENFILE")?tr([he,[ae,re,se,Y],X,de||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments)})}o(he,"go$writeFile")}o(s,"writeFile");var i=t.appendFile;i&&(t.appendFile=u);function u(B,H,W,fe){return typeof W=="function"&&(fe=W,W=null),he(B,H,W,fe);function he(ae,re,se,Y,de){return i(ae,re,se,function(X){X&&(X.code==="EMFILE"||X.code==="ENFILE")?tr([he,[ae,re,se,Y],X,de||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments)})}o(he,"go$appendFile")}o(u,"appendFile");var a=t.copyFile;a&&(t.copyFile=l);function l(B,H,W,fe){return typeof W=="function"&&(fe=W,W=0),he(B,H,W,fe);function he(ae,re,se,Y,de){return a(ae,re,se,function(X){X&&(X.code==="EMFILE"||X.code==="ENFILE")?tr([he,[ae,re,se,Y],X,de||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments)})}o(he,"go$copyFile")}o(l,"copyFile");var f=t.readdir;t.readdir=g;var h=/^v[0-5]\./;function g(B,H,W){typeof H=="function"&&(W=H,H=null);var fe=h.test(process.version)?o(function(re,se,Y,de){return f(re,he(re,se,Y,de))},"go$readdir"):o(function(re,se,Y,de){return f(re,se,he(re,se,Y,de))},"go$readdir");return fe(B,H,W);function he(ae,re,se,Y){return function(de,X){de&&(de.code==="EMFILE"||de.code==="ENFILE")?tr([fe,[ae,re,se],de,Y||Date.now(),Date.now()]):(X&&X.sort&&X.sort(),typeof se=="function"&&se.call(this,de,X))}}}if(o(g,"readdir"),process.version.substr(0,4)==="v0.8"){var m=Hp(t);F=m.ReadStream,S=m.WriteStream}var y=t.ReadStream;y&&(F.prototype=Object.create(y.prototype),F.prototype.open=O);var E=t.WriteStream;E&&(S.prototype=Object.create(E.prototype),S.prototype.open=k),Object.defineProperty(t,"ReadStream",{get:o(function(){return F},"get"),set:o(function(B){F=B},"set"),enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:o(function(){return S},"get"),set:o(function(B){S=B},"set"),enumerable:!0,configurable:!0});var D=F;Object.defineProperty(t,"FileReadStream",{get:o(function(){return D},"get"),set:o(function(B){D=B},"set"),enumerable:!0,configurable:!0});var C=S;Object.defineProperty(t,"FileWriteStream",{get:o(function(){return C},"get"),set:o(function(B){C=B},"set"),enumerable:!0,configurable:!0});function F(B,H){return this instanceof F?(y.apply(this,arguments),this):F.apply(Object.create(F.prototype),arguments)}o(F,"ReadStream");function O(){var B=this;Ue(B.path,B.flags,B.mode,function(H,W){H?(B.autoClose&&B.destroy(),B.emit("error",H)):(B.fd=W,B.emit("open",W),B.read())})}o(O,"ReadStream$open");function S(B,H){return this instanceof S?(E.apply(this,arguments),this):S.apply(Object.create(S.prototype),arguments)}o(S,"WriteStream");function k(){var B=this;Ue(B.path,B.flags,B.mode,function(H,W){H?(B.destroy(),B.emit("error",H)):(B.fd=W,B.emit("open",W))})}o(k,"WriteStream$open");function U(B,H){return new t.ReadStream(B,H)}o(U,"createReadStream");function te(B,H){return new t.WriteStream(B,H)}o(te,"createWriteStream");var ue=t.open;t.open=Ue;function Ue(B,H,W,fe){return typeof W=="function"&&(fe=W,W=null),he(B,H,W,fe);function he(ae,re,se,Y,de){return ue(ae,re,se,function(X,jb){X&&(X.code==="EMFILE"||X.code==="ENFILE")?tr([he,[ae,re,se,Y],X,de||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments)})}o(he,"go$open")}return o(Ue,"open"),t}o(qs,"patch");function tr(t){Rt("ENQUEUE",t[0].name,t[1]),ne[De].push(t),Hs()}o(tr,"enqueue");var _n;function Hu(){for(var t=Date.now(),e=0;e<ne[De].length;++e)ne[De][e].length>2&&(ne[De][e][3]=t,ne[De][e][4]=t);Hs()}o(Hu,"resetQueue");function Hs(){if(clearTimeout(_n),_n=void 0,ne[De].length!==0){var t=ne[De].shift(),e=t[0],r=t[1],n=t[2],s=t[3],i=t[4];if(s===void 0)Rt("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-s>=6e4){Rt("TIMEOUT",e.name,r);var u=r.pop();typeof u=="function"&&u.call(null,n)}else{var a=Date.now()-i,l=Math.max(i-s,1),f=Math.min(l*1.2,100);a>=f?(Rt("RETRY",e.name,r),e.apply(null,r.concat([s]))):ne[De].push(t)}_n===void 0&&(_n=setTimeout(Hs,0))}}o(Hs,"retry")});var Ce=b(Ke=>{"use strict";c();var Wu=ce().fromCallback,Fe=rr(),Vp=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(t=>typeof Fe[t]=="function");Object.assign(Ke,Fe);Vp.forEach(t=>{Ke[t]=Wu(Fe[t])});Ke.exists=function(t,e){return typeof e=="function"?Fe.exists(t,e):new Promise(r=>Fe.exists(t,r))};Ke.read=function(t,e,r,n,s,i){return typeof i=="function"?Fe.read(t,e,r,n,s,i):new Promise((u,a)=>{Fe.read(t,e,r,n,s,(l,f,h)=>{if(l)return a(l);u({bytesRead:f,buffer:h})})})};Ke.write=function(t,e,...r){return typeof r[r.length-1]=="function"?Fe.write(t,e,...r):new Promise((n,s)=>{Fe.write(t,e,...r,(i,u,a)=>{if(i)return s(i);n({bytesWritten:u,buffer:a})})})};Ke.readv=function(t,e,...r){return typeof r[r.length-1]=="function"?Fe.readv(t,e,...r):new Promise((n,s)=>{Fe.readv(t,e,...r,(i,u,a)=>{if(i)return s(i);n({bytesRead:u,buffers:a})})})};Ke.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?Fe.writev(t,e,...r):new Promise((n,s)=>{Fe.writev(t,e,...r,(i,u,a)=>{if(i)return s(i);n({bytesWritten:u,buffers:a})})})};typeof Fe.realpath.native=="function"?Ke.realpath.native=Wu(Fe.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var Zu=b((P_,Vu)=>{"use strict";c();var Zp=R("path");Vu.exports.checkPath=o(function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(Zp.parse(e).root,""))){let n=new Error(`Path contains invalid characters: ${e}`);throw n.code="EINVAL",n}},"checkPath")});var Xu=b((B_,Ws)=>{"use strict";c();var Yu=Ce(),{checkPath:Ju}=Zu(),Ku=o(t=>{let e={mode:511};return typeof t=="number"?t:{...e,...t}.mode},"getMode");Ws.exports.makeDir=async(t,e)=>(Ju(t),Yu.mkdir(t,{mode:Ku(e),recursive:!0}));Ws.exports.makeDirSync=(t,e)=>(Ju(t),Yu.mkdirSync(t,{mode:Ku(e),recursive:!0}))});var $e=b(($_,Qu)=>{"use strict";c();var Yp=ce().fromPromise,{makeDir:Jp,makeDirSync:Vs}=Xu(),Zs=Yp(Jp);Qu.exports={mkdirs:Zs,mkdirsSync:Vs,mkdirp:Zs,mkdirpSync:Vs,ensureDir:Zs,ensureDirSync:Vs}});var it=b((M_,ta)=>{"use strict";c();var Kp=ce().fromPromise,ea=Ce();function Xp(t){return ea.access(t).then(()=>!0).catch(()=>!1)}o(Xp,"pathExists");ta.exports={pathExists:Kp(Xp),pathExistsSync:ea.existsSync}});var Ys=b((q_,ra)=>{"use strict";c();var nr=Ce(),Qp=ce().fromPromise;async function em(t,e,r){let n=await nr.open(t,"r+"),s=null;try{await nr.futimes(n,e,r)}finally{try{await nr.close(n)}catch(i){s=i}}if(s)throw s}o(em,"utimesMillis");function tm(t,e,r){let n=nr.openSync(t,"r+");return nr.futimesSync(n,e,r),nr.closeSync(n)}o(tm,"utimesMillisSync");ra.exports={utimesMillis:Qp(em),utimesMillisSync:tm}});var Bt=b((W_,oa)=>{"use strict";c();var sr=Ce(),le=R("path"),na=ce().fromPromise;function rm(t,e,r){let n=r.dereference?s=>sr.stat(s,{bigint:!0}):s=>sr.lstat(s,{bigint:!0});return Promise.all([n(t),n(e).catch(s=>{if(s.code==="ENOENT")return null;throw s})]).then(([s,i])=>({srcStat:s,destStat:i}))}o(rm,"getStats");function nm(t,e,r){let n,s=r.dereference?u=>sr.statSync(u,{bigint:!0}):u=>sr.lstatSync(u,{bigint:!0}),i=s(t);try{n=s(e)}catch(u){if(u.code==="ENOENT")return{srcStat:i,destStat:null};throw u}return{srcStat:i,destStat:n}}o(nm,"getStatsSync");async function sm(t,e,r,n){let{srcStat:s,destStat:i}=await rm(t,e,n);if(i){if(kr(s,i)){let u=le.basename(t),a=le.basename(e);if(r==="move"&&u!==a&&u.toLowerCase()===a.toLowerCase())return{srcStat:s,destStat:i,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(s.isDirectory()&&!i.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!s.isDirectory()&&i.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(s.isDirectory()&&Js(t,e))throw new Error(Sn(t,e,r));return{srcStat:s,destStat:i}}o(sm,"checkPaths");function im(t,e,r,n){let{srcStat:s,destStat:i}=nm(t,e,n);if(i){if(kr(s,i)){let u=le.basename(t),a=le.basename(e);if(r==="move"&&u!==a&&u.toLowerCase()===a.toLowerCase())return{srcStat:s,destStat:i,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(s.isDirectory()&&!i.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!s.isDirectory()&&i.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(s.isDirectory()&&Js(t,e))throw new Error(Sn(t,e,r));return{srcStat:s,destStat:i}}o(im,"checkPathsSync");async function sa(t,e,r,n){let s=le.resolve(le.dirname(t)),i=le.resolve(le.dirname(r));if(i===s||i===le.parse(i).root)return;let u;try{u=await sr.stat(i,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(kr(e,u))throw new Error(Sn(t,r,n));return sa(t,e,i,n)}o(sa,"checkParentPaths");function ia(t,e,r,n){let s=le.resolve(le.dirname(t)),i=le.resolve(le.dirname(r));if(i===s||i===le.parse(i).root)return;let u;try{u=sr.statSync(i,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(kr(e,u))throw new Error(Sn(t,r,n));return ia(t,e,i,n)}o(ia,"checkParentPathsSync");function kr(t,e){return e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev}o(kr,"areIdentical");function Js(t,e){let r=le.resolve(t).split(le.sep).filter(s=>s),n=le.resolve(e).split(le.sep).filter(s=>s);return r.every((s,i)=>n[i]===s)}o(Js,"isSrcSubdir");function Sn(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}o(Sn,"errMsg");oa.exports={checkPaths:na(sm),checkPathsSync:im,checkParentPaths:na(sa),checkParentPathsSync:ia,isSrcSubdir:Js,areIdentical:kr}});var fa=b((Y_,la)=>{"use strict";c();var ge=Ce(),Rr=R("path"),{mkdirs:om}=$e(),{pathExists:um}=it(),{utimesMillis:am}=Ys(),Br=Bt();async function cm(t,e,r={}){typeof r=="function"&&(r={filter:r}),r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
3
3
|
|
|
4
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:n,destStat:s}=await Br.checkPaths(t,e,"copy",r);if(await Br.checkParentPaths(t,n,e,"copy"),!await aa(t,e,r))return;let u=Rr.dirname(e);await um(u)||await om(u),await ca(s,t,e,r)}o(cm,"copy");async function aa(t,e,r){return r.filter?r.filter(t,e):!0}o(aa,"runFilter");async function ca(t,e,r,n){let i=await(n.dereference?ge.stat:ge.lstat)(e);if(i.isDirectory())return dm(i,t,e,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return lm(i,t,e,r,n);if(i.isSymbolicLink())return Dm(t,e,r,n);throw i.isSocket()?new Error(`Cannot copy a socket file: ${e}`):i.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}o(ca,"getStatsAndPerformCopy");async function lm(t,e,r,n,s){if(!e)return ua(t,r,n,s);if(s.overwrite)return await ge.unlink(n),ua(t,r,n,s);if(s.errorOnExist)throw new Error(`'${n}' already exists`)}o(lm,"onFile");async function ua(t,e,r,n){if(await ge.copyFile(e,r),n.preserveTimestamps){fm(t.mode)&&await hm(r,t.mode);let s=await ge.stat(e);await am(r,s.atime,s.mtime)}return ge.chmod(r,t.mode)}o(ua,"copyFile");function fm(t){return(t&128)===0}o(fm,"fileIsNotWritable");function hm(t,e){return ge.chmod(t,e|128)}o(hm,"makeFileWritable");async function dm(t,e,r,n,s){e||await ge.mkdir(n);let i=[];for await(let u of await ge.opendir(r)){let a=Rr.join(r,u.name),l=Rr.join(n,u.name);i.push(aa(a,l,s).then(f=>{if(f)return Br.checkPaths(a,l,"copy",s).then(({destStat:h})=>ca(h,a,l,s))}))}await Promise.all(i),e||await ge.chmod(n,t.mode)}o(dm,"onDir");async function Dm(t,e,r,n){let s=await ge.readlink(e);if(n.dereference&&(s=Rr.resolve(process.cwd(),s)),!t)return ge.symlink(s,r);let i=null;try{i=await ge.readlink(r)}catch(u){if(u.code==="EINVAL"||u.code==="UNKNOWN")return ge.symlink(s,r);throw u}if(n.dereference&&(i=Rr.resolve(process.cwd(),i)),Br.isSrcSubdir(s,i))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${i}'.`);if(Br.isSrcSubdir(i,s))throw new Error(`Cannot overwrite '${i}' with '${s}'.`);return await ge.unlink(r),ge.symlink(s,r)}o(Dm,"onLink");la.exports=cm});var ma=b((
|
|
4
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:n,destStat:s}=await Br.checkPaths(t,e,"copy",r);if(await Br.checkParentPaths(t,n,e,"copy"),!await aa(t,e,r))return;let u=Rr.dirname(e);await um(u)||await om(u),await ca(s,t,e,r)}o(cm,"copy");async function aa(t,e,r){return r.filter?r.filter(t,e):!0}o(aa,"runFilter");async function ca(t,e,r,n){let i=await(n.dereference?ge.stat:ge.lstat)(e);if(i.isDirectory())return dm(i,t,e,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return lm(i,t,e,r,n);if(i.isSymbolicLink())return Dm(t,e,r,n);throw i.isSocket()?new Error(`Cannot copy a socket file: ${e}`):i.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}o(ca,"getStatsAndPerformCopy");async function lm(t,e,r,n,s){if(!e)return ua(t,r,n,s);if(s.overwrite)return await ge.unlink(n),ua(t,r,n,s);if(s.errorOnExist)throw new Error(`'${n}' already exists`)}o(lm,"onFile");async function ua(t,e,r,n){if(await ge.copyFile(e,r),n.preserveTimestamps){fm(t.mode)&&await hm(r,t.mode);let s=await ge.stat(e);await am(r,s.atime,s.mtime)}return ge.chmod(r,t.mode)}o(ua,"copyFile");function fm(t){return(t&128)===0}o(fm,"fileIsNotWritable");function hm(t,e){return ge.chmod(t,e|128)}o(hm,"makeFileWritable");async function dm(t,e,r,n,s){e||await ge.mkdir(n);let i=[];for await(let u of await ge.opendir(r)){let a=Rr.join(r,u.name),l=Rr.join(n,u.name);i.push(aa(a,l,s).then(f=>{if(f)return Br.checkPaths(a,l,"copy",s).then(({destStat:h})=>ca(h,a,l,s))}))}await Promise.all(i),e||await ge.chmod(n,t.mode)}o(dm,"onDir");async function Dm(t,e,r,n){let s=await ge.readlink(e);if(n.dereference&&(s=Rr.resolve(process.cwd(),s)),!t)return ge.symlink(s,r);let i=null;try{i=await ge.readlink(r)}catch(u){if(u.code==="EINVAL"||u.code==="UNKNOWN")return ge.symlink(s,r);throw u}if(n.dereference&&(i=Rr.resolve(process.cwd(),i)),Br.isSrcSubdir(s,i))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${i}'.`);if(Br.isSrcSubdir(i,s))throw new Error(`Cannot overwrite '${i}' with '${s}'.`);return await ge.unlink(r),ge.symlink(s,r)}o(Dm,"onLink");la.exports=cm});var ma=b((X_,pa)=>{"use strict";c();var be=rr(),Nr=R("path"),pm=$e().mkdirsSync,mm=Ys().utimesMillisSync,Ir=Bt();function ym(t,e,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
5
5
|
|
|
6
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:n,destStat:s}=Ir.checkPathsSync(t,e,"copy",r);if(Ir.checkParentPathsSync(t,n,e,"copy"),r.filter&&!r.filter(t,e))return;let i=Nr.dirname(e);return be.existsSync(i)||pm(i),ha(s,t,e,r)}o(ym,"copySync");function ha(t,e,r,n){let i=(n.dereference?be.statSync:be.lstatSync)(e);if(i.isDirectory())return _m(i,t,e,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return gm(i,t,e,r,n);if(i.isSymbolicLink())return vm(t,e,r,n);throw i.isSocket()?new Error(`Cannot copy a socket file: ${e}`):i.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}o(ha,"getStats");function gm(t,e,r,n,s){return e?Em(t,r,n,s):da(t,r,n,s)}o(gm,"onFile");function Em(t,e,r,n){if(n.overwrite)return be.unlinkSync(r),da(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}o(Em,"mayCopyFile");function da(t,e,r,n){return be.copyFileSync(e,r),n.preserveTimestamps&&Fm(t.mode,e,r),Ks(r,t.mode)}o(da,"copyFile");function Fm(t,e,r){return Cm(t)&&bm(r,t),wm(e,r)}o(Fm,"handleTimestamps");function Cm(t){return(t&128)===0}o(Cm,"fileIsNotWritable");function bm(t,e){return Ks(t,e|128)}o(bm,"makeFileWritable");function Ks(t,e){return be.chmodSync(t,e)}o(Ks,"setDestMode");function wm(t,e){let r=be.statSync(t);return mm(e,r.atime,r.mtime)}o(wm,"setDestTimestamps");function _m(t,e,r,n,s){return e?Da(r,n,s):xm(t.mode,r,n,s)}o(_m,"onDir");function xm(t,e,r,n){return be.mkdirSync(r),Da(e,r,n),Ks(r,t)}o(xm,"mkDirAndCopy");function Da(t,e,r){let n=be.opendirSync(t);try{let s;for(;(s=n.readSync())!==null;)Sm(s.name,t,e,r)}finally{n.closeSync()}}o(Da,"copyDir");function Sm(t,e,r,n){let s=Nr.join(e,t),i=Nr.join(r,t);if(n.filter&&!n.filter(s,i))return;let{destStat:u}=Ir.checkPathsSync(s,i,"copy",n);return ha(u,s,i,n)}o(Sm,"copyDirItem");function vm(t,e,r,n){let s=be.readlinkSync(e);if(n.dereference&&(s=Nr.resolve(process.cwd(),s)),t){let i;try{i=be.readlinkSync(r)}catch(u){if(u.code==="EINVAL"||u.code==="UNKNOWN")return be.symlinkSync(s,r);throw u}if(n.dereference&&(i=Nr.resolve(process.cwd(),i)),Ir.isSrcSubdir(s,i))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${i}'.`);if(Ir.isSrcSubdir(i,s))throw new Error(`Cannot overwrite '${i}' with '${s}'.`);return Am(s,r)}else return be.symlinkSync(s,r)}o(vm,"onLink");function Am(t,e){return be.unlinkSync(e),be.symlinkSync(t,e)}o(Am,"copyLink");pa.exports=ym});var vn=b((
|
|
7
|
-
`,finalEOL:r=!0,replacer:n=null,spaces:s}={}){let i=r?e:"";return JSON.stringify(t,n,s).replace(/\n/g,e)+i}o(sy,"stringify");function iy(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}o(iy,"stripBom");ec.exports={stringify:sy,stripBom:iy}});var sc=b((A2,nc)=>{c();var ir;try{ir=rr()}catch{ir=R("fs")}var Tn=ce(),{stringify:tc,stripBom:rc}=An();async function oy(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||ir,n="throws"in e?e.throws:!0,s=await Tn.fromCallback(r.readFile)(t,e);s=rc(s);let i;try{i=JSON.parse(s,e?e.reviver:null)}catch(u){if(n)throw u.message=`${t}: ${u.message}`,u;return null}return i}o(oy,"_readFile");var uy=Tn.fromPromise(oy);function ay(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||ir,n="throws"in e?e.throws:!0;try{let s=r.readFileSync(t,e);return s=rc(s),JSON.parse(s,e.reviver)}catch(s){if(n)throw s.message=`${t}: ${s.message}`,s;return null}}o(ay,"readFileSync");async function cy(t,e,r={}){let n=r.fs||ir,s=tc(e,r);await Tn.fromCallback(n.writeFile)(t,s,r)}o(cy,"_writeFile");var ly=Tn.fromPromise(cy);function fy(t,e,r={}){let n=r.fs||ir,s=tc(e,r);return n.writeFileSync(t,s,r)}o(fy,"writeFileSync");var hy={readFile:uy,readFileSync:ay,writeFile:ly,writeFileSync:fy};nc.exports=hy});var oc=b((O2,ic)=>{"use strict";c();var Ln=sc();ic.exports={readJson:Ln.readFile,readJsonSync:Ln.readFileSync,writeJson:Ln.writeFile,writeJsonSync:Ln.writeFileSync}});var On=b((k2,cc)=>{"use strict";c();var dy=ce().fromPromise,Xs=Ce(),uc=R("path"),ac=$e(),Dy=it().pathExists;async function py(t,e,r="utf-8"){let n=uc.dirname(t);return await Dy(n)||await ac.mkdirs(n),Xs.writeFile(t,e,r)}o(py,"outputFile");function my(t,...e){let r=uc.dirname(t);Xs.existsSync(r)||ac.mkdirsSync(r),Xs.writeFileSync(t,...e)}o(my,"outputFileSync");cc.exports={outputFile:dy(py),outputFileSync:my}});var fc=b((N2,lc)=>{"use strict";c();var{stringify:yy}=An(),{outputFile:gy}=On();async function Ey(t,e,r={}){let n=yy(e,r);await gy(t,n,r)}o(Ey,"outputJson");lc.exports=Ey});var dc=b((j2,hc)=>{"use strict";c();var{stringify:Fy}=An(),{outputFileSync:Cy}=On();function by(t,e,r){let n=Fy(e,r);Cy(t,n,r)}o(by,"outputJsonSync");hc.exports=by});var pc=b((G2,Dc)=>{"use strict";c();var wy=ce().fromPromise,we=oc();we.outputJson=wy(fc());we.outputJsonSync=dc();we.outputJSON=we.outputJson;we.outputJSONSync=we.outputJsonSync;we.writeJSON=we.writeJson;we.writeJSONSync=we.writeJsonSync;we.readJSON=we.readJson;we.readJSONSync=we.readJsonSync;Dc.exports=we});var Fc=b((H2,Ec)=>{"use strict";c();var _y=Ce(),mc=R("path"),{copy:xy}=vn(),{remove:gc}=$r(),{mkdirp:Sy}=$e(),{pathExists:vy}=it(),yc=Bt();async function Ay(t,e,r={}){let n=r.overwrite||r.clobber||!1,{srcStat:s,isChangingCase:i=!1}=await yc.checkPaths(t,e,"move",r);await yc.checkParentPaths(t,s,e,"move");let u=mc.dirname(e);return mc.parse(u).root!==u&&await Sy(u),Ty(t,e,n,i)}o(Ay,"move");async function Ty(t,e,r,n){if(!n){if(r)await gc(e);else if(await vy(e))throw new Error("dest already exists.")}try{await _y.rename(t,e)}catch(s){if(s.code!=="EXDEV")throw s;await Ly(t,e,r)}}o(Ty,"doRename");async function Ly(t,e,r){return await xy(t,e,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),gc(t)}o(Ly,"moveAcrossDevice");Ec.exports=Ay});var xc=b((V2,_c)=>{"use strict";c();var bc=rr(),ei=R("path"),Oy=vn().copySync,wc=$r().removeSync,Py=$e().mkdirpSync,Cc=Bt();function ky(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:s,isChangingCase:i=!1}=Cc.checkPathsSync(t,e,"move",r);return Cc.checkParentPathsSync(t,s,e,"move"),Ry(e)||Py(ei.dirname(e)),By(t,e,n,i)}o(ky,"moveSync");function Ry(t){let e=ei.dirname(t);return ei.parse(e).root===e}o(Ry,"isParentRoot");function By(t,e,r,n){if(n)return Qs(t,e,r);if(r)return wc(e),Qs(t,e,r);if(bc.existsSync(e))throw new Error("dest already exists.");return Qs(t,e,r)}o(By,"doRename");function Qs(t,e,r){try{bc.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return Ny(t,e,r)}}o(Qs,"rename");function Ny(t,e,r){return Oy(t,e,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),wc(t)}o(Ny,"moveAcrossDevice");_c.exports=ky});var vc=b((J2,Sc)=>{"use strict";c();var Iy=ce().fromPromise;Sc.exports={move:Iy(Fc()),moveSync:xc()}});var Tc=b((X2,Ac)=>{"use strict";c();Ac.exports={...Ce(),...vn(),...va(),...Qa(),...pc(),...$e(),...vc(),...On(),...it(),...$r()}});var ti=b((ex,Lc)=>{c();var $y=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Lc.exports=$y});var ri=b((rx,Oc)=>{c();var jy="2.0.0",My=Number.MAX_SAFE_INTEGER||9007199254740991,Uy=16,Gy=250,qy=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Oc.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Uy,MAX_SAFE_BUILD_LENGTH:Gy,MAX_SAFE_INTEGER:My,RELEASE_TYPES:qy,SEMVER_SPEC_VERSION:jy,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var kc=b((Qe,Pc)=>{c();var{MAX_SAFE_COMPONENT_LENGTH:ni,MAX_SAFE_BUILD_LENGTH:Hy,MAX_LENGTH:zy}=ri(),Wy=ti();Qe=Pc.exports={};var Vy=Qe.re=[],Zy=Qe.safeRe=[],T=Qe.src=[],L=Qe.t={},Yy=0,si="[a-zA-Z0-9-]",Jy=[["\\s",1],["\\d",zy],[si,Hy]],Ky=o(t=>{for(let[e,r]of Jy)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),$=o((t,e,r)=>{let n=Ky(e),s=Yy++;Wy(t,s,e),L[t]=s,T[s]=e,Vy[s]=new RegExp(e,r?"g":void 0),Zy[s]=new RegExp(n,r?"g":void 0)},"createToken");$("NUMERICIDENTIFIER","0|[1-9]\\d*");$("NUMERICIDENTIFIERLOOSE","\\d+");$("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${si}*`);$("MAINVERSION",`(${T[L.NUMERICIDENTIFIER]})\\.(${T[L.NUMERICIDENTIFIER]})\\.(${T[L.NUMERICIDENTIFIER]})`);$("MAINVERSIONLOOSE",`(${T[L.NUMERICIDENTIFIERLOOSE]})\\.(${T[L.NUMERICIDENTIFIERLOOSE]})\\.(${T[L.NUMERICIDENTIFIERLOOSE]})`);$("PRERELEASEIDENTIFIER",`(?:${T[L.NUMERICIDENTIFIER]}|${T[L.NONNUMERICIDENTIFIER]})`);$("PRERELEASEIDENTIFIERLOOSE",`(?:${T[L.NUMERICIDENTIFIERLOOSE]}|${T[L.NONNUMERICIDENTIFIER]})`);$("PRERELEASE",`(?:-(${T[L.PRERELEASEIDENTIFIER]}(?:\\.${T[L.PRERELEASEIDENTIFIER]})*))`);$("PRERELEASELOOSE",`(?:-?(${T[L.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${T[L.PRERELEASEIDENTIFIERLOOSE]})*))`);$("BUILDIDENTIFIER",`${si}+`);$("BUILD",`(?:\\+(${T[L.BUILDIDENTIFIER]}(?:\\.${T[L.BUILDIDENTIFIER]})*))`);$("FULLPLAIN",`v?${T[L.MAINVERSION]}${T[L.PRERELEASE]}?${T[L.BUILD]}?`);$("FULL",`^${T[L.FULLPLAIN]}$`);$("LOOSEPLAIN",`[v=\\s]*${T[L.MAINVERSIONLOOSE]}${T[L.PRERELEASELOOSE]}?${T[L.BUILD]}?`);$("LOOSE",`^${T[L.LOOSEPLAIN]}$`);$("GTLT","((?:<|>)?=?)");$("XRANGEIDENTIFIERLOOSE",`${T[L.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);$("XRANGEIDENTIFIER",`${T[L.NUMERICIDENTIFIER]}|x|X|\\*`);$("XRANGEPLAIN",`[v=\\s]*(${T[L.XRANGEIDENTIFIER]})(?:\\.(${T[L.XRANGEIDENTIFIER]})(?:\\.(${T[L.XRANGEIDENTIFIER]})(?:${T[L.PRERELEASE]})?${T[L.BUILD]}?)?)?`);$("XRANGEPLAINLOOSE",`[v=\\s]*(${T[L.XRANGEIDENTIFIERLOOSE]})(?:\\.(${T[L.XRANGEIDENTIFIERLOOSE]})(?:\\.(${T[L.XRANGEIDENTIFIERLOOSE]})(?:${T[L.PRERELEASELOOSE]})?${T[L.BUILD]}?)?)?`);$("XRANGE",`^${T[L.GTLT]}\\s*${T[L.XRANGEPLAIN]}$`);$("XRANGELOOSE",`^${T[L.GTLT]}\\s*${T[L.XRANGEPLAINLOOSE]}$`);$("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ni}})(?:\\.(\\d{1,${ni}}))?(?:\\.(\\d{1,${ni}}))?`);$("COERCE",`${T[L.COERCEPLAIN]}(?:$|[^\\d])`);$("COERCEFULL",T[L.COERCEPLAIN]+`(?:${T[L.PRERELEASE]})?(?:${T[L.BUILD]})?(?:$|[^\\d])`);$("COERCERTL",T[L.COERCE],!0);$("COERCERTLFULL",T[L.COERCEFULL],!0);$("LONETILDE","(?:~>?)");$("TILDETRIM",`(\\s*)${T[L.LONETILDE]}\\s+`,!0);Qe.tildeTrimReplace="$1~";$("TILDE",`^${T[L.LONETILDE]}${T[L.XRANGEPLAIN]}$`);$("TILDELOOSE",`^${T[L.LONETILDE]}${T[L.XRANGEPLAINLOOSE]}$`);$("LONECARET","(?:\\^)");$("CARETTRIM",`(\\s*)${T[L.LONECARET]}\\s+`,!0);Qe.caretTrimReplace="$1^";$("CARET",`^${T[L.LONECARET]}${T[L.XRANGEPLAIN]}$`);$("CARETLOOSE",`^${T[L.LONECARET]}${T[L.XRANGEPLAINLOOSE]}$`);$("COMPARATORLOOSE",`^${T[L.GTLT]}\\s*(${T[L.LOOSEPLAIN]})$|^$`);$("COMPARATOR",`^${T[L.GTLT]}\\s*(${T[L.FULLPLAIN]})$|^$`);$("COMPARATORTRIM",`(\\s*)${T[L.GTLT]}\\s*(${T[L.LOOSEPLAIN]}|${T[L.XRANGEPLAIN]})`,!0);Qe.comparatorTrimReplace="$1$2$3";$("HYPHENRANGE",`^\\s*(${T[L.XRANGEPLAIN]})\\s+-\\s+(${T[L.XRANGEPLAIN]})\\s*$`);$("HYPHENRANGELOOSE",`^\\s*(${T[L.XRANGEPLAINLOOSE]})\\s+-\\s+(${T[L.XRANGEPLAINLOOSE]})\\s*$`);$("STAR","(<|>)?=?\\s*\\*");$("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");$("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Bc=b((ox,Rc)=>{c();var Xy=Object.freeze({loose:!0}),Qy=Object.freeze({}),e0=o(t=>t?typeof t!="object"?Xy:t:Qy,"parseOptions");Rc.exports=e0});var jc=b((cx,$c)=>{c();var Nc=/^[0-9]+$/,Ic=o((t,e)=>{let r=Nc.test(t),n=Nc.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},"compareIdentifiers"),t0=o((t,e)=>Ic(e,t),"rcompareIdentifiers");$c.exports={compareIdentifiers:Ic,rcompareIdentifiers:t0}});var Gc=b((hx,Uc)=>{c();var Pn=ti(),{MAX_LENGTH:Mc,MAX_SAFE_INTEGER:kn}=ri(),{safeRe:Rn,t:Bn}=kc(),r0=Bc(),{compareIdentifiers:or}=jc(),ii=class t{static{o(this,"SemVer")}constructor(e,r){if(r=r0(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Mc)throw new TypeError(`version is longer than ${Mc} characters`);Pn("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?Rn[Bn.LOOSE]:Rn[Bn.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>kn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>kn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>kn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let i=+s;if(i>=0&&i<kn)return i}return s}):this.prerelease=[],this.build=n[5]?n[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(e){if(Pn("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),or(this.major,e.major)||or(this.minor,e.minor)||or(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],s=e.prerelease[r];if(Pn("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return or(n,s)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],s=e.build[r];if(Pn("build compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return or(n,s)}while(++r)}inc(e,r,n){if(e.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=`-${r}`.match(this.options.loose?Rn[Bn.PRERELEASELOOSE]:Rn[Bn.PRERELEASE]);if(!s||s[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);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 s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let i=[r,s];n===!1&&(i=[r]),or(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Uc.exports=ii});var oi=b((px,Hc)=>{c();var qc=Gc(),n0=o((t,e,r=!1)=>{if(t instanceof qc)return t;try{return new qc(t,e)}catch(n){if(!r)return null;throw n}},"parse");Hc.exports=n0});var Wc=b((gx,zc)=>{c();var s0=oi(),i0=o((t,e)=>{let r=s0(t,e);return r?r.version:null},"valid");zc.exports=i0});var Zc=b((Cx,Vc)=>{c();var o0=oi(),u0=o((t,e)=>{let r=o0(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},"clean");Vc.exports=u0});var ui=b((_x,a0)=>{a0.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","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","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","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-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","FSFULLRWD","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","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","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","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","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-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","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","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","metamail","mpi-permissive","mpich2","mplus","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"]});var Yc=b((xx,c0)=>{c0.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"]});var Jc=b((Sx,l0)=>{l0.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"]});var Xc=b((vx,Kc)=>{"use strict";c();var f0=[].concat(ui()).concat(Yc()),h0=Jc();Kc.exports=function(t){var e=0;function r(){return e<t.length}o(r,"hasMore");function n(E){if(E instanceof RegExp){var D=t.slice(e),C=D.match(E);if(C)return e+=C[0].length,C[0]}else if(t.indexOf(E,e)===e)return e+=E.length,E}o(n,"read");function s(){n(/[ ]*/)}o(s,"skipWhitespace");function i(){for(var E,D=["WITH","AND","OR","(",")",":","+"],C=0;C<D.length&&(E=n(D[C]),!E);C++);if(E==="+"&&e>1&&t[e-2]===" ")throw new Error("Space before `+`");return E&&{type:"OPERATOR",string:E}}o(i,"operator");function u(){return n(/[A-Za-z0-9-.]+/)}o(u,"idstring");function a(){var E=u();if(!E)throw new Error("Expected idstring at offset "+e);return E}o(a,"expectIdstring");function l(){if(n("DocumentRef-")){var E=a();return{type:"DOCUMENTREF",string:E}}}o(l,"documentRef");function f(){if(n("LicenseRef-")){var E=a();return{type:"LICENSEREF",string:E}}}o(f,"licenseRef");function h(){var E=e,D=u();if(f0.indexOf(D)!==-1)return{type:"LICENSE",string:D};if(h0.indexOf(D)!==-1)return{type:"EXCEPTION",string:D};e=E}o(h,"identifier");function g(){return i()||l()||f()||h()}o(g,"parseToken");for(var m=[];r()&&(s(),!!r());){var y=g();if(!y)throw new Error("Unexpected `"+t[e]+"` at offset "+e);m.push(y)}return m}});var el=b((Lx,Qc)=>{"use strict";c();Qc.exports=function(t){var e=0;function r(){return e<t.length}o(r,"hasMore");function n(){return r()?t[e]:null}o(n,"token");function s(){if(!r())throw new Error;e++}o(s,"next");function i(D){var C=n();if(C&&C.type==="OPERATOR"&&D===C.string)return s(),C.string}o(i,"parseOperator");function u(){if(i("WITH")){var D=n();if(D&&D.type==="EXCEPTION")return s(),D.string;throw new Error("Expected exception after `WITH`")}}o(u,"parseWith");function a(){var D=e,C="",F=n();if(F.type==="DOCUMENTREF"&&(s(),C+="DocumentRef-"+F.string+":",!i(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(F=n(),F.type==="LICENSEREF")return s(),C+="LicenseRef-"+F.string,{license:C};e=D}o(a,"parseLicenseRef");function l(){var D=n();if(D&&D.type==="LICENSE"){s();var C={license:D.string};i("+")&&(C.plus=!0);var F=u();return F&&(C.exception=F),C}}o(l,"parseLicense");function f(){var D=i("(");if(D){var C=y();if(!i(")"))throw new Error("Expected `)`");return C}}o(f,"parseParenthesizedExpression");function h(){return f()||a()||l()}o(h,"parseAtom");function g(D,C){return o(function F(){var O=C();if(O){if(!i(D))return O;var S=F();if(!S)throw new Error("Expected expression");return{left:O,conjunction:D.toLowerCase(),right:S}}},"parseBinaryOp")}o(g,"makeBinaryOpParser");var m=g("AND",h),y=g("OR",m),E=y();if(!E||r())throw new Error("Syntax error");return E}});var ai=b((kx,tl)=>{"use strict";c();var d0=Xc(),D0=el();tl.exports=function(t){return D0(d0(t))}});var ll=b((Bx,cl)=>{c();var p0=ai(),m0=ui();function Nn(t){try{return p0(t),!0}catch{return!1}}o(Nn,"valid");function al(t,e){var r=e[0].length-t[0].length;return r!==0?r:t[0].toUpperCase().localeCompare(e[0].toUpperCase())}o(al,"sortTranspositions");var rl=[["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(al),y0=0,g0=1,nl=[function(t){return t.toUpperCase()},function(t){return t.trim()},function(t){return t.replace(/\./g,"")},function(t){return t.replace(/\s+/g,"")},function(t){return t.replace(/\s+/g,"-")},function(t){return t.replace("v","-")},function(t){return t.replace(/,?\s*(\d)/,"-$1")},function(t){return t.replace(/,?\s*(\d)/,"-$1.0")},function(t){return t.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(t){return t.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(t){return t[0].toUpperCase()+t.slice(1)},function(t){return t.replace("/","-")},function(t){return t.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(t){return t.indexOf("3.0")!==-1?t+"-or-later":t+"-only"},function(t){return t+"only"},function(t){return t.replace(/(\d)$/,"-$1.0")},function(t){return t.replace(/(-| )?(\d)$/,"-$2-Clause")},function(t){return t.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(t){return t.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(t){return t.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(t){return t.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(t){return t.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(t){return t.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(t){return"CC-"+t},function(t){return"CC-"+t+"-4.0"},function(t){return t.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(t){return"CC-"+t.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],ci=m0.map(function(t){var e=/^(.*)-\d+\.\d+$/.exec(t);return e?[e[0],e[1]]:[t,null]}).reduce(function(t,e){var r=e[1];return t[r]=t[r]||[],t[r].push(e[0]),t},{}),E0=Object.keys(ci).map(o(function(e){return[e,ci[e]]},"makeEntries")).filter(o(function(e){return e[1].length===1&&e[0]!==null&&e[0]!=="APL"},"identifySoleVersions")).map(o(function(e){return[e[0],e[1][0]]},"createLastResorts"));ci=void 0;var sl=[["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(E0).sort(al),F0=0,C0=1,il=o(function(t){for(var e=0;e<nl.length;e++){var r=nl[e](t).trim();if(r!==t&&Nn(r))return r}return null},"validTransformation"),ol=o(function(t){for(var e=t.toUpperCase(),r=0;r<sl.length;r++){var n=sl[r];if(e.indexOf(n[F0])>-1)return n[C0]}return null},"validLastResort"),ul=o(function(t,e){for(var r=0;r<rl.length;r++){var n=rl[r],s=n[y0];if(t.indexOf(s)>-1){var i=t.replace(s,n[g0]),u=e(i);if(u!==null)return u}}return null},"anyCorrection");cl.exports=function(t,e){e=e||{};var r=e.upgrade===void 0?!0:!!e.upgrade;function n(a){return r?b0(a):a}o(n,"postprocess");var s=typeof t=="string"&&t.trim().length!==0;if(!s)throw Error("Invalid argument. Expected non-empty string.");if(t=t.trim(),Nn(t))return n(t);var i=t.replace(/\+$/,"").trim();if(Nn(i))return n(i);var u=il(t);return u!==null||(u=ul(t,function(a){return Nn(a)?a:il(a)}),u!==null)||(u=ol(t),u!==null)||(u=ul(t,ol),u!==null)?n(u):null};function b0(t){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(t)!==-1?t+"-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(t)!==-1?t.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(t)!==-1?t+"-or-later":t}o(b0,"upgradeGPLs")});var Dl=b(($x,dl)=>{c();var w0=ai(),_0=ll(),fl='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',x0=/^SEE LICEN[CS]E IN (.+)$/;function hl(t,e){return e.slice(0,t.length)===t}o(hl,"startsWith");function li(t){if(t.hasOwnProperty("license")){var e=t.license;return hl("LicenseRef",e)||hl("DocumentRef",e)}else return li(t.left)||li(t.right)}o(li,"usesLicenseRef");dl.exports=function(t){var e;try{e=w0(t)}catch{var r;if(t==="UNLICENSED"||t==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(r=x0.exec(t))return{validForOldPackages:!0,validForNewPackages:!0,inFile:r[1]};var n={validForOldPackages:!1,validForNewPackages:!1,warnings:[fl]};if(t.trim().length!==0){var s=_0(t);s&&n.warnings.push('license is similar to the valid expression "'+s+'"')}return n}return li(e)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[fl]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}}});var El=b($n=>{"use strict";c();Object.defineProperty($n,"__esModule",{value:!0});$n.LRUCache=void 0;var ur=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ml=new Set,fi=typeof process=="object"&&process?process:{},yl=o((t,e,r,n)=>{typeof fi.emitWarning=="function"?fi.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)},"emitWarning"),In=globalThis.AbortController,pl=globalThis.AbortSignal;if(typeof In>"u"){pl=class{static{o(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(n,s){this._onabort.push(s)}},In=class{static{o(this,"AbortController")}constructor(){e()}signal=new pl;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let s of this.signal._onabort)s(n);this.signal.onabort?.(n)}}};let t=fi.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=o(()=>{t&&(t=!1,yl("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"warnACPolyfill")}var S0=o(t=>!ml.has(t),"shouldWarn"),qx=Symbol("type"),at=o(t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),"isPosInt"),gl=o(t=>at(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ar:null:null,"getUintArray"),ar=class extends Array{static{o(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},hi=class t{static{o(this,"Stack")}heap;length;static#r=!1;static create(e){let r=gl(e);if(!r)return[];t.#r=!0;let n=new t(e,r);return t.#r=!1,n}constructor(e,r){if(!t.#r)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},di=class t{static{o(this,"LRUCache")}#r;#n;#e;#a;#w;#g;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#D;#u;#o;#t;#h;#p;#f;#c;#E;#l;#F;#C;#m;#b;#A;#d;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#m,sizes:e.#F,keyMap:e.#u,keyList:e.#o,valList:e.#t,next:e.#h,prev:e.#p,get head(){return e.#f},get tail(){return e.#c},free:e.#E,isBackgroundFetch:o(r=>e.#s(r),"isBackgroundFetch"),backgroundFetch:o((r,n,s,i)=>e.#R(r,n,s,i),"backgroundFetch"),moveToTail:o(r=>e.#O(r),"moveToTail"),indexes:o(r=>e.#_(r),"indexes"),rindexes:o(r=>e.#x(r),"rindexes"),isStale:o(r=>e.#y(r),"isStale")}}get max(){return this.#r}get maxSize(){return this.#n}get calculatedSize(){return this.#D}get size(){return this.#i}get fetchMethod(){return this.#w}get memoMethod(){return this.#g}get dispose(){return this.#e}get disposeAfter(){return this.#a}constructor(e){let{max:r=0,ttl:n,ttlResolution:s=1,ttlAutopurge:i,updateAgeOnGet:u,updateAgeOnHas:a,allowStale:l,dispose:f,disposeAfter:h,noDisposeOnSet:g,noUpdateTTL:m,maxSize:y=0,maxEntrySize:E=0,sizeCalculation:D,fetchMethod:C,memoMethod:F,noDeleteOnFetchRejection:O,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:U,ignoreFetchAbort:te}=e;if(r!==0&&!at(r))throw new TypeError("max option must be a nonnegative integer");let ue=r?gl(r):Array;if(!ue)throw new Error("invalid max value: "+r);if(this.#r=r,this.#n=y,this.maxEntrySize=E||this.#n,this.sizeCalculation=D,this.sizeCalculation){if(!this.#n&&!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(F!==void 0&&typeof F!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#g=F,C!==void 0&&typeof C!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#w=C,this.#A=!!C,this.#u=new Map,this.#o=new Array(r).fill(void 0),this.#t=new Array(r).fill(void 0),this.#h=new ue(r),this.#p=new ue(r),this.#f=0,this.#c=0,this.#E=hi.create(r),this.#i=0,this.#D=0,typeof f=="function"&&(this.#e=f),typeof h=="function"?(this.#a=h,this.#l=[]):(this.#a=void 0,this.#l=void 0),this.#b=!!this.#e,this.#d=!!this.#a,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!O,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!U,this.ignoreFetchAbort=!!te,this.maxEntrySize!==0){if(this.#n!==0&&!at(this.#n))throw new TypeError("maxSize must be a positive integer if specified");if(!at(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#U()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!a,this.ttlResolution=at(s)||s===0?s:1,this.ttlAutopurge=!!i,this.ttl=n||0,this.ttl){if(!at(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#B()}if(this.#r===0&&this.ttl===0&&this.#n===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#r&&!this.#n){let Ue="LRU_CACHE_UNBOUNDED";S0(Ue)&&(ml.add(Ue),yl("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Ue,t))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#B(){let e=new ar(this.#r),r=new ar(this.#r);this.#m=e,this.#C=r,this.#N=(i,u,a=ur.now())=>{if(r[i]=u!==0?a:0,e[i]=u,u!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#y(i)&&this.#S(this.#o[i],"expire")},u+1);l.unref&&l.unref()}},this.#T=i=>{r[i]=e[i]!==0?ur.now():0},this.#v=(i,u)=>{if(e[u]){let a=e[u],l=r[u];if(!a||!l)return;i.ttl=a,i.start=l,i.now=n||s();let f=i.now-l;i.remainingTTL=a-f}};let n=0,s=o(()=>{let i=ur.now();if(this.ttlResolution>0){n=i;let u=setTimeout(()=>n=0,this.ttlResolution);u.unref&&u.unref()}return i},"getNow");this.getRemainingTTL=i=>{let u=this.#u.get(i);if(u===void 0)return 0;let a=e[u],l=r[u];if(!a||!l)return 1/0;let f=(n||s())-l;return a-f},this.#y=i=>{let u=r[i],a=e[i];return!!a&&!!u&&(n||s())-u>a}}#T=o(()=>{},"#updateItemAge");#v=o(()=>{},"#statusTTL");#N=o(()=>{},"#setItemTTL");#y=o(()=>!1,"#isStale");#U(){let e=new ar(this.#r);this.#D=0,this.#F=e,this.#L=r=>{this.#D-=e[r],e[r]=0},this.#I=(r,n,s,i)=>{if(this.#s(n))return 0;if(!at(s))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(s=i(n,r),!at(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.#P=(r,n,s)=>{if(e[r]=n,this.#n){let i=this.#n-e[r];for(;this.#D>i;)this.#k(!0)}this.#D+=e[r],s&&(s.entrySize=n,s.totalCalculatedSize=this.#D)}}#L=o(e=>{},"#removeItemSize");#P=o((e,r,n)=>{},"#addItemSize");#I=o((e,r,n,s)=>{if(n||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#_({allowStale:e=this.allowStale}={}){if(this.#i)for(let r=this.#c;!(!this.#$(r)||((e||!this.#y(r))&&(yield r),r===this.#f));)r=this.#p[r]}*#x({allowStale:e=this.allowStale}={}){if(this.#i)for(let r=this.#f;!(!this.#$(r)||((e||!this.#y(r))&&(yield r),r===this.#c));)r=this.#h[r]}#$(e){return e!==void 0&&this.#u.get(this.#o[e])===e}*entries(){for(let e of this.#_())this.#t[e]!==void 0&&this.#o[e]!==void 0&&!this.#s(this.#t[e])&&(yield[this.#o[e],this.#t[e]])}*rentries(){for(let e of this.#x())this.#t[e]!==void 0&&this.#o[e]!==void 0&&!this.#s(this.#t[e])&&(yield[this.#o[e],this.#t[e]])}*keys(){for(let e of this.#_()){let r=this.#o[e];r!==void 0&&!this.#s(this.#t[e])&&(yield r)}}*rkeys(){for(let e of this.#x()){let r=this.#o[e];r!==void 0&&!this.#s(this.#t[e])&&(yield r)}}*values(){for(let e of this.#_())this.#t[e]!==void 0&&!this.#s(this.#t[e])&&(yield this.#t[e])}*rvalues(){for(let e of this.#x())this.#t[e]!==void 0&&!this.#s(this.#t[e])&&(yield this.#t[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let n of this.#_()){let s=this.#t[n],i=this.#s(s)?s.__staleWhileFetching:s;if(i!==void 0&&e(i,this.#o[n],this))return this.get(this.#o[n],r)}}forEach(e,r=this){for(let n of this.#_()){let s=this.#t[n],i=this.#s(s)?s.__staleWhileFetching:s;i!==void 0&&e.call(r,i,this.#o[n],this)}}rforEach(e,r=this){for(let n of this.#x()){let s=this.#t[n],i=this.#s(s)?s.__staleWhileFetching:s;i!==void 0&&e.call(r,i,this.#o[n],this)}}purgeStale(){let e=!1;for(let r of this.#x({allowStale:!0}))this.#y(r)&&(this.#S(this.#o[r],"expire"),e=!0);return e}info(e){let r=this.#u.get(e);if(r===void 0)return;let n=this.#t[r],s=this.#s(n)?n.__staleWhileFetching:n;if(s===void 0)return;let i={value:s};if(this.#m&&this.#C){let u=this.#m[r],a=this.#C[r];if(u&&a){let l=u-(ur.now()-a);i.ttl=l,i.start=Date.now()}}return this.#F&&(i.size=this.#F[r]),i}dump(){let e=[];for(let r of this.#_({allowStale:!0})){let n=this.#o[r],s=this.#t[r],i=this.#s(s)?s.__staleWhileFetching:s;if(i===void 0||n===void 0)continue;let u={value:i};if(this.#m&&this.#C){u.ttl=this.#m[r];let a=ur.now()-this.#C[r];u.start=Math.floor(Date.now()-a)}this.#F&&(u.size=this.#F[r]),e.unshift([n,u])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let s=Date.now()-n.start;n.start=ur.now()-s}this.set(r,n.value,n)}}set(e,r,n={}){if(r===void 0)return this.delete(e),this;let{ttl:s=this.ttl,start:i,noDisposeOnSet:u=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=n,{noUpdateTTL:f=this.noUpdateTTL}=n,h=this.#I(e,r,n.size||0,a);if(this.maxEntrySize&&h>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#S(e,"set"),this;let g=this.#i===0?void 0:this.#u.get(e);if(g===void 0)g=this.#i===0?this.#c:this.#E.length!==0?this.#E.pop():this.#i===this.#r?this.#k(!1):this.#i,this.#o[g]=e,this.#t[g]=r,this.#u.set(e,g),this.#h[this.#c]=g,this.#p[g]=this.#c,this.#c=g,this.#i++,this.#P(g,h,l),l&&(l.set="add"),f=!1;else{this.#O(g);let m=this.#t[g];if(r!==m){if(this.#A&&this.#s(m)){m.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:y}=m;y!==void 0&&!u&&(this.#b&&this.#e?.(y,e,"set"),this.#d&&this.#l?.push([y,e,"set"]))}else u||(this.#b&&this.#e?.(m,e,"set"),this.#d&&this.#l?.push([m,e,"set"]));if(this.#L(g),this.#P(g,h,l),this.#t[g]=r,l){l.set="replace";let y=m&&this.#s(m)?m.__staleWhileFetching:m;y!==void 0&&(l.oldValue=y)}}else l&&(l.set="update")}if(s!==0&&!this.#m&&this.#B(),this.#m&&(f||this.#N(g,s,i),l&&this.#v(l,g)),!u&&this.#d&&this.#l){let m=this.#l,y;for(;y=m?.shift();)this.#a?.(...y)}return this}pop(){try{for(;this.#i;){let e=this.#t[this.#f];if(this.#k(!0),this.#s(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#d&&this.#l){let e=this.#l,r;for(;r=e?.shift();)this.#a?.(...r)}}}#k(e){let r=this.#f,n=this.#o[r],s=this.#t[r];return this.#A&&this.#s(s)?s.__abortController.abort(new Error("evicted")):(this.#b||this.#d)&&(this.#b&&this.#e?.(s,n,"evict"),this.#d&&this.#l?.push([s,n,"evict"])),this.#L(r),e&&(this.#o[r]=void 0,this.#t[r]=void 0,this.#E.push(r)),this.#i===1?(this.#f=this.#c=0,this.#E.length=0):this.#f=this.#h[r],this.#u.delete(n),this.#i--,r}has(e,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:s}=r,i=this.#u.get(e);if(i!==void 0){let u=this.#t[i];if(this.#s(u)&&u.__staleWhileFetching===void 0)return!1;if(this.#y(i))s&&(s.has="stale",this.#v(s,i));else return n&&this.#T(i),s&&(s.has="hit",this.#v(s,i)),!0}else s&&(s.has="miss");return!1}peek(e,r={}){let{allowStale:n=this.allowStale}=r,s=this.#u.get(e);if(s===void 0||!n&&this.#y(s))return;let i=this.#t[s];return this.#s(i)?i.__staleWhileFetching:i}#R(e,r,n,s){let i=r===void 0?void 0:this.#t[r];if(this.#s(i))return i;let u=new In,{signal:a}=n;a?.addEventListener("abort",()=>u.abort(a.reason),{signal:u.signal});let l={signal:u.signal,options:n,context:s},f=o((D,C=!1)=>{let{aborted:F}=u.signal,O=n.ignoreFetchAbort&&D!==void 0;if(n.status&&(F&&!C?(n.status.fetchAborted=!0,n.status.fetchError=u.signal.reason,O&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),F&&!O&&!C)return g(u.signal.reason);let S=y;return this.#t[r]===y&&(D===void 0?S.__staleWhileFetching?this.#t[r]=S.__staleWhileFetching:this.#S(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,D,l.options))),D},"cb"),h=o(D=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=D),g(D)),"eb"),g=o(D=>{let{aborted:C}=u.signal,F=C&&n.allowStaleOnFetchAbort,O=F||n.allowStaleOnFetchRejection,S=O||n.noDeleteOnFetchRejection,k=y;if(this.#t[r]===y&&(!S||k.__staleWhileFetching===void 0?this.#S(e,"fetch"):F||(this.#t[r]=k.__staleWhileFetching)),O)return n.status&&k.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),k.__staleWhileFetching;if(k.__returned===k)throw D},"fetchFail"),m=o((D,C)=>{let F=this.#w?.(e,i,l);F&&F instanceof Promise&&F.then(O=>D(O===void 0?void 0:O),C),u.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(D(void 0),n.allowStaleOnFetchAbort&&(D=o(O=>f(O,!0),"res")))})},"pcall");n.status&&(n.status.fetchDispatched=!0);let y=new Promise(m).then(f,h),E=Object.assign(y,{__abortController:u,__staleWhileFetching:i,__returned:void 0});return r===void 0?(this.set(e,E,{...l.options,status:void 0}),r=this.#u.get(e)):this.#t[r]=E,E}#s(e){if(!this.#A)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof In}async fetch(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:u=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:y=this.ignoreFetchAbort,allowStaleOnFetchAbort:E=this.allowStaleOnFetchAbort,context:D,forceRefresh:C=!1,status:F,signal:O}=r;if(!this.#A)return F&&(F.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:s,noDeleteOnStaleGet:i,status:F});let S={allowStale:n,updateAgeOnGet:s,noDeleteOnStaleGet:i,ttl:u,noDisposeOnSet:a,size:l,sizeCalculation:f,noUpdateTTL:h,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:E,ignoreFetchAbort:y,status:F,signal:O},k=this.#u.get(e);if(k===void 0){F&&(F.fetch="miss");let U=this.#R(e,k,S,D);return U.__returned=U}else{let U=this.#t[k];if(this.#s(U)){let q=n&&U.__staleWhileFetching!==void 0;return F&&(F.fetch="inflight",q&&(F.returnedStale=!0)),q?U.__staleWhileFetching:U.__returned=U}let te=this.#y(k);if(!C&&!te)return F&&(F.fetch="hit"),this.#O(k),s&&this.#T(k),F&&this.#v(F,k),U;let ue=this.#R(e,k,S,D),B=ue.__staleWhileFetching!==void 0&&n;return F&&(F.fetch=te?"stale":"refresh",B&&te&&(F.returnedStale=!0)),B?ue.__staleWhileFetching:ue.__returned=ue}}async forceFetch(e,r={}){let n=await this.fetch(e,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,r={}){let n=this.#g;if(!n)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:i,...u}=r,a=this.get(e,u);if(!i&&a!==void 0)return a;let l=n(e,a,{options:u,context:s});return this.set(e,l,u),l}get(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:u}=r,a=this.#u.get(e);if(a!==void 0){let l=this.#t[a],f=this.#s(l);return u&&this.#v(u,a),this.#y(a)?(u&&(u.get="stale"),f?(u&&n&&l.__staleWhileFetching!==void 0&&(u.returnedStale=!0),n?l.__staleWhileFetching:void 0):(i||this.#S(e,"expire"),u&&n&&(u.returnedStale=!0),n?l:void 0)):(u&&(u.get="hit"),f?l.__staleWhileFetching:(this.#O(a),s&&this.#T(a),l))}else u&&(u.get="miss")}#j(e,r){this.#p[r]=e,this.#h[e]=r}#O(e){e!==this.#c&&(e===this.#f?this.#f=this.#h[e]:this.#j(this.#p[e],this.#h[e]),this.#j(this.#c,e),this.#c=e)}delete(e){return this.#S(e,"delete")}#S(e,r){let n=!1;if(this.#i!==0){let s=this.#u.get(e);if(s!==void 0)if(n=!0,this.#i===1)this.#M(r);else{this.#L(s);let i=this.#t[s];if(this.#s(i)?i.__abortController.abort(new Error("deleted")):(this.#b||this.#d)&&(this.#b&&this.#e?.(i,e,r),this.#d&&this.#l?.push([i,e,r])),this.#u.delete(e),this.#o[s]=void 0,this.#t[s]=void 0,s===this.#c)this.#c=this.#p[s];else if(s===this.#f)this.#f=this.#h[s];else{let u=this.#p[s];this.#h[u]=this.#h[s];let a=this.#h[s];this.#p[a]=this.#p[s]}this.#i--,this.#E.push(s)}}if(this.#d&&this.#l?.length){let s=this.#l,i;for(;i=s?.shift();)this.#a?.(...i)}return n}clear(){return this.#M("delete")}#M(e){for(let r of this.#x({allowStale:!0})){let n=this.#t[r];if(this.#s(n))n.__abortController.abort(new Error("deleted"));else{let s=this.#o[r];this.#b&&this.#e?.(n,s,e),this.#d&&this.#l?.push([n,s,e])}}if(this.#u.clear(),this.#t.fill(void 0),this.#o.fill(void 0),this.#m&&this.#C&&(this.#m.fill(0),this.#C.fill(0)),this.#F&&this.#F.fill(0),this.#f=0,this.#c=0,this.#E.length=0,this.#D=0,this.#i=0,this.#d&&this.#l){let r=this.#l,n;for(;n=r?.shift();)this.#a?.(...n)}}};$n.LRUCache=di});var bl=b((Vx,Cl)=>{"use strict";c();var z=o((...t)=>t.every(e=>e)?t.join(""):"","maybeJoin"),oe=o(t=>t?encodeURIComponent(t):"","maybeEncode"),Fl=o(t=>t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),"formatHashFragment"),v0={sshtemplate:o(({domain:t,user:e,project:r,committish:n})=>`git@${t}:${e}/${r}.git${z("#",n)}`,"sshtemplate"),sshurltemplate:o(({domain:t,user:e,project:r,committish:n})=>`git+ssh://git@${t}/${e}/${r}.git${z("#",n)}`,"sshurltemplate"),edittemplate:o(({domain:t,user:e,project:r,committish:n,editpath:s,path:i})=>`https://${t}/${e}/${r}${z("/",s,"/",oe(n||"HEAD"),"/",i)}`,"edittemplate"),browsetemplate:o(({domain:t,user:e,project:r,committish:n,treepath:s})=>`https://${t}/${e}/${r}${z("/",s,"/",oe(n))}`,"browsetemplate"),browsetreetemplate:o(({domain:t,user:e,project:r,committish:n,treepath:s,path:i,fragment:u,hashformat:a})=>`https://${t}/${e}/${r}/${s}/${oe(n||"HEAD")}/${i}${z("#",a(u||""))}`,"browsetreetemplate"),browseblobtemplate:o(({domain:t,user:e,project:r,committish:n,blobpath:s,path:i,fragment:u,hashformat:a})=>`https://${t}/${e}/${r}/${s}/${oe(n||"HEAD")}/${i}${z("#",a(u||""))}`,"browseblobtemplate"),docstemplate:o(({domain:t,user:e,project:r,treepath:n,committish:s})=>`https://${t}/${e}/${r}${z("/",n,"/",oe(s))}#readme`,"docstemplate"),httpstemplate:o(({auth:t,domain:e,user:r,project:n,committish:s})=>`git+https://${z(t,"@")}${e}/${r}/${n}.git${z("#",s)}`,"httpstemplate"),filetemplate:o(({domain:t,user:e,project:r,committish:n,path:s})=>`https://${t}/${e}/${r}/raw/${oe(n||"HEAD")}/${s}`,"filetemplate"),shortcuttemplate:o(({type:t,user:e,project:r,committish:n})=>`${t}:${e}/${r}${z("#",n)}`,"shortcuttemplate"),pathtemplate:o(({user:t,project:e,committish:r})=>`${t}/${e}${z("#",r)}`,"pathtemplate"),bugstemplate:o(({domain:t,user:e,project:r})=>`https://${t}/${e}/${r}/issues`,"bugstemplate"),hashformat:Fl},ct={};ct.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:o(({auth:t,user:e,project:r,committish:n,path:s})=>`https://${z(t,"@")}raw.githubusercontent.com/${e}/${r}/${oe(n||"HEAD")}/${s}`,"filetemplate"),gittemplate:o(({auth:t,domain:e,user:r,project:n,committish:s})=>`git://${z(t,"@")}${e}/${r}/${n}.git${z("#",s)}`,"gittemplate"),tarballtemplate:o(({domain:t,user:e,project:r,committish:n})=>`https://codeload.${t}/${e}/${r}/tar.gz/${oe(n||"HEAD")}`,"tarballtemplate"),extract:o(t=>{let[,e,r,n,s]=t.pathname.split("/",5);if(!(n&&n!=="tree")&&(n||(s=t.hash.slice(1)),r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:s}},"extract")};ct.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:o(({domain:t,user:e,project:r,committish:n,treepath:s,path:i,editpath:u})=>`https://${t}/${e}/${r}${z("/",s,"/",oe(n||"HEAD"),"/",i,u)}`,"edittemplate"),tarballtemplate:o(({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/get/${oe(n||"HEAD")}.tar.gz`,"tarballtemplate"),extract:o(t=>{let[,e,r,n]=t.pathname.split("/",4);if(!["get"].includes(n)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}},"extract")};ct.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:o(({auth:t,domain:e,user:r,project:n,committish:s})=>`git+https://${z(t,"@")}${e}/${r}/${n}.git${z("#",s)}`,"httpstemplate"),tarballtemplate:o(({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/repository/archive.tar.gz?ref=${oe(n||"HEAD")}`,"tarballtemplate"),extract:o(t=>{let e=t.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let r=e.split("/"),n=r.pop();n.endsWith(".git")&&(n=n.slice(0,-4));let s=r.join("/");if(!(!s||!n))return{user:s,project:n,committish:t.hash.slice(1)}},"extract")};ct.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:o(({domain:t,project:e,committish:r})=>`git@${t}:${e}.git${z("#",r)}`,"sshtemplate"),sshurltemplate:o(({domain:t,project:e,committish:r})=>`git+ssh://git@${t}/${e}.git${z("#",r)}`,"sshurltemplate"),edittemplate:o(({domain:t,user:e,project:r,committish:n,editpath:s})=>`https://${t}/${e}/${r}${z("/",oe(n))}/${s}`,"edittemplate"),browsetemplate:o(({domain:t,project:e,committish:r})=>`https://${t}/${e}${z("/",oe(r))}`,"browsetemplate"),browsetreetemplate:o(({domain:t,project:e,committish:r,path:n,hashformat:s})=>`https://${t}/${e}${z("/",oe(r))}${z("#",s(n))}`,"browsetreetemplate"),browseblobtemplate:o(({domain:t,project:e,committish:r,path:n,hashformat:s})=>`https://${t}/${e}${z("/",oe(r))}${z("#",s(n))}`,"browseblobtemplate"),docstemplate:o(({domain:t,project:e,committish:r})=>`https://${t}/${e}${z("/",oe(r))}`,"docstemplate"),httpstemplate:o(({domain:t,project:e,committish:r})=>`git+https://${t}/${e}.git${z("#",r)}`,"httpstemplate"),filetemplate:o(({user:t,project:e,committish:r,path:n})=>`https://gist.githubusercontent.com/${t}/${e}/raw${z("/",oe(r))}/${n}`,"filetemplate"),shortcuttemplate:o(({type:t,project:e,committish:r})=>`${t}:${e}${z("#",r)}`,"shortcuttemplate"),pathtemplate:o(({project:t,committish:e})=>`${t}${z("#",e)}`,"pathtemplate"),bugstemplate:o(({domain:t,project:e})=>`https://${t}/${e}`,"bugstemplate"),gittemplate:o(({domain:t,project:e,committish:r})=>`git://${t}/${e}.git${z("#",r)}`,"gittemplate"),tarballtemplate:o(({project:t,committish:e})=>`https://codeload.github.com/gist/${t}/tar.gz/${oe(e||"HEAD")}`,"tarballtemplate"),extract:o(t=>{let[,e,r,n]=t.pathname.split("/",4);if(n!=="raw"){if(!r){if(!e)return;r=e,e=null}return r.endsWith(".git")&&(r=r.slice(0,-4)),{user:e,project:r,committish:t.hash.slice(1)}}},"extract"),hashformat:o(function(t){return t&&"file-"+Fl(t)},"hashformat")};ct.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:o(({domain:t,user:e,project:r,committish:n,path:s})=>`https://${t}/${e}/${r}/blob/${oe(n)||"HEAD"}/${s}`,"filetemplate"),httpstemplate:o(({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}.git${z("#",n)}`,"httpstemplate"),tarballtemplate:o(({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/archive/${oe(n)||"HEAD"}.tar.gz`,"tarballtemplate"),bugstemplate:o(()=>null,"bugstemplate"),extract:o(t=>{let[,e,r,n]=t.pathname.split("/",4);if(!["archive"].includes(n)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}},"extract")};for(let[t,e]of Object.entries(ct))ct[t]=Object.assign({},v0,e);Cl.exports=ct});var pi=b((Jx,_l)=>{c();var A0=R("url"),Di=o((t,e,r)=>{let n=t.indexOf(r);return t.lastIndexOf(e,n>-1?n:1/0)},"lastIndexOfBefore"),wl=o(t=>{try{return new A0.URL(t)}catch{}},"safeUrl"),T0=o((t,e)=>{let r=t.indexOf(":"),n=t.slice(0,r+1);if(Object.prototype.hasOwnProperty.call(e,n))return t;let s=t.indexOf("@");return s>-1?s>r?`git+ssh://${t}`:t:t.indexOf("//")===r+1?t:`${t.slice(0,r+1)}//${t.slice(r+1)}`},"correctProtocol"),L0=o(t=>{let e=Di(t,"@","#"),r=Di(t,":","#");return r>e&&(t=t.slice(0,r)+"/"+t.slice(r+1)),Di(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`git+ssh://${t}`),t},"correctUrl");_l.exports=(t,e)=>{let r=e?T0(t,e):t;return wl(r)||wl(L0(r))}});var Sl=b((Qx,xl)=>{"use strict";c();var O0=pi(),P0=o(t=>{let e=t.indexOf("#"),r=t.indexOf("/"),n=t.indexOf("/",r+1),s=t.indexOf(":"),i=/\s/.exec(t),u=t.indexOf("@"),a=!i||e>-1&&i.index>e,l=u===-1||e>-1&&u>e,f=s===-1||e>-1&&s>e,h=n===-1||e>-1&&n>e,g=r>0,m=e>-1?t[e-1]!=="/":!t.endsWith("/"),y=!t.startsWith(".");return a&&g&&m&&y&&l&&f&&h},"isGitHubShorthand");xl.exports=(t,e,{gitHosts:r,protocols:n})=>{if(!t)return;let s=P0(t)?`github:${t}`:t,i=O0(s,n);if(!i)return;let u=r.byShortcut[i.protocol],a=r.byDomain[i.hostname.startsWith("www.")?i.hostname.slice(4):i.hostname],l=u||a;if(!l)return;let f=r[u||a],h=null;n[i.protocol]?.auth&&(i.username||i.password)&&(h=`${i.username}${i.password?":"+i.password:""}`);let g=null,m=null,y=null,E=null;try{if(u){let D=i.pathname.startsWith("/")?i.pathname.slice(1):i.pathname,C=D.indexOf("@");C>-1&&(D=D.slice(C+1));let F=D.lastIndexOf("/");F>-1?(m=decodeURIComponent(D.slice(0,F)),m||(m=null),y=decodeURIComponent(D.slice(F+1))):y=decodeURIComponent(D),y.endsWith(".git")&&(y=y.slice(0,-4)),i.hash&&(g=decodeURIComponent(i.hash.slice(1))),E="shortcut"}else{if(!f.protocols.includes(i.protocol))return;let D=f.extract(i);if(!D)return;m=D.user&&decodeURIComponent(D.user),y=decodeURIComponent(D.project),g=decodeURIComponent(D.committish),E=n[i.protocol]?.name||i.protocol.slice(0,-1)}}catch(D){if(D instanceof URIError)return;throw D}return[l,m,h,y,g,E,e]}});var Al=b((rS,vl)=>{"use strict";c();var{LRUCache:k0}=El(),R0=bl(),B0=Sl(),N0=pi(),mi=new k0({max:1e3}),jn=class t{static{o(this,"GitHost")}constructor(e,r,n,s,i,u,a={}){Object.assign(this,t.#r[e],{type:e,user:r,auth:n,project:s,committish:i,default:u,opts:a})}static#r={byShortcut:{},byDomain:{}};static#n={"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(e,r){t.#r[e]=r,t.#r.byDomain[r.domain]=e,t.#r.byShortcut[`${e}:`]=e,t.#n[`${e}:`]={name:e}}static fromUrl(e,r){if(typeof e!="string")return;let n=e+JSON.stringify(r||{});if(!mi.has(n)){let s=B0(e,r,{gitHosts:t.#r,protocols:t.#n});mi.set(n,s?new t(...s):void 0)}return mi.get(n)}static parseUrl(e){return N0(e)}#e(e,r){if(typeof e!="function")return null;let n={...this,...this.opts,...r};n.path||(n.path=""),n.path.startsWith("/")&&(n.path=n.path.slice(1)),n.noCommittish&&(n.committish=null);let s=e(n);return n.noGitPlus&&s.startsWith("git+")?s.slice(4):s}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#e(this.sshtemplate,e)}sshurl(e){return this.#e(this.sshurltemplate,e)}browse(e,...r){return typeof e!="string"?this.#e(this.browsetemplate,e):typeof r[0]!="string"?this.#e(this.browsetreetemplate,{...r[0],path:e}):this.#e(this.browsetreetemplate,{...r[1],fragment:r[0],path:e})}browseFile(e,...r){return typeof r[0]!="string"?this.#e(this.browseblobtemplate,{...r[0],path:e}):this.#e(this.browseblobtemplate,{...r[1],fragment:r[0],path:e})}docs(e){return this.#e(this.docstemplate,e)}bugs(e){return this.#e(this.bugstemplate,e)}https(e){return this.#e(this.httpstemplate,e)}git(e){return this.#e(this.gittemplate,e)}shortcut(e){return this.#e(this.shortcuttemplate,e)}path(e){return this.#e(this.pathtemplate,e)}tarball(e){return this.#e(this.tarballtemplate,{...e,noCommittish:!1})}file(e,r){return this.#e(this.filetemplate,{...r,path:e})}edit(e,r){return this.#e(this.edittemplate,{...r,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}};for(let[t,e]of Object.entries(R0))jn.addHost(t,e);vl.exports=jn});var Ll=b((iS,Tl)=>{c();Tl.exports=I0;function I0(t){if(!t||t==="ERROR: No README data found!")return;t=t.trim().split(`
|
|
8
|
-
`);let e=0;for(;t[e]&&t[e].trim().match(/^(#|$)/);)e++;let r=t.length,n=e+1;for(;n<r&&t[n].trim();)n++;return t.slice(e,n).join(" ").trim()}o(I0,"extractDescription")});var Ol=b((aS,$0)=>{$0.exports={topLevel:{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"},bugs:{web:"url",name:"url"},script:{server:"start",tests:"test"}}});var Bl=b((cS,Rl)=>{c();var j0=Wc(),M0=Zc(),U0=Dl(),Mn=Al(),G0=R("node:module"),q0=["dependencies","devDependencies","optionalDependencies"],H0=Ll(),yi=R("url"),lt=Ol(),Pl=o(t=>t.includes("@")&&t.indexOf("@")<t.lastIndexOf("."),"isEmail");Rl.exports={warn:o(function(){},"warn"),fixRepositoryField:o(function(t){if(t.repositories&&(this.warn("repositories"),t.repository=t.repositories[0]),!t.repository)return this.warn("missingRepository");typeof t.repository=="string"&&(t.repository={type:"git",url:t.repository});var e=t.repository.url||"";if(e){var r=Mn.fromUrl(e);r&&(e=t.repository.url=r.getDefaultRepresentation()==="shortcut"?r.https():r.toString())}e.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",e)},"fixRepositoryField"),fixTypos:o(function(t){Object.keys(lt.topLevel).forEach(function(e){Object.prototype.hasOwnProperty.call(t,e)&&this.warn("typo",e,lt.topLevel[e])},this)},"fixTypos"),fixScriptsField:o(function(t){if(t.scripts){if(typeof t.scripts!="object"){this.warn("nonObjectScripts"),delete t.scripts;return}Object.keys(t.scripts).forEach(function(e){typeof t.scripts[e]!="string"?(this.warn("nonStringScript"),delete t.scripts[e]):lt.script[e]&&!t.scripts[lt.script[e]]&&this.warn("typo",e,lt.script[e],"scripts")},this)}},"fixScriptsField"),fixFilesField:o(function(t){var e=t.files;e&&!Array.isArray(e)?(this.warn("nonArrayFiles"),delete t.files):t.files&&(t.files=t.files.filter(function(r){return!r||typeof r!="string"?(this.warn("invalidFilename",r),!1):!0},this))},"fixFilesField"),fixBinField:o(function(t){if(t.bin&&typeof t.bin=="string"){var e={},r;(r=t.name.match(/^@[^/]+[/](.*)$/))?e[r[1]]=t.bin:e[t.name]=t.bin,t.bin=e}},"fixBinField"),fixManField:o(function(t){t.man&&typeof t.man=="string"&&(t.man=[t.man])},"fixManField"),fixBundleDependenciesField:o(function(t){var e="bundledDependencies",r="bundleDependencies";t[e]&&!t[r]&&(t[r]=t[e],delete t[e]),t[r]&&!Array.isArray(t[r])?(this.warn("nonArrayBundleDependencies"),delete t[r]):t[r]&&(t[r]=t[r].filter(function(n){return!n||typeof n!="string"?(this.warn("nonStringBundleDependency",n),!1):(t.dependencies||(t.dependencies={}),Object.prototype.hasOwnProperty.call(t.dependencies,n)||(this.warn("nonDependencyBundleDependency",n),t.dependencies[n]="*"),!0)},this))},"fixBundleDependenciesField"),fixDependencies:o(function(t){X0(t,this.warn),J0(t,this.warn),this.fixBundleDependenciesField(t),["dependencies","devDependencies"].forEach(function(e){if(e in t){if(!t[e]||typeof t[e]!="object"){this.warn("nonObjectDependencies",e),delete t[e];return}Object.keys(t[e]).forEach(function(r){var n=t[e][r];typeof n!="string"&&(this.warn("nonStringDependency",r,JSON.stringify(n)),delete t[e][r]);var s=Mn.fromUrl(t[e][r]);s&&(t[e][r]=s.toString())},this)}},this)},"fixDependencies"),fixModulesField:o(function(t){t.modules&&(this.warn("deprecatedModules"),delete t.modules)},"fixModulesField"),fixKeywordsField:o(function(t){typeof t.keywords=="string"&&(t.keywords=t.keywords.split(/,\s+/)),t.keywords&&!Array.isArray(t.keywords)?(delete t.keywords,this.warn("nonArrayKeywords")):t.keywords&&(t.keywords=t.keywords.filter(function(e){return typeof e!="string"||!e?(this.warn("nonStringKeyword"),!1):!0},this))},"fixKeywordsField"),fixVersionField:o(function(t,e){var r=!e;if(!t.version)return t.version="",!0;if(!j0(t.version,r))throw new Error('Invalid version: "'+t.version+'"');return t.version=M0(t.version,r),!0},"fixVersionField"),fixPeople:o(function(t){kl(t,Z0),kl(t,Y0)},"fixPeople"),fixNameField:o(function(t,e){typeof e=="boolean"?e={strict:e}:typeof e>"u"&&(e={});var r=e.strict;if(!t.name&&!r){t.name="";return}if(typeof t.name!="string")throw new Error("name field must be a string.");r||(t.name=t.name.trim()),V0(t.name,r,e.allowLegacyCase),G0.builtinModules.includes(t.name)&&this.warn("conflictingName",t.name)},"fixNameField"),fixDescriptionField:o(function(t){t.description&&typeof t.description!="string"&&(this.warn("nonStringDescription"),delete t.description),t.readme&&!t.description&&(t.description=H0(t.readme)),t.description===void 0&&delete t.description,t.description||this.warn("missingDescription")},"fixDescriptionField"),fixReadmeField:o(function(t){t.readme||(this.warn("missingReadme"),t.readme="ERROR: No README data found!")},"fixReadmeField"),fixBugsField:o(function(t){if(!t.bugs&&t.repository&&t.repository.url){var e=Mn.fromUrl(t.repository.url);e&&e.bugs()&&(t.bugs={url:e.bugs()})}else if(t.bugs){if(typeof t.bugs=="string")Pl(t.bugs)?t.bugs={email:t.bugs}:yi.parse(t.bugs).protocol?t.bugs={url:t.bugs}:this.warn("nonEmailUrlBugsString");else{Q0(t.bugs,this.warn);var r=t.bugs;t.bugs={},r.url&&(typeof r.url=="string"&&yi.parse(r.url).protocol?t.bugs.url=r.url:this.warn("nonUrlBugsUrlField")),r.email&&(typeof r.email=="string"&&Pl(r.email)?t.bugs.email=r.email:this.warn("nonEmailBugsEmailField"))}!t.bugs.email&&!t.bugs.url&&(delete t.bugs,this.warn("emptyNormalizedBugs"))}},"fixBugsField"),fixHomepageField:o(function(t){if(!t.homepage&&t.repository&&t.repository.url){var e=Mn.fromUrl(t.repository.url);e&&e.docs()&&(t.homepage=e.docs())}if(t.homepage){if(typeof t.homepage!="string")return this.warn("nonUrlHomepage"),delete t.homepage;yi.parse(t.homepage).protocol||(t.homepage="http://"+t.homepage)}},"fixHomepageField"),fixLicenseField:o(function(t){let e=t.license||t.licence;if(!e)return this.warn("missingLicense");if(typeof e!="string"||e.length<1||e.trim()==="")return this.warn("invalidLicense");if(!U0(e).validForNewPackages)return this.warn("invalidLicense")},"fixLicenseField")};function z0(t){if(t.charAt(0)!=="@")return!1;var e=t.slice(1).split("/");return e.length!==2?!1:e[0]&&e[1]&&e[0]===encodeURIComponent(e[0])&&e[1]===encodeURIComponent(e[1])}o(z0,"isValidScopedPackageName");function W0(t){return!t.match(/[/@\s+%:]/)&&t===encodeURIComponent(t)}o(W0,"isCorrectlyEncodedName");function V0(t,e,r){if(t.charAt(0)==="."||!(z0(t)||W0(t))||e&&!r&&t!==t.toLowerCase()||t.toLowerCase()==="node_modules"||t.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(t))}o(V0,"ensureValidName");function kl(t,e){return t.author&&(t.author=e(t.author)),["maintainers","contributors"].forEach(function(r){Array.isArray(t[r])&&(t[r]=t[r].map(e))}),t}o(kl,"modifyPeople");function Z0(t){if(typeof t=="string")return t;var e=t.name||"",r=t.url||t.web,n=r?" ("+r+")":"",s=t.email||t.mail,i=s?" <"+s+">":"";return e+i+n}o(Z0,"unParsePerson");function Y0(t){if(typeof t!="string")return t;var e=t.match(/^([^(<]+)/),r=t.match(/\(([^()]+)\)/),n=t.match(/<([^<>]+)>/),s={};return e&&e[0].trim()&&(s.name=e[0].trim()),n&&(s.email=n[1]),r&&(s.url=r[1]),s}o(Y0,"parsePerson");function J0(t){var e=t.optionalDependencies;if(e){var r=t.dependencies||{};Object.keys(e).forEach(function(n){r[n]=e[n]}),t.dependencies=r}}o(J0,"addOptionalDepsToDeps");function K0(t,e,r){if(!t)return{};if(typeof t=="string"&&(t=t.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(t))return t;r("deprecatedArrayDependencies",e);var n={};return t.filter(function(s){return typeof s=="string"}).forEach(function(s){s=s.trim().split(/(:?[@\s><=])/);var i=s.shift(),u=s.join("");u=u.trim(),u=u.replace(/^@/,""),n[i]=u}),n}o(K0,"depObjectify");function X0(t,e){q0.forEach(function(r){t[r]&&(t[r]=K0(t[r],r,e))})}o(X0,"objectifyDeps");function Q0(t,e){t&&Object.keys(t).forEach(function(r){lt.bugs[r]&&(e("typo",r,lt.bugs[r],"bugs"),t[lt.bugs[r]]=t[r],delete t[r])})}o(Q0,"bugsTypos")});var Nl=b((hS,eg)=>{eg.exports={repositories:"'repositories' (plural) Not supported. Please pick one as the 'repository' field",missingRepository:"No repository field.",brokenGitUrl:"Probably broken git url: %s",nonObjectScripts:"scripts must be an object",nonStringScript:"script values must be string commands",nonArrayFiles:"Invalid 'files' member",invalidFilename:"Invalid filename in 'files' list: %s",nonArrayBundleDependencies:"Invalid 'bundleDependencies' list. Must be array of package names",nonStringBundleDependency:"Invalid bundleDependencies member: %s",nonDependencyBundleDependency:"Non-dependency in bundleDependencies: %s",nonObjectDependencies:"%s field must be an object",nonStringDependency:"Invalid dependency: %s %s",deprecatedArrayDependencies:"specifying %s as array is deprecated",deprecatedModules:"modules field is deprecated",nonArrayKeywords:"keywords should be an array of strings",nonStringKeyword:"keywords should be an array of strings",conflictingName:"%s is also the name of a node core module.",nonStringDescription:"'description' field should be a string",missingDescription:"No description",missingReadme:"No README data",missingLicense:"No license field.",nonEmailUrlBugsString:"Bug string field must be url, email, or {email,url}",nonUrlBugsUrlField:"bugs.url field must be a string url. Deleted.",nonEmailBugsEmailField:"bugs.email field must be a string email. Deleted.",emptyNormalizedBugs:"Normalized value of bugs field is an empty object. Deleted.",nonUrlHomepage:"homepage field must be a string url. Deleted.",invalidLicense:"license should be a valid SPDX license expression",typo:"%s should probably be %s."}});var jl=b((dS,$l)=>{c();var Il=R("util"),gi=Nl();$l.exports=function(){var t=Array.prototype.slice.call(arguments,0),e=t.shift();if(e==="typo")return tg.apply(null,t);var r=gi[e]?gi[e]:e+": '%s'";return t.unshift(r),Il.format.apply(null,t)};function tg(t,e,r){return r&&(t=r+"['"+t+"']",e=r+"['"+e+"']"),Il.format(gi.typo,t,e)}o(tg,"makeTypoWarning")});var ql=b((mS,Gl)=>{c();Gl.exports=Ml;var Ei=Bl();Ml.fixer=Ei;var rg=jl(),ng=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],sg=["dependencies","people","typos"],Fi=ng.map(function(t){return Ul(t)+"Field"});Fi=Fi.concat(sg);function Ml(t,e,r){e===!0&&(e=null,r=!0),r||(r=!1),(!e||t.private)&&(e=o(function(){},"warn")),t.scripts&&t.scripts.install==="node-gyp rebuild"&&!t.scripts.preinstall&&(t.gypfile=!0),Ei.warn=function(){e(rg.apply(null,arguments))},Fi.forEach(function(n){Ei["fix"+Ul(n)](t,r)}),t._id=t.name+"@"+t.version}o(Ml,"normalize");function Ul(t){return t.charAt(0).toUpperCase()+t.slice(1)}o(Ul,"ucFirst")});var df=b((cA,hf)=>{c();hf.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var pf=b((NA,Rg)=>{Rg.exports={single:{topLeft:"\u250C",top:"\u2500",topRight:"\u2510",right:"\u2502",bottomRight:"\u2518",bottom:"\u2500",bottomLeft:"\u2514",left:"\u2502"},double:{topLeft:"\u2554",top:"\u2550",topRight:"\u2557",right:"\u2551",bottomRight:"\u255D",bottom:"\u2550",bottomLeft:"\u255A",left:"\u2551"},round:{topLeft:"\u256D",top:"\u2500",topRight:"\u256E",right:"\u2502",bottomRight:"\u256F",bottom:"\u2500",bottomLeft:"\u2570",left:"\u2502"},bold:{topLeft:"\u250F",top:"\u2501",topRight:"\u2513",right:"\u2503",bottomRight:"\u251B",bottom:"\u2501",bottomLeft:"\u2517",left:"\u2503"},singleDouble:{topLeft:"\u2553",top:"\u2500",topRight:"\u2556",right:"\u2551",bottomRight:"\u255C",bottom:"\u2500",bottomLeft:"\u2559",left:"\u2551"},doubleSingle:{topLeft:"\u2552",top:"\u2550",topRight:"\u2555",right:"\u2502",bottomRight:"\u255B",bottom:"\u2550",bottomLeft:"\u2558",left:"\u2502"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"\u2198",top:"\u2193",topRight:"\u2199",right:"\u2190",bottomRight:"\u2196",bottom:"\u2191",bottomLeft:"\u2197",left:"\u2192"}}});var Gi=b((IA,Ui)=>{"use strict";c();var mf=pf();Ui.exports=mf;Ui.exports.default=mf});var bf=b((GA,Cf)=>{"use strict";c();Cf.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var _f=b((HA,wf)=>{"use strict";c();var Ug=bf();wf.exports=t=>typeof t=="string"?t.replace(Ug(),""):t});var Sf=b((WA,zi)=>{"use strict";c();var xf=o(t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141),"isFullwidthCodePoint");zi.exports=xf;zi.exports.default=xf});var Af=b((YA,vf)=>{"use strict";c();vf.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var Lf=b((KA,Wi)=>{"use strict";c();var Gg=_f(),qg=Sf(),Hg=Af(),Tf=o(t=>{if(typeof t!="string"||t.length===0||(t=Gg(t),t.length===0))return 0;t=t.replace(Hg()," ");let e=0;for(let r=0;r<t.length;r++){let n=t.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,e+=qg(n)?2:1)}return e},"stringWidth");Wi.exports=Tf;Wi.exports.default=Tf});var Pf=b((e1,Of)=>{"use strict";c();var zg=Lf();function $t(t,e){if(!t)return t;e=e||{};let r=e.align||"center";if(r==="left")return t;let n=e.split||`
|
|
6
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:n,destStat:s}=Ir.checkPathsSync(t,e,"copy",r);if(Ir.checkParentPathsSync(t,n,e,"copy"),r.filter&&!r.filter(t,e))return;let i=Nr.dirname(e);return be.existsSync(i)||pm(i),ha(s,t,e,r)}o(ym,"copySync");function ha(t,e,r,n){let i=(n.dereference?be.statSync:be.lstatSync)(e);if(i.isDirectory())return _m(i,t,e,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return gm(i,t,e,r,n);if(i.isSymbolicLink())return vm(t,e,r,n);throw i.isSocket()?new Error(`Cannot copy a socket file: ${e}`):i.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}o(ha,"getStats");function gm(t,e,r,n,s){return e?Em(t,r,n,s):da(t,r,n,s)}o(gm,"onFile");function Em(t,e,r,n){if(n.overwrite)return be.unlinkSync(r),da(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}o(Em,"mayCopyFile");function da(t,e,r,n){return be.copyFileSync(e,r),n.preserveTimestamps&&Fm(t.mode,e,r),Ks(r,t.mode)}o(da,"copyFile");function Fm(t,e,r){return Cm(t)&&bm(r,t),wm(e,r)}o(Fm,"handleTimestamps");function Cm(t){return(t&128)===0}o(Cm,"fileIsNotWritable");function bm(t,e){return Ks(t,e|128)}o(bm,"makeFileWritable");function Ks(t,e){return be.chmodSync(t,e)}o(Ks,"setDestMode");function wm(t,e){let r=be.statSync(t);return mm(e,r.atime,r.mtime)}o(wm,"setDestTimestamps");function _m(t,e,r,n,s){return e?Da(r,n,s):xm(t.mode,r,n,s)}o(_m,"onDir");function xm(t,e,r,n){return be.mkdirSync(r),Da(e,r,n),Ks(r,t)}o(xm,"mkDirAndCopy");function Da(t,e,r){let n=be.opendirSync(t);try{let s;for(;(s=n.readSync())!==null;)Sm(s.name,t,e,r)}finally{n.closeSync()}}o(Da,"copyDir");function Sm(t,e,r,n){let s=Nr.join(e,t),i=Nr.join(r,t);if(n.filter&&!n.filter(s,i))return;let{destStat:u}=Ir.checkPathsSync(s,i,"copy",n);return ha(u,s,i,n)}o(Sm,"copyDirItem");function vm(t,e,r,n){let s=be.readlinkSync(e);if(n.dereference&&(s=Nr.resolve(process.cwd(),s)),t){let i;try{i=be.readlinkSync(r)}catch(u){if(u.code==="EINVAL"||u.code==="UNKNOWN")return be.symlinkSync(s,r);throw u}if(n.dereference&&(i=Nr.resolve(process.cwd(),i)),Ir.isSrcSubdir(s,i))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${i}'.`);if(Ir.isSrcSubdir(i,s))throw new Error(`Cannot overwrite '${i}' with '${s}'.`);return Am(s,r)}else return be.symlinkSync(s,r)}o(vm,"onLink");function Am(t,e){return be.unlinkSync(e),be.symlinkSync(t,e)}o(Am,"copyLink");pa.exports=ym});var vn=b((t2,ya)=>{"use strict";c();var Tm=ce().fromPromise;ya.exports={copy:Tm(fa()),copySync:ma()}});var $r=b((n2,Ea)=>{"use strict";c();var ga=rr(),Lm=ce().fromCallback;function Om(t,e){ga.rm(t,{recursive:!0,force:!0},e)}o(Om,"remove");function Pm(t){ga.rmSync(t,{recursive:!0,force:!0})}o(Pm,"removeSync");Ea.exports={remove:Lm(Om),removeSync:Pm}});var va=b((o2,Sa)=>{"use strict";c();var km=ce().fromPromise,ba=Ce(),wa=R("path"),_a=$e(),xa=$r(),Fa=km(o(async function(e){let r;try{r=await ba.readdir(e)}catch{return _a.mkdirs(e)}return Promise.all(r.map(n=>xa.remove(wa.join(e,n))))},"emptyDir"));function Ca(t){let e;try{e=ba.readdirSync(t)}catch{return _a.mkdirsSync(t)}e.forEach(r=>{r=wa.join(t,r),xa.removeSync(r)})}o(Ca,"emptyDirSync");Sa.exports={emptyDirSync:Ca,emptydirSync:Ca,emptyDir:Fa,emptydir:Fa}});var Oa=b((c2,La)=>{"use strict";c();var Rm=ce().fromPromise,Aa=R("path"),Xe=Ce(),Ta=$e();async function Bm(t){let e;try{e=await Xe.stat(t)}catch{}if(e&&e.isFile())return;let r=Aa.dirname(t),n=null;try{n=await Xe.stat(r)}catch(s){if(s.code==="ENOENT"){await Ta.mkdirs(r),await Xe.writeFile(t,"");return}else throw s}n.isDirectory()?await Xe.writeFile(t,""):await Xe.readdir(r)}o(Bm,"createFile");function Nm(t){let e;try{e=Xe.statSync(t)}catch{}if(e&&e.isFile())return;let r=Aa.dirname(t);try{Xe.statSync(r).isDirectory()||Xe.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")Ta.mkdirsSync(r);else throw n}Xe.writeFileSync(t,"")}o(Nm,"createFileSync");La.exports={createFile:Rm(Bm),createFileSync:Nm}});var Na=b((h2,Ba)=>{"use strict";c();var Im=ce().fromPromise,Pa=R("path"),ot=Ce(),ka=$e(),{pathExists:$m}=it(),{areIdentical:Ra}=Bt();async function jm(t,e){let r;try{r=await ot.lstat(e)}catch{}let n;try{n=await ot.lstat(t)}catch(u){throw u.message=u.message.replace("lstat","ensureLink"),u}if(r&&Ra(n,r))return;let s=Pa.dirname(e);await $m(s)||await ka.mkdirs(s),await ot.link(t,e)}o(jm,"createLink");function Mm(t,e){let r;try{r=ot.lstatSync(e)}catch{}try{let i=ot.lstatSync(t);if(r&&Ra(i,r))return}catch(i){throw i.message=i.message.replace("lstat","ensureLink"),i}let n=Pa.dirname(e);return ot.existsSync(n)||ka.mkdirsSync(n),ot.linkSync(t,e)}o(Mm,"createLinkSync");Ba.exports={createLink:Im(jm),createLinkSync:Mm}});var $a=b((p2,Ia)=>{"use strict";c();var ut=R("path"),jr=Ce(),{pathExists:Um}=it(),Gm=ce().fromPromise;async function qm(t,e){if(ut.isAbsolute(t)){try{await jr.lstat(t)}catch(i){throw i.message=i.message.replace("lstat","ensureSymlink"),i}return{toCwd:t,toDst:t}}let r=ut.dirname(e),n=ut.join(r,t);if(await Um(n))return{toCwd:n,toDst:t};try{await jr.lstat(t)}catch(i){throw i.message=i.message.replace("lstat","ensureSymlink"),i}return{toCwd:t,toDst:ut.relative(r,t)}}o(qm,"symlinkPaths");function Hm(t,e){if(ut.isAbsolute(t)){if(!jr.existsSync(t))throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}let r=ut.dirname(e),n=ut.join(r,t);if(jr.existsSync(n))return{toCwd:n,toDst:t};if(!jr.existsSync(t))throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:ut.relative(r,t)}}o(Hm,"symlinkPathsSync");Ia.exports={symlinkPaths:Gm(qm),symlinkPathsSync:Hm}});var Ua=b((g2,Ma)=>{"use strict";c();var ja=Ce(),zm=ce().fromPromise;async function Wm(t,e){if(e)return e;let r;try{r=await ja.lstat(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}o(Wm,"symlinkType");function Vm(t,e){if(e)return e;let r;try{r=ja.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}o(Vm,"symlinkTypeSync");Ma.exports={symlinkType:zm(Wm),symlinkTypeSync:Vm}});var za=b((C2,Ha)=>{"use strict";c();var Zm=ce().fromPromise,Ga=R("path"),He=Ce(),{mkdirs:Ym,mkdirsSync:Jm}=$e(),{symlinkPaths:Km,symlinkPathsSync:Xm}=$a(),{symlinkType:Qm,symlinkTypeSync:ey}=Ua(),{pathExists:ty}=it(),{areIdentical:qa}=Bt();async function ry(t,e,r){let n;try{n=await He.lstat(e)}catch{}if(n&&n.isSymbolicLink()){let[a,l]=await Promise.all([He.stat(t),He.stat(e)]);if(qa(a,l))return}let s=await Km(t,e);t=s.toDst;let i=await Qm(s.toCwd,r),u=Ga.dirname(e);return await ty(u)||await Ym(u),He.symlink(t,e,i)}o(ry,"createSymlink");function ny(t,e,r){let n;try{n=He.lstatSync(e)}catch{}if(n&&n.isSymbolicLink()){let a=He.statSync(t),l=He.statSync(e);if(qa(a,l))return}let s=Xm(t,e);t=s.toDst,r=ey(s.toCwd,r);let i=Ga.dirname(e);return He.existsSync(i)||Jm(i),He.symlinkSync(t,e,r)}o(ny,"createSymlinkSync");Ha.exports={createSymlink:Zm(ry),createSymlinkSync:ny}});var Qa=b((_2,Xa)=>{"use strict";c();var{createFile:Wa,createFileSync:Va}=Oa(),{createLink:Za,createLinkSync:Ya}=Na(),{createSymlink:Ja,createSymlinkSync:Ka}=za();Xa.exports={createFile:Wa,createFileSync:Va,ensureFile:Wa,ensureFileSync:Va,createLink:Za,createLinkSync:Ya,ensureLink:Za,ensureLinkSync:Ya,createSymlink:Ja,createSymlinkSync:Ka,ensureSymlink:Ja,ensureSymlinkSync:Ka}});var An=b((S2,ec)=>{c();function sy(t,{EOL:e=`
|
|
7
|
+
`,finalEOL:r=!0,replacer:n=null,spaces:s}={}){let i=r?e:"";return JSON.stringify(t,n,s).replace(/\n/g,e)+i}o(sy,"stringify");function iy(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}o(iy,"stripBom");ec.exports={stringify:sy,stripBom:iy}});var sc=b((T2,nc)=>{c();var ir;try{ir=rr()}catch{ir=R("fs")}var Tn=ce(),{stringify:tc,stripBom:rc}=An();async function oy(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||ir,n="throws"in e?e.throws:!0,s=await Tn.fromCallback(r.readFile)(t,e);s=rc(s);let i;try{i=JSON.parse(s,e?e.reviver:null)}catch(u){if(n)throw u.message=`${t}: ${u.message}`,u;return null}return i}o(oy,"_readFile");var uy=Tn.fromPromise(oy);function ay(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||ir,n="throws"in e?e.throws:!0;try{let s=r.readFileSync(t,e);return s=rc(s),JSON.parse(s,e.reviver)}catch(s){if(n)throw s.message=`${t}: ${s.message}`,s;return null}}o(ay,"readFileSync");async function cy(t,e,r={}){let n=r.fs||ir,s=tc(e,r);await Tn.fromCallback(n.writeFile)(t,s,r)}o(cy,"_writeFile");var ly=Tn.fromPromise(cy);function fy(t,e,r={}){let n=r.fs||ir,s=tc(e,r);return n.writeFileSync(t,s,r)}o(fy,"writeFileSync");var hy={readFile:uy,readFileSync:ay,writeFile:ly,writeFileSync:fy};nc.exports=hy});var oc=b((P2,ic)=>{"use strict";c();var Ln=sc();ic.exports={readJson:Ln.readFile,readJsonSync:Ln.readFileSync,writeJson:Ln.writeFile,writeJsonSync:Ln.writeFileSync}});var On=b((R2,cc)=>{"use strict";c();var dy=ce().fromPromise,Xs=Ce(),uc=R("path"),ac=$e(),Dy=it().pathExists;async function py(t,e,r="utf-8"){let n=uc.dirname(t);return await Dy(n)||await ac.mkdirs(n),Xs.writeFile(t,e,r)}o(py,"outputFile");function my(t,...e){let r=uc.dirname(t);Xs.existsSync(r)||ac.mkdirsSync(r),Xs.writeFileSync(t,...e)}o(my,"outputFileSync");cc.exports={outputFile:dy(py),outputFileSync:my}});var fc=b((I2,lc)=>{"use strict";c();var{stringify:yy}=An(),{outputFile:gy}=On();async function Ey(t,e,r={}){let n=yy(e,r);await gy(t,n,r)}o(Ey,"outputJson");lc.exports=Ey});var dc=b((M2,hc)=>{"use strict";c();var{stringify:Fy}=An(),{outputFileSync:Cy}=On();function by(t,e,r){let n=Fy(e,r);Cy(t,n,r)}o(by,"outputJsonSync");hc.exports=by});var pc=b((q2,Dc)=>{"use strict";c();var wy=ce().fromPromise,we=oc();we.outputJson=wy(fc());we.outputJsonSync=dc();we.outputJSON=we.outputJson;we.outputJSONSync=we.outputJsonSync;we.writeJSON=we.writeJson;we.writeJSONSync=we.writeJsonSync;we.readJSON=we.readJson;we.readJSONSync=we.readJsonSync;Dc.exports=we});var Fc=b((z2,Ec)=>{"use strict";c();var _y=Ce(),mc=R("path"),{copy:xy}=vn(),{remove:gc}=$r(),{mkdirp:Sy}=$e(),{pathExists:vy}=it(),yc=Bt();async function Ay(t,e,r={}){let n=r.overwrite||r.clobber||!1,{srcStat:s,isChangingCase:i=!1}=await yc.checkPaths(t,e,"move",r);await yc.checkParentPaths(t,s,e,"move");let u=mc.dirname(e);return mc.parse(u).root!==u&&await Sy(u),Ty(t,e,n,i)}o(Ay,"move");async function Ty(t,e,r,n){if(!n){if(r)await gc(e);else if(await vy(e))throw new Error("dest already exists.")}try{await _y.rename(t,e)}catch(s){if(s.code!=="EXDEV")throw s;await Ly(t,e,r)}}o(Ty,"doRename");async function Ly(t,e,r){return await xy(t,e,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),gc(t)}o(Ly,"moveAcrossDevice");Ec.exports=Ay});var xc=b((Z2,_c)=>{"use strict";c();var bc=rr(),ei=R("path"),Oy=vn().copySync,wc=$r().removeSync,Py=$e().mkdirpSync,Cc=Bt();function ky(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:s,isChangingCase:i=!1}=Cc.checkPathsSync(t,e,"move",r);return Cc.checkParentPathsSync(t,s,e,"move"),Ry(e)||Py(ei.dirname(e)),By(t,e,n,i)}o(ky,"moveSync");function Ry(t){let e=ei.dirname(t);return ei.parse(e).root===e}o(Ry,"isParentRoot");function By(t,e,r,n){if(n)return Qs(t,e,r);if(r)return wc(e),Qs(t,e,r);if(bc.existsSync(e))throw new Error("dest already exists.");return Qs(t,e,r)}o(By,"doRename");function Qs(t,e,r){try{bc.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return Ny(t,e,r)}}o(Qs,"rename");function Ny(t,e,r){return Oy(t,e,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),wc(t)}o(Ny,"moveAcrossDevice");_c.exports=ky});var vc=b((K2,Sc)=>{"use strict";c();var Iy=ce().fromPromise;Sc.exports={move:Iy(Fc()),moveSync:xc()}});var Tc=b((Q2,Ac)=>{"use strict";c();Ac.exports={...Ce(),...vn(),...va(),...Qa(),...pc(),...$e(),...vc(),...On(),...it(),...$r()}});var ti=b((tx,Lc)=>{c();var $y=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Lc.exports=$y});var ri=b((nx,Oc)=>{c();var jy="2.0.0",My=Number.MAX_SAFE_INTEGER||9007199254740991,Uy=16,Gy=250,qy=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Oc.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Uy,MAX_SAFE_BUILD_LENGTH:Gy,MAX_SAFE_INTEGER:My,RELEASE_TYPES:qy,SEMVER_SPEC_VERSION:jy,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var kc=b((Qe,Pc)=>{c();var{MAX_SAFE_COMPONENT_LENGTH:ni,MAX_SAFE_BUILD_LENGTH:Hy,MAX_LENGTH:zy}=ri(),Wy=ti();Qe=Pc.exports={};var Vy=Qe.re=[],Zy=Qe.safeRe=[],T=Qe.src=[],L=Qe.t={},Yy=0,si="[a-zA-Z0-9-]",Jy=[["\\s",1],["\\d",zy],[si,Hy]],Ky=o(t=>{for(let[e,r]of Jy)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),$=o((t,e,r)=>{let n=Ky(e),s=Yy++;Wy(t,s,e),L[t]=s,T[s]=e,Vy[s]=new RegExp(e,r?"g":void 0),Zy[s]=new RegExp(n,r?"g":void 0)},"createToken");$("NUMERICIDENTIFIER","0|[1-9]\\d*");$("NUMERICIDENTIFIERLOOSE","\\d+");$("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${si}*`);$("MAINVERSION",`(${T[L.NUMERICIDENTIFIER]})\\.(${T[L.NUMERICIDENTIFIER]})\\.(${T[L.NUMERICIDENTIFIER]})`);$("MAINVERSIONLOOSE",`(${T[L.NUMERICIDENTIFIERLOOSE]})\\.(${T[L.NUMERICIDENTIFIERLOOSE]})\\.(${T[L.NUMERICIDENTIFIERLOOSE]})`);$("PRERELEASEIDENTIFIER",`(?:${T[L.NUMERICIDENTIFIER]}|${T[L.NONNUMERICIDENTIFIER]})`);$("PRERELEASEIDENTIFIERLOOSE",`(?:${T[L.NUMERICIDENTIFIERLOOSE]}|${T[L.NONNUMERICIDENTIFIER]})`);$("PRERELEASE",`(?:-(${T[L.PRERELEASEIDENTIFIER]}(?:\\.${T[L.PRERELEASEIDENTIFIER]})*))`);$("PRERELEASELOOSE",`(?:-?(${T[L.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${T[L.PRERELEASEIDENTIFIERLOOSE]})*))`);$("BUILDIDENTIFIER",`${si}+`);$("BUILD",`(?:\\+(${T[L.BUILDIDENTIFIER]}(?:\\.${T[L.BUILDIDENTIFIER]})*))`);$("FULLPLAIN",`v?${T[L.MAINVERSION]}${T[L.PRERELEASE]}?${T[L.BUILD]}?`);$("FULL",`^${T[L.FULLPLAIN]}$`);$("LOOSEPLAIN",`[v=\\s]*${T[L.MAINVERSIONLOOSE]}${T[L.PRERELEASELOOSE]}?${T[L.BUILD]}?`);$("LOOSE",`^${T[L.LOOSEPLAIN]}$`);$("GTLT","((?:<|>)?=?)");$("XRANGEIDENTIFIERLOOSE",`${T[L.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);$("XRANGEIDENTIFIER",`${T[L.NUMERICIDENTIFIER]}|x|X|\\*`);$("XRANGEPLAIN",`[v=\\s]*(${T[L.XRANGEIDENTIFIER]})(?:\\.(${T[L.XRANGEIDENTIFIER]})(?:\\.(${T[L.XRANGEIDENTIFIER]})(?:${T[L.PRERELEASE]})?${T[L.BUILD]}?)?)?`);$("XRANGEPLAINLOOSE",`[v=\\s]*(${T[L.XRANGEIDENTIFIERLOOSE]})(?:\\.(${T[L.XRANGEIDENTIFIERLOOSE]})(?:\\.(${T[L.XRANGEIDENTIFIERLOOSE]})(?:${T[L.PRERELEASELOOSE]})?${T[L.BUILD]}?)?)?`);$("XRANGE",`^${T[L.GTLT]}\\s*${T[L.XRANGEPLAIN]}$`);$("XRANGELOOSE",`^${T[L.GTLT]}\\s*${T[L.XRANGEPLAINLOOSE]}$`);$("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ni}})(?:\\.(\\d{1,${ni}}))?(?:\\.(\\d{1,${ni}}))?`);$("COERCE",`${T[L.COERCEPLAIN]}(?:$|[^\\d])`);$("COERCEFULL",T[L.COERCEPLAIN]+`(?:${T[L.PRERELEASE]})?(?:${T[L.BUILD]})?(?:$|[^\\d])`);$("COERCERTL",T[L.COERCE],!0);$("COERCERTLFULL",T[L.COERCEFULL],!0);$("LONETILDE","(?:~>?)");$("TILDETRIM",`(\\s*)${T[L.LONETILDE]}\\s+`,!0);Qe.tildeTrimReplace="$1~";$("TILDE",`^${T[L.LONETILDE]}${T[L.XRANGEPLAIN]}$`);$("TILDELOOSE",`^${T[L.LONETILDE]}${T[L.XRANGEPLAINLOOSE]}$`);$("LONECARET","(?:\\^)");$("CARETTRIM",`(\\s*)${T[L.LONECARET]}\\s+`,!0);Qe.caretTrimReplace="$1^";$("CARET",`^${T[L.LONECARET]}${T[L.XRANGEPLAIN]}$`);$("CARETLOOSE",`^${T[L.LONECARET]}${T[L.XRANGEPLAINLOOSE]}$`);$("COMPARATORLOOSE",`^${T[L.GTLT]}\\s*(${T[L.LOOSEPLAIN]})$|^$`);$("COMPARATOR",`^${T[L.GTLT]}\\s*(${T[L.FULLPLAIN]})$|^$`);$("COMPARATORTRIM",`(\\s*)${T[L.GTLT]}\\s*(${T[L.LOOSEPLAIN]}|${T[L.XRANGEPLAIN]})`,!0);Qe.comparatorTrimReplace="$1$2$3";$("HYPHENRANGE",`^\\s*(${T[L.XRANGEPLAIN]})\\s+-\\s+(${T[L.XRANGEPLAIN]})\\s*$`);$("HYPHENRANGELOOSE",`^\\s*(${T[L.XRANGEPLAINLOOSE]})\\s+-\\s+(${T[L.XRANGEPLAINLOOSE]})\\s*$`);$("STAR","(<|>)?=?\\s*\\*");$("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");$("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Bc=b((ux,Rc)=>{c();var Xy=Object.freeze({loose:!0}),Qy=Object.freeze({}),e0=o(t=>t?typeof t!="object"?Xy:t:Qy,"parseOptions");Rc.exports=e0});var jc=b((lx,$c)=>{c();var Nc=/^[0-9]+$/,Ic=o((t,e)=>{let r=Nc.test(t),n=Nc.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},"compareIdentifiers"),t0=o((t,e)=>Ic(e,t),"rcompareIdentifiers");$c.exports={compareIdentifiers:Ic,rcompareIdentifiers:t0}});var Gc=b((dx,Uc)=>{c();var Pn=ti(),{MAX_LENGTH:Mc,MAX_SAFE_INTEGER:kn}=ri(),{safeRe:Rn,t:Bn}=kc(),r0=Bc(),{compareIdentifiers:or}=jc(),ii=class t{static{o(this,"SemVer")}constructor(e,r){if(r=r0(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Mc)throw new TypeError(`version is longer than ${Mc} characters`);Pn("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?Rn[Bn.LOOSE]:Rn[Bn.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>kn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>kn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>kn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let i=+s;if(i>=0&&i<kn)return i}return s}):this.prerelease=[],this.build=n[5]?n[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(e){if(Pn("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),or(this.major,e.major)||or(this.minor,e.minor)||or(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],s=e.prerelease[r];if(Pn("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return or(n,s)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],s=e.build[r];if(Pn("build compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return or(n,s)}while(++r)}inc(e,r,n){if(e.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=`-${r}`.match(this.options.loose?Rn[Bn.PRERELEASELOOSE]:Rn[Bn.PRERELEASE]);if(!s||s[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);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 s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let i=[r,s];n===!1&&(i=[r]),or(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Uc.exports=ii});var oi=b((mx,Hc)=>{c();var qc=Gc(),n0=o((t,e,r=!1)=>{if(t instanceof qc)return t;try{return new qc(t,e)}catch(n){if(!r)return null;throw n}},"parse");Hc.exports=n0});var Wc=b((Ex,zc)=>{c();var s0=oi(),i0=o((t,e)=>{let r=s0(t,e);return r?r.version:null},"valid");zc.exports=i0});var Zc=b((bx,Vc)=>{c();var o0=oi(),u0=o((t,e)=>{let r=o0(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},"clean");Vc.exports=u0});var ui=b((xx,a0)=>{a0.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","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","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","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-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","FSFULLRWD","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","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","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","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","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-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","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","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","metamail","mpi-permissive","mpich2","mplus","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"]});var Yc=b((Sx,c0)=>{c0.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"]});var Jc=b((vx,l0)=>{l0.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"]});var Xc=b((Ax,Kc)=>{"use strict";c();var f0=[].concat(ui()).concat(Yc()),h0=Jc();Kc.exports=function(t){var e=0;function r(){return e<t.length}o(r,"hasMore");function n(E){if(E instanceof RegExp){var D=t.slice(e),C=D.match(E);if(C)return e+=C[0].length,C[0]}else if(t.indexOf(E,e)===e)return e+=E.length,E}o(n,"read");function s(){n(/[ ]*/)}o(s,"skipWhitespace");function i(){for(var E,D=["WITH","AND","OR","(",")",":","+"],C=0;C<D.length&&(E=n(D[C]),!E);C++);if(E==="+"&&e>1&&t[e-2]===" ")throw new Error("Space before `+`");return E&&{type:"OPERATOR",string:E}}o(i,"operator");function u(){return n(/[A-Za-z0-9-.]+/)}o(u,"idstring");function a(){var E=u();if(!E)throw new Error("Expected idstring at offset "+e);return E}o(a,"expectIdstring");function l(){if(n("DocumentRef-")){var E=a();return{type:"DOCUMENTREF",string:E}}}o(l,"documentRef");function f(){if(n("LicenseRef-")){var E=a();return{type:"LICENSEREF",string:E}}}o(f,"licenseRef");function h(){var E=e,D=u();if(f0.indexOf(D)!==-1)return{type:"LICENSE",string:D};if(h0.indexOf(D)!==-1)return{type:"EXCEPTION",string:D};e=E}o(h,"identifier");function g(){return i()||l()||f()||h()}o(g,"parseToken");for(var m=[];r()&&(s(),!!r());){var y=g();if(!y)throw new Error("Unexpected `"+t[e]+"` at offset "+e);m.push(y)}return m}});var el=b((Ox,Qc)=>{"use strict";c();Qc.exports=function(t){var e=0;function r(){return e<t.length}o(r,"hasMore");function n(){return r()?t[e]:null}o(n,"token");function s(){if(!r())throw new Error;e++}o(s,"next");function i(D){var C=n();if(C&&C.type==="OPERATOR"&&D===C.string)return s(),C.string}o(i,"parseOperator");function u(){if(i("WITH")){var D=n();if(D&&D.type==="EXCEPTION")return s(),D.string;throw new Error("Expected exception after `WITH`")}}o(u,"parseWith");function a(){var D=e,C="",F=n();if(F.type==="DOCUMENTREF"&&(s(),C+="DocumentRef-"+F.string+":",!i(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(F=n(),F.type==="LICENSEREF")return s(),C+="LicenseRef-"+F.string,{license:C};e=D}o(a,"parseLicenseRef");function l(){var D=n();if(D&&D.type==="LICENSE"){s();var C={license:D.string};i("+")&&(C.plus=!0);var F=u();return F&&(C.exception=F),C}}o(l,"parseLicense");function f(){var D=i("(");if(D){var C=y();if(!i(")"))throw new Error("Expected `)`");return C}}o(f,"parseParenthesizedExpression");function h(){return f()||a()||l()}o(h,"parseAtom");function g(D,C){return o(function F(){var O=C();if(O){if(!i(D))return O;var S=F();if(!S)throw new Error("Expected expression");return{left:O,conjunction:D.toLowerCase(),right:S}}},"parseBinaryOp")}o(g,"makeBinaryOpParser");var m=g("AND",h),y=g("OR",m),E=y();if(!E||r())throw new Error("Syntax error");return E}});var ai=b((Rx,tl)=>{"use strict";c();var d0=Xc(),D0=el();tl.exports=function(t){return D0(d0(t))}});var ll=b((Nx,cl)=>{c();var p0=ai(),m0=ui();function Nn(t){try{return p0(t),!0}catch{return!1}}o(Nn,"valid");function al(t,e){var r=e[0].length-t[0].length;return r!==0?r:t[0].toUpperCase().localeCompare(e[0].toUpperCase())}o(al,"sortTranspositions");var rl=[["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(al),y0=0,g0=1,nl=[function(t){return t.toUpperCase()},function(t){return t.trim()},function(t){return t.replace(/\./g,"")},function(t){return t.replace(/\s+/g,"")},function(t){return t.replace(/\s+/g,"-")},function(t){return t.replace("v","-")},function(t){return t.replace(/,?\s*(\d)/,"-$1")},function(t){return t.replace(/,?\s*(\d)/,"-$1.0")},function(t){return t.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(t){return t.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(t){return t[0].toUpperCase()+t.slice(1)},function(t){return t.replace("/","-")},function(t){return t.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(t){return t.indexOf("3.0")!==-1?t+"-or-later":t+"-only"},function(t){return t+"only"},function(t){return t.replace(/(\d)$/,"-$1.0")},function(t){return t.replace(/(-| )?(\d)$/,"-$2-Clause")},function(t){return t.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(t){return t.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(t){return t.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(t){return t.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(t){return t.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(t){return t.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(t){return"CC-"+t},function(t){return"CC-"+t+"-4.0"},function(t){return t.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(t){return"CC-"+t.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],ci=m0.map(function(t){var e=/^(.*)-\d+\.\d+$/.exec(t);return e?[e[0],e[1]]:[t,null]}).reduce(function(t,e){var r=e[1];return t[r]=t[r]||[],t[r].push(e[0]),t},{}),E0=Object.keys(ci).map(o(function(e){return[e,ci[e]]},"makeEntries")).filter(o(function(e){return e[1].length===1&&e[0]!==null&&e[0]!=="APL"},"identifySoleVersions")).map(o(function(e){return[e[0],e[1][0]]},"createLastResorts"));ci=void 0;var sl=[["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(E0).sort(al),F0=0,C0=1,il=o(function(t){for(var e=0;e<nl.length;e++){var r=nl[e](t).trim();if(r!==t&&Nn(r))return r}return null},"validTransformation"),ol=o(function(t){for(var e=t.toUpperCase(),r=0;r<sl.length;r++){var n=sl[r];if(e.indexOf(n[F0])>-1)return n[C0]}return null},"validLastResort"),ul=o(function(t,e){for(var r=0;r<rl.length;r++){var n=rl[r],s=n[y0];if(t.indexOf(s)>-1){var i=t.replace(s,n[g0]),u=e(i);if(u!==null)return u}}return null},"anyCorrection");cl.exports=function(t,e){e=e||{};var r=e.upgrade===void 0?!0:!!e.upgrade;function n(a){return r?b0(a):a}o(n,"postprocess");var s=typeof t=="string"&&t.trim().length!==0;if(!s)throw Error("Invalid argument. Expected non-empty string.");if(t=t.trim(),Nn(t))return n(t);var i=t.replace(/\+$/,"").trim();if(Nn(i))return n(i);var u=il(t);return u!==null||(u=ul(t,function(a){return Nn(a)?a:il(a)}),u!==null)||(u=ol(t),u!==null)||(u=ul(t,ol),u!==null)?n(u):null};function b0(t){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(t)!==-1?t+"-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(t)!==-1?t.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(t)!==-1?t+"-or-later":t}o(b0,"upgradeGPLs")});var Dl=b((jx,dl)=>{c();var w0=ai(),_0=ll(),fl='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',x0=/^SEE LICEN[CS]E IN (.+)$/;function hl(t,e){return e.slice(0,t.length)===t}o(hl,"startsWith");function li(t){if(t.hasOwnProperty("license")){var e=t.license;return hl("LicenseRef",e)||hl("DocumentRef",e)}else return li(t.left)||li(t.right)}o(li,"usesLicenseRef");dl.exports=function(t){var e;try{e=w0(t)}catch{var r;if(t==="UNLICENSED"||t==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(r=x0.exec(t))return{validForOldPackages:!0,validForNewPackages:!0,inFile:r[1]};var n={validForOldPackages:!1,validForNewPackages:!1,warnings:[fl]};if(t.trim().length!==0){var s=_0(t);s&&n.warnings.push('license is similar to the valid expression "'+s+'"')}return n}return li(e)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[fl]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}}});var El=b($n=>{"use strict";c();Object.defineProperty($n,"__esModule",{value:!0});$n.LRUCache=void 0;var ur=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ml=new Set,fi=typeof process=="object"&&process?process:{},yl=o((t,e,r,n)=>{typeof fi.emitWarning=="function"?fi.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)},"emitWarning"),In=globalThis.AbortController,pl=globalThis.AbortSignal;if(typeof In>"u"){pl=class{static{o(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(n,s){this._onabort.push(s)}},In=class{static{o(this,"AbortController")}constructor(){e()}signal=new pl;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let s of this.signal._onabort)s(n);this.signal.onabort?.(n)}}};let t=fi.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=o(()=>{t&&(t=!1,yl("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"warnACPolyfill")}var S0=o(t=>!ml.has(t),"shouldWarn"),Hx=Symbol("type"),at=o(t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),"isPosInt"),gl=o(t=>at(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ar:null:null,"getUintArray"),ar=class extends Array{static{o(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},hi=class t{static{o(this,"Stack")}heap;length;static#r=!1;static create(e){let r=gl(e);if(!r)return[];t.#r=!0;let n=new t(e,r);return t.#r=!1,n}constructor(e,r){if(!t.#r)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},di=class t{static{o(this,"LRUCache")}#r;#n;#e;#a;#w;#g;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#D;#u;#o;#t;#h;#p;#f;#c;#E;#l;#F;#C;#m;#b;#A;#d;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#m,sizes:e.#F,keyMap:e.#u,keyList:e.#o,valList:e.#t,next:e.#h,prev:e.#p,get head(){return e.#f},get tail(){return e.#c},free:e.#E,isBackgroundFetch:o(r=>e.#s(r),"isBackgroundFetch"),backgroundFetch:o((r,n,s,i)=>e.#R(r,n,s,i),"backgroundFetch"),moveToTail:o(r=>e.#O(r),"moveToTail"),indexes:o(r=>e.#_(r),"indexes"),rindexes:o(r=>e.#x(r),"rindexes"),isStale:o(r=>e.#y(r),"isStale")}}get max(){return this.#r}get maxSize(){return this.#n}get calculatedSize(){return this.#D}get size(){return this.#i}get fetchMethod(){return this.#w}get memoMethod(){return this.#g}get dispose(){return this.#e}get disposeAfter(){return this.#a}constructor(e){let{max:r=0,ttl:n,ttlResolution:s=1,ttlAutopurge:i,updateAgeOnGet:u,updateAgeOnHas:a,allowStale:l,dispose:f,disposeAfter:h,noDisposeOnSet:g,noUpdateTTL:m,maxSize:y=0,maxEntrySize:E=0,sizeCalculation:D,fetchMethod:C,memoMethod:F,noDeleteOnFetchRejection:O,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:U,ignoreFetchAbort:te}=e;if(r!==0&&!at(r))throw new TypeError("max option must be a nonnegative integer");let ue=r?gl(r):Array;if(!ue)throw new Error("invalid max value: "+r);if(this.#r=r,this.#n=y,this.maxEntrySize=E||this.#n,this.sizeCalculation=D,this.sizeCalculation){if(!this.#n&&!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(F!==void 0&&typeof F!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#g=F,C!==void 0&&typeof C!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#w=C,this.#A=!!C,this.#u=new Map,this.#o=new Array(r).fill(void 0),this.#t=new Array(r).fill(void 0),this.#h=new ue(r),this.#p=new ue(r),this.#f=0,this.#c=0,this.#E=hi.create(r),this.#i=0,this.#D=0,typeof f=="function"&&(this.#e=f),typeof h=="function"?(this.#a=h,this.#l=[]):(this.#a=void 0,this.#l=void 0),this.#b=!!this.#e,this.#d=!!this.#a,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!O,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!U,this.ignoreFetchAbort=!!te,this.maxEntrySize!==0){if(this.#n!==0&&!at(this.#n))throw new TypeError("maxSize must be a positive integer if specified");if(!at(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#U()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!a,this.ttlResolution=at(s)||s===0?s:1,this.ttlAutopurge=!!i,this.ttl=n||0,this.ttl){if(!at(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#B()}if(this.#r===0&&this.ttl===0&&this.#n===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#r&&!this.#n){let Ue="LRU_CACHE_UNBOUNDED";S0(Ue)&&(ml.add(Ue),yl("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Ue,t))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#B(){let e=new ar(this.#r),r=new ar(this.#r);this.#m=e,this.#C=r,this.#N=(i,u,a=ur.now())=>{if(r[i]=u!==0?a:0,e[i]=u,u!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#y(i)&&this.#S(this.#o[i],"expire")},u+1);l.unref&&l.unref()}},this.#T=i=>{r[i]=e[i]!==0?ur.now():0},this.#v=(i,u)=>{if(e[u]){let a=e[u],l=r[u];if(!a||!l)return;i.ttl=a,i.start=l,i.now=n||s();let f=i.now-l;i.remainingTTL=a-f}};let n=0,s=o(()=>{let i=ur.now();if(this.ttlResolution>0){n=i;let u=setTimeout(()=>n=0,this.ttlResolution);u.unref&&u.unref()}return i},"getNow");this.getRemainingTTL=i=>{let u=this.#u.get(i);if(u===void 0)return 0;let a=e[u],l=r[u];if(!a||!l)return 1/0;let f=(n||s())-l;return a-f},this.#y=i=>{let u=r[i],a=e[i];return!!a&&!!u&&(n||s())-u>a}}#T=o(()=>{},"#updateItemAge");#v=o(()=>{},"#statusTTL");#N=o(()=>{},"#setItemTTL");#y=o(()=>!1,"#isStale");#U(){let e=new ar(this.#r);this.#D=0,this.#F=e,this.#L=r=>{this.#D-=e[r],e[r]=0},this.#I=(r,n,s,i)=>{if(this.#s(n))return 0;if(!at(s))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(s=i(n,r),!at(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.#P=(r,n,s)=>{if(e[r]=n,this.#n){let i=this.#n-e[r];for(;this.#D>i;)this.#k(!0)}this.#D+=e[r],s&&(s.entrySize=n,s.totalCalculatedSize=this.#D)}}#L=o(e=>{},"#removeItemSize");#P=o((e,r,n)=>{},"#addItemSize");#I=o((e,r,n,s)=>{if(n||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#_({allowStale:e=this.allowStale}={}){if(this.#i)for(let r=this.#c;!(!this.#$(r)||((e||!this.#y(r))&&(yield r),r===this.#f));)r=this.#p[r]}*#x({allowStale:e=this.allowStale}={}){if(this.#i)for(let r=this.#f;!(!this.#$(r)||((e||!this.#y(r))&&(yield r),r===this.#c));)r=this.#h[r]}#$(e){return e!==void 0&&this.#u.get(this.#o[e])===e}*entries(){for(let e of this.#_())this.#t[e]!==void 0&&this.#o[e]!==void 0&&!this.#s(this.#t[e])&&(yield[this.#o[e],this.#t[e]])}*rentries(){for(let e of this.#x())this.#t[e]!==void 0&&this.#o[e]!==void 0&&!this.#s(this.#t[e])&&(yield[this.#o[e],this.#t[e]])}*keys(){for(let e of this.#_()){let r=this.#o[e];r!==void 0&&!this.#s(this.#t[e])&&(yield r)}}*rkeys(){for(let e of this.#x()){let r=this.#o[e];r!==void 0&&!this.#s(this.#t[e])&&(yield r)}}*values(){for(let e of this.#_())this.#t[e]!==void 0&&!this.#s(this.#t[e])&&(yield this.#t[e])}*rvalues(){for(let e of this.#x())this.#t[e]!==void 0&&!this.#s(this.#t[e])&&(yield this.#t[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let n of this.#_()){let s=this.#t[n],i=this.#s(s)?s.__staleWhileFetching:s;if(i!==void 0&&e(i,this.#o[n],this))return this.get(this.#o[n],r)}}forEach(e,r=this){for(let n of this.#_()){let s=this.#t[n],i=this.#s(s)?s.__staleWhileFetching:s;i!==void 0&&e.call(r,i,this.#o[n],this)}}rforEach(e,r=this){for(let n of this.#x()){let s=this.#t[n],i=this.#s(s)?s.__staleWhileFetching:s;i!==void 0&&e.call(r,i,this.#o[n],this)}}purgeStale(){let e=!1;for(let r of this.#x({allowStale:!0}))this.#y(r)&&(this.#S(this.#o[r],"expire"),e=!0);return e}info(e){let r=this.#u.get(e);if(r===void 0)return;let n=this.#t[r],s=this.#s(n)?n.__staleWhileFetching:n;if(s===void 0)return;let i={value:s};if(this.#m&&this.#C){let u=this.#m[r],a=this.#C[r];if(u&&a){let l=u-(ur.now()-a);i.ttl=l,i.start=Date.now()}}return this.#F&&(i.size=this.#F[r]),i}dump(){let e=[];for(let r of this.#_({allowStale:!0})){let n=this.#o[r],s=this.#t[r],i=this.#s(s)?s.__staleWhileFetching:s;if(i===void 0||n===void 0)continue;let u={value:i};if(this.#m&&this.#C){u.ttl=this.#m[r];let a=ur.now()-this.#C[r];u.start=Math.floor(Date.now()-a)}this.#F&&(u.size=this.#F[r]),e.unshift([n,u])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let s=Date.now()-n.start;n.start=ur.now()-s}this.set(r,n.value,n)}}set(e,r,n={}){if(r===void 0)return this.delete(e),this;let{ttl:s=this.ttl,start:i,noDisposeOnSet:u=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=n,{noUpdateTTL:f=this.noUpdateTTL}=n,h=this.#I(e,r,n.size||0,a);if(this.maxEntrySize&&h>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#S(e,"set"),this;let g=this.#i===0?void 0:this.#u.get(e);if(g===void 0)g=this.#i===0?this.#c:this.#E.length!==0?this.#E.pop():this.#i===this.#r?this.#k(!1):this.#i,this.#o[g]=e,this.#t[g]=r,this.#u.set(e,g),this.#h[this.#c]=g,this.#p[g]=this.#c,this.#c=g,this.#i++,this.#P(g,h,l),l&&(l.set="add"),f=!1;else{this.#O(g);let m=this.#t[g];if(r!==m){if(this.#A&&this.#s(m)){m.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:y}=m;y!==void 0&&!u&&(this.#b&&this.#e?.(y,e,"set"),this.#d&&this.#l?.push([y,e,"set"]))}else u||(this.#b&&this.#e?.(m,e,"set"),this.#d&&this.#l?.push([m,e,"set"]));if(this.#L(g),this.#P(g,h,l),this.#t[g]=r,l){l.set="replace";let y=m&&this.#s(m)?m.__staleWhileFetching:m;y!==void 0&&(l.oldValue=y)}}else l&&(l.set="update")}if(s!==0&&!this.#m&&this.#B(),this.#m&&(f||this.#N(g,s,i),l&&this.#v(l,g)),!u&&this.#d&&this.#l){let m=this.#l,y;for(;y=m?.shift();)this.#a?.(...y)}return this}pop(){try{for(;this.#i;){let e=this.#t[this.#f];if(this.#k(!0),this.#s(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#d&&this.#l){let e=this.#l,r;for(;r=e?.shift();)this.#a?.(...r)}}}#k(e){let r=this.#f,n=this.#o[r],s=this.#t[r];return this.#A&&this.#s(s)?s.__abortController.abort(new Error("evicted")):(this.#b||this.#d)&&(this.#b&&this.#e?.(s,n,"evict"),this.#d&&this.#l?.push([s,n,"evict"])),this.#L(r),e&&(this.#o[r]=void 0,this.#t[r]=void 0,this.#E.push(r)),this.#i===1?(this.#f=this.#c=0,this.#E.length=0):this.#f=this.#h[r],this.#u.delete(n),this.#i--,r}has(e,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:s}=r,i=this.#u.get(e);if(i!==void 0){let u=this.#t[i];if(this.#s(u)&&u.__staleWhileFetching===void 0)return!1;if(this.#y(i))s&&(s.has="stale",this.#v(s,i));else return n&&this.#T(i),s&&(s.has="hit",this.#v(s,i)),!0}else s&&(s.has="miss");return!1}peek(e,r={}){let{allowStale:n=this.allowStale}=r,s=this.#u.get(e);if(s===void 0||!n&&this.#y(s))return;let i=this.#t[s];return this.#s(i)?i.__staleWhileFetching:i}#R(e,r,n,s){let i=r===void 0?void 0:this.#t[r];if(this.#s(i))return i;let u=new In,{signal:a}=n;a?.addEventListener("abort",()=>u.abort(a.reason),{signal:u.signal});let l={signal:u.signal,options:n,context:s},f=o((D,C=!1)=>{let{aborted:F}=u.signal,O=n.ignoreFetchAbort&&D!==void 0;if(n.status&&(F&&!C?(n.status.fetchAborted=!0,n.status.fetchError=u.signal.reason,O&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),F&&!O&&!C)return g(u.signal.reason);let S=y;return this.#t[r]===y&&(D===void 0?S.__staleWhileFetching?this.#t[r]=S.__staleWhileFetching:this.#S(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,D,l.options))),D},"cb"),h=o(D=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=D),g(D)),"eb"),g=o(D=>{let{aborted:C}=u.signal,F=C&&n.allowStaleOnFetchAbort,O=F||n.allowStaleOnFetchRejection,S=O||n.noDeleteOnFetchRejection,k=y;if(this.#t[r]===y&&(!S||k.__staleWhileFetching===void 0?this.#S(e,"fetch"):F||(this.#t[r]=k.__staleWhileFetching)),O)return n.status&&k.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),k.__staleWhileFetching;if(k.__returned===k)throw D},"fetchFail"),m=o((D,C)=>{let F=this.#w?.(e,i,l);F&&F instanceof Promise&&F.then(O=>D(O===void 0?void 0:O),C),u.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(D(void 0),n.allowStaleOnFetchAbort&&(D=o(O=>f(O,!0),"res")))})},"pcall");n.status&&(n.status.fetchDispatched=!0);let y=new Promise(m).then(f,h),E=Object.assign(y,{__abortController:u,__staleWhileFetching:i,__returned:void 0});return r===void 0?(this.set(e,E,{...l.options,status:void 0}),r=this.#u.get(e)):this.#t[r]=E,E}#s(e){if(!this.#A)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof In}async fetch(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:u=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:y=this.ignoreFetchAbort,allowStaleOnFetchAbort:E=this.allowStaleOnFetchAbort,context:D,forceRefresh:C=!1,status:F,signal:O}=r;if(!this.#A)return F&&(F.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:s,noDeleteOnStaleGet:i,status:F});let S={allowStale:n,updateAgeOnGet:s,noDeleteOnStaleGet:i,ttl:u,noDisposeOnSet:a,size:l,sizeCalculation:f,noUpdateTTL:h,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:E,ignoreFetchAbort:y,status:F,signal:O},k=this.#u.get(e);if(k===void 0){F&&(F.fetch="miss");let U=this.#R(e,k,S,D);return U.__returned=U}else{let U=this.#t[k];if(this.#s(U)){let H=n&&U.__staleWhileFetching!==void 0;return F&&(F.fetch="inflight",H&&(F.returnedStale=!0)),H?U.__staleWhileFetching:U.__returned=U}let te=this.#y(k);if(!C&&!te)return F&&(F.fetch="hit"),this.#O(k),s&&this.#T(k),F&&this.#v(F,k),U;let ue=this.#R(e,k,S,D),B=ue.__staleWhileFetching!==void 0&&n;return F&&(F.fetch=te?"stale":"refresh",B&&te&&(F.returnedStale=!0)),B?ue.__staleWhileFetching:ue.__returned=ue}}async forceFetch(e,r={}){let n=await this.fetch(e,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,r={}){let n=this.#g;if(!n)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:i,...u}=r,a=this.get(e,u);if(!i&&a!==void 0)return a;let l=n(e,a,{options:u,context:s});return this.set(e,l,u),l}get(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:u}=r,a=this.#u.get(e);if(a!==void 0){let l=this.#t[a],f=this.#s(l);return u&&this.#v(u,a),this.#y(a)?(u&&(u.get="stale"),f?(u&&n&&l.__staleWhileFetching!==void 0&&(u.returnedStale=!0),n?l.__staleWhileFetching:void 0):(i||this.#S(e,"expire"),u&&n&&(u.returnedStale=!0),n?l:void 0)):(u&&(u.get="hit"),f?l.__staleWhileFetching:(this.#O(a),s&&this.#T(a),l))}else u&&(u.get="miss")}#j(e,r){this.#p[r]=e,this.#h[e]=r}#O(e){e!==this.#c&&(e===this.#f?this.#f=this.#h[e]:this.#j(this.#p[e],this.#h[e]),this.#j(this.#c,e),this.#c=e)}delete(e){return this.#S(e,"delete")}#S(e,r){let n=!1;if(this.#i!==0){let s=this.#u.get(e);if(s!==void 0)if(n=!0,this.#i===1)this.#M(r);else{this.#L(s);let i=this.#t[s];if(this.#s(i)?i.__abortController.abort(new Error("deleted")):(this.#b||this.#d)&&(this.#b&&this.#e?.(i,e,r),this.#d&&this.#l?.push([i,e,r])),this.#u.delete(e),this.#o[s]=void 0,this.#t[s]=void 0,s===this.#c)this.#c=this.#p[s];else if(s===this.#f)this.#f=this.#h[s];else{let u=this.#p[s];this.#h[u]=this.#h[s];let a=this.#h[s];this.#p[a]=this.#p[s]}this.#i--,this.#E.push(s)}}if(this.#d&&this.#l?.length){let s=this.#l,i;for(;i=s?.shift();)this.#a?.(...i)}return n}clear(){return this.#M("delete")}#M(e){for(let r of this.#x({allowStale:!0})){let n=this.#t[r];if(this.#s(n))n.__abortController.abort(new Error("deleted"));else{let s=this.#o[r];this.#b&&this.#e?.(n,s,e),this.#d&&this.#l?.push([n,s,e])}}if(this.#u.clear(),this.#t.fill(void 0),this.#o.fill(void 0),this.#m&&this.#C&&(this.#m.fill(0),this.#C.fill(0)),this.#F&&this.#F.fill(0),this.#f=0,this.#c=0,this.#E.length=0,this.#D=0,this.#i=0,this.#d&&this.#l){let r=this.#l,n;for(;n=r?.shift();)this.#a?.(...n)}}};$n.LRUCache=di});var bl=b((Zx,Cl)=>{"use strict";c();var z=o((...t)=>t.every(e=>e)?t.join(""):"","maybeJoin"),oe=o(t=>t?encodeURIComponent(t):"","maybeEncode"),Fl=o(t=>t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),"formatHashFragment"),v0={sshtemplate:o(({domain:t,user:e,project:r,committish:n})=>`git@${t}:${e}/${r}.git${z("#",n)}`,"sshtemplate"),sshurltemplate:o(({domain:t,user:e,project:r,committish:n})=>`git+ssh://git@${t}/${e}/${r}.git${z("#",n)}`,"sshurltemplate"),edittemplate:o(({domain:t,user:e,project:r,committish:n,editpath:s,path:i})=>`https://${t}/${e}/${r}${z("/",s,"/",oe(n||"HEAD"),"/",i)}`,"edittemplate"),browsetemplate:o(({domain:t,user:e,project:r,committish:n,treepath:s})=>`https://${t}/${e}/${r}${z("/",s,"/",oe(n))}`,"browsetemplate"),browsetreetemplate:o(({domain:t,user:e,project:r,committish:n,treepath:s,path:i,fragment:u,hashformat:a})=>`https://${t}/${e}/${r}/${s}/${oe(n||"HEAD")}/${i}${z("#",a(u||""))}`,"browsetreetemplate"),browseblobtemplate:o(({domain:t,user:e,project:r,committish:n,blobpath:s,path:i,fragment:u,hashformat:a})=>`https://${t}/${e}/${r}/${s}/${oe(n||"HEAD")}/${i}${z("#",a(u||""))}`,"browseblobtemplate"),docstemplate:o(({domain:t,user:e,project:r,treepath:n,committish:s})=>`https://${t}/${e}/${r}${z("/",n,"/",oe(s))}#readme`,"docstemplate"),httpstemplate:o(({auth:t,domain:e,user:r,project:n,committish:s})=>`git+https://${z(t,"@")}${e}/${r}/${n}.git${z("#",s)}`,"httpstemplate"),filetemplate:o(({domain:t,user:e,project:r,committish:n,path:s})=>`https://${t}/${e}/${r}/raw/${oe(n||"HEAD")}/${s}`,"filetemplate"),shortcuttemplate:o(({type:t,user:e,project:r,committish:n})=>`${t}:${e}/${r}${z("#",n)}`,"shortcuttemplate"),pathtemplate:o(({user:t,project:e,committish:r})=>`${t}/${e}${z("#",r)}`,"pathtemplate"),bugstemplate:o(({domain:t,user:e,project:r})=>`https://${t}/${e}/${r}/issues`,"bugstemplate"),hashformat:Fl},ct={};ct.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:o(({auth:t,user:e,project:r,committish:n,path:s})=>`https://${z(t,"@")}raw.githubusercontent.com/${e}/${r}/${oe(n||"HEAD")}/${s}`,"filetemplate"),gittemplate:o(({auth:t,domain:e,user:r,project:n,committish:s})=>`git://${z(t,"@")}${e}/${r}/${n}.git${z("#",s)}`,"gittemplate"),tarballtemplate:o(({domain:t,user:e,project:r,committish:n})=>`https://codeload.${t}/${e}/${r}/tar.gz/${oe(n||"HEAD")}`,"tarballtemplate"),extract:o(t=>{let[,e,r,n,s]=t.pathname.split("/",5);if(!(n&&n!=="tree")&&(n||(s=t.hash.slice(1)),r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:s}},"extract")};ct.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:o(({domain:t,user:e,project:r,committish:n,treepath:s,path:i,editpath:u})=>`https://${t}/${e}/${r}${z("/",s,"/",oe(n||"HEAD"),"/",i,u)}`,"edittemplate"),tarballtemplate:o(({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/get/${oe(n||"HEAD")}.tar.gz`,"tarballtemplate"),extract:o(t=>{let[,e,r,n]=t.pathname.split("/",4);if(!["get"].includes(n)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}},"extract")};ct.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:o(({auth:t,domain:e,user:r,project:n,committish:s})=>`git+https://${z(t,"@")}${e}/${r}/${n}.git${z("#",s)}`,"httpstemplate"),tarballtemplate:o(({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/repository/archive.tar.gz?ref=${oe(n||"HEAD")}`,"tarballtemplate"),extract:o(t=>{let e=t.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let r=e.split("/"),n=r.pop();n.endsWith(".git")&&(n=n.slice(0,-4));let s=r.join("/");if(!(!s||!n))return{user:s,project:n,committish:t.hash.slice(1)}},"extract")};ct.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:o(({domain:t,project:e,committish:r})=>`git@${t}:${e}.git${z("#",r)}`,"sshtemplate"),sshurltemplate:o(({domain:t,project:e,committish:r})=>`git+ssh://git@${t}/${e}.git${z("#",r)}`,"sshurltemplate"),edittemplate:o(({domain:t,user:e,project:r,committish:n,editpath:s})=>`https://${t}/${e}/${r}${z("/",oe(n))}/${s}`,"edittemplate"),browsetemplate:o(({domain:t,project:e,committish:r})=>`https://${t}/${e}${z("/",oe(r))}`,"browsetemplate"),browsetreetemplate:o(({domain:t,project:e,committish:r,path:n,hashformat:s})=>`https://${t}/${e}${z("/",oe(r))}${z("#",s(n))}`,"browsetreetemplate"),browseblobtemplate:o(({domain:t,project:e,committish:r,path:n,hashformat:s})=>`https://${t}/${e}${z("/",oe(r))}${z("#",s(n))}`,"browseblobtemplate"),docstemplate:o(({domain:t,project:e,committish:r})=>`https://${t}/${e}${z("/",oe(r))}`,"docstemplate"),httpstemplate:o(({domain:t,project:e,committish:r})=>`git+https://${t}/${e}.git${z("#",r)}`,"httpstemplate"),filetemplate:o(({user:t,project:e,committish:r,path:n})=>`https://gist.githubusercontent.com/${t}/${e}/raw${z("/",oe(r))}/${n}`,"filetemplate"),shortcuttemplate:o(({type:t,project:e,committish:r})=>`${t}:${e}${z("#",r)}`,"shortcuttemplate"),pathtemplate:o(({project:t,committish:e})=>`${t}${z("#",e)}`,"pathtemplate"),bugstemplate:o(({domain:t,project:e})=>`https://${t}/${e}`,"bugstemplate"),gittemplate:o(({domain:t,project:e,committish:r})=>`git://${t}/${e}.git${z("#",r)}`,"gittemplate"),tarballtemplate:o(({project:t,committish:e})=>`https://codeload.github.com/gist/${t}/tar.gz/${oe(e||"HEAD")}`,"tarballtemplate"),extract:o(t=>{let[,e,r,n]=t.pathname.split("/",4);if(n!=="raw"){if(!r){if(!e)return;r=e,e=null}return r.endsWith(".git")&&(r=r.slice(0,-4)),{user:e,project:r,committish:t.hash.slice(1)}}},"extract"),hashformat:o(function(t){return t&&"file-"+Fl(t)},"hashformat")};ct.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:o(({domain:t,user:e,project:r,committish:n,path:s})=>`https://${t}/${e}/${r}/blob/${oe(n)||"HEAD"}/${s}`,"filetemplate"),httpstemplate:o(({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}.git${z("#",n)}`,"httpstemplate"),tarballtemplate:o(({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/archive/${oe(n)||"HEAD"}.tar.gz`,"tarballtemplate"),bugstemplate:o(()=>null,"bugstemplate"),extract:o(t=>{let[,e,r,n]=t.pathname.split("/",4);if(!["archive"].includes(n)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}},"extract")};for(let[t,e]of Object.entries(ct))ct[t]=Object.assign({},v0,e);Cl.exports=ct});var pi=b((Kx,_l)=>{c();var A0=R("url"),Di=o((t,e,r)=>{let n=t.indexOf(r);return t.lastIndexOf(e,n>-1?n:1/0)},"lastIndexOfBefore"),wl=o(t=>{try{return new A0.URL(t)}catch{}},"safeUrl"),T0=o((t,e)=>{let r=t.indexOf(":"),n=t.slice(0,r+1);if(Object.prototype.hasOwnProperty.call(e,n))return t;let s=t.indexOf("@");return s>-1?s>r?`git+ssh://${t}`:t:t.indexOf("//")===r+1?t:`${t.slice(0,r+1)}//${t.slice(r+1)}`},"correctProtocol"),L0=o(t=>{let e=Di(t,"@","#"),r=Di(t,":","#");return r>e&&(t=t.slice(0,r)+"/"+t.slice(r+1)),Di(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`git+ssh://${t}`),t},"correctUrl");_l.exports=(t,e)=>{let r=e?T0(t,e):t;return wl(r)||wl(L0(r))}});var Sl=b((eS,xl)=>{"use strict";c();var O0=pi(),P0=o(t=>{let e=t.indexOf("#"),r=t.indexOf("/"),n=t.indexOf("/",r+1),s=t.indexOf(":"),i=/\s/.exec(t),u=t.indexOf("@"),a=!i||e>-1&&i.index>e,l=u===-1||e>-1&&u>e,f=s===-1||e>-1&&s>e,h=n===-1||e>-1&&n>e,g=r>0,m=e>-1?t[e-1]!=="/":!t.endsWith("/"),y=!t.startsWith(".");return a&&g&&m&&y&&l&&f&&h},"isGitHubShorthand");xl.exports=(t,e,{gitHosts:r,protocols:n})=>{if(!t)return;let s=P0(t)?`github:${t}`:t,i=O0(s,n);if(!i)return;let u=r.byShortcut[i.protocol],a=r.byDomain[i.hostname.startsWith("www.")?i.hostname.slice(4):i.hostname],l=u||a;if(!l)return;let f=r[u||a],h=null;n[i.protocol]?.auth&&(i.username||i.password)&&(h=`${i.username}${i.password?":"+i.password:""}`);let g=null,m=null,y=null,E=null;try{if(u){let D=i.pathname.startsWith("/")?i.pathname.slice(1):i.pathname,C=D.indexOf("@");C>-1&&(D=D.slice(C+1));let F=D.lastIndexOf("/");F>-1?(m=decodeURIComponent(D.slice(0,F)),m||(m=null),y=decodeURIComponent(D.slice(F+1))):y=decodeURIComponent(D),y.endsWith(".git")&&(y=y.slice(0,-4)),i.hash&&(g=decodeURIComponent(i.hash.slice(1))),E="shortcut"}else{if(!f.protocols.includes(i.protocol))return;let D=f.extract(i);if(!D)return;m=D.user&&decodeURIComponent(D.user),y=decodeURIComponent(D.project),g=decodeURIComponent(D.committish),E=n[i.protocol]?.name||i.protocol.slice(0,-1)}}catch(D){if(D instanceof URIError)return;throw D}return[l,m,h,y,g,E,e]}});var Al=b((nS,vl)=>{"use strict";c();var{LRUCache:k0}=El(),R0=bl(),B0=Sl(),N0=pi(),mi=new k0({max:1e3}),jn=class t{static{o(this,"GitHost")}constructor(e,r,n,s,i,u,a={}){Object.assign(this,t.#r[e],{type:e,user:r,auth:n,project:s,committish:i,default:u,opts:a})}static#r={byShortcut:{},byDomain:{}};static#n={"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(e,r){t.#r[e]=r,t.#r.byDomain[r.domain]=e,t.#r.byShortcut[`${e}:`]=e,t.#n[`${e}:`]={name:e}}static fromUrl(e,r){if(typeof e!="string")return;let n=e+JSON.stringify(r||{});if(!mi.has(n)){let s=B0(e,r,{gitHosts:t.#r,protocols:t.#n});mi.set(n,s?new t(...s):void 0)}return mi.get(n)}static parseUrl(e){return N0(e)}#e(e,r){if(typeof e!="function")return null;let n={...this,...this.opts,...r};n.path||(n.path=""),n.path.startsWith("/")&&(n.path=n.path.slice(1)),n.noCommittish&&(n.committish=null);let s=e(n);return n.noGitPlus&&s.startsWith("git+")?s.slice(4):s}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#e(this.sshtemplate,e)}sshurl(e){return this.#e(this.sshurltemplate,e)}browse(e,...r){return typeof e!="string"?this.#e(this.browsetemplate,e):typeof r[0]!="string"?this.#e(this.browsetreetemplate,{...r[0],path:e}):this.#e(this.browsetreetemplate,{...r[1],fragment:r[0],path:e})}browseFile(e,...r){return typeof r[0]!="string"?this.#e(this.browseblobtemplate,{...r[0],path:e}):this.#e(this.browseblobtemplate,{...r[1],fragment:r[0],path:e})}docs(e){return this.#e(this.docstemplate,e)}bugs(e){return this.#e(this.bugstemplate,e)}https(e){return this.#e(this.httpstemplate,e)}git(e){return this.#e(this.gittemplate,e)}shortcut(e){return this.#e(this.shortcuttemplate,e)}path(e){return this.#e(this.pathtemplate,e)}tarball(e){return this.#e(this.tarballtemplate,{...e,noCommittish:!1})}file(e,r){return this.#e(this.filetemplate,{...r,path:e})}edit(e,r){return this.#e(this.edittemplate,{...r,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}};for(let[t,e]of Object.entries(R0))jn.addHost(t,e);vl.exports=jn});var Ll=b((oS,Tl)=>{c();Tl.exports=I0;function I0(t){if(!t||t==="ERROR: No README data found!")return;t=t.trim().split(`
|
|
8
|
+
`);let e=0;for(;t[e]&&t[e].trim().match(/^(#|$)/);)e++;let r=t.length,n=e+1;for(;n<r&&t[n].trim();)n++;return t.slice(e,n).join(" ").trim()}o(I0,"extractDescription")});var Ol=b((cS,$0)=>{$0.exports={topLevel:{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"},bugs:{web:"url",name:"url"},script:{server:"start",tests:"test"}}});var Bl=b((lS,Rl)=>{c();var j0=Wc(),M0=Zc(),U0=Dl(),Mn=Al(),G0=R("node:module"),q0=["dependencies","devDependencies","optionalDependencies"],H0=Ll(),yi=R("url"),lt=Ol(),Pl=o(t=>t.includes("@")&&t.indexOf("@")<t.lastIndexOf("."),"isEmail");Rl.exports={warn:o(function(){},"warn"),fixRepositoryField:o(function(t){if(t.repositories&&(this.warn("repositories"),t.repository=t.repositories[0]),!t.repository)return this.warn("missingRepository");typeof t.repository=="string"&&(t.repository={type:"git",url:t.repository});var e=t.repository.url||"";if(e){var r=Mn.fromUrl(e);r&&(e=t.repository.url=r.getDefaultRepresentation()==="shortcut"?r.https():r.toString())}e.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",e)},"fixRepositoryField"),fixTypos:o(function(t){Object.keys(lt.topLevel).forEach(function(e){Object.prototype.hasOwnProperty.call(t,e)&&this.warn("typo",e,lt.topLevel[e])},this)},"fixTypos"),fixScriptsField:o(function(t){if(t.scripts){if(typeof t.scripts!="object"){this.warn("nonObjectScripts"),delete t.scripts;return}Object.keys(t.scripts).forEach(function(e){typeof t.scripts[e]!="string"?(this.warn("nonStringScript"),delete t.scripts[e]):lt.script[e]&&!t.scripts[lt.script[e]]&&this.warn("typo",e,lt.script[e],"scripts")},this)}},"fixScriptsField"),fixFilesField:o(function(t){var e=t.files;e&&!Array.isArray(e)?(this.warn("nonArrayFiles"),delete t.files):t.files&&(t.files=t.files.filter(function(r){return!r||typeof r!="string"?(this.warn("invalidFilename",r),!1):!0},this))},"fixFilesField"),fixBinField:o(function(t){if(t.bin&&typeof t.bin=="string"){var e={},r;(r=t.name.match(/^@[^/]+[/](.*)$/))?e[r[1]]=t.bin:e[t.name]=t.bin,t.bin=e}},"fixBinField"),fixManField:o(function(t){t.man&&typeof t.man=="string"&&(t.man=[t.man])},"fixManField"),fixBundleDependenciesField:o(function(t){var e="bundledDependencies",r="bundleDependencies";t[e]&&!t[r]&&(t[r]=t[e],delete t[e]),t[r]&&!Array.isArray(t[r])?(this.warn("nonArrayBundleDependencies"),delete t[r]):t[r]&&(t[r]=t[r].filter(function(n){return!n||typeof n!="string"?(this.warn("nonStringBundleDependency",n),!1):(t.dependencies||(t.dependencies={}),Object.prototype.hasOwnProperty.call(t.dependencies,n)||(this.warn("nonDependencyBundleDependency",n),t.dependencies[n]="*"),!0)},this))},"fixBundleDependenciesField"),fixDependencies:o(function(t){X0(t,this.warn),J0(t,this.warn),this.fixBundleDependenciesField(t),["dependencies","devDependencies"].forEach(function(e){if(e in t){if(!t[e]||typeof t[e]!="object"){this.warn("nonObjectDependencies",e),delete t[e];return}Object.keys(t[e]).forEach(function(r){var n=t[e][r];typeof n!="string"&&(this.warn("nonStringDependency",r,JSON.stringify(n)),delete t[e][r]);var s=Mn.fromUrl(t[e][r]);s&&(t[e][r]=s.toString())},this)}},this)},"fixDependencies"),fixModulesField:o(function(t){t.modules&&(this.warn("deprecatedModules"),delete t.modules)},"fixModulesField"),fixKeywordsField:o(function(t){typeof t.keywords=="string"&&(t.keywords=t.keywords.split(/,\s+/)),t.keywords&&!Array.isArray(t.keywords)?(delete t.keywords,this.warn("nonArrayKeywords")):t.keywords&&(t.keywords=t.keywords.filter(function(e){return typeof e!="string"||!e?(this.warn("nonStringKeyword"),!1):!0},this))},"fixKeywordsField"),fixVersionField:o(function(t,e){var r=!e;if(!t.version)return t.version="",!0;if(!j0(t.version,r))throw new Error('Invalid version: "'+t.version+'"');return t.version=M0(t.version,r),!0},"fixVersionField"),fixPeople:o(function(t){kl(t,Z0),kl(t,Y0)},"fixPeople"),fixNameField:o(function(t,e){typeof e=="boolean"?e={strict:e}:typeof e>"u"&&(e={});var r=e.strict;if(!t.name&&!r){t.name="";return}if(typeof t.name!="string")throw new Error("name field must be a string.");r||(t.name=t.name.trim()),V0(t.name,r,e.allowLegacyCase),G0.builtinModules.includes(t.name)&&this.warn("conflictingName",t.name)},"fixNameField"),fixDescriptionField:o(function(t){t.description&&typeof t.description!="string"&&(this.warn("nonStringDescription"),delete t.description),t.readme&&!t.description&&(t.description=H0(t.readme)),t.description===void 0&&delete t.description,t.description||this.warn("missingDescription")},"fixDescriptionField"),fixReadmeField:o(function(t){t.readme||(this.warn("missingReadme"),t.readme="ERROR: No README data found!")},"fixReadmeField"),fixBugsField:o(function(t){if(!t.bugs&&t.repository&&t.repository.url){var e=Mn.fromUrl(t.repository.url);e&&e.bugs()&&(t.bugs={url:e.bugs()})}else if(t.bugs){if(typeof t.bugs=="string")Pl(t.bugs)?t.bugs={email:t.bugs}:yi.parse(t.bugs).protocol?t.bugs={url:t.bugs}:this.warn("nonEmailUrlBugsString");else{Q0(t.bugs,this.warn);var r=t.bugs;t.bugs={},r.url&&(typeof r.url=="string"&&yi.parse(r.url).protocol?t.bugs.url=r.url:this.warn("nonUrlBugsUrlField")),r.email&&(typeof r.email=="string"&&Pl(r.email)?t.bugs.email=r.email:this.warn("nonEmailBugsEmailField"))}!t.bugs.email&&!t.bugs.url&&(delete t.bugs,this.warn("emptyNormalizedBugs"))}},"fixBugsField"),fixHomepageField:o(function(t){if(!t.homepage&&t.repository&&t.repository.url){var e=Mn.fromUrl(t.repository.url);e&&e.docs()&&(t.homepage=e.docs())}if(t.homepage){if(typeof t.homepage!="string")return this.warn("nonUrlHomepage"),delete t.homepage;yi.parse(t.homepage).protocol||(t.homepage="http://"+t.homepage)}},"fixHomepageField"),fixLicenseField:o(function(t){let e=t.license||t.licence;if(!e)return this.warn("missingLicense");if(typeof e!="string"||e.length<1||e.trim()==="")return this.warn("invalidLicense");if(!U0(e).validForNewPackages)return this.warn("invalidLicense")},"fixLicenseField")};function z0(t){if(t.charAt(0)!=="@")return!1;var e=t.slice(1).split("/");return e.length!==2?!1:e[0]&&e[1]&&e[0]===encodeURIComponent(e[0])&&e[1]===encodeURIComponent(e[1])}o(z0,"isValidScopedPackageName");function W0(t){return!t.match(/[/@\s+%:]/)&&t===encodeURIComponent(t)}o(W0,"isCorrectlyEncodedName");function V0(t,e,r){if(t.charAt(0)==="."||!(z0(t)||W0(t))||e&&!r&&t!==t.toLowerCase()||t.toLowerCase()==="node_modules"||t.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(t))}o(V0,"ensureValidName");function kl(t,e){return t.author&&(t.author=e(t.author)),["maintainers","contributors"].forEach(function(r){Array.isArray(t[r])&&(t[r]=t[r].map(e))}),t}o(kl,"modifyPeople");function Z0(t){if(typeof t=="string")return t;var e=t.name||"",r=t.url||t.web,n=r?" ("+r+")":"",s=t.email||t.mail,i=s?" <"+s+">":"";return e+i+n}o(Z0,"unParsePerson");function Y0(t){if(typeof t!="string")return t;var e=t.match(/^([^(<]+)/),r=t.match(/\(([^()]+)\)/),n=t.match(/<([^<>]+)>/),s={};return e&&e[0].trim()&&(s.name=e[0].trim()),n&&(s.email=n[1]),r&&(s.url=r[1]),s}o(Y0,"parsePerson");function J0(t){var e=t.optionalDependencies;if(e){var r=t.dependencies||{};Object.keys(e).forEach(function(n){r[n]=e[n]}),t.dependencies=r}}o(J0,"addOptionalDepsToDeps");function K0(t,e,r){if(!t)return{};if(typeof t=="string"&&(t=t.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(t))return t;r("deprecatedArrayDependencies",e);var n={};return t.filter(function(s){return typeof s=="string"}).forEach(function(s){s=s.trim().split(/(:?[@\s><=])/);var i=s.shift(),u=s.join("");u=u.trim(),u=u.replace(/^@/,""),n[i]=u}),n}o(K0,"depObjectify");function X0(t,e){q0.forEach(function(r){t[r]&&(t[r]=K0(t[r],r,e))})}o(X0,"objectifyDeps");function Q0(t,e){t&&Object.keys(t).forEach(function(r){lt.bugs[r]&&(e("typo",r,lt.bugs[r],"bugs"),t[lt.bugs[r]]=t[r],delete t[r])})}o(Q0,"bugsTypos")});var Nl=b((dS,eg)=>{eg.exports={repositories:"'repositories' (plural) Not supported. Please pick one as the 'repository' field",missingRepository:"No repository field.",brokenGitUrl:"Probably broken git url: %s",nonObjectScripts:"scripts must be an object",nonStringScript:"script values must be string commands",nonArrayFiles:"Invalid 'files' member",invalidFilename:"Invalid filename in 'files' list: %s",nonArrayBundleDependencies:"Invalid 'bundleDependencies' list. Must be array of package names",nonStringBundleDependency:"Invalid bundleDependencies member: %s",nonDependencyBundleDependency:"Non-dependency in bundleDependencies: %s",nonObjectDependencies:"%s field must be an object",nonStringDependency:"Invalid dependency: %s %s",deprecatedArrayDependencies:"specifying %s as array is deprecated",deprecatedModules:"modules field is deprecated",nonArrayKeywords:"keywords should be an array of strings",nonStringKeyword:"keywords should be an array of strings",conflictingName:"%s is also the name of a node core module.",nonStringDescription:"'description' field should be a string",missingDescription:"No description",missingReadme:"No README data",missingLicense:"No license field.",nonEmailUrlBugsString:"Bug string field must be url, email, or {email,url}",nonUrlBugsUrlField:"bugs.url field must be a string url. Deleted.",nonEmailBugsEmailField:"bugs.email field must be a string email. Deleted.",emptyNormalizedBugs:"Normalized value of bugs field is an empty object. Deleted.",nonUrlHomepage:"homepage field must be a string url. Deleted.",invalidLicense:"license should be a valid SPDX license expression",typo:"%s should probably be %s."}});var jl=b((DS,$l)=>{c();var Il=R("util"),gi=Nl();$l.exports=function(){var t=Array.prototype.slice.call(arguments,0),e=t.shift();if(e==="typo")return tg.apply(null,t);var r=gi[e]?gi[e]:e+": '%s'";return t.unshift(r),Il.format.apply(null,t)};function tg(t,e,r){return r&&(t=r+"['"+t+"']",e=r+"['"+e+"']"),Il.format(gi.typo,t,e)}o(tg,"makeTypoWarning")});var ql=b((yS,Gl)=>{c();Gl.exports=Ml;var Ei=Bl();Ml.fixer=Ei;var rg=jl(),ng=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],sg=["dependencies","people","typos"],Fi=ng.map(function(t){return Ul(t)+"Field"});Fi=Fi.concat(sg);function Ml(t,e,r){e===!0&&(e=null,r=!0),r||(r=!1),(!e||t.private)&&(e=o(function(){},"warn")),t.scripts&&t.scripts.install==="node-gyp rebuild"&&!t.scripts.preinstall&&(t.gypfile=!0),Ei.warn=function(){e(rg.apply(null,arguments))},Fi.forEach(function(n){Ei["fix"+Ul(n)](t,r)}),t._id=t.name+"@"+t.version}o(Ml,"normalize");function Ul(t){return t.charAt(0).toUpperCase()+t.slice(1)}o(Ul,"ucFirst")});var df=b((lA,hf)=>{c();hf.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var pf=b((IA,Rg)=>{Rg.exports={single:{topLeft:"\u250C",top:"\u2500",topRight:"\u2510",right:"\u2502",bottomRight:"\u2518",bottom:"\u2500",bottomLeft:"\u2514",left:"\u2502"},double:{topLeft:"\u2554",top:"\u2550",topRight:"\u2557",right:"\u2551",bottomRight:"\u255D",bottom:"\u2550",bottomLeft:"\u255A",left:"\u2551"},round:{topLeft:"\u256D",top:"\u2500",topRight:"\u256E",right:"\u2502",bottomRight:"\u256F",bottom:"\u2500",bottomLeft:"\u2570",left:"\u2502"},bold:{topLeft:"\u250F",top:"\u2501",topRight:"\u2513",right:"\u2503",bottomRight:"\u251B",bottom:"\u2501",bottomLeft:"\u2517",left:"\u2503"},singleDouble:{topLeft:"\u2553",top:"\u2500",topRight:"\u2556",right:"\u2551",bottomRight:"\u255C",bottom:"\u2500",bottomLeft:"\u2559",left:"\u2551"},doubleSingle:{topLeft:"\u2552",top:"\u2550",topRight:"\u2555",right:"\u2502",bottomRight:"\u255B",bottom:"\u2550",bottomLeft:"\u2558",left:"\u2502"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"\u2198",top:"\u2193",topRight:"\u2199",right:"\u2190",bottomRight:"\u2196",bottom:"\u2191",bottomLeft:"\u2197",left:"\u2192"}}});var Gi=b(($A,Ui)=>{"use strict";c();var mf=pf();Ui.exports=mf;Ui.exports.default=mf});var bf=b((qA,Cf)=>{"use strict";c();Cf.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var _f=b((zA,wf)=>{"use strict";c();var Ug=bf();wf.exports=t=>typeof t=="string"?t.replace(Ug(),""):t});var Sf=b((VA,zi)=>{"use strict";c();var xf=o(t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141),"isFullwidthCodePoint");zi.exports=xf;zi.exports.default=xf});var Af=b((JA,vf)=>{"use strict";c();vf.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var Lf=b((XA,Wi)=>{"use strict";c();var Gg=_f(),qg=Sf(),Hg=Af(),Tf=o(t=>{if(typeof t!="string"||t.length===0||(t=Gg(t),t.length===0))return 0;t=t.replace(Hg()," ");let e=0;for(let r=0;r<t.length;r++){let n=t.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,e+=qg(n)?2:1)}return e},"stringWidth");Wi.exports=Tf;Wi.exports.default=Tf});var Pf=b((t1,Of)=>{"use strict";c();var zg=Lf();function $t(t,e){if(!t)return t;e=e||{};let r=e.align||"center";if(r==="left")return t;let n=e.split||`
|
|
9
9
|
`,s=e.pad||" ",i=r!=="right"?Wg:Vg,u=!1;Array.isArray(t)||(u=!0,t=String(t).split(n));let a,l=0;return t=t.map(function(f){return f=String(f),a=zg(f),l=Math.max(a,l),{str:f,width:a}}).map(function(f){return new Array(i(l,f.width)+1).join(s)+f.str}),u?t.join(n):t}o($t,"ansiAlign");$t.left=o(function(e){return $t(e,{align:"left"})},"left");$t.center=o(function(e){return $t(e,{align:"center"})},"center");$t.right=o(function(e){return $t(e,{align:"right"})},"right");Of.exports=$t;function Wg(t,e){return Math.floor((t-e)/2)}o(Wg,"halfDiff");function Vg(t,e){return t-e}o(Vg,"fullDiff")});var Xf=b(Gr=>{"use strict";c();Object.defineProperty(Gr,"__esModule",{value:!0});Gr.dedent=void 0;function Kf(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof t=="string"?[t]:t);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var s=n.reduce(function(a,l){var f=l.match(/\n([\t ]+|(?!\s).)/g);return f?a.concat(f.map(function(h){var g,m;return(m=(g=h.match(/[\t ]/g))===null||g===void 0?void 0:g.length)!==null&&m!==void 0?m:0})):a},[]);if(s.length){var i=new RegExp(`
|
|
10
10
|
[ ]{`+Math.min.apply(Math,s)+"}","g");n=n.map(function(a){return a.replace(i,`
|
|
11
11
|
`)})}n[0]=n[0].replace(/^\r?\n/,"");var u=n[0];return e.forEach(function(a,l){var f=u.match(/(?:^|\n)( *)$/),h=f?f[1]:"",g=a;typeof a=="string"&&a.includes(`
|
|
12
12
|
`)&&(g=String(a).split(`
|
|
13
13
|
`).map(function(m,y){return y===0?m:""+h+m}).join(`
|
|
14
|
-
`)),u+=g+n[l+1]}),u}o(Kf,"dedent");Gr.dedent=Kf;Gr.default=Kf});var ih=b((no,so)=>{"use strict";c();Object.defineProperty(no,"__esModule",{value:!0});function BE(t){return t.encrypted}o(BE,"isTLSSocket");var ro=o((t,e)=>{let r;typeof e=="function"?r={connect:e}:r=e;let n=typeof r.connect=="function",s=typeof r.secureConnect=="function",i=typeof r.close=="function",u=o(()=>{n&&r.connect(),BE(t)&&s&&(t.authorized?r.secureConnect():t.authorizationError||t.once("secureConnect",r.secureConnect)),i&&t.once("close",r.close)},"onConnect");t.writable&&!t.connecting?u():t.connecting?t.once("connect",u):t.destroyed&&i&&r.close(t._hadError)},"deferToConnect");no.default=ro;so.exports=ro;so.exports.default=ro});var ch=b((c3,ah)=>{"use strict";c();var{PassThrough:HE}=R("stream");ah.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,n=r==="buffer",s=!1;e?s=!(r||n):r=r||"utf8",n&&(r=null);let i=new HE({objectMode:s});r&&i.setEncoding(r);let u=0,a=[];return i.on("data",l=>{a.push(l),s?u=a.length:u+=l.length}),i.getBufferedValue=()=>e?a:n?Buffer.concat(a,u):a.join(""),i.getBufferedLength=()=>u,i}});var ao=b((f3,Wr)=>{"use strict";c();var{constants:zE}=R("buffer"),WE=R("stream"),{promisify:VE}=R("util"),ZE=ch(),YE=VE(WE.pipeline),us=class extends Error{static{o(this,"MaxBufferError")}constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function uo(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,n=ZE(e);return await new Promise((s,i)=>{let u=o(a=>{a&&n.getBufferedLength()<=zE.MAX_LENGTH&&(a.bufferedData=n.getBufferedValue()),i(a)},"rejectPromise");(async()=>{try{await YE(t,n),s()}catch(a){u(a)}})(),n.on("data",()=>{n.getBufferedLength()>r&&u(new us)})}),n.getBufferedValue()}o(uo,"getStream");Wr.exports=uo;Wr.exports.buffer=(t,e)=>uo(t,{...e,encoding:"buffer"});Wr.exports.array=(t,e)=>uo(t,{...e,array:!0});Wr.exports.MaxBufferError=us});var fh=b((p3,lh)=>{"use strict";c();var JE=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),KE=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),XE=new Set([500,502,503,504]),QE={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},eF={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function jt(t){let e=parseInt(t,10);return isFinite(e)?e:0}o(jt,"toNumberOrZero");function tF(t){return t?XE.has(t.status):!0}o(tF,"isErrorResponse");function co(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let n of r){let[s,i]=n.split(/=/,2);e[s.trim()]=i===void 0?!0:i.trim().replace(/^"|"$/g,"")}return e}o(co,"parseCacheControl");function rF(t){let e=[];for(let r in t){let n=t[r];e.push(n===!0?r:r+"="+n)}if(e.length)return e.join(", ")}o(rF,"formatCacheControl");lh.exports=class{static{o(this,"CachePolicy")}constructor(e,r,{shared:n,cacheHeuristic:s,immutableMinTimeToLive:i,ignoreCargoCult:u,_fromObject:a}={}){if(a){this._fromObject(a);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=n!==!1,this._cacheHeuristic=s!==void 0?s:.1,this._immutableMinTtl=i!==void 0?i:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=co(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=co(e.headers["cache-control"]),u&&"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":rF(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.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())&&KE.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||JE.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=co(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let n of r)if(e.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let n in e)QE[n]||(r[n]=e[n]);if(e.connection){let n=e.connection.trim().split(/\s*,\s*/);for(let s of n)delete r[s]}if(r.warning){let n=r.warning.split(/,/).filter(s=>!/^\s*1[0-9][0-9]/.test(s));n.length?r.warning=n.join(",").trim():delete r.warning}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return jt(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 jt(this._rescc["s-maxage"])}if(this._rescc["max-age"])return jt(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||n<r?0:Math.max(e,(n-r)/1e3)}if(this._resHeaders["last-modified"]){let n=Date.parse(this._resHeaders["last-modified"]);if(isFinite(n)&&r>n)return Math.max(e,(r-n)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+jt(this._rescc["stale-if-error"]),n=e+jt(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,n)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+jt(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+jt(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,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(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let s=r["if-none-match"].split(/,/).filter(i=>!/^\s*W\//.test(i));s.length?r["if-none-match"]=s.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&tF(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let n=!1;if(r.status!==void 0&&r.status!=304?n=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?n=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?n=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?n=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(n=!0),!n)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let s={};for(let u in this._resHeaders)s[u]=u in r.headers&&!eF[u]?r.headers[u]:this._resHeaders[u];let i=Object.assign({},r,{status:this._status,method:this._method,headers:s});return{policy:new this.constructor(e,i,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var hh=b(lo=>{c();lo.stringify=o(function t(e){if(typeof e>"u")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",n=Array.isArray(e);r=n?"[":"{";var s=!0;for(var i in e){var u=typeof e[i]=="function"||!n&&typeof e[i]>"u";Object.hasOwnProperty.call(e,i)&&!u&&(s||(r+=","),s=!1,n?e[i]==null?r+="null":r+=t(e[i]):e[i]!==void 0&&(r+=t(i)+":"+t(e[i])))}return r+=n?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e>"u"?"null":JSON.stringify(e)},"stringify");lo.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})}});var mh=b((T3,ph)=>{"use strict";c();var sF=R("events"),dh=hh(),iF=o(t=>{let e={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(t.adapter||t.uri){let r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(R(e[r]))(t)}return new Map},"loadStore"),Dh=["sqlite","postgres","mysql","mongo","redis","tiered"],fo=class extends sF{static{o(this,"Keyv")}constructor(e,{emitErrors:r=!0,...n}={}){if(super(),this.opts={namespace:"keyv",serialize:dh.stringify,deserialize:dh.parse,...typeof e=="string"?{uri:e}:e,...n},!this.opts.store){let i={...this.opts};this.opts.store=iF(i)}if(this.opts.compression){let i=this.opts.compression;this.opts.serialize=i.serialize.bind(i),this.opts.deserialize=i.deserialize.bind(i)}typeof this.opts.store.on=="function"&&r&&this.opts.store.on("error",i=>this.emit("error",i)),this.opts.store.namespace=this.opts.namespace;let s=o(i=>async function*(){for await(let[u,a]of typeof i=="function"?i(this.opts.store.namespace):i){let l=await this.opts.deserialize(a);if(!(this.opts.store.namespace&&!u.includes(this.opts.store.namespace))){if(typeof l.expires=="number"&&Date.now()>l.expires){this.delete(u);continue}yield[this._getKeyUnprefix(u),l.value]}}},"generateIterator");typeof this.opts.store[Symbol.iterator]=="function"&&this.opts.store instanceof Map?this.iterator=s(this.opts.store):typeof this.opts.store.iterator=="function"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=s(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return Dh.includes(this.opts.store.opts.dialect)||Dh.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,r){let{store:n}=this.opts,s=Array.isArray(e),i=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&n.getMany===void 0){let u=[];for(let a of i)u.push(Promise.resolve().then(()=>n.get(a)).then(l=>typeof l=="string"?this.opts.deserialize(l):this.opts.compression?this.opts.deserialize(l):l).then(l=>{if(l!=null)return typeof l.expires=="number"&&Date.now()>l.expires?this.delete(a).then(()=>{}):r&&r.raw?l:l.value}));return Promise.allSettled(u).then(a=>{let l=[];for(let f of a)l.push(f.value);return l})}return Promise.resolve().then(()=>s?n.getMany(i):n.get(i)).then(u=>typeof u=="string"?this.opts.deserialize(u):this.opts.compression?this.opts.deserialize(u):u).then(u=>{if(u!=null)return s?u.map((a,l)=>{if(typeof a=="string"&&(a=this.opts.deserialize(a)),a!=null){if(typeof a.expires=="number"&&Date.now()>a.expires){this.delete(e[l]).then(()=>{});return}return r&&r.raw?a:a.value}}):typeof u.expires=="number"&&Date.now()>u.expires?this.delete(e).then(()=>{}):r&&r.raw?u:u.value})}set(e,r,n){let s=this._getKeyPrefix(e);typeof n>"u"&&(n=this.opts.ttl),n===0&&(n=void 0);let{store:i}=this.opts;return Promise.resolve().then(()=>{let u=typeof n=="number"?Date.now()+n:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:u},this.opts.serialize(r)}).then(u=>i.set(s,u,n)).then(()=>!0)}delete(e){let{store:r}=this.opts;if(Array.isArray(e)){let s=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){let i=[];for(let u of s)i.push(r.delete(u));return Promise.allSettled(i).then(u=>u.every(a=>a.value===!0))}return Promise.resolve().then(()=>r.deleteMany(s))}let n=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(n))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let r=this._getKeyPrefix(e),{store:n}=this.opts;return Promise.resolve().then(async()=>typeof n.has=="function"?n.has(r):await n.get(r)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect=="function")return e.disconnect()}};ph.exports=fo});var Ch=b((J3,Fh)=>{"use strict";c();var DF=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];Fh.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(t).concat(DF)),n={};for(let s of r)s in e||(n[s]={get(){let i=t[s];return typeof i=="function"?i.bind(t):i},set(i){t[s]=i},enumerable:!0,configurable:!1});return Object.defineProperties(e,n),t.once("aborted",()=>{e.destroy(),e.emit("aborted")}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}});var wh=b((X3,bh)=>{"use strict";c();var{Transform:pF,PassThrough:mF}=R("stream"),mo=R("zlib"),yF=Ch();bh.exports=t=>{let e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;let r=e==="br";if(r&&typeof mo.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let n=!0,s=new pF({transform(a,l,f){n=!1,f(null,a)},flush(a){a()}}),i=new mF({autoDestroy:!1,destroy(a,l){t.destroy(),l(a)}}),u=r?mo.createBrotliDecompress():mo.createUnzip();return u.once("error",a=>{if(n&&!t.readable){i.end();return}i.destroy(a)}),yF(t,i),t.pipe(s).pipe(u).pipe(i),i}});var Ao=b((xL,$h)=>{"use strict";c();var vo=class{static{o(this,"QuickLRU")}constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[n,s]of this.oldCache.entries())this.onEviction(n,s);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};$h.exports=vo});var To=b((AL,jh)=>{"use strict";c();jh.exports=t=>{if(t.listenerCount("error")!==0)return t;t.__destroy=t._destroy,t._destroy=(...r)=>{let n=r.pop();t.__destroy(...r,async s=>{await Promise.resolve(),n(s)})};let e=o(r=>{Promise.resolve().then(()=>{t.emit("error",r)})},"onError");return t.once("error",e),Promise.resolve().then(()=>{t.off("error",e)}),t}});var Ut=b((OL,zh)=>{"use strict";c();var{URL:Mh}=R("url"),$F=R("events"),jF=R("tls"),MF=R("http2"),UF=Ao(),GF=To(),_e=Symbol("currentStreamCount"),Uh=Symbol("request"),xe=Symbol("cachedOriginSet"),mt=Symbol("gracefullyClosing"),ms=Symbol("length"),Gh=["createConnection","maxDeflateDynamicTableSize","maxSettings","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","peerMaxConcurrentStreams","settings","family","localAddress","rejectUnauthorized","pskCallback","minDHSize","path","socket","ca","cert","sigalgs","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","honorCipherOrder","key","privateKeyEngine","privateKeyIdentifier","maxVersion","minVersion","pfx","secureOptions","secureProtocol","sessionIdContext","ticketKeys"],qF=o((t,e,r)=>{let n=0,s=t.length;for(;n<s;){let i=n+s>>>1;r(t[i],e)?n=i+1:s=i}return n},"getSortedIndex"),HF=o((t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,"compareSessions"),Lo=o((t,e)=>{for(let r=0;r<t.length;r++){let n=t[r];n[xe].length>0&&n[xe].length<e[xe].length&&n[xe].every(s=>e[xe].includes(s))&&n[_e]+e[_e]<=e.remoteSettings.maxConcurrentStreams&&Hh(n)}},"closeCoveredSessions"),qh=o((t,e)=>{for(let r=0;r<t.length;r++){let n=t[r];if(e[xe].length>0&&e[xe].length<n[xe].length&&e[xe].every(s=>n[xe].includes(s))&&e[_e]+n[_e]<=n.remoteSettings.maxConcurrentStreams)return Hh(e),!0}return!1},"closeSessionIfCovered"),Hh=o(t=>{t[mt]=!0,t[_e]===0&&t.close()},"gracefullyClose"),gr=class t extends $F{static{o(this,"Agent")}constructor({timeout:e=0,maxSessions:r=Number.POSITIVE_INFINITY,maxEmptySessions:n=10,maxCachedTlsSessions:s=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxEmptySessions=n,this._emptySessionCount=0,this._sessionCount=0,this.settings={enablePush:!1,initialWindowSize:1024*1024*32},this.tlsSessionCache=new UF({maxSize:s})}get protocol(){return"https:"}normalizeOptions(e){let r="";for(let n=0;n<Gh.length;n++){let s=Gh[n];r+=":",e&&e[s]!==void 0&&(r+=e[s])}return r}_processQueue(){if(this._sessionCount>=this.maxSessions){this.closeEmptySessions(this.maxSessions-this._sessionCount+1);return}for(let e in this.queue)for(let r in this.queue[e]){let n=this.queue[e][r];n.completed||(n.completed=!0,n())}}_isBetterSession(e,r){return e>r}_accept(e,r,n,s){let i=0;for(;i<r.length&&e[_e]<e.remoteSettings.maxConcurrentStreams;)r[i].resolve(e),i++;r.splice(0,i),r.length>0&&(this.getSession(n,s,r),r.length=0)}getSession(e,r,n){return new Promise((s,i)=>{Array.isArray(n)&&n.length>0?(n=[...n],s()):n=[{resolve:s,reject:i}];try{if(typeof e=="string")e=new Mh(e);else if(!(e instanceof Mh))throw new TypeError("The `origin` argument needs to be a string or an URL object");if(r){let{servername:h}=r,{hostname:g}=e;if(h&&g!==h)throw new Error(`Origin ${g} differs from servername ${h}`)}}catch(h){for(let g=0;g<n.length;g++)n[g].reject(h);return}let u=this.normalizeOptions(r),a=e.origin;if(u in this.sessions){let h=this.sessions[u],g=-1,m=-1,y;for(let E=0;E<h.length;E++){let D=h[E],C=D.remoteSettings.maxConcurrentStreams;if(C<g)break;if(!D[xe].includes(a))continue;let F=D[_e];F>=C||D[mt]||D.destroyed||(y||(g=C),this._isBetterSession(F,m)&&(y=D,m=F))}if(y){this._accept(y,n,a,r);return}}if(u in this.queue){if(a in this.queue[u]){this.queue[u][a].listeners.push(...n);return}}else this.queue[u]={[ms]:0};let l=o(()=>{u in this.queue&&this.queue[u][a]===f&&(delete this.queue[u][a],--this.queue[u][ms]===0&&delete this.queue[u])},"removeFromQueue"),f=o(async()=>{this._sessionCount++;let h=`${a}:${u}`,g=!1,m;try{let y={...r};y.settings===void 0&&(y.settings=this.settings),y.session===void 0&&(y.session=this.tlsSessionCache.get(h)),m=await(y.createConnection||this.createConnection).call(this,e,y),y.createConnection=()=>m;let D=MF.connect(e,y);D[_e]=0,D[mt]=!1;let C=o(()=>{let{socket:S}=D,k;return S.servername===!1?(S.servername=S.remoteAddress,k=D.originSet,S.servername=!1):k=D.originSet,k},"getOriginSet"),F=o(()=>D[_e]<D.remoteSettings.maxConcurrentStreams,"isFree");D.socket.once("session",S=>{this.tlsSessionCache.set(h,S)}),D.once("error",S=>{for(let k=0;k<n.length;k++)n[k].reject(S);this.tlsSessionCache.delete(h)}),D.setTimeout(this.timeout,()=>{D.destroy()}),D.once("close",()=>{if(this._sessionCount--,g){this._emptySessionCount--;let S=this.sessions[u];S.length===1?delete this.sessions[u]:S.splice(S.indexOf(D),1)}else{l();let S=new Error("Session closed without receiving a SETTINGS frame");S.code="HTTP2WRAPPER_NOSETTINGS";for(let k=0;k<n.length;k++)n[k].reject(S)}this._processQueue()});let O=o(()=>{let S=this.queue[u];if(!S)return;let k=D[xe];for(let U=0;U<k.length;U++){let te=k[U];if(te in S){let{listeners:ue,completed:Ue}=S[te],B=0;for(;B<ue.length&&F();)ue[B].resolve(D),B++;if(S[te].listeners.splice(0,B),S[te].listeners.length===0&&!Ue&&(delete S[te],--S[ms]===0)){delete this.queue[u];break}if(!F())break}}},"processListeners");D.on("origin",()=>{D[xe]=C()||[],D[mt]=!1,qh(this.sessions[u],D),!(D[mt]||!F())&&(O(),F()&&Lo(this.sessions[u],D))}),D.once("remoteSettings",()=>{if(f.destroyed){let S=new Error("Agent has been destroyed");for(let k=0;k<n.length;k++)n[k].reject(S);D.destroy();return}if(D.setLocalWindowSize&&D.setLocalWindowSize(1024*1024*4),D[xe]=C()||[],D.socket.encrypted){let S=D[xe][0];if(S!==a){let k=new Error(`Requested origin ${a} does not match server ${S}`);for(let U=0;U<n.length;U++)n[U].reject(k);D.destroy();return}}l();{let S=this.sessions;if(u in S){let k=S[u];k.splice(qF(k,D,HF),0,D)}else S[u]=[D]}g=!0,this._emptySessionCount++,this.emit("session",D),this._accept(D,n,a,r),D[_e]===0&&this._emptySessionCount>this.maxEmptySessions&&this.closeEmptySessions(this._emptySessionCount-this.maxEmptySessions),D.on("remoteSettings",()=>{F()&&(O(),F()&&Lo(this.sessions[u],D))})}),D[Uh]=D.request,D.request=(S,k)=>{if(D[mt])throw new Error("The session is gracefully closing. No new streams are allowed.");let U=D[Uh](S,k);return D.ref(),D[_e]++===0&&this._emptySessionCount--,U.once("close",()=>{if(--D[_e]===0&&(this._emptySessionCount++,D.unref(),this._emptySessionCount>this.maxEmptySessions||D[mt])){D.close();return}D.destroyed||D.closed||F()&&!qh(this.sessions[u],D)&&(Lo(this.sessions[u],D),O(),D[_e]===0&&this._processQueue())}),U}}catch(y){l(),this._sessionCount--;for(let E=0;E<n.length;E++)n[E].reject(y)}},"entry");f.listeners=n,f.completed=!1,f.destroyed=!1,this.queue[u][a]=f,this.queue[u][ms]++,this._processQueue()})}request(e,r,n,s){return new Promise((i,u)=>{this.getSession(e,r,[{reject:u,resolve:o(a=>{try{let l=a.request(n,s);GF(l),i(l)}catch(l){u(l)}},"resolve")}])})}async createConnection(e,r){return t.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let n=e.port||443,s=e.hostname;typeof r.servername>"u"&&(r.servername=s);let i=jF.connect(n,s,r);return r.socket&&(i._peername={family:void 0,address:void 0,port:n}),i}closeEmptySessions(e=Number.POSITIVE_INFINITY){let r=0,{sessions:n}=this;for(let s in n){let i=n[s];for(let u=0;u<i.length;u++){let a=i[u];if(a[_e]===0&&(r++,a.close(),r>=e))return r}}return r}destroy(e){let{sessions:r,queue:n}=this;for(let s in r){let i=r[s];for(let u=0;u<i.length;u++)i[u].destroy(e)}for(let s in n){let i=n[s];for(let u in i)i[u].destroyed=!0}this.queue={},this.tlsSessionCache.clear()}get emptySessionCount(){return this._emptySessionCount}get pendingSessionCount(){return this._sessionCount-this._emptySessionCount}get sessionCount(){return this._sessionCount}};gr.kCurrentStreamCount=_e;gr.kGracefullyClosing=mt;zh.exports={Agent:gr,globalAgent:new gr}});var Po=b((RL,Wh)=>{"use strict";c();var{Readable:zF}=R("stream"),Oo=class extends zF{static{o(this,"IncomingMessage")}constructor(e,r){super({emitClose:!1,autoDestroy:!0,highWaterMark:r}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this._dumped=!1}get connection(){return this.socket}set connection(e){this.socket=e}_destroy(e,r){this.readableEnded||(this.aborted=!0),r(),this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};Wh.exports=Oo});var Zh=b((IL,Vh)=>{"use strict";c();Vh.exports=(t,e,r)=>{for(let n of r)t.on(n,(...s)=>e.emit(n,...s))}});var on=b((ML,Yh)=>{"use strict";c();var Gt=o((t,e,r)=>{Yh.exports[e]=class extends t{static{o(this,"NodeError")}constructor(...s){super(typeof r=="string"?r:r(s)),this.name=`${super.name} [${e}]`,this.code=e}}},"makeError");Gt(TypeError,"ERR_INVALID_ARG_TYPE",t=>{let e=t[0].includes(".")?"property":"argument",r=t[1],n=Array.isArray(r);return n&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${t[0]}" ${e} must be ${n?"one of":"of"} type ${r}. Received ${typeof t[2]}`});Gt(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);Gt(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);Gt(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);Gt(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);Gt(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`);Gt(Error,"ERR_HTTP2_NO_SOCKET_MANIPULATION","HTTP/2 sockets should not be directly manipulated (e.g. read and written)")});var Kh=b((qL,Jh)=>{"use strict";c();Jh.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var ko=b((zL,Xh)=>{"use strict";c();var{ERR_INVALID_HTTP_TOKEN:WF}=on(),VF=Kh(),ZF=/^[\^`\-\w!#$%&*+.|~]+$/;Xh.exports=t=>{if(typeof t!="string"||!ZF.test(t)&&!VF(t))throw new WF("Header name",t)}});var Ro=b((VL,Qh)=>{"use strict";c();var{ERR_HTTP_INVALID_HEADER_VALUE:YF,ERR_INVALID_CHAR:JF}=on(),KF=/[^\t\u0020-\u007E\u0080-\u00FF]/;Qh.exports=(t,e)=>{if(typeof e>"u")throw new YF(e,t);if(KF.test(e))throw new JF("header content",t)}});var rd=b((YL,td)=>{"use strict";c();var{ERR_HTTP2_NO_SOCKET_MANIPULATION:ed}=on(),XF={has(t,e){let r=t.session===void 0?t:t.session.socket;return e in t||e in r},get(t,e){switch(e){case"on":case"once":case"end":case"emit":case"destroy":return t[e].bind(t);case"writable":case"destroyed":return t[e];case"readable":return t.destroyed?!1:t.readable;case"setTimeout":{let{session:r}=t;return r!==void 0?r.setTimeout.bind(r):t.setTimeout.bind(t)}case"write":case"read":case"pause":case"resume":throw new ed;default:{let r=t.session===void 0?t:t.session.socket,n=r[e];return typeof n=="function"?n.bind(r):n}}},getPrototypeOf(t){return t.session!==void 0?Reflect.getPrototypeOf(t.session.socket):Reflect.getPrototypeOf(t)},set(t,e,r){switch(e){case"writable":case"readable":case"destroyed":case"on":case"once":case"end":case"emit":case"destroy":return t[e]=r,!0;case"setTimeout":{let{session:n}=t;return n===void 0?t.setTimeout=r:n.setTimeout=r,!0}case"write":case"read":case"pause":case"resume":throw new ed;default:{let n=t.session===void 0?t:t.session.socket;return n[e]=r,!0}}}};td.exports=XF});var $o=b((KL,ad)=>{"use strict";c();var{URL:Bo,urlToHttpOptions:nd}=R("url"),QF=R("http2"),{Writable:eC}=R("stream"),{Agent:tC,globalAgent:rC}=Ut(),nC=Po(),sC=Zh(),{ERR_INVALID_ARG_TYPE:ys,ERR_INVALID_PROTOCOL:iC,ERR_HTTP_HEADERS_SENT:sd}=on(),oC=ko(),uC=Ro(),aC=rd(),{HTTP2_HEADER_STATUS:id,HTTP2_HEADER_METHOD:od,HTTP2_HEADER_PATH:ud,HTTP2_HEADER_AUTHORITY:un,HTTP2_METHOD_CONNECT:cC}=QF.constants,me=Symbol("headers"),Er=Symbol("origin"),an=Symbol("session"),No=Symbol("options"),gs=Symbol("flushedHeaders"),Fr=Symbol("jobs"),cn=Symbol("pendingAgentPromise"),Io=class extends eC{static{o(this,"ClientRequest")}constructor(e,r,n){if(super({autoDestroy:!1,emitClose:!1}),typeof e=="string"?e=nd(new Bo(e)):e instanceof Bo?e=nd(e):e={...e},typeof r=="function"||r===void 0?(n=r,r=e):r=Object.assign(e,r),r.h2session){if(this[an]=r.h2session,this[an].destroyed)throw new Error("The session has been closed already");this.protocol=this[an].socket.encrypted?"https:":"http:"}else if(r.agent===!1)this.agent=new tC({maxEmptySessions:0});else if(typeof r.agent>"u"||r.agent===null)this.agent=rC;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new ys("options.agent",["http2wrapper.Agent-like Object","undefined","false"],r.agent);if(this.agent&&(this.protocol=this.agent.protocol),r.protocol&&r.protocol!==this.protocol)throw new iC(r.protocol,this.protocol);r.port||(r.port=r.defaultPort||this.agent&&this.agent.defaultPort||443),r.host=r.hostname||r.host||"localhost",delete r.hostname;let{timeout:s}=r;r.timeout=void 0,this[me]=Object.create(null),this[Fr]=[],this[cn]=void 0,this.socket=null,this.connection=null,this.method=r.method||"GET",this.method==="CONNECT"&&(r.path==="/"||r.path===void 0)||(this.path=r.path),this.res=null,this.aborted=!1,this.reusedSocket=!1;let{headers:i}=r;if(i)for(let a in i)this.setHeader(a,i[a]);r.auth&&!("authorization"in this[me])&&(this[me].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[No]=r,this[Er]=new Bo(`${this.protocol}//${r.servername||r.host}:${r.port}`);let u=r._reuseSocket;u&&(r.createConnection=(...a)=>u.destroyed?this.agent.createConnection(...a):u,this.agent.getSession(this[Er],this[No]).catch(()=>{})),s&&this.setTimeout(s),n&&this.once("response",n),this[gs]=!1}get method(){return this[me][od]}set method(e){e&&(this[me][od]=e.toUpperCase())}get path(){let e=this.method==="CONNECT"?un:ud;return this[me][e]}set path(e){if(e){let r=this.method==="CONNECT"?un:ud;this[me][r]=e}}get host(){return this[Er].hostname}set host(e){}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,n){if(this._mustNotHaveABody){n(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let s=o(()=>this._request.write(e,r,n),"callWrite");this._request?s():this[Fr].push(s)}_final(e){this.flushHeaders();let r=o(()=>{if(this._mustNotHaveABody||this.method==="CONNECT"){e();return}this._request.end(e)},"callEnd");this._request?r():this[Fr].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}async _destroy(e,r){this.res&&this.res._dump(),this._request?this._request.destroy():process.nextTick(()=>{this.emit("close")});try{await this[cn]}catch(n){this.aborted&&(e=n)}r(e)}async flushHeaders(){if(this[gs]||this.destroyed)return;this[gs]=!0;let e=this.method===cC,r=o(n=>{if(this._request=n,this.destroyed){n.destroy();return}e||sC(n,this,["timeout","continue"]),n.once("error",i=>{this.destroy(i)}),n.once("aborted",()=>{let{res:i}=this;i?(i.aborted=!0,i.emit("aborted"),i.destroy()):this.destroy(new Error("The server aborted the HTTP/2 stream"))});let s=o((i,u,a)=>{let l=new nC(this.socket,n.readableHighWaterMark);this.res=l,l.url=`${this[Er].origin}${this.path}`,l.req=this,l.statusCode=i[id],l.headers=i,l.rawHeaders=a,l.once("end",()=>{l.complete=!0,l.socket=null,l.connection=null}),e?(l.upgrade=!0,this.emit("connect",l,n,Buffer.alloc(0))?this.emit("close"):n.destroy()):(n.on("data",f=>{!l._dumped&&!l.push(f)&&n.pause()}),n.once("end",()=>{this.aborted||l.push(null)}),this.emit("response",l)||l._dump())},"onResponse");n.once("response",s),n.once("headers",i=>this.emit("information",{statusCode:i[id]})),n.once("trailers",(i,u,a)=>{let{res:l}=this;if(l===null){s(i,u,a);return}l.trailers=i,l.rawTrailers=a}),n.once("close",()=>{let{aborted:i,res:u}=this;if(u){i&&(u.aborted=!0,u.emit("aborted"),u.destroy());let a=o(()=>{u.emit("close"),this.destroy(),this.emit("close")},"finish");u.readable?u.once("end",a):a();return}if(!this.destroyed){this.destroy(new Error("The HTTP/2 stream has been early terminated")),this.emit("close");return}this.destroy(),this.emit("close")}),this.socket=new Proxy(n,aC);for(let i of this[Fr])i();this[Fr].length=0,this.emit("socket",this.socket)},"onStream");if(!(un in this[me])&&!e&&(this[me][un]=this[Er].host),this[an])try{r(this[an].request(this[me]))}catch(n){this.destroy(n)}else{this.reusedSocket=!0;try{let n=this.agent.request(this[Er],this[No],this[me]);this[cn]=n,r(await n),this[cn]=!1}catch(n){this[cn]=!1,this.destroy(n)}}}get connection(){return this.socket}set connection(e){this.socket=e}getHeaderNames(){return Object.keys(this[me])}hasHeader(e){if(typeof e!="string")throw new ys("name","string",e);return!!this[me][e.toLowerCase()]}getHeader(e){if(typeof e!="string")throw new ys("name","string",e);return this[me][e.toLowerCase()]}get headersSent(){return this[gs]}removeHeader(e){if(typeof e!="string")throw new ys("name","string",e);if(this.headersSent)throw new sd("remove");delete this[me][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new sd("set");oC(e),uC(e,r);let n=e.toLowerCase();if(n==="connection"){if(r.toLowerCase()==="keep-alive")return;throw new Error(`Invalid 'connection' header: ${r}`)}n==="host"&&this.method==="CONNECT"?this[me][un]=r:this[me][n]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let n=o(()=>this._request.setTimeout(e,r),"applyTimeout");return this._request?n():this[Fr].push(n),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};ad.exports=Io});var ld=b((eO,cd)=>{"use strict";c();var lC=R("tls");cd.exports=(t={},e=lC.connect)=>new Promise((r,n)=>{let s=!1,i,u=o(async()=>{await l,i.off("timeout",a),i.off("error",n),t.resolveSocket?(r({alpnProtocol:i.alpnProtocol,socket:i,timeout:s}),s&&(await Promise.resolve(),i.emit("timeout"))):(i.destroy(),r({alpnProtocol:i.alpnProtocol,timeout:s}))},"callback"),a=o(async()=>{s=!0,u()},"onTimeout"),l=(async()=>{try{i=await e(t,u),i.on("error",n),i.once("timeout",a)}catch(f){n(f)}})()})});var hd=b((nO,fd)=>{"use strict";c();var{isIP:fC}=R("net"),hC=R("assert"),dC=o(t=>{if(t[0]==="["){let r=t.indexOf("]");return hC(r!==-1),t.slice(1,r)}let e=t.indexOf(":");return e===-1?t:t.slice(0,e)},"getHost");fd.exports=t=>{let e=dC(t);return fC(e)?"":e}});var Fd=b((oO,ln)=>{"use strict";c();var{URL:dd,urlToHttpOptions:Dd}=R("url"),pd=R("http"),jo=R("https"),DC=ld(),pC=Ao(),{Agent:mC,globalAgent:yC}=Ut(),gC=$o(),EC=hd(),md=To(),yd=new pC({maxSize:100}),FC=new Map,CC=o((t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let n=o(()=>{t.emit("free",e,r)},"onFree");e.on("free",n);let s=o(()=>{t.removeSocket(e,r)},"onClose");e.on("close",s);let i=o(()=>{let{freeSockets:a}=t;for(let l of Object.values(a))if(l.includes(e)){e.destroy();return}},"onTimeout");e.on("timeout",i);let u=o(()=>{t.removeSocket(e,r),e.off("close",s),e.off("free",n),e.off("timeout",i),e.off("agentRemove",u)},"onRemove");e.on("agentRemove",u),t.emit("free",e,r)},"installSocket"),gd=o((t,e=new Map,r=void 0)=>async n=>{let s=`${n.host}:${n.port}:${n.ALPNProtocols.sort()}`;if(!t.has(s)){if(e.has(s))return{alpnProtocol:(await e.get(s)).alpnProtocol};let{path:i}=n;n.path=n.socketPath;let u=DC(n,r);e.set(s,u);try{let a=await u;return t.set(s,a.alpnProtocol),e.delete(s),n.path=i,a}catch(a){throw e.delete(s),n.path=i,a}}return{alpnProtocol:t.get(s)}},"createResolveProtocol"),Ed=gd(yd,FC);ln.exports=async(t,e,r)=>{if(typeof t=="string"?t=Dd(new dd(t)):t instanceof dd?t=Dd(t):t={...t},typeof e=="function"||e===void 0?(r=e,e=t):e=Object.assign(t,e),e.ALPNProtocols=e.ALPNProtocols||["h2","http/1.1"],!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";let n=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||EC(e.headers&&e.headers.host||e.host),e.port=e.port||(n?443:80),e._defaultAgent=n?jo.globalAgent:pd.globalAgent;let s=e.resolveProtocol||Ed,{agent:i}=e;if(i!==void 0&&i!==!1&&i.constructor.name!=="Object")throw new Error("The `options.agent` can be only an object `http`, `https` or `http2` properties");if(n){e.resolveSocket=!0;let{socket:u,alpnProtocol:a,timeout:l}=await s(e);if(l){u&&u.destroy();let h=new Error(`Timed out resolving ALPN: ${e.timeout} ms`);throw h.code="ETIMEDOUT",h.ms=e.timeout,h}u&&e.createConnection&&(u.destroy(),u=void 0),delete e.resolveSocket;let f=a==="h2";if(i&&(i=f?i.http2:i.https,e.agent=i),i===void 0&&(i=f?yC:jo.globalAgent),u)if(i===!1)u.destroy();else{let h=(f?mC:jo.Agent).prototype.createConnection;i.createConnection===h?f?e._reuseSocket=u:CC(i,u,e):u.destroy()}if(f)return md(new gC(e,r))}else i&&(e.agent=i.http);return e.headers&&(e.headers={...e.headers},e.headers[":authority"]&&(e.headers.host||(e.headers.host=e.headers[":authority"]),delete e.headers[":authority"]),delete e.headers[":method"],delete e.headers[":scheme"],delete e.headers[":path"]),md(pd.request(e,r))};ln.exports.protocolCache=yd;ln.exports.resolveProtocol=Ed;ln.exports.createResolveProtocol=gd});var Mo=b((cO,Cd)=>{"use strict";c();var bC=R("stream"),wC=R("tls"),_C=new wC.TLSSocket(new bC.PassThrough)._handle._parentWrap.constructor;Cd.exports=_C});var Go=b((fO,bd)=>{"use strict";c();var Uo=class extends Error{static{o(this,"UnexpectedStatusCodeError")}constructor(e,r=""){super(`The proxy server rejected the request with status code ${e} (${r||"empty status message"})`),this.statusCode=e,this.statusMessage=r}};bd.exports=Uo});var _d=b((DO,wd)=>{"use strict";c();var xC=o((t,e,r)=>{if(!r.some(s=>typeof s==="string"?typeof e===s:e instanceof s)){let s=r.map(i=>typeof i=="string"?i:i.name);throw new TypeError(`Expected '${t}' to be a type of ${s.join(" or ")}, got ${typeof e}`)}},"checkType");wd.exports=xC});var qo=b((yO,Sd)=>{"use strict";c();var{URL:xd}=R("url"),Es=_d();Sd.exports=(t,e)=>{Es("proxyOptions",e,["object"]),Es("proxyOptions.headers",e.headers,["object","undefined"]),Es("proxyOptions.raw",e.raw,["boolean","undefined"]),Es("proxyOptions.url",e.url,[xd,"string"]);let r=new xd(e.url);t.proxyOptions={raw:!0,...e,headers:{...e.headers},url:r}}});var Fs=b((EO,vd)=>{"use strict";c();vd.exports=t=>{let{username:e,password:r}=t.proxyOptions.url;if(e||r){let n=`${e}:${r}`,s=`Basic ${Buffer.from(n).toString("base64")}`;return{"proxy-authorization":s,authorization:s}}return{}}});var Pd=b((CO,Od)=>{"use strict";c();var SC=R("tls"),vC=R("http"),Ad=R("https"),AC=Mo(),{globalAgent:TC}=Ut(),LC=Go(),Td=qo(),OC=Fs(),Ld=o((t,e,r)=>{(async()=>{try{let{proxyOptions:n}=t,{url:s,headers:i,raw:u}=n,a=await TC.request(s,n,{...OC(t),...i,":method":"CONNECT",":authority":`${e.host}:${e.port}`});a.once("error",r),a.once("response",l=>{let f=l[":status"];if(f!==200){r(new LC(f,""));return}let h=t instanceof Ad.Agent;if(u&&h){e.socket=a;let m=SC.connect(e);m.once("close",()=>{a.destroy()}),r(null,m);return}let g=new AC(a);g.encrypted=!1,g._handle.getpeername=m=>{m.family=void 0,m.address=void 0,m.port=void 0},r(null,g)})}catch(n){r(n)}})()},"createConnection"),Ho=class extends vC.Agent{static{o(this,"HttpOverHttp2")}constructor(e){super(e),Td(this,e.proxyOptions)}createConnection(e,r){Ld(this,e,r)}},zo=class extends Ad.Agent{static{o(this,"HttpsOverHttp2")}constructor(e){super(e),Td(this,e.proxyOptions)}createConnection(e,r){Ld(this,e,r)}};Od.exports={HttpOverHttp2:Ho,HttpsOverHttp2:zo}});var Vo=b((_O,kd)=>{"use strict";c();var{Agent:PC}=Ut(),kC=Mo(),RC=Go(),BC=qo(),Wo=class extends PC{static{o(this,"Http2OverHttpX")}constructor(e){super(e),BC(this,e.proxyOptions)}async createConnection(e,r){let n=`${e.hostname}:${e.port||443}`,[s,i,u]=await this._getProxyStream(n);if(i!==200)throw new RC(i,u);if(this.proxyOptions.raw)r.socket=s;else{let a=new kC(s);return a.encrypted=!1,a._handle.getpeername=l=>{l.family=void 0,l.address=void 0,l.port=void 0},a}return super.createConnection(e,r)}};kd.exports=Wo});var Bd=b((vO,Rd)=>{"use strict";c();var{globalAgent:NC}=Ut(),IC=Vo(),$C=Fs(),jC=o(t=>new Promise((e,r)=>{t.once("error",r),t.once("response",n=>{t.off("error",r),e(n[":status"])})}),"getStatusCode"),Zo=class extends IC{static{o(this,"Http2OverHttp2")}async _getProxyStream(e){let{proxyOptions:r}=this,n={...$C(this),...r.headers,":method":"CONNECT",":authority":e},s=await NC.request(r.url,r,n),i=await jC(s);return[s,i,""]}};Rd.exports=Zo});var Id=b((LO,Nd)=>{"use strict";c();var MC=R("http"),UC=R("https"),GC=Vo(),qC=Fs(),HC=o(t=>new Promise((e,r)=>{let n=o((s,i,u)=>{i.unshift(u),t.off("error",r),e([i,s.statusCode,s.statusMessage])},"onConnect");t.once("error",r),t.once("connect",n)}),"getStream"),Cs=class extends GC{static{o(this,"Http2OverHttp")}async _getProxyStream(e){let{proxyOptions:r}=this,{url:n,headers:s}=this.proxyOptions,u=(n.protocol==="https:"?UC:MC).request({...r,hostname:n.hostname,port:n.port,path:e,headers:{...qC(this),...s,host:e},method:"CONNECT"}).end();return HC(u)}};Nd.exports={Http2OverHttp:Cs,Http2OverHttps:Cs}});var jd=b((kO,$d)=>{"use strict";c();var zC=R("http2"),{Agent:WC,globalAgent:VC}=Ut(),Yo=$o(),ZC=Po(),YC=Fd(),{HttpOverHttp2:JC,HttpsOverHttp2:KC}=Pd(),XC=Bd(),{Http2OverHttp:QC,Http2OverHttps:eb}=Id(),tb=ko(),rb=Ro(),nb=o((t,e,r)=>new Yo(t,e,r),"request"),sb=o((t,e,r)=>{let n=new Yo(t,e,r);return n.end(),n},"get");$d.exports={...zC,ClientRequest:Yo,IncomingMessage:ZC,Agent:WC,globalAgent:VC,request:nb,get:sb,auto:YC,proxies:{HttpOverHttp2:JC,HttpsOverHttp2:KC,Http2OverHttp2:XC,Http2OverHttp:QC,Http2OverHttps:eb},validateHeaderName:tb,validateHeaderValue:rb}});c();c();var su=o((t=0)=>e=>`\x1B[${e+t}m`,"wrapAnsi16"),iu=o((t=0)=>e=>`\x1B[${38+t};5;${e}m`,"wrapAnsi256"),ou=o((t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,"wrapAnsi16m"),Q={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Mb=Object.keys(Q.modifier),nD=Object.keys(Q.color),sD=Object.keys(Q.bgColor),Ub=[...nD,...sD];function iD(){let t=new Map;for(let[e,r]of Object.entries(Q)){for(let[n,s]of Object.entries(r))Q[n]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[n]=Q[n],t.set(s[0],s[1]);Object.defineProperty(Q,e,{value:r,enumerable:!1})}return Object.defineProperty(Q,"codes",{value:t,enumerable:!1}),Q.color.close="\x1B[39m",Q.bgColor.close="\x1B[49m",Q.color.ansi=su(),Q.color.ansi256=iu(),Q.color.ansi16m=ou(),Q.bgColor.ansi=su(10),Q.bgColor.ansi256=iu(10),Q.bgColor.ansi16m=ou(10),Object.defineProperties(Q,{rgbToAnsi256:{value(e,r,n){return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(i=>i+i).join(""));let s=Number.parseInt(n,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:o(e=>Q.rgbToAnsi256(...Q.hexToRgb(e)),"value"),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,s;if(e>=232)r=((e-232)*10+8)/255,n=r,s=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,s=a%6/5}let i=Math.max(r,n,s)*2;if(i===0)return 30;let u=30+(Math.round(s)<<2|Math.round(n)<<1|Math.round(r));return i===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:o((e,r,n)=>Q.ansi256ToAnsi(Q.rgbToAnsi256(e,r,n)),"value"),enumerable:!1},hexToAnsi:{value:o(e=>Q.ansi256ToAnsi(Q.hexToAnsi256(e)),"value"),enumerable:!1}}),Q}o(iD,"assembleStyles");var oD=iD(),Ne=oD;c();import As from"node:process";import uD from"node:os";import uu from"node:tty";function Oe(t,e=globalThis.Deno?globalThis.Deno.args:As.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),s=e.indexOf("--");return n!==-1&&(s===-1||n<s)}o(Oe,"hasFlag");var{env:ie}=As,hn;Oe("no-color")||Oe("no-colors")||Oe("color=false")||Oe("color=never")?hn=0:(Oe("color")||Oe("colors")||Oe("color=true")||Oe("color=always"))&&(hn=1);function aD(){if("FORCE_COLOR"in ie)return ie.FORCE_COLOR==="true"?1:ie.FORCE_COLOR==="false"?0:ie.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ie.FORCE_COLOR,10),3)}o(aD,"envForceColor");function cD(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}o(cD,"translateLevel");function lD(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=aD();n!==void 0&&(hn=n);let s=r?hn:n;if(s===0)return 0;if(r){if(Oe("color=16m")||Oe("color=full")||Oe("color=truecolor"))return 3;if(Oe("color=256"))return 2}if("TF_BUILD"in ie&&"AGENT_NAME"in ie)return 1;if(t&&!e&&s===void 0)return 0;let i=s||0;if(ie.TERM==="dumb")return i;if(As.platform==="win32"){let u=uD.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in ie)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(u=>u in ie)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in ie)||ie.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in ie)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ie.TEAMCITY_VERSION)?1:0;if(ie.COLORTERM==="truecolor"||ie.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in ie){let u=Number.parseInt((ie.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ie.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ie.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ie.TERM)||"COLORTERM"in ie?1:i}o(lD,"_supportsColor");function au(t,e={}){let r=lD(t,{streamIsTTY:t&&t.isTTY,...e});return cD(r)}o(au,"createSupportsColor");var fD={stdout:au({isTTY:uu.isatty(1)}),stderr:au({isTTY:uu.isatty(2)})},cu=fD;c();function lu(t,e,r){let n=t.indexOf(e);if(n===-1)return t;let s=e.length,i=0,u="";do u+=t.slice(i,n)+e+r,i=n+s,n=t.indexOf(e,i);while(n!==-1);return u+=t.slice(i),u}o(lu,"stringReplaceAll");function fu(t,e,r,n){let s=0,i="";do{let u=t[n-1]==="\r";i+=t.slice(s,u?n-1:n)+e+(u?`\r
|
|
14
|
+
`)),u+=g+n[l+1]}),u}o(Kf,"dedent");Gr.dedent=Kf;Gr.default=Kf});var ih=b((no,so)=>{"use strict";c();Object.defineProperty(no,"__esModule",{value:!0});function BE(t){return t.encrypted}o(BE,"isTLSSocket");var ro=o((t,e)=>{let r;typeof e=="function"?r={connect:e}:r=e;let n=typeof r.connect=="function",s=typeof r.secureConnect=="function",i=typeof r.close=="function",u=o(()=>{n&&r.connect(),BE(t)&&s&&(t.authorized?r.secureConnect():t.authorizationError||t.once("secureConnect",r.secureConnect)),i&&t.once("close",r.close)},"onConnect");t.writable&&!t.connecting?u():t.connecting?t.once("connect",u):t.destroyed&&i&&r.close(t._hadError)},"deferToConnect");no.default=ro;so.exports=ro;so.exports.default=ro});var ch=b((l3,ah)=>{"use strict";c();var{PassThrough:HE}=R("stream");ah.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,n=r==="buffer",s=!1;e?s=!(r||n):r=r||"utf8",n&&(r=null);let i=new HE({objectMode:s});r&&i.setEncoding(r);let u=0,a=[];return i.on("data",l=>{a.push(l),s?u=a.length:u+=l.length}),i.getBufferedValue=()=>e?a:n?Buffer.concat(a,u):a.join(""),i.getBufferedLength=()=>u,i}});var ao=b((h3,Wr)=>{"use strict";c();var{constants:zE}=R("buffer"),WE=R("stream"),{promisify:VE}=R("util"),ZE=ch(),YE=VE(WE.pipeline),us=class extends Error{static{o(this,"MaxBufferError")}constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function uo(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,n=ZE(e);return await new Promise((s,i)=>{let u=o(a=>{a&&n.getBufferedLength()<=zE.MAX_LENGTH&&(a.bufferedData=n.getBufferedValue()),i(a)},"rejectPromise");(async()=>{try{await YE(t,n),s()}catch(a){u(a)}})(),n.on("data",()=>{n.getBufferedLength()>r&&u(new us)})}),n.getBufferedValue()}o(uo,"getStream");Wr.exports=uo;Wr.exports.buffer=(t,e)=>uo(t,{...e,encoding:"buffer"});Wr.exports.array=(t,e)=>uo(t,{...e,array:!0});Wr.exports.MaxBufferError=us});var fh=b((m3,lh)=>{"use strict";c();var JE=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),KE=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),XE=new Set([500,502,503,504]),QE={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},eF={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function jt(t){let e=parseInt(t,10);return isFinite(e)?e:0}o(jt,"toNumberOrZero");function tF(t){return t?XE.has(t.status):!0}o(tF,"isErrorResponse");function co(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let n of r){let[s,i]=n.split(/=/,2);e[s.trim()]=i===void 0?!0:i.trim().replace(/^"|"$/g,"")}return e}o(co,"parseCacheControl");function rF(t){let e=[];for(let r in t){let n=t[r];e.push(n===!0?r:r+"="+n)}if(e.length)return e.join(", ")}o(rF,"formatCacheControl");lh.exports=class{static{o(this,"CachePolicy")}constructor(e,r,{shared:n,cacheHeuristic:s,immutableMinTimeToLive:i,ignoreCargoCult:u,_fromObject:a}={}){if(a){this._fromObject(a);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=n!==!1,this._cacheHeuristic=s!==void 0?s:.1,this._immutableMinTtl=i!==void 0?i:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=co(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=co(e.headers["cache-control"]),u&&"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":rF(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.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())&&KE.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||JE.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=co(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let n of r)if(e.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let n in e)QE[n]||(r[n]=e[n]);if(e.connection){let n=e.connection.trim().split(/\s*,\s*/);for(let s of n)delete r[s]}if(r.warning){let n=r.warning.split(/,/).filter(s=>!/^\s*1[0-9][0-9]/.test(s));n.length?r.warning=n.join(",").trim():delete r.warning}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return jt(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 jt(this._rescc["s-maxage"])}if(this._rescc["max-age"])return jt(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||n<r?0:Math.max(e,(n-r)/1e3)}if(this._resHeaders["last-modified"]){let n=Date.parse(this._resHeaders["last-modified"]);if(isFinite(n)&&r>n)return Math.max(e,(r-n)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+jt(this._rescc["stale-if-error"]),n=e+jt(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,n)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+jt(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+jt(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,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(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let s=r["if-none-match"].split(/,/).filter(i=>!/^\s*W\//.test(i));s.length?r["if-none-match"]=s.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&tF(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let n=!1;if(r.status!==void 0&&r.status!=304?n=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?n=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?n=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?n=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(n=!0),!n)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let s={};for(let u in this._resHeaders)s[u]=u in r.headers&&!eF[u]?r.headers[u]:this._resHeaders[u];let i=Object.assign({},r,{status:this._status,method:this._method,headers:s});return{policy:new this.constructor(e,i,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var hh=b(lo=>{c();lo.stringify=o(function t(e){if(typeof e>"u")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",n=Array.isArray(e);r=n?"[":"{";var s=!0;for(var i in e){var u=typeof e[i]=="function"||!n&&typeof e[i]>"u";Object.hasOwnProperty.call(e,i)&&!u&&(s||(r+=","),s=!1,n?e[i]==null?r+="null":r+=t(e[i]):e[i]!==void 0&&(r+=t(i)+":"+t(e[i])))}return r+=n?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e>"u"?"null":JSON.stringify(e)},"stringify");lo.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})}});var mh=b((L3,ph)=>{"use strict";c();var sF=R("events"),dh=hh(),iF=o(t=>{let e={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(t.adapter||t.uri){let r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(R(e[r]))(t)}return new Map},"loadStore"),Dh=["sqlite","postgres","mysql","mongo","redis","tiered"],fo=class extends sF{static{o(this,"Keyv")}constructor(e,{emitErrors:r=!0,...n}={}){if(super(),this.opts={namespace:"keyv",serialize:dh.stringify,deserialize:dh.parse,...typeof e=="string"?{uri:e}:e,...n},!this.opts.store){let i={...this.opts};this.opts.store=iF(i)}if(this.opts.compression){let i=this.opts.compression;this.opts.serialize=i.serialize.bind(i),this.opts.deserialize=i.deserialize.bind(i)}typeof this.opts.store.on=="function"&&r&&this.opts.store.on("error",i=>this.emit("error",i)),this.opts.store.namespace=this.opts.namespace;let s=o(i=>async function*(){for await(let[u,a]of typeof i=="function"?i(this.opts.store.namespace):i){let l=await this.opts.deserialize(a);if(!(this.opts.store.namespace&&!u.includes(this.opts.store.namespace))){if(typeof l.expires=="number"&&Date.now()>l.expires){this.delete(u);continue}yield[this._getKeyUnprefix(u),l.value]}}},"generateIterator");typeof this.opts.store[Symbol.iterator]=="function"&&this.opts.store instanceof Map?this.iterator=s(this.opts.store):typeof this.opts.store.iterator=="function"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=s(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return Dh.includes(this.opts.store.opts.dialect)||Dh.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,r){let{store:n}=this.opts,s=Array.isArray(e),i=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&n.getMany===void 0){let u=[];for(let a of i)u.push(Promise.resolve().then(()=>n.get(a)).then(l=>typeof l=="string"?this.opts.deserialize(l):this.opts.compression?this.opts.deserialize(l):l).then(l=>{if(l!=null)return typeof l.expires=="number"&&Date.now()>l.expires?this.delete(a).then(()=>{}):r&&r.raw?l:l.value}));return Promise.allSettled(u).then(a=>{let l=[];for(let f of a)l.push(f.value);return l})}return Promise.resolve().then(()=>s?n.getMany(i):n.get(i)).then(u=>typeof u=="string"?this.opts.deserialize(u):this.opts.compression?this.opts.deserialize(u):u).then(u=>{if(u!=null)return s?u.map((a,l)=>{if(typeof a=="string"&&(a=this.opts.deserialize(a)),a!=null){if(typeof a.expires=="number"&&Date.now()>a.expires){this.delete(e[l]).then(()=>{});return}return r&&r.raw?a:a.value}}):typeof u.expires=="number"&&Date.now()>u.expires?this.delete(e).then(()=>{}):r&&r.raw?u:u.value})}set(e,r,n){let s=this._getKeyPrefix(e);typeof n>"u"&&(n=this.opts.ttl),n===0&&(n=void 0);let{store:i}=this.opts;return Promise.resolve().then(()=>{let u=typeof n=="number"?Date.now()+n:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:u},this.opts.serialize(r)}).then(u=>i.set(s,u,n)).then(()=>!0)}delete(e){let{store:r}=this.opts;if(Array.isArray(e)){let s=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){let i=[];for(let u of s)i.push(r.delete(u));return Promise.allSettled(i).then(u=>u.every(a=>a.value===!0))}return Promise.resolve().then(()=>r.deleteMany(s))}let n=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(n))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let r=this._getKeyPrefix(e),{store:n}=this.opts;return Promise.resolve().then(async()=>typeof n.has=="function"?n.has(r):await n.get(r)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect=="function")return e.disconnect()}};ph.exports=fo});var Ch=b((K3,Fh)=>{"use strict";c();var DF=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];Fh.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(t).concat(DF)),n={};for(let s of r)s in e||(n[s]={get(){let i=t[s];return typeof i=="function"?i.bind(t):i},set(i){t[s]=i},enumerable:!0,configurable:!1});return Object.defineProperties(e,n),t.once("aborted",()=>{e.destroy(),e.emit("aborted")}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}});var wh=b((Q3,bh)=>{"use strict";c();var{Transform:pF,PassThrough:mF}=R("stream"),mo=R("zlib"),yF=Ch();bh.exports=t=>{let e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;let r=e==="br";if(r&&typeof mo.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let n=!0,s=new pF({transform(a,l,f){n=!1,f(null,a)},flush(a){a()}}),i=new mF({autoDestroy:!1,destroy(a,l){t.destroy(),l(a)}}),u=r?mo.createBrotliDecompress():mo.createUnzip();return u.once("error",a=>{if(n&&!t.readable){i.end();return}i.destroy(a)}),yF(t,i),t.pipe(s).pipe(u).pipe(i),i}});var Ao=b((SL,$h)=>{"use strict";c();var vo=class{static{o(this,"QuickLRU")}constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[n,s]of this.oldCache.entries())this.onEviction(n,s);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};$h.exports=vo});var To=b((TL,jh)=>{"use strict";c();jh.exports=t=>{if(t.listenerCount("error")!==0)return t;t.__destroy=t._destroy,t._destroy=(...r)=>{let n=r.pop();t.__destroy(...r,async s=>{await Promise.resolve(),n(s)})};let e=o(r=>{Promise.resolve().then(()=>{t.emit("error",r)})},"onError");return t.once("error",e),Promise.resolve().then(()=>{t.off("error",e)}),t}});var Ut=b((PL,zh)=>{"use strict";c();var{URL:Mh}=R("url"),$F=R("events"),jF=R("tls"),MF=R("http2"),UF=Ao(),GF=To(),_e=Symbol("currentStreamCount"),Uh=Symbol("request"),xe=Symbol("cachedOriginSet"),mt=Symbol("gracefullyClosing"),ms=Symbol("length"),Gh=["createConnection","maxDeflateDynamicTableSize","maxSettings","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","peerMaxConcurrentStreams","settings","family","localAddress","rejectUnauthorized","pskCallback","minDHSize","path","socket","ca","cert","sigalgs","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","honorCipherOrder","key","privateKeyEngine","privateKeyIdentifier","maxVersion","minVersion","pfx","secureOptions","secureProtocol","sessionIdContext","ticketKeys"],qF=o((t,e,r)=>{let n=0,s=t.length;for(;n<s;){let i=n+s>>>1;r(t[i],e)?n=i+1:s=i}return n},"getSortedIndex"),HF=o((t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,"compareSessions"),Lo=o((t,e)=>{for(let r=0;r<t.length;r++){let n=t[r];n[xe].length>0&&n[xe].length<e[xe].length&&n[xe].every(s=>e[xe].includes(s))&&n[_e]+e[_e]<=e.remoteSettings.maxConcurrentStreams&&Hh(n)}},"closeCoveredSessions"),qh=o((t,e)=>{for(let r=0;r<t.length;r++){let n=t[r];if(e[xe].length>0&&e[xe].length<n[xe].length&&e[xe].every(s=>n[xe].includes(s))&&e[_e]+n[_e]<=n.remoteSettings.maxConcurrentStreams)return Hh(e),!0}return!1},"closeSessionIfCovered"),Hh=o(t=>{t[mt]=!0,t[_e]===0&&t.close()},"gracefullyClose"),gr=class t extends $F{static{o(this,"Agent")}constructor({timeout:e=0,maxSessions:r=Number.POSITIVE_INFINITY,maxEmptySessions:n=10,maxCachedTlsSessions:s=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxEmptySessions=n,this._emptySessionCount=0,this._sessionCount=0,this.settings={enablePush:!1,initialWindowSize:1024*1024*32},this.tlsSessionCache=new UF({maxSize:s})}get protocol(){return"https:"}normalizeOptions(e){let r="";for(let n=0;n<Gh.length;n++){let s=Gh[n];r+=":",e&&e[s]!==void 0&&(r+=e[s])}return r}_processQueue(){if(this._sessionCount>=this.maxSessions){this.closeEmptySessions(this.maxSessions-this._sessionCount+1);return}for(let e in this.queue)for(let r in this.queue[e]){let n=this.queue[e][r];n.completed||(n.completed=!0,n())}}_isBetterSession(e,r){return e>r}_accept(e,r,n,s){let i=0;for(;i<r.length&&e[_e]<e.remoteSettings.maxConcurrentStreams;)r[i].resolve(e),i++;r.splice(0,i),r.length>0&&(this.getSession(n,s,r),r.length=0)}getSession(e,r,n){return new Promise((s,i)=>{Array.isArray(n)&&n.length>0?(n=[...n],s()):n=[{resolve:s,reject:i}];try{if(typeof e=="string")e=new Mh(e);else if(!(e instanceof Mh))throw new TypeError("The `origin` argument needs to be a string or an URL object");if(r){let{servername:h}=r,{hostname:g}=e;if(h&&g!==h)throw new Error(`Origin ${g} differs from servername ${h}`)}}catch(h){for(let g=0;g<n.length;g++)n[g].reject(h);return}let u=this.normalizeOptions(r),a=e.origin;if(u in this.sessions){let h=this.sessions[u],g=-1,m=-1,y;for(let E=0;E<h.length;E++){let D=h[E],C=D.remoteSettings.maxConcurrentStreams;if(C<g)break;if(!D[xe].includes(a))continue;let F=D[_e];F>=C||D[mt]||D.destroyed||(y||(g=C),this._isBetterSession(F,m)&&(y=D,m=F))}if(y){this._accept(y,n,a,r);return}}if(u in this.queue){if(a in this.queue[u]){this.queue[u][a].listeners.push(...n);return}}else this.queue[u]={[ms]:0};let l=o(()=>{u in this.queue&&this.queue[u][a]===f&&(delete this.queue[u][a],--this.queue[u][ms]===0&&delete this.queue[u])},"removeFromQueue"),f=o(async()=>{this._sessionCount++;let h=`${a}:${u}`,g=!1,m;try{let y={...r};y.settings===void 0&&(y.settings=this.settings),y.session===void 0&&(y.session=this.tlsSessionCache.get(h)),m=await(y.createConnection||this.createConnection).call(this,e,y),y.createConnection=()=>m;let D=MF.connect(e,y);D[_e]=0,D[mt]=!1;let C=o(()=>{let{socket:S}=D,k;return S.servername===!1?(S.servername=S.remoteAddress,k=D.originSet,S.servername=!1):k=D.originSet,k},"getOriginSet"),F=o(()=>D[_e]<D.remoteSettings.maxConcurrentStreams,"isFree");D.socket.once("session",S=>{this.tlsSessionCache.set(h,S)}),D.once("error",S=>{for(let k=0;k<n.length;k++)n[k].reject(S);this.tlsSessionCache.delete(h)}),D.setTimeout(this.timeout,()=>{D.destroy()}),D.once("close",()=>{if(this._sessionCount--,g){this._emptySessionCount--;let S=this.sessions[u];S.length===1?delete this.sessions[u]:S.splice(S.indexOf(D),1)}else{l();let S=new Error("Session closed without receiving a SETTINGS frame");S.code="HTTP2WRAPPER_NOSETTINGS";for(let k=0;k<n.length;k++)n[k].reject(S)}this._processQueue()});let O=o(()=>{let S=this.queue[u];if(!S)return;let k=D[xe];for(let U=0;U<k.length;U++){let te=k[U];if(te in S){let{listeners:ue,completed:Ue}=S[te],B=0;for(;B<ue.length&&F();)ue[B].resolve(D),B++;if(S[te].listeners.splice(0,B),S[te].listeners.length===0&&!Ue&&(delete S[te],--S[ms]===0)){delete this.queue[u];break}if(!F())break}}},"processListeners");D.on("origin",()=>{D[xe]=C()||[],D[mt]=!1,qh(this.sessions[u],D),!(D[mt]||!F())&&(O(),F()&&Lo(this.sessions[u],D))}),D.once("remoteSettings",()=>{if(f.destroyed){let S=new Error("Agent has been destroyed");for(let k=0;k<n.length;k++)n[k].reject(S);D.destroy();return}if(D.setLocalWindowSize&&D.setLocalWindowSize(1024*1024*4),D[xe]=C()||[],D.socket.encrypted){let S=D[xe][0];if(S!==a){let k=new Error(`Requested origin ${a} does not match server ${S}`);for(let U=0;U<n.length;U++)n[U].reject(k);D.destroy();return}}l();{let S=this.sessions;if(u in S){let k=S[u];k.splice(qF(k,D,HF),0,D)}else S[u]=[D]}g=!0,this._emptySessionCount++,this.emit("session",D),this._accept(D,n,a,r),D[_e]===0&&this._emptySessionCount>this.maxEmptySessions&&this.closeEmptySessions(this._emptySessionCount-this.maxEmptySessions),D.on("remoteSettings",()=>{F()&&(O(),F()&&Lo(this.sessions[u],D))})}),D[Uh]=D.request,D.request=(S,k)=>{if(D[mt])throw new Error("The session is gracefully closing. No new streams are allowed.");let U=D[Uh](S,k);return D.ref(),D[_e]++===0&&this._emptySessionCount--,U.once("close",()=>{if(--D[_e]===0&&(this._emptySessionCount++,D.unref(),this._emptySessionCount>this.maxEmptySessions||D[mt])){D.close();return}D.destroyed||D.closed||F()&&!qh(this.sessions[u],D)&&(Lo(this.sessions[u],D),O(),D[_e]===0&&this._processQueue())}),U}}catch(y){l(),this._sessionCount--;for(let E=0;E<n.length;E++)n[E].reject(y)}},"entry");f.listeners=n,f.completed=!1,f.destroyed=!1,this.queue[u][a]=f,this.queue[u][ms]++,this._processQueue()})}request(e,r,n,s){return new Promise((i,u)=>{this.getSession(e,r,[{reject:u,resolve:o(a=>{try{let l=a.request(n,s);GF(l),i(l)}catch(l){u(l)}},"resolve")}])})}async createConnection(e,r){return t.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let n=e.port||443,s=e.hostname;typeof r.servername>"u"&&(r.servername=s);let i=jF.connect(n,s,r);return r.socket&&(i._peername={family:void 0,address:void 0,port:n}),i}closeEmptySessions(e=Number.POSITIVE_INFINITY){let r=0,{sessions:n}=this;for(let s in n){let i=n[s];for(let u=0;u<i.length;u++){let a=i[u];if(a[_e]===0&&(r++,a.close(),r>=e))return r}}return r}destroy(e){let{sessions:r,queue:n}=this;for(let s in r){let i=r[s];for(let u=0;u<i.length;u++)i[u].destroy(e)}for(let s in n){let i=n[s];for(let u in i)i[u].destroyed=!0}this.queue={},this.tlsSessionCache.clear()}get emptySessionCount(){return this._emptySessionCount}get pendingSessionCount(){return this._sessionCount-this._emptySessionCount}get sessionCount(){return this._sessionCount}};gr.kCurrentStreamCount=_e;gr.kGracefullyClosing=mt;zh.exports={Agent:gr,globalAgent:new gr}});var Po=b((BL,Wh)=>{"use strict";c();var{Readable:zF}=R("stream"),Oo=class extends zF{static{o(this,"IncomingMessage")}constructor(e,r){super({emitClose:!1,autoDestroy:!0,highWaterMark:r}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this._dumped=!1}get connection(){return this.socket}set connection(e){this.socket=e}_destroy(e,r){this.readableEnded||(this.aborted=!0),r(),this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};Wh.exports=Oo});var Zh=b(($L,Vh)=>{"use strict";c();Vh.exports=(t,e,r)=>{for(let n of r)t.on(n,(...s)=>e.emit(n,...s))}});var on=b((UL,Yh)=>{"use strict";c();var Gt=o((t,e,r)=>{Yh.exports[e]=class extends t{static{o(this,"NodeError")}constructor(...s){super(typeof r=="string"?r:r(s)),this.name=`${super.name} [${e}]`,this.code=e}}},"makeError");Gt(TypeError,"ERR_INVALID_ARG_TYPE",t=>{let e=t[0].includes(".")?"property":"argument",r=t[1],n=Array.isArray(r);return n&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${t[0]}" ${e} must be ${n?"one of":"of"} type ${r}. Received ${typeof t[2]}`});Gt(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);Gt(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);Gt(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);Gt(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);Gt(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`);Gt(Error,"ERR_HTTP2_NO_SOCKET_MANIPULATION","HTTP/2 sockets should not be directly manipulated (e.g. read and written)")});var Kh=b((HL,Jh)=>{"use strict";c();Jh.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var ko=b((WL,Xh)=>{"use strict";c();var{ERR_INVALID_HTTP_TOKEN:WF}=on(),VF=Kh(),ZF=/^[\^`\-\w!#$%&*+.|~]+$/;Xh.exports=t=>{if(typeof t!="string"||!ZF.test(t)&&!VF(t))throw new WF("Header name",t)}});var Ro=b((ZL,Qh)=>{"use strict";c();var{ERR_HTTP_INVALID_HEADER_VALUE:YF,ERR_INVALID_CHAR:JF}=on(),KF=/[^\t\u0020-\u007E\u0080-\u00FF]/;Qh.exports=(t,e)=>{if(typeof e>"u")throw new YF(e,t);if(KF.test(e))throw new JF("header content",t)}});var rd=b((JL,td)=>{"use strict";c();var{ERR_HTTP2_NO_SOCKET_MANIPULATION:ed}=on(),XF={has(t,e){let r=t.session===void 0?t:t.session.socket;return e in t||e in r},get(t,e){switch(e){case"on":case"once":case"end":case"emit":case"destroy":return t[e].bind(t);case"writable":case"destroyed":return t[e];case"readable":return t.destroyed?!1:t.readable;case"setTimeout":{let{session:r}=t;return r!==void 0?r.setTimeout.bind(r):t.setTimeout.bind(t)}case"write":case"read":case"pause":case"resume":throw new ed;default:{let r=t.session===void 0?t:t.session.socket,n=r[e];return typeof n=="function"?n.bind(r):n}}},getPrototypeOf(t){return t.session!==void 0?Reflect.getPrototypeOf(t.session.socket):Reflect.getPrototypeOf(t)},set(t,e,r){switch(e){case"writable":case"readable":case"destroyed":case"on":case"once":case"end":case"emit":case"destroy":return t[e]=r,!0;case"setTimeout":{let{session:n}=t;return n===void 0?t.setTimeout=r:n.setTimeout=r,!0}case"write":case"read":case"pause":case"resume":throw new ed;default:{let n=t.session===void 0?t:t.session.socket;return n[e]=r,!0}}}};td.exports=XF});var $o=b((XL,ad)=>{"use strict";c();var{URL:Bo,urlToHttpOptions:nd}=R("url"),QF=R("http2"),{Writable:eC}=R("stream"),{Agent:tC,globalAgent:rC}=Ut(),nC=Po(),sC=Zh(),{ERR_INVALID_ARG_TYPE:ys,ERR_INVALID_PROTOCOL:iC,ERR_HTTP_HEADERS_SENT:sd}=on(),oC=ko(),uC=Ro(),aC=rd(),{HTTP2_HEADER_STATUS:id,HTTP2_HEADER_METHOD:od,HTTP2_HEADER_PATH:ud,HTTP2_HEADER_AUTHORITY:un,HTTP2_METHOD_CONNECT:cC}=QF.constants,me=Symbol("headers"),Er=Symbol("origin"),an=Symbol("session"),No=Symbol("options"),gs=Symbol("flushedHeaders"),Fr=Symbol("jobs"),cn=Symbol("pendingAgentPromise"),Io=class extends eC{static{o(this,"ClientRequest")}constructor(e,r,n){if(super({autoDestroy:!1,emitClose:!1}),typeof e=="string"?e=nd(new Bo(e)):e instanceof Bo?e=nd(e):e={...e},typeof r=="function"||r===void 0?(n=r,r=e):r=Object.assign(e,r),r.h2session){if(this[an]=r.h2session,this[an].destroyed)throw new Error("The session has been closed already");this.protocol=this[an].socket.encrypted?"https:":"http:"}else if(r.agent===!1)this.agent=new tC({maxEmptySessions:0});else if(typeof r.agent>"u"||r.agent===null)this.agent=rC;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new ys("options.agent",["http2wrapper.Agent-like Object","undefined","false"],r.agent);if(this.agent&&(this.protocol=this.agent.protocol),r.protocol&&r.protocol!==this.protocol)throw new iC(r.protocol,this.protocol);r.port||(r.port=r.defaultPort||this.agent&&this.agent.defaultPort||443),r.host=r.hostname||r.host||"localhost",delete r.hostname;let{timeout:s}=r;r.timeout=void 0,this[me]=Object.create(null),this[Fr]=[],this[cn]=void 0,this.socket=null,this.connection=null,this.method=r.method||"GET",this.method==="CONNECT"&&(r.path==="/"||r.path===void 0)||(this.path=r.path),this.res=null,this.aborted=!1,this.reusedSocket=!1;let{headers:i}=r;if(i)for(let a in i)this.setHeader(a,i[a]);r.auth&&!("authorization"in this[me])&&(this[me].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[No]=r,this[Er]=new Bo(`${this.protocol}//${r.servername||r.host}:${r.port}`);let u=r._reuseSocket;u&&(r.createConnection=(...a)=>u.destroyed?this.agent.createConnection(...a):u,this.agent.getSession(this[Er],this[No]).catch(()=>{})),s&&this.setTimeout(s),n&&this.once("response",n),this[gs]=!1}get method(){return this[me][od]}set method(e){e&&(this[me][od]=e.toUpperCase())}get path(){let e=this.method==="CONNECT"?un:ud;return this[me][e]}set path(e){if(e){let r=this.method==="CONNECT"?un:ud;this[me][r]=e}}get host(){return this[Er].hostname}set host(e){}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,n){if(this._mustNotHaveABody){n(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let s=o(()=>this._request.write(e,r,n),"callWrite");this._request?s():this[Fr].push(s)}_final(e){this.flushHeaders();let r=o(()=>{if(this._mustNotHaveABody||this.method==="CONNECT"){e();return}this._request.end(e)},"callEnd");this._request?r():this[Fr].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}async _destroy(e,r){this.res&&this.res._dump(),this._request?this._request.destroy():process.nextTick(()=>{this.emit("close")});try{await this[cn]}catch(n){this.aborted&&(e=n)}r(e)}async flushHeaders(){if(this[gs]||this.destroyed)return;this[gs]=!0;let e=this.method===cC,r=o(n=>{if(this._request=n,this.destroyed){n.destroy();return}e||sC(n,this,["timeout","continue"]),n.once("error",i=>{this.destroy(i)}),n.once("aborted",()=>{let{res:i}=this;i?(i.aborted=!0,i.emit("aborted"),i.destroy()):this.destroy(new Error("The server aborted the HTTP/2 stream"))});let s=o((i,u,a)=>{let l=new nC(this.socket,n.readableHighWaterMark);this.res=l,l.url=`${this[Er].origin}${this.path}`,l.req=this,l.statusCode=i[id],l.headers=i,l.rawHeaders=a,l.once("end",()=>{l.complete=!0,l.socket=null,l.connection=null}),e?(l.upgrade=!0,this.emit("connect",l,n,Buffer.alloc(0))?this.emit("close"):n.destroy()):(n.on("data",f=>{!l._dumped&&!l.push(f)&&n.pause()}),n.once("end",()=>{this.aborted||l.push(null)}),this.emit("response",l)||l._dump())},"onResponse");n.once("response",s),n.once("headers",i=>this.emit("information",{statusCode:i[id]})),n.once("trailers",(i,u,a)=>{let{res:l}=this;if(l===null){s(i,u,a);return}l.trailers=i,l.rawTrailers=a}),n.once("close",()=>{let{aborted:i,res:u}=this;if(u){i&&(u.aborted=!0,u.emit("aborted"),u.destroy());let a=o(()=>{u.emit("close"),this.destroy(),this.emit("close")},"finish");u.readable?u.once("end",a):a();return}if(!this.destroyed){this.destroy(new Error("The HTTP/2 stream has been early terminated")),this.emit("close");return}this.destroy(),this.emit("close")}),this.socket=new Proxy(n,aC);for(let i of this[Fr])i();this[Fr].length=0,this.emit("socket",this.socket)},"onStream");if(!(un in this[me])&&!e&&(this[me][un]=this[Er].host),this[an])try{r(this[an].request(this[me]))}catch(n){this.destroy(n)}else{this.reusedSocket=!0;try{let n=this.agent.request(this[Er],this[No],this[me]);this[cn]=n,r(await n),this[cn]=!1}catch(n){this[cn]=!1,this.destroy(n)}}}get connection(){return this.socket}set connection(e){this.socket=e}getHeaderNames(){return Object.keys(this[me])}hasHeader(e){if(typeof e!="string")throw new ys("name","string",e);return!!this[me][e.toLowerCase()]}getHeader(e){if(typeof e!="string")throw new ys("name","string",e);return this[me][e.toLowerCase()]}get headersSent(){return this[gs]}removeHeader(e){if(typeof e!="string")throw new ys("name","string",e);if(this.headersSent)throw new sd("remove");delete this[me][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new sd("set");oC(e),uC(e,r);let n=e.toLowerCase();if(n==="connection"){if(r.toLowerCase()==="keep-alive")return;throw new Error(`Invalid 'connection' header: ${r}`)}n==="host"&&this.method==="CONNECT"?this[me][un]=r:this[me][n]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let n=o(()=>this._request.setTimeout(e,r),"applyTimeout");return this._request?n():this[Fr].push(n),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};ad.exports=Io});var ld=b((tO,cd)=>{"use strict";c();var lC=R("tls");cd.exports=(t={},e=lC.connect)=>new Promise((r,n)=>{let s=!1,i,u=o(async()=>{await l,i.off("timeout",a),i.off("error",n),t.resolveSocket?(r({alpnProtocol:i.alpnProtocol,socket:i,timeout:s}),s&&(await Promise.resolve(),i.emit("timeout"))):(i.destroy(),r({alpnProtocol:i.alpnProtocol,timeout:s}))},"callback"),a=o(async()=>{s=!0,u()},"onTimeout"),l=(async()=>{try{i=await e(t,u),i.on("error",n),i.once("timeout",a)}catch(f){n(f)}})()})});var hd=b((sO,fd)=>{"use strict";c();var{isIP:fC}=R("net"),hC=R("assert"),dC=o(t=>{if(t[0]==="["){let r=t.indexOf("]");return hC(r!==-1),t.slice(1,r)}let e=t.indexOf(":");return e===-1?t:t.slice(0,e)},"getHost");fd.exports=t=>{let e=dC(t);return fC(e)?"":e}});var Fd=b((uO,ln)=>{"use strict";c();var{URL:dd,urlToHttpOptions:Dd}=R("url"),pd=R("http"),jo=R("https"),DC=ld(),pC=Ao(),{Agent:mC,globalAgent:yC}=Ut(),gC=$o(),EC=hd(),md=To(),yd=new pC({maxSize:100}),FC=new Map,CC=o((t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let n=o(()=>{t.emit("free",e,r)},"onFree");e.on("free",n);let s=o(()=>{t.removeSocket(e,r)},"onClose");e.on("close",s);let i=o(()=>{let{freeSockets:a}=t;for(let l of Object.values(a))if(l.includes(e)){e.destroy();return}},"onTimeout");e.on("timeout",i);let u=o(()=>{t.removeSocket(e,r),e.off("close",s),e.off("free",n),e.off("timeout",i),e.off("agentRemove",u)},"onRemove");e.on("agentRemove",u),t.emit("free",e,r)},"installSocket"),gd=o((t,e=new Map,r=void 0)=>async n=>{let s=`${n.host}:${n.port}:${n.ALPNProtocols.sort()}`;if(!t.has(s)){if(e.has(s))return{alpnProtocol:(await e.get(s)).alpnProtocol};let{path:i}=n;n.path=n.socketPath;let u=DC(n,r);e.set(s,u);try{let a=await u;return t.set(s,a.alpnProtocol),e.delete(s),n.path=i,a}catch(a){throw e.delete(s),n.path=i,a}}return{alpnProtocol:t.get(s)}},"createResolveProtocol"),Ed=gd(yd,FC);ln.exports=async(t,e,r)=>{if(typeof t=="string"?t=Dd(new dd(t)):t instanceof dd?t=Dd(t):t={...t},typeof e=="function"||e===void 0?(r=e,e=t):e=Object.assign(t,e),e.ALPNProtocols=e.ALPNProtocols||["h2","http/1.1"],!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";let n=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||EC(e.headers&&e.headers.host||e.host),e.port=e.port||(n?443:80),e._defaultAgent=n?jo.globalAgent:pd.globalAgent;let s=e.resolveProtocol||Ed,{agent:i}=e;if(i!==void 0&&i!==!1&&i.constructor.name!=="Object")throw new Error("The `options.agent` can be only an object `http`, `https` or `http2` properties");if(n){e.resolveSocket=!0;let{socket:u,alpnProtocol:a,timeout:l}=await s(e);if(l){u&&u.destroy();let h=new Error(`Timed out resolving ALPN: ${e.timeout} ms`);throw h.code="ETIMEDOUT",h.ms=e.timeout,h}u&&e.createConnection&&(u.destroy(),u=void 0),delete e.resolveSocket;let f=a==="h2";if(i&&(i=f?i.http2:i.https,e.agent=i),i===void 0&&(i=f?yC:jo.globalAgent),u)if(i===!1)u.destroy();else{let h=(f?mC:jo.Agent).prototype.createConnection;i.createConnection===h?f?e._reuseSocket=u:CC(i,u,e):u.destroy()}if(f)return md(new gC(e,r))}else i&&(e.agent=i.http);return e.headers&&(e.headers={...e.headers},e.headers[":authority"]&&(e.headers.host||(e.headers.host=e.headers[":authority"]),delete e.headers[":authority"]),delete e.headers[":method"],delete e.headers[":scheme"],delete e.headers[":path"]),md(pd.request(e,r))};ln.exports.protocolCache=yd;ln.exports.resolveProtocol=Ed;ln.exports.createResolveProtocol=gd});var Mo=b((lO,Cd)=>{"use strict";c();var bC=R("stream"),wC=R("tls"),_C=new wC.TLSSocket(new bC.PassThrough)._handle._parentWrap.constructor;Cd.exports=_C});var Go=b((hO,bd)=>{"use strict";c();var Uo=class extends Error{static{o(this,"UnexpectedStatusCodeError")}constructor(e,r=""){super(`The proxy server rejected the request with status code ${e} (${r||"empty status message"})`),this.statusCode=e,this.statusMessage=r}};bd.exports=Uo});var _d=b((pO,wd)=>{"use strict";c();var xC=o((t,e,r)=>{if(!r.some(s=>typeof s==="string"?typeof e===s:e instanceof s)){let s=r.map(i=>typeof i=="string"?i:i.name);throw new TypeError(`Expected '${t}' to be a type of ${s.join(" or ")}, got ${typeof e}`)}},"checkType");wd.exports=xC});var qo=b((gO,Sd)=>{"use strict";c();var{URL:xd}=R("url"),Es=_d();Sd.exports=(t,e)=>{Es("proxyOptions",e,["object"]),Es("proxyOptions.headers",e.headers,["object","undefined"]),Es("proxyOptions.raw",e.raw,["boolean","undefined"]),Es("proxyOptions.url",e.url,[xd,"string"]);let r=new xd(e.url);t.proxyOptions={raw:!0,...e,headers:{...e.headers},url:r}}});var Fs=b((FO,vd)=>{"use strict";c();vd.exports=t=>{let{username:e,password:r}=t.proxyOptions.url;if(e||r){let n=`${e}:${r}`,s=`Basic ${Buffer.from(n).toString("base64")}`;return{"proxy-authorization":s,authorization:s}}return{}}});var Pd=b((bO,Od)=>{"use strict";c();var SC=R("tls"),vC=R("http"),Ad=R("https"),AC=Mo(),{globalAgent:TC}=Ut(),LC=Go(),Td=qo(),OC=Fs(),Ld=o((t,e,r)=>{(async()=>{try{let{proxyOptions:n}=t,{url:s,headers:i,raw:u}=n,a=await TC.request(s,n,{...OC(t),...i,":method":"CONNECT",":authority":`${e.host}:${e.port}`});a.once("error",r),a.once("response",l=>{let f=l[":status"];if(f!==200){r(new LC(f,""));return}let h=t instanceof Ad.Agent;if(u&&h){e.socket=a;let m=SC.connect(e);m.once("close",()=>{a.destroy()}),r(null,m);return}let g=new AC(a);g.encrypted=!1,g._handle.getpeername=m=>{m.family=void 0,m.address=void 0,m.port=void 0},r(null,g)})}catch(n){r(n)}})()},"createConnection"),Ho=class extends vC.Agent{static{o(this,"HttpOverHttp2")}constructor(e){super(e),Td(this,e.proxyOptions)}createConnection(e,r){Ld(this,e,r)}},zo=class extends Ad.Agent{static{o(this,"HttpsOverHttp2")}constructor(e){super(e),Td(this,e.proxyOptions)}createConnection(e,r){Ld(this,e,r)}};Od.exports={HttpOverHttp2:Ho,HttpsOverHttp2:zo}});var Vo=b((xO,kd)=>{"use strict";c();var{Agent:PC}=Ut(),kC=Mo(),RC=Go(),BC=qo(),Wo=class extends PC{static{o(this,"Http2OverHttpX")}constructor(e){super(e),BC(this,e.proxyOptions)}async createConnection(e,r){let n=`${e.hostname}:${e.port||443}`,[s,i,u]=await this._getProxyStream(n);if(i!==200)throw new RC(i,u);if(this.proxyOptions.raw)r.socket=s;else{let a=new kC(s);return a.encrypted=!1,a._handle.getpeername=l=>{l.family=void 0,l.address=void 0,l.port=void 0},a}return super.createConnection(e,r)}};kd.exports=Wo});var Bd=b((AO,Rd)=>{"use strict";c();var{globalAgent:NC}=Ut(),IC=Vo(),$C=Fs(),jC=o(t=>new Promise((e,r)=>{t.once("error",r),t.once("response",n=>{t.off("error",r),e(n[":status"])})}),"getStatusCode"),Zo=class extends IC{static{o(this,"Http2OverHttp2")}async _getProxyStream(e){let{proxyOptions:r}=this,n={...$C(this),...r.headers,":method":"CONNECT",":authority":e},s=await NC.request(r.url,r,n),i=await jC(s);return[s,i,""]}};Rd.exports=Zo});var Id=b((OO,Nd)=>{"use strict";c();var MC=R("http"),UC=R("https"),GC=Vo(),qC=Fs(),HC=o(t=>new Promise((e,r)=>{let n=o((s,i,u)=>{i.unshift(u),t.off("error",r),e([i,s.statusCode,s.statusMessage])},"onConnect");t.once("error",r),t.once("connect",n)}),"getStream"),Cs=class extends GC{static{o(this,"Http2OverHttp")}async _getProxyStream(e){let{proxyOptions:r}=this,{url:n,headers:s}=this.proxyOptions,u=(n.protocol==="https:"?UC:MC).request({...r,hostname:n.hostname,port:n.port,path:e,headers:{...qC(this),...s,host:e},method:"CONNECT"}).end();return HC(u)}};Nd.exports={Http2OverHttp:Cs,Http2OverHttps:Cs}});var jd=b((RO,$d)=>{"use strict";c();var zC=R("http2"),{Agent:WC,globalAgent:VC}=Ut(),Yo=$o(),ZC=Po(),YC=Fd(),{HttpOverHttp2:JC,HttpsOverHttp2:KC}=Pd(),XC=Bd(),{Http2OverHttp:QC,Http2OverHttps:eb}=Id(),tb=ko(),rb=Ro(),nb=o((t,e,r)=>new Yo(t,e,r),"request"),sb=o((t,e,r)=>{let n=new Yo(t,e,r);return n.end(),n},"get");$d.exports={...zC,ClientRequest:Yo,IncomingMessage:ZC,Agent:WC,globalAgent:VC,request:nb,get:sb,auto:YC,proxies:{HttpOverHttp2:JC,HttpsOverHttp2:KC,Http2OverHttp2:XC,Http2OverHttp:QC,Http2OverHttps:eb},validateHeaderName:tb,validateHeaderValue:rb}});c();c();var su=o((t=0)=>e=>`\x1B[${e+t}m`,"wrapAnsi16"),iu=o((t=0)=>e=>`\x1B[${38+t};5;${e}m`,"wrapAnsi256"),ou=o((t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,"wrapAnsi16m"),Q={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Mb=Object.keys(Q.modifier),nD=Object.keys(Q.color),sD=Object.keys(Q.bgColor),Ub=[...nD,...sD];function iD(){let t=new Map;for(let[e,r]of Object.entries(Q)){for(let[n,s]of Object.entries(r))Q[n]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[n]=Q[n],t.set(s[0],s[1]);Object.defineProperty(Q,e,{value:r,enumerable:!1})}return Object.defineProperty(Q,"codes",{value:t,enumerable:!1}),Q.color.close="\x1B[39m",Q.bgColor.close="\x1B[49m",Q.color.ansi=su(),Q.color.ansi256=iu(),Q.color.ansi16m=ou(),Q.bgColor.ansi=su(10),Q.bgColor.ansi256=iu(10),Q.bgColor.ansi16m=ou(10),Object.defineProperties(Q,{rgbToAnsi256:{value(e,r,n){return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(i=>i+i).join(""));let s=Number.parseInt(n,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:o(e=>Q.rgbToAnsi256(...Q.hexToRgb(e)),"value"),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,s;if(e>=232)r=((e-232)*10+8)/255,n=r,s=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,s=a%6/5}let i=Math.max(r,n,s)*2;if(i===0)return 30;let u=30+(Math.round(s)<<2|Math.round(n)<<1|Math.round(r));return i===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:o((e,r,n)=>Q.ansi256ToAnsi(Q.rgbToAnsi256(e,r,n)),"value"),enumerable:!1},hexToAnsi:{value:o(e=>Q.ansi256ToAnsi(Q.hexToAnsi256(e)),"value"),enumerable:!1}}),Q}o(iD,"assembleStyles");var oD=iD(),Ne=oD;c();import As from"node:process";import uD from"node:os";import uu from"node:tty";function Oe(t,e=globalThis.Deno?globalThis.Deno.args:As.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),s=e.indexOf("--");return n!==-1&&(s===-1||n<s)}o(Oe,"hasFlag");var{env:ie}=As,hn;Oe("no-color")||Oe("no-colors")||Oe("color=false")||Oe("color=never")?hn=0:(Oe("color")||Oe("colors")||Oe("color=true")||Oe("color=always"))&&(hn=1);function aD(){if("FORCE_COLOR"in ie)return ie.FORCE_COLOR==="true"?1:ie.FORCE_COLOR==="false"?0:ie.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ie.FORCE_COLOR,10),3)}o(aD,"envForceColor");function cD(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}o(cD,"translateLevel");function lD(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=aD();n!==void 0&&(hn=n);let s=r?hn:n;if(s===0)return 0;if(r){if(Oe("color=16m")||Oe("color=full")||Oe("color=truecolor"))return 3;if(Oe("color=256"))return 2}if("TF_BUILD"in ie&&"AGENT_NAME"in ie)return 1;if(t&&!e&&s===void 0)return 0;let i=s||0;if(ie.TERM==="dumb")return i;if(As.platform==="win32"){let u=uD.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in ie)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(u=>u in ie)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in ie)||ie.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in ie)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ie.TEAMCITY_VERSION)?1:0;if(ie.COLORTERM==="truecolor"||ie.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in ie){let u=Number.parseInt((ie.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ie.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ie.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ie.TERM)||"COLORTERM"in ie?1:i}o(lD,"_supportsColor");function au(t,e={}){let r=lD(t,{streamIsTTY:t&&t.isTTY,...e});return cD(r)}o(au,"createSupportsColor");var fD={stdout:au({isTTY:uu.isatty(1)}),stderr:au({isTTY:uu.isatty(2)})},cu=fD;c();function lu(t,e,r){let n=t.indexOf(e);if(n===-1)return t;let s=e.length,i=0,u="";do u+=t.slice(i,n)+e+r,i=n+s,n=t.indexOf(e,i);while(n!==-1);return u+=t.slice(i),u}o(lu,"stringReplaceAll");function fu(t,e,r,n){let s=0,i="";do{let u=t[n-1]==="\r";i+=t.slice(s,u?n-1:n)+e+(u?`\r
|
|
15
15
|
`:`
|
|
16
16
|
`)+r,s=n+1,n=t.indexOf(`
|
|
17
17
|
`,s)}while(n!==-1);return i+=t.slice(s),i}o(fu,"stringEncaseCRLFWithFirstIndex");var{stdout:hu,stderr:du}=cu,Ts=Symbol("GENERATOR"),Ht=Symbol("STYLER"),wr=Symbol("IS_EMPTY"),Du=["ansi","ansi","ansi256","ansi16m"],zt=Object.create(null),hD=o((t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=hu?hu.level:0;t.level=e.level===void 0?r:e.level},"applyOptions"),pu=class{static{o(this,"Chalk")}constructor(e){return mu(e)}},mu=o(t=>{let e=o((...r)=>r.join(" "),"chalk");return hD(e,t),Object.setPrototypeOf(e,_r.prototype),e},"chalkFactory");function _r(t){return mu(t)}o(_r,"createChalk");Object.setPrototypeOf(_r.prototype,Function.prototype);for(let[t,e]of Object.entries(Ne))zt[t]={get(){let r=dn(this,Os(e.open,e.close,this[Ht]),this[wr]);return Object.defineProperty(this,t,{value:r}),r}};zt.visible={get(){let t=dn(this,this[Ht],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Ls=o((t,e,r,...n)=>t==="rgb"?e==="ansi16m"?Ne[r].ansi16m(...n):e==="ansi256"?Ne[r].ansi256(Ne.rgbToAnsi256(...n)):Ne[r].ansi(Ne.rgbToAnsi(...n)):t==="hex"?Ls("rgb",e,r,...Ne.hexToRgb(...n)):Ne[r][t](...n),"getModelAnsi"),dD=["rgb","hex","ansi256"];for(let t of dD){zt[t]={get(){let{level:r}=this;return function(...n){let s=Os(Ls(t,Du[r],"color",...n),Ne.color.close,this[Ht]);return dn(this,s,this[wr])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);zt[e]={get(){let{level:r}=this;return function(...n){let s=Os(Ls(t,Du[r],"bgColor",...n),Ne.bgColor.close,this[Ht]);return dn(this,s,this[wr])}}}}var DD=Object.defineProperties(()=>{},{...zt,level:{enumerable:!0,get(){return this[Ts].level},set(t){this[Ts].level=t}}}),Os=o((t,e,r)=>{let n,s;return r===void 0?(n=t,s=e):(n=r.openAll+t,s=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:s,parent:r}},"createStyler"),dn=o((t,e,r)=>{let n=o((...s)=>pD(n,s.length===1?""+s[0]:s.join(" ")),"builder");return Object.setPrototypeOf(n,DD),n[Ts]=t,n[Ht]=e,n[wr]=r,n},"createBuilder"),pD=o((t,e)=>{if(t.level<=0||!e)return t[wr]?"":e;let r=t[Ht];if(r===void 0)return e;let{openAll:n,closeAll:s}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=lu(e,r.close,r.open),r=r.parent;let i=e.indexOf(`
|
|
18
|
-
`);return i!==-1&&(e=fu(e,s,n,i)),n+e+s},"applyStyle");Object.defineProperties(_r.prototype,zt);var mD=_r(),yu=_r({level:du?du.level:0});var We=mD;c();import yD from"node:process";var xr={get value(){return yD.env.GGT_ENV||"production"},get productionLike(){return!this.developmentOrTestLike},get developmentLike(){return this.value.startsWith("development")},get testLike(){return this.value.startsWith("test")},get developmentOrTestLike(){return this.developmentLike||this.testLike}};c();c();var G;(function(t){t.assertEqual=s=>s;function e(s){}o(e,"assertIs"),t.assertIs=e;function r(s){throw new Error}o(r,"assertNever"),t.assertNever=r,t.arrayToEnum=s=>{let i={};for(let u of s)i[u]=u;return i},t.getValidEnumValues=s=>{let i=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),u={};for(let a of i)u[a]=s[a];return t.objectValues(u)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let u in s)Object.prototype.hasOwnProperty.call(s,u)&&i.push(u);return i},t.find=(s,i)=>{for(let u of s)if(i(u))return u},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(u=>typeof u=="string"?`'${u}'`:u).join(i)}o(n,"joinValues"),t.joinValues=n,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(G||(G={}));var ks;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(ks||(ks={}));var A=G.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ze=o(t=>{switch(typeof t){case"undefined":return A.undefined;case"string":return A.string;case"number":return isNaN(t)?A.nan:A.number;case"boolean":return A.boolean;case"function":return A.function;case"bigint":return A.bigint;case"symbol":return A.symbol;case"object":return Array.isArray(t)?A.array:t===null?A.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?A.promise:typeof Map<"u"&&t instanceof Map?A.map:typeof Set<"u"&&t instanceof Set?A.set:typeof Date<"u"&&t instanceof Date?A.date:A.object;default:return A.unknown}},"getParsedType"),_=G.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),gD=o(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),Ae=class t extends Error{static{o(this,"ZodError")}get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(i){return i.message},n={_errors:[]},s=o(i=>{for(let u of i.issues)if(u.code==="invalid_union")u.unionErrors.map(s);else if(u.code==="invalid_return_type")s(u.returnTypeError);else if(u.code==="invalid_arguments")s(u.argumentsError);else if(u.path.length===0)n._errors.push(r(u));else{let a=n,l=0;for(;l<u.path.length;){let f=u.path[l];l===u.path.length-1?(a[f]=a[f]||{_errors:[]},a[f]._errors.push(r(u))):a[f]=a[f]||{_errors:[]},a=a[f],l++}}},"processError");return s(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,G.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Ae.create=t=>new Ae(t);var Zt=o((t,e)=>{let r;switch(t.code){case _.invalid_type:t.received===A.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case _.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,G.jsonStringifyReplacer)}`;break;case _.unrecognized_keys:r=`Unrecognized key(s) in object: ${G.joinValues(t.keys,", ")}`;break;case _.invalid_union:r="Invalid input";break;case _.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${G.joinValues(t.options)}`;break;case _.invalid_enum_value:r=`Invalid enum value. Expected ${G.joinValues(t.options)}, received '${t.received}'`;break;case _.invalid_arguments:r="Invalid function arguments";break;case _.invalid_return_type:r="Invalid function return type";break;case _.invalid_date:r="Invalid date";break;case _.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:G.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case _.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case _.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case _.custom:r="Invalid input";break;case _.invalid_intersection_types:r="Intersection results could not be merged";break;case _.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case _.not_finite:r="Number must be finite";break;default:r=e.defaultError,G.assertNever(t)}return{message:r}},"errorMap"),Cu=Zt;function ED(t){Cu=t}o(ED,"setErrorMap");function Dn(){return Cu}o(Dn,"getErrorMap");var pn=o(t=>{let{data:e,path:r,errorMaps:n,issueData:s}=t,i=[...r,...s.path||[]],u={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="",l=n.filter(f=>!!f).slice().reverse();for(let f of l)a=f(u,{data:e,defaultError:a}).message;return{...s,path:i,message:a}},"makeIssue"),FD=[];function v(t,e){let r=Dn(),n=pn({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Zt?void 0:Zt].filter(s=>!!s)});t.common.issues.push(n)}o(v,"addIssueToContext");var ye=class t{static{o(this,"ParseStatus")}constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let s of r){if(s.status==="aborted")return I;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let s of r){let i=await s.key,u=await s.value;n.push({key:i,value:u})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let s of r){let{key:i,value:u}=s;if(i.status==="aborted"||u.status==="aborted")return I;i.status==="dirty"&&e.dirty(),u.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof u.value<"u"||s.alwaysSet)&&(n[i.value]=u.value)}return{status:e.value,value:n}}},I=Object.freeze({status:"aborted"}),Vt=o(t=>({status:"dirty",value:t}),"DIRTY"),Ee=o(t=>({status:"valid",value:t}),"OK"),Rs=o(t=>t.status==="aborted","isAborted"),Bs=o(t=>t.status==="dirty","isDirty"),yt=o(t=>t.status==="valid","isValid"),Ar=o(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync");function mn(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}o(mn,"__classPrivateFieldGet");function bu(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r}o(bu,"__classPrivateFieldSet");var P;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(P||(P={}));var Sr,vr,ke=class{static{o(this,"ParseInputLazyPath")}constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},gu=o((t,e)=>{if(yt(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Ae(t.common.issues);return this._error=r,this._error}}},"handleResult");function j(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:o((u,a)=>{var l,f;let{message:h}=t;return u.code==="invalid_enum_value"?{message:h??a.defaultError}:typeof a.data>"u"?{message:(l=h??n)!==null&&l!==void 0?l:a.defaultError}:u.code!=="invalid_type"?{message:a.defaultError}:{message:(f=h??r)!==null&&f!==void 0?f:a.defaultError}},"customMap"),description:s}}o(j,"processCreateParams");var M=class{static{o(this,"ZodType")}get description(){return this._def.description}_getType(e){return Ze(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Ze(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ye,ctx:{common:e.parent.common,data:e.data,parsedType:Ze(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Ar(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let s={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ze(e)},i=this._parseSync({data:e,path:s.path,parent:s});return gu(s,i)}"~validate"(e){var r,n;let s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ze(e)};if(!this["~standard"].async)try{let i=this._parseSync({data:e,path:[],parent:s});return yt(i)?{value:i.value}:{issues:s.common.issues}}catch(i){!((n=(r=i?.message)===null||r===void 0?void 0:r.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:s}).then(i=>yt(i)?{value:i.value}:{issues:s.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ze(e)},s=this._parse({data:e,path:n.path,parent:n}),i=await(Ar(s)?s:Promise.resolve(s));return gu(n,i)}refine(e,r){let n=o(s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r,"getIssueProperties");return this._refinement((s,i)=>{let u=e(s),a=o(()=>i.addIssue({code:_.custom,...n(s)}),"setError");return typeof Promise<"u"&&u instanceof Promise?u.then(l=>l?!0:(a(),!1)):u?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new Te({schema:this,typeName:N.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:o(r=>this["~validate"](r),"validate")}}optional(){return Pe.create(this,this._def)}nullable(){return qe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Je.create(this)}promise(){return nt.create(this,this._def)}or(e){return _t.create([this,e],this._def)}and(e){return xt.create(this,e,this._def)}transform(e){return new Te({...j(this._def),schema:this,typeName:N.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Lt({...j(this._def),innerType:this,defaultValue:r,typeName:N.ZodDefault})}brand(){return new Tr({typeName:N.ZodBranded,type:this,...j(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Ot({...j(this._def),innerType:this,catchValue:r,typeName:N.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Lr.create(this,e)}readonly(){return Pt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},CD=/^c[^\s-]{8,}$/i,bD=/^[0-9a-z]+$/,wD=/^[0-9A-HJKMNP-TV-Z]{26}$/i,_D=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,xD=/^[a-z0-9_-]{21}$/i,SD=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vD=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,AD=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,TD="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ps,LD=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,OD=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,PD=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,kD=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,RD=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,BD=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wu="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ND=new RegExp(`^${wu}$`);function _u(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}o(_u,"timeRegexSource");function ID(t){return new RegExp(`^${_u(t)}$`)}o(ID,"timeRegex");function xu(t){let e=`${wu}T${_u(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}o(xu,"datetimeRegex");function $D(t,e){return!!((e==="v4"||!e)&&LD.test(t)||(e==="v6"||!e)&&PD.test(t))}o($D,"isValidIP");function jD(t,e){if(!SD.test(t))return!1;try{let[r]=t.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||!s.typ||!s.alg||e&&s.alg!==e)}catch{return!1}}o(jD,"isValidJWT");function MD(t,e){return!!((e==="v4"||!e)&&OD.test(t)||(e==="v6"||!e)&&kD.test(t))}o(MD,"isValidCidr");var tt=class t extends M{static{o(this,"ZodString")}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==A.string){let i=this._getOrReturnCtx(e);return v(i,{code:_.invalid_type,expected:A.string,received:i.parsedType}),I}let n=new ye,s;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),v(s,{code:_.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),v(s,{code:_.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let u=e.data.length>i.value,a=e.data.length<i.value;(u||a)&&(s=this._getOrReturnCtx(e,s),u?v(s,{code:_.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&v(s,{code:_.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")AD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"email",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Ps||(Ps=new RegExp(TD,"u")),Ps.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"emoji",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")_D.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"uuid",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")xD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"nanoid",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")CD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"cuid",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")bD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"cuid2",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")wD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"ulid",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),v(s,{validation:"url",code:_.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"regex",code:_.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),v(s,{code:_.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),v(s,{code:_.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),v(s,{code:_.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?xu(i).test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{code:_.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?ND.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{code:_.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?ID(i).test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{code:_.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?vD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"duration",code:_.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?$D(e.data,i.version)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"ip",code:_.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?jD(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"jwt",code:_.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?MD(e.data,i.version)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"cidr",code:_.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?RD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"base64",code:_.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?BD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"base64url",code:_.invalid_string,message:i.message}),n.dirty()):G.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:_.invalid_string,...P.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...P.errToObj(e)})}url(e){return this._addCheck({kind:"url",...P.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...P.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...P.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...P.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...P.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...P.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...P.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...P.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...P.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...P.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...P.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...P.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...P.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...P.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...P.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...P.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...P.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...P.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...P.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...P.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...P.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...P.errToObj(r)})}nonempty(e){return this.min(1,P.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};tt.create=t=>{var e;return new tt({checks:[],typeName:N.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...j(t)})};function UD(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,i=parseInt(t.toFixed(s).replace(".","")),u=parseInt(e.toFixed(s).replace(".",""));return i%u/Math.pow(10,s)}o(UD,"floatSafeRemainder");var gt=class t extends M{static{o(this,"ZodNumber")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==A.number){let i=this._getOrReturnCtx(e);return v(i,{code:_.invalid_type,expected:A.number,received:i.parsedType}),I}let n,s=new ye;for(let i of this._def.checks)i.kind==="int"?G.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{code:_.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),v(n,{code:_.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),v(n,{code:_.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?UD(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),v(n,{code:_.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{code:_.not_finite,message:i.message}),s.dirty()):G.assertNever(i);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,P.toString(r))}gt(e,r){return this.setLimit("min",e,!1,P.toString(r))}lte(e,r){return this.setLimit("max",e,!0,P.toString(r))}lt(e,r){return this.setLimit("max",e,!1,P.toString(r))}setLimit(e,r,n,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:P.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:P.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:P.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:P.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:P.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:P.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:P.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:P.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:P.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:P.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&G.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};gt.create=t=>new gt({checks:[],typeName:N.ZodNumber,coerce:t?.coerce||!1,...j(t)});var Et=class t extends M{static{o(this,"ZodBigInt")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==A.bigint)return this._getInvalidInput(e);let n,s=new ye;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),v(n,{code:_.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),v(n,{code:_.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),v(n,{code:_.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):G.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return v(r,{code:_.invalid_type,expected:A.bigint,received:r.parsedType}),I}gte(e,r){return this.setLimit("min",e,!0,P.toString(r))}gt(e,r){return this.setLimit("min",e,!1,P.toString(r))}lte(e,r){return this.setLimit("max",e,!0,P.toString(r))}lt(e,r){return this.setLimit("max",e,!1,P.toString(r))}setLimit(e,r,n,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:P.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:P.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:P.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:P.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:P.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:P.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Et.create=t=>{var e;return new Et({checks:[],typeName:N.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...j(t)})};var Ft=class extends M{static{o(this,"ZodBoolean")}_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==A.boolean){let n=this._getOrReturnCtx(e);return v(n,{code:_.invalid_type,expected:A.boolean,received:n.parsedType}),I}return Ee(e.data)}};Ft.create=t=>new Ft({typeName:N.ZodBoolean,coerce:t?.coerce||!1,...j(t)});var Ct=class t extends M{static{o(this,"ZodDate")}_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==A.date){let i=this._getOrReturnCtx(e);return v(i,{code:_.invalid_type,expected:A.date,received:i.parsedType}),I}if(isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return v(i,{code:_.invalid_date}),I}let n=new ye,s;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),v(s,{code:_.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),v(s,{code:_.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):G.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:P.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:P.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Ct.create=t=>new Ct({checks:[],coerce:t?.coerce||!1,typeName:N.ZodDate,...j(t)});var Yt=class extends M{static{o(this,"ZodSymbol")}_parse(e){if(this._getType(e)!==A.symbol){let n=this._getOrReturnCtx(e);return v(n,{code:_.invalid_type,expected:A.symbol,received:n.parsedType}),I}return Ee(e.data)}};Yt.create=t=>new Yt({typeName:N.ZodSymbol,...j(t)});var bt=class extends M{static{o(this,"ZodUndefined")}_parse(e){if(this._getType(e)!==A.undefined){let n=this._getOrReturnCtx(e);return v(n,{code:_.invalid_type,expected:A.undefined,received:n.parsedType}),I}return Ee(e.data)}};bt.create=t=>new bt({typeName:N.ZodUndefined,...j(t)});var wt=class extends M{static{o(this,"ZodNull")}_parse(e){if(this._getType(e)!==A.null){let n=this._getOrReturnCtx(e);return v(n,{code:_.invalid_type,expected:A.null,received:n.parsedType}),I}return Ee(e.data)}};wt.create=t=>new wt({typeName:N.ZodNull,...j(t)});var rt=class extends M{static{o(this,"ZodAny")}constructor(){super(...arguments),this._any=!0}_parse(e){return Ee(e.data)}};rt.create=t=>new rt({typeName:N.ZodAny,...j(t)});var Ye=class extends M{static{o(this,"ZodUnknown")}constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ee(e.data)}};Ye.create=t=>new Ye({typeName:N.ZodUnknown,...j(t)});var Ie=class extends M{static{o(this,"ZodNever")}_parse(e){let r=this._getOrReturnCtx(e);return v(r,{code:_.invalid_type,expected:A.never,received:r.parsedType}),I}};Ie.create=t=>new Ie({typeName:N.ZodNever,...j(t)});var Jt=class extends M{static{o(this,"ZodVoid")}_parse(e){if(this._getType(e)!==A.undefined){let n=this._getOrReturnCtx(e);return v(n,{code:_.invalid_type,expected:A.void,received:n.parsedType}),I}return Ee(e.data)}};Jt.create=t=>new Jt({typeName:N.ZodVoid,...j(t)});var Je=class t extends M{static{o(this,"ZodArray")}_parse(e){let{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==A.array)return v(r,{code:_.invalid_type,expected:A.array,received:r.parsedType}),I;if(s.exactLength!==null){let u=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(u||a)&&(v(r,{code:u?_.too_big:_.too_small,minimum:a?s.exactLength.value:void 0,maximum:u?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(v(r,{code:_.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(v(r,{code:_.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((u,a)=>s.type._parseAsync(new ke(r,u,r.path,a)))).then(u=>ye.mergeArray(n,u));let i=[...r.data].map((u,a)=>s.type._parseSync(new ke(r,u,r.path,a)));return ye.mergeArray(n,i)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:P.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:P.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:P.toString(r)}})}nonempty(e){return this.min(1,e)}};Je.create=(t,e)=>new Je({type:t,minLength:null,maxLength:null,exactLength:null,typeName:N.ZodArray,...j(e)});function Wt(t){if(t instanceof ve){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Pe.create(Wt(n))}return new ve({...t._def,shape:o(()=>e,"shape")})}else return t instanceof Je?new Je({...t._def,type:Wt(t.element)}):t instanceof Pe?Pe.create(Wt(t.unwrap())):t instanceof qe?qe.create(Wt(t.unwrap())):t instanceof Ge?Ge.create(t.items.map(e=>Wt(e))):t}o(Wt,"deepPartialify");var ve=class t extends M{static{o(this,"ZodObject")}constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=G.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==A.object){let f=this._getOrReturnCtx(e);return v(f,{code:_.invalid_type,expected:A.object,received:f.parsedType}),I}let{status:n,ctx:s}=this._processInputParams(e),{shape:i,keys:u}=this._getCached(),a=[];if(!(this._def.catchall instanceof Ie&&this._def.unknownKeys==="strip"))for(let f in s.data)u.includes(f)||a.push(f);let l=[];for(let f of u){let h=i[f],g=s.data[f];l.push({key:{status:"valid",value:f},value:h._parse(new ke(s,g,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof Ie){let f=this._def.unknownKeys;if(f==="passthrough")for(let h of a)l.push({key:{status:"valid",value:h},value:{status:"valid",value:s.data[h]}});else if(f==="strict")a.length>0&&(v(s,{code:_.unrecognized_keys,keys:a}),n.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let h of a){let g=s.data[h];l.push({key:{status:"valid",value:h},value:f._parse(new ke(s,g,s.path,h)),alwaysSet:h in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let f=[];for(let h of l){let g=await h.key,m=await h.value;f.push({key:g,value:m,alwaysSet:h.alwaysSet})}return f}).then(f=>ye.mergeObjectSync(n,f)):ye.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return P.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:o((r,n)=>{var s,i,u,a;let l=(u=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,r,n).message)!==null&&u!==void 0?u:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=P.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}},"errorMap")}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:o(()=>({...this._def.shape(),...e}),"shape")})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:o(()=>({...this._def.shape(),...e._def.shape()}),"shape"),typeName:N.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return G.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:o(()=>r,"shape")})}omit(e){let r={};return G.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:o(()=>r,"shape")})}deepPartial(){return Wt(this)}partial(e){let r={};return G.objectKeys(this.shape).forEach(n=>{let s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}),new t({...this._def,shape:o(()=>r,"shape")})}required(e){let r={};return G.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Pe;)i=i._def.innerType;r[n]=i}}),new t({...this._def,shape:o(()=>r,"shape")})}keyof(){return Su(G.objectKeys(this.shape))}};ve.create=(t,e)=>new ve({shape:o(()=>t,"shape"),unknownKeys:"strip",catchall:Ie.create(),typeName:N.ZodObject,...j(e)});ve.strictCreate=(t,e)=>new ve({shape:o(()=>t,"shape"),unknownKeys:"strict",catchall:Ie.create(),typeName:N.ZodObject,...j(e)});ve.lazycreate=(t,e)=>new ve({shape:t,unknownKeys:"strip",catchall:Ie.create(),typeName:N.ZodObject,...j(e)});var _t=class extends M{static{o(this,"ZodUnion")}_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function s(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let u=i.map(a=>new Ae(a.ctx.common.issues));return v(r,{code:_.invalid_union,unionErrors:u}),I}if(o(s,"handleResults"),r.common.async)return Promise.all(n.map(async i=>{let u={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:u}),ctx:u}})).then(s);{let i,u=[];for(let l of n){let f={...r,common:{...r.common,issues:[]},parent:null},h=l._parseSync({data:r.data,path:r.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:f}),f.common.issues.length&&u.push(f.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=u.map(l=>new Ae(l));return v(r,{code:_.invalid_union,unionErrors:a}),I}}get options(){return this._def.options}};_t.create=(t,e)=>new _t({options:t,typeName:N.ZodUnion,...j(e)});var Ve=o(t=>t instanceof St?Ve(t.schema):t instanceof Te?Ve(t.innerType()):t instanceof vt?[t.value]:t instanceof At?t.options:t instanceof Tt?G.objectValues(t.enum):t instanceof Lt?Ve(t._def.innerType):t instanceof bt?[void 0]:t instanceof wt?[null]:t instanceof Pe?[void 0,...Ve(t.unwrap())]:t instanceof qe?[null,...Ve(t.unwrap())]:t instanceof Tr||t instanceof Pt?Ve(t.unwrap()):t instanceof Ot?Ve(t._def.innerType):[],"getDiscriminator"),yn=class t extends M{static{o(this,"ZodDiscriminatedUnion")}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==A.object)return v(r,{code:_.invalid_type,expected:A.object,received:r.parsedType}),I;let n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(v(r,{code:_.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),I)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let s=new Map;for(let i of r){let u=Ve(i.shape[e]);if(!u.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of u){if(s.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);s.set(a,i)}}return new t({typeName:N.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:s,...j(n)})}};function Ns(t,e){let r=Ze(t),n=Ze(e);if(t===e)return{valid:!0,data:t};if(r===A.object&&n===A.object){let s=G.objectKeys(e),i=G.objectKeys(t).filter(a=>s.indexOf(a)!==-1),u={...t,...e};for(let a of i){let l=Ns(t[a],e[a]);if(!l.valid)return{valid:!1};u[a]=l.data}return{valid:!0,data:u}}else if(r===A.array&&n===A.array){if(t.length!==e.length)return{valid:!1};let s=[];for(let i=0;i<t.length;i++){let u=t[i],a=e[i],l=Ns(u,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return r===A.date&&n===A.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}o(Ns,"mergeValues");var xt=class extends M{static{o(this,"ZodIntersection")}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),s=o((i,u)=>{if(Rs(i)||Rs(u))return I;let a=Ns(i.value,u.value);return a.valid?((Bs(i)||Bs(u))&&r.dirty(),{status:r.value,value:a.data}):(v(n,{code:_.invalid_intersection_types}),I)},"handleParsed");return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,u])=>s(i,u)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};xt.create=(t,e,r)=>new xt({left:t,right:e,typeName:N.ZodIntersection,...j(r)});var Ge=class t extends M{static{o(this,"ZodTuple")}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==A.array)return v(n,{code:_.invalid_type,expected:A.array,received:n.parsedType}),I;if(n.data.length<this._def.items.length)return v(n,{code:_.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),I;!this._def.rest&&n.data.length>this._def.items.length&&(v(n,{code:_.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((u,a)=>{let l=this._def.items[a]||this._def.rest;return l?l._parse(new ke(n,u,n.path,a)):null}).filter(u=>!!u);return n.common.async?Promise.all(i).then(u=>ye.mergeArray(r,u)):ye.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Ge.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ge({items:t,typeName:N.ZodTuple,rest:null,...j(e)})};var gn=class t extends M{static{o(this,"ZodRecord")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==A.object)return v(n,{code:_.invalid_type,expected:A.object,received:n.parsedType}),I;let s=[],i=this._def.keyType,u=this._def.valueType;for(let a in n.data)s.push({key:i._parse(new ke(n,a,n.path,a)),value:u._parse(new ke(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?ye.mergeObjectAsync(r,s):ye.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof M?new t({keyType:e,valueType:r,typeName:N.ZodRecord,...j(n)}):new t({keyType:tt.create(),valueType:e,typeName:N.ZodRecord,...j(r)})}},Kt=class extends M{static{o(this,"ZodMap")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==A.map)return v(n,{code:_.invalid_type,expected:A.map,received:n.parsedType}),I;let s=this._def.keyType,i=this._def.valueType,u=[...n.data.entries()].map(([a,l],f)=>({key:s._parse(new ke(n,a,n.path,[f,"key"])),value:i._parse(new ke(n,l,n.path,[f,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let l of u){let f=await l.key,h=await l.value;if(f.status==="aborted"||h.status==="aborted")return I;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),a.set(f.value,h.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let l of u){let f=l.key,h=l.value;if(f.status==="aborted"||h.status==="aborted")return I;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),a.set(f.value,h.value)}return{status:r.value,value:a}}}};Kt.create=(t,e,r)=>new Kt({valueType:e,keyType:t,typeName:N.ZodMap,...j(r)});var Xt=class t extends M{static{o(this,"ZodSet")}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==A.set)return v(n,{code:_.invalid_type,expected:A.set,received:n.parsedType}),I;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(v(n,{code:_.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(v(n,{code:_.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let i=this._def.valueType;function u(l){let f=new Set;for(let h of l){if(h.status==="aborted")return I;h.status==="dirty"&&r.dirty(),f.add(h.value)}return{status:r.value,value:f}}o(u,"finalizeSet");let a=[...n.data.values()].map((l,f)=>i._parse(new ke(n,l,n.path,f)));return n.common.async?Promise.all(a).then(l=>u(l)):u(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:P.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:P.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Xt.create=(t,e)=>new Xt({valueType:t,minSize:null,maxSize:null,typeName:N.ZodSet,...j(e)});var En=class t extends M{static{o(this,"ZodFunction")}constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==A.function)return v(r,{code:_.invalid_type,expected:A.function,received:r.parsedType}),I;function n(a,l){return pn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Dn(),Zt].filter(f=>!!f),issueData:{code:_.invalid_arguments,argumentsError:l}})}o(n,"makeArgsIssue");function s(a,l){return pn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Dn(),Zt].filter(f=>!!f),issueData:{code:_.invalid_return_type,returnTypeError:l}})}o(s,"makeReturnsIssue");let i={errorMap:r.common.contextualErrorMap},u=r.data;if(this._def.returns instanceof nt){let a=this;return Ee(async function(...l){let f=new Ae([]),h=await a._def.args.parseAsync(l,i).catch(y=>{throw f.addIssue(n(l,y)),f}),g=await Reflect.apply(u,this,h);return await a._def.returns._def.type.parseAsync(g,i).catch(y=>{throw f.addIssue(s(g,y)),f})})}else{let a=this;return Ee(function(...l){let f=a._def.args.safeParse(l,i);if(!f.success)throw new Ae([n(l,f.error)]);let h=Reflect.apply(u,this,f.data),g=a._def.returns.safeParse(h,i);if(!g.success)throw new Ae([s(h,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Ge.create(e).rest(Ye.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||Ge.create([]).rest(Ye.create()),returns:r||Ye.create(),typeName:N.ZodFunction,...j(n)})}},St=class extends M{static{o(this,"ZodLazy")}get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};St.create=(t,e)=>new St({getter:t,typeName:N.ZodLazy,...j(e)});var vt=class extends M{static{o(this,"ZodLiteral")}_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return v(r,{received:r.data,code:_.invalid_literal,expected:this._def.value}),I}return{status:"valid",value:e.data}}get value(){return this._def.value}};vt.create=(t,e)=>new vt({value:t,typeName:N.ZodLiteral,...j(e)});function Su(t,e){return new At({values:t,typeName:N.ZodEnum,...j(e)})}o(Su,"createZodEnum");var At=class t extends M{static{o(this,"ZodEnum")}constructor(){super(...arguments),Sr.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return v(r,{expected:G.joinValues(n),received:r.parsedType,code:_.invalid_type}),I}if(mn(this,Sr,"f")||bu(this,Sr,new Set(this._def.values),"f"),!mn(this,Sr,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return v(r,{received:r.data,code:_.invalid_enum_value,options:n}),I}return Ee(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};Sr=new WeakMap;At.create=Su;var Tt=class extends M{static{o(this,"ZodNativeEnum")}constructor(){super(...arguments),vr.set(this,void 0)}_parse(e){let r=G.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==A.string&&n.parsedType!==A.number){let s=G.objectValues(r);return v(n,{expected:G.joinValues(s),received:n.parsedType,code:_.invalid_type}),I}if(mn(this,vr,"f")||bu(this,vr,new Set(G.getValidEnumValues(this._def.values)),"f"),!mn(this,vr,"f").has(e.data)){let s=G.objectValues(r);return v(n,{received:n.data,code:_.invalid_enum_value,options:s}),I}return Ee(e.data)}get enum(){return this._def.values}};vr=new WeakMap;Tt.create=(t,e)=>new Tt({values:t,typeName:N.ZodNativeEnum,...j(e)});var nt=class extends M{static{o(this,"ZodPromise")}unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==A.promise&&r.common.async===!1)return v(r,{code:_.invalid_type,expected:A.promise,received:r.parsedType}),I;let n=r.parsedType===A.promise?r.data:Promise.resolve(r.data);return Ee(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};nt.create=(t,e)=>new nt({type:t,typeName:N.ZodPromise,...j(e)});var Te=class extends M{static{o(this,"ZodEffects")}innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===N.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:o(u=>{v(n,u),u.fatal?r.abort():r.dirty()},"addIssue"),get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let u=s.transform(n.data,i);if(n.common.async)return Promise.resolve(u).then(async a=>{if(r.value==="aborted")return I;let l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?I:l.status==="dirty"||r.value==="dirty"?Vt(l.value):l});{if(r.value==="aborted")return I;let a=this._def.schema._parseSync({data:u,path:n.path,parent:n});return a.status==="aborted"?I:a.status==="dirty"||r.value==="dirty"?Vt(a.value):a}}if(s.type==="refinement"){let u=o(a=>{let l=s.refinement(a,i);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a},"executeRefinement");if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?I:(a.status==="dirty"&&r.dirty(),u(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?I:(a.status==="dirty"&&r.dirty(),u(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!yt(u))return u;let a=s.transform(u.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>yt(u)?Promise.resolve(s.transform(u.value,i)).then(a=>({status:r.value,value:a})):u);G.assertNever(s)}};Te.create=(t,e,r)=>new Te({schema:t,typeName:N.ZodEffects,effect:e,...j(r)});Te.createWithPreprocess=(t,e,r)=>new Te({schema:e,effect:{type:"preprocess",transform:t},typeName:N.ZodEffects,...j(r)});var Pe=class extends M{static{o(this,"ZodOptional")}_parse(e){return this._getType(e)===A.undefined?Ee(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Pe.create=(t,e)=>new Pe({innerType:t,typeName:N.ZodOptional,...j(e)});var qe=class extends M{static{o(this,"ZodNullable")}_parse(e){return this._getType(e)===A.null?Ee(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};qe.create=(t,e)=>new qe({innerType:t,typeName:N.ZodNullable,...j(e)});var Lt=class extends M{static{o(this,"ZodDefault")}_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===A.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Lt.create=(t,e)=>new Lt({innerType:t,typeName:N.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...j(e)});var Ot=class extends M{static{o(this,"ZodCatch")}_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ar(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ae(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ae(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Ot.create=(t,e)=>new Ot({innerType:t,typeName:N.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...j(e)});var Qt=class extends M{static{o(this,"ZodNaN")}_parse(e){if(this._getType(e)!==A.nan){let n=this._getOrReturnCtx(e);return v(n,{code:_.invalid_type,expected:A.nan,received:n.parsedType}),I}return{status:"valid",value:e.data}}};Qt.create=t=>new Qt({typeName:N.ZodNaN,...j(t)});var GD=Symbol("zod_brand"),Tr=class extends M{static{o(this,"ZodBranded")}_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Lr=class t extends M{static{o(this,"ZodPipeline")}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return o(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?I:i.status==="dirty"?(r.dirty(),Vt(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})},"handleAsync")();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?I:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:N.ZodPipeline})}},Pt=class extends M{static{o(this,"ZodReadonly")}_parse(e){let r=this._def.innerType._parse(e),n=o(s=>(yt(s)&&(s.value=Object.freeze(s.value)),s),"freeze");return Ar(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};Pt.create=(t,e)=>new Pt({innerType:t,typeName:N.ZodReadonly,...j(e)});function Eu(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}o(Eu,"cleanParams");function vu(t,e={},r){return t?rt.create().superRefine((n,s)=>{var i,u;let a=t(n);if(a instanceof Promise)return a.then(l=>{var f,h;if(!l){let g=Eu(e,n),m=(h=(f=g.fatal)!==null&&f!==void 0?f:r)!==null&&h!==void 0?h:!0;s.addIssue({code:"custom",...g,fatal:m})}});if(!a){let l=Eu(e,n),f=(u=(i=l.fatal)!==null&&i!==void 0?i:r)!==null&&u!==void 0?u:!0;s.addIssue({code:"custom",...l,fatal:f})}}):rt.create()}o(vu,"custom");var qD={object:ve.lazycreate},N;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(N||(N={}));var HD=o((t,e={message:`Input not instance of ${t.name}`})=>vu(r=>r instanceof t,e),"instanceOfType"),Au=tt.create,Tu=gt.create,zD=Qt.create,WD=Et.create,Lu=Ft.create,VD=Ct.create,ZD=Yt.create,YD=bt.create,JD=wt.create,KD=rt.create,XD=Ye.create,QD=Ie.create,ep=Jt.create,tp=Je.create,rp=ve.create,np=ve.strictCreate,sp=_t.create,ip=yn.create,op=xt.create,up=Ge.create,ap=gn.create,cp=Kt.create,lp=Xt.create,fp=En.create,hp=St.create,dp=vt.create,Dp=At.create,pp=Tt.create,mp=nt.create,Fu=Te.create,yp=Pe.create,gp=qe.create,Ep=Te.createWithPreprocess,Fp=Lr.create,Cp=o(()=>Au().optional(),"ostring"),bp=o(()=>Tu().optional(),"onumber"),wp=o(()=>Lu().optional(),"oboolean"),_p={string:o(t=>tt.create({...t,coerce:!0}),"string"),number:o(t=>gt.create({...t,coerce:!0}),"number"),boolean:o(t=>Ft.create({...t,coerce:!0}),"boolean"),bigint:o(t=>Et.create({...t,coerce:!0}),"bigint"),date:o(t=>Ct.create({...t,coerce:!0}),"date")},xp=I,H=Object.freeze({__proto__:null,defaultErrorMap:Zt,setErrorMap:ED,getErrorMap:Dn,makeIssue:pn,EMPTY_PATH:FD,addIssueToContext:v,ParseStatus:ye,INVALID:I,DIRTY:Vt,OK:Ee,isAborted:Rs,isDirty:Bs,isValid:yt,isAsync:Ar,get util(){return G},get objectUtil(){return ks},ZodParsedType:A,getParsedType:Ze,ZodType:M,datetimeRegex:xu,ZodString:tt,ZodNumber:gt,ZodBigInt:Et,ZodBoolean:Ft,ZodDate:Ct,ZodSymbol:Yt,ZodUndefined:bt,ZodNull:wt,ZodAny:rt,ZodUnknown:Ye,ZodNever:Ie,ZodVoid:Jt,ZodArray:Je,ZodObject:ve,ZodUnion:_t,ZodDiscriminatedUnion:yn,ZodIntersection:xt,ZodTuple:Ge,ZodRecord:gn,ZodMap:Kt,ZodSet:Xt,ZodFunction:En,ZodLazy:St,ZodLiteral:vt,ZodEnum:At,ZodNativeEnum:Tt,ZodPromise:nt,ZodEffects:Te,ZodTransformer:Te,ZodOptional:Pe,ZodNullable:qe,ZodDefault:Lt,ZodCatch:Ot,ZodNaN:Qt,BRAND:GD,ZodBranded:Tr,ZodPipeline:Lr,ZodReadonly:Pt,custom:vu,Schema:M,ZodSchema:M,late:qD,get ZodFirstPartyTypeKind(){return N},coerce:_p,any:KD,array:tp,bigint:WD,boolean:Lu,date:VD,discriminatedUnion:ip,effect:Fu,enum:Dp,function:fp,instanceof:HD,intersection:op,lazy:hp,literal:dp,map:cp,nan:zD,nativeEnum:pp,never:QD,null:JD,nullable:gp,number:Tu,object:rp,oboolean:wp,onumber:bp,optional:yp,ostring:Cp,pipeline:Fp,preprocess:Ep,promise:mp,record:ap,set:lp,strictObject:np,string:Au,symbol:ZD,transformer:Fu,tuple:up,undefined:YD,union:sp,unknown:XD,void:ep,NEVER:xp,ZodIssueCode:_,quotelessJson:gD,ZodError:Ae});var dw=o(t=>t==null,"isNil"),er=o(t=>typeof t=="string","isString"),kt=o(t=>typeof t=="object"&&t!==null,"isObject"),Ou=Array.isArray,Pu=o(t=>typeof t=="function","isFunction"),Dw=o(t=>t instanceof Error,"isError"),pw=o(t=>H.object({type:H.string(),code:H.number(),reason:H.string(),wasClean:H.boolean()}).safeParse(t).success,"isCloseEvent"),mw=o(t=>H.object({type:H.string(),message:H.string(),error:H.any()}).safeParse(t).success,"isErrorEvent"),yw=o(t=>H.union([H.object({data:H.record(H.unknown())}),H.object({errors:H.array(H.object({message:H.string()}))}),H.object({data:H.record(H.unknown()),errors:H.array(H.object({message:H.string()}))})]).safeParse(t).success,"isGraphQLResult"),gw=o(t=>H.array(H.object({message:H.string(),extensions:H.record(H.unknown()).nullish().transform(e=>e??{})})).min(1).safeParse(t).success,"isGraphQLErrors"),Ew=o(t=>{throw new Error(`Unexpected value: ${t}`)},"isNever"),Fw=o(t=>t instanceof Error&&t.name==="AbortError"||t instanceof Event&&t.type==="abort","isAbortError"),Cw=o(t=>kt(t)&&"code"in t&&t.code==="ENOENT","isENOENTError"),bw=o(t=>kt(t)&&"code"in t&&t.code==="ENOTEMPTY","isENOTEMPTYError"),ww=o(t=>kt(t)&&"code"in t&&t.code==="ENOTDIR","isENOTDIRError"),_w=o(t=>kt(t)&&"code"in t&&t.code==="EEXIST","isEEXISTError"),xw=o(t=>[".js",".jsx",".cjs",".mjs"].some(e=>t.endsWith(e)),"isJavaScriptFile"),Sw=o(t=>[".ts",".tsx",".cts",".mts"].some(e=>t.endsWith(e)&&!t.endsWith(".d.ts")),"isTypeScriptFile"),vw=o(t=>t.endsWith(".gelly"),"isGellyFile");c();c();import Pr from"node:path";c();import Ap from"node:process";import Tp from"node:path";import zw,{promises as ku}from"node:fs";import{fileURLToPath as Lp}from"node:url";c();c();c();var Is=class{static{o(this,"Node")}value;next;constructor(e){this.value=e}},Or=class{static{o(this,"Queue")}#r;#n;#e;constructor(){this.clear()}enqueue(e){let r=new Is(e);this.#r?(this.#n.next=r,this.#n=r):(this.#r=r,this.#n=r),this.#e++}dequeue(){let e=this.#r;if(e)return this.#r=this.#r.next,this.#e--,e.value}peek(){if(this.#r)return this.#r.value}clear(){this.#r=void 0,this.#n=void 0,this.#e=0}get size(){return this.#e}*[Symbol.iterator](){let e=this.#r;for(;e;)yield e.value,e=e.next}};function Fn(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new Or,r=0,n=o(()=>{r--,e.size>0&&e.dequeue()()},"next"),s=o(async(a,l,f)=>{r++;let h=(async()=>a(...f))();l(h);try{await h}catch{}n()},"run"),i=o((a,l,f)=>{e.enqueue(s.bind(void 0,a,l,f)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},"enqueue"),u=o((a,...l)=>new Promise(f=>{i(a,f,l)}),"generator");return Object.defineProperties(u,{activeCount:{get:o(()=>r,"get")},pendingCount:{get:o(()=>e.size,"get")},clearQueue:{value:o(()=>{e.clear()},"value")}}),u}o(Fn,"pLimit");var Cn=class extends Error{static{o(this,"EndError")}constructor(e){super(),this.value=e}},Sp=o(async(t,e)=>e(await t),"testElement"),vp=o(async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new Cn(e[0]);return!1},"finder");async function $s(t,e,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:n=!0}={}){let s=Fn(r),i=[...t].map(a=>[a,s(Sp,a,e)]),u=Fn(n?1:Number.POSITIVE_INFINITY);try{await Promise.all(i.map(a=>u(vp,a)))}catch(a){if(a instanceof Cn)return a.value;throw a}}o($s,"pLocate");var Ru={directory:"isDirectory",file:"isFile"};function Op(t){if(!Object.hasOwnProperty.call(Ru,t))throw new Error(`Invalid type specified: ${t}`)}o(Op,"checkType");var Pp=o((t,e)=>e[Ru[t]](),"matchType"),kp=o(t=>t instanceof URL?Lp(t):t,"toPath");async function js(t,{cwd:e=Ap.cwd(),type:r="file",allowSymlinks:n=!0,concurrency:s,preserveOrder:i}={}){Op(r),e=kp(e);let u=n?ku.stat:ku.lstat;return $s(t,async a=>{try{let l=await u(Tp.resolve(e,a));return Pp(r,l)}catch{return!1}},{concurrency:s,preserveOrder:i})}o(js,"locatePath");c();import{fileURLToPath as Rp}from"node:url";function Ms(t){return t instanceof URL?Rp(t):t}o(Ms,"toPath");c();var Bp=Symbol("findUpStop");async function Np(t,e={}){let r=Pr.resolve(Ms(e.cwd)??""),{root:n}=Pr.parse(r),s=Pr.resolve(r,Ms(e.stopAt??n)),i=e.limit??Number.POSITIVE_INFINITY,u=[t].flat(),a=o(async f=>{if(typeof t!="function")return js(u,f);let h=await t(f.cwd);return typeof h=="string"?js([h],f):h},"runMatcher"),l=[];for(;;){let f=await a({...e,cwd:r});if(f===Bp||(f&&l.push(Pr.resolve(r,f)),r===s||l.length>=i))break;r=Pr.dirname(r)}return l}o(Np,"findUpMultiple");async function Bu(t,e={}){return(await Np(t,{...e,limit:1}))[0]}o(Bu,"findUp");var Hl=Se(Tc(),1),zl=Se(ql(),1);import ig from"node:assert";import{fileURLToPath as og}from"node:url";var Ci=await Bu("package.json",{cwd:og(import.meta.url)});ig(Ci!==void 0,"Could not find package.json for the ggt package.");var Wl=Ci,Un=await Hl.default.readJson(Ci);(0,zl.default)(Un,!0);c();c();var ug=o((t,e,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let s=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(e,r);!ag(s,i)&&n||Object.defineProperty(t,r,i)},"copyProperty"),ag=o(function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},"canCopyProperty"),cg=o((t,e)=>{let r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},"changePrototype"),lg=o((t,e)=>`/* Wrapped ${t}*/
|
|
19
|
-
${e}`,"wrappedToString"),fg=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),hg=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),dg=o((t,e,r)=>{let n=r===""?"":`with ${r.trim()}() `,s=lg.bind(null,n,e.toString());Object.defineProperty(s,"name",hg);let{writable:i,enumerable:u,configurable:a}=fg;Object.defineProperty(t,"toString",{value:s,writable:i,enumerable:u,configurable:a})},"changeToString");function cr(t,e,{ignoreNonConfigurable:r=!1}={}){let{name:n}=t;for(let s of Reflect.ownKeys(e))ug(t,e,s,r);return cg(t,e),dg(t,e,n),t}o(cr,"mimicFunction");import Dg from"node:assert";c();var pg=new Set;var mg=o((...t)=>String(t[0]),"MemoFirstArg"),Zl=o((...t)=>t.map(String).join(":"),"MemoAllArgs");function Yl(t,e){let r;e?r=t:(e=t,r=mg);let n=new Map,s=o((...i)=>{let u=r(...i);if(n.has(u))return n.get(u);Dg(e,"fn shouldn't be undefined");let a=e(...i);return n.set(u,a),a},"memoized");return s.clear=n.clear.bind(n),pg.add(s),cr(s,e),s}o(Yl,"memo");var PS=o((t,e)=>{let r,n,s,i=o((...u)=>{n=o(()=>(n=void 0,r=void 0,s?s=s.then(()=>e(...u)).catch(Vl).finally(()=>s=void 0):s=e(...u).catch(Vl).finally(()=>s=void 0),s),"nextCall"),clearTimeout(r),r=setTimeout(n,t)},"debouncedAsync");return i.flush=async()=>{n&&await n()},cr(i,e),i},"debounceAsync");var Gn=o((t,...e)=>Pu(t)?t(...e):t,"unthunk"),Vl=o((...t)=>{},"noop");c();c();import Xl from"node:process";import Cg from"node:os";import bg from"node:fs";c();import Eg from"node:fs";c();import Jl from"node:fs";var bi;function yg(){try{return Jl.statSync("/.dockerenv"),!0}catch{return!1}}o(yg,"hasDockerEnv");function gg(){try{return Jl.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}o(gg,"hasDockerCGroup");function wi(){return bi===void 0&&(bi=yg()||gg()),bi}o(wi,"isDocker");var _i,Fg=o(()=>{try{return Eg.statSync("/run/.containerenv"),!0}catch{return!1}},"hasContainerEnv");function qn(){return _i===void 0&&(_i=Fg()||wi()),_i}o(qn,"isInsideContainer");var Kl=o(()=>{if(Xl.platform!=="linux")return!1;if(Cg.release().toLowerCase().includes("microsoft"))return!qn();try{return bg.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!qn():!1}catch{return!1}},"isWsl"),xi=Xl.env.__IS_WSL_TEST__?Kl:Kl();import lr from"node:os";import je from"node:path";import V from"node:process";c();import wg from"node:assert";c();var Ql=o((t,e,r)=>Math.max(e,Math.min(r,t)),"clamp");var ft={TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,PRINT:6},ef=Yl(Zl,(t,e)=>{let r=H.enum(["TRACE","DEBUG","INFO","WARN","ERROR"]).transform(n=>ft[n]).safeParse(String(t).toUpperCase());return r.success||(r=H.number().min(ft.TRACE).max(ft.ERROR).safeParse(Number(t))),r.success?r.data:e}),iv=o(t=>(wg(t>0,"verbosity must be greater than 0"),Ql(ft.INFO+1-t,ft.TRACE,ft.INFO)),"verbosityToLevel");var Hn={get logLevel(){return ef(V.env.GGT_LOG_LEVEL,ft.PRINT)},get logFormat(){return V.env.GGT_LOG_FORMAT==="json"?"json":"pretty"},get versionFull(){return`${Un.name}/${Un.version} ${this.platform}-${this.arch} node-${V.version}`},get arch(){return lr.arch()==="ia32"?"x86":lr.arch()},get platform(){return xi?"wsl":lr.platform()},get windows(){return V.platform==="win32"},get windowsOrWsl(){return this.windows||xi},get macos(){return V.platform==="darwin"},get shell(){let t=V.env.SHELL??lr.userInfo().shell?.split(je.sep).pop();return t?t.split("/").at(-1):this.windows&&V.env.COMSPEC?V.env.COMSPEC.split(/\\|\//).at(-1):"unknown"},get homeDir(){if(V.env.HOME)return V.env.HOME;if(this.windows){if(V.env.HOMEDRIVE&&V.env.HOMEPATH)return je.join(V.env.HOMEDRIVE,V.env.HOMEPATH);if(V.env.USERPROFILE)return V.env.USERPROFILE}return lr.homedir()||lr.tmpdir()},get configDir(){if(V.env.GGT_CONFIG_DIR)return V.env.GGT_CONFIG_DIR;let t=V.env.XDG_CONFIG_HOME||this.windows&&V.env.LOCALAPPDATA||je.join(this.homeDir,".config");return je.join(t,"ggt")},get defaultsConfigFile(){let t=V.env.GGT_CONFIG;return t||(t=_g("defaults.json")),t},get cacheDir(){if(V.env.GGT_CACHE_DIR)return V.env.GGT_CACHE_DIR;if(this.macos)return je.join(this.homeDir,"Library/Caches/ggt");let t=V.env.XDG_CACHE_HOME||this.windows&&V.env.LOCALAPPDATA||je.join(this.homeDir,".cache");return je.join(t,"ggt")},get dataDir(){if(V.env.GGT_DATA_DIR)return V.env.GGT_DATA_DIR;let t=V.env.XDG_DATA_HOME||this.windows&&V.env.LOCALAPPDATA||je.join(this.homeDir,".local/share");return je.join(t,"ggt")},domains:{get app(){return V.env.GGT_GADGET_APP_DOMAIN||(xr.productionLike?"gadget.app":"ggt.pub")},get services(){return V.env.GGT_GADGET_SERVICES_DOMAIN||(xr.productionLike?"app.gadget.dev":"app.ggt.dev")}}},_g=o((...t)=>je.join(Hn.configDir,...t),"configPath"),mv=o((...t)=>je.join(Hn.homeDir,...t),"homePath");c();c();import uf from"node:process";c();import Zn from"node:process";c();var zn=new WeakMap,tf=o((t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,n=0,s=t.displayName||t.name||"<anonymous>",i=o(function(...u){if(zn.set(i,++n),n===1)r=t.apply(this,u),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${s}\` can only be called once`);return r},"onetime");return cr(i,t),zn.set(i,n),i},"onetime");tf.callCount=t=>{if(!zn.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return zn.get(t)};var rf=tf;c();c();var Nt=[];Nt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Nt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Nt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Wn=o(t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function","processOk"),Si=Symbol.for("signal-exit emitter"),vi=globalThis,xg=Object.defineProperty.bind(Object),Ai=class{static{o(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(vi[Si])return vi[Si];xg(vi,Si,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,r){this.listeners[e].push(r)}removeListener(e,r){let n=this.listeners[e],s=n.indexOf(r);s!==-1&&(s===0&&n.length===1?n.length=0:n.splice(s,1))}emit(e,r,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let s=!1;for(let i of this.listeners[e])s=i(r,n)===!0||s;return e==="exit"&&(s=this.emit("afterExit",r,n)||s),s}},Vn=class{static{o(this,"SignalExitBase")}},Sg=o(t=>({onExit(e,r){return t.onExit(e,r)},load(){return t.load()},unload(){return t.unload()}}),"signalExitWrap"),Ti=class extends Vn{static{o(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}},Li=class extends Vn{static{o(this,"SignalExit")}#r=Oi.platform==="win32"?"SIGINT":"SIGHUP";#n=new Ai;#e;#a;#w;#g={};#i=!1;constructor(e){super(),this.#e=e,this.#g={};for(let r of Nt)this.#g[r]=()=>{let n=this.#e.listeners(r),{count:s}=this.#n,i=e;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(s+=i.__signal_exit_emitter__.count),n.length===s){this.unload();let u=this.#n.emit("exit",null,r),a=r==="SIGHUP"?this.#r:r;u||e.kill(e.pid,a)}};this.#w=e.reallyExit,this.#a=e.emit}onExit(e,r){if(!Wn(this.#e))return()=>{};this.#i===!1&&this.load();let n=r?.alwaysLast?"afterExit":"exit";return this.#n.on(n,e),()=>{this.#n.removeListener(n,e),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#n.count+=1;for(let e of Nt)try{let r=this.#g[e];r&&this.#e.on(e,r)}catch{}this.#e.emit=(e,...r)=>this.#u(e,...r),this.#e.reallyExit=e=>this.#D(e)}}unload(){this.#i&&(this.#i=!1,Nt.forEach(e=>{let r=this.#g[e];if(!r)throw new Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,r)}catch{}}),this.#e.emit=this.#a,this.#e.reallyExit=this.#w,this.#n.count-=1)}#D(e){return Wn(this.#e)?(this.#e.exitCode=e||0,this.#n.emit("exit",this.#e.exitCode,null),this.#w.call(this.#e,this.#e.exitCode)):0}#u(e,...r){let n=this.#a;if(e==="exit"&&Wn(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let s=n.call(this.#e,e,...r);return this.#n.emit("exit",this.#e.exitCode,null),s}else return n.call(this.#e,e,...r)}},Oi=globalThis.process,{onExit:nf,load:vv,unload:Av}=Sg(Wn(Oi)?new Li(Oi):new Ti);var sf=Zn.stderr.isTTY?Zn.stderr:Zn.stdout.isTTY?Zn.stdout:void 0,vg=sf?rf(()=>{nf(()=>{sf.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},of=vg;var Yn=!1,fr={};fr.show=(t=uf.stderr)=>{t.isTTY&&(Yn=!1,t.write("\x1B[?25h"))};fr.hide=(t=uf.stderr)=>{t.isTTY&&(of(),Yn=!0,t.write("\x1B[?25l"))};fr.toggle=(t,e)=>{t!==void 0&&(Yn=t),Yn?fr.show(e):fr.hide(e)};var Pi=fr;c();function ki({stream:t=process.stdout}={}){return!!(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}o(ki,"isInteractive");import Ii from"node:assert";import Me from"node:process";c();import ze from"node:process";var Ag=3,Ri=class{static{o(this,"StdinDiscarder")}#r=0;start(){this.#r++,this.#r===1&&this.#n()}stop(){if(this.#r<=0)throw new Error("`stop` called more times than `start`");this.#r--,this.#r===0&&this.#e()}#n(){ze.platform==="win32"||!ze.stdin.isTTY||(ze.stdin.setRawMode(!0),ze.stdin.on("data",this.#a),ze.stdin.resume())}#e(){ze.stdin.isTTY&&(ze.stdin.off("data",this.#a),ze.stdin.pause(),ze.stdin.setRawMode(!1))}#a(e){e[0]===Ag&&ze.emit("SIGINT")}},Tg=new Ri,Bi=Tg;c();c();c();function Ni({onlyFirst:t=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,t?void 0:"g")}o(Ni,"ansiRegex");var Lg=Ni();function It(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Lg,"")}o(It,"stripAnsi");c();c();function af(t){return t===161||t===164||t===167||t===168||t===170||t===173||t===174||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||t===198||t===208||t===215||t===216||t>=222&&t<=225||t===230||t>=232&&t<=234||t===236||t===237||t===240||t===242||t===243||t>=247&&t<=250||t===252||t===254||t===257||t===273||t===275||t===283||t===294||t===295||t===299||t>=305&&t<=307||t===312||t>=319&&t<=322||t===324||t>=328&&t<=331||t===333||t===338||t===339||t===358||t===359||t===363||t===462||t===464||t===466||t===468||t===470||t===472||t===474||t===476||t===593||t===609||t===708||t===711||t>=713&&t<=715||t===717||t===720||t>=728&&t<=731||t===733||t===735||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||t===1025||t>=1040&&t<=1103||t===1105||t===8208||t>=8211&&t<=8214||t===8216||t===8217||t===8220||t===8221||t>=8224&&t<=8226||t>=8228&&t<=8231||t===8240||t===8242||t===8243||t===8245||t===8251||t===8254||t===8308||t===8319||t>=8321&&t<=8324||t===8364||t===8451||t===8453||t===8457||t===8467||t===8470||t===8481||t===8482||t===8486||t===8491||t===8531||t===8532||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||t===8585||t>=8592&&t<=8601||t===8632||t===8633||t===8658||t===8660||t===8679||t===8704||t===8706||t===8707||t===8711||t===8712||t===8715||t===8719||t===8721||t===8725||t===8730||t>=8733&&t<=8736||t===8739||t===8741||t>=8743&&t<=8748||t===8750||t>=8756&&t<=8759||t===8764||t===8765||t===8776||t===8780||t===8786||t===8800||t===8801||t>=8804&&t<=8807||t===8810||t===8811||t===8814||t===8815||t===8834||t===8835||t===8838||t===8839||t===8853||t===8857||t===8869||t===8895||t===8978||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||t===9632||t===9633||t>=9635&&t<=9641||t===9650||t===9651||t===9654||t===9655||t===9660||t===9661||t===9664||t===9665||t>=9670&&t<=9672||t===9675||t>=9678&&t<=9681||t>=9698&&t<=9701||t===9711||t===9733||t===9734||t===9737||t===9742||t===9743||t===9756||t===9758||t===9792||t===9794||t===9824||t===9825||t>=9827&&t<=9829||t>=9831&&t<=9834||t===9836||t===9837||t===9839||t===9886||t===9887||t===9919||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||t===9955||t===9960||t===9961||t>=9963&&t<=9969||t===9972||t>=9974&&t<=9977||t===9979||t===9980||t===9982||t===9983||t===10045||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||t===65533||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||t===127375||t===127376||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}o(af,"isAmbiguous");function cf(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}o(cf,"isFullWidth");function lf(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9800&&t<=9811||t===9855||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12771||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=19903||t>=19968&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t===94192||t===94193||t>=94208&&t<=100343||t>=100352&&t<=101589||t>=101632&&t<=101640||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128727||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129672||t>=129680&&t<=129725||t>=129727&&t<=129733||t>=129742&&t<=129755||t>=129760&&t<=129768||t>=129776&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}o(lf,"isWide");function Og(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}o(Og,"validate");function ff(t,{ambiguousAsWide:e=!1}={}){return Og(t),cf(t)||lf(t)||e&&af(t)?2:1}o(ff,"eastAsianWidth");var Df=Se(df(),1);var Pg=new Intl.Segmenter,kg=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function pe(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=e;if(n||(t=It(t)),t.length===0)return 0;let s=0,i={ambiguousAsWide:!r};for(let{segment:u}of Pg.segment(t)){let a=u.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!kg.test(u)){if((0,Df.default)().test(u)){s+=2;continue}s+=ff(a,i)}}return s}o(pe,"stringWidth");var Jn=!1,$i=class{static{o(this,"Output")}lastPrintedLineWasEmpty=!0;lastStickyLineWasEmpty=!0;_promptText="";_spinnerText="";_footerText="";_stickyTextLinesToClear=0;constructor(){Me.stdout.on("error",e=>{if(!(kt(e)&&"code"in e&&e.code==="EPIPE"))throw e}),Me.stderr.on("error",e=>{if(!(kt(e)&&"code"in e&&e.code==="EPIPE"))throw e})}get isInteractive(){return!xr.testLike&&ki({stream:Me.stdout})}writeStdout(e){this._clearStickyText(),e=this._stripUnnecessaryNewLines(e,this.lastPrintedLineWasEmpty),this._writeStdout(e),this.lastPrintedLineWasEmpty=e===`
|
|
18
|
+
`);return i!==-1&&(e=fu(e,s,n,i)),n+e+s},"applyStyle");Object.defineProperties(_r.prototype,zt);var mD=_r(),yu=_r({level:du?du.level:0});var We=mD;c();import yD from"node:process";var xr={get value(){return yD.env.GGT_ENV||"production"},get productionLike(){return!this.developmentOrTestLike},get developmentLike(){return this.value.startsWith("development")},get testLike(){return this.value.startsWith("test")},get developmentOrTestLike(){return this.developmentLike||this.testLike}};c();c();var G;(function(t){t.assertEqual=s=>s;function e(s){}o(e,"assertIs"),t.assertIs=e;function r(s){throw new Error}o(r,"assertNever"),t.assertNever=r,t.arrayToEnum=s=>{let i={};for(let u of s)i[u]=u;return i},t.getValidEnumValues=s=>{let i=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),u={};for(let a of i)u[a]=s[a];return t.objectValues(u)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let u in s)Object.prototype.hasOwnProperty.call(s,u)&&i.push(u);return i},t.find=(s,i)=>{for(let u of s)if(i(u))return u},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(u=>typeof u=="string"?`'${u}'`:u).join(i)}o(n,"joinValues"),t.joinValues=n,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(G||(G={}));var ks;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(ks||(ks={}));var A=G.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ze=o(t=>{switch(typeof t){case"undefined":return A.undefined;case"string":return A.string;case"number":return isNaN(t)?A.nan:A.number;case"boolean":return A.boolean;case"function":return A.function;case"bigint":return A.bigint;case"symbol":return A.symbol;case"object":return Array.isArray(t)?A.array:t===null?A.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?A.promise:typeof Map<"u"&&t instanceof Map?A.map:typeof Set<"u"&&t instanceof Set?A.set:typeof Date<"u"&&t instanceof Date?A.date:A.object;default:return A.unknown}},"getParsedType"),_=G.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),gD=o(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),Ae=class t extends Error{static{o(this,"ZodError")}get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(i){return i.message},n={_errors:[]},s=o(i=>{for(let u of i.issues)if(u.code==="invalid_union")u.unionErrors.map(s);else if(u.code==="invalid_return_type")s(u.returnTypeError);else if(u.code==="invalid_arguments")s(u.argumentsError);else if(u.path.length===0)n._errors.push(r(u));else{let a=n,l=0;for(;l<u.path.length;){let f=u.path[l];l===u.path.length-1?(a[f]=a[f]||{_errors:[]},a[f]._errors.push(r(u))):a[f]=a[f]||{_errors:[]},a=a[f],l++}}},"processError");return s(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,G.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Ae.create=t=>new Ae(t);var Zt=o((t,e)=>{let r;switch(t.code){case _.invalid_type:t.received===A.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case _.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,G.jsonStringifyReplacer)}`;break;case _.unrecognized_keys:r=`Unrecognized key(s) in object: ${G.joinValues(t.keys,", ")}`;break;case _.invalid_union:r="Invalid input";break;case _.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${G.joinValues(t.options)}`;break;case _.invalid_enum_value:r=`Invalid enum value. Expected ${G.joinValues(t.options)}, received '${t.received}'`;break;case _.invalid_arguments:r="Invalid function arguments";break;case _.invalid_return_type:r="Invalid function return type";break;case _.invalid_date:r="Invalid date";break;case _.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:G.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case _.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case _.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case _.custom:r="Invalid input";break;case _.invalid_intersection_types:r="Intersection results could not be merged";break;case _.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case _.not_finite:r="Number must be finite";break;default:r=e.defaultError,G.assertNever(t)}return{message:r}},"errorMap"),Cu=Zt;function ED(t){Cu=t}o(ED,"setErrorMap");function Dn(){return Cu}o(Dn,"getErrorMap");var pn=o(t=>{let{data:e,path:r,errorMaps:n,issueData:s}=t,i=[...r,...s.path||[]],u={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="",l=n.filter(f=>!!f).slice().reverse();for(let f of l)a=f(u,{data:e,defaultError:a}).message;return{...s,path:i,message:a}},"makeIssue"),FD=[];function v(t,e){let r=Dn(),n=pn({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Zt?void 0:Zt].filter(s=>!!s)});t.common.issues.push(n)}o(v,"addIssueToContext");var ye=class t{static{o(this,"ParseStatus")}constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let s of r){if(s.status==="aborted")return I;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let s of r){let i=await s.key,u=await s.value;n.push({key:i,value:u})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let s of r){let{key:i,value:u}=s;if(i.status==="aborted"||u.status==="aborted")return I;i.status==="dirty"&&e.dirty(),u.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof u.value<"u"||s.alwaysSet)&&(n[i.value]=u.value)}return{status:e.value,value:n}}},I=Object.freeze({status:"aborted"}),Vt=o(t=>({status:"dirty",value:t}),"DIRTY"),Ee=o(t=>({status:"valid",value:t}),"OK"),Rs=o(t=>t.status==="aborted","isAborted"),Bs=o(t=>t.status==="dirty","isDirty"),yt=o(t=>t.status==="valid","isValid"),Ar=o(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync");function mn(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}o(mn,"__classPrivateFieldGet");function bu(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r}o(bu,"__classPrivateFieldSet");var P;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(P||(P={}));var Sr,vr,ke=class{static{o(this,"ParseInputLazyPath")}constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},gu=o((t,e)=>{if(yt(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Ae(t.common.issues);return this._error=r,this._error}}},"handleResult");function j(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:o((u,a)=>{var l,f;let{message:h}=t;return u.code==="invalid_enum_value"?{message:h??a.defaultError}:typeof a.data>"u"?{message:(l=h??n)!==null&&l!==void 0?l:a.defaultError}:u.code!=="invalid_type"?{message:a.defaultError}:{message:(f=h??r)!==null&&f!==void 0?f:a.defaultError}},"customMap"),description:s}}o(j,"processCreateParams");var M=class{static{o(this,"ZodType")}get description(){return this._def.description}_getType(e){return Ze(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Ze(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ye,ctx:{common:e.parent.common,data:e.data,parsedType:Ze(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Ar(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let s={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ze(e)},i=this._parseSync({data:e,path:s.path,parent:s});return gu(s,i)}"~validate"(e){var r,n;let s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ze(e)};if(!this["~standard"].async)try{let i=this._parseSync({data:e,path:[],parent:s});return yt(i)?{value:i.value}:{issues:s.common.issues}}catch(i){!((n=(r=i?.message)===null||r===void 0?void 0:r.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:s}).then(i=>yt(i)?{value:i.value}:{issues:s.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ze(e)},s=this._parse({data:e,path:n.path,parent:n}),i=await(Ar(s)?s:Promise.resolve(s));return gu(n,i)}refine(e,r){let n=o(s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r,"getIssueProperties");return this._refinement((s,i)=>{let u=e(s),a=o(()=>i.addIssue({code:_.custom,...n(s)}),"setError");return typeof Promise<"u"&&u instanceof Promise?u.then(l=>l?!0:(a(),!1)):u?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new Te({schema:this,typeName:N.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:o(r=>this["~validate"](r),"validate")}}optional(){return Pe.create(this,this._def)}nullable(){return qe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Je.create(this)}promise(){return nt.create(this,this._def)}or(e){return _t.create([this,e],this._def)}and(e){return xt.create(this,e,this._def)}transform(e){return new Te({...j(this._def),schema:this,typeName:N.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Lt({...j(this._def),innerType:this,defaultValue:r,typeName:N.ZodDefault})}brand(){return new Tr({typeName:N.ZodBranded,type:this,...j(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Ot({...j(this._def),innerType:this,catchValue:r,typeName:N.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Lr.create(this,e)}readonly(){return Pt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},CD=/^c[^\s-]{8,}$/i,bD=/^[0-9a-z]+$/,wD=/^[0-9A-HJKMNP-TV-Z]{26}$/i,_D=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,xD=/^[a-z0-9_-]{21}$/i,SD=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vD=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,AD=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,TD="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ps,LD=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,OD=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,PD=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,kD=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,RD=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,BD=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wu="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ND=new RegExp(`^${wu}$`);function _u(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}o(_u,"timeRegexSource");function ID(t){return new RegExp(`^${_u(t)}$`)}o(ID,"timeRegex");function xu(t){let e=`${wu}T${_u(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}o(xu,"datetimeRegex");function $D(t,e){return!!((e==="v4"||!e)&&LD.test(t)||(e==="v6"||!e)&&PD.test(t))}o($D,"isValidIP");function jD(t,e){if(!SD.test(t))return!1;try{let[r]=t.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||!s.typ||!s.alg||e&&s.alg!==e)}catch{return!1}}o(jD,"isValidJWT");function MD(t,e){return!!((e==="v4"||!e)&&OD.test(t)||(e==="v6"||!e)&&kD.test(t))}o(MD,"isValidCidr");var tt=class t extends M{static{o(this,"ZodString")}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==A.string){let i=this._getOrReturnCtx(e);return v(i,{code:_.invalid_type,expected:A.string,received:i.parsedType}),I}let n=new ye,s;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),v(s,{code:_.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),v(s,{code:_.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let u=e.data.length>i.value,a=e.data.length<i.value;(u||a)&&(s=this._getOrReturnCtx(e,s),u?v(s,{code:_.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&v(s,{code:_.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")AD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"email",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Ps||(Ps=new RegExp(TD,"u")),Ps.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"emoji",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")_D.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"uuid",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")xD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"nanoid",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")CD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"cuid",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")bD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"cuid2",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")wD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"ulid",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),v(s,{validation:"url",code:_.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"regex",code:_.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),v(s,{code:_.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),v(s,{code:_.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),v(s,{code:_.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?xu(i).test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{code:_.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?ND.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{code:_.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?ID(i).test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{code:_.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?vD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"duration",code:_.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?$D(e.data,i.version)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"ip",code:_.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?jD(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"jwt",code:_.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?MD(e.data,i.version)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"cidr",code:_.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?RD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"base64",code:_.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?BD.test(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{validation:"base64url",code:_.invalid_string,message:i.message}),n.dirty()):G.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:_.invalid_string,...P.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...P.errToObj(e)})}url(e){return this._addCheck({kind:"url",...P.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...P.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...P.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...P.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...P.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...P.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...P.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...P.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...P.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...P.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...P.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...P.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...P.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...P.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...P.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...P.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...P.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...P.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...P.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...P.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...P.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...P.errToObj(r)})}nonempty(e){return this.min(1,P.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};tt.create=t=>{var e;return new tt({checks:[],typeName:N.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...j(t)})};function UD(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,i=parseInt(t.toFixed(s).replace(".","")),u=parseInt(e.toFixed(s).replace(".",""));return i%u/Math.pow(10,s)}o(UD,"floatSafeRemainder");var gt=class t extends M{static{o(this,"ZodNumber")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==A.number){let i=this._getOrReturnCtx(e);return v(i,{code:_.invalid_type,expected:A.number,received:i.parsedType}),I}let n,s=new ye;for(let i of this._def.checks)i.kind==="int"?G.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{code:_.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),v(n,{code:_.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),v(n,{code:_.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?UD(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),v(n,{code:_.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{code:_.not_finite,message:i.message}),s.dirty()):G.assertNever(i);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,P.toString(r))}gt(e,r){return this.setLimit("min",e,!1,P.toString(r))}lte(e,r){return this.setLimit("max",e,!0,P.toString(r))}lt(e,r){return this.setLimit("max",e,!1,P.toString(r))}setLimit(e,r,n,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:P.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:P.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:P.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:P.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:P.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:P.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:P.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:P.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:P.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:P.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&G.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};gt.create=t=>new gt({checks:[],typeName:N.ZodNumber,coerce:t?.coerce||!1,...j(t)});var Et=class t extends M{static{o(this,"ZodBigInt")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==A.bigint)return this._getInvalidInput(e);let n,s=new ye;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),v(n,{code:_.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),v(n,{code:_.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),v(n,{code:_.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):G.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return v(r,{code:_.invalid_type,expected:A.bigint,received:r.parsedType}),I}gte(e,r){return this.setLimit("min",e,!0,P.toString(r))}gt(e,r){return this.setLimit("min",e,!1,P.toString(r))}lte(e,r){return this.setLimit("max",e,!0,P.toString(r))}lt(e,r){return this.setLimit("max",e,!1,P.toString(r))}setLimit(e,r,n,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:P.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:P.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:P.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:P.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:P.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:P.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Et.create=t=>{var e;return new Et({checks:[],typeName:N.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...j(t)})};var Ft=class extends M{static{o(this,"ZodBoolean")}_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==A.boolean){let n=this._getOrReturnCtx(e);return v(n,{code:_.invalid_type,expected:A.boolean,received:n.parsedType}),I}return Ee(e.data)}};Ft.create=t=>new Ft({typeName:N.ZodBoolean,coerce:t?.coerce||!1,...j(t)});var Ct=class t extends M{static{o(this,"ZodDate")}_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==A.date){let i=this._getOrReturnCtx(e);return v(i,{code:_.invalid_type,expected:A.date,received:i.parsedType}),I}if(isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return v(i,{code:_.invalid_date}),I}let n=new ye,s;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),v(s,{code:_.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),v(s,{code:_.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):G.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:P.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:P.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Ct.create=t=>new Ct({checks:[],coerce:t?.coerce||!1,typeName:N.ZodDate,...j(t)});var Yt=class extends M{static{o(this,"ZodSymbol")}_parse(e){if(this._getType(e)!==A.symbol){let n=this._getOrReturnCtx(e);return v(n,{code:_.invalid_type,expected:A.symbol,received:n.parsedType}),I}return Ee(e.data)}};Yt.create=t=>new Yt({typeName:N.ZodSymbol,...j(t)});var bt=class extends M{static{o(this,"ZodUndefined")}_parse(e){if(this._getType(e)!==A.undefined){let n=this._getOrReturnCtx(e);return v(n,{code:_.invalid_type,expected:A.undefined,received:n.parsedType}),I}return Ee(e.data)}};bt.create=t=>new bt({typeName:N.ZodUndefined,...j(t)});var wt=class extends M{static{o(this,"ZodNull")}_parse(e){if(this._getType(e)!==A.null){let n=this._getOrReturnCtx(e);return v(n,{code:_.invalid_type,expected:A.null,received:n.parsedType}),I}return Ee(e.data)}};wt.create=t=>new wt({typeName:N.ZodNull,...j(t)});var rt=class extends M{static{o(this,"ZodAny")}constructor(){super(...arguments),this._any=!0}_parse(e){return Ee(e.data)}};rt.create=t=>new rt({typeName:N.ZodAny,...j(t)});var Ye=class extends M{static{o(this,"ZodUnknown")}constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ee(e.data)}};Ye.create=t=>new Ye({typeName:N.ZodUnknown,...j(t)});var Ie=class extends M{static{o(this,"ZodNever")}_parse(e){let r=this._getOrReturnCtx(e);return v(r,{code:_.invalid_type,expected:A.never,received:r.parsedType}),I}};Ie.create=t=>new Ie({typeName:N.ZodNever,...j(t)});var Jt=class extends M{static{o(this,"ZodVoid")}_parse(e){if(this._getType(e)!==A.undefined){let n=this._getOrReturnCtx(e);return v(n,{code:_.invalid_type,expected:A.void,received:n.parsedType}),I}return Ee(e.data)}};Jt.create=t=>new Jt({typeName:N.ZodVoid,...j(t)});var Je=class t extends M{static{o(this,"ZodArray")}_parse(e){let{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==A.array)return v(r,{code:_.invalid_type,expected:A.array,received:r.parsedType}),I;if(s.exactLength!==null){let u=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(u||a)&&(v(r,{code:u?_.too_big:_.too_small,minimum:a?s.exactLength.value:void 0,maximum:u?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(v(r,{code:_.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(v(r,{code:_.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((u,a)=>s.type._parseAsync(new ke(r,u,r.path,a)))).then(u=>ye.mergeArray(n,u));let i=[...r.data].map((u,a)=>s.type._parseSync(new ke(r,u,r.path,a)));return ye.mergeArray(n,i)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:P.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:P.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:P.toString(r)}})}nonempty(e){return this.min(1,e)}};Je.create=(t,e)=>new Je({type:t,minLength:null,maxLength:null,exactLength:null,typeName:N.ZodArray,...j(e)});function Wt(t){if(t instanceof ve){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Pe.create(Wt(n))}return new ve({...t._def,shape:o(()=>e,"shape")})}else return t instanceof Je?new Je({...t._def,type:Wt(t.element)}):t instanceof Pe?Pe.create(Wt(t.unwrap())):t instanceof qe?qe.create(Wt(t.unwrap())):t instanceof Ge?Ge.create(t.items.map(e=>Wt(e))):t}o(Wt,"deepPartialify");var ve=class t extends M{static{o(this,"ZodObject")}constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=G.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==A.object){let f=this._getOrReturnCtx(e);return v(f,{code:_.invalid_type,expected:A.object,received:f.parsedType}),I}let{status:n,ctx:s}=this._processInputParams(e),{shape:i,keys:u}=this._getCached(),a=[];if(!(this._def.catchall instanceof Ie&&this._def.unknownKeys==="strip"))for(let f in s.data)u.includes(f)||a.push(f);let l=[];for(let f of u){let h=i[f],g=s.data[f];l.push({key:{status:"valid",value:f},value:h._parse(new ke(s,g,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof Ie){let f=this._def.unknownKeys;if(f==="passthrough")for(let h of a)l.push({key:{status:"valid",value:h},value:{status:"valid",value:s.data[h]}});else if(f==="strict")a.length>0&&(v(s,{code:_.unrecognized_keys,keys:a}),n.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let h of a){let g=s.data[h];l.push({key:{status:"valid",value:h},value:f._parse(new ke(s,g,s.path,h)),alwaysSet:h in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let f=[];for(let h of l){let g=await h.key,m=await h.value;f.push({key:g,value:m,alwaysSet:h.alwaysSet})}return f}).then(f=>ye.mergeObjectSync(n,f)):ye.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return P.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:o((r,n)=>{var s,i,u,a;let l=(u=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,r,n).message)!==null&&u!==void 0?u:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=P.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}},"errorMap")}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:o(()=>({...this._def.shape(),...e}),"shape")})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:o(()=>({...this._def.shape(),...e._def.shape()}),"shape"),typeName:N.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return G.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:o(()=>r,"shape")})}omit(e){let r={};return G.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:o(()=>r,"shape")})}deepPartial(){return Wt(this)}partial(e){let r={};return G.objectKeys(this.shape).forEach(n=>{let s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}),new t({...this._def,shape:o(()=>r,"shape")})}required(e){let r={};return G.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Pe;)i=i._def.innerType;r[n]=i}}),new t({...this._def,shape:o(()=>r,"shape")})}keyof(){return Su(G.objectKeys(this.shape))}};ve.create=(t,e)=>new ve({shape:o(()=>t,"shape"),unknownKeys:"strip",catchall:Ie.create(),typeName:N.ZodObject,...j(e)});ve.strictCreate=(t,e)=>new ve({shape:o(()=>t,"shape"),unknownKeys:"strict",catchall:Ie.create(),typeName:N.ZodObject,...j(e)});ve.lazycreate=(t,e)=>new ve({shape:t,unknownKeys:"strip",catchall:Ie.create(),typeName:N.ZodObject,...j(e)});var _t=class extends M{static{o(this,"ZodUnion")}_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function s(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let u=i.map(a=>new Ae(a.ctx.common.issues));return v(r,{code:_.invalid_union,unionErrors:u}),I}if(o(s,"handleResults"),r.common.async)return Promise.all(n.map(async i=>{let u={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:u}),ctx:u}})).then(s);{let i,u=[];for(let l of n){let f={...r,common:{...r.common,issues:[]},parent:null},h=l._parseSync({data:r.data,path:r.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:f}),f.common.issues.length&&u.push(f.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=u.map(l=>new Ae(l));return v(r,{code:_.invalid_union,unionErrors:a}),I}}get options(){return this._def.options}};_t.create=(t,e)=>new _t({options:t,typeName:N.ZodUnion,...j(e)});var Ve=o(t=>t instanceof St?Ve(t.schema):t instanceof Te?Ve(t.innerType()):t instanceof vt?[t.value]:t instanceof At?t.options:t instanceof Tt?G.objectValues(t.enum):t instanceof Lt?Ve(t._def.innerType):t instanceof bt?[void 0]:t instanceof wt?[null]:t instanceof Pe?[void 0,...Ve(t.unwrap())]:t instanceof qe?[null,...Ve(t.unwrap())]:t instanceof Tr||t instanceof Pt?Ve(t.unwrap()):t instanceof Ot?Ve(t._def.innerType):[],"getDiscriminator"),yn=class t extends M{static{o(this,"ZodDiscriminatedUnion")}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==A.object)return v(r,{code:_.invalid_type,expected:A.object,received:r.parsedType}),I;let n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(v(r,{code:_.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),I)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let s=new Map;for(let i of r){let u=Ve(i.shape[e]);if(!u.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of u){if(s.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);s.set(a,i)}}return new t({typeName:N.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:s,...j(n)})}};function Ns(t,e){let r=Ze(t),n=Ze(e);if(t===e)return{valid:!0,data:t};if(r===A.object&&n===A.object){let s=G.objectKeys(e),i=G.objectKeys(t).filter(a=>s.indexOf(a)!==-1),u={...t,...e};for(let a of i){let l=Ns(t[a],e[a]);if(!l.valid)return{valid:!1};u[a]=l.data}return{valid:!0,data:u}}else if(r===A.array&&n===A.array){if(t.length!==e.length)return{valid:!1};let s=[];for(let i=0;i<t.length;i++){let u=t[i],a=e[i],l=Ns(u,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return r===A.date&&n===A.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}o(Ns,"mergeValues");var xt=class extends M{static{o(this,"ZodIntersection")}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),s=o((i,u)=>{if(Rs(i)||Rs(u))return I;let a=Ns(i.value,u.value);return a.valid?((Bs(i)||Bs(u))&&r.dirty(),{status:r.value,value:a.data}):(v(n,{code:_.invalid_intersection_types}),I)},"handleParsed");return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,u])=>s(i,u)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};xt.create=(t,e,r)=>new xt({left:t,right:e,typeName:N.ZodIntersection,...j(r)});var Ge=class t extends M{static{o(this,"ZodTuple")}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==A.array)return v(n,{code:_.invalid_type,expected:A.array,received:n.parsedType}),I;if(n.data.length<this._def.items.length)return v(n,{code:_.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),I;!this._def.rest&&n.data.length>this._def.items.length&&(v(n,{code:_.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((u,a)=>{let l=this._def.items[a]||this._def.rest;return l?l._parse(new ke(n,u,n.path,a)):null}).filter(u=>!!u);return n.common.async?Promise.all(i).then(u=>ye.mergeArray(r,u)):ye.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Ge.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ge({items:t,typeName:N.ZodTuple,rest:null,...j(e)})};var gn=class t extends M{static{o(this,"ZodRecord")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==A.object)return v(n,{code:_.invalid_type,expected:A.object,received:n.parsedType}),I;let s=[],i=this._def.keyType,u=this._def.valueType;for(let a in n.data)s.push({key:i._parse(new ke(n,a,n.path,a)),value:u._parse(new ke(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?ye.mergeObjectAsync(r,s):ye.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof M?new t({keyType:e,valueType:r,typeName:N.ZodRecord,...j(n)}):new t({keyType:tt.create(),valueType:e,typeName:N.ZodRecord,...j(r)})}},Kt=class extends M{static{o(this,"ZodMap")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==A.map)return v(n,{code:_.invalid_type,expected:A.map,received:n.parsedType}),I;let s=this._def.keyType,i=this._def.valueType,u=[...n.data.entries()].map(([a,l],f)=>({key:s._parse(new ke(n,a,n.path,[f,"key"])),value:i._parse(new ke(n,l,n.path,[f,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let l of u){let f=await l.key,h=await l.value;if(f.status==="aborted"||h.status==="aborted")return I;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),a.set(f.value,h.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let l of u){let f=l.key,h=l.value;if(f.status==="aborted"||h.status==="aborted")return I;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),a.set(f.value,h.value)}return{status:r.value,value:a}}}};Kt.create=(t,e,r)=>new Kt({valueType:e,keyType:t,typeName:N.ZodMap,...j(r)});var Xt=class t extends M{static{o(this,"ZodSet")}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==A.set)return v(n,{code:_.invalid_type,expected:A.set,received:n.parsedType}),I;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(v(n,{code:_.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(v(n,{code:_.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let i=this._def.valueType;function u(l){let f=new Set;for(let h of l){if(h.status==="aborted")return I;h.status==="dirty"&&r.dirty(),f.add(h.value)}return{status:r.value,value:f}}o(u,"finalizeSet");let a=[...n.data.values()].map((l,f)=>i._parse(new ke(n,l,n.path,f)));return n.common.async?Promise.all(a).then(l=>u(l)):u(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:P.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:P.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Xt.create=(t,e)=>new Xt({valueType:t,minSize:null,maxSize:null,typeName:N.ZodSet,...j(e)});var En=class t extends M{static{o(this,"ZodFunction")}constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==A.function)return v(r,{code:_.invalid_type,expected:A.function,received:r.parsedType}),I;function n(a,l){return pn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Dn(),Zt].filter(f=>!!f),issueData:{code:_.invalid_arguments,argumentsError:l}})}o(n,"makeArgsIssue");function s(a,l){return pn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Dn(),Zt].filter(f=>!!f),issueData:{code:_.invalid_return_type,returnTypeError:l}})}o(s,"makeReturnsIssue");let i={errorMap:r.common.contextualErrorMap},u=r.data;if(this._def.returns instanceof nt){let a=this;return Ee(async function(...l){let f=new Ae([]),h=await a._def.args.parseAsync(l,i).catch(y=>{throw f.addIssue(n(l,y)),f}),g=await Reflect.apply(u,this,h);return await a._def.returns._def.type.parseAsync(g,i).catch(y=>{throw f.addIssue(s(g,y)),f})})}else{let a=this;return Ee(function(...l){let f=a._def.args.safeParse(l,i);if(!f.success)throw new Ae([n(l,f.error)]);let h=Reflect.apply(u,this,f.data),g=a._def.returns.safeParse(h,i);if(!g.success)throw new Ae([s(h,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Ge.create(e).rest(Ye.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||Ge.create([]).rest(Ye.create()),returns:r||Ye.create(),typeName:N.ZodFunction,...j(n)})}},St=class extends M{static{o(this,"ZodLazy")}get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};St.create=(t,e)=>new St({getter:t,typeName:N.ZodLazy,...j(e)});var vt=class extends M{static{o(this,"ZodLiteral")}_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return v(r,{received:r.data,code:_.invalid_literal,expected:this._def.value}),I}return{status:"valid",value:e.data}}get value(){return this._def.value}};vt.create=(t,e)=>new vt({value:t,typeName:N.ZodLiteral,...j(e)});function Su(t,e){return new At({values:t,typeName:N.ZodEnum,...j(e)})}o(Su,"createZodEnum");var At=class t extends M{static{o(this,"ZodEnum")}constructor(){super(...arguments),Sr.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return v(r,{expected:G.joinValues(n),received:r.parsedType,code:_.invalid_type}),I}if(mn(this,Sr,"f")||bu(this,Sr,new Set(this._def.values),"f"),!mn(this,Sr,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return v(r,{received:r.data,code:_.invalid_enum_value,options:n}),I}return Ee(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};Sr=new WeakMap;At.create=Su;var Tt=class extends M{static{o(this,"ZodNativeEnum")}constructor(){super(...arguments),vr.set(this,void 0)}_parse(e){let r=G.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==A.string&&n.parsedType!==A.number){let s=G.objectValues(r);return v(n,{expected:G.joinValues(s),received:n.parsedType,code:_.invalid_type}),I}if(mn(this,vr,"f")||bu(this,vr,new Set(G.getValidEnumValues(this._def.values)),"f"),!mn(this,vr,"f").has(e.data)){let s=G.objectValues(r);return v(n,{received:n.data,code:_.invalid_enum_value,options:s}),I}return Ee(e.data)}get enum(){return this._def.values}};vr=new WeakMap;Tt.create=(t,e)=>new Tt({values:t,typeName:N.ZodNativeEnum,...j(e)});var nt=class extends M{static{o(this,"ZodPromise")}unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==A.promise&&r.common.async===!1)return v(r,{code:_.invalid_type,expected:A.promise,received:r.parsedType}),I;let n=r.parsedType===A.promise?r.data:Promise.resolve(r.data);return Ee(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};nt.create=(t,e)=>new nt({type:t,typeName:N.ZodPromise,...j(e)});var Te=class extends M{static{o(this,"ZodEffects")}innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===N.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:o(u=>{v(n,u),u.fatal?r.abort():r.dirty()},"addIssue"),get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let u=s.transform(n.data,i);if(n.common.async)return Promise.resolve(u).then(async a=>{if(r.value==="aborted")return I;let l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?I:l.status==="dirty"||r.value==="dirty"?Vt(l.value):l});{if(r.value==="aborted")return I;let a=this._def.schema._parseSync({data:u,path:n.path,parent:n});return a.status==="aborted"?I:a.status==="dirty"||r.value==="dirty"?Vt(a.value):a}}if(s.type==="refinement"){let u=o(a=>{let l=s.refinement(a,i);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a},"executeRefinement");if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?I:(a.status==="dirty"&&r.dirty(),u(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?I:(a.status==="dirty"&&r.dirty(),u(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!yt(u))return u;let a=s.transform(u.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>yt(u)?Promise.resolve(s.transform(u.value,i)).then(a=>({status:r.value,value:a})):u);G.assertNever(s)}};Te.create=(t,e,r)=>new Te({schema:t,typeName:N.ZodEffects,effect:e,...j(r)});Te.createWithPreprocess=(t,e,r)=>new Te({schema:e,effect:{type:"preprocess",transform:t},typeName:N.ZodEffects,...j(r)});var Pe=class extends M{static{o(this,"ZodOptional")}_parse(e){return this._getType(e)===A.undefined?Ee(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Pe.create=(t,e)=>new Pe({innerType:t,typeName:N.ZodOptional,...j(e)});var qe=class extends M{static{o(this,"ZodNullable")}_parse(e){return this._getType(e)===A.null?Ee(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};qe.create=(t,e)=>new qe({innerType:t,typeName:N.ZodNullable,...j(e)});var Lt=class extends M{static{o(this,"ZodDefault")}_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===A.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Lt.create=(t,e)=>new Lt({innerType:t,typeName:N.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...j(e)});var Ot=class extends M{static{o(this,"ZodCatch")}_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ar(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ae(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ae(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Ot.create=(t,e)=>new Ot({innerType:t,typeName:N.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...j(e)});var Qt=class extends M{static{o(this,"ZodNaN")}_parse(e){if(this._getType(e)!==A.nan){let n=this._getOrReturnCtx(e);return v(n,{code:_.invalid_type,expected:A.nan,received:n.parsedType}),I}return{status:"valid",value:e.data}}};Qt.create=t=>new Qt({typeName:N.ZodNaN,...j(t)});var GD=Symbol("zod_brand"),Tr=class extends M{static{o(this,"ZodBranded")}_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Lr=class t extends M{static{o(this,"ZodPipeline")}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return o(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?I:i.status==="dirty"?(r.dirty(),Vt(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})},"handleAsync")();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?I:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:N.ZodPipeline})}},Pt=class extends M{static{o(this,"ZodReadonly")}_parse(e){let r=this._def.innerType._parse(e),n=o(s=>(yt(s)&&(s.value=Object.freeze(s.value)),s),"freeze");return Ar(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};Pt.create=(t,e)=>new Pt({innerType:t,typeName:N.ZodReadonly,...j(e)});function Eu(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}o(Eu,"cleanParams");function vu(t,e={},r){return t?rt.create().superRefine((n,s)=>{var i,u;let a=t(n);if(a instanceof Promise)return a.then(l=>{var f,h;if(!l){let g=Eu(e,n),m=(h=(f=g.fatal)!==null&&f!==void 0?f:r)!==null&&h!==void 0?h:!0;s.addIssue({code:"custom",...g,fatal:m})}});if(!a){let l=Eu(e,n),f=(u=(i=l.fatal)!==null&&i!==void 0?i:r)!==null&&u!==void 0?u:!0;s.addIssue({code:"custom",...l,fatal:f})}}):rt.create()}o(vu,"custom");var qD={object:ve.lazycreate},N;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(N||(N={}));var HD=o((t,e={message:`Input not instance of ${t.name}`})=>vu(r=>r instanceof t,e),"instanceOfType"),Au=tt.create,Tu=gt.create,zD=Qt.create,WD=Et.create,Lu=Ft.create,VD=Ct.create,ZD=Yt.create,YD=bt.create,JD=wt.create,KD=rt.create,XD=Ye.create,QD=Ie.create,ep=Jt.create,tp=Je.create,rp=ve.create,np=ve.strictCreate,sp=_t.create,ip=yn.create,op=xt.create,up=Ge.create,ap=gn.create,cp=Kt.create,lp=Xt.create,fp=En.create,hp=St.create,dp=vt.create,Dp=At.create,pp=Tt.create,mp=nt.create,Fu=Te.create,yp=Pe.create,gp=qe.create,Ep=Te.createWithPreprocess,Fp=Lr.create,Cp=o(()=>Au().optional(),"ostring"),bp=o(()=>Tu().optional(),"onumber"),wp=o(()=>Lu().optional(),"oboolean"),_p={string:o(t=>tt.create({...t,coerce:!0}),"string"),number:o(t=>gt.create({...t,coerce:!0}),"number"),boolean:o(t=>Ft.create({...t,coerce:!0}),"boolean"),bigint:o(t=>Et.create({...t,coerce:!0}),"bigint"),date:o(t=>Ct.create({...t,coerce:!0}),"date")},xp=I,q=Object.freeze({__proto__:null,defaultErrorMap:Zt,setErrorMap:ED,getErrorMap:Dn,makeIssue:pn,EMPTY_PATH:FD,addIssueToContext:v,ParseStatus:ye,INVALID:I,DIRTY:Vt,OK:Ee,isAborted:Rs,isDirty:Bs,isValid:yt,isAsync:Ar,get util(){return G},get objectUtil(){return ks},ZodParsedType:A,getParsedType:Ze,ZodType:M,datetimeRegex:xu,ZodString:tt,ZodNumber:gt,ZodBigInt:Et,ZodBoolean:Ft,ZodDate:Ct,ZodSymbol:Yt,ZodUndefined:bt,ZodNull:wt,ZodAny:rt,ZodUnknown:Ye,ZodNever:Ie,ZodVoid:Jt,ZodArray:Je,ZodObject:ve,ZodUnion:_t,ZodDiscriminatedUnion:yn,ZodIntersection:xt,ZodTuple:Ge,ZodRecord:gn,ZodMap:Kt,ZodSet:Xt,ZodFunction:En,ZodLazy:St,ZodLiteral:vt,ZodEnum:At,ZodNativeEnum:Tt,ZodPromise:nt,ZodEffects:Te,ZodTransformer:Te,ZodOptional:Pe,ZodNullable:qe,ZodDefault:Lt,ZodCatch:Ot,ZodNaN:Qt,BRAND:GD,ZodBranded:Tr,ZodPipeline:Lr,ZodReadonly:Pt,custom:vu,Schema:M,ZodSchema:M,late:qD,get ZodFirstPartyTypeKind(){return N},coerce:_p,any:KD,array:tp,bigint:WD,boolean:Lu,date:VD,discriminatedUnion:ip,effect:Fu,enum:Dp,function:fp,instanceof:HD,intersection:op,lazy:hp,literal:dp,map:cp,nan:zD,nativeEnum:pp,never:QD,null:JD,nullable:gp,number:Tu,object:rp,oboolean:wp,onumber:bp,optional:yp,ostring:Cp,pipeline:Fp,preprocess:Ep,promise:mp,record:ap,set:lp,strictObject:np,string:Au,symbol:ZD,transformer:Fu,tuple:up,undefined:YD,union:sp,unknown:XD,void:ep,NEVER:xp,ZodIssueCode:_,quotelessJson:gD,ZodError:Ae});var dw=o(t=>t==null,"isNil"),er=o(t=>typeof t=="string","isString"),kt=o(t=>typeof t=="object"&&t!==null,"isObject"),Ou=Array.isArray,Pu=o(t=>typeof t=="function","isFunction"),Dw=o(t=>q.array(q.string()).safeParse(t).success,"isStringArray"),pw=o(t=>t instanceof Error,"isError"),mw=o(t=>q.object({type:q.string(),code:q.number(),reason:q.string(),wasClean:q.boolean()}).safeParse(t).success,"isCloseEvent"),yw=o(t=>q.object({type:q.string(),message:q.string(),error:q.any()}).safeParse(t).success,"isErrorEvent"),gw=o(t=>q.union([q.object({data:q.record(q.unknown())}),q.object({errors:q.array(q.object({message:q.string()}))}),q.object({data:q.record(q.unknown()),errors:q.array(q.object({message:q.string()}))})]).safeParse(t).success,"isGraphQLResult"),Ew=o(t=>q.array(q.object({message:q.string(),extensions:q.record(q.unknown()).nullish().transform(e=>e??{})})).min(1).safeParse(t).success,"isGraphQLErrors"),Fw=o(t=>{throw new Error(`Unexpected value: ${t}`)},"isNever"),Cw=o(t=>t instanceof Error&&t.name==="AbortError"||t instanceof Event&&t.type==="abort","isAbortError"),bw=o(t=>kt(t)&&"code"in t&&t.code==="ENOENT","isENOENTError"),ww=o(t=>kt(t)&&"code"in t&&t.code==="ENOTEMPTY","isENOTEMPTYError"),_w=o(t=>kt(t)&&"code"in t&&t.code==="ENOTDIR","isENOTDIRError"),xw=o(t=>kt(t)&&"code"in t&&t.code==="EEXIST","isEEXISTError"),Sw=o(t=>[".js",".jsx",".cjs",".mjs"].some(e=>t.endsWith(e)),"isJavaScriptFile"),vw=o(t=>[".ts",".tsx",".cts",".mts"].some(e=>t.endsWith(e)&&!t.endsWith(".d.ts")),"isTypeScriptFile"),Aw=o(t=>t.endsWith(".gelly"),"isGellyFile");c();c();import Pr from"node:path";c();import Ap from"node:process";import Tp from"node:path";import Ww,{promises as ku}from"node:fs";import{fileURLToPath as Lp}from"node:url";c();c();c();var Is=class{static{o(this,"Node")}value;next;constructor(e){this.value=e}},Or=class{static{o(this,"Queue")}#r;#n;#e;constructor(){this.clear()}enqueue(e){let r=new Is(e);this.#r?(this.#n.next=r,this.#n=r):(this.#r=r,this.#n=r),this.#e++}dequeue(){let e=this.#r;if(e)return this.#r=this.#r.next,this.#e--,e.value}peek(){if(this.#r)return this.#r.value}clear(){this.#r=void 0,this.#n=void 0,this.#e=0}get size(){return this.#e}*[Symbol.iterator](){let e=this.#r;for(;e;)yield e.value,e=e.next}};function Fn(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new Or,r=0,n=o(()=>{r--,e.size>0&&e.dequeue()()},"next"),s=o(async(a,l,f)=>{r++;let h=(async()=>a(...f))();l(h);try{await h}catch{}n()},"run"),i=o((a,l,f)=>{e.enqueue(s.bind(void 0,a,l,f)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},"enqueue"),u=o((a,...l)=>new Promise(f=>{i(a,f,l)}),"generator");return Object.defineProperties(u,{activeCount:{get:o(()=>r,"get")},pendingCount:{get:o(()=>e.size,"get")},clearQueue:{value:o(()=>{e.clear()},"value")}}),u}o(Fn,"pLimit");var Cn=class extends Error{static{o(this,"EndError")}constructor(e){super(),this.value=e}},Sp=o(async(t,e)=>e(await t),"testElement"),vp=o(async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new Cn(e[0]);return!1},"finder");async function $s(t,e,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:n=!0}={}){let s=Fn(r),i=[...t].map(a=>[a,s(Sp,a,e)]),u=Fn(n?1:Number.POSITIVE_INFINITY);try{await Promise.all(i.map(a=>u(vp,a)))}catch(a){if(a instanceof Cn)return a.value;throw a}}o($s,"pLocate");var Ru={directory:"isDirectory",file:"isFile"};function Op(t){if(!Object.hasOwnProperty.call(Ru,t))throw new Error(`Invalid type specified: ${t}`)}o(Op,"checkType");var Pp=o((t,e)=>e[Ru[t]](),"matchType"),kp=o(t=>t instanceof URL?Lp(t):t,"toPath");async function js(t,{cwd:e=Ap.cwd(),type:r="file",allowSymlinks:n=!0,concurrency:s,preserveOrder:i}={}){Op(r),e=kp(e);let u=n?ku.stat:ku.lstat;return $s(t,async a=>{try{let l=await u(Tp.resolve(e,a));return Pp(r,l)}catch{return!1}},{concurrency:s,preserveOrder:i})}o(js,"locatePath");c();import{fileURLToPath as Rp}from"node:url";function Ms(t){return t instanceof URL?Rp(t):t}o(Ms,"toPath");c();var Bp=Symbol("findUpStop");async function Np(t,e={}){let r=Pr.resolve(Ms(e.cwd)??""),{root:n}=Pr.parse(r),s=Pr.resolve(r,Ms(e.stopAt??n)),i=e.limit??Number.POSITIVE_INFINITY,u=[t].flat(),a=o(async f=>{if(typeof t!="function")return js(u,f);let h=await t(f.cwd);return typeof h=="string"?js([h],f):h},"runMatcher"),l=[];for(;;){let f=await a({...e,cwd:r});if(f===Bp||(f&&l.push(Pr.resolve(r,f)),r===s||l.length>=i))break;r=Pr.dirname(r)}return l}o(Np,"findUpMultiple");async function Bu(t,e={}){return(await Np(t,{...e,limit:1}))[0]}o(Bu,"findUp");var Hl=Se(Tc(),1),zl=Se(ql(),1);import ig from"node:assert";import{fileURLToPath as og}from"node:url";var Ci=await Bu("package.json",{cwd:og(import.meta.url)});ig(Ci!==void 0,"Could not find package.json for the ggt package.");var Wl=Ci,Un=await Hl.default.readJson(Ci);(0,zl.default)(Un,!0);c();c();var ug=o((t,e,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let s=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(e,r);!ag(s,i)&&n||Object.defineProperty(t,r,i)},"copyProperty"),ag=o(function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},"canCopyProperty"),cg=o((t,e)=>{let r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},"changePrototype"),lg=o((t,e)=>`/* Wrapped ${t}*/
|
|
19
|
+
${e}`,"wrappedToString"),fg=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),hg=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),dg=o((t,e,r)=>{let n=r===""?"":`with ${r.trim()}() `,s=lg.bind(null,n,e.toString());Object.defineProperty(s,"name",hg);let{writable:i,enumerable:u,configurable:a}=fg;Object.defineProperty(t,"toString",{value:s,writable:i,enumerable:u,configurable:a})},"changeToString");function cr(t,e,{ignoreNonConfigurable:r=!1}={}){let{name:n}=t;for(let s of Reflect.ownKeys(e))ug(t,e,s,r);return cg(t,e),dg(t,e,n),t}o(cr,"mimicFunction");import Dg from"node:assert";c();var pg=new Set;var mg=o((...t)=>String(t[0]),"MemoFirstArg"),Zl=o((...t)=>t.map(String).join(":"),"MemoAllArgs");function Yl(t,e){let r;e?r=t:(e=t,r=mg);let n=new Map,s=o((...i)=>{let u=r(...i);if(n.has(u))return n.get(u);Dg(e,"fn shouldn't be undefined");let a=e(...i);return n.set(u,a),a},"memoized");return s.clear=n.clear.bind(n),pg.add(s),cr(s,e),s}o(Yl,"memo");var kS=o((t,e)=>{let r,n,s,i=o((...u)=>{n=o(()=>(n=void 0,r=void 0,s?s=s.then(()=>e(...u)).catch(Vl).finally(()=>s=void 0):s=e(...u).catch(Vl).finally(()=>s=void 0),s),"nextCall"),clearTimeout(r),r=setTimeout(n,t)},"debouncedAsync");return i.flush=async()=>{n&&await n()},cr(i,e),i},"debounceAsync");var Gn=o((t,...e)=>Pu(t)?t(...e):t,"unthunk"),Vl=o((...t)=>{},"noop");c();c();import Xl from"node:process";import Cg from"node:os";import bg from"node:fs";c();import Eg from"node:fs";c();import Jl from"node:fs";var bi;function yg(){try{return Jl.statSync("/.dockerenv"),!0}catch{return!1}}o(yg,"hasDockerEnv");function gg(){try{return Jl.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}o(gg,"hasDockerCGroup");function wi(){return bi===void 0&&(bi=yg()||gg()),bi}o(wi,"isDocker");var _i,Fg=o(()=>{try{return Eg.statSync("/run/.containerenv"),!0}catch{return!1}},"hasContainerEnv");function qn(){return _i===void 0&&(_i=Fg()||wi()),_i}o(qn,"isInsideContainer");var Kl=o(()=>{if(Xl.platform!=="linux")return!1;if(Cg.release().toLowerCase().includes("microsoft"))return!qn();try{return bg.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!qn():!1}catch{return!1}},"isWsl"),xi=Xl.env.__IS_WSL_TEST__?Kl:Kl();import lr from"node:os";import je from"node:path";import V from"node:process";c();import wg from"node:assert";c();var Ql=o((t,e,r)=>Math.max(e,Math.min(r,t)),"clamp");var ft={TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,PRINT:6},ef=Yl(Zl,(t,e)=>{let r=q.enum(["TRACE","DEBUG","INFO","WARN","ERROR"]).transform(n=>ft[n]).safeParse(String(t).toUpperCase());return r.success||(r=q.number().min(ft.TRACE).max(ft.ERROR).safeParse(Number(t))),r.success?r.data:e}),ov=o(t=>(wg(t>0,"verbosity must be greater than 0"),Ql(ft.INFO+1-t,ft.TRACE,ft.INFO)),"verbosityToLevel");var Hn={get logLevel(){return ef(V.env.GGT_LOG_LEVEL,ft.PRINT)},get logFormat(){return V.env.GGT_LOG_FORMAT==="json"?"json":"pretty"},get versionFull(){return`${Un.name}/${Un.version} ${this.platform}-${this.arch} node-${V.version}`},get arch(){return lr.arch()==="ia32"?"x86":lr.arch()},get platform(){return xi?"wsl":lr.platform()},get windows(){return V.platform==="win32"},get windowsOrWsl(){return this.windows||xi},get macos(){return V.platform==="darwin"},get shell(){let t=V.env.SHELL??lr.userInfo().shell?.split(je.sep).pop();return t?t.split("/").at(-1):this.windows&&V.env.COMSPEC?V.env.COMSPEC.split(/\\|\//).at(-1):"unknown"},get homeDir(){if(V.env.HOME)return V.env.HOME;if(this.windows){if(V.env.HOMEDRIVE&&V.env.HOMEPATH)return je.join(V.env.HOMEDRIVE,V.env.HOMEPATH);if(V.env.USERPROFILE)return V.env.USERPROFILE}return lr.homedir()||lr.tmpdir()},get configDir(){if(V.env.GGT_CONFIG_DIR)return V.env.GGT_CONFIG_DIR;let t=V.env.XDG_CONFIG_HOME||this.windows&&V.env.LOCALAPPDATA||je.join(this.homeDir,".config");return je.join(t,"ggt")},get defaultsConfigFile(){let t=V.env.GGT_CONFIG;return t||(t=_g("defaults.json")),t},get cacheDir(){if(V.env.GGT_CACHE_DIR)return V.env.GGT_CACHE_DIR;if(this.macos)return je.join(this.homeDir,"Library/Caches/ggt");let t=V.env.XDG_CACHE_HOME||this.windows&&V.env.LOCALAPPDATA||je.join(this.homeDir,".cache");return je.join(t,"ggt")},get dataDir(){if(V.env.GGT_DATA_DIR)return V.env.GGT_DATA_DIR;let t=V.env.XDG_DATA_HOME||this.windows&&V.env.LOCALAPPDATA||je.join(this.homeDir,".local/share");return je.join(t,"ggt")},domains:{get app(){return V.env.GGT_GADGET_APP_DOMAIN||(xr.productionLike?"gadget.app":"ggt.pub")},get services(){return V.env.GGT_GADGET_SERVICES_DOMAIN||(xr.productionLike?"app.gadget.dev":"app.ggt.dev")}}},_g=o((...t)=>je.join(Hn.configDir,...t),"configPath"),yv=o((...t)=>je.join(Hn.homeDir,...t),"homePath");c();c();import uf from"node:process";c();import Zn from"node:process";c();var zn=new WeakMap,tf=o((t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,n=0,s=t.displayName||t.name||"<anonymous>",i=o(function(...u){if(zn.set(i,++n),n===1)r=t.apply(this,u),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${s}\` can only be called once`);return r},"onetime");return cr(i,t),zn.set(i,n),i},"onetime");tf.callCount=t=>{if(!zn.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return zn.get(t)};var rf=tf;c();c();var Nt=[];Nt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Nt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Nt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Wn=o(t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function","processOk"),Si=Symbol.for("signal-exit emitter"),vi=globalThis,xg=Object.defineProperty.bind(Object),Ai=class{static{o(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(vi[Si])return vi[Si];xg(vi,Si,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,r){this.listeners[e].push(r)}removeListener(e,r){let n=this.listeners[e],s=n.indexOf(r);s!==-1&&(s===0&&n.length===1?n.length=0:n.splice(s,1))}emit(e,r,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let s=!1;for(let i of this.listeners[e])s=i(r,n)===!0||s;return e==="exit"&&(s=this.emit("afterExit",r,n)||s),s}},Vn=class{static{o(this,"SignalExitBase")}},Sg=o(t=>({onExit(e,r){return t.onExit(e,r)},load(){return t.load()},unload(){return t.unload()}}),"signalExitWrap"),Ti=class extends Vn{static{o(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}},Li=class extends Vn{static{o(this,"SignalExit")}#r=Oi.platform==="win32"?"SIGINT":"SIGHUP";#n=new Ai;#e;#a;#w;#g={};#i=!1;constructor(e){super(),this.#e=e,this.#g={};for(let r of Nt)this.#g[r]=()=>{let n=this.#e.listeners(r),{count:s}=this.#n,i=e;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(s+=i.__signal_exit_emitter__.count),n.length===s){this.unload();let u=this.#n.emit("exit",null,r),a=r==="SIGHUP"?this.#r:r;u||e.kill(e.pid,a)}};this.#w=e.reallyExit,this.#a=e.emit}onExit(e,r){if(!Wn(this.#e))return()=>{};this.#i===!1&&this.load();let n=r?.alwaysLast?"afterExit":"exit";return this.#n.on(n,e),()=>{this.#n.removeListener(n,e),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#n.count+=1;for(let e of Nt)try{let r=this.#g[e];r&&this.#e.on(e,r)}catch{}this.#e.emit=(e,...r)=>this.#u(e,...r),this.#e.reallyExit=e=>this.#D(e)}}unload(){this.#i&&(this.#i=!1,Nt.forEach(e=>{let r=this.#g[e];if(!r)throw new Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,r)}catch{}}),this.#e.emit=this.#a,this.#e.reallyExit=this.#w,this.#n.count-=1)}#D(e){return Wn(this.#e)?(this.#e.exitCode=e||0,this.#n.emit("exit",this.#e.exitCode,null),this.#w.call(this.#e,this.#e.exitCode)):0}#u(e,...r){let n=this.#a;if(e==="exit"&&Wn(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let s=n.call(this.#e,e,...r);return this.#n.emit("exit",this.#e.exitCode,null),s}else return n.call(this.#e,e,...r)}},Oi=globalThis.process,{onExit:nf,load:Av,unload:Tv}=Sg(Wn(Oi)?new Li(Oi):new Ti);var sf=Zn.stderr.isTTY?Zn.stderr:Zn.stdout.isTTY?Zn.stdout:void 0,vg=sf?rf(()=>{nf(()=>{sf.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},of=vg;var Yn=!1,fr={};fr.show=(t=uf.stderr)=>{t.isTTY&&(Yn=!1,t.write("\x1B[?25h"))};fr.hide=(t=uf.stderr)=>{t.isTTY&&(of(),Yn=!0,t.write("\x1B[?25l"))};fr.toggle=(t,e)=>{t!==void 0&&(Yn=t),Yn?fr.show(e):fr.hide(e)};var Pi=fr;c();function ki({stream:t=process.stdout}={}){return!!(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}o(ki,"isInteractive");import Ii from"node:assert";import Me from"node:process";c();import ze from"node:process";var Ag=3,Ri=class{static{o(this,"StdinDiscarder")}#r=0;start(){this.#r++,this.#r===1&&this.#n()}stop(){if(this.#r<=0)throw new Error("`stop` called more times than `start`");this.#r--,this.#r===0&&this.#e()}#n(){ze.platform==="win32"||!ze.stdin.isTTY||(ze.stdin.setRawMode(!0),ze.stdin.on("data",this.#a),ze.stdin.resume())}#e(){ze.stdin.isTTY&&(ze.stdin.off("data",this.#a),ze.stdin.pause(),ze.stdin.setRawMode(!1))}#a(e){e[0]===Ag&&ze.emit("SIGINT")}},Tg=new Ri,Bi=Tg;c();c();c();function Ni({onlyFirst:t=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,t?void 0:"g")}o(Ni,"ansiRegex");var Lg=Ni();function It(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Lg,"")}o(It,"stripAnsi");c();c();function af(t){return t===161||t===164||t===167||t===168||t===170||t===173||t===174||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||t===198||t===208||t===215||t===216||t>=222&&t<=225||t===230||t>=232&&t<=234||t===236||t===237||t===240||t===242||t===243||t>=247&&t<=250||t===252||t===254||t===257||t===273||t===275||t===283||t===294||t===295||t===299||t>=305&&t<=307||t===312||t>=319&&t<=322||t===324||t>=328&&t<=331||t===333||t===338||t===339||t===358||t===359||t===363||t===462||t===464||t===466||t===468||t===470||t===472||t===474||t===476||t===593||t===609||t===708||t===711||t>=713&&t<=715||t===717||t===720||t>=728&&t<=731||t===733||t===735||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||t===1025||t>=1040&&t<=1103||t===1105||t===8208||t>=8211&&t<=8214||t===8216||t===8217||t===8220||t===8221||t>=8224&&t<=8226||t>=8228&&t<=8231||t===8240||t===8242||t===8243||t===8245||t===8251||t===8254||t===8308||t===8319||t>=8321&&t<=8324||t===8364||t===8451||t===8453||t===8457||t===8467||t===8470||t===8481||t===8482||t===8486||t===8491||t===8531||t===8532||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||t===8585||t>=8592&&t<=8601||t===8632||t===8633||t===8658||t===8660||t===8679||t===8704||t===8706||t===8707||t===8711||t===8712||t===8715||t===8719||t===8721||t===8725||t===8730||t>=8733&&t<=8736||t===8739||t===8741||t>=8743&&t<=8748||t===8750||t>=8756&&t<=8759||t===8764||t===8765||t===8776||t===8780||t===8786||t===8800||t===8801||t>=8804&&t<=8807||t===8810||t===8811||t===8814||t===8815||t===8834||t===8835||t===8838||t===8839||t===8853||t===8857||t===8869||t===8895||t===8978||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||t===9632||t===9633||t>=9635&&t<=9641||t===9650||t===9651||t===9654||t===9655||t===9660||t===9661||t===9664||t===9665||t>=9670&&t<=9672||t===9675||t>=9678&&t<=9681||t>=9698&&t<=9701||t===9711||t===9733||t===9734||t===9737||t===9742||t===9743||t===9756||t===9758||t===9792||t===9794||t===9824||t===9825||t>=9827&&t<=9829||t>=9831&&t<=9834||t===9836||t===9837||t===9839||t===9886||t===9887||t===9919||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||t===9955||t===9960||t===9961||t>=9963&&t<=9969||t===9972||t>=9974&&t<=9977||t===9979||t===9980||t===9982||t===9983||t===10045||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||t===65533||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||t===127375||t===127376||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}o(af,"isAmbiguous");function cf(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}o(cf,"isFullWidth");function lf(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9800&&t<=9811||t===9855||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12771||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=19903||t>=19968&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t===94192||t===94193||t>=94208&&t<=100343||t>=100352&&t<=101589||t>=101632&&t<=101640||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128727||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129672||t>=129680&&t<=129725||t>=129727&&t<=129733||t>=129742&&t<=129755||t>=129760&&t<=129768||t>=129776&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}o(lf,"isWide");function Og(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}o(Og,"validate");function ff(t,{ambiguousAsWide:e=!1}={}){return Og(t),cf(t)||lf(t)||e&&af(t)?2:1}o(ff,"eastAsianWidth");var Df=Se(df(),1);var Pg=new Intl.Segmenter,kg=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function pe(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=e;if(n||(t=It(t)),t.length===0)return 0;let s=0,i={ambiguousAsWide:!r};for(let{segment:u}of Pg.segment(t)){let a=u.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!kg.test(u)){if((0,Df.default)().test(u)){s+=2;continue}s+=ff(a,i)}}return s}o(pe,"stringWidth");var Jn=!1,$i=class{static{o(this,"Output")}lastPrintedLineWasEmpty=!0;lastStickyLineWasEmpty=!0;_promptText="";_spinnerText="";_footerText="";_stickyTextLinesToClear=0;constructor(){Me.stdout.on("error",e=>{if(!(kt(e)&&"code"in e&&e.code==="EPIPE"))throw e}),Me.stderr.on("error",e=>{if(!(kt(e)&&"code"in e&&e.code==="EPIPE"))throw e})}get isInteractive(){return!xr.testLike&&ki({stream:Me.stdout})}writeStdout(e){this._clearStickyText(),e=this._stripUnnecessaryNewLines(e,this.lastPrintedLineWasEmpty),this._writeStdout(e),this.lastPrintedLineWasEmpty=e===`
|
|
20
20
|
`||e.endsWith(`
|
|
21
21
|
|
|
22
22
|
`),this.lastStickyLineWasEmpty=this.lastPrintedLineWasEmpty,this._writeStickyText()}writeStderr(e){this._clearStickyText(),e=this._stripUnnecessaryNewLines(e,this.lastPrintedLineWasEmpty),this._writeStderr(e),this.lastPrintedLineWasEmpty=e===`
|
|
@@ -36,7 +36,7 @@ ${e}`,"wrappedToString"),fg=Object.getOwnPropertyDescriptor(Function.prototype,"
|
|
|
36
36
|
|
|
37
37
|
`))!==-1;)e=e.slice(0,n)+e.slice(n+1);if(r)for(;e.startsWith(`
|
|
38
38
|
`);)e=e.slice(1);return e}},ji=new $i;c();function Mi(t,e=1,r={}){let{indent:n=" ",includeEmptyLines:s=!1}=r;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(e<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${e}\``);if(typeof n!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n}\``);if(e===0)return t;let i=s?/^/gm:/^(?!\s*$)/gm;return t.replace(i,n.repeat(e))}o(Mi,"indentString");c();c();import ts from"node:process";c();function Kn(t){let e=0;for(let r of t.split(`
|
|
39
|
-
`))e=Math.max(e,pe(r));return e}o(Kn,"widestLine");var Hf=Se(Gi(),1);c();var Bg=/[\p{Lu}]/u,Ng=/[\p{Ll}]/u,yf=/^[\p{Lu}](?![\p{Lu}])/gu,Ff=/([\p{Alpha}\p{N}_]|$)/u,qi=/[_.\- ]+/,Ig=new RegExp("^"+qi.source),gf=new RegExp(qi.source+Ff.source,"gu"),Ef=new RegExp("\\d+"+Ff.source,"gu"),$g=o((t,e,r,n)=>{let s=!1,i=!1,u=!1,a=!1;for(let l=0;l<t.length;l++){let f=t[l];a=l>2?t[l-3]==="-":!0,s&&Bg.test(f)?(t=t.slice(0,l)+"-"+t.slice(l),s=!1,u=i,i=!0,l++):i&&u&&Ng.test(f)&&(!a||n)?(t=t.slice(0,l-1)+"-"+t.slice(l-1),u=i,i=!1,s=!0):(s=e(f)===f&&r(f)!==f,u=i,i=r(f)===f&&e(f)!==f)}return t},"preserveCamelCase"),jg=o((t,e)=>(yf.lastIndex=0,t.replaceAll(yf,r=>e(r))),"preserveConsecutiveUppercase"),Mg=o((t,e)=>(gf.lastIndex=0,Ef.lastIndex=0,t.replaceAll(Ef,(r,n,s)=>["_","-"].includes(t.charAt(s+r.length))?r:e(r)).replaceAll(gf,(r,n)=>e(n))),"postProcess");function Hi(t,e){if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");if(e={pascalCase:!1,preserveConsecutiveUppercase:!1,...e},Array.isArray(t)?t=t.map(i=>i.trim()).filter(i=>i.length).join("-"):t=t.trim(),t.length===0)return"";let r=e.locale===!1?i=>i.toLowerCase():i=>i.toLocaleLowerCase(e.locale),n=e.locale===!1?i=>i.toUpperCase():i=>i.toLocaleUpperCase(e.locale);return t.length===1?qi.test(t)?"":e.pascalCase?n(t):r(t):(t!==r(t)&&(t=$g(t,r,n,e.preserveConsecutiveUppercase)),t=t.replace(Ig,""),t=e.preserveConsecutiveUppercase?jg(t,r):r(t),e.pascalCase&&(t=n(t.charAt(0))+t.slice(1)),Mg(t,n))}o(Hi,"camelCase");var Yi=Se(Pf(),1);c();c();var kf=o((t=0)=>e=>`\x1B[${e+t}m`,"wrapAnsi16"),Rf=o((t=0)=>e=>`\x1B[${38+t};5;${e}m`,"wrapAnsi256"),Bf=o((t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,"wrapAnsi16m"),ee={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},
|
|
39
|
+
`))e=Math.max(e,pe(r));return e}o(Kn,"widestLine");var Hf=Se(Gi(),1);c();var Bg=/[\p{Lu}]/u,Ng=/[\p{Ll}]/u,yf=/^[\p{Lu}](?![\p{Lu}])/gu,Ff=/([\p{Alpha}\p{N}_]|$)/u,qi=/[_.\- ]+/,Ig=new RegExp("^"+qi.source),gf=new RegExp(qi.source+Ff.source,"gu"),Ef=new RegExp("\\d+"+Ff.source,"gu"),$g=o((t,e,r,n)=>{let s=!1,i=!1,u=!1,a=!1;for(let l=0;l<t.length;l++){let f=t[l];a=l>2?t[l-3]==="-":!0,s&&Bg.test(f)?(t=t.slice(0,l)+"-"+t.slice(l),s=!1,u=i,i=!0,l++):i&&u&&Ng.test(f)&&(!a||n)?(t=t.slice(0,l-1)+"-"+t.slice(l-1),u=i,i=!1,s=!0):(s=e(f)===f&&r(f)!==f,u=i,i=r(f)===f&&e(f)!==f)}return t},"preserveCamelCase"),jg=o((t,e)=>(yf.lastIndex=0,t.replaceAll(yf,r=>e(r))),"preserveConsecutiveUppercase"),Mg=o((t,e)=>(gf.lastIndex=0,Ef.lastIndex=0,t.replaceAll(Ef,(r,n,s)=>["_","-"].includes(t.charAt(s+r.length))?r:e(r)).replaceAll(gf,(r,n)=>e(n))),"postProcess");function Hi(t,e){if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");if(e={pascalCase:!1,preserveConsecutiveUppercase:!1,...e},Array.isArray(t)?t=t.map(i=>i.trim()).filter(i=>i.length).join("-"):t=t.trim(),t.length===0)return"";let r=e.locale===!1?i=>i.toLowerCase():i=>i.toLocaleLowerCase(e.locale),n=e.locale===!1?i=>i.toUpperCase():i=>i.toLocaleUpperCase(e.locale);return t.length===1?qi.test(t)?"":e.pascalCase?n(t):r(t):(t!==r(t)&&(t=$g(t,r,n,e.preserveConsecutiveUppercase)),t=t.replace(Ig,""),t=e.preserveConsecutiveUppercase?jg(t,r):r(t),e.pascalCase&&(t=n(t.charAt(0))+t.slice(1)),Mg(t,n))}o(Hi,"camelCase");var Yi=Se(Pf(),1);c();c();var kf=o((t=0)=>e=>`\x1B[${e+t}m`,"wrapAnsi16"),Rf=o((t=0)=>e=>`\x1B[${38+t};5;${e}m`,"wrapAnsi256"),Bf=o((t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,"wrapAnsi16m"),ee={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},s1=Object.keys(ee.modifier),Zg=Object.keys(ee.color),Yg=Object.keys(ee.bgColor),i1=[...Zg,...Yg];function Jg(){let t=new Map;for(let[e,r]of Object.entries(ee)){for(let[n,s]of Object.entries(r))ee[n]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[n]=ee[n],t.set(s[0],s[1]);Object.defineProperty(ee,e,{value:r,enumerable:!1})}return Object.defineProperty(ee,"codes",{value:t,enumerable:!1}),ee.color.close="\x1B[39m",ee.bgColor.close="\x1B[49m",ee.color.ansi=kf(),ee.color.ansi256=Rf(),ee.color.ansi16m=Bf(),ee.bgColor.ansi=kf(10),ee.bgColor.ansi256=Rf(10),ee.bgColor.ansi16m=Bf(10),Object.defineProperties(ee,{rgbToAnsi256:{value:o((e,r,n)=>e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),"value"),enumerable:!1},hexToRgb:{value:o(e=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(i=>i+i).join(""));let s=Number.parseInt(n,16);return[s>>16&255,s>>8&255,s&255]},"value"),enumerable:!1},hexToAnsi256:{value:o(e=>ee.rgbToAnsi256(...ee.hexToRgb(e)),"value"),enumerable:!1},ansi256ToAnsi:{value:o(e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,s;if(e>=232)r=((e-232)*10+8)/255,n=r,s=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,s=a%6/5}let i=Math.max(r,n,s)*2;if(i===0)return 30;let u=30+(Math.round(s)<<2|Math.round(n)<<1|Math.round(r));return i===2&&(u+=60),u},"value"),enumerable:!1},rgbToAnsi:{value:o((e,r,n)=>ee.ansi256ToAnsi(ee.rgbToAnsi256(e,r,n)),"value"),enumerable:!1},hexToAnsi:{value:o(e=>ee.ansi256ToAnsi(ee.hexToAnsi256(e)),"value"),enumerable:!1}}),ee}o(Jg,"assembleStyles");var Kg=Jg(),Nf=Kg;var Qn=new Set(["\x1B","\x9B"]),Xg=39,Zi="\x07",jf="[",Qg="]",Mf="m",Xn=`${Qg}8;;`,If=o(t=>`${Qn.values().next().value}${jf}${t}${Mf}`,"wrapAnsiCode"),$f=o(t=>`${Qn.values().next().value}${Xn}${t}${Zi}`,"wrapAnsiHyperlink"),eE=o(t=>t.split(" ").map(e=>pe(e)),"wordLengths"),Vi=o((t,e,r)=>{let n=[...e],s=!1,i=!1,u=pe(It(t.at(-1)));for(let[a,l]of n.entries()){let f=pe(l);if(u+f<=r?t[t.length-1]+=l:(t.push(l),u=0),Qn.has(l)&&(s=!0,i=n.slice(a+1,a+1+Xn.length).join("")===Xn),s){i?l===Zi&&(s=!1,i=!1):l===Mf&&(s=!1);continue}u+=f,u===r&&a<n.length-1&&(t.push(""),u=0)}!u&&t.at(-1).length>0&&t.length>1&&(t[t.length-2]+=t.pop())},"wrapWord"),tE=o(t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(pe(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},"stringVisibleTrimSpacesRight"),rE=o((t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let n="",s,i,u=eE(t),a=[""];for(let[g,m]of t.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a.at(-1).trimStart());let y=pe(a.at(-1));if(g!==0&&(y>=e&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),y=0),(y>0||r.trim===!1)&&(a[a.length-1]+=" ",y++)),r.hard&&u[g]>e){let E=e-y,D=1+Math.floor((u[g]-E-1)/e);Math.floor((u[g]-1)/e)<D&&a.push(""),Vi(a,m,e);continue}if(y+u[g]>e&&y>0&&u[g]>0){if(r.wordWrap===!1&&y<e){Vi(a,m,e);continue}a.push("")}if(y+u[g]>e&&r.wordWrap===!1){Vi(a,m,e);continue}a[a.length-1]+=m}r.trim!==!1&&(a=a.map(g=>tE(g)));let l=a.join(`
|
|
40
40
|
`),f=[...l],h=0;for(let[g,m]of f.entries()){if(n+=m,Qn.has(m)){let{groups:E}=new RegExp(`(?:\\${jf}(?<code>\\d+)m|\\${Xn}(?<uri>.*)${Zi})`).exec(l.slice(h))||{groups:{}};if(E.code!==void 0){let D=Number.parseFloat(E.code);s=D===Xg?void 0:D}else E.uri!==void 0&&(i=E.uri.length===0?void 0:E.uri)}let y=Nf.codes.get(Number(s));f[g+1]===`
|
|
41
41
|
`?(i&&(n+=$f("")),s&&y&&(n+=If(y))):m===`
|
|
42
42
|
`&&(s&&y&&(n+=If(s)),i&&(n+=$f(i))),h+=m.length}return n},"exec");function es(t,e,r){return String(t).normalize().replaceAll(`\r
|
|
@@ -46,7 +46,7 @@ ${e}`,"wrappedToString"),fg=Object.getOwnPropertyDescriptor(Function.prototype,"
|
|
|
46
46
|
`)}o(es,"wrapAnsi");var fE=Se(Gi(),1);var ht=`
|
|
47
47
|
`,Le=" ",Mr="none",zf=o(()=>{let{env:t,stdout:e,stderr:r}=ts;return e?.columns?e.columns:r?.columns?r.columns:t.COLUMNS?Number.parseInt(t.COLUMNS,10):80},"terminalColumns"),Uf=o(t=>typeof t=="number"?{top:t,right:t*3,bottom:t,left:t*3}:{top:0,right:0,bottom:0,left:0,...t},"getObject"),Ur=o(t=>t===Mr?0:2,"getBorderWidth"),nE=o(t=>{let e=["topLeft","topRight","bottomRight","bottomLeft","left","right","top","bottom"],r;if(t===Mr){t={};for(let n of e)t[n]=""}if(typeof t=="string"){if(r=Hf.default[t],!r)throw new TypeError(`Invalid border style: ${t}`)}else{typeof t?.vertical=="string"&&(t.left=t.vertical,t.right=t.vertical),typeof t?.horizontal=="string"&&(t.top=t.horizontal,t.bottom=t.horizontal);for(let n of e)if(t[n]===null||typeof t[n]!="string")throw new TypeError(`Invalid border style: ${n}`);r=t}return r},"getBorderChars"),sE=o((t,e,r)=>{let n="",s=pe(t);switch(r){case"left":{n=t+e.slice(s);break}case"right":{n=e.slice(s)+t;break}default:{e=e.slice(s),e.length%2===1?(e=e.slice(Math.floor(e.length/2)),n=e.slice(1)+t+e):(e=e.slice(e.length/2),n=e+t+e);break}}return n},"makeTitle"),iE=o((t,{padding:e,width:r,textAlignment:n,height:s})=>{t=(0,Yi.default)(t,{align:n});let i=t.split(ht),u=Kn(t),a=r-e.left-e.right;if(u>a){let h=[];for(let g of i){let m=es(g,a,{hard:!0}),E=(0,Yi.default)(m,{align:n}).split(`
|
|
48
48
|
`),D=Math.max(...E.map(C=>pe(C)));for(let C of E){let F;switch(n){case"center":{F=Le.repeat((a-D)/2)+C;break}case"right":{F=Le.repeat(a-D)+C;break}default:{F=C;break}}h.push(F)}}i=h}n==="center"&&u<a?i=i.map(h=>Le.repeat((a-u)/2)+h):n==="right"&&u<a&&(i=i.map(h=>Le.repeat(a-u)+h));let l=Le.repeat(e.left),f=Le.repeat(e.right);return i=i.map(h=>{let g=l+h+f;return g+Le.repeat(r-pe(g))}),e.top>0&&(i=[...Array.from({length:e.top}).fill(Le.repeat(r)),...i]),e.bottom>0&&(i=[...i,...Array.from({length:e.bottom}).fill(Le.repeat(r))]),s&&i.length>s?i=i.slice(0,s):s&&i.length<s&&(i=[...i,...Array.from({length:s-i.length}).fill(Le.repeat(r))]),i.join(ht)},"makeContentText"),oE=o((t,e,r)=>{let n=o(h=>{let g=r.borderColor?cE(r.borderColor)(h):h;return r.dimBorder?We.dim(g):g},"colorizeBorder"),s=o(h=>r.backgroundColor?lE(r.backgroundColor)(h):h,"colorizeContent"),i=nE(r.borderStyle),u=zf(),a=Le.repeat(r.margin.left);if(r.float==="center"){let h=Math.max((u-e-Ur(r.borderStyle))/2,0);a=Le.repeat(h)}else if(r.float==="right"){let h=Math.max(u-e-r.margin.right-Ur(r.borderStyle),0);a=Le.repeat(h)}let l="";r.margin.top&&(l+=ht.repeat(r.margin.top)),(r.borderStyle!==Mr||r.title)&&(l+=n(a+i.topLeft+(r.title?sE(r.title,i.top.repeat(e),r.titleAlignment):i.top.repeat(e))+i.topRight)+ht);let f=t.split(ht);return l+=f.map(h=>a+n(i.left)+s(h)+n(i.right)).join(ht),r.borderStyle!==Mr&&(l+=ht+n(a+i.bottomLeft+i.bottom.repeat(e)+i.bottomRight)),r.margin.bottom&&(l+=ht.repeat(r.margin.bottom)),l},"boxContent"),uE=o(t=>{if(t.fullscreen&&ts?.stdout){let e=[ts.stdout.columns,ts.stdout.rows];typeof t.fullscreen=="function"&&(e=t.fullscreen(...e)),t.width||=e[0],t.height||=e[1]}return t.width&&=Math.max(1,t.width-Ur(t.borderStyle)),t.height&&=Math.max(1,t.height-Ur(t.borderStyle)),t},"sanitizeOptions"),Gf=o((t,e)=>e===Mr?t:` ${t} `,"formatTitle"),aE=o((t,e)=>{e=uE(e);let r=e.width!==void 0,n=zf(),s=Ur(e.borderStyle),i=n-e.margin.left-e.margin.right-s,u=Kn(es(t,n-s,{hard:!0,trim:!1}))+e.padding.left+e.padding.right;if(e.title&&r?(e.title=e.title.slice(0,Math.max(0,e.width-2)),e.title&&=Gf(e.title,e.borderStyle)):e.title&&(e.title=e.title.slice(0,Math.max(0,i-2)),e.title&&(e.title=Gf(e.title,e.borderStyle),pe(e.title)>u&&(e.width=pe(e.title)))),e.width||=u,!r){if(e.margin.left&&e.margin.right&&e.width>i){let l=(n-e.width-s)/(e.margin.left+e.margin.right);e.margin.left=Math.max(0,Math.floor(e.margin.left*l)),e.margin.right=Math.max(0,Math.floor(e.margin.right*l))}e.width=Math.min(e.width,n-s-e.margin.left-e.margin.right)}return e.width-(e.padding.left+e.padding.right)<=0&&(e.padding.left=0,e.padding.right=0),e.height&&e.height-(e.padding.top+e.padding.bottom)<=0&&(e.padding.top=0,e.padding.bottom=0),e},"determineDimensions"),Ji=o(t=>t.match(/^#(?:[0-f]{3}){1,2}$/i),"isHex"),qf=o(t=>typeof t=="string"&&(We[t]??Ji(t)),"isColorValid"),cE=o(t=>Ji(t)?We.hex(t):We[t],"getColorFunction"),lE=o(t=>Ji(t)?We.bgHex(t):We[Hi(["bg",t])],"getBGColorFunction");function Ki(t,e){if(e={padding:0,borderStyle:"single",dimBorder:!1,textAlignment:"left",float:"left",titleAlignment:"left",...e},e.align&&(e.textAlignment=e.align),e.borderColor&&!qf(e.borderColor))throw new Error(`${e.borderColor} is not a valid borderColor`);if(e.backgroundColor&&!qf(e.backgroundColor))throw new Error(`${e.backgroundColor} is not a valid backgroundColor`);return e.padding=Uf(e.padding),e.margin=Uf(e.margin),e=aE(t,e),t=iE(t,e),oE(t,e.width,e)}o(Ki,"boxen");c();var hE=/(?:\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.))|(?:{(~)?(#?[\w:]+(?:\([^)]*\))?(?:\.#?[\w:]+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(})|((?:.|[\r\n\f])+?)/gi,Wf=/(?:^|\.)(?:(?:(\w+)(?:\(([^)]*)\))?)|(?:#(?=[:a-fA-F\d]{2,})([a-fA-F\d]{6})?(?::([a-fA-F\d]{6}))?))/g,dE=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,DE=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,pE=new Map([["n",`
|
|
49
|
-
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Zf(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCodePoint(Number.parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(Number.parseInt(t.slice(2,-1),16)):pE.get(t)||t}o(Zf,"unescape");function mE(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),s;for(let i of n){let u=Number(i);if(!Number.isNaN(u))r.push(u);else if(s=i.match(dE))r.push(s[2].replace(DE,(a,l,f)=>l?Zf(l):f));else throw new Error(`Invalid Chalk template style argument: ${i} (in style '${t}')`)}return r}o(mE,"parseArguments");function Vf(t){let e=Number.parseInt(t,16);return[e>>16&255,e>>8&255,e&255]}o(Vf,"parseHex");function yE(t){Wf.lastIndex=0;let e=[],r;for(;(r=Wf.exec(t))!==null;){let n=r[1];r[2]?e.push([n,...mE(n,r[2])]):r[3]||r[4]?(r[3]&&e.push(["rgb",...Vf(r[3])]),r[4]&&e.push(["bgRgb",...Vf(r[4])])):e.push([n])}return e}o(yE,"parseStyle");function Yf(t){function e(n){let s={};for(let u of n)for(let a of u.styles)s[a[0]]=u.inverse?null:a.slice(1);let i=t;for(let[u,a]of Object.entries(s))if(Array.isArray(a)){if(!(u in i))throw new Error(`Unknown Chalk style: ${u}`);i=a.length>0?i[u](...a):i[u]}return i}o(e,"buildStyle");function r(n){let s=[],i=[],u=[];if(n.replace(hE,(a,l,f,h,g,m)=>{if(l)u.push(Zf(l));else if(h){let y=u.join("");u=[],i.push(s.length===0?y:e(s)(y)),s.push({inverse:f,styles:yE(h)})}else if(g){if(s.length===0)throw new Error("Found extraneous } in Chalk template literal");i.push(e(s)(u.join(""))),u=[],s.pop()}else u.push(m)}),i.push(u.join("")),s.length>0)throw new Error(`Chalk template literal is missing ${s.length} closing bracket${s.length===1?"":"s"} (\`}\`)`);return i.join("")}return o(r,"template"),r}o(Yf,"makeTemplate");function Jf(t){function e(r,...n){if(!Array.isArray(r)||!Array.isArray(r.raw))throw new TypeError("A tagged template literal must be provided");let s=[r.raw[0]];for(let i=1;i<r.raw.length;i++)s.push(String(n[i-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[i]));return t(s.join(""))}return o(e,"chalkTemplate"),e}o(Jf,"makeChalkTemplate");var gE=Yf(We),Xi=Jf(gE),EE=Yf(yu),
|
|
49
|
+
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Zf(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCodePoint(Number.parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(Number.parseInt(t.slice(2,-1),16)):pE.get(t)||t}o(Zf,"unescape");function mE(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),s;for(let i of n){let u=Number(i);if(!Number.isNaN(u))r.push(u);else if(s=i.match(dE))r.push(s[2].replace(DE,(a,l,f)=>l?Zf(l):f));else throw new Error(`Invalid Chalk template style argument: ${i} (in style '${t}')`)}return r}o(mE,"parseArguments");function Vf(t){let e=Number.parseInt(t,16);return[e>>16&255,e>>8&255,e&255]}o(Vf,"parseHex");function yE(t){Wf.lastIndex=0;let e=[],r;for(;(r=Wf.exec(t))!==null;){let n=r[1];r[2]?e.push([n,...mE(n,r[2])]):r[3]||r[4]?(r[3]&&e.push(["rgb",...Vf(r[3])]),r[4]&&e.push(["bgRgb",...Vf(r[4])])):e.push([n])}return e}o(yE,"parseStyle");function Yf(t){function e(n){let s={};for(let u of n)for(let a of u.styles)s[a[0]]=u.inverse?null:a.slice(1);let i=t;for(let[u,a]of Object.entries(s))if(Array.isArray(a)){if(!(u in i))throw new Error(`Unknown Chalk style: ${u}`);i=a.length>0?i[u](...a):i[u]}return i}o(e,"buildStyle");function r(n){let s=[],i=[],u=[];if(n.replace(hE,(a,l,f,h,g,m)=>{if(l)u.push(Zf(l));else if(h){let y=u.join("");u=[],i.push(s.length===0?y:e(s)(y)),s.push({inverse:f,styles:yE(h)})}else if(g){if(s.length===0)throw new Error("Found extraneous } in Chalk template literal");i.push(e(s)(u.join(""))),u=[],s.pop()}else u.push(m)}),i.push(u.join("")),s.length>0)throw new Error(`Chalk template literal is missing ${s.length} closing bracket${s.length===1?"":"s"} (\`}\`)`);return i.join("")}return o(r,"template"),r}o(Yf,"makeTemplate");function Jf(t){function e(r,...n){if(!Array.isArray(r)||!Array.isArray(r.raw))throw new TypeError("A tagged template literal must be provided");let s=[r.raw[0]];for(let i=1;i<r.raw.length;i++)s.push(String(n[i-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[i]));return t(s.join(""))}return o(e,"chalkTemplate"),e}o(Jf,"makeChalkTemplate");var gE=Yf(We),Xi=Jf(gE),EE=Yf(yu),x1=Jf(EE);var ru=Se(Xf(),1);c();c();c();function Qi(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}o(Qi,"escapeStringRegexp");c();import FE from"node:os";var CE=o(()=>FE.homedir().replace(/\\/g,"/"),"getHomeDirectory"),Qf=CE;var eh=/\s+at.*[(\s](.*)\)?/,th=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;function eo(t,{pretty:e=!1,basePath:r,pathFilter:n}={}){let s=r&&new RegExp(`(file://)?${Qi(r.replace(/\\/g,"/"))}/?`,"g"),i=e?Qf():"";if(typeof t=="string")return t.replace(/\\/g,"/").split(`
|
|
50
50
|
`).filter(u=>{let a=u.match(eh);if(a===null||!a[1])return!0;let l=a[1];return l.includes(".app/Contents/Resources/electron.asar")||l.includes(".app/Contents/Resources/default_app.asar")||l.includes("node_modules/electron/dist/resources/electron.asar")||l.includes("node_modules/electron/dist/resources/default_app.asar")?!1:n?!th.test(l)&&n(l):!th.test(l)}).filter(u=>u.trim()!=="").map(u=>(s&&(u=u.replace(s,"")),e&&(u=u.replace(eh,(a,l)=>a.replace(l,l.replace(i,"~")))),u)).join(`
|
|
51
51
|
`)}o(eo,"cleanStack");c();c();c();var rh=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function bE(t){return rh.includes(t)}o(bE,"isTypedArrayName");var wE=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...rh];function _E(t){return wE.includes(t)}o(_E,"isObjectTypeName");var xE=["null","undefined","string","number","bigint","boolean","symbol"];function SE(t){return xE.includes(t)}o(SE,"isPrimitiveTypeName");function hr(t){return e=>typeof e===t}o(hr,"isOfType");var{toString:vE}=Object.prototype,qr=o(t=>{let e=vE.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&d.domElement(t))return"HTMLElement";if(_E(e))return e},"getObjectType"),Z=o(t=>e=>qr(e)===t,"isObjectOfType");function d(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"NaN":"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(d.observable(t))return"Observable";if(d.array(t))return"Array";if(d.buffer(t))return"Buffer";let e=qr(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}o(d,"is");d.undefined=hr("undefined");d.string=hr("string");var AE=hr("number");d.number=t=>AE(t)&&!d.nan(t);d.positiveNumber=t=>d.number(t)&&t>0;d.negativeNumber=t=>d.number(t)&&t<0;d.bigint=hr("bigint");d.function_=hr("function");d.null_=t=>t===null;d.class_=t=>d.function_(t)&&t.toString().startsWith("class ");d.boolean=t=>t===!0||t===!1;d.symbol=hr("symbol");d.numericString=t=>d.string(t)&&!d.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));d.array=(t,e)=>Array.isArray(t)?d.function_(e)?t.every(r=>e(r)):!0:!1;d.buffer=t=>t?.constructor?.isBuffer?.(t)??!1;d.blob=t=>Z("Blob")(t);d.nullOrUndefined=t=>d.null_(t)||d.undefined(t);d.object=t=>!d.null_(t)&&(typeof t=="object"||d.function_(t));d.iterable=t=>d.function_(t?.[Symbol.iterator]);d.asyncIterable=t=>d.function_(t?.[Symbol.asyncIterator]);d.generator=t=>d.iterable(t)&&d.function_(t?.next)&&d.function_(t?.throw);d.asyncGenerator=t=>d.asyncIterable(t)&&d.function_(t.next)&&d.function_(t.throw);d.nativePromise=t=>Z("Promise")(t);var TE=o(t=>d.function_(t?.then)&&d.function_(t?.catch),"hasPromiseApi");d.promise=t=>d.nativePromise(t)||TE(t);d.generatorFunction=Z("GeneratorFunction");d.asyncGeneratorFunction=t=>qr(t)==="AsyncGeneratorFunction";d.asyncFunction=t=>qr(t)==="AsyncFunction";d.boundFunction=t=>d.function_(t)&&!t.hasOwnProperty("prototype");d.regExp=Z("RegExp");d.date=Z("Date");d.error=Z("Error");d.map=t=>Z("Map")(t);d.set=t=>Z("Set")(t);d.weakMap=t=>Z("WeakMap")(t);d.weakSet=t=>Z("WeakSet")(t);d.weakRef=t=>Z("WeakRef")(t);d.int8Array=Z("Int8Array");d.uint8Array=Z("Uint8Array");d.uint8ClampedArray=Z("Uint8ClampedArray");d.int16Array=Z("Int16Array");d.uint16Array=Z("Uint16Array");d.int32Array=Z("Int32Array");d.uint32Array=Z("Uint32Array");d.float32Array=Z("Float32Array");d.float64Array=Z("Float64Array");d.bigInt64Array=Z("BigInt64Array");d.bigUint64Array=Z("BigUint64Array");d.arrayBuffer=Z("ArrayBuffer");d.sharedArrayBuffer=Z("SharedArrayBuffer");d.dataView=Z("DataView");d.enumCase=(t,e)=>Object.values(e).includes(t);d.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;d.urlInstance=t=>Z("URL")(t);d.urlString=t=>{if(!d.string(t))return!1;try{return new URL(t),!0}catch{return!1}};d.truthy=t=>!!t;d.falsy=t=>!t;d.nan=t=>Number.isNaN(t);d.primitive=t=>d.null_(t)||SE(typeof t);d.integer=t=>Number.isInteger(t);d.safeInteger=t=>Number.isSafeInteger(t);d.plainObject=t=>{if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};d.typedArray=t=>bE(qr(t));var LE=o(t=>d.safeInteger(t)&&t>=0,"isValidLength");d.arrayLike=t=>!d.nullOrUndefined(t)&&!d.function_(t)&&LE(t.length);d.tupleLike=(t,e)=>d.array(e)&&d.array(t)&&e.length===t.length?e.every((r,n)=>r(t[n])):!1;d.inRange=(t,e)=>{if(d.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(d.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var OE=1,PE=["innerHTML","ownerDocument","style","attributes","nodeValue"];d.domElement=t=>d.object(t)&&t.nodeType===OE&&d.string(t.nodeName)&&!d.plainObject(t)&&PE.every(e=>e in t);d.observable=t=>t?t===t[Symbol.observable]?.()||t===t["@@observable"]?.():!1;d.nodeStream=t=>d.object(t)&&d.function_(t.pipe)&&!d.observable(t);d.infinite=t=>t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY;var nh=o(t=>e=>d.integer(e)&&Math.abs(e%2)===t,"isAbsoluteMod2");d.evenInteger=nh(0);d.oddInteger=nh(1);d.emptyArray=t=>d.array(t)&&t.length===0;d.nonEmptyArray=t=>d.array(t)&&t.length>0;d.emptyString=t=>d.string(t)&&t.length===0;var kE=o(t=>d.string(t)&&!/\S/.test(t),"isWhiteSpaceString");d.emptyStringOrWhitespace=t=>d.emptyString(t)||kE(t);d.nonEmptyString=t=>d.string(t)&&t.length>0;d.nonEmptyStringAndNotWhitespace=t=>d.string(t)&&!d.emptyStringOrWhitespace(t);d.emptyObject=t=>d.object(t)&&!d.map(t)&&!d.set(t)&&Object.keys(t).length===0;d.nonEmptyObject=t=>d.object(t)&&!d.map(t)&&!d.set(t)&&Object.keys(t).length>0;d.emptySet=t=>d.set(t)&&t.size===0;d.nonEmptySet=t=>d.set(t)&&t.size>0;d.emptyMap=t=>d.map(t)&&t.size===0;d.nonEmptyMap=t=>d.map(t)&&t.size>0;d.propertyKey=t=>d.any([d.string,d.number,d.symbol],t);d.formData=t=>Z("FormData")(t);d.urlSearchParams=t=>Z("URLSearchParams")(t);var sh=o((t,e,r)=>{if(!d.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)},"predicateOnArray");d.any=(t,...e)=>(d.array(t)?t:[t]).some(n=>sh(Array.prototype.some,n,e));d.all=(t,...e)=>sh(Array.prototype.every,t,e);var x=o((t,e,r,n={})=>{if(!t){let{multipleValues:s}=n,i=s?`received values of types ${[...new Set(r.map(u=>`\`${d(u)}\``))].join(", ")}`:`received value of type \`${d(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${i}.`)}},"assertType"),w={undefined:o(t=>x(d.undefined(t),"undefined",t),"undefined"),string:o(t=>x(d.string(t),"string",t),"string"),number:o(t=>x(d.number(t),"number",t),"number"),positiveNumber:o(t=>x(d.positiveNumber(t),"positive number",t),"positiveNumber"),negativeNumber:o(t=>x(d.negativeNumber(t),"negative number",t),"negativeNumber"),bigint:o(t=>x(d.bigint(t),"bigint",t),"bigint"),function_:o(t=>x(d.function_(t),"Function",t),"function_"),null_:o(t=>x(d.null_(t),"null",t),"null_"),class_:o(t=>x(d.class_(t),"Class",t),"class_"),boolean:o(t=>x(d.boolean(t),"boolean",t),"boolean"),symbol:o(t=>x(d.symbol(t),"symbol",t),"symbol"),numericString:o(t=>x(d.numericString(t),"string with a number",t),"numericString"),array:o((t,e)=>{x(d.array(t),"Array",t),e&&t.forEach(e)},"array"),buffer:o(t=>x(d.buffer(t),"Buffer",t),"buffer"),blob:o(t=>x(d.blob(t),"Blob",t),"blob"),nullOrUndefined:o(t=>x(d.nullOrUndefined(t),"null or undefined",t),"nullOrUndefined"),object:o(t=>x(d.object(t),"Object",t),"object"),iterable:o(t=>x(d.iterable(t),"Iterable",t),"iterable"),asyncIterable:o(t=>x(d.asyncIterable(t),"AsyncIterable",t),"asyncIterable"),generator:o(t=>x(d.generator(t),"Generator",t),"generator"),asyncGenerator:o(t=>x(d.asyncGenerator(t),"AsyncGenerator",t),"asyncGenerator"),nativePromise:o(t=>x(d.nativePromise(t),"native Promise",t),"nativePromise"),promise:o(t=>x(d.promise(t),"Promise",t),"promise"),generatorFunction:o(t=>x(d.generatorFunction(t),"GeneratorFunction",t),"generatorFunction"),asyncGeneratorFunction:o(t=>x(d.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),"asyncGeneratorFunction"),asyncFunction:o(t=>x(d.asyncFunction(t),"AsyncFunction",t),"asyncFunction"),boundFunction:o(t=>x(d.boundFunction(t),"Function",t),"boundFunction"),regExp:o(t=>x(d.regExp(t),"RegExp",t),"regExp"),date:o(t=>x(d.date(t),"Date",t),"date"),error:o(t=>x(d.error(t),"Error",t),"error"),map:o(t=>x(d.map(t),"Map",t),"map"),set:o(t=>x(d.set(t),"Set",t),"set"),weakMap:o(t=>x(d.weakMap(t),"WeakMap",t),"weakMap"),weakSet:o(t=>x(d.weakSet(t),"WeakSet",t),"weakSet"),weakRef:o(t=>x(d.weakRef(t),"WeakRef",t),"weakRef"),int8Array:o(t=>x(d.int8Array(t),"Int8Array",t),"int8Array"),uint8Array:o(t=>x(d.uint8Array(t),"Uint8Array",t),"uint8Array"),uint8ClampedArray:o(t=>x(d.uint8ClampedArray(t),"Uint8ClampedArray",t),"uint8ClampedArray"),int16Array:o(t=>x(d.int16Array(t),"Int16Array",t),"int16Array"),uint16Array:o(t=>x(d.uint16Array(t),"Uint16Array",t),"uint16Array"),int32Array:o(t=>x(d.int32Array(t),"Int32Array",t),"int32Array"),uint32Array:o(t=>x(d.uint32Array(t),"Uint32Array",t),"uint32Array"),float32Array:o(t=>x(d.float32Array(t),"Float32Array",t),"float32Array"),float64Array:o(t=>x(d.float64Array(t),"Float64Array",t),"float64Array"),bigInt64Array:o(t=>x(d.bigInt64Array(t),"BigInt64Array",t),"bigInt64Array"),bigUint64Array:o(t=>x(d.bigUint64Array(t),"BigUint64Array",t),"bigUint64Array"),arrayBuffer:o(t=>x(d.arrayBuffer(t),"ArrayBuffer",t),"arrayBuffer"),sharedArrayBuffer:o(t=>x(d.sharedArrayBuffer(t),"SharedArrayBuffer",t),"sharedArrayBuffer"),dataView:o(t=>x(d.dataView(t),"DataView",t),"dataView"),enumCase:o((t,e)=>x(d.enumCase(t,e),"EnumCase",t),"enumCase"),urlInstance:o(t=>x(d.urlInstance(t),"URL",t),"urlInstance"),urlString:o(t=>x(d.urlString(t),"string with a URL",t),"urlString"),truthy:o(t=>x(d.truthy(t),"truthy",t),"truthy"),falsy:o(t=>x(d.falsy(t),"falsy",t),"falsy"),nan:o(t=>x(d.nan(t),"NaN",t),"nan"),primitive:o(t=>x(d.primitive(t),"primitive",t),"primitive"),integer:o(t=>x(d.integer(t),"integer",t),"integer"),safeInteger:o(t=>x(d.safeInteger(t),"integer",t),"safeInteger"),plainObject:o(t=>x(d.plainObject(t),"plain object",t),"plainObject"),typedArray:o(t=>x(d.typedArray(t),"TypedArray",t),"typedArray"),arrayLike:o(t=>x(d.arrayLike(t),"array-like",t),"arrayLike"),tupleLike:o((t,e)=>x(d.tupleLike(t,e),"tuple-like",t),"tupleLike"),domElement:o(t=>x(d.domElement(t),"HTMLElement",t),"domElement"),observable:o(t=>x(d.observable(t),"Observable",t),"observable"),nodeStream:o(t=>x(d.nodeStream(t),"Node.js Stream",t),"nodeStream"),infinite:o(t=>x(d.infinite(t),"infinite number",t),"infinite"),emptyArray:o(t=>x(d.emptyArray(t),"empty array",t),"emptyArray"),nonEmptyArray:o(t=>x(d.nonEmptyArray(t),"non-empty array",t),"nonEmptyArray"),emptyString:o(t=>x(d.emptyString(t),"empty string",t),"emptyString"),emptyStringOrWhitespace:o(t=>x(d.emptyStringOrWhitespace(t),"empty string or whitespace",t),"emptyStringOrWhitespace"),nonEmptyString:o(t=>x(d.nonEmptyString(t),"non-empty string",t),"nonEmptyString"),nonEmptyStringAndNotWhitespace:o(t=>x(d.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),"nonEmptyStringAndNotWhitespace"),emptyObject:o(t=>x(d.emptyObject(t),"empty object",t),"emptyObject"),nonEmptyObject:o(t=>x(d.nonEmptyObject(t),"non-empty object",t),"nonEmptyObject"),emptySet:o(t=>x(d.emptySet(t),"empty set",t),"emptySet"),nonEmptySet:o(t=>x(d.nonEmptySet(t),"non-empty set",t),"nonEmptySet"),emptyMap:o(t=>x(d.emptyMap(t),"empty map",t),"emptyMap"),nonEmptyMap:o(t=>x(d.nonEmptyMap(t),"non-empty map",t),"nonEmptyMap"),propertyKey:o(t=>x(d.propertyKey(t),"PropertyKey",t),"propertyKey"),formData:o(t=>x(d.formData(t),"FormData",t),"formData"),urlSearchParams:o(t=>x(d.urlSearchParams(t),"URLSearchParams",t),"urlSearchParams"),evenInteger:o(t=>x(d.evenInteger(t),"even integer",t),"evenInteger"),oddInteger:o(t=>x(d.oddInteger(t),"odd integer",t),"oddInteger"),directInstanceOf:o((t,e)=>x(d.directInstanceOf(t,e),"T",t),"directInstanceOf"),inRange:o((t,e)=>x(d.inRange(t,e),"in range",t),"inRange"),any:o((t,...e)=>x(d.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),"any"),all:o((t,...e)=>x(d.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0}),"all")};Object.defineProperties(d,{class:{value:d.class_},function:{value:d.function_},null:{value:d.null_}});Object.defineProperties(w,{class:{value:w.class_},function:{value:w.function_},null:{value:w.null_}});var p=d;c();import{EventEmitter as Sb}from"node:events";c();var to=class extends Error{static{o(this,"CancelError")}constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},dr=class t{static{o(this,"PCancelable")}static fn(e){return(...r)=>new t((n,s,i)=>{r.push(i),e(...r).then(n,s)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,n)=>{this._reject=n;let s=o(a=>{(!this._isCanceled||!u.shouldReject)&&(this._isPending=!1,r(a))},"onResolve"),i=o(a=>{this._isPending=!1,n(a)},"onReject"),u=o(a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a)},"onCancel");Object.defineProperties(u,{shouldReject:{get:o(()=>this._rejectOnCancel,"get"),set:o(a=>{this._rejectOnCancel=a},"set")}}),e(s,i,u)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new to(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(dr.prototype,Promise.prototype);c();function RE(t){return p.object(t)&&"_onResponse"in t}o(RE,"isRequest");var J=class extends Error{static{o(this,"RequestError")}constructor(e,r,n){if(super(e),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=r.code??"ERR_GOT_REQUEST_ERROR",this.input=r.input,RE(n)?(Object.defineProperty(this,"request",{enumerable:!1,value:n}),Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),this.options=n.options):this.options=n,this.timings=this.request?.timings,p.string(r.stack)&&p.string(this.stack)){let s=this.stack.indexOf(this.message)+this.message.length,i=this.stack.slice(s).split(`
|
|
52
52
|
`).reverse(),u=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
|
|
@@ -56,10 +56,10 @@ ${e}`,"wrappedToString"),fg=Object.getOwnPropertyDescriptor(Function.prototype,"
|
|
|
56
56
|
`||e===`
|
|
57
57
|
`&&n[r-1]!=="\r"?`\r
|
|
58
58
|
`:e),"normalizeValue");c();var FF=o(t=>Object.prototype.toString.call(t).slice(8,-1).toLowerCase(),"getType");function go(t){if(FF(t)!=="object")return!1;let e=Object.getPrototypeOf(t);return e==null?!0:(e.constructor&&e.constructor.toString())===Object.toString()}o(go,"isPlainObject");c();function vh(t,e){if(typeof e=="string"){for(let[r,n]of Object.entries(t))if(e.toLowerCase()===r.toLowerCase())return n}}o(vh,"getProperty");var Ah=o(t=>new Proxy(t,{get:o((e,r)=>vh(e,r),"get"),has:o((e,r)=>vh(e,r)!==void 0,"has")}),"proxyHeaders");c();var mr=o(t=>!!(t&&Re(t.constructor)&&t[Symbol.toStringTag]==="FormData"&&Re(t.append)&&Re(t.getAll)&&Re(t.entries)&&Re(t[Symbol.iterator])),"isFormData");c();var Eo=o(t=>String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22"),"escapeName");c();var Dt=o(t=>!!(t&&typeof t=="object"&&Re(t.constructor)&&t[Symbol.toStringTag]==="File"&&Re(t.stream)&&t.name!=null),"isFile");var Zr=function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},K=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Yr,pt,Jr,fs,Kr,Mt,Xr,Qr,hs,Fo,Th,CF={enableAdditionalHeaders:!1},ds={writable:!1,configurable:!1},Ds=class{static{o(this,"FormDataEncoder")}constructor(e,r,n){if(Yr.add(this),pt.set(this,`\r
|
|
59
|
-
`),Jr.set(this,void 0),fs.set(this,void 0),Kr.set(this,"-".repeat(2)),Mt.set(this,new TextEncoder),Xr.set(this,void 0),Qr.set(this,void 0),hs.set(this,void 0),!mr(e))throw new TypeError("Expected first argument to be a FormData instance.");let s;if(go(r)?n=r:s=r,s||(s=Sh()),typeof s!="string")throw new TypeError("Expected boundary argument to be a string.");if(n&&!go(n))throw new TypeError("Expected options argument to be an object.");Zr(this,Qr,Array.from(e.entries()),"f"),Zr(this,hs,{...CF,...n},"f"),Zr(this,Jr,K(this,Mt,"f").encode(K(this,pt,"f")),"f"),Zr(this,fs,K(this,Jr,"f").byteLength,"f"),this.boundary=`form-data-boundary-${s}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,Zr(this,Xr,K(this,Mt,"f").encode(`${K(this,Kr,"f")}${this.boundary}${K(this,Kr,"f")}${K(this,pt,"f").repeat(2)}`),"f");let i={"Content-Type":this.contentType},u=K(this,Yr,"m",Th).call(this);u&&(this.contentLength=u,i["Content-Length"]=u),this.headers=Ah(Object.freeze(i)),Object.defineProperties(this,{boundary:ds,contentType:ds,contentLength:ds,headers:ds})}getContentLength(){return this.contentLength==null?void 0:Number(this.contentLength)}*values(){for(let[e,r]of K(this,Qr,"f")){let n=Dt(r)?r:K(this,Mt,"f").encode(yo(r));yield K(this,Yr,"m",Fo).call(this,e,n),yield n,yield K(this,Jr,"f")}yield K(this,Xr,"f")}async*encode(){for(let e of this.values())Dt(e)?yield*_h(e.stream()):yield e}[(pt=new WeakMap,Jr=new WeakMap,fs=new WeakMap,Kr=new WeakMap,Mt=new WeakMap,Xr=new WeakMap,Qr=new WeakMap,hs=new WeakMap,Yr=new WeakSet,Fo=o(function(r,n){let s="";s+=`${K(this,Kr,"f")}${this.boundary}${K(this,pt,"f")}`,s+=`Content-Disposition: form-data; name="${Eo(r)}"`,Dt(n)&&(s+=`; filename="${Eo(n.name)}"${K(this,pt,"f")}`,s+=`Content-Type: ${n.type||"application/octet-stream"}`);let i=Dt(n)?n.size:n.byteLength;return K(this,hs,"f").enableAdditionalHeaders===!0&&i!=null&&!isNaN(i)&&(s+=`${K(this,pt,"f")}Content-Length: ${Dt(n)?n.size:n.byteLength}`),K(this,Mt,"f").encode(`${s}${K(this,pt,"f").repeat(2)}`)},"_FormDataEncoder_getFieldHeader"),Th=o(function(){let r=0;for(let[n,s]of K(this,Qr,"f")){let i=Dt(s)?s:K(this,Mt,"f").encode(yo(s)),u=Dt(i)?i.size:i.byteLength;if(u==null||isNaN(u))return;r+=K(this,Yr,"m",Fo).call(this,n,i).byteLength,r+=u,r+=K(this,fs,"f")}return String(r+K(this,Xr,"f").byteLength)},"_FormDataEncoder_getContentLength"),Symbol.iterator)](){return this.values()}[Symbol.asyncIterator](){return this.encode()}};c();import{Buffer as bF}from"node:buffer";import{promisify as wF}from"node:util";c();function en(t){return p.nodeStream(t)&&p.function_(t.getBoundary)}o(en,"isFormData");async function Co(t,e){if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(p.string(t))return bF.byteLength(t);if(p.buffer(t))return t.length;if(en(t))return wF(t.getLength.bind(t))()}o(Co,"getBodySize");c();function tn(t,e,r){let n={};for(let s of r){let i=o((...u)=>{e.emit(s,...u)},"eventFunction");n[s]=i,t.on(s,i)}return()=>{for(let[s,i]of Object.entries(n))t.off(s,i)}}o(tn,"proxyEvents");c();import _F from"node:net";c();function bo(){let t=[];return{once(e,r,n){e.once(r,n),t.push({origin:e,event:r,fn:n})},unhandleAll(){for(let e of t){let{origin:r,event:n,fn:s}=e;r.removeListener(n,s)}t.length=0}}}o(bo,"unhandle");var Lh=Symbol("reentry"),xF=o(()=>{},"noop"),rn=class extends Error{static{o(this,"TimeoutError")}constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.code="ETIMEDOUT"}};function wo(t,e,r){if(Lh in t)return xF;t[Lh]=!0;let n=[],{once:s,unhandleAll:i}=bo(),u=o((D,C,F)=>{let O=setTimeout(C,D,D,F);O.unref?.();let S=o(()=>{clearTimeout(O)},"cancel");return n.push(S),S},"addTimeout"),{host:a,hostname:l}=r,f=o((D,C)=>{t.destroy(new rn(D,C))},"timeoutHandler"),h=o(()=>{for(let D of n)D();i()},"cancelTimeouts");if(t.once("error",D=>{if(h(),t.listenerCount("error")===0)throw D}),e.request!==void 0){let D=u(e.request,f,"request");s(t,"response",C=>{s(C,"end",D)})}if(e.socket!==void 0){let{socket:D}=e,C=o(()=>{f(D,"socket")},"socketTimeoutHandler");t.setTimeout(D,C),n.push(()=>{t.removeListener("timeout",C)})}let g=e.lookup!==void 0,m=e.connect!==void 0,y=e.secureConnect!==void 0,E=e.send!==void 0;return(g||m||y||E)&&s(t,"socket",D=>{let{socketPath:C}=t;if(D.connecting){let F=!!(C??_F.isIP(l??a??"")!==0);if(g&&!F&&D.address().address===void 0){let O=u(e.lookup,f,"lookup");s(D,"lookup",O)}if(m){let O=o(()=>u(e.connect,f,"connect"),"timeConnect");F?s(D,"connect",O()):s(D,"lookup",S=>{S===null&&s(D,"connect",O())})}y&&r.protocol==="https:"&&s(D,"connect",()=>{let O=u(e.secureConnect,f,"secureConnect");s(D,"secureConnect",O)})}if(E){let F=o(()=>u(e.send,f,"send"),"timeRequest");D.connecting?s(D,"connect",()=>{s(t,"upload-complete",F())}):s(t,"upload-complete",F())}}),e.response!==void 0&&s(t,"upload-complete",()=>{let D=u(e.response,f,"response");s(t,"response",D)}),e.read!==void 0&&s(t,"response",D=>{let C=u(e.read,f,"read");s(D,"end",C)}),h}o(wo,"timedOut");c();function _o(t){t=t;let e={protocol:t.protocol,hostname:p.string(t.hostname)&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return p.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}o(_o,"urlToOptions");c();var nn=class{static{o(this,"WeakableMap")}constructor(){Object.defineProperty(this,"weakMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"map",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e=="object"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}};c();var SF=o(({attemptCount:t,retryOptions:e,error:r,retryAfter:n,computedValue:s})=>{if(r.name==="RetryError")return 1;if(t>e.limit)return 0;let i=e.methods.includes(r.options.method),u=e.errorCodes.includes(r.code),a=r.response&&e.statusCodes.includes(r.response.statusCode);if(!i||!u&&!a)return 0;if(r.response){if(n)return n>s?0:n;if(r.response.statusCode===413)return 0}let l=Math.random()*e.noise;return Math.min(2**(t-1)*1e3,e.backoffLimit)+l},"calculateRetryDelay"),Oh=SF;c();import ib from"node:process";import{promisify as Md,inspect as ob}from"node:util";import{checkServerIdentity as ub}from"node:tls";import ab from"node:http";import cb from"node:https";c();import{V4MAPPED as vF,ADDRCONFIG as AF,ALL as Ih,promises as TF,lookup as LF}from"node:dns";import{promisify as xo}from"node:util";import OF from"node:os";var{Resolver:Ph}=TF,yr=Symbol("cacheableLookupCreateConnection"),So=Symbol("cacheableLookupInstance"),kh=Symbol("expires"),PF=typeof Ih=="number",Rh=o(t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},"verifyAgent"),kF=o(t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},"map4to6"),Bh=o(()=>{let t=!1,e=!1;for(let r of Object.values(OF.networkInterfaces()))for(let n of r)if(!n.internal&&(n.family==="IPv6"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},"getIfaceInfo"),RF=o(t=>Symbol.iterator in t,"isIterable"),ps=o(t=>t.catch(e=>{if(e.code==="ENODATA"||e.code==="ENOTFOUND"||e.code==="ENOENT")return[];throw e}),"ignoreNoResultErrors"),Nh={ttl:!0},BF={all:!0},NF={all:!0,family:4},IF={all:!0,family:6},sn=class{static{o(this,"CacheableLookup")}constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:n=3600,errorTtl:s=.15,resolver:i=new Ph,lookup:u=LF}={}){if(this.maxTtl=r,this.errorTtl=s,this._cache=e,this._resolver=i,this._dnsLookup=u&&xo(u),this.stats={cache:0,query:0},this._resolver instanceof Ph?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=xo(this._resolver.resolve4.bind(this._resolver)),this._resolve6=xo(this._resolver.resolve6.bind(this._resolver))),this._iface=Bh(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,this.fallbackDuration=n,n>0){let a=setInterval(()=>{this._hostnamesToFallback.clear()},n*1e3);a.unref&&a.unref(),this._fallbackInterval=a}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,n){if(typeof r=="function"?(n=r,r={}):typeof r=="number"&&(r={family:r}),!n)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(s=>{r.all?n(null,s):n(null,s.address,s.family,s.expires,s.ttl,s.source)},n)}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let n=await this.query(e);if(r.family===6){let s=n.filter(i=>i.family===6);r.hints&vF&&(PF&&r.hints&Ih||s.length===0)?kF(n):n=s}else r.family===4&&(n=n.filter(s=>s.family===4));if(r.hints&AF){let{_iface:s}=this;n=n.filter(i=>i.family===6?s.has6:s.has4)}if(n.length===0){let s=new Error(`cacheableLookup ENOTFOUND ${e}`);throw s.code="ENOTFOUND",s.hostname=e,s}return r.all?n:n[0]}async query(e){let r="cache",n=await this._cache.get(e);if(n&&this.stats.cache++,!n){let s=this._pending[e];if(s)this.stats.cache++,n=await s;else{r="query";let i=this.queryAndCache(e);this._pending[e]=i,this.stats.query++;try{n=await i}finally{delete this._pending[e]}}}return n=n.map(s=>({...s,source:r})),n}async _resolve(e){let[r,n]=await Promise.all([ps(this._resolve4(e,Nh)),ps(this._resolve6(e,Nh))]),s=0,i=0,u=0,a=Date.now();for(let l of r)l.family=4,l.expires=a+l.ttl*1e3,s=Math.max(s,l.ttl);for(let l of n)l.family=6,l.expires=a+l.ttl*1e3,i=Math.max(i,l.ttl);return r.length>0?n.length>0?u=Math.min(s,i):u=s:u=i,{entries:[...r,...n],cacheTtl:u}}async _lookup(e){try{let[r,n]=await Promise.all([ps(this._dnsLookup(e,NF)),ps(this._dnsLookup(e,IF))]);return{entries:[...r,...n],cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,n){if(this.maxTtl>0&&n>0){n=Math.min(n,this.maxTtl)*1e3,r[kh]=Date.now()+n;try{await this._cache.set(e,r,n)}catch(s){this.lookupAsync=async()=>{let i=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw i.cause=s,i}}RF(this._cache)&&this._tick(n)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,BF);let r=await this._resolve(e);r.entries.length===0&&this._dnsLookup&&(r=await this._lookup(e),r.entries.length!==0&&this.fallbackDuration>0&&this._hostnamesToFallback.add(e));let n=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,n),r.entries}_tick(e){let r=this._nextRemovalTime;(!r||e<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let n=1/0,s=Date.now();for(let[i,u]of this._cache){let a=u[kh];s>=a?this._cache.delete(i):a<n&&(n=a)}n!==1/0&&this._tick(n-s)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(Rh(e),yr in e)throw new Error("CacheableLookup has been already installed");e[yr]=e.createConnection,e[So]=this,e.createConnection=(r,n)=>("lookup"in r||(r.lookup=this.lookup),e[yr](r,n))}uninstall(e){if(Rh(e),e[yr]){if(e[So]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[yr],delete e[yr],delete e[So]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=Bh(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}};var qd=Se(jd(),1);c();function Jo(t){let e=[],r=t.split(",");for(let n of r){let[s,...i]=n.split(";"),u=s.trim();if(u[0]!=="<"||u[u.length-1]!==">")throw new Error(`Invalid format of the Link header reference: ${u}`);let a=u.slice(1,-1),l={};if(i.length===0)throw new Error(`Unexpected end of Link header parameters: ${i.join(";")}`);for(let f of i){let h=f.trim(),g=h.indexOf("=");if(g===-1)throw new Error(`Failed to parse Link header: ${t}`);let m=h.slice(0,g).trim(),y=h.slice(g+1).trim();l[m]=y}e.push({reference:a,parameters:l})}return e}o(Jo,"parseLinkHeader");var[Ud,lb]=ib.versions.node.split(".").map(Number);function fb(t){for(let e in t){let r=t[e];w.any([p.string,p.number,p.boolean,p.null_,p.undefined],r)}}o(fb,"validateSearchParameters");var hb=new Map,bs,db=o(()=>bs||(bs=new sn,bs),"getGlobalDnsCache"),Db={request:void 0,agent:{http:void 0,https:void 0,http2:void 0},h2session:void 0,decompress:!0,timeout:{connect:void 0,lookup:void 0,read:void 0,request:void 0,response:void 0,secureConnect:void 0,send:void 0,socket:void 0},prefixUrl:"",body:void 0,form:void 0,json:void 0,cookieJar:void 0,ignoreInvalidCookies:!1,searchParams:void 0,dnsLookup:void 0,dnsCache:void 0,context:{},hooks:{init:[],beforeRequest:[],beforeError:[],beforeRedirect:[],beforeRetry:[],afterResponse:[]},followRedirect:!0,maxRedirects:10,cache:void 0,throwHttpErrors:!0,username:"",password:"",http2:!1,allowGetBody:!1,headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},methodRewriting:!1,dnsLookupIpVersion:void 0,parseJson:JSON.parse,stringifyJson:JSON.stringify,retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:o(({computedValue:t})=>t,"calculateDelay"),backoffLimit:Number.POSITIVE_INFINITY,noise:100},localAddress:void 0,method:"GET",createConnection:void 0,cacheOptions:{shared:void 0,cacheHeuristic:void 0,immutableMinTimeToLive:void 0,ignoreCargoCult:void 0},https:{alpnProtocols:void 0,rejectUnauthorized:void 0,checkServerIdentity:void 0,certificateAuthority:void 0,key:void 0,certificate:void 0,passphrase:void 0,pfx:void 0,ciphers:void 0,honorCipherOrder:void 0,minVersion:void 0,maxVersion:void 0,signatureAlgorithms:void 0,tlsSessionLifetime:void 0,dhparam:void 0,ecdhCurve:void 0,certificateRevocationLists:void 0},encoding:void 0,resolveBodyOnly:!1,isStream:!1,responseType:"text",url:void 0,pagination:{transform(t){return t.request.options.responseType==="json"?t.body:JSON.parse(t.body)},paginate({response:t}){let e=t.headers.link;if(typeof e!="string"||e.trim()==="")return!1;let n=Jo(e).find(s=>s.parameters.rel==="next"||s.parameters.rel==='"next"');return n?{url:new URL(n.reference,t.url)}:!1},filter:o(()=>!0,"filter"),shouldContinue:o(()=>!0,"shouldContinue"),countLimit:Number.POSITIVE_INFINITY,backoff:0,requestLimit:1e4,stackAllItems:!1},setHost:!0,maxHeaderSize:void 0,signal:void 0,enableUnixSockets:!1},pb=o(t=>{let{hooks:e,retry:r}=t,n={...t,context:{...t.context},cacheOptions:{...t.cacheOptions},https:{...t.https},agent:{...t.agent},headers:{...t.headers},retry:{...r,errorCodes:[...r.errorCodes],methods:[...r.methods],statusCodes:[...r.statusCodes]},timeout:{...t.timeout},hooks:{init:[...e.init],beforeRequest:[...e.beforeRequest],beforeError:[...e.beforeError],beforeRedirect:[...e.beforeRedirect],beforeRetry:[...e.beforeRetry],afterResponse:[...e.afterResponse]},searchParams:t.searchParams?new URLSearchParams(t.searchParams):void 0,pagination:{...t.pagination}};return n.url!==void 0&&(n.prefixUrl=""),n},"cloneInternals"),mb=o(t=>{let{hooks:e,retry:r}=t,n={...t};return p.object(t.context)&&(n.context={...t.context}),p.object(t.cacheOptions)&&(n.cacheOptions={...t.cacheOptions}),p.object(t.https)&&(n.https={...t.https}),p.object(t.cacheOptions)&&(n.cacheOptions={...n.cacheOptions}),p.object(t.agent)&&(n.agent={...t.agent}),p.object(t.headers)&&(n.headers={...t.headers}),p.object(r)&&(n.retry={...r},p.array(r.errorCodes)&&(n.retry.errorCodes=[...r.errorCodes]),p.array(r.methods)&&(n.retry.methods=[...r.methods]),p.array(r.statusCodes)&&(n.retry.statusCodes=[...r.statusCodes])),p.object(t.timeout)&&(n.timeout={...t.timeout}),p.object(e)&&(n.hooks={...e},p.array(e.init)&&(n.hooks.init=[...e.init]),p.array(e.beforeRequest)&&(n.hooks.beforeRequest=[...e.beforeRequest]),p.array(e.beforeError)&&(n.hooks.beforeError=[...e.beforeError]),p.array(e.beforeRedirect)&&(n.hooks.beforeRedirect=[...e.beforeRedirect]),p.array(e.beforeRetry)&&(n.hooks.beforeRetry=[...e.beforeRetry]),p.array(e.afterResponse)&&(n.hooks.afterResponse=[...e.afterResponse])),p.object(t.pagination)&&(n.pagination={...t.pagination}),n},"cloneRaw"),yb=o(t=>{let e=[t.timeout.socket,t.timeout.connect,t.timeout.lookup,t.timeout.request,t.timeout.secureConnect].filter(r=>typeof r=="number");if(e.length>0)return Math.min(...e)},"getHttp2TimeoutOption"),Gd=o((t,e,r)=>{let n=t.hooks?.init;if(n)for(let s of n)s(e,r)},"init"),Be=class t{static{o(this,"Options")}constructor(e,r,n){if(Object.defineProperty(this,"_unixOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_internals",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_merging",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_init",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),w.any([p.string,p.urlInstance,p.object,p.undefined],e),w.any([p.object,p.undefined],r),w.any([p.object,p.undefined],n),e instanceof t||r instanceof t)throw new TypeError("The defaults must be passed as the third argument");this._internals=pb(n?._internals??n??Db),this._init=[...n?._init??[]],this._merging=!1,this._unixOptions=void 0;try{if(p.plainObject(e))try{this.merge(e),this.merge(r)}finally{this.url=e.url}else try{this.merge(r)}finally{if(r?.url!==void 0)if(e===void 0)this.url=r.url;else throw new TypeError("The `url` option is mutually exclusive with the `input` argument");else e!==void 0&&(this.url=e)}}catch(s){throw s.options=this,s}}merge(e){if(e){if(e instanceof t){for(let r of e._init)this.merge(r);return}e=mb(e),Gd(this,e,this),Gd(e,e,this),this._merging=!0,"isStream"in e&&(this.isStream=e.isStream);try{let r=!1;for(let n in e){if(n==="mutableDefaults"||n==="handlers"||n==="url")continue;if(!(n in this))throw new Error(`Unexpected option: ${n}`);let s=e[n];s!==void 0&&(this[n]=s,r=!0)}r&&this._init.push(e)}finally{this._merging=!1}}}get request(){return this._internals.request}set request(e){w.any([p.function_,p.undefined],e),this._internals.request=e}get agent(){return this._internals.agent}set agent(e){w.plainObject(e);for(let r in e){if(!(r in this._internals.agent))throw new TypeError(`Unexpected agent option: ${r}`);w.any([p.object,p.undefined],e[r])}this._merging?Object.assign(this._internals.agent,e):this._internals.agent={...e}}get h2session(){return this._internals.h2session}set h2session(e){this._internals.h2session=e}get decompress(){return this._internals.decompress}set decompress(e){w.boolean(e),this._internals.decompress=e}get timeout(){return this._internals.timeout}set timeout(e){w.plainObject(e);for(let r in e){if(!(r in this._internals.timeout))throw new Error(`Unexpected timeout option: ${r}`);w.any([p.number,p.undefined],e[r])}this._merging?Object.assign(this._internals.timeout,e):this._internals.timeout={...e}}get prefixUrl(){return this._internals.prefixUrl}set prefixUrl(e){if(w.any([p.string,p.urlInstance],e),e===""){this._internals.prefixUrl="";return}if(e=e.toString(),e.endsWith("/")||(e+="/"),this._internals.prefixUrl&&this._internals.url){let{href:r}=this._internals.url;this._internals.url.href=e+r.slice(this._internals.prefixUrl.length)}this._internals.prefixUrl=e}get body(){return this._internals.body}set body(e){w.any([p.string,p.buffer,p.nodeStream,p.generator,p.asyncGenerator,mr,p.undefined],e),p.nodeStream(e)&&w.truthy(e.readable),e!==void 0&&(w.undefined(this._internals.form),w.undefined(this._internals.json)),this._internals.body=e}get form(){return this._internals.form}set form(e){w.any([p.plainObject,p.undefined],e),e!==void 0&&(w.undefined(this._internals.body),w.undefined(this._internals.json)),this._internals.form=e}get json(){return this._internals.json}set json(e){e!==void 0&&(w.undefined(this._internals.body),w.undefined(this._internals.form)),this._internals.json=e}get url(){return this._internals.url}set url(e){if(w.any([p.string,p.urlInstance,p.undefined],e),e===void 0){this._internals.url=void 0;return}if(p.string(e)&&e.startsWith("/"))throw new Error("`url` must not start with a slash");let r=`${this.prefixUrl}${e.toString()}`,n=new URL(r);if(this._internals.url=n,n.protocol==="unix:"&&(n.href=`http://unix${n.pathname}${n.search}`),n.protocol!=="http:"&&n.protocol!=="https:"){let s=new Error(`Unsupported protocol: ${n.protocol}`);throw s.code="ERR_UNSUPPORTED_PROTOCOL",s}if(this._internals.username&&(n.username=this._internals.username,this._internals.username=""),this._internals.password&&(n.password=this._internals.password,this._internals.password=""),this._internals.searchParams&&(n.search=this._internals.searchParams.toString(),this._internals.searchParams=void 0),n.hostname==="unix"){if(!this._internals.enableUnixSockets)throw new Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled");let s=/(?<socketPath>.+?):(?<path>.+)/.exec(`${n.pathname}${n.search}`);if(s?.groups){let{socketPath:i,path:u}=s.groups;this._unixOptions={socketPath:i,path:u,host:""}}else this._unixOptions=void 0;return}this._unixOptions=void 0}get cookieJar(){return this._internals.cookieJar}set cookieJar(e){if(w.any([p.object,p.undefined],e),e===void 0){this._internals.cookieJar=void 0;return}let{setCookie:r,getCookieString:n}=e;w.function_(r),w.function_(n),r.length===4&&n.length===0?(r=Md(r.bind(e)),n=Md(n.bind(e)),this._internals.cookieJar={setCookie:r,getCookieString:n}):this._internals.cookieJar=e}get signal(){return this._internals.signal}set signal(e){w.object(e),this._internals.signal=e}get ignoreInvalidCookies(){return this._internals.ignoreInvalidCookies}set ignoreInvalidCookies(e){w.boolean(e),this._internals.ignoreInvalidCookies=e}get searchParams(){return this._internals.url?this._internals.url.searchParams:(this._internals.searchParams===void 0&&(this._internals.searchParams=new URLSearchParams),this._internals.searchParams)}set searchParams(e){w.any([p.string,p.object,p.undefined],e);let r=this._internals.url;if(e===void 0){this._internals.searchParams=void 0,r&&(r.search="");return}let n=this.searchParams,s;if(p.string(e))s=new URLSearchParams(e);else if(e instanceof URLSearchParams)s=e;else{fb(e),s=new URLSearchParams;for(let i in e){let u=e[i];u===null?s.append(i,""):u===void 0?n.delete(i):s.append(i,u)}}if(this._merging){for(let i of s.keys())n.delete(i);for(let[i,u]of s)n.append(i,u)}else r?r.search=n.toString():this._internals.searchParams=n}get searchParameters(){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}set searchParameters(e){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}get dnsLookup(){return this._internals.dnsLookup}set dnsLookup(e){w.any([p.function_,p.undefined],e),this._internals.dnsLookup=e}get dnsCache(){return this._internals.dnsCache}set dnsCache(e){w.any([p.object,p.boolean,p.undefined],e),e===!0?this._internals.dnsCache=db():e===!1?this._internals.dnsCache=void 0:this._internals.dnsCache=e}get context(){return this._internals.context}set context(e){w.object(e),this._merging?Object.assign(this._internals.context,e):this._internals.context={...e}}get hooks(){return this._internals.hooks}set hooks(e){w.object(e);for(let r in e){if(!(r in this._internals.hooks))throw new Error(`Unexpected hook event: ${r}`);let n=r,s=e[n];if(w.any([p.array,p.undefined],s),s)for(let i of s)w.function_(i);if(this._merging)s&&this._internals.hooks[n].push(...s);else{if(!s)throw new Error(`Missing hook event: ${r}`);this._internals.hooks[r]=[...s]}}}get followRedirect(){return this._internals.followRedirect}set followRedirect(e){w.boolean(e),this._internals.followRedirect=e}get followRedirects(){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}set followRedirects(e){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}get maxRedirects(){return this._internals.maxRedirects}set maxRedirects(e){w.number(e),this._internals.maxRedirects=e}get cache(){return this._internals.cache}set cache(e){w.any([p.object,p.string,p.boolean,p.undefined],e),e===!0?this._internals.cache=hb:e===!1?this._internals.cache=void 0:this._internals.cache=e}get throwHttpErrors(){return this._internals.throwHttpErrors}set throwHttpErrors(e){w.boolean(e),this._internals.throwHttpErrors=e}get username(){let e=this._internals.url,r=e?e.username:this._internals.username;return decodeURIComponent(r)}set username(e){w.string(e);let r=this._internals.url,n=encodeURIComponent(e);r?r.username=n:this._internals.username=n}get password(){let e=this._internals.url,r=e?e.password:this._internals.password;return decodeURIComponent(r)}set password(e){w.string(e);let r=this._internals.url,n=encodeURIComponent(e);r?r.password=n:this._internals.password=n}get http2(){return this._internals.http2}set http2(e){w.boolean(e),this._internals.http2=e}get allowGetBody(){return this._internals.allowGetBody}set allowGetBody(e){w.boolean(e),this._internals.allowGetBody=e}get headers(){return this._internals.headers}set headers(e){w.plainObject(e),this._merging?Object.assign(this._internals.headers,Dr(e)):this._internals.headers=Dr(e)}get methodRewriting(){return this._internals.methodRewriting}set methodRewriting(e){w.boolean(e),this._internals.methodRewriting=e}get dnsLookupIpVersion(){return this._internals.dnsLookupIpVersion}set dnsLookupIpVersion(e){if(e!==void 0&&e!==4&&e!==6)throw new TypeError(`Invalid DNS lookup IP version: ${e}`);this._internals.dnsLookupIpVersion=e}get parseJson(){return this._internals.parseJson}set parseJson(e){w.function_(e),this._internals.parseJson=e}get stringifyJson(){return this._internals.stringifyJson}set stringifyJson(e){w.function_(e),this._internals.stringifyJson=e}get retry(){return this._internals.retry}set retry(e){if(w.plainObject(e),w.any([p.function_,p.undefined],e.calculateDelay),w.any([p.number,p.undefined],e.maxRetryAfter),w.any([p.number,p.undefined],e.limit),w.any([p.array,p.undefined],e.methods),w.any([p.array,p.undefined],e.statusCodes),w.any([p.array,p.undefined],e.errorCodes),w.any([p.number,p.undefined],e.noise),e.noise&&Math.abs(e.noise)>100)throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${e.noise}`);for(let n in e)if(!(n in this._internals.retry))throw new Error(`Unexpected retry option: ${n}`);this._merging?Object.assign(this._internals.retry,e):this._internals.retry={...e};let{retry:r}=this._internals;r.methods=[...new Set(r.methods.map(n=>n.toUpperCase()))],r.statusCodes=[...new Set(r.statusCodes)],r.errorCodes=[...new Set(r.errorCodes)]}get localAddress(){return this._internals.localAddress}set localAddress(e){w.any([p.string,p.undefined],e),this._internals.localAddress=e}get method(){return this._internals.method}set method(e){w.string(e),this._internals.method=e.toUpperCase()}get createConnection(){return this._internals.createConnection}set createConnection(e){w.any([p.function_,p.undefined],e),this._internals.createConnection=e}get cacheOptions(){return this._internals.cacheOptions}set cacheOptions(e){w.plainObject(e),w.any([p.boolean,p.undefined],e.shared),w.any([p.number,p.undefined],e.cacheHeuristic),w.any([p.number,p.undefined],e.immutableMinTimeToLive),w.any([p.boolean,p.undefined],e.ignoreCargoCult);for(let r in e)if(!(r in this._internals.cacheOptions))throw new Error(`Cache option \`${r}\` does not exist`);this._merging?Object.assign(this._internals.cacheOptions,e):this._internals.cacheOptions={...e}}get https(){return this._internals.https}set https(e){w.plainObject(e),w.any([p.boolean,p.undefined],e.rejectUnauthorized),w.any([p.function_,p.undefined],e.checkServerIdentity),w.any([p.string,p.object,p.array,p.undefined],e.certificateAuthority),w.any([p.string,p.object,p.array,p.undefined],e.key),w.any([p.string,p.object,p.array,p.undefined],e.certificate),w.any([p.string,p.undefined],e.passphrase),w.any([p.string,p.buffer,p.array,p.undefined],e.pfx),w.any([p.array,p.undefined],e.alpnProtocols),w.any([p.string,p.undefined],e.ciphers),w.any([p.string,p.buffer,p.undefined],e.dhparam),w.any([p.string,p.undefined],e.signatureAlgorithms),w.any([p.string,p.undefined],e.minVersion),w.any([p.string,p.undefined],e.maxVersion),w.any([p.boolean,p.undefined],e.honorCipherOrder),w.any([p.number,p.undefined],e.tlsSessionLifetime),w.any([p.string,p.undefined],e.ecdhCurve),w.any([p.string,p.buffer,p.array,p.undefined],e.certificateRevocationLists);for(let r in e)if(!(r in this._internals.https))throw new Error(`HTTPS option \`${r}\` does not exist`);this._merging?Object.assign(this._internals.https,e):this._internals.https={...e}}get encoding(){return this._internals.encoding}set encoding(e){if(e===null)throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");w.any([p.string,p.undefined],e),this._internals.encoding=e}get resolveBodyOnly(){return this._internals.resolveBodyOnly}set resolveBodyOnly(e){w.boolean(e),this._internals.resolveBodyOnly=e}get isStream(){return this._internals.isStream}set isStream(e){w.boolean(e),this._internals.isStream=e}get responseType(){return this._internals.responseType}set responseType(e){if(e===void 0){this._internals.responseType="text";return}if(e!=="text"&&e!=="buffer"&&e!=="json")throw new Error(`Invalid \`responseType\` option: ${e}`);this._internals.responseType=e}get pagination(){return this._internals.pagination}set pagination(e){w.object(e),this._merging?Object.assign(this._internals.pagination,e):this._internals.pagination=e}get auth(){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}set auth(e){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}get setHost(){return this._internals.setHost}set setHost(e){w.boolean(e),this._internals.setHost=e}get maxHeaderSize(){return this._internals.maxHeaderSize}set maxHeaderSize(e){w.any([p.number,p.undefined],e),this._internals.maxHeaderSize=e}get enableUnixSockets(){return this._internals.enableUnixSockets}set enableUnixSockets(e){w.boolean(e),this._internals.enableUnixSockets=e}toJSON(){return{...this._internals}}[Symbol.for("nodejs.util.inspect.custom")](e,r){return ob(this._internals,r)}createNativeRequestOptions(){let e=this._internals,r=e.url,n;r.protocol==="https:"?n=e.http2?e.agent:e.agent.https:n=e.agent.http;let{https:s}=e,{pfx:i}=s;return p.array(i)&&p.plainObject(i[0])&&(i=i.map(u=>({buf:u.buffer,passphrase:u.passphrase}))),{...e.cacheOptions,...this._unixOptions,ALPNProtocols:s.alpnProtocols,ca:s.certificateAuthority,cert:s.certificate,key:s.key,passphrase:s.passphrase,pfx:s.pfx,rejectUnauthorized:s.rejectUnauthorized,checkServerIdentity:s.checkServerIdentity??ub,ciphers:s.ciphers,honorCipherOrder:s.honorCipherOrder,minVersion:s.minVersion,maxVersion:s.maxVersion,sigalgs:s.signatureAlgorithms,sessionTimeout:s.tlsSessionLifetime,dhparam:s.dhparam,ecdhCurve:s.ecdhCurve,crl:s.certificateRevocationLists,lookup:e.dnsLookup??e.dnsCache?.lookup,family:e.dnsLookupIpVersion,agent:n,setHost:e.setHost,method:e.method,maxHeaderSize:e.maxHeaderSize,localAddress:e.localAddress,headers:e.headers,createConnection:e.createConnection,timeout:e.http2?yb(e):void 0,h2session:e.h2session}}getRequestFunction(){let e=this._internals.url,{request:r}=this._internals;return!r&&e?this.getFallbackRequestFunction():r}getFallbackRequestFunction(){let e=this._internals.url;if(e){if(e.protocol==="https:"){if(this._internals.http2){if(Ud<15||Ud===15&&lb<10){let r=new Error("To use the `http2` option, install Node.js 15.10.0 or above");throw r.code="EUNSUPPORTED",r}return qd.default.auto}return cb.request}return ab.request}}freeze(){let e=this._internals;Object.freeze(e),Object.freeze(e.hooks),Object.freeze(e.hooks.afterResponse),Object.freeze(e.hooks.beforeError),Object.freeze(e.hooks.beforeRedirect),Object.freeze(e.hooks.beforeRequest),Object.freeze(e.hooks.beforeRetry),Object.freeze(e.hooks.init),Object.freeze(e.https),Object.freeze(e.cacheOptions),Object.freeze(e.agent),Object.freeze(e.headers),Object.freeze(e.timeout),Object.freeze(e.retry),Object.freeze(e.retry.errorCodes),Object.freeze(e.retry.methods),Object.freeze(e.retry.statusCodes)}};c();var Cr=o(t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304},"isResponseOk"),ws=class extends J{static{o(this,"ParseError")}constructor(e,r){let{options:n}=r.request;super(`${e.message} in "${n.url.toString()}"`,e,r.request),this.name="ParseError",this.code="ERR_BODY_PARSE_FAILURE"}},Ko=o((t,e,r,n)=>{let{rawBody:s}=t;try{if(e==="text")return s.toString(n);if(e==="json")return s.length===0?"":r(s.toString(n));if(e==="buffer")return s}catch(i){throw new ws(i,t)}throw new ws({message:`Unknown body type '${e}'`,name:"Error"},t)},"parseBody");c();function gb(t){return t.writable&&!t.writableEnded}o(gb,"isClientRequest");var Hd=gb;c();function _s(t){return t.protocol==="unix:"||t.hostname==="unix"}o(_s,"isUnixSocketURL");var{buffer:Cb}=Zd.default,bb=p.string(Wd.versions.brotli),wb=new Set(["GET","HEAD"]),Qo=new nn,_b=new Set([300,301,302,303,304,307,308]),xb=["socket","connect","continue","information","upgrade"],xs=o(()=>{},"noop"),qt=class t extends Eb{static{o(this,"Request")}constructor(e,r,n){super({autoDestroy:!1,highWaterMark:0}),Object.defineProperty(this,"constructor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_noPipe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"redirectUrls",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"retryCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopRetry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downloadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_uploadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopReading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pipedServerResponses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_responseSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bodySize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_unproxyEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isFromCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cannotHaveBody",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_triggerRead",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cancelTimeouts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_removeListeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nativeResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_flushed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_aborted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_requestInitialized",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._downloadedSize=0,this._uploadedSize=0,this._stopReading=!1,this._pipedServerResponses=new Set,this._cannotHaveBody=!1,this._unproxyEvents=xs,this._triggerRead=!1,this._cancelTimeouts=xs,this._removeListeners=xs,this._jobs=[],this._flushed=!1,this._requestInitialized=!1,this._aborted=!1,this.redirectUrls=[],this.retryCount=0,this._stopRetry=xs,this.on("pipe",i=>{i?.headers&&Object.assign(this.options.headers,i.headers)}),this.on("newListener",i=>{if(i==="retry"&&this.listenerCount("retry")>0)throw new Error("A retry listener has been attached already.")});try{if(this.options=new Be(e,r,n),!this.options.url){if(this.options.prefixUrl==="")throw new TypeError("Missing `url` property");this.options.url=""}this.requestUrl=this.options.url}catch(i){let{options:u}=i;u&&(this.options=u),this.flush=async()=>{this.flush=async()=>{},this.destroy(i)};return}let{body:s}=this.options;if(p.nodeStream(s)&&s.once("error",i=>{this._flushed?this._beforeError(new Hr(i,this)):this.flush=async()=>{this.flush=async()=>{},this._beforeError(new Hr(i,this))}}),this.options.signal){let i=o(()=>{this.destroy(new os(this))},"abort");this.options.signal.aborted?i():(this.options.signal.addEventListener("abort",i),this._removeListeners=()=>{this.options.signal?.removeEventListener("abort",i)})}}async flush(){if(!this._flushed){this._flushed=!0;try{if(await this._finalizeBody(),this.destroyed)return;if(await this._makeRequest(),this.destroyed){this._request?.destroy();return}for(let e of this._jobs)e();this._jobs.length=0,this._requestInitialized=!0}catch(e){this._beforeError(e)}}}_beforeError(e){if(this._stopReading)return;let{response:r,options:n}=this,s=this.retryCount+(e.name==="RetryError"?0:1);this._stopReading=!0,e instanceof J||(e=new J(e.message,e,this));let i=e;(async()=>{if(r?.readable&&!r.rawBody&&!this._request?.socket?.destroyed&&(r.setEncoding(this.readableEncoding),await this._setRawBody(r)&&(r.body=r.rawBody.toString())),this.listenerCount("retry")!==0){let u;try{let a;r&&"retry-after"in r.headers&&(a=Number(r.headers["retry-after"]),Number.isNaN(a)?(a=Date.parse(r.headers["retry-after"])-Date.now(),a<=0&&(a=1)):a*=1e3);let l=n.retry;u=await l.calculateDelay({attemptCount:s,retryOptions:l,error:i,retryAfter:a,computedValue:Oh({attemptCount:s,retryOptions:l,error:i,retryAfter:a,computedValue:l.maxRetryAfter??n.timeout.request??Number.POSITIVE_INFINITY})})}catch(a){this._error(new J(a.message,a,this));return}if(u){if(await new Promise(a=>{let l=setTimeout(a,u);this._stopRetry=()=>{clearTimeout(l),a()}}),this.destroyed)return;try{for(let a of this.options.hooks.beforeRetry)await a(i,this.retryCount+1)}catch(a){this._error(new J(a.message,e,this));return}if(this.destroyed)return;this.destroy(),this.emit("retry",this.retryCount+1,e,a=>{let l=new t(n.url,a,n);return l.retryCount=this.retryCount+1,Wd.nextTick(()=>{l.flush()}),l});return}}this._error(i)})()}_read(){this._triggerRead=!0;let{response:e}=this;if(e&&!this._stopReading){e.readableLength&&(this._triggerRead=!1);let r;for(;(r=e.read())!==null;){this._downloadedSize+=r.length;let n=this.downloadProgress;n.percent<1&&this.emit("downloadProgress",n),this.push(r)}}}_write(e,r,n){let s=o(()=>{this._writeRequest(e,r,n)},"write");this._requestInitialized?s():this._jobs.push(s)}_final(e){let r=o(()=>{if(!this._request||this._request.destroyed){e();return}this._request.end(n=>{this._request._writableState?.errored||(n||(this._bodySize=this._uploadedSize,this.emit("uploadProgress",this.uploadProgress),this._request.emit("upload-complete")),e(n))})},"endRequest");this._requestInitialized?r():this._jobs.push(r)}_destroy(e,r){if(this._stopReading=!0,this.flush=async()=>{},this._stopRetry(),this._cancelTimeouts(),this._removeListeners(),this.options){let{body:n}=this.options;p.nodeStream(n)&&n.destroy()}this._request&&this._request.destroy(),e!==null&&!p.undefined(e)&&!(e instanceof J)&&(e=new J(e.message,e,this)),r(e)}pipe(e,r){return e instanceof zd&&this._pipedServerResponses.add(e),super.pipe(e,r)}unpipe(e){return e instanceof zd&&this._pipedServerResponses.delete(e),super.unpipe(e),this}async _finalizeBody(){let{options:e}=this,{headers:r}=e,n=!p.undefined(e.form),s=!p.undefined(e.json),i=!p.undefined(e.body),u=wb.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);if(this._cannotHaveBody=u,n||s||i){if(u)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);let a=!p.string(r["content-type"]);if(i){if(mr(e.body)){let f=new Ds(e.body);a&&(r["content-type"]=f.headers["Content-Type"]),"Content-Length"in f.headers&&(r["content-length"]=f.headers["Content-Length"]),e.body=f.encode()}en(e.body)&&a&&(r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`)}else if(n){a&&(r["content-type"]="application/x-www-form-urlencoded");let{form:f}=e;e.form=void 0,e.body=new URLSearchParams(f).toString()}else{a&&(r["content-type"]="application/json");let{json:f}=e;e.json=void 0,e.body=e.stringifyJson(f)}let l=await Co(e.body,e.headers);p.undefined(r["content-length"])&&p.undefined(r["transfer-encoding"])&&!u&&!p.undefined(l)&&(r["content-length"]=String(l))}e.responseType==="json"&&!("accept"in e.headers)&&(e.headers.accept="application/json"),this._bodySize=Number(r["content-length"])||void 0}async _onResponseBase(e){if(this.isAborted)return;let{options:r}=this,{url:n}=r;this._nativeResponse=e,r.decompress&&(e=(0,Vd.default)(e));let s=e.statusCode,i=e;i.statusMessage=i.statusMessage??Fb.STATUS_CODES[s],i.url=r.url.toString(),i.requestUrl=this.requestUrl,i.redirectUrls=this.redirectUrls,i.request=this,i.isFromCache=this._nativeResponse.fromCache??!1,i.ip=this.ip,i.retryCount=this.retryCount,i.ok=Cr(i),this._isFromCache=i.isFromCache,this._responseSize=Number(e.headers["content-length"])||void 0,this.response=i,e.once("end",()=>{this._responseSize=this._downloadedSize,this.emit("downloadProgress",this.downloadProgress)}),e.once("error",a=>{this._aborted=!0,e.destroy(),this._beforeError(new zr(a,this))}),e.once("aborted",()=>{this._aborted=!0,this._beforeError(new zr({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let u=e.headers["set-cookie"];if(p.object(r.cookieJar)&&u){let a=u.map(async l=>r.cookieJar.setCookie(l,n.toString()));r.ignoreInvalidCookies&&(a=a.map(async l=>{try{await l}catch{}}));try{await Promise.all(a)}catch(l){this._beforeError(l);return}}if(!this.isAborted){if(r.followRedirect&&e.headers.location&&_b.has(s)){if(e.resume(),this._cancelTimeouts(),this._unproxyEvents(),this.redirectUrls.length>=r.maxRedirects){this._beforeError(new rs(this));return}this._request=void 0;let a=new Be(void 0,void 0,this.options),l=s===303&&a.method!=="GET"&&a.method!=="HEAD",f=s!==307&&s!==308,h=a.methodRewriting&&f;(l||h)&&(a.method="GET",a.body=void 0,a.json=void 0,a.form=void 0,delete a.headers["content-length"]);try{let g=Xo.from(e.headers.location,"binary").toString(),m=new URL(g,n);if(!_s(n)&&_s(m)){this._beforeError(new J("Cannot redirect to UNIX socket",{},this));return}m.hostname!==n.hostname||m.port!==n.port?("host"in a.headers&&delete a.headers.host,"cookie"in a.headers&&delete a.headers.cookie,"authorization"in a.headers&&delete a.headers.authorization,(a.username||a.password)&&(a.username="",a.password="")):(m.username=a.username,m.password=a.password),this.redirectUrls.push(m),a.prefixUrl="",a.url=m;for(let y of a.hooks.beforeRedirect)await y(a,i);this.emit("redirect",a,i),this.options=a,await this._makeRequest()}catch(g){this._beforeError(g);return}return}if(r.isStream&&r.throwHttpErrors&&!Cr(i)){this._beforeError(new dt(i));return}if(e.on("readable",()=>{this._triggerRead&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this._noPipe){await this._setRawBody()&&this.emit("response",e);return}this.emit("response",e);for(let a of this._pipedServerResponses)if(!a.headersSent){for(let l in e.headers){let f=r.decompress?l!=="content-encoding":!0,h=e.headers[l];f&&a.setHeader(l,h)}a.statusCode=s}}}async _setRawBody(e=this){if(e.readableEnded)return!1;try{let r=await Cb(e);if(!this.isAborted)return this.response.rawBody=r,!0}catch{}return!1}async _onResponse(e){try{await this._onResponseBase(e)}catch(r){this._beforeError(r)}}_onRequest(e){let{options:r}=this,{timeout:n,url:s}=r;uh(e),this.options.http2&&e.setTimeout(0),this._cancelTimeouts=wo(e,n,s);let i=r.cache?"cacheableResponse":"response";e.once(i,u=>{this._onResponse(u)}),e.once("error",u=>{this._aborted=!0,e.destroy(),u=u instanceof rn?new ss(u,this.timings,this):new J(u.message,u,this),this._beforeError(u)}),this._unproxyEvents=tn(e,this,xb),this._request=e,this.emit("uploadProgress",this.uploadProgress),this._sendBody(),this.emit("request",e)}async _asyncWrite(e){return new Promise((r,n)=>{super.write(e,s=>{if(s){n(s);return}r()})})}_sendBody(){let{body:e}=this.options,r=this.redirectUrls.length===0?this:this._request??this;p.nodeStream(e)?e.pipe(r):p.generator(e)||p.asyncGenerator(e)?(async()=>{try{for await(let n of e)await this._asyncWrite(n);super.end()}catch(n){this._beforeError(n)}})():p.undefined(e)?(this._cannotHaveBody||this._noPipe)&&r.end():(this._writeRequest(e,void 0,()=>{}),r.end())}_prepareCache(e){if(!Qo.has(e)){let r=new Eh((n,s)=>{let i=n._request(n,s);return p.promise(i)&&(i.once=(u,a)=>{if(u==="error")(async()=>{try{await i}catch(l){a(l)}})();else if(u==="abort")(async()=>{try{(await i).once("abort",a)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${u}`);return i}),i},e);Qo.set(e,r.request())}}async _createCacheableRequest(e,r){return new Promise((n,s)=>{Object.assign(r,_o(e));let i,u=Qo.get(r.cache)(r,async a=>{if(a._readableState.autoDestroy=!1,i){let l=o(()=>{a.req&&(a.complete=a.req.res.complete)},"fix");a.prependOnceListener("end",l),l(),(await i).emit("cacheableResponse",a)}n(a)});u.once("error",s),u.once("request",async a=>{i=a,n(i)})})}async _makeRequest(){let{options:e}=this,{headers:r,username:n,password:s}=e,i=e.cookieJar;for(let f in r)if(p.undefined(r[f]))delete r[f];else if(p.null_(r[f]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${f}\` header`);if(e.decompress&&p.undefined(r["accept-encoding"])&&(r["accept-encoding"]=bb?"gzip, deflate, br":"gzip, deflate"),n||s){let f=Xo.from(`${n}:${s}`).toString("base64");r.authorization=`Basic ${f}`}if(i){let f=await i.getCookieString(e.url.toString());p.nonEmptyString(f)&&(r.cookie=f)}e.prefixUrl="";let u;for(let f of e.hooks.beforeRequest){let h=await f(e);if(!p.undefined(h)){u=o(()=>h,"request");break}}u||(u=e.getRequestFunction());let a=e.url;this._requestOptions=e.createNativeRequestOptions(),e.cache&&(this._requestOptions._request=u,this._requestOptions.cache=e.cache,this._requestOptions.body=e.body,this._prepareCache(e.cache));let l=e.cache?this._createCacheableRequest:u;try{let f=l(a,this._requestOptions);p.promise(f)&&(f=await f),p.undefined(f)&&(f=e.getFallbackRequestFunction()(a,this._requestOptions),p.promise(f)&&(f=await f)),Hd(f)?this._onRequest(f):this.writable?(this.once("finish",()=>{this._onResponse(f)}),this._sendBody()):this._onResponse(f)}catch(f){throw f instanceof et?new ns(f,this):f}}async _error(e){try{if(!(e instanceof dt&&!this.options.throwHttpErrors))for(let r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new J(r.message,r,this)}this.destroy(e)}_writeRequest(e,r,n){!this._request||this._request.destroyed||this._request.write(e,r,s=>{if(!s&&!this._request.destroyed){this._uploadedSize+=Xo.byteLength(e,r);let i=this.uploadProgress;i.percent<1&&this.emit("uploadProgress",i)}n(s)})}get ip(){return this.socket?.remoteAddress}get isAborted(){return this._aborted}get socket(){return this._request?.socket??void 0}get downloadProgress(){let e;return this._responseSize?e=this._downloadedSize/this._responseSize:this._responseSize===this._downloadedSize?e=1:e=0,{percent:e,transferred:this._downloadedSize,total:this._responseSize}}get uploadProgress(){let e;return this._bodySize?e=this._uploadedSize/this._bodySize:this._bodySize===this._uploadedSize?e=1:e=0,{percent:e,transferred:this._uploadedSize,total:this._bodySize}}get timings(){return this._request?.timings}get isFromCache(){return this._isFromCache}get reusedSocket(){return this._request?.reusedSocket}};c();var Ss=class extends J{static{o(this,"CancelError")}constructor(e){super("Promise was canceled",{},e),this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}};var vb=["request","response","redirect","uploadProgress","downloadProgress"];function vs(t){let e,r,n,s=new Sb,i=new dr((a,l,f)=>{f(()=>{e.destroy()}),f.shouldReject=!1,f(()=>{l(new Ss(e))});let h=o(g=>{f(()=>{});let m=t??new qt(void 0,void 0,n);m.retryCount=g,m._noPipe=!0,e=m,m.once("response",async D=>{let C=(D.headers["content-encoding"]??"").toLowerCase(),F=C==="gzip"||C==="deflate"||C==="br",{options:O}=m;if(F&&!O.decompress)D.body=D.rawBody;else try{D.body=Ko(D,O.responseType,O.parseJson,O.encoding)}catch(S){if(D.body=D.rawBody.toString(),Cr(D)){m._beforeError(S);return}}try{let S=O.hooks.afterResponse;for(let[k,U]of S.entries())if(D=await U(D,async te=>{throw O.merge(te),O.prefixUrl="",te.url&&(O.url=te.url),O.hooks.afterResponse=O.hooks.afterResponse.slice(0,k),new is(m)}),!(p.object(D)&&p.number(D.statusCode)&&!p.nullOrUndefined(D.body)))throw new TypeError("The `afterResponse` hook returned an invalid value")}catch(S){m._beforeError(S);return}if(r=D,!Cr(D)){m._beforeError(new dt(D));return}m.destroy(),a(m.options.resolveBodyOnly?D.body:D)});let y=o(D=>{if(i.isCanceled)return;let{options:C}=m;if(D instanceof dt&&!C.throwHttpErrors){let{response:F}=D;m.destroy(),a(m.options.resolveBodyOnly?F.body:F);return}l(D)},"onError");m.once("error",y);let E=m.options?.body;m.once("retry",(D,C)=>{t=void 0;let F=m.options.body;if(E===F&&p.nodeStream(F)){C.message="Cannot retry with consumed body stream",y(C);return}n=m.options,h(D)}),tn(m,s,vb),p.undefined(t)&&m.flush()},"makeRequest");h(0)});i.on=(a,l)=>(s.on(a,l),i),i.off=(a,l)=>(s.off(a,l),i);let u=o(a=>{let l=(async()=>{await i;let{options:f}=r.request;return Ko(r,a,f.parseJson,f.encoding)})();return Object.defineProperties(l,Object.getOwnPropertyDescriptors(i)),l},"shortcut");return i.json=()=>{if(e.options){let{headers:a}=e.options;!e.writableFinished&&!("accept"in a)&&(a.accept="application/json")}return u("json")},i.buffer=()=>u("buffer"),i.text=()=>u("text"),i}o(vs,"asPromise");var Ab=o(async t=>new Promise(e=>{setTimeout(e,t)}),"delay"),Tb=o(t=>p.function_(t),"isGotInstance"),Lb=["get","post","put","patch","head","delete"],Yd=o(t=>{t={options:new Be(void 0,void 0,t.options),handlers:[...t.handlers],mutableDefaults:t.mutableDefaults},Object.defineProperty(t,"mutableDefaults",{enumerable:!0,configurable:!1,writable:!1});let e=o((n,s,i=t.options)=>{let u=new qt(n,s,i),a,l=o(g=>(u.options=g,u._noPipe=!g.isStream,u.flush(),g.isStream?u:(a||(a=vs(u)),a)),"lastHandler"),f=0,h=o(g=>{let y=(t.handlers[f++]??l)(g,h);if(p.promise(y)&&!u.options.isStream&&(a||(a=vs(u)),y!==a)){let E=Object.getOwnPropertyDescriptors(a);for(let D in E)D in y&&delete E[D];Object.defineProperties(y,E),y.cancel=a.cancel}return y},"iterateHandlers");return h(u.options)},"got");e.extend=(...n)=>{let s=new Be(void 0,void 0,t.options),i=[...t.handlers],u;for(let a of n)Tb(a)?(s.merge(a.defaults.options),i.push(...a.defaults.handlers),u=a.defaults.mutableDefaults):(s.merge(a),a.handlers&&i.push(...a.handlers),u=a.mutableDefaults);return Yd({options:s,handlers:i,mutableDefaults:!!u})};let r=o(async function*(n,s){let i=new Be(n,s,t.options);i.resolveBodyOnly=!1;let{pagination:u}=i;w.function_(u.transform),w.function_(u.shouldContinue),w.function_(u.filter),w.function_(u.paginate),w.number(u.countLimit),w.number(u.requestLimit),w.number(u.backoff);let a=[],{countLimit:l}=u,f=0;for(;f<u.requestLimit;){f!==0&&await Ab(u.backoff);let h=await e(void 0,void 0,i),g=await u.transform(h),m=[];w.array(g);for(let E of g)if(u.filter({item:E,currentItems:m,allItems:a})&&(!u.shouldContinue({item:E,currentItems:m,allItems:a})||(yield E,u.stackAllItems&&a.push(E),m.push(E),--l<=0)))return;let y=u.paginate({response:h,currentItems:m,allItems:a});if(y===!1)return;y===h.request.options?i=h.request.options:(i.merge(y),w.any([p.urlInstance,p.undefined],y.url),y.url!==void 0&&(i.prefixUrl="",i.url=y.url)),f++}},"paginateEach");e.paginate=r,e.paginate.all=async(n,s)=>{let i=[];for await(let u of r(n,s))i.push(u);return i},e.paginate.each=r,e.stream=(n,s)=>e(n,{...s,isStream:!0});for(let n of Lb)e[n]=(s,i)=>e(s,{...i,method:n}),e.stream[n]=(s,i)=>e(s,{...i,method:n,isStream:!0});return t.mutableDefaults||(Object.freeze(t.handlers),t.options.freeze()),Object.defineProperty(e,"defaults",{value:t,writable:!1,configurable:!1,enumerable:!0}),e},"create"),Jd=Yd;var Ob={options:new Be,handlers:[],mutableDefaults:!1},tk=Jd(Ob);import{inspect as $b}from"node:util";c();c();var Pb=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,globalThis.DOMException,globalThis.AssertionError,globalThis.SystemError].filter(Boolean).map(t=>[t.name,t]),kb=new Map(Pb),Kd=kb;var Rb=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0},{property:"cause",enumerable:!1}],eu=new WeakSet,Bb=o(t=>{eu.add(t);let e=t.toJSON();return eu.delete(t),e},"toJSON"),Nb=o(t=>Kd.get(t)??Error,"getErrorConstructor"),Qd=o(({from:t,seen:e,to:r,forceEnumerable:n,maxDepth:s,depth:i,useToJSON:u,serialize:a})=>{if(!r)if(Array.isArray(t))r=[];else if(!a&&Xd(t)){let f=Nb(t.name);r=new f}else r={};if(e.push(t),i>=s)return r;if(u&&typeof t.toJSON=="function"&&!eu.has(t))return Bb(t);let l=o(f=>Qd({from:f,seen:[...e],forceEnumerable:n,maxDepth:s,depth:i,useToJSON:u,serialize:a}),"continueDestroyCircular");for(let[f,h]of Object.entries(t)){if(h&&h instanceof Uint8Array&&h.constructor.name==="Buffer"){r[f]="[object Buffer]";continue}if(h!==null&&typeof h=="object"&&typeof h.pipe=="function"){r[f]="[object Stream]";continue}if(typeof h!="function"){if(!h||typeof h!="object"){try{r[f]=h}catch{}continue}if(!e.includes(t[f])){i++,r[f]=l(t[f]);continue}r[f]="[Circular]"}}for(let{property:f,enumerable:h}of Rb)typeof t[f]<"u"&&t[f]!==null&&Object.defineProperty(r,f,{value:Xd(t[f])?l(t[f]):t[f],enumerable:n?!0:h,configurable:!0,writable:!0});return r},"destroyCircular");function eD(t,e={}){let{maxDepth:r=Number.POSITIVE_INFINITY,useToJSON:n=!0}=e;return typeof t=="object"&&t!==null?Qd({from:t,seen:[],forceEnumerable:!0,maxDepth:r,depth:0,useToJSON:n,serialize:!0}):typeof t=="function"?`[Function: ${t.name||"anonymous"}]`:t}o(eD,"serializeError");function Xd(t){return!!t&&typeof t=="object"&&"name"in t&&"message"in t&&"stack"in t}o(Xd,"isErrorLike");c();import tD from"node:path";var tu=tD.dirname(Wl),Ib=o((...t)=>tD.join(tu,...t),"workspacePath"),gk=o((...t)=>Ib("assets",...t),"assetsPath");var vk=o((t,e)=>{let r={...t};for(let[n,s]of Object.entries(e))r[n]||(r[n]=s);return r},"defaults");var rD=o((t,e)=>{let r={...t};for(let n of e)delete r[n];return r},"omit");var Ak=o(t=>{Array.isArray(t)&&(t=t[0]);let e=eD(t);return typeof e=="string"&&(e={message:e}),e.stack&&(e.stack=eo(e.stack,{pretty:!0,basePath:tu}).replaceAll(/file:\/\/\//g,"")),t instanceof J&&(e.timings=void 0,e.options={method:t.options.method,url:t.options.url instanceof URL?t.options.url.toJSON():t.options.url},e.responseBody=$b(t.response?.body)),e},"serializeError");var fn=o(t=>!er(t)&&!Ou(t),"isSprintOptions"),br=o((t,...e)=>{let r,n={ensureNewLine:!1,ensureEmptyLineAbove:!1,indent:0};return fn(t)?(r=t.content,n={...n,...rD(t,["content"])}):er(t)?r=t:r=(0,ru.dedent)(Xi(t,...e)),n.ensureEmptyLineAbove&&!r.startsWith(`
|
|
59
|
+
`),Jr.set(this,void 0),fs.set(this,void 0),Kr.set(this,"-".repeat(2)),Mt.set(this,new TextEncoder),Xr.set(this,void 0),Qr.set(this,void 0),hs.set(this,void 0),!mr(e))throw new TypeError("Expected first argument to be a FormData instance.");let s;if(go(r)?n=r:s=r,s||(s=Sh()),typeof s!="string")throw new TypeError("Expected boundary argument to be a string.");if(n&&!go(n))throw new TypeError("Expected options argument to be an object.");Zr(this,Qr,Array.from(e.entries()),"f"),Zr(this,hs,{...CF,...n},"f"),Zr(this,Jr,K(this,Mt,"f").encode(K(this,pt,"f")),"f"),Zr(this,fs,K(this,Jr,"f").byteLength,"f"),this.boundary=`form-data-boundary-${s}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,Zr(this,Xr,K(this,Mt,"f").encode(`${K(this,Kr,"f")}${this.boundary}${K(this,Kr,"f")}${K(this,pt,"f").repeat(2)}`),"f");let i={"Content-Type":this.contentType},u=K(this,Yr,"m",Th).call(this);u&&(this.contentLength=u,i["Content-Length"]=u),this.headers=Ah(Object.freeze(i)),Object.defineProperties(this,{boundary:ds,contentType:ds,contentLength:ds,headers:ds})}getContentLength(){return this.contentLength==null?void 0:Number(this.contentLength)}*values(){for(let[e,r]of K(this,Qr,"f")){let n=Dt(r)?r:K(this,Mt,"f").encode(yo(r));yield K(this,Yr,"m",Fo).call(this,e,n),yield n,yield K(this,Jr,"f")}yield K(this,Xr,"f")}async*encode(){for(let e of this.values())Dt(e)?yield*_h(e.stream()):yield e}[(pt=new WeakMap,Jr=new WeakMap,fs=new WeakMap,Kr=new WeakMap,Mt=new WeakMap,Xr=new WeakMap,Qr=new WeakMap,hs=new WeakMap,Yr=new WeakSet,Fo=o(function(r,n){let s="";s+=`${K(this,Kr,"f")}${this.boundary}${K(this,pt,"f")}`,s+=`Content-Disposition: form-data; name="${Eo(r)}"`,Dt(n)&&(s+=`; filename="${Eo(n.name)}"${K(this,pt,"f")}`,s+=`Content-Type: ${n.type||"application/octet-stream"}`);let i=Dt(n)?n.size:n.byteLength;return K(this,hs,"f").enableAdditionalHeaders===!0&&i!=null&&!isNaN(i)&&(s+=`${K(this,pt,"f")}Content-Length: ${Dt(n)?n.size:n.byteLength}`),K(this,Mt,"f").encode(`${s}${K(this,pt,"f").repeat(2)}`)},"_FormDataEncoder_getFieldHeader"),Th=o(function(){let r=0;for(let[n,s]of K(this,Qr,"f")){let i=Dt(s)?s:K(this,Mt,"f").encode(yo(s)),u=Dt(i)?i.size:i.byteLength;if(u==null||isNaN(u))return;r+=K(this,Yr,"m",Fo).call(this,n,i).byteLength,r+=u,r+=K(this,fs,"f")}return String(r+K(this,Xr,"f").byteLength)},"_FormDataEncoder_getContentLength"),Symbol.iterator)](){return this.values()}[Symbol.asyncIterator](){return this.encode()}};c();import{Buffer as bF}from"node:buffer";import{promisify as wF}from"node:util";c();function en(t){return p.nodeStream(t)&&p.function_(t.getBoundary)}o(en,"isFormData");async function Co(t,e){if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(p.string(t))return bF.byteLength(t);if(p.buffer(t))return t.length;if(en(t))return wF(t.getLength.bind(t))()}o(Co,"getBodySize");c();function tn(t,e,r){let n={};for(let s of r){let i=o((...u)=>{e.emit(s,...u)},"eventFunction");n[s]=i,t.on(s,i)}return()=>{for(let[s,i]of Object.entries(n))t.off(s,i)}}o(tn,"proxyEvents");c();import _F from"node:net";c();function bo(){let t=[];return{once(e,r,n){e.once(r,n),t.push({origin:e,event:r,fn:n})},unhandleAll(){for(let e of t){let{origin:r,event:n,fn:s}=e;r.removeListener(n,s)}t.length=0}}}o(bo,"unhandle");var Lh=Symbol("reentry"),xF=o(()=>{},"noop"),rn=class extends Error{static{o(this,"TimeoutError")}constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.code="ETIMEDOUT"}};function wo(t,e,r){if(Lh in t)return xF;t[Lh]=!0;let n=[],{once:s,unhandleAll:i}=bo(),u=o((D,C,F)=>{let O=setTimeout(C,D,D,F);O.unref?.();let S=o(()=>{clearTimeout(O)},"cancel");return n.push(S),S},"addTimeout"),{host:a,hostname:l}=r,f=o((D,C)=>{t.destroy(new rn(D,C))},"timeoutHandler"),h=o(()=>{for(let D of n)D();i()},"cancelTimeouts");if(t.once("error",D=>{if(h(),t.listenerCount("error")===0)throw D}),e.request!==void 0){let D=u(e.request,f,"request");s(t,"response",C=>{s(C,"end",D)})}if(e.socket!==void 0){let{socket:D}=e,C=o(()=>{f(D,"socket")},"socketTimeoutHandler");t.setTimeout(D,C),n.push(()=>{t.removeListener("timeout",C)})}let g=e.lookup!==void 0,m=e.connect!==void 0,y=e.secureConnect!==void 0,E=e.send!==void 0;return(g||m||y||E)&&s(t,"socket",D=>{let{socketPath:C}=t;if(D.connecting){let F=!!(C??_F.isIP(l??a??"")!==0);if(g&&!F&&D.address().address===void 0){let O=u(e.lookup,f,"lookup");s(D,"lookup",O)}if(m){let O=o(()=>u(e.connect,f,"connect"),"timeConnect");F?s(D,"connect",O()):s(D,"lookup",S=>{S===null&&s(D,"connect",O())})}y&&r.protocol==="https:"&&s(D,"connect",()=>{let O=u(e.secureConnect,f,"secureConnect");s(D,"secureConnect",O)})}if(E){let F=o(()=>u(e.send,f,"send"),"timeRequest");D.connecting?s(D,"connect",()=>{s(t,"upload-complete",F())}):s(t,"upload-complete",F())}}),e.response!==void 0&&s(t,"upload-complete",()=>{let D=u(e.response,f,"response");s(t,"response",D)}),e.read!==void 0&&s(t,"response",D=>{let C=u(e.read,f,"read");s(D,"end",C)}),h}o(wo,"timedOut");c();function _o(t){t=t;let e={protocol:t.protocol,hostname:p.string(t.hostname)&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return p.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}o(_o,"urlToOptions");c();var nn=class{static{o(this,"WeakableMap")}constructor(){Object.defineProperty(this,"weakMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"map",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e=="object"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}};c();var SF=o(({attemptCount:t,retryOptions:e,error:r,retryAfter:n,computedValue:s})=>{if(r.name==="RetryError")return 1;if(t>e.limit)return 0;let i=e.methods.includes(r.options.method),u=e.errorCodes.includes(r.code),a=r.response&&e.statusCodes.includes(r.response.statusCode);if(!i||!u&&!a)return 0;if(r.response){if(n)return n>s?0:n;if(r.response.statusCode===413)return 0}let l=Math.random()*e.noise;return Math.min(2**(t-1)*1e3,e.backoffLimit)+l},"calculateRetryDelay"),Oh=SF;c();import ib from"node:process";import{promisify as Md,inspect as ob}from"node:util";import{checkServerIdentity as ub}from"node:tls";import ab from"node:http";import cb from"node:https";c();import{V4MAPPED as vF,ADDRCONFIG as AF,ALL as Ih,promises as TF,lookup as LF}from"node:dns";import{promisify as xo}from"node:util";import OF from"node:os";var{Resolver:Ph}=TF,yr=Symbol("cacheableLookupCreateConnection"),So=Symbol("cacheableLookupInstance"),kh=Symbol("expires"),PF=typeof Ih=="number",Rh=o(t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},"verifyAgent"),kF=o(t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},"map4to6"),Bh=o(()=>{let t=!1,e=!1;for(let r of Object.values(OF.networkInterfaces()))for(let n of r)if(!n.internal&&(n.family==="IPv6"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},"getIfaceInfo"),RF=o(t=>Symbol.iterator in t,"isIterable"),ps=o(t=>t.catch(e=>{if(e.code==="ENODATA"||e.code==="ENOTFOUND"||e.code==="ENOENT")return[];throw e}),"ignoreNoResultErrors"),Nh={ttl:!0},BF={all:!0},NF={all:!0,family:4},IF={all:!0,family:6},sn=class{static{o(this,"CacheableLookup")}constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:n=3600,errorTtl:s=.15,resolver:i=new Ph,lookup:u=LF}={}){if(this.maxTtl=r,this.errorTtl=s,this._cache=e,this._resolver=i,this._dnsLookup=u&&xo(u),this.stats={cache:0,query:0},this._resolver instanceof Ph?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=xo(this._resolver.resolve4.bind(this._resolver)),this._resolve6=xo(this._resolver.resolve6.bind(this._resolver))),this._iface=Bh(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,this.fallbackDuration=n,n>0){let a=setInterval(()=>{this._hostnamesToFallback.clear()},n*1e3);a.unref&&a.unref(),this._fallbackInterval=a}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,n){if(typeof r=="function"?(n=r,r={}):typeof r=="number"&&(r={family:r}),!n)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(s=>{r.all?n(null,s):n(null,s.address,s.family,s.expires,s.ttl,s.source)},n)}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let n=await this.query(e);if(r.family===6){let s=n.filter(i=>i.family===6);r.hints&vF&&(PF&&r.hints&Ih||s.length===0)?kF(n):n=s}else r.family===4&&(n=n.filter(s=>s.family===4));if(r.hints&AF){let{_iface:s}=this;n=n.filter(i=>i.family===6?s.has6:s.has4)}if(n.length===0){let s=new Error(`cacheableLookup ENOTFOUND ${e}`);throw s.code="ENOTFOUND",s.hostname=e,s}return r.all?n:n[0]}async query(e){let r="cache",n=await this._cache.get(e);if(n&&this.stats.cache++,!n){let s=this._pending[e];if(s)this.stats.cache++,n=await s;else{r="query";let i=this.queryAndCache(e);this._pending[e]=i,this.stats.query++;try{n=await i}finally{delete this._pending[e]}}}return n=n.map(s=>({...s,source:r})),n}async _resolve(e){let[r,n]=await Promise.all([ps(this._resolve4(e,Nh)),ps(this._resolve6(e,Nh))]),s=0,i=0,u=0,a=Date.now();for(let l of r)l.family=4,l.expires=a+l.ttl*1e3,s=Math.max(s,l.ttl);for(let l of n)l.family=6,l.expires=a+l.ttl*1e3,i=Math.max(i,l.ttl);return r.length>0?n.length>0?u=Math.min(s,i):u=s:u=i,{entries:[...r,...n],cacheTtl:u}}async _lookup(e){try{let[r,n]=await Promise.all([ps(this._dnsLookup(e,NF)),ps(this._dnsLookup(e,IF))]);return{entries:[...r,...n],cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,n){if(this.maxTtl>0&&n>0){n=Math.min(n,this.maxTtl)*1e3,r[kh]=Date.now()+n;try{await this._cache.set(e,r,n)}catch(s){this.lookupAsync=async()=>{let i=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw i.cause=s,i}}RF(this._cache)&&this._tick(n)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,BF);let r=await this._resolve(e);r.entries.length===0&&this._dnsLookup&&(r=await this._lookup(e),r.entries.length!==0&&this.fallbackDuration>0&&this._hostnamesToFallback.add(e));let n=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,n),r.entries}_tick(e){let r=this._nextRemovalTime;(!r||e<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let n=1/0,s=Date.now();for(let[i,u]of this._cache){let a=u[kh];s>=a?this._cache.delete(i):a<n&&(n=a)}n!==1/0&&this._tick(n-s)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(Rh(e),yr in e)throw new Error("CacheableLookup has been already installed");e[yr]=e.createConnection,e[So]=this,e.createConnection=(r,n)=>("lookup"in r||(r.lookup=this.lookup),e[yr](r,n))}uninstall(e){if(Rh(e),e[yr]){if(e[So]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[yr],delete e[yr],delete e[So]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=Bh(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}};var qd=Se(jd(),1);c();function Jo(t){let e=[],r=t.split(",");for(let n of r){let[s,...i]=n.split(";"),u=s.trim();if(u[0]!=="<"||u[u.length-1]!==">")throw new Error(`Invalid format of the Link header reference: ${u}`);let a=u.slice(1,-1),l={};if(i.length===0)throw new Error(`Unexpected end of Link header parameters: ${i.join(";")}`);for(let f of i){let h=f.trim(),g=h.indexOf("=");if(g===-1)throw new Error(`Failed to parse Link header: ${t}`);let m=h.slice(0,g).trim(),y=h.slice(g+1).trim();l[m]=y}e.push({reference:a,parameters:l})}return e}o(Jo,"parseLinkHeader");var[Ud,lb]=ib.versions.node.split(".").map(Number);function fb(t){for(let e in t){let r=t[e];w.any([p.string,p.number,p.boolean,p.null_,p.undefined],r)}}o(fb,"validateSearchParameters");var hb=new Map,bs,db=o(()=>bs||(bs=new sn,bs),"getGlobalDnsCache"),Db={request:void 0,agent:{http:void 0,https:void 0,http2:void 0},h2session:void 0,decompress:!0,timeout:{connect:void 0,lookup:void 0,read:void 0,request:void 0,response:void 0,secureConnect:void 0,send:void 0,socket:void 0},prefixUrl:"",body:void 0,form:void 0,json:void 0,cookieJar:void 0,ignoreInvalidCookies:!1,searchParams:void 0,dnsLookup:void 0,dnsCache:void 0,context:{},hooks:{init:[],beforeRequest:[],beforeError:[],beforeRedirect:[],beforeRetry:[],afterResponse:[]},followRedirect:!0,maxRedirects:10,cache:void 0,throwHttpErrors:!0,username:"",password:"",http2:!1,allowGetBody:!1,headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},methodRewriting:!1,dnsLookupIpVersion:void 0,parseJson:JSON.parse,stringifyJson:JSON.stringify,retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:o(({computedValue:t})=>t,"calculateDelay"),backoffLimit:Number.POSITIVE_INFINITY,noise:100},localAddress:void 0,method:"GET",createConnection:void 0,cacheOptions:{shared:void 0,cacheHeuristic:void 0,immutableMinTimeToLive:void 0,ignoreCargoCult:void 0},https:{alpnProtocols:void 0,rejectUnauthorized:void 0,checkServerIdentity:void 0,certificateAuthority:void 0,key:void 0,certificate:void 0,passphrase:void 0,pfx:void 0,ciphers:void 0,honorCipherOrder:void 0,minVersion:void 0,maxVersion:void 0,signatureAlgorithms:void 0,tlsSessionLifetime:void 0,dhparam:void 0,ecdhCurve:void 0,certificateRevocationLists:void 0},encoding:void 0,resolveBodyOnly:!1,isStream:!1,responseType:"text",url:void 0,pagination:{transform(t){return t.request.options.responseType==="json"?t.body:JSON.parse(t.body)},paginate({response:t}){let e=t.headers.link;if(typeof e!="string"||e.trim()==="")return!1;let n=Jo(e).find(s=>s.parameters.rel==="next"||s.parameters.rel==='"next"');return n?{url:new URL(n.reference,t.url)}:!1},filter:o(()=>!0,"filter"),shouldContinue:o(()=>!0,"shouldContinue"),countLimit:Number.POSITIVE_INFINITY,backoff:0,requestLimit:1e4,stackAllItems:!1},setHost:!0,maxHeaderSize:void 0,signal:void 0,enableUnixSockets:!1},pb=o(t=>{let{hooks:e,retry:r}=t,n={...t,context:{...t.context},cacheOptions:{...t.cacheOptions},https:{...t.https},agent:{...t.agent},headers:{...t.headers},retry:{...r,errorCodes:[...r.errorCodes],methods:[...r.methods],statusCodes:[...r.statusCodes]},timeout:{...t.timeout},hooks:{init:[...e.init],beforeRequest:[...e.beforeRequest],beforeError:[...e.beforeError],beforeRedirect:[...e.beforeRedirect],beforeRetry:[...e.beforeRetry],afterResponse:[...e.afterResponse]},searchParams:t.searchParams?new URLSearchParams(t.searchParams):void 0,pagination:{...t.pagination}};return n.url!==void 0&&(n.prefixUrl=""),n},"cloneInternals"),mb=o(t=>{let{hooks:e,retry:r}=t,n={...t};return p.object(t.context)&&(n.context={...t.context}),p.object(t.cacheOptions)&&(n.cacheOptions={...t.cacheOptions}),p.object(t.https)&&(n.https={...t.https}),p.object(t.cacheOptions)&&(n.cacheOptions={...n.cacheOptions}),p.object(t.agent)&&(n.agent={...t.agent}),p.object(t.headers)&&(n.headers={...t.headers}),p.object(r)&&(n.retry={...r},p.array(r.errorCodes)&&(n.retry.errorCodes=[...r.errorCodes]),p.array(r.methods)&&(n.retry.methods=[...r.methods]),p.array(r.statusCodes)&&(n.retry.statusCodes=[...r.statusCodes])),p.object(t.timeout)&&(n.timeout={...t.timeout}),p.object(e)&&(n.hooks={...e},p.array(e.init)&&(n.hooks.init=[...e.init]),p.array(e.beforeRequest)&&(n.hooks.beforeRequest=[...e.beforeRequest]),p.array(e.beforeError)&&(n.hooks.beforeError=[...e.beforeError]),p.array(e.beforeRedirect)&&(n.hooks.beforeRedirect=[...e.beforeRedirect]),p.array(e.beforeRetry)&&(n.hooks.beforeRetry=[...e.beforeRetry]),p.array(e.afterResponse)&&(n.hooks.afterResponse=[...e.afterResponse])),p.object(t.pagination)&&(n.pagination={...t.pagination}),n},"cloneRaw"),yb=o(t=>{let e=[t.timeout.socket,t.timeout.connect,t.timeout.lookup,t.timeout.request,t.timeout.secureConnect].filter(r=>typeof r=="number");if(e.length>0)return Math.min(...e)},"getHttp2TimeoutOption"),Gd=o((t,e,r)=>{let n=t.hooks?.init;if(n)for(let s of n)s(e,r)},"init"),Be=class t{static{o(this,"Options")}constructor(e,r,n){if(Object.defineProperty(this,"_unixOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_internals",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_merging",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_init",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),w.any([p.string,p.urlInstance,p.object,p.undefined],e),w.any([p.object,p.undefined],r),w.any([p.object,p.undefined],n),e instanceof t||r instanceof t)throw new TypeError("The defaults must be passed as the third argument");this._internals=pb(n?._internals??n??Db),this._init=[...n?._init??[]],this._merging=!1,this._unixOptions=void 0;try{if(p.plainObject(e))try{this.merge(e),this.merge(r)}finally{this.url=e.url}else try{this.merge(r)}finally{if(r?.url!==void 0)if(e===void 0)this.url=r.url;else throw new TypeError("The `url` option is mutually exclusive with the `input` argument");else e!==void 0&&(this.url=e)}}catch(s){throw s.options=this,s}}merge(e){if(e){if(e instanceof t){for(let r of e._init)this.merge(r);return}e=mb(e),Gd(this,e,this),Gd(e,e,this),this._merging=!0,"isStream"in e&&(this.isStream=e.isStream);try{let r=!1;for(let n in e){if(n==="mutableDefaults"||n==="handlers"||n==="url")continue;if(!(n in this))throw new Error(`Unexpected option: ${n}`);let s=e[n];s!==void 0&&(this[n]=s,r=!0)}r&&this._init.push(e)}finally{this._merging=!1}}}get request(){return this._internals.request}set request(e){w.any([p.function_,p.undefined],e),this._internals.request=e}get agent(){return this._internals.agent}set agent(e){w.plainObject(e);for(let r in e){if(!(r in this._internals.agent))throw new TypeError(`Unexpected agent option: ${r}`);w.any([p.object,p.undefined],e[r])}this._merging?Object.assign(this._internals.agent,e):this._internals.agent={...e}}get h2session(){return this._internals.h2session}set h2session(e){this._internals.h2session=e}get decompress(){return this._internals.decompress}set decompress(e){w.boolean(e),this._internals.decompress=e}get timeout(){return this._internals.timeout}set timeout(e){w.plainObject(e);for(let r in e){if(!(r in this._internals.timeout))throw new Error(`Unexpected timeout option: ${r}`);w.any([p.number,p.undefined],e[r])}this._merging?Object.assign(this._internals.timeout,e):this._internals.timeout={...e}}get prefixUrl(){return this._internals.prefixUrl}set prefixUrl(e){if(w.any([p.string,p.urlInstance],e),e===""){this._internals.prefixUrl="";return}if(e=e.toString(),e.endsWith("/")||(e+="/"),this._internals.prefixUrl&&this._internals.url){let{href:r}=this._internals.url;this._internals.url.href=e+r.slice(this._internals.prefixUrl.length)}this._internals.prefixUrl=e}get body(){return this._internals.body}set body(e){w.any([p.string,p.buffer,p.nodeStream,p.generator,p.asyncGenerator,mr,p.undefined],e),p.nodeStream(e)&&w.truthy(e.readable),e!==void 0&&(w.undefined(this._internals.form),w.undefined(this._internals.json)),this._internals.body=e}get form(){return this._internals.form}set form(e){w.any([p.plainObject,p.undefined],e),e!==void 0&&(w.undefined(this._internals.body),w.undefined(this._internals.json)),this._internals.form=e}get json(){return this._internals.json}set json(e){e!==void 0&&(w.undefined(this._internals.body),w.undefined(this._internals.form)),this._internals.json=e}get url(){return this._internals.url}set url(e){if(w.any([p.string,p.urlInstance,p.undefined],e),e===void 0){this._internals.url=void 0;return}if(p.string(e)&&e.startsWith("/"))throw new Error("`url` must not start with a slash");let r=`${this.prefixUrl}${e.toString()}`,n=new URL(r);if(this._internals.url=n,n.protocol==="unix:"&&(n.href=`http://unix${n.pathname}${n.search}`),n.protocol!=="http:"&&n.protocol!=="https:"){let s=new Error(`Unsupported protocol: ${n.protocol}`);throw s.code="ERR_UNSUPPORTED_PROTOCOL",s}if(this._internals.username&&(n.username=this._internals.username,this._internals.username=""),this._internals.password&&(n.password=this._internals.password,this._internals.password=""),this._internals.searchParams&&(n.search=this._internals.searchParams.toString(),this._internals.searchParams=void 0),n.hostname==="unix"){if(!this._internals.enableUnixSockets)throw new Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled");let s=/(?<socketPath>.+?):(?<path>.+)/.exec(`${n.pathname}${n.search}`);if(s?.groups){let{socketPath:i,path:u}=s.groups;this._unixOptions={socketPath:i,path:u,host:""}}else this._unixOptions=void 0;return}this._unixOptions=void 0}get cookieJar(){return this._internals.cookieJar}set cookieJar(e){if(w.any([p.object,p.undefined],e),e===void 0){this._internals.cookieJar=void 0;return}let{setCookie:r,getCookieString:n}=e;w.function_(r),w.function_(n),r.length===4&&n.length===0?(r=Md(r.bind(e)),n=Md(n.bind(e)),this._internals.cookieJar={setCookie:r,getCookieString:n}):this._internals.cookieJar=e}get signal(){return this._internals.signal}set signal(e){w.object(e),this._internals.signal=e}get ignoreInvalidCookies(){return this._internals.ignoreInvalidCookies}set ignoreInvalidCookies(e){w.boolean(e),this._internals.ignoreInvalidCookies=e}get searchParams(){return this._internals.url?this._internals.url.searchParams:(this._internals.searchParams===void 0&&(this._internals.searchParams=new URLSearchParams),this._internals.searchParams)}set searchParams(e){w.any([p.string,p.object,p.undefined],e);let r=this._internals.url;if(e===void 0){this._internals.searchParams=void 0,r&&(r.search="");return}let n=this.searchParams,s;if(p.string(e))s=new URLSearchParams(e);else if(e instanceof URLSearchParams)s=e;else{fb(e),s=new URLSearchParams;for(let i in e){let u=e[i];u===null?s.append(i,""):u===void 0?n.delete(i):s.append(i,u)}}if(this._merging){for(let i of s.keys())n.delete(i);for(let[i,u]of s)n.append(i,u)}else r?r.search=n.toString():this._internals.searchParams=n}get searchParameters(){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}set searchParameters(e){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}get dnsLookup(){return this._internals.dnsLookup}set dnsLookup(e){w.any([p.function_,p.undefined],e),this._internals.dnsLookup=e}get dnsCache(){return this._internals.dnsCache}set dnsCache(e){w.any([p.object,p.boolean,p.undefined],e),e===!0?this._internals.dnsCache=db():e===!1?this._internals.dnsCache=void 0:this._internals.dnsCache=e}get context(){return this._internals.context}set context(e){w.object(e),this._merging?Object.assign(this._internals.context,e):this._internals.context={...e}}get hooks(){return this._internals.hooks}set hooks(e){w.object(e);for(let r in e){if(!(r in this._internals.hooks))throw new Error(`Unexpected hook event: ${r}`);let n=r,s=e[n];if(w.any([p.array,p.undefined],s),s)for(let i of s)w.function_(i);if(this._merging)s&&this._internals.hooks[n].push(...s);else{if(!s)throw new Error(`Missing hook event: ${r}`);this._internals.hooks[r]=[...s]}}}get followRedirect(){return this._internals.followRedirect}set followRedirect(e){w.boolean(e),this._internals.followRedirect=e}get followRedirects(){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}set followRedirects(e){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}get maxRedirects(){return this._internals.maxRedirects}set maxRedirects(e){w.number(e),this._internals.maxRedirects=e}get cache(){return this._internals.cache}set cache(e){w.any([p.object,p.string,p.boolean,p.undefined],e),e===!0?this._internals.cache=hb:e===!1?this._internals.cache=void 0:this._internals.cache=e}get throwHttpErrors(){return this._internals.throwHttpErrors}set throwHttpErrors(e){w.boolean(e),this._internals.throwHttpErrors=e}get username(){let e=this._internals.url,r=e?e.username:this._internals.username;return decodeURIComponent(r)}set username(e){w.string(e);let r=this._internals.url,n=encodeURIComponent(e);r?r.username=n:this._internals.username=n}get password(){let e=this._internals.url,r=e?e.password:this._internals.password;return decodeURIComponent(r)}set password(e){w.string(e);let r=this._internals.url,n=encodeURIComponent(e);r?r.password=n:this._internals.password=n}get http2(){return this._internals.http2}set http2(e){w.boolean(e),this._internals.http2=e}get allowGetBody(){return this._internals.allowGetBody}set allowGetBody(e){w.boolean(e),this._internals.allowGetBody=e}get headers(){return this._internals.headers}set headers(e){w.plainObject(e),this._merging?Object.assign(this._internals.headers,Dr(e)):this._internals.headers=Dr(e)}get methodRewriting(){return this._internals.methodRewriting}set methodRewriting(e){w.boolean(e),this._internals.methodRewriting=e}get dnsLookupIpVersion(){return this._internals.dnsLookupIpVersion}set dnsLookupIpVersion(e){if(e!==void 0&&e!==4&&e!==6)throw new TypeError(`Invalid DNS lookup IP version: ${e}`);this._internals.dnsLookupIpVersion=e}get parseJson(){return this._internals.parseJson}set parseJson(e){w.function_(e),this._internals.parseJson=e}get stringifyJson(){return this._internals.stringifyJson}set stringifyJson(e){w.function_(e),this._internals.stringifyJson=e}get retry(){return this._internals.retry}set retry(e){if(w.plainObject(e),w.any([p.function_,p.undefined],e.calculateDelay),w.any([p.number,p.undefined],e.maxRetryAfter),w.any([p.number,p.undefined],e.limit),w.any([p.array,p.undefined],e.methods),w.any([p.array,p.undefined],e.statusCodes),w.any([p.array,p.undefined],e.errorCodes),w.any([p.number,p.undefined],e.noise),e.noise&&Math.abs(e.noise)>100)throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${e.noise}`);for(let n in e)if(!(n in this._internals.retry))throw new Error(`Unexpected retry option: ${n}`);this._merging?Object.assign(this._internals.retry,e):this._internals.retry={...e};let{retry:r}=this._internals;r.methods=[...new Set(r.methods.map(n=>n.toUpperCase()))],r.statusCodes=[...new Set(r.statusCodes)],r.errorCodes=[...new Set(r.errorCodes)]}get localAddress(){return this._internals.localAddress}set localAddress(e){w.any([p.string,p.undefined],e),this._internals.localAddress=e}get method(){return this._internals.method}set method(e){w.string(e),this._internals.method=e.toUpperCase()}get createConnection(){return this._internals.createConnection}set createConnection(e){w.any([p.function_,p.undefined],e),this._internals.createConnection=e}get cacheOptions(){return this._internals.cacheOptions}set cacheOptions(e){w.plainObject(e),w.any([p.boolean,p.undefined],e.shared),w.any([p.number,p.undefined],e.cacheHeuristic),w.any([p.number,p.undefined],e.immutableMinTimeToLive),w.any([p.boolean,p.undefined],e.ignoreCargoCult);for(let r in e)if(!(r in this._internals.cacheOptions))throw new Error(`Cache option \`${r}\` does not exist`);this._merging?Object.assign(this._internals.cacheOptions,e):this._internals.cacheOptions={...e}}get https(){return this._internals.https}set https(e){w.plainObject(e),w.any([p.boolean,p.undefined],e.rejectUnauthorized),w.any([p.function_,p.undefined],e.checkServerIdentity),w.any([p.string,p.object,p.array,p.undefined],e.certificateAuthority),w.any([p.string,p.object,p.array,p.undefined],e.key),w.any([p.string,p.object,p.array,p.undefined],e.certificate),w.any([p.string,p.undefined],e.passphrase),w.any([p.string,p.buffer,p.array,p.undefined],e.pfx),w.any([p.array,p.undefined],e.alpnProtocols),w.any([p.string,p.undefined],e.ciphers),w.any([p.string,p.buffer,p.undefined],e.dhparam),w.any([p.string,p.undefined],e.signatureAlgorithms),w.any([p.string,p.undefined],e.minVersion),w.any([p.string,p.undefined],e.maxVersion),w.any([p.boolean,p.undefined],e.honorCipherOrder),w.any([p.number,p.undefined],e.tlsSessionLifetime),w.any([p.string,p.undefined],e.ecdhCurve),w.any([p.string,p.buffer,p.array,p.undefined],e.certificateRevocationLists);for(let r in e)if(!(r in this._internals.https))throw new Error(`HTTPS option \`${r}\` does not exist`);this._merging?Object.assign(this._internals.https,e):this._internals.https={...e}}get encoding(){return this._internals.encoding}set encoding(e){if(e===null)throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");w.any([p.string,p.undefined],e),this._internals.encoding=e}get resolveBodyOnly(){return this._internals.resolveBodyOnly}set resolveBodyOnly(e){w.boolean(e),this._internals.resolveBodyOnly=e}get isStream(){return this._internals.isStream}set isStream(e){w.boolean(e),this._internals.isStream=e}get responseType(){return this._internals.responseType}set responseType(e){if(e===void 0){this._internals.responseType="text";return}if(e!=="text"&&e!=="buffer"&&e!=="json")throw new Error(`Invalid \`responseType\` option: ${e}`);this._internals.responseType=e}get pagination(){return this._internals.pagination}set pagination(e){w.object(e),this._merging?Object.assign(this._internals.pagination,e):this._internals.pagination=e}get auth(){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}set auth(e){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}get setHost(){return this._internals.setHost}set setHost(e){w.boolean(e),this._internals.setHost=e}get maxHeaderSize(){return this._internals.maxHeaderSize}set maxHeaderSize(e){w.any([p.number,p.undefined],e),this._internals.maxHeaderSize=e}get enableUnixSockets(){return this._internals.enableUnixSockets}set enableUnixSockets(e){w.boolean(e),this._internals.enableUnixSockets=e}toJSON(){return{...this._internals}}[Symbol.for("nodejs.util.inspect.custom")](e,r){return ob(this._internals,r)}createNativeRequestOptions(){let e=this._internals,r=e.url,n;r.protocol==="https:"?n=e.http2?e.agent:e.agent.https:n=e.agent.http;let{https:s}=e,{pfx:i}=s;return p.array(i)&&p.plainObject(i[0])&&(i=i.map(u=>({buf:u.buffer,passphrase:u.passphrase}))),{...e.cacheOptions,...this._unixOptions,ALPNProtocols:s.alpnProtocols,ca:s.certificateAuthority,cert:s.certificate,key:s.key,passphrase:s.passphrase,pfx:s.pfx,rejectUnauthorized:s.rejectUnauthorized,checkServerIdentity:s.checkServerIdentity??ub,ciphers:s.ciphers,honorCipherOrder:s.honorCipherOrder,minVersion:s.minVersion,maxVersion:s.maxVersion,sigalgs:s.signatureAlgorithms,sessionTimeout:s.tlsSessionLifetime,dhparam:s.dhparam,ecdhCurve:s.ecdhCurve,crl:s.certificateRevocationLists,lookup:e.dnsLookup??e.dnsCache?.lookup,family:e.dnsLookupIpVersion,agent:n,setHost:e.setHost,method:e.method,maxHeaderSize:e.maxHeaderSize,localAddress:e.localAddress,headers:e.headers,createConnection:e.createConnection,timeout:e.http2?yb(e):void 0,h2session:e.h2session}}getRequestFunction(){let e=this._internals.url,{request:r}=this._internals;return!r&&e?this.getFallbackRequestFunction():r}getFallbackRequestFunction(){let e=this._internals.url;if(e){if(e.protocol==="https:"){if(this._internals.http2){if(Ud<15||Ud===15&&lb<10){let r=new Error("To use the `http2` option, install Node.js 15.10.0 or above");throw r.code="EUNSUPPORTED",r}return qd.default.auto}return cb.request}return ab.request}}freeze(){let e=this._internals;Object.freeze(e),Object.freeze(e.hooks),Object.freeze(e.hooks.afterResponse),Object.freeze(e.hooks.beforeError),Object.freeze(e.hooks.beforeRedirect),Object.freeze(e.hooks.beforeRequest),Object.freeze(e.hooks.beforeRetry),Object.freeze(e.hooks.init),Object.freeze(e.https),Object.freeze(e.cacheOptions),Object.freeze(e.agent),Object.freeze(e.headers),Object.freeze(e.timeout),Object.freeze(e.retry),Object.freeze(e.retry.errorCodes),Object.freeze(e.retry.methods),Object.freeze(e.retry.statusCodes)}};c();var Cr=o(t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304},"isResponseOk"),ws=class extends J{static{o(this,"ParseError")}constructor(e,r){let{options:n}=r.request;super(`${e.message} in "${n.url.toString()}"`,e,r.request),this.name="ParseError",this.code="ERR_BODY_PARSE_FAILURE"}},Ko=o((t,e,r,n)=>{let{rawBody:s}=t;try{if(e==="text")return s.toString(n);if(e==="json")return s.length===0?"":r(s.toString(n));if(e==="buffer")return s}catch(i){throw new ws(i,t)}throw new ws({message:`Unknown body type '${e}'`,name:"Error"},t)},"parseBody");c();function gb(t){return t.writable&&!t.writableEnded}o(gb,"isClientRequest");var Hd=gb;c();function _s(t){return t.protocol==="unix:"||t.hostname==="unix"}o(_s,"isUnixSocketURL");var{buffer:Cb}=Zd.default,bb=p.string(Wd.versions.brotli),wb=new Set(["GET","HEAD"]),Qo=new nn,_b=new Set([300,301,302,303,304,307,308]),xb=["socket","connect","continue","information","upgrade"],xs=o(()=>{},"noop"),qt=class t extends Eb{static{o(this,"Request")}constructor(e,r,n){super({autoDestroy:!1,highWaterMark:0}),Object.defineProperty(this,"constructor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_noPipe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"redirectUrls",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"retryCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopRetry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downloadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_uploadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopReading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pipedServerResponses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_responseSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bodySize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_unproxyEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isFromCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cannotHaveBody",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_triggerRead",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cancelTimeouts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_removeListeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nativeResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_flushed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_aborted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_requestInitialized",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._downloadedSize=0,this._uploadedSize=0,this._stopReading=!1,this._pipedServerResponses=new Set,this._cannotHaveBody=!1,this._unproxyEvents=xs,this._triggerRead=!1,this._cancelTimeouts=xs,this._removeListeners=xs,this._jobs=[],this._flushed=!1,this._requestInitialized=!1,this._aborted=!1,this.redirectUrls=[],this.retryCount=0,this._stopRetry=xs,this.on("pipe",i=>{i?.headers&&Object.assign(this.options.headers,i.headers)}),this.on("newListener",i=>{if(i==="retry"&&this.listenerCount("retry")>0)throw new Error("A retry listener has been attached already.")});try{if(this.options=new Be(e,r,n),!this.options.url){if(this.options.prefixUrl==="")throw new TypeError("Missing `url` property");this.options.url=""}this.requestUrl=this.options.url}catch(i){let{options:u}=i;u&&(this.options=u),this.flush=async()=>{this.flush=async()=>{},this.destroy(i)};return}let{body:s}=this.options;if(p.nodeStream(s)&&s.once("error",i=>{this._flushed?this._beforeError(new Hr(i,this)):this.flush=async()=>{this.flush=async()=>{},this._beforeError(new Hr(i,this))}}),this.options.signal){let i=o(()=>{this.destroy(new os(this))},"abort");this.options.signal.aborted?i():(this.options.signal.addEventListener("abort",i),this._removeListeners=()=>{this.options.signal?.removeEventListener("abort",i)})}}async flush(){if(!this._flushed){this._flushed=!0;try{if(await this._finalizeBody(),this.destroyed)return;if(await this._makeRequest(),this.destroyed){this._request?.destroy();return}for(let e of this._jobs)e();this._jobs.length=0,this._requestInitialized=!0}catch(e){this._beforeError(e)}}}_beforeError(e){if(this._stopReading)return;let{response:r,options:n}=this,s=this.retryCount+(e.name==="RetryError"?0:1);this._stopReading=!0,e instanceof J||(e=new J(e.message,e,this));let i=e;(async()=>{if(r?.readable&&!r.rawBody&&!this._request?.socket?.destroyed&&(r.setEncoding(this.readableEncoding),await this._setRawBody(r)&&(r.body=r.rawBody.toString())),this.listenerCount("retry")!==0){let u;try{let a;r&&"retry-after"in r.headers&&(a=Number(r.headers["retry-after"]),Number.isNaN(a)?(a=Date.parse(r.headers["retry-after"])-Date.now(),a<=0&&(a=1)):a*=1e3);let l=n.retry;u=await l.calculateDelay({attemptCount:s,retryOptions:l,error:i,retryAfter:a,computedValue:Oh({attemptCount:s,retryOptions:l,error:i,retryAfter:a,computedValue:l.maxRetryAfter??n.timeout.request??Number.POSITIVE_INFINITY})})}catch(a){this._error(new J(a.message,a,this));return}if(u){if(await new Promise(a=>{let l=setTimeout(a,u);this._stopRetry=()=>{clearTimeout(l),a()}}),this.destroyed)return;try{for(let a of this.options.hooks.beforeRetry)await a(i,this.retryCount+1)}catch(a){this._error(new J(a.message,e,this));return}if(this.destroyed)return;this.destroy(),this.emit("retry",this.retryCount+1,e,a=>{let l=new t(n.url,a,n);return l.retryCount=this.retryCount+1,Wd.nextTick(()=>{l.flush()}),l});return}}this._error(i)})()}_read(){this._triggerRead=!0;let{response:e}=this;if(e&&!this._stopReading){e.readableLength&&(this._triggerRead=!1);let r;for(;(r=e.read())!==null;){this._downloadedSize+=r.length;let n=this.downloadProgress;n.percent<1&&this.emit("downloadProgress",n),this.push(r)}}}_write(e,r,n){let s=o(()=>{this._writeRequest(e,r,n)},"write");this._requestInitialized?s():this._jobs.push(s)}_final(e){let r=o(()=>{if(!this._request||this._request.destroyed){e();return}this._request.end(n=>{this._request._writableState?.errored||(n||(this._bodySize=this._uploadedSize,this.emit("uploadProgress",this.uploadProgress),this._request.emit("upload-complete")),e(n))})},"endRequest");this._requestInitialized?r():this._jobs.push(r)}_destroy(e,r){if(this._stopReading=!0,this.flush=async()=>{},this._stopRetry(),this._cancelTimeouts(),this._removeListeners(),this.options){let{body:n}=this.options;p.nodeStream(n)&&n.destroy()}this._request&&this._request.destroy(),e!==null&&!p.undefined(e)&&!(e instanceof J)&&(e=new J(e.message,e,this)),r(e)}pipe(e,r){return e instanceof zd&&this._pipedServerResponses.add(e),super.pipe(e,r)}unpipe(e){return e instanceof zd&&this._pipedServerResponses.delete(e),super.unpipe(e),this}async _finalizeBody(){let{options:e}=this,{headers:r}=e,n=!p.undefined(e.form),s=!p.undefined(e.json),i=!p.undefined(e.body),u=wb.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);if(this._cannotHaveBody=u,n||s||i){if(u)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);let a=!p.string(r["content-type"]);if(i){if(mr(e.body)){let f=new Ds(e.body);a&&(r["content-type"]=f.headers["Content-Type"]),"Content-Length"in f.headers&&(r["content-length"]=f.headers["Content-Length"]),e.body=f.encode()}en(e.body)&&a&&(r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`)}else if(n){a&&(r["content-type"]="application/x-www-form-urlencoded");let{form:f}=e;e.form=void 0,e.body=new URLSearchParams(f).toString()}else{a&&(r["content-type"]="application/json");let{json:f}=e;e.json=void 0,e.body=e.stringifyJson(f)}let l=await Co(e.body,e.headers);p.undefined(r["content-length"])&&p.undefined(r["transfer-encoding"])&&!u&&!p.undefined(l)&&(r["content-length"]=String(l))}e.responseType==="json"&&!("accept"in e.headers)&&(e.headers.accept="application/json"),this._bodySize=Number(r["content-length"])||void 0}async _onResponseBase(e){if(this.isAborted)return;let{options:r}=this,{url:n}=r;this._nativeResponse=e,r.decompress&&(e=(0,Vd.default)(e));let s=e.statusCode,i=e;i.statusMessage=i.statusMessage??Fb.STATUS_CODES[s],i.url=r.url.toString(),i.requestUrl=this.requestUrl,i.redirectUrls=this.redirectUrls,i.request=this,i.isFromCache=this._nativeResponse.fromCache??!1,i.ip=this.ip,i.retryCount=this.retryCount,i.ok=Cr(i),this._isFromCache=i.isFromCache,this._responseSize=Number(e.headers["content-length"])||void 0,this.response=i,e.once("end",()=>{this._responseSize=this._downloadedSize,this.emit("downloadProgress",this.downloadProgress)}),e.once("error",a=>{this._aborted=!0,e.destroy(),this._beforeError(new zr(a,this))}),e.once("aborted",()=>{this._aborted=!0,this._beforeError(new zr({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let u=e.headers["set-cookie"];if(p.object(r.cookieJar)&&u){let a=u.map(async l=>r.cookieJar.setCookie(l,n.toString()));r.ignoreInvalidCookies&&(a=a.map(async l=>{try{await l}catch{}}));try{await Promise.all(a)}catch(l){this._beforeError(l);return}}if(!this.isAborted){if(r.followRedirect&&e.headers.location&&_b.has(s)){if(e.resume(),this._cancelTimeouts(),this._unproxyEvents(),this.redirectUrls.length>=r.maxRedirects){this._beforeError(new rs(this));return}this._request=void 0;let a=new Be(void 0,void 0,this.options),l=s===303&&a.method!=="GET"&&a.method!=="HEAD",f=s!==307&&s!==308,h=a.methodRewriting&&f;(l||h)&&(a.method="GET",a.body=void 0,a.json=void 0,a.form=void 0,delete a.headers["content-length"]);try{let g=Xo.from(e.headers.location,"binary").toString(),m=new URL(g,n);if(!_s(n)&&_s(m)){this._beforeError(new J("Cannot redirect to UNIX socket",{},this));return}m.hostname!==n.hostname||m.port!==n.port?("host"in a.headers&&delete a.headers.host,"cookie"in a.headers&&delete a.headers.cookie,"authorization"in a.headers&&delete a.headers.authorization,(a.username||a.password)&&(a.username="",a.password="")):(m.username=a.username,m.password=a.password),this.redirectUrls.push(m),a.prefixUrl="",a.url=m;for(let y of a.hooks.beforeRedirect)await y(a,i);this.emit("redirect",a,i),this.options=a,await this._makeRequest()}catch(g){this._beforeError(g);return}return}if(r.isStream&&r.throwHttpErrors&&!Cr(i)){this._beforeError(new dt(i));return}if(e.on("readable",()=>{this._triggerRead&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this._noPipe){await this._setRawBody()&&this.emit("response",e);return}this.emit("response",e);for(let a of this._pipedServerResponses)if(!a.headersSent){for(let l in e.headers){let f=r.decompress?l!=="content-encoding":!0,h=e.headers[l];f&&a.setHeader(l,h)}a.statusCode=s}}}async _setRawBody(e=this){if(e.readableEnded)return!1;try{let r=await Cb(e);if(!this.isAborted)return this.response.rawBody=r,!0}catch{}return!1}async _onResponse(e){try{await this._onResponseBase(e)}catch(r){this._beforeError(r)}}_onRequest(e){let{options:r}=this,{timeout:n,url:s}=r;uh(e),this.options.http2&&e.setTimeout(0),this._cancelTimeouts=wo(e,n,s);let i=r.cache?"cacheableResponse":"response";e.once(i,u=>{this._onResponse(u)}),e.once("error",u=>{this._aborted=!0,e.destroy(),u=u instanceof rn?new ss(u,this.timings,this):new J(u.message,u,this),this._beforeError(u)}),this._unproxyEvents=tn(e,this,xb),this._request=e,this.emit("uploadProgress",this.uploadProgress),this._sendBody(),this.emit("request",e)}async _asyncWrite(e){return new Promise((r,n)=>{super.write(e,s=>{if(s){n(s);return}r()})})}_sendBody(){let{body:e}=this.options,r=this.redirectUrls.length===0?this:this._request??this;p.nodeStream(e)?e.pipe(r):p.generator(e)||p.asyncGenerator(e)?(async()=>{try{for await(let n of e)await this._asyncWrite(n);super.end()}catch(n){this._beforeError(n)}})():p.undefined(e)?(this._cannotHaveBody||this._noPipe)&&r.end():(this._writeRequest(e,void 0,()=>{}),r.end())}_prepareCache(e){if(!Qo.has(e)){let r=new Eh((n,s)=>{let i=n._request(n,s);return p.promise(i)&&(i.once=(u,a)=>{if(u==="error")(async()=>{try{await i}catch(l){a(l)}})();else if(u==="abort")(async()=>{try{(await i).once("abort",a)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${u}`);return i}),i},e);Qo.set(e,r.request())}}async _createCacheableRequest(e,r){return new Promise((n,s)=>{Object.assign(r,_o(e));let i,u=Qo.get(r.cache)(r,async a=>{if(a._readableState.autoDestroy=!1,i){let l=o(()=>{a.req&&(a.complete=a.req.res.complete)},"fix");a.prependOnceListener("end",l),l(),(await i).emit("cacheableResponse",a)}n(a)});u.once("error",s),u.once("request",async a=>{i=a,n(i)})})}async _makeRequest(){let{options:e}=this,{headers:r,username:n,password:s}=e,i=e.cookieJar;for(let f in r)if(p.undefined(r[f]))delete r[f];else if(p.null_(r[f]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${f}\` header`);if(e.decompress&&p.undefined(r["accept-encoding"])&&(r["accept-encoding"]=bb?"gzip, deflate, br":"gzip, deflate"),n||s){let f=Xo.from(`${n}:${s}`).toString("base64");r.authorization=`Basic ${f}`}if(i){let f=await i.getCookieString(e.url.toString());p.nonEmptyString(f)&&(r.cookie=f)}e.prefixUrl="";let u;for(let f of e.hooks.beforeRequest){let h=await f(e);if(!p.undefined(h)){u=o(()=>h,"request");break}}u||(u=e.getRequestFunction());let a=e.url;this._requestOptions=e.createNativeRequestOptions(),e.cache&&(this._requestOptions._request=u,this._requestOptions.cache=e.cache,this._requestOptions.body=e.body,this._prepareCache(e.cache));let l=e.cache?this._createCacheableRequest:u;try{let f=l(a,this._requestOptions);p.promise(f)&&(f=await f),p.undefined(f)&&(f=e.getFallbackRequestFunction()(a,this._requestOptions),p.promise(f)&&(f=await f)),Hd(f)?this._onRequest(f):this.writable?(this.once("finish",()=>{this._onResponse(f)}),this._sendBody()):this._onResponse(f)}catch(f){throw f instanceof et?new ns(f,this):f}}async _error(e){try{if(!(e instanceof dt&&!this.options.throwHttpErrors))for(let r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new J(r.message,r,this)}this.destroy(e)}_writeRequest(e,r,n){!this._request||this._request.destroyed||this._request.write(e,r,s=>{if(!s&&!this._request.destroyed){this._uploadedSize+=Xo.byteLength(e,r);let i=this.uploadProgress;i.percent<1&&this.emit("uploadProgress",i)}n(s)})}get ip(){return this.socket?.remoteAddress}get isAborted(){return this._aborted}get socket(){return this._request?.socket??void 0}get downloadProgress(){let e;return this._responseSize?e=this._downloadedSize/this._responseSize:this._responseSize===this._downloadedSize?e=1:e=0,{percent:e,transferred:this._downloadedSize,total:this._responseSize}}get uploadProgress(){let e;return this._bodySize?e=this._uploadedSize/this._bodySize:this._bodySize===this._uploadedSize?e=1:e=0,{percent:e,transferred:this._uploadedSize,total:this._bodySize}}get timings(){return this._request?.timings}get isFromCache(){return this._isFromCache}get reusedSocket(){return this._request?.reusedSocket}};c();var Ss=class extends J{static{o(this,"CancelError")}constructor(e){super("Promise was canceled",{},e),this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}};var vb=["request","response","redirect","uploadProgress","downloadProgress"];function vs(t){let e,r,n,s=new Sb,i=new dr((a,l,f)=>{f(()=>{e.destroy()}),f.shouldReject=!1,f(()=>{l(new Ss(e))});let h=o(g=>{f(()=>{});let m=t??new qt(void 0,void 0,n);m.retryCount=g,m._noPipe=!0,e=m,m.once("response",async D=>{let C=(D.headers["content-encoding"]??"").toLowerCase(),F=C==="gzip"||C==="deflate"||C==="br",{options:O}=m;if(F&&!O.decompress)D.body=D.rawBody;else try{D.body=Ko(D,O.responseType,O.parseJson,O.encoding)}catch(S){if(D.body=D.rawBody.toString(),Cr(D)){m._beforeError(S);return}}try{let S=O.hooks.afterResponse;for(let[k,U]of S.entries())if(D=await U(D,async te=>{throw O.merge(te),O.prefixUrl="",te.url&&(O.url=te.url),O.hooks.afterResponse=O.hooks.afterResponse.slice(0,k),new is(m)}),!(p.object(D)&&p.number(D.statusCode)&&!p.nullOrUndefined(D.body)))throw new TypeError("The `afterResponse` hook returned an invalid value")}catch(S){m._beforeError(S);return}if(r=D,!Cr(D)){m._beforeError(new dt(D));return}m.destroy(),a(m.options.resolveBodyOnly?D.body:D)});let y=o(D=>{if(i.isCanceled)return;let{options:C}=m;if(D instanceof dt&&!C.throwHttpErrors){let{response:F}=D;m.destroy(),a(m.options.resolveBodyOnly?F.body:F);return}l(D)},"onError");m.once("error",y);let E=m.options?.body;m.once("retry",(D,C)=>{t=void 0;let F=m.options.body;if(E===F&&p.nodeStream(F)){C.message="Cannot retry with consumed body stream",y(C);return}n=m.options,h(D)}),tn(m,s,vb),p.undefined(t)&&m.flush()},"makeRequest");h(0)});i.on=(a,l)=>(s.on(a,l),i),i.off=(a,l)=>(s.off(a,l),i);let u=o(a=>{let l=(async()=>{await i;let{options:f}=r.request;return Ko(r,a,f.parseJson,f.encoding)})();return Object.defineProperties(l,Object.getOwnPropertyDescriptors(i)),l},"shortcut");return i.json=()=>{if(e.options){let{headers:a}=e.options;!e.writableFinished&&!("accept"in a)&&(a.accept="application/json")}return u("json")},i.buffer=()=>u("buffer"),i.text=()=>u("text"),i}o(vs,"asPromise");var Ab=o(async t=>new Promise(e=>{setTimeout(e,t)}),"delay"),Tb=o(t=>p.function_(t),"isGotInstance"),Lb=["get","post","put","patch","head","delete"],Yd=o(t=>{t={options:new Be(void 0,void 0,t.options),handlers:[...t.handlers],mutableDefaults:t.mutableDefaults},Object.defineProperty(t,"mutableDefaults",{enumerable:!0,configurable:!1,writable:!1});let e=o((n,s,i=t.options)=>{let u=new qt(n,s,i),a,l=o(g=>(u.options=g,u._noPipe=!g.isStream,u.flush(),g.isStream?u:(a||(a=vs(u)),a)),"lastHandler"),f=0,h=o(g=>{let y=(t.handlers[f++]??l)(g,h);if(p.promise(y)&&!u.options.isStream&&(a||(a=vs(u)),y!==a)){let E=Object.getOwnPropertyDescriptors(a);for(let D in E)D in y&&delete E[D];Object.defineProperties(y,E),y.cancel=a.cancel}return y},"iterateHandlers");return h(u.options)},"got");e.extend=(...n)=>{let s=new Be(void 0,void 0,t.options),i=[...t.handlers],u;for(let a of n)Tb(a)?(s.merge(a.defaults.options),i.push(...a.defaults.handlers),u=a.defaults.mutableDefaults):(s.merge(a),a.handlers&&i.push(...a.handlers),u=a.mutableDefaults);return Yd({options:s,handlers:i,mutableDefaults:!!u})};let r=o(async function*(n,s){let i=new Be(n,s,t.options);i.resolveBodyOnly=!1;let{pagination:u}=i;w.function_(u.transform),w.function_(u.shouldContinue),w.function_(u.filter),w.function_(u.paginate),w.number(u.countLimit),w.number(u.requestLimit),w.number(u.backoff);let a=[],{countLimit:l}=u,f=0;for(;f<u.requestLimit;){f!==0&&await Ab(u.backoff);let h=await e(void 0,void 0,i),g=await u.transform(h),m=[];w.array(g);for(let E of g)if(u.filter({item:E,currentItems:m,allItems:a})&&(!u.shouldContinue({item:E,currentItems:m,allItems:a})||(yield E,u.stackAllItems&&a.push(E),m.push(E),--l<=0)))return;let y=u.paginate({response:h,currentItems:m,allItems:a});if(y===!1)return;y===h.request.options?i=h.request.options:(i.merge(y),w.any([p.urlInstance,p.undefined],y.url),y.url!==void 0&&(i.prefixUrl="",i.url=y.url)),f++}},"paginateEach");e.paginate=r,e.paginate.all=async(n,s)=>{let i=[];for await(let u of r(n,s))i.push(u);return i},e.paginate.each=r,e.stream=(n,s)=>e(n,{...s,isStream:!0});for(let n of Lb)e[n]=(s,i)=>e(s,{...i,method:n}),e.stream[n]=(s,i)=>e(s,{...i,method:n,isStream:!0});return t.mutableDefaults||(Object.freeze(t.handlers),t.options.freeze()),Object.defineProperty(e,"defaults",{value:t,writable:!1,configurable:!1,enumerable:!0}),e},"create"),Jd=Yd;var Ob={options:new Be,handlers:[],mutableDefaults:!1},rk=Jd(Ob);import{inspect as $b}from"node:util";c();c();var Pb=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,globalThis.DOMException,globalThis.AssertionError,globalThis.SystemError].filter(Boolean).map(t=>[t.name,t]),kb=new Map(Pb),Kd=kb;var Rb=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0},{property:"cause",enumerable:!1}],eu=new WeakSet,Bb=o(t=>{eu.add(t);let e=t.toJSON();return eu.delete(t),e},"toJSON"),Nb=o(t=>Kd.get(t)??Error,"getErrorConstructor"),Qd=o(({from:t,seen:e,to:r,forceEnumerable:n,maxDepth:s,depth:i,useToJSON:u,serialize:a})=>{if(!r)if(Array.isArray(t))r=[];else if(!a&&Xd(t)){let f=Nb(t.name);r=new f}else r={};if(e.push(t),i>=s)return r;if(u&&typeof t.toJSON=="function"&&!eu.has(t))return Bb(t);let l=o(f=>Qd({from:f,seen:[...e],forceEnumerable:n,maxDepth:s,depth:i,useToJSON:u,serialize:a}),"continueDestroyCircular");for(let[f,h]of Object.entries(t)){if(h&&h instanceof Uint8Array&&h.constructor.name==="Buffer"){r[f]="[object Buffer]";continue}if(h!==null&&typeof h=="object"&&typeof h.pipe=="function"){r[f]="[object Stream]";continue}if(typeof h!="function"){if(!h||typeof h!="object"){try{r[f]=h}catch{}continue}if(!e.includes(t[f])){i++,r[f]=l(t[f]);continue}r[f]="[Circular]"}}for(let{property:f,enumerable:h}of Rb)typeof t[f]<"u"&&t[f]!==null&&Object.defineProperty(r,f,{value:Xd(t[f])?l(t[f]):t[f],enumerable:n?!0:h,configurable:!0,writable:!0});return r},"destroyCircular");function eD(t,e={}){let{maxDepth:r=Number.POSITIVE_INFINITY,useToJSON:n=!0}=e;return typeof t=="object"&&t!==null?Qd({from:t,seen:[],forceEnumerable:!0,maxDepth:r,depth:0,useToJSON:n,serialize:!0}):typeof t=="function"?`[Function: ${t.name||"anonymous"}]`:t}o(eD,"serializeError");function Xd(t){return!!t&&typeof t=="object"&&"name"in t&&"message"in t&&"stack"in t}o(Xd,"isErrorLike");c();import tD from"node:path";var tu=tD.dirname(Wl),Ib=o((...t)=>tD.join(tu,...t),"workspacePath"),Ek=o((...t)=>Ib("assets",...t),"assetsPath");var Ak=o((t,e)=>{let r={...t};for(let[n,s]of Object.entries(e))r[n]||(r[n]=s);return r},"defaults");var rD=o((t,e)=>{let r={...t};for(let n of e)delete r[n];return r},"omit");var Tk=o(t=>{Array.isArray(t)&&(t=t[0]);let e=eD(t);return typeof e=="string"&&(e={message:e}),e.stack&&(e.stack=eo(e.stack,{pretty:!0,basePath:tu}).replaceAll(/file:\/\/\//g,"")),t instanceof J&&(e.timings=void 0,e.options={method:t.options.method,url:t.options.url instanceof URL?t.options.url.toJSON():t.options.url},e.responseBody=$b(t.response?.body)),e},"serializeError");var fn=o(t=>!er(t)&&!Ou(t),"isSprintOptions"),br=o((t,...e)=>{let r,n={ensureNewLine:!1,ensureEmptyLineAbove:!1,indent:0};return fn(t)?(r=t.content,n={...n,...rD(t,["content"])}):er(t)?r=t:r=(0,ru.dedent)(Xi(t,...e)),n.ensureEmptyLineAbove&&!r.startsWith(`
|
|
60
60
|
`)&&(r=`
|
|
61
61
|
`+r),n.ensureNewLine&&!r.endsWith(`
|
|
62
62
|
`)&&(r+=`
|
|
63
|
-
`),n.boxen&&(r=Ki(r,n.boxen)),n.indent&&n.indent>0&&(r=Mi(r,n.indent)),r},"sprint")
|
|
64
|
-
`);return}let r=br(t,...e);ji.writeStdout(r)},"print"),
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
`),n.boxen&&(r=Ki(r,n.boxen)),n.indent&&n.indent>0&&(r=Mi(r,n.indent)),r},"sprint"),$k=o((t,...e)=>fn(t)?br({ensureNewLine:!0,...t}):er(t)?br({ensureNewLine:!0,content:t}):br({ensureNewLine:!0,content:(0,ru.dedent)(Xi(t,...e))}),"sprintln");c();var nu=o((t,...e)=>{if(Hn.logFormat==="json"){fn(t)&&t.json&&ji.writeStdout(JSON.stringify(t.json)+`
|
|
64
|
+
`);return}let r=br(t,...e);ji.writeStdout(r)},"print"),Wk=o((t,...e)=>{fn(t)?nu({ensureNewLine:!0,...t}):er(t)?nu({ensureNewLine:!0,content:t}):nu({ensureNewLine:!0,content:br(t,...e)})},"println");export{pu as a,We as b,eo as c,xr as d,q as e,dw as f,er as g,kt as h,Dw as i,pw as j,mw as k,yw as l,gw as m,Ew as n,Fw as o,Cw as p,bw as q,ww as r,_w as s,xw as t,Sw as u,vw as v,Aw as w,dt as x,rk as y,Bu as z,Tc as A,ti as B,ri as C,kc as D,Bc as E,jc as F,Gc as G,oi as H,Wc as I,Zc as J,Un as K,tu as L,Ek as M,Ak as N,Tk as O,qn as P,xi as Q,mg as R,Yl as S,kS as T,Gn as U,Vl as V,ft as W,ef as X,ov as Y,Hn as Z,_g as _,yv as $,nf as aa,It as ba,ji as ca,Lf as da,Ki as ea,Mi as fa,Xf as ga,br as ha,$k as ia,Wk as ja};
|
|
65
|
+
//# sourceMappingURL=chunk-24OT7GHO.js.map
|