@winner-fed/plugin-did-you-know
Version:
Did you know WinJS?
1 lines • 6.62 kB
JavaScript
(function(){"use strict";var e={592:function(e){e.exports=(e,r=process.argv)=>{const t=e.startsWith("-")?"":e.length===1?"-":"--";const n=r.indexOf(t+e);const o=r.indexOf("--");return n!==-1&&(o===-1||n<o)}},575:function(e,r,t){const n=t(37);const o=t(224);const i=t(592);const{env:s}=process;let u;if(i("no-color")||i("no-colors")||i("color=false")||i("color=never")){u=0}else if(i("color")||i("colors")||i("color=true")||i("color=always")){u=1}if("FORCE_COLOR"in s){if(s.FORCE_COLOR==="true"){u=1}else if(s.FORCE_COLOR==="false"){u=0}else{u=s.FORCE_COLOR.length===0?1:Math.min(parseInt(s.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e,r){if(u===0){return 0}if(i("color=16m")||i("color=full")||i("color=truecolor")){return 3}if(i("color=256")){return 2}if(e&&!r&&u===undefined){return 0}const t=u||0;if(s.TERM==="dumb"){return t}if(process.platform==="win32"){const e=n.release().split(".");if(Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in s){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in s))||s.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in s){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0}if(s.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in s){const e=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(s.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)){return 1}if("COLORTERM"in s){return 1}return t}function getSupportLevel(e){const r=supportsColor(e,e&&e.isTTY);return translateLevel(r)}e.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,o.isatty(1))),stderr:translateLevel(supportsColor(true,o.isatty(2)))}},164:function(e,r,t){const n=t(575);const o=t(592);function parseVersion(e){if(/^\d{3,4}$/.test(e)){const r=/(\d{1,2})(\d{2})/.exec(e);return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}const r=(e||"").split(".").map((e=>parseInt(e,10)));return{major:r[0],minor:r[1],patch:r[2]}}function supportsHyperlink(e){const{env:r}=process;if("FORCE_HYPERLINK"in r){return!(r.FORCE_HYPERLINK.length>0&&parseInt(r.FORCE_HYPERLINK,10)===0)}if(o("no-hyperlink")||o("no-hyperlinks")||o("hyperlink=false")||o("hyperlink=never")){return false}if(o("hyperlink=true")||o("hyperlink=always")){return true}if("NETLIFY"in r){return true}if(!n.supportsColor(e)){return false}if(e&&!e.isTTY){return false}if(process.platform==="win32"){return false}if("CI"in r){return false}if("TEAMCITY_VERSION"in r){return false}if("TERM_PROGRAM"in r){const e=parseVersion(r.TERM_PROGRAM_VERSION);switch(r.TERM_PROGRAM){case"iTerm.app":if(e.major===3){return e.minor>=1}return e.major>3;case"WezTerm":return e.major>=20200620;case"vscode":return e.major>1||e.major===1&&e.minor>=72}}if("VTE_VERSION"in r){if(r.VTE_VERSION==="0.50.0"){return false}const e=parseVersion(r.VTE_VERSION);return e.major>0||e.minor>=50}return false}e.exports={supportsHyperlink:supportsHyperlink,stdout:supportsHyperlink(process.stdout),stderr:supportsHyperlink(process.stderr)}},37:function(e){e.exports=require("os")},224:function(e){e.exports=require("tty")}};var r={};function __nccwpck_require__(t){var n=r[t];if(n!==undefined){return n.exports}var o=r[t]={exports:{}};var i=true;try{e[t](o,o.exports,__nccwpck_require__);i=false}finally{if(i)delete r[t]}return o.exports}!function(){__nccwpck_require__.d=function(e,r){for(var t in r){if(__nccwpck_require__.o(r,t)&&!__nccwpck_require__.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:r[t]})}}}}();!function(){__nccwpck_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)}}();!function(){__nccwpck_require__.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}}();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t={};!function(){__nccwpck_require__.r(t);__nccwpck_require__.d(t,{default:function(){return terminalLink}});const e="[";const r="]";const n="";const o=";";const i=process.env.TERM_PROGRAM==="Apple_Terminal";const s={};s.cursorTo=(r,t)=>{if(typeof r!=="number"){throw new TypeError("The `x` argument is required")}if(typeof t!=="number"){return e+(r+1)+"G"}return e+(t+1)+";"+(r+1)+"H"};s.cursorMove=(r,t)=>{if(typeof r!=="number"){throw new TypeError("The `x` argument is required")}let n="";if(r<0){n+=e+-r+"D"}else if(r>0){n+=e+r+"C"}if(t<0){n+=e+-t+"A"}else if(t>0){n+=e+t+"B"}return n};s.cursorUp=(r=1)=>e+r+"A";s.cursorDown=(r=1)=>e+r+"B";s.cursorForward=(r=1)=>e+r+"C";s.cursorBackward=(r=1)=>e+r+"D";s.cursorLeft=e+"G";s.cursorSavePosition=i?"7":e+"s";s.cursorRestorePosition=i?"8":e+"u";s.cursorGetPosition=e+"6n";s.cursorNextLine=e+"E";s.cursorPrevLine=e+"F";s.cursorHide=e+"?25l";s.cursorShow=e+"?25h";s.eraseLines=e=>{let r="";for(let t=0;t<e;t++){r+=s.eraseLine+(t<e-1?s.cursorUp():"")}if(e){r+=s.cursorLeft}return r};s.eraseEndLine=e+"K";s.eraseStartLine=e+"1K";s.eraseLine=e+"2K";s.eraseDown=e+"J";s.eraseUp=e+"1J";s.eraseScreen=e+"2J";s.scrollUp=e+"S";s.scrollDown=e+"T";s.clearScreen="c";s.clearTerminal=process.platform==="win32"?`${s.eraseScreen}${e}0f`:`${s.eraseScreen}${e}3J${e}H`;s.beep=n;s.link=(e,t)=>[r,"8",o,o,t,n,e,r,"8",o,o,n].join("");s.image=(e,t={})=>{let o=`${r}1337;File=inline=1`;if(t.width){o+=`;width=${t.width}`}if(t.height){o+=`;height=${t.height}`}if(t.preserveAspectRatio===false){o+=";preserveAspectRatio=0"}return o+":"+e.toString("base64")+n};s.iTerm={setCwd:(e=process.cwd())=>`${r}50;CurrentDir=${e}${n}`,annotation:(e,t={})=>{let o=`${r}1337;`;const i=typeof t.x!=="undefined";const s=typeof t.y!=="undefined";if((i||s)&&!(i&&s&&typeof t.length!=="undefined")){throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined")}e=e.replace(/\|/g,"");o+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=";if(t.length>0){o+=(i?[e,t.length,t.x,t.y]:[t.length,e]).join("|")}else{o+=e}return o+n}};var u=s;var a=__nccwpck_require__(164);function terminalLink(e,r,{target:t="stdout",...n}={}){if(!a[t]){if(n.fallback===false){return e}return typeof n.fallback==="function"?n.fallback(e,r):`${e} (${r})`}return u.link(e,r)}terminalLink.isSupported=a.stdout;terminalLink.stderr=(e,r,t={})=>terminalLink(e,r,{target:"stderr",...t});terminalLink.stderr.isSupported=a.stderr}();module.exports=t})();