create-qwik 2.0.0-beta.6 → 2.0.0-beta.8
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 +91 -91
- package/dist/starters/apps/base/package.json +9 -9
- package/dist/starters/apps/base/src/entry.ssr.tsx +22 -18
- package/dist/starters/apps/empty/src/root.tsx +20 -17
- package/dist/starters/apps/library/package.json +8 -8
- package/dist/starters/apps/playground/src/root.tsx +20 -17
- package/package.json +2 -2
- package/dist/starters/apps/empty/public/manifest.json +0 -9
- package/dist/starters/apps/empty/src/components/router-head/router-head.tsx +0 -32
- package/dist/starters/apps/playground/src/components/router-head/router-head.tsx +0 -37
package/dist/index.cjs
CHANGED
|
@@ -1,112 +1,112 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* create-qwik 2.0.0-beta.
|
|
3
|
+
* create-qwik 2.0.0-beta.8-dev+434cd18
|
|
4
4
|
* Copyright QwikDev. 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((Cc,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((Fc,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((Zc,Ws)=>{"use strict";Ws.exports=function(){if(process.env.npm_config_user_agent)return qu(process.env.npm_config_user_agent)};function qu(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((Xc,qs)=>{qs.exports=zs;zs.sync=Vu;var Ls=require("fs");function Uu(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:Uu(e,t)}function zs(n,e,t){Ls.stat(n,function(i,r){t(i,i?!1:ks(r,n,e))})}function Vu(n,e){return ks(Ls.statSync(n),n,e)}});var Js=he((el,Ys)=>{Ys.exports=Hs;Hs.sync=Hu;var Vs=require("fs");function Hs(n,e,t){Vs.stat(n,function(i,r){t(i,i?!1:Gs(r,e))})}function Hu(n,e){return Gs(Vs.statSync(n),e)}function Gs(n,e){return n.isFile()&&Gu(n,e)}function Gu(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((nl,Ks)=>{var tl=require("fs"),an;process.platform==="win32"||global.TESTING_WINDOWS?an=Us():an=Js();Ks.exports=ci;ci.sync=Yu;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 Yu(n,e){try{return an.sync(n,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var sr=he((il,ir)=>{var xt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Zs=require("path"),Ju=xt?";":":",Xs=Qs(),er=n=>Object.assign(new Error(`not found: ${n}`),{code:"ENOENT"}),tr=(n,e)=>{let t=e.colon||Ju,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)},Ku=(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=Ku});var or=he((sl,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((rl,cr)=>{"use strict";var ur=require("path"),Qu=sr(),Zu=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=Qu.sync(n.command,{path:t[Zu({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 Xu(n){return ar(n)||ar(n,!0)}cr.exports=Xu});var fr=he((ol,Di)=>{"use strict";var fi=/([()\][%!^"`<>&|;, *?])/g;function ea(n){return n=n.replace(fi,"^$1"),n}function ta(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=ea;Di.exports.argument=ta});var hr=he((ul,Dr)=>{"use strict";Dr.exports=/^#!(.*)/});var dr=he((al,pr)=>{"use strict";var na=hr();pr.exports=(n="")=>{let e=n.match(na);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((cl,mr)=>{"use strict";var hi=require("fs"),ia=dr();function sa(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 ia(t.toString())}mr.exports=sa});var Er=he((ll,br)=>{"use strict";var ra=require("path"),Cr=lr(),Fr=fr(),oa=gr(),ua=process.platform==="win32",aa=/\.(?:com|exe)$/i,ca=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function la(n){n.file=Cr(n);let e=n.file&&oa(n.file);return e?(n.args.unshift(n.file),n.command=e,Cr(n)):n.file}function fa(n){if(!ua)return n;let e=la(n),t=!aa.test(e);if(n.options.forceShell||t){let i=ca.test(e);n.command=ra.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 Da(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:fa(i)}br.exports=Da});var xr=he((fl,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 ha(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 pa(n,e){return pi&&n===1&&!e.file?di(e.original,"spawnSync"):null}wr.exports={hookChildProcess:ha,verifyENOENT:yr,verifyENOENTSync:pa,notFoundError:di}});var vr=he((Dl,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 da(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=da;At.exports._parse=mi;At.exports._enoent=gi});var mc={};iu(mc,{createApp:()=>Qo,runCli:()=>pc,runCreateCli:()=>es,runCreateInteractiveCli:()=>ns});module.exports=su(mc);var me=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)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,n?void 0:"g")}function ms(n){if(typeof n!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof n}\``);return n.replace(fu(),"")}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 Du=Cs.exports,hu=gs(Du),pu=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},du=gs(pu);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(du()," ");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(hu.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 mu=Object.keys(Q.color),gu=Object.keys(Q.bgColor);[...mu,...gu];function Cu(){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 Fu=Cu(),nn=new Set(["\x1B","\x9B"]),bu=39,Qn="\x07",Fs="[",Eu="]",bs="m",Zn=`${Eu}8;;`,ls=n=>`${nn.values().next().value}${Fs}${n}${bs}`,fs=n=>`${nn.values().next().value}${Zn}${n}${Qn}`,yu=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())},wu=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("")},xu=(n,e,t={})=>{if(t.trim!==!1&&n.trim()==="")return"";let i="",r,o,s=yu(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=>wu(D)));let f=[...a.join(`
|
|
9
|
-
`)];for(let[D,h]of f.entries()){if(i+=h,
|
|
10
|
-
`?(o&&(i+=
|
|
11
|
-
`&&(r&&c&&(i+=
|
|
8
|
+
"use strict";var Ko=Object.create;var Yt=Object.defineProperty;var Qo=Object.getOwnPropertyDescriptor;var Zo=Object.getOwnPropertyNames;var Xo=Object.getPrototypeOf,eu=Object.prototype.hasOwnProperty;var De=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),tu=(n,e)=>{for(var t in e)Yt(n,t,{get:e[t],enumerable:!0})},ts=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Zo(e))!eu.call(n,r)&&r!==t&&Yt(n,r,{get:()=>e[r],enumerable:!(i=Qo(e,r))||i.enumerable});return n};var ue=(n,e,t)=>(t=n!=null?Ko(Xo(n)):{},ts(e||!n||!n.__esModule?Yt(t,"default",{value:n,enumerable:!0}):t,n)),nu=n=>ts(Yt({},"__esModule",{value:!0}),n);var qn=De((dc,ns)=>{"use strict";var zn={to(n,e){return e?`\x1B[${e+1};${n+1}H`:`\x1B[${n+1}G`},move(n,e){let t="";return n<0?t+=`\x1B[${-n}D`:n>0&&(t+=`\x1B[${n}C`),e<0?t+=`\x1B[${-e}A`:e>0&&(t+=`\x1B[${e}B`),t},up:(n=1)=>`\x1B[${n}A`,down:(n=1)=>`\x1B[${n}B`,forward:(n=1)=>`\x1B[${n}C`,backward:(n=1)=>`\x1B[${n}D`,nextLine:(n=1)=>"\x1B[E".repeat(n),prevLine:(n=1)=>"\x1B[F".repeat(n),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},iu={up:(n=1)=>"\x1B[S".repeat(n),down:(n=1)=>"\x1B[T".repeat(n)},su={screen:"\x1B[2J",up:(n=1)=>"\x1B[1J".repeat(n),down:(n=1)=>"\x1B[J".repeat(n),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(n){let e="";for(let t=0;t<n;t++)e+=this.line+(t<n-1?zn.up():"");return n&&(e+=zn.left),e}};ns.exports={cursor:zn,scroll:iu,erase:su,beep:"\x07"}});var Vn=De((mc,Un)=>{var Kt=process||{},is=Kt.argv||[],Jt=Kt.env||{},ru=!(Jt.NO_COLOR||is.includes("--no-color"))&&(!!Jt.FORCE_COLOR||is.includes("--color")||Kt.platform==="win32"||(Kt.stdout||{}).isTTY&&Jt.TERM!=="dumb"||!!Jt.CI),ou=(n,e,t=n)=>i=>{let r=""+i,o=r.indexOf(e,n.length);return~o?n+uu(r,e,t,o)+e:n+r+e},uu=(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)},ss=(n=ru)=>{let e=n?ou:()=>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")}};Un.exports=ss();Un.exports.createColors=ss});var Ns=De((Jc,Ts)=>{"use strict";Ts.exports=function(){if(process.env.npm_config_user_agent)return Lu(process.env.npm_config_user_agent)};function Lu(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 zs=De((Kc,ks)=>{ks.exports=Ls;Ls.sync=zu;var Ws=require("fs");function ku(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 Rs(n,e,t){return!n.isSymbolicLink()&&!n.isFile()?!1:ku(e,t)}function Ls(n,e,t){Ws.stat(n,function(i,r){t(i,i?!1:Rs(r,n,e))})}function zu(n,e){return Rs(Ws.statSync(n),n,e)}});var Gs=De((Qc,Hs)=>{Hs.exports=Us;Us.sync=qu;var qs=require("fs");function Us(n,e,t){qs.stat(n,function(i,r){t(i,i?!1:Vs(r,e))})}function qu(n,e){return Vs(qs.statSync(n),e)}function Vs(n,e){return n.isFile()&&Uu(n,e)}function Uu(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 Js=De((Xc,Ys)=>{var Zc=require("fs"),un;process.platform==="win32"||global.TESTING_WINDOWS?un=zs():un=Gs();Ys.exports=ui;ui.sync=Vu;function ui(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){ui(n,e||{},function(o,s){o?r(o):i(s)})})}un(n,e||{},function(i,r){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,r=!1),t(i,r)})}function Vu(n,e){try{return un.sync(n,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var nr=De((el,tr)=>{var wt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Ks=require("path"),Hu=wt?";":":",Qs=Js(),Zs=n=>Object.assign(new Error(`not found: ${n}`),{code:"ENOENT"}),Xs=(n,e)=>{let t=e.colon||Hu,i=n.match(/\//)||wt&&n.match(/\\/)?[""]:[...wt?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],r=wt?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=wt?r.split(t):[""];return wt&&n.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:r}},er=(n,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:r,pathExtExe:o}=Xs(n,e),s=[],a=D=>new Promise((h,c)=>{if(D===i.length)return e.all&&s.length?h(s):c(Zs(n));let p=i[D],C=/^".*"$/.test(p)?p.slice(1,-1):p,E=Ks.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];Qs(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)},Gu=(n,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:r}=Xs(n,e),o=[];for(let s=0;s<t.length;s++){let a=t[s],f=/^".*"$/.test(a)?a.slice(1,-1):a,D=Ks.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(Qs.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 Zs(n)};tr.exports=er;er.sync=Gu});var sr=De((tl,ai)=>{"use strict";var ir=(n={})=>{let e=n.env||process.env;return(n.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};ai.exports=ir;ai.exports.default=ir});var ar=De((nl,ur)=>{"use strict";var rr=require("path"),Yu=nr(),Ju=sr();function or(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=Yu.sync(n.command,{path:t[Ju({env:t})],pathExt:e?rr.delimiter:void 0})}catch{}finally{o&&process.chdir(i)}return s&&(s=rr.resolve(r?n.options.cwd:"",s)),s}function Ku(n){return or(n)||or(n,!0)}ur.exports=Ku});var cr=De((il,li)=>{"use strict";var ci=/([()\][%!^"`<>&|;, *?])/g;function Qu(n){return n=n.replace(ci,"^$1"),n}function Zu(n,e){return n=`${n}`,n=n.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),n=n.replace(/(?=(\\+?)?)\1$/,"$1$1"),n=`"${n}"`,n=n.replace(ci,"^$1"),e&&(n=n.replace(ci,"^$1")),n}li.exports.command=Qu;li.exports.argument=Zu});var fr=De((sl,lr)=>{"use strict";lr.exports=/^#!(.*)/});var hr=De((rl,Dr)=>{"use strict";var Xu=fr();Dr.exports=(n="")=>{let e=n.match(Xu);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),r=t.split("/").pop();return r==="env"?i:i?`${r} ${i}`:r}});var dr=De((ol,pr)=>{"use strict";var fi=require("fs"),ea=hr();function ta(n){let t=Buffer.alloc(150),i;try{i=fi.openSync(n,"r"),fi.readSync(i,t,0,150,0),fi.closeSync(i)}catch{}return ea(t.toString())}pr.exports=ta});var Fr=De((ul,Cr)=>{"use strict";var na=require("path"),mr=ar(),gr=cr(),ia=dr(),sa=process.platform==="win32",ra=/\.(?:com|exe)$/i,oa=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function ua(n){n.file=mr(n);let e=n.file&&ia(n.file);return e?(n.args.unshift(n.file),n.command=e,mr(n)):n.file}function aa(n){if(!sa)return n;let e=ua(n),t=!ra.test(e);if(n.options.forceShell||t){let i=oa.test(e);n.command=na.normalize(n.command),n.command=gr.command(n.command),n.args=n.args.map(o=>gr.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 ca(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:aa(i)}Cr.exports=ca});var yr=De((al,Er)=>{"use strict";var Di=process.platform==="win32";function hi(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 la(n,e){if(!Di)return;let t=n.emit;n.emit=function(i,r){if(i==="exit"){let o=br(r,e);if(o)return t.call(n,"error",o)}return t.apply(n,arguments)}}function br(n,e){return Di&&n===1&&!e.file?hi(e.original,"spawn"):null}function fa(n,e){return Di&&n===1&&!e.file?hi(e.original,"spawnSync"):null}Er.exports={hookChildProcess:la,verifyENOENT:br,verifyENOENTSync:fa,notFoundError:hi}});var Ar=De((cl,xt)=>{"use strict";var wr=require("child_process"),pi=Fr(),di=yr();function xr(n,e,t){let i=pi(n,e,t),r=wr.spawn(i.command,i.args,i.options);return di.hookChildProcess(r,i),r}function Da(n,e,t){let i=pi(n,e,t),r=wr.spawnSync(i.command,i.args,i.options);return r.error=r.error||di.verifyENOENTSync(r.status,i),r}xt.exports=xr;xt.exports.spawn=xr;xt.exports.sync=Da;xt.exports._parse=pi;xt.exports._enoent=di});var hc={};tu(hc,{createApp:()=>Jo,runCli:()=>fc,runCreateCli:()=>Zi,runCreateInteractiveCli:()=>es});module.exports=nu(hc);var de=ue(qn(),1),Ft=require("node:process"),Ue=ue(require("node:readline"),1),Yn=ue(require("node:readline"),1),hs=require("node:tty"),Zt=ue(Vn(),1);function au({onlyFirst:n=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,n?void 0:"g")}function ps(n){if(typeof n!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof n}\``);return n.replace(au(),"")}function ds(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ms={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}})(ms);var cu=ms.exports,lu=ds(cu),fu=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},Du=ds(fu);function Nt(n,e={}){if(typeof n!="string"||n.length===0||(e={ambiguousIsNarrow:!0,...e},n=ps(n),n.length===0))return 0;n=n.replace(Du()," ");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(lu.eastAsianWidth(r)){case"F":case"W":i+=2;break;case"A":i+=t;break;default:i+=1}}return i}var Hn=10,rs=(n=0)=>e=>`\x1B[${e+n}m`,os=(n=0)=>e=>`\x1B[${38+n};5;${e}m`,us=(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 hu=Object.keys(Q.color),pu=Object.keys(Q.bgColor);[...hu,...pu];function du(){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=rs(),Q.color.ansi256=os(),Q.color.ansi16m=us(),Q.bgColor.ansi=rs(Hn),Q.bgColor.ansi256=os(Hn),Q.bgColor.ansi16m=us(Hn),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 mu=du(),tn=new Set(["\x1B","\x9B"]),gu=39,Jn="\x07",gs="[",Cu="]",Cs="m",Kn=`${Cu}8;;`,as=n=>`${tn.values().next().value}${gs}${n}${Cs}`,cs=n=>`${tn.values().next().value}${Kn}${n}${Jn}`,Fu=n=>n.split(" ").map(e=>Nt(e)),Gn=(n,e,t)=>{let i=[...e],r=!1,o=!1,s=Nt(ps(n[n.length-1]));for(let[a,f]of i.entries()){let D=Nt(f);if(s+D<=t?n[n.length-1]+=f:(n.push(f),s=0),tn.has(f)&&(r=!0,o=i.slice(a+1).join("").startsWith(Kn)),r){o?f===Jn&&(r=!1,o=!1):f===Cs&&(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())},bu=n=>{let e=n.split(" "),t=e.length;for(;t>0&&!(Nt(e[t-1])>0);)t--;return t===e.length?n:e.slice(0,t).join(" ")+e.slice(t).join("")},Eu=(n,e,t={})=>{if(t.trim!==!1&&n.trim()==="")return"";let i="",r,o,s=Fu(n),a=[""];for(let[D,h]of n.split(" ").entries()){t.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let c=Nt(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(""),Gn(a,h,e);continue}if(c+s[D]>e&&c>0&&s[D]>0){if(t.wordWrap===!1&&c<e){Gn(a,h,e);continue}a.push("")}if(c+s[D]>e&&t.wordWrap===!1){Gn(a,h,e);continue}a[a.length-1]+=h}t.trim!==!1&&(a=a.map(D=>bu(D)));let f=[...a.join(`
|
|
9
|
+
`)];for(let[D,h]of f.entries()){if(i+=h,tn.has(h)){let{groups:p}=new RegExp(`(?:\\${gs}(?<code>\\d+)m|\\${Kn}(?<uri>.*)${Jn})`).exec(f.slice(D).join(""))||{groups:{}};if(p.code!==void 0){let C=Number.parseFloat(p.code);r=C===gu?void 0:C}else p.uri!==void 0&&(o=p.uri.length===0?void 0:p.uri)}let c=mu.codes.get(Number(r));f[D+1]===`
|
|
10
|
+
`?(o&&(i+=cs("")),r&&c&&(i+=as(c))):h===`
|
|
11
|
+
`&&(r&&c&&(i+=as(r)),o&&(i+=cs(o)))}return i};function ls(n,e,t){return String(n).normalize().replace(/\r\n/g,`
|
|
12
12
|
`).split(`
|
|
13
|
-
`).map(i=>
|
|
14
|
-
`)}var
|
|
13
|
+
`).map(i=>Eu(i,e,t)).join(`
|
|
14
|
+
`)}var yu=Object.defineProperty,wu=(n,e,t)=>e in n?yu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xe=(n,e,t)=>(wu(n,typeof e!="symbol"?e+"":e,t),t);function xu(n,e){if(n===e)return;let t=n.split(`
|
|
15
15
|
`),i=e.split(`
|
|
16
|
-
`),r=[];for(let o=0;o<Math.max(t.length,i.length);o++)t[o]!==i[o]&&r.push(o);return r}var
|
|
17
|
-
`),
|
|
18
|
-
`).length-1;this.output.write(
|
|
19
|
-
`);this.output.write(r[i]),this._prevFrame=e,this.output.write(
|
|
16
|
+
`),r=[];for(let o=0;o<Math.max(t.length,i.length);o++)t[o]!==i[o]&&r.push(o);return r}var Fs=Symbol("clack:cancel");function Ve(n){return n===Fs}function Qt(n,e){n.isTTY&&n.setRawMode(e)}var fs=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),Au=new Set(["up","down","left","right","space","enter"]),Wt=class{constructor({render:e,input:t=Ft.stdin,output:i=Ft.stdout,...r},o=!0){xe(this,"input"),xe(this,"output"),xe(this,"rl"),xe(this,"opts"),xe(this,"_track",!1),xe(this,"_render"),xe(this,"_cursor",0),xe(this,"state","initial"),xe(this,"value"),xe(this,"error",""),xe(this,"subscribers",new Map),xe(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=i}prompt(){let e=new hs.WriteStream(0);return e._write=(t,i,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=Yn.default.createInterface({input:this.input,output:e,tabSize:2,prompt:"",escapeCodeTimeout:50}),Yn.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),Qt(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((t,i)=>{this.once("submit",()=>{this.output.write(de.cursor.show),this.output.off("resize",this.render),Qt(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(de.cursor.show),this.output.off("resize",this.render),Qt(this.input,!1),t(Fs)})})}on(e,t){let i=this.subscribers.get(e)??[];i.push({cb:t}),this.subscribers.set(e,i)}once(e,t){let i=this.subscribers.get(e)??[];i.push({cb:t,once:!0}),this.subscribers.set(e,i)}emit(e,...t){let i=this.subscribers.get(e)??[],r=[];for(let o of i)o.cb(...t),o.once&&r.push(()=>i.splice(i.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&&fs.has(t.name)&&this.emit("cursor",fs.get(t.name)),t!=null&&t.name&&Au.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 i=this.opts.validate(this.value);i&&(this.error=i,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(`
|
|
17
|
+
`),Qt(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=ls(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
18
|
+
`).length-1;this.output.write(de.cursor.move(-999,e*-1))}render(){let e=ls(this._render(this)??"",process.stdout.columns,{hard:!0});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(de.cursor.hide);else{let t=xu(this._prevFrame,e);if(this.restoreCursor(),t&&(t==null?void 0:t.length)===1){let i=t[0];this.output.write(de.cursor.move(0,i)),this.output.write(de.erase.lines(1));let r=e.split(`
|
|
19
|
+
`);this.output.write(r[i]),this._prevFrame=e,this.output.write(de.cursor.move(0,r.length-i-1));return}else if(t&&(t==null?void 0:t.length)>1){let i=t[0];this.output.write(de.cursor.move(0,i)),this.output.write(de.erase.down());let r=e.split(`
|
|
20
20
|
`).slice(i);this.output.write(r.join(`
|
|
21
|
-
`)),this._prevFrame=e;return}this.output.write(
|
|
22
|
-
${
|
|
21
|
+
`)),this._prevFrame=e;return}this.output.write(de.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}},Xt=class extends Wt{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(de.cursor.move(0,-1)),this.value=t,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var $u=Object.defineProperty,vu=(n,e,t)=>e in n?$u(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ds=(n,e,t)=>(vu(n,typeof e!="symbol"?e+"":e,t),t),bs=class extends Wt{constructor(n){super(n,!1),Ds(this,"options"),Ds(this,"cursor",0),this.options=n.options,this.cursor=this.options.findIndex(({value:e})=>e===n.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 Bu=Object.defineProperty,Ou=(n,e,t)=>e in n?Bu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_u=(n,e,t)=>(Ou(n,typeof e!="symbol"?e+"":e,t),t),en=class extends Wt{constructor(e){super(e),_u(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}${Zt.default.inverse(Zt.default.hidden("_"))}`;else{let t=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.valueWithCursor=`${t}${Zt.default.inverse(i[0])}${i.slice(1)}`}})}get cursor(){return this._cursor}},Su=globalThis.process.platform.startsWith("win");function Es({input:n=Ft.stdin,output:e=Ft.stdout,overwrite:t=!0,hideCursor:i=!0}={}){let r=Ue.createInterface({input:n,output:e,prompt:"",tabSize:1});Ue.emitKeypressEvents(n,r),n.isTTY&&n.setRawMode(!0);let o=(s,{name:a})=>{if(String(s)===""&&process.exit(0),!t)return;Ue.moveCursor(e,a==="return"?0:-1,a==="return"?-1:0,()=>{Ue.clearLine(e,1,()=>{n.once("keypress",o)})})};return i&&process.stdout.write(de.cursor.hide),n.once("keypress",o),()=>{n.off("keypress",o),i&&process.stdout.write(de.cursor.show),n.isTTY&&!Su&&n.setRawMode(!1),r.terminal=!1,r.close()}}var Ae=ue(require("node:process"),1),w=ue(Vn(),1),bt=ue(qn(),1);function ju(){return Ae.default.platform!=="win32"?Ae.default.env.TERM!=="linux":!!Ae.default.env.CI||!!Ae.default.env.WT_SESSION||!!Ae.default.env.TERMINUS_SUBLIME||Ae.default.env.ConEmuTask==="{cmd::Cmder}"||Ae.default.env.TERM_PROGRAM==="Terminus-Sublime"||Ae.default.env.TERM_PROGRAM==="vscode"||Ae.default.env.TERM==="xterm-256color"||Ae.default.env.TERM==="alacritty"||Ae.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Qn=ju(),re=(n,e)=>Qn?n:e,Iu=re("\u25C6","*"),ys=re("\u25A0","x"),ws=re("\u25B2","x"),ei=re("\u25C7","o"),Pu=re("\u250C","T"),ne=re("\u2502","|"),Et=re("\u2514","\u2014"),Zn=re("\u25CF",">"),Xn=re("\u25CB"," "),xc=re("\u25FB","[\u2022]"),Ac=re("\u25FC","[+]"),$c=re("\u25FB","[ ]"),vc=re("\u25AA","\u2022"),Bc=re("\u2500","-"),Oc=re("\u256E","+"),_c=re("\u251C","+"),Sc=re("\u256F","+"),Mu=re("\u25CF","\u2022"),Tu=re("\u25C6","*"),Nu=re("\u25B2","!"),Wu=re("\u25A0","x"),ti=n=>{switch(n){case"initial":case"active":return w.default.cyan(Iu);case"cancel":return w.default.red(ys);case"error":return w.default.yellow(ws);case"submit":return w.default.green(ei)}},xs=n=>new en({validate:n.validate,placeholder:n.placeholder,defaultValue:n.defaultValue,initialValue:n.initialValue,render(){var r;let e=`${w.default.gray(ne)}
|
|
22
|
+
${ti(this.state)} ${n.message}
|
|
23
23
|
`,t=n.placeholder?w.default.inverse(n.placeholder[0])+w.default.dim(n.placeholder.slice(1)):w.default.inverse(w.default.hidden("_")),i=this.value?this.valueWithCursor:t;switch(this.state){case"error":return`${e.trim()}
|
|
24
|
-
${w.default.yellow(
|
|
25
|
-
${w.default.yellow(
|
|
26
|
-
`;case"submit":return`${e}${w.default.gray(
|
|
27
|
-
`+w.default.gray(
|
|
28
|
-
${w.default.cyan(
|
|
29
|
-
`}}}).prompt();var
|
|
30
|
-
${
|
|
31
|
-
`,r=this.value?e:t;switch(this.state){case"submit":return`${i}${w.default.gray(
|
|
32
|
-
${w.default.gray(
|
|
33
|
-
${w.default.cyan(
|
|
34
|
-
`}}}).prompt()},
|
|
35
|
-
${
|
|
36
|
-
`;switch(this.state){case"submit":return`${i}${w.default.gray(
|
|
37
|
-
${w.default.gray(
|
|
38
|
-
${w.default.cyan(
|
|
39
|
-
${w.default.cyan(
|
|
40
|
-
`}}}}).prompt()};var
|
|
41
|
-
|
|
42
|
-
`)},
|
|
43
|
-
`)},
|
|
44
|
-
${w.default.gray(
|
|
45
|
-
|
|
46
|
-
`)},
|
|
47
|
-
`);t.push(`${e} ${i}`,...r.map(o=>`${w.default.gray(
|
|
24
|
+
${w.default.yellow(ne)} ${i}
|
|
25
|
+
${w.default.yellow(Et)} ${w.default.yellow(this.error)}
|
|
26
|
+
`;case"submit":return`${e}${w.default.gray(ne)} ${w.default.dim(this.value||n.placeholder)}`;case"cancel":return`${e}${w.default.gray(ne)} ${w.default.strikethrough(w.default.dim(this.value??""))}${(r=this.value)!=null&&r.trim()?`
|
|
27
|
+
`+w.default.gray(ne):""}`;default:return`${e}${w.default.cyan(ne)} ${i}
|
|
28
|
+
${w.default.cyan(Et)}
|
|
29
|
+
`}}}).prompt();var nn=n=>{let e=n.active??"Yes",t=n.inactive??"No";return new Xt({active:e,inactive:t,initialValue:n.initialValue??!0,render(){let i=`${w.default.gray(ne)}
|
|
30
|
+
${ti(this.state)} ${n.message}
|
|
31
|
+
`,r=this.value?e:t;switch(this.state){case"submit":return`${i}${w.default.gray(ne)} ${w.default.dim(r)}`;case"cancel":return`${i}${w.default.gray(ne)} ${w.default.strikethrough(w.default.dim(r))}
|
|
32
|
+
${w.default.gray(ne)}`;default:return`${i}${w.default.cyan(ne)} ${this.value?`${w.default.green(Zn)} ${e}`:`${w.default.dim(Xn)} ${w.default.dim(e)}`} ${w.default.dim("/")} ${this.value?`${w.default.dim(Xn)} ${w.default.dim(t)}`:`${w.default.green(Zn)} ${t}`}
|
|
33
|
+
${w.default.cyan(Et)}
|
|
34
|
+
`}}}).prompt()},ni=n=>{let e=(i,r)=>{let o=i.label??String(i.value);return r==="active"?`${w.default.green(Zn)} ${o} ${i.hint?w.default.dim(`(${i.hint})`):""}`:r==="selected"?`${w.default.dim(o)}`:r==="cancelled"?`${w.default.strikethrough(w.default.dim(o))}`:`${w.default.dim(Xn)} ${w.default.dim(o)}`},t=0;return new bs({options:n.options,initialValue:n.initialValue,render(){let i=`${w.default.gray(ne)}
|
|
35
|
+
${ti(this.state)} ${n.message}
|
|
36
|
+
`;switch(this.state){case"submit":return`${i}${w.default.gray(ne)} ${e(this.options[this.cursor],"selected")}`;case"cancel":return`${i}${w.default.gray(ne)} ${e(this.options[this.cursor],"cancelled")}
|
|
37
|
+
${w.default.gray(ne)}`;default:{let r=n.maxItems===void 0?1/0:Math.max(n.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,s=r<this.options.length&&t+r<this.options.length;return`${i}${w.default.cyan(ne)} ${this.options.slice(t,t+r).map((a,f,D)=>f===0&&o?w.default.dim("..."):f===D.length-1&&s?w.default.dim("..."):e(a,f+t===this.cursor?"active":"inactive")).join(`
|
|
38
|
+
${w.default.cyan(ne)} `)}
|
|
39
|
+
${w.default.cyan(Et)}
|
|
40
|
+
`}}}}).prompt()};var it=(n="")=>{process.stdout.write(`${w.default.gray(Et)} ${w.default.red(n)}
|
|
41
|
+
|
|
42
|
+
`)},sn=(n="")=>{process.stdout.write(`${w.default.gray(Pu)} ${n}
|
|
43
|
+
`)},ii=(n="")=>{process.stdout.write(`${w.default.gray(ne)}
|
|
44
|
+
${w.default.gray(Et)} ${n}
|
|
45
|
+
|
|
46
|
+
`)},X={message:(n="",{symbol:e=w.default.gray(ne)}={})=>{let t=[`${w.default.gray(ne)}`];if(n){let[i,...r]=n.split(`
|
|
47
|
+
`);t.push(`${e} ${i}`,...r.map(o=>`${w.default.gray(ne)} ${o}`))}process.stdout.write(`${t.join(`
|
|
48
48
|
`)}
|
|
49
|
-
`)},info:n=>{
|
|
50
|
-
`);let c=0,p=0;i=setInterval(()=>{let C=w.default.magenta(n[c]),E=".".repeat(Math.floor(p)).slice(0,3);process.stdout.write(
|
|
51
|
-
`),t()},f=(h="")=>{o=h??o},D=h=>{let c=h>1?"Something went wrong":"Canceled";r&&a(c,h)};return process.on("uncaughtExceptionMonitor",()=>D(2)),process.on("unhandledRejection",()=>D(2)),process.on("SIGINT",()=>D(1)),process.on("SIGTERM",()=>D(1)),process.on("exit",D),{start:s,stop:a,message:f}};var
|
|
52
|
-
|
|
53
|
-
`):
|
|
54
|
-
|
|
55
|
-
`)),s(!1)}),i.on("close",a=>{s(a===0)})}catch{s(!1)}});return{abort:async()=>{i&&i.kill("SIGINT")},install:r}}async function
|
|
56
|
-
`)}function
|
|
57
|
-
\u274C ${
|
|
58
|
-
`),process.exit(1)}function
|
|
59
|
-
${
|
|
60
|
-
.::: ${
|
|
61
|
-
.:::: ${
|
|
62
|
-
.:::::. ${
|
|
63
|
-
::::::. ${
|
|
64
|
-
::::::. ${
|
|
65
|
-
::::::. ${
|
|
66
|
-
:::::::. ${
|
|
67
|
-
::::::::.. ${
|
|
68
|
-
.:::::::::. ${
|
|
49
|
+
`)},info:n=>{X.message(n,{symbol:w.default.blue(Mu)})},success:n=>{X.message(n,{symbol:w.default.green(Tu)})},step:n=>{X.message(n,{symbol:w.default.green(ei)})},warn:n=>{X.message(n,{symbol:w.default.yellow(Nu)})},warning:n=>{X.warn(n)},error:n=>{X.message(n,{symbol:w.default.red(Wu)})}},yt=()=>{let n=Qn?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],e=Qn?80:120,t,i,r=!1,o="",s=(h="")=>{r=!0,t=Es(),o=h.replace(/\.+$/,""),process.stdout.write(`${w.default.gray(ne)}
|
|
50
|
+
`);let c=0,p=0;i=setInterval(()=>{let C=w.default.magenta(n[c]),E=".".repeat(Math.floor(p)).slice(0,3);process.stdout.write(bt.cursor.move(-999,0)),process.stdout.write(bt.erase.down(1)),process.stdout.write(`${C} ${o}${E}`),c=c+1<n.length?c+1:0,p=p<n.length?p+.125:0},e)},a=(h="",c=0)=>{o=h??o,r=!1,clearInterval(i);let p=c===0?w.default.green(ei):c===1?w.default.red(ys):w.default.red(ws);process.stdout.write(bt.cursor.move(-999,0)),process.stdout.write(bt.erase.down(1)),process.stdout.write(`${p} ${o}
|
|
51
|
+
`),t()},f=(h="")=>{o=h??o},D=h=>{let c=h>1?"Something went wrong":"Canceled";r&&a(c,h)};return process.on("uncaughtExceptionMonitor",()=>D(2)),process.on("unhandledRejection",()=>D(2)),process.on("SIGINT",()=>D(1)),process.on("SIGTERM",()=>D(1)),process.on("exit",D),{start:s,stop:a,message:f}};var si,As,$s,vs,Bs=!0;typeof process<"u"&&({FORCE_COLOR:si,NODE_DISABLE_COLORS:As,NO_COLOR:$s,TERM:vs}=process.env||{},Bs=process.stdout&&process.stdout.isTTY);var Ru={enabled:!As&&$s==null&&vs!=="dumb"&&(si!=null&&si!=="0"||Bs)};function G(n,e){let t=new RegExp(`\\x1b\\[${e}m`,"g"),i=`\x1B[${n}m`,r=`\x1B[${e}m`;return function(o){return!Ru.enabled||o==null?o:i+(~(""+o).indexOf(r)?o.replace(t,r+i):o)+r}}var Os=G(0,0),_s=G(1,22),Pc=G(2,22),Mc=G(3,23),Tc=G(4,24),Nc=G(7,27),Wc=G(8,28),Rc=G(9,29),Lc=G(30,39),Ce=G(31,39),Ss=G(32,39),js=G(33,39),Is=G(34,39),me=G(35,39),Fe=G(36,39),Ps=G(37,39),He=G(90,39),kc=G(90,39),zc=G(40,49),rn=G(41,49),qc=G(42,49),Uc=G(43,49),Rt=G(44,49),ri=G(45,49),Vc=G(46,49),Hc=G(47,49);var oi=ue(require("node:fs")),Ms=require("node:path"),on=async n=>{let e=await oi.default.promises.readdir(n);return await Promise.all(e.map(t=>oi.default.promises.rm((0,Ms.join)(n,t),{recursive:!0})))};var Dn=ue(require("node:fs")),hn=require("node:path");var vr=ue(Ns(),1),Ci=ue(require("node:fs"),1),Fi=require("node:path"),Br=ue(Ar(),1);function At(n,e,t){let i,r=new Promise(s=>{try{i=(0,Br.default)(n,e,{cwd:t,stdio:"ignore"}),i.on("error",a=>{a&&(a.message?X.error(Ce(String(a.message))+`
|
|
52
|
+
|
|
53
|
+
`):X.error(Ce(String(a))+`
|
|
54
|
+
|
|
55
|
+
`)),s(!1)}),i.on("close",a=>{s(a===0)})}catch{s(!1)}});return{abort:async()=>{i&&i.kill("SIGINT")},install:r}}async function Or(n){let e=(0,Fi.join)(n,"package.json");return JSON.parse(await Ci.default.promises.readFile(e,"utf-8"))}async function _r(n,e){let t=(0,Fi.join)(n,"package.json");await Ci.default.promises.writeFile(t,JSON.stringify(e,null,2)+`
|
|
56
|
+
`)}function Sr(n){return new Promise(e=>setTimeout(e,n))}function jr(n){var i;n={...n};let e={name:n.name,version:n.version,description:n.description,scripts:n.scripts,dependencies:n.dependencies,devDependencies:n.devDependencies,main:n.main,qwik:n.qwik,module:n.module,types:n.types,exports:n.exports,files:n.files,engines:{node:((i=n.engines)==null?void 0:i.node)||"^18.17.0 || ^20.3.0 || >=21.0.0"}};Object.keys(e).forEach(r=>{delete n[r]}),delete n.__qwik__;let t=Object.keys(n).sort();for(let r of t)e[r]=n[r];return e}function Ir(n){return n.toLocaleLowerCase().split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Ge(){var n;return((n=(0,vr.default)())==null?void 0:n.name)||"pnpm"}function Lt(n){console.error(`
|
|
57
|
+
\u274C ${Ce(n)}
|
|
58
|
+
`),process.exit(1)}function Pr(){console.log(Is(`
|
|
59
|
+
${me("............")}
|
|
60
|
+
.::: ${me(":--------:.")}
|
|
61
|
+
.:::: ${me(".:-------:.")}
|
|
62
|
+
.:::::. ${me(".:-------.")}
|
|
63
|
+
::::::. ${me(".:------.")}
|
|
64
|
+
::::::. ${me(":-----:")}
|
|
65
|
+
::::::. ${me(".:-----.")}
|
|
66
|
+
:::::::. ${me(".-----.")}
|
|
67
|
+
::::::::.. ${me("---:.")}
|
|
68
|
+
.:::::::::. ${me(":-:.")}
|
|
69
69
|
..::::::::::::
|
|
70
70
|
...::::
|
|
71
71
|
`),`
|
|
72
|
-
`)}function
|
|
72
|
+
`)}function Mr(){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 ha=Mr(),$t=(n,e)=>ha?n:e,mi=$t("\u2502","|"),$r=$t("\u2500","-"),pa=$t("\u256E","+"),da=$t("\u251C","+"),ma=$t("\u256F","+"),ga=$t("\u25C7","o");function Ca(){let n=["[\\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(n,"g")}var gi=n=>n.replace(Ca(),""),an=(n="",e="")=>{let t=`
|
|
73
73
|
${n}
|
|
74
74
|
`.split(`
|
|
75
|
-
`),i=
|
|
76
|
-
`);process.stdout.write(`${
|
|
77
|
-
${
|
|
75
|
+
`),i=gi(e).length,r=Math.max(t.reduce((s,a)=>(a=gi(a),a.length>s?a.length:s),0),i)+2,o=t.map(s=>`${He(mi)} ${Ps(s)}${" ".repeat(r-gi(s).length)}${He(mi)}`).join(`
|
|
76
|
+
`);process.stdout.write(`${He(mi)}
|
|
77
|
+
${Ss(ga)} ${Os(e)} ${He($r.repeat(Math.max(r-i-1,1))+pa)}
|
|
78
78
|
${o}
|
|
79
|
-
${
|
|
80
|
-
`)};var
|
|
79
|
+
${He(da+$r.repeat(r+2)+ma)}
|
|
80
|
+
`)};var yi=ue(require("node:fs"),1),Nr=require("node:path");var ke=ue(require("node:fs"),1),$e=ue(require("node:path"),1);function st(n,e){return At(n,["install"],e)}function Tr(n,e){let{tmpInstallDir:t}=Fa(e),{install:i,abort:r}=st(n,t),s={abort:()=>r().finally(()=>ke.default.rmSync(t,{recursive:!0})),complete:async a=>{let f=!1;try{if(await i){let h=$e.default.join(t,"node_modules"),c=$e.default.join(a,"node_modules");await ke.default.promises.rename(h,c);try{await ke.default.promises.rename($e.default.join(t,"package-lock.json"),$e.default.join(a,"package-lock.json"))}catch{}try{await ke.default.promises.rename($e.default.join(t,"yarn.lock"),$e.default.join(a,"yarn.lock"))}catch{}try{await ke.default.promises.rename($e.default.join(t,"pnpm-lock.yaml"),$e.default.join(a,"pnpm-lock.yaml"))}catch{}f=!0,ke.default.rmSync(t,{recursive:!0})}}catch(D){D&&(D.message?X.error(Ce(String(D.message))+`
|
|
81
81
|
|
|
82
|
-
`):
|
|
82
|
+
`):X.error(Ce(String(D))+`
|
|
83
83
|
|
|
84
|
-
`))}if(!f){let D=`${
|
|
85
|
-
You might need to run ${
|
|
84
|
+
`))}if(!f){let D=`${rn(` ${n} install failed `)}
|
|
85
|
+
You might need to run ${Fe(`"${n} install"`)} manually inside the root of the project.
|
|
86
86
|
|
|
87
|
-
`;
|
|
88
|
-
`,type:"modify"})}catch{n.files.push({path:t,content:i,type:"create"})}}async function
|
|
89
|
-
`,type:"modify"})}catch{n.files.push({path:t,content:i,type:"create"})}}function
|
|
87
|
+
`;X.error(D)}return f},success:void 0};return i.then(a=>s.success=a),s}function Fa(n){let e=".create-qwik-"+Math.round(Math.random()*Number.MAX_SAFE_INTEGER).toString(36).toLowerCase(),t=$e.default.resolve(n.target,"..",e);try{ke.default.mkdirSync(t)}catch(o){X.error(`\u274C ${Ce(String(o))}`)}let i=$e.default.join(n.dir,"package.json"),r=$e.default.join(t,"package.json");return ke.default.copyFileSync(i,r),{tmpInstallDir:t}}var cn=ue(require("node:fs"),1),ln=require("node:path");var bi=null;async function fn(){if(!bi){let n=[],e=["app","feature","adapter"],t=(0,ln.join)(__dirname,"starters"),i=await cn.default.promises.readdir(t);await Promise.all(i.map(async r=>{let o=r.slice(0,r.length-1);if(e.includes(o)){let s=(0,ln.join)(t,r),a=await cn.default.promises.readdir(s);await Promise.all(a.map(async f=>{var c,p,C,E;let D=(0,ln.join)(s,f);if((await cn.default.promises.stat(D)).isDirectory()){let b=await Or(D),g={id:f,name:((c=b.__qwik__)==null?void 0:c.displayName)??Ir(f),type:o,dir:D,pkgJson:b,docs:((p=b.__qwik__)==null?void 0:p.docs)??[],priority:((C=b==null?void 0:b.__qwik__)==null?void 0:C.priority)??0,alwaysInRoot:((E=b.__qwik__)==null?void 0:E.alwaysInRoot)??[]};n.push(g)}}))}})),n.sort((r,o)=>r.priority>o.priority?-1:r.priority<o.priority?1:r.id<o.id?-1:1),bi=n}return bi}var he=ue(require("node:fs"),1),vt=require("node:path");async function Ei(n,e,t,i,r){let o=await he.default.promises.readdir(t);await Promise.all(o.map(async s=>{let a=s==="gitignore"?".gitignore":s,f=(0,vt.extname)(a),D=(0,vt.join)(t,s),h=(0,vt.join)(i,a),c=await he.default.promises.stat(D);if(c.isDirectory())await Ei(n,e,D,h,r);else if(c.isFile()){let p=ba(e,h,i,a,r);a==="package.json"?await Ea(n,D,h):a==="settings.json"?await ya(n,D,p):a==="README.md"?await xa(n,D,p):a===".gitignore"||a===".prettierignore"||a===".eslintignore"?await Aa(n,D,h):f===".css"?await $a(n,D,p,e):he.default.existsSync(p)?n.files.push({path:p,content:await he.default.promises.readFile(D),type:"overwrite"}):n.files.push({path:p,content:await he.default.promises.readFile(D),type:"create"})}}))}function ba(n,e,t,i,r){let o=n.projectDir?n.projectDir:"",s=t.indexOf(n.rootDir)+n.rootDir.length,a=t.slice(s),f=(0,vt.join)(n.rootDir,o,a,i);return r&&r.some(h=>i.includes(h)||t.includes(h))?e:f}async function Ea(n,e,t){var r;let i=await he.default.promises.readFile(e,"utf-8");try{let o=JSON.parse(i),s=["scripts","dependencies","devDependencies"],a=JSON.parse(await he.default.promises.readFile(t,"utf-8"));if(s.forEach(f=>{wa(o,a,f)}),(r=a.scripts)!=null&&r.qwik){let f=a.scripts.qwik;delete a.scripts.qwik,a.scripts.qwik=f}n.files.push({path:t,content:JSON.stringify(a,null,2)+`
|
|
88
|
+
`,type:"modify"})}catch{n.files.push({path:t,content:i,type:"create"})}}async function ya(n,e,t){let i=await he.default.promises.readFile(e,"utf-8");try{let r=JSON.parse(i),o=JSON.parse(await he.default.promises.readFile(t,"utf-8"));Object.assign(r,o),n.files.push({path:t,content:JSON.stringify(r,null,2)+`
|
|
89
|
+
`,type:"modify"})}catch{n.files.push({path:t,content:i,type:"create"})}}function wa(n,e,t){if(n[t]){e[t]?Object.assign(e[t],{...n[t]}):e[t]={...n[t]};let i={},r=Object.keys(e[t]).sort();for(let o of r)i[o]=e[t][o];e[t]=i}}async function xa(n,e,t){let i=await he.default.promises.readFile(e,"utf-8"),r,o="";try{o=await he.default.promises.readFile(t,"utf-8"),o=o.trim()+`
|
|
90
90
|
|
|
91
|
-
`+i,r="modify"}catch{o=i,r="create"}let s=
|
|
92
|
-
`,type:r})}async function
|
|
91
|
+
`+i,r="modify"}catch{o=i,r="create"}let s=Ge();s!=="npm"&&(o=o.replace(/\b(npm run|pnpm run|yarn( run)?)\b/g,s)),n.files.push({path:t,content:o.trim()+`
|
|
92
|
+
`,type:r})}async function Aa(n,e,t){let i=await he.default.promises.readFile(e,"utf-8");try{let r=await he.default.promises.readFile(t,"utf-8"),o=i.trim().split(/\r?\n/),s=r.trim().split(/\r?\n/);for(let a of o)s.includes(a)||(a.startsWith("#")&&s.push(""),s.push(a));n.files.push({path:t,content:s.join(`
|
|
93
93
|
`).trim()+`
|
|
94
|
-
`,type:"modify"})}catch{n.files.push({path:t,content:i,type:"create"})}}async function
|
|
94
|
+
`,type:"modify"})}catch{n.files.push({path:t,content:i,type:"create"})}}async function $a(n,e,t,i){let r=await he.default.promises.readFile(e,"utf-8");try{let o=await he.default.promises.readFile(t,"utf-8"),s=r.trim()+`
|
|
95
95
|
|
|
96
96
|
`+o.trim()+`
|
|
97
|
-
`,a=i.installDeps===!0;n.files.push({path:t,content:a?s:r,type:a?"modify":"overwrite"})}catch{n.files.push({path:t,content:r,type:"create"})}}async function
|
|
98
|
-
You might need to run "${
|
|
99
|
-
`)}var
|
|
100
|
-
`),"Result"),
|
|
101
|
-
`).map(r=>r.split(" ")),i=0;return t.forEach(r=>{r.length>1&&
|
|
102
|
-
`)}rowToString(e,t){return this.rasterize(e).forEach((i,r)=>{let o="";i.forEach((s,a)=>{let{width:f}=e[a],D=this.negatePadding(e[a]),h=s;if(D>
|
|
97
|
+
`,a=i.installDeps===!0;n.files.push({path:t,content:a?s:r,type:a?"modify":"overwrite"})}catch{n.files.push({path:t,content:r,type:"create"})}}async function wi(n,e){let i=(await fn()).find(a=>a.id===e.integration);if(!i)throw new Error(`Unable to find integration "${e.integration}"`);let r={files:[],installedDeps:{},installedScripts:Object.keys(i.pkgJson.scripts||{})};e.installDeps&&(r.installedDeps={...i.pkgJson.dependencies,...i.pkgJson.devDependencies}),await Ei(r,e,i.dir,e.rootDir,i.alwaysInRoot);let o=async a=>{let f=Object.keys(r.installedDeps).length>0,D=yt();a&&D.start(`Updating app${f?" and installing dependencies":""}...`);let h=!0;try{let c=new Set(r.files.map(C=>(0,Nr.dirname)(C.path)));for(let C of Array.from(c))try{yi.default.mkdirSync(C,{recursive:!0})}catch{}let p=Promise.all(r.files.map(async C=>{await yi.default.promises.writeFile(C.path,C.content)}));if(e.installDeps&&Object.keys(r.installedDeps).length>0){let{install:C}=st(n,e.rootDir);h=await C}if(await p,a&&D.stop("App updated"),!h){let C=`${rn(` ${n} install failed `)}
|
|
98
|
+
You might need to run "${Fe(`${n} install`)}" manually inside the root of the project.`;X.error(C)}}catch(c){a&&D.stop("App updated"),Lt(String(c))}};return{rootDir:e.rootDir,integration:i,updates:r,commit:o}}function va(n){return typeof n=="string"&&n.trim().length>0}function Ba(n){if(!va(n.outDir))throw new Error("Missing outDir");if(!(0,hn.isAbsolute)(n.outDir))throw new Error("outDir must be an absolute path")}async function Bt(n){let{appId:e,outDir:t,pkgManager:i,templateManager:r}=n,{baseApp:o,starterApp:s}=r.getBootstrapApps(e);Ba(n),Dn.default.existsSync(t)||Dn.default.mkdirSync(decodeURIComponent(t),{recursive:!0});let a=await Oa({baseApp:o,starterApp:s,pkgManager:i,outDir:t});return{starterId:n.appId,outDir:t,pkgManager:i,docs:a}}async function Oa({baseApp:n,starterApp:e,outDir:t,pkgManager:i}){let r=[...n.docs],o=e??n,s=jr({...n.pkgJson,name:`my-${o.pkgJson.name}`,description:o.pkgJson.description,scripts:void 0,dependencies:void 0,devDependencies:void 0});await _r(t,s);let a=(0,hn.join)(t,"README.md");return await Dn.default.promises.writeFile(a,""),await(await wi(i,{rootDir:t,integration:n.id,installDeps:!1})).commit(!1),e&&(r.push(...e.docs),await(await wi(i,{rootDir:t,integration:e.id,installDeps:!1})).commit(!1)),r}var Qi=ue(require("node:fs"));async function pn(n,{pkgManager:e,spinner:t}){t.start(`Installing ${e} dependencies...`);let i=await n();return t.stop(`${i?"Installed":"Failed to install"} ${e} dependencies \u{1F4CB}`),i}function Wr(n){let e=[];return n.length>0&&(e.push(`\u{1F4C4} ${Fe("Relevant docs:")}`),n.forEach(t=>{e.push(` ${t}`)})),e.push(""),e.push(`\u{1F4AC} ${Fe("Questions? Start the conversation at:")}`),e.push(" https://qwik.dev/chat"),e.push(" https://twitter.com/QwikDev"),e.push(""),e.join(`
|
|
99
|
+
`)}var Rr=require("node:path");function dn(n,e,t){let i=process.cwd()===e.outDir,r=(0,Rr.relative)(process.cwd(),e.outDir),o=[];i?o.push(`\u{1F984} ${ri(" Success! ")}`):o.push(`\u{1F984} ${ri(" Success! ")} ${Fe("Project created in")} ${_s(me(r))} ${Fe("directory")}`),o.push("");let s=n!=="npm"?`${n} qwik add`:"npm run qwik add";o.push(`\u{1F90D} ${Fe("Integrations? Add Netlify, Cloudflare, Tailwind...")}`),o.push(` ${s}`),o.push(""),o.push(Wr(e.docs)),o.push(`\u{1F440} ${Fe("Presentations, Podcasts and Videos:")}`),o.push(" https://qwik.dev/media/"),o.push(""),o.push(`\u{1F430} ${Fe("Next steps:")}`),i||o.push(` cd ${r}`),t||o.push(` ${n} install`),n==="deno"?o.push(" deno task start"):o.push(` ${n} start`),o.push(""),an(o.join(`
|
|
100
|
+
`),"Result"),ii("Happy coding! \u{1F389}")}var xi,_a="library",mn="base",kt=class extends Error{constructor(e,t){super(),this.message=`Invalid app id "${e}". It can only be one of${t.map(i=>` "${i.id}"`)}.`}},Ot=async n=>{xi||(xi=await fn());let e=xi.filter(s=>s.type===n),t=e.filter(s=>s.id!==mn);function i(s,a=!0){return a?t.find(f=>f.id===s):e.find(f=>f.id===s)}function r(){return i(mn,!1)}function o(s){if(s===_a){let h=i(s);if(!h)throw new kt(s,t);return{baseApp:h}}let f=i(mn,!1),D=i(s);if(!f)throw new kt(mn,t);if(!D)throw new kt(s,t);return{baseApp:f,starterApp:D}}return{templates:e,standaloneTemplates:t,getAppById:i,getBootstrapApps:o,getBaseApp:r}};var Ai=require("path"),Lr=ue(require("node:os"));function gn(n){return n.startsWith("~/")?(0,Ai.resolve)(Lr.default.homedir(),n):(0,Ai.resolve)(process.cwd(),n)}var An=require("assert");var Sa={right:Ta,center:Na},ja=0,Cn=1,Ia=2,Fn=3,$i=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(i=>typeof i=="string"?this.colFromString(i):i);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(`
|
|
101
|
+
`).map(r=>r.split(" ")),i=0;return t.forEach(r=>{r.length>1&&be.stringWidth(r[0])>i&&(i=Math.min(Math.floor(this.width*.5),be.stringWidth(r[0])))}),t.forEach(r=>{this.div(...r.map((o,s)=>({text:o.trim(),padding:this.measurePadding(o),width:s===0&&r.length>1?i: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(`
|
|
102
|
+
`)}rowToString(e,t){return this.rasterize(e).forEach((i,r)=>{let o="";i.forEach((s,a)=>{let{width:f}=e[a],D=this.negatePadding(e[a]),h=s;if(D>be.stringWidth(s)&&(h+=" ".repeat(D-be.stringWidth(s))),e[a].align&&e[a].align!=="left"&&this.wrap){let p=Sa[e[a].align];h=p(h,D),be.stringWidth(h)<D&&(h+=" ".repeat((f||0)-be.stringWidth(h)-1))}let c=e[a].padding||[0,0,0,0];c[Fn]&&(o+=" ".repeat(c[Fn])),o+=kr(e[a],h,"| "),o+=h,o+=kr(e[a],h," |"),c[Cn]&&(o+=" ".repeat(c[Cn])),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 i=e.match(/^ */),r=i?i[0].length:0,o=t.text,s=be.stringWidth(o.trimRight());return t.span?this.wrap?r<s?e:(t.hidden=!0,o.trimRight()+" ".repeat(r-s)+e.trimLeft()):(t.hidden=!0,o+e):e}rasterize(e){let t=[],i=this.columnWidths(e),r;return e.forEach((o,s)=>{o.width=i[s],this.wrap?r=be.wrap(o.text,this.negatePadding(o),{hard:!0}).split(`
|
|
103
103
|
`):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=ka(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 de=0;de<_.length;de++){if(I=m.slice(de+2),_[de+1]&&_[de+1]==="="){fe=m.slice(de+3),d=_[de],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(_[de],I);continue}if(/[A-Za-z]/.test(_[de])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(I)&&M(I,g.bools)===!1){H(_[de],I),F=!0;break}if(_[de+1]&&_[de+1].match(/\W/)){H(_[de],I),F=!0;break}else H(_[de],ne(_[de]))}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=za(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 ka(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 za(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 qa=process?process.env:{},eo=new xn({cwd:process.cwd,env:()=>qa,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 Ua(){return Va()?0:1}function Va(){return Ha()&&!process.defaultApp}function Ha(){return!!process.versions.electron}function no(){return process.argv[Ua()]}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 Ga=n=>oo(n,ro),uo=Ga;var Ka={},Ya="require is not supported by ESM",ao="loading a directory of commands is not supported yet for ESM",Ut;try{Ut=(0,fo.fileURLToPath)(Ka.url)}catch{Ut=process.cwd()}var Ja=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:Ja||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(Ya)},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 Qa=["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 ${Qa[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=Za(n)?n():n;return J(i)?i.then(r=>e(r)):e(i)}catch(i){return t(i)}}function Za(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(Xa(e))[e,...a]=e;else for(let D of e)this.addHandler(D);else if(tc(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 ec(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 Xa(n){return n.every(e=>typeof e=="string")}function Bn(n){return typeof n=="function"}function ec(n){return typeof n=="object"}function tc(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 nc(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(nc(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")}>
|
|
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[ja]||0).fill("")),r.push(...new Array(o.padding[Ia]||0).fill(""))),r.forEach((a,f)=>{t[f]||t.push([]);let D=t[f];for(let h=0;h<s;h++)D[h]===void 0&&D.push("");D.push(a)})}),t}negatePadding(e){let t=e.width||0;return e.padding&&(t-=(e.padding[Fn]||0)+(e.padding[Cn]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map(s=>s.width||be.stringWidth(s.text));let t=e.length,i=this.width,r=e.map(s=>{if(s.width)return t--,i-=s.width,s.width}),o=t?Math.floor(i/t):0;return r.map((s,a)=>s===void 0?Math.max(o,Pa(e[a])):s)}};function kr(n,e,t){return n.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?t:" ":""}function Pa(n){let e=n.padding||[],t=1+(e[Fn]||0)+(e[Cn]||0);return n.border?t+4:t}function Ma(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Ta(n,e){n=n.trim();let t=be.stringWidth(n);return t<e?" ".repeat(e-t)+n:n}function Na(n,e){n=n.trim();let t=be.stringWidth(n);return t>=e?n:" ".repeat(e-t>>1)+n}var be;function zr(n,e){return be=e,new $i({width:(n==null?void 0:n.width)||Ma(),wrap:n==null?void 0:n.wrap})}var qr=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function vi(n){return n.replace(qr,"")}function Ur(n,e){let[t,i]=n.match(qr)||["",""];n=vi(n);let r="";for(let o=0;o<n.length;o++)o!==0&&o%e===0&&(r+=`
|
|
105
|
+
`),r+=n.charAt(o);return t&&i&&(r=`${t}${r}${i}`),r}function Bi(n){return zr(n,{stringWidth:e=>[...e].length,stripAnsi:vi,wrap:Ur})}var _t=require("path"),bn=require("fs");function Vr(n,e){let t=(0,_t.resolve)(".",n),i;for((0,bn.statSync)(t).isDirectory()||(t=(0,_t.dirname)(t));;){if(i=e(t,(0,bn.readdirSync)(t)),i)return(0,_t.resolve)(t,i);if(t=(0,_t.dirname)(i=t),i===t)break}}var uo=require("util"),ao=require("fs"),co=require("url");var Kr=require("util"),xn=require("path");function rt(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 En(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 yn(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 Hr(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 ve;(function(n){n.BOOLEAN="boolean",n.STRING="string",n.NUMBER="number",n.ARRAY="array"})(ve||(ve={}));var ze,wn=class{constructor(e){ze=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=Hr(e),o=typeof e=="string",s=Wa(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.__||ze.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)})),nt(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;Gt();let k=[],V=Object.assign(Object.create(null),{_:[]}),qe={};for(let l=0;l<r.length;l++){let m=r[l],y=m.replace(/^-{3,}/,"---"),F,d,_,A,I,le;if(m!=="--"&&/^-/.test(m)&&ee(m))je(m);else if(y.match(/^---+(=|$)/)){je(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=et(l,A[1],r,A[2]):M(A[1],g.nargs)!==!1?l=Ct(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=et(l,d,r):M(d,g.nargs)!==!1?l=Ct(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,te(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,te(d)));else if(m.match(/^-[^-]+/)&&!m.match(B)){_=m.slice(1,-1).split(""),F=!1;for(let pe=0;pe<_.length;pe++){if(I=m.slice(pe+2),_[pe+1]&&_[pe+1]==="="){le=m.slice(pe+3),d=_[pe],M(d,g.arrays)?l=et(l,d,r,le):M(d,g.nargs)!==!1?l=Ct(l,d,r,le):H(d,le),F=!0;break}if(I==="-"){H(_[pe],I);continue}if(/[A-Za-z]/.test(_[pe])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(I)&&M(I,g.bools)===!1){H(_[pe],I),F=!0;break}if(_[pe+1]&&_[pe+1].match(/\W/)){H(_[pe],I),F=!0;break}else H(_[pe],te(_[pe]))}d=m.slice(-1)[0],!F&&d!=="-"&&(M(d,g.arrays)?l=et(l,d,r):M(d,g.nargs)!==!1?l=Ct(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,te(d))))}else if(m.match(/^-[0-9]$/)&&m.match(B)&&M(m.slice(1),g.bools))d=m.slice(1),H(d,te(d));else if(m==="--"){k=r.slice(l+1);break}else if(a["halt-at-non-option"]){k=r.slice(l);break}else je(m)}z(V,!0),z(V,!1),R(V),ae(),Z(V,g.aliases,f,!0),ce(V),a["set-placeholder-key"]&&tt(V),Object.keys(g.counts).forEach(function(l){Re(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=>rt(m)).join(".")],delete V[l]});function je(l){let m=O("_",l);(typeof m=="string"||typeof m=="number")&&V._.push(m)}function Ct(l,m,y,F){let d,_=M(m,g.nargs);if(_=typeof _!="number"||isNaN(_)?1:_,_===0)return Pe(F)||(U=Error(b("Argument unexpected for: %s",m))),H(m,te(m)),l;let A=Pe(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)||ee(y[d]));d++)A++;A<_&&(U=Error(b("Not enough arguments following: %s",m)))}let I=Math.min(A,_);for(!Pe(F)&&I>0&&(H(m,F),I--),d=l+1;d<I+l+1;d++)H(m,y[d]);return l+I}function et(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(Pe(_)||Pe(F)&&/^-/.test(_)&&!B.test(_)&&!ee(_)){if(f[m]!==void 0){let I=f[m];d=Array.isArray(I)?I:[I]}}else{Pe(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(_)&&!ee(_)));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 rt(A)}).join(".");S(l,_)}let F=x(l,m,y),d=l.split(".");Le(V,d,F),g.aliases[l]&&g.aliases[l].forEach(function(_){let A=_.split(".");Le(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("."))||Le(V,A,F)}),M(l,g.normalize)&&!M(l,g.arrays)&&[l].concat(g.aliases[l]||[]).forEach(function(A){Object.defineProperty(qe,A,{enumerable:!0,get(){return m},set(I){m=typeof I=="string"?ze.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=Ra(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)&&(Pe(F)||typeof F=="boolean")&&(F=Oi()),M(l,g.normalize)&&M(l,g.arrays)&&(Array.isArray(m)?F=m.map(d=>ze.normalize(d)):F=ze.normalize(m)),F}function O(l,m){return!a["parse-positional-numbers"]&&l==="_"||!M(l,g.strings)&&!M(l,g.bools)&&!Array.isArray(m)&&(yn(m)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${m}`)))||!Pe(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,_=ze.resolve(ze.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=ze.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):(!Re(V,d.split("."))||M(d,g.arrays)&&a["combine-arrays"])&&H(d,F)})}function ae(){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=ze.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)),rt(A)});(m&&g.configs[_.join(".")]||!m)&&!Re(l,_)&&H(_.join("."),F[d])}})}function ce(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 tt(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){Re(l,d.split("."))||(Le(l,d.split("."),y[d]),F&&(E[d]=!0),(m[d]||[]).forEach(function(_){Re(l,_.split("."))||Le(l,_.split("."),y[d])}))})}function Re(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 Le(l,m,y){let F=l;a["dot-notation"]||(m=[m.join(".")]),m.slice(0,-1).forEach(function(le){le=Gr(le),typeof F=="object"&&F[le]===void 0&&(F[le]={}),typeof F[le]!="object"||Array.isArray(F[le])?(Array.isArray(F[le])?F[le].push({}):F[le]=[F[le],{}],F=F[le][F[le].length-1]):F=F[le]});let d=Gr(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,(!Pe(F[d])&&g.nargs[d]===1||Array.isArray(F[d])&&F[d].length===g.nargs[d])&&(F[d]=void 0)),y===Oi()?F[d]=Oi(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 nt(...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=rt(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=En(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 kn(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&&kn(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),!kn(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 ee(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 te(l){return!M(l,g.bools)&&!M(l,g.counts)&&`${l}`in f?f[l]:se(Ie(l))}function se(l){return{[ve.BOOLEAN]:!0,[ve.STRING]:"",[ve.NUMBER]:void 0,[ve.ARRAY]:[]}[l]}function Ie(l){let m=ve.BOOLEAN;return M(l,g.strings)?m=ve.STRING:M(l,g.numbers)?m=ve.NUMBER:M(l,g.bools)?m=ve.BOOLEAN:M(l,g.arrays)&&(m=ve.ARRAY),m}function Pe(l){return l===void 0}function Gt(){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(qe,V),configuration:a,defaulted:Object.assign({},E),error:U,newAliases:Object.assign({},C)}}};function Wa(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 Oi(n){return n!==void 0?n+1:1}function Gr(n){return n==="__proto__"?"___proto___":n}function Ra(n){return typeof n=="string"&&(n[0]==="'"||n[0]==='"')&&n[n.length-1]===n[0]?n.substring(1,n.length-1):n}var Qr=require("fs");var _i,Si,ji,Yr=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,Jr=(Si=(_i=process==null?void 0:process.versions)===null||_i===void 0?void 0:_i.node)!==null&&Si!==void 0?Si:(ji=process==null?void 0:process.version)===null||ji===void 0?void 0:ji.slice(1);if(Jr&&Number(Jr.match(/^([^.]+)/)[1])<Yr)throw Error(`yargs parser supports a minimum Node.js version of ${Yr}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var La=process?process.env:{},Zr=new wn({cwd:process.cwd,env:()=>La,format:Kr.format,normalize:xn.normalize,resolve:xn.resolve,require:n=>{if(typeof require<"u")return require(n);if(n.match(/\.json$/))return JSON.parse((0,Qr.readFileSync)(n,"utf8"));throw Error("only .json config files are supported in ESM")}}),zt=function(e,t){return Zr.parse(e.slice(),t).argv};zt.detailed=function(n,e){return Zr.parse(n.slice(),e)};zt.camelCase=rt;zt.decamelize=En;zt.looksLikeNumber=yn;var Xr=zt;var Te=require("path");function ka(){return za()?0:1}function za(){return qa()&&!process.defaultApp}function qa(){return!!process.versions.electron}function eo(){return process.argv[ka()]}var Y=class n extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,n)}};var St=require("fs"),to=require("util"),no=require("path"),io={fs:{readFileSync:St.readFileSync,writeFile:St.writeFile},format:to.format,resolve:no.resolve,exists:n=>{try{return(0,St.statSync)(n).isFile()}catch{return!1}}};var Me,Ii=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(),Me.format.apply(Me.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),Me.format.apply(Me.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);Me.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{Me.fs.readFileSync&&(e=JSON.parse(Me.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=Me.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(i)&&~t.lastIndexOf("_")){let r=Me.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(r)&&(i=r)}return i}_fileExistsSync(e){return Me.exists(e)}};function so(n,e){Me=e;let t=new Ii(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 Ua=n=>so(n,io),ro=Ua;var Ga={},Va="require is not supported by ESM",oo="loading a directory of commands is not supported yet for ESM",qt;try{qt=(0,co.fileURLToPath)(Ga.url)}catch{qt=process.cwd()}var Ha=qt.substring(0,qt.lastIndexOf("node_modules")),lo={assert:{notStrictEqual:An.notStrictEqual,strictEqual:An.strictEqual},cliui:Bi,findUp:Vr,getEnv:n=>process.env[n],inspect:uo.inspect,getCallerFile:()=>{throw new Y(oo)},getProcessArgvBin:eo,mainFilename:Ha||process.cwd(),Parser:Xr,path:{basename:Te.basename,dirname:Te.dirname,extname:Te.extname,relative:Te.relative,resolve:Te.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:ao.readFileSync,require:()=>{throw new Y(Va)},requireDirectory:()=>{throw new Y(oo)},stringWidth:n=>[...n].length,y18n:ro({directory:(0,Te.resolve)(qt,"../../../locales"),updateFiles:!1})};function ge(n,e,t,i){t.assert.notStrictEqual(n,e,i)}function Pi(n,e){e.assert.strictEqual(typeof n,"string")}function jt(n){return Object.keys(n)}function J(n){return!!n&&!!n.then&&typeof n.then=="function"}function Ye(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 Ya=["first","second","third","fourth","fifth","sixth"];function $(n,e,t){function i(){return typeof n=="object"?[{demanded:[],optional:[]},n,e]:[Ye(`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=fo(p);c.cmd.filter(b=>b===C||b==="*").length===0&&Do(C,c.cmd,r),r+=1}),o.optional.forEach(c=>{if(f.length===0)return;let p=f.shift(),C=fo(p);c.cmd.filter(b=>b===C||b==="*").length===0&&Do(C,c.cmd,r),r+=1})}catch(r){console.warn(r.stack)}}function fo(n){return Array.isArray(n)?"array":n===null?"null":typeof n}function Do(n,e,t){throw new Y(`Invalid ${Ya[t]||"manyith"} argument. Expected ${e.join(" or ")} but received ${n}.`)}var $n=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 ho(n){return n?n.map(e=>(e.applyBeforeValidation=!1,e)):[]}function ot(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 ut(n,e,t=i=>{throw i}){try{let i=Ja(n)?n():n;return J(i)?i.then(r=>e(r)):e(i)}catch(i){return t(i)}}function Ja(n){return typeof n=="function"}function Mi(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 It=/(^\*)|(^\$0)/,Ti=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=ho(o);if(r=r||(()=>{}),Array.isArray(e))if(Ka(e))[e,...a]=e;else for(let D of e)this.addHandler(D);else if(Za(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(po(i)){this.addHandler([e].concat(a),t,i.builder,i.handler,i.middlewares,i.deprecated);return}if(typeof e=="string"){let D=Ye(e);a=a.map(p=>Ye(p).cmd);let h=!1,c=[D.cmd].concat(a).filter(p=>It.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(It,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(vn(D)){i.getInternalMethods().getUsageInstance().freeze();let c=D(i.getInternalMethods().reset(r),f);if(J(c))return c.then(p=>(h=go(p)?p:i,this.parseAndUpdateUsage(e,t,h,o,s,a)))}else Qa(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=It.test(t.original)?t.original.replace(It,"").trim():t.original,r=e.filter(o=>!It.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=ut(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=ot(i,s,a,!1),i=ut(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=ot(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=Ye(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=It.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(vn(t))return t(e,!0);po(t)||Object.keys(t).forEach(i=>{e.option(i,t[i])})}moduleName(e){let t=Mi(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;ge(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();ge(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 mo(n,e,t,i){return new Ti(n,e,t,i)}function po(n){return typeof n=="object"&&!!n.builder&&typeof n.handler=="function"}function Ka(n){return n.every(e=>typeof e=="string")}function vn(n){return typeof n=="function"}function Qa(n){return typeof n=="object"}function Za(n){return typeof n=="object"&&!Array.isArray(n)}function Je(n={},e=()=>!0){let t={};return jt(n).forEach(i=>{e(i,n[i])&&(t[i]=n[i])}),t}function Ke(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 Xa(n){return typeof n=="boolean"}function Fo(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 ae=r[q];if(Xa(ae)){if(O)throw O;if(x)throw Error(x)}else ae(x,O,i)}else{if(n.getExitProcess()&&Ke(!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,ae=!1){R&&(p=p.map(z=>(z[2]=!1,z))),p.push([x,O||"",R,q,ae])},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=Ct(),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(),ae=n.getGroups(),z=n.getOptions(),ce=[];ce=ce.concat(Object.keys(C)),ce=ce.concat(Object.keys(O)),ce=ce.concat(Object.keys(R)),ce=ce.concat(Object.keys(z.default)),ce=ce.filter(qe),ce=Object.keys(ce.reduce((P,K)=>(K!=="_"&&(P[K]=!0),P),{}));let tt=i.getWrap(),Z=e.cliui({width:tt,wrap:!!tt});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
106
|
`:P=`${x} [${t("command")}]
|
|
107
|
-
`,Z.div(`${P}`)}}if(p.length>1||p.length===1&&!p[0][2]){Z.div(t("Commands:"));let P=n.getInternalMethods().getContext(),K=P.commands.length?`${P.commands.join(" ")} `:"";n.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(p=p.sort((L,
|
|
107
|
+
`,Z.div(`${P}`)}}if(p.length>1||p.length===1&&!p[0][2]){Z.div(t("Commands:"));let P=n.getInternalMethods().getContext(),K=P.commands.length?`${P.commands.join(" ")} `:"";n.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(p=p.sort((L,te)=>L[0].localeCompare(te[0])));let ee=x?`${x} `:"";p.forEach(L=>{let te=`${ee}${K}${L[0].replace(/^\$0 ?/,"")}`;Z.span({text:te,padding:[0,2,0,2],width:N(p,tt,`${x}${K}`)+4},{text:L[1]});let se=[];L[2]&&se.push(`[${t("default")}]`),L[3]&&L[3].length&&se.push(`[${t("aliases:")} ${L[3].join(", ")}]`),L[4]&&(typeof L[4]=="string"?se.push(`[${t("deprecated: %s",L[4])}]`):se.push(`[${t("deprecated")}]`)),se.length?Z.div({text:se.join(" "),padding:[0,0,0,2],align:"right"}):Z.div()}),Z.div()}let Re=(Object.keys(z.alias)||[]).concat(Object.keys(n.parsed.newAliases)||[]);ce=ce.filter(P=>!n.parsed.newAliases[P]&&Re.every(K=>(z.alias[K]||[]).indexOf(P)===-1));let Le=t("Options:");ae[Le]||(ae[Le]=[]),V(ce,z.alias,ae,Le);let nt=P=>/^--/.test(Bn(P)),M=Object.keys(ae).filter(P=>ae[P].length>0).map(P=>{let K=ae[P].filter(qe).map(ee=>{if(Re.includes(ee))return ee;for(let L=0,te;(te=Re[L])!==void 0;L++)if((z.alias[te]||[]).includes(ee))return te;return ee});return{groupName:P,normalizedKeys:K}}).filter(({normalizedKeys:P})=>P.length>0).map(({groupName:P,normalizedKeys:K})=>{let ee=K.reduce((L,te)=>(L[te]=[te].concat(z.alias[te]||[]).map(se=>P===i.getPositionalGroupName()?se:(/^[0-9]$/.test(se)?z.boolean.includes(te)?"-":"--":se.length>1?"--":"-")+se).sort((se,Ie)=>nt(se)===nt(Ie)?0:nt(se)?1:-1).join(", "),L),{});return{groupName:P,normalizedKeys:K,switches:ee}});if(M.filter(({groupName:P})=>P!==i.getPositionalGroupName()).some(({normalizedKeys:P,switches:K})=>!P.every(ee=>nt(K[ee])))&&M.filter(({groupName:P})=>P!==i.getPositionalGroupName()).forEach(({normalizedKeys:P,switches:K})=>{P.forEach(ee=>{nt(K[ee])&&(K[ee]=ec(K[ee],4))})}),M.forEach(({groupName:P,normalizedKeys:K,switches:ee})=>{Z.div(P),K.forEach(L=>{let te=ee[L],se=C[L]||"",Ie=null;se.includes(B)&&(se=t(se.substring(B.length))),z.boolean.includes(L)&&(Ie=`[${t("boolean")}]`),z.count.includes(L)&&(Ie=`[${t("count")}]`),z.string.includes(L)&&(Ie=`[${t("string")}]`),z.normalize.includes(L)&&(Ie=`[${t("string")}]`),z.array.includes(L)&&(Ie=`[${t("array")}]`),z.number.includes(L)&&(Ie=`[${t("number")}]`);let Pe=m=>typeof m=="string"?`[${t("deprecated: %s",m)}]`:`[${t("deprecated")}]`,Gt=[L in q?Pe(q[L]):null,Ie,L in O?`[${t("required")}]`:null,z.choices&&z.choices[L]?`[${t("choices:")} ${i.stringifiedValues(z.choices[L])}]`:null,je(z.default[L],z.defaultDescription[L])].filter(Boolean).join(" ");Z.span({text:Bn(te),padding:[0,2,0,2+Co(te)],width:N(ee,tt)+4},se);let l=n.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;Gt&&!l?Z.div({text:Gt,padding:[0,0,0,2],align:"right"}):Z.div()}),Z.div()}),c.length&&(Z.div(t("Examples:")),c.forEach(P=>{P[0]=P[0].replace(/\$0/g,x)}),c.forEach(P=>{P[1]===""?Z.div({text:P[0],padding:[0,2,0,2]}):Z.div({text:P[0],padding:[0,2,0,2],width:N(c,tt)+4},{text:P[1]})}),Z.div()),E.length>0){let P=E.map(K=>K.replace(/\$0/g,x)).join(`
|
|
108
108
|
`);Z.div(`${P}
|
|
109
|
-
`)}return Z.toString().replace(/\s*$/,"")};function N(S,x,O){let R=0;return Array.isArray(S)||(S=Object.values(S).map(q=>[q])),S.forEach(q=>{R=Math.max(e.stringWidth(O?`${O} ${
|
|
109
|
+
`)}return Z.toString().replace(/\s*$/,"")};function N(S,x,O){let R=0;return Array.isArray(S)||(S=Object.values(S).map(q=>[q])),S.forEach(q=>{R=Math.max(e.stringWidth(O?`${O} ${Bn(q[0])}`:Bn(q[0]))+Co(q[0]),R)}),x&&(R=Math.min(R,parseInt((x*.5).toString(),10))),R}function U(){let S=n.getDemandedOptions(),x=n.getOptions();(Object.keys(x.alias)||[]).forEach(O=>{x.alias[O].forEach(R=>{C[R]&&i.describe(O,C[R]),R in S&&n.demandOption(O,S[R]),x.boolean.includes(R)&&n.boolean(O),x.count.includes(R)&&n.count(O),x.string.includes(R)&&n.string(O),x.normalize.includes(R)&&n.normalize(O),x.array.includes(R)&&n.array(O),x.number.includes(R)&&n.number(O)})})}let k;i.cacheHelpMessage=function(){k=this.help()},i.clearCachedHelpMessage=function(){k=void 0},i.hasCachedHelpMessage=function(){return!!k};function V(S,x,O,R){let q=[],ae=null;return Object.keys(O).forEach(z=>{q=q.concat(O[z])}),S.forEach(z=>{ae=[z].concat(x[z]),ae.some(ce=>q.indexOf(ce)!==-1)||O[R].push(z)}),q}function qe(S){return n.getOptions().hiddenOptions.indexOf(S)<0||n.parsed.argv[n.getOptions().showHiddenOpt]}i.showHelp=S=>{let x=n.getInternalMethods().getLoggerInstance();S||(S="error"),(typeof S=="function"?S:x[S])(i.help())},i.functionDescription=S=>["(",S.name?e.Parser.decamelize(S.name,"-"):t("generated-value"),")"].join(""),i.stringifiedValues=function(x,O){let R="",q=O||", ",ae=[].concat(x);return!x||!ae.length||ae.forEach(z=>{R.length&&(R+=q),R+=JSON.stringify(z)}),R};function je(S,x){let O=`[${t("default:")} `;if(S===void 0&&!x)return null;if(x)O+=x;else switch(typeof S){case"string":O+=`"${S}"`;break;case"object":O+=JSON.stringify(S);break;default:O+=S}return`${O}]`}function Ct(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}let et=null;i.version=S=>{et=S},i.showVersion=S=>{let x=n.getInternalMethods().getLoggerInstance();S||(S="error"),(typeof S=="function"?S:x[S])(et)},i.reset=function(x){return o=null,f=!1,D=[],h=!1,E=[],c=[],p=[],C=Je(C,O=>!x[O]),i};let H=[];return i.freeze=function(){H.push({failMessage:o,failureOutput:f,usages:D,usageDisabled:h,epilogs:E,examples:c,commands:p,descriptions:C})},i.unfreeze=function(x=!1){let O=H.pop();O&&(x?(C={...O.descriptions,...C},p=[...O.commands,...p],D=[...O.usages,...D],c=[...O.examples,...c],E=[...O.epilogs,...E]):{failMessage:o,failureOutput:f,usages:D,usageDisabled:h,epilogs:E,examples:c,commands:p,descriptions:C}=O)},i}function Ni(n){return typeof n=="object"}function ec(n,e){return Ni(n)?{text:n.text,indentation:n.indentation+e}:{text:n,indentation:e}}function Co(n){return Ni(n)?n.indentation:0}function Bn(n){return Ni(n)?n.text:n}var bo=`###-begin-{{app_name}}-completions-###
|
|
110
110
|
#
|
|
111
111
|
# yargs command completion script
|
|
112
112
|
#
|
|
@@ -134,7 +134,7 @@ _{{app_name}}_yargs_completions()
|
|
|
134
134
|
}
|
|
135
135
|
complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
|
|
136
136
|
###-end-{{app_name}}-completions-###
|
|
137
|
-
`,
|
|
137
|
+
`,Eo=`#compdef {{app_name}}
|
|
138
138
|
###-begin-{{app_name}}-completions-###
|
|
139
139
|
#
|
|
140
140
|
# yargs command completion script
|
|
@@ -153,15 +153,15 @@ _{{app_name}}_yargs_completions()
|
|
|
153
153
|
}
|
|
154
154
|
compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
155
155
|
###-end-{{app_name}}-completions-###
|
|
156
|
-
`;var
|
|
156
|
+
`;var Wi=class{constructor(e,t,i,r){var o,s,a;this.yargs=e,this.usage=t,this.command=i,this.shim=r,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(a=((o=this.shim.getEnv("SHELL"))===null||o===void 0?void 0:o.includes("zsh"))||((s=this.shim.getEnv("ZSH_NAME"))===null||s===void 0?void 0:s.includes("zsh")))!==null&&a!==void 0?a:!1}defaultCompletion(e,t,i,r){let o=this.command.getCommandHandlers();for(let a=0,f=e.length;a<f;++a)if(o[e[a]]&&o[e[a]].builder){let D=o[e[a]].builder;if(vn(D)){this.indexAfterLastReset=a+1;let h=this.yargs.getInternalMethods().reset();return D(h,!0),h.argv}}let s=[];this.commandCompletions(s,e,i),this.optionCompletions(s,e,t,i),this.choicesFromOptionsCompletions(s,e,t,i),this.choicesFromPositionalsCompletions(s,e,t,i),r(null,s)}commandCompletions(e,t,i){let r=this.yargs.getInternalMethods().getContext().commands;!i.match(/^-/)&&r[r.length-1]!==i&&!this.previousArgHasChoices(t)&&this.usage.getCommands().forEach(o=>{let s=Ye(o[0]).cmd;if(t.indexOf(s)===-1)if(!this.zshShell)e.push(s);else{let a=o[1]||"";e.push(s.replace(/:/g,"\\:")+":"+a)}})}optionCompletions(e,t,i,r){if((r.match(/^-/)||r===""&&e.length===0)&&!this.previousArgHasChoices(t)){let o=this.yargs.getOptions(),s=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(o.key).forEach(a=>{let f=!!o.configuration["boolean-negation"]&&o.boolean.includes(a);!s.includes(a)&&!o.hiddenOptions.includes(a)&&!this.argsContainKey(t,a,f)&&this.completeOptionKey(a,e,r,f&&!!o.default[a])})}}choicesFromOptionsCompletions(e,t,i,r){if(this.previousArgHasChoices(t)){let o=this.getPreviousArgChoices(t);o&&o.length>0&&e.push(...o.map(s=>s.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,t,i,r){if(r===""&&e.length>0&&this.previousArgHasChoices(t))return;let o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],s=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),a=o[i._.length-s-1];if(!a)return;let f=this.yargs.getOptions().choices[a]||[];for(let D of f)D.startsWith(r)&&e.push(D.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let t=e[e.length-1],i="";if(!t.startsWith("-")&&e.length>1&&(i=t,t=e[e.length-2]),!t.startsWith("-"))return;let r=t.replace(/^-+/,""),o=this.yargs.getOptions(),s=[r,...this.yargs.getAliases()[r]||[]],a;for(let f of s)if(Object.prototype.hasOwnProperty.call(o.key,f)&&Array.isArray(o.choices[f])){a=o.choices[f];break}if(a)return a.filter(f=>!i||f.startsWith(i))}previousArgHasChoices(e){let t=this.getPreviousArgChoices(e);return t!==void 0&&t.length>0}argsContainKey(e,t,i){let r=o=>e.indexOf((/^[^0-9]$/.test(o)?"-":"--")+o)!==-1;if(r(t)||i&&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,i,r){var o,s,a,f;let D=e;if(this.zshShell){let C=this.usage.getDescriptions(),E=(s=(o=this===null||this===void 0?void 0:this.aliases)===null||o===void 0?void 0:o[e])===null||s===void 0?void 0:s.find(B=>{let N=C[B];return typeof N=="string"&&N.length>0}),b=E?C[E]:void 0,g=(f=(a=C[e])!==null&&a!==void 0?a:b)!==null&&f!==void 0?f:"";D=`${e.replace(/:/g,"\\:")}:${g.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let h=C=>/^--/.test(C),c=C=>/^[^0-9]$/.test(C),p=!h(i)&&c(e)?"-":"--";t.push(p+D),r&&t.push(p+"no-"+D)}customCompletion(e,t,i,r){if(ge(this.customCompletionFunction,null,this.shim),nc(this.customCompletionFunction)){let o=this.customCompletionFunction(i,t);return J(o)?o.then(s=>{this.shim.process.nextTick(()=>{r(null,s)})}).catch(s=>{this.shim.process.nextTick(()=>{r(s,void 0)})}):r(null,o)}else return ic(this.customCompletionFunction)?this.customCompletionFunction(i,t,(o=r)=>this.defaultCompletion(e,t,i,o),o=>{r(null,o)}):this.customCompletionFunction(i,t,o=>{r(null,o)})}getCompletion(e,t){let i=e.length?e[e.length-1]:"",r=this.yargs.parse(e,!0),o=this.customCompletionFunction?s=>this.customCompletion(e,s,i,t):s=>this.defaultCompletion(e,s,i,t);return J(r)?r.then(o):o(r)}generateCompletionScript(e,t){let i=this.zshShell?Eo:bo,r=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),i=i.replace(/{{app_name}}/g,r),i=i.replace(/{{completion_command}}/g,t),i.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}};function yo(n,e,t,i){return new Wi(n,e,t,i)}function nc(n){return n.length<3}function ic(n){return n.length>3}function wo(n,e){if(n.length===0)return e.length;if(e.length===0)return n.length;let t=[],i;for(i=0;i<=e.length;i++)t[i]=[i];let r;for(r=0;r<=n.length;r++)t[0][r]=r;for(i=1;i<=e.length;i++)for(r=1;r<=n.length;r++)e.charAt(i-1)===n.charAt(r-1)?t[i][r]=t[i-1][r-1]:i>1&&r>1&&e.charAt(i-2)===n.charAt(r-1)&&e.charAt(i-1)===n.charAt(r-2)?t[i][r]=t[i-2][r-2]+1:t[i][r]=Math.min(t[i-1][r-1]+1,Math.min(t[i][r-1]+1,t[i-1][r]+1));return t[e.length][n.length]}var xo=["$0","--","_"];function Ao(n,e,t){let i=t.y18n.__,r=t.y18n.__n,o={};o.nonOptionCount=function(c){let p=n.getDemandedCommands(),E=c._.length+(c["--"]?c["--"].length:0)-n.getInternalMethods().getContext().commands.length;p._&&(E<p._.min||E>p._.max)&&(E<p._.min?p._.minMsg!==void 0?e.fail(p._.minMsg?p._.minMsg.replace(/\$0/g,E.toString()).replace(/\$1/,p._.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",E,E.toString(),p._.min.toString())):E>p._.max&&(p._.maxMsg!==void 0?e.fail(p._.maxMsg?p._.maxMsg.replace(/\$0/g,E.toString()).replace(/\$1/,p._.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",E,E.toString(),p._.max.toString()))))},o.positionalCount=function(c,p){p<c&&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",p,p+"",c+""))},o.requiredArguments=function(c,p){let C=null;for(let E of Object.keys(p))(!Object.prototype.hasOwnProperty.call(c,E)||typeof c[E]>"u")&&(C=C||{},C[E]=p[E]);if(C){let E=[];for(let g of Object.keys(C)){let B=C[g];B&&E.indexOf(B)<0&&E.push(B)}let b=E.length?`
|
|
157
157
|
${E.join(`
|
|
158
|
-
`)}`:"";e.fail(r("Missing required argument: %s","Missing required arguments: %s",Object.keys(C).length,Object.keys(C).join(", ")+b))}},o.unknownArguments=function(c,p,C,E,b=!0){var g;let B=n.getInternalMethods().getCommandInstance().getCommands(),N=[],U=n.getInternalMethods().getContext();if(Object.keys(c).forEach(k=>{
|
|
159
|
-
${i("Argument: %s, Given: %s, Choices: %s",g,e.stringifiedValues(C[g]),e.stringifiedValues(p.choices[g]))}`}),e.fail(b)};let s={};o.implies=function(c,p){$("<string|object> [array|number|string]",[c,p],arguments.length),typeof c=="object"?Object.keys(c).forEach(C=>{o.implies(C,c[C])}):(n.global(c),s[c]||(s[c]=[]),Array.isArray(p)?p.forEach(C=>o.implies(c,C)):(
|
|
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=ac(e,n.extends);else try{s=require.resolve(n.extends)}catch{return n}uc(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 uc(n){if(ki.indexOf(n)>-1)throw new Y(`Circular extended configurations: '${n}'.`)}function ac(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"),u(this,j,"f").key[e]=!0,t.alias&&this.alias(e,t.alias);let i=t.deprecate||t.deprecated;i&&this.deprecateOption(e,i);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&&(u(this,j,"f").defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let o=t.describe||t.description||t.desc,s=u(this,W,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(s,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,i){$("[string|array] [function|boolean|object] [function]",[e,t,i],arguments.length),this[
|
|
162
|
-
`,"f"),v(this,
|
|
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 cc=Yo(Do),Jo=cc;function lc(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 _t("app"),i=t.standaloneTemplates.map(({id:p})=>p),r=lc(n,i),{force:o,installDeps:s,template:a}=r,f=r.outDir;rn(`Let's create a ${Lt(" Qwik App ")} \u2728 (v2.0.0-beta.6-dev+c42693f)`),fc()?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 Ot({outDir:f,appId:a,pkgManager:e,templateManager:t}),h=wt(),c=!1;return s&&(c=await dn(async()=>await rt(e,f).install,{pkgManager:e,spinner:h})),mn(e,D,c),D}function fc(){return Dc()}function Dc(){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 _t("app"),t="./qwik-app";rn(`Let's create a ${Lt(" Qwik App ")} \u2728 (v2.0.0-beta.6-dev+c42693f)`),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
|
-
${U.trim()}`),"\u{1F648}")}}catch{}let E=
|
|
158
|
+
`)}`:"";e.fail(r("Missing required argument: %s","Missing required arguments: %s",Object.keys(C).length,Object.keys(C).join(", ")+b))}},o.unknownArguments=function(c,p,C,E,b=!0){var g;let B=n.getInternalMethods().getCommandInstance().getCommands(),N=[],U=n.getInternalMethods().getContext();if(Object.keys(c).forEach(k=>{!xo.includes(k)&&!Object.prototype.hasOwnProperty.call(C,k)&&!Object.prototype.hasOwnProperty.call(n.getInternalMethods().getParseContext(),k)&&!o.isValidAndSomeAliasIsNotNew(k,p)&&N.push(k)}),b&&(U.commands.length>0||B.length>0||E)&&c._.slice(U.commands.length).forEach(k=>{B.includes(""+k)||N.push(""+k)}),b){let V=((g=n.getDemandedCommands()._)===null||g===void 0?void 0:g.max)||0,qe=U.commands.length+V;qe<c._.length&&c._.slice(qe).forEach(je=>{je=String(je),!U.commands.includes(je)&&!N.includes(je)&&N.push(je)})}N.length&&e.fail(r("Unknown argument: %s","Unknown arguments: %s",N.length,N.map(k=>k.trim()?k:`"${k}"`).join(", ")))},o.unknownCommands=function(c){let p=n.getInternalMethods().getCommandInstance().getCommands(),C=[],E=n.getInternalMethods().getContext();return(E.commands.length>0||p.length>0)&&c._.slice(E.commands.length).forEach(b=>{p.includes(""+b)||C.push(""+b)}),C.length>0?(e.fail(r("Unknown command: %s","Unknown commands: %s",C.length,C.join(", "))),!0):!1},o.isValidAndSomeAliasIsNotNew=function(c,p){if(!Object.prototype.hasOwnProperty.call(p,c))return!1;let C=n.parsed.newAliases;return[c,...p[c]].some(E=>!Object.prototype.hasOwnProperty.call(C,E)||!C[c])},o.limitedChoices=function(c){let p=n.getOptions(),C={};if(!Object.keys(p.choices).length)return;Object.keys(c).forEach(g=>{xo.indexOf(g)===-1&&Object.prototype.hasOwnProperty.call(p.choices,g)&&[].concat(c[g]).forEach(B=>{p.choices[g].indexOf(B)===-1&&B!==void 0&&(C[g]=(C[g]||[]).concat(B))})});let E=Object.keys(C);if(!E.length)return;let b=i("Invalid values:");E.forEach(g=>{b+=`
|
|
159
|
+
${i("Argument: %s, Given: %s, Choices: %s",g,e.stringifiedValues(C[g]),e.stringifiedValues(p.choices[g]))}`}),e.fail(b)};let s={};o.implies=function(c,p){$("<string|object> [array|number|string]",[c,p],arguments.length),typeof c=="object"?Object.keys(c).forEach(C=>{o.implies(C,c[C])}):(n.global(c),s[c]||(s[c]=[]),Array.isArray(p)?p.forEach(C=>o.implies(c,C)):(ge(p,void 0,t),s[c].push(p)))},o.getImplied=function(){return s};function a(h,c){let p=Number(c);return c=isNaN(p)?c:p,typeof c=="number"?c=h._.length>=c:c.match(/^--no-.+/)?(c=c.match(/^--no-(.+)/)[1],c=!Object.prototype.hasOwnProperty.call(h,c)):c=Object.prototype.hasOwnProperty.call(h,c),c}o.implications=function(c){let p=[];if(Object.keys(s).forEach(C=>{let E=C;(s[C]||[]).forEach(b=>{let g=E,B=b;g=a(c,g),b=a(c,b),g&&!b&&p.push(` ${E} -> ${B}`)})}),p.length){let C=`${i("Implications failed:")}
|
|
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=wo(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=Je(s,p=>!c[p]),f=Je(f,p=>!c[p]),o};let D=[];return o.freeze=function(){D.push({implied:s,conflicting:f})},o.unfreeze=function(){let c=D.pop();ge(c,void 0,t),{implied:s,conflicting:f}=c},o}var Ri=[],Ut;function On(n,e,t,i){Ut=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=rc(e,n.extends);else try{s=require.resolve(n.extends)}catch{return n}sc(s),Ri.push(s),r=o?JSON.parse(Ut.readFileSync(s,"utf8")):require(n.extends),delete n.extends,r=On(r,Ut.path.dirname(s),t,Ut)}return Ri=[],t?$o(r,n):Object.assign({},r,n)}function sc(n){if(Ri.indexOf(n)>-1)throw new Y(`Circular extended configurations: '${n}'.`)}function rc(n,e){return Ut.path.resolve(n,e)}function $o(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]=$o(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)},oe,at,Vt,Be,Ee,_n,Qe,ct,Sn,Oe,jn,_e,Ne,ye,Se,In,Pt,fe,j,Pn,Mn,we,lt,Mt,ft,Ze,Tn,T,Dt,ht,pt,W,Nn,We,ie;function Ho(n){return(e=[],t=n.process.cwd(),i)=>{let r=new Ki(e,t,i,n);return Object.defineProperty(r,"argv",{get:()=>r.parse(),enumerable:!0}),r.help(),r.version(),r}}var vo=Symbol("copyDoubleDash"),Bo=Symbol("copyDoubleDash"),Li=Symbol("deleteFromParserHintObject"),Oo=Symbol("emitWarning"),_o=Symbol("freeze"),So=Symbol("getDollarZero"),dt=Symbol("getParserConfiguration"),jo=Symbol("getUsageConfiguration"),ki=Symbol("guessLocale"),Io=Symbol("guessVersion"),Po=Symbol("parsePositionalNumbers"),zi=Symbol("pkgUp"),Xe=Symbol("populateParserHintArray"),Tt=Symbol("populateParserHintSingleValueDictionary"),qi=Symbol("populateParserHintArrayDictionary"),Ui=Symbol("populateParserHintDictionary"),Vi=Symbol("sanitizeKey"),Hi=Symbol("setKey"),Gi=Symbol("unfreeze"),Mo=Symbol("validateAsync"),To=Symbol("getCommandInstance"),No=Symbol("getContext"),Wo=Symbol("getHasOutput"),Ro=Symbol("getLoggerInstance"),Lo=Symbol("getParseContext"),ko=Symbol("getUsageInstance"),zo=Symbol("getValidationInstance"),Wn=Symbol("hasParseCallback"),qo=Symbol("isGlobalContext"),mt=Symbol("postProcess"),Uo=Symbol("rebase"),Yi=Symbol("reset"),Ht=Symbol("runYargsParserAndExecuteCommands"),Ji=Symbol("runValidation"),Vo=Symbol("setHasOutput"),gt=Symbol("kTrackManuallySetKeys"),Ki=class{constructor(e=[],t,i,r){this.customScriptName=!1,this.parsed=!1,oe.set(this,void 0),at.set(this,void 0),Vt.set(this,{commands:[],fullCommands:[]}),Be.set(this,null),Ee.set(this,null),_n.set(this,"show-hidden"),Qe.set(this,null),ct.set(this,!0),Sn.set(this,{}),Oe.set(this,!0),jn.set(this,[]),_e.set(this,void 0),Ne.set(this,{}),ye.set(this,!1),Se.set(this,null),In.set(this,!0),Pt.set(this,void 0),fe.set(this,""),j.set(this,void 0),Pn.set(this,void 0),Mn.set(this,{}),we.set(this,null),lt.set(this,null),Mt.set(this,{}),ft.set(this,{}),Ze.set(this,void 0),Tn.set(this,!1),T.set(this,void 0),Dt.set(this,!1),ht.set(this,!1),pt.set(this,!1),W.set(this,void 0),Nn.set(this,{}),We.set(this,null),ie.set(this,void 0),v(this,T,r,"f"),v(this,Ze,e,"f"),v(this,at,t,"f"),v(this,Pn,i,"f"),v(this,_e,new $n(this),"f"),this.$0=this[So](),this[Yi](),v(this,oe,u(this,oe,"f"),"f"),v(this,W,u(this,W,"f"),"f"),v(this,ie,u(this,ie,"f"),"f"),v(this,j,u(this,j,"f"),"f"),u(this,j,"f").showHiddenOpt=u(this,_n,"f"),v(this,Pt,this[Bo](),"f")}addHelpOpt(e,t){let i="help";return $("[string|boolean] [string]",[e,t],arguments.length),u(this,Se,"f")&&(this[Li](u(this,Se,"f")),v(this,Se,null,"f")),e===!1&&t===void 0?this:(v(this,Se,typeof e=="string"?e:i,"f"),this.boolean(u(this,Se,"f")),this.describe(u(this,Se,"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,_n,"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[qi](this.alias.bind(this),"alias",e,t),this}array(e){return $("<array|string>",[e],arguments.length),this[Xe]("array",e),this[gt](e),this}boolean(e){return $("<array|string>",[e],arguments.length),this[Xe]("boolean",e),this[gt](e),this}check(e,t){return $("<function> [boolean]",[e,t],arguments.length),this.middleware((i,r)=>ut(()=>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[qi](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,_e,"f").addCoerceMiddleware((i,r)=>{let o;return Object.prototype.hasOwnProperty.call(i,e)?ut(()=>(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,ie,"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=On(e,u(this,at,"f"),this[dt]()["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,Ee,e||u(this,Ee,"f")||"completion","f"),!t&&t!==!1&&(t="generate completion script"),this.command(u(this,Ee,"f"),t),i&&u(this,Be,"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,oe,"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,Pn,"f")||u(this,T,"f").require;return u(this,oe,"f").addDirectory(e,i,u(this,T,"f").getCallerFile(),t),this}count(e){return $("<array|string>",[e],arguments.length),this[Xe]("count",e),this[gt](e),this}default(e,t,i){return $("<object|string|array> [*] [string]",[e,t,i],arguments.length),i&&(Pi(e,u(this,T,"f")),u(this,j,"f").defaultDescription[e]=i),typeof t=="function"&&(Pi(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[Tt](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=>{ge(i,!0,u(this,T,"f")),this.demandOption(r,i)}),t=1/0):typeof t!="number"&&(i=t,t=1/0),typeof e=="number"?(ge(i,!0,u(this,T,"f")),this.demandCommand(e,t,i,i)):Array.isArray(e)?e.forEach(r=>{ge(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[Tt](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[Hi](e,!0),u(this,W,"f").describe(e,t),this}detectLocale(e){return $("<boolean>",[e],arguments.length),v(this,ct,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,ye,!0,"f"),v(this,Qe,t,"f"),u(this,Oe,"f")&&u(this,T,"f").process.exit(e)}exitProcess(e=!0){return $("[boolean]",[e],arguments.length),v(this,Oe,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,Be,"f").getCompletion(e,t):new Promise((i,r)=>{u(this,Be,"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,ct,"f")}getExitProcess(){return u(this,Oe,"f")}getGroups(){return Object.assign({},u(this,Ne,"f"),u(this,ft,"f"))}getHelp(){if(v(this,ye,!0,"f"),!u(this,W,"f").hasCachedHelpMessage()){if(!this.parsed){let t=this[Ht](u(this,Ze,"f"),void 0,void 0,0,!0);if(J(t))return t.then(()=>u(this,W,"f").help())}let e=u(this,oe,"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,Dt,"f")}getStrictCommands(){return u(this,ht,"f")}getStrictOptions(){return u(this,pt,"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,ft,"f")[t]||u(this,Ne,"f")[t];u(this,ft,"f")[t]&&delete u(this,ft,"f")[t];let r={};return u(this,Ne,"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,ie,"f").implies(e,t),this}locale(e){return $("[string]",[e],arguments.length),e===void 0?(this[ki](),u(this,T,"f").y18n.getLocale()):(v(this,ct,!1,"f"),u(this,T,"f").y18n.setLocale(e),this)}middleware(e,t,i){return u(this,_e,"f").addMiddleware(e,!!t,i)}nargs(e,t){return $("<string|object|array> [number]",[e,t],arguments.length),this[Tt](this.nargs.bind(this),"narg",e,t),this}normalize(e){return $("<array|string>",[e],arguments.length),this[Xe]("normalize",e),this}number(e){return $("<array|string>",[e],arguments.length),this[Xe]("number",e),this[gt](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[gt](e),u(this,We,"f")&&(e==="version"||(t==null?void 0:t.alias)==="version")&&this[Oo](['"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"),u(this,j,"f").key[e]=!0,t.alias&&this.alias(e,t.alias);let i=t.deprecate||t.deprecated;i&&this.deprecateOption(e,i);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&&(u(this,j,"f").defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let o=t.describe||t.description||t.desc,s=u(this,W,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(s,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,i){$("[string|array] [function|boolean|object] [function]",[e,t,i],arguments.length),this[_o](),typeof e>"u"&&(e=u(this,Ze,"f")),typeof t=="object"&&(v(this,lt,t,"f"),t=i),typeof t=="function"&&(v(this,we,t,"f"),t=!1),t||v(this,Ze,e,"f"),u(this,we,"f")&&v(this,Oe,!1,"f");let r=this[Ht](e,!!t),o=this.parsed;return u(this,Be,"f").setParsed(this.parsed),J(r)?r.then(s=>(u(this,we,"f")&&u(this,we,"f").call(this,u(this,Qe,"f"),s,u(this,fe,"f")),s)).catch(s=>{throw u(this,we,"f")&&u(this,we,"f")(s,this.parsed.argv,u(this,fe,"f")),s}).finally(()=>{this[Gi](),this.parsed=o}):(u(this,we,"f")&&u(this,we,"f").call(this,u(this,Qe,"f"),r,u(this,fe,"f")),this[Gi](),this.parsed=o,r)}parseAsync(e,t,i){let r=this.parse(e,t,i);return J(r)?r:Promise.resolve(r)}parseSync(e,t,i){let r=this.parse(e,t,i);if(J(r))throw new Y(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return r}parserConfiguration(e){return $("<object>",[e],arguments.length),v(this,Mn,e,"f"),this}pkgConf(e,t){$("<string> [string]",[e,t],arguments.length);let i=null,r=this[zi](t||u(this,at,"f"));return r[e]&&typeof r[e]=="object"&&(i=On(r[e],t||u(this,at,"f"),this[dt]()["deep-merge-config"]||!1,u(this,T,"f")),u(this,j,"f").configObjects=(u(this,j,"f").configObjects||[]).concat(i)),this}positional(e,t){$("<string> <object>",[e,t],arguments.length);let i=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];t=Je(t,(s,a)=>s==="type"&&!["string","number","boolean"].includes(a)?!1:i.includes(s));let r=u(this,Vt,"f").fullCommands[u(this,Vt,"f").fullCommands.length-1],o=r?u(this,oe,"f").cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return jt(o).forEach(s=>{let a=o[s];Array.isArray(a)?a.indexOf(e)!==-1&&(t[s]=!0):a[e]&&!(s in t)&&(t[s]=a[e])}),this.group(e,u(this,W,"f").getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return $("[boolean]",[e],arguments.length),v(this,Tn,e,"f"),this}required(e,t,i){return this.demand(e,t,i)}require(e,t,i){return this.demand(e,t,i)}requiresArg(e){return $("<array|string|object> [number]",[e],arguments.length),typeof e=="string"&&u(this,j,"f").narg[e]?this:(this[Tt](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,t){return $("[string] [string]",[e,t],arguments.length),e=e||this.$0,u(this,Pt,"f").log(u(this,Be,"f").generateCompletionScript(e,t||u(this,Ee,"f")||"completion")),this}showHelp(e){if($("[string|function]",[e],arguments.length),v(this,ye,!0,"f"),!u(this,W,"f").hasCachedHelpMessage()){if(!this.parsed){let i=this[Ht](u(this,Ze,"f"),void 0,void 0,0,!0);if(J(i))return i.then(()=>{u(this,W,"f").showHelp(e)}),this}let t=u(this,oe,"f").runDefaultBuilderOn(this);if(J(t))return t.then(()=>{u(this,W,"f").showHelp(e)}),this}return u(this,W,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return $("[boolean|string] [string]",[e,t],arguments.length),u(this,W,"f").showHelpOnFail(e,t),this}showVersion(e){return $("[string|function]",[e],arguments.length),u(this,W,"f").showVersion(e),this}skipValidation(e){return $("<array|string>",[e],arguments.length),this[Xe]("skipValidation",e),this}strict(e){return $("[boolean]",[e],arguments.length),v(this,Dt,e!==!1,"f"),this}strictCommands(e){return $("[boolean]",[e],arguments.length),v(this,ht,e!==!1,"f"),this}strictOptions(e){return $("[boolean]",[e],arguments.length),v(this,pt,e!==!1,"f"),this}string(e){return $("<array|string>",[e],arguments.length),this[Xe]("string",e),this[gt](e),this}terminalWidth(){return $([],0),u(this,T,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return $("<object>",[e],arguments.length),v(this,ct,!1,"f"),u(this,T,"f").y18n.updateLocale(e),this}usage(e,t,i,r){if($("<string|null|undefined> [string|boolean] [function|object] [function]",[e,t,i,r],arguments.length),t!==void 0){if(ge(e,null,u(this,T,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,t,i,r);throw new Y(".usage() description must start with $0 if being used as alias for .command()")}else return u(this,W,"f").usage(e),this}usageConfiguration(e){return $("<object>",[e],arguments.length),v(this,Nn,e,"f"),this}version(e,t,i){let r="version";if($("[boolean|string] [string] [string]",[e,t,i],arguments.length),u(this,We,"f")&&(this[Li](u(this,We,"f")),u(this,W,"f").version(void 0),v(this,We,null,"f")),arguments.length===0)i=this[Io](),e=r;else if(arguments.length===1){if(e===!1)return this;i=e,e=r}else arguments.length===2&&(i=t,t=void 0);return v(this,We,typeof e=="string"?e:r,"f"),t=t||u(this,W,"f").deferY18nLookup("Show version number"),u(this,W,"f").version(i||void 0),this.boolean(u(this,We,"f")),this.describe(u(this,We,"f"),t),this}wrap(e){return $("<number|null|undefined>",[e],arguments.length),u(this,W,"f").wrap(e),this}[(oe=new WeakMap,at=new WeakMap,Vt=new WeakMap,Be=new WeakMap,Ee=new WeakMap,_n=new WeakMap,Qe=new WeakMap,ct=new WeakMap,Sn=new WeakMap,Oe=new WeakMap,jn=new WeakMap,_e=new WeakMap,Ne=new WeakMap,ye=new WeakMap,Se=new WeakMap,In=new WeakMap,Pt=new WeakMap,fe=new WeakMap,j=new WeakMap,Pn=new WeakMap,Mn=new WeakMap,we=new WeakMap,lt=new WeakMap,Mt=new WeakMap,ft=new WeakMap,Ze=new WeakMap,Tn=new WeakMap,T=new WeakMap,Dt=new WeakMap,ht=new WeakMap,pt=new WeakMap,W=new WeakMap,Nn=new WeakMap,We=new WeakMap,ie=new WeakMap,vo)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[Bo](){return{log:(...e)=>{this[Wn]()||console.log(...e),v(this,ye,!0,"f"),u(this,fe,"f").length&&v(this,fe,u(this,fe,"f")+`
|
|
162
|
+
`,"f"),v(this,fe,u(this,fe,"f")+e.join(" "),"f")},error:(...e)=>{this[Wn]()||console.error(...e),v(this,ye,!0,"f"),u(this,fe,"f").length&&v(this,fe,u(this,fe,"f")+`
|
|
163
|
+
`,"f"),v(this,fe,u(this,fe,"f")+e.join(" "),"f")}}}[Li](e){jt(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]}[Oo](e,t,i){u(this,Sn,"f")[i]||(u(this,T,"f").process.emitWarning(e,t),u(this,Sn,"f")[i]=!0)}[_o](){u(this,jn,"f").push({options:u(this,j,"f"),configObjects:u(this,j,"f").configObjects.slice(0),exitProcess:u(this,Oe,"f"),groups:u(this,Ne,"f"),strict:u(this,Dt,"f"),strictCommands:u(this,ht,"f"),strictOptions:u(this,pt,"f"),completionCommand:u(this,Ee,"f"),output:u(this,fe,"f"),exitError:u(this,Qe,"f"),hasOutput:u(this,ye,"f"),parsed:this.parsed,parseFn:u(this,we,"f"),parseContext:u(this,lt,"f")}),u(this,W,"f").freeze(),u(this,ie,"f").freeze(),u(this,oe,"f").freeze(),u(this,_e,"f").freeze()}[So](){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[Uo](u(this,at,"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}[dt](){return u(this,Mn,"f")}[jo](){return u(this,Nn,"f")}[ki](){if(!u(this,ct,"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(/[.:].*/,""))}[Io](){return this[zi]().version||"unknown"}[Po](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}[zi](e){let t=e||"*";if(u(this,Mt,"f")[t])return u(this,Mt,"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"});ge(o,void 0,u(this,T,"f")),i=JSON.parse(u(this,T,"f").readFileSync(o,"utf8"))}catch{}return u(this,Mt,"f")[t]=i||{},u(this,Mt,"f")[t]}[Xe](e,t){t=[].concat(t),t.forEach(i=>{i=this[Vi](i),u(this,j,"f")[e].push(i)})}[Tt](e,t,i,r){this[Ui](e,t,i,r,(o,s,a)=>{u(this,j,"f")[o][s]=a})}[qi](e,t,i,r){this[Ui](e,t,i,r,(o,s,a)=>{u(this,j,"f")[o][s]=(u(this,j,"f")[o][s]||[]).concat(a)})}[Ui](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 jt(i))e(s,i[s]);else o(t,this[Vi](i),r)}[Vi](e){return e==="__proto__"?"___proto___":e}[Hi](e,t){return this[Tt](this[Hi].bind(this),"key",e,t),this}[Gi](){var e,t,i,r,o,s,a,f,D,h,c,p;let C=u(this,jn,"f").pop();ge(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,Oe,b,"f")}}.value,groups:{set value(b){v(i,Ne,b,"f")}}.value,output:{set value(b){v(r,fe,b,"f")}}.value,exitError:{set value(b){v(o,Qe,b,"f")}}.value,hasOutput:{set value(b){v(s,ye,b,"f")}}.value,parsed:this.parsed,strict:{set value(b){v(a,Dt,b,"f")}}.value,strictCommands:{set value(b){v(f,ht,b,"f")}}.value,strictOptions:{set value(b){v(D,pt,b,"f")}}.value,completionCommand:{set value(b){v(h,Ee,b,"f")}}.value,parseFn:{set value(b){v(c,we,b,"f")}}.value,parseContext:{set value(b){v(p,lt,b,"f")}}.value}=C,u(this,j,"f").configObjects=E,u(this,W,"f").unfreeze(),u(this,ie,"f").unfreeze(),u(this,oe,"f").unfreeze(),u(this,_e,"f").unfreeze()}[Mo](e,t){return ut(t,i=>(e(i),i))}getInternalMethods(){return{getCommandInstance:this[To].bind(this),getContext:this[No].bind(this),getHasOutput:this[Wo].bind(this),getLoggerInstance:this[Ro].bind(this),getParseContext:this[Lo].bind(this),getParserConfiguration:this[dt].bind(this),getUsageConfiguration:this[jo].bind(this),getUsageInstance:this[ko].bind(this),getValidationInstance:this[zo].bind(this),hasParseCallback:this[Wn].bind(this),isGlobalContext:this[qo].bind(this),postProcess:this[mt].bind(this),reset:this[Yi].bind(this),runValidation:this[Ji].bind(this),runYargsParserAndExecuteCommands:this[Ht].bind(this),setHasOutput:this[Vo].bind(this)}}[To](){return u(this,oe,"f")}[No](){return u(this,Vt,"f")}[Wo](){return u(this,ye,"f")}[Ro](){return u(this,Pt,"f")}[Lo](){return u(this,lt,"f")||{}}[ko](){return u(this,W,"f")}[zo](){return u(this,ie,"f")}[Wn](){return!!u(this,we,"f")}[qo](){return u(this,In,"f")}[mt](e,t,i,r){return i||J(e)||(t||(e=this[vo](e)),(this[dt]()["parse-positional-numbers"]||this[dt]()["parse-positional-numbers"]===void 0)&&(e=this[Po](e)),r&&(e=ot(e,this,u(this,_e,"f").getMiddleware(),!1))),e}[Yi](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,ft,"f"),Object.keys(u(this,Ne,"f")).reduce((s,a)=>{let f=u(this,Ne,"f")[a].filter(D=>!(D in i));return f.length>0&&(s[a]=f),s},{})),v(this,Ne,{},"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]=Je(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):Fo(this,u(this,T,"f")),"f"),v(this,ie,u(this,ie,"f")?u(this,ie,"f").reset(i):Ao(this,u(this,W,"f"),u(this,T,"f")),"f"),v(this,oe,u(this,oe,"f")?u(this,oe,"f").reset():mo(u(this,W,"f"),u(this,ie,"f"),u(this,_e,"f"),u(this,T,"f")),"f"),u(this,Be,"f")||v(this,Be,yo(this,u(this,W,"f"),u(this,oe,"f"),u(this,T,"f")),"f"),u(this,_e,"f").reset(),v(this,Ee,null,"f"),v(this,fe,"","f"),v(this,Qe,null,"f"),v(this,ye,!1,"f"),this.parsed=!1,this}[Uo](e,t){return u(this,T,"f").path.relative(e,t)}[Ht](e,t,i,r=0,o=!1){let s=!!i||o;e=e||u(this,Ze,"f"),u(this,j,"f").__=u(this,T,"f").y18n.__,u(this,j,"f").configuration=this[dt]();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,lt,"f")),c,p=D.aliases,C=!1,E=!1;Object.keys(h).forEach(b=>{b===u(this,Se,"f")&&h[b]?C=!0:b===u(this,We,"f")&&h[b]&&(E=!0)}),h.$0=this.$0,this.parsed=D,r===0&&u(this,W,"f").clearCachedHelpMessage();try{if(this[ki](),t)return this[mt](h,a,!!i,!1);u(this,Se,"f")&&[u(this,Se,"f")].concat(p[u(this,Se,"f")]||[]).filter(U=>U.length>1).includes(""+h._[h._.length-1])&&(h._.pop(),C=!0),v(this,In,!1,"f");let b=u(this,oe,"f").getCommands(),g=u(this,Be,"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,Ee,"f")){let V=u(this,oe,"f").runCommand(k,this,D,U+1,o,C||E||o);return this[mt](V,a,!!i,!1)}else if(!N&&k!==u(this,Ee,"f")){N=k;break}!u(this,oe,"f").hasDefaultCommand()&&u(this,Tn,"f")&&N&&!B&&u(this,ie,"f").recommendCommands(N,b)}u(this,Ee,"f")&&h._.includes(u(this,Ee,"f"))&&!g&&(u(this,Oe,"f")&&Ke(!0),this.showCompletionScript(),this.exit(0))}if(u(this,oe,"f").hasDefaultCommand()&&!B){let N=u(this,oe,"f").runCommand(null,this,D,0,o,C||E||o);return this[mt](N,a,!!i,!1)}if(g){u(this,Oe,"f")&&Ke(!0),e=[].concat(e);let N=e.slice(e.indexOf(`--${u(this,Be,"f").completionKey}`)+1);return u(this,Be,"f").getCompletion(N,(U,k)=>{if(U)throw new Y(U.message);(k||[]).forEach(V=>{u(this,Pt,"f").log(V)}),this.exit(0)}),this[mt](h,!a,!!i,!1)}if(u(this,ye,"f")||(C?(u(this,Oe,"f")&&Ke(!0),s=!0,this.showHelp("log"),this.exit(0)):E&&(u(this,Oe,"f")&&Ke(!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[Ji](p,{},D.error);i||(c=ot(h,this,u(this,_e,"f").getMiddleware(),!0)),c=this[Mo](N,c??h),J(c)&&!i&&(c=c.then(()=>ot(h,this,u(this,_e,"f").getMiddleware(),!1)))}}}catch(b){if(b instanceof Y)u(this,W,"f").fail(b.message,b);else throw b}return this[mt](c??h,a,!!i,!0)}[Ji](e,t,i,r){let o={...this.getDemandedOptions()};return s=>{if(i)throw new Y(i.message);u(this,ie,"f").nonOptionCount(s),u(this,ie,"f").requiredArguments(s,o);let a=!1;u(this,ht,"f")&&(a=u(this,ie,"f").unknownCommands(s)),u(this,Dt,"f")&&!a?u(this,ie,"f").unknownArguments(s,e,t,!!r):u(this,pt,"f")&&u(this,ie,"f").unknownArguments(s,e,{},!1,!1),u(this,ie,"f").limitedChoices(s),u(this,ie,"f").implications(s),u(this,ie,"f").conflicting(s)}}[Vo](){v(this,ye,!0,"f")}[gt](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 go(n){return!!n&&typeof n.getInternalMethods=="function"}var oc=Ho(lo),Go=oc;function uc(n,e){return Go(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 Zi(...n){let e=Ge(),t=await Ot("app"),i=t.standaloneTemplates.map(({id:p})=>p),r=uc(n,i),{force:o,installDeps:s,template:a}=r,f=r.outDir;sn(`Let's create a ${Rt(" Qwik App ")} \u2728 (v2.0.0-beta.8-dev+434cd18)`),ac()?f=process.cwd():(f=gn(f),Qi.default.existsSync(f)&&Qi.default.readdirSync(f).length>0&&(o?await on(f):(X.error(`Directory "${f}" already exists.`),X.info("Please either remove this directory, choose another location or run the command again with '--force | -f' flag."),it(),process.exit(1))));let D=await Bt({outDir:f,appId:a,pkgManager:e,templateManager:t}),h=yt(),c=!1;return s&&(c=await pn(async()=>await st(e,f).install,{pkgManager:e,spinner:h})),dn(e,D,c),D}function ac(){return cc()}function cc(){try{return process.cwd().startsWith("/home/projects/")}catch{}return!1}var Ln=require("node:path");var Rn=ue(require("node:fs"));var Xi=[["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 Yo(){let n=Math.floor(Math.random()*Xi.length);return Xi[n]}async function es(){let n=Ge(),e=await Ot("app"),t="./qwik-app";sn(`Let's create a ${Rt(" Qwik App ")} \u2728 (v2.0.0-beta.8-dev+434cd18)`),await Sr(500);let i=await xs({message:`Where would you like to create your new project? ${He("(Use '.' or './' for current directory)")}`,placeholder:t})||t;Ve(i)&&(it("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=gn(i.trim());r.target=s;let a=Tr(n,r);X.info(`Creating new project in ${Rt(" "+s+" ")} ... \u{1F407}`);let f=null;if(Rn.default.existsSync(s)&&Rn.default.readdirSync(s).length>0){let B=await ni({message:`Directory "./${(0,Ln.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"}]});(Ve(B)||B==="exit")&&(it("Operation cancelled."),process.exit(0)),B==="replace"&&(f=on(s))}let D=await ni({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}})});Ve(D)&&(it("Operation cancelled."),process.exit(0));let h=D,c=await nn({message:`Would you like to install ${n} dependencies?`,initialValue:!0});Ve(c)&&(it("Operation cancelled."),process.exit(0));let p=await nn({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 nn({message:"Finishing the install. Wanna hear a joke?",initialValue:!0});if(!Ve(B)&&B){let[N,U]=Yo();an(me(`${N.trim()}
|
|
164
|
+
${U.trim()}`),"\u{1F648}")}}catch{}let E=yt();E.start("Creating App...");let b=await Bt({appId:h,outDir:s,pkgManager:n,templateManager:e});if(E.stop("App Created \u{1F430}"),p)if(Rn.default.existsSync((0,Ln.join)(s,".git")))X.info("Git has already been initialized before. Skipping...");else{E.start("Git initializing...");try{let B=[];if(B.push(await At("git",["init"],s).install),B.push(await At("git",["add","-A"],s).install),B.push(await At("git",["commit","-m","Initial commit \u26A1\uFE0F"],s).install),B.some(N=>N===!1))throw"";E.stop("Git initialized \u{1F3B2}")}catch{E.stop("Git failed to initialize"),X.error(Ce("Git failed to initialize. You can do this manually by running: git init"))}}let g=!1;return C&&(g=await pn(async()=>{let B=await a.complete(b.outDir);return B&&await st(n,b.outDir).install},{pkgManager:n,spinner:E})),dn(n,b,g),b}async function Jo(n){let e=Ge(),t=await Ot("app");return await Bt({appId:n.starterId,templateManager:t,outDir:n.outDir,pkgManager:e})}async function fc(){Pr(),Dc();try{let n=process.argv.slice(2);n.length>0?await Zi(...n):await es()}catch(n){Lt(n.message||n)}}function Dc(){let n=process.version,[e,t]=n.replace("v","").split(".");Number(e)<16?(console.error(Ce(`Qwik requires Node.js 16.8 or higher. You are currently running Node.js ${n}.`)),process.exit(1)):Number(e)===16?Number(t)<8&&console.warn(js(`Node.js 16.8 or higher is recommended. You are currently running Node.js ${n}.`)):Number(e)===18&&Number(t)<11&&console.error(Ce(`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 ${n}. https://github.com/QwikDev/qwik/issues/3035`))}0&&(module.exports={createApp,runCli,runCreateCli,runCreateInteractiveCli});
|
|
165
165
|
/*! Bundled license information:
|
|
166
166
|
|
|
167
167
|
yargs-parser/build/lib/string-utils.js:
|