You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
53 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

import v from"node:fs";import A from"node:path";import{fileURLToPath as cD}from"node:url";import FD from"child_process";import X from"path";import Q from"fs";import"node:util";import T,{stdin as lD,stdout as CD}from"node:process";import bu from"node:readline";import{Writable as ED}from"node:stream";var hD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var j={exports:{}},uu,Au;function mD(){if(Au)return uu;Au=1,uu=r,r.sync=i;var e=Q;function D(n,u){var a=u.pathExt!==void 0?u.pathExt:process.env.PATHEXT;if(!a||(a=a.split(";"),a.indexOf("")!==-1))return!0;for(var s=0;s<a.length;s++){var o=a[s].toLowerCase();if(o&&n.substr(-o.length).toLowerCase()===o)return!0}return!1}function t(n,u,a){return!n.isSymbolicLink()&&!n.isFile()?!1:D(u,a)}function r(n,u,a){e.stat(n,function(s,o){a(s,s?!1:t(o,n,u))})}function i(n,u){return t(e.statSync(n),n,u)}return uu}var Du,yu;function pD(){if(yu)return Du;yu=1,Du=D,D.sync=t;var e=Q;function D(n,u,a){e.stat(n,function(s,o){a(s,s?!1:r(o,u))})}function t(n,u){return r(e.statSync(n),u)}function r(n,u){return n.isFile()&&i(n,u)}function i(n,u){var a=n.mode,s=n.uid,o=n.gid,c=u.uid!==void 0?u.uid:process.getuid&&process.getuid(),F=u.gid!==void 0?u.gid:process.getgid&&process.getgid(),C=parseInt("100",8),h=parseInt("010",8),B=parseInt("001",8),b=C|h,R=a&B||a&h&&o===F||a&C&&s===c||a&b&&c===0;return R}return Du}var eu,xu;function fD(){if(xu)return eu;xu=1;var e;process.platform==="win32"||hD.TESTING_WINDOWS?e=mD():e=pD(),eu=D,D.sync=t;function D(r,i,n){if(typeof i=="function"&&(n=i,i={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(u,a){D(r,i||{},function(s,o){s?a(s):u(o)})})}e(r,i||{},function(u,a){u&&(u.code==="EACCES"||i&&i.ignoreErrors)&&(u=null,a=!1),n(u,a)})}function t(r,i){try{return e.sync(r,i||{})}catch(n){if(i&&i.ignoreErrors||n.code==="EACCES")return!1;throw n}}return eu}var tu,$u;function dD(){if($u)return tu;$u=1;const e=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",D=X,t=e?";":":",r=fD(),i=s=>Object.assign(new Error(`not found: ${s}`),{code:"ENOENT"}),n=(s,o)=>{const c=o.colon||t,F=s.match(/\//)||e&&s.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(o.path||process.env.PATH||"").split(c)],C=e?o.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",h=e?C.split(c):[""];return e&&s.indexOf(".")!==-1&&h[0]!==""&&h.unshift(""),{pathEnv:F,pathExt:h,pathExtExe:C}},u=(s,o,c)=>{typeof o=="function"&&(c=o,o={}),o||(o={});const{pathEnv:F,pathExt:C,pathExtExe:h}=n(s,o),B=[],b=d=>new Promise((S,E)=>{if(d===F.length)return o.all&&B.length?S(B):E(i(s));const p=F[d],f=/^".*"$/.test(p)?p.slice(1,-1):p,x=D.join(f,s),O=!f&&/^\.[\\\/]/.test(s)?s.slice(0,2)+x:x;S(R(O,d,0))}),R=(d,S,E)=>new Promise((p,f)=>{if(E===C.length)return p(b(S+1));const x=C[E];r(d+x,{pathExt:h},(O,Z)=>{if(!O&&Z)if(o.all)B.push(d+x);else return p(d+x);return p(R(d,S,E+1))})});return c?b(0).then(d=>c(null,d),c):b(0)},a=(s,o)=>{o=o||{};const{pathEnv:c,pathExt:F,pathExtExe:C}=n(s,o),h=[];for(let B=0;B<c.length;B++){const b=c[B],R=/^".*"$/.test(b)?b.slice(1,-1):b,d=D.join(R,s),S=!R&&/^\.[\\\/]/.test(s)?s.slice(0,2)+d:d;for(let E=0;E<F.length;E++){const p=S+F[E];try{if(r.sync(p,{pathExt:C}))if(o.all)h.push(p);else return p}catch{}}}if(o.all&&h.length)return h;if(o.nothrow)return null;throw i(s)};return tu=u,u.sync=a,tu}var V={exports:{}},wu;function BD(){if(wu)return V.exports;wu=1;const e=(D={})=>{const t=D.env||process.env;return(D.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};return V.exports=e,V.exports.default=e,V.exports}var ru,Su;function gD(){if(Su)return ru;Su=1;const e=X,D=dD(),t=BD();function r(n,u){const a=n.options.env||process.env,s=process.cwd(),o=n.options.cwd!=null,c=o&&process.chdir!==void 0&&!process.chdir.disabled;if(c)try{process.chdir(n.options.cwd)}catch{}let F;try{F=D.sync(n.command,{path:a[t({env:a})],pathExt:u?e.delimiter:void 0})}catch{}finally{c&&process.chdir(s)}return F&&(F=e.resolve(o?n.options.cwd:"",F)),F}function i(n){return r(n)||r(n,!0)}return ru=i,ru}var z={},Tu;function bD(){if(Tu)return z;Tu=1;const e=/([()\][%!^"`<>&|;, *?])/g;function D(r){return r=r.replace(e,"^$1"),r}function t(r,i){return r=`${r}`,r=r.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),r=r.replace(/(?=(\\+?)?)\1$/,"$1$1"),r=`"${r}"`,r=r.replace(e,"^$1"),i&&(r=r.replace(e,"^$1")),r}return z.command=D,z.argument=t,z}var nu,Ru;function vD(){return Ru||(Ru=1,nu=/^#!(.*)/),nu}var su,_u;function AD(){if(_u)return su;_u=1;const e=vD();return su=(D="")=>{const t=D.match(e);if(!t)return null;const[r,i]=t[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n},su}var iu,ku;function yD(){if(ku)return iu;ku=1;const e=Q,D=AD();function t(r){const n=Buffer.alloc(150);let u;try{u=e.openSync(r,"r"),e.readSync(u,n,0,150,0),e.closeSync(u)}catch{}return D(n.toString())}return iu=t,iu}var au,Ou;function xD(){if(Ou)return au;Ou=1;const e=X,D=gD(),t=bD(),r=yD(),i=process.platform==="win32",n=/\.(?:com|exe)$/i,u=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function a(c){c.file=D(c);const F=c.file&&r(c.file);return F?(c.args.unshift(c.file),c.command=F,D(c)):c.file}function s(c){if(!i)return c;const F=a(c),C=!n.test(F);if(c.options.forceShell||C){const h=u.test(F);c.command=e.normalize(c.command),c.command=t.command(c.command),c.args=c.args.map(b=>t.argument(b,h));const B=[c.command].concat(c.args).join(" ");c.args=["/d","/s","/c",`"${B}"`],c.command=process.env.comspec||"cmd.exe",c.options.windowsVerbatimArguments=!0}return c}function o(c,F,C){F&&!Array.isArray(F)&&(C=F,F=null),F=F?F.slice(0):[],C=Object.assign({},C);const h={command:c,args:F,options:C,file:void 0,original:{command:c,args:F}};return C.shell?h:s(h)}return au=o,au}var ou,ju;function $D(){if(ju)return ou;ju=1;const e=process.platform==="win32";function D(n,u){return Object.assign(new Error(`${u} ${n.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${u} ${n.command}`,path:n.command,spawnargs:n.args})}function t(n,u){if(!e)return;const a=n.emit;n.emit=function(s,o){if(s==="exit"){const c=r(o,u);if(c)return a.call(n,"error",c)}return a.apply(n,arguments)}}function r(n,u){return e&&n===1&&!u.file?D(u.original,"spawn"):null}function i(n,u){return e&&n===1&&!u.file?D(u.original,"spawnSync"):null}return ou={hookChildProcess:t,verifyENOENT:r,verifyENOENTSync:i,notFoundError:D},ou}var Mu;function wD(){if(Mu)return j.exports;Mu=1;const e=FD,D=xD(),t=$D();function r(n,u,a){const s=D(n,u,a),o=e.spawn(s.command,s.args,s.options);return t.hookChildProcess(o,s),o}function i(n,u,a){const s=D(n,u,a),o=e.spawnSync(s.command,s.args,s.options);return o.error=o.error||t.verifyENOENTSync(o.status,s),o}return j.exports=r,j.exports.spawn=r,j.exports.sync=i,j.exports._parse=D,j.exports._enoent=t,j.exports}var SD=wD();const TD=vu(SD);function cu(e){return e==null?[]:Array.isArray(e)?e:[e]}function RD(e,D,t,r){var i,n=e[D],u=~r.string.indexOf(D)?t==null||t===!0?"":String(t):typeof t=="boolean"?t:~r.boolean.indexOf(D)?t==="false"?!1:t==="true"||(e._.push((i=+t,i*0===0?i:t)),!!t):(i=+t,i*0===0?i:t);e[D]=n==null?u:Array.isArray(n)?n.concat(u):[n,u]}function _D(e,D){e=e||[],D=D||{};var t,r,i,n,u,a={_:[]},s=0,o=0,c=0,F=e.length;const C=D.alias!==void 0,h=D.unknown!==void 0,B=D.default!==void 0;if(D.alias=D.alias||{},D.string=cu(D.string),D.boolean=cu(D.boolean),C)for(t in D.alias)for(r=D.alias[t]=cu(D.alias[t]),s=0;s<r.length;s++)(D.alias[r[s]]=r.concat(t)).splice(s,1);for(s=D.boolean.length;s-- >0;)for(r=D.alias[D.boolean[s]]||[],o=r.length;o-- >0;)D.boolean.push(r[o]);for(s=D.string.length;s-- >0;)for(r=D.alias[D.string[s]]||[],o=r.length;o-- >0;)D.string.push(r[o]);if(B){for(t in D.default)if(n=typeof D.default[t],r=D.alias[t]=D.alias[t]||[],D[n]!==void 0)for(D[n].push(t),s=0;s<r.length;s++)D[n].push(r[s])}const b=h?Object.keys(D.alias):[];for(s=0;s<F;s++){if(i=e[s],i==="--"){a._=a._.concat(e.slice(++s));break}for(o=0;o<i.length&&i.charCodeAt(o)===45;o++);if(o===0)a._.push(i);else if(i.substring(o,o+3)==="no-"){if(n=i.substring(o+3),h&&!~b.indexOf(n))return D.unknown(i);a[n]=!1}else{for(c=o+1;c<i.length&&i.charCodeAt(c)!==61;c++);for(n=i.substring(o,c),u=i.substring(++c)||s+1===F||(""+e[s+1]).charCodeAt(0)===45||e[++s],r=o===2?[n]:n,c=0;c<r.length;c++){if(n=r[c],h&&!~b.indexOf(n))return D.unknown("-".repeat(o)+n);RD(a,n,c+1<r.length||u,D)}}}if(B)for(t in D.default)a[t]===void 0&&(a[t]=D.default[t]);if(C)for(t in a)for(r=D.alias[t]||[];r.length>0;)a[r.shift()]=a[t];return a}var Fu,Iu;function kD(){if(Iu)return Fu;Iu=1;const e="\x1B",D=`${e}[`,t="\x07",r={to(u,a){return a?`${D}${a+1};${u+1}H`:`${D}${u+1}G`},move(u,a){let s="";return u<0?s+=`${D}${-u}D`:u>0&&(s+=`${D}${u}C`),a<0?s+=`${D}${-a}A`:a>0&&(s+=`${D}${a}B`),s},up:(u=1)=>`${D}${u}A`,down:(u=1)=>`${D}${u}B`,forward:(u=1)=>`${D}${u}C`,backward:(u=1)=>`${D}${u}D`,nextLine:(u=1)=>`${D}E`.repeat(u),prevLine:(u=1)=>`${D}F`.repeat(u),left:`${D}G`,hide:`${D}?25l`,show:`${D}?25h`,save:`${e}7`,restore:`${e}8`},i={up:(u=1)=>`${D}S`.repeat(u),down:(u=1)=>`${D}T`.repeat(u)},n={screen:`${D}2J`,up:(u=1)=>`${D}1J`.repeat(u),down:(u=1)=>`${D}J`.repeat(u),line:`${D}2K`,lineEnd:`${D}K`,lineStart:`${D}1K`,lines(u){let a="";for(let s=0;s<u;s++)a+=this.line+(s<u-1?r.up():"");return u&&(a+=r.left),a}};return Fu={cursor:r,scroll:i,erase:n,beep:t},Fu}var _=kD(),J={exports:{}},Pu;function OD(){if(Pu)return J.exports;Pu=1;let e=process||{},D=e.argv||[],t=e.env||{},r=!(t.NO_COLOR||D.includes("--no-color"))&&(!!t.FORCE_COLOR||D.includes("--color")||e.platform==="win32"||(e.stdout||{}).isTTY&&t.TERM!=="dumb"||!!t.CI),i=(a,s,o=a)=>c=>{let F=""+c,C=F.indexOf(s,a.length);return~C?a+n(F,s,o,C)+s:a+F+s},n=(a,s,o,c)=>{let F="",C=0;do F+=a.substring(C,c)+o,C=c+s.length,c=a.indexOf(s,C);while(~c);return F+a.substring(C)},u=(a=r)=>{let s=a?i:()=>String;return{isColorSupported:a,reset:s("\x1B[0m","\x1B[0m"),bold:s("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:s("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:s("\x1B[3m","\x1B[23m"),underline:s("\x1B[4m","\x1B[24m"),inverse:s("\x1B[7m","\x1B[27m"),hidden:s("\x1B[8m","\x1B[28m"),strikethrough:s("\x1B[9m","\x1B[29m"),black:s("\x1B[30m","\x1B[39m"),red:s("\x1B[31m","\x1B[39m"),green:s("\x1B[32m","\x1B[39m"),yellow:s("\x1B[33m","\x1B[39m"),blue:s("\x1B[34m","\x1B[39m"),magenta:s("\x1B[35m","\x1B[39m"),cyan:s("\x1B[36m","\x1B[39m"),white:s("\x1B[37m","\x1B[39m"),gray:s("\x1B[90m","\x1B[39m"),bgBlack:s("\x1B[40m","\x1B[49m"),bgRed:s("\x1B[41m","\x1B[49m"),bgGreen:s("\x1B[42m","\x1B[49m"),bgYellow:s("\x1B[43m","\x1B[49m"),bgBlue:s("\x1B[44m","\x1B[49m"),bgMagenta:s("\x1B[45m","\x1B[49m"),bgCyan:s("\x1B[46m","\x1B[49m"),bgWhite:s("\x1B[47m","\x1B[49m"),blackBright:s("\x1B[90m","\x1B[39m"),redBright:s("\x1B[91m","\x1B[39m"),greenBright:s("\x1B[92m","\x1B[39m"),yellowBright:s("\x1B[93m","\x1B[39m"),blueBright:s("\x1B[94m","\x1B[39m"),magentaBright:s("\x1B[95m","\x1B[39m"),cyanBright:s("\x1B[96m","\x1B[39m"),whiteBright:s("\x1B[97m","\x1B[39m"),bgBlackBright:s("\x1B[100m","\x1B[49m"),bgRedBright:s("\x1B[101m","\x1B[49m"),bgGreenBright:s("\x1B[102m","\x1B[49m"),bgYellowBright:s("\x1B[103m","\x1B[49m"),bgBlueBright:s("\x1B[104m","\x1B[49m"),bgMagentaBright:s("\x1B[105m","\x1B[49m"),bgCyanBright:s("\x1B[106m","\x1B[49m"),bgWhiteBright:s("\x1B[107m","\x1B[49m")}};return J.exports=u(),J.exports.createColors=u,J.exports}var jD=OD();const l=vu(jD);function MD({onlyFirst:e=!1}={}){const D=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(D,e?void 0:"g")}const ID=MD();function qu(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(ID,"")}function Nu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wu={exports:{}};(function(e){var D={};e.exports=D,D.eastAsianWidth=function(r){var i=r.charCodeAt(0),n=r.length==2?r.charCodeAt(1):0,u=i;return 55296<=i&&i<=56319&&56320<=n&&n<=57343&&(i&=1023,n&=1023,u=i<<10|n,u+=65536),u==12288||65281<=u&&u<=65376||65504<=u&&u<=65510?"F":u==8361||65377<=u&&u<=65470||65474<=u&&u<=65479||65482<=u&&u<=65487||65490<=u&&u<=65495||65498<=u&&u<=65500||65512<=u&&u<=65518?"H":4352<=u&&u<=4447||4515<=u&&u<=4519||4602<=u&&u<=4607||9001<=u&&u<=9002||11904<=u&&u<=11929||11931<=u&&u<=12019||12032<=u&&u<=12245||12272<=u&&u<=12283||12289<=u&&u<=12350||12353<=u&&u<=12438||12441<=u&&u<=12543||12549<=u&&u<=12589||12593<=u&&u<=12686||12688<=u&&u<=12730||12736<=u&&u<=12771||12784<=u&&u<=12830||12832<=u&&u<=12871||12880<=u&&u<=13054||13056<=u&&u<=19903||19968<=u&&u<=42124||42128<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||55216<=u&&u<=55238||55243<=u&&u<=55291||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65106||65108<=u&&u<=65126||65128<=u&&u<=65131||110592<=u&&u<=110593||127488<=u&&u<=127490||127504<=u&&u<=127546||127552<=u&&u<=127560||127568<=u&&u<=127569||131072<=u&&u<=194367||177984<=u&&u<=196605||196608<=u&&u<=262141?"W":32<=u&&u<=126||162<=u&&u<=163||165<=u&&u<=166||u==172||u==175||10214<=u&&u<=10221||10629<=u&&u<=10630?"Na":u==161||u==164||167<=u&&u<=168||u==170||173<=u&&u<=174||176<=u&&u<=180||182<=u&&u<=186||188<=u&&u<=191||u==198||u==208||215<=u&&u<=216||222<=u&&u<=225||u==230||232<=u&&u<=234||236<=u&&u<=237||u==240||242<=u&&u<=243||247<=u&&u<=250||u==252||u==254||u==257||u==273||u==275||u==283||294<=u&&u<=295||u==299||305<=u&&u<=307||u==312||319<=u&&u<=322||u==324||328<=u&&u<=331||u==333||338<=u&&u<=339||358<=u&&u<=359||u==363||u==462||u==464||u==466||u==468||u==470||u==472||u==474||u==476||u==593||u==609||u==708||u==711||713<=u&&u<=715||u==717||u==720||728<=u&&u<=731||u==733||u==735||768<=u&&u<=879||913<=u&&u<=929||931<=u&&u<=937||945<=u&&u<=961||963<=u&&u<=969||u==1025||1040<=u&&u<=1103||u==1105||u==8208||8211<=u&&u<=8214||8216<=u&&u<=8217||8220<=u&&u<=8221||8224<=u&&u<=8226||8228<=u&&u<=8231||u==8240||8242<=u&&u<=8243||u==8245||u==8251||u==8254||u==8308||u==8319||8321<=u&&u<=8324||u==8364||u==8451||u==8453||u==8457||u==8467||u==8470||8481<=u&&u<=8482||u==8486||u==8491||8531<=u&&u<=8532||8539<=u&&u<=8542||8544<=u&&u<=8555||8560<=u&&u<=8569||u==8585||8592<=u&&u<=8601||8632<=u&&u<=8633||u==8658||u==8660||u==8679||u==8704||8706<=u&&u<=8707||8711<=u&&u<=8712||u==8715||u==8719||u==8721||u==8725||u==8730||8733<=u&&u<=8736||u==8739||u==8741||8743<=u&&u<=8748||u==8750||8756<=u&&u<=8759||8764<=u&&u<=8765||u==8776||u==8780||u==8786||8800<=u&&u<=8801||8804<=u&&u<=8807||8810<=u&&u<=8811||8814<=u&&u<=8815||8834<=u&&u<=8835||8838<=u&&u<=8839||u==8853||u==8857||u==8869||u==8895||u==8978||9312<=u&&u<=9449||9451<=u&&u<=9547||9552<=u&&u<=9587||9600<=u&&u<=9615||9618<=u&&u<=9621||9632<=u&&u<=9633||9635<=u&&u<=9641||9650<=u&&u<=9651||9654<=u&&u<=9655||9660<=u&&u<=9661||9664<=u&&u<=9665||9670<=u&&u<=9672||u==9675||9678<=u&&u<=9681||9698<=u&&u<=9701||u==9711||9733<=u&&u<=9734||u==9737||9742<=u&&u<=9743||9748<=u&&u<=9749||u==9756||u==9758||u==9792||u==9794||9824<=u&&u<=9825||9827<=u&&u<=9829||9831<=u&&u<=9834||9836<=u&&u<=9837||u==9839||9886<=u&&u<=9887||9918<=u&&u<=9919||9924<=u&&u<=9933||9935<=u&&u<=9953||u==9955||9960<=u&&u<=9983||u==10045||u==10071||10102<=u&&u<=10111||11093<=u&&u<=11097||12872<=u&&u<=12879||57344<=u&&u<=63743||65024<=u&&u<=65039||u==65533||127232<=u&&u<=127242||127248<=u&&u<=127277||127280<=u&&u<=127337||127344<=u&&u<=127386||917760<=u&&u<=917999||983040<=u&&u<=1048573||1048576<=u&&u<=1114109?"A":"N"},D.characterLength=function(r){var i=this.eastAsianWidth(r);return i=="F"||i=="W"||i=="A"?2:1};function t(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}D.length=function(r){for(var i=t(r),n=0,u=0;u<i.length;u++)n=n+this.characterLength(i[u]);return n},D.slice=function(r,i,n){textLen=D.length(r),i=i||0,n=n||1,i<0&&(i=textLen+i),n<0&&(n=textLen+n);for(var u="",a=0,s=t(r),o=0;o<s.length;o++){var c=s[o],F=D.length(c);if(a>=i-(F==2?1:0))if(a+F<=n)u+=c;else break;a+=F}return u}})(Wu);var PD=Wu.exports;const qD=Nu(PD);var ND=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};const WD=Nu(ND);function q(e,D={}){if(typeof e!="string"||e.length===0||(D={ambiguousIsNarrow:!0,...D},e=qu(e),e.length===0))return 0;e=e.replace(WD()," ");const t=D.ambiguousIsNarrow?1:2;let r=0;for(const i of e){const n=i.codePointAt(0);if(!(n<=31||n>=127&&n<=159||n>=768&&n<=879))switch(qD.eastAsianWidth(i)){case"F":case"W":r+=2;break;case"A":r+=t;break;default:r+=1}}return r}const lu=10,Gu=(e=0)=>D=>`\x1B[${D+e}m`,Lu=(e=0)=>D=>`\x1B[${38+e};5;${D}m`,Vu=(e=0)=>(D,t,r)=>`\x1B[${38+e};2;${D};${t};${r}m`,m={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(m.modifier);const GD=Object.keys(m.color),LD=Object.keys(m.bgColor);[...GD,...LD];function VD(){const e=new Map;for(const[D,t]of Object.entries(m)){for(const[r,i]of Object.entries(t))m[r]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[r]=m[r],e.set(i[0],i[1]);Object.defineProperty(m,D,{value:t,enumerable:!1})}return Object.defineProperty(m,"codes",{value:e,enumerable:!1}),m.color.close="\x1B[39m",m.bgColor.close="\x1B[49m",m.color.ansi=Gu(),m.color.ansi256=Lu(),m.color.ansi16m=Vu(),m.bgColor.ansi=Gu(lu),m.bgColor.ansi256=Lu(lu),m.bgColor.ansi16m=Vu(lu),Object.defineProperties(m,{rgbToAnsi256:{value:(D,t,r)=>D===t&&t===r?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:D=>{const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(D.toString(16));if(!t)return[0,0,0];let[r]=t;r.length===3&&(r=[...r].map(n=>n+n).join(""));const i=Number.parseInt(r,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:D=>m.rgbToAnsi256(...m.hexToRgb(D)),enumerable:!1},ansi256ToAnsi:{value:D=>{if(D<8)return 30+D;if(D<16)return 90+(D-8);let t,r,i;if(D>=232)t=((D-232)*10+8)/255,r=t,i=t;else{D-=16;const a=D%36;t=Math.floor(D/36)/5,r=Math.floor(a/6)/5,i=a%6/5}const n=Math.max(t,r,i)*2;if(n===0)return 30;let u=30+(Math.round(i)<<2|Math.round(r)<<1|Math.round(t));return n===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:(D,t,r)=>m.ansi256ToAnsi(m.rgbToAnsi256(D,t,r)),enumerable:!1},hexToAnsi:{value:D=>m.ansi256ToAnsi(m.hexToAnsi256(D)),enumerable:!1}}),m}const zD=VD(),K=new Set(["\x1B","\x9B"]),JD=39,Cu="\x07",zu="[",KD="]",Ju="m",Eu=`${KD}8;;`,Ku=e=>`${K.values().next().value}${zu}${e}${Ju}`,Yu=e=>`${K.values().next().value}${Eu}${e}${Cu}`,YD=e=>e.split(" ").map(D=>q(D)),hu=(e,D,t)=>{const r=[...D];let i=!1,n=!1,u=q(qu(e[e.length-1]));for(const[a,s]of r.entries()){const o=q(s);if(u+o<=t?e[e.length-1]+=s:(e.push(s),u=0),K.has(s)&&(i=!0,n=r.slice(a+1).join("").startsWith(Eu)),i){n?s===Cu&&(i=!1,n=!1):s===Ju&&(i=!1);continue}u+=o,u===t&&a<r.length-1&&(e.push(""),u=0)}!u&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},HD=e=>{const D=e.split(" ");let t=D.length;for(;t>0&&!(q(D[t-1])>0);)t--;return t===D.length?e:D.slice(0,t).join(" ")+D.slice(t).join("")},UD=(e,D,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let r="",i,n;const u=YD(e);let a=[""];for(const[o,c]of e.split(" ").entries()){t.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let F=q(a[a.length-1]);if(o!==0&&(F>=D&&(t.wordWrap===!1||t.trim===!1)&&(a.push(""),F=0),(F>0||t.trim===!1)&&(a[a.length-1]+=" ",F++)),t.hard&&u[o]>D){const C=D-F,h=1+Math.floor((u[o]-C-1)/D);Math.floor((u[o]-1)/D)<h&&a.push(""),hu(a,c,D);continue}if(F+u[o]>D&&F>0&&u[o]>0){if(t.wordWrap===!1&&F<D){hu(a,c,D);continue}a.push("")}if(F+u[o]>D&&t.wordWrap===!1){hu(a,c,D);continue}a[a.length-1]+=c}t.trim!==!1&&(a=a.map(o=>HD(o)));const s=[...a.join(`
`)];for(const[o,c]of s.entries()){if(r+=c,K.has(c)){const{groups:C}=new RegExp(`(?:\\${zu}(?<code>\\d+)m|\\${Eu}(?<uri>.*)${Cu})`).exec(s.slice(o).join(""))||{groups:{}};if(C.code!==void 0){const h=Number.parseFloat(C.code);i=h===JD?void 0:h}else C.uri!==void 0&&(n=C.uri.length===0?void 0:C.uri)}const F=zD.codes.get(Number(i));s[o+1]===`
`?(n&&(r+=Yu("")),i&&F&&(r+=Ku(F))):c===`
`&&(i&&F&&(r+=Ku(i)),n&&(r+=Yu(n)))}return r};function Hu(e,D,t){return String(e).normalize().replace(/\r\n/g,`
`).split(`
`).map(r=>UD(r,D,t)).join(`
`)}const ZD=["up","down","left","right","space","enter","cancel"],Y={actions:new Set(ZD),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function Uu(e,D){if(typeof e=="string")return Y.aliases.get(e)===D;for(const t of e)if(t!==void 0&&Uu(t,D))return!0;return!1}function XD(e,D){if(e===D)return;const t=e.split(`
`),r=D.split(`
`),i=[];for(let n=0;n<Math.max(t.length,r.length);n++)t[n]!==r[n]&&i.push(n);return i}globalThis.process.platform.startsWith("win");const mu=Symbol("clack:cancel");function N(e){return e===mu}function H(e,D){const t=e;t.isTTY&&t.setRawMode(D)}var QD=Object.defineProperty,ue=(e,D,t)=>D in e?QD(e,D,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[D]=t,y=(e,D,t)=>(ue(e,typeof D!="symbol"?D+"":D,t),t);let Zu=class{constructor(D,t=!0){y(this,"input"),y(this,"output"),y(this,"_abortSignal"),y(this,"rl"),y(this,"opts"),y(this,"_render"),y(this,"_track",!1),y(this,"_prevFrame",""),y(this,"_subscribers",new Map),y(this,"_cursor",0),y(this,"state","initial"),y(this,"error",""),y(this,"value");const{input:r=lD,output:i=CD,render:n,signal:u,...a}=D;this.opts=a,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=n.bind(this),this._track=t,this._abortSignal=u,this.input=r,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(D,t){const r=this._subscribers.get(D)??[];r.push(t),this._subscribers.set(D,r)}on(D,t){this.setSubscriber(D,{cb:t})}once(D,t){this.setSubscriber(D,{cb:t,once:!0})}emit(D,...t){const r=this._subscribers.get(D)??[],i=[];for(const n of r)n.cb(...t),n.once&&i.push(()=>r.splice(r.indexOf(n),1));for(const n of i)n()}prompt(){return new Promise((D,t)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),D(mu);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}const r=new ED;r._write=(i,n,u)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),u()},this.input.pipe(r),this.rl=bu.createInterface({input:this.input,output:r,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),bu.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),H(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(_.cursor.show),this.output.off("resize",this.render),H(this.input,!1),D(this.value)}),this.once("cancel",()=>{this.output.write(_.cursor.show),this.output.off("resize",this.render),H(this.input,!1),D(mu)})})}onKeypress(D,t){if(this.state==="error"&&(this.state="active"),t?.name&&(!this._track&&Y.aliases.has(t.name)&&this.emit("cursor",Y.aliases.get(t.name)),Y.actions.has(t.name)&&this.emit("cursor",t.name)),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),D===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),D&&this.emit("key",D.toLowerCase()),t?.name==="return"){if(!this.value&&this.opts.placeholder&&(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder)),this.opts.validate){const r=this.opts.validate(this.value);r&&(this.error=r instanceof Error?r.message:r,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}Uu([D,t?.name,t?.sequence],"cancel")&&(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(`
`),H(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const D=Hu(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
`).length-1;this.output.write(_.cursor.move(-999,D*-1))}render(){const D=Hu(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(_.cursor.hide);else{const t=XD(this._prevFrame,D);if(this.restoreCursor(),t&&t?.length===1){const r=t[0];this.output.write(_.cursor.move(0,r)),this.output.write(_.erase.lines(1));const i=D.split(`
`);this.output.write(i[r]),this._prevFrame=D,this.output.write(_.cursor.move(0,i.length-r-1));return}if(t&&t?.length>1){const r=t[0];this.output.write(_.cursor.move(0,r)),this.output.write(_.erase.down());const i=D.split(`
`).slice(r);this.output.write(i.join(`
`)),this._prevFrame=D;return}this.output.write(_.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}};var De=Object.defineProperty,ee=(e,D,t)=>D in e?De(e,D,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[D]=t,Xu=(e,D,t)=>(ee(e,typeof D!="symbol"?D+"":D,t),t);class te extends Zu{constructor(D){super(D,!1),Xu(this,"options"),Xu(this,"cursor",0),this.options=D.options,this.cursor=this.options.findIndex(({value:t})=>t===D.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",t=>{switch(t){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}}class re extends Zu{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;const D=this.value.slice(0,this.cursor),[t,...r]=this.value.slice(this.cursor);return`${D}${l.inverse(t)}${r.join("")}`}get cursor(){return this._cursor}constructor(D){super(D),this.on("finalize",()=>{this.value||(this.value=D.defaultValue)})}}function ne(){return T.platform!=="win32"?T.env.TERM!=="linux":!!T.env.CI||!!T.env.WT_SESSION||!!T.env.TERMINUS_SUBLIME||T.env.ConEmuTask==="{cmd::Cmder}"||T.env.TERM_PROGRAM==="Terminus-Sublime"||T.env.TERM_PROGRAM==="vscode"||T.env.TERM==="xterm-256color"||T.env.TERM==="alacritty"||T.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const se=ne(),$=(e,D)=>se?e:D,ie=$("\u25C6","*"),ae=$("\u25A0","x"),oe=$("\u25B2","x"),Qu=$("\u25C7","o"),g=$("\u2502","|"),W=$("\u2514","\u2014"),ce=$("\u25CF",">"),Fe=$("\u25CB"," "),le=$("\u25CF","\u2022"),Ce=$("\u25C6","*"),Ee=$("\u25B2","!"),he=$("\u25A0","x"),uD=e=>{switch(e){case"initial":case"active":return l.cyan(ie);case"cancel":return l.red(ae);case"error":return l.yellow(oe);case"submit":return l.green(Qu)}},me=e=>{const{cursor:D,options:t,style:r}=e,i=e.maxItems??Number.POSITIVE_INFINITY,n=Math.max(process.stdout.rows-4,0),u=Math.min(n,Math.max(i,5));let a=0;D>=a+u-3?a=Math.max(Math.min(D-u+3,t.length-u),0):D<a+2&&(a=Math.max(D-2,0));const s=u<t.length&&a>0,o=u<t.length&&a+u<t.length;return t.slice(a,a+u).map((c,F,C)=>{const h=F===0&&s,B=F===C.length-1&&o;return h||B?l.dim("..."):r(c,F+a===D)})},DD=e=>new re({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){const D=`${l.gray(g)}
${uD(this.state)} ${e.message}
`,t=e.placeholder?l.inverse(e.placeholder[0])+l.dim(e.placeholder.slice(1)):l.inverse(l.hidden("_")),r=this.value?this.valueWithCursor:t;switch(this.state){case"error":return`${D.trim()}
${l.yellow(g)} ${r}
${l.yellow(W)} ${l.yellow(this.error)}
`;case"submit":return`${D}${l.gray(g)} ${l.dim(this.value||e.placeholder)}`;case"cancel":return`${D}${l.gray(g)} ${l.strikethrough(l.dim(this.value??""))}${this.value?.trim()?`
${l.gray(g)}`:""}`;default:return`${D}${l.cyan(g)} ${r}
${l.cyan(W)}
`}}}).prompt(),pu=e=>{const D=(t,r)=>{const i=t.label??String(t.value);switch(r){case"selected":return`${l.dim(i)}`;case"active":return`${l.green(ce)} ${i} ${t.hint?l.dim(`(${t.hint})`):""}`;case"cancelled":return`${l.strikethrough(l.dim(i))}`;default:return`${l.dim(Fe)} ${l.dim(i)}`}};return new te({options:e.options,initialValue:e.initialValue,render(){const t=`${l.gray(g)}
${uD(this.state)} ${e.message}
`;switch(this.state){case"submit":return`${t}${l.gray(g)} ${D(this.options[this.cursor],"selected")}`;case"cancel":return`${t}${l.gray(g)} ${D(this.options[this.cursor],"cancelled")}
${l.gray(g)}`;default:return`${t}${l.cyan(g)} ${me({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(r,i)=>D(r,i?"active":"inactive")}).join(`
${l.cyan(g)} `)}
${l.cyan(W)}
`}}}).prompt()},pe=(e="")=>{process.stdout.write(`${l.gray(W)} ${l.red(e)}
`)},fe=(e="")=>{process.stdout.write(`${l.gray(g)}
${l.gray(W)} ${e}
`)},M={message:(e="",{symbol:D=l.gray(g)}={})=>{const t=[`${l.gray(g)}`];if(e){const[r,...i]=e.split(`
`);t.push(`${D} ${r}`,...i.map(n=>`${l.gray(g)} ${n}`))}process.stdout.write(`${t.join(`
`)}
`)},info:e=>{M.message(e,{symbol:l.blue(le)})},success:e=>{M.message(e,{symbol:l.green(Ce)})},step:e=>{M.message(e,{symbol:l.green(Qu)})},warn:e=>{M.message(e,{symbol:l.yellow(Ee)})},warning:e=>{M.warn(e)},error:e=>{M.message(e,{symbol:l.red(he)})}};`${l.gray(g)}`;const{blue:k,blueBright:U,cyan:I,green:fu,greenBright:de,magenta:G,red:P,redBright:eD,reset:du,yellow:w}=l,L=_D(process.argv.slice(2),{alias:{h:"help",t:"template"},boolean:["help","overwrite"],string:["template"]}),Bu=process.cwd(),Be=`Usage: create-vite [OPTION]... [DIRECTORY]
Create a new Vite project in JavaScript or TypeScript.
With no arguments, start the CLI in interactive mode.
Options:
-t, --template NAME use a specific template
Available templates:
${w("vanilla-ts vanilla")}
${fu("vue-ts vue")}
${I("react-ts react")}
${I("react-swc-ts react-swc")}
${G("preact-ts preact")}
${eD("lit-ts lit")}
${P("svelte-ts svelte")}
${k("solid-ts solid")}
${U("qwik-ts qwik")}`,gu=[{name:"vanilla",display:"Vanilla",color:w,variants:[{name:"vanilla-ts",display:"TypeScript",color:k},{name:"vanilla",display:"JavaScript",color:w}]},{name:"vue",display:"Vue",color:fu,variants:[{name:"vue-ts",display:"TypeScript",color:k},{name:"vue",display:"JavaScript",color:w},{name:"custom-create-vue",display:"Official Vue Starter \u2197",color:fu,customCommand:"npm create vue@latest TARGET_DIR"},{name:"custom-nuxt",display:"Nuxt \u2197",color:de,customCommand:"npm exec nuxi init TARGET_DIR"}]},{name:"react",display:"React",color:I,variants:[{name:"react-ts",display:"TypeScript",color:k},{name:"react-swc-ts",display:"TypeScript + SWC",color:k},{name:"react",display:"JavaScript",color:w},{name:"react-swc",display:"JavaScript + SWC",color:w},{name:"custom-react-router",display:"React Router v7 \u2197",color:I,customCommand:"npm create react-router@latest TARGET_DIR"},{name:"custom-tanstack-router",display:"TanStack Router \u2197",color:I,customCommand:"npm create -- tsrouter-app@latest TARGET_DIR --framework react --interactive"},{name:"redwoodsdk-standard",display:"RedwoodSDK \u2197",color:P,customCommand:"npm exec degit redwoodjs/sdk/starters/standard TARGET_DIR"}]},{name:"preact",display:"Preact",color:G,variants:[{name:"preact-ts",display:"TypeScript",color:k},{name:"preact",display:"JavaScript",color:w},{name:"custom-create-preact",display:"Official Preact Starter \u2197",color:G,customCommand:"npm create preact@latest TARGET_DIR"}]},{name:"lit",display:"Lit",color:eD,variants:[{name:"lit-ts",display:"TypeScript",color:k},{name:"lit",display:"JavaScript",color:w}]},{name:"svelte",display:"Svelte",color:P,variants:[{name:"svelte-ts",display:"TypeScript",color:k},{name:"svelte",display:"JavaScript",color:w},{name:"custom-svelte-kit",display:"SvelteKit \u2197",color:P,customCommand:"npm exec sv create TARGET_DIR"}]},{name:"solid",display:"Solid",color:k,variants:[{name:"solid-ts",display:"TypeScript",color:k},{name:"solid",display:"JavaScript",color:w},{name:"custom-tanstack-router",display:"TanStack Router \u2197",color:I,customCommand:"npm create -- tsrouter-app@latest TARGET_DIR --framework solid --interactive"}]},{name:"qwik",display:"Qwik",color:U,variants:[{name:"qwik-ts",display:"TypeScript",color:U},{name:"qwik",display:"JavaScript",color:w},{name:"custom-qwik-city",display:"QwikCity \u2197",color:U,customCommand:"npm create qwik@latest basic TARGET_DIR"}]},{name:"angular",display:"Angular",color:P,variants:[{name:"custom-angular",display:"Angular \u2197",color:P,customCommand:"npm exec @angular/cli@latest new TARGET_DIR"},{name:"custom-analog",display:"Analog \u2197",color:w,customCommand:"npm create analog@latest TARGET_DIR"}]},{name:"marko",display:"Marko",color:G,variants:[{name:"marko-run",display:"Marko Run \u2197",color:G,customCommand:"npm create -- marko@latest --name TARGET_DIR"}]},{name:"others",display:"Others",color:du,variants:[{name:"create-vite-extra",display:"Extra Vite Starters \u2197",color:du,customCommand:"npm create vite-extra@latest TARGET_DIR"},{name:"create-electron-vite",display:"Electron \u2197",color:du,customCommand:"npm create electron-vite@latest TARGET_DIR"}]}],ge=gu.map(e=>e.variants.map(D=>D.name)).reduce((e,D)=>e.concat(D),[]),be={_gitignore:".gitignore"},tD="vite-project";async function ve(){const e=L._[0]?rD(String(L._[0])):void 0,D=L.template,t=L.overwrite;if(L.help){console.log(Be);return}const r=$e(process.env.npm_config_user_agent),i=()=>pe("Operation cancelled");let n=e;if(!n){const E=await DD({message:"Project name:",defaultValue:tD,placeholder:tD});if(N(E))return i();n=rD(E)}if(v.existsSync(n)&&!ye(n)){const E=t?"yes":await pu({message:(n==="."?"Current directory":`Target directory "${n}"`)+" is not empty. Please choose how to proceed:",options:[{label:"Cancel operation",value:"no"},{label:"Remove existing files and continue",value:"yes"},{label:"Ignore files and continue",value:"ignore"}]});if(N(E))return i();switch(E){case"yes":xe(n);break;case"no":i();return}}let u=A.basename(A.resolve(n));if(!sD(u)){const E=await DD({message:"Package name:",defaultValue:iD(u),placeholder:iD(u),validate(p){if(!sD(p))return"Invalid package.json name"}});if(N(E))return i();u=E}let a=D,s=!1;if(D&&!ge.includes(D)&&(a=void 0,s=!0),!a){const E=await pu({message:s?`"${D}" isn't a valid template. Please choose from below: `:"Select a framework:",options:gu.map(f=>{const x=f.color;return{label:x(f.display||f.name),value:f}})});if(N(E))return i();const p=await pu({message:"Select a variant:",options:E.variants.map(f=>{const x=f.color,O=f.customCommand?oD(f.customCommand,r).replace(/ TARGET_DIR$/,""):void 0;return{label:x(f.display||f.name),value:f.name,hint:O}})});if(N(p))return i();a=p}const o=A.join(Bu,n);v.mkdirSync(o,{recursive:!0});let c=!1;a.includes("-swc")&&(c=!0,a=a.replace("-swc",""));const F=r?r.name:"npm",{customCommand:C}=gu.flatMap(E=>E.variants).find(E=>E.name===a)??{};if(C){const E=oD(C,r),[p,...f]=E.split(" "),x=f.map(Z=>Z.replace("TARGET_DIR",()=>n)),{status:O}=TD.sync(p,x,{stdio:"inherit"});process.exit(O??0)}M.step(`Scaffolding project in ${o}...`);const h=A.resolve(cD(import.meta.url),"../..",`template-${a}`),B=(E,p)=>{const f=A.join(o,be[E]??E);p?v.writeFileSync(f,p):nD(A.join(h,E),f)},b=v.readdirSync(h);for(const E of b.filter(p=>p!=="package.json"))B(E);const R=JSON.parse(v.readFileSync(A.join(h,"package.json"),"utf-8"));R.name=u,B("package.json",JSON.stringify(R,null,2)+`
`),c&&we(o,a.endsWith("-ts"));let d="";const S=A.relative(Bu,o);switch(d+=`Done. Now run:
`,o!==Bu&&(d+=`
cd ${S.includes(" ")?`"${S}"`:S}`),F){case"yarn":d+=`
yarn`,d+=`
yarn dev`;break;default:d+=`
${F} install`,d+=`
${F} run dev`;break}fe(d)}function rD(e){return e.trim().replace(/\/+$/g,"")}function nD(e,D){v.statSync(e).isDirectory()?Ae(e,D):v.copyFileSync(e,D)}function sD(e){return/^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(e)}function iD(e){return e.trim().toLowerCase().replace(/\s+/g,"-").replace(/^[._]/,"").replace(/[^a-z\d\-~]+/g,"-")}function Ae(e,D){v.mkdirSync(D,{recursive:!0});for(const t of v.readdirSync(e)){const r=A.resolve(e,t),i=A.resolve(D,t);nD(r,i)}}function ye(e){const D=v.readdirSync(e);return D.length===0||D.length===1&&D[0]===".git"}function xe(e){if(v.existsSync(e))for(const D of v.readdirSync(e))D!==".git"&&v.rmSync(A.resolve(e,D),{recursive:!0,force:!0})}function $e(e){if(!e)return;const D=e.split(" ")[0].split("/");return{name:D[0],version:D[1]}}function we(e,D){const t="3.9.0";aD(A.resolve(e,"package.json"),r=>r.replace(/"@vitejs\/plugin-react": ".+?"/,`"@vitejs/plugin-react-swc": "^${t}"`)),aD(A.resolve(e,`vite.config.${D?"ts":"js"}`),r=>r.replace("@vitejs/plugin-react","@vitejs/plugin-react-swc"))}function aD(e,D){const t=v.readFileSync(e,"utf-8");v.writeFileSync(e,D(t),"utf-8")}function oD(e,D){const t=D?D.name:"npm",r=t==="yarn"&&D?.version.startsWith("1.");return e.replace(/^npm create (?:-- )?/,()=>t==="bun"?"bun x create-":t==="pnpm"?"pnpm create ":e.startsWith("npm create -- ")?`${t} create -- `:`${t} create `).replace("@latest",()=>r?"":"@latest").replace(/^npm exec/,()=>t==="pnpm"?"pnpm dlx":t==="yarn"&&!r?"yarn dlx":t==="bun"?"bun x":"npm exec")}ve().catch(e=>{console.error(e)});