Files
server-configs/node_modules/playwright/lib/utilsBundleImpl.js

104 lines
309 KiB
JavaScript
Raw Normal View History

2026-02-13 22:24:27 +08:00
"use strict";var gf=Object.create;var Or=Object.defineProperty;var Df=Object.getOwnPropertyDescriptor;var yf=Object.getOwnPropertyNames;var Ef=Object.getPrototypeOf,wf=Object.prototype.hasOwnProperty;var S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qr=(e,t)=>{for(var r in t)Or(e,r,{get:t[r],enumerable:!0})},Pu=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of yf(t))!wf.call(e,n)&&n!==r&&Or(e,n,{get:()=>t[n],enumerable:!(i=Df(t,n))||i.enumerable});return e};var pt=(e,t,r)=>(r=e!=null?gf(Ef(e)):{},Pu(t||!e||!e.__esModule?Or(r,"default",{value:e,enumerable:!0}):r,e)),bf=e=>Pu(Or({},"__esModule",{value:!0}),e);var Mu=S((I1,Nr)=>{Nr.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;Nr.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u
`?(dt++,Ke=0):e?Ke+=e.length:Ke++,e&&(Mr+=e.length),e}var $u={default(){switch(X){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
`:case"\r":case"\u2028":case"\u2029":F();return;case"/":F(),Z="comment";return;case void 0:return F(),oe("eof")}if(Ee.isSpaceSeparator(X)){F();return}return $u[Le]()},comment(){switch(X){case"*":F(),Z="multiLineComment";return;case"/":F(),Z="singleLineComment";return}throw ae(F())},multiLineComment(){switch(X){case"*":F(),Z="multiLineCommentAsterisk";return;case void 0:throw ae(F())}F()},multiLineCommentAsterisk(){switch(X){case"*":F();return;case"/":F(),Z="default";return;case void 0:throw ae(F())}F(),Z="multiLineComment"},singleLineComment(){switch(X){case`
`:case"\r":case"\u2028":case"\u2029":F(),Z="default";return;case void 0:return F(),oe("eof")}F()},value(){switch(X){case"{":case"[":return oe("punctuator",F());case"n":return F(),_t("ull"),oe("null",null);case"t":return F(),_t("rue"),oe("boolean",!0);case"f":return F(),_t("alse"),oe("boolean",!1);case"-":case"+":F()==="-"&&(st=-1),Z="sign";return;case".":K=F(),Z="decimalPointLeading";return;case"0":K=F(),Z="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":K=F(),Z="decimalInteger";return;case"I":return F(),_t("nfinity"),oe("numeric",1/0);case"N":return F(),_t("aN"),oe("numeric",NaN);case'"':case"'":ur=F()==='"',K="",Z="string";return}throw ae(F())},identifierNameStartEscape(){if(X!=="u")throw ae(F());F();let e=$i();switch(e){case"$":case"_":break;default:if(!Ee.isIdStartChar(e))throw zu();break}K+=e,Z="identifierName"},identifierName(){switch(X){case"$":case"_":case"\u200C":case"\u200D":K+=F();return;case"\\":F(),Z="identifierNameEscape";return}if(Ee.isIdContinueChar(X)){K+=F();return}return oe("identifier",K)},identifierNameEscape(){if(X!=="u")throw ae(F());F();let e=$i();switch(e){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!Ee.isIdContinueChar(e))throw zu();break}K+=e,Z="identifierName"},sign(){switch(X){case".":K=F(),Z="decimalPointLeading";return;case"0":K=F(),Z="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":K=F(),Z="decimalInteger";return;case"I":return F(),_t("nfinity"),oe("numeric",st*(1/0));case"N":return F(),_t("aN"),oe("numeric",NaN)}throw ae(F())},zero(){switch(X){case".":K+=F(),Z="decimalPoint";return;case"e":case"E":K+=F(),Z="decimalExponent";return;case"x":case"X":K+=F(),Z="hexadecimal";return}return oe("numeric",st*0)},decimalInteger(){switch(X){case".":K+=F(),Z="decimalPoint";return;case"e":case"E":K+=F(),Z="decimalExponent";return}if(Ee.isDigit(X)){K+=F();return}return oe("numeric",st*Number(K))},decimalPointLeading(){if(Ee.isDigit(X)){K+=F(),Z="decimalFraction";return}throw ae(F())},decimalPoint(){switch(X){case"e":case"E":K+=F(),Z="decimalExponent";return}if(Ee.isDigit(X)){K+=F(),Z="decimalFraction";return}return oe("numeric",st*Number(K))},decimalFraction(){switch(X){case"e":case"E":K+=F(),Z="decimalExponent";return}if(Ee.isDigit(X)){K+=F();return}return oe("numeric",st*Number(K))},decimalExponent(){switch(X){case"+":case"-":K+=F(),Z="decimalExponentSign";return}if(Ee.isDigit(X)){K+=F(),Z="decimalExponentInteger";return}throw ae(F())},decimalExponentSign(){if(Ee.isDigit(X)){K+=F(),Z="decimalExponentInteger";return}throw ae(F())},decimalExponentInteger(){if(Ee.isDigit(X)){K+=F();return}return oe("numeric",st*Number(K))},hexadecimal(){if(Ee.isHexDigit(X)){K+=F(),Z="hexadecimalInteger";return}throw ae(F())},hexadecimalInteger(){if(Ee.isHexDigit(X)){K+=F();return}return oe("numeric",st*Number(K))},string(){switch(X){case"\\":F(),K+=Af();return;case'"':if(ur)return F(),oe("string",K);K+=F();return;case"'":if(!ur)return F(),oe("string",K);K+=F();return;case`
`:case"\r":throw ae(F());case"\u2028":case"\u2029":_f(X);break;case void 0:throw ae(F())}K+=F()},start(){switch(X){case"{":case"[":return oe("punctuator",F())}Z="value"},beforePropertyName(){switch(X){case"$":case"_":K=F(),Z="identifierName";return;case"\\":F(),Z="identifierNameStartEscape";return;case"}":return oe("punctuator",F());case'"':case"'":ur=F()==='"',Z="string";return}if(Ee.isIdStartChar(X)){K+=F(),Z="identifierName";return}throw ae(F())},afterPropertyName(){if(X===":")return oe("punctuator",F());throw ae(F())},beforePropertyValue(){Z="value"},afterPropertyValue(){switch(X){case",":case"}":return oe("punctuator",F())}throw ae(F())},beforeArrayValue(){if(X==="]")return oe("punctuator",F());Z="value"},afterArrayValue(){switch(X){case",":case"]":return oe("punctuator",F())}throw ae(F())},end(){throw ae(F())}};function oe(e,t){return{type:e,value:t,line:dt,column:Ke}}function _t(e){for(let t of e){if(ot()!==t)throw ae(F());F()}}function Af(){switch(ot()){case"b":return F(),"\b";case"f":return F(),"\f";case"n":return F(),`
`;case"r":return F(),"\r";case"t":return F()," ";case"v":return F(),"\v";case"0":if(F(),Ee.isDigit(ot()))throw ae(F());return"\0";case"x":return F(),xf();case"u":return F(),$i();case`
`:case"\u2028":case"\u2029":return F(),"";case"\r":return F(),ot()===`
`&&F(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw ae(F());case void 0:throw ae(F())}return F()}function xf(){let e="",t=ot();if(!Ee.isHexDigit(t)||(e+=F(),t=ot(),!Ee.isHexDigit(t)))throw ae(F());return e+=F(),String.fromCodePoint(parseInt(e,16))}function $i(){let e="",t=4;for(;t-- >0;){let r=ot();if(!Ee.isHexDigit(r))throw ae(F());e+=F()}return String.fromCodePoint(parseInt(e,16))}var Ff={start(){if(we.type==="eof")throw vt();Mi()},beforePropertyName(){switch(we.type){case"identifier":case"string":ji=we.value,Le="afterPropertyName";return;case"punctuator":Pr();return;case"eof":throw vt()}},afterPropertyName(){if(we.type==="eof")throw vt();Le="beforePropertyValue"},beforePropertyValue(){if(we.type==="eof")throw vt();Mi()},beforeArrayValue(){if(we.type==="eof")throw vt();if(we.type==="punctuator"&&we.value==="]"){Pr();return}Mi()},afterPropertyValue(){if(we.type==="eof")throw vt();switch(we.value){case",":Le="beforePropertyName";return;case"}":Pr()}},afterArrayValue(){if(we.type==="eof")throw vt();switch(we.value){case",":Le="beforeArrayValue";return;case"]":Pr()}},end(){}};function Mi(){let e;switch(we.type){case"punctuator":switch(we.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=we.value;break}if(or===void 0)or=e;else{let t=ut[ut.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,ji,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")ut.push(e),Array.isArray(e)?Le="beforeArrayValue":Le="beforePropertyName";else{let t=ut[ut.length-1];t==null?Le="end":Array.isArray(t)?Le="afterArrayValue":Le="afterPropertyValue"}}function Pr(){ut.pop();let e=ut[ut.length-1];e==null?Le="end":Array.isArray(e)?Le="afterArrayValue":Le="afterPropertyValue"}function ae(e){return Hr(e===void 0?`JSON5: invalid end of input at ${dt}:${Ke}`:`JSON5: invalid character '${ju(e)}' at ${dt}:${Ke}`)}function vt(){return Hr(`JSON5: invalid end of input at ${dt}:${Ke}`)}function zu(){return Ke-=5,Hr(`JSON5: invalid identifier character at ${dt}:${Ke}`)}function _f(e){console.warn(`JSON5: '${ju(e)}' in strings is not valid ECMAScript; consider escaping`)}function ju(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let r=e.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return e}function Hr(e){let t=new SyntaxError(e);return t.lineNumber=dt,t.columnNumber=Ke,t}});var Wu=S((N1,Uu)=>{var Vi=Pi();Uu.exports=function(t,r,i){let n=[],s="",u,o,a="",l;if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&(i=r.space,l=r.quote,r=r.replacer),typeof r=="function")o=r;else if(Array.isArray(r)){u=[];for(let D of r){let v;typeof D=="string"?v=D:(typeof D=="number"||D instanceof String||D instanceof Number)&&(v=String(D)),v!==void 0&&u.indexOf(v)<0&&u.push(v)}}return i instanceof Number?i=Number(i):i instanceof String&&(i=String(i)),typeof i=="number"?i>0&&(i=Math.min(10,Math.floor(i)),a=" ".substr(0,i)):typeof i=="string"&&(a=i.substr(0,10)),c("",{"":t});function c(D,v){let g=v[D];switch(g!=null&&(typeof g.toJSON5=="function"?g=g.toJSON5(D):typeof g.toJSON=="function"&&(g=g.toJSON(D))),o&&(g=o.call(v,D,g)),g instanceof Number?g=Number(g):g instanceof String?g=String(g):g instanceof Boolean&&(g=g.valueOf()),g){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof g=="string")return h(g,!1);if(typeof g=="number")return String(g);if(typeof g=="object")return Array.isArray(g)?y(g):f(g)}function h(D){let v={"'":.1,'"':.2},g={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},_="";for(let B=0;B<D.length;B++){let O=D[B];switch(O){case"'":case'"':v[O]++,_+=O;continue;case"\0":if(Vi.isDigit(D[B+1])){_+="\\x00";continue}}if(g[O]){_+=g[O];continue}if(O<" "){let C=O.charCodeAt(0).toString(16);_+="\\x"+("00"+C).substring(C.length);continue}_+=O}let w=l||Object.keys(v).redu
`+s;B=_.join(O),w=`{
`+s+B+`,
`+v+"}"}}return n.pop(),s=v,w}function p(D){if(D.length===0)return h(D,!0);let v=String.fromCodePoint(D.codePointAt(0));if(!Vi.isIdStartChar(v))return h(D,!0);for(let g=v.length;g<D.length;g++)if(!Vi.isIdContinueChar(String.fromCodePoint(D.codePointAt(g))))return h(D,!0);return D}function y(D){if(n.indexOf(D)>=0)throw TypeError("Converting circular structure to JSON5");n.push(D);let v=s;s=s+a;let g=[];for(let w=0;w<D.length;w++){let B=c(String(w),D);g.push(B!==void 0?B:"null")}let _;if(g.length===0)_="[]";else if(a==="")_="["+g.join(",")+"]";else{let w=`,
`+s,B=g.join(w);_=`[
`+s+B+`,
`+v+"]"}return n.pop(),s=v,_}}});var Yu=S((P1,Ku)=>{var vf=Gu(),Sf=Wu(),kf={parse:vf,stringify:Sf};Ku.exports=kf});var Zu=S(Gi=>{var Qu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Gi.encode=function(e){if(0<=e&&e<Qu.length)return Qu[e];throw new TypeError("Must be between 0 and 63: "+e)};Gi.decode=function(e){var t=65,r=90,i=97,n=122,s=48,u=57,o=43,a=47,l=26,c=52;return t<=e&&e<=r?e-t:i<=e&&e<=n?e-i+l:s<=e&&e<=u?e-s+c:e==o?62:e==a?63:-1}});var Ki=S(Wi=>{var Xu=Zu(),Ui=5,Ju=1<<Ui,eo=Ju-1,to=Ju;function Bf(e){return e<0?(-e<<1)+1:(e<<1)+0}function Rf(e){var t=(e&1)===1,r=e>>1;return t?-r:r}Wi.encode=function(t){var r="",i,n=Bf(t);do i=n&eo,n>>>=Ui,n>0&&(i|=to),r+=Xu.encode(i);while(n>0);return r};Wi.decode=function(t,r,i){var n=t.length,s=0,u=0,o,a;do{if(r>=n)throw new Error("Expected more digits in base 64 VLQ value.");if(a=Xu.decode(t.charCodeAt(r++)),a===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));o=!!(a&to),a&=eo,s=s+(a<<u),u+=Ui}while(o);i.value=Rf(s),i.rest=r}});var Gt=S(Se=>{function Lf(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}Se.getArg=Lf;var ro=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Tf=/^data:.+\,.+$/;function ar(e){var t=e.match(ro);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}Se.urlParse=ar;function jt(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}Se.urlGenerate=jt;function Yi(e){var t=e,r=ar(e);if(r){if(!r.path)return e;t=r.path}for(var i=Se.isAbsolute(t),n=t.split(/\/+/),s,u=0,o=n.length-1;o>=0;o--)s=n[o],s==="."?n.splice(o,1):s===".."?u++:u>0&&(s===""?(n.splice(o+1,u),u=0):(n.splice(o,2),u--));return t=n.join("/"),t===""&&(t=i?"/":"."),r?(r.path=t,jt(r)):t}Se.normalize=Yi;function io(e,t){e===""&&(e="."),t===""&&(t=".");var r=ar(t),i=ar(e);if(i&&(e=i.path||"/"),r&&!r.scheme)return i&&(r.scheme=i.scheme),jt(r);if(r||t.match(Tf))return t;if(i&&!i.host&&!i.path)return i.host=t,jt(i);var n=t.charAt(0)==="/"?t:Yi(e.replace(/\/+$/,"")+"/"+t);return i?(i.path=n,jt(i)):n}Se.join=io;Se.isAbsolute=function(e){return e.charAt(0)==="/"||ro.test(e)};function If(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var i=e.lastIndexOf("/");if(i<0||(e=e.slice(0,i),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}Se.relative=If;var no=(function(){var e=Object.create(null);return!("__proto__"in e)})();function so(e){return e}function Of(e){return uo(e)?"$"+e:e}Se.toSetString=no?so:Of;function qf(e){return uo(e)?e.slice(1):e}Se.fromSetString=no?so:qf;function uo(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function Nf(e,t,r){var i=Vt(e.source,t.source);return i!==0||(i=e.originalLine-t.originalLine,i!==0)||(i=e.originalColumn-t.originalColumn,i!==0||r)||(i=e.generatedColumn-t.generatedColumn,i!==0)||(i=e.generatedLine-t.generatedLine,i!==0)?i:Vt(e.name,t.name)}Se.compareByOriginalPositions=Nf;function Pf(e,t,r){var i=e.generatedLine-t.generatedLine;return i!==0||(i=e.generatedColumn-t.generatedColumn,i!==0||r)||(i=Vt(e.source,t.source),i!==0)||(i=e.originalLine-t.originalLine,i!==0)||(i=e.originalColumn-t.originalColumn,i!==0)?i:Vt(e.name,t.name)}Se.compareByGeneratedPositionsDeflated=Pf;function Vt(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function Mf(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=Vt(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:Vt(e.name,t.name)}Se.compareByGeneratedPositionsInflated=Mf;function Hf(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}Se.pa
at `+So(t[o],s)),s.nextPosition=s.curPosition;return s.curPosition=s.nextPosition=null,n+u.reverse().join("")}function ko(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var r=t[1],i=+t[2],n=+t[3],s=Bt[r];if(!s&&et&&et.existsSync(r))try{s=et.readFileSync(r,"utf8")}catch{s=""}if(s){var u=s.split(/(?:\r\n|\r|\n)/)[i-1];if(u)return r+":"+i+`
`+u+`
`+new Array(n).join(" ")+"^"}}return null}function cp(e){var t=ko(e),r=sp();r&&r._handle&&r._handle.setBlocking&&r._handle.setBlocking(!0),t&&(console.error(),console.error(t)),console.error(e.stack),up(1)}function hp(){var e=process.emit;process.emit=function(t){if(t==="uncaughtException"){var r=arguments[1]&&arguments[1].stack,i=this.listeners(t).length>0;if(r&&!i)return cp(arguments[1])}return e.apply(this,arguments)}}var fp=mt.slice(0),pp=gt.slice(0);Rt.wrapCallSite=So;Rt.getErrorSource=ko;Rt.mapSourcePosition=pn;Rt.retrieveSourceMap=fn;Rt.install=function(e){if(e=e||{},e.environment&&(hr=e.environment,["node","browser","auto"].indexOf(hr)===-1))throw new Error("environment "+hr+" was unknown. Available options are {auto, browser, node}");if(e.retrieveFile&&(e.overrideRetrieveFile&&(mt.length=0),mt.unshift(e.retrieveFile)),e.retrieveSourceMap&&(e.overrideRetrieveSourceMap&&(gt.length=0),gt.unshift(e.retrieveSourceMap)),e.hookRequire&&!cn()){var t=Ao(ln,"module"),r=t.prototype._compile;r.__sourceMapSupport||(t.prototype._compile=function(s,u){return Bt[u]=s,fr[u]=void 0,r.call(this,s,u)},t.prototype._compile.__sourceMapSupport=!0)}if(on||(on="emptyCacheBetweenOperations"in e?e.emptyCacheBetweenOperations:!1),xo||(xo=!0,Error.prepareStackTrace=lp),!Fo){var i="handleUncaughtExceptions"in e?e.handleUncaughtExceptions:!0;try{var n=Ao(ln,"worker_threads");n.isMainThread===!1&&(i=!1)}catch{}i&&ip()&&(Fo=!0,hp())}};Rt.resetRetrieveHandlers=function(){mt.length=0,gt.length=0,mt=fp.slice(0),gt=pp.slice(0),fn=Ur(gt),hn=Ur(mt)}});var Lo=S((Z1,Ro)=>{"use strict";var dp=require("https");Ro.exports=(e,t)=>{t=typeof t=="undefined"?1/0:t;let r=new Map,i=!1,n=!0;return e instanceof dp.Server?e.on("secureConnection",s):e.on("connection",s),e.on("request",u),e.stop=o,e._pendingSockets=r,e;function s(c){r.set(c,0),c.once("close",()=>r.delete(c))}function u(c,h){r.set(c.socket,r.get(c.socket)+1),h.once("finish",()=>{let f=r.get(c.socket)-1;r.set(c.socket,f),i&&f===0&&c.socket.end()})}function o(c){setImmediate(()=>{i=!0,t<1/0&&setTimeout(l,t).unref(),e.close(h=>{c&&c(h,n)}),r.forEach(a)})}function a(c,h){c===0&&h.end()}function l(){n=!1,r.forEach((c,h)=>h.end()),setImmediate(()=>{r.forEach((c,h)=>h.destroy())})}}});var qo=S((X1,pr)=>{"use strict";var mp=typeof process!="undefined"&&process.env.TERM_PROGRAM==="Hyper",gp=typeof process!="undefined"&&process.platform==="win32",To=typeof process!="undefined"&&process.platform==="linux",dn={ballotDisabled:"\u2612",ballotOff:"\u2610",ballotOn:"\u2611",bullet:"\u2022",bulletWhite:"\u25E6",fullBlock:"\u2588",heart:"\u2764",identicalTo:"\u2261",line:"\u2500",mark:"\u203B",middot:"\xB7",minus:"\uFF0D",multiplication:"\xD7",obelus:"\xF7",pencilDownRight:"\u270E",pencilRight:"\u270F",pencilUpRight:"\u2710",percent:"%",pilcrow2:"\u2761",pilcrow:"\xB6",plusMinus:"\xB1",question:"?",section:"\xA7",starsOff:"\u2606",starsOn:"\u2605",upDownArrow:"\u2195"},Io=Object.assign({},dn,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),Oo=Object.assign({},dn,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:To?"\u25B8":"\u276F",pointerSmall:To?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});pr.exports=gp&&!mp?Io:Oo;Reflect.defineProperty(pr.exports,"common",{enumerable:!1,value:dn});Reflect.defineProperty(pr.exports,"windows",{enumerable:!1,value:Io});Reflect.defineProperty(pr.exports,"other",{enumerable:!1,value:Oo})});var Qe=S((J1,mn)=>{"use strict";var Dp=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),yp=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,Ep=()=>typeof process!="undefined"?process.env.FORCE_COLOR!=="0":!1,No=()=>{let e={enabled:Ep(),visible:!0,styles:{},keys:{}},t=s=>{let u=s.open=`\x1B[${s.codes[0]}m`,o=s.close=`\x1B[${s.codes[1]}m`,a=s.regex=new RegExp(`\\u001b\\[${s.code
`),l=u.length;for(l>0&&u.includes("unstyle")&&(u=[...new Set(["unstyle",...u])].reverse());l-- >0;)o=r(e.styles[u[l]],o,a);return o},n=(s,u,o)=>{e.styles[s]=t({name:s,codes:u}),(e.keys[o]||(e.keys[o]=[])).push(s),Reflect.defineProperty(e,s,{configurable:!0,enumerable:!0,set(l){e.alias(s,l)},get(){let l=c=>i(c,l.stack);return Reflect.setPrototypeOf(l,e),l.stack=this.stack?this.stack.concat(s):[s],l}})};return n("reset",[0,0],"modifier"),n("bold",[1,22],"modifier"),n("dim",[2,22],"modifier"),n("italic",[3,23],"modifier"),n("underline",[4,24],"modifier"),n("inverse",[7,27],"modifier"),n("hidden",[8,28],"modifier"),n("strikethrough",[9,29],"modifier"),n("black",[30,39],"color"),n("red",[31,39],"color"),n("green",[32,39],"color"),n("yellow",[33,39],"color"),n("blue",[34,39],"color"),n("magenta",[35,39],"color"),n("cyan",[36,39],"color"),n("white",[37,39],"color"),n("gray",[90,39],"color"),n("grey",[90,39],"color"),n("bgBlack",[40,49],"bg"),n("bgRed",[41,49],"bg"),n("bgGreen",[42,49],"bg"),n("bgYellow",[43,49],"bg"),n("bgBlue",[44,49],"bg"),n("bgMagenta",[45,49],"bg"),n("bgCyan",[46,49],"bg"),n("bgWhite",[47,49],"bg"),n("blackBright",[90,39],"bright"),n("redBright",[91,39],"bright"),n("greenBright",[92,39],"bright"),n("yellowBright",[93,39],"bright"),n("blueBright",[94,39],"bright"),n("magentaBright",[95,39],"bright"),n("cyanBright",[96,39],"bright"),n("whiteBright",[97,39],"bright"),n("bgBlackBright",[100,49],"bgBright"),n("bgRedBright",[101,49],"bgBright"),n("bgGreenBright",[102,49],"bgBright"),n("bgYellowBright",[103,49],"bgBright"),n("bgBlueBright",[104,49],"bgBright"),n("bgMagentaBright",[105,49],"bgBright"),n("bgCyanBright",[106,49],"bgBright"),n("bgWhiteBright",[107,49],"bgBright"),e.ansiRegex=yp,e.hasColor=e.hasAnsi=s=>(e.ansiRegex.lastIndex=0,typeof s=="string"&&s!==""&&e.ansiRegex.test(s)),e.alias=(s,u)=>{let o=typeof u=="string"?e[u]:u;if(typeof o!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");o.stack||(Reflect.defineProperty(o,"name",{value:s}),e.styles[s]=o,o.stack=[s]),Reflect.defineProperty(e,s,{configurable:!0,enumerable:!0,set(a){e.alias(s,a)},get(){let a=l=>i(l,a.stack);return Reflect.setPrototypeOf(a,e),a.stack=this.stack?this.stack.concat(o.stack):o.stack,a}})},e.theme=s=>{if(!Dp(s))throw new TypeError("Expected theme to be an object");for(let u of Object.keys(s))e.alias(u,s[u]);return e},e.alias("unstyle",s=>typeof s=="string"&&s!==""?(e.ansiRegex.lastIndex=0,s.replace(e.ansiRegex,"")):""),e.alias("noop",s=>s),e.none=e.clear=e.noop,e.stripColor=e.unstyle,e.symbols=qo(),e.define=n,e};mn.exports=No();mn.exports.create=No});var ke=S(J=>{"use strict";var wp=Object.prototype.toString,Ve=Qe(),Po=!1,gn=[],Mo={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};J.longest=(e,t)=>e.reduce((r,i)=>Math.max(r,t?i[t].length:i.length),0);J.hasColor=e=>!!e&&Ve.hasColor(e);var Wr=J.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);J.nativeType=e=>wp.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"");J.isAsyncFn=e=>J.nativeType(e)==="asyncfunction";J.isPrimitive=e=>e!=null&&typeof e!="object"&&typeof e!="function";J.resolve=(e,t,...r)=>typeof t=="function"?t.call(e,...r):t;J.scrollDown=(e=[])=>[...e.slice(1),e[0]];J.scrollUp=(e=[])=>[e.pop(),...e];J.reorder=(e=[])=>{let t=e.slice();return t.sort((r,i)=>r.index>i.index?1:r.index<i.index?-1:0),t};J.swap=(e,t,r)=>{let i=e.length,n=r===i?0:r<0?i-1:r,s=e[t];e[t]=e[n],e[n]=s};J.width=(e,t=80)=>{let r=e&&e.columns?e.columns:t;return e&&typeof e.getWindowSize=="function"&&(r=e.getWindowSize()[0]),process.platform==="win32"?r-1:r};J.height=(e,t=20)=>{let r=e&&e.rows?e.rows:t;return e&&typeof e.getWindowSize=="function"&&(r=e.getWindowSize()[1]),r};J.wordWrap=(e,t={})=>{if(!e)return e;typeof t=="number"&&(t={width:t});let{indent:r="",newline:i=`
`+r,width:n=80}=t,s=(i+r).match(/[^\S\n]/g)||[];n-=s.length;let u=`.{1,${n}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,o=e.trim(),a=new RegExp(u,"g"),l=o.match(a)||[];return l=l.map(c=>c.replace(/\n$/,"")),t.padEnd&&(l=l.map(c=>c.padEnd(n," "))),t.padStart&&(l=l.map(c=>c.padStart(n," "))),r+l.join(i)};J.unmute=e=>{let t=e.stack.find(i=>Ve.keys.color.includes(i));return t?Ve[t]:e.stack.find(i=>i.slice(2)==="bg")?Ve[t.slice(2)]:i=>i};J.pascal=e=>e?e[0].toUpperCase()+e.slice(1):"";J.inverse=e=>{if(!e||!e.stack)return e;let t=e.stack.find(i=>Ve.keys.color.includes(i));if(t){let i=Ve["bg"+J.pascal(t)];return i?i.black:e}let r=e.stack.find(i=>i.slice(0,2)==="bg");return r?Ve[r.slice(2).toLowerCase()]||e:Ve.none};J.complement=e=>{if(!e||!e.stack)return e;let t=e.stack.find(i=>Ve.keys.color.includes(i)),r=e.stack.find(i=>i.slice(0,2)==="bg");if(t&&!r)return Ve[Mo[t]||t];if(r){let i=r.slice(2).toLowerCase(),n=Mo[i];return n&&Ve["bg"+J.pascal(n)]||e}return Ve.none};J.meridiem=e=>{let t=e.getHours(),r=e.getMinutes(),i=t>=12?"pm":"am";t=t%12;let n=t===0?12:t,s=r<10?"0"+r:r;return n+":"+s+" "+i};J.set=(e={},t="",r)=>t.split(".").reduce((i,n,s,u)=>{let o=u.length-1>s?i[n]||{}:r;return!J.isObject(o)&&s<u.length-1&&(o={}),i[n]=o},e);J.get=(e={},t="",r)=>{let i=e[t]==null?t.split(".").reduce((n,s)=>n&&n[s],e):e[t];return i==null?r:i};J.mixin=(e,t)=>{if(!Wr(e))return t;if(!Wr(t))return e;for(let r of Object.keys(t)){let i=Object.getOwnPropertyDescriptor(t,r);if(i.hasOwnProperty("value"))if(e.hasOwnProperty(r)&&Wr(i.value)){let n=Object.getOwnPropertyDescriptor(e,r);Wr(n.value)?e[r]=J.merge({},e[r],t[r]):Reflect.defineProperty(e,r,i)}else Reflect.defineProperty(e,r,i);else Reflect.defineProperty(e,r,i)}return e};J.merge=(...e)=>{let t={};for(let r of e)J.mixin(t,r);return t};J.mixinEmitter=(e,t)=>{let r=t.constructor.prototype;for(let i of Object.keys(r)){let n=r[i];typeof n=="function"?J.define(e,i,n.bind(t)):J.define(e,i,n)}};J.onExit=e=>{let t=(r,i)=>{Po||(Po=!0,gn.forEach(n=>n()),r===!0&&process.exit(128+i))};gn.length===0&&(process.once("SIGTERM",t.bind(null,!0,15)),process.once("SIGINT",t.bind(null,!0,2)),process.once("exit",t)),gn.push(e)};J.define=(e,t,r)=>{Reflect.defineProperty(e,t,{value:r})};J.defineExport=(e,t,r)=>{let i;Reflect.defineProperty(e,t,{enumerable:!0,configurable:!0,set(n){i=n},get(){return i?i():r()}})}});var Ho=S(Kt=>{"use strict";Kt.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"};Kt.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};Kt.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};Kt.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};Kt.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}});var jo=S((ry,$o)=>{"use strict";var zo=require("readline"),bp=Ho(),Cp=/^(?:\x1b)([a-zA-Z0-9])$/,Ap=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,xp={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"d
`)i.name="enter";else if(e===" ")i.name="tab";else if(e==="\b"||e==="\x7F"||e==="\x1B\x7F"||e==="\x1B\b")i.name="backspace",i.meta=e.charAt(0)==="\x1B";else if(e==="\x1B"||e==="\x1B\x1B")i.name="escape",i.meta=e.length===2;else if(e===" "||e==="\x1B ")i.name="space",i.meta=e.length===2;else if(e<="")i.name=String.fromCharCode(e.charCodeAt(0)+97-1),i.ctrl=!0;else if(e.length===1&&e>="0"&&e<="9")i.name="number";else if(e.length===1&&e>="a"&&e<="z")i.name=e;else if(e.length===1&&e>="A"&&e<="Z")i.name=e.toLowerCase(),i.shift=!0;else if(r=Cp.exec(e))i.meta=!0,i.shift=/^[A-Z]$/.test(r[1]);else if(r=Ap.exec(e)){let n=[...e];n[0]==="\x1B"&&n[1]==="\x1B"&&(i.option=!0);let s=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),u=(r[3]||r[5]||1)-1;i.ctrl=!!(u&4),i.meta=!!(u&10),i.shift=!!(u&1),i.code=s,i.name=xp[s],i.shift=Fp(s)||i.shift,i.ctrl=_p(s)||i.ctrl}return i};Kr.listen=(e={},t)=>{let{stdin:r}=e;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let i=zo.createInterface({terminal:!0,input:r});zo.emitKeypressEvents(r,i);let n=(o,a)=>t(o,Kr(o,a),i),s=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",n),i.resume(),()=>{r.isTTY&&r.setRawMode(s),r.removeListener("keypress",n),i.pause(),i.close()}};Kr.action=(e,t,r)=>{let i={...bp,...r};return t.ctrl?(t.action=i.ctrl[t.name],t):t.option&&i.option?(t.action=i.option[t.name],t):t.shift?(t.action=i.shift[t.name],t):(t.action=i.keys[t.name],t)};$o.exports=Kr});var Go=S((iy,Vo)=>{"use strict";Vo.exports=e=>{e.timers=e.timers||{};let t=e.options.timers;if(t)for(let r of Object.keys(t)){let i=t[r];typeof i=="number"&&(i={interval:i}),vp(e,r,i)}};function vp(e,t,r={}){let i=e.timers[t]={name:t,start:Date.now(),ms:0,tick:0},n=r.interval||120;i.frames=r.frames||[],i.loading=!0;let s=setInterval(()=>{i.ms=Date.now()-i.start,i.tick++,e.render()},n);return i.stop=()=>{i.loading=!1,clearInterval(s)},Reflect.defineProperty(i,"interval",{value:s}),e.once("close",()=>i.stop()),i.stop}});var Wo=S((ny,Uo)=>{"use strict";var{define:Sp,width:kp}=ke(),Dn=class{constructor(t){let r=t.options;Sp(this,"_prompt",t),this.type=t.type,this.name=t.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=kp(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=t.symbols,this.styles=t.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let t={...this};return t.status=this.status,t.buffer=Buffer.from(t.buffer),delete t.clone,t}set color(t){this._color=t}get color(){let t=this.prompt.styles;if(this.cancelled)return t.cancelled;if(this.submitted)return t.submitted;let r=this._color||t[this.status];return typeof r=="function"?r:t.pending}set loading(t){this._loading=t}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};Uo.exports=Dn});var Yo=S((sy,Ko)=>{"use strict";var yn=ke(),_e=Qe(),En={default:_e.noop,noop:_e.noop,set inverse(e){this._inverse=e},get inverse(){return this._inverse||yn.inverse(this.primary)},set complement(e){this._complement=e},get complement(){return this._complement||yn.complement(this.primary)},primary:_e.cyan,success:_e.green,danger:_e.magenta,strong:_e.bold,warning:_e.yellow,muted:_e.dim,disabled:_e.gray,dark:_e.dim.gray,underline:_e.underline,set info(e){this._info=e},get info(){return this._info||this.primary},set em(e){this._em=e},get em(){return this._em||this.primary.underline},set heading(e){this._heading=e},get heading(){return this._heading||this.muted.underline},set pending(e){this._pending=e},get pending(){return this._pending||this.primary},set submitted(e){this._submitted=e},get submitted(){return this._submitted||this.success},set cancelled(e){this._cancelled=e},get cancelled(){return this._cancelled||this.danger},set typing(e){this._typing=e},get typing(){return this._typing||this.dim},set plac
`),l=a[0],c=a[a.length-1],f=(i+(r?" "+r:"")).length,p=f<l.length?l.slice(f+1):"";return{header:u,prompt:l,after:p,rest:a.slice(1),last:c}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let t=this.state.error||await this.validate(this.value,this.state);if(t!==!0){let r=`
`+this.symbols.pointer+" ";typeof t=="string"?r+=t.trim():r+="Invalid input",this.state.error=`
`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(t){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel=="function"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(t))}async close(){this.state.closed=!0;try{let t=this.sections(),r=Math.ceil(t.prompt.length/this.width);t.rest&&this.write(Tt.cursor.down(t.rest.length)),this.write(`
`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=Fn.listen(this,this.keypress.bind(this)),this.once("close",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip=="function"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:t,options:r,result:i}=this;if(this.format=()=>t.call(this,this.value),this.result=()=>i.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let n=r.onSubmit.bind(this),s=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await n(this.name,this.value,this),s())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(t,r)=>{if(this.once("submit",t),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(t,r,i){let{options:n,state:s,symbols:u,timers:o}=this,a=o&&o[t];s.timer=a;let l=n[t]||s[t]||u[t],c=r&&r[t]!=null?r[t]:await l;if(c==="")return c;let h=await this.resolve(c,s,r,i);return!h&&r&&r[t]?this.resolve(l,s,r,i):h}async prefix(){let t=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,i=this.state;return i.timer=r,qe.isObject(t)&&(t=t[i.status]||t.pending),qe.hasColor(t)?t:(this.styles[i.status]||this.styles.pending)(t)}async message(){let t=await this.element("message");return qe.hasColor(t)?t:this.styles.strong(t)}async separator(){let t=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,i=this.state;i.timer=r;let n=t[i.status]||t.pending||i.separator,s=await this.resolve(n,i);return qe.isObject(s)&&(s=s[i.status]||s.pending),qe.hasColor(s)?s:this.styles.muted(s)}async pointer(t,r){let i=await this.element("pointer",t,r);if(typeof i=="string"&&qe.hasColor(i))return i;if(i){let n=this.styles,s=this.index===r,u=s?n.primary:l=>l,o=await this.resolve(i[s?"on":"off"]||i,this.state),a=qe.hasColor(o)?o:u(o);return s?a:" ".repeat(o.length)}}async indicator(t,r){let i=await this.element("indicator",t,r);if(typeof i=="string"&&qe.hasColor(i))return i;if(i){let n=this.styles,s=t.enabled===!0,u=s?n.success:n.dark,o=i[s?"on":"off"]||i;return qe.hasColor(o)?o:u(o)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let t=await this.element("hint");return qe.hasColor(t)?t:this.styles.muted(t)}}error(t){return this.state.submitted?"":t||this.state.error}format(t){return t}result(t){return t}validate(t){return this.options.required===!0?this.isValue(t):!0}isValue(t){return t!=null&&t!==""}resolve(t,...r){return qe.resolve(this,t,...r)}get base(){return e.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||qe.height(this.stdout,25)}get width(){return this.options.columns||qe.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(t){this.state.cursor=t}get cursor(){return this.state.cursor}set input(t){this.state.input=t}get input(){return this.state.input}set value(t){this.state.value=t}get value(){let{input:t,value:r}=this.state,i=[r,t].find(this.isValue.bind(this));return this.isValue(i)?i:this.initial}static get prompt(){return t=>new this(t).run()}};function Mp(e){let t=n=>e[n]===void 0||typeof e[n]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],i=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let n of Object.keys(e.options)){if(r.includes(n)||/^on[A-Z]/.test(n))continue;let s=e.options[n];typeof s=="function"&&t(n)?i.includes(n)||(e[n]=s.bind(e)):typeof e[n]!="function"&&(e[n]=s)}}function Hp(e){type
`:" ",i=[];for(let n=0;n<4;n++){let s=r(n);t[n]?i.push(s.repeat(t[n])):i.push("")}return i}ua.exports=_n});var la=S((ly,aa)=>{"use strict";var zp=ke(),oa={default(e,t){return t},checkbox(e,t){throw new Error("checkbox role is not implemented yet")},editable(e,t){throw new Error("editable role is not implemented yet")},expandable(e,t){throw new Error("expandable role is not implemented yet")},heading(e,t){return t.disabled="",t.indicator=[t.indicator," "].find(r=>r!=null),t.message=t.message||"",t},input(e,t){throw new Error("input role is not implemented yet")},option(e,t){return oa.default(e,t)},radio(e,t){throw new Error("radio role is not implemented yet")},separator(e,t){return t.disabled="",t.indicator=[t.indicator," "].find(r=>r!=null),t.message=t.message||e.symbols.line.repeat(5),t},spacer(e,t){return t}};aa.exports=(e,t={})=>{let r=zp.merge({},oa,t.roles);return r[e]||r.default}});var dr=S((cy,fa)=>{"use strict";var $p=Qe(),jp=Yt(),Vp=la(),Yr=ke(),{reorder:vn,scrollUp:Gp,scrollDown:Up,isObject:ca,swap:Wp}=Yr,Sn=class extends jp{constructor(t){super(t),this.cursorHide(),this.maxSelected=t.maxSelected||1/0,this.multiple=t.multiple||!1,this.initial=t.initial||0,this.delay=t.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:t,initial:r,autofocus:i,suggest:n}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(t)),this.choices.forEach(s=>s.enabled=!1),typeof n!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");ca(r)&&(r=Object.keys(r)),Array.isArray(r)?(i!=null&&(this.index=this.findIndex(i)),r.forEach(s=>this.enable(this.find(s))),await this.render()):(i!=null&&(r=i),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(t,r){this.state.loadingChoices=!0;let i=[],n=0,s=async(u,o)=>{typeof u=="function"&&(u=await u.call(this)),u instanceof Promise&&(u=await u);for(let a=0;a<u.length;a++){let l=u[a]=await this.toChoice(u[a],n++,o);i.push(l),l.choices&&await s(l.choices,l)}return i};return s(t,r).then(u=>(this.state.loadingChoices=!1,u))}async toChoice(t,r,i){if(typeof t=="function"&&(t=await t.call(this,this)),t instanceof Promise&&(t=await t),typeof t=="string"&&(t={name:t}),t.normalized)return t;t.normalized=!0;let n=t.value;if(t=Vp(t.role,this.options)(this,t),typeof t.disabled=="string"&&!t.hint&&(t.hint=t.disabled,t.disabled=!0),t.disabled===!0&&t.hint==null&&(t.hint="(disabled)"),t.index!=null)return t;t.name=t.name||t.key||t.title||t.value||t.message,t.message=t.message||t.name||"",t.value=[t.value,t.name].find(this.isValue.bind(this)),t.input="",t.index=r,t.cursor=0,Yr.define(t,"parent",i),t.level=i?i.level+1:1,t.indent==null&&(t.indent=i?i.indent+" ":t.indent||""),t.path=i?i.path+"."+t.name:t.name,t.enabled=!!(this.multiple&&!this.isDisabled(t)&&(t.enabled||this.isSelected(t))),this.isDisabled(t)||(this.longest=Math.max(this.longest,$p.unstyle(t.message).length));let u={...t};return t.reset=(o=u.input,a=u.value)=>{for(let l of Object.keys(u))t[l]=u[l];t.input=o,t.value=a},n==null&&typeof t.initial=="function"&&(t.input=await t.initial.call(this,this.state,t,r)),t}async onChoice(t,r){this.emit("choice",t,r,this),typeof t.onChoice=="function"&&await t.onChoice.call(this,this.state,t,r)}async addChoice(t,r,i){let n=await this.toChoice(t,r,i);return this.choices.push(n),this.index=this.choices.length-1,this.limit=this.choices.length,n}async newItem(t,r,i){let n={name:"New choice name?",editable:!0,newChoice:!0,...t},s=await this.addChoice(n,r,i);return s.updateChoice=()=>{delete s.newChoice,s.name=s.message=s.input,s.input="",s.cursor=0},this.render()}indent(t){return t.indent==null?t.level>1?" ".repeat(t.level-1):"":t.indent}dispatch(t,r){if(this.multiple&&this[r.name]
`),n;return this.options.choicesHeader&&(n=await this.resolve(this.options.choicesHeader,this.state)),[n,i].filter(Boolean).join(`
`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(t=>this.styles.primary(t.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:t,size:r}=this.state,i="",n=await this.header(),s=await this.prefix(),u=await this.separator(),o=await this.message();this.options.promptLine!==!1&&(i=[s,o,u,""].join(" "),this.state.prompt=i);let a=await this.format(),l=await this.error()||await this.hint(),c=await this.renderChoices(),h=await this.footer();a&&(i+=a),l&&!i.includes(l)&&(i+=" "+l),t&&!a&&!c.trim()&&this.multiple&&this.emptyError!=null&&(i+=this.styles.danger(this.emptyError)),this.clear(r),this.write([n,i,c,h].filter(Boolean).join(`
`)),this.write(this.margin[2]),this.restore()}};pa.exports=Bn});var ma=S((fy,da)=>{"use strict";var Yp=yt(),Qp=(e,t)=>{let r=e.toLowerCase();return i=>{let s=i.toLowerCase().indexOf(r),u=t(i.slice(s,s+r.length));return s>=0?i.slice(0,s)+u+i.slice(s+r.length):i}},Rn=class extends Yp{constructor(t){super(t),this.cursorShow()}moveCursor(t){this.state.cursor+=t}dispatch(t){return this.append(t)}space(t){return this.options.multiple?super.space(t):this.append(t)}append(t){let{cursor:r,input:i}=this.state;return this.input=i.slice(0,r)+t+i.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:t,input:r}=this.state;return r?(this.input=r.slice(0,t-1)+r.slice(t),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:t,input:r}=this.state;return r[t]===void 0?this.alert():(this.input=`${r}`.slice(0,t)+`${r}`.slice(t+1),this.complete())}number(t){return this.append(t)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(t=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,t,r);let i=t.toLowerCase();return r.filter(n=>n.message.toLowerCase().includes(i))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(t=>this.styles.primary(t.message)).join(", ");if(this.state.submitted){let t=this.value=this.input=this.focused.value;return this.styles.primary(t)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let t=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=Qp(this.input,t),i=this.choices;this.choices=i.map(n=>({...n,message:r(n.message)})),await super.render(),this.choices=i}submit(){return this.options.multiple&&(this.value=this.selected.map(t=>t.name)),super.submit()}};da.exports=Rn});var Tn=S((py,ga)=>{"use strict";var Ln=ke();ga.exports=(e,t={})=>{e.cursorHide();let{input:r="",initial:i="",pos:n,showCursor:s=!0,color:u}=t,o=u||e.styles.placeholder,a=Ln.inverse(e.styles.primary),l=D=>a(e.styles.black(D)),c=r,h=" ",f=l(h);if(e.blink&&e.blink.off===!0&&(l=D=>D,f=""),s&&n===0&&i===""&&r==="")return l(h);if(s&&n===0&&(r===i||r===""))return l(i[0])+o(i.slice(1));i=Ln.isPrimitive(i)?`${i}`:"",r=Ln.isPrimitive(r)?`${r}`:"";let p=i&&i.startsWith(r)&&i!==r,y=p?l(i[r.length]):f;if(n!==r.length&&s===!0&&(c=r.slice(0,n)+l(r[n])+r.slice(n+1),y=""),s===!1&&(y=""),p){let D=e.styles.unstyle(c+y);return c+y+o(i.slice(D.length))}return c+y}});var Qr=S((dy,Da)=>{"use strict";var Zp=Qe(),Xp=yt(),Jp=Tn(),In=class extends Xp{constructor(t){super({...t,multiple:!0}),this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(t){return await super.reset(),t===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(t){return!!t&&this.append(t)}append(t){let r=this.focused;if(!r)return this.alert();let{cursor:i,input:n}=r;return r.value=r.input=n.slice(0,i)+t+n.slice(i),r.cursor++,this.render()}delete(){let t=this.focused;if(!t||t.cursor<=0)return this.alert();let{cursor:r,input:i}=t;return t.value=t.input=i.slice(0,r-1)+i.slice(r),t.cursor--,this.render()}deleteForward(){let t=this.focused;if(!t)return this.alert();let{cursor:r,input:i}=t;if(i[r]===void 0)return this.alert();let n=`${i}`.slice(0,r)+`${i}`.slice(r+1);return t.value=t.input=n,this.render()}right(){let t=this.focused;return t?t.cursor>=t.input.length?this.alert():(t.cursor++,this.render()):this.alert()}left(){let t=this.focused;return t?t.cursor<=0?this.alert():(t.cursor--,this.render()):this.alert()}space(t,r){return this.dispatch(t,r)}number(t,r){return this.dispatch(t,r)}next(){let t=this.focused;if(!t)return this.alert();let{initial:r,input:i}=t;return r&&r.startsWith(i)&&i!==r?(t.value=t.inp
`)),this.restore()}set value(t){super.value=t}get value(){return this.cast(super.value)}};Aa.exports=qn});var Fa=S((yy,xa)=>{"use strict";var od=Zr(),Nn=class extends od{constructor(t){super(t),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};xa.exports=Nn});var va=S((Ey,_a)=>{"use strict";var ad=yt(),ld=Qr(),Qt=ld.prototype,Pn=class extends ad{constructor(t){super({...t,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(t,r){let i=this.focused,n=i.parent||{};return!i.editable&&!n.editable&&(t==="a"||t==="i")?super[t]():Qt.dispatch.call(this,t,r)}append(t,r){return Qt.append.call(this,t,r)}delete(t,r){return Qt.delete.call(this,t,r)}space(t){return this.focused.editable?this.append(t):super.space()}number(t){return this.focused.editable?this.append(t):super.number(t)}next(){return this.focused.editable?Qt.next.call(this):super.next()}prev(){return this.focused.editable?Qt.prev.call(this):super.prev()}async indicator(t,r){let i=t.indicator||"",n=t.editable?i:super.indicator(t,r);return await this.resolve(n,this.state,t,r)||""}indent(t){return t.role==="heading"?"":t.editable?" ":" "}async renderChoice(t,r){return t.indent="",t.editable?Qt.renderChoice.call(this,t,r):super.renderChoice(t,r)}error(){return""}footer(){return this.state.error}async validate(){let t=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let i=r.parent?this.value[r.parent.name]:this.value;if(r.editable?i=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(i=r.enabled===!0),t=await r.validate(i,this.state),t!==!0)break}return t!==!0&&(this.state.error=typeof t=="string"?t:"Invalid Input"),t}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(t=>t.newChoice))return this.alert();this.value={};for(let t of this.choices){let r=t.parent?this.value[t.parent.name]:this.value;if(t.role==="heading"){this.value[t.name]={};continue}t.editable?r[t.name]=t.value===t.name?t.initial||"":t.value:this.isDisabled(t)||(r[t.name]=t.enabled===!0)}return this.base.submit.call(this)}};_a.exports=Pn});var It=S((wy,Sa)=>{"use strict";var cd=Yt(),hd=Tn(),{isPrimitive:fd}=ke(),Mn=class extends cd{constructor(t){super(t),this.initial=fd(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(t,r={}){let i=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!i||i.name!=="return")?this.append(`
`,r):super.keypress(t,r)}moveCursor(t){this.cursor+=t}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(t,r){if(!t||r.ctrl||r.code)return this.alert();this.append(t)}append(t){let{cursor:r,input:i}=this.state;this.input=`${i}`.slice(0,r)+t+`${i}`.slice(r),this.moveCursor(String(t).length),this.render()}insert(t){this.append(t)}delete(){let{cursor:t,input:r}=this.state;if(t<=0)return this.alert();this.input=`${r}`.slice(0,t-1)+`${r}`.slice(t),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:t,input:r}=this.state;if(r[t]===void 0)return this.alert();this.input=`${r}`.slice(0,t)+`${r}`.slice(t+1),this.render()}cutForward(){let t=this.cursor;if(this.input.length<=t)return this.alert();this.state.clipboard.push(this.input.slice(t)),this.input=this.input.slice(0,t),this.render()}cutLeft(){let t=this.cursor;if(t===0)return this.alert();let r=this.input.slice(0,t),i=this.input.slice(t),n=r.split(" ");this.state.clipboard.push(n.pop()),this.input=n.join(" "),this.cursor=this.input.length,this.input+=i,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let t=this.initial!=null?String(this.initial):"";if(!t||!t.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(t){return!!t}async format(t=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(t||r):hd(this,{input:t,initial:r,pos:this.cursor})}async render(){let t=this.state.size,r=await this.prefix(),i=await this.separator(),n=await this.message(),s=[r,n,i].filter(Boolean).join(" ");this.state.prompt=s;let u=await this.header(),o=await this.format(),a=await this.error()||await this.hint(),l=await this.footer();a&&!o.includes(a)&&(o+=" "+a),s+=" "+o,this.clear(t),this.write([u,s,l].filter(Boolean).join(`
`)),this.restore()}};Sa.exports=Mn});var Ba=S((by,ka)=>{"use strict";var pd=e=>e.filter((t,r)=>e.lastIndexOf(t)===r),Xr=e=>pd(e).filter(Boolean);ka.exports=(e,t={},r="")=>{let{past:i=[],present:n=""}=t,s,u;switch(e){case"prev":case"undo":return s=i.slice(0,i.length-1),u=i[i.length-1]||"",{past:Xr([r,...s]),present:u};case"next":case"redo":return s=i.slice(1),u=i[0]||"",{past:Xr([...s,r]),present:u};case"save":return{past:Xr([...i,r]),present:""};case"remove":return u=Xr(i.filter(o=>o!==r)),n="",u.length&&(n=u.pop()),{past:u,present:n};default:throw new Error(`Invalid action: "${e}"`)}}});var zn=S((Cy,La)=>{"use strict";var dd=It(),Ra=Ba(),Hn=class extends dd{constructor(t){super(t);let r=this.options.history;if(r&&r.store){let i=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:i},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(t){return this.store?(this.data=Ra(t,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){this.store&&(this.data=Ra("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};La.exports=Hn});var Ia=S((Ay,Ta)=>{"use strict";var md=It(),$n=class extends md{format(){return""}};Ta.exports=$n});var qa=S((xy,Oa)=>{"use strict";var gd=It(),jn=class extends gd{constructor(t={}){super(t),this.sep=this.options.separator||/, */,this.initial=t.initial||""}split(t=this.value){return t?String(t).split(this.sep):[]}format(){let t=this.state.submitted?this.styles.primary:r=>r;return this.list.map(t).join(", ")}async submit(t){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};Oa.exports=jn});var Pa=S((Fy,Na)=>{"use strict";var Dd=yt(),Vn=class extends Dd{constructor(t){super({...t,multiple:!0})}};Na.exports=Vn});var Un=S((_y,Ma)=>{"use strict";var yd=It(),Gn=class extends yd{constructor(t={}){super({style:"number",...t}),this.min=this.isValue(t.min)?this.toNumber(t.min):-1/0,this.max=this.isValue(t.max)?this.toNumber(t.max):1/0,this.delay=t.delay!=null?t.delay:1e3,this.float=t.float!==!1,this.round=t.round===!0||t.float===!1,this.major=t.major||10,this.minor=t.minor||1,this.initial=t.initial!=null?t.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(t){return!/[-+.]/.test(t)||t==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(t)}number(t){return super.append(t)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(t){let r=t||this.minor,i=this.toNumber(this.input);return i>this.max+r?this.alert():(this.input=`${i+r}`,this.render())}down(t){let r=t||this.minor,i=this.toNumber(this.input);return i<this.min-r?this.alert():(this.input=`${i-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(t=this.input){return typeof this.options.format=="function"?this.options.format.call(this,t):this.styles.info(t)}toNumber(t=""){return this.float?+t:Math.round(+t)}isValue(t){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(t)}submit(){let t=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(t||0),super.submit()}};Ma.exports=Gn});var za=S((vy,Ha)=>{Ha.exports=Un()});var ja=S((Sy,$a)=>{"use strict";var Ed=It(),Wn=class extends Ed{constructor(t){super(t),this.cursorShow()}format(t=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(t.length)):""}};$a.exports=Wn});var Ua=S((ky,Ga)=>{"use strict";var wd=Qe(),bd=dr(),Va=ke(),Kn=class extends bd{constr
`;let r=t.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((i,n)=>({name:n+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let t=0;for(let r of this.choices){t=Math.max(t,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let i=0;i<this.scale.length;i++)r.scale.push({index:i})}this.widths[0]=Math.min(this.widths[0],t+3)}async dispatch(t,r){if(this.multiple)return this[r.name]?await this[r.name](t,r):await super.dispatch(t,r);this.alert()}heading(t,r,i){return this.styles.strong(t)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let t=this.focused;return t.scaleIndex>=this.scale.length-1?this.alert():(t.scaleIndex++,this.render())}left(){let t=this.focused;return t.scaleIndex<=0?this.alert():(t.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){return this.scaleKey===!1||this.state.submitted?"":["",...this.scale.map(i=>` ${i.name} - ${i.message}`)].map(i=>this.styles.muted(i)).join(`
`)}renderScaleHeading(t){let r=this.scale.map(a=>a.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,t));let i=this.scaleLength-r.join("").length,n=Math.round(i/(r.length-1)),u=r.map(a=>this.styles.strong(a)).join(" ".repeat(n)),o=" ".repeat(this.widths[0]);return this.margin[3]+o+this.margin[1]+u}scaleIndicator(t,r,i){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,t,r,i);let n=t.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):n?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(t,r){let i=t.scale.map(s=>this.scaleIndicator(t,s,r)),n=this.term==="Hyper"?"":" ";return i.join(n+this.symbols.line.repeat(this.edgeLength))}async renderChoice(t,r){await this.onChoice(t,r);let i=this.index===r,n=await this.pointer(t,r),s=await t.hint;s&&!Va.hasColor(s)&&(s=this.styles.muted(s));let u=y=>this.margin[3]+y.replace(/\s+$/,"").padEnd(this.widths[0]," "),o=this.newline,a=this.indent(t),l=await this.resolve(t.message,this.state,t,r),c=await this.renderScale(t,r),h=this.margin[1]+this.margin[3];this.scaleLength=wd.unstyle(c).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-h.length);let p=Va.wordWrap(l,{width:this.widths[0],newline:o}).split(`
`).map(y=>u(y)+this.margin[1]);return i&&(c=this.styles.info(c),p=p.map(y=>this.styles.info(y))),p[0]+=c,this.linebreak&&p.push(""),[a+n,p.join(`
`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let t=this.visible.map(async(n,s)=>await this.renderChoice(n,s)),r=await Promise.all(t),i=await this.renderScaleHeading();return this.margin[0]+[i,...r.map(n=>n.join(" "))].join(`
`)}async render(){let{submitted:t,size:r}=this.state,i=await this.prefix(),n=await this.separator(),s=await this.message(),u="";this.options.promptLine!==!1&&(u=[i,s,n,""].join(" "),this.state.prompt=u);let o=await this.header(),a=await this.format(),l=await this.renderScaleKey(),c=await this.error()||await this.hint(),h=await this.renderChoices(),f=await this.footer(),p=this.emptyError;a&&(u+=a),c&&!u.includes(c)&&(u+=" "+c),t&&!a&&!h.trim()&&this.multiple&&p!=null&&(u+=this.styles.danger(p)),this.clear(r),this.write([o,u,l,h,f].filter(Boolean).join(`
`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let t of this.choices)this.value[t.name]=t.scaleIndex;return this.base.submit.call(this)}};Ga.exports=Kn});var Ya=S((By,Ka)=>{"use strict";var Wa=Qe(),Cd=(e="")=>typeof e=="string"?e.replace(/^['"]|['"]$/g,""):"",Qn=class{constructor(t){this.name=t.key,this.field=t.field||{},this.value=Cd(t.initial||this.field.initial||""),this.message=t.message||this.name,this.cursor=0,this.input="",this.lines=[]}},Ad=async(e={},t={},r=i=>i)=>{let i=new Set,n=e.fields||[],s=e.template,u=[],o=[],a=[],l=1;typeof s=="function"&&(s=await s());let c=-1,h=()=>s[++c],f=()=>s[c+1],p=y=>{y.line=l,u.push(y)};for(p({type:"bos",value:""});c<s.length-1;){let y=h();if(/^[^\S\n ]$/.test(y)){p({type:"text",value:y});continue}if(y===`
`){p({type:"newline",value:y}),l++;continue}if(y==="\\"){y+=h(),p({type:"text",value:y});continue}if((y==="$"||y==="#"||y==="{")&&f()==="{"){let v=h();y+=v;let g={type:"template",open:y,inner:"",close:"",value:y},_;for(;_=h();){if(_==="}"){f()==="}"&&(_+=h()),g.value+=_,g.close=_;break}_===":"?(g.initial="",g.key=g.inner):g.initial!==void 0&&(g.initial+=_),g.value+=_,g.inner+=_}g.template=g.open+(g.initial||g.inner)+g.close,g.key=g.key||g.inner,t.hasOwnProperty(g.key)&&(g.initial=t[g.key]),g=r(g),p(g),a.push(g.key),i.add(g.key);let w=o.find(B=>B.name===g.key);g.field=n.find(B=>B.name===g.key),w||(w=new Qn(g),o.push(w)),w.lines.push(g.line-1);continue}let D=u[u.length-1];D.type==="text"&&D.line===l?D.value+=y:p({type:"text",value:y})}return p({type:"eos",value:""}),{input:s,tabstops:u,unique:i,keys:a,items:o}};Ka.exports=async e=>{let t=e.options,r=new Set(t.required===!0?[]:t.required||[]),i={...t.values,...t.initial},{tabstops:n,items:s,keys:u}=await Ad(t,i),o=Yn("result",e,t),a=Yn("format",e,t),l=Yn("validate",e,t,!0),c=e.isValue.bind(e);return async(h={},f=!1)=>{let p=0;h.required=r,h.items=s,h.keys=u,h.output="";let y=async(_,w,B,O)=>{let C=await l(_,w,B,O);return C===!1?"Invalid field "+B.name:C};for(let _ of n){let w=_.value,B=_.key;if(_.type!=="template"){w&&(h.output+=w);continue}if(_.type==="template"){let O=s.find(z=>z.name===B);t.required===!0&&h.required.add(O.name);let C=[O.input,h.values[O.value],O.value,w].find(c),I=(O.field||{}).message||_.inner;if(f){let z=await y(h.values[B],h,O,p);if(z&&typeof z=="string"||z===!1){h.invalid.set(B,z);continue}h.invalid.delete(B);let A=await o(h.values[B],h,O,p);h.output+=Wa.unstyle(A);continue}O.placeholder=!1;let N=w;w=await a(w,h,O,p),C!==w?(h.values[B]=C,w=e.styles.typing(C),h.missing.delete(I)):(h.values[B]=void 0,C=`<${I}>`,w=e.styles.primary(C),O.placeholder=!0,h.required.has(B)&&h.missing.add(I)),h.missing.has(I)&&h.validating&&(w=e.styles.warning(C)),h.invalid.has(B)&&h.validating&&(w=e.styles.danger(C)),p===h.index&&(N!==w?w=e.styles.underline(w):w=e.styles.heading(Wa.unstyle(w))),p++}w&&(h.output+=w)}let D=h.output.split(`
`).map(_=>" "+_),v=s.length,g=0;for(let _ of s)h.invalid.has(_.name)&&_.lines.forEach(w=>{D[w][0]===" "&&(D[w]=h.styles.danger(h.symbols.bullet)+D[w].slice(1))}),e.isValue(h.values[_.name])&&g++;return h.completed=(g/v*100).toFixed(0),h.output=D.join(`
`),h.output}};function Yn(e,t,r,i){return(n,s,u,o)=>typeof u.field[e]=="function"?u.field[e].call(t,n,s,u,o):[i,n].find(a=>t.isValue(a))}});var Za=S((Ry,Qa)=>{"use strict";var xd=Qe(),Fd=Ya(),_d=Yt(),Zn=class extends _d{constructor(t){super(t),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await Fd(this),await super.initialize()}async reset(t){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},t!==!0&&(await this.initialize(),await this.render())}moveCursor(t){let r=this.getItem();this.cursor+=t,r.cursor+=t}dispatch(t,r){if(!r.code&&!r.ctrl&&t!=null&&this.getItem()){this.append(t,r);return}this.alert()}append(t,r){let i=this.getItem(),n=i.input.slice(0,this.cursor),s=i.input.slice(this.cursor);this.input=i.input=`${n}${t}${s}`,this.moveCursor(1),this.render()}delete(){let t=this.getItem();if(this.cursor<=0||!t.input)return this.alert();let r=t.input.slice(this.cursor),i=t.input.slice(0,this.cursor-1);this.input=t.input=`${i}${r}`,this.moveCursor(-1),this.render()}increment(t){return t>=this.state.keys.length-1?0:t+1}decrement(t){return t<=0?this.state.keys.length-1:t-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(t){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:t,keys:r=[],submitted:i,size:n}=this.state,s=[this.options.newline,`
`].find(_=>_!=null),u=await this.prefix(),o=await this.separator(),a=await this.message(),l=[u,a,o].filter(Boolean).join(" ");this.state.prompt=l;let c=await this.header(),h=await this.error()||"",f=await this.hint()||"",p=i?"":await this.interpolate(this.state),y=this.state.key=r[t]||"",D=await this.format(y),v=await this.footer();D&&(l+=" "+D),f&&!D&&this.state.completed===0&&(l+=" "+f),this.clear(n);let g=[c,l,p,v,h.trim()];this.write(g.filter(Boolean).join(s)),this.restore()}getItem(t){let{items:r,keys:i,index:n}=this.state,s=r.find(u=>u.name===i[n]);return s&&s.input!=null&&(this.input=s.input,this.cursor=s.cursor),s}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:t,missing:r,output:i,values:n}=this.state;if(t.size){let o="";for(let[a,l]of t)o+=`Invalid ${a}: ${l}
`;return this.state.error=o,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let u=xd.unstyle(i).split(`
`).map(o=>o.slice(1)).join(`
`);return this.value={values:n,result:u},super.submit()}};Qa.exports=Zn});var Ja=S((Ly,Xa)=>{"use strict";var vd="(Use <shift>+<up/down> to sort)",Sd=yt(),Xn=class extends Sd{constructor(t){super({...t,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,vd].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(t,r){let i=await super.renderChoice(t,r),n=this.symbols.identicalTo+" ",s=this.index===r&&this.sorting?this.styles.muted(n):" ";return this.options.drag===!1&&(s=""),this.options.numbered===!0?s+`${r+1} - `+i:s+i}get selected(){return this.choices}submit(){return this.value=this.choices.map(t=>t.value),super.submit()}};Xa.exports=Xn});var tl=S((Ty,el)=>{"use strict";var kd=dr(),Jn=class extends kd{constructor(t={}){if(super(t),this.emptyError=t.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(i=>this.styles.muted(i)),this.state.header=r.join(`
`)}}async toChoices(...t){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...t);for(let i of r)i.scale=Bd(5,this.options),i.scaleIdx=2;return r}dispatch(){this.alert()}space(){let t=this.focused,r=t.scale[t.scaleIdx],i=r.selected;return t.scale.forEach(n=>n.selected=!1),r.selected=!i,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let t=this.focused;return t.scaleIdx>=t.scale.length-1?this.alert():(t.scaleIdx++,this.render())}left(){let t=this.focused;return t.scaleIdx<=0?this.alert():(t.scaleIdx--,this.render())}indent(){return" "}async renderChoice(t,r){await this.onChoice(t,r);let i=this.index===r,n=this.term==="Hyper",s=n?9:8,u=n?"":" ",o=this.symbols.line.repeat(s),a=" ".repeat(s+(n?0:1)),l=w=>(w?this.styles.success("\u25C9"):"\u25EF")+u,c=r+1+".",h=i?this.styles.heading:this.styles.noop,f=await this.resolve(t.message,this.state,t,r),p=this.indent(t),y=p+t.scale.map((w,B)=>l(B===t.scaleIdx)).join(o),D=w=>w===t.scaleIdx?h(w):w,v=p+t.scale.map((w,B)=>D(B)).join(a),g=()=>[c,f].filter(Boolean).join(" "),_=()=>[g(),y,v," "].filter(Boolean).join(`
`);return i&&(y=this.styles.cyan(y),v=this.styles.cyan(v)),_()}async renderChoices(){if(this.state.submitted)return"";let t=this.visible.map(async(i,n)=>await this.renderChoice(i,n)),r=await Promise.all(t);return r.length||r.push(this.styles.danger("No matching choices")),r.join(`
`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:t,size:r}=this.state,i=await this.prefix(),n=await this.separator(),s=await this.message(),u=[i,s,n].filter(Boolean).join(" ");this.state.prompt=u;let o=await this.header(),a=await this.format(),l=await this.error()||await this.hint(),c=await this.renderChoices(),h=await this.footer();(a||!l)&&(u+=" "+a),l&&!u.includes(l)&&(u+=" "+l),t&&!a&&!c&&this.multiple&&this.type!=="form"&&(u+=this.styles.danger(this.emptyError)),this.clear(r),this.write([u,o,c,h].filter(Boolean).join(`
`)),this.restore()}submit(){this.value={};for(let t of this.choices)this.value[t.name]=t.scaleIdx;return this.base.submit.call(this)}};function Bd(e,t={}){if(Array.isArray(t.scale))return t.scale.map(i=>({...i}));let r=[];for(let i=1;i<e+1;i++)r.push({i,selected:!1});return r}el.exports=Jn});var il=S((Iy,rl)=>{rl.exports=zn()});var sl=S((Oy,nl)=>{"use strict";var Rd=Zr(),es=class extends Rd{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(t="",r){switch(t.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let t=i=>this.styles.primary.underline(i);return[this.value?this.disabled:t(this.disabled),this.value?t(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:t}=this.state,r=await this.header(),i=await this.prefix(),n=await this.separator(),s=await this.message(),u=await this.format(),o=await this.error()||await this.hint(),a=await this.footer(),l=[i,s,n,u].join(" ");this.state.prompt=l,o&&!l.includes(o)&&(l+=" "+o),this.clear(t),this.write([r,l,a].filter(Boolean).join(`
`)),this.write(this.margin[2]),this.restore()}};nl.exports=es});var ol=S((qy,ul)=>{"use strict";var Ld=yt(),ts=class extends Ld{constructor(t){if(super(t),typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(t,r){let i=await super.toChoices(t,r);if(i.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>i.length)throw new Error("Please specify the index of the correct answer from the list of choices");return i}check(t){return t.index===this.options.correctChoice}async result(t){return{selectedAnswer:t,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};ul.exports=ts});var ll=S(rs=>{"use strict";var al=ke(),De=(e,t)=>{al.defineExport(rs,e,t),al.defineExport(rs,e.toLowerCase(),t)};De("AutoComplete",()=>ma());De("BasicAuth",()=>Ca());De("Confirm",()=>Fa());De("Editable",()=>va());De("Form",()=>Qr());De("Input",()=>zn());De("Invisible",()=>Ia());De("List",()=>qa());De("MultiSelect",()=>Pa());De("Numeral",()=>za());De("Password",()=>ja());De("Scale",()=>Ua());De("Select",()=>yt());De("Snippet",()=>Za());De("Sort",()=>Ja());De("Survey",()=>tl());De("Text",()=>il());De("Toggle",()=>sl());De("Quiz",()=>ol())});var hl=S((Py,cl)=>{cl.exports={ArrayPrompt:dr(),AuthPrompt:On(),BooleanPrompt:Zr(),NumberPrompt:Un(),StringPrompt:It()}});var dl=S((My,pl)=>{"use strict";var fl=require("assert"),ns=require("events"),Et=ke(),Xe=class extends ns{constructor(t,r){super(),this.options=Et.merge({},t),this.answers={...r}}register(t,r){if(Et.isObject(t)){for(let n of Object.keys(t))this.register(n,t[n]);return this}fl.equal(typeof r,"function","expected a function");let i=t.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[i]=r:this.prompts[i]=r(this.Prompt,this),this}async prompt(t=[]){for(let r of[].concat(t))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(Et.merge({},this.options,r))}catch(i){return Promise.reject(i)}return this.answers}async ask(t){typeof t=="function"&&(t=await t.call(this));let r=Et.merge({},this.options,t),{type:i,name:n}=t,{set:s,get:u}=Et;if(typeof i=="function"&&(i=await i.call(this,t,this.answers)),!i)return this.answers[n];fl(this.prompts[i],`Prompt "${i}" is not registered`);let o=new this.prompts[i](r),a=u(this.answers,n);o.state.answers=this.answers,o.enquirer=this,n&&o.on("submit",c=>{this.emit("answer",n,c,o),s(this.answers,n,c)});let l=o.emit.bind(o);return o.emit=(...c)=>(this.emit.call(this,...c),l(...c)),this.emit("prompt",o,this),r.autofill&&a!=null?(o.value=o.input=a,r.autofill==="show"&&await o.submit()):a=o.value=await o.run(),a}use(t){return t.call(this,this),this}set Prompt(t){this._Prompt=t}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(t){this._Prompt=t}static get Prompt(){return this._Prompt||Yt()}static get prompts(){return ll()}static get types(){return hl()}static get prompt(){let t=(r,...i)=>{let n=new this(...i),s=n.emit.bind(n);return n.emit=(...u)=>(t.emit(...u),s(...u)),n.prompt(r)};return Et.mixinEmitter(t,new ns),t}};Et.mixinEmitter(Xe,new ns);var is=Xe.prompts;for(let e of Object.keys(is)){let t=e.toLowerCase(),r=i=>new is[e](i).run();Xe.prompt[t]=r,Xe[t]=r,Xe[e]||Reflect.defineProperty(Xe,e,{get:()=>is[e]})}var mr=e=>{Et.defineExport(Xe,e,()=>Xe.types[e])};mr("ArrayPrompt");mr("AuthPrompt");mr("BooleanPrompt");mr("NumberPrompt");mr("StringPrompt");pl.exports=Xe});var gr=S((Hy,El)=>{"use strict";var Td=require("path"),tt="\\\\/",ml=`[^${tt}]`,ct="\\.",Id="\\+",Od="\\?",Jr="\\/",qd="(?=.)",gl="[^/]",ss=`(?:${Jr}|$)`,Dl=`(?:^|${Jr})`,us=`${ct}{1,2}${ss}`,Nd=`(?!${ct})`,Pd=`(?!${Dl}${us})`,Md=`(?!${ct}{0,1}${ss})`,Hd=`(?!${us})`,zd=`[^.${Jr}]`,$d=`${gl}*?`,yl={DOT_LITERAL:ct,PLUS_LITERAL:Id,QMARK_LITERAL:Od,SLASH_LITERAL:Jr,ONE_CHAR:qd,QMARK:gl,END_ANCHOR:ss,DOTS_SLASH:us,NO_DOT:Nd,NO_DOTS:Pd,NO_DOT_SLASH:Md,NO_DOTS_SLASH:Hd,QMARK_NO_DOT:zd,STAR:$d,STAR
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Tc=S((sE,Lc)=>{"use strict";var tm=ai(),{MAX_LENGTH:kc,CHAR_BACKSLASH:_s,CHAR_BACKTICK:rm,CHAR_COMMA:im,CHAR_DOT:nm,CHAR_LEFT_PARENTHESES:sm,CHAR_RIGHT_PARENTHESES:um,CHAR_LEFT_CURLY_BRACE:om,CHAR_RIGHT_CURLY_BRACE:am,CHAR_LEFT_SQUARE_BRACKET:Bc,CHAR_RIGHT_SQUARE_BRACKET:Rc,CHAR_DOUBLE_QUOTE:lm,CHAR_SINGLE_QUOTE:cm,CHAR_NO_BREAK_SPACE:hm,CHAR_ZERO_WIDTH_NOBREAK_SPACE:fm}=Sc(),pm=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},i=typeof r.maxLength=="number"?Math.min(kc,r.maxLength):kc;if(e.length>i)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${i})`);let n={type:"root",input:e,nodes:[]},s=[n],u=n,o=n,a=0,l=e.length,c=0,h=0,f,p=()=>e[c++],y=D=>{if(D.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&D.type==="text"){o.value+=D.value;return}return u.nodes.push(D),D.parent=u,D.prev=o,o=D,D};for(y({type:"bos"});c<l;)if(u=s[s.length-1],f=p(),!(f===fm||f===hm)){if(f===_s){y({type:"text",value:(t.keepEscaping?f:"")+p()});continue}if(f===Rc){y({type:"text",value:"\\"+f});continue}if(f===Bc){a++;let D;for(;c<l&&(D=p());){if(f+=D,D===Bc){a++;continue}if(D===_s){f+=p();continue}if(D===Rc&&(a--,a===0))break}y({type:"text",value:f});continue}if(f===sm){u=y({type:"paren",nodes:[]}),s.push(u),y({type:"text",value:f});continue}if(f===um){if(u.type!=="paren"){y({type:"text",value:f});continue}u=s.pop(),y({type:"text",value:f}),u=s[s.length-1];continue}if(f===lm||f===cm||f===rm){let D=f,v;for(t.keepQuotes!==!0&&(f="");c<l&&(v=p());){if(v===_s){f+=v+p();continue}if(v===D){t.keepQuotes===!0&&(f+=v);break}f+=v}y({type:"text",value:f});continue}if(f===om){h++;let v={type:"brace",open:!0,close:!1,dollar:o.value&&o.value.slice(-1)==="$"||u.dollar===!0,depth:h,commas:0,ranges:0,nodes:[]};u=y(v),s.push(u),y({type:"open",value:f});continue}if(f===am){if(u.type!=="brace"){y({type:"text",value:f});continue}let D="close";u=s.pop(),u.close=!0,y({type:D,value:f}),h--,u=s[s.length-1];continue}if(f===im&&h>0){if(u.ranges>0){u.ranges=0;let D=u.nodes.shift();u.nodes=[D,{type:"text",value:tm(u)}]}y({type:"comma",value:f}),u.commas++;continue}if(f===nm&&h>0&&u.commas===0){let D=u.nodes;if(h===0||D.length===0){y({type:"text",value:f});continue}if(o.type==="dot"){if(u.range=[],o.value+=f,o.type="range",u.nodes.length!==3&&u.nodes.length!==5){u.invalid=!0,u.ranges=0,o.type="text";continue}u.ranges++,u.args=[];continue}if(o.type==="range"){D.pop();let v=D[D.length-1];v.value+=o.value+f,o=v,u.ranges--;continue}y({type:"dot",value:f});continue}y({type:"text",value:f})}do if(u=s.pop(),u.type!=="root"){u.nodes.forEach(g=>{g.nodes||(g.type==="open"&&(g.isOpen=!0),g.type==="close"&&(g.isClose=!0),g.nodes||(g.type="text"),g.invalid=!0)});let D=s[s.length-1],v=D.nodes.indexOf(u);D.nodes.splice(v,1,...u.nodes)}while(s.length>0);return y({type:"eos"}),n};Lc.exports=pm});var qc=S((uE,Oc)=>{"use strict";var Ic=ai(),dm=Ac(),mm=_c(),gm=Tc(),ze=(e,t={})=>{let r=[];if(Array.isArray(e))for(let i of e){let n=ze.create(i,t);Array.isArray(n)?r.push(...n):r.push(n)}else r=[].concat(ze.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};ze.parse=(e,t={})=>gm(e,t);ze.stringify=(e,t={})=>Ic(typeof e=="string"?ze.parse(e,t):e,t);ze.compile=(e,t={})=>(typeof e=="string"&&(e=ze.parse(e,t)),dm(e,t));ze.expand=(e,t={})=>{typeof e=="string"&&(e=ze.parse(e,t));let r=mm(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};ze.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?ze.compile(e,t):ze.expand(e,t);Oc.exports=ze});var Nc=S((oE,Dm)=>{Dm.exports=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","ca
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",T
`;break}case-3:{u=`\r
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&n)continue;u=" ";break}default:u=String.fromCharCode(s)}n=s===-2,i.push(u)}return i.join("")}function Lu(e){let i={constructs:Ih([Ru,...(e||{}).extensions||[]]),content:n(Hh),defined:[],document:n($h),flow:n(Uh),lazy:{},string:n(Kh),text:n(Yh)};return i;function n(s){return u;function u(o){return Xh(i,s,o)}}}function Tu(e){for(;!Ri(e););return e}var Jh=/[\0\t\n\r]/g;function Iu(){let e=1,t="",r=!0,i;return n;function n(s,u,o){let a=[],l,c,h,f,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(u||void 0).decode(s)),h=0,t="",r&&(s.charCodeAt(0)===65279&&h++,r=void 0);h<s.length;){if(Jh.lastIndex=h,l=Jh.exec(s),f=l&&l.index!==void 0?l.index:s.length,p=s.charCodeAt(f),!l){t=s.slice(h);break}if(p===10&&h===f&&i)a.push(-3),i=void 0;else switch(i&&(a.push(-5),i=void 0),h<f&&(a.push(s.slice(h,f)),e+=f-h),p){case 0:{a.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,a.push(-2);e++<c;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:i=!0,e=1}h=f+1}return o&&(i&&a.push(-5),t&&a.push(t),a.push(null)),a}}var w1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ef(e){return e.replace(w1,b1)}function b1(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let n=r.charCodeAt(1),s=n===120||n===88;return Fi(r.slice(s?2:1),s?16:10)}return rr(r)||e}var rf={}.hasOwnProperty;function Ou(e,t,r){return typeof t!="string"&&(r=t,t=void 0),C1(r)(Tu(Lu(r).document().write(Iu()(e,t,!0))))}function C1(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(qu),autolinkProtocol:N,autolinkEmail:N,atxHeading:s(he),blockQuote:s(te),characterEscape:N,characterReference:N,codeFenced:s(k),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(k,u),codeText:s(V,u),codeTextData:N,data:N,codeFlowValue:N,definition:s(ne),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s(xe),hardBreakEscape:s(zt),hardBreakTrailing:s(zt),htmlFlow:s(xt,u),htmlFlowData:N,htmlText:s(xt,u),htmlTextData:N,image:s(cf),label:u,link:s(qu),listItem:s(hf),listItemValue:f,listOrdered:s(Nu,h),listUnordered:s(Nu),paragraph:s(ff),reference:m,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:s(he),strong:s(pf),thematicBreak:s(mf)},exit:{atxHeading:a(),atxHeadingSequence:O,autolink:a(),autolinkEmail:T,autolinkProtocol:ge,blockQuote:a(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:Re,characterReferenceMarkerNumeric:Re,characterReferenceValue:Q,characterReference:rt,codeFenced:a(v),codeFencedFence:D,codeFencedFenceInfo:p,codeFencedFenceMeta:y,codeFlowValue:z,codeIndented:a(g),codeText:a(E),codeTextData:z,data:z,definition:a(),definitionDestinationString:B,definitionLabelString:_,definitionTitleString:w,emphasis:a(),hardBreakEscape:a(H),hardBreakTrailing:a(H),htmlFlow:a(L),htmlFlowData:z,htmlText:a($),htmlTextData:z,image:a(ee),label:fe,labelText:G,lineEnding:A,link:a(b),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ye,resourceDestinationString:d,resourceTitleString:ue,resource:Oe,setextHeading:a(I),setextHeadingLineSequence:j,setextHeadingText:C,strong:a(),thematicBreak:a()}};nf(t,(e||{}).mdastExtensions||[]);let r={};return i;function i(x){let R={type:"root",children:[]},W={stack:[R],tokenStack:[],config:t,enter:o,exit:l,buffer:u,resume:c,data:r},re=[],se=-1;for(;++se<x.length;)if(x[se][1].type==="listOrdered"||x[se][1].type==="listUnordered")if(x[se][0]==="enter")re.push(se);else{let We=re.pop();se=n(x,We,se)}for(se=-1;++se<x.length;){let We=t[x[se][0]];rf.call(We,x[se][1].type)&&We[x[se][1].type].call(Object.assign({sliceSerialize:x[se][2].sliceSerialize},W),x[se][1])}if(W.tokenStack.length>0){let We=W.tokenStack[W.tokenStack.length-1];(We[1]||tf).call(W,void 0,We[0])}for(R.position={start:At(x.length>0?x[0][1].start:{line:1,column:1,offset:0}),end:At(x.length>0?x[x.length-2][1].end:{line:1,column:1,offset:0})},se=-1;++se<t.transforms.length;)R=t.transforms[se](R)||R;return R}function n(x,R,W){let re=R-1,se=-1,We=!1,Ft,it,nr,sr;for(;++
/*! Bundled license information:
normalize-path/index.js:
(*!
* normalize-path <https://github.com/jonschlinkert/normalize-path>
*
* Copyright (c) 2014-2018, Jon Schlinkert.
* Released under the MIT License.
*)
is-extglob/index.js:
(*!
* is-extglob <https://github.com/jonschlinkert/is-extglob>
*
* Copyright (c) 2014-2016, Jon Schlinkert.
* Licensed under the MIT License.
*)
is-glob/index.js:
(*!
* is-glob <https://github.com/jonschlinkert/is-glob>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*)
is-number/index.js:
(*!
* is-number <https://github.com/jonschlinkert/is-number>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.
*)
to-regex-range/index.js:
(*!
* to-regex-range <https://github.com/micromatch/to-regex-range>
*
* Copyright (c) 2015-present, Jon Schlinkert.
* Released under the MIT License.
*)
fill-range/index.js:
(*!
* fill-range <https://github.com/jonschlinkert/fill-range>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Licensed under the MIT License.
*)
*/