create-qwik 1.15.0 → 1.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs
CHANGED
|
@@ -1,112 +1,116 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* create-qwik 1.
|
|
3
|
+
* create-qwik 1.16.1
|
|
4
4
|
* Copyright Builder.io, Inc. All Rights Reserved.
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
|
|
7
7
|
*/
|
|
8
|
-
"use strict";var Zo=Object.create;var Jt=Object.defineProperty;var Xo=Object.getOwnPropertyDescriptor;var eu=Object.getOwnPropertyNames;var tu=Object.getPrototypeOf,nu=Object.prototype.hasOwnProperty;var he=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),iu=(n,e)=>{for(var t in e)Jt(n,t,{get:e[t],enumerable:!0})},is=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of eu(e))!nu.call(n,r)&&r!==t&&Jt(n,r,{get:()=>e[r],enumerable:!(i=Xo(e,r))||i.enumerable});return n};var ae=(n,e,t)=>(t=n!=null?Zo(tu(n)):{},is(e||!n||!n.__esModule?Jt(t,"default",{value:n,enumerable:!0}):t,n)),su=n=>is(Jt({},"__esModule",{value:!0}),n);var Vn=he((Fc,ss)=>{"use strict";var qn="\x1B",X=`${qn}[`,ru="\x07",Un={to(n,e){return e?`${X}${e+1};${n+1}H`:`${X}${n+1}G`},move(n,e){let t="";return n<0?t+=`${X}${-n}D`:n>0&&(t+=`${X}${n}C`),e<0?t+=`${X}${-e}A`:e>0&&(t+=`${X}${e}B`),t},up:(n=1)=>`${X}${n}A`,down:(n=1)=>`${X}${n}B`,forward:(n=1)=>`${X}${n}C`,backward:(n=1)=>`${X}${n}D`,nextLine:(n=1)=>`${X}E`.repeat(n),prevLine:(n=1)=>`${X}F`.repeat(n),left:`${X}G`,hide:`${X}?25l`,show:`${X}?25h`,save:`${qn}7`,restore:`${qn}8`},ou={up:(n=1)=>`${X}S`.repeat(n),down:(n=1)=>`${X}T`.repeat(n)},uu={screen:`${X}2J`,up:(n=1)=>`${X}1J`.repeat(n),down:(n=1)=>`${X}J`.repeat(n),line:`${X}2K`,lineEnd:`${X}K`,lineStart:`${X}1K`,lines(n){let e="";for(let t=0;t<n;t++)e+=this.line+(t<n-1?Un.up():"");return n&&(e+=Un.left),e}};ss.exports={cursor:Un,scroll:ou,erase:uu,beep:ru}});var Gn=he((bc,Hn)=>{var Qt=process||{},rs=Qt.argv||[],Kt=Qt.env||{},au=!(Kt.NO_COLOR||rs.includes("--no-color"))&&(!!Kt.FORCE_COLOR||rs.includes("--color")||Qt.platform==="win32"||(Qt.stdout||{}).isTTY&&Kt.TERM!=="dumb"||!!Kt.CI),cu=(n,e,t=n)=>i=>{let r=""+i,o=r.indexOf(e,n.length);return~o?n+lu(r,e,t,o)+e:n+r+e},lu=(n,e,t,i)=>{let r="",o=0;do r+=n.substring(o,i)+t,o=i+e.length,i=n.indexOf(e,o);while(~i);return r+n.substring(o)},os=(n=au)=>{let e=n?cu:()=>String;return{isColorSupported:n,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Hn.exports=os();Hn.exports.createColors=os});var Rs=he((Xc,Ws)=>{"use strict";Ws.exports=function(){if(process.env.npm_config_user_agent)return Uu(process.env.npm_config_user_agent)};function Uu(n){let e=n.split(" ")[0],t=e.lastIndexOf("/"),i=e.substring(0,t);return{name:i==="npminstall"?"cnpm":i,version:e.substring(t+1)}}});var Us=he((el,qs)=>{qs.exports=zs;zs.sync=Hu;var Ls=require("fs");function Vu(n,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i<t.length;i++){var r=t[i].toLowerCase();if(r&&n.substr(-r.length).toLowerCase()===r)return!0}return!1}function ks(n,e,t){return!n.isSymbolicLink()&&!n.isFile()?!1:Vu(e,t)}function zs(n,e,t){Ls.stat(n,function(i,r){t(i,i?!1:ks(r,n,e))})}function Hu(n,e){return ks(Ls.statSync(n),n,e)}});var Js=he((tl,Ys)=>{Ys.exports=Hs;Hs.sync=Gu;var Vs=require("fs");function Hs(n,e,t){Vs.stat(n,function(i,r){t(i,i?!1:Gs(r,e))})}function Gu(n,e){return Gs(Vs.statSync(n),e)}function Gs(n,e){return n.isFile()&&Yu(n,e)}function Yu(n,e){var t=n.mode,i=n.uid,r=n.gid,o=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),s=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),f=parseInt("010",8),D=parseInt("001",8),h=a|f,c=t&D||t&f&&r===s||t&a&&i===o||t&h&&o===0;return c}});var Qs=he((il,Ks)=>{var nl=require("fs"),an;process.platform==="win32"||global.TESTING_WINDOWS?an=Us():an=Js();Ks.exports=ci;ci.sync=Ju;function ci(n,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,r){ci(n,e||{},function(o,s){o?r(o):i(s)})})}an(n,e||{},function(i,r){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,r=!1),t(i,r)})}function Ju(n,e){try{return an.sync(n,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var sr=he((sl,ir)=>{var xt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Zs=require("path"),Ku=xt?";":":",Xs=Qs(),er=n=>Object.assign(new Error(`not found: ${n}`),{code:"ENOENT"}),tr=(n,e)=>{let t=e.colon||Ku,i=n.match(/\//)||xt&&n.match(/\\/)?[""]:[...xt?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],r=xt?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=xt?r.split(t):[""];return xt&&n.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:r}},nr=(n,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:r,pathExtExe:o}=tr(n,e),s=[],a=D=>new Promise((h,c)=>{if(D===i.length)return e.all&&s.length?h(s):c(er(n));let p=i[D],C=/^".*"$/.test(p)?p.slice(1,-1):p,E=Zs.join(C,n),b=!C&&/^\.[\\\/]/.test(n)?n.slice(0,2)+E:E;h(f(b,D,0))}),f=(D,h,c)=>new Promise((p,C)=>{if(c===r.length)return p(a(h+1));let E=r[c];Xs(D+E,{pathExt:o},(b,g)=>{if(!b&&g)if(e.all)s.push(D+E);else return p(D+E);return p(f(D,h,c+1))})});return t?a(0).then(D=>t(null,D),t):a(0)},Qu=(n,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:r}=tr(n,e),o=[];for(let s=0;s<t.length;s++){let a=t[s],f=/^".*"$/.test(a)?a.slice(1,-1):a,D=Zs.join(f,n),h=!f&&/^\.[\\\/]/.test(n)?n.slice(0,2)+D:D;for(let c=0;c<i.length;c++){let p=h+i[c];try{if(Xs.sync(p,{pathExt:r}))if(e.all)o.push(p);else return p}catch{}}}if(e.all&&o.length)return o;if(e.nothrow)return null;throw er(n)};ir.exports=nr;nr.sync=Qu});var or=he((rl,li)=>{"use strict";var rr=(n={})=>{let e=n.env||process.env;return(n.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};li.exports=rr;li.exports.default=rr});var lr=he((ol,cr)=>{"use strict";var ur=require("path"),Zu=sr(),Xu=or();function ar(n,e){let t=n.options.env||process.env,i=process.cwd(),r=n.options.cwd!=null,o=r&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(n.options.cwd)}catch{}let s;try{s=Zu.sync(n.command,{path:t[Xu({env:t})],pathExt:e?ur.delimiter:void 0})}catch{}finally{o&&process.chdir(i)}return s&&(s=ur.resolve(r?n.options.cwd:"",s)),s}function ea(n){return ar(n)||ar(n,!0)}cr.exports=ea});var fr=he((ul,Di)=>{"use strict";var fi=/([()\][%!^"`<>&|;, *?])/g;function ta(n){return n=n.replace(fi,"^$1"),n}function na(n,e){return n=`${n}`,n=n.replace(/(\\*)"/g,'$1$1\\"'),n=n.replace(/(\\*)$/,"$1$1"),n=`"${n}"`,n=n.replace(fi,"^$1"),e&&(n=n.replace(fi,"^$1")),n}Di.exports.command=ta;Di.exports.argument=na});var hr=he((al,Dr)=>{"use strict";Dr.exports=/^#!(.*)/});var dr=he((cl,pr)=>{"use strict";var ia=hr();pr.exports=(n="")=>{let e=n.match(ia);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),r=t.split("/").pop();return r==="env"?i:i?`${r} ${i}`:r}});var gr=he((ll,mr)=>{"use strict";var hi=require("fs"),sa=dr();function ra(n){let t=Buffer.alloc(150),i;try{i=hi.openSync(n,"r"),hi.readSync(i,t,0,150,0),hi.closeSync(i)}catch{}return sa(t.toString())}mr.exports=ra});var Er=he((fl,br)=>{"use strict";var oa=require("path"),Cr=lr(),Fr=fr(),ua=gr(),aa=process.platform==="win32",ca=/\.(?:com|exe)$/i,la=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function fa(n){n.file=Cr(n);let e=n.file&&ua(n.file);return e?(n.args.unshift(n.file),n.command=e,Cr(n)):n.file}function Da(n){if(!aa)return n;let e=fa(n),t=!ca.test(e);if(n.options.forceShell||t){let i=la.test(e);n.command=oa.normalize(n.command),n.command=Fr.command(n.command),n.args=n.args.map(o=>Fr.argument(o,i));let r=[n.command].concat(n.args).join(" ");n.args=["/d","/s","/c",`"${r}"`],n.command=process.env.comspec||"cmd.exe",n.options.windowsVerbatimArguments=!0}return n}function ha(n,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:n,args:e,options:t,file:void 0,original:{command:n,args:e}};return t.shell?i:Da(i)}br.exports=ha});var xr=he((Dl,wr)=>{"use strict";var pi=process.platform==="win32";function di(n,e){return Object.assign(new Error(`${e} ${n.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${n.command}`,path:n.command,spawnargs:n.args})}function pa(n,e){if(!pi)return;let t=n.emit;n.emit=function(i,r){if(i==="exit"){let o=yr(r,e,"spawn");if(o)return t.call(n,"error",o)}return t.apply(n,arguments)}}function yr(n,e){return pi&&n===1&&!e.file?di(e.original,"spawn"):null}function da(n,e){return pi&&n===1&&!e.file?di(e.original,"spawnSync"):null}wr.exports={hookChildProcess:pa,verifyENOENT:yr,verifyENOENTSync:da,notFoundError:di}});var vr=he((hl,At)=>{"use strict";var Ar=require("child_process"),mi=Er(),gi=xr();function $r(n,e,t){let i=mi(n,e,t),r=Ar.spawn(i.command,i.args,i.options);return gi.hookChildProcess(r,i),r}function ma(n,e,t){let i=mi(n,e,t),r=Ar.spawnSync(i.command,i.args,i.options);return r.error=r.error||gi.verifyENOENTSync(r.status,i),r}At.exports=$r;At.exports.spawn=$r;At.exports.sync=ma;At.exports._parse=mi;At.exports._enoent=gi});var gc={};iu(gc,{createApp:()=>Qo,runCli:()=>dc,runCreateCli:()=>es,runCreateInteractiveCli:()=>ns});module.exports=su(gc);var pe=ae(Vn(),1),bt=require("node:process"),Ve=ae(require("node:readline"),1),Kn=ae(require("node:readline"),1),ds=require("node:tty"),Xt=ae(Gn(),1);function fu({onlyFirst:n=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,n?void 0:"g")}var Du=fu();function ms(n){if(typeof n!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof n}\``);return n.replace(Du,"")}function gs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Cs={exports:{}};(function(n){var e={};n.exports=e,e.eastAsianWidth=function(i){var r=i.charCodeAt(0),o=i.length==2?i.charCodeAt(1):0,s=r;return 55296<=r&&r<=56319&&56320<=o&&o<=57343&&(r&=1023,o&=1023,s=r<<10|o,s+=65536),s==12288||65281<=s&&s<=65376||65504<=s&&s<=65510?"F":s==8361||65377<=s&&s<=65470||65474<=s&&s<=65479||65482<=s&&s<=65487||65490<=s&&s<=65495||65498<=s&&s<=65500||65512<=s&&s<=65518?"H":4352<=s&&s<=4447||4515<=s&&s<=4519||4602<=s&&s<=4607||9001<=s&&s<=9002||11904<=s&&s<=11929||11931<=s&&s<=12019||12032<=s&&s<=12245||12272<=s&&s<=12283||12289<=s&&s<=12350||12353<=s&&s<=12438||12441<=s&&s<=12543||12549<=s&&s<=12589||12593<=s&&s<=12686||12688<=s&&s<=12730||12736<=s&&s<=12771||12784<=s&&s<=12830||12832<=s&&s<=12871||12880<=s&&s<=13054||13056<=s&&s<=19903||19968<=s&&s<=42124||42128<=s&&s<=42182||43360<=s&&s<=43388||44032<=s&&s<=55203||55216<=s&&s<=55238||55243<=s&&s<=55291||63744<=s&&s<=64255||65040<=s&&s<=65049||65072<=s&&s<=65106||65108<=s&&s<=65126||65128<=s&&s<=65131||110592<=s&&s<=110593||127488<=s&&s<=127490||127504<=s&&s<=127546||127552<=s&&s<=127560||127568<=s&&s<=127569||131072<=s&&s<=194367||177984<=s&&s<=196605||196608<=s&&s<=262141?"W":32<=s&&s<=126||162<=s&&s<=163||165<=s&&s<=166||s==172||s==175||10214<=s&&s<=10221||10629<=s&&s<=10630?"Na":s==161||s==164||167<=s&&s<=168||s==170||173<=s&&s<=174||176<=s&&s<=180||182<=s&&s<=186||188<=s&&s<=191||s==198||s==208||215<=s&&s<=216||222<=s&&s<=225||s==230||232<=s&&s<=234||236<=s&&s<=237||s==240||242<=s&&s<=243||247<=s&&s<=250||s==252||s==254||s==257||s==273||s==275||s==283||294<=s&&s<=295||s==299||305<=s&&s<=307||s==312||319<=s&&s<=322||s==324||328<=s&&s<=331||s==333||338<=s&&s<=339||358<=s&&s<=359||s==363||s==462||s==464||s==466||s==468||s==470||s==472||s==474||s==476||s==593||s==609||s==708||s==711||713<=s&&s<=715||s==717||s==720||728<=s&&s<=731||s==733||s==735||768<=s&&s<=879||913<=s&&s<=929||931<=s&&s<=937||945<=s&&s<=961||963<=s&&s<=969||s==1025||1040<=s&&s<=1103||s==1105||s==8208||8211<=s&&s<=8214||8216<=s&&s<=8217||8220<=s&&s<=8221||8224<=s&&s<=8226||8228<=s&&s<=8231||s==8240||8242<=s&&s<=8243||s==8245||s==8251||s==8254||s==8308||s==8319||8321<=s&&s<=8324||s==8364||s==8451||s==8453||s==8457||s==8467||s==8470||8481<=s&&s<=8482||s==8486||s==8491||8531<=s&&s<=8532||8539<=s&&s<=8542||8544<=s&&s<=8555||8560<=s&&s<=8569||s==8585||8592<=s&&s<=8601||8632<=s&&s<=8633||s==8658||s==8660||s==8679||s==8704||8706<=s&&s<=8707||8711<=s&&s<=8712||s==8715||s==8719||s==8721||s==8725||s==8730||8733<=s&&s<=8736||s==8739||s==8741||8743<=s&&s<=8748||s==8750||8756<=s&&s<=8759||8764<=s&&s<=8765||s==8776||s==8780||s==8786||8800<=s&&s<=8801||8804<=s&&s<=8807||8810<=s&&s<=8811||8814<=s&&s<=8815||8834<=s&&s<=8835||8838<=s&&s<=8839||s==8853||s==8857||s==8869||s==8895||s==8978||9312<=s&&s<=9449||9451<=s&&s<=9547||9552<=s&&s<=9587||9600<=s&&s<=9615||9618<=s&&s<=9621||9632<=s&&s<=9633||9635<=s&&s<=9641||9650<=s&&s<=9651||9654<=s&&s<=9655||9660<=s&&s<=9661||9664<=s&&s<=9665||9670<=s&&s<=9672||s==9675||9678<=s&&s<=9681||9698<=s&&s<=9701||s==9711||9733<=s&&s<=9734||s==9737||9742<=s&&s<=9743||9748<=s&&s<=9749||s==9756||s==9758||s==9792||s==9794||9824<=s&&s<=9825||9827<=s&&s<=9829||9831<=s&&s<=9834||9836<=s&&s<=9837||s==9839||9886<=s&&s<=9887||9918<=s&&s<=9919||9924<=s&&s<=9933||9935<=s&&s<=9953||s==9955||9960<=s&&s<=9983||s==10045||s==10071||10102<=s&&s<=10111||11093<=s&&s<=11097||12872<=s&&s<=12879||57344<=s&&s<=63743||65024<=s&&s<=65039||s==65533||127232<=s&&s<=127242||127248<=s&&s<=127277||127280<=s&&s<=127337||127344<=s&&s<=127386||917760<=s&&s<=917999||983040<=s&&s<=1048573||1048576<=s&&s<=1114109?"A":"N"},e.characterLength=function(i){var r=this.eastAsianWidth(i);return r=="F"||r=="W"||r=="A"?2:1};function t(i){return i.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(i){for(var r=t(i),o=0,s=0;s<r.length;s++)o=o+this.characterLength(r[s]);return o},e.slice=function(i,r,o){textLen=e.length(i),r=r||0,o=o||1,r<0&&(r=textLen+r),o<0&&(o=textLen+o);for(var s="",a=0,f=t(i),D=0;D<f.length;D++){var h=f[D],c=e.length(h);if(a>=r-(c==2?1:0))if(a+c<=o)s+=h;else break;a+=c}return s}})(Cs);var hu=Cs.exports,pu=gs(hu),du=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},mu=gs(du);function Wt(n,e={}){if(typeof n!="string"||n.length===0||(e={ambiguousIsNarrow:!0,...e},n=ms(n),n.length===0))return 0;n=n.replace(mu()," ");let t=e.ambiguousIsNarrow?1:2,i=0;for(let r of n){let o=r.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(pu.eastAsianWidth(r)){case"F":case"W":i+=2;break;case"A":i+=t;break;default:i+=1}}return i}var Yn=10,us=(n=0)=>e=>`\x1B[${e+n}m`,as=(n=0)=>e=>`\x1B[${38+n};5;${e}m`,cs=(n=0)=>(e,t,i)=>`\x1B[${38+n};2;${e};${t};${i}m`,Q={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(Q.modifier);var gu=Object.keys(Q.color),Cu=Object.keys(Q.bgColor);[...gu,...Cu];function Fu(){let n=new Map;for(let[e,t]of Object.entries(Q)){for(let[i,r]of Object.entries(t))Q[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},t[i]=Q[i],n.set(r[0],r[1]);Object.defineProperty(Q,e,{value:t,enumerable:!1})}return Object.defineProperty(Q,"codes",{value:n,enumerable:!1}),Q.color.close="\x1B[39m",Q.bgColor.close="\x1B[49m",Q.color.ansi=us(),Q.color.ansi256=as(),Q.color.ansi16m=cs(),Q.bgColor.ansi=us(Yn),Q.bgColor.ansi256=as(Yn),Q.bgColor.ansi16m=cs(Yn),Object.defineProperties(Q,{rgbToAnsi256:{value:(e,t,i)=>e===t&&t===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value:e=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[i]=t;i.length===3&&(i=[...i].map(o=>o+o).join(""));let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>Q.rgbToAnsi256(...Q.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,i,r;if(e>=232)t=((e-232)*10+8)/255,i=t,r=t;else{e-=16;let a=e%36;t=Math.floor(e/36)/5,i=Math.floor(a/6)/5,r=a%6/5}let o=Math.max(t,i,r)*2;if(o===0)return 30;let s=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(t));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,t,i)=>Q.ansi256ToAnsi(Q.rgbToAnsi256(e,t,i)),enumerable:!1},hexToAnsi:{value:e=>Q.ansi256ToAnsi(Q.hexToAnsi256(e)),enumerable:!1}}),Q}var bu=Fu(),nn=new Set(["\x1B","\x9B"]),Eu=39,Qn="\x07",Fs="[",yu="]",bs="m",Zn=`${yu}8;;`,ls=n=>`${nn.values().next().value}${Fs}${n}${bs}`,fs=n=>`${nn.values().next().value}${Zn}${n}${Qn}`,wu=n=>n.split(" ").map(e=>Wt(e)),Jn=(n,e,t)=>{let i=[...e],r=!1,o=!1,s=Wt(ms(n[n.length-1]));for(let[a,f]of i.entries()){let D=Wt(f);if(s+D<=t?n[n.length-1]+=f:(n.push(f),s=0),nn.has(f)&&(r=!0,o=i.slice(a+1).join("").startsWith(Zn)),r){o?f===Qn&&(r=!1,o=!1):f===bs&&(r=!1);continue}s+=D,s===t&&a<i.length-1&&(n.push(""),s=0)}!s&&n[n.length-1].length>0&&n.length>1&&(n[n.length-2]+=n.pop())},xu=n=>{let e=n.split(" "),t=e.length;for(;t>0&&!(Wt(e[t-1])>0);)t--;return t===e.length?n:e.slice(0,t).join(" ")+e.slice(t).join("")},Au=(n,e,t={})=>{if(t.trim!==!1&&n.trim()==="")return"";let i="",r,o,s=wu(n),a=[""];for(let[D,h]of n.split(" ").entries()){t.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let c=Wt(a[a.length-1]);if(D!==0&&(c>=e&&(t.wordWrap===!1||t.trim===!1)&&(a.push(""),c=0),(c>0||t.trim===!1)&&(a[a.length-1]+=" ",c++)),t.hard&&s[D]>e){let p=e-c,C=1+Math.floor((s[D]-p-1)/e);Math.floor((s[D]-1)/e)<C&&a.push(""),Jn(a,h,e);continue}if(c+s[D]>e&&c>0&&s[D]>0){if(t.wordWrap===!1&&c<e){Jn(a,h,e);continue}a.push("")}if(c+s[D]>e&&t.wordWrap===!1){Jn(a,h,e);continue}a[a.length-1]+=h}t.trim!==!1&&(a=a.map(D=>xu(D)));let f=[...a.join(`
|
|
9
|
-
`)];for(let[D,h]of f.entries()){if(i+=h,nn.has(h)){let{groups:p}=new RegExp(`(?:\\${Fs}(?<code>\\d+)m|\\${Zn}(?<uri>.*)${Qn})`).exec(f.slice(D).join(""))||{groups:{}};if(p.code!==void 0){let C=Number.parseFloat(p.code);r=C===Eu?void 0:C}else p.uri!==void 0&&(o=p.uri.length===0?void 0:p.uri)}let c=bu.codes.get(Number(r));f[D+1]===`
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
"use strict";var Ra=Object.create;var _n=Object.defineProperty;var La=Object.getOwnPropertyDescriptor;var Wa=Object.getOwnPropertyNames;var qa=Object.getPrototypeOf,Ga=Object.prototype.hasOwnProperty;var W=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),Ha=(s,e)=>{for(var t in e)_n(s,t,{get:e[t],enumerable:!0})},Or=(s,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Wa(e))!Ga.call(s,r)&&r!==t&&_n(s,r,{get:()=>e[r],enumerable:!(n=La(e,r))||n.enumerable});return s};var le=(s,e,t)=>(t=s!=null?Ra(qa(s)):{},Or(e||!s||!s.__esModule?_n(t,"default",{value:s,enumerable:!0}):t,s)),Ua=s=>Or(_n({},"__esModule",{value:!0}),s);var Qs=W((Hh,Tr)=>{"use strict";var Ks={to(s,e){return e?`\x1B[${e+1};${s+1}H`:`\x1B[${s+1}G`},move(s,e){let t="";return s<0?t+=`\x1B[${-s}D`:s>0&&(t+=`\x1B[${s}C`),e<0?t+=`\x1B[${-e}A`:e>0&&(t+=`\x1B[${e}B`),t},up:(s=1)=>`\x1B[${s}A`,down:(s=1)=>`\x1B[${s}B`,forward:(s=1)=>`\x1B[${s}C`,backward:(s=1)=>`\x1B[${s}D`,nextLine:(s=1)=>"\x1B[E".repeat(s),prevLine:(s=1)=>"\x1B[F".repeat(s),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},Va={up:(s=1)=>"\x1B[S".repeat(s),down:(s=1)=>"\x1B[T".repeat(s)},za={screen:"\x1B[2J",up:(s=1)=>"\x1B[1J".repeat(s),down:(s=1)=>"\x1B[J".repeat(s),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(s){let e="";for(let t=0;t<s;t++)e+=this.line+(t<s-1?Ks.up():"");return s&&(e+=Ks.left),e}};Tr.exports={cursor:Ks,scroll:Va,erase:za,beep:"\x07"}});var Xs=W((Uh,Zs)=>{var Nn=process||{},$r=Nn.argv||[],Bn=Nn.env||{},Ya=!(Bn.NO_COLOR||$r.includes("--no-color"))&&(!!Bn.FORCE_COLOR||$r.includes("--color")||Nn.platform==="win32"||(Nn.stdout||{}).isTTY&&Bn.TERM!=="dumb"||!!Bn.CI),Ka=(s,e,t=s)=>n=>{let r=""+n,o=r.indexOf(e,s.length);return~o?s+Qa(r,e,t,o)+e:s+r+e},Qa=(s,e,t,n)=>{let r="",o=0;do r+=s.substring(o,n)+t,o=n+e.length,n=s.indexOf(e,o);while(~n);return r+s.substring(o)},_r=(s=Ya)=>{let e=s?Ka:()=>String;return{isColorSupported:s,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Zs.exports=_r();Zs.exports.createColors=_r});var co=W((Af,ao)=>{"use strict";ao.exports=function(){if(process.env.npm_config_user_agent)return Bc(process.env.npm_config_user_agent)};function Bc(s){let e=s.split(" ")[0],t=e.lastIndexOf("/"),n=e.substring(0,t);return{name:n==="npminstall"?"cnpm":n,version:e.substring(t+1)}}});var po=W((Of,Do)=>{Do.exports=fo;fo.sync=Ic;var lo=require("fs");function Nc(s,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var n=0;n<t.length;n++){var r=t[n].toLowerCase();if(r&&s.substr(-r.length).toLowerCase()===r)return!0}return!1}function ho(s,e,t){return!s.isSymbolicLink()&&!s.isFile()?!1:Nc(e,t)}function fo(s,e,t){lo.stat(s,function(n,r){t(n,n?!1:ho(r,s,e))})}function Ic(s,e){return ho(lo.statSync(s),s,e)}});var yo=W((Tf,Eo)=>{Eo.exports=go;go.sync=Sc;var mo=require("fs");function go(s,e,t){mo.stat(s,function(n,r){t(n,n?!1:Co(r,e))})}function Sc(s,e){return Co(mo.statSync(s),e)}function Co(s,e){return s.isFile()&&kc(s,e)}function kc(s,e){var t=s.mode,n=s.uid,r=s.gid,o=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),i=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),h=parseInt("001",8),D=u|c,l=t&h||t&c&&r===i||t&u&&n===o||t&D&&o===0;return l}});var bo=W((_f,Fo)=>{var $f=require("fs"),Wn;process.platform==="win32"||global.TESTING_WINDOWS?Wn=po():Wn=yo();Fo.exports=di;di.sync=jc;function di(s,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,r){di(s,e||{},function(o,i){o?r(o):n(i)})})}Wn(s,e||{},function(n,r){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,r=!1),t(n,r)})}function jc(s,e){try{return Wn.sync(s,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var $o=W((Bf,To)=>{var Ut=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",wo=require("path"),Mc=Ut?";":":",xo=bo(),vo=s=>Object.assign(new Error(`not found: ${s}`),{code:"ENOENT"}),Ao=(s,e)=>{let t=e.colon||Mc,n=s.match(/\//)||Ut&&s.match(/\\/)?[""]:[...Ut?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],r=Ut?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Ut?r.split(t):[""];return Ut&&s.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:r}},Oo=(s,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:n,pathExt:r,pathExtExe:o}=Ao(s,e),i=[],u=h=>new Promise((D,l)=>{if(h===n.length)return e.all&&i.length?D(i):l(vo(s));let d=n[h],C=/^".*"$/.test(d)?d.slice(1,-1):d,F=wo.join(C,s),y=!C&&/^\.[\\\/]/.test(s)?s.slice(0,2)+F:F;D(c(y,h,0))}),c=(h,D,l)=>new Promise((d,C)=>{if(l===r.length)return d(u(D+1));let F=r[l];xo(h+F,{pathExt:o},(y,p)=>{if(!y&&p)if(e.all)i.push(h+F);else return d(h+F);return d(c(h,D,l+1))})});return t?u(0).then(h=>t(null,h),t):u(0)},Pc=(s,e)=>{e=e||{};let{pathEnv:t,pathExt:n,pathExtExe:r}=Ao(s,e),o=[];for(let i=0;i<t.length;i++){let u=t[i],c=/^".*"$/.test(u)?u.slice(1,-1):u,h=wo.join(c,s),D=!c&&/^\.[\\\/]/.test(s)?s.slice(0,2)+h:h;for(let l=0;l<n.length;l++){let d=D+n[l];try{if(xo.sync(d,{pathExt:r}))if(e.all)o.push(d);else return d}catch{}}}if(e.all&&o.length)return o;if(e.nothrow)return null;throw vo(s)};To.exports=Oo;Oo.sync=Pc});var Bo=W((Nf,mi)=>{"use strict";var _o=(s={})=>{let e=s.env||process.env;return(s.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};mi.exports=_o;mi.exports.default=_o});var ko=W((If,So)=>{"use strict";var No=require("path"),Jc=$o(),Rc=Bo();function Io(s,e){let t=s.options.env||process.env,n=process.cwd(),r=s.options.cwd!=null,o=r&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(s.options.cwd)}catch{}let i;try{i=Jc.sync(s.command,{path:t[Rc({env:t})],pathExt:e?No.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return i&&(i=No.resolve(r?s.options.cwd:"",i)),i}function Lc(s){return Io(s)||Io(s,!0)}So.exports=Lc});var jo=W((Sf,Ci)=>{"use strict";var gi=/([()\][%!^"`<>&|;, *?])/g;function Wc(s){return s=s.replace(gi,"^$1"),s}function qc(s,e){return s=`${s}`,s=s.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),s=s.replace(/(?=(\\+?)?)\1$/,"$1$1"),s=`"${s}"`,s=s.replace(gi,"^$1"),e&&(s=s.replace(gi,"^$1")),s}Ci.exports.command=Wc;Ci.exports.argument=qc});var Po=W((kf,Mo)=>{"use strict";Mo.exports=/^#!(.*)/});var Ro=W((jf,Jo)=>{"use strict";var Gc=Po();Jo.exports=(s="")=>{let e=s.match(Gc);if(!e)return null;let[t,n]=e[0].replace(/#! ?/,"").split(" "),r=t.split("/").pop();return r==="env"?n:n?`${r} ${n}`:r}});var Wo=W((Mf,Lo)=>{"use strict";var Ei=require("fs"),Hc=Ro();function Uc(s){let t=Buffer.alloc(150),n;try{n=Ei.openSync(s,"r"),Ei.readSync(n,t,0,150,0),Ei.closeSync(n)}catch{}return Hc(t.toString())}Lo.exports=Uc});var Uo=W((Pf,Ho)=>{"use strict";var Vc=require("path"),qo=ko(),Go=jo(),zc=Wo(),Yc=process.platform==="win32",Kc=/\.(?:com|exe)$/i,Qc=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Zc(s){s.file=qo(s);let e=s.file&&zc(s.file);return e?(s.args.unshift(s.file),s.command=e,qo(s)):s.file}function Xc(s){if(!Yc)return s;let e=Zc(s),t=!Kc.test(e);if(s.options.forceShell||t){let n=Qc.test(e);s.command=Vc.normalize(s.command),s.command=Go.command(s.command),s.args=s.args.map(o=>Go.argument(o,n));let r=[s.command].concat(s.args).join(" ");s.args=["/d","/s","/c",`"${r}"`],s.command=process.env.comspec||"cmd.exe",s.options.windowsVerbatimArguments=!0}return s}function el(s,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let n={command:s,args:e,options:t,file:void 0,original:{command:s,args:e}};return t.shell?n:Xc(n)}Ho.exports=el});var Yo=W((Jf,zo)=>{"use strict";var yi=process.platform==="win32";function Fi(s,e){return Object.assign(new Error(`${e} ${s.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${s.command}`,path:s.command,spawnargs:s.args})}function tl(s,e){if(!yi)return;let t=s.emit;s.emit=function(n,r){if(n==="exit"){let o=Vo(r,e);if(o)return t.call(s,"error",o)}return t.apply(s,arguments)}}function Vo(s,e){return yi&&s===1&&!e.file?Fi(e.original,"spawn"):null}function nl(s,e){return yi&&s===1&&!e.file?Fi(e.original,"spawnSync"):null}zo.exports={hookChildProcess:tl,verifyENOENT:Vo,verifyENOENTSync:nl,notFoundError:Fi}});var Zo=W((Rf,Vt)=>{"use strict";var Ko=require("child_process"),bi=Uo(),wi=Yo();function Qo(s,e,t){let n=bi(s,e,t),r=Ko.spawn(n.command,n.args,n.options);return wi.hookChildProcess(r,n),r}function sl(s,e,t){let n=bi(s,e,t),r=Ko.spawnSync(n.command,n.args,n.options);return r.error=r.error||wi.verifyENOENTSync(r.status,n),r}Vt.exports=Qo;Vt.exports.spawn=Qo;Vt.exports.sync=sl;Vt.exports._parse=bi;Vt.exports._enoent=wi});var Kt=W(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.identifierRegex=Ve.reservedIdentifiers=void 0;Ve.isReserved=lu;Ve.isIdentifier=fl;Ve.reservedIdentifiers=["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield","implements","interface","package","private","protected","public"];Ve.identifierRegex=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}]*/u;var hl=new RegExp(`^${Ve.identifierRegex.source}$`,Ve.identifierRegex.flags);function lu(s){return Ve.reservedIdentifiers.includes(s)}function fl(s){return hl.test(s)&&!lu(s)}});var ze=W(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.JsonToken=Qt.JsonTokenType=void 0;var hu;(function(s){s.IDENTIFIER="IDENTIFIER",s.STRING="STRING",s.NUMBER="NUMBER",s.BOOLEAN="BOOLEAN",s.NULL="NULL",s.COLON="COLON",s.COMMA="COMMA",s.LINE_COMMENT="LINE_COMMENT",s.BLOCK_COMMENT="BLOCK_COMMENT",s.BRACE_LEFT="BRACE_LEFT",s.BRACE_RIGHT="BRACE_RIGHT",s.BRACKET_LEFT="BRACKET_LEFT",s.BRACKET_RIGHT="BRACKET_RIGHT",s.WHITESPACE="WHITESPACE",s.NEWLINE="NEWLINE",s.EOF="EOF"})(hu||(Qt.JsonTokenType=hu={}));var fu;(function(s){function e(t,n){return t.type===n}s.isType=e})(fu||(Qt.JsonToken=fu={}))});var lt=W(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.JsonParseError=Zt.JsonError=void 0;var zn=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}};Zt.JsonError=zn;var $i=class extends zn{constructor(e,t){super(e),this.location=t,Object.setPrototypeOf(this,new.target.prototype)}};Zt.JsonParseError=$i});var _i=W(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.JsonLexer=void 0;var re=ze(),Du=Kt(),pu=lt(),Yn=class s{constructor(e){this.current=null,this.remaining=e}static tokenize(e){return[...new s(e)]}isEof(){var e;return((e=this.current)==null?void 0:e.type)===re.JsonTokenType.EOF}[Symbol.iterator](){return{next:()=>this.isEof()?{done:!0,value:void 0}:{done:!1,value:this.next()}}}skipInsignificant(){return this.skip(re.JsonTokenType.WHITESPACE,re.JsonTokenType.NEWLINE,re.JsonTokenType.LINE_COMMENT,re.JsonTokenType.BLOCK_COMMENT)}skip(...e){let t=[];for(;!this.isEof()&&this.matches(...e);)t.push(this.peek()),this.next();return t}expect(e,...t){let n=this.peek(),r=[e,...t];if(!s.isTokenType(n,r)){let{line:o,column:i}=n.location.start,u=r.length===1?r[0]:`either ${r.slice(0,-1).join(", ")} or ${r[r.length-1]}`;throw new pu.JsonParseError(`Expected ${u}, but got ${n.type} at ${o}:${i}.`,n.location)}return n}consume(e,...t){let n=this.expect(e,...t);return this.isEof()||this.next(),n}matches(...e){return s.isTokenType(this.peek(),e)}peek(){if(this.current===null)throw new Error("No token has been consumed yet.");return this.current}next(){if(this.isEof())throw new Error("The end of the input has been reached.");return this.remaining===""?this.current=this.createToken(re.JsonTokenType.EOF,""):(this.current=this.match(),this.remaining=this.remaining.slice(this.current.value.length)),this.current}match(){var r,o,i;for(let{type:u,pattern:c}of s.PATTERNS){if(typeof c=="string"){if(this.remaining.startsWith(c))return this.createToken(u,c);continue}let h=this.remaining.match(c);if(h!==null)return this.createToken(u,h[0])}let e={index:((r=this.current)==null?void 0:r.location.end.index)??0,line:((o=this.current)==null?void 0:o.location.end.line)??1,column:((i=this.current)==null?void 0:i.location.end.column)??1},t={index:e.index+1,line:e.line,column:e.column+1},n=this.remaining[0];throw new pu.JsonParseError(`Unexpected token '${n}' at ${e.line}:${e.column}.`,{start:e,end:t})}createToken(e,t){var o,i,u;let n={index:((o=this.current)==null?void 0:o.location.end.index)??0,line:((i=this.current)==null?void 0:i.location.end.line)??1,column:((u=this.current)==null?void 0:u.location.end.column)??1},r={index:n.index,line:n.line,column:n.column};r.index+=[...t].length;for(let c of t)c===`
|
|
9
|
+
`?(r.line++,r.column=1):r.column++;return{type:e,value:t,location:{start:n,end:r}}}static isTokenType(e,t){return t.length===0||t.includes(e.type)}};Kn.JsonLexer=Yn;Yn.PATTERNS=[{type:re.JsonTokenType.BRACE_LEFT,pattern:"{"},{type:re.JsonTokenType.BRACE_RIGHT,pattern:"}"},{type:re.JsonTokenType.BRACKET_LEFT,pattern:"["},{type:re.JsonTokenType.BRACKET_RIGHT,pattern:"]"},{type:re.JsonTokenType.COLON,pattern:":"},{type:re.JsonTokenType.COMMA,pattern:","},{type:re.JsonTokenType.LINE_COMMENT,pattern:/^\/\/.*/},{type:re.JsonTokenType.BLOCK_COMMENT,pattern:/^\/\*[\s\S]*?\*\//},{type:re.JsonTokenType.STRING,pattern:/^"(?:[^"\r\n\u2028\u2029\\]|\\(?:.|\r\n|\r|\n|\u2028|\u2029))*"/u},{type:re.JsonTokenType.STRING,pattern:/^'(?:[^'\r\n\u2028\u2029\\]|\\(?:.|\r\n|\r|\n|\u2028|\u2029))*'/u},{type:re.JsonTokenType.NEWLINE,pattern:/^(\r?\n)/},{type:re.JsonTokenType.WHITESPACE,pattern:/^[ \r\t\v\f\u00A0\u2028\u2029\uFEFF\u1680\u2000-\u200A\u202F\u205F\u3000]+/},{type:re.JsonTokenType.NUMBER,pattern:/^[-+]?((?:NaN|Infinity)(?![$_\u200C\u200D\p{ID_Continue}])|0[xX][\da-fA-F]+|(?:(?:0|[1-9]\d*)(?:\.\d*)?|\.\d*)(?:[eE][+-]?\d+)?)/u},{type:re.JsonTokenType.NULL,pattern:/^null(?![$_\u200C\u200D\p{ID_Continue}])/u},{type:re.JsonTokenType.BOOLEAN,pattern:/^(true|false)(?![$_\u200C\u200D\p{ID_Continue}])/u},{type:re.JsonTokenType.IDENTIFIER,pattern:new RegExp(`^${Du.identifierRegex.source}`,Du.identifierRegex.flags)}]});var Bi=W(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.SourceLocation=Xt.SourcePosition=void 0;var Qn;(function(s){function e(){return{index:-1,line:0,column:0}}s.unknown=e})(Qn||(Xt.SourcePosition=Qn={}));var du;(function(s){function e(){return{start:Qn.unknown(),end:Qn.unknown()}}s.unknown=e})(du||(Xt.SourceLocation=du={}))});var Xn=W(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.JsonNode=void 0;var Dl=Bi(),Ni=class{constructor(e){this.location=e.location??Dl.SourceLocation.unknown()}equals(e){return this.equalsLocation(e)&&this.isEquivalent(e)}equalsLocation(e){return this.location.start.index===e.location.start.index&&this.location.start.line===e.location.start.line&&this.location.start.column===e.location.start.column&&this.location.end.index===e.location.end.index&&this.location.end.line===e.location.end.line&&this.location.end.column===e.location.end.column}};Zn.JsonNode=Ni});var En=W(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.JsonCompositeNode=void 0;var pl=Xn(),Ii=class s extends pl.JsonNode{constructor(e){super(e),this.children=[...e.children??[]]}toString(e){let t=this.clone();return t.rebuild(e),s.flatten(t).join("")}reformat(e={}){this.reset(),this.rebuild(e)}static flatten(e){return e instanceof s?e.children.flatMap(s.flatten):[e]}};es.JsonCompositeNode=Ii});var xt=W(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.JsonValueNode=void 0;var dl=En(),ml=lt(),Si=class extends dl.JsonCompositeNode{cast(e){if(!(this instanceof e))throw new ml.JsonError(`Expected value of type ${e.name}, but got ${this.constructor.name}.`);return this}};ts.JsonValueNode=Si});var vt=W(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.JsonTokenNode=void 0;var gl=ze(),Cl=Xn(),ki=class s extends Cl.JsonNode{constructor(e){super(e),this.type=e.type,this.value=e.value}isType(e){return gl.JsonToken.isType(this,e)}clone(){return new s({type:this.type,value:this.value,location:this.location})}isEquivalent(e){return e instanceof s&&this.type===e.type&&this.value===e.value}toString(){return this.value}};ns.JsonTokenNode=ki});var tn=W(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.NodeManipulator=en.NodeMatcher=void 0;var Ye=ze(),Pe=ss(),me;(function(s){s.ANY=()=>!0,s.NONE=()=>!1,s.SIGNIFICANT=e=>!s.INSIGNIFICANT(e),s.INSIGNIFICANT=e=>s.SPACE(e)||s.COMMENT(e),s.SPACE=e=>s.WHITESPACE(e)||s.NEWLINE(e),s.WHITESPACE=e=>e instanceof Pe.JsonTokenNode&&e.type===Ye.JsonTokenType.WHITESPACE,s.NEWLINE=e=>e instanceof Pe.JsonTokenNode&&e.type===Ye.JsonTokenType.NEWLINE,s.COMMENT=e=>s.LINE_COMMENT(e)||s.BLOCK_COMMENT(e),s.LINE_COMMENT=e=>e instanceof Pe.JsonTokenNode&&e.type===Ye.JsonTokenType.LINE_COMMENT,s.BLOCK_COMMENT=e=>e instanceof Pe.JsonTokenNode&&e.type===Ye.JsonTokenType.BLOCK_COMMENT,s.PUNCTUATION=e=>e instanceof Pe.JsonTokenNode&&[Ye.JsonTokenType.COLON,Ye.JsonTokenType.COMMA,Ye.JsonTokenType.BRACE_LEFT,Ye.JsonTokenType.BRACE_RIGHT,Ye.JsonTokenType.BRACKET_LEFT,Ye.JsonTokenType.BRACKET_RIGHT].includes(e.type)})(me||(en.NodeMatcher=me={}));var ji=class s{constructor(e){this.index=0,this.fixing=!1,this.list=e}done(){return this.index>=this.list.length}next(){if(this.done())throw new Error("The iterator is at the end of the list.");this.index++}get position(){return this.index}seek(e){if(e<0||e>=this.list.length)throw new Error("The position is out of bounds.");this.index=e}previous(){if(this.index===0)throw new Error("The iterator is at the beginning of the list.");this.index--}get current(){if(this.done())throw new Error("The iterator is at the end of the list.");return this.list[this.index]}get nodeList(){return this.list}matchesPreviousToken(e){if(this.index===0)return!1;let t=this.list[this.index-1];return t instanceof Pe.JsonTokenNode&&t.type===e}matches(e){return this.findMatch([e])>=0}matchesToken(e){return this.matchesNext(t=>t instanceof Pe.JsonTokenNode&&t.type===e,me.NONE)}matchesNext(e,t){return this.findNext(e,t)>=0}findNext(e,t=me.INSIGNIFICANT){let n=-1,r=this.index;for(;!this.done();){let{current:o}=this;if(e(o)){n=this.index;break}if(t(o)){this.next();continue}break}return this.index=r,n}token(e,t=!1){return this.nodes([e],t)}node(e,t=!1){return this.nodes([e],t)}nodes(e,t=!1){let n=this.findMatch(e);return n>=0?(e.length===1?(this.seek(n),this.remove(),this.insert(e[0])):this.seek(n+1),this.fixing=!1):t||(this.fixing=!0,this.accommodate(e[0])),this}insert(e){return this.list.splice(this.index,0,e),this.next(),this}remove(){return this.list.splice(this.index,1),this}dropUntil(e){let t=!1,n=this.index;for(;!this.done();){let r=this.current;if(e(r))return t&&this.fixSpacing(n),!0;if(!(r instanceof Pe.JsonTokenNode)||me.SIGNIFICANT(r)){this.remove(),t=!0;continue}if(!t||r.type===Ye.JsonTokenType.WHITESPACE){this.next();continue}this.fixSpacing(n),t=!1}return t&&this.fixSpacing(n),!1}end(){if(this.dropUntil(me.NONE),!this.fixing)return this;for(;this.index>0;){this.previous();let e=this.current;if(me.INSIGNIFICANT(e)){this.remove();continue}this.next();break}return this}findMatch(e){return this.findNext(t=>e.some(n=>t==null?void 0:t.isEquivalent(n)),me.INSIGNIFICANT)}fixSpacing(e){let t=this.done()?null:this.current,n=0;for(;this.index>e;){this.previous();let o=this.current;if(!me.WHITESPACE(o)){this.next();break}n++}let r=this.list[this.index-1]??null;for(t!==null&&(r===null&&me.SPACE(t)||n>0&&(me.BLOCK_COMMENT(r)&&me.PUNCTUATION(t)||me.BLOCK_COMMENT(t)&&me.PUNCTUATION(r))?n++:me.NEWLINE(r)&&me.NEWLINE(t)?(n++,this.previous()):me.NEWLINE(t)||(n--,this.next()));n-- >0;)this.remove()}accommodate(e){if(me.INSIGNIFICANT(e)){this.insert(e);return}if(!this.done()){let t=this.findNext(n=>s.isReplacement(n,e));t>=0&&(this.seek(t),this.remove(),this.fixing=!1)}this.insert(e)}static isReplacement(e,t){return t instanceof Pe.JsonTokenNode||e instanceof Pe.JsonTokenNode?e.isEquivalent(t):t instanceof Pe.JsonValueNode&&e instanceof Pe.JsonValueNode?!0:e.constructor===t.constructor}};en.NodeManipulator=ji});var At=W(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.JsonValueFactory=void 0;var El=xt(),mu;(function(s){let e={};function t(r,o){e[r]=o}s.register=t;function n(r){return r instanceof El.JsonValueNode?r:Array.isArray(r)?e.array(r):typeof r=="object"&&r!==null?e.object(r):e.primitive(r)}s.create=n})(mu||(is.JsonValueFactory=mu={}))});var Pi=W(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.JsonIdentifierNode=void 0;var yl=xt(),Fl=tn(),bl=vt(),wl=ze(),xl=At(),vl=Kt(),Al=lt(),Mi=class s extends yl.JsonValueNode{constructor(e){super(e),this.token=e.token}static of(e){if(!(0,vl.isIdentifier)(e))throw new Al.JsonError(`Invalid identifier '${e}'.`);return new s({token:new bl.JsonTokenNode({type:wl.JsonTokenType.IDENTIFIER,value:e})})}update(e){let t=xl.JsonValueFactory.create(e);return this.isEquivalent(t)?this:t}reset(){this.children.length=0}rebuild(){new Fl.NodeManipulator(this.children).node(this.token).end()}clone(){let e=this.token.clone();return new s({token:e,children:this.children.map(t=>t===this.token?e:t),location:this.location})}isEquivalent(e){return e instanceof s&&this.token.equals(e.token)}toJSON(){return this.token.value}};rs.JsonIdentifierNode=Mi});var as=W(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.JsonPrimitiveNode=void 0;var Ol=xt(),Tl=tn(),Ji=vt(),Ot=ze(),Ri=At(),os=class s extends Ol.JsonValueNode{constructor(e){super(e),this.token=e.token,this.value=e.value}static of(e){return Ri.JsonValueFactory.create(e)}static ofHex(e){return new s({token:new Ji.JsonTokenNode({type:Ot.JsonTokenType.NUMBER,value:`"0x${e.toString(16)}"`}),value:e})}update(e){let t=Ri.JsonValueFactory.create(e);return this.isEquivalent(t)?this:t}reset(){this.children.length=0}rebuild(e){var r;let t=new Tl.NodeManipulator(this.children),n=this.token;if(n.isType(Ot.JsonTokenType.STRING)&&t.done()&&((r=e==null?void 0:e.string)==null?void 0:r.quote)==="single"){let i=JSON.stringify(this.value).slice(1,-1).replace(/((?:^|[^\\])(?:\\\\)*)\\"/g,(u,c)=>`${c}"`).replace(/'/g,"\\'");i=`'${i}'`,n=new Ji.JsonTokenNode({type:Ot.JsonTokenType.STRING,value:i})}t.node(n),t.end()}clone(){let e=this.token.clone();return new s({token:e,value:this.value,children:this.children.map(t=>t===this.token?e:t.clone()),location:this.location})}isEquivalent(e){return e instanceof s&&this.token.equals(e.token)&&this.value===e.value}toJSON(){return this.value}};us.JsonPrimitiveNode=os;var $l={string:Ot.JsonTokenType.STRING,number:Ot.JsonTokenType.NUMBER,boolean:Ot.JsonTokenType.BOOLEAN,null:Ot.JsonTokenType.NULL};Ri.JsonValueFactory.register("primitive",s=>new os({value:s,token:new Ji.JsonTokenNode({type:$l[s===null?"null":typeof s],value:JSON.stringify(s)})}))});var ls=W(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.JsonPropertyNode=void 0;var gu=vt(),Cu=ze(),_l=En(),Bl=tn(),Nl=At(),Il=Pi(),Sl=Kt(),kl=as(),Li=class s extends _l.JsonCompositeNode{constructor(e){super(e),this.key=e.key,this.value=e.value}reset(){this.key.reset(),this.value.reset(),this.children.length=0}set(e){this.value=Nl.JsonValueFactory.create(e)}rebuild(e){var i,u,c;this.value.rebuild(e);let t=(i=e==null?void 0:e.property)==null?void 0:i.quote,n=((u=e==null?void 0:e.object)==null?void 0:u.colonSpacing)??!1,r=new Bl.NodeManipulator(this.children),{key:o}=this;r.matches(this.key)?o.rebuild():(o=this.formatKey(e),o.rebuild({...e,string:{quote:t==="single"||t==="double"?t:(c=e==null?void 0:e.string)==null?void 0:c.quote}})),r.node(o),r.token(new gu.JsonTokenNode({type:Cu.JsonTokenType.COLON,value:":"})),n&&r.token(new gu.JsonTokenNode({type:Cu.JsonTokenType.WHITESPACE,value:" "}),!r.done()),r.node(this.value).end()}formatKey(e){var t;return this.key instanceof kl.JsonPrimitiveNode&&((t=e==null?void 0:e.property)==null?void 0:t.unquoted)===!0&&(0,Sl.isIdentifier)(this.key.value)?Il.JsonIdentifierNode.of(this.key.value):this.key}clone(){let e=this.key.clone(),t=this.value.clone();return new s({key:e,value:t,children:this.children.map(n=>n===this.key?e:n===this.value?t:n.clone()),location:this.location})}isEquivalent(e){return e instanceof s?this.key.isEquivalent(e.key)&&this.value.isEquivalent(e.value):!1}};cs.JsonPropertyNode=Li});var hs=W(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.JsonStructureNode=Tt.StructureDelimiter=void 0;var jl=xt(),oe=ze(),Xe=vt(),we=tn(),Eu=En(),Ml=ls(),Pl=we.NodeMatcher.COMMENT,ht=we.NodeMatcher.WHITESPACE,nn=we.NodeMatcher.NEWLINE,Jl=we.NodeMatcher.SPACE,Rl=we.NodeMatcher.INSIGNIFICANT,ft;(function(s){s.OBJECT="object",s.ARRAY="array"})(ft||(Tt.StructureDelimiter=ft={}));(function(s){let e={[s.OBJECT]:{start:{type:oe.JsonTokenType.BRACE_LEFT,value:"{"},end:{type:oe.JsonTokenType.BRACE_RIGHT,value:"}"}},[s.ARRAY]:{start:{type:oe.JsonTokenType.BRACKET_LEFT,value:"["},end:{type:oe.JsonTokenType.BRACKET_RIGHT,value:"]"}}};function t(i){return Object.values(e).some(({start:u})=>u.type===i.type)}s.isStartToken=t;function n(i){return Object.values(e).some(({end:u})=>u.type===i.type)}s.isEndToken=n;function r(i){return new Xe.JsonTokenNode(e[i].start)}s.getStartToken=r;function o(i){return new Xe.JsonTokenNode(e[i].end)}s.getEndToken=o})(ft||(Tt.StructureDelimiter=ft={}));var Wi=class s extends jl.JsonValueNode{reset(){for(let e of this.getList())e.reset();this.children.length=0}rebuild(e={}){let t=this.detectFormatting(e),n=t,r=[...this.children];for(let o=0;o<r.length;o++){let i=r[o];if(i instanceof s){n={...i.detectFormatting(n),indentationLevel:n.indentationLevel};continue}i instanceof Eu.JsonCompositeNode&&this.children.includes(i)&&r.splice(o+1,0,...i.children)}for(let o of this.getList())o.rebuild(n);this.rebuildChildren(t)}rebuildChildren(e){let t=new we.NodeManipulator(this.children),n=this.getDelimiter(),r=ft.getStartToken(n),o=ft.getEndToken(n);t.token(r);let i=this.getList(),u=i.length,{indentationLevel:c=0}=e,{indentationSize:h=0,commaSpacing:D=!1,entryIndentation:l=!1,leadingIndentation:d=!1,trailingIndentation:C=!1,trailingComma:F=!1}=e[n]??{},y=!1;for(let p=0;p<u;p++){let I=i[p],x=p!==0&&l||p===0&&d;if(s.matchesInsertion(t,i,p))x&&this.indent(t,e),t.insert(I),y=!1;else if(s.matchesRemoval(t,i,p))t.dropUntil(I.isEquivalent.bind(I)),t.node(I),y=!0;else{let k=t.matches(I);if(k||s.skipComments(t),x&&(h>0&&t.matchesNext(O=>o.isEquivalent(O))?(t.node(new Xe.JsonTokenNode({type:oe.JsonTokenType.NEWLINE,value:`
|
|
10
|
+
`})),t.matchesToken(oe.JsonTokenType.WHITESPACE)&&t.matchesNext(we.NodeMatcher.NEWLINE,we.NodeMatcher.WHITESPACE)&&t.remove(),t.token(this.getIndentationToken(e))):this.indent(t,e,y&&k)),y=k,t.matchesPreviousToken(oe.JsonTokenType.LINE_COMMENT))t.insert(new Xe.JsonTokenNode({type:oe.JsonTokenType.NEWLINE,value:`
|
|
11
|
+
`}));else if(t.position>1&&!k&&t.matchesPreviousToken(oe.JsonTokenType.BLOCK_COMMENT)&&!t.matchesToken(oe.JsonTokenType.WHITESPACE)){t.previous();let O=t.matchesPreviousToken(oe.JsonTokenType.WHITESPACE);t.next(),O&&t.token(new Xe.JsonTokenNode({type:oe.JsonTokenType.WHITESPACE,value:" "}))}t.node(I)}(p<u-1||F)&&t.node(new Xe.JsonTokenNode({type:oe.JsonTokenType.COMMA,value:","})),p===u-1?C&&this.indent(t,{...e,indentationLevel:c-1}):(h===0||!l)&&D&&(!t.matchesNext(we.NodeMatcher.SPACE)||t.matchesNext(k=>o.isEquivalent(k),we.NodeMatcher.SPACE))&&t.token(new Xe.JsonTokenNode({type:oe.JsonTokenType.WHITESPACE,value:" "}),t.matchesNext(k=>i[p+1].isEquivalent(k),we.NodeMatcher.SPACE))}u===0&&t.findNext(I=>I.isEquivalent(o),we.NodeMatcher.ANY)>=0&&t.dropUntil(I=>I.isEquivalent(o)),t.token(o),t.end()}detectFormatting(e={}){let t=!1,n=!0,r=!1,o=!1,i=!1,u=0,c=0,h,D,l=!1,d=!1,C=!0,F=!0,y={},p={},I=[...s.iterate(this,this.getMaxDepth())];for(let k=0;k<I.length;k++){let{token:O,depth:G,parents:Oe}=I[k];switch(O.type){case oe.JsonTokenType.IDENTIFIER:y.property={...y.property,unquoted:!0};break;case oe.JsonTokenType.STRING:{let ae=Oe[Oe.length-2],Te=O.value.startsWith("'")?"single":"double";ae instanceof Ml.JsonPropertyNode&&ae.key.equals(Oe[Oe.length-1])?y.property={...y.property,quote:Te}:y.string={...y.string,quote:Te};break}}if(G===0&&ft.isStartToken(O))t=!0;else{let ae=ft.isEndToken(O);G===0&&(ae&&(D=n,l=i),t&&(h=nn(O),ht(O)||(t=!1))),ae||(c=u,C=!1,Jl(O)||(F=!1))}if(ht(O)&&(O.value.includes(" ")&&(y.indentationCharacter="tab"),G===0&&n&&(u=O.value.includes(" ")?O.value.replace(/[^\t]/g,"").length:O.value.replace(/[^ ]/g,"").length)),r&&k>0&&I[k-1].depth===0){nn(O)||(p.commaSpacing=ht(O));let ae=nn(O);for(let Te=k;!ae&&Te<I.length;Te++){let{token:Ge,depth:V}=I[Te];if(V===0){if(ht(Ge)||Pl(Ge))continue;nn(Ge)&&(ae=!0)}break}p.entryIndentation=ae,r=!1}o&&(p.colonSpacing=ht(O),o=!1),o=O.type===oe.JsonTokenType.COLON||o&&ht(O),r=O.type===oe.JsonTokenType.COMMA||r&&ht(O),i=G===0&&O.type===oe.JsonTokenType.COMMA||i&&Rl(O),n=nn(O)||n&&ht(O),d=d||nn(O)}C||(F||(p.indentationSize=0,p.trailingComma=l),p.leadingIndentation=h??!1,p.trailingIndentation=D??!1);let x=Math.max(e.indentationLevel??0,0)+1;if(c>0&&!F){let k=c%x;p.indentationSize=(c-k)/x+k}return d&&(p.commaSpacing===void 0&&(p.commaSpacing=!0),p.colonSpacing===void 0&&(p.colonSpacing=!0),p.entryIndentation===void 0&&(p.entryIndentation=!0)),y[this.getDelimiter()]=p,y.indentationLevel=x,{...e,...y,object:{...e.array,...y.array,...e.object,...y.object},array:{...e.object,...y.object,...e.array,...y.array}}}indent(e,t,n=!1){let r=this.getDelimiter(),{indentationSize:o=0,leadingIndentation:i=!1,trailingIndentation:u=!1}=t[r]??{};if(o<=0&&!i&&!u)return;let c=new Xe.JsonTokenNode({type:oe.JsonTokenType.NEWLINE,value:`
|
|
12
|
+
`});e.token(c,n),e.matchesToken(oe.JsonTokenType.WHITESPACE)?e.next():e.token(this.getIndentationToken(t),n)}getIndentationToken(e){let t=this.getDelimiter(),{indentationLevel:n=0}=e,{indentationSize:r=0}=e[t]??{},o=e.indentationCharacter==="tab"?" ":" ";return new Xe.JsonTokenNode({type:oe.JsonTokenType.WHITESPACE,value:o.repeat(n*r)})}static*iterate(e,t,n=[]){for(let r of e.children)r instanceof Xe.JsonTokenNode&&(yield{depth:n.length,token:r,parents:[...n,e]}),t>0&&r instanceof Eu.JsonCompositeNode&&(yield*s.iterate(r,t-1,[...n,e]))}static skipComments(e){for(;e.matchesNext(we.NodeMatcher.COMMENT,we.NodeMatcher.SPACE);)e.next()}static matchesInsertion(e,t,n){let r=t.length,o=t[n];if(e.matchesNext(o.isEquivalent.bind(o),we.NodeMatcher.ANY))return!1;for(let i=n+1;i<r;i++)if(e.matches(t[i]))return!0;return!1}static matchesRemoval(e,t,n){if(e.matches(t[n]))return!1;let r=t.slice(n+1);return e.matchesNext(t[n].isEquivalent.bind(t[n]),o=>r.every(i=>!i.isEquivalent(o)))}};Tt.JsonStructureNode=Wi});var Fu=W(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});Ds.JsonArrayNode=void 0;var yu=hs(),Dt=At(),Ll=lt(),fs=class s extends yu.JsonStructureNode{constructor(e){super(e),this.elementNodes=[...e.elements]}static of(...e){return new s({elements:e.map(Dt.JsonValueFactory.create)})}update(e){if(!(e instanceof s)&&!Array.isArray(e))return Dt.JsonValueFactory.create(e);let t=e instanceof s?e.elements:e,n=this.elementNodes.splice(0);for(let r=0;r<t.length;r++)this.push(r<n.length?n[r].update(t[r]):t[r]);return t.length<n.length&&this.splice(t.length,n.length-t.length),this}getList(){return[...this.elementNodes]}getDelimiter(){return yu.StructureDelimiter.ARRAY}getMaxDepth(){return 1}get elements(){return[...this.elementNodes]}get(e,t){let n=this.elementNodes[e];if(t!==void 0&&!(n instanceof t))throw new Ll.JsonError(`Expected ${t.name} at index ${e}, but got ${n.constructor.name}.`);return n}set(e,t){if(e<0||e>=this.elementNodes.length)throw new Error(`Index ${e} is out of bounds.`);this.elementNodes[e]=Dt.JsonValueFactory.create(t)}clear(){this.elementNodes.length=0}delete(e){if(e<0||e>=this.elementNodes.length)throw new Error(`Index ${e} is out of bounds.`);this.splice(e,1)}unshift(...e){this.elementNodes.unshift(...e.map(Dt.JsonValueFactory.create))}push(...e){this.elementNodes.push(...e.map(Dt.JsonValueFactory.create))}shift(){return this.elementNodes.shift()}pop(){return this.elementNodes.pop()}splice(e,t,...n){return this.elementNodes.splice(e,t,...n.map(Dt.JsonValueFactory.create))}clone(){let e=new Map;for(let t of this.elementNodes)e.set(t,t.clone());return new s({elements:[...e.values()],children:this.children.map(t=>e.get(t)??t.clone()),location:this.location})}isEquivalent(e){return!(e instanceof s)||this.elements.length!==e.elements.length?!1:this.elements.every((t,n)=>e.elements[n].isEquivalent(t))}toJSON(){return this.elements.map(e=>e.toJSON())}};Ds.JsonArrayNode=fs;Dt.JsonValueFactory.register("array",s=>new fs({elements:s.map(Dt.JsonValueFactory.create)}))});var wu=W(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});Cs.JsonObjectNode=void 0;var Wl=xt(),bu=hs(),ds=ls(),Hi=as(),Fn=At(),ql=lt(),gs=tn(),ps=vt(),yn=ze(),Gl=gs.NodeMatcher.INSIGNIFICANT,qi=gs.NodeMatcher.NEWLINE,Gi=gs.NodeMatcher.SIGNIFICANT,Hl=gs.NodeMatcher.SPACE,ms=class s extends bu.JsonStructureNode{constructor(e){super(e),this.propertyNodes=[...e.properties]}static of(e){return new s({properties:Object.entries(e).map(([t,n])=>new ds.JsonPropertyNode({key:Hi.JsonPrimitiveNode.of(t),value:Fn.JsonValueFactory.create(n)}))})}merge(e){if(e.propertyNodes.length!==0){if(this.propertyNodes.length===0){this.propertyNodes.push(...e.propertyNodes.map(t=>t.clone())),this.children.splice(0,this.children.length,...e.children.map(t=>t.clone()));return}for(let t of e.propertyNodes){let n=t.key.toJSON(),r=e.findPropertyRange(n),o=[t];r!==null&&(o=e.children.slice(r[0],r[1]+1));let i=t.clone();o=o.map(h=>h===t?i:h.clone());let u=this.findPropertyRange(n);if(u===null){this.propertyNodes.push(i),this.insert(o);continue}let c=this.propertyNodes.findIndex(h=>h.key.toJSON()===n);this.propertyNodes.splice(c,1,i),this.children.splice(u[0],u[1]-u[0]+1,...o)}}}insert(e){let t=this.children.length;for(let r=this.children.length-1;r>=0;r--){let o=this.children[r];if(o instanceof ps.JsonTokenNode){if(o.isType(yn.JsonTokenType.BRACE_RIGHT)){t=r;continue}if(o.isType(yn.JsonTokenType.COMMA)){t=r+1;break}}if(Gi(o))break;if(qi(o)){for(;r>0&&Hl(this.children[r-1]);)r--;t=r;break}t=r}let n=!1;for(let r=t-1;r>=0;r--){let o=this.children[r];if(o instanceof ps.JsonTokenNode&&o.isType(yn.JsonTokenType.COMMA)){n=!1;break}if(Gi(o)){n=!0;break}}n&&(this.children.splice(t,0,new ps.JsonTokenNode({type:yn.JsonTokenType.COMMA,value:","})),t++),this.children.splice(t,0,...e)}findPropertyRange(e){let t=this.children.findIndex(r=>r instanceof ds.JsonPropertyNode&&r.key.toJSON()===e);if(t===-1)return null;let n=t;for(let r=t-1;r>=0;r--){let o=this.children[r];if(!Gl(o))break;qi(o)&&(t=r)}for(let r=n+1;r<this.children.length;r++){let o=this.children[r];if(!(o instanceof ps.JsonTokenNode)||Gi(o)&&!o.isType(yn.JsonTokenType.COMMA))break;if(qi(o)){n=r-1;break}n=r}return[t,n]}update(e){if(!(e instanceof Wl.JsonValueNode)){if(typeof e!="object"||e===null||Array.isArray(e))return Fn.JsonValueFactory.create(e);for(let[t,n]of Object.entries(e)){if(n===void 0){this.delete(t);continue}let r=this.propertyNodes.find(o=>o.key.toJSON()===t);if(r!==void 0){r.value=r.value.update(n);continue}this.set(t,n)}for(let t of this.propertyNodes){let n=t.key.toJSON();e[n]===void 0&&this.delete(t.key.toJSON())}return this}if(!(e instanceof s))return e;for(let t of e.propertyNodes){let n=this.propertyNodes.findIndex(r=>r.key.toJSON()===t.key.toJSON());if(n>=0){let r=this.propertyNodes[n].clone();r.value=r.value.update(t.value)}else this.propertyNodes.push(t)}for(let t of this.propertyNodes){let n=t.key.toJSON();e.has(n)||this.delete(n)}return this}getList(){return[...this.propertyNodes]}getDelimiter(){return bu.StructureDelimiter.OBJECT}getMaxDepth(){return 2}has(e){return this.propertyNodes.some(t=>t.key.toJSON()===e)}get properties(){return[...this.propertyNodes]}set(e,t){let n=this.propertyNodes.findIndex(r=>r.key.toJSON()===e);if(n>=0){this.propertyNodes[n].set(t);return}this.propertyNodes.push(new ds.JsonPropertyNode({key:typeof e=="string"?Hi.JsonPrimitiveNode.of(e):e,value:Fn.JsonValueFactory.create(t)}))}delete(e){for(let t=0;t<this.propertyNodes.length;t++)if(this.propertyNodes[t].key.toJSON()===e){this.propertyNodes.splice(t,1);break}}get(e,t){let n=this.propertyNodes.find(o=>o.key.toJSON()===e);if(n===void 0)throw new Error(`Property "${e}" does not exist.`);let{value:r}=n;if(t!==void 0&&!(r instanceof t))throw new ql.JsonError(`Expected a value of type ${t.name}, but got ${r.constructor.name}`);return r}clone(){let e=new Map;for(let t of this.propertyNodes)e.set(t,t.clone());return new s({properties:[...e.values()],children:this.children.map(t=>e.get(t)??t.clone()),location:this.location})}isEquivalent(e){if(!(e instanceof s)||this.properties.length!==e.properties.length)return!1;let t=Object.fromEntries(e.properties.map(n=>[n.key.toJSON(),n]));return this.properties.every(n=>{var r;return((r=t[n.key.toJSON()])==null?void 0:r.isEquivalent(n))===!0})}toJSON(){return Object.fromEntries(this.properties.map(e=>[e.key.toJSON(),e.value.toJSON()]))}};Cs.JsonObjectNode=ms;Fn.JsonValueFactory.register("object",s=>new ms({properties:Object.entries(s).flatMap(([e,t])=>t===void 0?[]:[new ds.JsonPropertyNode({key:Hi.JsonPrimitiveNode.of(e),value:Fn.JsonValueFactory.create(t)})])}))});var ss=W(Ce=>{"use strict";var Ul=Ce&&Ce.__createBinding||(Object.create?function(s,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,n,r)}:function(s,e,t,n){n===void 0&&(n=t),s[n]=e[t]}),Ke=Ce&&Ce.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Ul(e,s,t)};Object.defineProperty(Ce,"__esModule",{value:!0});Ke(hs(),Ce);Ke(Fu(),Ce);Ke(En(),Ce);Ke(Pi(),Ce);Ke(Xn(),Ce);Ke(wu(),Ce);Ke(as(),Ce);Ke(ls(),Ce);Ke(vt(),Ce);Ke(xt(),Ce);Ke(At(),Ce)});var xu=W(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.JsonParser=void 0;var Vl=_i(),Y=ze(),xe=ss(),zl=Kt(),bn=lt(),Ui=class s{constructor(e){this.lexer=new Vl.JsonLexer(e)}static parse(e,t){let n=new s(e);return t!==void 0?n.parseValue(t):n.parseValue()}parseValue(e){let t=this.parseRoot();if(e!==void 0&&!(t instanceof e))throw new bn.JsonError(`Expected ${e.name}, but got ${t.constructor.name}.`);return t}parseRoot(){this.lexer.next();let e=this.lexer.skipInsignificant(),t=this.parseNext(),n=this.lexer.skipInsignificant();if(t.children.unshift(...s.createChildren(e)),t.children.push(...s.createChildren(n)),!this.lexer.isEof()){let r=this.lexer.peek(),o=r.location.start;throw new bn.JsonParseError(`Unexpected token '${r.value}' at ${o.line}:${o.column}.`,r.location)}return t}parseNext(){let e=this.lexer.peek();switch(e.type){case Y.JsonTokenType.BRACE_LEFT:return this.parseObject();case Y.JsonTokenType.BRACKET_LEFT:return this.parseArray();case Y.JsonTokenType.NUMBER:return this.parseNumber();case Y.JsonTokenType.STRING:return this.parseString();case Y.JsonTokenType.BOOLEAN:return this.parseBoolean();case Y.JsonTokenType.NULL:return this.parseNull();default:{let t=e.location.start;throw new bn.JsonParseError(`Unexpected token '${e.value}' at ${t.line}:${t.column}.`,e.location)}}}parseNumber(){let e=this.lexer.consume(Y.JsonTokenType.NUMBER),t=new xe.JsonTokenNode(e);return new xe.JsonPrimitiveNode({token:t,value:this.parseNumberValue(e),children:[t],location:e.location})}parseNumberValue(e){let{value:t}=e,n=1;return t.startsWith("+")?t=t.slice(1):t.startsWith("-")&&(n=-1,t=t.slice(1)),t==="Infinity"?n*(1/0):t==="NaN"?NaN:(t.startsWith(".")?t=`0${t}`:t=t.replace(/\.(?!\d)/,""),t.startsWith("0x")||t.startsWith("0X")?n*Number.parseInt(t,16):n*JSON.parse(t))}parseString(){let e=this.lexer.consume(Y.JsonTokenType.STRING),{value:t}=e;t.startsWith("'")&&(t=t.slice(1,-1).replace(/((?:^|[^\\])(?:\\\\)*)\\(["'])/g,(o,i,u)=>`${i}${u==='"'?'\\"':"'"}`),t=`"${t}"`),t=t.replace(/\\(?:\r\n|\r|\n|\u2028|\u2029)/gu,"");let n=new xe.JsonTokenNode(e),r;try{r=JSON.parse(t)}catch(o){throw o instanceof Error?new bn.JsonParseError(`Invalid string at ${e.location.start.line}:${e.location.start.column}: ${o.message}`,e.location):o}return new xe.JsonPrimitiveNode({token:n,value:r,children:[n],location:e.location})}parseNull(){let e=this.lexer.consume(Y.JsonTokenType.NULL),t=new xe.JsonTokenNode(e);return new xe.JsonPrimitiveNode({token:t,value:null,children:[t],location:e.location})}parseBoolean(){let e=this.lexer.consume(Y.JsonTokenType.BOOLEAN),t=new xe.JsonTokenNode(e);return new xe.JsonPrimitiveNode({token:t,value:e.value==="true",children:[t],location:e.location})}parseArray(){let e=[this.lexer.consume(Y.JsonTokenType.BRACKET_LEFT),...this.lexer.skipInsignificant()],t=[];for(;!this.lexer.matches(Y.JsonTokenType.BRACKET_RIGHT);){let n=this.parseNext();t.push(n),e.push(n,...this.lexer.skipInsignificant()),this.lexer.matches(Y.JsonTokenType.BRACKET_RIGHT)||e.push(this.lexer.consume(Y.JsonTokenType.COMMA),...this.lexer.skipInsignificant())}return e.push(this.lexer.consume(Y.JsonTokenType.BRACKET_RIGHT)),new xe.JsonArrayNode({elements:t,children:s.createChildren(e),location:{start:e[0].location.start,end:e[e.length-1].location.end}})}parseObject(){let e=[this.lexer.consume(Y.JsonTokenType.BRACE_LEFT),...this.lexer.skipInsignificant()],t=[];for(;!this.lexer.matches(Y.JsonTokenType.BRACE_RIGHT);){let n=this.parseObjectProperty();t.push(n),e.push(n,...this.lexer.skipInsignificant()),this.lexer.matches(Y.JsonTokenType.BRACE_RIGHT)||e.push(this.lexer.consume(Y.JsonTokenType.COMMA),...this.lexer.skipInsignificant())}return e.push(this.lexer.consume(Y.JsonTokenType.BRACE_RIGHT)),new xe.JsonObjectNode({properties:t,children:s.createChildren(e),location:{start:e[0].location.start,end:e[e.length-1].location.end}})}parseObjectProperty(){let e=[];this.lexer.expect(Y.JsonTokenType.STRING,Y.JsonTokenType.IDENTIFIER);let t=this.lexer.matches(Y.JsonTokenType.STRING)?this.parseString():this.parseIdentifier();e.push(t,...this.lexer.skipInsignificant(),this.lexer.consume(Y.JsonTokenType.COLON),...this.lexer.skipInsignificant());let n=this.parseNext();return e.push(n),new xe.JsonPropertyNode({key:t,value:n,children:s.createChildren(e),location:{start:e[0].location.start,end:e[e.length-1].location.end}})}parseIdentifier(){let e=this.lexer.consume(Y.JsonTokenType.IDENTIFIER);if((0,zl.isReserved)(e.value)){let n=e.location.start;throw new bn.JsonParseError(`Reserved identifier '${e.value}' at ${n.line}:${n.column}.`,e.location)}let t=new xe.JsonTokenNode(e);return new xe.JsonIdentifierNode({token:t,children:[t],location:e.location})}static createChildren(e){return e.map(t=>t instanceof xe.JsonNode?t:new xe.JsonTokenNode(t))}};Es.JsonParser=Ui});var Au=W(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0})});var Ou=W(Ae=>{"use strict";var Yl=Ae&&Ae.__createBinding||(Object.create?function(s,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,n,r)}:function(s,e,t,n){n===void 0&&(n=t),s[n]=e[t]}),pt=Ae&&Ae.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Yl(e,s,t)};Object.defineProperty(Ae,"__esModule",{value:!0});pt(Kt(),Ae);pt(_i(),Ae);pt(Bi(),Ae);pt(xu(),Ae);pt(ze(),Ae);pt(Au(),Ae);pt(ss(),Ae);pt(lt(),Ae)});var qh={};Ha(qh,{createApp:()=>Ja,runCli:()=>Lh,runCreateCli:()=>xr,runCreateInteractiveCli:()=>Ar});module.exports=Ua(qh);var Ee=le(Qs(),1),Wt=require("node:process"),ot=le(require("node:readline"),1),ni=le(require("node:readline"),1),Jr=require("node:tty"),Sn=le(Xs(),1);function Za({onlyFirst:s=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,s?void 0:"g")}var Xa=Za();function Rr(s){if(typeof s!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof s}\``);return s.replace(Xa,"")}function Lr(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Wr={exports:{}};(function(s){var e={};s.exports=e,e.eastAsianWidth=function(n){var r=n.charCodeAt(0),o=n.length==2?n.charCodeAt(1):0,i=r;return 55296<=r&&r<=56319&&56320<=o&&o<=57343&&(r&=1023,o&=1023,i=r<<10|o,i+=65536),i==12288||65281<=i&&i<=65376||65504<=i&&i<=65510?"F":i==8361||65377<=i&&i<=65470||65474<=i&&i<=65479||65482<=i&&i<=65487||65490<=i&&i<=65495||65498<=i&&i<=65500||65512<=i&&i<=65518?"H":4352<=i&&i<=4447||4515<=i&&i<=4519||4602<=i&&i<=4607||9001<=i&&i<=9002||11904<=i&&i<=11929||11931<=i&&i<=12019||12032<=i&&i<=12245||12272<=i&&i<=12283||12289<=i&&i<=12350||12353<=i&&i<=12438||12441<=i&&i<=12543||12549<=i&&i<=12589||12593<=i&&i<=12686||12688<=i&&i<=12730||12736<=i&&i<=12771||12784<=i&&i<=12830||12832<=i&&i<=12871||12880<=i&&i<=13054||13056<=i&&i<=19903||19968<=i&&i<=42124||42128<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||55216<=i&&i<=55238||55243<=i&&i<=55291||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65106||65108<=i&&i<=65126||65128<=i&&i<=65131||110592<=i&&i<=110593||127488<=i&&i<=127490||127504<=i&&i<=127546||127552<=i&&i<=127560||127568<=i&&i<=127569||131072<=i&&i<=194367||177984<=i&&i<=196605||196608<=i&&i<=262141?"W":32<=i&&i<=126||162<=i&&i<=163||165<=i&&i<=166||i==172||i==175||10214<=i&&i<=10221||10629<=i&&i<=10630?"Na":i==161||i==164||167<=i&&i<=168||i==170||173<=i&&i<=174||176<=i&&i<=180||182<=i&&i<=186||188<=i&&i<=191||i==198||i==208||215<=i&&i<=216||222<=i&&i<=225||i==230||232<=i&&i<=234||236<=i&&i<=237||i==240||242<=i&&i<=243||247<=i&&i<=250||i==252||i==254||i==257||i==273||i==275||i==283||294<=i&&i<=295||i==299||305<=i&&i<=307||i==312||319<=i&&i<=322||i==324||328<=i&&i<=331||i==333||338<=i&&i<=339||358<=i&&i<=359||i==363||i==462||i==464||i==466||i==468||i==470||i==472||i==474||i==476||i==593||i==609||i==708||i==711||713<=i&&i<=715||i==717||i==720||728<=i&&i<=731||i==733||i==735||768<=i&&i<=879||913<=i&&i<=929||931<=i&&i<=937||945<=i&&i<=961||963<=i&&i<=969||i==1025||1040<=i&&i<=1103||i==1105||i==8208||8211<=i&&i<=8214||8216<=i&&i<=8217||8220<=i&&i<=8221||8224<=i&&i<=8226||8228<=i&&i<=8231||i==8240||8242<=i&&i<=8243||i==8245||i==8251||i==8254||i==8308||i==8319||8321<=i&&i<=8324||i==8364||i==8451||i==8453||i==8457||i==8467||i==8470||8481<=i&&i<=8482||i==8486||i==8491||8531<=i&&i<=8532||8539<=i&&i<=8542||8544<=i&&i<=8555||8560<=i&&i<=8569||i==8585||8592<=i&&i<=8601||8632<=i&&i<=8633||i==8658||i==8660||i==8679||i==8704||8706<=i&&i<=8707||8711<=i&&i<=8712||i==8715||i==8719||i==8721||i==8725||i==8730||8733<=i&&i<=8736||i==8739||i==8741||8743<=i&&i<=8748||i==8750||8756<=i&&i<=8759||8764<=i&&i<=8765||i==8776||i==8780||i==8786||8800<=i&&i<=8801||8804<=i&&i<=8807||8810<=i&&i<=8811||8814<=i&&i<=8815||8834<=i&&i<=8835||8838<=i&&i<=8839||i==8853||i==8857||i==8869||i==8895||i==8978||9312<=i&&i<=9449||9451<=i&&i<=9547||9552<=i&&i<=9587||9600<=i&&i<=9615||9618<=i&&i<=9621||9632<=i&&i<=9633||9635<=i&&i<=9641||9650<=i&&i<=9651||9654<=i&&i<=9655||9660<=i&&i<=9661||9664<=i&&i<=9665||9670<=i&&i<=9672||i==9675||9678<=i&&i<=9681||9698<=i&&i<=9701||i==9711||9733<=i&&i<=9734||i==9737||9742<=i&&i<=9743||9748<=i&&i<=9749||i==9756||i==9758||i==9792||i==9794||9824<=i&&i<=9825||9827<=i&&i<=9829||9831<=i&&i<=9834||9836<=i&&i<=9837||i==9839||9886<=i&&i<=9887||9918<=i&&i<=9919||9924<=i&&i<=9933||9935<=i&&i<=9953||i==9955||9960<=i&&i<=9983||i==10045||i==10071||10102<=i&&i<=10111||11093<=i&&i<=11097||12872<=i&&i<=12879||57344<=i&&i<=63743||65024<=i&&i<=65039||i==65533||127232<=i&&i<=127242||127248<=i&&i<=127277||127280<=i&&i<=127337||127344<=i&&i<=127386||917760<=i&&i<=917999||983040<=i&&i<=1048573||1048576<=i&&i<=1114109?"A":"N"},e.characterLength=function(n){var r=this.eastAsianWidth(n);return r=="F"||r=="W"||r=="A"?2:1};function t(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var r=t(n),o=0,i=0;i<r.length;i++)o=o+this.characterLength(r[i]);return o},e.slice=function(n,r,o){textLen=e.length(n),r=r||0,o=o||1,r<0&&(r=textLen+r),o<0&&(o=textLen+o);for(var i="",u=0,c=t(n),h=0;h<c.length;h++){var D=c[h],l=e.length(D);if(u>=r-(l==2?1:0))if(u+l<=o)i+=D;else break;u+=l}return i}})(Wr);var ec=Wr.exports,tc=Lr(ec),nc=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},sc=Lr(nc);function dn(s,e={}){if(typeof s!="string"||s.length===0||(e={ambiguousIsNarrow:!0,...e},s=Rr(s),s.length===0))return 0;s=s.replace(sc()," ");let t=e.ambiguousIsNarrow?1:2,n=0;for(let r of s){let o=r.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(tc.eastAsianWidth(r)){case"F":case"W":n+=2;break;case"A":n+=t;break;default:n+=1}}return n}var ei=10,Br=(s=0)=>e=>`\x1B[${e+s}m`,Nr=(s=0)=>e=>`\x1B[${38+s};5;${e}m`,Ir=(s=0)=>(e,t,n)=>`\x1B[${38+s};2;${e};${t};${n}m`,X={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(X.modifier);var ic=Object.keys(X.color),rc=Object.keys(X.bgColor);[...ic,...rc];function oc(){let s=new Map;for(let[e,t]of Object.entries(X)){for(let[n,r]of Object.entries(t))X[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},t[n]=X[n],s.set(r[0],r[1]);Object.defineProperty(X,e,{value:t,enumerable:!1})}return Object.defineProperty(X,"codes",{value:s,enumerable:!1}),X.color.close="\x1B[39m",X.bgColor.close="\x1B[49m",X.color.ansi=Br(),X.color.ansi256=Nr(),X.color.ansi16m=Ir(),X.bgColor.ansi=Br(ei),X.bgColor.ansi256=Nr(ei),X.bgColor.ansi16m=Ir(ei),Object.defineProperties(X,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(o=>o+o).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>X.rgbToAnsi256(...X.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let u=e%36;t=Math.floor(e/36)/5,n=Math.floor(u/6)/5,r=u%6/5}let o=Math.max(t,n,r)*2;if(o===0)return 30;let i=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return o===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>X.ansi256ToAnsi(X.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>X.ansi256ToAnsi(X.hexToAnsi256(e)),enumerable:!1}}),X}var uc=oc(),Mn=new Set(["\x1B","\x9B"]),ac=39,si="\x07",qr="[",cc="]",Gr="m",ii=`${cc}8;;`,Sr=s=>`${Mn.values().next().value}${qr}${s}${Gr}`,kr=s=>`${Mn.values().next().value}${ii}${s}${si}`,lc=s=>s.split(" ").map(e=>dn(e)),ti=(s,e,t)=>{let n=[...e],r=!1,o=!1,i=dn(Rr(s[s.length-1]));for(let[u,c]of n.entries()){let h=dn(c);if(i+h<=t?s[s.length-1]+=c:(s.push(c),i=0),Mn.has(c)&&(r=!0,o=n.slice(u+1).join("").startsWith(ii)),r){o?c===si&&(r=!1,o=!1):c===Gr&&(r=!1);continue}i+=h,i===t&&u<n.length-1&&(s.push(""),i=0)}!i&&s[s.length-1].length>0&&s.length>1&&(s[s.length-2]+=s.pop())},hc=s=>{let e=s.split(" "),t=e.length;for(;t>0&&!(dn(e[t-1])>0);)t--;return t===e.length?s:e.slice(0,t).join(" ")+e.slice(t).join("")},fc=(s,e,t={})=>{if(t.trim!==!1&&s.trim()==="")return"";let n="",r,o,i=lc(s),u=[""];for(let[h,D]of s.split(" ").entries()){t.trim!==!1&&(u[u.length-1]=u[u.length-1].trimStart());let l=dn(u[u.length-1]);if(h!==0&&(l>=e&&(t.wordWrap===!1||t.trim===!1)&&(u.push(""),l=0),(l>0||t.trim===!1)&&(u[u.length-1]+=" ",l++)),t.hard&&i[h]>e){let d=e-l,C=1+Math.floor((i[h]-d-1)/e);Math.floor((i[h]-1)/e)<C&&u.push(""),ti(u,D,e);continue}if(l+i[h]>e&&l>0&&i[h]>0){if(t.wordWrap===!1&&l<e){ti(u,D,e);continue}u.push("")}if(l+i[h]>e&&t.wordWrap===!1){ti(u,D,e);continue}u[u.length-1]+=D}t.trim!==!1&&(u=u.map(h=>hc(h)));let c=[...u.join(`
|
|
13
|
+
`)];for(let[h,D]of c.entries()){if(n+=D,Mn.has(D)){let{groups:d}=new RegExp(`(?:\\${qr}(?<code>\\d+)m|\\${ii}(?<uri>.*)${si})`).exec(c.slice(h).join(""))||{groups:{}};if(d.code!==void 0){let C=Number.parseFloat(d.code);r=C===ac?void 0:C}else d.uri!==void 0&&(o=d.uri.length===0?void 0:d.uri)}let l=uc.codes.get(Number(r));c[h+1]===`
|
|
14
|
+
`?(o&&(n+=kr("")),r&&l&&(n+=Sr(l))):D===`
|
|
15
|
+
`&&(r&&l&&(n+=Sr(r)),o&&(n+=kr(o)))}return n};function jr(s,e,t){return String(s).normalize().replace(/\r\n/g,`
|
|
12
16
|
`).split(`
|
|
13
|
-
`).map(
|
|
14
|
-
`)}var
|
|
15
|
-
`),
|
|
16
|
-
`),r=[];for(let o=0;o<Math.max(t.length,
|
|
17
|
-
`),
|
|
18
|
-
`).length-1;this.output.write(
|
|
19
|
-
`);this.output.write(r[
|
|
20
|
-
`).slice(
|
|
21
|
-
`)),this._prevFrame=e;return}this.output.write(
|
|
22
|
-
${
|
|
23
|
-
`,t=
|
|
24
|
-
${w.default.yellow(ie)} ${
|
|
25
|
-
${w.default.yellow(
|
|
26
|
-
`;case"submit":return`${e}${w.default.gray(ie)} ${w.default.dim(this.value||
|
|
27
|
-
`+w.default.gray(ie):""}`;default:return`${e}${w.default.cyan(ie)} ${
|
|
28
|
-
${w.default.cyan(
|
|
29
|
-
`}}}).prompt();var
|
|
30
|
-
${
|
|
31
|
-
`,r=this.value?e:t;switch(this.state){case"submit":return`${
|
|
32
|
-
${w.default.gray(ie)}`;default:return`${
|
|
33
|
-
${w.default.cyan(
|
|
34
|
-
`}}}).prompt()},
|
|
35
|
-
${
|
|
36
|
-
`;switch(this.state){case"submit":return`${
|
|
37
|
-
${w.default.gray(ie)}`;default:{let r=
|
|
17
|
+
`).map(n=>fc(n,e,t)).join(`
|
|
18
|
+
`)}var Dc=Object.defineProperty,pc=(s,e,t)=>e in s?Dc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ke=(s,e,t)=>(pc(s,typeof e!="symbol"?e+"":e,t),t);function dc(s,e){if(s===e)return;let t=s.split(`
|
|
19
|
+
`),n=e.split(`
|
|
20
|
+
`),r=[];for(let o=0;o<Math.max(t.length,n.length);o++)t[o]!==n[o]&&r.push(o);return r}var Hr=Symbol("clack:cancel");function ut(s){return s===Hr}function In(s,e){s.isTTY&&s.setRawMode(e)}var Mr=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),mc=new Set(["up","down","left","right","space","enter"]),mn=class{constructor({render:e,input:t=Wt.stdin,output:n=Wt.stdout,...r},o=!0){ke(this,"input"),ke(this,"output"),ke(this,"rl"),ke(this,"opts"),ke(this,"_track",!1),ke(this,"_render"),ke(this,"_cursor",0),ke(this,"state","initial"),ke(this,"value"),ke(this,"error",""),ke(this,"subscribers",new Map),ke(this,"_prevFrame",""),this.opts=r,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=e.bind(this),this._track=o,this.input=t,this.output=n}prompt(){let e=new Jr.WriteStream(0);return e._write=(t,n,r)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),r()},this.input.pipe(e),this.rl=ni.default.createInterface({input:this.input,output:e,tabSize:2,prompt:"",escapeCodeTimeout:50}),ni.default.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),In(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((t,n)=>{this.once("submit",()=>{this.output.write(Ee.cursor.show),this.output.off("resize",this.render),In(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(Ee.cursor.show),this.output.off("resize",this.render),In(this.input,!1),t(Hr)})})}on(e,t){let n=this.subscribers.get(e)??[];n.push({cb:t}),this.subscribers.set(e,n)}once(e,t){let n=this.subscribers.get(e)??[];n.push({cb:t,once:!0}),this.subscribers.set(e,n)}emit(e,...t){let n=this.subscribers.get(e)??[],r=[];for(let o of n)o.cb(...t),o.once&&r.push(()=>n.splice(n.indexOf(o),1));for(let o of r)o()}unsubscribe(){this.subscribers.clear()}onKeypress(e,t){if(this.state==="error"&&(this.state="active"),t!=null&&t.name&&!this._track&&Mr.has(t.name)&&this.emit("cursor",Mr.get(t.name)),t!=null&&t.name&&mc.has(t.name)&&this.emit("cursor",t.name),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),e===" "&&this.opts.placeholder&&(this.value||(this.rl.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),e&&this.emit("key",e.toLowerCase()),(t==null?void 0:t.name)==="return"){if(this.opts.validate){let n=this.opts.validate(this.value);n&&(this.error=n,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}e===""&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
21
|
+
`),In(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=jr(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
22
|
+
`).length-1;this.output.write(Ee.cursor.move(-999,e*-1))}render(){let e=jr(this._render(this)??"",process.stdout.columns,{hard:!0});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(Ee.cursor.hide);else{let t=dc(this._prevFrame,e);if(this.restoreCursor(),t&&(t==null?void 0:t.length)===1){let n=t[0];this.output.write(Ee.cursor.move(0,n)),this.output.write(Ee.erase.lines(1));let r=e.split(`
|
|
23
|
+
`);this.output.write(r[n]),this._prevFrame=e,this.output.write(Ee.cursor.move(0,r.length-n-1));return}else if(t&&(t==null?void 0:t.length)>1){let n=t[0];this.output.write(Ee.cursor.move(0,n)),this.output.write(Ee.erase.down());let r=e.split(`
|
|
24
|
+
`).slice(n);this.output.write(r.join(`
|
|
25
|
+
`)),this._prevFrame=e;return}this.output.write(Ee.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}},kn=class extends mn{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",t=>{this.output.write(Ee.cursor.move(0,-1)),this.value=t,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var gc=Object.defineProperty,Cc=(s,e,t)=>e in s?gc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Pr=(s,e,t)=>(Cc(s,typeof e!="symbol"?e+"":e,t),t),Ur=class extends mn{constructor(s){super(s,!1),Pr(this,"options"),Pr(this,"cursor",0),this.options=s.options,this.cursor=this.options.findIndex(({value:e})=>e===s.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",e=>{switch(e){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};var Ec=Object.defineProperty,yc=(s,e,t)=>e in s?Ec(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Fc=(s,e,t)=>(yc(s,typeof e!="symbol"?e+"":e,t),t),jn=class extends mn{constructor(e){super(e),Fc(this,"valueWithCursor",""),this.on("finalize",()=>{this.value||(this.value=e.defaultValue),this.valueWithCursor=this.value}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.value}${Sn.default.inverse(Sn.default.hidden("_"))}`;else{let t=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor);this.valueWithCursor=`${t}${Sn.default.inverse(n[0])}${n.slice(1)}`}})}get cursor(){return this._cursor}},bc=globalThis.process.platform.startsWith("win");function Vr({input:s=Wt.stdin,output:e=Wt.stdout,overwrite:t=!0,hideCursor:n=!0}={}){let r=ot.createInterface({input:s,output:e,prompt:"",tabSize:1});ot.emitKeypressEvents(s,r),s.isTTY&&s.setRawMode(!0);let o=(i,{name:u})=>{if(String(i)===""){n&&e.write(Ee.cursor.show),process.exit(0);return}if(!t)return;ot.moveCursor(e,u==="return"?0:-1,u==="return"?-1:0,()=>{ot.clearLine(e,1,()=>{s.once("keypress",o)})})};return n&&e.write(Ee.cursor.hide),s.once("keypress",o),()=>{s.off("keypress",o),n&&e.write(Ee.cursor.show),s.isTTY&&!bc&&s.setRawMode(!1),r.terminal=!1,r.close()}}var je=le(require("node:process"),1),w=le(Xs(),1),qt=le(Qs(),1);function wc(){return je.default.platform!=="win32"?je.default.env.TERM!=="linux":!!je.default.env.CI||!!je.default.env.WT_SESSION||!!je.default.env.TERMINUS_SUBLIME||je.default.env.ConEmuTask==="{cmd::Cmder}"||je.default.env.TERM_PROGRAM==="Terminus-Sublime"||je.default.env.TERM_PROGRAM==="vscode"||je.default.env.TERM==="xterm-256color"||je.default.env.TERM==="alacritty"||je.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var ri=wc(),he=(s,e)=>ri?s:e,xc=he("\u25C6","*"),zr=he("\u25A0","x"),Yr=he("\u25B2","x"),ai=he("\u25C7","o"),vc=he("\u250C","T"),ie=he("\u2502","|"),Gt=he("\u2514","\u2014"),oi=he("\u25CF",">"),ui=he("\u25CB"," "),ef=he("\u25FB","[\u2022]"),tf=he("\u25FC","[+]"),nf=he("\u25FB","[ ]"),sf=he("\u25AA","\u2022"),rf=he("\u2500","-"),of=he("\u256E","+"),uf=he("\u251C","+"),af=he("\u256F","+"),Ac=he("\u25CF","\u2022"),Oc=he("\u25C6","*"),Tc=he("\u25B2","!"),$c=he("\u25A0","x"),ci=s=>{switch(s){case"initial":case"active":return w.default.cyan(xc);case"cancel":return w.default.red(zr);case"error":return w.default.yellow(Yr);case"submit":return w.default.green(ai)}},Kr=s=>new jn({validate:s.validate,placeholder:s.placeholder,defaultValue:s.defaultValue,initialValue:s.initialValue,render(){var r;let e=`${w.default.gray(ie)}
|
|
26
|
+
${ci(this.state)} ${s.message}
|
|
27
|
+
`,t=s.placeholder?w.default.inverse(s.placeholder[0])+w.default.dim(s.placeholder.slice(1)):w.default.inverse(w.default.hidden("_")),n=this.value?this.valueWithCursor:t;switch(this.state){case"error":return`${e.trim()}
|
|
28
|
+
${w.default.yellow(ie)} ${n}
|
|
29
|
+
${w.default.yellow(Gt)} ${w.default.yellow(this.error)}
|
|
30
|
+
`;case"submit":return`${e}${w.default.gray(ie)} ${w.default.dim(this.value||s.placeholder)}`;case"cancel":return`${e}${w.default.gray(ie)} ${w.default.strikethrough(w.default.dim(this.value??""))}${(r=this.value)!=null&&r.trim()?`
|
|
31
|
+
`+w.default.gray(ie):""}`;default:return`${e}${w.default.cyan(ie)} ${n}
|
|
32
|
+
${w.default.cyan(Gt)}
|
|
33
|
+
`}}}).prompt();var Pn=s=>{let e=s.active??"Yes",t=s.inactive??"No";return new kn({active:e,inactive:t,initialValue:s.initialValue??!0,render(){let n=`${w.default.gray(ie)}
|
|
34
|
+
${ci(this.state)} ${s.message}
|
|
35
|
+
`,r=this.value?e:t;switch(this.state){case"submit":return`${n}${w.default.gray(ie)} ${w.default.dim(r)}`;case"cancel":return`${n}${w.default.gray(ie)} ${w.default.strikethrough(w.default.dim(r))}
|
|
36
|
+
${w.default.gray(ie)}`;default:return`${n}${w.default.cyan(ie)} ${this.value?`${w.default.green(oi)} ${e}`:`${w.default.dim(ui)} ${w.default.dim(e)}`} ${w.default.dim("/")} ${this.value?`${w.default.dim(ui)} ${w.default.dim(t)}`:`${w.default.green(oi)} ${t}`}
|
|
37
|
+
${w.default.cyan(Gt)}
|
|
38
|
+
`}}}).prompt()},li=s=>{let e=(n,r)=>{let o=n.label??String(n.value);return r==="active"?`${w.default.green(oi)} ${o} ${n.hint?w.default.dim(`(${n.hint})`):""}`:r==="selected"?`${w.default.dim(o)}`:r==="cancelled"?`${w.default.strikethrough(w.default.dim(o))}`:`${w.default.dim(ui)} ${w.default.dim(o)}`},t=0;return new Ur({options:s.options,initialValue:s.initialValue,render(){let n=`${w.default.gray(ie)}
|
|
39
|
+
${ci(this.state)} ${s.message}
|
|
40
|
+
`;switch(this.state){case"submit":return`${n}${w.default.gray(ie)} ${e(this.options[this.cursor],"selected")}`;case"cancel":return`${n}${w.default.gray(ie)} ${e(this.options[this.cursor],"cancelled")}
|
|
41
|
+
${w.default.gray(ie)}`;default:{let r=s.maxItems===void 0?1/0:Math.max(s.maxItems,5);this.cursor>=t+r-3?t=Math.max(Math.min(this.cursor-r+3,this.options.length-r),0):this.cursor<t+2&&(t=Math.max(this.cursor-2,0));let o=r<this.options.length&&t>0,i=r<this.options.length&&t+r<this.options.length;return`${n}${w.default.cyan(ie)} ${this.options.slice(t,t+r).map((u,c,h)=>c===0&&o?w.default.dim("..."):c===h.length-1&&i?w.default.dim("..."):e(u,c+t===this.cursor?"active":"inactive")).join(`
|
|
38
42
|
${w.default.cyan(ie)} `)}
|
|
39
|
-
${w.default.cyan(
|
|
40
|
-
`}}}}).prompt()};var
|
|
43
|
+
${w.default.cyan(Gt)}
|
|
44
|
+
`}}}}).prompt()};var gn=(s="")=>{process.stdout.write(`${w.default.gray(Gt)} ${w.default.red(s)}
|
|
41
45
|
|
|
42
|
-
`)},
|
|
43
|
-
`)},
|
|
44
|
-
${w.default.gray(
|
|
46
|
+
`)},Jn=(s="")=>{process.stdout.write(`${w.default.gray(vc)} ${s}
|
|
47
|
+
`)},hi=(s="")=>{process.stdout.write(`${w.default.gray(ie)}
|
|
48
|
+
${w.default.gray(Gt)} ${s}
|
|
45
49
|
|
|
46
|
-
`)},
|
|
47
|
-
`);t.push(`${e} ${
|
|
50
|
+
`)},te={message:(s="",{symbol:e=w.default.gray(ie)}={})=>{let t=[`${w.default.gray(ie)}`];if(s){let[n,...r]=s.split(`
|
|
51
|
+
`);t.push(`${e} ${n}`,...r.map(o=>`${w.default.gray(ie)} ${o}`))}process.stdout.write(`${t.join(`
|
|
48
52
|
`)}
|
|
49
|
-
`)},info:
|
|
50
|
-
`);let
|
|
51
|
-
`),t()},
|
|
52
|
-
|
|
53
|
-
`):
|
|
54
|
-
|
|
55
|
-
`)),
|
|
56
|
-
`)}function
|
|
57
|
-
\u274C ${
|
|
58
|
-
`),process.exit(1)}function
|
|
59
|
-
${
|
|
60
|
-
.::: ${
|
|
61
|
-
.:::: ${
|
|
62
|
-
.:::::. ${
|
|
63
|
-
::::::. ${
|
|
64
|
-
::::::. ${
|
|
65
|
-
::::::. ${
|
|
66
|
-
:::::::. ${
|
|
67
|
-
::::::::.. ${
|
|
68
|
-
.:::::::::. ${
|
|
53
|
+
`)},info:s=>{te.message(s,{symbol:w.default.blue(Ac)})},success:s=>{te.message(s,{symbol:w.default.green(Oc)})},step:s=>{te.message(s,{symbol:w.default.green(ai)})},warn:s=>{te.message(s,{symbol:w.default.yellow(Tc)})},warning:s=>{te.warn(s)},error:s=>{te.message(s,{symbol:w.default.red($c)})}},Ht=()=>{let s=ri?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],e=ri?80:120,t,n,r=!1,o="",i=(D="")=>{r=!0,t=Vr(),o=D.replace(/\.+$/,""),process.stdout.write(`${w.default.gray(ie)}
|
|
54
|
+
`);let l=0,d=0;n=setInterval(()=>{let C=w.default.magenta(s[l]),F=".".repeat(Math.floor(d)).slice(0,3);process.stdout.write(qt.cursor.move(-999,0)),process.stdout.write(qt.erase.down(1)),process.stdout.write(`${C} ${o}${F}`),l=l+1<s.length?l+1:0,d=d<s.length?d+.125:0},e)},u=(D="",l=0)=>{o=D??o,r=!1,clearInterval(n);let d=l===0?w.default.green(ai):l===1?w.default.red(zr):w.default.red(Yr);process.stdout.write(qt.cursor.move(-999,0)),process.stdout.write(qt.erase.down(1)),process.stdout.write(`${d} ${o}
|
|
55
|
+
`),t()},c=(D="")=>{o=D??o},h=D=>{let l=D>1?"Something went wrong":"Canceled";r&&u(l,D)};return process.on("uncaughtExceptionMonitor",()=>h(2)),process.on("unhandledRejection",()=>h(2)),process.on("SIGINT",()=>h(1)),process.on("SIGTERM",()=>h(1)),process.on("exit",h),{start:i,stop:u,message:c}};var fi,Qr,Zr,Xr,eo=!0;typeof process<"u"&&({FORCE_COLOR:fi,NODE_DISABLE_COLORS:Qr,NO_COLOR:Zr,TERM:Xr}=process.env||{},eo=process.stdout&&process.stdout.isTTY);var _c={enabled:!Qr&&Zr==null&&Xr!=="dumb"&&(fi!=null&&fi!=="0"||eo)};function z(s,e){let t=new RegExp(`\\x1b\\[${e}m`,"g"),n=`\x1B[${s}m`,r=`\x1B[${e}m`;return function(o){return!_c.enabled||o==null?o:n+(~(""+o).indexOf(r)?o.replace(t,r+n):o)+r}}var to=z(0,0),no=z(1,22),hf=z(2,22),ff=z(3,23),Df=z(4,24),pf=z(7,27),df=z(8,28),mf=z(9,29),gf=z(30,39),$e=z(31,39),so=z(32,39),io=z(33,39),ro=z(34,39),be=z(35,39),_e=z(36,39),oo=z(37,39),at=z(90,39),Cf=z(90,39),Ef=z(40,49),Rn=z(41,49),yf=z(42,49),Ff=z(43,49),Cn=z(44,49),Di=z(45,49),bf=z(46,49),wf=z(47,49);var pi=le(require("node:fs")),uo=require("node:path"),Ln=async s=>{let e=await pi.default.promises.readdir(s);return await Promise.all(e.map(t=>pi.default.promises.rm((0,uo.join)(s,t),{recursive:!0})))};var Fs=le(require("node:fs")),bs=require("node:path");var eu=le(co(),1),Ai=le(require("node:fs"),1),Oi=require("node:path"),tu=le(Zo(),1);function zt(s,e,t){let n,r=new Promise(i=>{try{n=(0,tu.default)(s,e,{cwd:t,stdio:"ignore"}),n.on("error",u=>{u&&(u.message?te.error($e(String(u.message))+`
|
|
56
|
+
|
|
57
|
+
`):te.error($e(String(u))+`
|
|
58
|
+
|
|
59
|
+
`)),i(!1)}),n.on("close",u=>{i(u===0)})}catch{i(!1)}});return{abort:async()=>{n&&n.kill("SIGINT")},install:r}}async function nu(s){let e=(0,Oi.join)(s,"package.json");return JSON.parse(await Ai.default.promises.readFile(e,"utf-8"))}async function su(s,e){let t=(0,Oi.join)(s,"package.json");await Ai.default.promises.writeFile(t,JSON.stringify(e,null,2)+`
|
|
60
|
+
`)}function iu(s){return new Promise(e=>setTimeout(e,s))}function ru(s){s={...s};let e={name:s.name,version:s.version,description:s.description,scripts:s.scripts,dependencies:s.dependencies,devDependencies:s.devDependencies,main:s.main,qwik:s.qwik,module:s.module,types:s.types,exports:s.exports,files:s.files,engines:{node:"^18.17.0 || ^20.3.0 || >=21.0.0"}};Object.keys(e).forEach(n=>{delete s[n]}),delete s.__qwik__;let t=Object.keys(s).sort();for(let n of t)e[n]=s[n];return e}function ou(s){return s.toLocaleLowerCase().split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function ct(){var s;return((s=(0,eu.default)())==null?void 0:s.name)||"pnpm"}function qn(s){console.error(`
|
|
61
|
+
\u274C ${$e(s)}
|
|
62
|
+
`),process.exit(1)}function uu(){console.log(ro(`
|
|
63
|
+
${be("............")}
|
|
64
|
+
.::: ${be(":--------:.")}
|
|
65
|
+
.:::: ${be(".:-------:.")}
|
|
66
|
+
.:::::. ${be(".:-------.")}
|
|
67
|
+
::::::. ${be(".:------.")}
|
|
68
|
+
::::::. ${be(":-----:")}
|
|
69
|
+
::::::. ${be(".:-----.")}
|
|
70
|
+
:::::::. ${be(".-----.")}
|
|
71
|
+
::::::::.. ${be("---:.")}
|
|
72
|
+
.:::::::::. ${be(":-:.")}
|
|
69
73
|
..::::::::::::
|
|
70
74
|
...::::
|
|
71
75
|
`),`
|
|
72
|
-
`)}function
|
|
73
|
-
${
|
|
76
|
+
`)}function au(){return process.platform!=="win32"?process.env.TERM!=="linux":!!process.env.CI||!!process.env.WT_SESSION||!!process.env.TERMINUS_SUBLIME||process.env.ConEmuTask==="{cmd::Cmder}"||process.env.TERM_PROGRAM==="Terminus-Sublime"||process.env.TERM_PROGRAM==="vscode"||process.env.TERM==="xterm-256color"||process.env.TERM==="alacritty"||process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var il=au(),Yt=(s,e)=>il?s:e,xi=Yt("\u2502","|"),Xo=Yt("\u2500","-"),rl=Yt("\u256E","+"),ol=Yt("\u251C","+"),ul=Yt("\u256F","+"),al=Yt("\u25C7","o");function cl(){let s=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(s,"g")}var vi=s=>s.replace(cl(),""),Gn=(s="",e="")=>{let t=`
|
|
77
|
+
${s}
|
|
74
78
|
`.split(`
|
|
75
|
-
`),
|
|
76
|
-
`);process.stdout.write(`${
|
|
77
|
-
${
|
|
79
|
+
`),n=vi(e).length,r=Math.max(t.reduce((i,u)=>(u=vi(u),u.length>i?u.length:i),0),n)+2,o=t.map(i=>`${at(xi)} ${oo(i)}${" ".repeat(r-vi(i).length)}${at(xi)}`).join(`
|
|
80
|
+
`);process.stdout.write(`${at(xi)}
|
|
81
|
+
${so(al)} ${to(e)} ${at(Xo.repeat(Math.max(r-n-1,1))+rl)}
|
|
78
82
|
${o}
|
|
79
|
-
${
|
|
80
|
-
`)};var
|
|
83
|
+
${at(ol+Xo.repeat(r+2)+ul)}
|
|
84
|
+
`)};var zi=le(require("node:fs"),1),Tu=require("node:path");var it=le(require("node:fs"),1),Me=le(require("node:path"),1);function wt(s,e){return zt(s,["install"],e)}function cu(s,e){let{tmpInstallDir:t}=ll(e),{install:n,abort:r}=wt(s,t),i={abort:()=>r().finally(()=>it.default.rmSync(t,{recursive:!0})),complete:async u=>{let c=!1;try{if(await n){let D=Me.default.join(t,"node_modules"),l=Me.default.join(u,"node_modules");await it.default.promises.rename(D,l);try{await it.default.promises.rename(Me.default.join(t,"package-lock.json"),Me.default.join(u,"package-lock.json"))}catch{}try{await it.default.promises.rename(Me.default.join(t,"yarn.lock"),Me.default.join(u,"yarn.lock"))}catch{}try{await it.default.promises.rename(Me.default.join(t,"pnpm-lock.yaml"),Me.default.join(u,"pnpm-lock.yaml"))}catch{}c=!0,it.default.rmSync(t,{recursive:!0})}}catch(h){h&&(h.message?te.error($e(String(h.message))+`
|
|
81
85
|
|
|
82
|
-
`):
|
|
86
|
+
`):te.error($e(String(h))+`
|
|
83
87
|
|
|
84
|
-
`))}if(!
|
|
85
|
-
You might need to run ${
|
|
88
|
+
`))}if(!c){let h=`${Rn(` ${s} install failed `)}
|
|
89
|
+
You might need to run ${_e(`"${s} install"`)} manually inside the root of the project.
|
|
86
90
|
|
|
87
|
-
`;
|
|
88
|
-
`,type:"modify"})}catch{
|
|
89
|
-
`,type:"modify"})}catch{
|
|
91
|
+
`;te.error(h)}return c},success:void 0};return n.then(u=>i.success=u),i}function ll(s){let e=".create-qwik-"+Math.round(Math.random()*Number.MAX_SAFE_INTEGER).toString(36).toLowerCase(),t=Me.default.resolve(s.target,"..",e);try{it.default.mkdirSync(t)}catch(o){te.error(`\u274C ${$e(String(o))}`)}let n=Me.default.join(s.dir,"package.json"),r=Me.default.join(t,"package.json");return it.default.copyFileSync(n,r),{tmpInstallDir:t}}var Hn=le(require("node:fs"),1),Un=require("node:path");var Ti=null;async function Vn(){if(!Ti){let s=[],e=["app","feature","adapter"],t=(0,Un.join)(__dirname,"starters"),n=await Hn.default.promises.readdir(t);await Promise.all(n.map(async r=>{let o=r.slice(0,r.length-1);if(e.includes(o)){let i=(0,Un.join)(t,r),u=await Hn.default.promises.readdir(i);await Promise.all(u.map(async c=>{var l,d,C,F;let h=(0,Un.join)(i,c);if((await Hn.default.promises.stat(h)).isDirectory()){let y=await nu(h),p={id:c,name:((l=y.__qwik__)==null?void 0:l.displayName)??ou(c),type:o,dir:h,pkgJson:y,docs:((d=y.__qwik__)==null?void 0:d.docs)??[],priority:((C=y==null?void 0:y.__qwik__)==null?void 0:C.priority)??0,alwaysInRoot:((F=y.__qwik__)==null?void 0:F.alwaysInRoot)??[]};s.push(p)}}))}})),s.sort((r,o)=>r.priority>o.priority?-1:r.priority<o.priority?1:r.id<o.id?-1:1),Ti=s}return Ti}var sn=le(Ou(),1),ye=le(require("node:fs"),1),rn=require("node:path");async function Vi(s,e,t,n,r){let o=await ye.default.promises.readdir(t);await Promise.all(o.map(async i=>{let u=i==="gitignore"?".gitignore":i,c=(0,rn.extname)(u),h=(0,rn.join)(t,i),D=(0,rn.join)(n,u),l=await ye.default.promises.stat(h);if(l.isDirectory())await Vi(s,e,h,D,r);else if(l.isFile()){let d=Kl(e,D,n,u,r);u==="package.json"?await Ql(s,h,D):n.endsWith(".vscode")&&u==="settings.json"?await Zl(s,h,d):u==="README.md"?await eh(s,h,d):u===".gitignore"||u===".prettierignore"||u===".eslintignore"?await th(s,h,D):c===".css"?await nh(s,h,d,e):ye.default.existsSync(d)?s.files.push({path:d,content:await ye.default.promises.readFile(h),type:"overwrite"}):s.files.push({path:d,content:await ye.default.promises.readFile(h),type:"create"})}}))}function Kl(s,e,t,n,r){let o=s.projectDir?s.projectDir:"",i=t.indexOf(s.rootDir)+s.rootDir.length,u=t.slice(i),c=(0,rn.join)(s.rootDir,o,u,n);return r&&r.some(D=>n.includes(D)||t.includes(D))?e:c}async function Ql(s,e,t){var r;let n=await ye.default.promises.readFile(e,"utf-8");try{let o=JSON.parse(n),i=["scripts","dependencies","devDependencies"],u=JSON.parse(await ye.default.promises.readFile(t,"utf-8"));if(i.forEach(c=>{Xl(o,u,c)}),(r=u.scripts)!=null&&r.qwik){let c=u.scripts.qwik;delete u.scripts.qwik,u.scripts.qwik=c}s.files.push({path:t,content:JSON.stringify(u,null,2)+`
|
|
92
|
+
`,type:"modify"})}catch{s.files.push({path:t,content:n,type:"create"})}}async function Zl(s,e,t){let n=await ye.default.promises.readFile(e,"utf-8");try{let r=sn.JsonParser.parse(n,sn.JsonObjectNode),o=sn.JsonParser.parse(await ye.default.promises.readFile(t,"utf-8"),sn.JsonObjectNode);o.merge(r),s.files.push({path:t,content:o.toString()+`
|
|
93
|
+
`,type:"modify"})}catch{s.files.push({path:t,content:n,type:"create"})}}function Xl(s,e,t){if(s[t]){e[t]?Object.assign(e[t],{...s[t]}):e[t]={...s[t]};let n={},r=Object.keys(e[t]).sort();for(let o of r)n[o]=e[t][o];e[t]=n}}async function eh(s,e,t){let n=await ye.default.promises.readFile(e,"utf-8"),r,o="";try{o=await ye.default.promises.readFile(t,"utf-8"),o=o.trim()+`
|
|
90
94
|
|
|
91
|
-
`+
|
|
92
|
-
`,type:r})}async function
|
|
95
|
+
`+n,r="modify"}catch{o=n,r="create"}let i=ct();i!=="npm"&&(o=o.replace(/\b(npm run|pnpm run|yarn( run)?)\b/g,i)),s.files.push({path:t,content:o.trim()+`
|
|
96
|
+
`,type:r})}async function th(s,e,t){let n=await ye.default.promises.readFile(e,"utf-8");try{let r=await ye.default.promises.readFile(t,"utf-8"),o=n.trim().split(/\r?\n/),i=r.trim().split(/\r?\n/);for(let u of o)i.includes(u)||(u.startsWith("#")&&i.push(""),i.push(u));s.files.push({path:t,content:i.join(`
|
|
93
97
|
`).trim()+`
|
|
94
|
-
`,type:"modify"})}catch{
|
|
98
|
+
`,type:"modify"})}catch{s.files.push({path:t,content:n,type:"create"})}}async function nh(s,e,t,n){let r=await ye.default.promises.readFile(e,"utf-8");try{let o=await ye.default.promises.readFile(t,"utf-8"),i=r.trim()+`
|
|
95
99
|
|
|
96
100
|
`+o.trim()+`
|
|
97
|
-
`,
|
|
98
|
-
You might need to run "${
|
|
99
|
-
`)}var
|
|
100
|
-
`),"Result"),
|
|
101
|
-
`).map(r=>r.split(" ")),
|
|
102
|
-
`)}rowToString(e,t){return this.rasterize(e).forEach((
|
|
101
|
+
`,u=n.installDeps===!0;s.files.push({path:t,content:u?i:r,type:u?"modify":"overwrite"})}catch{s.files.push({path:t,content:r,type:"create"})}}async function Yi(s,e){let n=(await Vn()).find(u=>u.id===e.integration);if(!n)throw new Error(`Unable to find integration "${e.integration}"`);let r={files:[],installedDeps:{},installedScripts:Object.keys(n.pkgJson.scripts||{})};e.installDeps&&(r.installedDeps={...n.pkgJson.dependencies,...n.pkgJson.devDependencies}),await Vi(r,e,n.dir,e.rootDir,n.alwaysInRoot);let o=async u=>{let c=Object.keys(r.installedDeps).length>0,h=Ht();u&&h.start(`Updating app${c?" and installing dependencies":""}...`);let D=!0;try{let l=new Set(r.files.map(C=>(0,Tu.dirname)(C.path)));for(let C of Array.from(l))try{zi.default.mkdirSync(C,{recursive:!0})}catch{}let d=Promise.all(r.files.map(async C=>{await zi.default.promises.writeFile(C.path,C.content)}));if(e.installDeps&&Object.keys(r.installedDeps).length>0){let{install:C}=wt(s,e.rootDir);D=await C}if(await d,u&&h.stop("App updated"),!D){let C=`${Rn(` ${s} install failed `)}
|
|
102
|
+
You might need to run "${_e(`${s} install`)}" manually inside the root of the project.`;te.error(C)}}catch(l){u&&h.stop("App updated"),qn(String(l))}};return{rootDir:e.rootDir,integration:n,updates:r,commit:o}}var Ki,sh="library",ys="base",wn=class extends Error{constructor(e,t){super(),this.message=`Invalid app id "${e}". It can only be one of${t.map(n=>` "${n.id}"`)}.`}},on=async s=>{Ki||(Ki=await Vn());let e=Ki.filter(i=>i.type===s),t=e.filter(i=>i.id!==ys);function n(i,u=!0){return u?t.find(c=>c.id===i):e.find(c=>c.id===i)}function r(){return n(ys,!1)}function o(i){if(i===sh){let D=n(i);if(!D)throw new wn(i,t);return{baseApp:D}}let c=n(ys,!1),h=n(i);if(!c)throw new wn(ys,t);if(!h)throw new wn(i,t);return{baseApp:c,starterApp:h}}return{templates:e,standaloneTemplates:t,getAppById:n,getBootstrapApps:o,getBaseApp:r}};function ih(s){return typeof s=="string"&&s.trim().length>0}function rh(s){if(!ih(s.outDir))throw new Error("Missing outDir");if(!(0,bs.isAbsolute)(s.outDir))throw new Error("outDir must be an absolute path")}async function un(s){let{appId:e,outDir:t,pkgManager:n,templateManager:r}=s,{baseApp:o,starterApp:i}=r.getBootstrapApps(e);rh(s),Fs.default.existsSync(t)||Fs.default.mkdirSync(decodeURIComponent(t),{recursive:!0});let u=await oh({baseApp:o,starterApp:i,pkgManager:n,outDir:t});return{starterId:s.appId,outDir:t,pkgManager:n,docs:u}}async function oh({baseApp:s,starterApp:e,outDir:t,pkgManager:n}){let r=[...s.docs],o=e??s,i=ru({...s.pkgJson,name:`my-${o.pkgJson.name}`,description:o.pkgJson.description,scripts:void 0,dependencies:void 0,devDependencies:void 0});await su(t,i);let u=(0,bs.join)(t,"README.md");return await Fs.default.promises.writeFile(u,""),await(await Yi(n,{rootDir:t,integration:s.id,installDeps:!1})).commit(!1),e&&(r.push(...e.docs),await(await Yi(n,{rootDir:t,integration:e.id,installDeps:!1})).commit(!1)),r}var wr=le(require("node:fs"));async function ws(s,{pkgManager:e,spinner:t}){t.start(`Installing ${e} dependencies...`);let n=await s();return t.stop(`${n?"Installed":"Failed to install"} ${e} dependencies \u{1F4CB}`),n}function $u(s){let e=[];return s.length>0&&(e.push(`\u{1F4C4} ${_e("Relevant docs:")}`),s.forEach(t=>{e.push(` ${t}`)})),e.push(""),e.push(`\u{1F4AC} ${_e("Questions? Start the conversation at:")}`),e.push(" https://qwik.dev/chat"),e.push(" https://twitter.com/QwikDev"),e.push(""),e.join(`
|
|
103
|
+
`)}var _u=require("node:path");function xs(s,e,t){let n=process.cwd()===e.outDir,r=(0,_u.relative)(process.cwd(),e.outDir),o=[];n?o.push(`\u{1F984} ${Di(" Success! ")}`):o.push(`\u{1F984} ${Di(" Success! ")} ${_e("Project created in")} ${no(be(r))} ${_e("directory")}`),o.push("");let i=s!=="npm"?`${s} qwik add`:"npm run qwik add";o.push(`\u{1F90D} ${_e("Integrations? Add Netlify, Cloudflare, Tailwind...")}`),o.push(` ${i}`),o.push(""),o.push($u(e.docs)),o.push(`\u{1F440} ${_e("Presentations, Podcasts and Videos:")}`),o.push(" https://qwik.dev/media/"),o.push(""),o.push(`\u{1F430} ${_e("Next steps:")}`),n||o.push(` cd ${r}`),t||o.push(` ${s} install`),s==="deno"?o.push(" deno task start"):o.push(` ${s} start`),o.push(""),Gn(o.join(`
|
|
104
|
+
`),"Result"),hi("Happy coding! \u{1F389}")}var Qi=require("path"),Bu=le(require("node:os"));function vs(s){return s.startsWith("~/")?(0,Qi.resolve)(Bu.default.homedir(),s):(0,Qi.resolve)(process.cwd(),s)}var Is=require("assert");var uh={right:fh,center:Dh},ah=0,As=1,ch=2,Os=3,Zi=class{constructor(e){var t;this.width=e.width,this.wrap=(t=e.wrap)!==null&&t!==void 0?t:!0,this.rows=[]}span(...e){let t=this.div(...e);t.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]=="string")return this.applyLayoutDSL(e[0]);let t=e.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(t),t}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]=="string"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let t=e.split(`
|
|
105
|
+
`).map(r=>r.split(" ")),n=0;return t.forEach(r=>{r.length>1&&Be.stringWidth(r[0])>n&&(n=Math.min(Math.floor(this.width*.5),Be.stringWidth(r[0])))}),t.forEach(r=>{this.div(...r.map((o,i)=>({text:o.trim(),padding:this.measurePadding(o),width:i===0&&r.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let t=Be.stripAnsi(e);return[0,t.match(/\s*$/)[0].length,0,t.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(t=>{this.rowToString(t,e)}),e.filter(t=>!t.hidden).map(t=>t.text).join(`
|
|
106
|
+
`)}rowToString(e,t){return this.rasterize(e).forEach((n,r)=>{let o="";n.forEach((i,u)=>{let{width:c}=e[u],h=this.negatePadding(e[u]),D=i;if(h>Be.stringWidth(i)&&(D+=" ".repeat(h-Be.stringWidth(i))),e[u].align&&e[u].align!=="left"&&this.wrap){let d=uh[e[u].align];D=d(D,h),Be.stringWidth(D)<h&&(D+=" ".repeat((c||0)-Be.stringWidth(D)-1))}let l=e[u].padding||[0,0,0,0];l[Os]&&(o+=" ".repeat(l[Os])),o+=Nu(e[u],D,"| "),o+=D,o+=Nu(e[u],D," |"),l[As]&&(o+=" ".repeat(l[As])),r===0&&t.length>0&&(o=this.renderInline(o,t[t.length-1]))}),t.push({text:o.replace(/ +$/,""),span:e.span})}),t}renderInline(e,t){let n=e.match(/^ */),r=n?n[0].length:0,o=t.text,i=Be.stringWidth(o.trimRight());return t.span?this.wrap?r<i?e:(t.hidden=!0,o.trimRight()+" ".repeat(r-i)+e.trimLeft()):(t.hidden=!0,o+e):e}rasterize(e){let t=[],n=this.columnWidths(e),r;return e.forEach((o,i)=>{o.width=n[i],this.wrap?r=Be.wrap(o.text,this.negatePadding(o),{hard:!0}).split(`
|
|
103
107
|
`):r=o.text.split(`
|
|
104
|
-
`),o.border&&(r.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),r.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(r.unshift(...new Array(o.padding[
|
|
105
|
-
`),r+=n.charAt(o);return t&&i&&(r=`${t}${r}${i}`),r}function _i(n){return Ur(n,{stringWidth:e=>[...e].length,stripAnsi:Oi,wrap:Hr})}var St=require("path"),En=require("fs");function Gr(n,e){let t=(0,St.resolve)(".",n),i;for((0,En.statSync)(t).isDirectory()||(t=(0,St.dirname)(t));;){if(i=e(t,(0,En.readdirSync)(t)),i)return(0,St.resolve)(t,i);if(t=(0,St.dirname)(i=t),i===t)break}}var co=require("util"),lo=require("fs"),fo=require("url");var Zr=require("util"),An=require("path");function ot(n){if(n!==n.toLowerCase()&&n!==n.toUpperCase()||(n=n.toLowerCase()),n.indexOf("-")===-1&&n.indexOf("_")===-1)return n;{let t="",i=!1,r=n.match(/^-+/);for(let o=r?r[0].length:0;o<n.length;o++){let s=n.charAt(o);i&&(i=!1,s=s.toUpperCase()),o!==0&&(s==="-"||s==="_")?i=!0:s!=="-"&&s!=="_"&&(t+=s)}return t}}function yn(n,e){let t=n.toLowerCase();e=e||"-";let i="";for(let r=0;r<n.length;r++){let o=t.charAt(r),s=n.charAt(r);o!==s&&r>0?i+=`${e}${t.charAt(r)}`:i+=s}return i}function wn(n){return n==null?!1:typeof n=="number"||/^0x[0-9a-f]+$/i.test(n)?!0:/^0[^.]/.test(n)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(n)}function Yr(n){if(Array.isArray(n))return n.map(s=>typeof s!="string"?s+"":s);n=n.trim();let e=0,t=null,i=null,r=null,o=[];for(let s=0;s<n.length;s++){if(t=i,i=n.charAt(s),i===" "&&!r){t!==" "&&e++;continue}i===r?r=null:(i==="'"||i==='"')&&!r&&(r=i),o[e]||(o[e]=""),o[e]+=i}return o}var Be;(function(n){n.BOOLEAN="boolean",n.STRING="string",n.NUMBER="number",n.ARRAY="array"})(Be||(Be={}));var qe,xn=class{constructor(e){qe=e}parse(e,t){let i=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},t),r=Yr(e),o=typeof e=="string",s=za(Object.assign(Object.create(null),i.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},i.configuration),f=Object.assign(Object.create(null),i.default),D=i.configObjects||[],h=i.envPrefix,c=a["populate--"],p=c?"--":"_",C=Object.create(null),E=Object.create(null),b=i.__||qe.format,g={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},B=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,N=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(i.array||[]).filter(Boolean).forEach(function(l){let m=typeof l=="object"?l.key:l,y=Object.keys(l).map(function(F){return{boolean:"bools",string:"strings",number:"numbers"}[F]}).filter(Boolean).pop();y&&(g[y][m]=!0),g.arrays[m]=!0,g.keys.push(m)}),[].concat(i.boolean||[]).filter(Boolean).forEach(function(l){g.bools[l]=!0,g.keys.push(l)}),[].concat(i.string||[]).filter(Boolean).forEach(function(l){g.strings[l]=!0,g.keys.push(l)}),[].concat(i.number||[]).filter(Boolean).forEach(function(l){g.numbers[l]=!0,g.keys.push(l)}),[].concat(i.count||[]).filter(Boolean).forEach(function(l){g.counts[l]=!0,g.keys.push(l)}),[].concat(i.normalize||[]).filter(Boolean).forEach(function(l){g.normalize[l]=!0,g.keys.push(l)}),typeof i.narg=="object"&&Object.entries(i.narg).forEach(([l,m])=>{typeof m=="number"&&(g.nargs[l]=m,g.keys.push(l))}),typeof i.coerce=="object"&&Object.entries(i.coerce).forEach(([l,m])=>{typeof m=="function"&&(g.coercions[l]=m,g.keys.push(l))}),typeof i.config<"u"&&(Array.isArray(i.config)||typeof i.config=="string"?[].concat(i.config).filter(Boolean).forEach(function(l){g.configs[l]=!0}):typeof i.config=="object"&&Object.entries(i.config).forEach(([l,m])=>{(typeof m=="boolean"||typeof m=="function")&&(g.configs[l]=m)})),it(i.key,s,i.default,g.arrays),Object.keys(f).forEach(function(l){(g.aliases[l]||[]).forEach(function(m){f[m]=f[l]})});let U=null;Yt();let k=[],V=Object.assign(Object.create(null),{_:[]}),Ue={};for(let l=0;l<r.length;l++){let m=r[l],y=m.replace(/^-{3,}/,"---"),F,d,_,A,I,fe;if(m!=="--"&&/^-/.test(m)&&te(m))Ie(m);else if(y.match(/^---+(=|$)/)){Ie(m);continue}else if(m.match(/^--.+=/)||!a["short-option-groups"]&&m.match(/^-.+=/))A=m.match(/^--?([^=]+)=([\s\S]*)$/),A!==null&&Array.isArray(A)&&A.length>=3&&(M(A[1],g.arrays)?l=tt(l,A[1],r,A[2]):M(A[1],g.nargs)!==!1?l=Ft(l,A[1],r,A[2]):H(A[1],A[2],!0));else if(m.match(N)&&a["boolean-negation"])A=m.match(N),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],H(d,M(d,g.arrays)?[!1]:!1));else if(m.match(/^--.+/)||!a["short-option-groups"]&&m.match(/^-[^-]+/))A=m.match(/^--?(.+)/),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],M(d,g.arrays)?l=tt(l,d,r):M(d,g.nargs)!==!1?l=Ft(l,d,r):(I=r[l+1],I!==void 0&&(!I.match(/^-/)||I.match(B))&&!M(d,g.bools)&&!M(d,g.counts)||/^(true|false)$/.test(I)?(H(d,I),l++):H(d,ne(d))));else if(m.match(/^-.\..+=/))A=m.match(/^-([^=]+)=([\s\S]*)$/),A!==null&&Array.isArray(A)&&A.length>=3&&H(A[1],A[2]);else if(m.match(/^-.\..+/)&&!m.match(B))I=r[l+1],A=m.match(/^-(.\..+)/),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],I!==void 0&&!I.match(/^-/)&&!M(d,g.bools)&&!M(d,g.counts)?(H(d,I),l++):H(d,ne(d)));else if(m.match(/^-[^-]+/)&&!m.match(B)){_=m.slice(1,-1).split(""),F=!1;for(let me=0;me<_.length;me++){if(I=m.slice(me+2),_[me+1]&&_[me+1]==="="){fe=m.slice(me+3),d=_[me],M(d,g.arrays)?l=tt(l,d,r,fe):M(d,g.nargs)!==!1?l=Ft(l,d,r,fe):H(d,fe),F=!0;break}if(I==="-"){H(_[me],I);continue}if(/[A-Za-z]/.test(_[me])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(I)&&M(I,g.bools)===!1){H(_[me],I),F=!0;break}if(_[me+1]&&_[me+1].match(/\W/)){H(_[me],I),F=!0;break}else H(_[me],ne(_[me]))}d=m.slice(-1)[0],!F&&d!=="-"&&(M(d,g.arrays)?l=tt(l,d,r):M(d,g.nargs)!==!1?l=Ft(l,d,r):(I=r[l+1],I!==void 0&&(!/^(-|--)[^-]/.test(I)||I.match(B))&&!M(d,g.bools)&&!M(d,g.counts)||/^(true|false)$/.test(I)?(H(d,I),l++):H(d,ne(d))))}else if(m.match(/^-[0-9]$/)&&m.match(B)&&M(m.slice(1),g.bools))d=m.slice(1),H(d,ne(d));else if(m==="--"){k=r.slice(l+1);break}else if(a["halt-at-non-option"]){k=r.slice(l);break}else Ie(m)}z(V,!0),z(V,!1),R(V),ce(),Z(V,g.aliases,f,!0),le(V),a["set-placeholder-key"]&&nt(V),Object.keys(g.counts).forEach(function(l){Le(V,l.split("."))||H(l,0)}),c&&k.length&&(V[p]=[]),k.forEach(function(l){V[p].push(l)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(V).filter(l=>l!=="--"&&l.includes("-")).forEach(l=>{delete V[l]}),a["strip-aliased"]&&[].concat(...Object.keys(s).map(l=>s[l])).forEach(l=>{a["camel-case-expansion"]&&l.includes("-")&&delete V[l.split(".").map(m=>ot(m)).join(".")],delete V[l]});function Ie(l){let m=O("_",l);(typeof m=="string"||typeof m=="number")&&V._.push(m)}function Ft(l,m,y,F){let d,_=M(m,g.nargs);if(_=typeof _!="number"||isNaN(_)?1:_,_===0)return Me(F)||(U=Error(b("Argument unexpected for: %s",m))),H(m,ne(m)),l;let A=Me(F)?0:1;if(a["nargs-eats-options"])y.length-(l+1)+A<_&&(U=Error(b("Not enough arguments following: %s",m))),A=_;else{for(d=l+1;d<y.length&&(!y[d].match(/^-[^0-9]/)||y[d].match(B)||te(y[d]));d++)A++;A<_&&(U=Error(b("Not enough arguments following: %s",m)))}let I=Math.min(A,_);for(!Me(F)&&I>0&&(H(m,F),I--),d=l+1;d<I+l+1;d++)H(m,y[d]);return l+I}function tt(l,m,y,F){let d=[],_=F||y[l+1],A=M(m,g.nargs);if(M(m,g.bools)&&!/^(true|false)$/.test(_))d.push(!0);else if(Me(_)||Me(F)&&/^-/.test(_)&&!B.test(_)&&!te(_)){if(f[m]!==void 0){let I=f[m];d=Array.isArray(I)?I:[I]}}else{Me(F)||d.push(x(m,F,!0));for(let I=l+1;I<y.length&&!(!a["greedy-arrays"]&&d.length>0||A&&typeof A=="number"&&d.length>=A||(_=y[I],/^-/.test(_)&&!B.test(_)&&!te(_)));I++)l=I,d.push(x(m,_,o))}return typeof A=="number"&&(A&&d.length<A||isNaN(A)&&d.length===0)&&(U=Error(b("Not enough arguments following: %s",m))),H(m,d),l}function H(l,m,y=o){if(/-/.test(l)&&a["camel-case-expansion"]){let _=l.split(".").map(function(A){return ot(A)}).join(".");S(l,_)}let F=x(l,m,y),d=l.split(".");ke(V,d,F),g.aliases[l]&&g.aliases[l].forEach(function(_){let A=_.split(".");ke(V,A,F)}),d.length>1&&a["dot-notation"]&&(g.aliases[d[0]]||[]).forEach(function(_){let A=_.split("."),I=[].concat(d);I.shift(),A=A.concat(I),(g.aliases[l]||[]).includes(A.join("."))||ke(V,A,F)}),M(l,g.normalize)&&!M(l,g.arrays)&&[l].concat(g.aliases[l]||[]).forEach(function(A){Object.defineProperty(Ue,A,{enumerable:!0,get(){return m},set(I){m=typeof I=="string"?qe.normalize(I):I}})})}function S(l,m){g.aliases[l]&&g.aliases[l].length||(g.aliases[l]=[m],C[m]=!0),g.aliases[m]&&g.aliases[m].length||S(m,l)}function x(l,m,y){y&&(m=qa(m)),(M(l,g.bools)||M(l,g.counts))&&typeof m=="string"&&(m=m==="true");let F=Array.isArray(m)?m.map(function(d){return O(l,d)}):O(l,m);return M(l,g.counts)&&(Me(F)||typeof F=="boolean")&&(F=Si()),M(l,g.normalize)&&M(l,g.arrays)&&(Array.isArray(m)?F=m.map(d=>qe.normalize(d)):F=qe.normalize(m)),F}function O(l,m){return!a["parse-positional-numbers"]&&l==="_"||!M(l,g.strings)&&!M(l,g.bools)&&!Array.isArray(m)&&(wn(m)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${m}`)))||!Me(m)&&M(l,g.numbers))&&(m=Number(m)),m}function R(l){let m=Object.create(null);Z(m,g.aliases,f),Object.keys(g.configs).forEach(function(y){let F=l[y]||m[y];if(F)try{let d=null,_=qe.resolve(qe.cwd(),F),A=g.configs[y];if(typeof A=="function"){try{d=A(_)}catch(I){d=I}if(d instanceof Error){U=d;return}}else d=qe.require(_);q(d)}catch(d){d.name==="PermissionDenied"?U=d:l[y]&&(U=Error(b("Invalid JSON config file: %s",F)))}})}function q(l,m){Object.keys(l).forEach(function(y){let F=l[y],d=m?m+"."+y:y;typeof F=="object"&&F!==null&&!Array.isArray(F)&&a["dot-notation"]?q(F,d):(!Le(V,d.split("."))||M(d,g.arrays)&&a["combine-arrays"])&&H(d,F)})}function ce(){typeof D<"u"&&D.forEach(function(l){q(l)})}function z(l,m){if(typeof h>"u")return;let y=typeof h=="string"?h:"",F=qe.env();Object.keys(F).forEach(function(d){if(y===""||d.lastIndexOf(y,0)===0){let _=d.split("__").map(function(A,I){return I===0&&(A=A.substring(y.length)),ot(A)});(m&&g.configs[_.join(".")]||!m)&&!Le(l,_)&&H(_.join("."),F[d])}})}function le(l){let m,y=new Set;Object.keys(l).forEach(function(F){if(!y.has(F)&&(m=M(F,g.coercions),typeof m=="function"))try{let d=O(F,m(l[F]));[].concat(g.aliases[F]||[],F).forEach(_=>{y.add(_),l[_]=d})}catch(d){U=d}})}function nt(l){return g.keys.forEach(m=>{~m.indexOf(".")||typeof l[m]>"u"&&(l[m]=void 0)}),l}function Z(l,m,y,F=!1){Object.keys(y).forEach(function(d){Le(l,d.split("."))||(ke(l,d.split("."),y[d]),F&&(E[d]=!0),(m[d]||[]).forEach(function(_){Le(l,_.split("."))||ke(l,_.split("."),y[d])}))})}function Le(l,m){let y=l;a["dot-notation"]||(m=[m.join(".")]),m.slice(0,-1).forEach(function(d){y=y[d]||{}});let F=m[m.length-1];return typeof y!="object"?!1:F in y}function ke(l,m,y){let F=l;a["dot-notation"]||(m=[m.join(".")]),m.slice(0,-1).forEach(function(fe){fe=Jr(fe),typeof F=="object"&&F[fe]===void 0&&(F[fe]={}),typeof F[fe]!="object"||Array.isArray(F[fe])?(Array.isArray(F[fe])?F[fe].push({}):F[fe]=[F[fe],{}],F=F[fe][F[fe].length-1]):F=F[fe]});let d=Jr(m[m.length-1]),_=M(m.join("."),g.arrays),A=Array.isArray(y),I=a["duplicate-arguments-array"];!I&&M(d,g.nargs)&&(I=!0,(!Me(F[d])&&g.nargs[d]===1||Array.isArray(F[d])&&F[d].length===g.nargs[d])&&(F[d]=void 0)),y===Si()?F[d]=Si(F[d]):Array.isArray(F[d])?I&&_&&A?F[d]=a["flatten-duplicate-arrays"]?F[d].concat(y):(Array.isArray(F[d][0])?F[d]:[F[d]]).concat([y]):!I&&!!_==!!A?F[d]=y:F[d]=F[d].concat([y]):F[d]===void 0&&_?F[d]=A?y:[y]:I&&!(F[d]===void 0||M(d,g.counts)||M(d,g.bools))?F[d]=[F[d],y]:F[d]=y}function it(...l){l.forEach(function(m){Object.keys(m||{}).forEach(function(y){g.aliases[y]||(g.aliases[y]=[].concat(s[y]||[]),g.aliases[y].concat(y).forEach(function(F){if(/-/.test(F)&&a["camel-case-expansion"]){let d=ot(F);d!==y&&g.aliases[y].indexOf(d)===-1&&(g.aliases[y].push(d),C[d]=!0)}}),g.aliases[y].concat(y).forEach(function(F){if(F.length>1&&/[A-Z]/.test(F)&&a["camel-case-expansion"]){let d=yn(F,"-");d!==y&&g.aliases[y].indexOf(d)===-1&&(g.aliases[y].push(d),C[d]=!0)}}),g.aliases[y].forEach(function(F){g.aliases[F]=[y].concat(g.aliases[y].filter(function(d){return F!==d}))}))})})}function M(l,m){let y=[].concat(g.aliases[l]||[],l),F=Object.keys(m),d=y.find(_=>F.includes(_));return d?m[d]:!1}function zn(l){let m=Object.keys(g);return[].concat(m.map(F=>g[F])).some(function(F){return Array.isArray(F)?F.includes(l):F[l]})}function P(l,...m){return[].concat(...m).some(function(F){let d=l.match(F);return d&&zn(d[1])})}function K(l){if(l.match(B)||!l.match(/^-[^-]+/))return!1;let m=!0,y,F=l.slice(1).split("");for(let d=0;d<F.length;d++){if(y=l.slice(d+2),!zn(F[d])){m=!1;break}if(F[d+1]&&F[d+1]==="="||y==="-"||/[A-Za-z]/.test(F[d])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(y)||F[d+1]&&F[d+1].match(/\W/))break}return m}function te(l){return a["unknown-options-as-args"]&&L(l)}function L(l){return l=l.replace(/^-{3,}/,"--"),l.match(B)||K(l)?!1:!P(l,/^-+([^=]+?)=[\s\S]*$/,N,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function ne(l){return!M(l,g.bools)&&!M(l,g.counts)&&`${l}`in f?f[l]:re(Pe(l))}function re(l){return{[Be.BOOLEAN]:!0,[Be.STRING]:"",[Be.NUMBER]:void 0,[Be.ARRAY]:[]}[l]}function Pe(l){let m=Be.BOOLEAN;return M(l,g.strings)?m=Be.STRING:M(l,g.numbers)?m=Be.NUMBER:M(l,g.bools)?m=Be.BOOLEAN:M(l,g.arrays)&&(m=Be.ARRAY),m}function Me(l){return l===void 0}function Yt(){Object.keys(g.counts).find(l=>M(l,g.arrays)?(U=Error(b("Invalid configuration: %s, opts.count excludes opts.array.",l)),!0):M(l,g.nargs)?(U=Error(b("Invalid configuration: %s, opts.count excludes opts.narg.",l)),!0):!1)}return{aliases:Object.assign({},g.aliases),argv:Object.assign(Ue,V),configuration:a,defaulted:Object.assign({},E),error:U,newAliases:Object.assign({},C)}}};function za(n){let e=[],t=Object.create(null),i=!0;for(Object.keys(n).forEach(function(r){e.push([].concat(n[r],r))});i;){i=!1;for(let r=0;r<e.length;r++)for(let o=r+1;o<e.length;o++)if(e[r].filter(function(a){return e[o].indexOf(a)!==-1}).length){e[r]=e[r].concat(e[o]),e.splice(o,1),i=!0;break}}return e.forEach(function(r){r=r.filter(function(s,a,f){return f.indexOf(s)===a});let o=r.pop();o!==void 0&&typeof o=="string"&&(t[o]=r)}),t}function Si(n){return n!==void 0?n+1:1}function Jr(n){return n==="__proto__"?"___proto___":n}function qa(n){return typeof n=="string"&&(n[0]==="'"||n[0]==='"')&&n[n.length-1]===n[0]?n.substring(1,n.length-1):n}var Xr=require("fs");var ji,Ii,Pi,Kr=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,Qr=(Ii=(ji=process==null?void 0:process.versions)===null||ji===void 0?void 0:ji.node)!==null&&Ii!==void 0?Ii:(Pi=process==null?void 0:process.version)===null||Pi===void 0?void 0:Pi.slice(1);if(Qr&&Number(Qr.match(/^([^.]+)/)[1])<Kr)throw Error(`yargs parser supports a minimum Node.js version of ${Kr}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var Ua=process?process.env:{},eo=new xn({cwd:process.cwd,env:()=>Ua,format:Zr.format,normalize:An.normalize,resolve:An.resolve,require:n=>{if(typeof require<"u")return require(n);if(n.match(/\.json$/))return JSON.parse((0,Xr.readFileSync)(n,"utf8"));throw Error("only .json config files are supported in ESM")}}),qt=function(e,t){return eo.parse(e.slice(),t).argv};qt.detailed=function(n,e){return eo.parse(n.slice(),e)};qt.camelCase=ot;qt.decamelize=yn;qt.looksLikeNumber=wn;var to=qt;var Ne=require("path");function Va(){return Ha()?0:1}function Ha(){return Ga()&&!process.defaultApp}function Ga(){return!!process.versions.electron}function no(){return process.argv[Va()]}var Y=class n extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,n)}};var jt=require("fs"),io=require("util"),so=require("path"),ro={fs:{readFileSync:jt.readFileSync,writeFile:jt.writeFile},format:io.format,resolve:so.resolve,exists:n=>{try{return(0,jt.statSync)(n).isFile()}catch{return!1}}};var Te,Mi=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let t=e.shift(),i=function(){};return typeof e[e.length-1]=="function"&&(i=e.pop()),i=i||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]=t,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:i})):i(),Te.format.apply(Te.format,[this.cache[this.locale][t]||t].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),t=e.shift(),i=e.shift(),r=e.shift(),o=function(){};typeof e[e.length-1]=="function"&&(o=e.pop()),this.cache[this.locale]||this._readLocaleFile();let s=r===1?t:i;this.cache[this.locale][t]&&(s=this.cache[this.locale][t][r===1?"one":"other"]),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:i},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let a=[s];return~s.indexOf("%d")&&a.push(r),Te.format.apply(Te.format,a.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.cache[this.locale][t]=e[t])}_taggedLiteral(e,...t){let i="";return e.forEach(function(r,o){let s=t[o+1];i+=r,typeof s<"u"&&(i+="%s")}),this.__.apply(this,[i].concat([].slice.call(t,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,t=this.writeQueue[0],i=t.directory,r=t.locale,o=t.cb,s=this._resolveLocaleFile(i,r),a=JSON.stringify(this.cache[r],null,2);Te.fs.writeFile(s,a,"utf-8",function(f){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),o(f)})}_readLocaleFile(){let e={},t=this._resolveLocaleFile(this.directory,this.locale);try{Te.fs.readFileSync&&(e=JSON.parse(Te.fs.readFileSync(t,"utf-8")))}catch(i){if(i instanceof SyntaxError&&(i.message="syntax error in "+t),i.code==="ENOENT")e={};else throw i}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let i=Te.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(i)&&~t.lastIndexOf("_")){let r=Te.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(r)&&(i=r)}return i}_fileExistsSync(e){return Te.exists(e)}};function oo(n,e){Te=e;let t=new Mi(n);return{__:t.__.bind(t),__n:t.__n.bind(t),setLocale:t.setLocale.bind(t),getLocale:t.getLocale.bind(t),updateLocale:t.updateLocale.bind(t),locale:t.locale}}var Ya=n=>oo(n,ro),uo=Ya;var Qa={},Ja="require is not supported by ESM",ao="loading a directory of commands is not supported yet for ESM",Ut;try{Ut=(0,fo.fileURLToPath)(Qa.url)}catch{Ut=process.cwd()}var Ka=Ut.substring(0,Ut.lastIndexOf("node_modules")),Do={assert:{notStrictEqual:$n.notStrictEqual,strictEqual:$n.strictEqual},cliui:_i,findUp:Gr,getEnv:n=>process.env[n],inspect:co.inspect,getCallerFile:()=>{throw new Y(ao)},getProcessArgvBin:no,mainFilename:Ka||process.cwd(),Parser:to,path:{basename:Ne.basename,dirname:Ne.dirname,extname:Ne.extname,relative:Ne.relative,resolve:Ne.resolve},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(n,e)=>process.emitWarning(n,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:lo.readFileSync,require:()=>{throw new Y(Ja)},requireDirectory:()=>{throw new Y(ao)},stringWidth:n=>[...n].length,y18n:uo({directory:(0,Ne.resolve)(Ut,"../../../locales"),updateFiles:!1})};function Ce(n,e,t,i){t.assert.notStrictEqual(n,e,i)}function Ti(n,e){e.assert.strictEqual(typeof n,"string")}function It(n){return Object.keys(n)}function J(n){return!!n&&!!n.then&&typeof n.then=="function"}function Je(n){let t=n.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),i=/\.*[\][<>]/g,r=t.shift();if(!r)throw new Error(`No command found in: ${n}`);let o={cmd:r.replace(i,""),demanded:[],optional:[]};return t.forEach((s,a)=>{let f=!1;s=s.replace(/\s/g,""),/\.+[\]>]/.test(s)&&a===t.length-1&&(f=!0),/^\[/.test(s)?o.optional.push({cmd:s.replace(i,"").split("|"),variadic:f}):o.demanded.push({cmd:s.replace(i,"").split("|"),variadic:f})}),o}var Za=["first","second","third","fourth","fifth","sixth"];function $(n,e,t){function i(){return typeof n=="object"?[{demanded:[],optional:[]},n,e]:[Je(`cmd ${n}`),e,t]}try{let r=0,[o,s,a]=i(),f=[].slice.call(s);for(;f.length&&f[f.length-1]===void 0;)f.pop();let D=a||f.length;if(D<o.demanded.length)throw new Y(`Not enough arguments provided. Expected ${o.demanded.length} but received ${f.length}.`);let h=o.demanded.length+o.optional.length;if(D>h)throw new Y(`Too many arguments provided. Expected max ${h} but received ${D}.`);o.demanded.forEach(c=>{let p=f.shift(),C=ho(p);c.cmd.filter(b=>b===C||b==="*").length===0&&po(C,c.cmd,r),r+=1}),o.optional.forEach(c=>{if(f.length===0)return;let p=f.shift(),C=ho(p);c.cmd.filter(b=>b===C||b==="*").length===0&&po(C,c.cmd,r),r+=1})}catch(r){console.warn(r.stack)}}function ho(n){return Array.isArray(n)?"array":n===null?"null":typeof n}function po(n,e,t){throw new Y(`Invalid ${Za[t]||"manyith"} argument. Expected ${e.join(" or ")} but received ${n}.`)}var vn=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,t,i=!0,r=!1){if($("<array|function> [boolean] [boolean] [boolean]",[e,t,i],arguments.length),Array.isArray(e)){for(let o=0;o<e.length;o++){if(typeof e[o]!="function")throw Error("middleware must be a function");let s=e[o];s.applyBeforeValidation=t,s.global=i}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){let o=e;o.applyBeforeValidation=t,o.global=i,o.mutates=r,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,t){let i=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(r=>{let o=[...i[t]||[],t];return r.option?!o.includes(r.option):!0}),e.option=t,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function mo(n){return n?n.map(e=>(e.applyBeforeValidation=!1,e)):[]}function ut(n,e,t,i){return t.reduce((r,o)=>{if(o.applyBeforeValidation!==i)return r;if(o.mutates){if(o.applied)return r;o.applied=!0}if(J(r))return r.then(s=>Promise.all([s,o(s,e)])).then(([s,a])=>Object.assign(s,a));{let s=o(r,e);return J(s)?s.then(a=>Object.assign(r,a)):Object.assign(r,s)}},n)}function at(n,e,t=i=>{throw i}){try{let i=Xa(n)?n():n;return J(i)?i.then(r=>e(r)):e(i)}catch(i){return t(i)}}function Xa(n){return typeof n=="function"}function Ni(n){if(typeof require>"u")return null;for(let e=0,t=Object.keys(require.cache),i;e<t.length;e++)if(i=require.cache[t[e]],i.exports===n)return i;return null}var Pt=/(^\*)|(^\$0)/,Wi=class{constructor(e,t,i,r){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=r,this.usage=e,this.globalMiddleware=i,this.validation=t}addDirectory(e,t,i,r){r=r||{},typeof r.recurse!="boolean"&&(r.recurse=!1),Array.isArray(r.extensions)||(r.extensions=["js"]);let o=typeof r.visit=="function"?r.visit:s=>s;r.visit=(s,a,f)=>{let D=o(s,a,f);if(D){if(this.requireCache.has(a))return D;this.requireCache.add(a),this.addHandler(D)}return D},this.shim.requireDirectory({require:t,filename:i},e,r)}addHandler(e,t,i,r,o,s){let a=[],f=mo(o);if(r=r||(()=>{}),Array.isArray(e))if(ec(e))[e,...a]=e;else for(let D of e)this.addHandler(D);else if(nc(e)){let D=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(D=[].concat(D).concat(e.aliases)),this.addHandler(D,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(go(i)){this.addHandler([e].concat(a),t,i.builder,i.handler,i.middlewares,i.deprecated);return}if(typeof e=="string"){let D=Je(e);a=a.map(p=>Je(p).cmd);let h=!1,c=[D.cmd].concat(a).filter(p=>Pt.test(p)?(h=!0,!1):!0);c.length===0&&h&&c.push("$0"),h&&(D.cmd=c[0],a=c.slice(1),e=e.replace(Pt,D.cmd)),a.forEach(p=>{this.aliasMap[p]=D.cmd}),t!==!1&&this.usage.command(e,t,h,a,s),this.handlers[D.cmd]={original:e,description:t,handler:r,builder:i||{},middlewares:f,deprecated:s,demanded:D.demanded,optional:D.optional},h&&(this.defaultCommand=this.handlers[D.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,t,i,r,o,s){let a=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,f=t.getInternalMethods().getContext(),D=f.commands.slice(),h=!e;e&&(f.commands.push(e),f.fullCommands.push(a.original));let c=this.applyBuilderUpdateUsageAndParse(h,a,t,i.aliases,D,r,o,s);return J(c)?c.then(p=>this.applyMiddlewareAndGetResult(h,a,p.innerArgv,f,o,p.aliases,t)):this.applyMiddlewareAndGetResult(h,a,c.innerArgv,f,o,c.aliases,t)}applyBuilderUpdateUsageAndParse(e,t,i,r,o,s,a,f){let D=t.builder,h=i;if(Bn(D)){i.getInternalMethods().getUsageInstance().freeze();let c=D(i.getInternalMethods().reset(r),f);if(J(c))return c.then(p=>(h=Fo(p)?p:i,this.parseAndUpdateUsage(e,t,h,o,s,a)))}else tc(D)&&(i.getInternalMethods().getUsageInstance().freeze(),h=i.getInternalMethods().reset(r),Object.keys(t.builder).forEach(c=>{h.option(c,D[c])}));return this.parseAndUpdateUsage(e,t,h,o,s,a)}parseAndUpdateUsage(e,t,i,r,o,s){e&&i.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(i)&&i.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(r,t),t.description);let a=i.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,o,s);return J(a)?a.then(f=>({aliases:i.parsed.aliases,innerArgv:f})):{aliases:i.parsed.aliases,innerArgv:a}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,t){let i=Pt.test(t.original)?t.original.replace(Pt,"").trim():t.original,r=e.filter(o=>!Pt.test(o));return r.push(i),`$0 ${r.join(" ")}`}handleValidationAndGetResult(e,t,i,r,o,s,a,f){if(!s.getInternalMethods().getHasOutput()){let D=s.getInternalMethods().runValidation(o,f,s.parsed.error,e);i=at(i,h=>(D(h),h))}if(t.handler&&!s.getInternalMethods().getHasOutput()){s.getInternalMethods().setHasOutput();let D=!!s.getOptions().configuration["populate--"];s.getInternalMethods().postProcess(i,D,!1,!1),i=ut(i,s,a,!1),i=at(i,h=>{let c=t.handler(h);return J(c)?c.then(()=>h):h}),e||s.getInternalMethods().getUsageInstance().cacheHelpMessage(),J(i)&&!s.getInternalMethods().hasParseCallback()&&i.catch(h=>{try{s.getInternalMethods().getUsageInstance().fail(null,h)}catch{}})}return e||(r.commands.pop(),r.fullCommands.pop()),i}applyMiddlewareAndGetResult(e,t,i,r,o,s,a){let f={};if(o)return i;a.getInternalMethods().getHasOutput()||(f=this.populatePositionals(t,i,r,a));let D=this.globalMiddleware.getMiddleware().slice(0).concat(t.middlewares),h=ut(i,a,D,!0);return J(h)?h.then(c=>this.handleValidationAndGetResult(e,t,c,r,s,a,D,f)):this.handleValidationAndGetResult(e,t,h,r,s,a,D,f)}populatePositionals(e,t,i,r){t._=t._.slice(i.commands.length);let o=e.demanded.slice(0),s=e.optional.slice(0),a={};for(this.validation.positionalCount(o.length,t._.length);o.length;){let f=o.shift();this.populatePositional(f,t,a)}for(;s.length;){let f=s.shift();this.populatePositional(f,t,a)}return t._=i.commands.concat(t._.map(f=>""+f)),this.postProcessPositionals(t,a,this.cmdToParseOptions(e.original),r),a}populatePositional(e,t,i){let r=e.cmd[0];e.variadic?i[r]=t._.splice(0).map(String):t._.length&&(i[r]=[String(t._.shift())])}cmdToParseOptions(e){let t={array:[],default:{},alias:{},demand:{}},i=Je(e);return i.demanded.forEach(r=>{let[o,...s]=r.cmd;r.variadic&&(t.array.push(o),t.default[o]=[]),t.alias[o]=s,t.demand[o]=!0}),i.optional.forEach(r=>{let[o,...s]=r.cmd;r.variadic&&(t.array.push(o),t.default[o]=[]),t.alias[o]=s}),t}postProcessPositionals(e,t,i,r){let o=Object.assign({},r.getOptions());o.default=Object.assign(i.default,o.default);for(let D of Object.keys(i.alias))o.alias[D]=(o.alias[D]||[]).concat(i.alias[D]);o.array=o.array.concat(i.array),o.config={};let s=[];if(Object.keys(t).forEach(D=>{t[D].map(h=>{o.configuration["unknown-options-as-args"]&&(o.key[D]=!0),s.push(`--${D}`),s.push(h)})}),!s.length)return;let a=Object.assign({},o.configuration,{"populate--":!1}),f=this.shim.Parser.detailed(s,Object.assign({},o,{configuration:a}));if(f.error)r.getInternalMethods().getUsageInstance().fail(f.error.message,f.error);else{let D=Object.keys(t);Object.keys(t).forEach(h=>{D.push(...f.aliases[h])}),Object.keys(f.argv).forEach(h=>{D.includes(h)&&(t[h]||(t[h]=f.argv[h]),!this.isInConfigs(r,h)&&!this.isDefaulted(r,h)&&Object.prototype.hasOwnProperty.call(e,h)&&Object.prototype.hasOwnProperty.call(f.argv,h)&&(Array.isArray(e[h])||Array.isArray(f.argv[h]))?e[h]=[].concat(e[h],f.argv[h]):e[h]=f.argv[h])})}}isDefaulted(e,t){let{default:i}=e.getOptions();return Object.prototype.hasOwnProperty.call(i,t)||Object.prototype.hasOwnProperty.call(i,this.shim.Parser.camelCase(t))}isInConfigs(e,t){let{configObjects:i}=e.getOptions();return i.some(r=>Object.prototype.hasOwnProperty.call(r,t))||i.some(r=>Object.prototype.hasOwnProperty.call(r,this.shim.Parser.camelCase(t)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let i=Pt.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(i,this.defaultCommand.description)}let t=this.defaultCommand.builder;if(Bn(t))return t(e,!0);go(t)||Object.keys(t).forEach(i=>{e.option(i,t[i])})}moduleName(e){let t=Ni(e);if(!t)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(t.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:t,desc:i}){for(let r of[e,t,i]){if(typeof r=="string"||r===!1)return r;Ce(r,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();Ce(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function Co(n,e,t,i){return new Wi(n,e,t,i)}function go(n){return typeof n=="object"&&!!n.builder&&typeof n.handler=="function"}function ec(n){return n.every(e=>typeof e=="string")}function Bn(n){return typeof n=="function"}function tc(n){return typeof n=="object"}function nc(n){return typeof n=="object"&&!Array.isArray(n)}function Ke(n={},e=()=>!0){let t={};return It(n).forEach(i=>{e(i,n[i])&&(t[i]=n[i])}),t}function Qe(n){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let t=e;t._handle&&t.isTTY&&typeof t._handle.setBlocking=="function"&&t._handle.setBlocking(n)})}function ic(n){return typeof n=="boolean"}function Eo(n,e){let t=e.y18n.__,i={},r=[];i.failFn=function(x){r.push(x)};let o=null,s=null,a=!0;i.showHelpOnFail=function(x=!0,O){let[R,q]=typeof x=="string"?[!0,x]:[x,O];return n.getInternalMethods().isGlobalContext()&&(s=q),o=q,a=R,i};let f=!1;i.fail=function(x,O){let R=n.getInternalMethods().getLoggerInstance();if(r.length)for(let q=r.length-1;q>=0;--q){let ce=r[q];if(ic(ce)){if(O)throw O;if(x)throw Error(x)}else ce(x,O,i)}else{if(n.getExitProcess()&&Qe(!0),!f){f=!0,a&&(n.showHelp("error"),R.error()),(x||O)&&R.error(x||O);let q=o||s;q&&((x||O)&&R.error(""),R.error(q))}if(O=O||new Y(x),n.getExitProcess())return n.exit(1);if(n.getInternalMethods().hasParseCallback())return n.exit(1,O);throw O}};let D=[],h=!1;i.usage=(S,x)=>S===null?(h=!0,D=[],i):(h=!1,D.push([S,x||""]),i),i.getUsage=()=>D,i.getUsageDisabled=()=>h,i.getPositionalGroupName=()=>t("Positionals:");let c=[];i.example=(S,x)=>{c.push([S,x||""])};let p=[];i.command=function(x,O,R,q,ce=!1){R&&(p=p.map(z=>(z[2]=!1,z))),p.push([x,O||"",R,q,ce])},i.getCommands=()=>p;let C={};i.describe=function(x,O){Array.isArray(x)?x.forEach(R=>{i.describe(R,O)}):typeof x=="object"?Object.keys(x).forEach(R=>{i.describe(R,x[R])}):C[x]=O},i.getDescriptions=()=>C;let E=[];i.epilog=S=>{E.push(S)};let b=!1,g;i.wrap=S=>{b=!0,g=S},i.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(b||(g=Ft(),b=!0),g);let B="__yargsString__:";i.deferY18nLookup=S=>B+S,i.help=function(){if(k)return k;U();let x=n.customScriptName?n.$0:e.path.basename(n.$0),O=n.getDemandedOptions(),R=n.getDemandedCommands(),q=n.getDeprecatedOptions(),ce=n.getGroups(),z=n.getOptions(),le=[];le=le.concat(Object.keys(C)),le=le.concat(Object.keys(O)),le=le.concat(Object.keys(R)),le=le.concat(Object.keys(z.default)),le=le.filter(Ue),le=Object.keys(le.reduce((P,K)=>(K!=="_"&&(P[K]=!0),P),{}));let nt=i.getWrap(),Z=e.cliui({width:nt,wrap:!!nt});if(!h){if(D.length)D.forEach(P=>{Z.div({text:`${P[0].replace(/\$0/g,x)}`}),P[1]&&Z.div({text:`${P[1]}`,padding:[1,0,0,0]})}),Z.div();else if(p.length){let P=null;R._?P=`${x} <${t("command")}>
|
|
106
|
-
`:
|
|
107
|
-
`,
|
|
108
|
-
`);
|
|
109
|
-
`)}return
|
|
108
|
+
`),o.border&&(r.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),r.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(r.unshift(...new Array(o.padding[ah]||0).fill("")),r.push(...new Array(o.padding[ch]||0).fill(""))),r.forEach((u,c)=>{t[c]||t.push([]);let h=t[c];for(let D=0;D<i;D++)h[D]===void 0&&h.push("");h.push(u)})}),t}negatePadding(e){let t=e.width||0;return e.padding&&(t-=(e.padding[Os]||0)+(e.padding[As]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map(i=>i.width||Be.stringWidth(i.text));let t=e.length,n=this.width,r=e.map(i=>{if(i.width)return t--,n-=i.width,i.width}),o=t?Math.floor(n/t):0;return r.map((i,u)=>i===void 0?Math.max(o,lh(e[u])):i)}};function Nu(s,e,t){return s.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?t:" ":""}function lh(s){let e=s.padding||[],t=1+(e[Os]||0)+(e[As]||0);return s.border?t+4:t}function hh(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function fh(s,e){s=s.trim();let t=Be.stringWidth(s);return t<e?" ".repeat(e-t)+s:s}function Dh(s,e){s=s.trim();let t=Be.stringWidth(s);return t>=e?s:" ".repeat(e-t>>1)+s}var Be;function Iu(s,e){return Be=e,new Zi({width:(s==null?void 0:s.width)||hh(),wrap:s==null?void 0:s.wrap})}var Su=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function Xi(s){return s.replace(Su,"")}function ku(s,e){let[t,n]=s.match(Su)||["",""];s=Xi(s);let r="";for(let o=0;o<s.length;o++)o!==0&&o%e===0&&(r+=`
|
|
109
|
+
`),r+=s.charAt(o);return t&&n&&(r=`${t}${r}${n}`),r}function er(s){return Iu(s,{stringWidth:e=>[...e].length,stripAnsi:Xi,wrap:ku})}var an=require("path"),Ts=require("fs");function ju(s,e){let t=(0,an.resolve)(".",s),n;for((0,Ts.statSync)(t).isDirectory()||(t=(0,an.dirname)(t));;){if(n=e(t,(0,Ts.readdirSync)(t)),n)return(0,an.resolve)(t,n);if(t=(0,an.dirname)(n=t),n===t)break}}var Zu=require("util"),Xu=require("fs"),ea=require("url");var Lu=require("util"),Ns=require("path");function $t(s){if(s!==s.toLowerCase()&&s!==s.toUpperCase()||(s=s.toLowerCase()),s.indexOf("-")===-1&&s.indexOf("_")===-1)return s;{let t="",n=!1,r=s.match(/^-+/);for(let o=r?r[0].length:0;o<s.length;o++){let i=s.charAt(o);n&&(n=!1,i=i.toUpperCase()),o!==0&&(i==="-"||i==="_")?n=!0:i!=="-"&&i!=="_"&&(t+=i)}return t}}function $s(s,e){let t=s.toLowerCase();e=e||"-";let n="";for(let r=0;r<s.length;r++){let o=t.charAt(r),i=s.charAt(r);o!==i&&r>0?n+=`${e}${t.charAt(r)}`:n+=i}return n}function _s(s){return s==null?!1:typeof s=="number"||/^0x[0-9a-f]+$/i.test(s)?!0:/^0[^.]/.test(s)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(s)}function Mu(s){if(Array.isArray(s))return s.map(i=>typeof i!="string"?i+"":i);s=s.trim();let e=0,t=null,n=null,r=null,o=[];for(let i=0;i<s.length;i++){if(t=n,n=s.charAt(i),n===" "&&!r){t!==" "&&e++;continue}n===r?r=null:(n==="'"||n==='"')&&!r&&(r=n),o[e]||(o[e]=""),o[e]+=n}return o}var Je;(function(s){s.BOOLEAN="boolean",s.STRING="string",s.NUMBER="number",s.ARRAY="array"})(Je||(Je={}));var rt,Bs=class{constructor(e){rt=e}parse(e,t){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},t),r=Mu(e),o=typeof e=="string",i=ph(Object.assign(Object.create(null),n.alias)),u=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),c=Object.assign(Object.create(null),n.default),h=n.configObjects||[],D=n.envPrefix,l=u["populate--"],d=l?"--":"_",C=Object.create(null),F=Object.create(null),y=n.__||rt.format,p={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},I=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,x=new RegExp("^--"+u["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(f){let g=typeof f=="object"?f.key:f,b=Object.keys(f).map(function(E){return{boolean:"bools",string:"strings",number:"numbers"}[E]}).filter(Boolean).pop();b&&(p[b][g]=!0),p.arrays[g]=!0,p.keys.push(g)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(f){p.bools[f]=!0,p.keys.push(f)}),[].concat(n.string||[]).filter(Boolean).forEach(function(f){p.strings[f]=!0,p.keys.push(f)}),[].concat(n.number||[]).filter(Boolean).forEach(function(f){p.numbers[f]=!0,p.keys.push(f)}),[].concat(n.count||[]).filter(Boolean).forEach(function(f){p.counts[f]=!0,p.keys.push(f)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(f){p.normalize[f]=!0,p.keys.push(f)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([f,g])=>{typeof g=="number"&&(p.nargs[f]=g,p.keys.push(f))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([f,g])=>{typeof g=="function"&&(p.coercions[f]=g,p.keys.push(f))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(f){p.configs[f]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([f,g])=>{(typeof g=="boolean"||typeof g=="function")&&(p.configs[f]=g)})),bt(n.key,i,n.default,p.arrays),Object.keys(c).forEach(function(f){(p.aliases[f]||[]).forEach(function(g){c[g]=c[f]})});let k=null;$n();let O=[],G=Object.assign(Object.create(null),{_:[]}),Oe={};for(let f=0;f<r.length;f++){let g=r[f],b=g.replace(/^-{3,}/,"---"),E,m,B,A,j,de;if(g!=="--"&&/^-/.test(g)&&ne(g))ae(g);else if(b.match(/^---+(=|$)/)){ae(g);continue}else if(g.match(/^--.+=/)||!u["short-option-groups"]&&g.match(/^-.+=/))A=g.match(/^--?([^=]+)=([\s\S]*)$/),A!==null&&Array.isArray(A)&&A.length>=3&&(P(A[1],p.arrays)?f=Ge(f,A[1],r,A[2]):P(A[1],p.nargs)!==!1?f=Te(f,A[1],r,A[2]):V(A[1],A[2],!0));else if(g.match(x)&&u["boolean-negation"])A=g.match(x),A!==null&&Array.isArray(A)&&A.length>=2&&(m=A[1],V(m,P(m,p.arrays)?[!1]:!1));else if(g.match(/^--.+/)||!u["short-option-groups"]&&g.match(/^-[^-]+/))A=g.match(/^--?(.+)/),A!==null&&Array.isArray(A)&&A.length>=2&&(m=A[1],P(m,p.arrays)?f=Ge(f,m,r):P(m,p.nargs)!==!1?f=Te(f,m,r):(j=r[f+1],j!==void 0&&(!j.match(/^-/)||j.match(I))&&!P(m,p.bools)&&!P(m,p.counts)||/^(true|false)$/.test(j)?(V(m,j),f++):V(m,se(m))));else if(g.match(/^-.\..+=/))A=g.match(/^-([^=]+)=([\s\S]*)$/),A!==null&&Array.isArray(A)&&A.length>=3&&V(A[1],A[2]);else if(g.match(/^-.\..+/)&&!g.match(I))j=r[f+1],A=g.match(/^-(.\..+)/),A!==null&&Array.isArray(A)&&A.length>=2&&(m=A[1],j!==void 0&&!j.match(/^-/)&&!P(m,p.bools)&&!P(m,p.counts)?(V(m,j),f++):V(m,se(m)));else if(g.match(/^-[^-]+/)&&!g.match(I)){B=g.slice(1,-1).split(""),E=!1;for(let Fe=0;Fe<B.length;Fe++){if(j=g.slice(Fe+2),B[Fe+1]&&B[Fe+1]==="="){de=g.slice(Fe+3),m=B[Fe],P(m,p.arrays)?f=Ge(f,m,r,de):P(m,p.nargs)!==!1?f=Te(f,m,r,de):V(m,de),E=!0;break}if(j==="-"){V(B[Fe],j);continue}if(/[A-Za-z]/.test(B[Fe])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(j)&&P(j,p.bools)===!1){V(B[Fe],j),E=!0;break}if(B[Fe+1]&&B[Fe+1].match(/\W/)){V(B[Fe],j),E=!0;break}else V(B[Fe],se(B[Fe]))}m=g.slice(-1)[0],!E&&m!=="-"&&(P(m,p.arrays)?f=Ge(f,m,r):P(m,p.nargs)!==!1?f=Te(f,m,r):(j=r[f+1],j!==void 0&&(!/^(-|--)[^-]/.test(j)||j.match(I))&&!P(m,p.bools)&&!P(m,p.counts)||/^(true|false)$/.test(j)?(V(m,j),f++):V(m,se(m))))}else if(g.match(/^-[0-9]$/)&&g.match(I)&&P(g.slice(1),p.bools))m=g.slice(1),V(m,se(m));else if(g==="--"){O=r.slice(f+1);break}else if(u["halt-at-non-option"]){O=r.slice(f);break}else ae(g)}H(G,!0),H(G,!1),L(G),De(),ee(G,p.aliases,c,!0),pe(G),u["set-placeholder-key"]&&Ft(G),Object.keys(p.counts).forEach(function(f){nt(G,f.split("."))||V(f,0)}),l&&O.length&&(G[d]=[]),O.forEach(function(f){G[d].push(f)}),u["camel-case-expansion"]&&u["strip-dashed"]&&Object.keys(G).filter(f=>f!=="--"&&f.includes("-")).forEach(f=>{delete G[f]}),u["strip-aliased"]&&[].concat(...Object.keys(i).map(f=>i[f])).forEach(f=>{u["camel-case-expansion"]&&f.includes("-")&&delete G[f.split(".").map(g=>$t(g)).join(".")],delete G[f]});function ae(f){let g=_("_",f);(typeof g=="string"||typeof g=="number")&&G._.push(g)}function Te(f,g,b,E){let m,B=P(g,p.nargs);if(B=typeof B!="number"||isNaN(B)?1:B,B===0)return Ue(E)||(k=Error(y("Argument unexpected for: %s",g))),V(g,se(g)),f;let A=Ue(E)?0:1;if(u["nargs-eats-options"])b.length-(f+1)+A<B&&(k=Error(y("Not enough arguments following: %s",g))),A=B;else{for(m=f+1;m<b.length&&(!b[m].match(/^-[^0-9]/)||b[m].match(I)||ne(b[m]));m++)A++;A<B&&(k=Error(y("Not enough arguments following: %s",g)))}let j=Math.min(A,B);for(!Ue(E)&&j>0&&(V(g,E),j--),m=f+1;m<j+f+1;m++)V(g,b[m]);return f+j}function Ge(f,g,b,E){let m=[],B=E||b[f+1],A=P(g,p.nargs);if(P(g,p.bools)&&!/^(true|false)$/.test(B))m.push(!0);else if(Ue(B)||Ue(E)&&/^-/.test(B)&&!I.test(B)&&!ne(B)){if(c[g]!==void 0){let j=c[g];m=Array.isArray(j)?j:[j]}}else{Ue(E)||m.push(v(g,E,!0));for(let j=f+1;j<b.length&&!(!u["greedy-arrays"]&&m.length>0||A&&typeof A=="number"&&m.length>=A||(B=b[j],/^-/.test(B)&&!I.test(B)&&!ne(B)));j++)f=j,m.push(v(g,B,o))}return typeof A=="number"&&(A&&m.length<A||isNaN(A)&&m.length===0)&&(k=Error(y("Not enough arguments following: %s",g))),V(g,m),f}function V(f,g,b=o){if(/-/.test(f)&&u["camel-case-expansion"]){let B=f.split(".").map(function(A){return $t(A)}).join(".");N(f,B)}let E=v(f,g,b),m=f.split(".");st(G,m,E),p.aliases[f]&&p.aliases[f].forEach(function(B){let A=B.split(".");st(G,A,E)}),m.length>1&&u["dot-notation"]&&(p.aliases[m[0]]||[]).forEach(function(B){let A=B.split("."),j=[].concat(m);j.shift(),A=A.concat(j),(p.aliases[f]||[]).includes(A.join("."))||st(G,A,E)}),P(f,p.normalize)&&!P(f,p.arrays)&&[f].concat(p.aliases[f]||[]).forEach(function(A){Object.defineProperty(Oe,A,{enumerable:!0,get(){return g},set(j){g=typeof j=="string"?rt.normalize(j):j}})})}function N(f,g){p.aliases[f]&&p.aliases[f].length||(p.aliases[f]=[g],C[g]=!0),p.aliases[g]&&p.aliases[g].length||N(g,f)}function v(f,g,b){b&&(g=dh(g)),(P(f,p.bools)||P(f,p.counts))&&typeof g=="string"&&(g=g==="true");let E=Array.isArray(g)?g.map(function(m){return _(f,m)}):_(f,g);return P(f,p.counts)&&(Ue(E)||typeof E=="boolean")&&(E=tr()),P(f,p.normalize)&&P(f,p.arrays)&&(Array.isArray(g)?E=g.map(m=>rt.normalize(m)):E=rt.normalize(g)),E}function _(f,g){return!u["parse-positional-numbers"]&&f==="_"||!P(f,p.strings)&&!P(f,p.bools)&&!Array.isArray(g)&&(_s(g)&&u["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${g}`)))||!Ue(g)&&P(f,p.numbers))&&(g=Number(g)),g}function L(f){let g=Object.create(null);ee(g,p.aliases,c),Object.keys(p.configs).forEach(function(b){let E=f[b]||g[b];if(E)try{let m=null,B=rt.resolve(rt.cwd(),E),A=p.configs[b];if(typeof A=="function"){try{m=A(B)}catch(j){m=j}if(m instanceof Error){k=m;return}}else m=rt.require(B);U(m)}catch(m){m.name==="PermissionDenied"?k=m:f[b]&&(k=Error(y("Invalid JSON config file: %s",E)))}})}function U(f,g){Object.keys(f).forEach(function(b){let E=f[b],m=g?g+"."+b:b;typeof E=="object"&&E!==null&&!Array.isArray(E)&&u["dot-notation"]?U(E,m):(!nt(G,m.split("."))||P(m,p.arrays)&&u["combine-arrays"])&&V(m,E)})}function De(){typeof h<"u"&&h.forEach(function(f){U(f)})}function H(f,g){if(typeof D>"u")return;let b=typeof D=="string"?D:"",E=rt.env();Object.keys(E).forEach(function(m){if(b===""||m.lastIndexOf(b,0)===0){let B=m.split("__").map(function(A,j){return j===0&&(A=A.substring(b.length)),$t(A)});(g&&p.configs[B.join(".")]||!g)&&!nt(f,B)&&V(B.join("."),E[m])}})}function pe(f){let g,b=new Set;Object.keys(f).forEach(function(E){if(!b.has(E)&&(g=P(E,p.coercions),typeof g=="function"))try{let m=_(E,g(f[E]));[].concat(p.aliases[E]||[],E).forEach(B=>{b.add(B),f[B]=m})}catch(m){k=m}})}function Ft(f){return p.keys.forEach(g=>{~g.indexOf(".")||typeof f[g]>"u"&&(f[g]=void 0)}),f}function ee(f,g,b,E=!1){Object.keys(b).forEach(function(m){nt(f,m.split("."))||(st(f,m.split("."),b[m]),E&&(F[m]=!0),(g[m]||[]).forEach(function(B){nt(f,B.split("."))||st(f,B.split("."),b[m])}))})}function nt(f,g){let b=f;u["dot-notation"]||(g=[g.join(".")]),g.slice(0,-1).forEach(function(m){b=b[m]||{}});let E=g[g.length-1];return typeof b!="object"?!1:E in b}function st(f,g,b){let E=f;u["dot-notation"]||(g=[g.join(".")]),g.slice(0,-1).forEach(function(de){de=Pu(de),typeof E=="object"&&E[de]===void 0&&(E[de]={}),typeof E[de]!="object"||Array.isArray(E[de])?(Array.isArray(E[de])?E[de].push({}):E[de]=[E[de],{}],E=E[de][E[de].length-1]):E=E[de]});let m=Pu(g[g.length-1]),B=P(g.join("."),p.arrays),A=Array.isArray(b),j=u["duplicate-arguments-array"];!j&&P(m,p.nargs)&&(j=!0,(!Ue(E[m])&&p.nargs[m]===1||Array.isArray(E[m])&&E[m].length===p.nargs[m])&&(E[m]=void 0)),b===tr()?E[m]=tr(E[m]):Array.isArray(E[m])?j&&B&&A?E[m]=u["flatten-duplicate-arrays"]?E[m].concat(b):(Array.isArray(E[m][0])?E[m]:[E[m]]).concat([b]):!j&&!!B==!!A?E[m]=b:E[m]=E[m].concat([b]):E[m]===void 0&&B?E[m]=A?b:[b]:j&&!(E[m]===void 0||P(m,p.counts)||P(m,p.bools))?E[m]=[E[m],b]:E[m]=b}function bt(...f){f.forEach(function(g){Object.keys(g||{}).forEach(function(b){p.aliases[b]||(p.aliases[b]=[].concat(i[b]||[]),p.aliases[b].concat(b).forEach(function(E){if(/-/.test(E)&&u["camel-case-expansion"]){let m=$t(E);m!==b&&p.aliases[b].indexOf(m)===-1&&(p.aliases[b].push(m),C[m]=!0)}}),p.aliases[b].concat(b).forEach(function(E){if(E.length>1&&/[A-Z]/.test(E)&&u["camel-case-expansion"]){let m=$s(E,"-");m!==b&&p.aliases[b].indexOf(m)===-1&&(p.aliases[b].push(m),C[m]=!0)}}),p.aliases[b].forEach(function(E){p.aliases[E]=[b].concat(p.aliases[b].filter(function(m){return E!==m}))}))})})}function P(f,g){let b=[].concat(p.aliases[f]||[],f),E=Object.keys(g),m=b.find(B=>E.includes(B));return m?g[m]:!1}function Ys(f){let g=Object.keys(p);return[].concat(g.map(E=>p[E])).some(function(E){return Array.isArray(E)?E.includes(f):E[f]})}function M(f,...g){return[].concat(...g).some(function(E){let m=f.match(E);return m&&Ys(m[1])})}function Z(f){if(f.match(I)||!f.match(/^-[^-]+/))return!1;let g=!0,b,E=f.slice(1).split("");for(let m=0;m<E.length;m++){if(b=f.slice(m+2),!Ys(E[m])){g=!1;break}if(E[m+1]&&E[m+1]==="="||b==="-"||/[A-Za-z]/.test(E[m])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(b)||E[m+1]&&E[m+1].match(/\W/))break}return g}function ne(f){return u["unknown-options-as-args"]&&q(f)}function q(f){return f=f.replace(/^-{3,}/,"--"),f.match(I)||Z(f)?!1:!M(f,/^-+([^=]+?)=[\s\S]*$/,x,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function se(f){return!P(f,p.bools)&&!P(f,p.counts)&&`${f}`in c?c[f]:ce(He(f))}function ce(f){return{[Je.BOOLEAN]:!0,[Je.STRING]:"",[Je.NUMBER]:void 0,[Je.ARRAY]:[]}[f]}function He(f){let g=Je.BOOLEAN;return P(f,p.strings)?g=Je.STRING:P(f,p.numbers)?g=Je.NUMBER:P(f,p.bools)?g=Je.BOOLEAN:P(f,p.arrays)&&(g=Je.ARRAY),g}function Ue(f){return f===void 0}function $n(){Object.keys(p.counts).find(f=>P(f,p.arrays)?(k=Error(y("Invalid configuration: %s, opts.count excludes opts.array.",f)),!0):P(f,p.nargs)?(k=Error(y("Invalid configuration: %s, opts.count excludes opts.narg.",f)),!0):!1)}return{aliases:Object.assign({},p.aliases),argv:Object.assign(Oe,G),configuration:u,defaulted:Object.assign({},F),error:k,newAliases:Object.assign({},C)}}};function ph(s){let e=[],t=Object.create(null),n=!0;for(Object.keys(s).forEach(function(r){e.push([].concat(s[r],r))});n;){n=!1;for(let r=0;r<e.length;r++)for(let o=r+1;o<e.length;o++)if(e[r].filter(function(u){return e[o].indexOf(u)!==-1}).length){e[r]=e[r].concat(e[o]),e.splice(o,1),n=!0;break}}return e.forEach(function(r){r=r.filter(function(i,u,c){return c.indexOf(i)===u});let o=r.pop();o!==void 0&&typeof o=="string"&&(t[o]=r)}),t}function tr(s){return s!==void 0?s+1:1}function Pu(s){return s==="__proto__"?"___proto___":s}function dh(s){return typeof s=="string"&&(s[0]==="'"||s[0]==='"')&&s[s.length-1]===s[0]?s.substring(1,s.length-1):s}var Wu=require("fs");var nr,sr,ir,Ju=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,Ru=(sr=(nr=process==null?void 0:process.versions)===null||nr===void 0?void 0:nr.node)!==null&&sr!==void 0?sr:(ir=process==null?void 0:process.version)===null||ir===void 0?void 0:ir.slice(1);if(Ru&&Number(Ru.match(/^([^.]+)/)[1])<Ju)throw Error(`yargs parser supports a minimum Node.js version of ${Ju}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var mh=process?process.env:{},qu=new Bs({cwd:process.cwd,env:()=>mh,format:Lu.format,normalize:Ns.normalize,resolve:Ns.resolve,require:s=>{if(typeof require<"u")return require(s);if(s.match(/\.json$/))return JSON.parse((0,Wu.readFileSync)(s,"utf8"));throw Error("only .json config files are supported in ESM")}}),xn=function(e,t){return qu.parse(e.slice(),t).argv};xn.detailed=function(s,e){return qu.parse(s.slice(),e)};xn.camelCase=$t;xn.decamelize=$s;xn.looksLikeNumber=_s;var Gu=xn;var Ze=require("path");function gh(){return Ch()?0:1}function Ch(){return Eh()&&!process.defaultApp}function Eh(){return!!process.versions.electron}function Hu(){return process.argv[gh()]}var K=class s extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,s)}};var cn=require("fs"),Uu=require("util"),Vu=require("path"),zu={fs:{readFileSync:cn.readFileSync,writeFile:cn.writeFile},format:Uu.format,resolve:Vu.resolve,exists:s=>{try{return(0,cn.statSync)(s).isFile()}catch{return!1}}};var Qe,rr=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let t=e.shift(),n=function(){};return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]=t,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),Qe.format.apply(Qe.format,[this.cache[this.locale][t]||t].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),t=e.shift(),n=e.shift(),r=e.shift(),o=function(){};typeof e[e.length-1]=="function"&&(o=e.pop()),this.cache[this.locale]||this._readLocaleFile();let i=r===1?t:n;this.cache[this.locale][t]&&(i=this.cache[this.locale][t][r===1?"one":"other"]),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let u=[i];return~i.indexOf("%d")&&u.push(r),Qe.format.apply(Qe.format,u.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.cache[this.locale][t]=e[t])}_taggedLiteral(e,...t){let n="";return e.forEach(function(r,o){let i=t[o+1];n+=r,typeof i<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(t,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,t=this.writeQueue[0],n=t.directory,r=t.locale,o=t.cb,i=this._resolveLocaleFile(n,r),u=JSON.stringify(this.cache[r],null,2);Qe.fs.writeFile(i,u,"utf-8",function(c){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),o(c)})}_readLocaleFile(){let e={},t=this._resolveLocaleFile(this.directory,this.locale);try{Qe.fs.readFileSync&&(e=JSON.parse(Qe.fs.readFileSync(t,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+t),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let n=Qe.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~t.lastIndexOf("_")){let r=Qe.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(r)&&(n=r)}return n}_fileExistsSync(e){return Qe.exists(e)}};function Yu(s,e){Qe=e;let t=new rr(s);return{__:t.__.bind(t),__n:t.__n.bind(t),setLocale:t.setLocale.bind(t),getLocale:t.getLocale.bind(t),updateLocale:t.updateLocale.bind(t),locale:t.locale}}var yh=s=>Yu(s,zu),Ku=yh;var wh={},Fh="require is not supported by ESM",Qu="loading a directory of commands is not supported yet for ESM",vn;try{vn=(0,ea.fileURLToPath)(wh.url)}catch{vn=process.cwd()}var bh=vn.substring(0,vn.lastIndexOf("node_modules")),ta={assert:{notStrictEqual:Is.notStrictEqual,strictEqual:Is.strictEqual},cliui:er,findUp:ju,getEnv:s=>process.env[s],inspect:Zu.inspect,getCallerFile:()=>{throw new K(Qu)},getProcessArgvBin:Hu,mainFilename:bh||process.cwd(),Parser:Gu,path:{basename:Ze.basename,dirname:Ze.dirname,extname:Ze.extname,relative:Ze.relative,resolve:Ze.resolve},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(s,e)=>process.emitWarning(s,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:Xu.readFileSync,require:()=>{throw new K(Fh)},requireDirectory:()=>{throw new K(Qu)},stringWidth:s=>[...s].length,y18n:Ku({directory:(0,Ze.resolve)(vn,"../../../locales"),updateFiles:!1})};function ve(s,e,t,n){t.assert.notStrictEqual(s,e,n)}function or(s,e){e.assert.strictEqual(typeof s,"string")}function ln(s){return Object.keys(s)}function Q(s){return!!s&&!!s.then&&typeof s.then=="function"}function dt(s){let t=s.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,r=t.shift();if(!r)throw new Error(`No command found in: ${s}`);let o={cmd:r.replace(n,""),demanded:[],optional:[]};return t.forEach((i,u)=>{let c=!1;i=i.replace(/\s/g,""),/\.+[\]>]/.test(i)&&u===t.length-1&&(c=!0),/^\[/.test(i)?o.optional.push({cmd:i.replace(n,"").split("|"),variadic:c}):o.demanded.push({cmd:i.replace(n,"").split("|"),variadic:c})}),o}var xh=["first","second","third","fourth","fifth","sixth"];function T(s,e,t){function n(){return typeof s=="object"?[{demanded:[],optional:[]},s,e]:[dt(`cmd ${s}`),e,t]}try{let r=0,[o,i,u]=n(),c=[].slice.call(i);for(;c.length&&c[c.length-1]===void 0;)c.pop();let h=u||c.length;if(h<o.demanded.length)throw new K(`Not enough arguments provided. Expected ${o.demanded.length} but received ${c.length}.`);let D=o.demanded.length+o.optional.length;if(h>D)throw new K(`Too many arguments provided. Expected max ${D} but received ${h}.`);o.demanded.forEach(l=>{let d=c.shift(),C=na(d);l.cmd.filter(y=>y===C||y==="*").length===0&&sa(C,l.cmd,r),r+=1}),o.optional.forEach(l=>{if(c.length===0)return;let d=c.shift(),C=na(d);l.cmd.filter(y=>y===C||y==="*").length===0&&sa(C,l.cmd,r),r+=1})}catch(r){console.warn(r.stack)}}function na(s){return Array.isArray(s)?"array":s===null?"null":typeof s}function sa(s,e,t){throw new K(`Invalid ${xh[t]||"manyith"} argument. Expected ${e.join(" or ")} but received ${s}.`)}var Ss=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,t,n=!0,r=!1){if(T("<array|function> [boolean] [boolean] [boolean]",[e,t,n],arguments.length),Array.isArray(e)){for(let o=0;o<e.length;o++){if(typeof e[o]!="function")throw Error("middleware must be a function");let i=e[o];i.applyBeforeValidation=t,i.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){let o=e;o.applyBeforeValidation=t,o.global=n,o.mutates=r,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,t){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(r=>{let o=[...n[t]||[],t];return r.option?!o.includes(r.option):!0}),e.option=t,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function ia(s){return s?s.map(e=>(e.applyBeforeValidation=!1,e)):[]}function _t(s,e,t,n){return t.reduce((r,o)=>{if(o.applyBeforeValidation!==n)return r;if(o.mutates){if(o.applied)return r;o.applied=!0}if(Q(r))return r.then(i=>Promise.all([i,o(i,e)])).then(([i,u])=>Object.assign(i,u));{let i=o(r,e);return Q(i)?i.then(u=>Object.assign(r,u)):Object.assign(r,i)}},s)}function Bt(s,e,t=n=>{throw n}){try{let n=vh(s)?s():s;return Q(n)?n.then(r=>e(r)):e(n)}catch(n){return t(n)}}function vh(s){return typeof s=="function"}function ur(s){if(typeof require>"u")return null;for(let e=0,t=Object.keys(require.cache),n;e<t.length;e++)if(n=require.cache[t[e]],n.exports===s)return n;return null}var hn=/(^\*)|(^\$0)/,ar=class{constructor(e,t,n,r){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=r,this.usage=e,this.globalMiddleware=n,this.validation=t}addDirectory(e,t,n,r){r=r||{},typeof r.recurse!="boolean"&&(r.recurse=!1),Array.isArray(r.extensions)||(r.extensions=["js"]);let o=typeof r.visit=="function"?r.visit:i=>i;r.visit=(i,u,c)=>{let h=o(i,u,c);if(h){if(this.requireCache.has(u))return h;this.requireCache.add(u),this.addHandler(h)}return h},this.shim.requireDirectory({require:t,filename:n},e,r)}addHandler(e,t,n,r,o,i){let u=[],c=ia(o);if(r=r||(()=>{}),Array.isArray(e))if(Ah(e))[e,...u]=e;else for(let h of e)this.addHandler(h);else if(Th(e)){let h=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(h=[].concat(h).concat(e.aliases)),this.addHandler(h,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(ra(n)){this.addHandler([e].concat(u),t,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){let h=dt(e);u=u.map(d=>dt(d).cmd);let D=!1,l=[h.cmd].concat(u).filter(d=>hn.test(d)?(D=!0,!1):!0);l.length===0&&D&&l.push("$0"),D&&(h.cmd=l[0],u=l.slice(1),e=e.replace(hn,h.cmd)),u.forEach(d=>{this.aliasMap[d]=h.cmd}),t!==!1&&this.usage.command(e,t,D,u,i),this.handlers[h.cmd]={original:e,description:t,handler:r,builder:n||{},middlewares:c,deprecated:i,demanded:h.demanded,optional:h.optional},D&&(this.defaultCommand=this.handlers[h.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,t,n,r,o,i){let u=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,c=t.getInternalMethods().getContext(),h=c.commands.slice(),D=!e;e&&(c.commands.push(e),c.fullCommands.push(u.original));let l=this.applyBuilderUpdateUsageAndParse(D,u,t,n.aliases,h,r,o,i);return Q(l)?l.then(d=>this.applyMiddlewareAndGetResult(D,u,d.innerArgv,c,o,d.aliases,t)):this.applyMiddlewareAndGetResult(D,u,l.innerArgv,c,o,l.aliases,t)}applyBuilderUpdateUsageAndParse(e,t,n,r,o,i,u,c){let h=t.builder,D=n;if(ks(h)){n.getInternalMethods().getUsageInstance().freeze();let l=h(n.getInternalMethods().reset(r),c);if(Q(l))return l.then(d=>(D=ua(d)?d:n,this.parseAndUpdateUsage(e,t,D,o,i,u)))}else Oh(h)&&(n.getInternalMethods().getUsageInstance().freeze(),D=n.getInternalMethods().reset(r),Object.keys(t.builder).forEach(l=>{D.option(l,h[l])}));return this.parseAndUpdateUsage(e,t,D,o,i,u)}parseAndUpdateUsage(e,t,n,r,o,i){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(r,t),t.description);let u=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,o,i);return Q(u)?u.then(c=>({aliases:n.parsed.aliases,innerArgv:c})):{aliases:n.parsed.aliases,innerArgv:u}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,t){let n=hn.test(t.original)?t.original.replace(hn,"").trim():t.original,r=e.filter(o=>!hn.test(o));return r.push(n),`$0 ${r.join(" ")}`}handleValidationAndGetResult(e,t,n,r,o,i,u,c){if(!i.getInternalMethods().getHasOutput()){let h=i.getInternalMethods().runValidation(o,c,i.parsed.error,e);n=Bt(n,D=>(h(D),D))}if(t.handler&&!i.getInternalMethods().getHasOutput()){i.getInternalMethods().setHasOutput();let h=!!i.getOptions().configuration["populate--"];i.getInternalMethods().postProcess(n,h,!1,!1),n=_t(n,i,u,!1),n=Bt(n,D=>{let l=t.handler(D);return Q(l)?l.then(()=>D):D}),e||i.getInternalMethods().getUsageInstance().cacheHelpMessage(),Q(n)&&!i.getInternalMethods().hasParseCallback()&&n.catch(D=>{try{i.getInternalMethods().getUsageInstance().fail(null,D)}catch{}})}return e||(r.commands.pop(),r.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,t,n,r,o,i,u){let c={};if(o)return n;u.getInternalMethods().getHasOutput()||(c=this.populatePositionals(t,n,r,u));let h=this.globalMiddleware.getMiddleware().slice(0).concat(t.middlewares),D=_t(n,u,h,!0);return Q(D)?D.then(l=>this.handleValidationAndGetResult(e,t,l,r,i,u,h,c)):this.handleValidationAndGetResult(e,t,D,r,i,u,h,c)}populatePositionals(e,t,n,r){t._=t._.slice(n.commands.length);let o=e.demanded.slice(0),i=e.optional.slice(0),u={};for(this.validation.positionalCount(o.length,t._.length);o.length;){let c=o.shift();this.populatePositional(c,t,u)}for(;i.length;){let c=i.shift();this.populatePositional(c,t,u)}return t._=n.commands.concat(t._.map(c=>""+c)),this.postProcessPositionals(t,u,this.cmdToParseOptions(e.original),r),u}populatePositional(e,t,n){let r=e.cmd[0];e.variadic?n[r]=t._.splice(0).map(String):t._.length&&(n[r]=[String(t._.shift())])}cmdToParseOptions(e){let t={array:[],default:{},alias:{},demand:{}},n=dt(e);return n.demanded.forEach(r=>{let[o,...i]=r.cmd;r.variadic&&(t.array.push(o),t.default[o]=[]),t.alias[o]=i,t.demand[o]=!0}),n.optional.forEach(r=>{let[o,...i]=r.cmd;r.variadic&&(t.array.push(o),t.default[o]=[]),t.alias[o]=i}),t}postProcessPositionals(e,t,n,r){let o=Object.assign({},r.getOptions());o.default=Object.assign(n.default,o.default);for(let h of Object.keys(n.alias))o.alias[h]=(o.alias[h]||[]).concat(n.alias[h]);o.array=o.array.concat(n.array),o.config={};let i=[];if(Object.keys(t).forEach(h=>{t[h].map(D=>{o.configuration["unknown-options-as-args"]&&(o.key[h]=!0),i.push(`--${h}`),i.push(D)})}),!i.length)return;let u=Object.assign({},o.configuration,{"populate--":!1}),c=this.shim.Parser.detailed(i,Object.assign({},o,{configuration:u}));if(c.error)r.getInternalMethods().getUsageInstance().fail(c.error.message,c.error);else{let h=Object.keys(t);Object.keys(t).forEach(D=>{h.push(...c.aliases[D])}),Object.keys(c.argv).forEach(D=>{h.includes(D)&&(t[D]||(t[D]=c.argv[D]),!this.isInConfigs(r,D)&&!this.isDefaulted(r,D)&&Object.prototype.hasOwnProperty.call(e,D)&&Object.prototype.hasOwnProperty.call(c.argv,D)&&(Array.isArray(e[D])||Array.isArray(c.argv[D]))?e[D]=[].concat(e[D],c.argv[D]):e[D]=c.argv[D])})}}isDefaulted(e,t){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,t)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(t))}isInConfigs(e,t){let{configObjects:n}=e.getOptions();return n.some(r=>Object.prototype.hasOwnProperty.call(r,t))||n.some(r=>Object.prototype.hasOwnProperty.call(r,this.shim.Parser.camelCase(t)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let n=hn.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let t=this.defaultCommand.builder;if(ks(t))return t(e,!0);ra(t)||Object.keys(t).forEach(n=>{e.option(n,t[n])})}moduleName(e){let t=ur(e);if(!t)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(t.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:t,desc:n}){for(let r of[e,t,n]){if(typeof r=="string"||r===!1)return r;ve(r,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();ve(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function oa(s,e,t,n){return new ar(s,e,t,n)}function ra(s){return typeof s=="object"&&!!s.builder&&typeof s.handler=="function"}function Ah(s){return s.every(e=>typeof e=="string")}function ks(s){return typeof s=="function"}function Oh(s){return typeof s=="object"}function Th(s){return typeof s=="object"&&!Array.isArray(s)}function mt(s={},e=()=>!0){let t={};return ln(s).forEach(n=>{e(n,s[n])&&(t[n]=s[n])}),t}function gt(s){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let t=e;t._handle&&t.isTTY&&typeof t._handle.setBlocking=="function"&&t._handle.setBlocking(s)})}function $h(s){return typeof s=="boolean"}function ca(s,e){let t=e.y18n.__,n={},r=[];n.failFn=function(v){r.push(v)};let o=null,i=null,u=!0;n.showHelpOnFail=function(v=!0,_){let[L,U]=typeof v=="string"?[!0,v]:[v,_];return s.getInternalMethods().isGlobalContext()&&(i=U),o=U,u=L,n};let c=!1;n.fail=function(v,_){let L=s.getInternalMethods().getLoggerInstance();if(r.length)for(let U=r.length-1;U>=0;--U){let De=r[U];if($h(De)){if(_)throw _;if(v)throw Error(v)}else De(v,_,n)}else{if(s.getExitProcess()&>(!0),!c){c=!0,u&&(s.showHelp("error"),L.error()),(v||_)&&L.error(v||_);let U=o||i;U&&((v||_)&&L.error(""),L.error(U))}if(_=_||new K(v),s.getExitProcess())return s.exit(1);if(s.getInternalMethods().hasParseCallback())return s.exit(1,_);throw _}};let h=[],D=!1;n.usage=(N,v)=>N===null?(D=!0,h=[],n):(D=!1,h.push([N,v||""]),n),n.getUsage=()=>h,n.getUsageDisabled=()=>D,n.getPositionalGroupName=()=>t("Positionals:");let l=[];n.example=(N,v)=>{l.push([N,v||""])};let d=[];n.command=function(v,_,L,U,De=!1){L&&(d=d.map(H=>(H[2]=!1,H))),d.push([v,_||"",L,U,De])},n.getCommands=()=>d;let C={};n.describe=function(v,_){Array.isArray(v)?v.forEach(L=>{n.describe(L,_)}):typeof v=="object"?Object.keys(v).forEach(L=>{n.describe(L,v[L])}):C[v]=_},n.getDescriptions=()=>C;let F=[];n.epilog=N=>{F.push(N)};let y=!1,p;n.wrap=N=>{y=!0,p=N},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(y||(p=Te(),y=!0),p);let I="__yargsString__:";n.deferY18nLookup=N=>I+N,n.help=function(){if(O)return O;k();let v=s.customScriptName?s.$0:e.path.basename(s.$0),_=s.getDemandedOptions(),L=s.getDemandedCommands(),U=s.getDeprecatedOptions(),De=s.getGroups(),H=s.getOptions(),pe=[];pe=pe.concat(Object.keys(C)),pe=pe.concat(Object.keys(_)),pe=pe.concat(Object.keys(L)),pe=pe.concat(Object.keys(H.default)),pe=pe.filter(Oe),pe=Object.keys(pe.reduce((M,Z)=>(Z!=="_"&&(M[Z]=!0),M),{}));let Ft=n.getWrap(),ee=e.cliui({width:Ft,wrap:!!Ft});if(!D){if(h.length)h.forEach(M=>{ee.div({text:`${M[0].replace(/\$0/g,v)}`}),M[1]&&ee.div({text:`${M[1]}`,padding:[1,0,0,0]})}),ee.div();else if(d.length){let M=null;L._?M=`${v} <${t("command")}>
|
|
110
|
+
`:M=`${v} [${t("command")}]
|
|
111
|
+
`,ee.div(`${M}`)}}if(d.length>1||d.length===1&&!d[0][2]){ee.div(t("Commands:"));let M=s.getInternalMethods().getContext(),Z=M.commands.length?`${M.commands.join(" ")} `:"";s.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(d=d.sort((q,se)=>q[0].localeCompare(se[0])));let ne=v?`${v} `:"";d.forEach(q=>{let se=`${ne}${Z}${q[0].replace(/^\$0 ?/,"")}`;ee.span({text:se,padding:[0,2,0,2],width:x(d,Ft,`${v}${Z}`)+4},{text:q[1]});let ce=[];q[2]&&ce.push(`[${t("default")}]`),q[3]&&q[3].length&&ce.push(`[${t("aliases:")} ${q[3].join(", ")}]`),q[4]&&(typeof q[4]=="string"?ce.push(`[${t("deprecated: %s",q[4])}]`):ce.push(`[${t("deprecated")}]`)),ce.length?ee.div({text:ce.join(" "),padding:[0,0,0,2],align:"right"}):ee.div()}),ee.div()}let nt=(Object.keys(H.alias)||[]).concat(Object.keys(s.parsed.newAliases)||[]);pe=pe.filter(M=>!s.parsed.newAliases[M]&&nt.every(Z=>(H.alias[Z]||[]).indexOf(M)===-1));let st=t("Options:");De[st]||(De[st]=[]),G(pe,H.alias,De,st);let bt=M=>/^--/.test(js(M)),P=Object.keys(De).filter(M=>De[M].length>0).map(M=>{let Z=De[M].filter(Oe).map(ne=>{if(nt.includes(ne))return ne;for(let q=0,se;(se=nt[q])!==void 0;q++)if((H.alias[se]||[]).includes(ne))return se;return ne});return{groupName:M,normalizedKeys:Z}}).filter(({normalizedKeys:M})=>M.length>0).map(({groupName:M,normalizedKeys:Z})=>{let ne=Z.reduce((q,se)=>(q[se]=[se].concat(H.alias[se]||[]).map(ce=>M===n.getPositionalGroupName()?ce:(/^[0-9]$/.test(ce)?H.boolean.includes(se)?"-":"--":ce.length>1?"--":"-")+ce).sort((ce,He)=>bt(ce)===bt(He)?0:bt(ce)?1:-1).join(", "),q),{});return{groupName:M,normalizedKeys:Z,switches:ne}});if(P.filter(({groupName:M})=>M!==n.getPositionalGroupName()).some(({normalizedKeys:M,switches:Z})=>!M.every(ne=>bt(Z[ne])))&&P.filter(({groupName:M})=>M!==n.getPositionalGroupName()).forEach(({normalizedKeys:M,switches:Z})=>{M.forEach(ne=>{bt(Z[ne])&&(Z[ne]=_h(Z[ne],4))})}),P.forEach(({groupName:M,normalizedKeys:Z,switches:ne})=>{ee.div(M),Z.forEach(q=>{let se=ne[q],ce=C[q]||"",He=null;ce.includes(I)&&(ce=t(ce.substring(I.length))),H.boolean.includes(q)&&(He=`[${t("boolean")}]`),H.count.includes(q)&&(He=`[${t("count")}]`),H.string.includes(q)&&(He=`[${t("string")}]`),H.normalize.includes(q)&&(He=`[${t("string")}]`),H.array.includes(q)&&(He=`[${t("array")}]`),H.number.includes(q)&&(He=`[${t("number")}]`);let Ue=g=>typeof g=="string"?`[${t("deprecated: %s",g)}]`:`[${t("deprecated")}]`,$n=[q in U?Ue(U[q]):null,He,q in _?`[${t("required")}]`:null,H.choices&&H.choices[q]?`[${t("choices:")} ${n.stringifiedValues(H.choices[q])}]`:null,ae(H.default[q],H.defaultDescription[q])].filter(Boolean).join(" ");ee.span({text:js(se),padding:[0,2,0,2+aa(se)],width:x(ne,Ft)+4},ce);let f=s.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;$n&&!f?ee.div({text:$n,padding:[0,0,0,2],align:"right"}):ee.div()}),ee.div()}),l.length&&(ee.div(t("Examples:")),l.forEach(M=>{M[0]=M[0].replace(/\$0/g,v)}),l.forEach(M=>{M[1]===""?ee.div({text:M[0],padding:[0,2,0,2]}):ee.div({text:M[0],padding:[0,2,0,2],width:x(l,Ft)+4},{text:M[1]})}),ee.div()),F.length>0){let M=F.map(Z=>Z.replace(/\$0/g,v)).join(`
|
|
112
|
+
`);ee.div(`${M}
|
|
113
|
+
`)}return ee.toString().replace(/\s*$/,"")};function x(N,v,_){let L=0;return Array.isArray(N)||(N=Object.values(N).map(U=>[U])),N.forEach(U=>{L=Math.max(e.stringWidth(_?`${_} ${js(U[0])}`:js(U[0]))+aa(U[0]),L)}),v&&(L=Math.min(L,parseInt((v*.5).toString(),10))),L}function k(){let N=s.getDemandedOptions(),v=s.getOptions();(Object.keys(v.alias)||[]).forEach(_=>{v.alias[_].forEach(L=>{C[L]&&n.describe(_,C[L]),L in N&&s.demandOption(_,N[L]),v.boolean.includes(L)&&s.boolean(_),v.count.includes(L)&&s.count(_),v.string.includes(L)&&s.string(_),v.normalize.includes(L)&&s.normalize(_),v.array.includes(L)&&s.array(_),v.number.includes(L)&&s.number(_)})})}let O;n.cacheHelpMessage=function(){O=this.help()},n.clearCachedHelpMessage=function(){O=void 0},n.hasCachedHelpMessage=function(){return!!O};function G(N,v,_,L){let U=[],De=null;return Object.keys(_).forEach(H=>{U=U.concat(_[H])}),N.forEach(H=>{De=[H].concat(v[H]),De.some(pe=>U.indexOf(pe)!==-1)||_[L].push(H)}),U}function Oe(N){return s.getOptions().hiddenOptions.indexOf(N)<0||s.parsed.argv[s.getOptions().showHiddenOpt]}n.showHelp=N=>{let v=s.getInternalMethods().getLoggerInstance();N||(N="error"),(typeof N=="function"?N:v[N])(n.help())},n.functionDescription=N=>["(",N.name?e.Parser.decamelize(N.name,"-"):t("generated-value"),")"].join(""),n.stringifiedValues=function(v,_){let L="",U=_||", ",De=[].concat(v);return!v||!De.length||De.forEach(H=>{L.length&&(L+=U),L+=JSON.stringify(H)}),L};function ae(N,v){let _=`[${t("default:")} `;if(N===void 0&&!v)return null;if(v)_+=v;else switch(typeof N){case"string":_+=`"${N}"`;break;case"object":_+=JSON.stringify(N);break;default:_+=N}return`${_}]`}function Te(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}let Ge=null;n.version=N=>{Ge=N},n.showVersion=N=>{let v=s.getInternalMethods().getLoggerInstance();N||(N="error"),(typeof N=="function"?N:v[N])(Ge)},n.reset=function(v){return o=null,c=!1,h=[],D=!1,F=[],l=[],d=[],C=mt(C,_=>!v[_]),n};let V=[];return n.freeze=function(){V.push({failMessage:o,failureOutput:c,usages:h,usageDisabled:D,epilogs:F,examples:l,commands:d,descriptions:C})},n.unfreeze=function(v=!1){let _=V.pop();_&&(v?(C={..._.descriptions,...C},d=[..._.commands,...d],h=[..._.usages,...h],l=[..._.examples,...l],F=[..._.epilogs,...F]):{failMessage:o,failureOutput:c,usages:h,usageDisabled:D,epilogs:F,examples:l,commands:d,descriptions:C}=_)},n}function cr(s){return typeof s=="object"}function _h(s,e){return cr(s)?{text:s.text,indentation:s.indentation+e}:{text:s,indentation:e}}function aa(s){return cr(s)?s.indentation:0}function js(s){return cr(s)?s.text:s}var la=`###-begin-{{app_name}}-completions-###
|
|
110
114
|
#
|
|
111
115
|
# yargs command completion script
|
|
112
116
|
#
|
|
@@ -134,7 +138,7 @@ _{{app_name}}_yargs_completions()
|
|
|
134
138
|
}
|
|
135
139
|
complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
|
|
136
140
|
###-end-{{app_name}}-completions-###
|
|
137
|
-
`,
|
|
141
|
+
`,ha=`#compdef {{app_name}}
|
|
138
142
|
###-begin-{{app_name}}-completions-###
|
|
139
143
|
#
|
|
140
144
|
# yargs command completion script
|
|
@@ -153,15 +157,15 @@ _{{app_name}}_yargs_completions()
|
|
|
153
157
|
}
|
|
154
158
|
compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
155
159
|
###-end-{{app_name}}-completions-###
|
|
156
|
-
`;var
|
|
157
|
-
${
|
|
158
|
-
`)}`:"";e.fail(r("Missing required argument: %s","Missing required arguments: %s",Object.keys(C).length,Object.keys(C).join(", ")+
|
|
159
|
-
${
|
|
160
|
-
`;p.forEach(E=>{C+=E}),e.fail(C)}};let f={};o.conflicts=function(c,p){$("<string|object> [array|string]",[c,p],arguments.length),typeof c=="object"?Object.keys(c).forEach(C=>{o.conflicts(C,c[C])}):(n.global(c),f[c]||(f[c]=[]),Array.isArray(p)?p.forEach(C=>o.conflicts(c,C)):f[c].push(p))},o.getConflicting=()=>f,o.conflicting=function(c){Object.keys(c).forEach(p=>{f[p]&&f[p].forEach(C=>{C&&c[p]!==void 0&&c[C]!==void 0&&e.fail(i("Arguments %s and %s are mutually exclusive",p,C))})}),n.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(f).forEach(p=>{f[p].forEach(C=>{C&&c[t.Parser.camelCase(p)]!==void 0&&c[t.Parser.camelCase(C)]!==void 0&&e.fail(i("Arguments %s and %s are mutually exclusive",p,C))})})},o.recommendCommands=function(c,p){p=p.sort((g,B)=>B.length-g.length);let E=null,b=1/0;for(let g=0,B;(B=p[g])!==void 0;g++){let N=Ao(c,B);N<=3&&N<b&&(b=N,E=B)}E&&e.fail(i("Did you mean %s?",E))},o.reset=function(c){return s=Ke(s,p=>!c[p]),f=Ke(f,p=>!c[p]),o};let D=[];return o.freeze=function(){D.push({implied:s,conflicting:f})},o.unfreeze=function(){let c=D.pop();Ce(c,void 0,t),{implied:s,conflicting:f}=c},o}var ki=[],Vt;function _n(n,e,t,i){Vt=i;let r={};if(Object.prototype.hasOwnProperty.call(n,"extends")){if(typeof n.extends!="string")return r;let o=/\.json|\..*rc$/.test(n.extends),s=null;if(o)s=cc(e,n.extends);else try{s=require.resolve(n.extends)}catch{return n}ac(s),ki.push(s),r=o?JSON.parse(Vt.readFileSync(s,"utf8")):require(n.extends),delete n.extends,r=_n(r,Vt.path.dirname(s),t,Vt)}return ki=[],t?Bo(r,n):Object.assign({},r,n)}function ac(n){if(ki.indexOf(n)>-1)throw new Y(`Circular extended configurations: '${n}'.`)}function cc(n,e){return Vt.path.resolve(n,e)}function Bo(n,e){let t={};function i(r){return r&&typeof r=="object"&&!Array.isArray(r)}Object.assign(t,n);for(let r of Object.keys(e))i(e[r])&&i(t[r])?t[r]=Bo(n[r],e[r]):t[r]=e[r];return t}var v=function(n,e,t,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?n!==e||!r:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(n,t):r?r.value=t:e.set(n,t),t},u=function(n,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?n!==e||!i:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(n):i?i.value:e.get(n)},ue,ct,Ht,Oe,ye,Sn,Ze,lt,jn,_e,In,Se,We,we,je,Pn,Mt,De,j,Mn,Tn,xe,ft,Tt,Dt,Xe,Nn,T,ht,pt,dt,W,Wn,Re,se;function Yo(n){return(e=[],t=n.process.cwd(),i)=>{let r=new Zi(e,t,i,n);return Object.defineProperty(r,"argv",{get:()=>r.parse(),enumerable:!0}),r.help(),r.version(),r}}var Oo=Symbol("copyDoubleDash"),_o=Symbol("copyDoubleDash"),zi=Symbol("deleteFromParserHintObject"),So=Symbol("emitWarning"),jo=Symbol("freeze"),Io=Symbol("getDollarZero"),mt=Symbol("getParserConfiguration"),Po=Symbol("getUsageConfiguration"),qi=Symbol("guessLocale"),Mo=Symbol("guessVersion"),To=Symbol("parsePositionalNumbers"),Ui=Symbol("pkgUp"),et=Symbol("populateParserHintArray"),Nt=Symbol("populateParserHintSingleValueDictionary"),Vi=Symbol("populateParserHintArrayDictionary"),Hi=Symbol("populateParserHintDictionary"),Gi=Symbol("sanitizeKey"),Yi=Symbol("setKey"),Ji=Symbol("unfreeze"),No=Symbol("validateAsync"),Wo=Symbol("getCommandInstance"),Ro=Symbol("getContext"),Lo=Symbol("getHasOutput"),ko=Symbol("getLoggerInstance"),zo=Symbol("getParseContext"),qo=Symbol("getUsageInstance"),Uo=Symbol("getValidationInstance"),Rn=Symbol("hasParseCallback"),Vo=Symbol("isGlobalContext"),gt=Symbol("postProcess"),Ho=Symbol("rebase"),Ki=Symbol("reset"),Gt=Symbol("runYargsParserAndExecuteCommands"),Qi=Symbol("runValidation"),Go=Symbol("setHasOutput"),Ct=Symbol("kTrackManuallySetKeys"),Zi=class{constructor(e=[],t,i,r){this.customScriptName=!1,this.parsed=!1,ue.set(this,void 0),ct.set(this,void 0),Ht.set(this,{commands:[],fullCommands:[]}),Oe.set(this,null),ye.set(this,null),Sn.set(this,"show-hidden"),Ze.set(this,null),lt.set(this,!0),jn.set(this,{}),_e.set(this,!0),In.set(this,[]),Se.set(this,void 0),We.set(this,{}),we.set(this,!1),je.set(this,null),Pn.set(this,!0),Mt.set(this,void 0),De.set(this,""),j.set(this,void 0),Mn.set(this,void 0),Tn.set(this,{}),xe.set(this,null),ft.set(this,null),Tt.set(this,{}),Dt.set(this,{}),Xe.set(this,void 0),Nn.set(this,!1),T.set(this,void 0),ht.set(this,!1),pt.set(this,!1),dt.set(this,!1),W.set(this,void 0),Wn.set(this,{}),Re.set(this,null),se.set(this,void 0),v(this,T,r,"f"),v(this,Xe,e,"f"),v(this,ct,t,"f"),v(this,Mn,i,"f"),v(this,Se,new vn(this),"f"),this.$0=this[Io](),this[Ki](),v(this,ue,u(this,ue,"f"),"f"),v(this,W,u(this,W,"f"),"f"),v(this,se,u(this,se,"f"),"f"),v(this,j,u(this,j,"f"),"f"),u(this,j,"f").showHiddenOpt=u(this,Sn,"f"),v(this,Mt,this[_o](),"f")}addHelpOpt(e,t){let i="help";return $("[string|boolean] [string]",[e,t],arguments.length),u(this,je,"f")&&(this[zi](u(this,je,"f")),v(this,je,null,"f")),e===!1&&t===void 0?this:(v(this,je,typeof e=="string"?e:i,"f"),this.boolean(u(this,je,"f")),this.describe(u(this,je,"f"),t||u(this,W,"f").deferY18nLookup("Show help")),this)}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if($("[string|boolean] [string]",[e,t],arguments.length),e===!1&&t===void 0)return this;let i=typeof e=="string"?e:u(this,Sn,"f");return this.boolean(i),this.describe(i,t||u(this,W,"f").deferY18nLookup("Show hidden options")),u(this,j,"f").showHiddenOpt=i,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return $("<object|string|array> [string|array]",[e,t],arguments.length),this[Vi](this.alias.bind(this),"alias",e,t),this}array(e){return $("<array|string>",[e],arguments.length),this[et]("array",e),this[Ct](e),this}boolean(e){return $("<array|string>",[e],arguments.length),this[et]("boolean",e),this[Ct](e),this}check(e,t){return $("<function> [boolean]",[e,t],arguments.length),this.middleware((i,r)=>at(()=>e(i,r.getOptions()),o=>(o?(typeof o=="string"||o instanceof Error)&&u(this,W,"f").fail(o.toString(),o):u(this,W,"f").fail(u(this,T,"f").y18n.__("Argument check failed: %s",e.toString())),i),o=>(u(this,W,"f").fail(o.message?o.message:o.toString(),o),i)),!1,t),this}choices(e,t){return $("<object|string|array> [string|array]",[e,t],arguments.length),this[Vi](this.choices.bind(this),"choices",e,t),this}coerce(e,t){if($("<object|string|array> [function]",[e,t],arguments.length),Array.isArray(e)){if(!t)throw new Y("coerce callback must be provided");for(let i of e)this.coerce(i,t);return this}else if(typeof e=="object"){for(let i of Object.keys(e))this.coerce(i,e[i]);return this}if(!t)throw new Y("coerce callback must be provided");return u(this,j,"f").key[e]=!0,u(this,Se,"f").addCoerceMiddleware((i,r)=>{let o;return Object.prototype.hasOwnProperty.call(i,e)?at(()=>(o=r.getAliases(),t(i[e])),a=>{i[e]=a;let f=r.getInternalMethods().getParserConfiguration()["strip-aliased"];if(o[e]&&f!==!0)for(let D of o[e])i[D]=a;return i},a=>{throw new Y(a.message)}):i},e),this}conflicts(e,t){return $("<string|object> [string|array]",[e,t],arguments.length),u(this,se,"f").conflicts(e,t),this}config(e="config",t,i){return $("[object|string] [string|function] [function]",[e,t,i],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=_n(e,u(this,ct,"f"),this[mt]()["deep-merge-config"]||!1,u(this,T,"f")),u(this,j,"f").configObjects=(u(this,j,"f").configObjects||[]).concat(e),this):(typeof t=="function"&&(i=t,t=void 0),this.describe(e,t||u(this,W,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(r=>{u(this,j,"f").config[r]=i||!0}),this)}completion(e,t,i){return $("[string] [string|boolean|function] [function]",[e,t,i],arguments.length),typeof t=="function"&&(i=t,t=void 0),v(this,ye,e||u(this,ye,"f")||"completion","f"),!t&&t!==!1&&(t="generate completion script"),this.command(u(this,ye,"f"),t),i&&u(this,Oe,"f").registerFunction(i),this}command(e,t,i,r,o,s){return $("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,t,i,r,o,s],arguments.length),u(this,ue,"f").addHandler(e,t,i,r,o,s),this}commands(e,t,i,r,o,s){return this.command(e,t,i,r,o,s)}commandDir(e,t){$("<string> [object]",[e,t],arguments.length);let i=u(this,Mn,"f")||u(this,T,"f").require;return u(this,ue,"f").addDirectory(e,i,u(this,T,"f").getCallerFile(),t),this}count(e){return $("<array|string>",[e],arguments.length),this[et]("count",e),this[Ct](e),this}default(e,t,i){return $("<object|string|array> [*] [string]",[e,t,i],arguments.length),i&&(Ti(e,u(this,T,"f")),u(this,j,"f").defaultDescription[e]=i),typeof t=="function"&&(Ti(e,u(this,T,"f")),u(this,j,"f").defaultDescription[e]||(u(this,j,"f").defaultDescription[e]=u(this,W,"f").functionDescription(t)),t=t.call()),this[Nt](this.default.bind(this),"default",e,t),this}defaults(e,t,i){return this.default(e,t,i)}demandCommand(e=1,t,i,r){return $("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,t,i,r],arguments.length),typeof t!="number"&&(i=t,t=1/0),this.global("_",!1),u(this,j,"f").demandedCommands._={min:e,max:t,minMsg:i,maxMsg:r},this}demand(e,t,i){return Array.isArray(t)?(t.forEach(r=>{Ce(i,!0,u(this,T,"f")),this.demandOption(r,i)}),t=1/0):typeof t!="number"&&(i=t,t=1/0),typeof e=="number"?(Ce(i,!0,u(this,T,"f")),this.demandCommand(e,t,i,i)):Array.isArray(e)?e.forEach(r=>{Ce(i,!0,u(this,T,"f")),this.demandOption(r,i)}):typeof i=="string"?this.demandOption(e,i):(i===!0||typeof i>"u")&&this.demandOption(e),this}demandOption(e,t){return $("<object|string|array> [string]",[e,t],arguments.length),this[Nt](this.demandOption.bind(this),"demandedOptions",e,t),this}deprecateOption(e,t){return $("<string> [string|boolean]",[e,t],arguments.length),u(this,j,"f").deprecatedOptions[e]=t,this}describe(e,t){return $("<object|string|array> [string]",[e,t],arguments.length),this[Yi](e,!0),u(this,W,"f").describe(e,t),this}detectLocale(e){return $("<boolean>",[e],arguments.length),v(this,lt,e,"f"),this}env(e){return $("[string|boolean]",[e],arguments.length),e===!1?delete u(this,j,"f").envPrefix:u(this,j,"f").envPrefix=e||"",this}epilogue(e){return $("<string>",[e],arguments.length),u(this,W,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return $("<string|array> [string]",[e,t],arguments.length),Array.isArray(e)?e.forEach(i=>this.example(...i)):u(this,W,"f").example(e,t),this}exit(e,t){v(this,we,!0,"f"),v(this,Ze,t,"f"),u(this,_e,"f")&&u(this,T,"f").process.exit(e)}exitProcess(e=!0){return $("[boolean]",[e],arguments.length),v(this,_e,e,"f"),this}fail(e){if($("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new Y("Invalid first argument. Expected function or boolean 'false'");return u(this,W,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return $("<array> [function]",[e,t],arguments.length),t?u(this,Oe,"f").getCompletion(e,t):new Promise((i,r)=>{u(this,Oe,"f").getCompletion(e,(o,s)=>{o?r(o):i(s)})})}getDemandedOptions(){return $([],0),u(this,j,"f").demandedOptions}getDemandedCommands(){return $([],0),u(this,j,"f").demandedCommands}getDeprecatedOptions(){return $([],0),u(this,j,"f").deprecatedOptions}getDetectLocale(){return u(this,lt,"f")}getExitProcess(){return u(this,_e,"f")}getGroups(){return Object.assign({},u(this,We,"f"),u(this,Dt,"f"))}getHelp(){if(v(this,we,!0,"f"),!u(this,W,"f").hasCachedHelpMessage()){if(!this.parsed){let t=this[Gt](u(this,Xe,"f"),void 0,void 0,0,!0);if(J(t))return t.then(()=>u(this,W,"f").help())}let e=u(this,ue,"f").runDefaultBuilderOn(this);if(J(e))return e.then(()=>u(this,W,"f").help())}return Promise.resolve(u(this,W,"f").help())}getOptions(){return u(this,j,"f")}getStrict(){return u(this,ht,"f")}getStrictCommands(){return u(this,pt,"f")}getStrictOptions(){return u(this,dt,"f")}global(e,t){return $("<string|array> [boolean]",[e,t],arguments.length),e=[].concat(e),t!==!1?u(this,j,"f").local=u(this,j,"f").local.filter(i=>e.indexOf(i)===-1):e.forEach(i=>{u(this,j,"f").local.includes(i)||u(this,j,"f").local.push(i)}),this}group(e,t){$("<string|array> <string>",[e,t],arguments.length);let i=u(this,Dt,"f")[t]||u(this,We,"f")[t];u(this,Dt,"f")[t]&&delete u(this,Dt,"f")[t];let r={};return u(this,We,"f")[t]=(i||[]).concat(e).filter(o=>r[o]?!1:r[o]=!0),this}hide(e){return $("<string>",[e],arguments.length),u(this,j,"f").hiddenOptions.push(e),this}implies(e,t){return $("<string|object> [number|string|array]",[e,t],arguments.length),u(this,se,"f").implies(e,t),this}locale(e){return $("[string]",[e],arguments.length),e===void 0?(this[qi](),u(this,T,"f").y18n.getLocale()):(v(this,lt,!1,"f"),u(this,T,"f").y18n.setLocale(e),this)}middleware(e,t,i){return u(this,Se,"f").addMiddleware(e,!!t,i)}nargs(e,t){return $("<string|object|array> [number]",[e,t],arguments.length),this[Nt](this.nargs.bind(this),"narg",e,t),this}normalize(e){return $("<array|string>",[e],arguments.length),this[et]("normalize",e),this}number(e){return $("<array|string>",[e],arguments.length),this[et]("number",e),this[Ct](e),this}option(e,t){if($("<string|object> [object]",[e,t],arguments.length),typeof e=="object")Object.keys(e).forEach(i=>{this.options(i,e[i])});else{typeof t!="object"&&(t={}),this[Ct](e),u(this,Re,"f")&&(e==="version"||(t==null?void 0:t.alias)==="version")&&this[So](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
|
|
161
|
-
`),void 0,"versionWarning"),
|
|
162
|
-
`,"f")
|
|
163
|
-
`,"f"),v(this,De,u(this,De,"f")+e.join(" "),"f")}}}[zi](e){It(u(this,j,"f")).forEach(t=>{if((r=>r==="configObjects")(t))return;let i=u(this,j,"f")[t];Array.isArray(i)?i.includes(e)&&i.splice(i.indexOf(e),1):typeof i=="object"&&delete i[e]}),delete u(this,W,"f").getDescriptions()[e]}[So](e,t,i){u(this,jn,"f")[i]||(u(this,T,"f").process.emitWarning(e,t),u(this,jn,"f")[i]=!0)}[jo](){u(this,In,"f").push({options:u(this,j,"f"),configObjects:u(this,j,"f").configObjects.slice(0),exitProcess:u(this,_e,"f"),groups:u(this,We,"f"),strict:u(this,ht,"f"),strictCommands:u(this,pt,"f"),strictOptions:u(this,dt,"f"),completionCommand:u(this,ye,"f"),output:u(this,De,"f"),exitError:u(this,Ze,"f"),hasOutput:u(this,we,"f"),parsed:this.parsed,parseFn:u(this,xe,"f"),parseContext:u(this,ft,"f")}),u(this,W,"f").freeze(),u(this,se,"f").freeze(),u(this,ue,"f").freeze(),u(this,Se,"f").freeze()}[Io](){let e="",t;return/\b(node|iojs|electron)(\.exe)?$/.test(u(this,T,"f").process.argv()[0])?t=u(this,T,"f").process.argv().slice(1,2):t=u(this,T,"f").process.argv().slice(0,1),e=t.map(i=>{let r=this[Ho](u(this,ct,"f"),i);return i.match(/^(\/|([a-zA-Z]:)?\\)/)&&r.length<i.length?r:i}).join(" ").trim(),u(this,T,"f").getEnv("_")&&u(this,T,"f").getProcessArgvBin()===u(this,T,"f").getEnv("_")&&(e=u(this,T,"f").getEnv("_").replace(`${u(this,T,"f").path.dirname(u(this,T,"f").process.execPath())}/`,"")),e}[mt](){return u(this,Tn,"f")}[Po](){return u(this,Wn,"f")}[qi](){if(!u(this,lt,"f"))return;let e=u(this,T,"f").getEnv("LC_ALL")||u(this,T,"f").getEnv("LC_MESSAGES")||u(this,T,"f").getEnv("LANG")||u(this,T,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Mo](){return this[Ui]().version||"unknown"}[To](e){let t=e["--"]?e["--"]:e._;for(let i=0,r;(r=t[i])!==void 0;i++)u(this,T,"f").Parser.looksLikeNumber(r)&&Number.isSafeInteger(Math.floor(parseFloat(`${r}`)))&&(t[i]=Number(r));return e}[Ui](e){let t=e||"*";if(u(this,Tt,"f")[t])return u(this,Tt,"f")[t];let i={};try{let r=e||u(this,T,"f").mainFilename;!e&&u(this,T,"f").path.extname(r)&&(r=u(this,T,"f").path.dirname(r));let o=u(this,T,"f").findUp(r,(s,a)=>{if(a.includes("package.json"))return"package.json"});Ce(o,void 0,u(this,T,"f")),i=JSON.parse(u(this,T,"f").readFileSync(o,"utf8"))}catch{}return u(this,Tt,"f")[t]=i||{},u(this,Tt,"f")[t]}[et](e,t){t=[].concat(t),t.forEach(i=>{i=this[Gi](i),u(this,j,"f")[e].push(i)})}[Nt](e,t,i,r){this[Hi](e,t,i,r,(o,s,a)=>{u(this,j,"f")[o][s]=a})}[Vi](e,t,i,r){this[Hi](e,t,i,r,(o,s,a)=>{u(this,j,"f")[o][s]=(u(this,j,"f")[o][s]||[]).concat(a)})}[Hi](e,t,i,r,o){if(Array.isArray(i))i.forEach(s=>{e(s,r)});else if((s=>typeof s=="object")(i))for(let s of It(i))e(s,i[s]);else o(t,this[Gi](i),r)}[Gi](e){return e==="__proto__"?"___proto___":e}[Yi](e,t){return this[Nt](this[Yi].bind(this),"key",e,t),this}[Ji](){var e,t,i,r,o,s,a,f,D,h,c,p;let C=u(this,In,"f").pop();Ce(C,void 0,u(this,T,"f"));let E;e=this,t=this,i=this,r=this,o=this,s=this,a=this,f=this,D=this,h=this,c=this,p=this,{options:{set value(b){v(e,j,b,"f")}}.value,configObjects:E,exitProcess:{set value(b){v(t,_e,b,"f")}}.value,groups:{set value(b){v(i,We,b,"f")}}.value,output:{set value(b){v(r,De,b,"f")}}.value,exitError:{set value(b){v(o,Ze,b,"f")}}.value,hasOutput:{set value(b){v(s,we,b,"f")}}.value,parsed:this.parsed,strict:{set value(b){v(a,ht,b,"f")}}.value,strictCommands:{set value(b){v(f,pt,b,"f")}}.value,strictOptions:{set value(b){v(D,dt,b,"f")}}.value,completionCommand:{set value(b){v(h,ye,b,"f")}}.value,parseFn:{set value(b){v(c,xe,b,"f")}}.value,parseContext:{set value(b){v(p,ft,b,"f")}}.value}=C,u(this,j,"f").configObjects=E,u(this,W,"f").unfreeze(),u(this,se,"f").unfreeze(),u(this,ue,"f").unfreeze(),u(this,Se,"f").unfreeze()}[No](e,t){return at(t,i=>(e(i),i))}getInternalMethods(){return{getCommandInstance:this[Wo].bind(this),getContext:this[Ro].bind(this),getHasOutput:this[Lo].bind(this),getLoggerInstance:this[ko].bind(this),getParseContext:this[zo].bind(this),getParserConfiguration:this[mt].bind(this),getUsageConfiguration:this[Po].bind(this),getUsageInstance:this[qo].bind(this),getValidationInstance:this[Uo].bind(this),hasParseCallback:this[Rn].bind(this),isGlobalContext:this[Vo].bind(this),postProcess:this[gt].bind(this),reset:this[Ki].bind(this),runValidation:this[Qi].bind(this),runYargsParserAndExecuteCommands:this[Gt].bind(this),setHasOutput:this[Go].bind(this)}}[Wo](){return u(this,ue,"f")}[Ro](){return u(this,Ht,"f")}[Lo](){return u(this,we,"f")}[ko](){return u(this,Mt,"f")}[zo](){return u(this,ft,"f")||{}}[qo](){return u(this,W,"f")}[Uo](){return u(this,se,"f")}[Rn](){return!!u(this,xe,"f")}[Vo](){return u(this,Pn,"f")}[gt](e,t,i,r){return i||J(e)||(t||(e=this[Oo](e)),(this[mt]()["parse-positional-numbers"]||this[mt]()["parse-positional-numbers"]===void 0)&&(e=this[To](e)),r&&(e=ut(e,this,u(this,Se,"f").getMiddleware(),!1))),e}[Ki](e={}){v(this,j,u(this,j,"f")||{},"f");let t={};t.local=u(this,j,"f").local||[],t.configObjects=u(this,j,"f").configObjects||[];let i={};t.local.forEach(s=>{i[s]=!0,(e[s]||[]).forEach(a=>{i[a]=!0})}),Object.assign(u(this,Dt,"f"),Object.keys(u(this,We,"f")).reduce((s,a)=>{let f=u(this,We,"f")[a].filter(D=>!(D in i));return f.length>0&&(s[a]=f),s},{})),v(this,We,{},"f");let r=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],o=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return r.forEach(s=>{t[s]=(u(this,j,"f")[s]||[]).filter(a=>!i[a])}),o.forEach(s=>{t[s]=Ke(u(this,j,"f")[s],a=>!i[a])}),t.envPrefix=u(this,j,"f").envPrefix,v(this,j,t,"f"),v(this,W,u(this,W,"f")?u(this,W,"f").reset(i):Eo(this,u(this,T,"f")),"f"),v(this,se,u(this,se,"f")?u(this,se,"f").reset(i):vo(this,u(this,W,"f"),u(this,T,"f")),"f"),v(this,ue,u(this,ue,"f")?u(this,ue,"f").reset():Co(u(this,W,"f"),u(this,se,"f"),u(this,Se,"f"),u(this,T,"f")),"f"),u(this,Oe,"f")||v(this,Oe,xo(this,u(this,W,"f"),u(this,ue,"f"),u(this,T,"f")),"f"),u(this,Se,"f").reset(),v(this,ye,null,"f"),v(this,De,"","f"),v(this,Ze,null,"f"),v(this,we,!1,"f"),this.parsed=!1,this}[Ho](e,t){return u(this,T,"f").path.relative(e,t)}[Gt](e,t,i,r=0,o=!1){let s=!!i||o;e=e||u(this,Xe,"f"),u(this,j,"f").__=u(this,T,"f").y18n.__,u(this,j,"f").configuration=this[mt]();let a=!!u(this,j,"f").configuration["populate--"],f=Object.assign({},u(this,j,"f").configuration,{"populate--":!0}),D=u(this,T,"f").Parser.detailed(e,Object.assign({},u(this,j,"f"),{configuration:{"parse-positional-numbers":!1,...f}})),h=Object.assign(D.argv,u(this,ft,"f")),c,p=D.aliases,C=!1,E=!1;Object.keys(h).forEach(b=>{b===u(this,je,"f")&&h[b]?C=!0:b===u(this,Re,"f")&&h[b]&&(E=!0)}),h.$0=this.$0,this.parsed=D,r===0&&u(this,W,"f").clearCachedHelpMessage();try{if(this[qi](),t)return this[gt](h,a,!!i,!1);u(this,je,"f")&&[u(this,je,"f")].concat(p[u(this,je,"f")]||[]).filter(U=>U.length>1).includes(""+h._[h._.length-1])&&(h._.pop(),C=!0),v(this,Pn,!1,"f");let b=u(this,ue,"f").getCommands(),g=u(this,Oe,"f").completionKey in h,B=C||g||o;if(h._.length){if(b.length){let N;for(let U=r||0,k;h._[U]!==void 0;U++)if(k=String(h._[U]),b.includes(k)&&k!==u(this,ye,"f")){let V=u(this,ue,"f").runCommand(k,this,D,U+1,o,C||E||o);return this[gt](V,a,!!i,!1)}else if(!N&&k!==u(this,ye,"f")){N=k;break}!u(this,ue,"f").hasDefaultCommand()&&u(this,Nn,"f")&&N&&!B&&u(this,se,"f").recommendCommands(N,b)}u(this,ye,"f")&&h._.includes(u(this,ye,"f"))&&!g&&(u(this,_e,"f")&&Qe(!0),this.showCompletionScript(),this.exit(0))}if(u(this,ue,"f").hasDefaultCommand()&&!B){let N=u(this,ue,"f").runCommand(null,this,D,0,o,C||E||o);return this[gt](N,a,!!i,!1)}if(g){u(this,_e,"f")&&Qe(!0),e=[].concat(e);let N=e.slice(e.indexOf(`--${u(this,Oe,"f").completionKey}`)+1);return u(this,Oe,"f").getCompletion(N,(U,k)=>{if(U)throw new Y(U.message);(k||[]).forEach(V=>{u(this,Mt,"f").log(V)}),this.exit(0)}),this[gt](h,!a,!!i,!1)}if(u(this,we,"f")||(C?(u(this,_e,"f")&&Qe(!0),s=!0,this.showHelp("log"),this.exit(0)):E&&(u(this,_e,"f")&&Qe(!0),s=!0,u(this,W,"f").showVersion("log"),this.exit(0))),!s&&u(this,j,"f").skipValidation.length>0&&(s=Object.keys(h).some(N=>u(this,j,"f").skipValidation.indexOf(N)>=0&&h[N]===!0)),!s){if(D.error)throw new Y(D.error.message);if(!g){let N=this[Qi](p,{},D.error);i||(c=ut(h,this,u(this,Se,"f").getMiddleware(),!0)),c=this[No](N,c??h),J(c)&&!i&&(c=c.then(()=>ut(h,this,u(this,Se,"f").getMiddleware(),!1)))}}}catch(b){if(b instanceof Y)u(this,W,"f").fail(b.message,b);else throw b}return this[gt](c??h,a,!!i,!0)}[Qi](e,t,i,r){let o={...this.getDemandedOptions()};return s=>{if(i)throw new Y(i.message);u(this,se,"f").nonOptionCount(s),u(this,se,"f").requiredArguments(s,o);let a=!1;u(this,pt,"f")&&(a=u(this,se,"f").unknownCommands(s)),u(this,ht,"f")&&!a?u(this,se,"f").unknownArguments(s,e,t,!!r):u(this,dt,"f")&&u(this,se,"f").unknownArguments(s,e,{},!1,!1),u(this,se,"f").limitedChoices(s),u(this,se,"f").implications(s),u(this,se,"f").conflicting(s)}}[Go](){v(this,we,!0,"f")}[Ct](e){if(typeof e=="string")u(this,j,"f").key[e]=!0;else for(let t of e)u(this,j,"f").key[t]=!0}};function Fo(n){return!!n&&typeof n.getInternalMethods=="function"}var lc=Yo(Do),Jo=lc;function fc(n,e){return Jo(n).strict().command("* <template> <outDir>","Create a new project powered by qwik",i=>i.positional("template",{type:"string",desc:"Starter template",choices:e}).positional("outDir",{type:"string",desc:"Directory of the project"}).option("force",{alias:"f",type:"boolean",default:!1,desc:"Overwrite target directory if it exists"}).option("installDeps",{alias:"i",default:!1,type:"boolean",desc:"Install dependencies"}).usage("npm create qwik@latest base ./my-project <options>")).argv}async function es(...n){let e=Ye(),t=await Ot("app"),i=t.standaloneTemplates.map(({id:p})=>p),r=fc(n,i),{force:o,installDeps:s,template:a}=r,f=r.outDir;rn(`Let's create a ${Lt(" Qwik App ")} \u2728 (v1.15.0)`),Dc()?f=process.cwd():(f=Cn(f),Xi.default.existsSync(f)&&Xi.default.readdirSync(f).length>0&&(o?await un(f):(ee.error(`Directory "${f}" already exists.`),ee.info("Please either remove this directory, choose another location or run the command again with '--force | -f' flag."),st(),process.exit(1))));let D=await _t({outDir:f,appId:a,pkgManager:e,templateManager:t}),h=wt(),c=!1;return s&&(c=await mn(async()=>await rt(e,f).install,{pkgManager:e,spinner:h})),gn(e,D,c),D}function Dc(){return hc()}function hc(){try{return process.cwd().startsWith("/home/projects/")}catch{}return!1}var kn=require("node:path");var Ln=ae(require("node:fs"));var ts=[["What's the best thing about a Boolean?","Even if you're wrong, you're only off by a bit."],["Why did the developer stay at home?","Because he couldn't find his keys."],["How many programmers does it take to change a lightbulb?","None that's a hardware problem"],["A user interface is like a joke.","If you have to explain it then it is not that good."],["['hip', 'hip']","(hip hip array)"],["A SQL query goes into a bar, walks up to two tables and asks:","'Can I JOIN you?'"],["Why did the developer go to therapy?","He had too many unresolved issues."],["Why do C# and Java developers keep breaking their keyboards?","Because they use a strongly typed language."],["What's the object-oriented way to become wealthy?","Inheritance"],["Where do programmers like to hangout?","The Foo Bar."],["Why do Java programmers wear glasses?","Because they don't C#"],["To understand what recursion is...","You must first understand what recursion is"],["The punchline often arrives before the set-up.","Do you know the problem with UDP jokes?"],["Why did the programmer quit his job?","Because he didn't get arrays."],["Why was the computer tired when it got home?","It had a hard drive."],["There are 10 types of people in this world...","Those who understand binary and those who don't"],["Why do programmers always mix up Halloween and Christmas?","Because Oct 31 == Dec 25"],["I was gonna tell you a joke about UDP...","...but you might not get it."],["Normal People: give me just a second","Developers: give me 1000 milliseconds!"],["Why do programmers prefer dark mode?","Because light attracts bugs."],["Why don't programmers like nature?","It has too many bugs."],["Why was the computer freezing?","It left its Windows open!"],["What did the Java code say to the C code?","You've got no class."],["Why do programmers prefer the outdoors?","Because it's free of bugs."],["Why do programmers love movies?","Because they can 'script' the ending."],["why do desert animals hate Qwik?","Because there's no hydration...."],["What can you do if you cannot push your git changes?","Use the --force, Luke"],["How did the developer announce he's getting married?","'She returned true!'"],["How many Prolog programmers does it take to change a lightbulb?","Yes."],["Why did the developer ground their kid?","They weren't telling the truthy"],["!false","It's funny 'cause it's true."],["Where did the parallel function wash its hands?","Async"],["How do functions break up?","They stop calling each other"],["Why did the functions stop calling each other?","Because they had constant arguments."],["What's the second movie about a database engineer called?","The SQL."],["What did the computer do at lunchtime?","NoSQL."],["Why doesn't Hollywood make more Big Data movies?","Had a byte!"],["What does a baby computer call his father?","Data!"],["I never tell the same joke twice","I have a DRY sense of humor."],["How do programming pirates pass method parameters?","ARRRRRGS."],["Why don't bachelors like Git?","Because they are afraid to commit."],["Why do astronauts use Linux?","They can't open Windows in space!"],["How do front end devs like their brownies?","GUI"],["What do hackers do on a boat?","Phishing."],["Why couldn't the HTML list be trusted?","There were LI's everywhere"],["To the person who invented zero:","Thank's for nothing!"],["What do you call a bee that lives in America?","A USB"],["want about to a race conditions hear joke?",""],["What is a Package Managers favorite holiday?","Dependency Day"],["Where do we get all of these dad jokes from?","A dad-a-base!"],["What advice do you give to a JS developer who has never played baseball?","Try catch."],["We don't have any DNS jokes, know why?","Because it may take 24 hours to get them"],["Why do Front-End Developers eat lunch alone?","Because they don't know how to join tables."],["How do you help JS errors?","You `console` them!"],["When do front end developers go out to eat?","On their lunch <br>."],["What do you call optimistic front-end developers?","Stack half-full developers."]];function Ko(){let n=Math.floor(Math.random()*ts.length);return ts[n]}async function ns(){let n=Ye(),e=await Ot("app"),t="./qwik-app";rn(`Let's create a ${Lt(" Qwik App ")} \u2728 (v1.15.0)`),await Ir(500);let i=await $s({message:`Where would you like to create your new project? ${Ge("(Use '.' or './' for current directory)")}`,placeholder:t})||t;He(i)&&(st("Operation cancelled."),process.exit(0));let r=e.getBaseApp();if(!r)throw new Error("Base app not found");let o=e.templates.filter(B=>B.id!==r.id).sort((B,N)=>B.name.localeCompare(N.name)),s=Cn(i.trim());r.target=s;let a=Wr(n,r);ee.info(`Creating new project in ${Lt(" "+s+" ")} ... \u{1F407}`);let f=null;if(Ln.default.existsSync(s)&&Ln.default.readdirSync(s).length>0){let B=await si({message:`Directory "./${(0,kn.relative)(process.cwd(),s)}" already exists and is not empty. What would you like to do?`,options:[{value:"exit",label:"Do not overwrite this directory and exit"},{value:"replace",label:"Remove contents of this directory"}]});(He(B)||B==="exit")&&(st("Operation cancelled."),process.exit(0)),B==="replace"&&(f=un(s))}let D=await si({message:"Select a starter",options:o.map(B=>{var N;return{label:B.name,value:B.id,hint:(N=B.pkgJson)==null?void 0:N.description}})});He(D)&&(st("Operation cancelled."),process.exit(0));let h=D,c=await sn({message:`Would you like to install ${n} dependencies?`,initialValue:!0});He(c)&&(st("Operation cancelled."),process.exit(0));let p=await sn({message:"Initialize a new git repository?",initialValue:!0});f&&await f;let C=c;if(!C)a.abort();else if(typeof a.success>"u")try{let B=await sn({message:"Finishing the install. Wanna hear a joke?",initialValue:!0});if(!He(B)&&B){let[N,U]=Ko();cn(ge(`${N.trim()}
|
|
164
|
-
${
|
|
160
|
+
`;var lr=class{constructor(e,t,n,r){var o,i,u;this.yargs=e,this.usage=t,this.command=n,this.shim=r,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(u=((o=this.shim.getEnv("SHELL"))===null||o===void 0?void 0:o.includes("zsh"))||((i=this.shim.getEnv("ZSH_NAME"))===null||i===void 0?void 0:i.includes("zsh")))!==null&&u!==void 0?u:!1}defaultCompletion(e,t,n,r){let o=this.command.getCommandHandlers();for(let u=0,c=e.length;u<c;++u)if(o[e[u]]&&o[e[u]].builder){let h=o[e[u]].builder;if(ks(h)){this.indexAfterLastReset=u+1;let D=this.yargs.getInternalMethods().reset();return h(D,!0),D.argv}}let i=[];this.commandCompletions(i,e,n),this.optionCompletions(i,e,t,n),this.choicesFromOptionsCompletions(i,e,t,n),this.choicesFromPositionalsCompletions(i,e,t,n),r(null,i)}commandCompletions(e,t,n){let r=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&r[r.length-1]!==n&&!this.previousArgHasChoices(t)&&this.usage.getCommands().forEach(o=>{let i=dt(o[0]).cmd;if(t.indexOf(i)===-1)if(!this.zshShell)e.push(i);else{let u=o[1]||"";e.push(i.replace(/:/g,"\\:")+":"+u)}})}optionCompletions(e,t,n,r){if((r.match(/^-/)||r===""&&e.length===0)&&!this.previousArgHasChoices(t)){let o=this.yargs.getOptions(),i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(o.key).forEach(u=>{let c=!!o.configuration["boolean-negation"]&&o.boolean.includes(u);!i.includes(u)&&!o.hiddenOptions.includes(u)&&!this.argsContainKey(t,u,c)&&this.completeOptionKey(u,e,r,c&&!!o.default[u])})}}choicesFromOptionsCompletions(e,t,n,r){if(this.previousArgHasChoices(t)){let o=this.getPreviousArgChoices(t);o&&o.length>0&&e.push(...o.map(i=>i.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,t,n,r){if(r===""&&e.length>0&&this.previousArgHasChoices(t))return;let o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],i=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),u=o[n._.length-i-1];if(!u)return;let c=this.yargs.getOptions().choices[u]||[];for(let h of c)h.startsWith(r)&&e.push(h.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let t=e[e.length-1],n="";if(!t.startsWith("-")&&e.length>1&&(n=t,t=e[e.length-2]),!t.startsWith("-"))return;let r=t.replace(/^-+/,""),o=this.yargs.getOptions(),i=[r,...this.yargs.getAliases()[r]||[]],u;for(let c of i)if(Object.prototype.hasOwnProperty.call(o.key,c)&&Array.isArray(o.choices[c])){u=o.choices[c];break}if(u)return u.filter(c=>!n||c.startsWith(n))}previousArgHasChoices(e){let t=this.getPreviousArgChoices(e);return t!==void 0&&t.length>0}argsContainKey(e,t,n){let r=o=>e.indexOf((/^[^0-9]$/.test(o)?"-":"--")+o)!==-1;if(r(t)||n&&r(`no-${t}`))return!0;if(this.aliases){for(let o of this.aliases[t])if(r(o))return!0}return!1}completeOptionKey(e,t,n,r){var o,i,u,c;let h=e;if(this.zshShell){let C=this.usage.getDescriptions(),F=(i=(o=this===null||this===void 0?void 0:this.aliases)===null||o===void 0?void 0:o[e])===null||i===void 0?void 0:i.find(I=>{let x=C[I];return typeof x=="string"&&x.length>0}),y=F?C[F]:void 0,p=(c=(u=C[e])!==null&&u!==void 0?u:y)!==null&&c!==void 0?c:"";h=`${e.replace(/:/g,"\\:")}:${p.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let D=C=>/^--/.test(C),l=C=>/^[^0-9]$/.test(C),d=!D(n)&&l(e)?"-":"--";t.push(d+h),r&&t.push(d+"no-"+h)}customCompletion(e,t,n,r){if(ve(this.customCompletionFunction,null,this.shim),Nh(this.customCompletionFunction)){let o=this.customCompletionFunction(n,t);return Q(o)?o.then(i=>{this.shim.process.nextTick(()=>{r(null,i)})}).catch(i=>{this.shim.process.nextTick(()=>{r(i,void 0)})}):r(null,o)}else return Ih(this.customCompletionFunction)?this.customCompletionFunction(n,t,(o=r)=>this.defaultCompletion(e,t,n,o),o=>{r(null,o)}):this.customCompletionFunction(n,t,o=>{r(null,o)})}getCompletion(e,t){let n=e.length?e[e.length-1]:"",r=this.yargs.parse(e,!0),o=this.customCompletionFunction?i=>this.customCompletion(e,i,n,t):i=>this.defaultCompletion(e,i,n,t);return Q(r)?r.then(o):o(r)}generateCompletionScript(e,t){let n=this.zshShell?ha:la,r=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,r),n=n.replace(/{{completion_command}}/g,t),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}};function fa(s,e,t,n){return new lr(s,e,t,n)}function Nh(s){return s.length<3}function Ih(s){return s.length>3}function Da(s,e){if(s.length===0)return e.length;if(e.length===0)return s.length;let t=[],n;for(n=0;n<=e.length;n++)t[n]=[n];let r;for(r=0;r<=s.length;r++)t[0][r]=r;for(n=1;n<=e.length;n++)for(r=1;r<=s.length;r++)e.charAt(n-1)===s.charAt(r-1)?t[n][r]=t[n-1][r-1]:n>1&&r>1&&e.charAt(n-2)===s.charAt(r-1)&&e.charAt(n-1)===s.charAt(r-2)?t[n][r]=t[n-2][r-2]+1:t[n][r]=Math.min(t[n-1][r-1]+1,Math.min(t[n][r-1]+1,t[n-1][r]+1));return t[e.length][s.length]}var pa=["$0","--","_"];function da(s,e,t){let n=t.y18n.__,r=t.y18n.__n,o={};o.nonOptionCount=function(l){let d=s.getDemandedCommands(),F=l._.length+(l["--"]?l["--"].length:0)-s.getInternalMethods().getContext().commands.length;d._&&(F<d._.min||F>d._.max)&&(F<d._.min?d._.minMsg!==void 0?e.fail(d._.minMsg?d._.minMsg.replace(/\$0/g,F.toString()).replace(/\$1/,d._.min.toString()):null):e.fail(r("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",F,F.toString(),d._.min.toString())):F>d._.max&&(d._.maxMsg!==void 0?e.fail(d._.maxMsg?d._.maxMsg.replace(/\$0/g,F.toString()).replace(/\$1/,d._.max.toString()):null):e.fail(r("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",F,F.toString(),d._.max.toString()))))},o.positionalCount=function(l,d){d<l&&e.fail(r("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",d,d+"",l+""))},o.requiredArguments=function(l,d){let C=null;for(let F of Object.keys(d))(!Object.prototype.hasOwnProperty.call(l,F)||typeof l[F]>"u")&&(C=C||{},C[F]=d[F]);if(C){let F=[];for(let p of Object.keys(C)){let I=C[p];I&&F.indexOf(I)<0&&F.push(I)}let y=F.length?`
|
|
161
|
+
${F.join(`
|
|
162
|
+
`)}`:"";e.fail(r("Missing required argument: %s","Missing required arguments: %s",Object.keys(C).length,Object.keys(C).join(", ")+y))}},o.unknownArguments=function(l,d,C,F,y=!0){var p;let I=s.getInternalMethods().getCommandInstance().getCommands(),x=[],k=s.getInternalMethods().getContext();if(Object.keys(l).forEach(O=>{!pa.includes(O)&&!Object.prototype.hasOwnProperty.call(C,O)&&!Object.prototype.hasOwnProperty.call(s.getInternalMethods().getParseContext(),O)&&!o.isValidAndSomeAliasIsNotNew(O,d)&&x.push(O)}),y&&(k.commands.length>0||I.length>0||F)&&l._.slice(k.commands.length).forEach(O=>{I.includes(""+O)||x.push(""+O)}),y){let G=((p=s.getDemandedCommands()._)===null||p===void 0?void 0:p.max)||0,Oe=k.commands.length+G;Oe<l._.length&&l._.slice(Oe).forEach(ae=>{ae=String(ae),!k.commands.includes(ae)&&!x.includes(ae)&&x.push(ae)})}x.length&&e.fail(r("Unknown argument: %s","Unknown arguments: %s",x.length,x.map(O=>O.trim()?O:`"${O}"`).join(", ")))},o.unknownCommands=function(l){let d=s.getInternalMethods().getCommandInstance().getCommands(),C=[],F=s.getInternalMethods().getContext();return(F.commands.length>0||d.length>0)&&l._.slice(F.commands.length).forEach(y=>{d.includes(""+y)||C.push(""+y)}),C.length>0?(e.fail(r("Unknown command: %s","Unknown commands: %s",C.length,C.join(", "))),!0):!1},o.isValidAndSomeAliasIsNotNew=function(l,d){if(!Object.prototype.hasOwnProperty.call(d,l))return!1;let C=s.parsed.newAliases;return[l,...d[l]].some(F=>!Object.prototype.hasOwnProperty.call(C,F)||!C[l])},o.limitedChoices=function(l){let d=s.getOptions(),C={};if(!Object.keys(d.choices).length)return;Object.keys(l).forEach(p=>{pa.indexOf(p)===-1&&Object.prototype.hasOwnProperty.call(d.choices,p)&&[].concat(l[p]).forEach(I=>{d.choices[p].indexOf(I)===-1&&I!==void 0&&(C[p]=(C[p]||[]).concat(I))})});let F=Object.keys(C);if(!F.length)return;let y=n("Invalid values:");F.forEach(p=>{y+=`
|
|
163
|
+
${n("Argument: %s, Given: %s, Choices: %s",p,e.stringifiedValues(C[p]),e.stringifiedValues(d.choices[p]))}`}),e.fail(y)};let i={};o.implies=function(l,d){T("<string|object> [array|number|string]",[l,d],arguments.length),typeof l=="object"?Object.keys(l).forEach(C=>{o.implies(C,l[C])}):(s.global(l),i[l]||(i[l]=[]),Array.isArray(d)?d.forEach(C=>o.implies(l,C)):(ve(d,void 0,t),i[l].push(d)))},o.getImplied=function(){return i};function u(D,l){let d=Number(l);return l=isNaN(d)?l:d,typeof l=="number"?l=D._.length>=l:l.match(/^--no-.+/)?(l=l.match(/^--no-(.+)/)[1],l=!Object.prototype.hasOwnProperty.call(D,l)):l=Object.prototype.hasOwnProperty.call(D,l),l}o.implications=function(l){let d=[];if(Object.keys(i).forEach(C=>{let F=C;(i[C]||[]).forEach(y=>{let p=F,I=y;p=u(l,p),y=u(l,y),p&&!y&&d.push(` ${F} -> ${I}`)})}),d.length){let C=`${n("Implications failed:")}
|
|
164
|
+
`;d.forEach(F=>{C+=F}),e.fail(C)}};let c={};o.conflicts=function(l,d){T("<string|object> [array|string]",[l,d],arguments.length),typeof l=="object"?Object.keys(l).forEach(C=>{o.conflicts(C,l[C])}):(s.global(l),c[l]||(c[l]=[]),Array.isArray(d)?d.forEach(C=>o.conflicts(l,C)):c[l].push(d))},o.getConflicting=()=>c,o.conflicting=function(l){Object.keys(l).forEach(d=>{c[d]&&c[d].forEach(C=>{C&&l[d]!==void 0&&l[C]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",d,C))})}),s.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(c).forEach(d=>{c[d].forEach(C=>{C&&l[t.Parser.camelCase(d)]!==void 0&&l[t.Parser.camelCase(C)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",d,C))})})},o.recommendCommands=function(l,d){d=d.sort((p,I)=>I.length-p.length);let F=null,y=1/0;for(let p=0,I;(I=d[p])!==void 0;p++){let x=Da(l,I);x<=3&&x<y&&(y=x,F=I)}F&&e.fail(n("Did you mean %s?",F))},o.reset=function(l){return i=mt(i,d=>!l[d]),c=mt(c,d=>!l[d]),o};let h=[];return o.freeze=function(){h.push({implied:i,conflicting:c})},o.unfreeze=function(){let l=h.pop();ve(l,void 0,t),{implied:i,conflicting:c}=l},o}var hr=[],An;function Ms(s,e,t,n){An=n;let r={};if(Object.prototype.hasOwnProperty.call(s,"extends")){if(typeof s.extends!="string")return r;let o=/\.json|\..*rc$/.test(s.extends),i=null;if(o)i=kh(e,s.extends);else try{i=require.resolve(s.extends)}catch{return s}Sh(i),hr.push(i),r=o?JSON.parse(An.readFileSync(i,"utf8")):require(s.extends),delete s.extends,r=Ms(r,An.path.dirname(i),t,An)}return hr=[],t?ma(r,s):Object.assign({},r,s)}function Sh(s){if(hr.indexOf(s)>-1)throw new K(`Circular extended configurations: '${s}'.`)}function kh(s,e){return An.path.resolve(s,e)}function ma(s,e){let t={};function n(r){return r&&typeof r=="object"&&!Array.isArray(r)}Object.assign(t,s);for(let r of Object.keys(e))n(e[r])&&n(t[r])?t[r]=ma(s[r],e[r]):t[r]=e[r];return t}var $=function(s,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?s!==e||!r:!e.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(s,t):r?r.value=t:e.set(s,t),t},a=function(s,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?s!==e||!n:!e.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(s):n?n.value:e.get(s)},fe,Nt,On,Re,Ne,Ps,Ct,It,Js,Le,Rs,We,et,Ie,qe,Ls,fn,ge,S,Ws,qs,Se,St,Dn,kt,Et,Gs,J,jt,Mt,Pt,R,Hs,tt,ue;function ja(s){return(e=[],t=s.process.cwd(),n)=>{let r=new br(e,t,n,s);return Object.defineProperty(r,"argv",{get:()=>r.parse(),enumerable:!0}),r.help(),r.version(),r}}var ga=Symbol("copyDoubleDash"),Ca=Symbol("copyDoubleDash"),fr=Symbol("deleteFromParserHintObject"),Ea=Symbol("emitWarning"),ya=Symbol("freeze"),Fa=Symbol("getDollarZero"),Jt=Symbol("getParserConfiguration"),ba=Symbol("getUsageConfiguration"),Dr=Symbol("guessLocale"),wa=Symbol("guessVersion"),xa=Symbol("parsePositionalNumbers"),pr=Symbol("pkgUp"),yt=Symbol("populateParserHintArray"),pn=Symbol("populateParserHintSingleValueDictionary"),dr=Symbol("populateParserHintArrayDictionary"),mr=Symbol("populateParserHintDictionary"),gr=Symbol("sanitizeKey"),Cr=Symbol("setKey"),Er=Symbol("unfreeze"),va=Symbol("validateAsync"),Aa=Symbol("getCommandInstance"),Oa=Symbol("getContext"),Ta=Symbol("getHasOutput"),$a=Symbol("getLoggerInstance"),_a=Symbol("getParseContext"),Ba=Symbol("getUsageInstance"),Na=Symbol("getValidationInstance"),Us=Symbol("hasParseCallback"),Ia=Symbol("isGlobalContext"),Rt=Symbol("postProcess"),Sa=Symbol("rebase"),yr=Symbol("reset"),Tn=Symbol("runYargsParserAndExecuteCommands"),Fr=Symbol("runValidation"),ka=Symbol("setHasOutput"),Lt=Symbol("kTrackManuallySetKeys"),br=class{constructor(e=[],t,n,r){this.customScriptName=!1,this.parsed=!1,fe.set(this,void 0),Nt.set(this,void 0),On.set(this,{commands:[],fullCommands:[]}),Re.set(this,null),Ne.set(this,null),Ps.set(this,"show-hidden"),Ct.set(this,null),It.set(this,!0),Js.set(this,{}),Le.set(this,!0),Rs.set(this,[]),We.set(this,void 0),et.set(this,{}),Ie.set(this,!1),qe.set(this,null),Ls.set(this,!0),fn.set(this,void 0),ge.set(this,""),S.set(this,void 0),Ws.set(this,void 0),qs.set(this,{}),Se.set(this,null),St.set(this,null),Dn.set(this,{}),kt.set(this,{}),Et.set(this,void 0),Gs.set(this,!1),J.set(this,void 0),jt.set(this,!1),Mt.set(this,!1),Pt.set(this,!1),R.set(this,void 0),Hs.set(this,{}),tt.set(this,null),ue.set(this,void 0),$(this,J,r,"f"),$(this,Et,e,"f"),$(this,Nt,t,"f"),$(this,Ws,n,"f"),$(this,We,new Ss(this),"f"),this.$0=this[Fa](),this[yr](),$(this,fe,a(this,fe,"f"),"f"),$(this,R,a(this,R,"f"),"f"),$(this,ue,a(this,ue,"f"),"f"),$(this,S,a(this,S,"f"),"f"),a(this,S,"f").showHiddenOpt=a(this,Ps,"f"),$(this,fn,this[Ca](),"f")}addHelpOpt(e,t){let n="help";return T("[string|boolean] [string]",[e,t],arguments.length),a(this,qe,"f")&&(this[fr](a(this,qe,"f")),$(this,qe,null,"f")),e===!1&&t===void 0?this:($(this,qe,typeof e=="string"?e:n,"f"),this.boolean(a(this,qe,"f")),this.describe(a(this,qe,"f"),t||a(this,R,"f").deferY18nLookup("Show help")),this)}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if(T("[string|boolean] [string]",[e,t],arguments.length),e===!1&&t===void 0)return this;let n=typeof e=="string"?e:a(this,Ps,"f");return this.boolean(n),this.describe(n,t||a(this,R,"f").deferY18nLookup("Show hidden options")),a(this,S,"f").showHiddenOpt=n,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return T("<object|string|array> [string|array]",[e,t],arguments.length),this[dr](this.alias.bind(this),"alias",e,t),this}array(e){return T("<array|string>",[e],arguments.length),this[yt]("array",e),this[Lt](e),this}boolean(e){return T("<array|string>",[e],arguments.length),this[yt]("boolean",e),this[Lt](e),this}check(e,t){return T("<function> [boolean]",[e,t],arguments.length),this.middleware((n,r)=>Bt(()=>e(n,r.getOptions()),o=>(o?(typeof o=="string"||o instanceof Error)&&a(this,R,"f").fail(o.toString(),o):a(this,R,"f").fail(a(this,J,"f").y18n.__("Argument check failed: %s",e.toString())),n),o=>(a(this,R,"f").fail(o.message?o.message:o.toString(),o),n)),!1,t),this}choices(e,t){return T("<object|string|array> [string|array]",[e,t],arguments.length),this[dr](this.choices.bind(this),"choices",e,t),this}coerce(e,t){if(T("<object|string|array> [function]",[e,t],arguments.length),Array.isArray(e)){if(!t)throw new K("coerce callback must be provided");for(let n of e)this.coerce(n,t);return this}else if(typeof e=="object"){for(let n of Object.keys(e))this.coerce(n,e[n]);return this}if(!t)throw new K("coerce callback must be provided");return a(this,S,"f").key[e]=!0,a(this,We,"f").addCoerceMiddleware((n,r)=>{let o;return Object.prototype.hasOwnProperty.call(n,e)?Bt(()=>(o=r.getAliases(),t(n[e])),u=>{n[e]=u;let c=r.getInternalMethods().getParserConfiguration()["strip-aliased"];if(o[e]&&c!==!0)for(let h of o[e])n[h]=u;return n},u=>{throw new K(u.message)}):n},e),this}conflicts(e,t){return T("<string|object> [string|array]",[e,t],arguments.length),a(this,ue,"f").conflicts(e,t),this}config(e="config",t,n){return T("[object|string] [string|function] [function]",[e,t,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=Ms(e,a(this,Nt,"f"),this[Jt]()["deep-merge-config"]||!1,a(this,J,"f")),a(this,S,"f").configObjects=(a(this,S,"f").configObjects||[]).concat(e),this):(typeof t=="function"&&(n=t,t=void 0),this.describe(e,t||a(this,R,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(r=>{a(this,S,"f").config[r]=n||!0}),this)}completion(e,t,n){return T("[string] [string|boolean|function] [function]",[e,t,n],arguments.length),typeof t=="function"&&(n=t,t=void 0),$(this,Ne,e||a(this,Ne,"f")||"completion","f"),!t&&t!==!1&&(t="generate completion script"),this.command(a(this,Ne,"f"),t),n&&a(this,Re,"f").registerFunction(n),this}command(e,t,n,r,o,i){return T("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,t,n,r,o,i],arguments.length),a(this,fe,"f").addHandler(e,t,n,r,o,i),this}commands(e,t,n,r,o,i){return this.command(e,t,n,r,o,i)}commandDir(e,t){T("<string> [object]",[e,t],arguments.length);let n=a(this,Ws,"f")||a(this,J,"f").require;return a(this,fe,"f").addDirectory(e,n,a(this,J,"f").getCallerFile(),t),this}count(e){return T("<array|string>",[e],arguments.length),this[yt]("count",e),this[Lt](e),this}default(e,t,n){return T("<object|string|array> [*] [string]",[e,t,n],arguments.length),n&&(or(e,a(this,J,"f")),a(this,S,"f").defaultDescription[e]=n),typeof t=="function"&&(or(e,a(this,J,"f")),a(this,S,"f").defaultDescription[e]||(a(this,S,"f").defaultDescription[e]=a(this,R,"f").functionDescription(t)),t=t.call()),this[pn](this.default.bind(this),"default",e,t),this}defaults(e,t,n){return this.default(e,t,n)}demandCommand(e=1,t,n,r){return T("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,t,n,r],arguments.length),typeof t!="number"&&(n=t,t=1/0),this.global("_",!1),a(this,S,"f").demandedCommands._={min:e,max:t,minMsg:n,maxMsg:r},this}demand(e,t,n){return Array.isArray(t)?(t.forEach(r=>{ve(n,!0,a(this,J,"f")),this.demandOption(r,n)}),t=1/0):typeof t!="number"&&(n=t,t=1/0),typeof e=="number"?(ve(n,!0,a(this,J,"f")),this.demandCommand(e,t,n,n)):Array.isArray(e)?e.forEach(r=>{ve(n,!0,a(this,J,"f")),this.demandOption(r,n)}):typeof n=="string"?this.demandOption(e,n):(n===!0||typeof n>"u")&&this.demandOption(e),this}demandOption(e,t){return T("<object|string|array> [string]",[e,t],arguments.length),this[pn](this.demandOption.bind(this),"demandedOptions",e,t),this}deprecateOption(e,t){return T("<string> [string|boolean]",[e,t],arguments.length),a(this,S,"f").deprecatedOptions[e]=t,this}describe(e,t){return T("<object|string|array> [string]",[e,t],arguments.length),this[Cr](e,!0),a(this,R,"f").describe(e,t),this}detectLocale(e){return T("<boolean>",[e],arguments.length),$(this,It,e,"f"),this}env(e){return T("[string|boolean]",[e],arguments.length),e===!1?delete a(this,S,"f").envPrefix:a(this,S,"f").envPrefix=e||"",this}epilogue(e){return T("<string>",[e],arguments.length),a(this,R,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return T("<string|array> [string]",[e,t],arguments.length),Array.isArray(e)?e.forEach(n=>this.example(...n)):a(this,R,"f").example(e,t),this}exit(e,t){$(this,Ie,!0,"f"),$(this,Ct,t,"f"),a(this,Le,"f")&&a(this,J,"f").process.exit(e)}exitProcess(e=!0){return T("[boolean]",[e],arguments.length),$(this,Le,e,"f"),this}fail(e){if(T("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new K("Invalid first argument. Expected function or boolean 'false'");return a(this,R,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return T("<array> [function]",[e,t],arguments.length),t?a(this,Re,"f").getCompletion(e,t):new Promise((n,r)=>{a(this,Re,"f").getCompletion(e,(o,i)=>{o?r(o):n(i)})})}getDemandedOptions(){return T([],0),a(this,S,"f").demandedOptions}getDemandedCommands(){return T([],0),a(this,S,"f").demandedCommands}getDeprecatedOptions(){return T([],0),a(this,S,"f").deprecatedOptions}getDetectLocale(){return a(this,It,"f")}getExitProcess(){return a(this,Le,"f")}getGroups(){return Object.assign({},a(this,et,"f"),a(this,kt,"f"))}getHelp(){if($(this,Ie,!0,"f"),!a(this,R,"f").hasCachedHelpMessage()){if(!this.parsed){let t=this[Tn](a(this,Et,"f"),void 0,void 0,0,!0);if(Q(t))return t.then(()=>a(this,R,"f").help())}let e=a(this,fe,"f").runDefaultBuilderOn(this);if(Q(e))return e.then(()=>a(this,R,"f").help())}return Promise.resolve(a(this,R,"f").help())}getOptions(){return a(this,S,"f")}getStrict(){return a(this,jt,"f")}getStrictCommands(){return a(this,Mt,"f")}getStrictOptions(){return a(this,Pt,"f")}global(e,t){return T("<string|array> [boolean]",[e,t],arguments.length),e=[].concat(e),t!==!1?a(this,S,"f").local=a(this,S,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{a(this,S,"f").local.includes(n)||a(this,S,"f").local.push(n)}),this}group(e,t){T("<string|array> <string>",[e,t],arguments.length);let n=a(this,kt,"f")[t]||a(this,et,"f")[t];a(this,kt,"f")[t]&&delete a(this,kt,"f")[t];let r={};return a(this,et,"f")[t]=(n||[]).concat(e).filter(o=>r[o]?!1:r[o]=!0),this}hide(e){return T("<string>",[e],arguments.length),a(this,S,"f").hiddenOptions.push(e),this}implies(e,t){return T("<string|object> [number|string|array]",[e,t],arguments.length),a(this,ue,"f").implies(e,t),this}locale(e){return T("[string]",[e],arguments.length),e===void 0?(this[Dr](),a(this,J,"f").y18n.getLocale()):($(this,It,!1,"f"),a(this,J,"f").y18n.setLocale(e),this)}middleware(e,t,n){return a(this,We,"f").addMiddleware(e,!!t,n)}nargs(e,t){return T("<string|object|array> [number]",[e,t],arguments.length),this[pn](this.nargs.bind(this),"narg",e,t),this}normalize(e){return T("<array|string>",[e],arguments.length),this[yt]("normalize",e),this}number(e){return T("<array|string>",[e],arguments.length),this[yt]("number",e),this[Lt](e),this}option(e,t){if(T("<string|object> [object]",[e,t],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof t!="object"&&(t={}),this[Lt](e),a(this,tt,"f")&&(e==="version"||(t==null?void 0:t.alias)==="version")&&this[Ea](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
|
|
165
|
+
`),void 0,"versionWarning"),a(this,S,"f").key[e]=!0,t.alias&&this.alias(e,t.alias);let n=t.deprecate||t.deprecated;n&&this.deprecateOption(e,n);let r=t.demand||t.required||t.require;r&&this.demand(e,r),t.demandOption&&this.demandOption(e,typeof t.demandOption=="string"?t.demandOption:void 0),t.conflicts&&this.conflicts(e,t.conflicts),"default"in t&&this.default(e,t.default),t.implies!==void 0&&this.implies(e,t.implies),t.nargs!==void 0&&this.nargs(e,t.nargs),t.config&&this.config(e,t.configParser),t.normalize&&this.normalize(e),t.choices&&this.choices(e,t.choices),t.coerce&&this.coerce(e,t.coerce),t.group&&this.group(e,t.group),(t.boolean||t.type==="boolean")&&(this.boolean(e),t.alias&&this.boolean(t.alias)),(t.array||t.type==="array")&&(this.array(e),t.alias&&this.array(t.alias)),(t.number||t.type==="number")&&(this.number(e),t.alias&&this.number(t.alias)),(t.string||t.type==="string")&&(this.string(e),t.alias&&this.string(t.alias)),(t.count||t.type==="count")&&this.count(e),typeof t.global=="boolean"&&this.global(e,t.global),t.defaultDescription&&(a(this,S,"f").defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let o=t.describe||t.description||t.desc,i=a(this,R,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(i,e)||typeof o=="string")&&this.describe(e,o),t.hidden&&this.hide(e),t.requiresArg&&this.requiresArg(e)}return this}options(e,t){return this.option(e,t)}parse(e,t,n){T("[string|array] [function|boolean|object] [function]",[e,t,n],arguments.length),this[ya](),typeof e>"u"&&(e=a(this,Et,"f")),typeof t=="object"&&($(this,St,t,"f"),t=n),typeof t=="function"&&($(this,Se,t,"f"),t=!1),t||$(this,Et,e,"f"),a(this,Se,"f")&&$(this,Le,!1,"f");let r=this[Tn](e,!!t),o=this.parsed;return a(this,Re,"f").setParsed(this.parsed),Q(r)?r.then(i=>(a(this,Se,"f")&&a(this,Se,"f").call(this,a(this,Ct,"f"),i,a(this,ge,"f")),i)).catch(i=>{throw a(this,Se,"f")&&a(this,Se,"f")(i,this.parsed.argv,a(this,ge,"f")),i}).finally(()=>{this[Er](),this.parsed=o}):(a(this,Se,"f")&&a(this,Se,"f").call(this,a(this,Ct,"f"),r,a(this,ge,"f")),this[Er](),this.parsed=o,r)}parseAsync(e,t,n){let r=this.parse(e,t,n);return Q(r)?r:Promise.resolve(r)}parseSync(e,t,n){let r=this.parse(e,t,n);if(Q(r))throw new K(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return r}parserConfiguration(e){return T("<object>",[e],arguments.length),$(this,qs,e,"f"),this}pkgConf(e,t){T("<string> [string]",[e,t],arguments.length);let n=null,r=this[pr](t||a(this,Nt,"f"));return r[e]&&typeof r[e]=="object"&&(n=Ms(r[e],t||a(this,Nt,"f"),this[Jt]()["deep-merge-config"]||!1,a(this,J,"f")),a(this,S,"f").configObjects=(a(this,S,"f").configObjects||[]).concat(n)),this}positional(e,t){T("<string> <object>",[e,t],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];t=mt(t,(i,u)=>i==="type"&&!["string","number","boolean"].includes(u)?!1:n.includes(i));let r=a(this,On,"f").fullCommands[a(this,On,"f").fullCommands.length-1],o=r?a(this,fe,"f").cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return ln(o).forEach(i=>{let u=o[i];Array.isArray(u)?u.indexOf(e)!==-1&&(t[i]=!0):u[e]&&!(i in t)&&(t[i]=u[e])}),this.group(e,a(this,R,"f").getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return T("[boolean]",[e],arguments.length),$(this,Gs,e,"f"),this}required(e,t,n){return this.demand(e,t,n)}require(e,t,n){return this.demand(e,t,n)}requiresArg(e){return T("<array|string|object> [number]",[e],arguments.length),typeof e=="string"&&a(this,S,"f").narg[e]?this:(this[pn](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,t){return T("[string] [string]",[e,t],arguments.length),e=e||this.$0,a(this,fn,"f").log(a(this,Re,"f").generateCompletionScript(e,t||a(this,Ne,"f")||"completion")),this}showHelp(e){if(T("[string|function]",[e],arguments.length),$(this,Ie,!0,"f"),!a(this,R,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[Tn](a(this,Et,"f"),void 0,void 0,0,!0);if(Q(n))return n.then(()=>{a(this,R,"f").showHelp(e)}),this}let t=a(this,fe,"f").runDefaultBuilderOn(this);if(Q(t))return t.then(()=>{a(this,R,"f").showHelp(e)}),this}return a(this,R,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return T("[boolean|string] [string]",[e,t],arguments.length),a(this,R,"f").showHelpOnFail(e,t),this}showVersion(e){return T("[string|function]",[e],arguments.length),a(this,R,"f").showVersion(e),this}skipValidation(e){return T("<array|string>",[e],arguments.length),this[yt]("skipValidation",e),this}strict(e){return T("[boolean]",[e],arguments.length),$(this,jt,e!==!1,"f"),this}strictCommands(e){return T("[boolean]",[e],arguments.length),$(this,Mt,e!==!1,"f"),this}strictOptions(e){return T("[boolean]",[e],arguments.length),$(this,Pt,e!==!1,"f"),this}string(e){return T("<array|string>",[e],arguments.length),this[yt]("string",e),this[Lt](e),this}terminalWidth(){return T([],0),a(this,J,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return T("<object>",[e],arguments.length),$(this,It,!1,"f"),a(this,J,"f").y18n.updateLocale(e),this}usage(e,t,n,r){if(T("<string|null|undefined> [string|boolean] [function|object] [function]",[e,t,n,r],arguments.length),t!==void 0){if(ve(e,null,a(this,J,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,t,n,r);throw new K(".usage() description must start with $0 if being used as alias for .command()")}else return a(this,R,"f").usage(e),this}usageConfiguration(e){return T("<object>",[e],arguments.length),$(this,Hs,e,"f"),this}version(e,t,n){let r="version";if(T("[boolean|string] [string] [string]",[e,t,n],arguments.length),a(this,tt,"f")&&(this[fr](a(this,tt,"f")),a(this,R,"f").version(void 0),$(this,tt,null,"f")),arguments.length===0)n=this[wa](),e=r;else if(arguments.length===1){if(e===!1)return this;n=e,e=r}else arguments.length===2&&(n=t,t=void 0);return $(this,tt,typeof e=="string"?e:r,"f"),t=t||a(this,R,"f").deferY18nLookup("Show version number"),a(this,R,"f").version(n||void 0),this.boolean(a(this,tt,"f")),this.describe(a(this,tt,"f"),t),this}wrap(e){return T("<number|null|undefined>",[e],arguments.length),a(this,R,"f").wrap(e),this}[(fe=new WeakMap,Nt=new WeakMap,On=new WeakMap,Re=new WeakMap,Ne=new WeakMap,Ps=new WeakMap,Ct=new WeakMap,It=new WeakMap,Js=new WeakMap,Le=new WeakMap,Rs=new WeakMap,We=new WeakMap,et=new WeakMap,Ie=new WeakMap,qe=new WeakMap,Ls=new WeakMap,fn=new WeakMap,ge=new WeakMap,S=new WeakMap,Ws=new WeakMap,qs=new WeakMap,Se=new WeakMap,St=new WeakMap,Dn=new WeakMap,kt=new WeakMap,Et=new WeakMap,Gs=new WeakMap,J=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Pt=new WeakMap,R=new WeakMap,Hs=new WeakMap,tt=new WeakMap,ue=new WeakMap,ga)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[Ca](){return{log:(...e)=>{this[Us]()||console.log(...e),$(this,Ie,!0,"f"),a(this,ge,"f").length&&$(this,ge,a(this,ge,"f")+`
|
|
166
|
+
`,"f"),$(this,ge,a(this,ge,"f")+e.join(" "),"f")},error:(...e)=>{this[Us]()||console.error(...e),$(this,Ie,!0,"f"),a(this,ge,"f").length&&$(this,ge,a(this,ge,"f")+`
|
|
167
|
+
`,"f"),$(this,ge,a(this,ge,"f")+e.join(" "),"f")}}}[fr](e){ln(a(this,S,"f")).forEach(t=>{if((r=>r==="configObjects")(t))return;let n=a(this,S,"f")[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete a(this,R,"f").getDescriptions()[e]}[Ea](e,t,n){a(this,Js,"f")[n]||(a(this,J,"f").process.emitWarning(e,t),a(this,Js,"f")[n]=!0)}[ya](){a(this,Rs,"f").push({options:a(this,S,"f"),configObjects:a(this,S,"f").configObjects.slice(0),exitProcess:a(this,Le,"f"),groups:a(this,et,"f"),strict:a(this,jt,"f"),strictCommands:a(this,Mt,"f"),strictOptions:a(this,Pt,"f"),completionCommand:a(this,Ne,"f"),output:a(this,ge,"f"),exitError:a(this,Ct,"f"),hasOutput:a(this,Ie,"f"),parsed:this.parsed,parseFn:a(this,Se,"f"),parseContext:a(this,St,"f")}),a(this,R,"f").freeze(),a(this,ue,"f").freeze(),a(this,fe,"f").freeze(),a(this,We,"f").freeze()}[Fa](){let e="",t;return/\b(node|iojs|electron)(\.exe)?$/.test(a(this,J,"f").process.argv()[0])?t=a(this,J,"f").process.argv().slice(1,2):t=a(this,J,"f").process.argv().slice(0,1),e=t.map(n=>{let r=this[Sa](a(this,Nt,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&r.length<n.length?r:n}).join(" ").trim(),a(this,J,"f").getEnv("_")&&a(this,J,"f").getProcessArgvBin()===a(this,J,"f").getEnv("_")&&(e=a(this,J,"f").getEnv("_").replace(`${a(this,J,"f").path.dirname(a(this,J,"f").process.execPath())}/`,"")),e}[Jt](){return a(this,qs,"f")}[ba](){return a(this,Hs,"f")}[Dr](){if(!a(this,It,"f"))return;let e=a(this,J,"f").getEnv("LC_ALL")||a(this,J,"f").getEnv("LC_MESSAGES")||a(this,J,"f").getEnv("LANG")||a(this,J,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[wa](){return this[pr]().version||"unknown"}[xa](e){let t=e["--"]?e["--"]:e._;for(let n=0,r;(r=t[n])!==void 0;n++)a(this,J,"f").Parser.looksLikeNumber(r)&&Number.isSafeInteger(Math.floor(parseFloat(`${r}`)))&&(t[n]=Number(r));return e}[pr](e){let t=e||"*";if(a(this,Dn,"f")[t])return a(this,Dn,"f")[t];let n={};try{let r=e||a(this,J,"f").mainFilename;!e&&a(this,J,"f").path.extname(r)&&(r=a(this,J,"f").path.dirname(r));let o=a(this,J,"f").findUp(r,(i,u)=>{if(u.includes("package.json"))return"package.json"});ve(o,void 0,a(this,J,"f")),n=JSON.parse(a(this,J,"f").readFileSync(o,"utf8"))}catch{}return a(this,Dn,"f")[t]=n||{},a(this,Dn,"f")[t]}[yt](e,t){t=[].concat(t),t.forEach(n=>{n=this[gr](n),a(this,S,"f")[e].push(n)})}[pn](e,t,n,r){this[mr](e,t,n,r,(o,i,u)=>{a(this,S,"f")[o][i]=u})}[dr](e,t,n,r){this[mr](e,t,n,r,(o,i,u)=>{a(this,S,"f")[o][i]=(a(this,S,"f")[o][i]||[]).concat(u)})}[mr](e,t,n,r,o){if(Array.isArray(n))n.forEach(i=>{e(i,r)});else if((i=>typeof i=="object")(n))for(let i of ln(n))e(i,n[i]);else o(t,this[gr](n),r)}[gr](e){return e==="__proto__"?"___proto___":e}[Cr](e,t){return this[pn](this[Cr].bind(this),"key",e,t),this}[Er](){var e,t,n,r,o,i,u,c,h,D,l,d;let C=a(this,Rs,"f").pop();ve(C,void 0,a(this,J,"f"));let F;e=this,t=this,n=this,r=this,o=this,i=this,u=this,c=this,h=this,D=this,l=this,d=this,{options:{set value(y){$(e,S,y,"f")}}.value,configObjects:F,exitProcess:{set value(y){$(t,Le,y,"f")}}.value,groups:{set value(y){$(n,et,y,"f")}}.value,output:{set value(y){$(r,ge,y,"f")}}.value,exitError:{set value(y){$(o,Ct,y,"f")}}.value,hasOutput:{set value(y){$(i,Ie,y,"f")}}.value,parsed:this.parsed,strict:{set value(y){$(u,jt,y,"f")}}.value,strictCommands:{set value(y){$(c,Mt,y,"f")}}.value,strictOptions:{set value(y){$(h,Pt,y,"f")}}.value,completionCommand:{set value(y){$(D,Ne,y,"f")}}.value,parseFn:{set value(y){$(l,Se,y,"f")}}.value,parseContext:{set value(y){$(d,St,y,"f")}}.value}=C,a(this,S,"f").configObjects=F,a(this,R,"f").unfreeze(),a(this,ue,"f").unfreeze(),a(this,fe,"f").unfreeze(),a(this,We,"f").unfreeze()}[va](e,t){return Bt(t,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[Aa].bind(this),getContext:this[Oa].bind(this),getHasOutput:this[Ta].bind(this),getLoggerInstance:this[$a].bind(this),getParseContext:this[_a].bind(this),getParserConfiguration:this[Jt].bind(this),getUsageConfiguration:this[ba].bind(this),getUsageInstance:this[Ba].bind(this),getValidationInstance:this[Na].bind(this),hasParseCallback:this[Us].bind(this),isGlobalContext:this[Ia].bind(this),postProcess:this[Rt].bind(this),reset:this[yr].bind(this),runValidation:this[Fr].bind(this),runYargsParserAndExecuteCommands:this[Tn].bind(this),setHasOutput:this[ka].bind(this)}}[Aa](){return a(this,fe,"f")}[Oa](){return a(this,On,"f")}[Ta](){return a(this,Ie,"f")}[$a](){return a(this,fn,"f")}[_a](){return a(this,St,"f")||{}}[Ba](){return a(this,R,"f")}[Na](){return a(this,ue,"f")}[Us](){return!!a(this,Se,"f")}[Ia](){return a(this,Ls,"f")}[Rt](e,t,n,r){return n||Q(e)||(t||(e=this[ga](e)),(this[Jt]()["parse-positional-numbers"]||this[Jt]()["parse-positional-numbers"]===void 0)&&(e=this[xa](e)),r&&(e=_t(e,this,a(this,We,"f").getMiddleware(),!1))),e}[yr](e={}){$(this,S,a(this,S,"f")||{},"f");let t={};t.local=a(this,S,"f").local||[],t.configObjects=a(this,S,"f").configObjects||[];let n={};t.local.forEach(i=>{n[i]=!0,(e[i]||[]).forEach(u=>{n[u]=!0})}),Object.assign(a(this,kt,"f"),Object.keys(a(this,et,"f")).reduce((i,u)=>{let c=a(this,et,"f")[u].filter(h=>!(h in n));return c.length>0&&(i[u]=c),i},{})),$(this,et,{},"f");let r=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],o=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return r.forEach(i=>{t[i]=(a(this,S,"f")[i]||[]).filter(u=>!n[u])}),o.forEach(i=>{t[i]=mt(a(this,S,"f")[i],u=>!n[u])}),t.envPrefix=a(this,S,"f").envPrefix,$(this,S,t,"f"),$(this,R,a(this,R,"f")?a(this,R,"f").reset(n):ca(this,a(this,J,"f")),"f"),$(this,ue,a(this,ue,"f")?a(this,ue,"f").reset(n):da(this,a(this,R,"f"),a(this,J,"f")),"f"),$(this,fe,a(this,fe,"f")?a(this,fe,"f").reset():oa(a(this,R,"f"),a(this,ue,"f"),a(this,We,"f"),a(this,J,"f")),"f"),a(this,Re,"f")||$(this,Re,fa(this,a(this,R,"f"),a(this,fe,"f"),a(this,J,"f")),"f"),a(this,We,"f").reset(),$(this,Ne,null,"f"),$(this,ge,"","f"),$(this,Ct,null,"f"),$(this,Ie,!1,"f"),this.parsed=!1,this}[Sa](e,t){return a(this,J,"f").path.relative(e,t)}[Tn](e,t,n,r=0,o=!1){let i=!!n||o;e=e||a(this,Et,"f"),a(this,S,"f").__=a(this,J,"f").y18n.__,a(this,S,"f").configuration=this[Jt]();let u=!!a(this,S,"f").configuration["populate--"],c=Object.assign({},a(this,S,"f").configuration,{"populate--":!0}),h=a(this,J,"f").Parser.detailed(e,Object.assign({},a(this,S,"f"),{configuration:{"parse-positional-numbers":!1,...c}})),D=Object.assign(h.argv,a(this,St,"f")),l,d=h.aliases,C=!1,F=!1;Object.keys(D).forEach(y=>{y===a(this,qe,"f")&&D[y]?C=!0:y===a(this,tt,"f")&&D[y]&&(F=!0)}),D.$0=this.$0,this.parsed=h,r===0&&a(this,R,"f").clearCachedHelpMessage();try{if(this[Dr](),t)return this[Rt](D,u,!!n,!1);a(this,qe,"f")&&[a(this,qe,"f")].concat(d[a(this,qe,"f")]||[]).filter(k=>k.length>1).includes(""+D._[D._.length-1])&&(D._.pop(),C=!0),$(this,Ls,!1,"f");let y=a(this,fe,"f").getCommands(),p=a(this,Re,"f").completionKey in D,I=C||p||o;if(D._.length){if(y.length){let x;for(let k=r||0,O;D._[k]!==void 0;k++)if(O=String(D._[k]),y.includes(O)&&O!==a(this,Ne,"f")){let G=a(this,fe,"f").runCommand(O,this,h,k+1,o,C||F||o);return this[Rt](G,u,!!n,!1)}else if(!x&&O!==a(this,Ne,"f")){x=O;break}!a(this,fe,"f").hasDefaultCommand()&&a(this,Gs,"f")&&x&&!I&&a(this,ue,"f").recommendCommands(x,y)}a(this,Ne,"f")&&D._.includes(a(this,Ne,"f"))&&!p&&(a(this,Le,"f")&>(!0),this.showCompletionScript(),this.exit(0))}if(a(this,fe,"f").hasDefaultCommand()&&!I){let x=a(this,fe,"f").runCommand(null,this,h,0,o,C||F||o);return this[Rt](x,u,!!n,!1)}if(p){a(this,Le,"f")&>(!0),e=[].concat(e);let x=e.slice(e.indexOf(`--${a(this,Re,"f").completionKey}`)+1);return a(this,Re,"f").getCompletion(x,(k,O)=>{if(k)throw new K(k.message);(O||[]).forEach(G=>{a(this,fn,"f").log(G)}),this.exit(0)}),this[Rt](D,!u,!!n,!1)}if(a(this,Ie,"f")||(C?(a(this,Le,"f")&>(!0),i=!0,this.showHelp("log"),this.exit(0)):F&&(a(this,Le,"f")&>(!0),i=!0,a(this,R,"f").showVersion("log"),this.exit(0))),!i&&a(this,S,"f").skipValidation.length>0&&(i=Object.keys(D).some(x=>a(this,S,"f").skipValidation.indexOf(x)>=0&&D[x]===!0)),!i){if(h.error)throw new K(h.error.message);if(!p){let x=this[Fr](d,{},h.error);n||(l=_t(D,this,a(this,We,"f").getMiddleware(),!0)),l=this[va](x,l??D),Q(l)&&!n&&(l=l.then(()=>_t(D,this,a(this,We,"f").getMiddleware(),!1)))}}}catch(y){if(y instanceof K)a(this,R,"f").fail(y.message,y);else throw y}return this[Rt](l??D,u,!!n,!0)}[Fr](e,t,n,r){let o={...this.getDemandedOptions()};return i=>{if(n)throw new K(n.message);a(this,ue,"f").nonOptionCount(i),a(this,ue,"f").requiredArguments(i,o);let u=!1;a(this,Mt,"f")&&(u=a(this,ue,"f").unknownCommands(i)),a(this,jt,"f")&&!u?a(this,ue,"f").unknownArguments(i,e,t,!!r):a(this,Pt,"f")&&a(this,ue,"f").unknownArguments(i,e,{},!1,!1),a(this,ue,"f").limitedChoices(i),a(this,ue,"f").implications(i),a(this,ue,"f").conflicting(i)}}[ka](){$(this,Ie,!0,"f")}[Lt](e){if(typeof e=="string")a(this,S,"f").key[e]=!0;else for(let t of e)a(this,S,"f").key[t]=!0}};function ua(s){return!!s&&typeof s.getInternalMethods=="function"}var jh=ja(ta),Ma=jh;function Mh(s,e){return Ma(s).strict().command("* <template> <outDir>","Create a new project powered by qwik",n=>n.positional("template",{type:"string",desc:"Starter template",choices:e}).positional("outDir",{type:"string",desc:"Directory of the project"}).option("force",{alias:"f",type:"boolean",default:!1,desc:"Overwrite target directory if it exists"}).option("installDeps",{alias:"i",default:!1,type:"boolean",desc:"Install dependencies"}).usage("npm create qwik@latest base ./my-project <options>")).argv}async function xr(...s){let e=ct(),t=await on("app"),n=t.standaloneTemplates.map(({id:d})=>d),r=Mh(s,n),{force:o,installDeps:i,template:u}=r,c=r.outDir;Jn(`Let's create a ${Cn(" Qwik App ")} \u2728 (v1.16.1)`),Ph()?c=process.cwd():(c=vs(c),wr.default.existsSync(c)&&wr.default.readdirSync(c).length>0&&(o?await Ln(c):(te.error(`Directory "${c}" already exists.`),te.info("Please either remove this directory, choose another location or run the command again with '--force | -f' flag."),gn(),process.exit(1))));let h=await un({outDir:c,appId:u,pkgManager:e,templateManager:t}),D=Ht(),l=!1;return i&&(l=await ws(async()=>await wt(e,c).install,{pkgManager:e,spinner:D})),xs(e,h,l),h}function Ph(){return Jh()}function Jh(){try{return process.cwd().startsWith("/home/projects/")}catch{}return!1}var zs=require("node:path");var Vs=le(require("node:fs"));var vr=[["What's the best thing about a Boolean?","Even if you're wrong, you're only off by a bit."],["Why did the developer stay at home?","Because he couldn't find his keys."],["How many programmers does it take to change a lightbulb?","None that's a hardware problem"],["A user interface is like a joke.","If you have to explain it then it is not that good."],["['hip', 'hip']","(hip hip array)"],["A SQL query goes into a bar, walks up to two tables and asks:","'Can I JOIN you?'"],["Why did the developer go to therapy?","He had too many unresolved issues."],["Why do C# and Java developers keep breaking their keyboards?","Because they use a strongly typed language."],["What's the object-oriented way to become wealthy?","Inheritance"],["Where do programmers like to hangout?","The Foo Bar."],["Why do Java programmers wear glasses?","Because they don't C#"],["To understand what recursion is...","You must first understand what recursion is"],["The punchline often arrives before the set-up.","Do you know the problem with UDP jokes?"],["Why did the programmer quit his job?","Because he didn't get arrays."],["Why was the computer tired when it got home?","It had a hard drive."],["There are 10 types of people in this world...","Those who understand binary and those who don't"],["Why do programmers always mix up Halloween and Christmas?","Because Oct 31 == Dec 25"],["I was gonna tell you a joke about UDP...","...but you might not get it."],["Normal People: give me just a second","Developers: give me 1000 milliseconds!"],["Why do programmers prefer dark mode?","Because light attracts bugs."],["Why don't programmers like nature?","It has too many bugs."],["Why was the computer freezing?","It left its Windows open!"],["What did the Java code say to the C code?","You've got no class."],["Why do programmers prefer the outdoors?","Because it's free of bugs."],["Why do programmers love movies?","Because they can 'script' the ending."],["why do desert animals hate Qwik?","Because there's no hydration...."],["What can you do if you cannot push your git changes?","Use the --force, Luke"],["How did the developer announce he's getting married?","'She returned true!'"],["How many Prolog programmers does it take to change a lightbulb?","Yes."],["Why did the developer ground their kid?","They weren't telling the truthy"],["!false","It's funny 'cause it's true."],["Where did the parallel function wash its hands?","Async"],["How do functions break up?","They stop calling each other"],["Why did the functions stop calling each other?","Because they had constant arguments."],["What's the second movie about a database engineer called?","The SQL."],["What did the computer do at lunchtime?","NoSQL."],["Why doesn't Hollywood make more Big Data movies?","Had a byte!"],["What does a baby computer call his father?","Data!"],["I never tell the same joke twice","I have a DRY sense of humor."],["How do programming pirates pass method parameters?","ARRRRRGS."],["Why don't bachelors like Git?","Because they are afraid to commit."],["Why do astronauts use Linux?","They can't open Windows in space!"],["How do front end devs like their brownies?","GUI"],["What do hackers do on a boat?","Phishing."],["Why couldn't the HTML list be trusted?","There were LI's everywhere"],["To the person who invented zero:","Thank's for nothing!"],["What do you call a bee that lives in America?","A USB"],["want about to a race conditions hear joke?",""],["What is a Package Managers favorite holiday?","Dependency Day"],["Where do we get all of these dad jokes from?","A dad-a-base!"],["What advice do you give to a JS developer who has never played baseball?","Try catch."],["We don't have any DNS jokes, know why?","Because it may take 24 hours to get them"],["Why do Front-End Developers eat lunch alone?","Because they don't know how to join tables."],["How do you help JS errors?","You `console` them!"],["When do front end developers go out to eat?","On their lunch <br>."],["What do you call optimistic front-end developers?","Stack half-full developers."]];function Pa(){let s=Math.floor(Math.random()*vr.length);return vr[s]}async function Ar(){let s=ct(),e=await on("app"),t="./qwik-app";Jn(`Let's create a ${Cn(" Qwik App ")} \u2728 (v1.16.1)`),await iu(500);let n=await Kr({message:`Where would you like to create your new project? ${at("(Use '.' or './' for current directory)")}`,placeholder:t})||t;ut(n)&&(gn("Operation cancelled."),process.exit(0));let r=e.getBaseApp();if(!r)throw new Error("Base app not found");let o=e.templates.filter(x=>x.id!==r.id).sort((x,k)=>x.name.localeCompare(k.name)),i=vs(n.trim());r.target=i;let u=cu(s,r),c=async()=>{await u.abort(),gn("Operation cancelled."),process.exit(0)};te.info(`Creating new project in ${Cn(" "+i+" ")} ... \u{1F407}`);let h=null;if(Vs.default.existsSync(i)&&Vs.default.readdirSync(i).length>0){let x=await li({message:`Directory "./${(0,zs.relative)(process.cwd(),i)}" already exists and is not empty. What would you like to do?`,options:[{value:"exit",label:"Do not overwrite this directory and exit"},{value:"replace",label:"Remove contents of this directory"}]});if(ut(x)||x==="exit")return await c();x==="replace"&&(h=Ln(i))}let D=await li({message:"Select a starter",options:o.map(x=>{var k;return{label:x.name,value:x.id,hint:(k=x.pkgJson)==null?void 0:k.description}})});if(ut(D))return await c();let l=D,d=await Pn({message:`Would you like to install ${s} dependencies?`,initialValue:!0});if(ut(d))return await c();let C=await Pn({message:"Initialize a new git repository?",initialValue:!0});h&&await h;let F=d;if(!F)u.abort();else if(typeof u.success>"u")try{let x=await Pn({message:"Finishing the install. Wanna hear a joke?",initialValue:!0});if(!ut(x)&&x){let[k,O]=Pa();Gn(be(`${k.trim()}
|
|
168
|
+
${O.trim()}`),"\u{1F648}")}}catch{}let y=Ht();y.start("Creating App...");let p=await un({appId:l,outDir:i,pkgManager:s,templateManager:e});if(y.stop("App Created \u{1F430}"),C)if(Vs.default.existsSync((0,zs.join)(i,".git")))te.info("Git has already been initialized before. Skipping...");else{y.start("Git initializing...");try{let x=[];if(x.push(await zt("git",["init"],i).install),x.push(await zt("git",["add","-A"],i).install),x.push(await zt("git",["commit","-m","Initial commit \u26A1\uFE0F"],i).install),x.some(k=>k===!1))throw"";y.stop("Git initialized \u{1F3B2}")}catch{y.stop("Git failed to initialize"),te.error($e("Git failed to initialize. You can do this manually by running: git init"))}}let I=!1;return F&&(I=await ws(async()=>{let x=await u.complete(p.outDir);return x&&await wt(s,p.outDir).install},{pkgManager:s,spinner:y})),xs(s,p,I),p}async function Ja(s){let e=ct(),t=await on("app");return await un({appId:s.starterId,templateManager:t,outDir:s.outDir,pkgManager:e})}async function Lh(){uu(),Wh();try{let s=process.argv.slice(2);s.length>0?await xr(...s):await Ar()}catch(s){qn(s.message||s)}}function Wh(){let s=process.version,[e,t]=s.replace("v","").split(".");Number(e)<16?(console.error($e(`Qwik requires Node.js 16.8 or higher. You are currently running Node.js ${s}.`)),process.exit(1)):Number(e)===16?Number(t)<8&&console.warn(io(`Node.js 16.8 or higher is recommended. You are currently running Node.js ${s}.`)):Number(e)===18&&Number(t)<11&&console.error($e(`Node.js 18.11 or higher is REQUIRED. From Node 18.0.0 to 18.11.0, there is a bug preventing correct behaviour of Qwik. You are currently running Node.js ${s}. https://github.com/QwikDev/qwik/issues/3035`))}0&&(module.exports={createApp,runCli,runCreateCli,runCreateInteractiveCli});
|
|
165
169
|
/*! Bundled license information:
|
|
166
170
|
|
|
167
171
|
yargs-parser/build/lib/string-utils.js:
|