blink 0.1.51 → 0.1.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/auth-DFAAGrh0.js +30 -0
- package/dist/cli/chat-DstkfVtn.js +1 -0
- package/dist/cli/chunk-ByIbJXPc.js +1 -0
- package/dist/cli/connect-CUOPse6P.js +1 -0
- package/dist/cli/connect-CswVxp7Y.js +26 -0
- package/dist/cli/dev-D5eJ3-13.js +1631 -0
- package/dist/cli/devtools-BS9tk1Y9.js +91 -0
- package/dist/cli/dist-NqrnQGst.js +45 -0
- package/dist/cli/esm-CeJfCMPI.js +1 -0
- package/dist/cli/events-CWgtj8lb.js +1 -0
- package/dist/cli/execAsync-q2CSWc1b.js +1 -0
- package/dist/cli/getMachineId-bsd-C-mIkoX1.js +1 -0
- package/dist/cli/getMachineId-darwin-BndlBc-C.js +2 -0
- package/dist/cli/getMachineId-linux-DYz-C3hh.js +1 -0
- package/dist/cli/getMachineId-unsupported-CcuIl2b-.js +1 -0
- package/dist/cli/getMachineId-win-KRlx7d-Q.js +1 -0
- package/dist/cli/index.js +18 -2132
- package/dist/cli/init-BsN-peJw.js +80 -0
- package/dist/cli/login-CU2BqznA.js +1 -0
- package/dist/cli/main-DqOlaYW2.js +6 -0
- package/dist/cli/open-CSMQaj0E.js +1 -0
- package/dist/cli/serve-DYwdm-QS.js +1 -0
- package/dist/cli/serve-neuJCuqR.js +60 -0
- package/dist/cli/undici-BG07ys6c.js +94 -0
- package/dist/cli/undici-jJcag_Yq.js +1 -0
- package/dist/cli/wrapper-B4vDwpOq.js +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import{__commonJSMin as e,__toESM as t}from"./chunk-ByIbJXPc.js";import n,{stdin as r,stdout as i}from"node:process";import{stripVTControlCharacters as a}from"node:util";import*as o from"node:readline";import s from"node:readline";import{Writable as c}from"node:stream";var l=e(((exports,t)=>{let n={to(e,t){return t?`[${t+1};${e+1}H`:`[${e+1}G`},move(e,t){let n=``;return e<0?n+=`[${-e}D`:e>0&&(n+=`[${e}C`),t<0?n+=`[${-t}A`:t>0&&(n+=`[${t}B`),n},up:(e=1)=>`[${e}A`,down:(e=1)=>`[${e}B`,forward:(e=1)=>`[${e}C`,backward:(e=1)=>`[${e}D`,nextLine:(e=1)=>`\x1B[E`.repeat(e),prevLine:(e=1)=>`\x1B[F`.repeat(e),left:`\x1B[G`,hide:`\x1B[?25l`,show:`\x1B[?25h`,save:`\x1B7`,restore:`\x1B8`},r={up:(e=1)=>`\x1B[S`.repeat(e),down:(e=1)=>`\x1B[T`.repeat(e)},i={screen:`\x1B[2J`,up:(e=1)=>`\x1B[1J`.repeat(e),down:(e=1)=>`\x1B[J`.repeat(e),line:`\x1B[2K`,lineEnd:`\x1B[K`,lineStart:`\x1B[1K`,lines(e){let t=``;for(let r=0;r<e;r++)t+=this.line+(r<e-1?n.up():``);return e&&(t+=n.left),t}};t.exports={cursor:n,scroll:r,erase:i,beep:`\x07`}})),u=e(((exports,t)=>{let n=process||{},r=n.argv||[],i=n.env||{},a=!(i.NO_COLOR||r.includes(`--no-color`))&&(!!i.FORCE_COLOR||r.includes(`--color`)||n.platform===`win32`||(n.stdout||{}).isTTY&&i.TERM!==`dumb`||!!i.CI),o=(e,t,n=e)=>r=>{let i=``+r,a=i.indexOf(t,e.length);return~a?e+s(i,t,n,a)+t:e+i+t},s=(e,t,n,r)=>{let i=``,a=0;do i+=e.substring(a,r)+n,a=r+t.length,r=e.indexOf(t,a);while(~r);return i+e.substring(a)},c=(e=a)=>{let t=e?o:()=>String;return{isColorSupported:e,reset:t(`\x1B[0m`,`\x1B[0m`),bold:t(`\x1B[1m`,`\x1B[22m`,`\x1B[22m\x1B[1m`),dim:t(`\x1B[2m`,`\x1B[22m`,`\x1B[22m\x1B[2m`),italic:t(`\x1B[3m`,`\x1B[23m`),underline:t(`\x1B[4m`,`\x1B[24m`),inverse:t(`\x1B[7m`,`\x1B[27m`),hidden:t(`\x1B[8m`,`\x1B[28m`),strikethrough:t(`\x1B[9m`,`\x1B[29m`),black:t(`\x1B[30m`,`\x1B[39m`),red:t(`\x1B[31m`,`\x1B[39m`),green:t(`\x1B[32m`,`\x1B[39m`),yellow:t(`\x1B[33m`,`\x1B[39m`),blue:t(`\x1B[34m`,`\x1B[39m`),magenta:t(`\x1B[35m`,`\x1B[39m`),cyan:t(`\x1B[36m`,`\x1B[39m`),white:t(`\x1B[37m`,`\x1B[39m`),gray:t(`\x1B[90m`,`\x1B[39m`),bgBlack:t(`\x1B[40m`,`\x1B[49m`),bgRed:t(`\x1B[41m`,`\x1B[49m`),bgGreen:t(`\x1B[42m`,`\x1B[49m`),bgYellow:t(`\x1B[43m`,`\x1B[49m`),bgBlue:t(`\x1B[44m`,`\x1B[49m`),bgMagenta:t(`\x1B[45m`,`\x1B[49m`),bgCyan:t(`\x1B[46m`,`\x1B[49m`),bgWhite:t(`\x1B[47m`,`\x1B[49m`),blackBright:t(`\x1B[90m`,`\x1B[39m`),redBright:t(`\x1B[91m`,`\x1B[39m`),greenBright:t(`\x1B[92m`,`\x1B[39m`),yellowBright:t(`\x1B[93m`,`\x1B[39m`),blueBright:t(`\x1B[94m`,`\x1B[39m`),magentaBright:t(`\x1B[95m`,`\x1B[39m`),cyanBright:t(`\x1B[96m`,`\x1B[39m`),whiteBright:t(`\x1B[97m`,`\x1B[39m`),bgBlackBright:t(`\x1B[100m`,`\x1B[49m`),bgRedBright:t(`\x1B[101m`,`\x1B[49m`),bgGreenBright:t(`\x1B[102m`,`\x1B[49m`),bgYellowBright:t(`\x1B[103m`,`\x1B[49m`),bgBlueBright:t(`\x1B[104m`,`\x1B[49m`),bgMagentaBright:t(`\x1B[105m`,`\x1B[49m`),bgCyanBright:t(`\x1B[106m`,`\x1B[49m`),bgWhiteBright:t(`\x1B[107m`,`\x1B[49m`)}};t.exports=c(),t.exports.createColors=c})),d=t(l(),1);u();function f({onlyFirst:e=!1}={}){let t=[`[\\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(t,e?void 0:`g`)}const p=f();function m(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(p,``)}function h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var g={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(e){var t=e.charCodeAt(0),n=e.length==2?e.charCodeAt(1):0,r=t;return 55296<=t&&t<=56319&&56320<=n&&n<=57343&&(t&=1023,n&=1023,r=t<<10|n,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?`F`:r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?`H`:4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?`W`:32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?`Na`:r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?`A`:`N`},t.characterLength=function(e){var t=this.eastAsianWidth(e);return t==`F`||t==`W`||t==`A`?2:1};function n(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(e){for(var t=n(e),r=0,i=0;i<t.length;i++)r+=this.characterLength(t[i]);return r},t.slice=function(e,r,i){textLen=t.length(e),r||=0,i||=1,r<0&&(r=textLen+r),i<0&&(i=textLen+i);for(var a=``,o=0,s=n(e),c=0;c<s.length;c++){var l=s[c],u=t.length(l);if(o>=r-(u==2?1:0))if(o+u<=i)a+=l;else break;o+=u}return a}})(g);var _=g.exports;const v=h(_);var y=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 ee=h(y);function b(e,t={}){if(typeof e!=`string`||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=m(e),e.length===0))return 0;e=e.replace(ee(),` `);let n=t.ambiguousIsNarrow?1:2,r=0;for(let t of e){let e=t.codePointAt(0);if(e<=31||e>=127&&e<=159||e>=768&&e<=879)continue;switch(v.eastAsianWidth(t)){case`F`:case`W`:r+=2;break;case`A`:r+=n;break;default:r+=1}}return r}const x=(e=0)=>t=>`\x1B[${t+e}m`,S=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,C=(e=0)=>(t,n,r)=>`\x1B[${38+e};2;${t};${n};${r}m`,w={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(w.modifier);const te=Object.keys(w.color),ne=Object.keys(w.bgColor);[...te,...ne];function re(){let e=new Map;for(let[t,n]of Object.entries(w)){for(let[t,r]of Object.entries(n))w[t]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[t]=w[t],e.set(r[0],r[1]);Object.defineProperty(w,t,{value:n,enumerable:!1})}return Object.defineProperty(w,`codes`,{value:e,enumerable:!1}),w.color.close=`\x1B[39m`,w.bgColor.close=`\x1B[49m`,w.color.ansi=x(),w.color.ansi256=S(),w.color.ansi16m=C(),w.bgColor.ansi=x(10),w.bgColor.ansi256=S(10),w.bgColor.ansi16m=C(10),Object.defineProperties(w,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>w.rgbToAnsi256(...w.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>w.ansi256ToAnsi(w.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>w.ansi256ToAnsi(w.hexToAnsi256(e)),enumerable:!1}}),w}const ie=re(),T=new Set([`\x1B`,``]),E=`]8;;`,D=e=>`${T.values().next().value}[${e}m`,O=e=>`${T.values().next().value}${E}${e}`,ae=e=>e.split(` `).map(e=>b(e)),k=(e,t,n)=>{let r=[...t],i=!1,a=!1,o=b(m(e[e.length-1]));for(let[t,s]of r.entries()){let c=b(s);if(o+c<=n?e[e.length-1]+=s:(e.push(s),o=0),T.has(s)&&(i=!0,a=r.slice(t+1).join(``).startsWith(E)),i){a?s===`\x07`&&(i=!1,a=!1):s===`m`&&(i=!1);continue}o+=c,o===n&&t<r.length-1&&(e.push(``),o=0)}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},oe=e=>{let t=e.split(` `),n=t.length;for(;n>0&&!(b(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},se=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=ae(e),s=[``];for(let[r,i]of e.split(` `).entries()){n.trim!==!1&&(s[s.length-1]=s[s.length-1].trimStart());let e=b(s[s.length-1]);if(r!==0&&(e>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),e=0),(e>0||n.trim===!1)&&(s[s.length-1]+=` `,e++)),n.hard&&o[r]>t){let n=t-e,a=1+Math.floor((o[r]-n-1)/t);Math.floor((o[r]-1)/t)<a&&s.push(``),k(s,i,t);continue}if(e+o[r]>t&&e>0&&o[r]>0){if(n.wordWrap===!1&&e<t){k(s,i,t);continue}s.push(``)}if(e+o[r]>t&&n.wordWrap===!1){k(s,i,t);continue}s[s.length-1]+=i}n.trim!==!1&&(s=s.map(e=>oe(e)));let c=[...s.join(`
|
|
2
|
+
`)];for(let[e,t]of c.entries()){if(r+=t,T.has(t)){let{groups:t}=RegExp(`(?:\\[(?<code>\\d+)m|\\${E}(?<uri>.*))`).exec(c.slice(e).join(``))||{groups:{}};if(t.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}let n=ie.codes.get(Number(i));c[e+1]===`
|
|
3
|
+
`?(a&&(r+=O(``)),i&&n&&(r+=D(n))):t===`
|
|
4
|
+
`&&(i&&n&&(r+=D(i)),a&&(r+=O(a)))}return r};function A(e,t,n){return String(e).normalize().replace(/\r\n/g,`
|
|
5
|
+
`).split(`
|
|
6
|
+
`).map(e=>se(e,t,n)).join(`
|
|
7
|
+
`)}const ce=[`up`,`down`,`left`,`right`,`space`,`enter`,`cancel`],j={actions:new Set(ce),aliases:new Map([[`k`,`up`],[`j`,`down`],[`h`,`left`],[`l`,`right`],[``,`cancel`],[`escape`,`cancel`]])};function M(e,t){if(typeof e==`string`)return j.aliases.get(e)===t;for(let n of e)if(n!==void 0&&M(n,t))return!0;return!1}function le(e,t){if(e===t)return;let n=e.split(`
|
|
8
|
+
`),r=t.split(`
|
|
9
|
+
`),i=[];for(let e=0;e<Math.max(n.length,r.length);e++)n[e]!==r[e]&&i.push(e);return i}const ue=globalThis.process.platform.startsWith(`win`),N=Symbol(`clack:cancel`);function de(e){return e===N}function P(e,t){let n=e;n.isTTY&&n.setRawMode(t)}function fe({input:e=r,output:t=i,overwrite:n=!0,hideCursor:a=!0}={}){let s=o.createInterface({input:e,output:t,prompt:``,tabSize:1});o.emitKeypressEvents(e,s),e.isTTY&&e.setRawMode(!0);let c=(r,{name:i,sequence:s})=>{let l=String(r);if(M([l,i,s],`cancel`)){a&&t.write(d.cursor.show),process.exit(0);return}if(!n)return;let u=i===`return`?0:-1,f=i===`return`?-1:0;o.moveCursor(t,u,f,()=>{o.clearLine(t,1,()=>{e.once(`keypress`,c)})})};return a&&t.write(d.cursor.hide),e.once(`keypress`,c),()=>{e.off(`keypress`,c),a&&t.write(d.cursor.show),e.isTTY&&!ue&&e.setRawMode(!1),s.terminal=!1,s.close()}}var pe=Object.defineProperty,me=(e,t,n)=>t in e?pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F=(e,t,n)=>(me(e,typeof t==`symbol`?t:t+``,n),n),I=class{constructor(e,t=!0){F(this,`input`),F(this,`output`),F(this,`_abortSignal`),F(this,`rl`),F(this,`opts`),F(this,`_render`),F(this,`_track`,!1),F(this,`_prevFrame`,``),F(this,`_subscribers`,new Map),F(this,`_cursor`,0),F(this,`state`,`initial`),F(this,`error`,``),F(this,`value`);let{input:n=r,output:a=i,render:o,signal:s,...c}=e;this.opts=c,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=o.bind(this),this._track=t,this._abortSignal=s,this.input=n,this.output=a}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let n=this._subscribers.get(e)??[];n.push(t),this._subscribers.set(e,n)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let n=this._subscribers.get(e)??[],r=[];for(let e of n)e.cb(...t),e.once&&r.push(()=>n.splice(n.indexOf(e),1));for(let e of r)e()}prompt(){return new Promise((e,t)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state=`cancel`,this.close(),e(N);this._abortSignal.addEventListener(`abort`,()=>{this.state=`cancel`,this.close()},{once:!0})}let n=new c;n._write=(e,t,n)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,``),this._cursor=this.rl?.cursor??0,this.emit(`value`,this.value)),n()},this.input.pipe(n),this.rl=s.createInterface({input:this.input,output:n,tabSize:2,prompt:``,escapeCodeTimeout:50,terminal:!0}),s.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),P(this.input,!0),this.output.on(`resize`,this.render),this.render(),this.once(`submit`,()=>{this.output.write(d.cursor.show),this.output.off(`resize`,this.render),P(this.input,!1),e(this.value)}),this.once(`cancel`,()=>{this.output.write(d.cursor.show),this.output.off(`resize`,this.render),P(this.input,!1),e(N)})})}onKeypress(e,t){if(this.state===`error`&&(this.state=`active`),t?.name&&(!this._track&&j.aliases.has(t.name)&&this.emit(`cursor`,j.aliases.get(t.name)),j.actions.has(t.name)&&this.emit(`cursor`,t.name)),e&&(e.toLowerCase()===`y`||e.toLowerCase()===`n`)&&this.emit(`confirm`,e.toLowerCase()===`y`),e===` `&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit(`value`,this.opts.placeholder))),e&&this.emit(`key`,e.toLowerCase()),t?.name===`return`){if(this.opts.validate){let e=this.opts.validate(this.value);e&&(this.error=e instanceof Error?e.message:e,this.state=`error`,this.rl?.write(this.value))}this.state!==`error`&&(this.state=`submit`)}M([e,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(`
|
|
10
|
+
`),P(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=A(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
11
|
+
`).length-1;this.output.write(d.cursor.move(-999,e*-1))}render(){let e=A(this._render(this)??``,process.stdout.columns,{hard:!0});if(e!==this._prevFrame){if(this.state===`initial`)this.output.write(d.cursor.hide);else{let t=le(this._prevFrame,e);if(this.restoreCursor(),t&&t?.length===1){let n=t[0];this.output.write(d.cursor.move(0,n)),this.output.write(d.erase.lines(1));let r=e.split(`
|
|
12
|
+
`);this.output.write(r[n]),this._prevFrame=e,this.output.write(d.cursor.move(0,r.length-n-1));return}if(t&&t?.length>1){let n=t[0];this.output.write(d.cursor.move(0,n)),this.output.write(d.erase.down());let r=e.split(`
|
|
13
|
+
`).slice(n);this.output.write(r.join(`
|
|
14
|
+
`)),this._prevFrame=e;return}this.output.write(d.erase.down())}this.output.write(e),this.state===`initial`&&(this.state=`active`),this._prevFrame=e}}},he=class extends I{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on(`value`,()=>{this.value=this._value}),this.on(`confirm`,e=>{this.output.write(d.cursor.move(0,-1)),this.value=e,this.state=`submit`,this.close()}),this.on(`cursor`,()=>{this.value=!this.value})}};Object.defineProperty;var ge;ge=new WeakMap,Object.defineProperty,Object.defineProperty;var _e=Object.defineProperty,ve=(e,t,n)=>t in e?_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L=(e,t,n)=>(ve(e,typeof t==`symbol`?t:t+``,n),n),ye=class extends I{constructor(e){super(e,!1),L(this,`options`),L(this,`cursor`,0),this.options=e.options,this.cursor=this.options.findIndex(({value:t})=>t===e.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on(`cursor`,e=>{switch(e){case`left`:case`up`:this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case`down`:case`right`:this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};Object.defineProperty;var R=t(u(),1),z=t(l(),1);function be(){return n.platform===`win32`?!!n.env.CI||!!n.env.WT_SESSION||!!n.env.TERMINUS_SUBLIME||n.env.ConEmuTask===`{cmd::Cmder}`||n.env.TERM_PROGRAM===`Terminus-Sublime`||n.env.TERM_PROGRAM===`vscode`||n.env.TERM===`xterm-256color`||n.env.TERM===`alacritty`||n.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:n.env.TERM!==`linux`}const B=be(),V=(e,t)=>B?e:t,xe=V(`◆`,`*`),H=V(`■`,`x`),U=V(`▲`,`x`),W=V(`◇`,`o`),Se=V(`┌`,`T`),G=V(`│`,`|`),K=V(`└`,`—`),q=V(`●`,`>`),J=V(`○`,` `);V(`◻`,`[•]`),V(`◼`,`[+]`),V(`◻`,`[ ]`),V(`▪`,`•`),V(`─`,`-`),V(`╮`,`+`),V(`├`,`+`),V(`╯`,`+`);const Y=V(`●`,`•`),X=V(`◆`,`*`),Z=V(`▲`,`!`),Ce=V(`■`,`x`),we=e=>{switch(e){case`initial`:case`active`:return R.default.cyan(xe);case`cancel`:return R.default.red(H);case`error`:return R.default.yellow(U);case`submit`:return R.default.green(W)}},Te=e=>{let{cursor:t,options:n,style:r}=e,i=e.maxItems??1/0,a=Math.max(process.stdout.rows-4,0),o=Math.min(a,Math.max(i,5)),s=0;t>=s+o-3?s=Math.max(Math.min(t-o+3,n.length-o),0):t<s+2&&(s=Math.max(t-2,0));let c=o<n.length&&s>0,l=o<n.length&&s+o<n.length;return n.slice(s,s+o).map((e,n,i)=>{let a=n===0&&c,o=n===i.length-1&&l;return a||o?R.default.dim(`...`):r(e,n+s===t)})},Ee=e=>{let t=e.active??`Yes`,n=e.inactive??`No`;return new he({active:t,inactive:n,initialValue:e.initialValue??!0,render(){let r=`${R.default.gray(G)}
|
|
15
|
+
${we(this.state)} ${e.message}
|
|
16
|
+
`,i=this.value?t:n;switch(this.state){case`submit`:return`${r}${R.default.gray(G)} ${R.default.dim(i)}`;case`cancel`:return`${r}${R.default.gray(G)} ${R.default.strikethrough(R.default.dim(i))}
|
|
17
|
+
${R.default.gray(G)}`;default:return`${r}${R.default.cyan(G)} ${this.value?`${R.default.green(q)} ${t}`:`${R.default.dim(J)} ${R.default.dim(t)}`} ${R.default.dim(`/`)} ${this.value?`${R.default.dim(J)} ${R.default.dim(n)}`:`${R.default.green(q)} ${n}`}
|
|
18
|
+
${R.default.cyan(K)}
|
|
19
|
+
`}}}).prompt()},De=e=>{let t=(e,t)=>{let n=e.label??String(e.value);switch(t){case`selected`:return`${R.default.dim(n)}`;case`active`:return`${R.default.green(q)} ${n} ${e.hint?R.default.dim(`(${e.hint})`):``}`;case`cancelled`:return`${R.default.strikethrough(R.default.dim(n))}`;default:return`${R.default.dim(J)} ${R.default.dim(n)}`}};return new ye({options:e.options,initialValue:e.initialValue,render(){let n=`${R.default.gray(G)}
|
|
20
|
+
${we(this.state)} ${e.message}
|
|
21
|
+
`;switch(this.state){case`submit`:return`${n}${R.default.gray(G)} ${t(this.options[this.cursor],`selected`)}`;case`cancel`:return`${n}${R.default.gray(G)} ${t(this.options[this.cursor],`cancelled`)}
|
|
22
|
+
${R.default.gray(G)}`;default:return`${n}${R.default.cyan(G)} ${Te({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(e,n)=>t(e,n?`active`:`inactive`)}).join(`
|
|
23
|
+
${R.default.cyan(G)} `)}
|
|
24
|
+
${R.default.cyan(K)}
|
|
25
|
+
`}}}).prompt()},Oe=(e=``)=>{process.stdout.write(`${R.default.gray(K)} ${R.default.red(e)}
|
|
26
|
+
|
|
27
|
+
`)},ke=(e=``)=>{process.stdout.write(`${R.default.gray(Se)} ${e}
|
|
28
|
+
`)},Ae=(e=``)=>{process.stdout.write(`${R.default.gray(G)}
|
|
29
|
+
${R.default.gray(K)} ${e}
|
|
30
|
+
|
|
31
|
+
`)},Q={message:(e=``,{symbol:t=R.default.gray(G)}={})=>{let n=[`${R.default.gray(G)}`];if(e){let[r,...i]=e.split(`
|
|
32
|
+
`);n.push(`${t} ${r}`,...i.map(e=>`${R.default.gray(G)} ${e}`))}process.stdout.write(`${n.join(`
|
|
33
|
+
`)}
|
|
34
|
+
`)},info:e=>{Q.message(e,{symbol:R.default.blue(Y)})},success:e=>{Q.message(e,{symbol:R.default.green(X)})},step:e=>{Q.message(e,{symbol:R.default.green(W)})},warn:e=>{Q.message(e,{symbol:R.default.yellow(Z)})},warning:e=>{Q.warn(e)},error:e=>{Q.message(e,{symbol:R.default.red(Ce)})}},je=`${R.default.gray(G)} `,$={message:async(e,{symbol:t=R.default.gray(G)}={})=>{process.stdout.write(`${R.default.gray(G)}
|
|
35
|
+
${t} `);let n=3;for await(let t of e){t=t.replace(/\n/g,`
|
|
36
|
+
${je}`),t.includes(`
|
|
37
|
+
`)&&(n=3+a(t.slice(t.lastIndexOf(`
|
|
38
|
+
`))).length);let e=a(t).length;n+e<process.stdout.columns?(n+=e,process.stdout.write(t)):(process.stdout.write(`
|
|
39
|
+
${je}${t.trimStart()}`),n=3+a(t.trimStart()).length)}process.stdout.write(`
|
|
40
|
+
`)},info:e=>$.message(e,{symbol:R.default.blue(Y)}),success:e=>$.message(e,{symbol:R.default.green(X)}),step:e=>$.message(e,{symbol:R.default.green(W)}),warn:e=>$.message(e,{symbol:R.default.yellow(Z)}),warning:e=>$.warn(e),error:e=>$.message(e,{symbol:R.default.red(Ce)})},Me=({indicator:e=`dots`}={})=>{let t=B?[`◒`,`◐`,`◓`,`◑`]:[`•`,`o`,`O`,`0`],n=B?80:120,r=process.env.CI===`true`,i,a,o=!1,s=``,c,l=performance.now(),u=e=>{let t=e>1?`Something went wrong`:`Canceled`;o&&y(t,e)},d=()=>u(2),f=()=>u(1),p=()=>{process.on(`uncaughtExceptionMonitor`,d),process.on(`unhandledRejection`,d),process.on(`SIGINT`,f),process.on(`SIGTERM`,f),process.on(`exit`,u)},m=()=>{process.removeListener(`uncaughtExceptionMonitor`,d),process.removeListener(`unhandledRejection`,d),process.removeListener(`SIGINT`,f),process.removeListener(`SIGTERM`,f),process.removeListener(`exit`,u)},h=()=>{if(c===void 0)return;r&&process.stdout.write(`
|
|
41
|
+
`);let e=c.split(`
|
|
42
|
+
`);process.stdout.write(z.cursor.move(-999,e.length-1)),process.stdout.write(z.erase.down(e.length))},g=e=>e.replace(/\.+$/,``),_=e=>{let t=(performance.now()-e)/1e3,n=Math.floor(t/60),r=Math.floor(t%60);return n>0?`[${n}m ${r}s]`:`[${r}s]`},v=(u=``)=>{o=!0,i=fe(),s=g(u),l=performance.now(),process.stdout.write(`${R.default.gray(G)}
|
|
43
|
+
`);let d=0,f=0;p(),a=setInterval(()=>{if(r&&s===c)return;h(),c=s;let n=R.default.magenta(t[d]);if(r)process.stdout.write(`${n} ${s}...`);else if(e===`timer`)process.stdout.write(`${n} ${s} ${_(l)}`);else{let e=`.`.repeat(Math.floor(f)).slice(0,3);process.stdout.write(`${n} ${s}${e}`)}d=d+1<t.length?d+1:0,f=f<t.length?f+.125:0},n)},y=(t=``,n=0)=>{o=!1,clearInterval(a),h();let r=n===0?R.default.green(W):n===1?R.default.red(H):R.default.red(U);s=g(t??s),e===`timer`?process.stdout.write(`${r} ${s} ${_(l)}
|
|
44
|
+
`):process.stdout.write(`${r} ${s}
|
|
45
|
+
`),m(),i()};return{start:v,stop:y,message:(e=``)=>{s=g(e??s)}}};export{ke as Ie,Q as M,Ae as Se,Me as Y,de as pD,De as ve,Oe as xe,Ee as ye};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__esmMin as e,__export as t}from"./chunk-ByIbJXPc.js";var n,r=e((()=>{n=typeof globalThis==`object`?globalThis:global})),i=e((()=>{r()})),a=e((()=>{i()})),o,s=e((()=>{o=`1.9.0`}));function c(e){var t=new Set([e]),n=new Set,r=e.match(l);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(t){return t===e};function a(e){return n.add(e),!1}function o(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;var r=e.match(l);if(!r)return a(e);var s={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};return s.prerelease!=null||i.major!==s.major?a(e):i.major===0?i.minor===s.minor&&i.patch<=s.patch?o(e):a(e):i.minor<=s.minor?o(e):a(e)}}var l,ee,te=e((()=>{s(),l=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,ee=c(o)}));function u(e,t,n,r){var i;r===void 0&&(r=!1);var a=m[p]=(i=m[p])??{version:o};if(!r&&a[e]){var s=Error(`@opentelemetry/api: Attempted duplicate registration of API: `+e);return n.error(s.stack||s.message),!1}if(a.version!==o){var s=Error(`@opentelemetry/api: Registration of version v`+a.version+` for `+e+` does not match previously registered API v`+o);return n.error(s.stack||s.message),!1}return a[e]=t,n.debug(`@opentelemetry/api: Registered a global for `+e+` v`+o+`.`),!0}function d(e){var t,n,r=(t=m[p])?.version;if(!(!r||!ee(r)))return(n=m[p])?.[e]}function f(e,t){t.debug(`@opentelemetry/api: Unregistering a global for `+e+` v`+o+`.`);var n=m[p];n&&delete n[e]}var ne,p,m,h=e((()=>{a(),s(),te(),ne=o.split(`.`)[0],p=Symbol.for(`opentelemetry.js.api.`+ne),m=n}));function g(e,t,n){var r=d(`diag`);if(r)return n.unshift(t),r[e].apply(r,ie([],re(n),!1))}var re,ie,ae,oe=e((()=>{h(),re=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},ie=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},ae=function(){function e(e){this._namespace=e.namespace||`DiagComponentLogger`}return e.prototype.debug=function(){var e=[...arguments];return g(`debug`,this._namespace,e)},e.prototype.error=function(){var e=[...arguments];return g(`error`,this._namespace,e)},e.prototype.info=function(){var e=[...arguments];return g(`info`,this._namespace,e)},e.prototype.warn=function(){var e=[...arguments];return g(`warn`,this._namespace,e)},e.prototype.verbose=function(){var e=[...arguments];return g(`verbose`,this._namespace,e)},e}()})),_,v=e((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.ERROR=30]=`ERROR`,e[e.WARN=50]=`WARN`,e[e.INFO=60]=`INFO`,e[e.DEBUG=70]=`DEBUG`,e[e.VERBOSE=80]=`VERBOSE`,e[e.ALL=9999]=`ALL`})(_||={})}));function se(e,t){e<_.NONE?e=_.NONE:e>_.ALL&&(e=_.ALL),t||={};function n(n,r){var i=t[n];return typeof i==`function`&&e>=r?i.bind(t):function(){}}return{error:n(`error`,_.ERROR),warn:n(`warn`,_.WARN),info:n(`info`,_.INFO),debug:n(`debug`,_.DEBUG),verbose:n(`verbose`,_.VERBOSE)}}var ce=e((()=>{v()})),le,ue,de,y,b=e((()=>{oe(),ce(),v(),h(),le=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},ue=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},de=`diag`,y=function(){function e(){function e(e){return function(){var t=[...arguments],n=d(`diag`);if(n)return n[e].apply(n,ue([],le(t),!1))}}var t=this,n=function(e,n){var r,i,a;if(n===void 0&&(n={logLevel:_.INFO}),e===t){var o=Error(`Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation`);return t.error((r=o.stack)??o.message),!1}typeof n==`number`&&(n={logLevel:n});var s=d(`diag`),c=se((i=n.logLevel)??_.INFO,e);if(s&&!n.suppressOverrideMessage){var l=(a=Error().stack)??`<failed to generate stacktrace>`;s.warn(`Current logger will be overwritten from `+l),c.warn(`Current logger will overwrite one already registered from `+l)}return u(`diag`,c,t,!0)};t.setLogger=n,t.disable=function(){f(de,t)},t.createComponentLogger=function(e){return new ae(e)},t.verbose=e(`verbose`),t.debug=e(`debug`),t.info=e(`info`),t.warn=e(`warn`),t.error=e(`error`)}return e.instance=function(){return this._instance||=new e,this._instance},e}()})),fe,pe,me,he=e((()=>{fe=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},pe=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},me=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var t=fe(e,2),n=t[0],r=t[1];return[n,r]})},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=new e(this._entries);try{for(var o=pe(r),s=o.next();!s.done;s=o.next()){var c=s.value;a._entries.delete(c)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a},e.prototype.clear=function(){return new e},e}()})),ge,_e=e((()=>{ge=Symbol(`BaggageEntryMetadata`)}));function ve(e){return e===void 0&&(e={}),new me(new Map(Object.entries(e)))}function ye(e){return typeof e!=`string`&&(be.error(`Cannot create baggage metadata from unknown type: `+typeof e),e=``),{__TYPE__:ge,toString:function(){return e}}}var be,xe=e((()=>{b(),he(),_e(),be=y.instance()}));function x(e){return Symbol.for(e)}var Se,Ce,S=e((()=>{Se=function(){function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(e){return n._currentContext.get(e)},n.setValue=function(t,r){var i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=function(t){var r=new e(n._currentContext);return r._currentContext.delete(t),r}}return e}(),Ce=new Se})),C,w,we=e((()=>{C=[{n:`error`,c:`error`},{n:`warn`,c:`warn`},{n:`info`,c:`info`},{n:`debug`,c:`debug`},{n:`verbose`,c:`trace`}],w=function(){function e(){function e(e){return function(){var t=[...arguments];if(console){var n=console[e];if(typeof n!=`function`&&(n=console.log),typeof n==`function`)return n.apply(console,t)}}}for(var t=0;t<C.length;t++)this[C[t].n]=e(C[t].c)}return e}()}));function Te(){return Pe}var T,Ee,E,De,Oe,ke,Ae,D,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He=e((()=>{T=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Ee=function(){function e(){}return e.prototype.createGauge=function(e,t){return Ie},e.prototype.createHistogram=function(e,t){return Le},e.prototype.createCounter=function(e,t){return Fe},e.prototype.createUpDownCounter=function(e,t){return Re},e.prototype.createObservableGauge=function(e,t){return Be},e.prototype.createObservableCounter=function(e,t){return ze},e.prototype.createObservableUpDownCounter=function(e,t){return Ve},e.prototype.addBatchObservableCallback=function(e,t){},e.prototype.removeBatchObservableCallback=function(e){},e}(),E=function(){function e(){}return e}(),De=function(e){T(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(e,t){},t}(E),Oe=function(e){T(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(e,t){},t}(E),ke=function(e){T(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(e,t){},t}(E),Ae=function(e){T(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(e,t){},t}(E),D=function(){function e(){}return e.prototype.addCallback=function(e){},e.prototype.removeCallback=function(e){},e}(),je=function(e){T(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(D),Me=function(e){T(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(D),Ne=function(e){T(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(D),Pe=new Ee,Fe=new De,Ie=new ke,Le=new Ae,Re=new Oe,ze=new je,Be=new Me,Ve=new Ne})),Ue,We=e((()=>{(function(e){e[e.INT=0]=`INT`,e[e.DOUBLE=1]=`DOUBLE`})(Ue||={})})),O,k,Ge=e((()=>{O={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},k={set:function(e,t,n){e!=null&&(e[t]=n)}}})),Ke,qe,Je,Ye=e((()=>{S(),Ke=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},qe=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},Je=function(){function e(){}return e.prototype.active=function(){return Ce},e.prototype.with=function(e,t,n){var r=[...arguments].slice(3);return t.call.apply(t,qe([n],Ke(r),!1))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}()})),Xe,Ze,A,Qe,j,M=e((()=>{Ye(),h(),b(),Xe=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Ze=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},A=`context`,Qe=new Je,j=function(){function e(){}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalContextManager=function(e){return u(A,e,y.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(e,t,n){for(var r,i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];return(r=this._getContextManager()).with.apply(r,Ze([e,t,n],Xe(i),!1))},e.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},e.prototype._getContextManager=function(){return d(A)||Qe},e.prototype.disable=function(){this._getContextManager().disable(),f(A,y.instance())},e}()})),$e,et=e((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.SAMPLED=1]=`SAMPLED`})($e||={})})),N,P,tt,nt=e((()=>{et(),N=`0000000000000000`,P=`00000000000000000000000000000000`,tt={traceId:P,spanId:N,traceFlags:$e.NONE}})),F,I=e((()=>{nt(),F=function(){function e(e){e===void 0&&(e=tt),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.addLink=function(e){return this},e.prototype.addLinks=function(e){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}()}));function L(e){return e.getValue(z)||void 0}function rt(){return L(j.getInstance().active())}function R(e,t){return e.setValue(z,t)}function it(e){return e.deleteValue(z)}function at(e,t){return R(e,new F(t))}function ot(e){var t;return(t=L(e))?.spanContext()}var z,st=e((()=>{S(),I(),M(),z=x(`OpenTelemetry Context Key SPAN`)}));function ct(e){return dt.test(e)&&e!==P}function lt(e){return ft.test(e)&&e!==N}function B(e){return ct(e.traceId)&<(e.spanId)}function ut(e){return new F(e)}var dt,ft,V=e((()=>{nt(),I(),dt=/^([0-9a-f]{32})$/i,ft=/^[0-9a-f]{16}$/i}));function pt(e){return typeof e==`object`&&typeof e.spanId==`string`&&typeof e.traceId==`string`&&typeof e.traceFlags==`number`}var H,U,mt=e((()=>{M(),st(),I(),V(),H=j.getInstance(),U=function(){function e(){}return e.prototype.startSpan=function(e,t,n){n===void 0&&(n=H.active());var r=!!t?.root;if(r)return new F;var i=n&&ot(n);return pt(i)&&B(i)?new F(i):new F},e.prototype.startActiveSpan=function(e,t,n,r){var i,a,o;if(!(arguments.length<2)){arguments.length===2?o=t:arguments.length===3?(i=t,o=n):(i=t,a=n,o=r);var s=a??H.active(),c=this.startSpan(e,i,s),l=R(s,c);return H.with(l,o,void 0,c)}},e}()})),ht,W,gt=e((()=>{mt(),ht=new U,W=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}return e.prototype.startSpan=function(e,t,n){return this._getTracer().startSpan(e,t,n)},e.prototype.startActiveSpan=function(e,t,n,r){var i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):ht},e}()})),_t,vt=e((()=>{mt(),_t=function(){function e(){}return e.prototype.getTracer=function(e,t,n){return new U},e}()})),yt,G,bt=e((()=>{gt(),vt(),yt=new _t,G=function(){function e(){}return e.prototype.getTracer=function(e,t,n){var r;return(r=this.getDelegateTracer(e,t,n))??new W(this,e,t,n)},e.prototype.getDelegate=function(){var e;return(e=this._delegate)??yt},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t,n){var r;return(r=this._delegate)?.getTracer(e,t,n)},e}()})),xt,St=e((()=>{(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(xt||={})})),Ct,wt=e((()=>{(function(e){e[e.INTERNAL=0]=`INTERNAL`,e[e.SERVER=1]=`SERVER`,e[e.CLIENT=2]=`CLIENT`,e[e.PRODUCER=3]=`PRODUCER`,e[e.CONSUMER=4]=`CONSUMER`})(Ct||={})})),Tt,Et=e((()=>{(function(e){e[e.UNSET=0]=`UNSET`,e[e.OK=1]=`OK`,e[e.ERROR=2]=`ERROR`})(Tt||={})}));function Dt(e){return jt.test(e)}function Ot(e){return Mt.test(e)&&!Nt.test(e)}var K,kt,At,jt,Mt,Nt,Pt=e((()=>{K=`[_0-9a-z-*/]`,kt=`[a-z]`+K+`{0,255}`,At=`[a-z0-9]`+K+`{0,240}@[a-z]`+K+`{0,13}`,jt=RegExp(`^(?:`+kt+`|`+At+`)$`),Mt=/^[ -~]{0,255}[!-~]$/,Nt=/,|=/})),Ft,It,Lt,Rt,zt,Bt=e((()=>{Pt(),Ft=32,It=512,Lt=`,`,Rt=`=`,zt=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce(function(t,n){return t.push(n+Rt+e.get(n)),t},[]).join(Lt)},e.prototype._parse=function(e){e.length>It||(this._internalState=e.split(Lt).reverse().reduce(function(e,t){var n=t.trim(),r=n.indexOf(Rt);if(r!==-1){var i=n.slice(0,r),a=n.slice(r+1,t.length);Dt(i)&&Ot(a)&&e.set(i,a)}return e},new Map),this._internalState.size>Ft&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Ft))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}()}));function Vt(e){return new zt(e)}var Ht=e((()=>{Bt()})),Ut,Wt=e((()=>{M(),Ut=j.getInstance()})),q,Gt=e((()=>{b(),q=y.instance()})),Kt,qt,Jt=e((()=>{He(),Kt=function(){function e(){}return e.prototype.getMeter=function(e,t,n){return Pe},e}(),qt=new Kt})),J,Yt,Xt=e((()=>{Jt(),h(),b(),J=`metrics`,Yt=function(){function e(){}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalMeterProvider=function(e){return u(J,e,y.instance())},e.prototype.getMeterProvider=function(){return d(J)||qt},e.prototype.getMeter=function(e,t,n){return this.getMeterProvider().getMeter(e,t,n)},e.prototype.disable=function(){f(J,y.instance())},e}()})),Y,Zt=e((()=>{Xt(),Y=Yt.getInstance()})),Qt,$t=e((()=>{Qt=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}()}));function en(e){return e.getValue(X)||void 0}function tn(){return en(j.getInstance().active())}function nn(e,t){return e.setValue(X,t)}function rn(e){return e.deleteValue(X)}var X,an=e((()=>{M(),S(),X=x(`OpenTelemetry Baggage Key`)})),Z,on,sn,cn=e((()=>{h(),$t(),Ge(),an(),xe(),b(),Z=`propagation`,on=new Qt,sn=function(){function e(){this.createBaggage=ve,this.getBaggage=en,this.getActiveBaggage=tn,this.setBaggage=nn,this.deleteBaggage=rn}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalPropagator=function(e){return u(Z,e,y.instance())},e.prototype.inject=function(e,t,n){return n===void 0&&(n=k),this._getGlobalPropagator().inject(e,t,n)},e.prototype.extract=function(e,t,n){return n===void 0&&(n=O),this._getGlobalPropagator().extract(e,t,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){f(Z,y.instance())},e.prototype._getGlobalPropagator=function(){return d(Z)||on},e}()})),ln,un=e((()=>{cn(),ln=sn.getInstance()})),Q,dn,fn=e((()=>{h(),bt(),V(),st(),b(),Q=`trace`,dn=function(){function e(){this._proxyTracerProvider=new G,this.wrapSpanContext=ut,this.isSpanContextValid=B,this.deleteSpan=it,this.getSpan=L,this.getActiveSpan=rt,this.getSpanContext=ot,this.setSpan=R,this.setSpanContext=at}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=u(Q,this._proxyTracerProvider,y.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},e.prototype.getTracerProvider=function(){return d(Q)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){f(Q,y.instance()),this._proxyTracerProvider=new G},e}()})),$,pn=e((()=>{fn(),$=dn.getInstance()})),mn={};t(mn,{DiagConsoleLogger:()=>w,DiagLogLevel:()=>_,INVALID_SPANID:()=>N,INVALID_SPAN_CONTEXT:()=>tt,INVALID_TRACEID:()=>P,ProxyTracer:()=>W,ProxyTracerProvider:()=>G,ROOT_CONTEXT:()=>Ce,SamplingDecision:()=>xt,SpanKind:()=>Ct,SpanStatusCode:()=>Tt,TraceFlags:()=>$e,ValueType:()=>Ue,baggageEntryMetadataFromString:()=>ye,context:()=>Ut,createContextKey:()=>x,createNoopMeter:()=>Te,createTraceState:()=>Vt,default:()=>hn,defaultTextMapGetter:()=>O,defaultTextMapSetter:()=>k,diag:()=>q,isSpanContextValid:()=>B,isValidSpanId:()=>lt,isValidTraceId:()=>ct,metrics:()=>Y,propagation:()=>ln,trace:()=>$});var hn,gn=e((()=>{xe(),S(),we(),v(),He(),We(),Ge(),gt(),bt(),St(),wt(),Et(),et(),Ht(),V(),nt(),Wt(),Gt(),Zt(),un(),pn(),hn={context:Ut,diag:q,metrics:Y,propagation:ln,trace:$}}));export{w as DiagConsoleLogger,_ as DiagLogLevel,Tt as SpanStatusCode,Ue as ValueType,q as diag,mn as esm_exports,gn as init_esm,Y as metrics,$ as trace};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=class{listeners=[];get event(){return e=>(this.listeners.push(e),{dispose:()=>{this.listeners=this.listeners.filter(t=>t!==e)}})}emit(e){for(let t=this.listeners.length-1;t>=0;t--)this.listeners[t]?.(e)}dispose(){this.listeners=[]}};export{e as Emitter};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__require as t}from"./chunk-ByIbJXPc.js";var n=e((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.execAsync=void 0;let n=t(`child_process`),r=t(`util`);exports.execAsync=r.promisify(n.exec)}));export{n as require_execAsync};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-ByIbJXPc.js";import{require_execAsync as r}from"./execAsync-q2CSWc1b.js";import{esm_exports as i,init_esm as a}from"./esm-CeJfCMPI.js";var o=e((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.getMachineId=void 0;let o=t(`fs`),s=r(),c=(a(),n(i));async function l(){try{let e=await o.promises.readFile(`/etc/hostid`,{encoding:`utf8`});return e.trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}try{let e=await(0,s.execAsync)(`kenv -q smbios.system.uuid`);return e.stdout.trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}exports.getMachineId=l}));export default o();export{};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-ByIbJXPc.js";import{require_execAsync as n}from"./execAsync-q2CSWc1b.js";import{esm_exports as r,init_esm as i}from"./esm-CeJfCMPI.js";var a=e((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.getMachineId=void 0;let a=n(),o=(i(),t(r));async function s(){try{let e=await(0,a.execAsync)(`ioreg -rd1 -c "IOPlatformExpertDevice"`),t=e.stdout.split(`
|
|
2
|
+
`).find(e=>e.includes(`IOPlatformUUID`));if(!t)return;let n=t.split(`" = "`);if(n.length===2)return n[1].slice(0,-1)}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}exports.getMachineId=s}));export default a();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-ByIbJXPc.js";import{esm_exports as r,init_esm as i}from"./esm-CeJfCMPI.js";var a=e((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.getMachineId=void 0;let a=t(`fs`),o=(i(),n(r));async function s(){let e=[`/etc/machine-id`,`/var/lib/dbus/machine-id`];for(let t of e)try{let e=await a.promises.readFile(t,{encoding:`utf8`});return e.trim()}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}exports.getMachineId=s}));export default a();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-ByIbJXPc.js";import{esm_exports as n,init_esm as r}from"./esm-CeJfCMPI.js";var i=e((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.getMachineId=void 0;let i=(r(),t(n));async function a(){i.diag.debug(`could not read machine-id: unsupported platform`)}exports.getMachineId=a}));export default i();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-ByIbJXPc.js";import{require_execAsync as r}from"./execAsync-q2CSWc1b.js";import{esm_exports as i,init_esm as a}from"./esm-CeJfCMPI.js";var o=e((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.getMachineId=void 0;let o=t(`process`),s=r(),c=(a(),n(i));async function l(){let e=`%windir%\\System32\\REG.exe`;o.arch===`ia32`&&`PROCESSOR_ARCHITEW6432`in o.env&&(e=`%windir%\\sysnative\\cmd.exe /c `+e);try{let t=await(0,s.execAsync)(`${e} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`),n=t.stdout.split(`REG_SZ`);if(n.length===2)return n[1].trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}exports.getMachineId=l}));export default o();export{};
|