@shopify/create-app 0.8.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/bin/create-app-run.js +2 -15
- package/bin/dev +9 -0
- package/dist/commands/init.js +106 -63
- package/dist/index.js +126 -0
- package/package.json +2 -5
- package/bin/create-app-dev.cmd +0 -3
- package/bin/create-app-dev.js +0 -18
package/dist/index.js
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import{settings as of,run as uf,flush as lf,Errors as cf}from"@oclif/core";import so from"assert";import gt from"events";import hf from"readline";import Wr,{constants as no}from"os";import Be from"stream";import*as on from"tty";import"node:buffer";import"node:path";import"node:child_process";import"node:process";import ff from"child_process";import Oe,{sep as un,extname as df,resolve as io,dirname as pf}from"path";import lt,{statSync as mf,readFileSync as gf,readFile as yf,stat as Df}from"fs";import"node:os";import vf from"buffer";import St from"util";import"node:fs";import Xr from"http";import ln from"https";import hr from"url";import bf from"dns";import Ef from"zlib";import cn from"http2";import ao from"tls";import oo from"net";var ie=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _f(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),e}function wf(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ae={},Ge={exports:{}},uo={exports:{}};(function(t){const e=process.env.TERM_PROGRAM==="Hyper",r=process.platform==="win32",s=process.platform==="linux",n={ballotDisabled:"\u2612",ballotOff:"\u2610",ballotOn:"\u2611",bullet:"\u2022",bulletWhite:"\u25E6",fullBlock:"\u2588",heart:"\u2764",identicalTo:"\u2261",line:"\u2500",mark:"\u203B",middot:"\xB7",minus:"\uFF0D",multiplication:"\xD7",obelus:"\xF7",pencilDownRight:"\u270E",pencilRight:"\u270F",pencilUpRight:"\u2710",percent:"%",pilcrow2:"\u2761",pilcrow:"\xB6",plusMinus:"\xB1",section:"\xA7",starsOff:"\u2606",starsOn:"\u2605",upDownArrow:"\u2195"},i=Object.assign({},n,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),a=Object.assign({},n,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",question:"?",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:s?"\u25B8":"\u276F",pointerSmall:s?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});t.exports=r&&!e?i:a,Reflect.defineProperty(t.exports,"common",{enumerable:!1,value:n}),Reflect.defineProperty(t.exports,"windows",{enumerable:!1,value:i}),Reflect.defineProperty(t.exports,"other",{enumerable:!1,value:a})})(uo);const Cf=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),Sf=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,lo=()=>{const t={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(t.enabled=process.env.FORCE_COLOR!=="0");const e=i=>{let a=i.open=`\x1B[${i.codes[0]}m`,o=i.close=`\x1B[${i.codes[1]}m`,u=i.regex=new RegExp(`\\u001b\\[${i.codes[1]}m`,"g");return i.wrap=(l,f)=>{l.includes(o)&&(l=l.replace(u,o+a));let d=a+l+o;return f?d.replace(/\r*\n/g,`${o}$&${a}`):d},i},r=(i,a,o)=>typeof i=="function"?i(a):i.wrap(a,o),s=(i,a)=>{if(i===""||i==null)return"";if(t.enabled===!1)return i;if(t.visible===!1)return"";let o=""+i,u=o.includes(`
|
|
2
|
+
`),l=a.length;for(l>0&&a.includes("unstyle")&&(a=[...new Set(["unstyle",...a])].reverse());l-- >0;)o=r(t.styles[a[l]],o,u);return o},n=(i,a,o)=>{t.styles[i]=e({name:i,codes:a}),(t.keys[o]||(t.keys[o]=[])).push(i),Reflect.defineProperty(t,i,{configurable:!0,enumerable:!0,set(l){t.alias(i,l)},get(){let l=f=>s(f,l.stack);return Reflect.setPrototypeOf(l,t),l.stack=this.stack?this.stack.concat(i):[i],l}})};return n("reset",[0,0],"modifier"),n("bold",[1,22],"modifier"),n("dim",[2,22],"modifier"),n("italic",[3,23],"modifier"),n("underline",[4,24],"modifier"),n("inverse",[7,27],"modifier"),n("hidden",[8,28],"modifier"),n("strikethrough",[9,29],"modifier"),n("black",[30,39],"color"),n("red",[31,39],"color"),n("green",[32,39],"color"),n("yellow",[33,39],"color"),n("blue",[34,39],"color"),n("magenta",[35,39],"color"),n("cyan",[36,39],"color"),n("white",[37,39],"color"),n("gray",[90,39],"color"),n("grey",[90,39],"color"),n("bgBlack",[40,49],"bg"),n("bgRed",[41,49],"bg"),n("bgGreen",[42,49],"bg"),n("bgYellow",[43,49],"bg"),n("bgBlue",[44,49],"bg"),n("bgMagenta",[45,49],"bg"),n("bgCyan",[46,49],"bg"),n("bgWhite",[47,49],"bg"),n("blackBright",[90,39],"bright"),n("redBright",[91,39],"bright"),n("greenBright",[92,39],"bright"),n("yellowBright",[93,39],"bright"),n("blueBright",[94,39],"bright"),n("magentaBright",[95,39],"bright"),n("cyanBright",[96,39],"bright"),n("whiteBright",[97,39],"bright"),n("bgBlackBright",[100,49],"bgBright"),n("bgRedBright",[101,49],"bgBright"),n("bgGreenBright",[102,49],"bgBright"),n("bgYellowBright",[103,49],"bgBright"),n("bgBlueBright",[104,49],"bgBright"),n("bgMagentaBright",[105,49],"bgBright"),n("bgCyanBright",[106,49],"bgBright"),n("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=Sf,t.hasColor=t.hasAnsi=i=>(t.ansiRegex.lastIndex=0,typeof i=="string"&&i!==""&&t.ansiRegex.test(i)),t.alias=(i,a)=>{let o=typeof a=="string"?t[a]:a;if(typeof o!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");o.stack||(Reflect.defineProperty(o,"name",{value:i}),t.styles[i]=o,o.stack=[i]),Reflect.defineProperty(t,i,{configurable:!0,enumerable:!0,set(u){t.alias(i,u)},get(){let u=l=>s(l,u.stack);return Reflect.setPrototypeOf(u,t),u.stack=this.stack?this.stack.concat(o.stack):o.stack,u}})},t.theme=i=>{if(!Cf(i))throw new TypeError("Expected theme to be an object");for(let a of Object.keys(i))t.alias(a,i[a]);return t},t.alias("unstyle",i=>typeof i=="string"&&i!==""?(t.ansiRegex.lastIndex=0,i.replace(t.ansiRegex,"")):""),t.alias("noop",i=>i),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=uo.exports,t.define=n,t};Ge.exports=lo(),Ge.exports.create=lo,function(t){const e=Object.prototype.toString,r=Ge.exports;let s=!1,n=[];const i={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};t.longest=(o,u)=>o.reduce((l,f)=>Math.max(l,u?f[u].length:f.length),0),t.hasColor=o=>!!o&&r.hasColor(o);const a=t.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o);t.nativeType=o=>e.call(o).slice(8,-1).toLowerCase().replace(/\s/g,""),t.isAsyncFn=o=>t.nativeType(o)==="asyncfunction",t.isPrimitive=o=>o!=null&&typeof o!="object"&&typeof o!="function",t.resolve=(o,u,...l)=>typeof u=="function"?u.call(o,...l):u,t.scrollDown=(o=[])=>[...o.slice(1),o[0]],t.scrollUp=(o=[])=>[o.pop(),...o],t.reorder=(o=[])=>{let u=o.slice();return u.sort((l,f)=>l.index>f.index?1:l.index<f.index?-1:0),u},t.swap=(o,u,l)=>{let f=o.length,d=l===f?0:l<0?f-1:l,c=o[u];o[u]=o[d],o[d]=c},t.width=(o,u=80)=>{let l=o&&o.columns?o.columns:u;return o&&typeof o.getWindowSize=="function"&&(l=o.getWindowSize()[0]),process.platform==="win32"?l-1:l},t.height=(o,u=20)=>{let l=o&&o.rows?o.rows:u;return o&&typeof o.getWindowSize=="function"&&(l=o.getWindowSize()[1]),l},t.wordWrap=(o,u={})=>{if(!o)return o;typeof u=="number"&&(u={width:u});let{indent:l="",newline:f=`
|
|
3
|
+
`+l,width:d=80}=u;d-=((f+l).match(/[^\S\n]/g)||[]).length;let g=`.{1,${d}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,p=o.trim(),D=new RegExp(g,"g"),_=p.match(D)||[];return _=_.map(b=>b.replace(/\n$/,"")),u.padEnd&&(_=_.map(b=>b.padEnd(d," "))),u.padStart&&(_=_.map(b=>b.padStart(d," "))),l+_.join(f)},t.unmute=o=>{let u=o.stack.find(f=>r.keys.color.includes(f));return u?r[u]:o.stack.find(f=>f.slice(2)==="bg")?r[u.slice(2)]:f=>f},t.pascal=o=>o?o[0].toUpperCase()+o.slice(1):"",t.inverse=o=>{if(!o||!o.stack)return o;let u=o.stack.find(f=>r.keys.color.includes(f));if(u){let f=r["bg"+t.pascal(u)];return f?f.black:o}let l=o.stack.find(f=>f.slice(0,2)==="bg");return l?r[l.slice(2).toLowerCase()]||o:r.none},t.complement=o=>{if(!o||!o.stack)return o;let u=o.stack.find(f=>r.keys.color.includes(f)),l=o.stack.find(f=>f.slice(0,2)==="bg");if(u&&!l)return r[i[u]||u];if(l){let f=l.slice(2).toLowerCase(),d=i[f];return d&&r["bg"+t.pascal(d)]||o}return r.none},t.meridiem=o=>{let u=o.getHours(),l=o.getMinutes(),f=u>=12?"pm":"am";u=u%12;let d=u===0?12:u,c=l<10?"0"+l:l;return d+":"+c+" "+f},t.set=(o={},u="",l)=>u.split(".").reduce((f,d,c,g)=>{let p=g.length-1>c?f[d]||{}:l;return!t.isObject(p)&&c<g.length-1&&(p={}),f[d]=p},o),t.get=(o={},u="",l)=>{let f=o[u]==null?u.split(".").reduce((d,c)=>d&&d[c],o):o[u];return f??l},t.mixin=(o,u)=>{if(!a(o))return u;if(!a(u))return o;for(let l of Object.keys(u)){let f=Object.getOwnPropertyDescriptor(u,l);if(f.hasOwnProperty("value"))if(o.hasOwnProperty(l)&&a(f.value)){let d=Object.getOwnPropertyDescriptor(o,l);a(d.value)?o[l]=t.merge({},o[l],u[l]):Reflect.defineProperty(o,l,f)}else Reflect.defineProperty(o,l,f);else Reflect.defineProperty(o,l,f)}return o},t.merge=(...o)=>{let u={};for(let l of o)t.mixin(u,l);return u},t.mixinEmitter=(o,u)=>{let l=u.constructor.prototype;for(let f of Object.keys(l)){let d=l[f];typeof d=="function"?t.define(o,f,d.bind(u)):t.define(o,f,d)}},t.onExit=o=>{const u=(l,f)=>{s||(s=!0,n.forEach(d=>d()),l===!0&&process.exit(128+f))};n.length===0&&(process.once("SIGTERM",u.bind(null,!0,15)),process.once("SIGINT",u.bind(null,!0,2)),process.once("exit",u)),n.push(o)},t.define=(o,u,l)=>{Reflect.defineProperty(o,u,{value:l})},t.defineExport=(o,u,l)=>{let f;Reflect.defineProperty(o,u,{enumerable:!0,configurable:!0,set(d){f=d},get(){return f?f():l()}})}}(Ae);var Ut={};Ut.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"},Ut.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"},Ut.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"},Ut.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"},Ut.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"};const co=hf,Af=Ut,Rf=/^(?:\x1b)([a-zA-Z0-9])$/,xf=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,$f={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};function Tf(t){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(t)}function Ff(t){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(t)}const Kr=(t="",e={})=>{let r,s={name:e.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:t,raw:t,...e};if(Buffer.isBuffer(t)?t[0]>127&&t[1]===void 0?(t[0]-=128,t="\x1B"+String(t)):t=String(t):t!==void 0&&typeof t!="string"?t=String(t):t||(t=s.sequence||""),s.sequence=s.sequence||t||s.name,t==="\r")s.raw=void 0,s.name="return";else if(t===`
|
|
4
|
+
`)s.name="enter";else if(t===" ")s.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x1B\x7F"||t==="\x1B\b")s.name="backspace",s.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")s.name="escape",s.meta=t.length===2;else if(t===" "||t==="\x1B ")s.name="space",s.meta=t.length===2;else if(t<="")s.name=String.fromCharCode(t.charCodeAt(0)+"a".charCodeAt(0)-1),s.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")s.name="number";else if(t.length===1&&t>="a"&&t<="z")s.name=t;else if(t.length===1&&t>="A"&&t<="Z")s.name=t.toLowerCase(),s.shift=!0;else if(r=Rf.exec(t))s.meta=!0,s.shift=/^[A-Z]$/.test(r[1]);else if(r=xf.exec(t)){let n=[...t];n[0]==="\x1B"&&n[1]==="\x1B"&&(s.option=!0);let i=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),a=(r[3]||r[5]||1)-1;s.ctrl=!!(a&4),s.meta=!!(a&10),s.shift=!!(a&1),s.code=i,s.name=$f[i],s.shift=Tf(i)||s.shift,s.ctrl=Ff(i)||s.ctrl}return s};Kr.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let s=co.createInterface({terminal:!0,input:r});co.emitKeypressEvents(r,s);let n=(o,u)=>e(o,Kr(o,u),s),i=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",n),s.resume(),()=>{r.isTTY&&r.setRawMode(i),r.removeListener("keypress",n),s.pause(),s.close()}},Kr.action=(t,e,r)=>{let s={...Af,...r};return e.ctrl?(e.action=s.ctrl[e.name],e):e.option&&s.option?(e.action=s.option[e.name],e):e.shift?(e.action=s.shift[e.name],e):(e.action=s.keys[e.name],e)};var Of=Kr,Pf=t=>{t.timers=t.timers||{};let e=t.options.timers;if(!!e)for(let r of Object.keys(e)){let s=e[r];typeof s=="number"&&(s={interval:s}),kf(t,r,s)}};function kf(t,e,r={}){let s=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},n=r.interval||120;s.frames=r.frames||[],s.loading=!0;let i=setInterval(()=>{s.ms=Date.now()-s.start,s.tick++,t.render()},n);return s.stop=()=>{s.loading=!1,clearInterval(i)},Reflect.defineProperty(s,"interval",{value:i}),t.once("close",()=>s.stop()),s.stop}const{define:If,width:Lf}=Ae;class Bf{constructor(e){let r=e.options;If(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=Lf(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r=="function"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}}var Nf=Bf;const hn=Ae,_e=Ge.exports,fn={default:_e.noop,noop:_e.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||hn.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||hn.complement(this.primary)},primary:_e.cyan,success:_e.green,danger:_e.magenta,strong:_e.bold,warning:_e.yellow,muted:_e.dim,disabled:_e.gray,dark:_e.dim.gray,underline:_e.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typing||this.dim},set placeholder(t){this._placeholder=t},get placeholder(){return this._placeholder||this.primary.dim},set highlight(t){this._highlight=t},get highlight(){return this._highlight||this.inverse}};fn.merge=(t={})=>{t.styles&&typeof t.styles.enabled=="boolean"&&(_e.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible=="boolean"&&(_e.visible=t.styles.visible);let e=hn.merge({},fn,t.styles);delete e.merge;for(let r of Object.keys(_e))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>_e[r]});for(let r of Object.keys(_e.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>_e[r]});return e};var Hf=fn;const dn=process.platform==="win32",ct=Ge.exports,jf=Ae,pn={...ct.symbols,upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301",ellipsisLarge:"\u22EF",ellipsisSmall:"\u2026",fullBlock:"\u2588",identicalTo:"\u2261",indicator:ct.symbols.check,leftAngle:"\u2039",mark:"\u203B",minus:"\u2212",multiplication:"\xD7",obelus:"\xF7",percent:"%",pilcrow:"\xB6",pilcrow2:"\u2761",pencilUpRight:"\u2710",pencilDownRight:"\u270E",pencilRight:"\u270F",plus:"+",plusMinus:"\xB1",pointRight:"\u261E",rightAngle:"\u203A",section:"\xA7",hexagon:{off:"\u2B21",on:"\u2B22",disabled:"\u2B22"},ballot:{on:"\u2611",off:"\u2610",disabled:"\u2612"},stars:{on:"\u2605",off:"\u2606",disabled:"\u2606"},folder:{on:"\u25BC",off:"\u25B6",disabled:"\u25B6"},prefix:{pending:ct.symbols.question,submitted:ct.symbols.check,cancelled:ct.symbols.cross},separator:{pending:ct.symbols.pointerSmall,submitted:ct.symbols.middot,cancelled:ct.symbols.middot},radio:{off:dn?"( )":"\u25EF",on:dn?"(*)":"\u25C9",disabled:dn?"(|)":"\u24BE"},numbers:["\u24EA","\u2460","\u2461","\u2462","\u2463","\u2464","\u2465","\u2466","\u2467","\u2468","\u2469","\u246A","\u246B","\u246C","\u246D","\u246E","\u246F","\u2470","\u2471","\u2472","\u2473","\u3251","\u3252","\u3253","\u3254","\u3255","\u3256","\u3257","\u3258","\u3259","\u325A","\u325B","\u325C","\u325D","\u325E","\u325F","\u32B1","\u32B2","\u32B3","\u32B4","\u32B5","\u32B6","\u32B7","\u32B8","\u32B9","\u32BA","\u32BB","\u32BC","\u32BD","\u32BE","\u32BF"]};pn.merge=t=>{let e=jf.merge({},ct.symbols,pn,t.symbols);return delete e.merge,e};var Mf=pn;const Uf=Hf,Gf=Mf,qf=Ae;var zf=t=>{t.options=qf.merge({},t.options.theme,t.options),t.symbols=Gf.merge(t.options),t.styles=Uf.merge(t.options)},mn={exports:{}};(function(t,e){const r=process.env.TERM_PROGRAM==="Apple_Terminal",s=Ge.exports,n=Ae,i=t.exports=e,a="\x1B[",o="\x07";let u=!1;const l=i.code={bell:o,beep:o,beginning:`${a}G`,down:`${a}J`,esc:a,getPosition:`${a}6n`,hide:`${a}?25l`,line:`${a}2K`,lineEnd:`${a}K`,lineStart:`${a}1K`,restorePosition:a+(r?"8":"u"),savePosition:a+(r?"7":"s"),screen:`${a}2J`,show:`${a}?25h`,up:`${a}1J`},f=i.cursor={get hidden(){return u},hide(){return u=!0,l.hide},show(){return u=!1,l.show},forward:(c=1)=>`${a}${c}C`,backward:(c=1)=>`${a}${c}D`,nextLine:(c=1)=>`${a}E`.repeat(c),prevLine:(c=1)=>`${a}F`.repeat(c),up:(c=1)=>c?`${a}${c}A`:"",down:(c=1)=>c?`${a}${c}B`:"",right:(c=1)=>c?`${a}${c}C`:"",left:(c=1)=>c?`${a}${c}D`:"",to(c,g){return g?`${a}${g+1};${c+1}H`:`${a}${c+1}G`},move(c=0,g=0){let p="";return p+=c<0?f.left(-c):c>0?f.right(c):"",p+=g<0?f.up(-g):g>0?f.down(g):"",p},restore(c={}){let{after:g,cursor:p,initial:D,input:_,prompt:b,size:C,value:x}=c;if(D=n.isPrimitive(D)?String(D):"",_=n.isPrimitive(_)?String(_):"",x=n.isPrimitive(x)?String(x):"",C){let A=i.cursor.up(C)+i.cursor.to(b.length),y=_.length-p;return y>0&&(A+=i.cursor.left(y)),A}if(x||g){let A=!_&&!!D?-D.length:-_.length+p;return g&&(A-=g.length),_===""&&D&&!b.includes(D)&&(A+=D.length),i.cursor.move(A)}}},d=i.erase={screen:l.screen,up:l.up,down:l.down,line:l.line,lineEnd:l.lineEnd,lineStart:l.lineStart,lines(c){let g="";for(let p=0;p<c;p++)g+=i.erase.line+(p<c-1?i.cursor.up(1):"");return c&&(g+=i.code.beginning),g}};i.clear=(c="",g=process.stdout.columns)=>{if(!g)return d.line+f.to(0);let p=b=>[...s.unstyle(b)].length,D=c.split(/\r?\n/),_=0;for(let b of D)_+=1+Math.floor(Math.max(p(b)-1,0)/g);return(d.line+f.prevLine()).repeat(_-1)+d.line+f.to(0)}})(mn,mn.exports);const Vf=gt,ho=Ge.exports,gn=Of,Wf=Pf,Xf=Nf,Kf=zf,Le=Ae,At=mn.exports;class Ka extends Vf{constructor(e={}){super();this.name=e.name,this.type=e.type,this.options=e,Kf(this),Wf(this),this.state=new Xf(this),this.initial=[e.initial,e.default].find(r=>r!=null),this.stdout=e.stdout||process.stdout,this.stdin=e.stdin||process.stdin,this.scale=e.scale||1,this.term=this.options.term||process.env.TERM_PROGRAM,this.margin=Qf(this.options.margin),this.setMaxListeners(0),Yf(this)}async keypress(e,r={}){this.keypressed=!0;let s=gn.action(e,gn(e,r),this.options.actions);this.state.keypress=s,this.emit("keypress",e,s),this.emit("state",this.state.clone());let n=this.options[s.action]||this[s.action]||this.dispatch;if(typeof n=="function")return await n.call(this,e,s);this.alert()}alert(){delete this.state.alert,this.options.show===!1?this.emit("alert"):this.stdout.write(At.code.beep)}cursorHide(){this.stdout.write(At.cursor.hide()),Le.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(At.cursor.show())}write(e){!e||(this.stdout&&this.state.show!==!1&&this.stdout.write(e),this.state.buffer+=e)}clear(e=0){let r=this.state.buffer;this.state.buffer="",!(!r&&!e||this.options.show===!1)&&this.stdout.write(At.cursor.down(e)+At.clear(r,this.width))}restore(){if(this.state.closed||this.options.show===!1)return;let{prompt:e,after:r,rest:s}=this.sections(),{cursor:n,initial:i="",input:a="",value:o=""}=this,u=this.state.size=s.length,l={after:r,cursor:n,initial:i,input:a,prompt:e,size:u,value:o},f=At.cursor.restore(l);f&&this.stdout.write(f)}sections(){let{buffer:e,input:r,prompt:s}=this.state;s=ho.unstyle(s);let n=ho.unstyle(e),i=n.indexOf(s),a=n.slice(0,i),u=n.slice(i).split(`
|
|
5
|
+
`),l=u[0],f=u[u.length-1],c=(s+(r?" "+r:"")).length,g=c<l.length?l.slice(c+1):"";return{header:a,prompt:l,after:g,rest:u.slice(1),last:f}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let e=this.state.error||await this.validate(this.value,this.state);if(e!==!0){let r=`
|
|
6
|
+
`+this.symbols.pointer+" ";typeof e=="string"?r+=e.trim():r+="Invalid input",this.state.error=`
|
|
7
|
+
`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(e){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel=="function"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(e))}async close(){this.state.closed=!0;try{let e=this.sections(),r=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(At.cursor.down(e.rest.length)),this.write(`
|
|
8
|
+
`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=gn.listen(this,this.keypress.bind(this)),this.once("close",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip=="function"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:e,options:r,result:s}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>s.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let n=r.onSubmit.bind(this),i=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await n(this.name,this.value,this),i())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,r)=>{if(this.once("submit",e),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,r,s){let{options:n,state:i,symbols:a,timers:o}=this,u=o&&o[e];i.timer=u;let l=n[e]||i[e]||a[e],f=r&&r[e]!=null?r[e]:await l;if(f==="")return f;let d=await this.resolve(f,i,r,s);return!d&&r&&r[e]?this.resolve(l,i,r,s):d}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,s=this.state;return s.timer=r,Le.isObject(e)&&(e=e[s.status]||e.pending),Le.hasColor(e)?e:(this.styles[s.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return Le.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,s=this.state;s.timer=r;let n=e[s.status]||e.pending||s.separator,i=await this.resolve(n,s);return Le.isObject(i)&&(i=i[s.status]||i.pending),Le.hasColor(i)?i:this.styles.muted(i)}async pointer(e,r){let s=await this.element("pointer",e,r);if(typeof s=="string"&&Le.hasColor(s))return s;if(s){let n=this.styles,i=this.index===r,a=i?n.primary:l=>l,o=await this.resolve(s[i?"on":"off"]||s,this.state),u=Le.hasColor(o)?o:a(o);return i?u:" ".repeat(o.length)}}async indicator(e,r){let s=await this.element("indicator",e,r);if(typeof s=="string"&&Le.hasColor(s))return s;if(s){let n=this.styles,i=e.enabled===!0,a=i?n.success:n.dark,o=s[i?"on":"off"]||s;return Le.hasColor(o)?o:a(o)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let e=await this.element("hint");return Le.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==""}resolve(e,...r){return Le.resolve(this,e,...r)}get base(){return Ka.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||Le.height(this.stdout,25)}get width(){return this.options.columns||Le.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,s=[r,e].find(this.isValue.bind(this));return this.isValue(s)?s:this.initial}static get prompt(){return e=>new this(e).run()}}function Yf(t){let e=n=>t[n]===void 0||typeof t[n]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],s=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let n of Object.keys(t.options)){if(r.includes(n)||/^on[A-Z]/.test(n))continue;let i=t.options[n];typeof i=="function"&&e(n)?s.includes(n)||(t[n]=i.bind(t)):typeof t[n]!="function"&&(t[n]=i)}}function Qf(t){typeof t=="number"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=n=>n%2===0?`
|
|
9
|
+
`:" ",s=[];for(let n=0;n<4;n++){let i=r(n);e[n]?s.push(i.repeat(e[n])):s.push("")}return s}var fr=Ka,fo={};const Jf=Ae,po={default(t,e){return e},checkbox(t,e){throw new Error("checkbox role is not implemented yet")},editable(t,e){throw new Error("editable role is not implemented yet")},expandable(t,e){throw new Error("expandable role is not implemented yet")},heading(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||"",e},input(t,e){throw new Error("input role is not implemented yet")},option(t,e){return po.default(t,e)},radio(t,e){throw new Error("radio role is not implemented yet")},separator(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};var Zf=(t,e={})=>{let r=Jf.merge({},po,e.roles);return r[t]||r.default};const ed=Ge.exports,td=fr,rd=Zf,Yr=Ae,{reorder:yn,scrollUp:sd,scrollDown:nd,isObject:mo,swap:id}=Yr;class ad extends td{constructor(e){super(e);this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:s,suggest:n}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(i=>i.enabled=!1),typeof n!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");mo(r)&&(r=Object.keys(r)),Array.isArray(r)?(s!=null&&(this.index=this.findIndex(s)),r.forEach(i=>this.enable(this.find(i))),await this.render()):(s!=null&&(r=s),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let s=[],n=0,i=async(a,o)=>{typeof a=="function"&&(a=await a.call(this)),a instanceof Promise&&(a=await a);for(let u=0;u<a.length;u++){let l=a[u]=await this.toChoice(a[u],n++,o);s.push(l),l.choices&&await i(l.choices,l)}return s};return i(e,r).then(a=>(this.state.loadingChoices=!1,a))}async toChoice(e,r,s){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let n=e.value;if(e=rd(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=r,e.cursor=0,Yr.define(e,"parent",s),e.level=s?s.level+1:1,e.indent==null&&(e.indent=s?s.indent+" ":e.indent||""),e.path=s?s.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,ed.unstyle(e.message).length));let a={...e};return e.reset=(o=a.input,u=a.value)=>{for(let l of Object.keys(a))e[l]=a[l];e.input=o,e.value=u},n==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit("choice",e,r,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,s){let n=await this.toChoice(e,r,s);return this.choices.push(n),this.index=this.choices.length-1,this.limit=this.choices.length,n}async newItem(e,r,s){let n={name:"New choice name?",editable:!0,newChoice:!0,...e},i=await this.addChoice(n,r,s);return i.updateChoice=()=>{delete i.newChoice,i.name=i.message=i.input,i.input="",i.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(e,r){return typeof r!="boolean"&&(r=e.enabled),r&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=r&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let e=this.selectable.every(r=>r.enabled);return this.choices.forEach(r=>r.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,r){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!="boolean"&&(r=!e.enabled),e.enabled=r,e.choices&&e.choices.forEach(n=>this.toggle(n,r));let s=e.parent;for(;s;){let n=s.choices.filter(i=>this.isDisabled(i));s.enabled=n.every(i=>i.enabled===!0),s=s.parent}return go(this,this.choices),this.emit("toggle",e,this),e}enable(e){return this.selected.length>=this.maxSelected?this.alert():(e.enabled=!this.isDisabled(e),e.choices&&e.choices.forEach(this.enable.bind(this)),e)}disable(e){return e.enabled=!1,e.choices&&e.choices.forEach(this.disable.bind(this)),e}number(e){this.num+=e;let r=s=>{let n=Number(s);if(n>this.choices.length-1)return this.alert();let i=this.focused,a=this.choices.find(o=>n===o.index);if(!a.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(this.visible.indexOf(a)===-1){let o=yn(this.choices),u=o.indexOf(a);if(i.index>u){let l=o.slice(u,u+this.limit),f=o.filter(d=>!l.includes(d));this.choices=l.concat(f)}else{let l=u-this.limit+1;this.choices=o.slice(l).concat(o.slice(0,l))}}return this.index=this.choices.indexOf(a),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(s=>{let n=this.choices.length,i=this.num,a=(o=!1,u)=>{clearTimeout(this.numberTimeout),o&&(u=r(i)),this.num="",s(u)};if(i==="0"||i.length===1&&Number(i+"0")>n)return a(!0);if(Number(i)>n)return a(!1,this.alert());this.numberTimeout=setTimeout(()=>a(!0),this.delay)})}home(){return this.choices=yn(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,r=yn(this.choices);return this.choices=r.slice(e).concat(r.slice(0,e)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let e=this.choices.length,r=this.visible.length,s=this.index;return this.options.scroll===!1&&s===0?this.alert():e>r&&s===0?this.scrollUp():(this.index=(s-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,r=this.visible.length,s=this.index;return this.options.scroll===!1&&s===r-1?this.alert():e>r&&s===r-1?this.scrollDown():(this.index=(s+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=sd(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=nd(this.choices),this.index=e,this.isDisabled()?this.down():this.render()}async shiftUp(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index-1),await this.up(),this.sorting=!1;return}return this.scrollUp(this.index)}async shiftDown(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index+1),await this.down(),this.sorting=!1;return}return this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(e){id(this.choices,this.index,e)}isDisabled(e=this.focused){return e&&["disabled","collapsed","hidden","completing","readonly"].some(s=>e[s]===!0)?!0:e&&e.role==="heading"}isEnabled(e=this.focused){if(Array.isArray(e))return e.every(r=>this.isEnabled(r));if(e.choices){let r=e.choices.filter(s=>!this.isDisabled(s));return e.enabled&&r.every(s=>this.isEnabled(s))}return e.enabled&&!this.isDisabled(e)}isChoice(e,r){return e.name===r||e.index===Number(r)}isSelected(e){return Array.isArray(this.initial)?this.initial.some(r=>this.isChoice(e,r)):this.isChoice(e,this.initial)}map(e=[],r="value"){return[].concat(e||[]).reduce((s,n)=>(s[n]=this.find(n,r),s),{})}filter(e,r){let n=typeof e=="function"?e:(o,u)=>[o.name,u].includes(e),a=(this.options.multiple?this.state._choices:this.choices).filter(n);return r?a.map(o=>o[r]):a}find(e,r){if(mo(e))return r?e[r]:e;let n=typeof e=="function"?e:(a,o)=>[a.name,o].includes(e),i=this.choices.find(n);if(i)return r?i[r]:i}findIndex(e){return this.choices.indexOf(this.find(e))}async submit(){let e=this.focused;if(!e)return this.alert();if(e.newChoice)return e.input?(e.updateChoice(),this.render()):this.alert();if(this.choices.some(a=>a.newChoice))return this.alert();let{reorder:r,sort:s}=this.options,n=this.multiple===!0,i=this.selected;return i===void 0?this.alert():(Array.isArray(i)&&r!==!1&&s!==!0&&(i=Yr.reorder(i)),this.value=n?i.map(a=>a.name):i.name,super.submit())}set choices(e=[]){this.state._choices=this.state._choices||[],this.state.choices=e;for(let r of e)this.state._choices.some(s=>s.name===r.name)||this.state._choices.push(r);if(!this._initial&&this.options.initial){this._initial=!0;let r=this.initial;if(typeof r=="string"||typeof r=="number"){let s=this.find(r);s&&(this.initial=s.index,this.focus(s,!0))}}}get choices(){return go(this,this.state.choices||[])}set visible(e){this.state.visible=e}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(e){this.state.limit=e}get limit(){let{state:e,options:r,choices:s}=this,n=e.limit||this._limit||r.limit||s.length;return Math.min(n,this.height)}set value(e){super.value=e}get value(){return typeof super.value!="string"&&super.value===this.initial?this.input:super.value}set index(e){this.state.index=e}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let e=this.choices[this.index];return e&&this.state.submitted&&this.multiple!==!0&&(e.enabled=!0),e}get selectable(){return this.choices.filter(e=>!this.isDisabled(e))}get selected(){return this.multiple?this.enabled:this.focused}}function go(t,e){if(e instanceof Promise)return e;if(typeof e=="function"){if(Yr.isAsyncFn(e))return e;e=e.call(t,t)}for(let r of e){if(Array.isArray(r.choices)){let s=r.choices.filter(n=>!t.isDisabled(n));r.enabled=s.every(n=>n.enabled===!0)}t.isDisabled(r)===!0&&delete r.enabled}return e}var Qr=ad;const od=Qr,Dn=Ae;class ud extends od{constructor(e){super(e);this.emptyError=this.options.emptyError||"No items were selected"}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}separator(){if(this.options.separator)return super.separator();let e=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():e}pointer(e,r){return!this.multiple||this.options.pointer?super.pointer(e,r):""}indicator(e,r){return this.multiple?super.indicator(e,r):""}choiceMessage(e,r){let s=this.resolve(e.message,this.state,e,r);return e.role==="heading"&&!Dn.hasColor(s)&&(s=this.styles.strong(s)),this.resolve(s,this.state,e,r)}choiceSeparator(){return":"}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,n=await this.pointer(e,r),i=await this.indicator(e,r)+(e.pad||""),a=await this.resolve(e.hint,this.state,e,r);a&&!Dn.hasColor(a)&&(a=this.styles.muted(a));let o=this.indent(e),u=await this.choiceMessage(e,r),l=()=>[this.margin[3],o+n+i,u,this.margin[1],a].filter(Boolean).join(" ");return e.role==="heading"?l():e.disabled?(Dn.hasColor(u)||(u=this.styles.disabled(u)),l()):(s&&(u=this.styles.em(u)),l())}async renderChoices(){if(this.state.loading==="choices")return this.styles.warning("Loading choices");if(this.state.submitted)return"";let e=this.visible.map(async(i,a)=>await this.renderChoice(i,a)),r=await Promise.all(e);r.length||r.push(this.styles.danger("No matching choices"));let s=this.margin[0]+r.join(`
|
|
10
|
+
`),n;return this.options.choicesHeader&&(n=await this.resolve(this.options.choicesHeader,this.state)),[n,s].filter(Boolean).join(`
|
|
11
|
+
`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,s="",n=await this.header(),i=await this.prefix(),a=await this.separator(),o=await this.message();this.options.promptLine!==!1&&(s=[i,o,a,""].join(" "),this.state.prompt=s);let u=await this.format(),l=await this.error()||await this.hint(),f=await this.renderChoices(),d=await this.footer();u&&(s+=u),l&&!s.includes(l)&&(s+=" "+l),e&&!u&&!f.trim()&&this.multiple&&this.emptyError!=null&&(s+=this.styles.danger(this.emptyError)),this.clear(r),this.write([n,s,f,d].filter(Boolean).join(`
|
|
12
|
+
`)),this.write(this.margin[2]),this.restore()}}var Rt=ud;const ld=Rt,cd=(t,e)=>{let r=t.toLowerCase();return s=>{let i=s.toLowerCase().indexOf(r),a=e(s.slice(i,i+r.length));return i>=0?s.slice(0,i)+a+s.slice(i+r.length):s}};class hd extends ld{constructor(e){super(e);this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:s}=this.state;return this.input=s.slice(0,r)+e+s.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,e,r);let s=e.toLowerCase();return r.filter(n=>n.message.toLowerCase().includes(s))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=cd(this.input,e),s=this.choices;this.choices=s.map(n=>({...n,message:r(n.message)})),await super.render(),this.choices=s}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}}var fd=hd;const vn=Ae;var yo=(t,e={})=>{t.cursorHide();let{input:r="",initial:s="",pos:n,showCursor:i=!0,color:a}=e,o=a||t.styles.placeholder,u=vn.inverse(t.styles.primary),l=D=>u(t.styles.black(D)),f=r,d=" ",c=l(d);if(t.blink&&t.blink.off===!0&&(l=D=>D,c=""),i&&n===0&&s===""&&r==="")return l(d);if(i&&n===0&&(r===s||r===""))return l(s[0])+o(s.slice(1));s=vn.isPrimitive(s)?`${s}`:"",r=vn.isPrimitive(r)?`${r}`:"";let g=s&&s.startsWith(r)&&s!==r,p=g?l(s[r.length]):c;if(n!==r.length&&i===!0&&(f=r.slice(0,n)+l(r[n])+r.slice(n+1),p=""),i===!1&&(p=""),g){let D=t.styles.unstyle(f+p);return f+p+o(s.slice(D.length))}return f+p};const dd=Ge.exports,pd=Rt,md=yo;class gd extends pd{constructor(e){super({...e,multiple:!0});this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:s,input:n}=r;return r.value=r.input=n.slice(0,s)+e+n.slice(s),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:s}=e;return e.value=e.input=s.slice(0,r-1)+s.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:s}=e;if(s[r]===void 0)return this.alert();let n=`${s}`.slice(0,r)+`${s}`.slice(r+1);return e.value=e.input=n,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:s}=e;return r&&r.startsWith(s)&&s!==r?(e.value=e.input=r,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?e.cursor===0?super.prev():(e.value=e.input="",e.cursor=0,this.render()):this.alert()}separator(){return""}format(e){return this.state.submitted?"":super.format(e)}pointer(){return""}indicator(e){return e.input?"\u29BF":"\u2299"}async choiceSeparator(e,r){let s=await this.resolve(e.separator,this.state,e,r)||":";return s?" "+this.styles.disabled(s):""}async renderChoice(e,r){await this.onChoice(e,r);let{state:s,styles:n}=this,{cursor:i,initial:a="",name:o,hint:u,input:l=""}=e,{muted:f,submitted:d,primary:c,danger:g}=n,p=u,D=this.index===r,_=e.validate||(()=>!0),b=await this.choiceSeparator(e,r),C=e.message;this.align==="right"&&(C=C.padStart(this.longest+1," ")),this.align==="left"&&(C=C.padEnd(this.longest+1," "));let x=this.values[o]=l||a,A=l?"success":"dark";await _.call(e,x,this.state)!==!0&&(A="danger");let h=n[A](await this.indicator(e,r))+(e.pad||""),v=this.indent(e),$=()=>[v,h,C+b,l,p].filter(Boolean).join(" ");if(s.submitted)return C=dd.unstyle(C),l=d(l),p="",$();if(e.format)l=await e.format.call(this,l,e,r);else{let T=this.styles.muted;l=md(this,{input:l,initial:a,pos:i,showCursor:D,color:T})}return this.isValue(l)||(l=this.styles.muted(this.symbols.ellipsis)),e.result&&(this.values[o]=await e.result.call(this,x,e,r)),D&&(C=c(C)),e.error?l+=(l?" ":"")+g(e.error.trim()):e.hint&&(l+=(l?" ":"")+f(e.hint.trim())),$()}async submit(){return this.value=this.values,super.base.submit.call(this)}}var bn=gd;const yd=bn,Dd=()=>{throw new Error("expected prompt to have a custom authenticate method")},Do=(t=Dd)=>{class e extends yd{constructor(s){super(s)}async submit(){this.value=await t.call(this,this.values,this.state),super.base.submit.call(this)}static create(s){return Do(s)}}return e};var vo=Do();const vd=vo;function bd(t,e){return t.username===this.options.username&&t.password===this.options.password}const bo=(t=bd)=>{const e=[{name:"username",message:"username"},{name:"password",message:"password",format(s){return this.options.showPassword?s:(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(s.length))}}];class r extends vd.create(t){constructor(n){super({...n,choices:e})}static create(n){return bo(n)}}return r};var Ed=bo();const _d=fr,{isPrimitive:wd,hasColor:Cd}=Ae;class Sd extends _d{constructor(e){super(e);this.cursorHide()}async initialize(){let e=await this.resolve(this.initial,this.state);this.input=await this.cast(e),await super.initialize()}dispatch(e){return this.isValue(e)?(this.input=e,this.submit()):this.alert()}format(e){let{styles:r,state:s}=this;return s.submitted?r.success(e):r.primary(e)}cast(e){return this.isTrue(e)}isTrue(e){return/^[ty1]/i.test(e)}isFalse(e){return/^[fn0]/i.test(e)}isValue(e){return wd(e)&&(this.isTrue(e)||this.isFalse(e))}async hint(){if(this.state.status==="pending"){let e=await this.element("hint");return Cd(e)?e:this.styles.muted(e)}}async render(){let{input:e,size:r}=this.state,s=await this.prefix(),n=await this.separator(),i=await this.message(),a=this.styles.muted(this.default),o=[s,i,a,n].filter(Boolean).join(" ");this.state.prompt=o;let u=await this.header(),l=this.value=this.cast(e),f=await this.format(l),d=await this.error()||await this.hint(),c=await this.footer();d&&!o.includes(d)&&(f+=" "+d),o+=" "+f,this.clear(r),this.write([u,o,c].filter(Boolean).join(`
|
|
13
|
+
`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}}var En=Sd;const Ad=En;class Rd extends Ad{constructor(e){super(e);this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}}var xd=Rd;const $d=Rt,Td=bn,Gt=Td.prototype;class Fd extends $d{constructor(e){super({...e,multiple:!0});this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let s=this.focused,n=s.parent||{};return!s.editable&&!n.editable&&(e==="a"||e==="i")?super[e]():Gt.dispatch.call(this,e,r)}append(e,r){return Gt.append.call(this,e,r)}delete(e,r){return Gt.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?Gt.next.call(this):super.next()}prev(){return this.focused.editable?Gt.prev.call(this):super.prev()}async indicator(e,r){let s=e.indicator||"",n=e.editable?s:super.indicator(e,r);return await this.resolve(n,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?Gt.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let s=r.parent?this.value[r.parent.name]:this.value;if(r.editable?s=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(s=r.enabled===!0),e=await r.validate(s,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e=="string"?e:"Invalid Input"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role==="heading"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}}var Od=Fd;const Pd=fr,kd=yo,{isPrimitive:Id}=Ae;class Ld extends Pd{constructor(e){super(e);this.initial=Id(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let s=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!s||s.name!=="return")?this.append(`
|
|
14
|
+
`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:s}=this.state;this.input=`${s}`.slice(0,r)+e+`${s}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),s=this.input.slice(e),n=r.split(" ");this.state.clipboard.push(n.pop()),this.input=n.join(" "),this.cursor=this.input.length,this.input+=s,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):kd(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),s=await this.separator(),n=await this.message(),i=[r,n,s].filter(Boolean).join(" ");this.state.prompt=i;let a=await this.header(),o=await this.format(),u=await this.error()||await this.hint(),l=await this.footer();u&&!o.includes(u)&&(o+=" "+u),i+=" "+o,this.clear(e),this.write([a,i,l].filter(Boolean).join(`
|
|
15
|
+
`)),this.restore()}}var qt=Ld;const Bd=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),Jr=t=>Bd(t).filter(Boolean);var Nd=(t,e={},r="")=>{let{past:s=[],present:n=""}=e,i,a;switch(t){case"prev":case"undo":return i=s.slice(0,s.length-1),a=s[s.length-1]||"",{past:Jr([r,...i]),present:a};case"next":case"redo":return i=s.slice(1),a=s[0]||"",{past:Jr([...i,r]),present:a};case"save":return{past:Jr([...s,r]),present:""};case"remove":return a=Jr(s.filter(o=>o!==r)),n="",a.length&&(n=a.pop()),{past:a,present:n};default:throw new Error(`Invalid action: "${t}"`)}};const Hd=qt,Eo=Nd;class jd extends Hd{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let s=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:s},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=Eo(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){!this.store||(this.data=Eo("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}}var _o=jd;const Md=qt;class Ud extends Md{format(){return""}}var Gd=Ud;const qd=qt;class zd extends qd{constructor(e={}){super(e);this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(", ")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}}var Vd=zd;const Wd=Rt;class Xd extends Wd{constructor(e){super({...e,multiple:!0})}}var Kd=Xd;const Yd=qt;class Qd extends Yd{constructor(e={}){super({style:"number",...e});this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,s=this.toNumber(this.input);return s>this.max+r?this.alert():(this.input=`${s+r}`,this.render())}down(e){let r=e||this.minor,s=this.toNumber(this.input);return s<this.min-r?this.alert():(this.input=`${s-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(e=this.input){return typeof this.options.format=="function"?this.options.format.call(this,e):this.styles.info(e)}toNumber(e=""){return this.float?+e:Math.round(+e)}isValue(e){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(e)}submit(){let e=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(e||0),super.submit()}}var wo=Qd,Jd=wo;const Zd=qt;class ep extends Zd{constructor(e){super(e);this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):""}}var tp=ep;const rp=Ge.exports,sp=Qr,Co=Ae;class np extends sp{constructor(e={}){super(e);this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||"left"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||`
|
|
16
|
+
`;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((s,n)=>({name:n+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let s=0;s<this.scale.length;s++)r.scale.push({index:s})}this.widths[0]=Math.min(this.widths[0],e+3)}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}heading(e,r,s){return this.styles.strong(e)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIndex>=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){if(this.scaleKey===!1||this.state.submitted)return"";let e=this.scale.map(s=>` ${s.name} - ${s.message}`);return["",...e].map(s=>this.styles.muted(s)).join(`
|
|
17
|
+
`)}renderScaleHeading(e){let r=this.scale.map(u=>u.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let s=this.scaleLength-r.join("").length,n=Math.round(s/(r.length-1)),a=r.map(u=>this.styles.strong(u)).join(" ".repeat(n)),o=" ".repeat(this.widths[0]);return this.margin[3]+o+this.margin[1]+a}scaleIndicator(e,r,s){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,s);let n=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):n?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let s=e.scale.map(i=>this.scaleIndicator(e,i,r)),n=this.term==="Hyper"?"":" ";return s.join(n+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,n=await this.pointer(e,r),i=await e.hint;i&&!Co.hasColor(i)&&(i=this.styles.muted(i));let a=p=>this.margin[3]+p.replace(/\s+$/,"").padEnd(this.widths[0]," "),o=this.newline,u=this.indent(e),l=await this.resolve(e.message,this.state,e,r),f=await this.renderScale(e,r),d=this.margin[1]+this.margin[3];this.scaleLength=rp.unstyle(f).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-d.length);let g=Co.wordWrap(l,{width:this.widths[0],newline:o}).split(`
|
|
18
|
+
`).map(p=>a(p)+this.margin[1]);return s&&(f=this.styles.info(f),g=g.map(p=>this.styles.info(p))),g[0]+=f,this.linebreak&&g.push(""),[u+n,g.join(`
|
|
19
|
+
`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(n,i)=>await this.renderChoice(n,i)),r=await Promise.all(e),s=await this.renderScaleHeading();return this.margin[0]+[s,...r.map(n=>n.join(" "))].join(`
|
|
20
|
+
`)}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),n=await this.separator(),i=await this.message(),a="";this.options.promptLine!==!1&&(a=[s,i,n,""].join(" "),this.state.prompt=a);let o=await this.header(),u=await this.format(),l=await this.renderScaleKey(),f=await this.error()||await this.hint(),d=await this.renderChoices(),c=await this.footer(),g=this.emptyError;u&&(a+=u),f&&!a.includes(f)&&(a+=" "+f),e&&!u&&!d.trim()&&this.multiple&&g!=null&&(a+=this.styles.danger(g)),this.clear(r),this.write([o,a,l,d,c].filter(Boolean).join(`
|
|
21
|
+
`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}}var ip=np;const So=Ge.exports,ap=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"";class op{constructor(e){this.name=e.key,this.field=e.field||{},this.value=ap(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}}const up=async(t={},e={},r=s=>s)=>{let s=new Set,n=t.fields||[],i=t.template,a=[],o=[],u=[],l=1;typeof i=="function"&&(i=await i());let f=-1,d=()=>i[++f],c=()=>i[f+1],g=p=>{p.line=l,a.push(p)};for(g({type:"bos",value:""});f<i.length-1;){let p=d();if(/^[^\S\n ]$/.test(p)){g({type:"text",value:p});continue}if(p===`
|
|
22
|
+
`){g({type:"newline",value:p}),l++;continue}if(p==="\\"){p+=d(),g({type:"text",value:p});continue}if((p==="$"||p==="#"||p==="{")&&c()==="{"){p+=d();let b={type:"template",open:p,inner:"",close:"",value:p},C;for(;C=d();){if(C==="}"){c()==="}"&&(C+=d()),b.value+=C,b.close=C;break}C===":"?(b.initial="",b.key=b.inner):b.initial!==void 0&&(b.initial+=C),b.value+=C,b.inner+=C}b.template=b.open+(b.initial||b.inner)+b.close,b.key=b.key||b.inner,e.hasOwnProperty(b.key)&&(b.initial=e[b.key]),b=r(b),g(b),u.push(b.key),s.add(b.key);let x=o.find(A=>A.name===b.key);b.field=n.find(A=>A.name===b.key),x||(x=new op(b),o.push(x)),x.lines.push(b.line-1);continue}let D=a[a.length-1];D.type==="text"&&D.line===l?D.value+=p:g({type:"text",value:p})}return g({type:"eos",value:""}),{input:i,tabstops:a,unique:s,keys:u,items:o}};var lp=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),s={...e.values,...e.initial},{tabstops:n,items:i,keys:a}=await up(e,s),o=_n("result",t),u=_n("format",t),l=_n("validate",t,e,!0),f=t.isValue.bind(t);return async(d={},c=!1)=>{let g=0;d.required=r,d.items=i,d.keys=a,d.output="";let p=async(C,x,A,y)=>{let h=await l(C,x,A,y);return h===!1?"Invalid field "+A.name:h};for(let C of n){let x=C.value,A=C.key;if(C.type!=="template"){x&&(d.output+=x);continue}if(C.type==="template"){let y=i.find(j=>j.name===A);e.required===!0&&d.required.add(y.name);let h=[y.input,d.values[y.value],y.value,x].find(f),$=(y.field||{}).message||C.inner;if(c){let j=await p(d.values[A],d,y,g);if(j&&typeof j=="string"||j===!1){d.invalid.set(A,j);continue}d.invalid.delete(A);let S=await o(d.values[A],d,y,g);d.output+=So.unstyle(S);continue}y.placeholder=!1;let T=x;x=await u(x,d,y,g),h!==x?(d.values[A]=h,x=t.styles.typing(h),d.missing.delete($)):(d.values[A]=void 0,h=`<${$}>`,x=t.styles.primary(h),y.placeholder=!0,d.required.has(A)&&d.missing.add($)),d.missing.has($)&&d.validating&&(x=t.styles.warning(h)),d.invalid.has(A)&&d.validating&&(x=t.styles.danger(h)),g===d.index&&(T!==x?x=t.styles.underline(x):x=t.styles.heading(So.unstyle(x))),g++}x&&(d.output+=x)}let D=d.output.split(`
|
|
23
|
+
`).map(C=>" "+C),_=i.length,b=0;for(let C of i)d.invalid.has(C.name)&&C.lines.forEach(x=>{D[x][0]===" "&&(D[x]=d.styles.danger(d.symbols.bullet)+D[x].slice(1))}),t.isValue(d.values[C.name])&&b++;return d.completed=(b/_*100).toFixed(0),d.output=D.join(`
|
|
24
|
+
`),d.output}};function _n(t,e,r,s){return(n,i,a,o)=>typeof a.field[t]=="function"?a.field[t].call(e,n,i,a,o):[s,n].find(u=>e.isValue(u))}const cp=Ge.exports,hp=lp,fp=fr;class dp extends fp{constructor(e){super(e);this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await hp(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let s=this.getItem(),n=s.input.slice(0,this.cursor),i=s.input.slice(this.cursor);this.input=s.input=`${n}${e}${i}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),s=e.input.slice(0,this.cursor-1);this.input=e.input=`${s}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:s,size:n}=this.state,i=[this.options.newline,`
|
|
25
|
+
`].find(C=>C!=null),a=await this.prefix(),o=await this.separator(),u=await this.message(),l=[a,u,o].filter(Boolean).join(" ");this.state.prompt=l;let f=await this.header(),d=await this.error()||"",c=await this.hint()||"",g=s?"":await this.interpolate(this.state),p=this.state.key=r[e]||"",D=await this.format(p),_=await this.footer();D&&(l+=" "+D),c&&!D&&this.state.completed===0&&(l+=" "+c),this.clear(n);let b=[f,l,g,_,d.trim()];this.write(b.filter(Boolean).join(i)),this.restore()}getItem(e){let{items:r,keys:s,index:n}=this.state,i=r.find(a=>a.name===s[n]);return i&&i.input!=null&&(this.input=i.input,this.cursor=i.cursor),i}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:s,values:n}=this.state;if(e.size){let o="";for(let[u,l]of e)o+=`Invalid ${u}: ${l}
|
|
26
|
+
`;return this.state.error=o,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let a=cp.unstyle(s).split(`
|
|
27
|
+
`).map(o=>o.slice(1)).join(`
|
|
28
|
+
`);return this.value={values:n,result:a},super.submit()}}var pp=dp;const mp="(Use <shift>+<up/down> to sort)",gp=Rt;class yp extends gp{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0});this.state.hint=[this.options.hint,mp].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let s=await super.renderChoice(e,r),n=this.symbols.identicalTo+" ",i=this.index===r&&this.sorting?this.styles.muted(n):" ";return this.options.drag===!1&&(i=""),this.options.numbered===!0?i+`${r+1} - `+s:i+s}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}}var Dp=yp;const vp=Qr;class bp extends vp{constructor(e={}){super(e);if(this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(s=>this.styles.muted(s)),this.state.header=r.join(`
|
|
29
|
+
`)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let s of r)s.scale=Ep(5,this.options),s.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],s=r.selected;return e.scale.forEach(n=>n.selected=!1),r.selected=!s,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,n=this.term==="Hyper",i=n?9:8,a=n?"":" ",o=this.symbols.line.repeat(i),u=" ".repeat(i+(n?0:1)),l=x=>(x?this.styles.success("\u25C9"):"\u25EF")+a,f=r+1+".",d=s?this.styles.heading:this.styles.noop,c=await this.resolve(e.message,this.state,e,r),g=this.indent(e),p=g+e.scale.map((x,A)=>l(A===e.scaleIdx)).join(o),D=x=>x===e.scaleIdx?d(x):x,_=g+e.scale.map((x,A)=>D(A)).join(u),b=()=>[f,c].filter(Boolean).join(" "),C=()=>[b(),p,_," "].filter(Boolean).join(`
|
|
30
|
+
`);return s&&(p=this.styles.cyan(p),_=this.styles.cyan(_)),C()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(s,n)=>await this.renderChoice(s,n)),r=await Promise.all(e);return r.length||r.push(this.styles.danger("No matching choices")),r.join(`
|
|
31
|
+
`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),n=await this.separator(),i=await this.message(),a=[s,i,n].filter(Boolean).join(" ");this.state.prompt=a;let o=await this.header(),u=await this.format(),l=await this.error()||await this.hint(),f=await this.renderChoices(),d=await this.footer();(u||!l)&&(a+=" "+u),l&&!a.includes(l)&&(a+=" "+l),e&&!u&&!f&&this.multiple&&this.type!=="form"&&(a+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,o,f,d].filter(Boolean).join(`
|
|
32
|
+
`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}}function Ep(t,e={}){if(Array.isArray(e.scale))return e.scale.map(s=>({...s}));let r=[];for(let s=1;s<t+1;s++)r.push({i:s,selected:!1});return r}var _p=bp,wp=_o;const Cp=En;class Sp extends Cp{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",r){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=s=>this.styles.primary.underline(s);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,r=await this.header(),s=await this.prefix(),n=await this.separator(),i=await this.message(),a=await this.format(),o=await this.error()||await this.hint(),u=await this.footer(),l=[s,i,n,a].join(" ");this.state.prompt=l,o&&!l.includes(o)&&(l+=" "+o),this.clear(e),this.write([r,l,u].filter(Boolean).join(`
|
|
33
|
+
`)),this.write(this.margin[2]),this.restore()}}var Ap=Sp;const Rp=Rt;class xp extends Rp{constructor(e){super(e);if(typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,r){let s=await super.toChoices(e,r);if(s.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>s.length)throw new Error("Please specify the index of the correct answer from the list of choices");return s}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}}var $p=xp;(function(t){const e=Ae,r=(s,n)=>{e.defineExport(t,s,n),e.defineExport(t,s.toLowerCase(),n)};r("AutoComplete",()=>fd),r("BasicAuth",()=>Ed),r("Confirm",()=>xd),r("Editable",()=>Od),r("Form",()=>bn),r("Input",()=>_o),r("Invisible",()=>Gd),r("List",()=>Vd),r("MultiSelect",()=>Kd),r("Numeral",()=>Jd),r("Password",()=>tp),r("Scale",()=>ip),r("Select",()=>Rt),r("Snippet",()=>pp),r("Sort",()=>Dp),r("Survey",()=>_p),r("Text",()=>wp),r("Toggle",()=>Ap),r("Quiz",()=>$p)})(fo);var Tp={ArrayPrompt:Qr,AuthPrompt:vo,BooleanPrompt:En,NumberPrompt:wo,StringPrompt:qt};const Ao=so,wn=gt,yt=Ae;class Dt extends wn{constructor(e,r){super();this.options=yt.merge({},e),this.answers={...r}}register(e,r){if(yt.isObject(e)){for(let n of Object.keys(e))this.register(n,e[n]);return this}Ao.equal(typeof r,"function","expected a function");let s=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[s]=r:this.prompts[s]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(yt.merge({},this.options,r))}catch(s){return Promise.reject(s)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=yt.merge({},this.options,e),{type:s,name:n}=e,{set:i,get:a}=yt;if(typeof s=="function"&&(s=await s.call(this,e,this.answers)),!s)return this.answers[n];Ao(this.prompts[s],`Prompt "${s}" is not registered`);let o=new this.prompts[s](r),u=a(this.answers,n);o.state.answers=this.answers,o.enquirer=this,n&&o.on("submit",f=>{this.emit("answer",n,f,o),i(this.answers,n,f)});let l=o.emit.bind(o);return o.emit=(...f)=>(this.emit.call(this,...f),l(...f)),this.emit("prompt",o,this),r.autofill&&u!=null?(o.value=o.input=u,r.autofill==="show"&&await o.submit()):u=o.value=await o.run(),u}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||fr}static get prompts(){return fo}static get types(){return Tp}static get prompt(){const e=(r,...s)=>{let n=new this(...s),i=n.emit.bind(n);return n.emit=(...a)=>(e.emit(...a),i(...a)),n.prompt(r)};return yt.mixinEmitter(e,new wn),e}}yt.mixinEmitter(Dt,new wn);const Cn=Dt.prompts;for(let t of Object.keys(Cn)){let e=t.toLowerCase(),r=s=>new Cn[t](s).run();Dt.prompt[e]=r,Dt[e]=r,Dt[t]||Reflect.defineProperty(Dt,t,{get:()=>Cn[t]})}const dr=t=>{yt.defineExport(Dt,t,()=>Dt.types[t])};dr("ArrayPrompt"),dr("AuthPrompt"),dr("BooleanPrompt"),dr("NumberPrompt"),dr("StringPrompt");const Ro=Wr;typeof Ro.homedir>"u"||Ro.homedir();var Fp=Op;function zt(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function Op(t){if(t=t||{},t.circles)return Pp(t);return t.proto?s:r;function e(n,i){for(var a=Object.keys(n),o=new Array(a.length),u=0;u<a.length;u++){var l=a[u],f=n[l];typeof f!="object"||f===null?o[l]=f:f instanceof Date?o[l]=new Date(f):ArrayBuffer.isView(f)?o[l]=zt(f):o[l]=i(f)}return o}function r(n){if(typeof n!="object"||n===null)return n;if(n instanceof Date)return new Date(n);if(Array.isArray(n))return e(n,r);if(n instanceof Map)return new Map(e(Array.from(n),r));if(n instanceof Set)return new Set(e(Array.from(n),r));var i={};for(var a in n)if(Object.hasOwnProperty.call(n,a)!==!1){var o=n[a];typeof o!="object"||o===null?i[a]=o:o instanceof Date?i[a]=new Date(o):o instanceof Map?i[a]=new Map(e(Array.from(o),r)):o instanceof Set?i[a]=new Set(e(Array.from(o),r)):ArrayBuffer.isView(o)?i[a]=zt(o):i[a]=r(o)}return i}function s(n){if(typeof n!="object"||n===null)return n;if(n instanceof Date)return new Date(n);if(Array.isArray(n))return e(n,s);if(n instanceof Map)return new Map(e(Array.from(n),s));if(n instanceof Set)return new Set(e(Array.from(n),s));var i={};for(var a in n){var o=n[a];typeof o!="object"||o===null?i[a]=o:o instanceof Date?i[a]=new Date(o):o instanceof Map?i[a]=new Map(e(Array.from(o),s)):o instanceof Set?i[a]=new Set(e(Array.from(o),s)):ArrayBuffer.isView(o)?i[a]=zt(o):i[a]=s(o)}return i}}function Pp(t){var e=[],r=[];return t.proto?i:n;function s(a,o){for(var u=Object.keys(a),l=new Array(u.length),f=0;f<u.length;f++){var d=u[f],c=a[d];if(typeof c!="object"||c===null)l[d]=c;else if(c instanceof Date)l[d]=new Date(c);else if(ArrayBuffer.isView(c))l[d]=zt(c);else{var g=e.indexOf(c);g!==-1?l[d]=r[g]:l[d]=o(c)}}return l}function n(a){if(typeof a!="object"||a===null)return a;if(a instanceof Date)return new Date(a);if(Array.isArray(a))return s(a,n);if(a instanceof Map)return new Map(s(Array.from(a),n));if(a instanceof Set)return new Set(s(Array.from(a),n));var o={};e.push(a),r.push(o);for(var u in a)if(Object.hasOwnProperty.call(a,u)!==!1){var l=a[u];if(typeof l!="object"||l===null)o[u]=l;else if(l instanceof Date)o[u]=new Date(l);else if(l instanceof Map)o[u]=new Map(s(Array.from(l),n));else if(l instanceof Set)o[u]=new Set(s(Array.from(l),n));else if(ArrayBuffer.isView(l))o[u]=zt(l);else{var f=e.indexOf(l);f!==-1?o[u]=r[f]:o[u]=n(l)}}return e.pop(),r.pop(),o}function i(a){if(typeof a!="object"||a===null)return a;if(a instanceof Date)return new Date(a);if(Array.isArray(a))return s(a,i);if(a instanceof Map)return new Map(s(Array.from(a),i));if(a instanceof Set)return new Set(s(Array.from(a),i));var o={};e.push(a),r.push(o);for(var u in a){var l=a[u];if(typeof l!="object"||l===null)o[u]=l;else if(l instanceof Date)o[u]=new Date(l);else if(l instanceof Map)o[u]=new Map(s(Array.from(l),i));else if(l instanceof Set)o[u]=new Set(s(Array.from(l),i));else if(ArrayBuffer.isView(l))o[u]=zt(l);else{var f=e.indexOf(l);f!==-1?o[u]=r[f]:o[u]=i(l)}}return e.pop(),r.pop(),o}}var Zr={exports:{}};const xo=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);Zr.exports=xo,Zr.exports.default=xo;const $o="[\uD800-\uDBFF][\uDC00-\uDFFF]",kp=t=>t&&t.exact?new RegExp(`^${$o}$`):new RegExp($o,"g");var Ip=kp,Sn={exports:{}},Lp={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const pr=Lp,To={};for(const t of Object.keys(pr))To[pr[t]]=t;const L={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var Fo=L;for(const t of Object.keys(L)){if(!("channels"in L[t]))throw new Error("missing channels property: "+t);if(!("labels"in L[t]))throw new Error("missing channel labels property: "+t);if(L[t].labels.length!==L[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:r}=L[t];delete L[t].channels,delete L[t].labels,Object.defineProperty(L[t],"channels",{value:e}),Object.defineProperty(L[t],"labels",{value:r})}L.rgb.hsl=function(t){const e=t[0]/255,r=t[1]/255,s=t[2]/255,n=Math.min(e,r,s),i=Math.max(e,r,s),a=i-n;let o,u;i===n?o=0:e===i?o=(r-s)/a:r===i?o=2+(s-e)/a:s===i&&(o=4+(e-r)/a),o=Math.min(o*60,360),o<0&&(o+=360);const l=(n+i)/2;return i===n?u=0:l<=.5?u=a/(i+n):u=a/(2-i-n),[o,u*100,l*100]},L.rgb.hsv=function(t){let e,r,s,n,i;const a=t[0]/255,o=t[1]/255,u=t[2]/255,l=Math.max(a,o,u),f=l-Math.min(a,o,u),d=function(c){return(l-c)/6/f+1/2};return f===0?(n=0,i=0):(i=f/l,e=d(a),r=d(o),s=d(u),a===l?n=s-r:o===l?n=1/3+e-s:u===l&&(n=2/3+r-e),n<0?n+=1:n>1&&(n-=1)),[n*360,i*100,l*100]},L.rgb.hwb=function(t){const e=t[0],r=t[1];let s=t[2];const n=L.rgb.hsl(t)[0],i=1/255*Math.min(e,Math.min(r,s));return s=1-1/255*Math.max(e,Math.max(r,s)),[n,i*100,s*100]},L.rgb.cmyk=function(t){const e=t[0]/255,r=t[1]/255,s=t[2]/255,n=Math.min(1-e,1-r,1-s),i=(1-e-n)/(1-n)||0,a=(1-r-n)/(1-n)||0,o=(1-s-n)/(1-n)||0;return[i*100,a*100,o*100,n*100]};function Bp(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}L.rgb.keyword=function(t){const e=To[t];if(e)return e;let r=1/0,s;for(const n of Object.keys(pr)){const i=pr[n],a=Bp(t,i);a<r&&(r=a,s=n)}return s},L.keyword.rgb=function(t){return pr[t]},L.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92;const n=e*.4124+r*.3576+s*.1805,i=e*.2126+r*.7152+s*.0722,a=e*.0193+r*.1192+s*.9505;return[n*100,i*100,a*100]},L.rgb.lab=function(t){const e=L.rgb.xyz(t);let r=e[0],s=e[1],n=e[2];r/=95.047,s/=100,n/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;const i=116*s-16,a=500*(r-s),o=200*(s-n);return[i,a,o]},L.hsl.rgb=function(t){const e=t[0]/360,r=t[1]/100,s=t[2]/100;let n,i,a;if(r===0)return a=s*255,[a,a,a];s<.5?n=s*(1+r):n=s+r-s*r;const o=2*s-n,u=[0,0,0];for(let l=0;l<3;l++)i=e+1/3*-(l-1),i<0&&i++,i>1&&i--,6*i<1?a=o+(n-o)*6*i:2*i<1?a=n:3*i<2?a=o+(n-o)*(2/3-i)*6:a=o,u[l]=a*255;return u},L.hsl.hsv=function(t){const e=t[0];let r=t[1]/100,s=t[2]/100,n=r;const i=Math.max(s,.01);s*=2,r*=s<=1?s:2-s,n*=i<=1?i:2-i;const a=(s+r)/2,o=s===0?2*n/(i+n):2*r/(s+r);return[e,o*100,a*100]},L.hsv.rgb=function(t){const e=t[0]/60,r=t[1]/100;let s=t[2]/100;const n=Math.floor(e)%6,i=e-Math.floor(e),a=255*s*(1-r),o=255*s*(1-r*i),u=255*s*(1-r*(1-i));switch(s*=255,n){case 0:return[s,u,a];case 1:return[o,s,a];case 2:return[a,s,u];case 3:return[a,o,s];case 4:return[u,a,s];case 5:return[s,a,o]}},L.hsv.hsl=function(t){const e=t[0],r=t[1]/100,s=t[2]/100,n=Math.max(s,.01);let i,a;a=(2-r)*s;const o=(2-r)*n;return i=r*n,i/=o<=1?o:2-o,i=i||0,a/=2,[e,i*100,a*100]},L.hwb.rgb=function(t){const e=t[0]/360;let r=t[1]/100,s=t[2]/100;const n=r+s;let i;n>1&&(r/=n,s/=n);const a=Math.floor(6*e),o=1-s;i=6*e-a,(a&1)!==0&&(i=1-i);const u=r+i*(o-r);let l,f,d;switch(a){default:case 6:case 0:l=o,f=u,d=r;break;case 1:l=u,f=o,d=r;break;case 2:l=r,f=o,d=u;break;case 3:l=r,f=u,d=o;break;case 4:l=u,f=r,d=o;break;case 5:l=o,f=r,d=u;break}return[l*255,f*255,d*255]},L.cmyk.rgb=function(t){const e=t[0]/100,r=t[1]/100,s=t[2]/100,n=t[3]/100,i=1-Math.min(1,e*(1-n)+n),a=1-Math.min(1,r*(1-n)+n),o=1-Math.min(1,s*(1-n)+n);return[i*255,a*255,o*255]},L.xyz.rgb=function(t){const e=t[0]/100,r=t[1]/100,s=t[2]/100;let n,i,a;return n=e*3.2406+r*-1.5372+s*-.4986,i=e*-.9689+r*1.8758+s*.0415,a=e*.0557+r*-.204+s*1.057,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,n=Math.min(Math.max(0,n),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[n*255,i*255,a*255]},L.xyz.lab=function(t){let e=t[0],r=t[1],s=t[2];e/=95.047,r/=100,s/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;const n=116*r-16,i=500*(e-r),a=200*(r-s);return[n,i,a]},L.lab.xyz=function(t){const e=t[0],r=t[1],s=t[2];let n,i,a;i=(e+16)/116,n=r/500+i,a=i-s/200;const o=i**3,u=n**3,l=a**3;return i=o>.008856?o:(i-16/116)/7.787,n=u>.008856?u:(n-16/116)/7.787,a=l>.008856?l:(a-16/116)/7.787,n*=95.047,i*=100,a*=108.883,[n,i,a]},L.lab.lch=function(t){const e=t[0],r=t[1],s=t[2];let n;n=Math.atan2(s,r)*360/2/Math.PI,n<0&&(n+=360);const a=Math.sqrt(r*r+s*s);return[e,a,n]},L.lch.lab=function(t){const e=t[0],r=t[1],n=t[2]/360*2*Math.PI,i=r*Math.cos(n),a=r*Math.sin(n);return[e,i,a]},L.rgb.ansi16=function(t,e=null){const[r,s,n]=t;let i=e===null?L.rgb.hsv(t)[2]:e;if(i=Math.round(i/50),i===0)return 30;let a=30+(Math.round(n/255)<<2|Math.round(s/255)<<1|Math.round(r/255));return i===2&&(a+=60),a},L.hsv.ansi16=function(t){return L.rgb.ansi16(L.hsv.rgb(t),t[2])},L.rgb.ansi256=function(t){const e=t[0],r=t[1],s=t[2];return e===r&&r===s?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(s/255*5)},L.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const r=(~~(t>50)+1)*.5,s=(e&1)*r*255,n=(e>>1&1)*r*255,i=(e>>2&1)*r*255;return[s,n,i]},L.ansi256.rgb=function(t){if(t>=232){const i=(t-232)*10+8;return[i,i,i]}t-=16;let e;const r=Math.floor(t/36)/5*255,s=Math.floor((e=t%36)/6)/5*255,n=e%6/5*255;return[r,s,n]},L.rgb.hex=function(t){const r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r},L.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(o=>o+o).join(""));const s=parseInt(r,16),n=s>>16&255,i=s>>8&255,a=s&255;return[n,i,a]},L.rgb.hcg=function(t){const e=t[0]/255,r=t[1]/255,s=t[2]/255,n=Math.max(Math.max(e,r),s),i=Math.min(Math.min(e,r),s),a=n-i;let o,u;return a<1?o=i/(1-a):o=0,a<=0?u=0:n===e?u=(r-s)/a%6:n===r?u=2+(s-e)/a:u=4+(e-r)/a,u/=6,u%=1,[u*360,a*100,o*100]},L.hsl.hcg=function(t){const e=t[1]/100,r=t[2]/100,s=r<.5?2*e*r:2*e*(1-r);let n=0;return s<1&&(n=(r-.5*s)/(1-s)),[t[0],s*100,n*100]},L.hsv.hcg=function(t){const e=t[1]/100,r=t[2]/100,s=e*r;let n=0;return s<1&&(n=(r-s)/(1-s)),[t[0],s*100,n*100]},L.hcg.rgb=function(t){const e=t[0]/360,r=t[1]/100,s=t[2]/100;if(r===0)return[s*255,s*255,s*255];const n=[0,0,0],i=e%1*6,a=i%1,o=1-a;let u=0;switch(Math.floor(i)){case 0:n[0]=1,n[1]=a,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=a;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=a,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return u=(1-r)*s,[(r*n[0]+u)*255,(r*n[1]+u)*255,(r*n[2]+u)*255]},L.hcg.hsv=function(t){const e=t[1]/100,r=t[2]/100,s=e+r*(1-e);let n=0;return s>0&&(n=e/s),[t[0],n*100,s*100]},L.hcg.hsl=function(t){const e=t[1]/100,s=t[2]/100*(1-e)+.5*e;let n=0;return s>0&&s<.5?n=e/(2*s):s>=.5&&s<1&&(n=e/(2*(1-s))),[t[0],n*100,s*100]},L.hcg.hwb=function(t){const e=t[1]/100,r=t[2]/100,s=e+r*(1-e);return[t[0],(s-e)*100,(1-s)*100]},L.hwb.hcg=function(t){const e=t[1]/100,r=t[2]/100,s=1-r,n=s-e;let i=0;return n<1&&(i=(s-n)/(1-n)),[t[0],n*100,i*100]},L.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},L.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},L.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},L.gray.hsl=function(t){return[0,0,t[0]]},L.gray.hsv=L.gray.hsl,L.gray.hwb=function(t){return[0,100,t[0]]},L.gray.cmyk=function(t){return[0,0,0,t[0]]},L.gray.lab=function(t){return[t[0],0,0]},L.gray.hex=function(t){const e=Math.round(t[0]/100*255)&255,s=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(s.length)+s},L.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const es=Fo;function Np(){const t={},e=Object.keys(es);for(let r=e.length,s=0;s<r;s++)t[e[s]]={distance:-1,parent:null};return t}function Hp(t){const e=Np(),r=[t];for(e[t].distance=0;r.length;){const s=r.pop(),n=Object.keys(es[s]);for(let i=n.length,a=0;a<i;a++){const o=n[a],u=e[o];u.distance===-1&&(u.distance=e[s].distance+1,u.parent=s,r.unshift(o))}}return e}function jp(t,e){return function(r){return e(t(r))}}function Mp(t,e){const r=[e[t].parent,t];let s=es[e[t].parent][t],n=e[t].parent;for(;e[n].parent;)r.unshift(e[n].parent),s=jp(es[e[n].parent][n],s),n=e[n].parent;return s.conversion=r,s}var Up=function(t){const e=Hp(t),r={},s=Object.keys(e);for(let n=s.length,i=0;i<n;i++){const a=s[i];e[a].parent!==null&&(r[a]=Mp(a,e))}return r};const An=Fo,Gp=Up,Vt={},qp=Object.keys(An);function zp(t){const e=function(...r){const s=r[0];return s==null?s:(s.length>1&&(r=s),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function Vp(t){const e=function(...r){const s=r[0];if(s==null)return s;s.length>1&&(r=s);const n=t(r);if(typeof n=="object")for(let i=n.length,a=0;a<i;a++)n[a]=Math.round(n[a]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}qp.forEach(t=>{Vt[t]={},Object.defineProperty(Vt[t],"channels",{value:An[t].channels}),Object.defineProperty(Vt[t],"labels",{value:An[t].labels});const e=Gp(t);Object.keys(e).forEach(s=>{const n=e[s];Vt[t][s]=Vp(n),Vt[t][s].raw=zp(n)})});var Wp=Vt;(function(t){const e=(f,d)=>(...c)=>`\x1B[${f(...c)+d}m`,r=(f,d)=>(...c)=>{const g=f(...c);return`\x1B[${38+d};5;${g}m`},s=(f,d)=>(...c)=>{const g=f(...c);return`\x1B[${38+d};2;${g[0]};${g[1]};${g[2]}m`},n=f=>f,i=(f,d,c)=>[f,d,c],a=(f,d,c)=>{Object.defineProperty(f,d,{get:()=>{const g=c();return Object.defineProperty(f,d,{value:g,enumerable:!0,configurable:!0}),g},enumerable:!0,configurable:!0})};let o;const u=(f,d,c,g)=>{o===void 0&&(o=Wp);const p=g?10:0,D={};for(const[_,b]of Object.entries(o)){const C=_==="ansi16"?"ansi":_;_===d?D[C]=f(c,p):typeof b=="object"&&(D[C]=f(b[d],p))}return D};function l(){const f=new Map,d={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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],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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};d.color.gray=d.color.blackBright,d.bgColor.bgGray=d.bgColor.bgBlackBright,d.color.grey=d.color.blackBright,d.bgColor.bgGrey=d.bgColor.bgBlackBright;for(const[c,g]of Object.entries(d)){for(const[p,D]of Object.entries(g))d[p]={open:`\x1B[${D[0]}m`,close:`\x1B[${D[1]}m`},g[p]=d[p],f.set(D[0],D[1]);Object.defineProperty(d,c,{value:g,enumerable:!1})}return Object.defineProperty(d,"codes",{value:f,enumerable:!1}),d.color.close="\x1B[39m",d.bgColor.close="\x1B[49m",a(d.color,"ansi",()=>u(e,"ansi16",n,!1)),a(d.color,"ansi256",()=>u(r,"ansi256",n,!1)),a(d.color,"ansi16m",()=>u(s,"rgb",i,!1)),a(d.bgColor,"ansi",()=>u(e,"ansi16",n,!0)),a(d.bgColor,"ansi256",()=>u(r,"ansi256",n,!0)),a(d.bgColor,"ansi16m",()=>u(s,"rgb",i,!0)),d}Object.defineProperty(t,"exports",{enumerable:!0,get:l})})(Sn);const Xp=Zr.exports,Kp=Ip,Oo=Sn.exports,Po=["\x1B","\x9B"],ts=t=>`${Po[0]}[${t}m`,ko=(t,e,r)=>{let s=[];t=[...t];for(let n of t){const i=n;n.match(";")&&(n=n.split(";")[0][0]+"0");const a=Oo.codes.get(parseInt(n,10));if(a){const o=t.indexOf(a.toString());o>=0?t.splice(o,1):s.push(ts(e?a:i))}else if(e){s.push(ts(0));break}else s.push(ts(i))}if(e&&(s=s.filter((n,i)=>s.indexOf(n)===i),r!==void 0)){const n=ts(Oo.codes.get(parseInt(r,10)));s=s.reduce((i,a)=>a===n?[a,...i]:[...i,a],[])}return s.join("")};var Yp=(t,e,r)=>{const s=[...t.normalize()],n=[];r=typeof r=="number"?r:s.length;let i=!1,a,o=0,u="";for(const[l,f]of s.entries()){let d=!1;if(Po.includes(f)){const c=/\d[^m]*/.exec(t.slice(l,l+18));a=c&&c.length>0?c[0]:void 0,o<r&&(i=!0,a!==void 0&&n.push(a))}else i&&f==="m"&&(i=!1,d=!0);if(!i&&!d&&++o,!Kp({exact:!0}).test(f)&&Xp(f.codePointAt())&&++o,o>e&&o<=r)u+=f;else if(o===e&&!i&&a!==void 0)u=ko(n);else if(o>=r){u+=ko(n,!0,a);break}}return u},Rn={exports:{}},Qp=({onlyFirst:t=!1}={})=>{const 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")};const Jp=Qp;var Io=t=>typeof t=="string"?t.replace(Jp(),""):t,Zp=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};const em=Io,tm=Zr.exports,rm=Zp,Lo=t=>{if(typeof t!="string"||t.length===0||(t=em(t),t.length===0))return 0;t=t.replace(rm()," ");let e=0;for(let r=0;r<t.length;r++){const s=t.codePointAt(r);s<=31||s>=127&&s<=159||s>=768&&s<=879||(s>65535&&r++,e+=tm(s)?2:1)}return e};Rn.exports=Lo,Rn.exports.default=Lo;var xn={exports:{}},Bo={exports:{}};(function(t){const e=t.exports;t.exports.default=e;const r="\x1B[",s="\x1B]",n="\x07",i=";",a=process.env.TERM_PROGRAM==="Apple_Terminal";e.cursorTo=(o,u)=>{if(typeof o!="number")throw new TypeError("The `x` argument is required");return typeof u!="number"?r+(o+1)+"G":r+(u+1)+";"+(o+1)+"H"},e.cursorMove=(o,u)=>{if(typeof o!="number")throw new TypeError("The `x` argument is required");let l="";return o<0?l+=r+-o+"D":o>0&&(l+=r+o+"C"),u<0?l+=r+-u+"A":u>0&&(l+=r+u+"B"),l},e.cursorUp=(o=1)=>r+o+"A",e.cursorDown=(o=1)=>r+o+"B",e.cursorForward=(o=1)=>r+o+"C",e.cursorBackward=(o=1)=>r+o+"D",e.cursorLeft=r+"G",e.cursorSavePosition=a?"\x1B7":r+"s",e.cursorRestorePosition=a?"\x1B8":r+"u",e.cursorGetPosition=r+"6n",e.cursorNextLine=r+"E",e.cursorPrevLine=r+"F",e.cursorHide=r+"?25l",e.cursorShow=r+"?25h",e.eraseLines=o=>{let u="";for(let l=0;l<o;l++)u+=e.eraseLine+(l<o-1?e.cursorUp():"");return o&&(u+=e.cursorLeft),u},e.eraseEndLine=r+"K",e.eraseStartLine=r+"1K",e.eraseLine=r+"2K",e.eraseDown=r+"J",e.eraseUp=r+"1J",e.eraseScreen=r+"2J",e.scrollUp=r+"S",e.scrollDown=r+"T",e.clearScreen="\x1Bc",e.clearTerminal=process.platform==="win32"?`${e.eraseScreen}${r}0f`:`${e.eraseScreen}${r}3J${r}H`,e.beep=n,e.link=(o,u)=>[s,"8",i,i,u,n,o,s,"8",i,i,n].join(""),e.image=(o,u={})=>{let l=`${s}1337;File=inline=1`;return u.width&&(l+=`;width=${u.width}`),u.height&&(l+=`;height=${u.height}`),u.preserveAspectRatio===!1&&(l+=";preserveAspectRatio=0"),l+":"+o.toString("base64")+n},e.iTerm={setCwd:(o=process.cwd())=>`${s}50;CurrentDir=${o}${n}`,annotation:(o,u={})=>{let l=`${s}1337;`;const f=typeof u.x<"u",d=typeof u.y<"u";if((f||d)&&!(f&&d&&typeof u.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return o=o.replace(/\|/g,""),l+=u.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",u.length>0?l+=(f?[o,u.length,u.x,u.y]:[u.length,o]).join("|"):l+=o,l+n}}})(Bo);var No={},rs={exports:{}},$n={exports:{}};const Ho=(t,e)=>{for(const r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};$n.exports=Ho,$n.exports.default=Ho;const sm=$n.exports,ss=new WeakMap,jo=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,s=0;const n=t.displayName||t.name||"<anonymous>",i=function(...a){if(ss.set(i,++s),s===1)r=t.apply(this,a),t=null;else if(e.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return r};return sm(i,t),ss.set(i,s),i};rs.exports=jo,rs.exports.default=jo,rs.exports.callCount=t=>{if(!ss.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return ss.get(t)};var Wt={exports:{}},Mo={exports:{}};(function(t){t.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&t.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&t.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")})(Mo);var ue=ie.process;const xt=function(t){return 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"};if(!xt(ue))Wt.exports=function(){return function(){}};else{var nm=so,mr=Mo.exports,im=/^win/i.test(ue.platform),ns=gt;typeof ns!="function"&&(ns=ns.EventEmitter);var we;ue.__signal_exit_emitter__?we=ue.__signal_exit_emitter__:(we=ue.__signal_exit_emitter__=new ns,we.count=0,we.emitted={}),we.infinite||(we.setMaxListeners(1/0),we.infinite=!0),Wt.exports=function(t,e){if(!xt(ie.process))return function(){};nm.equal(typeof t,"function","a callback must be provided for exit handler"),gr===!1&&Uo();var r="exit";e&&e.alwaysLast&&(r="afterexit");var s=function(){we.removeListener(r,t),we.listeners("exit").length===0&&we.listeners("afterexit").length===0&&Tn()};return we.on(r,t),s};var Tn=function(){!gr||!xt(ie.process)||(gr=!1,mr.forEach(function(e){try{ue.removeListener(e,Fn[e])}catch{}}),ue.emit=On,ue.reallyExit=Go,we.count-=1)};Wt.exports.unload=Tn;var Xt=function(e,r,s){we.emitted[e]||(we.emitted[e]=!0,we.emit(e,r,s))},Fn={};mr.forEach(function(t){Fn[t]=function(){if(!!xt(ie.process)){var r=ue.listeners(t);r.length===we.count&&(Tn(),Xt("exit",null,t),Xt("afterexit",null,t),im&&t==="SIGHUP"&&(t="SIGINT"),ue.kill(ue.pid,t))}}}),Wt.exports.signals=function(){return mr};var gr=!1,Uo=function(){gr||!xt(ie.process)||(gr=!0,we.count+=1,mr=mr.filter(function(e){try{return ue.on(e,Fn[e]),!0}catch{return!1}}),ue.emit=om,ue.reallyExit=am)};Wt.exports.load=Uo;var Go=ue.reallyExit,am=function(e){!xt(ie.process)||(ue.exitCode=e||0,Xt("exit",ue.exitCode,null),Xt("afterexit",ue.exitCode,null),Go.call(ue,ue.exitCode))},On=ue.emit,om=function(e,r){if(e==="exit"&&xt(ie.process)){r!==void 0&&(ue.exitCode=r);var s=On.apply(this,arguments);return Xt("exit",ue.exitCode,null),Xt("afterexit",ue.exitCode,null),s}else return On.apply(this,arguments)}}const um=rs.exports,lm=Wt.exports;var cm=um(()=>{lm(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})});(function(t){const e=cm;let r=!1;t.show=(s=process.stderr)=>{!s.isTTY||(r=!1,s.write("\x1B[?25h"))},t.hide=(s=process.stderr)=>{!s.isTTY||(e(),r=!0,s.write("\x1B[?25l"))},t.toggle=(s,n)=>{s!==void 0&&(r=s),r?t.show(n):t.hide(n)}})(No);const yr=Rn.exports,hm=Io,fm=Sn.exports,Pn=new Set(["\x1B","\x9B"]),dm=39,qo=t=>`${Pn.values().next().value}[${t}m`,pm=t=>t.split(" ").map(e=>yr(e)),kn=(t,e,r)=>{const s=[...e];let n=!1,i=yr(hm(t[t.length-1]));for(const[a,o]of s.entries()){const u=yr(o);if(i+u<=r?t[t.length-1]+=o:(t.push(o),i=0),Pn.has(o))n=!0;else if(n&&o==="m"){n=!1;continue}n||(i+=u,i===r&&a<s.length-1&&(t.push(""),i=0))}!i&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},mm=t=>{const e=t.split(" ");let r=e.length;for(;r>0&&!(yr(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},gm=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let s="",n="",i;const a=pm(t);let o=[""];for(const[u,l]of t.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o[o.length-1].trimLeft());let f=yr(o[o.length-1]);if(u!==0&&(f>=e&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),f=0),(f>0||r.trim===!1)&&(o[o.length-1]+=" ",f++)),r.hard&&a[u]>e){const d=e-f,c=1+Math.floor((a[u]-d-1)/e);Math.floor((a[u]-1)/e)<c&&o.push(""),kn(o,l,e);continue}if(f+a[u]>e&&f>0&&a[u]>0){if(r.wordWrap===!1&&f<e){kn(o,l,e);continue}o.push("")}if(f+a[u]>e&&r.wordWrap===!1){kn(o,l,e);continue}o[o.length-1]+=l}r.trim!==!1&&(o=o.map(mm)),s=o.join(`
|
|
34
|
+
`);for(const[u,l]of[...s].entries()){if(n+=l,Pn.has(l)){const d=parseFloat(/\d[^m]*/.exec(s.slice(u,u+4)));i=d===dm?null:d}const f=fm.codes.get(Number(i));i&&f&&(s[u+1]===`
|
|
35
|
+
`?n+=qo(f):l===`
|
|
36
|
+
`&&(n+=qo(i)))}return n};var ym=(t,e,r)=>String(t).normalize().replace(/\r\n/g,`
|
|
37
|
+
`).split(`
|
|
38
|
+
`).map(s=>gm(s,e,r)).join(`
|
|
39
|
+
`);const zo=Bo.exports,Vo=No,Dm=ym,vm=Yp,bm=24,is=t=>{const{columns:e}=t;return e||80},Em=(t,e)=>{const r=t.rows||bm,s=e.split(`
|
|
40
|
+
`),n=s.length-r;return n<=0?e:vm(e,s.slice(0,n).join(`
|
|
41
|
+
`).length+1,e.length)},In=(t,{showCursor:e=!1}={})=>{let r=0,s=is(t),n="";const i=(...a)=>{e||Vo.hide();let o=a.join(" ")+`
|
|
42
|
+
`;o=Em(t,o);const u=is(t);o===n&&s===u||(n=o,s=u,o=Dm(o,u,{trim:!1,hard:!0,wordWrap:!1}),t.write(zo.eraseLines(r)+o),r=o.split(`
|
|
43
|
+
`).length)};return i.clear=()=>{t.write(zo.eraseLines(r)),n="",s=is(t),r=0},i.done=()=>{n="",s=is(t),r=0,e||Vo.show()},i};xn.exports=In(process.stdout),xn.exports.stderr=In(process.stderr),xn.exports.create=In;const vt=process.env||{},Wo=process.argv||[],_m="NO_COLOR"in vt||Wo.includes("--no-color"),wm="FORCE_COLOR"in vt||Wo.includes("--color"),Cm=process.platform==="win32",Sm=on&&on.isatty&&on.isatty(1)&&vt.TERM&&vt.TERM!=="dumb",Am="CI"in vt&&("GITHUB_ACTIONS"in vt||"GITLAB_CI"in vt||"CIRCLECI"in vt),Rm=!_m&&(wm||Cm||Sm||Am),Xo=(t,e,r,s,n=e.substring(0,t)+s,i=e.substring(t+r.length),a=i.indexOf(r))=>n+(a<0?i:Xo(a,i,r,s)),xm=(t,e,r,s,n)=>t<0?r+e+s:r+Xo(t,e,s,n)+s,$m=(t,e,r=t,s=t.length+1)=>n=>n||!(n===""||n===void 0)?xm((""+n).indexOf(e,s),n,t,e,r):"",W=(t,e,r)=>$m(`\x1B[${t}m`,`\x1B[${e}m`,r),Ko={reset:W(0,0),bold:W(1,22,"\x1B[22m\x1B[1m"),dim:W(2,22,"\x1B[22m\x1B[2m"),italic:W(3,23),underline:W(4,24),inverse:W(7,27),hidden:W(8,28),strikethrough:W(9,29),black:W(30,39),red:W(31,39),green:W(32,39),yellow:W(33,39),blue:W(34,39),magenta:W(35,39),cyan:W(36,39),white:W(37,39),gray:W(90,39),bgBlack:W(40,49),bgRed:W(41,49),bgGreen:W(42,49),bgYellow:W(43,49),bgBlue:W(44,49),bgMagenta:W(45,49),bgCyan:W(46,49),bgWhite:W(47,49),blackBright:W(90,39),redBright:W(91,39),greenBright:W(92,39),yellowBright:W(93,39),blueBright:W(94,39),magentaBright:W(95,39),cyanBright:W(96,39),whiteBright:W(97,39),bgBlackBright:W(100,49),bgRedBright:W(101,49),bgGreenBright:W(102,49),bgYellowBright:W(103,49),bgBlueBright:W(104,49),bgMagentaBright:W(105,49),bgCyanBright:W(106,49),bgWhiteBright:W(107,49)},Tm=t=>t,Yo=({useColor:t=Rm}={})=>t?Ko:Object.keys(Ko).reduce((e,r)=>({...e,[r]:Tm}),{});Yo();var Fm={exports:{}};(function(t,e){var r=Be;t.exports=s,s.through=s;function s(n,i,a){n=n||function(p){this.queue(p)},i=i||function(){this.queue(null)};var o=!1,u=!1,l=[],f=!1,d=new r;d.readable=d.writable=!0,d.paused=!1,d.autoDestroy=!(a&&a.autoDestroy===!1),d.write=function(p){return n.call(this,p),!d.paused};function c(){for(;l.length&&!d.paused;){var p=l.shift();if(p===null)return d.emit("end");d.emit("data",p)}}d.queue=d.push=function(p){return f||(p===null&&(f=!0),l.push(p),c()),d},d.on("end",function(){d.readable=!1,!d.writable&&d.autoDestroy&&process.nextTick(function(){d.destroy()})});function g(){d.writable=!1,i.call(d),!d.readable&&d.autoDestroy&&d.destroy()}return d.end=function(p){if(!o)return o=!0,arguments.length&&d.write(p),g(),d},d.destroy=function(){if(!u)return u=!0,o=!0,l.length=0,d.writable=d.readable=!1,d.emit("close"),d},d.pause=function(){if(!d.paused)return d.paused=!0,d},d.resume=function(){return d.paused&&(d.paused=!1,d.emit("resume")),c(),d.paused||d.emit("drain"),d},d}})(Fm);var Om=Object.defineProperty,Pm=Object.defineProperties,km=Object.getOwnPropertyDescriptors,Qo=Object.getOwnPropertySymbols,Im=Object.prototype.hasOwnProperty,Lm=Object.prototype.propertyIsEnumerable,Jo=(t,e,r)=>e in t?Om(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Bm=(t,e)=>{for(var r in e||(e={}))Im.call(e,r)&&Jo(t,r,e[r]);if(Qo)for(var r of Qo(e))Lm.call(e,r)&&Jo(t,r,e[r]);return t},Nm=(t,e)=>Pm(t,km(e));Fp({circles:!0});var Zo;Yo({useColor:((Zo=process.env)==null?void 0:Zo.LISTR_DISABLE_COLOR)!=="1"});function Hm(){return process.platform!=="win32"?!0:Boolean(process.env.CI)||Boolean(process.env.WT_SESSION)||process.env.TERM_PROGRAM==="vscode"||process.env.TERM==="xterm-256color"||process.env.TERM==="alacritty"}var eu={warning:"\u26A0",cross:"\u2716",arrowDown:"\u2193",tick:"\u2714",arrowRight:"\u2192",pointer:"\u276F",checkboxOn:"\u2612",arrowLeft:"\u2190",squareSmallFilled:"\u25FC",pointerSmall:"\u203A"},jm=Nm(Bm({},eu),{warning:"\u203C",cross:"\xD7",tick:"\u221A",pointer:">",checkboxOn:"[\xD7]",squareSmallFilled:"\u25A0"});Hm();function Mm(t){return Promise.resolve(t)}var Dr={exports:{}},Um=su;su.sync=qm;var tu=lt;function Gm(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var s=0;s<r.length;s++){var n=r[s].toLowerCase();if(n&&t.substr(-n.length).toLowerCase()===n)return!0}return!1}function ru(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:Gm(e,r)}function su(t,e,r){tu.stat(t,function(s,n){r(s,s?!1:ru(n,t,e))})}function qm(t,e){return ru(tu.statSync(t),t,e)}var zm=iu;iu.sync=Vm;var nu=lt;function iu(t,e,r){nu.stat(t,function(s,n){r(s,s?!1:au(n,e))})}function Vm(t,e){return au(nu.statSync(t),e)}function au(t,e){return t.isFile()&&Wm(t,e)}function Wm(t,e){var r=t.mode,s=t.uid,n=t.gid,i=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),a=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),o=parseInt("100",8),u=parseInt("010",8),l=parseInt("001",8),f=o|u,d=r&l||r&u&&n===a||r&o&&s===i||r&f&&i===0;return d}var as;process.platform==="win32"||ie.TESTING_WINDOWS?as=Um:as=zm;var Xm=Ln;Ln.sync=Km;function Ln(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(s,n){Ln(t,e||{},function(i,a){i?n(i):s(a)})})}as(t,e||{},function(s,n){s&&(s.code==="EACCES"||e&&e.ignoreErrors)&&(s=null,n=!1),r(s,n)})}function Km(t,e){try{return as.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}var Ym=hu;hu.sync=Jm;var Bn=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",ou=Oe,Qm=Bn?";":":",uu=Xm;function lu(t){var e=new Error("not found: "+t);return e.code="ENOENT",e}function cu(t,e){var r=e.colon||Qm,s=e.path||process.env.PATH||"",n=[""];s=s.split(r);var i="";return Bn&&(s.unshift(process.cwd()),i=e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM",n=i.split(r),t.indexOf(".")!==-1&&n[0]!==""&&n.unshift("")),(t.match(/\//)||Bn&&t.match(/\\/))&&(s=[""]),{env:s,ext:n,extExe:i}}function hu(t,e,r){typeof e=="function"&&(r=e,e={});var s=cu(t,e),n=s.env,i=s.ext,a=s.extExe,o=[];(function u(l,f){if(l===f)return e.all&&o.length?r(null,o):r(lu(t));var d=n[l];d.charAt(0)==='"'&&d.slice(-1)==='"'&&(d=d.slice(1,-1));var c=ou.join(d,t);!d&&/^\.[\\\/]/.test(t)&&(c=t.slice(0,2)+c),function g(p,D){if(p===D)return u(l+1,f);var _=i[p];uu(c+_,{pathExt:a},function(b,C){if(!b&&C)if(e.all)o.push(c+_);else return r(null,c+_);return g(p+1,D)})}(0,i.length)})(0,n.length)}function Jm(t,e){e=e||{};for(var r=cu(t,e),s=r.env,n=r.ext,i=r.extExe,a=[],o=0,u=s.length;o<u;o++){var l=s[o];l.charAt(0)==='"'&&l.slice(-1)==='"'&&(l=l.slice(1,-1));var f=ou.join(l,t);!l&&/^\.[\\\/]/.test(t)&&(f=t.slice(0,2)+f);for(var d=0,c=n.length;d<c;d++){var g=f+n[d],p;try{if(p=uu.sync(g,{pathExt:i}),p)if(e.all)a.push(g);else return g}catch{}}}if(e.all&&a.length)return a;if(e.nothrow)return null;throw lu(t)}function Zm(t={}){const{env:e=process.env,platform:r=process.platform}=t;return r!=="win32"?"PATH":Object.keys(e).reverse().find(s=>s.toUpperCase()==="PATH")||"Path"}var eg=Object.freeze({__proto__:null,default:Zm}),tg=_f(eg);const fu=Oe,rg=Ym,sg=tg;function du(t,e){const r=t.options.env||process.env,s=process.cwd(),n=t.options.cwd!=null,i=n&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(t.options.cwd)}catch{}let a;try{a=rg.sync(t.command,{path:r[sg({env:r})],pathExt:e?fu.delimiter:void 0})}catch{}finally{i&&process.chdir(s)}return a&&(a=fu.resolve(n?t.options.cwd:"",a)),a}function ng(t){return du(t)||du(t,!0)}var ig=ng,Nn={};const Hn=/([()\][%!^"`<>&|;, *?])/g;function ag(t){return t=t.replace(Hn,"^$1"),t}function og(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(Hn,"^$1"),e&&(t=t.replace(Hn,"^$1")),t}Nn.command=ag,Nn.argument=og;var ug=/^#!.*/,lg=ug,cg=function(t){var e=t.match(lg);if(!e)return null;var r=e[0].replace(/#! ?/,"").split(" "),s=r[0].split("/").pop(),n=r[1];return s==="env"?n:s+(n?" "+n:"")};const jn=lt,hg=cg;function fg(t){const e=150,r=Buffer.alloc(e);let s;try{s=jn.openSync(t,"r"),jn.readSync(s,r,0,e,0),jn.closeSync(s)}catch{}return hg(r.toString())}var dg=fg;const pg=Oe,pu=ig,mu=Nn,mg=dg,gg=process.platform==="win32",yg=/\.(?:com|exe)$/i,Dg=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function vg(t){t.file=pu(t);const e=t.file&&mg(t.file);return e?(t.args.unshift(t.file),t.command=e,pu(t)):t.file}function bg(t){if(!gg)return t;const e=vg(t),r=!yg.test(e);if(t.options.forceShell||r){const s=Dg.test(e);t.command=pg.normalize(t.command),t.command=mu.command(t.command),t.args=t.args.map(i=>mu.argument(i,s));const n=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${n}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function Eg(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);const s={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?s:bg(s)}var _g=Eg;const Mn=process.platform==="win32";function Un(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function wg(t,e){if(!Mn)return;const r=t.emit;t.emit=function(s,n){if(s==="exit"){const i=gu(n,e);if(i)return r.call(t,"error",i)}return r.apply(t,arguments)}}function gu(t,e){return Mn&&t===1&&!e.file?Un(e.original,"spawn"):null}function Cg(t,e){return Mn&&t===1&&!e.file?Un(e.original,"spawnSync"):null}var Sg={hookChildProcess:wg,verifyENOENT:gu,verifyENOENTSync:Cg,notFoundError:Un};const yu=ff,Gn=_g,qn=Sg;function Du(t,e,r){const s=Gn(t,e,r),n=yu.spawn(s.command,s.args,s.options);return qn.hookChildProcess(n,s),n}function Ag(t,e,r){const s=Gn(t,e,r),n=yu.spawnSync(s.command,s.args,s.options);return n.error=n.error||qn.verifyENOENTSync(n.status,s),n}Dr.exports=Du,Dr.exports.spawn=Du,Dr.exports.sync=Ag,Dr.exports._parse=Gn,Dr.exports._enoent=qn;const Rg=function(){const t=bu-vu+1;return Array.from({length:t},xg)},xg=function(t,e){return{name:`SIGRT${e+1}`,number:vu+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},vu=34,bu=64,$g=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],Eu=function(){const t=Rg();return[...$g,...t].map(Tg)},Tg=function({name:t,number:e,description:r,action:s,forced:n=!1,standard:i}){const{signals:{[t]:a}}=no,o=a!==void 0;return{name:t,number:o?a:e,description:r,supported:o,action:s,forced:n,standard:i}},Fg=function(){return Eu().reduce(Og,{})},Og=function(t,{name:e,number:r,description:s,supported:n,action:i,forced:a,standard:o}){return{...t,[e]:{name:e,number:r,description:s,supported:n,action:i,forced:a,standard:o}}};Fg();const Pg=function(){const t=Eu(),e=bu+1,r=Array.from({length:e},(s,n)=>kg(n,t));return Object.assign({},...r)},kg=function(t,e){const r=Ig(t,e);if(r===void 0)return{};const{name:s,description:n,supported:i,action:a,forced:o,standard:u}=r;return{[t]:{name:s,number:t,description:n,supported:i,action:a,forced:o,standard:u}}},Ig=function(t,e){const r=e.find(({name:s})=>no.signals[s]===t);return r!==void 0?r:e.find(s=>s.number===t)};Pg();var vr={exports:{}};const{PassThrough:Lg}=Be;var Bg=t=>{t={...t};const{array:e}=t;let{encoding:r}=t;const s=r==="buffer";let n=!1;e?n=!(r||s):r=r||"utf8",s&&(r=null);const i=new Lg({objectMode:n});r&&i.setEncoding(r);let a=0;const o=[];return i.on("data",u=>{o.push(u),n?a=o.length:a+=u.length}),i.getBufferedValue=()=>e?o:s?Buffer.concat(o,a):o.join(""),i.getBufferedLength=()=>a,i};const{constants:Ng}=vf,Hg=Be,{promisify:jg}=St,Mg=Bg,Ug=jg(Hg.pipeline);class _u extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}async function zn(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};const{maxBuffer:r}=e,s=Mg(e);return await new Promise((n,i)=>{const a=o=>{o&&s.getBufferedLength()<=Ng.MAX_LENGTH&&(o.bufferedData=s.getBufferedValue()),i(o)};(async()=>{try{await Ug(t,s),n()}catch(o){a(o)}})(),s.on("data",()=>{s.getBufferedLength()>r&&a(new _u)})}),s.getBufferedValue()}vr.exports=zn,vr.exports.buffer=(t,e)=>zn(t,{...e,encoding:"buffer"}),vr.exports.array=(t,e)=>zn(t,{...e,array:!0}),vr.exports.MaxBufferError=_u;const Gg=(async()=>{})().constructor.prototype;["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(Gg,t)]);/*! *****************************************************************************
|
|
44
|
+
Copyright (c) Microsoft Corporation.
|
|
45
|
+
|
|
46
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
47
|
+
purpose with or without fee is hereby granted.
|
|
48
|
+
|
|
49
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
50
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
51
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
52
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
53
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
54
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
55
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
56
|
+
***************************************************************************** */var Vn=function(t,e){return Vn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(r[n]=s[n])},Vn(t,e)};function Z(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Vn(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function qg(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(f){try{l(s.next(f))}catch(d){a(d)}}function u(f){try{l(s.throw(f))}catch(d){a(d)}}function l(f){f.done?i(f.value):n(f.value).then(o,u)}l((s=s.apply(t,e||[])).next())})}function rt(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,n,i,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(l){return function(f){return u([l,f])}}function u(l){if(s)throw new TypeError("Generator is already executing.");for(;r;)try{if(s=1,n&&(i=l[0]&2?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,n=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1],i=l;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(l);break}i[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(f){l=[6,f],n=0}finally{s=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function $t(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],s=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function bt(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var s=r.call(t),n,i=[],a;try{for(;(e===void 0||e-- >0)&&!(n=s.next()).done;)i.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(a)throw a.error}}return i}function br(t,e,r){if(r||arguments.length===2)for(var s=0,n=e.length,i;s<n;s++)(i||!(s in e))&&(i||(i=Array.prototype.slice.call(e,0,s)),i[s]=e[s]);return t.concat(i||Array.prototype.slice.call(e))}var Er=function(){function t(){}return t.prototype.valueOf=function(){},t.prototype.liquidMethodMissing=function(e){},t}(),zg=Object.prototype.toString;function wu(t){return typeof t=="string"}function Wn(t){return typeof t=="function"}function Cu(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new Promise(function(s,n){t.apply(void 0,br(br([],bt(e),!1),[function(i,a){i?n(i):s(a)}],!1))})}}function Xn(t){return t instanceof Er?t.valueOf():t}function Su(t){return t==null}function Au(t){return zg.call(t)==="[object Array]"}function Vg(t){return t[t.length-1]}function Wg(t){var e=typeof t;return t!==null&&(e==="object"||e==="function")}function Ru(t,e,r){r===void 0&&(r=1);for(var s=[],n=t;n<e;n+=r)s.push(n);return s}function Xg(t,e,r){return r===void 0&&(r=" "),Kg(t,e,r,function(s,n){return n+s})}function Kg(t,e,r,s){t=String(t);for(var n=e-t.length;n-- >0;)t=s(t,r);return t}function Yg(t){return t}function Qg(t,e){return t.length>e?t.substr(0,e-3)+"...":t}var Jg=Cu(Df),Zg=Cu(yf);function ey(t){return qg(this,void 0,void 0,function(){return rt(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,Jg(t)];case 1:return e.sent(),[2,!0];case 2:return e.sent(),[2,!1];case 3:return[2]}})})}function ty(t){return Zg(t,"utf8")}function ry(t){try{return mf(t),!0}catch{return!1}}function sy(t){return gf(t,"utf8")}function ny(t,e,r){return df(e)||(e+=r),io(t,e)}function iy(t){try{return require.resolve(t)}catch{}}function ay(t){return pf(t)}function oy(t,e){return t=io(t),t=t.endsWith(un)?t:t+un,e.startsWith(t)}var uy=Object.freeze({__proto__:null,exists:ey,readFile:ty,existsSync:ry,readFileSync:sy,resolve:ny,fallback:iy,dirname:ay,contains:oy,sep:un});function qe(t){return t&&Wn(t.equals)}function os(t,e){return!ly(t,e)}function ly(t,e){return e.opts.jsTruthy?!t:t===!1||t===void 0||t===null}var xu={"==":function(t,e){return qe(t)?t.equals(e):qe(e)?e.equals(t):t===e},"!=":function(t,e){return qe(t)?!t.equals(e):qe(e)?!e.equals(t):t!==e},">":function(t,e){return qe(t)?t.gt(e):qe(e)?e.lt(t):t>e},"<":function(t,e){return qe(t)?t.lt(e):qe(e)?e.gt(t):t<e},">=":function(t,e){return qe(t)?t.geq(e):qe(e)?e.leq(t):t>=e},"<=":function(t,e){return qe(t)?t.leq(e):qe(e)?e.geq(t):t<=e},contains:function(t,e){return t&&Wn(t.indexOf)?t.indexOf(e)>-1:!1},and:function(t,e,r){return os(t,r)&&os(e,r)},or:function(t,e,r){return os(t,r)||os(e,r)}},ne=[0,0,0,0,0,0,0,0,0,20,4,4,4,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,8,0,0,0,0,8,0,0,0,64,0,65,0,0,33,33,33,33,33,33,33,33,33,33,0,0,2,2,2,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Kn=1,us=4,$u=8,Tu=16,cy=32,hy=64;ne[160]=ne[5760]=ne[6158]=ne[8192]=ne[8193]=ne[8194]=ne[8195]=ne[8196]=ne[8197]=ne[8198]=ne[8199]=ne[8200]=ne[8201]=ne[8202]=ne[8232]=ne[8233]=ne[8239]=ne[8287]=ne[12288]=us;function fy(t){var e,r,s={};try{for(var n=$t(Object.entries(t)),i=n.next();!i.done;i=n.next()){for(var a=bt(i.value,2),o=a[0],u=a[1],l=s,f=0;f<o.length;f++){var d=o[f];l[d]=l[d]||{},f===o.length-1&&ne[o.charCodeAt(f)]&Kn&&(l[d].needBoundary=!0),l=l[d]}l.handler=u,l.end=!0}}catch(c){e={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return s}var ls={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,cache:void 0,extname:"",fs:uy,dynamicPartials:!0,jsTruthy:!1,trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,ownPropertyOnly:!1,lenientIf:!1,globals:{},keepOutputType:!1,operators:xu,operatorsTrie:fy(xu)},cs=function(t){Z(e,t);function e(r,s){var n=t.call(this,r.message)||this;return n.originalError=r,n.token=s,n.context="",n}return e.prototype.update=function(){var r=this.originalError;this.context=my(this.token),this.message=gy(r.message,this.token),this.stack=this.message+`
|
|
57
|
+
`+this.context+`
|
|
58
|
+
`+this.stack+`
|
|
59
|
+
From `+r.stack},e}(Error),Yn=function(t){Z(e,t);function e(r,s){var n=t.call(this,new Error(r),s)||this;return n.name="TokenizationError",t.prototype.update.call(n),n}return e}(cs);(function(t){Z(e,t);function e(r,s){var n=t.call(this,r,s)||this;return n.name="ParseError",n.message=r.message,t.prototype.update.call(n),n}return e})(cs),function(t){Z(e,t);function e(r,s){var n=t.call(this,r,s.token)||this;return n.name="RenderError",n.message=r.message,t.prototype.update.call(n),n}return e.is=function(r){return r.name==="RenderError"},e}(cs);var dy=function(t){Z(e,t);function e(r,s){var n=t.call(this,r,s)||this;return n.name="UndefinedVariableError",n.message=r.message,t.prototype.update.call(n),n}return e}(cs);(function(t){Z(e,t);function e(r){var s=t.call(this,"undefined variable: ".concat(r))||this;return s.name="InternalUndefinedVariableError",s.variableName=r,s}return e})(Error);var py=function(t){Z(e,t);function e(r){var s=t.call(this,r)||this;return s.name="AssertionError",s.message=r+"",s}return e}(Error);function my(t){var e=bt(t.getPosition(),1),r=e[0],s=t.input.split(`
|
|
60
|
+
`),n=Math.max(r-2,1),i=Math.min(r+3,s.length),a=Ru(n,i+1).map(function(o){var u=o===r?">> ":" ",l=Xg(String(o),String(i).length),f=s[o-1];return"".concat(u).concat(l,"| ").concat(f)}).join(`
|
|
61
|
+
`);return a}function gy(t,e){e.file&&(t+=", file:".concat(e.file));var r=bt(e.getPosition(),2),s=r[0],n=r[1];return t+=", line:".concat(s,", col:").concat(n),t}function Qn(t,e){if(!t){var r=typeof e=="function"?e():e||"expect ".concat(t," to be true");throw new py(r)}}var Fu;(function(t){t.Partials="partials",t.Layouts="layouts",t.Root="root"})(Fu||(Fu={}));var ae;(function(t){t[t.Number=1]="Number",t[t.Literal=2]="Literal",t[t.Tag=4]="Tag",t[t.Output=8]="Output",t[t.HTML=16]="HTML",t[t.Filter=32]="Filter",t[t.Hash=64]="Hash",t[t.PropertyAccess=128]="PropertyAccess",t[t.Word=256]="Word",t[t.Range=512]="Range",t[t.Quoted=1024]="Quoted",t[t.Operator=2048]="Operator",t[t.Delimited=12]="Delimited"})(ae||(ae={}));function yy(t){return!!(st(t)&ae.Delimited)}function Ou(t){return st(t)===ae.Operator}function Pu(t){return st(t)===ae.HTML}function Dy(t){return st(t)===ae.Tag}function vy(t){return st(t)===ae.Quoted}function by(t){return st(t)===ae.Literal}function Ey(t){return st(t)===ae.Number}function _y(t){return st(t)===ae.PropertyAccess}function wy(t){return st(t)===ae.Word}function Cy(t){return st(t)===ae.Range}function st(t){return t?t.kind:-1}var Jn=function(){function t(e){this.token=e}return t}(),Sy=function(t){Z(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.equals=function(r){return Su(Xn(r))},e.prototype.gt=function(){return!1},e.prototype.geq=function(){return!1},e.prototype.lt=function(){return!1},e.prototype.leq=function(){return!1},e.prototype.valueOf=function(){return null},e}(Er),ku=function(t){Z(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.equals=function(r){return r instanceof e?!1:(r=Xn(r),wu(r)||Au(r)?r.length===0:Wg(r)?Object.keys(r).length===0:!1)},e.prototype.gt=function(){return!1},e.prototype.geq=function(){return!1},e.prototype.lt=function(){return!1},e.prototype.leq=function(){return!1},e.prototype.valueOf=function(){return""},e}(Er),Ay=function(t){Z(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.equals=function(r){return r===!1||Su(Xn(r))?!0:wu(r)?/^\s*$/.test(r):t.prototype.equals.call(this,r)},e}(ku),Iu=new Sy,Lu={true:!0,false:!1,nil:Iu,null:Iu,empty:new ku,blank:new Ay},Ry=/[\da-fA-F]/,Bu=/[0-7]/,Nu={b:"\b",f:"\f",n:`
|
|
62
|
+
`,r:"\r",t:" ",v:"\v"};function Hu(t){var e=t.charCodeAt(0);return e>=97?e-87:e>=65?e-55:e-48}function ju(t){for(var e="",r=1;r<t.length-1;r++){if(t[r]!=="\\"){e+=t[r];continue}if(Nu[t[r+1]]!==void 0)e+=Nu[t[++r]];else if(t[r+1]==="u"){for(var s=0,n=r+2;n<=r+5&&Ry.test(t[n]);)s=s*16+Hu(t[n++]);r=n-1,e+=String.fromCharCode(s)}else if(!Bu.test(t[r+1]))e+=t[++r];else{for(var n=r+1,s=0;n<=r+3&&Bu.test(t[n]);)s=s*8+Hu(t[n++]);r=n-1,e+=String.fromCharCode(s)}}return e}var xy=function(){function t(e){this.postfix=br([],bt(Iy(e)),!1)}return t.prototype.evaluate=function(e,r){var s,n,i,a,o,u,l,f,d,c,g,p;return rt(this,function(D){switch(D.label){case 0:Qn(e,"unable to evaluate: context not defined"),s=[],D.label=1;case 1:D.trys.push([1,9,10,11]),n=$t(this.postfix),i=n.next(),D.label=2;case 2:return i.done?[3,8]:(a=i.value,Ou(a)?[4,s.pop()]:[3,5]);case 3:return o=D.sent(),[4,s.pop()];case 4:return u=D.sent(),l=Oy(e.opts.operators,a,u,o,e),s.push(l),[3,7];case 5:return d=(f=s).push,[4,Tt(a,e,r&&this.postfix.length===1)];case 6:d.apply(f,[D.sent()]),D.label=7;case 7:return i=n.next(),[3,2];case 8:return[3,11];case 9:return c=D.sent(),g={error:c},[3,11];case 10:try{i&&!i.done&&(p=n.return)&&p.call(n)}finally{if(g)throw g.error}return[7];case 11:return[2,s[0]]}})},t}();function Tt(t,e,r){if(r===void 0&&(r=!1),_y(t))return $y(t,e,r);if(Cy(t))return ky(t,e);if(by(t))return Py(t);if(Ey(t))return Ty(t);if(wy(t))return t.getText();if(vy(t))return Fy(t)}function $y(t,e,r){var s=t.props.map(function(n){return Tt(n,e,!1)});try{return e.get(br([t.propertyName],bt(s),!1))}catch(n){if(r&&n.name==="InternalUndefinedVariableError")return null;throw new dy(n,t)}}function Ty(t){var e=t.whole.content+"."+(t.decimal?t.decimal.content:"");return Number(e)}function Fy(t){return ju(t.getText())}function Oy(t,e,r,s,n){var i=t[e.operator];return i(r,s,n)}function Py(t){return Lu[t.literal]}function ky(t,e){var r=Tt(t.lhs,e),s=Tt(t.rhs,e);return Ru(+r,+s+1)}function Iy(t){var e,r,s,n,i,a,o;return rt(this,function(u){switch(u.label){case 0:e=[],u.label=1;case 1:u.trys.push([1,10,11,12]),r=$t(t),s=r.next(),u.label=2;case 2:if(s.done)return[3,9];if(n=s.value,!Ou(n))return[3,6];u.label=3;case 3:return e.length&&e[e.length-1].getPrecedence()>n.getPrecedence()?[4,e.pop()]:[3,5];case 4:return u.sent(),[3,3];case 5:return e.push(n),[3,8];case 6:return[4,n];case 7:u.sent(),u.label=8;case 8:return s=r.next(),[3,2];case 9:return[3,12];case 10:return i=u.sent(),a={error:i},[3,12];case 11:try{s&&!s.done&&(o=r.return)&&o.call(r)}finally{if(a)throw a.error}return[7];case 12:return e.length?[4,e.pop()]:[3,14];case 13:return u.sent(),[3,12];case 14:return[2]}})}var Ke=function(){function t(e,r,s,n,i){this.kind=e,this.input=r,this.begin=s,this.end=n,this.file=i}return t.prototype.getText=function(){return this.input.slice(this.begin,this.end)},t.prototype.getPosition=function(){for(var e=bt([1,1],2),r=e[0],s=e[1],n=0;n<this.begin;n++)this.input[n]===`
|
|
63
|
+
`?(r++,s=1):s++;return[r,s]},t.prototype.size=function(){return this.end-this.begin},t}(),Zn=function(t){Z(e,t);function e(r,s,n,i,a,o,u,l){var f=t.call(this,r,n,i,a,l)||this;f.trimLeft=!1,f.trimRight=!1,f.content=f.getText();var d=s[0]==="-",c=Vg(s)==="-";return f.content=s.slice(d?1:0,c?-1:s.length).trim(),f.trimLeft=d||o,f.trimRight=c||u,f}return e}(Ke);function Ly(t,e){for(var r=!1,s=0;s<t.length;s++){var n=t[s];!yy(n)||(!r&&n.trimLeft&&By(t[s-1],e.greedy),Dy(n)&&(n.name==="raw"?r=!0:n.name==="endraw"&&(r=!1)),!r&&n.trimRight&&Ny(t[s+1],e.greedy))}}function By(t,e){if(!(!t||!Pu(t)))for(var r=e?us:Tu;ne[t.input.charCodeAt(t.end-1-t.trimRight)]&r;)t.trimRight++}function Ny(t,e){if(!(!t||!Pu(t))){for(var r=e?us:Tu;ne[t.input.charCodeAt(t.begin+t.trimLeft)]&r;)t.trimLeft++;t.input.charAt(t.begin+t.trimLeft)===`
|
|
64
|
+
`&&t.trimLeft++}}var Hy=function(t){Z(e,t);function e(r,s){var n=t.call(this,ae.Number,r.input,r.begin,s?s.end:r.end,r.file)||this;return n.whole=r,n.decimal=s,n}return e}(Ke),hs=function(t){Z(e,t);function e(r,s,n,i){var a=t.call(this,ae.Word,r,s,n,i)||this;return a.input=r,a.begin=s,a.end=n,a.file=i,a.content=a.getText(),a}return e.prototype.isNumber=function(r){r===void 0&&(r=!1);for(var s=r&&ne[this.input.charCodeAt(this.begin)]&hy?this.begin+1:this.begin,n=s;n<this.end;n++)if(!(ne[this.input.charCodeAt(n)]&cy))return!1;return!0},e}(Ke),jy=function(t){Z(e,t);function e(r,s,n,i){var a=t.call(this,ae.Literal,r,s,n,i)||this;return a.input=r,a.begin=s,a.end=n,a.file=i,a.literal=a.getText(),a}return e}(Ke),Mu={"==":1,"!=":1,">":1,"<":1,">=":1,"<=":1,contains:1,and:0,or:0},My=function(t){Z(e,t);function e(r,s,n,i){var a=t.call(this,ae.Operator,r,s,n,i)||this;return a.input=r,a.begin=s,a.end=n,a.file=i,a.operator=a.getText(),a}return e.prototype.getPrecedence=function(){var r=this.getText();return r in Mu?Mu[r]:1},e}(Ke),Uu=function(t){Z(e,t);function e(r,s,n){var i=t.call(this,ae.PropertyAccess,r.input,r.begin,n,r.file)||this;return i.variable=r,i.props=s,i.propertyName=i.variable instanceof hs?i.variable.getText():ju(i.variable.getText()),i}return e}(Ke),Uy=function(t){Z(e,t);function e(r,s,n,i,a,o){var u=t.call(this,ae.Filter,n,i,a,o)||this;return u.name=r,u.args=s,u}return e}(Ke),Gy=function(t){Z(e,t);function e(r,s,n,i,a,o){var u=t.call(this,ae.Hash,r,s,n,o)||this;return u.input=r,u.begin=s,u.end=n,u.name=i,u.value=a,u.file=o,u}return e}(Ke),qy=function(t){Z(e,t);function e(r,s,n,i){var a=t.call(this,ae.Quoted,r,s,n,i)||this;return a.input=r,a.begin=s,a.end=n,a.file=i,a}return e}(Ke),Gu=function(t){Z(e,t);function e(r,s,n,i){var a=t.call(this,ae.HTML,r,s,n,i)||this;return a.input=r,a.begin=s,a.end=n,a.file=i,a.trimLeft=0,a.trimRight=0,a}return e.prototype.getContent=function(){return this.input.slice(this.begin+this.trimLeft,this.end-this.trimRight)},e}(Ke),zy=function(t){Z(e,t);function e(r,s,n,i,a,o){var u=t.call(this,ae.Range,r,s,n,o)||this;return u.input=r,u.begin=s,u.end=n,u.lhs=i,u.rhs=a,u.file=o,u}return e}(Ke),Vy=function(t){Z(e,t);function e(r,s,n,i,a){var o=this,u=i.trimOutputLeft,l=i.trimOutputRight,f=i.outputDelimiterLeft,d=i.outputDelimiterRight,c=r.slice(s+f.length,n-d.length);return o=t.call(this,ae.Output,c,r,s,n,u,l,a)||this,o}return e}(Zn);function Wy(t,e,r,s){s===void 0&&(s=t.length);for(var n=r,i=e,a;n[t[i]]&&i<s;)n=n[t[i++]],n.end&&(a=n);return!a||a.needBoundary&&ne[t.charCodeAt(i)]&Kn?-1:i}var Xy=function(t){Z(e,t);function e(r,s,n,i,a){var o=this,u=r.slice(s,n);if(o=t.call(this,ae.Tag,u,r,s,n,!1,!1,a)||this,!/\S/.test(u))o.name="",o.args="";else{var l=new fs(o.content,i.operatorsTrie);if(o.name=l.readIdentifier().getText(),!o.name)throw new Yn("illegal liquid tag syntax",o);l.skipBlank(),o.args=l.remaining()}return o}return e}(Zn),fs=function(){function t(e,r,s){s===void 0&&(s=""),this.input=e,this.trie=r,this.file=s,this.p=0,this.rawBeginAt=-1,this.N=e.length}return t.prototype.readExpression=function(){return new xy(this.readExpressionTokens())},t.prototype.readExpressionTokens=function(){var e,r,s;return rt(this,function(n){switch(n.label){case 0:return e=this.readValue(),e?[4,e]:[2];case 1:n.sent(),n.label=2;case 2:return this.p<this.N?(r=this.readOperator(),r?(s=this.readValue(),s?[4,r]:[2]):[2]):[3,5];case 3:return n.sent(),[4,s];case 4:return n.sent(),[3,2];case 5:return[2]}})},t.prototype.readOperator=function(){this.skipBlank();var e=Wy(this.input,this.p,this.trie);if(e!==-1)return new My(this.input,this.p,this.p=e,this.file)},t.prototype.readFilters=function(){for(var e=[];;){var r=this.readFilter();if(!r)return e;e.push(r)}},t.prototype.readFilter=function(){var e=this;if(this.skipBlank(),this.end())return null;Qn(this.peek()==="|",function(){return"unexpected token at ".concat(e.snapshot())}),this.p++;var r=this.p,s=this.readIdentifier();if(!s.size())return null;var n=[];if(this.skipBlank(),this.peek()===":")do{++this.p;var i=this.readFilterArg();for(i&&n.push(i);this.p<this.N&&this.peek()!==","&&this.peek()!=="|";)++this.p}while(this.peek()===",");return new Uy(s.getText(),n,this.input,r,this.p,this.file)},t.prototype.readFilterArg=function(){var e=this.readValue();if(!!e){if(this.skipBlank(),this.peek()!==":")return e;++this.p;var r=this.readValue();return[e.getText(),r]}},t.prototype.readTopLevelTokens=function(e){e===void 0&&(e=ls);for(var r=[];this.p<this.N;){var s=this.readTopLevelToken(e);r.push(s)}return Ly(r,e),r},t.prototype.readTopLevelToken=function(e){var r=e.tagDelimiterLeft,s=e.outputDelimiterLeft;return this.rawBeginAt>-1?this.readEndrawOrRawContent(e):this.match(r)?this.readTagToken(e):this.match(s)?this.readOutputToken(e):this.readHTMLToken([r,s])},t.prototype.readHTMLToken=function(e){for(var r=this,s=this.p;this.p<this.N&&!e.some(function(n){return r.match(n)});)++this.p;return new Gu(this.input,s,this.p,this.file)},t.prototype.readTagToken=function(e){e===void 0&&(e=ls);var r=this,s=r.file,n=r.input,i=this.p;if(this.readToDelimiter(e.tagDelimiterRight)===-1)throw this.mkError("tag ".concat(this.snapshot(i)," not closed"),i);var a=new qu(n,i,this.p,e,s);return a.name==="raw"&&(this.rawBeginAt=i),a},t.prototype.readToDelimiter=function(e){for(;this.p<this.N;){if(this.peekType()&$u){this.readQuoted();continue}if(++this.p,this.rmatch(e))return this.p}return-1},t.prototype.readOutputToken=function(e){e===void 0&&(e=ls);var r=this,s=r.file,n=r.input,i=e.outputDelimiterRight,a=this.p;if(this.readToDelimiter(i)===-1)throw this.mkError("output ".concat(this.snapshot(a)," not closed"),a);return new Vy(n,a,this.p,e,s)},t.prototype.readEndrawOrRawContent=function(e){for(var r=e.tagDelimiterLeft,s=e.tagDelimiterRight,n=this.p,i=this.readTo(r)-r.length;this.p<this.N;){if(this.readIdentifier().getText()!=="endraw"){i=this.readTo(r)-r.length;continue}for(;this.p<=this.N;){if(this.rmatch(s)){var a=this.p;return n===i?(this.rawBeginAt=-1,new qu(this.input,n,a,e,this.file)):(this.p=i,new Gu(this.input,n,i,this.file))}if(this.rmatch(r))break;this.p++}}throw this.mkError("raw ".concat(this.snapshot(this.rawBeginAt)," not closed"),n)},t.prototype.readLiquidTagTokens=function(e){e===void 0&&(e=ls);for(var r=[];this.p<this.N;){var s=this.readLiquidTagToken(e);s.name&&r.push(s)}return r},t.prototype.readLiquidTagToken=function(e){var r=this,s=r.file,n=r.input,i=this.p,a=this.N;this.readToDelimiter(`
|
|
65
|
+
`)!==-1&&(a=this.p);var o=new Xy(n,i,a,e,s);return o},t.prototype.mkError=function(e,r){return new Yn(e,new hs(this.input,r,this.N,this.file))},t.prototype.snapshot=function(e){return e===void 0&&(e=this.p),JSON.stringify(Qg(this.input.slice(e),16))},t.prototype.readWord=function(){return console.warn("Tokenizer#readWord() will be removed, use #readIdentifier instead"),this.readIdentifier()},t.prototype.readIdentifier=function(){this.skipBlank();for(var e=this.p;this.peekType()&Kn;)++this.p;return new hs(this.input,e,this.p,this.file)},t.prototype.readHashes=function(e){for(var r=[];;){var s=this.readHash(e);if(!s)return r;r.push(s)}},t.prototype.readHash=function(e){this.skipBlank(),this.peek()===","&&++this.p;var r=this.p,s=this.readIdentifier();if(!!s.size()){var n;this.skipBlank();var i=e?"=":":";return this.peek()===i&&(++this.p,n=this.readValue()),new Gy(this.input,r,this.p,s,n,this.file)}},t.prototype.remaining=function(){return this.input.slice(this.p)},t.prototype.advance=function(e){e===void 0&&(e=1),this.p+=e},t.prototype.end=function(){return this.p>=this.N},t.prototype.readTo=function(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1},t.prototype.readValue=function(){var e=this.readQuoted()||this.readRange();if(e)return e;if(this.peek()==="["){this.p++;var r=this.readQuoted();return!r||this.peek()!=="]"?void 0:(this.p++,new Uu(r,[],this.p))}var s=this.readIdentifier();if(!!s.size()){for(var n=s.isNumber(!0),i=[];;)if(this.peek()==="["){n=!1,this.p++;var r=this.readValue()||new hs(this.input,this.p,this.p,this.file);this.readTo("]"),i.push(r)}else if(this.peek()==="."&&this.peek(1)!=="."){this.p++;var r=this.readIdentifier();if(!r.size())break;r.isNumber()||(n=!1),i.push(r)}else break;return!i.length&&Lu.hasOwnProperty(s.content)?new jy(this.input,s.begin,s.end,this.file):n?new Hy(s,i[0]):new Uu(s,i,this.p)}},t.prototype.readRange=function(){this.skipBlank();var e=this.p;if(this.peek()==="("){++this.p;var r=this.readValueOrThrow();this.p+=2;var s=this.readValueOrThrow();return++this.p,new zy(this.input,e,this.p,r,s,this.file)}},t.prototype.readValueOrThrow=function(){var e=this,r=this.readValue();return Qn(r,function(){return"unexpected token ".concat(e.snapshot(),", value expected")}),r},t.prototype.readQuoted=function(){this.skipBlank();var e=this.p;if(!!(this.peekType()&$u)){++this.p;for(var r=!1;this.p<this.N&&(++this.p,!(this.input[this.p-1]===this.input[e]&&!r));)r?r=!1:this.input[this.p-1]==="\\"&&(r=!0);return new qy(this.input,e,this.p,this.file)}},t.prototype.readFileNameTemplate=function(e){var r,s,n;return rt(this,function(i){switch(i.label){case 0:r=e.outputDelimiterLeft,s=[","," ",r],n=new Set(s),i.label=1;case 1:return this.p<this.N&&!n.has(this.peek())?[4,this.match(r)?this.readOutputToken(e):this.readHTMLToken(s)]:[3,3];case 2:return i.sent(),[3,1];case 3:return[2]}})},t.prototype.match=function(e){for(var r=0;r<e.length;r++)if(e[r]!==this.input[this.p+r])return!1;return!0},t.prototype.rmatch=function(e){for(var r=0;r<e.length;r++)if(e[e.length-1-r]!==this.input[this.p-1-r])return!1;return!0},t.prototype.peekType=function(e){return e===void 0&&(e=0),ne[this.input.charCodeAt(this.p+e)]},t.prototype.peek=function(e){return e===void 0&&(e=0),this.input[this.p+e]},t.prototype.skipBlank=function(){for(;this.peekType()&us;)++this.p},t}(),qu=function(t){Z(e,t);function e(r,s,n,i,a){var o=this,u=i.trimTagLeft,l=i.trimTagRight,f=i.tagDelimiterLeft,d=i.tagDelimiterRight,c=r.slice(s+f.length,n-d.length);o=t.call(this,ae.Tag,c,r,s,n,u,l,a)||this;var g=new fs(o.content,i.operatorsTrie);if(o.name=g.readIdentifier().getText(),!o.name)throw new Yn("illegal tag syntax",o);return g.skipBlank(),o.args=g.remaining(),o}return e}(Zn),Ky=function(){function t(e,r){var s,n;this.hash={};var i=new fs(e,{});try{for(var a=$t(i.readHashes(r)),o=a.next();!o.done;o=a.next()){var u=o.value;this.hash[u.name.content]=u.value}}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(s)throw s.error}}}return t.prototype.render=function(e){var r,s,n,i,a,o,u,l,f,d;return rt(this,function(c){switch(c.label){case 0:r={},c.label=1;case 1:c.trys.push([1,8,9,10]),s=$t(Object.keys(this.hash)),n=s.next(),c.label=2;case 2:return n.done?[3,7]:(i=n.value,a=r,o=i,this.hash[i]!==void 0?[3,3]:(u=!0,[3,5]));case 3:return[4,Tt(this.hash[i],e)];case 4:u=c.sent(),c.label=5;case 5:a[o]=u,c.label=6;case 6:return n=s.next(),[3,2];case 7:return[3,10];case 8:return l=c.sent(),f={error:l},[3,10];case 9:try{n&&!n.done&&(d=s.return)&&d.call(s)}finally{if(f)throw f.error}return[7];case 10:return[2,r]}})},t}();function Yy(t){return Au(t)}var Qy=function(){function t(e,r,s,n){this.name=e,this.impl=r||Yg,this.args=s,this.liquid=n}return t.prototype.render=function(e,r){var s,n,i=[];try{for(var a=$t(this.args),o=a.next();!o.done;o=a.next()){var u=o.value;Yy(u)?i.push([u[0],Tt(u[1],r)]):i.push(Tt(u,r))}}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(s)throw s.error}}return this.impl.apply({context:r,liquid:this.liquid},br([e],bt(i),!1))},t}(),Jy=function(){function t(e,r){this.filters=[];var s=new fs(e,r.options.operatorsTrie);this.initial=s.readExpression(),this.filters=s.readFilters().map(function(n){var i=n.name,a=n.args;return new Qy(i,r.filters.get(i),a,r)})}return t.prototype.value=function(e,r){var s,n,i,a,o,u,l;return rt(this,function(f){switch(f.label){case 0:return r=r||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default",[4,this.initial.evaluate(e,r)];case 1:s=f.sent(),f.label=2;case 2:f.trys.push([2,7,8,9]),n=$t(this.filters),i=n.next(),f.label=3;case 3:return i.done?[3,6]:(a=i.value,[4,a.render(s,e)]);case 4:s=f.sent(),f.label=5;case 5:return i=n.next(),[3,3];case 6:return[3,9];case 7:return o=f.sent(),u={error:o},[3,9];case 8:try{i&&!i.done&&(l=n.return)&&l.call(n)}finally{if(u)throw u.error}return[7];case 9:return[2,s]}})},t}();(function(t){Z(e,t);function e(r,s,n){var i=t.call(this,r)||this;i.name=r.name;var a=n.tags.get(r.name);return i.impl=Object.create(a),i.impl.liquid=n,i.impl.parse&&i.impl.parse(r,s),i}return e.prototype.render=function(r,s){var n,i;return rt(this,function(a){switch(a.label){case 0:return[4,new Ky(this.token.args).render(r)];case 1:return n=a.sent(),i=this.impl,Wn(i.render)?[4,i.render(r,s,n)]:[3,3];case 2:return[2,a.sent()];case 3:return[2]}})},e})(Jn),function(t){Z(e,t);function e(r,s){var n=t.call(this,r)||this;return n.value=new Jy(r.content,s),n}return e.prototype.render=function(r,s){var n;return rt(this,function(i){switch(i.label){case 0:return[4,this.value.value(r,!1)];case 1:return n=i.sent(),s.write(n),[2]}})},e}(Jn),function(t){Z(e,t);function e(r){var s=t.call(this,r)||this;return s.str=r.getContent(),s}return e.prototype.render=function(r,s){return rt(this,function(n){return s.write(this.str),[2]})},e}(Jn);var Zy=function(t){Z(e,t);function e(r,s,n){var i=t.call(this)||this;return i.i=0,i.length=r,i.name="".concat(n,"-").concat(s),i}return e.prototype.next=function(){this.i++},e.prototype.index0=function(){return this.i},e.prototype.index=function(){return this.i+1},e.prototype.first=function(){return this.i===0},e.prototype.last=function(){return this.i===this.length-1},e.prototype.rindex=function(){return this.length-this.i},e.prototype.rindex0=function(){return this.length-this.i-1},e.prototype.valueOf=function(){return JSON.stringify(this)},e}(Er),zu;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(zu||(zu={})),function(t){Z(e,t);function e(r){r===void 0&&(r=function(){return""});var s=t.call(this)||this;return s.superBlockRender=r,s}return e.prototype.super=function(){return this.superBlockRender()},e}(Er),function(t){Z(e,t);function e(r,s,n,i){var a=t.call(this,r,n,i)||this;return a.length=r,a.cols=s,a}return e.prototype.row=function(){return Math.floor(this.i/this.cols)+1},e.prototype.col0=function(){return this.i%this.cols},e.prototype.col=function(){return this.col0()+1},e.prototype.col_first=function(){return this.col0()===0},e.prototype.col_last=function(){return this.col()===this.cols},e}(Zy);var eD=["January","February","March","April","May","June","July","August","September","October","November","December"],tD=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];eD.map(Vu),tD.map(Vu);function Vu(t){return t.slice(0,3)}new Date().getTimezoneOffset();var Re={},he={},Kt={};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.splitWhen=Kt.flatten=void 0;function rD(t){return t.reduce((e,r)=>[].concat(e,r),[])}Kt.flatten=rD;function sD(t,e){const r=[[]];let s=0;for(const n of t)e(n)?(s++,r[s]=[]):r[s].push(n);return r}Kt.splitWhen=sD;var ds={};Object.defineProperty(ds,"__esModule",{value:!0}),ds.isEnoentCodeError=void 0;function nD(t){return t.code==="ENOENT"}ds.isEnoentCodeError=nD;var ps={};Object.defineProperty(ps,"__esModule",{value:!0}),ps.createDirentFromStats=void 0;class iD{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function aD(t,e){return new iD(t,e)}ps.createDirentFromStats=aD;var nt={};Object.defineProperty(nt,"__esModule",{value:!0}),nt.removeLeadingDotSegment=nt.escape=nt.makeAbsolute=nt.unixify=void 0;const oD=Oe,uD=2,lD=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function cD(t){return t.replace(/\\/g,"/")}nt.unixify=cD;function hD(t,e){return oD.resolve(t,e)}nt.makeAbsolute=hD;function fD(t){return t.replace(lD,"\\$2")}nt.escape=fD;function dD(t){if(t.charAt(0)==="."){const e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(uD)}return t}nt.removeLeadingDotSegment=dD;var V={};/*!
|
|
66
|
+
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
67
|
+
*
|
|
68
|
+
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
69
|
+
* Licensed under the MIT License.
|
|
70
|
+
*/var pD=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1};/*!
|
|
71
|
+
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
72
|
+
*
|
|
73
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
74
|
+
* Released under the MIT License.
|
|
75
|
+
*/var mD=pD,Wu={"{":"}","(":")","[":"]"},gD=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,s=-2,n=-2,i=-2,a=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||s!==-1&&t[e]==="["&&t[e+1]!=="]"&&(s<e&&(s=t.indexOf("]",e)),s>e&&(a===-1||a>s||(a=t.indexOf("\\",e),a===-1||a>s)))||n!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(n=t.indexOf("}",e),n>e&&(a=t.indexOf("\\",e),a===-1||a>n))||i!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(i=t.indexOf(")",e),i>e&&(a=t.indexOf("\\",e),a===-1||a>i))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(i=t.indexOf(")",r),i>r&&(a=t.indexOf("\\",r),a===-1||a>i))))return!0;if(t[e]==="\\"){var o=t[e+1];e+=2;var u=Wu[o];if(u){var l=t.indexOf(u,e);l!==-1&&(e=l+1)}if(t[e]==="!")return!0}else e++}return!1},yD=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var s=Wu[r];if(s){var n=t.indexOf(s,e);n!==-1&&(e=n+1)}if(t[e]==="!")return!0}else e++}return!1},DD=function(e,r){if(typeof e!="string"||e==="")return!1;if(mD(e))return!0;var s=gD;return r&&r.strict===!1&&(s=yD),s(e)},vD=DD,bD=Oe.posix.dirname,ED=Wr.platform()==="win32",ei="/",_D=/\\/g,wD=/[\{\[].*[\}\]]$/,CD=/(^|[^\\])([\{\[]|\([^\)]+$)/,SD=/\\([\!\*\?\|\[\]\(\)\{\}])/g,AD=function(e,r){var s=Object.assign({flipBackslashes:!0},r);s.flipBackslashes&&ED&&e.indexOf(ei)<0&&(e=e.replace(_D,ei)),wD.test(e)&&(e+=ei),e+="a";do e=bD(e);while(vD(e)||CD.test(e));return e.replace(SD,"$1")},ms={};(function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,r)=>e.nodes.find(s=>s.type===r),t.exceedsLimit=(e,r,s=1,n)=>n===!1||!t.isInteger(e)||!t.isInteger(r)?!1:(Number(r)-Number(e))/Number(s)>=n,t.escapeNode=(e,r=0,s)=>{let n=e.nodes[r];!n||(s&&n.type===s||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1,t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((r,s)=>(s.type==="text"&&r.push(s.value),s.type==="range"&&(s.type="text"),r),[]),t.flatten=(...e)=>{const r=[],s=n=>{for(let i=0;i<n.length;i++){let a=n[i];Array.isArray(a)?s(a):a!==void 0&&r.push(a)}return r};return s(e),r}})(ms);const Xu=ms;var ti=(t,e={})=>{let r=(s,n={})=>{let i=e.escapeInvalid&&Xu.isInvalidBrace(n),a=s.invalid===!0&&e.escapeInvalid===!0,o="";if(s.value)return(i||a)&&Xu.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let u of s.nodes)o+=r(u);return o};return r(t)};/*!
|
|
76
|
+
* is-number <https://github.com/jonschlinkert/is-number>
|
|
77
|
+
*
|
|
78
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
79
|
+
* Released under the MIT License.
|
|
80
|
+
*/var RD=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1};/*!
|
|
81
|
+
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
82
|
+
*
|
|
83
|
+
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
84
|
+
* Released under the MIT License.
|
|
85
|
+
*/const Ku=RD,Ft=(t,e,r)=>{if(Ku(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(Ku(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let s={relaxZeros:!0,...r};typeof s.strictZeros=="boolean"&&(s.relaxZeros=s.strictZeros===!1);let n=String(s.relaxZeros),i=String(s.shorthand),a=String(s.capture),o=String(s.wrap),u=t+":"+e+"="+n+i+a+o;if(Ft.cache.hasOwnProperty(u))return Ft.cache[u].result;let l=Math.min(t,e),f=Math.max(t,e);if(Math.abs(l-f)===1){let D=t+"|"+e;return s.capture?`(${D})`:s.wrap===!1?D:`(?:${D})`}let d=tl(t)||tl(e),c={min:t,max:e,a:l,b:f},g=[],p=[];if(d&&(c.isPadded=d,c.maxLen=String(c.max).length),l<0){let D=f<0?Math.abs(f):1;p=Yu(D,Math.abs(l),c,s),l=c.a=0}return f>=0&&(g=Yu(l,f,c,s)),c.negatives=p,c.positives=g,c.result=xD(p,g),s.capture===!0?c.result=`(${c.result})`:s.wrap!==!1&&g.length+p.length>1&&(c.result=`(?:${c.result})`),Ft.cache[u]=c,c.result};function xD(t,e,r){let s=ri(t,e,"-",!1)||[],n=ri(e,t,"",!1)||[],i=ri(t,e,"-?",!0)||[];return s.concat(i).concat(n).join("|")}function $D(t,e){let r=1,s=1,n=Ju(t,r),i=new Set([e]);for(;t<=n&&n<=e;)i.add(n),r+=1,n=Ju(t,r);for(n=Zu(e+1,s)-1;t<n&&n<=e;)i.add(n),s+=1,n=Zu(e+1,s)-1;return i=[...i],i.sort(OD),i}function TD(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let s=FD(t,e),n=s.length,i="",a=0;for(let o=0;o<n;o++){let[u,l]=s[o];u===l?i+=u:u!=="0"||l!=="9"?i+=PD(u,l):a++}return a&&(i+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:i,count:[a],digits:n}}function Yu(t,e,r,s){let n=$D(t,e),i=[],a=t,o;for(let u=0;u<n.length;u++){let l=n[u],f=TD(String(a),String(l),s),d="";if(!r.isPadded&&o&&o.pattern===f.pattern){o.count.length>1&&o.count.pop(),o.count.push(f.count[0]),o.string=o.pattern+el(o.count),a=l+1;continue}r.isPadded&&(d=kD(l,r,s)),f.string=d+f.pattern+el(f.count),i.push(f),a=l+1,o=f}return i}function ri(t,e,r,s,n){let i=[];for(let a of t){let{string:o}=a;!s&&!Qu(e,"string",o)&&i.push(r+o),s&&Qu(e,"string",o)&&i.push(r+o)}return i}function FD(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function OD(t,e){return t>e?1:e>t?-1:0}function Qu(t,e,r){return t.some(s=>s[e]===r)}function Ju(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function Zu(t,e){return t-t%Math.pow(10,e)}function el(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function PD(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function tl(t){return/^-?(0+)\d/.test(t)}function kD(t,e,r){if(!e.isPadded)return t;let s=Math.abs(e.maxLen-String(t).length),n=r.relaxZeros!==!1;switch(s){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${s}}`:`0{${s}}`}}Ft.cache={},Ft.clearCache=()=>Ft.cache={};var ID=Ft;/*!
|
|
86
|
+
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
87
|
+
*
|
|
88
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
89
|
+
* Licensed under the MIT License.
|
|
90
|
+
*/const LD=St,rl=ID,sl=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),BD=t=>e=>t===!0?Number(e):String(e),si=t=>typeof t=="number"||typeof t=="string"&&t!=="",_r=t=>Number.isInteger(+t),ni=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},ND=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,HD=(t,e,r)=>{if(e>0){let s=t[0]==="-"?"-":"";s&&(t=t.slice(1)),t=s+t.padStart(s?e-1:e,"0")}return r===!1?String(t):t},nl=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},jD=(t,e)=>{t.negatives.sort((a,o)=>a<o?-1:a>o?1:0),t.positives.sort((a,o)=>a<o?-1:a>o?1:0);let r=e.capture?"":"?:",s="",n="",i;return t.positives.length&&(s=t.positives.join("|")),t.negatives.length&&(n=`-(${r}${t.negatives.join("|")})`),s&&n?i=`${s}|${n}`:i=s||n,e.wrap?`(${r}${i})`:i},il=(t,e,r,s)=>{if(r)return rl(t,e,{wrap:!1,...s});let n=String.fromCharCode(t);if(t===e)return n;let i=String.fromCharCode(e);return`[${n}-${i}]`},al=(t,e,r)=>{if(Array.isArray(t)){let s=r.wrap===!0,n=r.capture?"":"?:";return s?`(${n}${t.join("|")})`:t.join("|")}return rl(t,e,r)},ol=(...t)=>new RangeError("Invalid range arguments: "+LD.inspect(...t)),ul=(t,e,r)=>{if(r.strictRanges===!0)throw ol([t,e]);return[]},MD=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},UD=(t,e,r=1,s={})=>{let n=Number(t),i=Number(e);if(!Number.isInteger(n)||!Number.isInteger(i)){if(s.strictRanges===!0)throw ol([t,e]);return[]}n===0&&(n=0),i===0&&(i=0);let a=n>i,o=String(t),u=String(e),l=String(r);r=Math.max(Math.abs(r),1);let f=ni(o)||ni(u)||ni(l),d=f?Math.max(o.length,u.length,l.length):0,c=f===!1&&ND(t,e,s)===!1,g=s.transform||BD(c);if(s.toRegex&&r===1)return il(nl(t,d),nl(e,d),!0,s);let p={negatives:[],positives:[]},D=C=>p[C<0?"negatives":"positives"].push(Math.abs(C)),_=[],b=0;for(;a?n>=i:n<=i;)s.toRegex===!0&&r>1?D(n):_.push(HD(g(n,b),d,c)),n=a?n-r:n+r,b++;return s.toRegex===!0?r>1?jD(p,s):al(_,null,{wrap:!1,...s}):_},GD=(t,e,r=1,s={})=>{if(!_r(t)&&t.length>1||!_r(e)&&e.length>1)return ul(t,e,s);let n=s.transform||(c=>String.fromCharCode(c)),i=`${t}`.charCodeAt(0),a=`${e}`.charCodeAt(0),o=i>a,u=Math.min(i,a),l=Math.max(i,a);if(s.toRegex&&r===1)return il(u,l,!1,s);let f=[],d=0;for(;o?i>=a:i<=a;)f.push(n(i,d)),i=o?i-r:i+r,d++;return s.toRegex===!0?al(f,null,{wrap:!1,options:s}):f},gs=(t,e,r,s={})=>{if(e==null&&si(t))return[t];if(!si(t)||!si(e))return ul(t,e,s);if(typeof r=="function")return gs(t,e,1,{transform:r});if(sl(r))return gs(t,e,0,r);let n={...s};return n.capture===!0&&(n.wrap=!0),r=r||n.step||1,_r(r)?_r(t)&&_r(e)?UD(t,e,r,n):GD(t,e,Math.max(Math.abs(r),1),n):r!=null&&!sl(r)?MD(r,n):gs(t,e,1,r)};var ll=gs;const qD=ll,cl=ms,zD=(t,e={})=>{let r=(s,n={})=>{let i=cl.isInvalidBrace(n),a=s.invalid===!0&&e.escapeInvalid===!0,o=i===!0||a===!0,u=e.escapeInvalid===!0?"\\":"",l="";if(s.isOpen===!0||s.isClose===!0)return u+s.value;if(s.type==="open")return o?u+s.value:"(";if(s.type==="close")return o?u+s.value:")";if(s.type==="comma")return s.prev.type==="comma"?"":o?s.value:"|";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let f=cl.reduce(s.nodes),d=qD(...f,{...e,wrap:!1,toRegex:!0});if(d.length!==0)return f.length>1&&d.length>1?`(${d})`:d}if(s.nodes)for(let f of s.nodes)l+=r(f,s);return l};return r(t)};var VD=zD;const WD=ll,hl=ti,Yt=ms,Ot=(t="",e="",r=!1)=>{let s=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?Yt.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let i of n)s.push(Ot(i,e,r));else for(let i of e)r===!0&&typeof i=="string"&&(i=`{${i}}`),s.push(Array.isArray(i)?Ot(n,i,r):n+i);return Yt.flatten(s)},XD=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,s=(n,i={})=>{n.queue=[];let a=i,o=i.queue;for(;a.type!=="brace"&&a.type!=="root"&&a.parent;)a=a.parent,o=a.queue;if(n.invalid||n.dollar){o.push(Ot(o.pop(),hl(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){o.push(Ot(o.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let d=Yt.reduce(n.nodes);if(Yt.exceedsLimit(...d,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=WD(...d,e);c.length===0&&(c=hl(n,e)),o.push(Ot(o.pop(),c)),n.nodes=[];return}let u=Yt.encloseBrace(n),l=n.queue,f=n;for(;f.type!=="brace"&&f.type!=="root"&&f.parent;)f=f.parent,l=f.queue;for(let d=0;d<n.nodes.length;d++){let c=n.nodes[d];if(c.type==="comma"&&n.type==="brace"){d===1&&l.push(""),l.push("");continue}if(c.type==="close"){o.push(Ot(o.pop(),l,u));continue}if(c.value&&c.type!=="open"){l.push(Ot(l.pop(),c.value));continue}c.nodes&&s(c,n)}return l};return Yt.flatten(s(t))};var KD=XD,YD={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
91
|
+
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const QD=ti,{MAX_LENGTH:fl,CHAR_BACKSLASH:ii,CHAR_BACKTICK:JD,CHAR_COMMA:ZD,CHAR_DOT:e0,CHAR_LEFT_PARENTHESES:t0,CHAR_RIGHT_PARENTHESES:r0,CHAR_LEFT_CURLY_BRACE:s0,CHAR_RIGHT_CURLY_BRACE:n0,CHAR_LEFT_SQUARE_BRACKET:dl,CHAR_RIGHT_SQUARE_BRACKET:pl,CHAR_DOUBLE_QUOTE:i0,CHAR_SINGLE_QUOTE:a0,CHAR_NO_BREAK_SPACE:o0,CHAR_ZERO_WIDTH_NOBREAK_SPACE:u0}=YD,l0=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},s=typeof r.maxLength=="number"?Math.min(fl,r.maxLength):fl;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let n={type:"root",input:t,nodes:[]},i=[n],a=n,o=n,u=0,l=t.length,f=0,d=0,c;const g=()=>t[f++],p=D=>{if(D.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&D.type==="text"){o.value+=D.value;return}return a.nodes.push(D),D.parent=a,D.prev=o,o=D,D};for(p({type:"bos"});f<l;)if(a=i[i.length-1],c=g(),!(c===u0||c===o0)){if(c===ii){p({type:"text",value:(e.keepEscaping?c:"")+g()});continue}if(c===pl){p({type:"text",value:"\\"+c});continue}if(c===dl){u++;let D;for(;f<l&&(D=g());){if(c+=D,D===dl){u++;continue}if(D===ii){c+=g();continue}if(D===pl&&(u--,u===0))break}p({type:"text",value:c});continue}if(c===t0){a=p({type:"paren",nodes:[]}),i.push(a),p({type:"text",value:c});continue}if(c===r0){if(a.type!=="paren"){p({type:"text",value:c});continue}a=i.pop(),p({type:"text",value:c}),a=i[i.length-1];continue}if(c===i0||c===a0||c===JD){let D=c,_;for(e.keepQuotes!==!0&&(c="");f<l&&(_=g());){if(_===ii){c+=_+g();continue}if(_===D){e.keepQuotes===!0&&(c+=_);break}c+=_}p({type:"text",value:c});continue}if(c===s0){d++;let D=o.value&&o.value.slice(-1)==="$"||a.dollar===!0;a=p({type:"brace",open:!0,close:!1,dollar:D,depth:d,commas:0,ranges:0,nodes:[]}),i.push(a),p({type:"open",value:c});continue}if(c===n0){if(a.type!=="brace"){p({type:"text",value:c});continue}let D="close";a=i.pop(),a.close=!0,p({type:D,value:c}),d--,a=i[i.length-1];continue}if(c===ZD&&d>0){if(a.ranges>0){a.ranges=0;let D=a.nodes.shift();a.nodes=[D,{type:"text",value:QD(a)}]}p({type:"comma",value:c}),a.commas++;continue}if(c===e0&&d>0&&a.commas===0){let D=a.nodes;if(d===0||D.length===0){p({type:"text",value:c});continue}if(o.type==="dot"){if(a.range=[],o.value+=c,o.type="range",a.nodes.length!==3&&a.nodes.length!==5){a.invalid=!0,a.ranges=0,o.type="text";continue}a.ranges++,a.args=[];continue}if(o.type==="range"){D.pop();let _=D[D.length-1];_.value+=o.value+c,o=_,a.ranges--;continue}p({type:"dot",value:c});continue}p({type:"text",value:c})}do if(a=i.pop(),a.type!=="root"){a.nodes.forEach(b=>{b.nodes||(b.type==="open"&&(b.isOpen=!0),b.type==="close"&&(b.isClose=!0),b.nodes||(b.type="text"),b.invalid=!0)});let D=i[i.length-1],_=D.nodes.indexOf(a);D.nodes.splice(_,1,...a.nodes)}while(i.length>0);return p({type:"eos"}),n};var c0=l0;const ml=ti,h0=VD,f0=KD,d0=c0,Ne=(t,e={})=>{let r=[];if(Array.isArray(t))for(let s of t){let n=Ne.create(s,e);Array.isArray(n)?r.push(...n):r.push(n)}else r=[].concat(Ne.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};Ne.parse=(t,e={})=>d0(t,e),Ne.stringify=(t,e={})=>ml(typeof t=="string"?Ne.parse(t,e):t,e),Ne.compile=(t,e={})=>(typeof t=="string"&&(t=Ne.parse(t,e)),h0(t,e)),Ne.expand=(t,e={})=>{typeof t=="string"&&(t=Ne.parse(t,e));let r=f0(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r},Ne.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Ne.compile(t,e):Ne.expand(t,e);var p0=Ne,wr={};const m0=Oe,it="\\\\/",gl=`[^${it}]`,ht="\\.",g0="\\+",y0="\\?",ys="\\/",D0="(?=.)",yl="[^/]",ai=`(?:${ys}|$)`,Dl=`(?:^|${ys})`,oi=`${ht}{1,2}${ai}`,v0=`(?!${ht})`,b0=`(?!${Dl}${oi})`,E0=`(?!${ht}{0,1}${ai})`,_0=`(?!${oi})`,w0=`[^.${ys}]`,C0=`${yl}*?`,vl={DOT_LITERAL:ht,PLUS_LITERAL:g0,QMARK_LITERAL:y0,SLASH_LITERAL:ys,ONE_CHAR:D0,QMARK:yl,END_ANCHOR:ai,DOTS_SLASH:oi,NO_DOT:v0,NO_DOTS:b0,NO_DOT_SLASH:E0,NO_DOTS_SLASH:_0,QMARK_NO_DOT:w0,STAR:C0,START_ANCHOR:Dl},S0={...vl,SLASH_LITERAL:`[${it}]`,QMARK:gl,STAR:`${gl}*?`,DOTS_SLASH:`${ht}{1,2}(?:[${it}]|$)`,NO_DOT:`(?!${ht})`,NO_DOTS:`(?!(?:^|[${it}])${ht}{1,2}(?:[${it}]|$))`,NO_DOT_SLASH:`(?!${ht}{0,1}(?:[${it}]|$))`,NO_DOTS_SLASH:`(?!${ht}{1,2}(?:[${it}]|$))`,QMARK_NO_DOT:`[^.${it}]`,START_ANCHOR:`(?:^|[${it}])`,END_ANCHOR:`(?:[${it}]|$)`},A0={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};var Ds={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:A0,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:m0.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?S0:vl}};(function(t){const e=Oe,r=process.platform==="win32",{REGEX_BACKSLASH:s,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:a}=Ds;t.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),t.hasRegexChars=o=>i.test(o),t.isRegexChar=o=>o.length===1&&t.hasRegexChars(o),t.escapeRegex=o=>o.replace(a,"\\$1"),t.toPosixSlashes=o=>o.replace(s,"/"),t.removeBackslashes=o=>o.replace(n,u=>u==="\\"?"":u),t.supportsLookbehinds=()=>{const o=process.version.slice(1).split(".").map(Number);return o.length===3&&o[0]>=9||o[0]===8&&o[1]>=10},t.isWindows=o=>o&&typeof o.windows=="boolean"?o.windows:r===!0||e.sep==="\\",t.escapeLast=(o,u,l)=>{const f=o.lastIndexOf(u,l);return f===-1?o:o[f-1]==="\\"?t.escapeLast(o,u,f-1):`${o.slice(0,f)}\\${o.slice(f)}`},t.removePrefix=(o,u={})=>{let l=o;return l.startsWith("./")&&(l=l.slice(2),u.prefix="./"),l},t.wrapOutput=(o,u={},l={})=>{const f=l.contains?"":"^",d=l.contains?"":"$";let c=`${f}(?:${o})${d}`;return u.negated===!0&&(c=`(?:^(?!${c}).*$)`),c}})(wr);const bl=wr,{CHAR_ASTERISK:ui,CHAR_AT:R0,CHAR_BACKWARD_SLASH:Cr,CHAR_COMMA:x0,CHAR_DOT:li,CHAR_EXCLAMATION_MARK:ci,CHAR_FORWARD_SLASH:El,CHAR_LEFT_CURLY_BRACE:hi,CHAR_LEFT_PARENTHESES:fi,CHAR_LEFT_SQUARE_BRACKET:$0,CHAR_PLUS:T0,CHAR_QUESTION_MARK:_l,CHAR_RIGHT_CURLY_BRACE:F0,CHAR_RIGHT_PARENTHESES:wl,CHAR_RIGHT_SQUARE_BRACKET:O0}=Ds,Cl=t=>t===El||t===Cr,Sl=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},P0=(t,e)=>{const r=e||{},s=t.length-1,n=r.parts===!0||r.scanToEnd===!0,i=[],a=[],o=[];let u=t,l=-1,f=0,d=0,c=!1,g=!1,p=!1,D=!1,_=!1,b=!1,C=!1,x=!1,A=!1,y=!1,h=0,v,$,T={value:"",depth:0,isGlob:!1};const j=()=>l>=s,S=()=>u.charCodeAt(l+1),I=()=>(v=$,u.charCodeAt(++l));for(;l<s;){$=I();let ee;if($===Cr){C=T.backslashes=!0,$=I(),$===hi&&(b=!0);continue}if(b===!0||$===hi){for(h++;j()!==!0&&($=I());){if($===Cr){C=T.backslashes=!0,I();continue}if($===hi){h++;continue}if(b!==!0&&$===li&&($=I())===li){if(c=T.isBrace=!0,p=T.isGlob=!0,y=!0,n===!0)continue;break}if(b!==!0&&$===x0){if(c=T.isBrace=!0,p=T.isGlob=!0,y=!0,n===!0)continue;break}if($===F0&&(h--,h===0)){b=!1,c=T.isBrace=!0,y=!0;break}}if(n===!0)continue;break}if($===El){if(i.push(l),a.push(T),T={value:"",depth:0,isGlob:!1},y===!0)continue;if(v===li&&l===f+1){f+=2;continue}d=l+1;continue}if(r.noext!==!0&&($===T0||$===R0||$===ui||$===_l||$===ci)===!0&&S()===fi){if(p=T.isGlob=!0,D=T.isExtglob=!0,y=!0,$===ci&&l===f&&(A=!0),n===!0){for(;j()!==!0&&($=I());){if($===Cr){C=T.backslashes=!0,$=I();continue}if($===wl){p=T.isGlob=!0,y=!0;break}}continue}break}if($===ui){if(v===ui&&(_=T.isGlobstar=!0),p=T.isGlob=!0,y=!0,n===!0)continue;break}if($===_l){if(p=T.isGlob=!0,y=!0,n===!0)continue;break}if($===$0){for(;j()!==!0&&(ee=I());){if(ee===Cr){C=T.backslashes=!0,I();continue}if(ee===O0){g=T.isBracket=!0,p=T.isGlob=!0,y=!0;break}}if(n===!0)continue;break}if(r.nonegate!==!0&&$===ci&&l===f){x=T.negated=!0,f++;continue}if(r.noparen!==!0&&$===fi){if(p=T.isGlob=!0,n===!0){for(;j()!==!0&&($=I());){if($===fi){C=T.backslashes=!0,$=I();continue}if($===wl){y=!0;break}}continue}break}if(p===!0){if(y=!0,n===!0)continue;break}}r.noext===!0&&(D=!1,p=!1);let B=u,Q="",w="";f>0&&(Q=u.slice(0,f),u=u.slice(f),d-=f),B&&p===!0&&d>0?(B=u.slice(0,d),w=u.slice(d)):p===!0?(B="",w=u):B=u,B&&B!==""&&B!=="/"&&B!==u&&Cl(B.charCodeAt(B.length-1))&&(B=B.slice(0,-1)),r.unescape===!0&&(w&&(w=bl.removeBackslashes(w)),B&&C===!0&&(B=bl.removeBackslashes(B)));const R={prefix:Q,input:t,start:f,base:B,glob:w,isBrace:c,isBracket:g,isGlob:p,isExtglob:D,isGlobstar:_,negated:x,negatedExtglob:A};if(r.tokens===!0&&(R.maxDepth=0,Cl($)||a.push(T),R.tokens=a),r.parts===!0||r.tokens===!0){let ee;for(let G=0;G<i.length;G++){const be=ee?ee+1:f,Te=i[G],fe=t.slice(be,Te);r.tokens&&(G===0&&f!==0?(a[G].isPrefix=!0,a[G].value=Q):a[G].value=fe,Sl(a[G]),R.maxDepth+=a[G].depth),(G!==0||fe!=="")&&o.push(fe),ee=Te}if(ee&&ee+1<t.length){const G=t.slice(ee+1);o.push(G),r.tokens&&(a[a.length-1].value=G,Sl(a[a.length-1]),R.maxDepth+=a[a.length-1].depth)}R.slashes=i,R.parts=o}return R};var k0=P0;const vs=Ds,He=wr,{MAX_LENGTH:bs,POSIX_REGEX_SOURCE:I0,REGEX_NON_SPECIAL_CHARS:L0,REGEX_SPECIAL_CHARS_BACKREF:B0,REPLACEMENTS:Al}=vs,N0=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(n=>He.escapeRegex(n)).join("..")}return r},Qt=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,di=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=Al[t]||t;const r={...e},s=typeof r.maxLength=="number"?Math.min(bs,r.maxLength):bs;let n=t.length;if(n>s)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${s}`);const i={type:"bos",value:"",output:r.prepend||""},a=[i],o=r.capture?"":"?:",u=He.isWindows(e),l=vs.globChars(u),f=vs.extglobChars(l),{DOT_LITERAL:d,PLUS_LITERAL:c,SLASH_LITERAL:g,ONE_CHAR:p,DOTS_SLASH:D,NO_DOT:_,NO_DOT_SLASH:b,NO_DOTS_SLASH:C,QMARK:x,QMARK_NO_DOT:A,STAR:y,START_ANCHOR:h}=l,v=k=>`(${o}(?:(?!${h}${k.dot?D:d}).)*?)`,$=r.dot?"":_,T=r.dot?x:A;let j=r.bash===!0?v(r):y;r.capture&&(j=`(${j})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);const S={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:a};t=He.removePrefix(t,S),n=t.length;const I=[],B=[],Q=[];let w=i,R;const ee=()=>S.index===n-1,G=S.peek=(k=1)=>t[S.index+k],be=S.advance=()=>t[++S.index]||"",Te=()=>t.slice(S.index+1),fe=(k="",re=0)=>{S.consumed+=k,S.index+=re},Me=k=>{S.output+=k.output!=null?k.output:k.value,fe(k.value)},jt=()=>{let k=1;for(;G()==="!"&&(G(2)!=="("||G(3)==="?");)be(),S.start++,k++;return k%2===0?!1:(S.negated=!0,S.start++,!0)},Xe=k=>{S[k]++,Q.push(k)},Ue=k=>{S[k]--,Q.pop()},q=k=>{if(w.type==="globstar"){const re=S.braces>0&&(k.type==="comma"||k.type==="brace"),P=k.extglob===!0||I.length&&(k.type==="pipe"||k.type==="paren");k.type!=="slash"&&k.type!=="paren"&&!re&&!P&&(S.output=S.output.slice(0,-w.output.length),w.type="star",w.value="*",w.output=j,S.output+=w.output)}if(I.length&&k.type!=="paren"&&(I[I.length-1].inner+=k.value),(k.value||k.output)&&Me(k),w&&w.type==="text"&&k.type==="text"){w.value+=k.value,w.output=(w.output||"")+k.value;return}k.prev=w,a.push(k),w=k},tt=(k,re)=>{const P={...f[re],conditions:1,inner:""};P.prev=w,P.parens=S.parens,P.output=S.output;const X=(r.capture?"(":"")+P.open;Xe("parens"),q({type:k,value:re,output:S.output?"":p}),q({type:"paren",extglob:!0,value:be(),output:X}),I.push(P)},zr=k=>{let re=k.close+(r.capture?")":""),P;if(k.type==="negate"){let X=j;if(k.inner&&k.inner.length>1&&k.inner.includes("/")&&(X=v(r)),(X!==j||ee()||/^\)+$/.test(Te()))&&(re=k.close=`)$))${X}`),k.inner.includes("*")&&(P=Te())&&/^\.[^\\/.]+$/.test(P)){const se=di(P,{...e,fastpaths:!1}).output;re=k.close=`)${se})${X})`}k.prev.type==="bos"&&(S.negatedExtglob=!0)}q({type:"paren",extglob:!0,value:R,output:re}),Ue("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let k=!1,re=t.replace(B0,(P,X,se,Ee,pe,cr)=>Ee==="\\"?(k=!0,P):Ee==="?"?X?X+Ee+(pe?x.repeat(pe.length):""):cr===0?T+(pe?x.repeat(pe.length):""):x.repeat(se.length):Ee==="."?d.repeat(se.length):Ee==="*"?X?X+Ee+(pe?j:""):j:X?P:`\\${P}`);return k===!0&&(r.unescape===!0?re=re.replace(/\\/g,""):re=re.replace(/\\+/g,P=>P.length%2===0?"\\\\":P?"\\":"")),re===t&&r.contains===!0?(S.output=t,S):(S.output=He.wrapOutput(re,S,e),S)}for(;!ee();){if(R=be(),R==="\0")continue;if(R==="\\"){const P=G();if(P==="/"&&r.bash!==!0||P==="."||P===";")continue;if(!P){R+="\\",q({type:"text",value:R});continue}const X=/^\\+/.exec(Te());let se=0;if(X&&X[0].length>2&&(se=X[0].length,S.index+=se,se%2!==0&&(R+="\\")),r.unescape===!0?R=be():R+=be(),S.brackets===0){q({type:"text",value:R});continue}}if(S.brackets>0&&(R!=="]"||w.value==="["||w.value==="[^")){if(r.posix!==!1&&R===":"){const P=w.value.slice(1);if(P.includes("[")&&(w.posix=!0,P.includes(":"))){const X=w.value.lastIndexOf("["),se=w.value.slice(0,X),Ee=w.value.slice(X+2),pe=I0[Ee];if(pe){w.value=se+pe,S.backtrack=!0,be(),!i.output&&a.indexOf(w)===1&&(i.output=p);continue}}}(R==="["&&G()!==":"||R==="-"&&G()==="]")&&(R=`\\${R}`),R==="]"&&(w.value==="["||w.value==="[^")&&(R=`\\${R}`),r.posix===!0&&R==="!"&&w.value==="["&&(R="^"),w.value+=R,Me({value:R});continue}if(S.quotes===1&&R!=='"'){R=He.escapeRegex(R),w.value+=R,Me({value:R});continue}if(R==='"'){S.quotes=S.quotes===1?0:1,r.keepQuotes===!0&&q({type:"text",value:R});continue}if(R==="("){Xe("parens"),q({type:"paren",value:R});continue}if(R===")"){if(S.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Qt("opening","("));const P=I[I.length-1];if(P&&S.parens===P.parens+1){zr(I.pop());continue}q({type:"paren",value:R,output:S.parens?")":"\\)"}),Ue("parens");continue}if(R==="["){if(r.nobracket===!0||!Te().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Qt("closing","]"));R=`\\${R}`}else Xe("brackets");q({type:"bracket",value:R});continue}if(R==="]"){if(r.nobracket===!0||w&&w.type==="bracket"&&w.value.length===1){q({type:"text",value:R,output:`\\${R}`});continue}if(S.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Qt("opening","["));q({type:"text",value:R,output:`\\${R}`});continue}Ue("brackets");const P=w.value.slice(1);if(w.posix!==!0&&P[0]==="^"&&!P.includes("/")&&(R=`/${R}`),w.value+=R,Me({value:R}),r.literalBrackets===!1||He.hasRegexChars(P))continue;const X=He.escapeRegex(w.value);if(S.output=S.output.slice(0,-w.value.length),r.literalBrackets===!0){S.output+=X,w.value=X;continue}w.value=`(${o}${X}|${w.value})`,S.output+=w.value;continue}if(R==="{"&&r.nobrace!==!0){Xe("braces");const P={type:"brace",value:R,output:"(",outputIndex:S.output.length,tokensIndex:S.tokens.length};B.push(P),q(P);continue}if(R==="}"){const P=B[B.length-1];if(r.nobrace===!0||!P){q({type:"text",value:R,output:R});continue}let X=")";if(P.dots===!0){const se=a.slice(),Ee=[];for(let pe=se.length-1;pe>=0&&(a.pop(),se[pe].type!=="brace");pe--)se[pe].type!=="dots"&&Ee.unshift(se[pe].value);X=N0(Ee,r),S.backtrack=!0}if(P.comma!==!0&&P.dots!==!0){const se=S.output.slice(0,P.outputIndex),Ee=S.tokens.slice(P.tokensIndex);P.value=P.output="\\{",R=X="\\}",S.output=se;for(const pe of Ee)S.output+=pe.output||pe.value}q({type:"brace",value:R,output:X}),Ue("braces"),B.pop();continue}if(R==="|"){I.length>0&&I[I.length-1].conditions++,q({type:"text",value:R});continue}if(R===","){let P=R;const X=B[B.length-1];X&&Q[Q.length-1]==="braces"&&(X.comma=!0,P="|"),q({type:"comma",value:R,output:P});continue}if(R==="/"){if(w.type==="dot"&&S.index===S.start+1){S.start=S.index+1,S.consumed="",S.output="",a.pop(),w=i;continue}q({type:"slash",value:R,output:g});continue}if(R==="."){if(S.braces>0&&w.type==="dot"){w.value==="."&&(w.output=d);const P=B[B.length-1];w.type="dots",w.output+=R,w.value+=R,P.dots=!0;continue}if(S.braces+S.parens===0&&w.type!=="bos"&&w.type!=="slash"){q({type:"text",value:R,output:d});continue}q({type:"dot",value:R,output:d});continue}if(R==="?"){if(!(w&&w.value==="(")&&r.noextglob!==!0&&G()==="("&&G(2)!=="?"){tt("qmark",R);continue}if(w&&w.type==="paren"){const X=G();let se=R;if(X==="<"&&!He.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(w.value==="("&&!/[!=<:]/.test(X)||X==="<"&&!/<([!=]|\w+>)/.test(Te()))&&(se=`\\${R}`),q({type:"text",value:R,output:se});continue}if(r.dot!==!0&&(w.type==="slash"||w.type==="bos")){q({type:"qmark",value:R,output:A});continue}q({type:"qmark",value:R,output:x});continue}if(R==="!"){if(r.noextglob!==!0&&G()==="("&&(G(2)!=="?"||!/[!=<:]/.test(G(3)))){tt("negate",R);continue}if(r.nonegate!==!0&&S.index===0){jt();continue}}if(R==="+"){if(r.noextglob!==!0&&G()==="("&&G(2)!=="?"){tt("plus",R);continue}if(w&&w.value==="("||r.regex===!1){q({type:"plus",value:R,output:c});continue}if(w&&(w.type==="bracket"||w.type==="paren"||w.type==="brace")||S.parens>0){q({type:"plus",value:R});continue}q({type:"plus",value:c});continue}if(R==="@"){if(r.noextglob!==!0&&G()==="("&&G(2)!=="?"){q({type:"at",extglob:!0,value:R,output:""});continue}q({type:"text",value:R});continue}if(R!=="*"){(R==="$"||R==="^")&&(R=`\\${R}`);const P=L0.exec(Te());P&&(R+=P[0],S.index+=P[0].length),q({type:"text",value:R});continue}if(w&&(w.type==="globstar"||w.star===!0)){w.type="star",w.star=!0,w.value+=R,w.output=j,S.backtrack=!0,S.globstar=!0,fe(R);continue}let k=Te();if(r.noextglob!==!0&&/^\([^?]/.test(k)){tt("star",R);continue}if(w.type==="star"){if(r.noglobstar===!0){fe(R);continue}const P=w.prev,X=P.prev,se=P.type==="slash"||P.type==="bos",Ee=X&&(X.type==="star"||X.type==="globstar");if(r.bash===!0&&(!se||k[0]&&k[0]!=="/")){q({type:"star",value:R,output:""});continue}const pe=S.braces>0&&(P.type==="comma"||P.type==="brace"),cr=I.length&&(P.type==="pipe"||P.type==="paren");if(!se&&P.type!=="paren"&&!pe&&!cr){q({type:"star",value:R,output:""});continue}for(;k.slice(0,3)==="/**";){const ce=t[S.index+4];if(ce&&ce!=="/")break;k=k.slice(3),fe("/**",3)}if(P.type==="bos"&&ee()){w.type="globstar",w.value+=R,w.output=v(r),S.output=w.output,S.globstar=!0,fe(R);continue}if(P.type==="slash"&&P.prev.type!=="bos"&&!Ee&&ee()){S.output=S.output.slice(0,-(P.output+w.output).length),P.output=`(?:${P.output}`,w.type="globstar",w.output=v(r)+(r.strictSlashes?")":"|$)"),w.value+=R,S.globstar=!0,S.output+=P.output+w.output,fe(R);continue}if(P.type==="slash"&&P.prev.type!=="bos"&&k[0]==="/"){const ce=k[1]!==void 0?"|$":"";S.output=S.output.slice(0,-(P.output+w.output).length),P.output=`(?:${P.output}`,w.type="globstar",w.output=`${v(r)}${g}|${g}${ce})`,w.value+=R,S.output+=P.output+w.output,S.globstar=!0,fe(R+be()),q({type:"slash",value:"/",output:""});continue}if(P.type==="bos"&&k[0]==="/"){w.type="globstar",w.value+=R,w.output=`(?:^|${g}|${v(r)}${g})`,S.output=w.output,S.globstar=!0,fe(R+be()),q({type:"slash",value:"/",output:""});continue}S.output=S.output.slice(0,-w.output.length),w.type="globstar",w.output=v(r),w.value+=R,S.output+=w.output,S.globstar=!0,fe(R);continue}const re={type:"star",value:R,output:j};if(r.bash===!0){re.output=".*?",(w.type==="bos"||w.type==="slash")&&(re.output=$+re.output),q(re);continue}if(w&&(w.type==="bracket"||w.type==="paren")&&r.regex===!0){re.output=R,q(re);continue}(S.index===S.start||w.type==="slash"||w.type==="dot")&&(w.type==="dot"?(S.output+=b,w.output+=b):r.dot===!0?(S.output+=C,w.output+=C):(S.output+=$,w.output+=$),G()!=="*"&&(S.output+=p,w.output+=p)),q(re)}for(;S.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Qt("closing","]"));S.output=He.escapeLast(S.output,"["),Ue("brackets")}for(;S.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Qt("closing",")"));S.output=He.escapeLast(S.output,"("),Ue("parens")}for(;S.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Qt("closing","}"));S.output=He.escapeLast(S.output,"{"),Ue("braces")}if(r.strictSlashes!==!0&&(w.type==="star"||w.type==="bracket")&&q({type:"maybe_slash",value:"",output:`${g}?`}),S.backtrack===!0){S.output="";for(const k of S.tokens)S.output+=k.output!=null?k.output:k.value,k.suffix&&(S.output+=k.suffix)}return S};di.fastpaths=(t,e)=>{const r={...e},s=typeof r.maxLength=="number"?Math.min(bs,r.maxLength):bs,n=t.length;if(n>s)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${s}`);t=Al[t]||t;const i=He.isWindows(e),{DOT_LITERAL:a,SLASH_LITERAL:o,ONE_CHAR:u,DOTS_SLASH:l,NO_DOT:f,NO_DOTS:d,NO_DOTS_SLASH:c,STAR:g,START_ANCHOR:p}=vs.globChars(i),D=r.dot?d:f,_=r.dot?c:f,b=r.capture?"":"?:",C={negated:!1,prefix:""};let x=r.bash===!0?".*?":g;r.capture&&(x=`(${x})`);const A=$=>$.noglobstar===!0?x:`(${b}(?:(?!${p}${$.dot?l:a}).)*?)`,y=$=>{switch($){case"*":return`${D}${u}${x}`;case".*":return`${a}${u}${x}`;case"*.*":return`${D}${x}${a}${u}${x}`;case"*/*":return`${D}${x}${o}${u}${_}${x}`;case"**":return D+A(r);case"**/*":return`(?:${D}${A(r)}${o})?${_}${u}${x}`;case"**/*.*":return`(?:${D}${A(r)}${o})?${_}${x}${a}${u}${x}`;case"**/.*":return`(?:${D}${A(r)}${o})?${a}${u}${x}`;default:{const T=/^(.*?)\.(\w+)$/.exec($);if(!T)return;const j=y(T[1]);return j?j+a+T[2]:void 0}}},h=He.removePrefix(t,C);let v=y(h);return v&&r.strictSlashes!==!0&&(v+=`${o}?`),v};var H0=di;const j0=Oe,M0=k0,pi=H0,mi=wr,U0=Ds,G0=t=>t&&typeof t=="object"&&!Array.isArray(t),ge=(t,e,r=!1)=>{if(Array.isArray(t)){const f=t.map(c=>ge(c,e,r));return c=>{for(const g of f){const p=g(c);if(p)return p}return!1}}const s=G0(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!s)throw new TypeError("Expected pattern to be a non-empty string");const n=e||{},i=mi.isWindows(e),a=s?ge.compileRe(t,e):ge.makeRe(t,e,!1,!0),o=a.state;delete a.state;let u=()=>!1;if(n.ignore){const f={...e,ignore:null,onMatch:null,onResult:null};u=ge(n.ignore,f,r)}const l=(f,d=!1)=>{const{isMatch:c,match:g,output:p}=ge.test(f,a,e,{glob:t,posix:i}),D={glob:t,state:o,regex:a,posix:i,input:f,output:p,match:g,isMatch:c};return typeof n.onResult=="function"&&n.onResult(D),c===!1?(D.isMatch=!1,d?D:!1):u(f)?(typeof n.onIgnore=="function"&&n.onIgnore(D),D.isMatch=!1,d?D:!1):(typeof n.onMatch=="function"&&n.onMatch(D),d?D:!0)};return r&&(l.state=o),l};ge.test=(t,e,r,{glob:s,posix:n}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};const i=r||{},a=i.format||(n?mi.toPosixSlashes:null);let o=t===s,u=o&&a?a(t):t;return o===!1&&(u=a?a(t):t,o=u===s),(o===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?o=ge.matchBase(t,e,r,n):o=e.exec(u)),{isMatch:Boolean(o),match:o,output:u}},ge.matchBase=(t,e,r,s=mi.isWindows(r))=>(e instanceof RegExp?e:ge.makeRe(e,r)).test(j0.basename(t)),ge.isMatch=(t,e,r)=>ge(e,r)(t),ge.parse=(t,e)=>Array.isArray(t)?t.map(r=>ge.parse(r,e)):pi(t,{...e,fastpaths:!1}),ge.scan=(t,e)=>M0(t,e),ge.compileRe=(t,e,r=!1,s=!1)=>{if(r===!0)return t.output;const n=e||{},i=n.contains?"":"^",a=n.contains?"":"$";let o=`${i}(?:${t.output})${a}`;t&&t.negated===!0&&(o=`^(?!${o}).*$`);const u=ge.toRegex(o,e);return s===!0&&(u.state=t),u},ge.makeRe=(t,e={},r=!1,s=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(n.output=pi.fastpaths(t,e)),n.output||(n=pi(t,e)),ge.compileRe(n,e,r,s)},ge.toRegex=(t,e)=>{try{const r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}},ge.constants=U0;var q0=ge,z0=q0;const Rl=St,xl=p0,at=z0,gi=wr,$l=t=>t===""||t==="./",le=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let s=new Set,n=new Set,i=new Set,a=0,o=f=>{i.add(f.output),r&&r.onResult&&r.onResult(f)};for(let f=0;f<e.length;f++){let d=at(String(e[f]),{...r,onResult:o},!0),c=d.state.negated||d.state.negatedExtglob;c&&a++;for(let g of t){let p=d(g,!0);!(c?!p.isMatch:p.isMatch)||(c?s.add(p.output):(s.delete(p.output),n.add(p.output)))}}let l=(a===e.length?[...i]:[...n]).filter(f=>!s.has(f));if(r&&l.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(f=>f.replace(/\\/g,"")):e}return l};le.match=le,le.matcher=(t,e)=>at(t,e),le.isMatch=(t,e,r)=>at(e,r)(t),le.any=le.isMatch,le.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set,n=[],a=le(t,e,{...r,onResult:o=>{r.onResult&&r.onResult(o),n.push(o.output)}});for(let o of n)a.includes(o)||s.add(o);return[...s]},le.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${Rl.inspect(t)}"`);if(Array.isArray(e))return e.some(s=>le.contains(t,s,r));if(typeof e=="string"){if($l(t)||$l(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return le.isMatch(t,e,{...r,contains:!0})},le.matchKeys=(t,e,r)=>{if(!gi.isObject(t))throw new TypeError("Expected the first argument to be an object");let s=le(Object.keys(t),e,r),n={};for(let i of s)n[i]=t[i];return n},le.some=(t,e,r)=>{let s=[].concat(t);for(let n of[].concat(e)){let i=at(String(n),r);if(s.some(a=>i(a)))return!0}return!1},le.every=(t,e,r)=>{let s=[].concat(t);for(let n of[].concat(e)){let i=at(String(n),r);if(!s.every(a=>i(a)))return!1}return!0},le.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${Rl.inspect(t)}"`);return[].concat(e).every(s=>at(s,r)(t))},le.capture=(t,e,r)=>{let s=gi.isWindows(r),i=at.makeRe(String(t),{...r,capture:!0}).exec(s?gi.toPosixSlashes(e):e);if(i)return i.slice(1).map(a=>a===void 0?"":a)},le.makeRe=(...t)=>at.makeRe(...t),le.scan=(...t)=>at.scan(...t),le.parse=(t,e)=>{let r=[];for(let s of[].concat(t||[]))for(let n of xl(String(s),e))r.push(at.parse(n,e));return r},le.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:xl(t,e)},le.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return le.braces(t,{...e,expand:!0})};var V0=le;Object.defineProperty(V,"__esModule",{value:!0}),V.matchAny=V.convertPatternsToRe=V.makeRe=V.getPatternParts=V.expandBraceExpansion=V.expandPatternsWithBraceExpansion=V.isAffectDepthOfReadingPattern=V.endsWithSlashGlobStar=V.hasGlobStar=V.getBaseDirectory=V.isPatternRelatedToParentDirectory=V.getPatternsOutsideCurrentDirectory=V.getPatternsInsideCurrentDirectory=V.getPositivePatterns=V.getNegativePatterns=V.isPositivePattern=V.isNegativePattern=V.convertToNegativePattern=V.convertToPositivePattern=V.isDynamicPattern=V.isStaticPattern=void 0;const W0=Oe,X0=AD,yi=V0,Tl="**",K0="\\",Y0=/[*?]|^!/,Q0=/\[[^[]*]/,J0=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,Z0=/[!*+?@]\([^(]*\)/,ev=/,|\.\./;function Fl(t,e={}){return!Ol(t,e)}V.isStaticPattern=Fl;function Ol(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(K0)||Y0.test(t)||Q0.test(t)||J0.test(t)||e.extglob!==!1&&Z0.test(t)||e.braceExpansion!==!1&&tv(t))}V.isDynamicPattern=Ol;function tv(t){const e=t.indexOf("{");if(e===-1)return!1;const r=t.indexOf("}",e+1);if(r===-1)return!1;const s=t.slice(e,r);return ev.test(s)}function rv(t){return Es(t)?t.slice(1):t}V.convertToPositivePattern=rv;function sv(t){return"!"+t}V.convertToNegativePattern=sv;function Es(t){return t.startsWith("!")&&t[1]!=="("}V.isNegativePattern=Es;function Pl(t){return!Es(t)}V.isPositivePattern=Pl;function nv(t){return t.filter(Es)}V.getNegativePatterns=nv;function iv(t){return t.filter(Pl)}V.getPositivePatterns=iv;function av(t){return t.filter(e=>!Di(e))}V.getPatternsInsideCurrentDirectory=av;function ov(t){return t.filter(Di)}V.getPatternsOutsideCurrentDirectory=ov;function Di(t){return t.startsWith("..")||t.startsWith("./..")}V.isPatternRelatedToParentDirectory=Di;function uv(t){return X0(t,{flipBackslashes:!1})}V.getBaseDirectory=uv;function lv(t){return t.includes(Tl)}V.hasGlobStar=lv;function kl(t){return t.endsWith("/"+Tl)}V.endsWithSlashGlobStar=kl;function cv(t){const e=W0.basename(t);return kl(t)||Fl(e)}V.isAffectDepthOfReadingPattern=cv;function hv(t){return t.reduce((e,r)=>e.concat(Il(r)),[])}V.expandPatternsWithBraceExpansion=hv;function Il(t){return yi.braces(t,{expand:!0,nodupes:!0})}V.expandBraceExpansion=Il;function fv(t,e){let{parts:r}=yi.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}V.getPatternParts=fv;function Ll(t,e){return yi.makeRe(t,e)}V.makeRe=Ll;function dv(t,e){return t.map(r=>Ll(r,e))}V.convertPatternsToRe=dv;function pv(t,e){return e.some(r=>r.test(t))}V.matchAny=pv;var _s={};const mv=Be,Bl=mv.PassThrough,gv=Array.prototype.slice;var yv=Dv;function Dv(){const t=[],e=gv.call(arguments);let r=!1,s=e[e.length-1];s&&!Array.isArray(s)&&s.pipe==null?e.pop():s={};const n=s.end!==!1,i=s.pipeError===!0;s.objectMode==null&&(s.objectMode=!0),s.highWaterMark==null&&(s.highWaterMark=64*1024);const a=Bl(s);function o(){for(let f=0,d=arguments.length;f<d;f++)t.push(Nl(arguments[f],s));return u(),this}function u(){if(r)return;r=!0;let f=t.shift();if(!f){process.nextTick(l);return}Array.isArray(f)||(f=[f]);let d=f.length+1;function c(){--d>0||(r=!1,u())}function g(p){function D(){p.removeListener("merge2UnpipeEnd",D),p.removeListener("end",D),i&&p.removeListener("error",_),c()}function _(b){a.emit("error",b)}if(p._readableState.endEmitted)return c();p.on("merge2UnpipeEnd",D),p.on("end",D),i&&p.on("error",_),p.pipe(a,{end:!1}),p.resume()}for(let p=0;p<f.length;p++)g(f[p]);c()}function l(){r=!1,a.emit("queueDrain"),n&&a.end()}return a.setMaxListeners(0),a.add=o,a.on("unpipe",function(f){f.emit("merge2UnpipeEnd")}),e.length&&o.apply(null,e),a}function Nl(t,e){if(Array.isArray(t))for(let r=0,s=t.length;r<s;r++)t[r]=Nl(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(Bl(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}Object.defineProperty(_s,"__esModule",{value:!0}),_s.merge=void 0;const vv=yv;function bv(t){const e=vv(t);return t.forEach(r=>{r.once("error",s=>e.emit("error",s))}),e.once("close",()=>Hl(t)),e.once("end",()=>Hl(t)),e}_s.merge=bv;function Hl(t){t.forEach(e=>e.emit("close"))}var Jt={};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.isEmpty=Jt.isString=void 0;function Ev(t){return typeof t=="string"}Jt.isString=Ev;function _v(t){return t===""}Jt.isEmpty=_v,Object.defineProperty(he,"__esModule",{value:!0}),he.string=he.stream=he.pattern=he.path=he.fs=he.errno=he.array=void 0;const wv=Kt;he.array=wv;const Cv=ds;he.errno=Cv;const Sv=ps;he.fs=Sv;const Av=nt;he.path=Av;const Rv=V;he.pattern=Rv;const xv=_s;he.stream=xv;const $v=Jt;he.string=$v,Object.defineProperty(Re,"__esModule",{value:!0}),Re.convertPatternGroupToTask=Re.convertPatternGroupsToTasks=Re.groupPatternsByBaseDirectory=Re.getNegativePatternsAsPositive=Re.getPositivePatterns=Re.convertPatternsToTasks=Re.generate=void 0;const ft=he;function Tv(t,e){const r=jl(t),s=Ml(t,e.ignore),n=r.filter(u=>ft.pattern.isStaticPattern(u,e)),i=r.filter(u=>ft.pattern.isDynamicPattern(u,e)),a=vi(n,s,!1),o=vi(i,s,!0);return a.concat(o)}Re.generate=Tv;function vi(t,e,r){const s=[],n=ft.pattern.getPatternsOutsideCurrentDirectory(t),i=ft.pattern.getPatternsInsideCurrentDirectory(t),a=bi(n),o=bi(i);return s.push(...Ei(a,e,r)),"."in o?s.push(_i(".",i,e,r)):s.push(...Ei(o,e,r)),s}Re.convertPatternsToTasks=vi;function jl(t){return ft.pattern.getPositivePatterns(t)}Re.getPositivePatterns=jl;function Ml(t,e){return ft.pattern.getNegativePatterns(t).concat(e).map(ft.pattern.convertToPositivePattern)}Re.getNegativePatternsAsPositive=Ml;function bi(t){const e={};return t.reduce((r,s)=>{const n=ft.pattern.getBaseDirectory(s);return n in r?r[n].push(s):r[n]=[s],r},e)}Re.groupPatternsByBaseDirectory=bi;function Ei(t,e,r){return Object.keys(t).map(s=>_i(s,t[s],e,r))}Re.convertPatternGroupsToTasks=Ei;function _i(t,e,r,s){return{dynamic:s,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(ft.pattern.convertToNegativePattern))}}Re.convertPatternGroupToTask=_i;var Zt={};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.removeDuplicateSlashes=Zt.transform=void 0;const Fv=/(?!^)\/{2,}/g;function Ov(t){return t.map(e=>Ul(e))}Zt.transform=Ov;function Ul(t){return t.replace(Fv,"/")}Zt.removeDuplicateSlashes=Ul;var wi={},ws={},je={},Cs={};Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.read=void 0;function Pv(t,e,r){e.fs.lstat(t,(s,n)=>{if(s!==null){Gl(r,s);return}if(!n.isSymbolicLink()||!e.followSymbolicLink){Ci(r,n);return}e.fs.stat(t,(i,a)=>{if(i!==null){if(e.throwErrorOnBrokenSymbolicLink){Gl(r,i);return}Ci(r,n);return}e.markSymbolicLink&&(a.isSymbolicLink=()=>!0),Ci(r,a)})})}Cs.read=Pv;function Gl(t,e){t(e)}function Ci(t,e){t(null,e)}var Ss={};Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.read=void 0;function kv(t,e){const r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{const s=e.fs.statSync(t);return e.markSymbolicLink&&(s.isSymbolicLink=()=>!0),s}catch(s){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw s}}Ss.read=kv;var Si={},ql={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=lt;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync};function r(s){return s===void 0?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),s)}t.createFileSystemAdapter=r})(ql),Object.defineProperty(Si,"__esModule",{value:!0});const Iv=ql;class Lv{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Iv.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}}Si.default=Lv,Object.defineProperty(je,"__esModule",{value:!0}),je.statSync=je.stat=je.Settings=void 0;const zl=Cs,Bv=Ss,Ai=Si;je.Settings=Ai.default;function Nv(t,e,r){if(typeof e=="function"){zl.read(t,Ri(),e);return}zl.read(t,Ri(e),r)}je.stat=Nv;function Hv(t,e){const r=Ri(e);return Bv.read(t,r)}je.statSync=Hv;function Ri(t={}){return t instanceof Ai.default?t:new Ai.default(t)}var Ye={},xi={},As={},ot={},Et={};/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */let Vl;var jv=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:ie):t=>(Vl||(Vl=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0));/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Mv=Gv;const Uv=jv;function Gv(t,e){let r,s,n,i=!0;Array.isArray(t)?(r=[],s=t.length):(n=Object.keys(t),r={},s=n.length);function a(u){function l(){e&&e(u,r),e=null}i?Uv(l):l()}function o(u,l,f){r[u]=f,(--s===0||l)&&a(l)}s?n?n.forEach(function(u){t[u](function(l,f){o(u,l,f)})}):t.forEach(function(u,l){u(function(f,d){o(l,f,d)})}):a(null),i=!1}var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const Rs=process.versions.node.split(".");if(Rs[0]===void 0||Rs[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const Wl=Number.parseInt(Rs[0],10),qv=Number.parseInt(Rs[1],10),Xl=10,zv=10,Vv=Wl>Xl,Wv=Wl===Xl&&qv>=zv;Sr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=Vv||Wv;var Ar={},xs={};Object.defineProperty(xs,"__esModule",{value:!0}),xs.createDirentFromStats=void 0;class Xv{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function Kv(t,e){return new Xv(t,e)}xs.createDirentFromStats=Kv,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.fs=void 0;const Yv=xs;Ar.fs=Yv;var Rr={};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.joinPathSegments=void 0;function Qv(t,e,r){return t.endsWith(r)?t+e:t+r+e}Rr.joinPathSegments=Qv,Object.defineProperty(Et,"__esModule",{value:!0}),Et.readdir=Et.readdirWithFileTypes=Et.read=void 0;const Jv=je,Kl=Mv,Zv=Sr,Yl=Ar,Ql=Rr;function eb(t,e,r){if(!e.stats&&Zv.IS_SUPPORT_READDIR_WITH_FILE_TYPES){Jl(t,e,r);return}Zl(t,e,r)}Et.read=eb;function Jl(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(s,n)=>{if(s!==null){$s(r,s);return}const i=n.map(o=>({dirent:o,name:o.name,path:Ql.joinPathSegments(t,o.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){$i(r,i);return}const a=i.map(o=>tb(o,e));Kl(a,(o,u)=>{if(o!==null){$s(r,o);return}$i(r,u)})})}Et.readdirWithFileTypes=Jl;function tb(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(s,n)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){r(s);return}r(null,t);return}t.dirent=Yl.fs.createDirentFromStats(t.name,n),r(null,t)})}}function Zl(t,e,r){e.fs.readdir(t,(s,n)=>{if(s!==null){$s(r,s);return}const i=n.map(a=>{const o=Ql.joinPathSegments(t,a,e.pathSegmentSeparator);return u=>{Jv.stat(o,e.fsStatSettings,(l,f)=>{if(l!==null){u(l);return}const d={name:a,path:o,dirent:Yl.fs.createDirentFromStats(a,f)};e.stats&&(d.stats=f),u(null,d)})}});Kl(i,(a,o)=>{if(a!==null){$s(r,a);return}$i(r,o)})})}Et.readdir=Zl;function $s(t,e){t(e)}function $i(t,e){t(null,e)}var _t={};Object.defineProperty(_t,"__esModule",{value:!0}),_t.readdir=_t.readdirWithFileTypes=_t.read=void 0;const rb=je,sb=Sr,ec=Ar,tc=Rr;function nb(t,e){return!e.stats&&sb.IS_SUPPORT_READDIR_WITH_FILE_TYPES?rc(t,e):sc(t,e)}_t.read=nb;function rc(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(s=>{const n={dirent:s,name:s.name,path:tc.joinPathSegments(t,s.name,e.pathSegmentSeparator)};if(n.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{const i=e.fs.statSync(n.path);n.dirent=ec.fs.createDirentFromStats(n.name,i)}catch(i){if(e.throwErrorOnBrokenSymbolicLink)throw i}return n})}_t.readdirWithFileTypes=rc;function sc(t,e){return e.fs.readdirSync(t).map(s=>{const n=tc.joinPathSegments(t,s,e.pathSegmentSeparator),i=rb.statSync(n,e.fsStatSettings),a={name:s,path:n,dirent:ec.fs.createDirentFromStats(s,i)};return e.stats&&(a.stats=i),a})}_t.readdir=sc;var Ti={},nc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=lt;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync};function r(s){return s===void 0?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),s)}t.createFileSystemAdapter=r})(nc),Object.defineProperty(Ti,"__esModule",{value:!0});const ib=Oe,ab=je,ob=nc;class ub{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=ob.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,ib.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new ab.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}}Ti.default=ub,Object.defineProperty(ot,"__esModule",{value:!0}),ot.Settings=ot.scandirSync=ot.scandir=void 0;const ic=Et,lb=_t,Fi=Ti;ot.Settings=Fi.default;function cb(t,e,r){if(typeof e=="function"){ic.read(t,Oi(),e);return}ic.read(t,Oi(e),r)}ot.scandir=cb;function hb(t,e){const r=Oi(e);return lb.read(t,r)}ot.scandirSync=hb;function Oi(t={}){return t instanceof Fi.default?t:new Fi.default(t)}var Pi={exports:{}};function fb(t){var e=new t,r=e;function s(){var i=e;return i.next?e=i.next:(e=new t,r=e),i.next=null,i}function n(i){r.next=i,r=i}return{get:s,release:n}}var db=fb,pb=db;function ac(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var s=pb(mb),n=null,i=null,a=0,o=null,u={push:D,drain:ze,saturated:ze,pause:f,paused:!1,concurrency:r,running:l,resume:g,idle:p,length:d,getQueue:c,unshift:_,empty:ze,kill:C,killAndDrain:x,error:A};return u;function l(){return a}function f(){u.paused=!0}function d(){for(var y=n,h=0;y;)y=y.next,h++;return h}function c(){for(var y=n,h=[];y;)h.push(y.value),y=y.next;return h}function g(){if(!!u.paused){u.paused=!1;for(var y=0;y<u.concurrency;y++)a++,b()}}function p(){return a===0&&u.length()===0}function D(y,h){var v=s.get();v.context=t,v.release=b,v.value=y,v.callback=h||ze,v.errorHandler=o,a===u.concurrency||u.paused?i?(i.next=v,i=v):(n=v,i=v,u.saturated()):(a++,e.call(t,v.value,v.worked))}function _(y,h){var v=s.get();v.context=t,v.release=b,v.value=y,v.callback=h||ze,a===u.concurrency||u.paused?n?(v.next=n,n=v):(n=v,i=v,u.saturated()):(a++,e.call(t,v.value,v.worked))}function b(y){y&&s.release(y);var h=n;h?u.paused?a--:(i===n&&(i=null),n=h.next,h.next=null,e.call(t,h.value,h.worked),i===null&&u.empty()):--a===0&&u.drain()}function C(){n=null,i=null,u.drain=ze}function x(){n=null,i=null,u.drain(),u.drain=ze}function A(y){o=y}}function ze(){}function mb(){this.value=null,this.callback=ze,this.next=null,this.release=ze,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,s){var n=t.callback,i=t.errorHandler,a=t.value;t.value=null,t.callback=ze,t.errorHandler&&i(r,a),n.call(t.context,r,s),t.release(t)}}function gb(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function s(f,d){e.call(this,f).then(function(c){d(null,c)},d)}var n=ac(t,s,r),i=n.push,a=n.unshift;return n.push=o,n.unshift=u,n.drained=l,n;function o(f){var d=new Promise(function(c,g){i(f,function(p,D){if(p){g(p);return}c(D)})});return d.catch(ze),d}function u(f){var d=new Promise(function(c,g){a(f,function(p,D){if(p){g(p);return}c(D)})});return d.catch(ze),d}function l(){var f=n.drain,d=new Promise(function(c){n.drain=function(){f(),c()}});return d}}Pi.exports=ac,Pi.exports.promise=gb;var Ve={};Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.joinPathSegments=Ve.replacePathSegmentSeparator=Ve.isAppliedFilter=Ve.isFatalError=void 0;function yb(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}Ve.isFatalError=yb;function Db(t,e){return t===null||t(e)}Ve.isAppliedFilter=Db;function vb(t,e){return t.split(/[/\\]/).join(e)}Ve.replacePathSegmentSeparator=vb;function bb(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}Ve.joinPathSegments=bb;var Ts={};Object.defineProperty(Ts,"__esModule",{value:!0});const Eb=Ve;class _b{constructor(e,r){this._root=e,this._settings=r,this._root=Eb.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}}Ts.default=_b,Object.defineProperty(As,"__esModule",{value:!0});const wb=gt,Cb=ot,Sb=Pi.exports,Fs=Ve,Ab=Ts;class Rb extends Ab.default{constructor(e,r){super(e,r);this._settings=r,this._scandir=Cb.scandir,this._emitter=new wb.EventEmitter,this._queue=Sb(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){const s={directory:e,base:r};this._queue.push(s,n=>{n!==null&&this._handleError(n)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(s,n)=>{if(s!==null){r(s,void 0);return}for(const i of n)this._handleEntry(i,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!Fs.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;const s=e.path;r!==void 0&&(e.path=Fs.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Fs.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&Fs.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(s,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}As.default=Rb,Object.defineProperty(xi,"__esModule",{value:!0});const xb=As;class $b{constructor(e,r){this._root=e,this._settings=r,this._reader=new xb.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{Tb(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{Fb(e,this._storage)}),this._reader.read()}}xi.default=$b;function Tb(t,e){t(e)}function Fb(t,e){t(null,e)}var ki={};Object.defineProperty(ki,"__esModule",{value:!0});const Ob=Be,Pb=As;class kb{constructor(e,r){this._root=e,this._settings=r,this._reader=new Pb.default(this._root,this._settings),this._stream=new Ob.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}}ki.default=kb;var Ii={},Li={};Object.defineProperty(Li,"__esModule",{value:!0});const Ib=ot,Os=Ve,Lb=Ts;class Bb extends Lb.default{constructor(){super(...arguments);this._scandir=Ib.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{const s=this._scandir(e,this._settings.fsScandirSettings);for(const n of s)this._handleEntry(n,r)}catch(s){this._handleError(s)}}_handleError(e){if(!!Os.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const s=e.path;r!==void 0&&(e.path=Os.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Os.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&Os.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(s,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}Li.default=Bb,Object.defineProperty(Ii,"__esModule",{value:!0});const Nb=Li;class Hb{constructor(e,r){this._root=e,this._settings=r,this._reader=new Nb.default(this._root,this._settings)}read(){return this._reader.read()}}Ii.default=Hb;var Bi={};Object.defineProperty(Bi,"__esModule",{value:!0});const jb=Oe,Mb=ot;class Ub{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,jb.sep),this.fsScandirSettings=new Mb.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}}Bi.default=Ub,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.Settings=Ye.walkStream=Ye.walkSync=Ye.walk=void 0;const oc=xi,Gb=ki,qb=Ii,Ni=Bi;Ye.Settings=Ni.default;function zb(t,e,r){if(typeof e=="function"){new oc.default(t,Ps()).read(e);return}new oc.default(t,Ps(e)).read(r)}Ye.walk=zb;function Vb(t,e){const r=Ps(e);return new qb.default(t,r).read()}Ye.walkSync=Vb;function Wb(t,e){const r=Ps(e);return new Gb.default(t,r).read()}Ye.walkStream=Wb;function Ps(t={}){return t instanceof Ni.default?t:new Ni.default(t)}var ks={};Object.defineProperty(ks,"__esModule",{value:!0});const Xb=Oe,Kb=je,uc=he;class Yb{constructor(e){this._settings=e,this._fsStatSettings=new Kb.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return Xb.resolve(this._settings.cwd,e)}_makeEntry(e,r){const s={name:r,path:r,dirent:uc.fs.createDirentFromStats(r,e)};return this._settings.stats&&(s.stats=e),s}_isFatalError(e){return!uc.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}}ks.default=Yb,Object.defineProperty(ws,"__esModule",{value:!0});const Qb=Be,Jb=je,Zb=Ye,eE=ks;class tE extends eE.default{constructor(){super(...arguments);this._walkStream=Zb.walkStream,this._stat=Jb.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){const s=e.map(this._getFullEntryPath,this),n=new Qb.PassThrough({objectMode:!0});n._write=(i,a,o)=>this._getEntry(s[i],e[i],r).then(u=>{u!==null&&r.entryFilter(u)&&n.push(u),i===s.length-1&&n.end(),o()}).catch(o);for(let i=0;i<s.length;i++)n.write(i);return n}_getEntry(e,r,s){return this._getStat(e).then(n=>this._makeEntry(n,r)).catch(n=>{if(s.errorFilter(n))return null;throw n})}_getStat(e){return new Promise((r,s)=>{this._stat(e,this._fsStatSettings,(n,i)=>n===null?r(i):s(n))})}}ws.default=tE;var xr={},Hi={},ji={},Mi={};Object.defineProperty(Mi,"__esModule",{value:!0});const er=he;class rE{constructor(e,r,s){this._patterns=e,this._settings=r,this._micromatchOptions=s,this._storage=[],this._fillStorage()}_fillStorage(){const e=er.pattern.expandPatternsWithBraceExpansion(this._patterns);for(const r of e){const s=this._getPatternSegments(r),n=this._splitSegmentsIntoSections(s);this._storage.push({complete:n.length<=1,pattern:r,segments:s,sections:n})}}_getPatternSegments(e){return er.pattern.getPatternParts(e,this._micromatchOptions).map(s=>er.pattern.isDynamicPattern(s,this._settings)?{dynamic:!0,pattern:s,patternRe:er.pattern.makeRe(s,this._micromatchOptions)}:{dynamic:!1,pattern:s})}_splitSegmentsIntoSections(e){return er.array.splitWhen(e,r=>r.dynamic&&er.pattern.hasGlobStar(r.pattern))}}Mi.default=rE,Object.defineProperty(ji,"__esModule",{value:!0});const sE=Mi;class nE extends sE.default{match(e){const r=e.split("/"),s=r.length,n=this._storage.filter(i=>!i.complete||i.segments.length>s);for(const i of n){const a=i.sections[0];if(!i.complete&&s>a.length||r.every((u,l)=>{const f=i.segments[l];return!!(f.dynamic&&f.patternRe.test(u)||!f.dynamic&&f.pattern===u)}))return!0}return!1}}ji.default=nE,Object.defineProperty(Hi,"__esModule",{value:!0});const Is=he,iE=ji;class aE{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,s){const n=this._getMatcher(r),i=this._getNegativePatternsRe(s);return a=>this._filter(e,a,n,i)}_getMatcher(e){return new iE.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){const r=e.filter(Is.pattern.isAffectDepthOfReadingPattern);return Is.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,s,n){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;const i=Is.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(i,s)?!1:this._isSkippedByNegativePatterns(i,n)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){const s=r.split("/").length;if(e==="")return s;const n=e.split("/").length;return s-n}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!Is.pattern.matchAny(e,r)}}Hi.default=aE;var Ui={};Object.defineProperty(Ui,"__esModule",{value:!0});const Pt=he;class oE{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){const s=Pt.pattern.convertPatternsToRe(e,this._micromatchOptions),n=Pt.pattern.convertPatternsToRe(r,this._micromatchOptions);return i=>this._filter(i,s,n)}_filter(e,r,s){if(this._settings.unique&&this._isDuplicateEntry(e)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(e.path,s))return!1;const n=this._settings.baseNameMatch?e.name:e.path,i=this._isMatchToPatterns(n,r)&&!this._isMatchToPatterns(e.path,s);return this._settings.unique&&i&&this._createIndexRecord(e),i}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;const s=Pt.path.makeAbsolute(this._settings.cwd,e);return Pt.pattern.matchAny(s,r)}_isMatchToPatterns(e,r){const s=Pt.path.removeLeadingDotSegment(e);return Pt.pattern.matchAny(s,r)||Pt.pattern.matchAny(s+"/",r)}}Ui.default=oE;var Gi={};Object.defineProperty(Gi,"__esModule",{value:!0});const uE=he;class lE{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return uE.errno.isEnoentCodeError(e)||this._settings.suppressErrors}}Gi.default=lE;var qi={};Object.defineProperty(qi,"__esModule",{value:!0});const lc=he;class cE{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=lc.path.makeAbsolute(this._settings.cwd,r),r=lc.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}}qi.default=cE,Object.defineProperty(xr,"__esModule",{value:!0});const hE=Oe,fE=Hi,dE=Ui,pE=Gi,mE=qi;class gE{constructor(e){this._settings=e,this.errorFilter=new pE.default(this._settings),this.entryFilter=new dE.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new fE.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new mE.default(this._settings)}_getRootDirectory(e){return hE.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){const r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}}xr.default=gE,Object.defineProperty(wi,"__esModule",{value:!0});const yE=ws,DE=xr;class vE extends DE.default{constructor(){super(...arguments);this._reader=new yE.default(this._settings)}read(e){const r=this._getRootDirectory(e),s=this._getReaderOptions(e),n=[];return new Promise((i,a)=>{const o=this.api(r,e,s);o.once("error",a),o.on("data",u=>n.push(s.transform(u))),o.once("end",()=>i(n))})}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}}wi.default=vE;var zi={};Object.defineProperty(zi,"__esModule",{value:!0});const bE=Be,EE=ws,_E=xr;class wE extends _E.default{constructor(){super(...arguments);this._reader=new EE.default(this._settings)}read(e){const r=this._getRootDirectory(e),s=this._getReaderOptions(e),n=this.api(r,e,s),i=new bE.Readable({objectMode:!0,read:()=>{}});return n.once("error",a=>i.emit("error",a)).on("data",a=>i.emit("data",s.transform(a))).once("end",()=>i.emit("end")),i.once("close",()=>n.destroy()),i}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}}zi.default=wE;var Vi={},Wi={};Object.defineProperty(Wi,"__esModule",{value:!0});const CE=je,SE=Ye,AE=ks;class RE extends AE.default{constructor(){super(...arguments);this._walkSync=SE.walkSync,this._statSync=CE.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){const s=[];for(const n of e){const i=this._getFullEntryPath(n),a=this._getEntry(i,n,r);a===null||!r.entryFilter(a)||s.push(a)}return s}_getEntry(e,r,s){try{const n=this._getStat(e);return this._makeEntry(n,r)}catch(n){if(s.errorFilter(n))return null;throw n}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}Wi.default=RE,Object.defineProperty(Vi,"__esModule",{value:!0});const xE=Wi,$E=xr;class TE extends $E.default{constructor(){super(...arguments);this._reader=new xE.default(this._settings)}read(e){const r=this._getRootDirectory(e),s=this._getReaderOptions(e);return this.api(r,e,s).map(s.transform)}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}}Vi.default=TE;var cc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const e=lt,s=Math.max(Wr.cpus().length,1);t.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:e.lstat,lstatSync:e.lstatSync,stat:e.stat,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync};class n{constructor(a={}){this._options=a,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,s),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(a,o){return a===void 0?o:a}_getFileSystemMethods(a={}){return Object.assign(Object.assign({},t.DEFAULT_FILE_SYSTEM_ADAPTER),a)}}t.default=n})(cc);const hc=Re,fc=Zt,FE=wi,OE=zi,PE=Vi,Xi=cc,kt=he;async function dc(t,e){tr(t);const r=Ki(t,FE.default,e),s=await Promise.all(r);return kt.array.flatten(s)}(function(t){function e(a,o){tr(a);const u=Ki(a,PE.default,o);return kt.array.flatten(u)}t.sync=e;function r(a,o){tr(a);const u=Ki(a,OE.default,o);return kt.stream.merge(u)}t.stream=r;function s(a,o){tr(a);const u=fc.transform([].concat(a)),l=new Xi.default(o);return hc.generate(u,l)}t.generateTasks=s;function n(a,o){tr(a);const u=new Xi.default(o);return kt.pattern.isDynamicPattern(a,u)}t.isDynamicPattern=n;function i(a){return tr(a),kt.path.escape(a)}t.escapePath=i})(dc||(dc={}));function Ki(t,e,r){const s=fc.transform([].concat(t)),n=new Xi.default(r),i=hc.generate(s,n),a=new e(n);return i.map(a.read,a)}function tr(t){if(![].concat(t).every(s=>kt.string.isString(s)&&!kt.string.isEmpty(s)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}var Ls={exports:{}},Yi={exports:{}},Qi={},ut={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function s(h){return r.includes(h)}const n=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...r];function i(h){return n.includes(h)}const a=["null","undefined","string","number","bigint","boolean","symbol"];function o(h){return a.includes(h)}function u(h){return v=>typeof v===h}const{toString:l}=Object.prototype,f=h=>{const v=l.call(h).slice(8,-1);if(/HTML\w+Element/.test(v)&&c.domElement(h))return"HTMLElement";if(i(v))return v},d=h=>v=>f(v)===h;function c(h){if(h===null)return"null";switch(typeof h){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(c.observable(h))return"Observable";if(c.array(h))return"Array";if(c.buffer(h))return"Buffer";const v=f(h);if(v)return v;if(h instanceof String||h instanceof Boolean||h instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}c.undefined=u("undefined"),c.string=u("string");const g=u("number");c.number=h=>g(h)&&!c.nan(h),c.bigint=u("bigint"),c.function_=u("function"),c.null_=h=>h===null,c.class_=h=>c.function_(h)&&h.toString().startsWith("class "),c.boolean=h=>h===!0||h===!1,c.symbol=u("symbol"),c.numericString=h=>c.string(h)&&!c.emptyStringOrWhitespace(h)&&!Number.isNaN(Number(h)),c.array=(h,v)=>Array.isArray(h)?c.function_(v)?h.every(v):!0:!1,c.buffer=h=>{var v,$,T,j;return(j=(T=($=(v=h)===null||v===void 0?void 0:v.constructor)===null||$===void 0?void 0:$.isBuffer)===null||T===void 0?void 0:T.call($,h))!==null&&j!==void 0?j:!1},c.nullOrUndefined=h=>c.null_(h)||c.undefined(h),c.object=h=>!c.null_(h)&&(typeof h=="object"||c.function_(h)),c.iterable=h=>{var v;return c.function_((v=h)===null||v===void 0?void 0:v[Symbol.iterator])},c.asyncIterable=h=>{var v;return c.function_((v=h)===null||v===void 0?void 0:v[Symbol.asyncIterator])},c.generator=h=>{var v,$;return c.iterable(h)&&c.function_((v=h)===null||v===void 0?void 0:v.next)&&c.function_(($=h)===null||$===void 0?void 0:$.throw)},c.asyncGenerator=h=>c.asyncIterable(h)&&c.function_(h.next)&&c.function_(h.throw),c.nativePromise=h=>d("Promise")(h);const p=h=>{var v,$;return c.function_((v=h)===null||v===void 0?void 0:v.then)&&c.function_(($=h)===null||$===void 0?void 0:$.catch)};c.promise=h=>c.nativePromise(h)||p(h),c.generatorFunction=d("GeneratorFunction"),c.asyncGeneratorFunction=h=>f(h)==="AsyncGeneratorFunction",c.asyncFunction=h=>f(h)==="AsyncFunction",c.boundFunction=h=>c.function_(h)&&!h.hasOwnProperty("prototype"),c.regExp=d("RegExp"),c.date=d("Date"),c.error=d("Error"),c.map=h=>d("Map")(h),c.set=h=>d("Set")(h),c.weakMap=h=>d("WeakMap")(h),c.weakSet=h=>d("WeakSet")(h),c.int8Array=d("Int8Array"),c.uint8Array=d("Uint8Array"),c.uint8ClampedArray=d("Uint8ClampedArray"),c.int16Array=d("Int16Array"),c.uint16Array=d("Uint16Array"),c.int32Array=d("Int32Array"),c.uint32Array=d("Uint32Array"),c.float32Array=d("Float32Array"),c.float64Array=d("Float64Array"),c.bigInt64Array=d("BigInt64Array"),c.bigUint64Array=d("BigUint64Array"),c.arrayBuffer=d("ArrayBuffer"),c.sharedArrayBuffer=d("SharedArrayBuffer"),c.dataView=d("DataView"),c.enumCase=(h,v)=>Object.values(v).includes(h),c.directInstanceOf=(h,v)=>Object.getPrototypeOf(h)===v.prototype,c.urlInstance=h=>d("URL")(h),c.urlString=h=>{if(!c.string(h))return!1;try{return new URL(h),!0}catch{return!1}},c.truthy=h=>Boolean(h),c.falsy=h=>!h,c.nan=h=>Number.isNaN(h),c.primitive=h=>c.null_(h)||o(typeof h),c.integer=h=>Number.isInteger(h),c.safeInteger=h=>Number.isSafeInteger(h),c.plainObject=h=>{if(l.call(h)!=="[object Object]")return!1;const v=Object.getPrototypeOf(h);return v===null||v===Object.getPrototypeOf({})},c.typedArray=h=>s(f(h));const D=h=>c.safeInteger(h)&&h>=0;c.arrayLike=h=>!c.nullOrUndefined(h)&&!c.function_(h)&&D(h.length),c.inRange=(h,v)=>{if(c.number(v))return h>=Math.min(0,v)&&h<=Math.max(v,0);if(c.array(v)&&v.length===2)return h>=Math.min(...v)&&h<=Math.max(...v);throw new TypeError(`Invalid range: ${JSON.stringify(v)}`)};const _=1,b=["innerHTML","ownerDocument","style","attributes","nodeValue"];c.domElement=h=>c.object(h)&&h.nodeType===_&&c.string(h.nodeName)&&!c.plainObject(h)&&b.every(v=>v in h),c.observable=h=>{var v,$,T,j;return h?h===(($=(v=h)[Symbol.observable])===null||$===void 0?void 0:$.call(v))||h===((j=(T=h)["@@observable"])===null||j===void 0?void 0:j.call(T)):!1},c.nodeStream=h=>c.object(h)&&c.function_(h.pipe)&&!c.observable(h),c.infinite=h=>h===1/0||h===-1/0;const C=h=>v=>c.integer(v)&&Math.abs(v%2)===h;c.evenInteger=C(0),c.oddInteger=C(1),c.emptyArray=h=>c.array(h)&&h.length===0,c.nonEmptyArray=h=>c.array(h)&&h.length>0,c.emptyString=h=>c.string(h)&&h.length===0,c.nonEmptyString=h=>c.string(h)&&h.length>0;const x=h=>c.string(h)&&!/\S/.test(h);c.emptyStringOrWhitespace=h=>c.emptyString(h)||x(h),c.emptyObject=h=>c.object(h)&&!c.map(h)&&!c.set(h)&&Object.keys(h).length===0,c.nonEmptyObject=h=>c.object(h)&&!c.map(h)&&!c.set(h)&&Object.keys(h).length>0,c.emptySet=h=>c.set(h)&&h.size===0,c.nonEmptySet=h=>c.set(h)&&h.size>0,c.emptyMap=h=>c.map(h)&&h.size===0,c.nonEmptyMap=h=>c.map(h)&&h.size>0,c.propertyKey=h=>c.any([c.string,c.number,c.symbol],h),c.formData=h=>d("FormData")(h),c.urlSearchParams=h=>d("URLSearchParams")(h);const A=(h,v,$)=>{if(!c.function_(v))throw new TypeError(`Invalid predicate: ${JSON.stringify(v)}`);if($.length===0)throw new TypeError("Invalid number of values");return h.call($,v)};c.any=(h,...v)=>(c.array(h)?h:[h]).some(T=>A(Array.prototype.some,T,v)),c.all=(h,...v)=>A(Array.prototype.every,h,v);const y=(h,v,$,T={})=>{if(!h){const{multipleValues:j}=T,S=j?`received values of types ${[...new Set($.map(I=>`\`${c(I)}\``))].join(", ")}`:`received value of type \`${c($)}\``;throw new TypeError(`Expected value which is \`${v}\`, ${S}.`)}};e.assert={undefined:h=>y(c.undefined(h),"undefined",h),string:h=>y(c.string(h),"string",h),number:h=>y(c.number(h),"number",h),bigint:h=>y(c.bigint(h),"bigint",h),function_:h=>y(c.function_(h),"Function",h),null_:h=>y(c.null_(h),"null",h),class_:h=>y(c.class_(h),"Class",h),boolean:h=>y(c.boolean(h),"boolean",h),symbol:h=>y(c.symbol(h),"symbol",h),numericString:h=>y(c.numericString(h),"string with a number",h),array:(h,v)=>{y(c.array(h),"Array",h),v&&h.forEach(v)},buffer:h=>y(c.buffer(h),"Buffer",h),nullOrUndefined:h=>y(c.nullOrUndefined(h),"null or undefined",h),object:h=>y(c.object(h),"Object",h),iterable:h=>y(c.iterable(h),"Iterable",h),asyncIterable:h=>y(c.asyncIterable(h),"AsyncIterable",h),generator:h=>y(c.generator(h),"Generator",h),asyncGenerator:h=>y(c.asyncGenerator(h),"AsyncGenerator",h),nativePromise:h=>y(c.nativePromise(h),"native Promise",h),promise:h=>y(c.promise(h),"Promise",h),generatorFunction:h=>y(c.generatorFunction(h),"GeneratorFunction",h),asyncGeneratorFunction:h=>y(c.asyncGeneratorFunction(h),"AsyncGeneratorFunction",h),asyncFunction:h=>y(c.asyncFunction(h),"AsyncFunction",h),boundFunction:h=>y(c.boundFunction(h),"Function",h),regExp:h=>y(c.regExp(h),"RegExp",h),date:h=>y(c.date(h),"Date",h),error:h=>y(c.error(h),"Error",h),map:h=>y(c.map(h),"Map",h),set:h=>y(c.set(h),"Set",h),weakMap:h=>y(c.weakMap(h),"WeakMap",h),weakSet:h=>y(c.weakSet(h),"WeakSet",h),int8Array:h=>y(c.int8Array(h),"Int8Array",h),uint8Array:h=>y(c.uint8Array(h),"Uint8Array",h),uint8ClampedArray:h=>y(c.uint8ClampedArray(h),"Uint8ClampedArray",h),int16Array:h=>y(c.int16Array(h),"Int16Array",h),uint16Array:h=>y(c.uint16Array(h),"Uint16Array",h),int32Array:h=>y(c.int32Array(h),"Int32Array",h),uint32Array:h=>y(c.uint32Array(h),"Uint32Array",h),float32Array:h=>y(c.float32Array(h),"Float32Array",h),float64Array:h=>y(c.float64Array(h),"Float64Array",h),bigInt64Array:h=>y(c.bigInt64Array(h),"BigInt64Array",h),bigUint64Array:h=>y(c.bigUint64Array(h),"BigUint64Array",h),arrayBuffer:h=>y(c.arrayBuffer(h),"ArrayBuffer",h),sharedArrayBuffer:h=>y(c.sharedArrayBuffer(h),"SharedArrayBuffer",h),dataView:h=>y(c.dataView(h),"DataView",h),enumCase:(h,v)=>y(c.enumCase(h,v),"EnumCase",h),urlInstance:h=>y(c.urlInstance(h),"URL",h),urlString:h=>y(c.urlString(h),"string with a URL",h),truthy:h=>y(c.truthy(h),"truthy",h),falsy:h=>y(c.falsy(h),"falsy",h),nan:h=>y(c.nan(h),"NaN",h),primitive:h=>y(c.primitive(h),"primitive",h),integer:h=>y(c.integer(h),"integer",h),safeInteger:h=>y(c.safeInteger(h),"integer",h),plainObject:h=>y(c.plainObject(h),"plain object",h),typedArray:h=>y(c.typedArray(h),"TypedArray",h),arrayLike:h=>y(c.arrayLike(h),"array-like",h),domElement:h=>y(c.domElement(h),"HTMLElement",h),observable:h=>y(c.observable(h),"Observable",h),nodeStream:h=>y(c.nodeStream(h),"Node.js Stream",h),infinite:h=>y(c.infinite(h),"infinite number",h),emptyArray:h=>y(c.emptyArray(h),"empty array",h),nonEmptyArray:h=>y(c.nonEmptyArray(h),"non-empty array",h),emptyString:h=>y(c.emptyString(h),"empty string",h),nonEmptyString:h=>y(c.nonEmptyString(h),"non-empty string",h),emptyStringOrWhitespace:h=>y(c.emptyStringOrWhitespace(h),"empty string or whitespace",h),emptyObject:h=>y(c.emptyObject(h),"empty object",h),nonEmptyObject:h=>y(c.nonEmptyObject(h),"non-empty object",h),emptySet:h=>y(c.emptySet(h),"empty set",h),nonEmptySet:h=>y(c.nonEmptySet(h),"non-empty set",h),emptyMap:h=>y(c.emptyMap(h),"empty map",h),nonEmptyMap:h=>y(c.nonEmptyMap(h),"non-empty map",h),propertyKey:h=>y(c.propertyKey(h),"PropertyKey",h),formData:h=>y(c.formData(h),"FormData",h),urlSearchParams:h=>y(c.urlSearchParams(h),"URLSearchParams",h),evenInteger:h=>y(c.evenInteger(h),"even integer",h),oddInteger:h=>y(c.oddInteger(h),"odd integer",h),directInstanceOf:(h,v)=>y(c.directInstanceOf(h,v),"T",h),inRange:(h,v)=>y(c.inRange(h,v),"in range",h),any:(h,...v)=>y(c.any(h,...v),"predicate returns truthy for any value",v,{multipleValues:!0}),all:(h,...v)=>y(c.all(h,...v),"predicate returns truthy for all values",v,{multipleValues:!0})},Object.defineProperties(c,{class:{value:c.class_},function:{value:c.function_},null:{value:c.null_}}),Object.defineProperties(e.assert,{class:{value:e.assert.class_},function:{value:e.assert.function_},null:{value:e.assert.null_}}),e.default=c,t.exports=c,t.exports.default=c,t.exports.assert=e.assert})(ut,ut.exports);var Ji={},Zi={exports:{}};class pc extends Error{constructor(e){super(e||"Promise was canceled");this.name="CancelError"}get isCanceled(){return!0}}class sn{static fn(e){return(...r)=>new sn((s,n,i)=>{r.push(i),e(...r).then(s,n)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,s)=>{this._reject=s;const n=o=>{(!this._isCanceled||!a.shouldReject)&&(this._isPending=!1,r(o))},i=o=>{this._isPending=!1,s(o)},a=o=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(o)};return Object.defineProperties(a,{shouldReject:{get:()=>this._rejectOnCancel,set:o=>{this._rejectOnCancel=o}}}),e(n,i,a)})}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(const r of this._cancelHandlers)r()}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new pc(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(sn.prototype,Promise.prototype),Zi.exports=sn,Zi.exports.CancelError=pc;var $r={},Tr={},ea={exports:{}},ta={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});function r(n){return n.encrypted}const s=(n,i)=>{let a;typeof i=="function"?a={connect:i}:a=i;const o=typeof a.connect=="function",u=typeof a.secureConnect=="function",l=typeof a.close=="function",f=()=>{o&&a.connect(),r(n)&&u&&(n.authorized?a.secureConnect():n.authorizationError||n.once("secureConnect",a.secureConnect)),l&&n.once("close",a.close)};n.writable&&!n.connecting?f():n.connecting?n.once("connect",f):n.destroyed&&l&&a.close(n._hadError)};e.default=s,t.exports=s,t.exports.default=s})(ta,ta.exports),function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=ta.exports,s=St,n=Number(process.versions.node.split(".")[0]),i=a=>{if(a.timings)return a.timings;const o={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};a.timings=o;const u=g=>{const p=g.emit.bind(g);g.emit=(D,..._)=>(D==="error"&&(o.error=Date.now(),o.phases.total=o.error-o.start,g.emit=p),p(D,..._))};u(a);const l=()=>{o.abort=Date.now(),(!o.response||n>=13)&&(o.phases.total=Date.now()-o.start)};a.prependOnceListener("abort",l);const f=g=>{if(o.socket=Date.now(),o.phases.wait=o.socket-o.start,s.types.isProxy(g))return;const p=()=>{o.lookup=Date.now(),o.phases.dns=o.lookup-o.socket};g.prependOnceListener("lookup",p),r.default(g,{connect:()=>{o.connect=Date.now(),o.lookup===void 0&&(g.removeListener("lookup",p),o.lookup=o.connect,o.phases.dns=o.lookup-o.socket),o.phases.tcp=o.connect-o.lookup},secureConnect:()=>{o.secureConnect=Date.now(),o.phases.tls=o.secureConnect-o.connect}})};a.socket?f(a.socket):a.prependOnceListener("socket",f);const d=()=>{var g;o.upload=Date.now(),o.phases.request=o.upload-((g=o.secureConnect)!==null&&g!==void 0?g:o.connect)};return(()=>typeof a.writableFinished=="boolean"?a.writableFinished:a.finished&&a.outputSize===0&&(!a.socket||a.socket.writableLength===0))()?d():a.prependOnceListener("finish",d),a.prependOnceListener("response",g=>{o.response=Date.now(),o.phases.firstByte=o.response-o.upload,g.timings=o,u(g),g.prependOnceListener("end",()=>{o.end=Date.now(),o.phases.download=o.end-o.response,o.phases.total=o.end-o.start}),g.prependOnceListener("aborted",l)}),o};e.default=i,t.exports=i,t.exports.default=i}(ea,ea.exports);var ra={exports:{}};const{V4MAPPED:kE,ADDRCONFIG:IE,ALL:mc,promises:{Resolver:gc},lookup:LE}=bf,{promisify:sa}=St,BE=Wr,rr=Symbol("cacheableLookupCreateConnection"),na=Symbol("cacheableLookupInstance"),yc=Symbol("expires"),NE=typeof mc=="number",Dc=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},HE=t=>{for(const e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},vc=()=>{let t=!1,e=!1;for(const r of Object.values(BE.networkInterfaces()))for(const s of r)if(!s.internal&&(s.family==="IPv6"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},jE=t=>Symbol.iterator in t,bc={ttl:!0},ME={all:!0};class Ec{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:s=3600,errorTtl:n=.15,resolver:i=new gc,lookup:a=LE}={}){if(this.maxTtl=r,this.errorTtl=n,this._cache=e,this._resolver=i,this._dnsLookup=sa(a),this._resolver instanceof gc?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=sa(this._resolver.resolve4.bind(this._resolver)),this._resolve6=sa(this._resolver.resolve6.bind(this._resolver))),this._iface=vc(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,s<1)this._fallback=!1;else{this._fallback=!0;const o=setInterval(()=>{this._hostnamesToFallback.clear()},s*1e3);o.unref&&o.unref()}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,s){if(typeof r=="function"?(s=r,r={}):typeof r=="number"&&(r={family:r}),!s)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(n=>{r.all?s(null,n):s(null,n.address,n.family,n.expires,n.ttl)},s)}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let s=await this.query(e);if(r.family===6){const n=s.filter(i=>i.family===6);r.hints&kE&&(NE&&r.hints&mc||n.length===0)?HE(s):s=n}else r.family===4&&(s=s.filter(n=>n.family===4));if(r.hints&IE){const{_iface:n}=this;s=s.filter(i=>i.family===6?n.has6:n.has4)}if(s.length===0){const n=new Error(`cacheableLookup ENOTFOUND ${e}`);throw n.code="ENOTFOUND",n.hostname=e,n}return r.all?s:s[0]}async query(e){let r=await this._cache.get(e);if(!r){const s=this._pending[e];if(s)r=await s;else{const n=this.queryAndCache(e);this._pending[e]=n;try{r=await n}finally{delete this._pending[e]}}}return r=r.map(s=>({...s})),r}async _resolve(e){const r=async l=>{try{return await l}catch(f){if(f.code==="ENODATA"||f.code==="ENOTFOUND")return[];throw f}},[s,n]=await Promise.all([this._resolve4(e,bc),this._resolve6(e,bc)].map(l=>r(l)));let i=0,a=0,o=0;const u=Date.now();for(const l of s)l.family=4,l.expires=u+l.ttl*1e3,i=Math.max(i,l.ttl);for(const l of n)l.family=6,l.expires=u+l.ttl*1e3,a=Math.max(a,l.ttl);return s.length>0?n.length>0?o=Math.min(i,a):o=i:o=a,{entries:[...s,...n],cacheTtl:o}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,s){if(this.maxTtl>0&&s>0){s=Math.min(s,this.maxTtl)*1e3,r[yc]=Date.now()+s;try{await this._cache.set(e,r,s)}catch(n){this.lookupAsync=async()=>{const i=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw i.cause=n,i}}jE(this._cache)&&this._tick(s)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,ME);let r=await this._resolve(e);r.entries.length===0&&this._fallback&&(r=await this._lookup(e),r.entries.length!==0&&this._hostnamesToFallback.add(e));const s=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,s),r.entries}_tick(e){const r=this._nextRemovalTime;(!r||e<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let s=1/0;const n=Date.now();for(const[i,a]of this._cache){const o=a[yc];n>=o?this._cache.delete(i):o<s&&(s=o)}s!==1/0&&this._tick(s-n)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(Dc(e),rr in e)throw new Error("CacheableLookup has been already installed");e[rr]=e.createConnection,e[na]=this,e.createConnection=(r,s)=>("lookup"in r||(r.lookup=this.lookup),e[rr](r,s))}uninstall(e){if(Dc(e),e[rr]){if(e[na]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[rr],delete e[rr],delete e[na]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=vc(),(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()}}ra.exports=Ec,ra.exports.default=Ec;const UE="text/plain",GE="us-ascii",_c=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),qE=(t,{stripHash:e})=>{const r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:s,data:n,hash:i}=r.groups;const a=s.split(";");i=e?"":i;let o=!1;a[a.length-1]==="base64"&&(a.pop(),o=!0);const u=(a.shift()||"").toLowerCase(),f=[...a.map(d=>{let[c,g=""]=d.split("=").map(p=>p.trim());return c==="charset"&&(g=g.toLowerCase(),g===GE)?"":`${c}${g?`=${g}`:""}`}).filter(Boolean)];return o&&f.push("base64"),(f.length!==0||u&&u!==UE)&&f.unshift(u),`data:${f.join(";")},${o?n.trim():n}${i?`#${i}`:""}`},zE=(t,e)=>{if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return qE(t,e);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");const r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));const n=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&n.protocol==="https:"&&(n.protocol="http:"),e.forceHttps&&n.protocol==="http:"&&(n.protocol="https:"),e.stripAuthentication&&(n.username="",n.password=""),e.stripHash?n.hash="":e.stripTextFragment&&(n.hash=n.hash.replace(/#?:~:text.*?$/i,"")),n.pathname&&(n.pathname=n.pathname.replace(/(?<!\b(?:[a-z][a-z\d+\-.]{1,50}:))\/{2,}/g,"/")),n.pathname)try{n.pathname=decodeURI(n.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let a=n.pathname.split("/");const o=a[a.length-1];_c(o,e.removeDirectoryIndex)&&(a=a.slice(0,a.length-1),n.pathname=a.slice(1).join("/")+"/")}if(n.hostname&&(n.hostname=n.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(n.hostname)&&(n.hostname=n.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(const a of[...n.searchParams.keys()])_c(a,e.removeQueryParameters)&&n.searchParams.delete(a);e.removeQueryParameters===!0&&(n.search=""),e.sortQueryParameters&&n.searchParams.sort(),e.removeTrailingSlash&&(n.pathname=n.pathname.replace(/\/$/,""));const i=t;return t=n.toString(),!e.removeSingleSlash&&n.pathname==="/"&&!i.endsWith("/")&&n.hash===""&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||n.pathname==="/")&&n.hash===""&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t};var VE=zE;const WE=new Set([200,203,204,206,300,301,404,405,410,414,501]),XE=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),KE=new Set([500,502,503,504]),YE={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},QE={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function It(t){const e=parseInt(t,10);return isFinite(e)?e:0}function JE(t){return t?KE.has(t.status):!0}function ia(t){const e={};if(!t)return e;const r=t.trim().split(/\s*,\s*/);for(const s of r){const[n,i]=s.split(/\s*=\s*/,2);e[n]=i===void 0?!0:i.replace(/^"|"$/g,"")}return e}function ZE(t){let e=[];for(const r in t){const s=t[r];e.push(s===!0?r:r+"="+s)}if(!!e.length)return e.join(", ")}var e1=class{constructor(e,r,{shared:s,cacheHeuristic:n,immutableMinTimeToLive:i,ignoreCargoCult:a,_fromObject:o}={}){if(o){this._fromObject(o);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=s!==!1,this._cacheHeuristic=n!==void 0?n:.1,this._immutableMinTtl=i!==void 0?i:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=ia(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=ia(e.headers["cache-control"]),a&&"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":ZE(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())&&XE.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||WE.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);const r=ia(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;const r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const s of r)if(e.headers[s]!==this._reqHeaders[s])return!1;return!0}_copyWithoutHopByHopHeaders(e){const r={};for(const s in e)YE[s]||(r[s]=e[s]);if(e.connection){const s=e.connection.trim().split(/\s*,\s*/);for(const n of s)delete r[n]}if(r.warning){const s=r.warning.split(/,/).filter(n=>!/^\s*1[0-9][0-9]/.test(n));s.length?r.warning=s.join(",").trim():delete r.warning}return r}responseHeaders(){const 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(){const e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue();const r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return It(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 It(this._rescc["s-maxage"])}if(this._rescc["max-age"])return It(this._rescc["max-age"]);const e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){const s=Date.parse(this._resHeaders.expires);return Number.isNaN(s)||s<r?0:Math.max(e,(s-r)/1e3)}if(this._resHeaders["last-modified"]){const s=Date.parse(this._resHeaders["last-modified"]);if(isFinite(s)&&r>s)return Math.max(e,(r-s)/1e3*this._cacheHeuristic)}return e}timeToLive(){const e=this.maxAge()-this.age(),r=e+It(this._rescc["stale-if-error"]),s=e+It(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,s)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+It(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+It(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);const 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"]){const n=r["if-none-match"].split(/,/).filter(i=>!/^\s*W\//.test(i));n.length?r["if-none-match"]=n.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()&&JE(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let s=!1;if(r.status!==void 0&&r.status!=304?s=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?s=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?s=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?s=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(s=!0),!s)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};const n={};for(const a in this._resHeaders)n[a]=a in r.headers&&!QE[a]?r.headers[a]:this._resHeaders[a];const i=Object.assign({},r,{status:this._status,method:this._method,headers:n});return{policy:new this.constructor(e,i,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}},aa=t=>{const e={};for(const[r,s]of Object.entries(t))e[r.toLowerCase()]=s;return e};const t1=Be.Readable,r1=aa;class s1 extends t1{constructor(e,r,s,n){if(typeof e!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(s instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof n!="string")throw new TypeError("Argument `url` should be a string");super();this.statusCode=e,this.headers=r1(r),this.body=s,this.url=n}_read(){this.push(this.body),this.push(null)}}var n1=s1;const i1=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];var wc=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");const r=new Set(Object.keys(t).concat(i1)),s={};for(const n of r)n in e||(s[n]={get(){const i=t[n];return typeof i=="function"?i.bind(t):i},set(i){t[n]=i},enumerable:!0,configurable:!1});return Object.defineProperties(e,s),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};const a1=Be.PassThrough,o1=wc,u1=t=>{if(!(t&&t.pipe))throw new TypeError("Parameter `response` must be a response stream.");const e=new a1;return o1(t,e),t.pipe(e)};var l1=u1,oa={};oa.stringify=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="",s=Array.isArray(e);r=s?"[":"{";var n=!0;for(var i in e){var a=typeof e[i]=="function"||!s&&typeof e[i]>"u";Object.hasOwnProperty.call(e,i)&&!a&&(n||(r+=","),n=!1,s?e[i]==null?r+="null":r+=t(e[i]):e[i]!==void 0&&(r+=t(i)+":"+t(e[i])))}return r+=s?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e>"u"?"null":JSON.stringify(e)},oa.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})};const c1=gt,Cc=oa;BigInt.prototype.toJSON=function(){return this.toString()};const h1=t=>{const e={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd"};if(t.adapter||t.uri){const r=t.adapter||/^[^:]*/.exec(t.uri)[0];return new(wf(e[r]))(t)}return new Map};class f1 extends c1{constructor(e,r){super();if(this.opts=Object.assign({namespace:"keyv",serialize:Cc.stringify,deserialize:Cc.parse},typeof e=="string"?{uri:e}:e,r),!this.opts.store){const s=Object.assign({},this.opts);this.opts.store=h1(s)}typeof this.opts.store.on=="function"&&this.opts.store.on("error",s=>this.emit("error",s)),this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}get(e,r){const s=this._getKeyPrefix(e),{store:n}=this.opts;return Promise.resolve().then(()=>n.get(s)).then(i=>typeof i=="string"?this.opts.deserialize(i):i).then(i=>{if(i!=null){if(typeof i.expires=="number"&&Date.now()>i.expires){this.delete(e);return}return r&&r.raw?i:i.value}})}set(e,r,s){const n=this._getKeyPrefix(e);typeof s>"u"&&(s=this.opts.ttl),s===0&&(s=void 0);const{store:i}=this.opts;return Promise.resolve().then(()=>{const a=typeof s=="number"?Date.now()+s:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:a},this.opts.serialize(r)}).then(a=>i.set(n,a,s)).then(()=>!0)}delete(e){const r=this._getKeyPrefix(e),{store:s}=this.opts;return Promise.resolve().then(()=>s.delete(r))}clear(){const{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}}var d1=f1;const p1=gt,Bs=hr,m1=VE,g1=vr.exports,ua=e1,Sc=n1,y1=aa,D1=l1,v1=d1;class mt{constructor(e,r){if(typeof e!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new v1({uri:typeof r=="string"&&r,store:typeof r!="string"&&r,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(r,s)=>{let n;if(typeof r=="string")n=la(Bs.parse(r)),r={};else if(r instanceof Bs.URL)n=la(Bs.parse(r.toString())),r={};else{const[d,...c]=(r.path||"").split("?"),g=c.length>0?`?${c.join("?")}`:"";n=la({...r,pathname:d,search:g})}r={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...r,...b1(n)},r.headers=y1(r.headers);const i=new p1,a=m1(Bs.format(n),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),o=`${r.method}:${a}`;let u=!1,l=!1;const f=d=>{l=!0;let c=!1,g;const p=new Promise(_=>{g=()=>{c||(c=!0,_())}}),D=_=>{if(u&&!d.forceRefresh){_.status=_.statusCode;const C=ua.fromObject(u.cachePolicy).revalidatedPolicy(d,_);if(!C.modified){const x=C.policy.responseHeaders();_=new Sc(u.statusCode,x,u.body,u.url),_.cachePolicy=C.policy,_.fromCache=!0}}_.fromCache||(_.cachePolicy=new ua(d,_,d),_.fromCache=!1);let b;d.cache&&_.cachePolicy.storable()?(b=D1(_),(async()=>{try{const C=g1.buffer(_);if(await Promise.race([p,new Promise(h=>_.once("end",h))]),c)return;const x=await C,A={cachePolicy:_.cachePolicy.toObject(),url:_.url,statusCode:_.fromCache?u.statusCode:_.statusCode,body:x};let y=d.strictTtl?_.cachePolicy.timeToLive():void 0;d.maxTtl&&(y=y?Math.min(y,d.maxTtl):d.maxTtl),await this.cache.set(o,A,y)}catch(C){i.emit("error",new mt.CacheError(C))}})()):d.cache&&u&&(async()=>{try{await this.cache.delete(o)}catch(C){i.emit("error",new mt.CacheError(C))}})(),i.emit("response",b||_),typeof s=="function"&&s(b||_)};try{const _=e(d,D);_.once("error",g),_.once("abort",g),i.emit("request",_)}catch(_){i.emit("error",new mt.RequestError(_))}};return(async()=>{const d=async g=>{await Promise.resolve();const p=g.cache?await this.cache.get(o):void 0;if(typeof p>"u")return f(g);const D=ua.fromObject(p.cachePolicy);if(D.satisfiesWithoutRevalidation(g)&&!g.forceRefresh){const _=D.responseHeaders(),b=new Sc(p.statusCode,_,p.body,p.url);b.cachePolicy=D,b.fromCache=!0,i.emit("response",b),typeof s=="function"&&s(b)}else u=p,g.headers=D.revalidationHeaders(g),f(g)},c=g=>i.emit("error",new mt.CacheError(g));this.cache.once("error",c),i.on("response",()=>this.cache.removeListener("error",c));try{await d(r)}catch(g){r.automaticFailover&&!l&&f(r),i.emit("error",new mt.CacheError(g))}})(),i}}}function b1(t){const e={...t};return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e}function la(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}}mt.RequestError=class extends Error{constructor(t){super(t.message);this.name="RequestError",Object.assign(this,t)}},mt.CacheError=class extends Error{constructor(t){super(t.message);this.name="CacheError",Object.assign(this,t)}};var E1=mt;const{Transform:_1,PassThrough:w1}=Be,ca=Ef,C1=wc;var S1=t=>{const e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;const r=e==="br";if(r&&typeof ca.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let s=!0;const n=new _1({transform(o,u,l){s=!1,l(null,o)},flush(o){o()}}),i=new w1({autoDestroy:!1,destroy(o,u){t.destroy(),u(o)}}),a=r?ca.createBrotliDecompress():ca.createUnzip();return a.once("error",o=>{if(s&&!t.readable){i.end();return}i.destroy(o)}),C1(t,i),t.pipe(n).pipe(a).pipe(i),i};class A1{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){this.cache.set(e,r),this._size++,this._size>=this.maxSize&&(this._size=0,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)){const 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){const 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(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(const r of this.oldCache.keys())this.cache.has(r)||e++;return this._size+e}}var Ac=A1;const R1=gt,x1=ao,$1=cn,T1=Ac,Pe=Symbol("currentStreamsCount"),Rc=Symbol("request"),We=Symbol("cachedOriginSet"),sr=Symbol("gracefullyClosing"),F1=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],O1=(t,e,r)=>{let s=0,n=t.length;for(;s<n;){const i=s+n>>>1;r(t[i],e)?s=i+1:n=i}return s},P1=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,ha=(t,e)=>{for(const r of t)r[We].length<e[We].length&&r[We].every(s=>e[We].includes(s))&&r[Pe]+e[Pe]<=e.remoteSettings.maxConcurrentStreams&&$c(r)},k1=(t,e)=>{for(const r of t)e[We].length<r[We].length&&e[We].every(s=>r[We].includes(s))&&e[Pe]+r[Pe]<=r.remoteSettings.maxConcurrentStreams&&$c(e)},xc=({agent:t,isFree:e})=>{const r={};for(const s in t.sessions){const i=t.sessions[s].filter(a=>{const o=a[Ct.kCurrentStreamsCount]<a.remoteSettings.maxConcurrentStreams;return e?o:!o});i.length!==0&&(r[s]=i)}return r},$c=t=>{t[sr]=!0,t[Pe]===0&&t.close()};class Ct extends R1{constructor({timeout:e=6e4,maxSessions:r=1/0,maxFreeSessions:s=10,maxCachedTlsSessions:n=100}={}){super();this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxFreeSessions=s,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new T1({maxSize:n})}static normalizeOrigin(e,r){return typeof e=="string"&&(e=new URL(e)),r&&e.hostname!==r&&(e.hostname=r),e.origin}normalizeOptions(e){let r="";if(e)for(const s of F1)e[s]&&(r+=`:${e[s]}`);return r}_tryToCreateNewSession(e,r){if(!(e in this.queue)||!(r in this.queue[e]))return;const s=this.queue[e][r];this._sessionsCount<this.maxSessions&&!s.completed&&(s.completed=!0,s())}getSession(e,r,s){return new Promise((n,i)=>{Array.isArray(s)?(s=[...s],n()):s=[{resolve:n,reject:i}];const a=this.normalizeOptions(r),o=Ct.normalizeOrigin(e,r&&r.servername);if(o===void 0){for(const{reject:f}of s)f(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(a in this.sessions){const f=this.sessions[a];let d=-1,c=-1,g;for(const p of f){const D=p.remoteSettings.maxConcurrentStreams;if(D<d)break;if(p[We].includes(o)){const _=p[Pe];if(_>=D||p[sr]||p.destroyed)continue;g||(d=D),_>c&&(g=p,c=_)}}if(g){if(s.length!==1){for(const{reject:p}of s){const D=new Error(`Expected the length of listeners to be 1, got ${s.length}.
|
|
92
|
+
Please report this to https://github.com/szmarczak/http2-wrapper/`);p(D)}return}s[0].resolve(g);return}}if(a in this.queue){if(o in this.queue[a]){this.queue[a][o].listeners.push(...s),this._tryToCreateNewSession(a,o);return}}else this.queue[a]={};const u=()=>{a in this.queue&&this.queue[a][o]===l&&(delete this.queue[a][o],Object.keys(this.queue[a]).length===0&&delete this.queue[a])},l=()=>{const f=`${o}:${a}`;let d=!1;try{const c=$1.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(f),...r});c[Pe]=0,c[sr]=!1;const g=()=>c[Pe]<c.remoteSettings.maxConcurrentStreams;let p=!0;c.socket.once("session",_=>{this.tlsSessionCache.set(f,_)}),c.once("error",_=>{for(const{reject:b}of s)b(_);this.tlsSessionCache.delete(f)}),c.setTimeout(this.timeout,()=>{c.destroy()}),c.once("close",()=>{if(d){p&&this._freeSessionsCount--,this._sessionsCount--;const _=this.sessions[a];_.splice(_.indexOf(c),1),_.length===0&&delete this.sessions[a]}else{const _=new Error("Session closed without receiving a SETTINGS frame");_.code="HTTP2WRAPPER_NOSETTINGS";for(const{reject:b}of s)b(_);u()}this._tryToCreateNewSession(a,o)});const D=()=>{if(!(!(a in this.queue)||!g())){for(const _ of c[We])if(_ in this.queue[a]){const{listeners:b}=this.queue[a][_];for(;b.length!==0&&g();)b.shift().resolve(c);const C=this.queue[a];if(C[_].listeners.length===0&&(delete C[_],Object.keys(C).length===0)){delete this.queue[a];break}if(!g())break}}};c.on("origin",()=>{c[We]=c.originSet,!!g()&&(D(),ha(this.sessions[a],c))}),c.once("remoteSettings",()=>{if(c.ref(),c.unref(),this._sessionsCount++,l.destroyed){const _=new Error("Agent has been destroyed");for(const b of s)b.reject(_);c.destroy();return}c[We]=c.originSet;{const _=this.sessions;if(a in _){const b=_[a];b.splice(O1(b,c,P1),0,c)}else _[a]=[c]}this._freeSessionsCount+=1,d=!0,this.emit("session",c),D(),u(),c[Pe]===0&&this._freeSessionsCount>this.maxFreeSessions&&c.close(),s.length!==0&&(this.getSession(o,r,s),s.length=0),c.on("remoteSettings",()=>{D(),ha(this.sessions[a],c)})}),c[Rc]=c.request,c.request=(_,b)=>{if(c[sr])throw new Error("The session is gracefully closing. No new streams are allowed.");const C=c[Rc](_,b);return c.ref(),++c[Pe],c[Pe]===c.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,C.once("close",()=>{if(p=g(),--c[Pe],!c.destroyed&&!c.closed&&(k1(this.sessions[a],c),g()&&!c.closed)){p||(this._freeSessionsCount++,p=!0);const x=c[Pe]===0;x&&c.unref(),x&&(this._freeSessionsCount>this.maxFreeSessions||c[sr])?c.close():(ha(this.sessions[a],c),D())}}),C}}catch(c){for(const g of s)g.reject(c);u()}};l.listeners=s,l.completed=!1,l.destroyed=!1,this.queue[a][o]=l,this._tryToCreateNewSession(a,o)})}request(e,r,s,n){return new Promise((i,a)=>{this.getSession(e,r,[{reject:a,resolve:o=>{try{i(o.request(s,n))}catch(u){a(u)}}}])})}createConnection(e,r){return Ct.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];const s=e.port||443,n=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=n),x1.connect(s,n,r)}closeFreeSessions(){for(const e of Object.values(this.sessions))for(const r of e)r[Pe]===0&&r.close()}destroy(e){for(const r of Object.values(this.sessions))for(const s of r)s.destroy(e);for(const r of Object.values(this.queue))for(const s of Object.values(r))s.destroyed=!0;this.queue={}}get freeSessions(){return xc({agent:this,isFree:!0})}get busySessions(){return xc({agent:this,isFree:!1})}}Ct.kCurrentStreamsCount=Pe,Ct.kGracefullyClosing=sr;var Tc={Agent:Ct,globalAgent:new Ct};const{Readable:I1}=Be;class L1 extends I1{constructor(e,r){super({highWaterMark:r,autoDestroy:!1});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.connection=e,this._dumped=!1}_destroy(e){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()}}var Fc=L1,Oc=t=>{const e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&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 typeof t.port=="string"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e},B1=(t,e,r)=>{for(const s of r)t.on(s,(...n)=>e.emit(s,...n))},N1=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}},Pc={exports:{}};(function(t){const e=(r,s,n)=>{t.exports[s]=class extends r{constructor(...a){super(typeof n=="string"?n:n(a));this.name=`${super.name} [${s}]`,this.code=s}}};e(TypeError,"ERR_INVALID_ARG_TYPE",r=>{const s=r[0].includes(".")?"property":"argument";let n=r[1];const i=Array.isArray(n);return i&&(n=`${n.slice(0,-1).join(", ")} or ${n.slice(-1)}`),`The "${r[0]}" ${s} must be ${i?"one of":"of"} type ${n}. Received ${typeof r[2]}`}),e(TypeError,"ERR_INVALID_PROTOCOL",r=>`Protocol "${r[0]}" not supported. Expected "${r[1]}"`),e(Error,"ERR_HTTP_HEADERS_SENT",r=>`Cannot ${r[0]} headers after they are sent to the client`),e(TypeError,"ERR_INVALID_HTTP_TOKEN",r=>`${r[0]} must be a valid HTTP token [${r[1]}]`),e(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",r=>`Invalid value "${r[0]} for header "${r[1]}"`),e(TypeError,"ERR_INVALID_CHAR",r=>`Invalid character in ${r[0]} [${r[1]}]`)})(Pc);const H1=cn,{Writable:j1}=Be,{Agent:kc,globalAgent:M1}=Tc,U1=Fc,G1=Oc,q1=B1,z1=N1,{ERR_INVALID_ARG_TYPE:fa,ERR_INVALID_PROTOCOL:V1,ERR_HTTP_HEADERS_SENT:Ic,ERR_INVALID_HTTP_TOKEN:W1,ERR_HTTP_INVALID_HEADER_VALUE:X1,ERR_INVALID_CHAR:K1}=Pc.exports,{HTTP2_HEADER_STATUS:Lc,HTTP2_HEADER_METHOD:Bc,HTTP2_HEADER_PATH:Nc,HTTP2_METHOD_CONNECT:Y1}=H1.constants,xe=Symbol("headers"),da=Symbol("origin"),pa=Symbol("session"),Hc=Symbol("options"),Ns=Symbol("flushedHeaders"),Fr=Symbol("jobs"),Q1=/^[\^`\-\w!#$%&*+.|~]+$/,J1=/[^\t\u0020-\u007E\u0080-\u00FF]/;class Z1 extends j1{constructor(e,r,s){super({autoDestroy:!1});const n=typeof e=="string"||e instanceof URL;if(n&&(e=G1(e instanceof URL?e:new URL(e))),typeof r=="function"||r===void 0?(s=r,r=n?e:{...e}):r={...e,...r},r.h2session)this[pa]=r.h2session;else if(r.agent===!1)this.agent=new kc({maxFreeSessions:0});else if(typeof r.agent>"u"||r.agent===null)typeof r.createConnection=="function"?(this.agent=new kc({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=M1;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new fa("options.agent",["Agent-like Object","undefined","false"],r.agent);if(r.protocol&&r.protocol!=="https:")throw new V1(r.protocol,"https:");const i=r.port||r.defaultPort||this.agent&&this.agent.defaultPort||443,a=r.hostname||r.host||"localhost";delete r.hostname,delete r.host,delete r.port;const{timeout:o}=r;if(r.timeout=void 0,this[xe]=Object.create(null),this[Fr]=[],this.socket=null,this.connection=null,this.method=r.method||"GET",this.path=r.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,r.headers)for(const[u,l]of Object.entries(r.headers))this.setHeader(u,l);r.auth&&!("authorization"in this[xe])&&(this[xe].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[Hc]=r,i===443?(this[da]=`https://${a}`,":authority"in this[xe]||(this[xe][":authority"]=a)):(this[da]=`https://${a}:${i}`,":authority"in this[xe]||(this[xe][":authority"]=`${a}:${i}`)),o&&this.setTimeout(o),s&&this.once("response",s),this[Ns]=!1}get method(){return this[xe][Bc]}set method(e){e&&(this[xe][Bc]=e.toUpperCase())}get path(){return this[xe][Nc]}set path(e){e&&(this[xe][Nc]=e)}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,s){if(this._mustNotHaveABody){s(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();const n=()=>this._request.write(e,r,s);this._request?n():this[Fr].push(n)}_final(e){if(this.destroyed)return;this.flushHeaders();const r=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};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())}_destroy(e,r){this.res&&this.res._dump(),this._request&&this._request.destroy(),r(e)}async flushHeaders(){if(this[Ns]||this.destroyed)return;this[Ns]=!0;const e=this.method===Y1,r=s=>{if(this._request=s,this.destroyed){s.destroy();return}e||q1(s,this,["timeout","continue","close","error"]);const n=a=>(...o)=>{!this.writable&&!this.destroyed?a(...o):this.once("finish",()=>{a(...o)})};s.once("response",n((a,o,u)=>{const l=new U1(this.socket,s.readableHighWaterMark);this.res=l,l.req=this,l.statusCode=a[Lc],l.headers=a,l.rawHeaders=u,l.once("end",()=>{this.aborted?(l.aborted=!0,l.emit("aborted")):(l.complete=!0,l.socket=null,l.connection=null)}),e?(l.upgrade=!0,this.emit("connect",l,s,Buffer.alloc(0))?this.emit("close"):s.destroy()):(s.on("data",f=>{!l._dumped&&!l.push(f)&&s.pause()}),s.once("end",()=>{l.push(null)}),this.emit("response",l)||l._dump())})),s.once("headers",n(a=>this.emit("information",{statusCode:a[Lc]}))),s.once("trailers",n((a,o,u)=>{const{res:l}=this;l.trailers=a,l.rawTrailers=u}));const{socket:i}=s.session;this.socket=i,this.connection=i;for(const a of this[Fr])a();this.emit("socket",this.socket)};if(this[pa])try{r(this[pa].request(this[xe]))}catch(s){this.emit("error",s)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[da],this[Hc],this[xe]))}catch(s){this.emit("error",s)}}}getHeader(e){if(typeof e!="string")throw new fa("name","string",e);return this[xe][e.toLowerCase()]}get headersSent(){return this[Ns]}removeHeader(e){if(typeof e!="string")throw new fa("name","string",e);if(this.headersSent)throw new Ic("remove");delete this[xe][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new Ic("set");if(typeof e!="string"||!Q1.test(e)&&!z1(e))throw new W1("Header name",e);if(typeof r>"u")throw new X1(r,e);if(J1.test(r))throw new K1("header content",e);this[xe][e.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){const s=()=>this._request.setTimeout(e,r);return this._request?s():this[Fr].push(s),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}}var jc=Z1,ma={exports:{}};const e_=ao;var t_=(t={},e=e_.connect)=>new Promise((r,s)=>{let n=!1,i;const a=async()=>{await u,i.off("timeout",o),i.off("error",s),t.resolveSocket?(r({alpnProtocol:i.alpnProtocol,socket:i,timeout:n}),n&&(await Promise.resolve(),i.emit("timeout"))):(i.destroy(),r({alpnProtocol:i.alpnProtocol,timeout:n}))},o=async()=>{n=!0,a()},u=(async()=>{try{i=await e(t,a),i.on("error",s),i.once("timeout",o)}catch(l){s(l)}})()});const r_=oo;var s_=t=>{let e=t.host;const r=t.headers&&t.headers.host;return r&&(r.startsWith("[")?r.indexOf("]")===-1?e=r:e=r.slice(1,-1):e=r.split(":",1)[0]),r_.isIP(e)?"":e};const Mc=Xr,ga=ln,n_=t_,i_=Ac,a_=jc,o_=s_,u_=Oc,Hs=new i_({maxSize:100}),Or=new Map,Uc=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};const s=()=>{t.emit("free",e,r)};e.on("free",s);const n=()=>{t.removeSocket(e,r)};e.on("close",n);const i=()=>{t.removeSocket(e,r),e.off("close",n),e.off("free",s),e.off("agentRemove",i)};e.on("agentRemove",i),t.emit("free",e,r)},l_=async t=>{const e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!Hs.has(e)){if(Or.has(e))return(await Or.get(e)).alpnProtocol;const{path:r,agent:s}=t;t.path=t.socketPath;const n=n_(t);Or.set(e,n);try{const{socket:i,alpnProtocol:a}=await n;if(Hs.set(e,a),t.path=r,a==="h2")i.destroy();else{const{globalAgent:o}=ga,u=ga.Agent.prototype.createConnection;s?s.createConnection===u?Uc(s,i,t):i.destroy():o.createConnection===u?Uc(o,i,t):i.destroy()}return Or.delete(e),a}catch(i){throw Or.delete(e),i}}return Hs.get(e)};ma.exports=async(t,e,r)=>{if((typeof t=="string"||t instanceof URL)&&(t=u_(new URL(t))),typeof e=="function"&&(r=e,e=void 0),e={ALPNProtocols:["h2","http/1.1"],...t,...e,resolveSocket:!0},!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:";const s=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||o_(e),e.port=e.port||(s?443:80),e._defaultAgent=s?ga.globalAgent:Mc.globalAgent;const n=e.agent;if(n){if(n.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");e.agent=n[s?"https":"http"]}return s&&await l_(e)==="h2"?(n&&(e.agent=n.http2),new a_(e,r)):Mc.request(e,r)},ma.exports.protocolCache=Hs;const c_=cn,h_=Tc,ya=jc,f_=Fc,d_=ma.exports,p_=(t,e,r)=>new ya(t,e,r),m_=(t,e,r)=>{const s=new ya(t,e,r);return s.end(),s};var g_={...c_,ClientRequest:ya,IncomingMessage:f_,...h_,request:p_,get:m_,auto:d_},Da={},js={};Object.defineProperty(js,"__esModule",{value:!0});const Gc=ut.exports;js.default=t=>Gc.default.nodeStream(t)&&Gc.default.function_(t.getBoundary),Object.defineProperty(Da,"__esModule",{value:!0});const qc=lt,zc=St,Vc=ut.exports,y_=js,D_=zc.promisify(qc.stat);Da.default=async(t,e)=>{if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(Vc.default.string(t))return Buffer.byteLength(t);if(Vc.default.buffer(t))return t.length;if(y_.default(t))return zc.promisify(t.getLength.bind(t))();if(t instanceof qc.ReadStream){const{size:r}=await D_(t.path);return r===0?void 0:r}};var Ms={};Object.defineProperty(Ms,"__esModule",{value:!0});function v_(t,e,r){const s={};for(const n of r)s[n]=(...i)=>{e.emit(n,...i)},t.on(n,s[n]);return()=>{for(const n of r)t.off(n,s[n])}}Ms.default=v_;var Pr={},va={};Object.defineProperty(va,"__esModule",{value:!0}),va.default=()=>{const t=[];return{once(e,r,s){e.once(r,s),t.push({origin:e,event:r,fn:s})},unhandleAll(){for(const e of t){const{origin:r,event:s,fn:n}=e;r.removeListener(s,n)}t.length=0}}},Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.TimeoutError=void 0;const b_=oo,E_=va,Wc=Symbol("reentry"),__=()=>{};class Xc extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`);this.event=r,this.name="TimeoutError",this.code="ETIMEDOUT"}}Pr.TimeoutError=Xc,Pr.default=(t,e,r)=>{if(Wc in t)return __;t[Wc]=!0;const s=[],{once:n,unhandleAll:i}=E_.default(),a=(d,c,g)=>{var p;const D=setTimeout(c,d,d,g);(p=D.unref)===null||p===void 0||p.call(D);const _=()=>{clearTimeout(D)};return s.push(_),_},{host:o,hostname:u}=r,l=(d,c)=>{t.destroy(new Xc(d,c))},f=()=>{for(const d of s)d();i()};if(t.once("error",d=>{if(f(),t.listenerCount("error")===0)throw d}),t.once("close",f),n(t,"response",d=>{n(d,"end",f)}),typeof e.request<"u"&&a(e.request,l,"request"),typeof e.socket<"u"){const d=()=>{l(e.socket,"socket")};t.setTimeout(e.socket,d),s.push(()=>{t.removeListener("timeout",d)})}return n(t,"socket",d=>{var c;const{socketPath:g}=t;if(d.connecting){const p=Boolean(g??b_.isIP((c=u??o)!==null&&c!==void 0?c:"")!==0);if(typeof e.lookup<"u"&&!p&&typeof d.address().address>"u"){const D=a(e.lookup,l,"lookup");n(d,"lookup",D)}if(typeof e.connect<"u"){const D=()=>a(e.connect,l,"connect");p?n(d,"connect",D()):n(d,"lookup",_=>{_===null&&n(d,"connect",D())})}typeof e.secureConnect<"u"&&r.protocol==="https:"&&n(d,"connect",()=>{const D=a(e.secureConnect,l,"secureConnect");n(d,"secureConnect",D)})}if(typeof e.send<"u"){const p=()=>a(e.send,l,"send");d.connecting?n(d,"connect",()=>{n(t,"upload-complete",p())}):n(t,"upload-complete",p())}}),typeof e.response<"u"&&n(t,"upload-complete",()=>{const d=a(e.response,l,"response");n(t,"response",d)}),f};var ba={};Object.defineProperty(ba,"__esModule",{value:!0});const Kc=ut.exports;ba.default=t=>{t=t;const e={protocol:t.protocol,hostname:Kc.default.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 Kc.default.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e};var Ea={};Object.defineProperty(Ea,"__esModule",{value:!0});const w_=hr,C_=["protocol","host","hostname","port","pathname","search"];Ea.default=(t,e)=>{var r,s;if(e.path){if(e.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(e.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(e.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(e.search&&e.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!t){if(!e.protocol)throw new TypeError("No URL protocol specified");t=`${e.protocol}//${(s=(r=e.hostname)!==null&&r!==void 0?r:e.host)!==null&&s!==void 0?s:""}`}const n=new w_.URL(t);if(e.path){const i=e.path.indexOf("?");i===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,i),e.search=e.path.slice(i+1)),delete e.path}for(const i of C_)e[i]&&(n[i]=e[i].toString());return n};var _a={};Object.defineProperty(_a,"__esModule",{value:!0});class S_{constructor(){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)}}_a.default=S_;var Us={};Object.defineProperty(Us,"__esModule",{value:!0});const A_=async t=>{const e=[];let r=0;for await(const s of t)e.push(s),r+=Buffer.byteLength(s);return Buffer.isBuffer(e[0])?Buffer.concat(e,r):Buffer.from(e.join(""))};Us.default=A_;var Yc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.dnsLookupIpVersionToFamily=t.isDnsLookupIpVersion=void 0;const e={auto:0,ipv4:4,ipv6:6};t.isDnsLookupIpVersion=r=>r in e,t.dnsLookupIpVersionToFamily=r=>{if(t.isDnsLookupIpVersion(r))return e[r];throw new Error("Invalid DNS lookup IP version")}})(Yc);var kr={};Object.defineProperty(kr,"__esModule",{value:!0}),kr.isResponseOk=void 0,kr.isResponseOk=t=>{const{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304};var wa={};Object.defineProperty(wa,"__esModule",{value:!0});const Qc=new Set;wa.default=t=>{Qc.has(t)||(Qc.add(t),process.emitWarning(`Got: ${t}`,{type:"DeprecationWarning"}))};var Ca={};Object.defineProperty(Ca,"__esModule",{value:!0});const oe=ut.exports,R_=(t,e)=>{if(oe.default.null_(t.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");oe.assert.any([oe.default.string,oe.default.undefined],t.encoding),oe.assert.any([oe.default.boolean,oe.default.undefined],t.resolveBodyOnly),oe.assert.any([oe.default.boolean,oe.default.undefined],t.methodRewriting),oe.assert.any([oe.default.boolean,oe.default.undefined],t.isStream),oe.assert.any([oe.default.string,oe.default.undefined],t.responseType),t.responseType===void 0&&(t.responseType="text");const{retry:r}=t;if(e?t.retry={...e.retry}:t.retry={calculateDelay:s=>s.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},oe.default.object(r)?(t.retry={...t.retry,...r},t.retry.methods=[...new Set(t.retry.methods.map(s=>s.toUpperCase()))],t.retry.statusCodes=[...new Set(t.retry.statusCodes)],t.retry.errorCodes=[...new Set(t.retry.errorCodes)]):oe.default.number(r)&&(t.retry.limit=r),oe.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(oe.default.number))),oe.default.object(t.pagination)){e&&(t.pagination={...e.pagination,...t.pagination});const{pagination:s}=t;if(!oe.default.function_(s.transform))throw new Error("`options.pagination.transform` must be implemented");if(!oe.default.function_(s.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!oe.default.function_(s.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!oe.default.function_(s.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return t.responseType==="json"&&t.headers.accept===void 0&&(t.headers.accept="application/json"),t};Ca.default=R_;var Ir={};Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.retryAfterStatusCodes=void 0,Ir.retryAfterStatusCodes=new Set([413,429,503]);const x_=({attemptCount:t,retryOptions:e,error:r,retryAfter:s})=>{if(t>e.limit)return 0;const n=e.methods.includes(r.options.method),i=e.errorCodes.includes(r.code),a=r.response&&e.statusCodes.includes(r.response.statusCode);if(!n||!i&&!a)return 0;if(r.response){if(s)return e.maxRetryAfter===void 0||s>e.maxRetryAfter?0:s;if(r.response.statusCode===413)return 0}const o=Math.random()*100;return 2**(t-1)*1e3+o};Ir.default=x_,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedProtocolError=t.ReadError=t.TimeoutError=t.UploadError=t.CacheError=t.HTTPError=t.MaxRedirectsError=t.RequestError=t.setNonEnumerableProperties=t.knownHookEvents=t.withoutBody=t.kIsNormalizedAlready=void 0;const e=St,r=Be,s=lt,n=hr,i=Xr,a=Xr,o=ln,u=ea.exports,l=ra.exports,f=E1,d=S1,c=g_,g=aa,p=ut.exports,D=Da,_=js,b=Ms,C=Pr,x=ba,A=Ea,y=_a,h=Us,v=Yc,$=kr,T=wa,j=Ca,S=Ir;let I;const B=Symbol("request"),Q=Symbol("response"),w=Symbol("responseSize"),R=Symbol("downloadedSize"),ee=Symbol("bodySize"),G=Symbol("uploadedSize"),be=Symbol("serverResponsesPiped"),Te=Symbol("unproxyEvents"),fe=Symbol("isFromCache"),Me=Symbol("cancelTimeouts"),jt=Symbol("startedReading"),Xe=Symbol("stopReading"),Ue=Symbol("triggerRead"),q=Symbol("body"),tt=Symbol("jobs"),zr=Symbol("originalResponse"),k=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const re=p.default.string(process.versions.brotli);t.withoutBody=new Set(["GET","HEAD"]),t.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function P(me){for(const E in me){const m=me[E];if(!p.default.string(m)&&!p.default.number(m)&&!p.default.boolean(m)&&!p.default.null_(m)&&!p.default.undefined(m))throw new TypeError(`The \`searchParams\` value '${String(m)}' must be a string, number, boolean or null`)}}function X(me){return p.default.object(me)&&!("statusCode"in me)}const se=new y.default,Ee=async me=>new Promise((E,m)=>{const F=M=>{m(M)};me.pending||E(),me.once("error",F),me.once("ready",()=>{me.off("error",F),E()})}),pe=new Set([300,301,302,303,304,307,308]),cr=["context","body","json","form"];t.setNonEnumerableProperties=(me,E)=>{const m={};for(const F of me)if(!!F)for(const M of cr)M in F&&(m[M]={writable:!0,configurable:!0,enumerable:!1,value:F[M]});Object.defineProperties(E,m)};class ce extends Error{constructor(E,m,F){var M,N;super(E);if(Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=(M=m.code)!==null&&M!==void 0?M:"ERR_GOT_REQUEST_ERROR",F instanceof ro?(Object.defineProperty(this,"request",{enumerable:!1,value:F}),Object.defineProperty(this,"response",{enumerable:!1,value:F[Q]}),Object.defineProperty(this,"options",{enumerable:!1,value:F.options})):Object.defineProperty(this,"options",{enumerable:!1,value:F}),this.timings=(N=this.request)===null||N===void 0?void 0:N.timings,p.default.string(m.stack)&&p.default.string(this.stack)){const O=this.stack.indexOf(this.message)+this.message.length,H=this.stack.slice(O).split(`
|
|
93
|
+
`).reverse(),U=m.stack.slice(m.stack.indexOf(m.message)+m.message.length).split(`
|
|
94
|
+
`).reverse();for(;U.length!==0&&U[0]===H[0];)H.shift();this.stack=`${this.stack.slice(0,O)}${H.reverse().join(`
|
|
95
|
+
`)}${U.reverse().join(`
|
|
96
|
+
`)}`}}}t.RequestError=ce;class Ya extends ce{constructor(E){super(`Redirected ${E.options.maxRedirects} times. Aborting.`,{},E);this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}}t.MaxRedirectsError=Ya;class Qa extends ce{constructor(E){super(`Response code ${E.statusCode} (${E.statusMessage})`,{},E.request);this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}}t.HTTPError=Qa;class Ja extends ce{constructor(E,m){super(E.message,E,m);this.name="CacheError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}}t.CacheError=Ja;class Za extends ce{constructor(E,m){super(E.message,E,m);this.name="UploadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}}t.UploadError=Za;class eo extends ce{constructor(E,m,F){super(E.message,E,F);this.name="TimeoutError",this.event=E.event,this.timings=m}}t.TimeoutError=eo;class an extends ce{constructor(E,m){super(E.message,E,m);this.name="ReadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}}t.ReadError=an;class to extends ce{constructor(E){super(`Unsupported protocol "${E.url.protocol}"`,{},E);this.name="UnsupportedProtocolError",this.code="ERR_UNSUPPORTED_PROTOCOL"}}t.UnsupportedProtocolError=to;const nf=["socket","connect","continue","information","upgrade","timeout"];class ro extends r.Duplex{constructor(E,m={},F){super({autoDestroy:!1,highWaterMark:0});this[R]=0,this[G]=0,this.requestInitialized=!1,this[be]=new Set,this.redirects=[],this[Xe]=!1,this[Ue]=!1,this[tt]=[],this.retryCount=0,this._progressCallbacks=[];const M=()=>this._unlockWrite(),N=()=>this._lockWrite();this.on("pipe",K=>{K.prependListener("data",M),K.on("data",N),K.prependListener("end",M),K.on("end",N)}),this.on("unpipe",K=>{K.off("data",M),K.off("data",N),K.off("end",M),K.off("end",N)}),this.on("pipe",K=>{K instanceof a.IncomingMessage&&(this.options.headers={...K.headers,...this.options.headers})});const{json:O,body:H,form:U}=m;if((O||H||U)&&this._lockWrite(),t.kIsNormalizedAlready in m)this.options=m;else try{this.options=this.constructor.normalizeArguments(E,m,F)}catch(K){p.default.nodeStream(m.body)&&m.body.destroy(),this.destroy(K);return}(async()=>{var K;try{this.options.body instanceof s.ReadStream&&await Ee(this.options.body);const{url:Se}=this.options;if(!Se)throw new TypeError("Missing `url` property");if(this.requestUrl=Se.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(K=this[B])===null||K===void 0||K.destroy();return}for(const Fe of this[tt])Fe();this[tt].length=0,this.requestInitialized=!0}catch(Se){if(Se instanceof ce){this._beforeError(Se);return}this.destroyed||this.destroy(Se)}})()}static normalizeArguments(E,m,F){var M,N,O,H,U;const K=m;if(p.default.object(E)&&!p.default.urlInstance(E))m={...F,...E,...m};else{if(E&&m&&m.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");m={...F,...m},E!==void 0&&(m.url=E),p.default.urlInstance(m.url)&&(m.url=new n.URL(m.url.toString()))}if(m.cache===!1&&(m.cache=void 0),m.dnsCache===!1&&(m.dnsCache=void 0),p.assert.any([p.default.string,p.default.undefined],m.method),p.assert.any([p.default.object,p.default.undefined],m.headers),p.assert.any([p.default.string,p.default.urlInstance,p.default.undefined],m.prefixUrl),p.assert.any([p.default.object,p.default.undefined],m.cookieJar),p.assert.any([p.default.object,p.default.string,p.default.undefined],m.searchParams),p.assert.any([p.default.object,p.default.string,p.default.undefined],m.cache),p.assert.any([p.default.object,p.default.number,p.default.undefined],m.timeout),p.assert.any([p.default.object,p.default.undefined],m.context),p.assert.any([p.default.object,p.default.undefined],m.hooks),p.assert.any([p.default.boolean,p.default.undefined],m.decompress),p.assert.any([p.default.boolean,p.default.undefined],m.ignoreInvalidCookies),p.assert.any([p.default.boolean,p.default.undefined],m.followRedirect),p.assert.any([p.default.number,p.default.undefined],m.maxRedirects),p.assert.any([p.default.boolean,p.default.undefined],m.throwHttpErrors),p.assert.any([p.default.boolean,p.default.undefined],m.http2),p.assert.any([p.default.boolean,p.default.undefined],m.allowGetBody),p.assert.any([p.default.string,p.default.undefined],m.localAddress),p.assert.any([v.isDnsLookupIpVersion,p.default.undefined],m.dnsLookupIpVersion),p.assert.any([p.default.object,p.default.undefined],m.https),p.assert.any([p.default.boolean,p.default.undefined],m.rejectUnauthorized),m.https&&(p.assert.any([p.default.boolean,p.default.undefined],m.https.rejectUnauthorized),p.assert.any([p.default.function_,p.default.undefined],m.https.checkServerIdentity),p.assert.any([p.default.string,p.default.object,p.default.array,p.default.undefined],m.https.certificateAuthority),p.assert.any([p.default.string,p.default.object,p.default.array,p.default.undefined],m.https.key),p.assert.any([p.default.string,p.default.object,p.default.array,p.default.undefined],m.https.certificate),p.assert.any([p.default.string,p.default.undefined],m.https.passphrase),p.assert.any([p.default.string,p.default.buffer,p.default.array,p.default.undefined],m.https.pfx)),p.assert.any([p.default.object,p.default.undefined],m.cacheOptions),p.default.string(m.method)?m.method=m.method.toUpperCase():m.method="GET",m.headers===(F==null?void 0:F.headers)?m.headers={...m.headers}:m.headers=g({...F==null?void 0:F.headers,...m.headers}),"slashes"in m)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in m)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in m&&m.searchParams&&m.searchParams!==(F==null?void 0:F.searchParams)){let z;if(p.default.string(m.searchParams)||m.searchParams instanceof n.URLSearchParams)z=new n.URLSearchParams(m.searchParams);else{P(m.searchParams),z=new n.URLSearchParams;for(const de in m.searchParams){const De=m.searchParams[de];De===null?z.append(de,""):De!==void 0&&z.append(de,De)}}(M=F==null?void 0:F.searchParams)===null||M===void 0||M.forEach((de,De)=>{z.has(De)||z.append(De,de)}),m.searchParams=z}if(m.username=(N=m.username)!==null&&N!==void 0?N:"",m.password=(O=m.password)!==null&&O!==void 0?O:"",p.default.undefined(m.prefixUrl)?m.prefixUrl=(H=F==null?void 0:F.prefixUrl)!==null&&H!==void 0?H:"":(m.prefixUrl=m.prefixUrl.toString(),m.prefixUrl!==""&&!m.prefixUrl.endsWith("/")&&(m.prefixUrl+="/")),p.default.string(m.url)){if(m.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");m.url=A.default(m.prefixUrl+m.url,m)}else(p.default.undefined(m.url)&&m.prefixUrl!==""||m.protocol)&&(m.url=A.default(m.prefixUrl,m));if(m.url){"port"in m&&delete m.port;let{prefixUrl:z}=m;Object.defineProperty(m,"prefixUrl",{set:De=>{const te=m.url;if(!te.href.startsWith(De))throw new Error(`Cannot change \`prefixUrl\` from ${z} to ${De}: ${te.href}`);m.url=new n.URL(De+te.href.slice(z.length)),z=De},get:()=>z});let{protocol:de}=m.url;if(de==="unix:"&&(de="http:",m.url=new n.URL(`http://unix${m.url.pathname}${m.url.search}`)),m.searchParams&&(m.url.search=m.searchParams.toString()),de!=="http:"&&de!=="https:")throw new to(m);m.username===""?m.username=m.url.username:m.url.username=m.username,m.password===""?m.password=m.url.password:m.url.password=m.password}const{cookieJar:Se}=m;if(Se){let{setCookie:z,getCookieString:de}=Se;p.assert.function_(z),p.assert.function_(de),z.length===4&&de.length===0&&(z=e.promisify(z.bind(m.cookieJar)),de=e.promisify(de.bind(m.cookieJar)),m.cookieJar={setCookie:z,getCookieString:de})}const{cache:Fe}=m;if(Fe&&(se.has(Fe)||se.set(Fe,new f((z,de)=>{const De=z[B](z,de);return p.default.promise(De)&&(De.once=(te,J)=>{if(te==="error")De.catch(J);else if(te==="abort")(async()=>{try{(await De).once("abort",J)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${te}`);return De}),De},Fe))),m.cacheOptions={...m.cacheOptions},m.dnsCache===!0)I||(I=new l.default),m.dnsCache=I;else if(!p.default.undefined(m.dnsCache)&&!m.dnsCache.lookup)throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${p.default(m.dnsCache)}`);p.default.number(m.timeout)?m.timeout={request:m.timeout}:F&&m.timeout!==F.timeout?m.timeout={...F.timeout,...m.timeout}:m.timeout={...m.timeout},m.context||(m.context={});const Vr=m.hooks===(F==null?void 0:F.hooks);m.hooks={...m.hooks};for(const z of t.knownHookEvents)if(z in m.hooks)if(p.default.array(m.hooks[z]))m.hooks[z]=[...m.hooks[z]];else throw new TypeError(`Parameter \`${z}\` must be an Array, got ${p.default(m.hooks[z])}`);else m.hooks[z]=[];if(F&&!Vr)for(const z of t.knownHookEvents)F.hooks[z].length>0&&(m.hooks[z]=[...F.hooks[z],...m.hooks[z]]);if("family"in m&&T.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),(F==null?void 0:F.https)&&(m.https={...F.https,...m.https}),"rejectUnauthorized"in m&&T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in m&&T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in m&&T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in m&&T.default('"options.key" was never documented, please use "options.https.key"'),"cert"in m&&T.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in m&&T.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in m&&T.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in m)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(m.agent){for(const z in m.agent)if(z!=="http"&&z!=="https"&&z!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${z}\``)}return m.maxRedirects=(U=m.maxRedirects)!==null&&U!==void 0?U:0,t.setNonEnumerableProperties([F,K],m),j.default(m,F)}_lockWrite(){const E=()=>{throw new TypeError("The payload has been already provided")};this.write=E,this.end=E}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){const{options:E}=this,{headers:m}=E,F=!p.default.undefined(E.form),M=!p.default.undefined(E.json),N=!p.default.undefined(E.body),O=F||M||N,H=t.withoutBody.has(E.method)&&!(E.method==="GET"&&E.allowGetBody);if(this._cannotHaveBody=H,O){if(H)throw new TypeError(`The \`${E.method}\` method cannot be used with a body`);if([N,F,M].filter(U=>U).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(N&&!(E.body instanceof r.Readable)&&!p.default.string(E.body)&&!p.default.buffer(E.body)&&!_.default(E.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(F&&!p.default.object(E.form))throw new TypeError("The `form` option must be an Object");{const U=!p.default.string(m["content-type"]);N?(_.default(E.body)&&U&&(m["content-type"]=`multipart/form-data; boundary=${E.body.getBoundary()}`),this[q]=E.body):F?(U&&(m["content-type"]="application/x-www-form-urlencoded"),this[q]=new n.URLSearchParams(E.form).toString()):(U&&(m["content-type"]="application/json"),this[q]=E.stringifyJson(E.json));const K=await D.default(this[q],E.headers);p.default.undefined(m["content-length"])&&p.default.undefined(m["transfer-encoding"])&&!H&&!p.default.undefined(K)&&(m["content-length"]=String(K))}}else H?this._lockWrite():this._unlockWrite();this[ee]=Number(m["content-length"])||void 0}async _onResponseBase(E){const{options:m}=this,{url:F}=m;this[zr]=E,m.decompress&&(E=d(E));const M=E.statusCode,N=E;N.statusMessage=N.statusMessage?N.statusMessage:i.STATUS_CODES[M],N.url=m.url.toString(),N.requestUrl=this.requestUrl,N.redirectUrls=this.redirects,N.request=this,N.isFromCache=E.fromCache||!1,N.ip=this.ip,N.retryCount=this.retryCount,this[fe]=N.isFromCache,this[w]=Number(E.headers["content-length"])||void 0,this[Q]=E,E.once("end",()=>{this[w]=this[R],this.emit("downloadProgress",this.downloadProgress)}),E.once("error",H=>{E.destroy(),this._beforeError(new an(H,this))}),E.once("aborted",()=>{this._beforeError(new an({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);const O=E.headers["set-cookie"];if(p.default.object(m.cookieJar)&&O){let H=O.map(async U=>m.cookieJar.setCookie(U,F.toString()));m.ignoreInvalidCookies&&(H=H.map(async U=>U.catch(()=>{})));try{await Promise.all(H)}catch(U){this._beforeError(U);return}}if(m.followRedirect&&E.headers.location&&pe.has(M)){if(E.resume(),this[B]&&(this[Me](),delete this[B],this[Te]()),(M===303&&m.method!=="GET"&&m.method!=="HEAD"||!m.methodRewriting)&&(m.method="GET","body"in m&&delete m.body,"json"in m&&delete m.json,"form"in m&&delete m.form,this[q]=void 0,delete m.headers["content-length"]),this.redirects.length>=m.maxRedirects){this._beforeError(new Ya(this));return}try{const U=Buffer.from(E.headers.location,"binary").toString(),K=new n.URL(U,F),Se=K.toString();decodeURI(Se),K.hostname!==F.hostname||K.port!==F.port?("host"in m.headers&&delete m.headers.host,"cookie"in m.headers&&delete m.headers.cookie,"authorization"in m.headers&&delete m.headers.authorization,(m.username||m.password)&&(m.username="",m.password="")):(K.username=m.username,K.password=m.password),this.redirects.push(Se),m.url=K;for(const Fe of m.hooks.beforeRedirect)await Fe(m,N);this.emit("redirect",N,m),await this._makeRequest()}catch(U){this._beforeError(U);return}return}if(m.isStream&&m.throwHttpErrors&&!$.isResponseOk(N)){this._beforeError(new Qa(N));return}E.on("readable",()=>{this[Ue]&&this._read()}),this.on("resume",()=>{E.resume()}),this.on("pause",()=>{E.pause()}),E.once("end",()=>{this.push(null)}),this.emit("response",E);for(const H of this[be])if(!H.headersSent){for(const U in E.headers){const K=m.decompress?U!=="content-encoding":!0,Se=E.headers[U];K&&H.setHeader(U,Se)}H.statusCode=M}}async _onResponse(E){try{await this._onResponseBase(E)}catch(m){this._beforeError(m)}}_onRequest(E){const{options:m}=this,{timeout:F,url:M}=m;u.default(E),this[Me]=C.default(E,F,M);const N=m.cache?"cacheableResponse":"response";E.once(N,U=>{this._onResponse(U)}),E.once("error",U=>{var K;E.destroy(),(K=E.res)===null||K===void 0||K.removeAllListeners("end"),U=U instanceof C.TimeoutError?new eo(U,this.timings,this):new ce(U.message,U,this),this._beforeError(U)}),this[Te]=b.default(E,this,nf),this[B]=E,this.emit("uploadProgress",this.uploadProgress);const O=this[q],H=this.redirects.length===0?this:E;p.default.nodeStream(O)?(O.pipe(H),O.once("error",U=>{this._beforeError(new Za(U,this))})):(this._unlockWrite(),p.default.undefined(O)?(this._cannotHaveBody||this._noPipe)&&(H.end(),this._lockWrite()):(this._writeRequest(O,void 0,()=>{}),H.end(),this._lockWrite())),this.emit("request",E)}async _createCacheableRequest(E,m){return new Promise((F,M)=>{Object.assign(m,x.default(E)),delete m.url;let N;const O=se.get(m.cache)(m,async H=>{H._readableState.autoDestroy=!1,N&&(await N).emit("cacheableResponse",H),F(H)});m.url=E,O.once("error",M),O.once("request",async H=>{N=H,F(N)})})}async _makeRequest(){var E,m,F,M,N;const{options:O}=this,{headers:H}=O;for(const J in H)if(p.default.undefined(H[J]))delete H[J];else if(p.default.null_(H[J]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${J}\` header`);if(O.decompress&&p.default.undefined(H["accept-encoding"])&&(H["accept-encoding"]=re?"gzip, deflate, br":"gzip, deflate"),O.cookieJar){const J=await O.cookieJar.getCookieString(O.url.toString());p.default.nonEmptyString(J)&&(O.headers.cookie=J)}for(const J of O.hooks.beforeRequest){const Mt=await J(O);if(!p.default.undefined(Mt)){O.request=()=>Mt;break}}O.body&&this[q]!==O.body&&(this[q]=O.body);const{agent:U,request:K,timeout:Se,url:Fe}=O;if(O.dnsCache&&!("lookup"in O)&&(O.lookup=O.dnsCache.lookup),Fe.hostname==="unix"){const J=/(?<socketPath>.+?):(?<path>.+)/.exec(`${Fe.pathname}${Fe.search}`);if(J==null?void 0:J.groups){const{socketPath:Mt,path:af}=J.groups;Object.assign(O,{socketPath:Mt,path:af,host:""})}}const Vr=Fe.protocol==="https:";let z;O.http2?z=c.auto:z=Vr?o.request:i.request;const de=(E=O.request)!==null&&E!==void 0?E:z,De=O.cache?this._createCacheableRequest:de;U&&!O.http2&&(O.agent=U[Vr?"https":"http"]),O[B]=de,delete O.request,delete O.timeout;const te=O;if(te.shared=(m=O.cacheOptions)===null||m===void 0?void 0:m.shared,te.cacheHeuristic=(F=O.cacheOptions)===null||F===void 0?void 0:F.cacheHeuristic,te.immutableMinTimeToLive=(M=O.cacheOptions)===null||M===void 0?void 0:M.immutableMinTimeToLive,te.ignoreCargoCult=(N=O.cacheOptions)===null||N===void 0?void 0:N.ignoreCargoCult,O.dnsLookupIpVersion!==void 0)try{te.family=v.dnsLookupIpVersionToFamily(O.dnsLookupIpVersion)}catch{throw new Error("Invalid `dnsLookupIpVersion` option value")}O.https&&("rejectUnauthorized"in O.https&&(te.rejectUnauthorized=O.https.rejectUnauthorized),O.https.checkServerIdentity&&(te.checkServerIdentity=O.https.checkServerIdentity),O.https.certificateAuthority&&(te.ca=O.https.certificateAuthority),O.https.certificate&&(te.cert=O.https.certificate),O.https.key&&(te.key=O.https.key),O.https.passphrase&&(te.passphrase=O.https.passphrase),O.https.pfx&&(te.pfx=O.https.pfx));try{let J=await De(Fe,te);p.default.undefined(J)&&(J=z(Fe,te)),O.request=K,O.timeout=Se,O.agent=U,O.https&&("rejectUnauthorized"in O.https&&delete te.rejectUnauthorized,O.https.checkServerIdentity&&delete te.checkServerIdentity,O.https.certificateAuthority&&delete te.ca,O.https.certificate&&delete te.cert,O.https.key&&delete te.key,O.https.passphrase&&delete te.passphrase,O.https.pfx&&delete te.pfx),X(J)?this._onRequest(J):this.writable?(this.once("finish",()=>{this._onResponse(J)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(J)}catch(J){throw J instanceof f.CacheError?new Ja(J,this):new ce(J.message,J,this)}}async _error(E){try{for(const m of this.options.hooks.beforeError)E=await m(E)}catch(m){E=new ce(m.message,m,this)}this.destroy(E)}_beforeError(E){if(this[Xe])return;const{options:m}=this,F=this.retryCount+1;this[Xe]=!0,E instanceof ce||(E=new ce(E.message,E,this));const M=E,{response:N}=M;(async()=>{if(N&&!N.body){N.setEncoding(this._readableState.encoding);try{N.rawBody=await h.default(N),N.body=N.rawBody.toString()}catch{}}if(this.listenerCount("retry")!==0){let O;try{let H;N&&"retry-after"in N.headers&&(H=Number(N.headers["retry-after"]),Number.isNaN(H)?(H=Date.parse(N.headers["retry-after"])-Date.now(),H<=0&&(H=1)):H*=1e3),O=await m.retry.calculateDelay({attemptCount:F,retryOptions:m.retry,error:M,retryAfter:H,computedValue:S.default({attemptCount:F,retryOptions:m.retry,error:M,retryAfter:H,computedValue:0})})}catch(H){this._error(new ce(H.message,H,this));return}if(O){const H=async()=>{try{for(const U of this.options.hooks.beforeRetry)await U(this.options,M,F)}catch(U){this._error(new ce(U.message,E,this));return}this.destroyed||(this.destroy(),this.emit("retry",F,E))};this[k]=setTimeout(H,O);return}}this._error(M)})()}_read(){this[Ue]=!0;const E=this[Q];if(E&&!this[Xe]){E.readableLength&&(this[Ue]=!1);let m;for(;(m=E.read())!==null;){this[R]+=m.length,this[jt]=!0;const F=this.downloadProgress;F.percent<1&&this.emit("downloadProgress",F),this.push(m)}}}_write(E,m,F){const M=()=>{this._writeRequest(E,m,F)};this.requestInitialized?M():this[tt].push(M)}_writeRequest(E,m,F){this[B].destroyed||(this._progressCallbacks.push(()=>{this[G]+=Buffer.byteLength(E,m);const M=this.uploadProgress;M.percent<1&&this.emit("uploadProgress",M)}),this[B].write(E,m,M=>{!M&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),F(M)}))}_final(E){const m=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(B in this)){E();return}if(this[B].destroyed){E();return}this[B].end(F=>{F||(this[ee]=this[G],this.emit("uploadProgress",this.uploadProgress),this[B].emit("upload-complete")),E(F)})};this.requestInitialized?m():this[tt].push(m)}_destroy(E,m){var F;this[Xe]=!0,clearTimeout(this[k]),B in this&&(this[Me](),((F=this[Q])===null||F===void 0?void 0:F.complete)||this[B].destroy()),E!==null&&!p.default.undefined(E)&&!(E instanceof ce)&&(E=new ce(E.message,E,this)),m(E)}get _isAboutToError(){return this[Xe]}get ip(){var E;return(E=this.socket)===null||E===void 0?void 0:E.remoteAddress}get aborted(){var E,m,F;return((m=(E=this[B])===null||E===void 0?void 0:E.destroyed)!==null&&m!==void 0?m:this.destroyed)&&!((F=this[zr])===null||F===void 0?void 0:F.complete)}get socket(){var E,m;return(m=(E=this[B])===null||E===void 0?void 0:E.socket)!==null&&m!==void 0?m:void 0}get downloadProgress(){let E;return this[w]?E=this[R]/this[w]:this[w]===this[R]?E=1:E=0,{percent:E,transferred:this[R],total:this[w]}}get uploadProgress(){let E;return this[ee]?E=this[G]/this[ee]:this[ee]===this[G]?E=1:E=0,{percent:E,transferred:this[G],total:this[ee]}}get timings(){var E;return(E=this[B])===null||E===void 0?void 0:E.timings}get isFromCache(){return this[fe]}pipe(E,m){if(this[jt])throw new Error("Failed to pipe. The response has been emitted already.");return E instanceof a.ServerResponse&&this[be].add(E),super.pipe(E,m)}unpipe(E){return E instanceof a.ServerResponse&&this[be].delete(E),super.unpipe(E),this}}t.default=ro}(Tr),function(t){var e=ie&&ie.__createBinding||(Object.create?function(a,o,u,l){l===void 0&&(l=u),Object.defineProperty(a,l,{enumerable:!0,get:function(){return o[u]}})}:function(a,o,u,l){l===void 0&&(l=u),a[l]=o[u]}),r=ie&&ie.__exportStar||function(a,o){for(var u in a)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&e(o,a,u)};Object.defineProperty(t,"__esModule",{value:!0}),t.CancelError=t.ParseError=void 0;const s=Tr;class n extends s.RequestError{constructor(o,u){const{options:l}=u.request;super(`${o.message} in "${l.url.toString()}"`,o,u.request);this.name="ParseError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_BODY_PARSE_FAILURE":this.code}}t.ParseError=n;class i extends s.RequestError{constructor(o){super("Promise was canceled",{},o);this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}}t.CancelError=i,r(Tr,t)}($r);var Sa={};Object.defineProperty(Sa,"__esModule",{value:!0});const Jc=$r,$_=(t,e,r,s)=>{const{rawBody:n}=t;try{if(e==="text")return n.toString(s);if(e==="json")return n.length===0?"":r(n.toString());if(e==="buffer")return n;throw new Jc.ParseError({message:`Unknown body type '${e}'`,name:"Error"},t)}catch(i){throw new Jc.ParseError(i,t)}};Sa.default=$_,function(t){var e=ie&&ie.__createBinding||(Object.create?function(p,D,_,b){b===void 0&&(b=_),Object.defineProperty(p,b,{enumerable:!0,get:function(){return D[_]}})}:function(p,D,_,b){b===void 0&&(b=_),p[b]=D[_]}),r=ie&&ie.__exportStar||function(p,D){for(var _ in p)_!=="default"&&!Object.prototype.hasOwnProperty.call(D,_)&&e(D,p,_)};Object.defineProperty(t,"__esModule",{value:!0});const s=gt,n=ut.exports,i=Zi.exports,a=$r,o=Sa,u=Tr,l=Ms,f=Us,d=kr,c=["request","response","redirect","uploadProgress","downloadProgress"];function g(p){let D,_;const b=new s.EventEmitter,C=new i((A,y,h)=>{const v=$=>{const T=new u.default(void 0,p);T.retryCount=$,T._noPipe=!0,h(()=>T.destroy()),h.shouldReject=!1,h(()=>y(new a.CancelError(T))),D=T,T.once("response",async I=>{var B;if(I.retryCount=$,I.request.aborted)return;let Q;try{Q=await f.default(T),I.rawBody=Q}catch{return}if(T._isAboutToError)return;const w=((B=I.headers["content-encoding"])!==null&&B!==void 0?B:"").toLowerCase(),R=["gzip","deflate","br"].includes(w),{options:ee}=T;if(R&&!ee.decompress)I.body=Q;else try{I.body=o.default(I,ee.responseType,ee.parseJson,ee.encoding)}catch(G){if(I.body=Q.toString(),d.isResponseOk(I)){T._beforeError(G);return}}try{for(const[G,be]of ee.hooks.afterResponse.entries())I=await be(I,async Te=>{const fe=u.default.normalizeArguments(void 0,{...Te,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},ee);fe.hooks.afterResponse=fe.hooks.afterResponse.slice(0,G);for(const jt of fe.hooks.beforeRetry)await jt(fe);const Me=g(fe);return h(()=>{Me.catch(()=>{}),Me.cancel()}),Me})}catch(G){T._beforeError(new a.RequestError(G.message,G,T));return}if(!d.isResponseOk(I)){T._beforeError(new a.HTTPError(I));return}_=I,A(T.options.resolveBodyOnly?I.body:I)});const j=I=>{if(C.isCanceled)return;const{options:B}=T;if(I instanceof a.HTTPError&&!B.throwHttpErrors){const{response:Q}=I;A(T.options.resolveBodyOnly?Q.body:Q);return}y(I)};T.once("error",j);const S=T.options.body;T.once("retry",(I,B)=>{var Q,w;if(S===((Q=B.request)===null||Q===void 0?void 0:Q.options.body)&&n.default.nodeStream((w=B.request)===null||w===void 0?void 0:w.options.body)){j(B);return}v(I)}),l.default(T,b,c)};v(0)});C.on=(A,y)=>(b.on(A,y),C);const x=A=>{const y=(async()=>{await C;const{options:h}=_.request;return o.default(_,A,h.parseJson,h.encoding)})();return Object.defineProperties(y,Object.getOwnPropertyDescriptors(C)),y};return C.json=()=>{const{headers:A}=D.options;return!D.writableFinished&&A.accept===void 0&&(A.accept="application/json"),x("json")},C.buffer=()=>x("buffer"),C.text=()=>x("text"),C}t.default=g,r($r,t)}(Ji);var Aa={};Object.defineProperty(Aa,"__esModule",{value:!0});const T_=$r;function F_(t,...e){const r=(async()=>{if(t instanceof T_.RequestError)try{for(const n of e)if(n)for(const i of n)t=await i(t)}catch(n){t=n}throw t})(),s=()=>r;return r.json=s,r.text=s,r.buffer=s,r.on=s,r}Aa.default=F_;var Ra={};Object.defineProperty(Ra,"__esModule",{value:!0});const Zc=ut.exports;function eh(t){for(const e of Object.values(t))(Zc.default.plainObject(e)||Zc.default.array(e))&&eh(e);return Object.freeze(t)}Ra.default=eh;var th={};Object.defineProperty(th,"__esModule",{value:!0}),function(t){var e=ie&&ie.__createBinding||(Object.create?function(b,C,x,A){A===void 0&&(A=x),Object.defineProperty(b,A,{enumerable:!0,get:function(){return C[x]}})}:function(b,C,x,A){A===void 0&&(A=x),b[A]=C[x]}),r=ie&&ie.__exportStar||function(b,C){for(var x in b)x!=="default"&&!Object.prototype.hasOwnProperty.call(C,x)&&e(C,b,x)};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultHandler=void 0;const s=ut.exports,n=Ji,i=Aa,a=Tr,o=Ra,u={RequestError:n.RequestError,CacheError:n.CacheError,ReadError:n.ReadError,HTTPError:n.HTTPError,MaxRedirectsError:n.MaxRedirectsError,TimeoutError:n.TimeoutError,ParseError:n.ParseError,CancelError:n.CancelError,UnsupportedProtocolError:n.UnsupportedProtocolError,UploadError:n.UploadError},l=async b=>new Promise(C=>{setTimeout(C,b)}),{normalizeArguments:f}=a.default,d=(...b)=>{let C;for(const x of b)C=f(void 0,x,C);return C},c=b=>b.isStream?new a.default(void 0,b):n.default(b),g=b=>"defaults"in b&&"options"in b.defaults,p=["get","post","put","patch","head","delete"];t.defaultHandler=(b,C)=>C(b);const D=(b,C)=>{if(b)for(const x of b)x(C)},_=b=>{b._rawHandlers=b.handlers,b.handlers=b.handlers.map(A=>(y,h)=>{let v;const $=A(y,T=>(v=h(T),v));if($!==v&&!y.isStream&&v){const T=$,{then:j,catch:S,finally:I}=T;Object.setPrototypeOf(T,Object.getPrototypeOf(v)),Object.defineProperties(T,Object.getOwnPropertyDescriptors(v)),T.then=j,T.catch=S,T.finally=I}return $});const C=(A,y={},h)=>{var v,$;let T=0;const j=S=>b.handlers[T++](S,T===b.handlers.length?c:j);if(s.default.plainObject(A)){const S={...A,...y};a.setNonEnumerableProperties([A,y],S),y=S,A=void 0}try{let S;try{D(b.options.hooks.init,y),D((v=y.hooks)===null||v===void 0?void 0:v.init,y)}catch(B){S=B}const I=f(A,y,h??b.options);if(I[a.kIsNormalizedAlready]=!0,S)throw new n.RequestError(S.message,S,I);return j(I)}catch(S){if(y.isStream)throw S;return i.default(S,b.options.hooks.beforeError,($=y.hooks)===null||$===void 0?void 0:$.beforeError)}};C.extend=(...A)=>{const y=[b.options];let h=[...b._rawHandlers],v;for(const $ of A)g($)?(y.push($.defaults.options),h.push(...$.defaults._rawHandlers),v=$.defaults.mutableDefaults):(y.push($),"handlers"in $&&h.push(...$.handlers),v=$.mutableDefaults);return h=h.filter($=>$!==t.defaultHandler),h.length===0&&h.push(t.defaultHandler),_({options:d(...y),handlers:h,mutableDefaults:Boolean(v)})};const x=async function*(A,y){let h=f(A,y,b.options);h.resolveBodyOnly=!1;const v=h.pagination;if(!s.default.object(v))throw new TypeError("`options.pagination` must be implemented");const $=[];let{countLimit:T}=v,j=0;for(;j<v.requestLimit;){j!==0&&await l(v.backoff);const S=await C(void 0,void 0,h),I=await v.transform(S),B=[];for(const w of I)if(v.filter(w,$,B)&&(!v.shouldContinue(w,$,B)||(yield w,v.stackAllItems&&$.push(w),B.push(w),--T<=0)))return;const Q=v.paginate(S,$,B);if(Q===!1)return;Q===S.request.options?h=S.request.options:Q!==void 0&&(h=f(void 0,Q,h)),j++}};C.paginate=x,C.paginate.all=async(A,y)=>{const h=[];for await(const v of x(A,y))h.push(v);return h},C.paginate.each=x,C.stream=(A,y)=>C(A,{...y,isStream:!0});for(const A of p)C[A]=(y,h)=>C(y,{...h,method:A}),C.stream[A]=(y,h)=>C(y,{...h,method:A,isStream:!0});return Object.assign(C,u),Object.defineProperty(C,"defaults",{value:b.mutableDefaults?b:o.default(b),writable:b.mutableDefaults,configurable:b.mutableDefaults,enumerable:!0}),C.mergeOptions=d,C};t.default=_,r(th,t)}(Qi),function(t,e){var r=ie&&ie.__createBinding||(Object.create?function(u,l,f,d){d===void 0&&(d=f),Object.defineProperty(u,d,{enumerable:!0,get:function(){return l[f]}})}:function(u,l,f,d){d===void 0&&(d=f),u[d]=l[f]}),s=ie&&ie.__exportStar||function(u,l){for(var f in u)f!=="default"&&!Object.prototype.hasOwnProperty.call(l,f)&&r(l,u,f)};Object.defineProperty(e,"__esModule",{value:!0});const n=hr,i=Qi,a={options:{method:"GET",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:({computedValue:u})=>u},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:u=>u.request.options.responseType==="json"?u.body:JSON.parse(u.body),paginate:u=>{if(!Reflect.has(u.headers,"link"))return!1;const l=u.headers.link.split(",");let f;for(const d of l){const c=d.split(";");if(c[1].includes("next")){f=c[0].trimStart().trim(),f=f.slice(1,-1);break}}return f?{url:new n.URL(f)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:u=>JSON.parse(u),stringifyJson:u=>JSON.stringify(u),cacheOptions:{}},handlers:[i.defaultHandler],mutableDefaults:!1},o=i.default(a);e.default=o,t.exports=o,t.exports.default=o,t.exports.__esModule=!0,s(Qi,e),s(Ji,e)}(Yi,Yi.exports);var xa={exports:{}},nr={},Lt={};Lt.parse=Lt.decode=O_,Lt.stringify=Lt.encode=rh,Lt.safe=ir,Lt.unsafe=Gs;var $a=typeof process<"u"&&process.platform==="win32"?`\r
|
|
97
|
+
`:`
|
|
98
|
+
`;function rh(t,e){var r=[],s="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var n=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(i,a,o){var u=t[i];u&&Array.isArray(u)?u.forEach(function(l){s+=ir(i+"[]")+n+ir(l)+`
|
|
99
|
+
`}):u&&typeof u=="object"?r.push(i):s+=ir(i)+n+ir(u)+$a}),e.section&&s.length&&(s="["+ir(e.section)+"]"+$a+s),r.forEach(function(i,a,o){var u=sh(i).join("\\."),l=(e.section?e.section+".":"")+u,f=rh(t[i],{section:l,whitespace:e.whitespace});s.length&&f.length&&(s+=$a),s+=f}),s}function sh(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function O_(t){var e={},r=e,s=null,n=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,i=t.split(/[\r\n]+/g);return i.forEach(function(a,o,u){if(!(!a||a.match(/^\s*[;#]/))){var l=a.match(n);if(!!l){if(l[1]!==void 0){if(s=Gs(l[1]),s==="__proto__"){r={};return}r=e[s]=e[s]||{};return}var f=Gs(l[2]);if(f!=="__proto__"){var d=l[3]?Gs(l[4]):!0;switch(d){case"true":case"false":case"null":d=JSON.parse(d)}if(f.length>2&&f.slice(-2)==="[]"){if(f=f.substring(0,f.length-2),f==="__proto__")return;r[f]?Array.isArray(r[f])||(r[f]=[r[f]]):r[f]=[]}Array.isArray(r[f])?r[f].push(d):r[f]=d}}}}),Object.keys(e).filter(function(a,o,u){if(!e[a]||typeof e[a]!="object"||Array.isArray(e[a]))return!1;var l=sh(a),f=e,d=l.pop(),c=d.replace(/\\\./g,".");return l.forEach(function(g,p,D){g!=="__proto__"&&((!f[g]||typeof f[g]!="object")&&(f[g]={}),f=f[g])}),f===e&&c===d?!1:(f[c]=e[a],!0)}).forEach(function(a,o,u){delete e[a]}),e}function nh(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function ir(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&nh(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Gs(t,e){if(t=(t||"").trim(),nh(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,s="",n=0,i=t.length;n<i;n++){var a=t.charAt(n);if(r)"\\;#".indexOf(a)!==-1?s+=a:s+="\\"+a,r=!1;else{if(";#".indexOf(a)!==-1)break;a==="\\"?r=!0:s+=a}}return r&&(s+="\\"),s.trim()}return t}const Ta=Symbol("singleComment"),ih=Symbol("multiComment"),P_=()=>"",k_=(t,e,r)=>t.slice(e,r).replace(/\S/g," "),I_=(t,e)=>{let r=e-1,s=0;for(;t[r]==="\\";)r-=1,s+=1;return Boolean(s%2)};var L_=(t,e={})=>{if(typeof t!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof t}\``);const r=e.whitespace===!1?P_:k_;let s=!1,n=!1,i=0,a="";for(let o=0;o<t.length;o++){const u=t[o],l=t[o+1];if(!n&&u==='"'&&(I_(t,o)||(s=!s)),!s){if(!n&&u+l==="//")a+=t.slice(i,o),i=o,n=Ta,o++;else if(n===Ta&&u+l===`\r
|
|
100
|
+
`){o++,n=!1,a+=r(t,i,o),i=o;continue}else if(n===Ta&&u===`
|
|
101
|
+
`)n=!1,a+=r(t,i,o),i=o;else if(!n&&u+l==="/*"){a+=t.slice(i,o),i=o,n=ih,o++;continue}else if(n===ih&&u+l==="*/"){o++,n=!1,a+=r(t,i,o+1),i=o+1;continue}}}return a+(n?r(t.slice(i)):t.slice(i))},ah=lt,B_=Lt,Lr=Oe,N_=L_,H_=nr.parse=function(t){return/^\s*{/.test(t)?JSON.parse(N_(t)):B_.parse(t)},j_=nr.file=function(){var t=[].slice.call(arguments).filter(function(s){return s!=null});for(var e in t)if(typeof t[e]!="string")return;var r=Lr.join.apply(null,t);try{return ah.readFileSync(r,"utf-8")}catch{return}};nr.json=function(){var t=j_.apply(null,arguments);return t?H_(t):null},nr.env=function(t,e){e=e||process.env;var r={},s=t.length;for(var n in e)if(n.toLowerCase().indexOf(t.toLowerCase())===0){for(var i=n.substring(s).split("__"),a;(a=i.indexOf(""))>-1;)i.splice(a,1);var o=r;i.forEach(function(l,f){!l||typeof o!="object"||(f===i.length-1&&(o[l]=e[n]),o[l]===void 0&&(o[l]={}),o=o[l])})}return r},nr.find=function(){var t=Lr.join.apply(null,[].slice.call(arguments));function e(r,s){var n=Lr.join(r,s);try{return ah.statSync(n),n}catch{if(Lr.dirname(r)!==r)return e(Lr.dirname(r),s)}}return e(process.cwd(),t)};var oh={exports:{}};/*!
|
|
102
|
+
* @description Recursive object extending
|
|
103
|
+
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
|
104
|
+
* @license MIT
|
|
105
|
+
*
|
|
106
|
+
* The MIT License (MIT)
|
|
107
|
+
*
|
|
108
|
+
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
|
|
109
|
+
*
|
|
110
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
111
|
+
* this software and associated documentation files (the "Software"), to deal in
|
|
112
|
+
* the Software without restriction, including without limitation the rights to
|
|
113
|
+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
114
|
+
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
115
|
+
* subject to the following conditions:
|
|
116
|
+
*
|
|
117
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
118
|
+
* copies or substantial portions of the Software.
|
|
119
|
+
*
|
|
120
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
121
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
122
|
+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
123
|
+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
124
|
+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
125
|
+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
126
|
+
*/function uh(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function lh(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function ch(t){var e=[];return t.forEach(function(r,s){typeof r=="object"&&r!==null?Array.isArray(r)?e[s]=ch(r):uh(r)?e[s]=lh(r):e[s]=Fa({},r):e[s]=r}),e}function hh(t,e){return e==="__proto__"?void 0:t[e]}var Fa=oh.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var t=arguments[0],e=Array.prototype.slice.call(arguments,1),r,s;return e.forEach(function(n){typeof n!="object"||n===null||Array.isArray(n)||Object.keys(n).forEach(function(i){if(s=hh(t,i),r=hh(n,i),r!==t)if(typeof r!="object"||r===null){t[i]=r;return}else if(Array.isArray(r)){t[i]=ch(r);return}else if(uh(r)){t[i]=lh(r);return}else if(typeof s!="object"||s===null||Array.isArray(s)){t[i]=Fa({},r);return}else{t[i]=Fa(s,r);return}})}),t},M_=function(t,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(A){r.bools[A]=!0});var s={};Object.keys(e.alias||{}).forEach(function(A){s[A]=[].concat(e.alias[A]),s[A].forEach(function(y){s[y]=[A].concat(s[A].filter(function(h){return y!==h}))})}),[].concat(e.string).filter(Boolean).forEach(function(A){r.strings[A]=!0,s[A]&&(r.strings[s[A]]=!0)});var n=e.default||{},i={_:[]};Object.keys(r.bools).forEach(function(A){u(A,n[A]===void 0?!1:n[A])});var a=[];t.indexOf("--")!==-1&&(a=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));function o(A,y){return r.allBools&&/^--[^=]+$/.test(y)||r.strings[A]||r.bools[A]||s[A]}function u(A,y,h){if(!(h&&r.unknownFn&&!o(A,h)&&r.unknownFn(h)===!1)){var v=!r.strings[A]&&fh(y)?Number(y):y;l(i,A.split("."),v),(s[A]||[]).forEach(function($){l(i,$.split("."),v)})}}function l(A,y,h){for(var v=A,$=0;$<y.length-1;$++){var T=y[$];if(T==="__proto__")return;v[T]===void 0&&(v[T]={}),(v[T]===Object.prototype||v[T]===Number.prototype||v[T]===String.prototype)&&(v[T]={}),v[T]===Array.prototype&&(v[T]=[]),v=v[T]}var T=y[y.length-1];T!=="__proto__"&&((v===Object.prototype||v===Number.prototype||v===String.prototype)&&(v={}),v===Array.prototype&&(v=[]),v[T]===void 0||r.bools[T]||typeof v[T]=="boolean"?v[T]=h:Array.isArray(v[T])?v[T].push(h):v[T]=[v[T],h])}function f(A){return s[A].some(function(y){return r.bools[y]})}for(var d=0;d<t.length;d++){var c=t[d];if(/^--.+=/.test(c)){var g=c.match(/^--([^=]+)=([\s\S]*)$/),p=g[1],D=g[2];r.bools[p]&&(D=D!=="false"),u(p,D,c)}else if(/^--no-.+/.test(c)){var p=c.match(/^--no-(.+)/)[1];u(p,!1,c)}else if(/^--.+/.test(c)){var p=c.match(/^--(.+)/)[1],_=t[d+1];_!==void 0&&!/^-/.test(_)&&!r.bools[p]&&!r.allBools&&(s[p]?!f(p):!0)?(u(p,_,c),d++):/^(true|false)$/.test(_)?(u(p,_==="true",c),d++):u(p,r.strings[p]?"":!0,c)}else if(/^-[^-]+/.test(c)){for(var b=c.slice(1,-1).split(""),C=!1,x=0;x<b.length;x++){var _=c.slice(x+2);if(_==="-"){u(b[x],_,c);continue}if(/[A-Za-z]/.test(b[x])&&/=/.test(_)){u(b[x],_.split("=")[1],c),C=!0;break}if(/[A-Za-z]/.test(b[x])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){u(b[x],_,c),C=!0;break}if(b[x+1]&&b[x+1].match(/\W/)){u(b[x],c.slice(x+2),c),C=!0;break}else u(b[x],r.strings[b[x]]?"":!0,c)}var p=c.slice(-1)[0];!C&&p!=="-"&&(t[d+1]&&!/^(-|--)[^-]/.test(t[d+1])&&!r.bools[p]&&(s[p]?!f(p):!0)?(u(p,t[d+1],c),d++):t[d+1]&&/^(true|false)$/.test(t[d+1])?(u(p,t[d+1]==="true",c),d++):u(p,r.strings[p]?"":!0,c))}else if((!r.unknownFn||r.unknownFn(c)!==!1)&&i._.push(r.strings._||!fh(c)?c:Number(c)),e.stopEarly){i._.push.apply(i._,t.slice(d+1));break}}return Object.keys(n).forEach(function(A){U_(i,A.split("."))||(l(i,A.split("."),n[A]),(s[A]||[]).forEach(function(y){l(i,y.split("."),n[A])}))}),e["--"]?(i["--"]=new Array,a.forEach(function(A){i["--"].push(A)})):a.forEach(function(A){i._.push(A)}),i};function U_(t,e){var r=t;e.slice(0,-1).forEach(function(n){r=r[n]||{}});var s=e[e.length-1];return s in r}function fh(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}var Br=nr,ar=Oe.join,G_=oh.exports,dh="/etc",ph=process.platform==="win32",Nr=ph?process.env.USERPROFILE:process.env.HOME,mh=function(t,e,r,s){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=M_(process.argv.slice(2))),e=(typeof e=="string"?Br.json(e):e)||{},s=s||Br.parse;var n=Br.env(t+"_"),i=[e],a=[];function o(u){if(!(a.indexOf(u)>=0)){var l=Br.file(u);l&&(i.push(s(l)),a.push(u))}}return ph||[ar(dh,t,"config"),ar(dh,t+"rc")].forEach(o),Nr&&[ar(Nr,".config",t,"config"),ar(Nr,".config",t),ar(Nr,"."+t,"config"),ar(Nr,"."+t+"rc")].forEach(o),o(Br.find("."+t+"rc")),n.config&&o(n.config),r.config&&o(r.config),G_.apply(null,i.concat([n,r,a.length?{configs:a,config:a[a.length-1]}:void 0]))};const q_=mh,gh=t=>{const e=q_("npm",{registry:"https://registry.npmjs.org/"}),r=e[`${t}:registry`]||e.config_registry||e.registry;return r.slice(-1)==="/"?r:`${r}/`};xa.exports=gh,xa.exports.default=gh;function z_(t){return Buffer.from(t,"base64").toString("utf8")}function V_(t){return Buffer.from(t,"utf8").toString("base64")}var W_={decodeBase64:z_,encodeBase64:V_},Oa=hr,yh=W_,X_=yh.decodeBase64,K_=yh.encodeBase64,Dh=":_authToken",vh=":_auth",bh=":username",Eh=":_password",Y_=function(){var t,e;return arguments.length>=2?(t=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?t=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||mh("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),t=t||e.npmrc.registry,_h(t,e)||Q_(e.npmrc)};function _h(t,e){for(var r=Oa.parse(t,!1,!0),s;s!=="/"&&r.pathname!==s;){s=r.pathname||"/";var n="//"+r.host+s.replace(/\/$/,""),i=Z_(n,e.npmrc);if(i)return i;if(!e.recursive)return/\/$/.test(t)?void 0:_h(Oa.resolve(t,"."),e);r.pathname=Oa.resolve(J_(s),"..")||"/"}}function Q_(t){if(!!t._auth){var e=qs(t._auth);return{token:e,type:"Basic"}}}function J_(t){return t[t.length-1]==="/"?t:t+"/"}function Z_(t,e){var r=ew(e[t+Dh]||e[t+"/"+Dh]);if(r)return r;var s=e[t+bh]||e[t+"/"+bh],n=e[t+Eh]||e[t+"/"+Eh],i=tw(s,n);if(i)return i;var a=rw(e[t+vh]||e[t+"/"+vh]);if(a)return a}function qs(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function ew(t){if(!!t){var e=qs(t);return{token:e,type:"Bearer"}}}function tw(t,e){if(!(!t||!e)){var r=X_(qs(e)),s=K_(t+":"+r);return{token:s,type:"Basic",password:r,username:t}}}function rw(t){if(!!t){var e=qs(t);return{token:e,type:"Basic"}}}var wt={exports:{}};const sw="2.0.0",nw=256,iw=Number.MAX_SAFE_INTEGER||9007199254740991,aw=16;var zs={SEMVER_SPEC_VERSION:sw,MAX_LENGTH:nw,MAX_SAFE_INTEGER:iw,MAX_SAFE_COMPONENT_LENGTH:aw};const ow=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var Vs=ow;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r}=zs,s=Vs;e=t.exports={};const n=e.re=[],i=e.src=[],a=e.t={};let o=0;const u=(l,f,d)=>{const c=o++;s(c,f),a[l]=c,i[c]=f,n[c]=new RegExp(f,d?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","[0-9]+"),u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),u("MAINVERSION",`(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${i[a.NUMERICIDENTIFIER]}|${i[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${i[a.NUMERICIDENTIFIERLOOSE]}|${i[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASE",`(?:-(${i[a.PRERELEASEIDENTIFIER]}(?:\\.${i[a.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${i[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[a.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER","[0-9A-Za-z-]+"),u("BUILD",`(?:\\+(${i[a.BUILDIDENTIFIER]}(?:\\.${i[a.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${i[a.MAINVERSION]}${i[a.PRERELEASE]}?${i[a.BUILD]}?`),u("FULL",`^${i[a.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${i[a.MAINVERSIONLOOSE]}${i[a.PRERELEASELOOSE]}?${i[a.BUILD]}?`),u("LOOSE",`^${i[a.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",`${i[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),u("XRANGEIDENTIFIER",`${i[a.NUMERICIDENTIFIER]}|x|X|\\*`),u("XRANGEPLAIN",`[v=\\s]*(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:${i[a.PRERELEASE]})?${i[a.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:${i[a.PRERELEASELOOSE]})?${i[a.BUILD]}?)?)?`),u("XRANGE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAINLOOSE]}$`),u("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),u("COERCERTL",i[a.COERCE],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${i[a.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",u("TILDE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${i[a.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",u("CARET",`^${i[a.LONECARET]}${i[a.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${i[a.LONECARET]}${i[a.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${i[a.GTLT]}\\s*(${i[a.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]}|${i[a.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${i[a.XRANGEPLAIN]})\\s+-\\s+(${i[a.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${i[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[a.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0.0.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")})(wt,wt.exports);const uw=["includePrerelease","loose","rtl"],lw=t=>t?typeof t!="object"?{loose:!0}:uw.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};var Ws=lw;const wh=/^[0-9]+$/,Ch=(t,e)=>{const r=wh.test(t),s=wh.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},cw=(t,e)=>Ch(e,t);var Pa={compareIdentifiers:Ch,rcompareIdentifiers:cw};const Xs=Vs,{MAX_LENGTH:Sh,MAX_SAFE_INTEGER:Ks}=zs,{re:Ah,t:Rh}=wt.exports,hw=Ws,{compareIdentifiers:Hr}=Pa;class et{constructor(e,r){if(r=hw(r),e instanceof et){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Sh)throw new TypeError(`version is longer than ${Sh} characters`);Xs("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const s=e.trim().match(r.loose?Ah[Rh.LOOSE]:Ah[Rh.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>Ks||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ks||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ks||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){const i=+n;if(i>=0&&i<Ks)return i}return n}):this.prerelease=[],this.build=s[5]?s[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(Xs("SemVer.compare",this.version,this.options,e),!(e instanceof et)){if(typeof e=="string"&&e===this.version)return 0;e=new et(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof et||(e=new et(e,this.options)),Hr(this.major,e.major)||Hr(this.minor,e.minor)||Hr(this.patch,e.patch)}comparePre(e){if(e instanceof et||(e=new et(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{const s=this.prerelease[r],n=e.prerelease[r];if(Xs("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return Hr(s,n)}while(++r)}compareBuild(e){e instanceof et||(e=new et(e,this.options));let r=0;do{const s=this.build[r],n=e.build[r];if(Xs("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return Hr(s,n)}while(++r)}inc(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);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":if(this.prerelease.length===0)this.prerelease=[0];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);s===-1&&this.prerelease.push(0)}r&&(this.prerelease[0]===r?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}var ke=et;const{MAX_LENGTH:fw}=zs,{re:xh,t:$h}=wt.exports,Th=ke,dw=Ws,pw=(t,e)=>{if(e=dw(e),t instanceof Th)return t;if(typeof t!="string"||t.length>fw||!(e.loose?xh[$h.LOOSE]:xh[$h.FULL]).test(t))return null;try{return new Th(t,e)}catch{return null}};var or=pw;const mw=or,gw=(t,e)=>{const r=mw(t,e);return r?r.version:null};var yw=gw;const Dw=or,vw=(t,e)=>{const r=Dw(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};var bw=vw;const Ew=ke,_w=(t,e,r,s)=>{typeof r=="string"&&(s=r,r=void 0);try{return new Ew(t,r).inc(e,s).version}catch{return null}};var ww=_w;const Fh=ke,Cw=(t,e,r)=>new Fh(t,r).compare(new Fh(e,r));var Qe=Cw;const Sw=Qe,Aw=(t,e,r)=>Sw(t,e,r)===0;var ka=Aw;const Oh=or,Rw=ka,xw=(t,e)=>{if(Rw(t,e))return null;{const r=Oh(t),s=Oh(e),n=r.prerelease.length||s.prerelease.length,i=n?"pre":"",a=n?"prerelease":"";for(const o in r)if((o==="major"||o==="minor"||o==="patch")&&r[o]!==s[o])return i+o;return a}};var $w=xw;const Tw=ke,Fw=(t,e)=>new Tw(t,e).major;var Ow=Fw;const Pw=ke,kw=(t,e)=>new Pw(t,e).minor;var Iw=kw;const Lw=ke,Bw=(t,e)=>new Lw(t,e).patch;var Nw=Bw;const Hw=or,jw=(t,e)=>{const r=Hw(t,e);return r&&r.prerelease.length?r.prerelease:null};var Mw=jw;const Uw=Qe,Gw=(t,e,r)=>Uw(e,t,r);var qw=Gw;const zw=Qe,Vw=(t,e)=>zw(t,e,!0);var Ww=Vw;const Ph=ke,Xw=(t,e,r)=>{const s=new Ph(t,r),n=new Ph(e,r);return s.compare(n)||s.compareBuild(n)};var Ia=Xw;const Kw=Ia,Yw=(t,e)=>t.sort((r,s)=>Kw(r,s,e));var Qw=Yw;const Jw=Ia,Zw=(t,e)=>t.sort((r,s)=>Jw(s,r,e));var eC=Zw;const tC=Qe,rC=(t,e,r)=>tC(t,e,r)>0;var Ys=rC;const sC=Qe,nC=(t,e,r)=>sC(t,e,r)<0;var La=nC;const iC=Qe,aC=(t,e,r)=>iC(t,e,r)!==0;var kh=aC;const oC=Qe,uC=(t,e,r)=>oC(t,e,r)>=0;var Ba=uC;const lC=Qe,cC=(t,e,r)=>lC(t,e,r)<=0;var Na=cC;const hC=ka,fC=kh,dC=Ys,pC=Ba,mC=La,gC=Na,yC=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return hC(t,r,s);case"!=":return fC(t,r,s);case">":return dC(t,r,s);case">=":return pC(t,r,s);case"<":return mC(t,r,s);case"<=":return gC(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};var Ih=yC;const DC=ke,vC=or,{re:Qs,t:Js}=wt.exports,bC=(t,e)=>{if(t instanceof DC)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(Qs[Js.COERCE]);else{let s;for(;(s=Qs[Js.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||s.index+s[0].length!==r.index+r[0].length)&&(r=s),Qs[Js.COERCERTL].lastIndex=s.index+s[1].length+s[2].length;Qs[Js.COERCERTL].lastIndex=-1}return r===null?null:vC(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};var EC=bC,_C=Y;Y.Node=Bt,Y.create=Y;function Y(t){var e=this;if(e instanceof Y||(e=new Y),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)e.push(arguments[r]);return e}Y.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e},Y.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}},Y.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}},Y.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)CC(this,arguments[t]);return this.length},Y.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)SC(this,arguments[t]);return this.length},Y.prototype.pop=function(){if(!!this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}},Y.prototype.shift=function(){if(!!this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}},Y.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,s=0;r!==null;s++)t.call(e,r.value,s,this),r=r.next},Y.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,s=this.length-1;r!==null;s--)t.call(e,r.value,s,this),r=r.prev},Y.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value},Y.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value},Y.prototype.map=function(t,e){e=e||this;for(var r=new Y,s=this.head;s!==null;)r.push(t.call(e,s.value,this)),s=s.next;return r},Y.prototype.mapReverse=function(t,e){e=e||this;for(var r=new Y,s=this.tail;s!==null;)r.push(t.call(e,s.value,this)),s=s.prev;return r},Y.prototype.reduce=function(t,e){var r,s=this.head;if(arguments.length>1)r=e;else if(this.head)s=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;s!==null;n++)r=t(r,s.value,n),s=s.next;return r},Y.prototype.reduceReverse=function(t,e){var r,s=this.tail;if(arguments.length>1)r=e;else if(this.tail)s=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;s!==null;n--)r=t(r,s.value,n),s=s.prev;return r},Y.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t},Y.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t},Y.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Y;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=0,n=this.head;n!==null&&s<t;s++)n=n.next;for(;n!==null&&s<e;s++,n=n.next)r.push(n.value);return r},Y.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Y;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=this.length,n=this.tail;n!==null&&s>e;s--)n=n.prev;for(;n!==null&&s>t;s--,n=n.prev)r.push(n.value);return r},Y.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var s=0,n=this.head;n!==null&&s<t;s++)n=n.next;for(var i=[],s=0;n&&s<e;s++)i.push(n.value),n=this.removeNode(n);n===null&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(var s=0;s<r.length;s++)n=wC(this,n,r[s]);return i},Y.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=e,this.tail=t,this};function wC(t,e,r){var s=e===t.head?new Bt(r,null,e,t):new Bt(r,e,e.next,t);return s.next===null&&(t.tail=s),s.prev===null&&(t.head=s),t.length++,s}function CC(t,e){t.tail=new Bt(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function SC(t,e){t.head=new Bt(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function Bt(t,e,r,s){if(!(this instanceof Bt))return new Bt(t,e,r,s);this.list=s,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{require("./iterator.js")(Y)}catch{}const AC=_C,Nt=Symbol("max"),dt=Symbol("length"),ur=Symbol("lengthCalculator"),jr=Symbol("allowStale"),Ht=Symbol("maxAge"),pt=Symbol("dispose"),Lh=Symbol("noDisposeOnSet"),ve=Symbol("lruList"),Je=Symbol("cache"),Bh=Symbol("updateAgeOnGet"),Ha=()=>1;class RC{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[Nt]=e.max||1/0;const r=e.length||Ha;if(this[ur]=typeof r!="function"?Ha:r,this[jr]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ht]=e.maxAge||0,this[pt]=e.dispose,this[Lh]=e.noDisposeOnSet||!1,this[Bh]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Nt]=e||1/0,Mr(this)}get max(){return this[Nt]}set allowStale(e){this[jr]=!!e}get allowStale(){return this[jr]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Ht]=e,Mr(this)}get maxAge(){return this[Ht]}set lengthCalculator(e){typeof e!="function"&&(e=Ha),e!==this[ur]&&(this[ur]=e,this[dt]=0,this[ve].forEach(r=>{r.length=this[ur](r.value,r.key),this[dt]+=r.length})),Mr(this)}get lengthCalculator(){return this[ur]}get length(){return this[dt]}get itemCount(){return this[ve].length}rforEach(e,r){r=r||this;for(let s=this[ve].tail;s!==null;){const n=s.prev;Nh(this,e,s,r),s=n}}forEach(e,r){r=r||this;for(let s=this[ve].head;s!==null;){const n=s.next;Nh(this,e,s,r),s=n}}keys(){return this[ve].toArray().map(e=>e.key)}values(){return this[ve].toArray().map(e=>e.value)}reset(){this[pt]&&this[ve]&&this[ve].length&&this[ve].forEach(e=>this[pt](e.key,e.value)),this[Je]=new Map,this[ve]=new AC,this[dt]=0}dump(){return this[ve].map(e=>Zs(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[ve]}set(e,r,s){if(s=s||this[Ht],s&&typeof s!="number")throw new TypeError("maxAge must be a number");const n=s?Date.now():0,i=this[ur](r,e);if(this[Je].has(e)){if(i>this[Nt])return lr(this,this[Je].get(e)),!1;const u=this[Je].get(e).value;return this[pt]&&(this[Lh]||this[pt](e,u.value)),u.now=n,u.maxAge=s,u.value=r,this[dt]+=i-u.length,u.length=i,this.get(e),Mr(this),!0}const a=new xC(e,r,i,n,s);return a.length>this[Nt]?(this[pt]&&this[pt](e,r),!1):(this[dt]+=a.length,this[ve].unshift(a),this[Je].set(e,this[ve].head),Mr(this),!0)}has(e){if(!this[Je].has(e))return!1;const r=this[Je].get(e).value;return!Zs(this,r)}get(e){return ja(this,e,!0)}peek(e){return ja(this,e,!1)}pop(){const e=this[ve].tail;return e?(lr(this,e),e.value):null}del(e){lr(this,this[Je].get(e))}load(e){this.reset();const r=Date.now();for(let s=e.length-1;s>=0;s--){const n=e[s],i=n.e||0;if(i===0)this.set(n.k,n.v);else{const a=i-r;a>0&&this.set(n.k,n.v,a)}}}prune(){this[Je].forEach((e,r)=>ja(this,r,!1))}}const ja=(t,e,r)=>{const s=t[Je].get(e);if(s){const n=s.value;if(Zs(t,n)){if(lr(t,s),!t[jr])return}else r&&(t[Bh]&&(s.value.now=Date.now()),t[ve].unshiftNode(s));return n.value}},Zs=(t,e)=>{if(!e||!e.maxAge&&!t[Ht])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Ht]&&r>t[Ht]},Mr=t=>{if(t[dt]>t[Nt])for(let e=t[ve].tail;t[dt]>t[Nt]&&e!==null;){const r=e.prev;lr(t,e),e=r}},lr=(t,e)=>{if(e){const r=e.value;t[pt]&&t[pt](r.key,r.value),t[dt]-=r.length,t[Je].delete(r.key),t[ve].removeNode(e)}};class xC{constructor(e,r,s,n,i){this.key=e,this.value=r,this.length=s,this.now=n,this.maxAge=i||0}}const Nh=(t,e,r,s)=>{let n=r.value;Zs(t,n)&&(lr(t,r),t[jr]||(n=void 0)),n&&e.call(s,n.value,n.key,t)};var $C=RC;class qr{constructor(e,r){if(r=FC(r),e instanceof qr)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new qr(e.raw,r);if(e instanceof Ma)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const s=this.set[0];if(this.set=this.set.filter(n=>!jh(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(const n of this.set)if(n.length===1&&LC(n[0])){this.set=[n];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const s=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=Hh.get(s);if(n)return n;const i=this.options.loose,a=i?$e[Ce.HYPHENRANGELOOSE]:$e[Ce.HYPHENRANGE];e=e.replace(a,VC(this.options.includePrerelease)),ye("hyphen replace",e),e=e.replace($e[Ce.COMPARATORTRIM],PC),ye("comparator trim",e,$e[Ce.COMPARATORTRIM]),e=e.replace($e[Ce.TILDETRIM],kC),e=e.replace($e[Ce.CARETTRIM],IC),e=e.split(/\s+/).join(" ");const o=i?$e[Ce.COMPARATORLOOSE]:$e[Ce.COMPARATOR],u=e.split(" ").map(d=>BC(d,this.options)).join(" ").split(/\s+/).map(d=>zC(d,this.options)).filter(this.options.loose?d=>!!d.match(o):()=>!0).map(d=>new Ma(d,this.options));u.length;const l=new Map;for(const d of u){if(jh(d))return[d];l.set(d.value,d)}l.size>1&&l.has("")&&l.delete("");const f=[...l.values()];return Hh.set(s,f),f}intersects(e,r){if(!(e instanceof qr))throw new TypeError("a Range is required");return this.set.some(s=>Mh(s,r)&&e.set.some(n=>Mh(n,r)&&s.every(i=>n.every(a=>i.intersects(a,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new OC(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(WC(this.set[r],e,this.options))return!0;return!1}}var Ze=qr;const TC=$C,Hh=new TC({max:1e3}),FC=Ws,Ma=en,ye=Vs,OC=ke,{re:$e,t:Ce,comparatorTrimReplace:PC,tildeTrimReplace:kC,caretTrimReplace:IC}=wt.exports,jh=t=>t.value==="<0.0.0-0",LC=t=>t.value==="",Mh=(t,e)=>{let r=!0;const s=t.slice();let n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},BC=(t,e)=>(ye("comp",t,e),t=jC(t,e),ye("caret",t),t=NC(t,e),ye("tildes",t),t=UC(t,e),ye("xrange",t),t=qC(t,e),ye("stars",t),t),Ie=t=>!t||t.toLowerCase()==="x"||t==="*",NC=(t,e)=>t.trim().split(/\s+/).map(r=>HC(r,e)).join(" "),HC=(t,e)=>{const r=e.loose?$e[Ce.TILDELOOSE]:$e[Ce.TILDE];return t.replace(r,(s,n,i,a,o)=>{ye("tilde",t,s,n,i,a,o);let u;return Ie(n)?u="":Ie(i)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:Ie(a)?u=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:o?(ye("replaceTilde pr",o),u=`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`):u=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,ye("tilde return",u),u})},jC=(t,e)=>t.trim().split(/\s+/).map(r=>MC(r,e)).join(" "),MC=(t,e)=>{ye("caret",t,e);const r=e.loose?$e[Ce.CARETLOOSE]:$e[Ce.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,a,o,u)=>{ye("caret",t,n,i,a,o,u);let l;return Ie(i)?l="":Ie(a)?l=`>=${i}.0.0${s} <${+i+1}.0.0-0`:Ie(o)?i==="0"?l=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`:l=`>=${i}.${a}.0${s} <${+i+1}.0.0-0`:u?(ye("replaceCaret pr",u),i==="0"?a==="0"?l=`>=${i}.${a}.${o}-${u} <${i}.${a}.${+o+1}-0`:l=`>=${i}.${a}.${o}-${u} <${i}.${+a+1}.0-0`:l=`>=${i}.${a}.${o}-${u} <${+i+1}.0.0-0`):(ye("no pr"),i==="0"?a==="0"?l=`>=${i}.${a}.${o}${s} <${i}.${a}.${+o+1}-0`:l=`>=${i}.${a}.${o}${s} <${i}.${+a+1}.0-0`:l=`>=${i}.${a}.${o} <${+i+1}.0.0-0`),ye("caret return",l),l})},UC=(t,e)=>(ye("replaceXRanges",t,e),t.split(/\s+/).map(r=>GC(r,e)).join(" ")),GC=(t,e)=>{t=t.trim();const r=e.loose?$e[Ce.XRANGELOOSE]:$e[Ce.XRANGE];return t.replace(r,(s,n,i,a,o,u)=>{ye("xRange",t,s,n,i,a,o,u);const l=Ie(i),f=l||Ie(a),d=f||Ie(o),c=d;return n==="="&&c&&(n=""),u=e.includePrerelease?"-0":"",l?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&c?(f&&(a=0),o=0,n===">"?(n=">=",f?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):n==="<="&&(n="<",f?i=+i+1:a=+a+1),n==="<"&&(u="-0"),s=`${n+i}.${a}.${o}${u}`):f?s=`>=${i}.0.0${u} <${+i+1}.0.0-0`:d&&(s=`>=${i}.${a}.0${u} <${i}.${+a+1}.0-0`),ye("xRange return",s),s})},qC=(t,e)=>(ye("replaceStars",t,e),t.trim().replace($e[Ce.STAR],"")),zC=(t,e)=>(ye("replaceGTE0",t,e),t.trim().replace($e[e.includePrerelease?Ce.GTE0PRE:Ce.GTE0],"")),VC=t=>(e,r,s,n,i,a,o,u,l,f,d,c,g)=>(Ie(s)?r="":Ie(n)?r=`>=${s}.0.0${t?"-0":""}`:Ie(i)?r=`>=${s}.${n}.0${t?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,Ie(l)?u="":Ie(f)?u=`<${+l+1}.0.0-0`:Ie(d)?u=`<${l}.${+f+1}.0-0`:c?u=`<=${l}.${f}.${d}-${c}`:t?u=`<${l}.${f}.${+d+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),WC=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(ye(t[s].semver),t[s].semver!==Ma.ANY&&t[s].semver.prerelease.length>0){const n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0},Ur=Symbol("SemVer ANY");class nn{static get ANY(){return Ur}constructor(e,r){if(r=XC(r),e instanceof nn){if(e.loose===!!r.loose)return e;e=e.value}Ga("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===Ur?this.value="":this.value=this.operator+this.semver.version,Ga("comp",this)}parse(e){const r=this.options.loose?Uh[Gh.COMPARATORLOOSE]:Uh[Gh.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new qh(s[2],this.options.loose):this.semver=Ur}toString(){return this.value}test(e){if(Ga("Comparator.test",e,this.options.loose),this.semver===Ur||e===Ur)return!0;if(typeof e=="string")try{e=new qh(e,this.options)}catch{return!1}return Ua(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof nn))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new zh(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new zh(this.value,r).test(e.semver);const s=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),i=this.semver.version===e.semver.version,a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),o=Ua(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),u=Ua(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return s||n||i&&a||o||u}}var en=nn;const XC=Ws,{re:Uh,t:Gh}=wt.exports,Ua=Ih,Ga=Vs,qh=ke,zh=Ze,KC=Ze,YC=(t,e,r)=>{try{e=new KC(e,r)}catch{return!1}return e.test(t)};var tn=YC;const QC=Ze,JC=(t,e)=>new QC(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));var ZC=JC;const eS=ke,tS=Ze,rS=(t,e,r)=>{let s=null,n=null,i=null;try{i=new tS(e,r)}catch{return null}return t.forEach(a=>{i.test(a)&&(!s||n.compare(a)===-1)&&(s=a,n=new eS(s,r))}),s};var sS=rS;const nS=ke,iS=Ze,aS=(t,e,r)=>{let s=null,n=null,i=null;try{i=new iS(e,r)}catch{return null}return t.forEach(a=>{i.test(a)&&(!s||n.compare(a)===1)&&(s=a,n=new nS(s,r))}),s};var oS=aS;const qa=ke,uS=Ze,Vh=Ys,lS=(t,e)=>{t=new uS(t,e);let r=new qa("0.0.0");if(t.test(r)||(r=new qa("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){const n=t.set[s];let i=null;n.forEach(a=>{const o=new qa(a.semver.version);switch(a.operator){case">":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!i||Vh(o,i))&&(i=o);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),i&&(!r||Vh(r,i))&&(r=i)}return r&&t.test(r)?r:null};var cS=lS;const hS=Ze,fS=(t,e)=>{try{return new hS(t,e).range||"*"}catch{return null}};var dS=fS;const pS=ke,Wh=en,{ANY:mS}=Wh,gS=Ze,yS=tn,Xh=Ys,Kh=La,DS=Na,vS=Ba,bS=(t,e,r,s)=>{t=new pS(t,s),e=new gS(e,s);let n,i,a,o,u;switch(r){case">":n=Xh,i=DS,a=Kh,o=">",u=">=";break;case"<":n=Kh,i=vS,a=Xh,o="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(yS(t,e,s))return!1;for(let l=0;l<e.set.length;++l){const f=e.set[l];let d=null,c=null;if(f.forEach(g=>{g.semver===mS&&(g=new Wh(">=0.0.0")),d=d||g,c=c||g,n(g.semver,d.semver,s)?d=g:a(g.semver,c.semver,s)&&(c=g)}),d.operator===o||d.operator===u||(!c.operator||c.operator===o)&&i(t,c.semver))return!1;if(c.operator===u&&a(t,c.semver))return!1}return!0};var za=bS;const ES=za,_S=(t,e,r)=>ES(t,e,">",r);var wS=_S;const CS=za,SS=(t,e,r)=>CS(t,e,"<",r);var AS=SS;const Yh=Ze,RS=(t,e,r)=>(t=new Yh(t,r),e=new Yh(e,r),t.intersects(e));var xS=RS;const $S=tn,TS=Qe;var FS=(t,e,r)=>{const s=[];let n=null,i=null;const a=t.sort((f,d)=>TS(f,d,r));for(const f of a)$S(f,e,r)?(i=f,n||(n=f)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);const o=[];for(const[f,d]of s)f===d?o.push(f):!d&&f===a[0]?o.push("*"):d?f===a[0]?o.push(`<=${d}`):o.push(`${f} - ${d}`):o.push(`>=${f}`);const u=o.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e};const Qh=Ze,rn=en,{ANY:Va}=rn,Gr=tn,Wa=Qe,OS=(t,e,r={})=>{if(t===e)return!0;t=new Qh(t,r),e=new Qh(e,r);let s=!1;e:for(const n of t.set){for(const i of e.set){const a=PS(n,i,r);if(s=s||a!==null,a)continue e}if(s)return!1}return!0},PS=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Va){if(e.length===1&&e[0].semver===Va)return!0;r.includePrerelease?t=[new rn(">=0.0.0-0")]:t=[new rn(">=0.0.0")]}if(e.length===1&&e[0].semver===Va){if(r.includePrerelease)return!0;e=[new rn(">=0.0.0")]}const s=new Set;let n,i;for(const g of t)g.operator===">"||g.operator===">="?n=Jh(n,g,r):g.operator==="<"||g.operator==="<="?i=Zh(i,g,r):s.add(g.semver);if(s.size>1)return null;let a;if(n&&i){if(a=Wa(n.semver,i.semver,r),a>0)return null;if(a===0&&(n.operator!==">="||i.operator!=="<="))return null}for(const g of s){if(n&&!Gr(g,String(n),r)||i&&!Gr(g,String(i),r))return null;for(const p of e)if(!Gr(g,String(p),r))return!1;return!0}let o,u,l,f,d=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,c=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;d&&d.prerelease.length===1&&i.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(const g of e){if(f=f||g.operator===">"||g.operator===">=",l=l||g.operator==="<"||g.operator==="<=",n){if(c&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===c.major&&g.semver.minor===c.minor&&g.semver.patch===c.patch&&(c=!1),g.operator===">"||g.operator===">="){if(o=Jh(n,g,r),o===g&&o!==n)return!1}else if(n.operator===">="&&!Gr(n.semver,String(g),r))return!1}if(i){if(d&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===d.major&&g.semver.minor===d.minor&&g.semver.patch===d.patch&&(d=!1),g.operator==="<"||g.operator==="<="){if(u=Zh(i,g,r),u===g&&u!==i)return!1}else if(i.operator==="<="&&!Gr(i.semver,String(g),r))return!1}if(!g.operator&&(i||n)&&a!==0)return!1}return!(n&&l&&!i&&a!==0||i&&f&&!n&&a!==0||c||d)},Jh=(t,e,r)=>{if(!t)return e;const s=Wa(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},Zh=(t,e,r)=>{if(!t)return e;const s=Wa(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};var kS=OS;const Xa=wt.exports;var IS={re:Xa.re,src:Xa.src,tokens:Xa.t,SEMVER_SPEC_VERSION:zs.SEMVER_SPEC_VERSION,SemVer:ke,compareIdentifiers:Pa.compareIdentifiers,rcompareIdentifiers:Pa.rcompareIdentifiers,parse:or,valid:yw,clean:bw,inc:ww,diff:$w,major:Ow,minor:Iw,patch:Nw,prerelease:Mw,compare:Qe,rcompare:qw,compareLoose:Ww,compareBuild:Ia,sort:Qw,rsort:eC,gt:Ys,lt:La,eq:ka,neq:kh,gte:Ba,lte:Na,cmp:Ih,coerce:EC,Comparator:en,Range:Ze,satisfies:tn,toComparators:ZC,maxSatisfying:sS,minSatisfying:oS,minVersion:cS,validRange:dS,outside:za,gtr:wS,ltr:AS,intersects:xS,simplifyRange:FS,subset:kS};const{Agent:LS}=Xr,{Agent:BS}=ln,NS=Yi.exports,HS=xa.exports,jS=Y_,MS=IS,ef={keepAlive:!0,maxSockets:50},US=new LS(ef),GS=new BS(ef);class tf extends Error{constructor(e){super(`Package \`${e}\` could not be found`);this.name="PackageNotFoundError"}}class rf extends Error{constructor(e,r){super(`Version \`${r}\` for package \`${e}\` could not be found`);this.name="VersionNotFoundError"}}const sf=async(t,e)=>{e={version:"latest",...e};const r=t.split("/")[0],s=e.registryUrl||HS(r),n=new URL(encodeURIComponent(t).replace(/^%40/,"@"),s),i=jS(s.toString(),{recursive:!0}),a={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};e.fullMetadata&&delete a.accept,i&&(a.authorization=`${i.type} ${i.token}`);const o={headers:a,agent:{http:US,https:GS}};e.agent&&(o.agent=e.agent);let u;try{u=await NS(n,o).json()}catch(d){throw d.response.statusCode===404?new tf(t):d}if(e.allVersions)return u;let{version:l}=e;const f=new rf(t,l);if(u["dist-tags"][l])u=u.versions[u["dist-tags"][l]];else if(l){if(!u.versions[l]){const d=Object.keys(u.versions);if(l=MS.maxSatisfying(d,l),!l)throw f}if(u=u.versions[l],!u)throw f}return u};Ls.exports=sf,Ls.exports.default=sf,Ls.exports.PackageNotFoundError=tf,Ls.exports.VersionNotFoundError=rf;const qS={environmentVariables:{debug:"DEBUG",partnersApiEnv:"SHOPIFY_PARTNERS_API_ENV",adminApiEnv:"SHOPIFY_ADMIN_API_ENV",storefrontRendererApiEnv:"SHOPIFY_STOREFRONT_RENDERER_API_ENV",identityEnv:"SHOPIFY_IDENTITY_ENV"}};function zS(t){return t?["1","true","TRUE","yes","YES"].includes(t):!1}function VS(t=process.env){return zS(t[qS.environmentVariables.debug])}function WS(){if(process.argv.findIndex(e=>e.includes("init"))===-1){const e=process.argv.findIndex(r=>r.includes("bin/create-app-run.js"))+1;process.argv.splice(e,0,"init")}VS()&&(of.debug=!0),uf(void 0,import.meta.url).then(lf).catch(e=>{const r=cf.handle;return Mm(e).then(r)})}export{WS as default};
|