1 line
24 KiB
JavaScript
1 line
24 KiB
JavaScript
|
|
(()=>{var r={535:(r,e,n)=>{"use strict";r=n.nmd(r);const t=n(54);const wrapAnsi16=(r,e)=>function(){const n=r.apply(t,arguments);return`[${n+e}m`};const wrapAnsi256=(r,e)=>function(){const n=r.apply(t,arguments);return`[${38+e};5;${n}m`};const wrapAnsi16m=(r,e)=>function(){const n=r.apply(t,arguments);return`[${38+e};2;${n[0]};${n[1]};${n[2]}m`};function assembleStyles(){const r=new Map;const e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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],gray:[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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.grey=e.color.gray;for(const n of Object.keys(e)){const t=e[n];for(const n of Object.keys(t)){const a=t[n];e[n]={open:`[${a[0]}m`,close:`[${a[1]}m`};t[n]=e[n];r.set(a[0],a[1])}Object.defineProperty(e,n,{value:t,enumerable:false});Object.defineProperty(e,"codes",{value:r,enumerable:false})}const ansi2ansi=r=>r;const rgb2rgb=(r,e,n)=>[r,e,n];e.color.close="[39m";e.bgColor.close="[49m";e.color.ansi={ansi:wrapAnsi16(ansi2ansi,0)};e.color.ansi256={ansi256:wrapAnsi256(ansi2ansi,0)};e.color.ansi16m={rgb:wrapAnsi16m(rgb2rgb,0)};e.bgColor.ansi={ansi:wrapAnsi16(ansi2ansi,10)};e.bgColor.ansi256={ansi256:wrapAnsi256(ansi2ansi,10)};e.bgColor.ansi16m={rgb:wrapAnsi16m(rgb2rgb,10)};for(let r of Object.keys(t)){if(typeof t[r]!=="object"){continue}const n=t[r];if(r==="ansi16"){r="ansi"}if("ansi16"in n){e.color.ansi[r]=wrapAnsi16(n.ansi16,0);e.bgColor.ansi[r]=wrapAnsi16(n.ansi16,10)}if("ansi256"in n){e.color.ansi256[r]=wrapAnsi256(n.ansi256,0);e.bgColor.ansi256[r]=wrapAnsi256(n.ansi256,10)}if("rgb"in n){e.color.ansi16m[r]=wrapAnsi16m(n.rgb,0);e.bgColor.ansi16m[r]=wrapAnsi16m(n.rgb,10)}}return e}Object.defineProperty(r,"exports",{enumerable:true,get:assembleStyles})},148:(r,e,n)=>{"use strict";const t=n(379);const a=n(535);const o=n(220).stdout;const s=n(299);const l=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm");const i=["ansi","ansi","ansi256","ansi16m"];const c=new Set(["gray"]);const u=Object.create(null);function applyOptions(r,e){e=e||{};const n=o?o.level:0;r.level=e.level===undefined?n:e.level;r.enabled="enabled"in e?e.enabled:r.level>0}function Chalk(r){if(!this||!(this instanceof Chalk)||this.template){const e={};applyOptions(e,r);e.template=function(){const r=[].slice.call(arguments);return chalkTag.apply(null,[e.template].concat(r))};Object.setPrototypeOf(e,Chalk.prototype);Object.setPrototypeOf(e.template,e);e.template.constructor=Chalk;return e.template}applyOptions(this,r)}if(l){a.blue.open="[94m"}for(const r of Object.keys(a)){a[r].closeRe=new RegExp(t(a[r].close),"g");u[r]={get(){const e=a[r];return build.call(this,this._styles?this._styles.concat(e):[e],this._empty,r)}}}u.visible={get(){return build.call(this,this._styles||[],true,"visible")}};a.color.closeRe=new RegExp(t(a.color.close),"g");for(const r of Object.keys(a.color.ansi)){if(c.has(r)){continue}u[r]={get(){const e=this.level;return function(){const n=a.color[i[e]][r].apply(null,arguments);const t={open:n,close:a.color.close,closeRe:a.color.closeRe};return build.call(this,this._styles?this._styles.concat(t):[t],this._empty,r)}}}}a.bgColor.closeRe=new RegExp(t(a.bgColor.close),"g");for(const r of Object.keys(a.bgColor.ansi)){if(c.has(r)){continue}const e="bg"+r[0].toUpperCase()+r.slice(1);u[e]={get(){const e=this.level;return function(){const n=a.bgColor[i[e]][r].apply(null,arguments);const t={open:n,close:a.bgColor.close,closeRe:a.bgColor.closeRe};return build.call(this,this._styles?this._styles.concat(t):[t],this.
|