standard-log-color 11.4.0 → 11.5.0

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.
@@ -18,7 +18,7 @@ function createCssFormatter(options) {
18
18
  var _a = (0, unpartial_1.required)({
19
19
  maxColor: 20,
20
20
  timestamp: 'none',
21
- style: 'padding: 2px; margin: 2px; line-height: 1.8em;'
21
+ style: 'padding: 2px; line-height: 1rem;'
22
22
  }, options), maxColor = _a.maxColor, timestamp = _a.timestamp, style = _a.style;
23
23
  var loggerMap = Object.create(null);
24
24
  var colorMap = (0, color_map_1.createColorsFromMap)(colors_js_1.rainbow, maxColor);
@@ -1 +1 @@
1
- {"version":3,"file":"cssFormatter.js","sourceRoot":"","sources":["../../ts/css/cssFormatter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAkE;AAClE,6CAAiE;AACjE,uCAAoC;AAEpC,yCAAqC;AAErC,SAAgB,kBAAkB,CAAC,OAA6B;IACxD,IAAA,KAAiC,IAAA,oBAAQ,EAAC;QAC9C,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,MAAM;QACjB,KAAK,EAAE,gDAAgD;KACxD,EAAE,OAAO,CAAC,EAJH,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAE,KAAK,WAIvB,CAAA;IACX,IAAM,SAAS,GAAwB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC1D,IAAM,QAAQ,GAAW,IAAA,+BAAmB,EAAC,mBAAO,EAAE,QAAQ,CAAC,CAAA;IAC/D,IAAI,KAAK,GAAG,CAAC,CAAA;IAEb,IAAM,kBAAkB,GAAG,IAAA,uCAAwB,EAAC,SAAS,CAAC,CAAA;IAE9D,OAAO,SAAS,YAAY,CAAC,KAAe;QAC1C,IAAI,KAAK,GAAG,aAAM,KAAK,CAAC,EAAE,MAAG,CAAA;QAC7B,IAAI,IAAW,CAAA;QACf,IAAI,uBAAuB,CAAC,KAAK,CAAC,IAAI,CAAC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EAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAC1B,CAAC","sourcesContent":["import { createColorsFromMap, RGB, RGBA, rgbHex } from 'color-map'\nimport { createTimestampFormatter, LogEntry } from 'standard-log'\nimport { required } from 'unpartial'\nimport type { CssFormatterOptions } from '../types.js'\nimport { rainbow } from './colors.js'\n\nexport function createCssFormatter(options?: CssFormatterOptions) {\n const { maxColor, timestamp, style } = required({\n maxColor: 20,\n timestamp: 'none',\n style: 'padding: 2px; margin: 2px; line-height: 1.8em;'\n }, options)\n const loggerMap: Record<string, RGB> = Object.create(null)\n const colorMap: RGBA[] = createColorsFromMap(rainbow, maxColor)\n let count = 0\n\n const timestampFormatter = createTimestampFormatter(timestamp)\n\n return function cssFormatter(entry: LogEntry) {\n let idStr = `%c ${entry.id} `\n let args: any[]\n if (firstArgIsColorTemplate(entry.args)) {\n idStr += entry.args[0]\n args = [...entry.args.slice(1)]\n }\n else {\n args = [...entry.args]\n }\n const rgb = getRgb(entry.id)\n const background = rgbHex(rgb)\n const border = rgbHex(rgb.map(x => Math.max(0, x - 32)) as RGB)\n const color = getForegroundColor(rgb)\n const result = [\n idStr,\n `${style}background: ${background};border: 1px solid ${border};color: ${color};`,\n ...args\n ]\n const t = timestampFormatter(entry.timestamp)\n if (t !== undefined) result.push(t)\n return result\n }\n\n function firstArgIsColorTemplate(args: any[]) {\n return typeof args[0] === 'string' && args[0].indexOf('%c') !== -1\n }\n\n function getRgb(id: string) {\n return loggerMap[id] = loggerMap[id] || colorMap[count++ & maxColor]\n }\n}\n\nconst gammaMap = {\n rc: 0.2126,\n gc: 0.7152,\n bc: 0.0722,\n lowc: 1 / 12.92\n}\n\nfunction getForegroundColor(background: RGB) {\n // Setting the contrasting color as default\n let color = getComplementary(background)\n const bgLuminance = getRelativeLuminance(background)\n const fgLuminance = (color === '#ffffff') ?\n getRelativeLuminance([255, 255, 255]) :\n getRelativeLuminance([0, 0, 0])\n const relativeL = bgLuminance > fgLuminance ? (bgLuminance + 0.05) / (fgLuminance + 0.05) : (fgLuminance + 0.05) / (bgLuminance + 0.05)\n\n // Can set the contrast ratio based on text size later.\n if (relativeL < 4.5) {\n const avgLuminance = background[0] * gammaMap['rc'] + background[1] * gammaMap['gc'] + background[2] * gammaMap['bc']\n\n // If the relative contrast is lower than standard, we switch color to black/white\n color = (avgLuminance < 220) ? '#ffffff' : '#000000'\n }\n return color\n}\n\nfunction getRelativeLuminance(rgb: RGB) {\n // https://www.w3.org/TR/WCAG/#relativeluminancedef\n const rsrgb = rgb[0] / 255\n const gsrgb = rgb[1] / 255\n const bsrgb = rgb[2] / 255\n\n const r = rsrgb <= 0.03928 ? rsrgb * gammaMap['lowc'] : Math.pow((rsrgb + 0.055) / 1.055, 2.4)\n const g = gsrgb <= 0.03928 ? gsrgb * gammaMap['lowc'] : Math.pow((gsrgb + 0.055) / 1.055, 2.4)\n const b = bsrgb <= 0.03928 ? bsrgb * gammaMap['lowc'] : Math.pow((bsrgb + 0.055) / 1.055, 2.4)\n\n return r * gammaMap['rc'] + g * gammaMap['gc'] + b * gammaMap['bc']\n}\n\nfunction getComplementary(rgb: RGB) {\n const r = 255 - rgb[0]\n const g = 255 - rgb[1]\n const b = 255 - rgb[2]\n return rgbHex([r, g, b])\n}\n"]}
1
+ {"version":3,"file":"cssFormatter.js","sourceRoot":"","sources":["../../ts/css/cssFormatter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAkE;AAClE,6CAAiE;AACjE,uCAAoC;AAEpC,yCAAqC;AAErC,SAAgB,kBAAkB,CAAC,OAA6B;IACxD,IAAA,KAAiC,IAAA,oBAAQ,EAAC;QAC9C,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,MAAM;QACjB,KAAK,EAAE,kCAAkC;KAC1C,EAAE,OAAO,CAAC,EAJH,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAE,KAAK,WAIvB,CAAA;IACX,IAAM,SAAS,GAAwB,MAAM,CAAC,MAAM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CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;AACrE,CAAC;AAED,SAAS,gBAAgB,CAAC,GAAQ;IAChC,IAAM,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAA;IACtB,IAAM,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAA;IACtB,IAAM,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAA;IACtB,OAAO,IAAA,kBAAM,EAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAC1B,CAAC","sourcesContent":["import { createColorsFromMap, RGB, RGBA, rgbHex } from 'color-map'\nimport { createTimestampFormatter, LogEntry } from 'standard-log'\nimport { required } from 'unpartial'\nimport type { CssFormatterOptions } from '../types.js'\nimport { rainbow } from './colors.js'\n\nexport function createCssFormatter(options?: CssFormatterOptions) {\n const { maxColor, timestamp, style } = required({\n maxColor: 20,\n timestamp: 'none',\n style: 'padding: 2px; line-height: 1rem;'\n }, options)\n const loggerMap: Record<string, RGB> = Object.create(null)\n const colorMap: RGBA[] = createColorsFromMap(rainbow, maxColor)\n let count = 0\n\n const timestampFormatter = createTimestampFormatter(timestamp)\n\n return function cssFormatter(entry: LogEntry) {\n let idStr = `%c ${entry.id} `\n let args: any[]\n if (firstArgIsColorTemplate(entry.args)) {\n idStr += entry.args[0]\n args = [...entry.args.slice(1)]\n }\n else {\n args = [...entry.args]\n }\n const rgb = getRgb(entry.id)\n const background = rgbHex(rgb)\n const border = rgbHex(rgb.map(x => Math.max(0, x - 32)) as RGB)\n const color = getForegroundColor(rgb)\n const result = [\n idStr,\n `${style}background: ${background};border: 1px solid ${border};color: ${color};`,\n ...args\n ]\n const t = timestampFormatter(entry.timestamp)\n if (t !== undefined) result.push(t)\n return result\n }\n\n function firstArgIsColorTemplate(args: any[]) {\n return typeof args[0] === 'string' && args[0].indexOf('%c') !== -1\n }\n\n function getRgb(id: string) {\n return loggerMap[id] = loggerMap[id] || colorMap[count++ & maxColor]\n }\n}\n\nconst gammaMap = {\n rc: 0.2126,\n gc: 0.7152,\n bc: 0.0722,\n lowc: 1 / 12.92\n}\n\nfunction getForegroundColor(background: RGB) {\n // Setting the contrasting color as default\n let color = getComplementary(background)\n const bgLuminance = getRelativeLuminance(background)\n const fgLuminance = (color === '#ffffff') ?\n getRelativeLuminance([255, 255, 255]) :\n getRelativeLuminance([0, 0, 0])\n const relativeL = bgLuminance > fgLuminance ? (bgLuminance + 0.05) / (fgLuminance + 0.05) : (fgLuminance + 0.05) / (bgLuminance + 0.05)\n\n // Can set the contrast ratio based on text size later.\n if (relativeL < 4.5) {\n const avgLuminance = background[0] * gammaMap['rc'] + background[1] * gammaMap['gc'] + background[2] * gammaMap['bc']\n\n // If the relative contrast is lower than standard, we switch color to black/white\n color = (avgLuminance < 220) ? '#ffffff' : '#000000'\n }\n return color\n}\n\nfunction getRelativeLuminance(rgb: RGB) {\n // https://www.w3.org/TR/WCAG/#relativeluminancedef\n const rsrgb = rgb[0] / 255\n const gsrgb = rgb[1] / 255\n const bsrgb = rgb[2] / 255\n\n const r = rsrgb <= 0.03928 ? rsrgb * gammaMap['lowc'] : Math.pow((rsrgb + 0.055) / 1.055, 2.4)\n const g = gsrgb <= 0.03928 ? gsrgb * gammaMap['lowc'] : Math.pow((gsrgb + 0.055) / 1.055, 2.4)\n const b = bsrgb <= 0.03928 ? bsrgb * gammaMap['lowc'] : Math.pow((bsrgb + 0.055) / 1.055, 2.4)\n\n return r * gammaMap['rc'] + g * gammaMap['gc'] + b * gammaMap['bc']\n}\n\nfunction getComplementary(rgb: RGB) {\n const r = 255 - rgb[0]\n const g = 255 - rgb[1]\n const b = 255 - rgb[2]\n return rgbHex([r, g, b])\n}\n"]}
@@ -1,2 +1,2 @@
1
- var StandardLogColor;!function(){"use strict";var e={12:function(e){const r=function(){const e=/(Chrome|Chromium)\/(?<chromeVersion>\d+)\./.exec(navigator.userAgent);if(e)return Number.parseInt(e.groups.chromeVersion,10)}()>=69&&{level:1,hasBasic:!0,has256:!1,has16m:!1};e.exports={stdout:r,stderr:r}},758:function(e,r,t){var o=this&&this.__spreadArray||function(e,r,t){if(t||2===arguments.length)for(var o,n=0,i=r.length;n<i;n++)!o&&n in r||(o||(o=Array.prototype.slice.call(r,0,n)),o[n]=r[n]);return e.concat(o||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.createAnsiFormatter=void 0;var n=t(616),i=t(35),a=t(174),u=t(721);function A(e){var r=function(e){return c[e]=c[e]||N.list[N.counter++%N.list.length]}(e);return(0,u.wrapAnsi)(" ".concat(e," "),r)}r.createAnsiFormatter=function(e){void 0===e&&(e={timestamp:"none"});var r=(0,n.createTimestampFormatter)(e.timestamp);return function(e){var t=(0,n.toConsoleMethod)(e.level),N=function(e,r){var t=(0,i.supportColor)();return function(e){switch(e){case i.ColorLevels.DISABLED:return function(e){return e};case i.ColorLevels.BASIC:return A;case i.ColorLevels.ANSI:return _;case i.ColorLevels.TRUE:return l}}("error"===e?t.stderr:t.stdout)(r)}(t,e.id),c=function(e,r,t){var n=o([],t.args,!0),i=e(t.timestamp);void 0!==i&&n.push(i);var A="error"===r?[a.ANSI_RED+a.ANSI_FOREGROUND]:"warn"===r?[a.ANSI_YELLOW+a.ANSI_FOREGROUND]:void 0;return A?n.map((function(e){return(0,u.wrapAnsi)(e,A)})):n}(r,t,e);return o([N],c,!0)}};var N={counter:0,list:[[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_RED+a.ANSI_BACKGROUND],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_GREEN+a.ANSI_BACKGROUND],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_YELLOW+a.ANSI_BACKGROUND],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLUE+a.ANSI_BACKGROUND],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_MAGENTA+a.ANSI_BACKGROUND],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_CYAN+a.ANSI_BACKGROUND],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLACK+a.ANSI_BACKGROUND],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_RED+a.ANSI_BACKGROUND,a.ANSI_BRIGHT],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_GREEN+a.ANSI_BACKGROUND,a.ANSI_BRIGHT],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_YELLOW+a.ANSI_BACKGROUND,a.ANSI_BRIGHT],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLUE+a.ANSI_BACKGROUND,a.ANSI_BRIGHT],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_MAGENTA+a.ANSI_BACKGROUND,a.ANSI_BRIGHT],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_CYAN+a.ANSI_BACKGROUND,a.ANSI_BRIGHT],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLACK+a.ANSI_BACKGROUND,a.ANSI_BRIGHT],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_RED+a.ANSI_BACKGROUND,a.ANSI_UNDERSCORE],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_GREEN+a.ANSI_BACKGROUND,a.ANSI_UNDERSCORE],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_YELLOW+a.ANSI_BACKGROUND,a.ANSI_UNDERSCORE],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLUE+a.ANSI_BACKGROUND,a.ANSI_UNDERSCORE],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_MAGENTA+a.ANSI_BACKGROUND,a.ANSI_UNDERSCORE],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_CYAN+a.ANSI_BACKGROUND,a.ANSI_UNDERSCORE],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLACK+a.ANSI_BACKGROUND,a.ANSI_UNDERSCORE],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_RED+a.ANSI_BACKGROUND,a.ANSI_BRIGHT,a.ANSI_UNDERSCORE],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_GREEN+a.ANSI_BACKGROUND,a.ANSI_BRIGHT,a.ANSI_UNDERSCORE],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_YELLOW+a.ANSI_BACKGROUND,a.ANSI_BRIGHT,a.ANSI_UNDERSCORE],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLUE+a.ANSI_BACKGROUND,a.ANSI_BRIGHT,a.ANSI_UNDERSCORE],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_MAGENTA+a.ANSI_BACKGROUND,a.ANSI_BRIGHT,a.ANSI_UNDERSCORE],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_CYAN+a.ANSI_BACKGROUND,a.ANSI_BRIGHT,a.ANSI_UNDERSCORE],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLACK+a.ANSI_BACKGROUND,a.ANSI_BRIGHT,a.ANSI_UNDERSCORE]]},c=Object.create(null);function _(e){return A(e)}function l(e){return A(e)}},174:function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ANSI_BACKGROUND=r.ANSI_FOREGROUND=r.ANSI_UNDERSCORE=r.ANSI_BRIGHT=r.ANSI_WHITE=r.ANSI_CYAN=r.ANSI_MAGENTA=r.ANSI_BLUE=r.ANSI_YELLOW=r.ANSI_GREEN=r.ANSI_RED=r.ANSI_BLACK=void 0,r.ANSI_BLACK=0,r.ANSI_RED=1,r.ANSI_GREEN=2,r.ANSI_YELLOW=3,r.ANSI_BLUE=4,r.ANSI_MAGENTA=5,r.ANSI_CYAN=6,r.ANSI_WHITE=7,r.ANSI_BRIGHT=1,r.ANSI_UNDERSCORE=4,r.ANSI_FOREGROUND=30,r.ANSI_BACKGROUND=40},373:function(e,r,t){var o=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var n=Object.getOwnPropertyDescriptor(r,t);n&&!("get"in n?!r.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,n)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),n=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||o(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),n(t(758),r),n(t(174),r),n(t(721),r)},721:function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapAnsi=void 0,r.wrapAnsi=function(e,r){return"[".concat(r.join(";"),"m").concat(e,"")}},578:function(e,r,t){Object.defineProperty(r,"__esModule",{value:!0}),r.createColorLogReporter=void 0;var o=t(616),n=t(338),i=t(84);r.createColorLogReporter=function(e){return(0,o.createConsoleLogReporter)((0,n.unpartial)({formatter:"renderer"===(null===(r=null===window||void 0===window?void 0:window.process)||void 0===r?void 0:r.type)||(null===(t=null===window||void 0===window?void 0:window.process)||void 0===t?void 0:t.__nwjs)||!(null===(a=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===a?void 0:a.toLowerCase().match(/(edge|trident)\/(\d+)/))&&((null===(A=null===(u=null===document||void 0===document?void 0:document.documentElement)||void 0===u?void 0:u.style)||void 0===A?void 0:A.WebkitAppearance)||(null===(N=null===window||void 0===window?void 0:window.console)||void 0===N?void 0:N.firebug)||(null===(c=null===window||void 0===window?void 0:window.console)||void 0===c?void 0:c.exception)&&(null===(_=null===window||void 0===window?void 0:window.console)||void 0===_?void 0:_.table)||(null===(l=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===l?void 0:l.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(RegExp.$1,10)>=31||(null===(I=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===I?void 0:I.toLowerCase().match(/applewebkit\/(\d+)/)))?(0,i.createCssFormatter)(null==e?void 0:e.cssFormatterOptions):o.consoleFormatter},e));var r,t,a,u,A,N,c,_,l,I}},544:function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.rainbow=void 0,r.rainbow=[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}]},528:function(e,r,t){var o=this&&this.__spreadArray||function(e,r,t){if(t||2===arguments.length)for(var o,n=0,i=r.length;n<i;n++)!o&&n in r||(o||(o=Array.prototype.slice.call(r,0,n)),o[n]=r[n]);return e.concat(o||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.createCssFormatter=void 0;var n=t(911),i=t(616),a=t(338),u=t(544);r.createCssFormatter=function(e){var r=(0,a.required)({maxColor:20,timestamp:"none",style:"padding: 2px; margin: 2px; line-height: 1.8em;"},e),t=r.maxColor,_=r.timestamp,I=r.style,S=Object.create(null),d=(0,n.createColorsFromMap)(u.rainbow,t),s=0,O=(0,i.createTimestampFormatter)(_);return function(e){var r,i="%c ".concat(e.id," ");!function(e){return"string"==typeof e[0]&&-1!==e[0].indexOf("%c")}(e.args)?r=o([],e.args,!0):(i+=e.args[0],r=o([],e.args.slice(1),!0));var a,u=(a=e.id,S[a]=S[a]||d[s++&t]),_=(0,n.rgbHex)(u),f=(0,n.rgbHex)(u.map((function(e){return Math.max(0,e-32)}))),R=function(e){var r=function(e){var r=255-e[0],t=255-e[1],o=255-e[2];return(0,n.rgbHex)([r,t,o])}(e),t=l(e),o=l("#ffffff"===r?[255,255,255]:[0,0,0]);return(t>o?(t+.05)/(o+.05):(o+.05)/(t+.05))<4.5&&(r=e[0]*A+e[1]*N+e[2]*c<220?"#ffffff":"#000000"),r}(u),v=o([i,"".concat(I,"background: ").concat(_,";border: 1px solid ").concat(f,";color: ").concat(R,";")],r,!0),p=O(e.timestamp);return void 0!==p&&v.push(p),v}};var A=.2126,N=.7152,c=.0722,_=1/12.92;function l(e){var r=e[0]/255,t=e[1]/255,o=e[2]/255,n=r<=.03928?r*_:Math.pow((r+.055)/1.055,2.4),i=t<=.03928?t*_:Math.pow((t+.055)/1.055,2.4),a=o<=.03928?o*_:Math.pow((o+.055)/1.055,2.4);return n*A+i*N+a*c}},84:function(e,r,t){var o=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var n=Object.getOwnPropertyDescriptor(r,t);n&&!("get"in n?!r.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,n)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),n=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||o(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),n(t(528),r)},744:function(e,r,t){var o=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var n=Object.getOwnPropertyDescriptor(r,t);n&&!("get"in n?!r.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,n)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),n=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||o(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),n(t(373),r),n(t(578),r),n(t(84),r)},35:function(e,r,t){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.supportColor=r.ColorLevels=void 0;var n,i,a=o(t(12));!function(e){e[e.DISABLED=0]="DISABLED",e[e.BASIC=1]="BASIC",e[e.ANSI=2]="ANSI",e[e.TRUE=3]="TRUE"}(n=r.ColorLevels||(r.ColorLevels={})),r.supportColor=function(){return i=i||{stderr:a.default.stderr?a.default.stderr.level:n.DISABLED,stdout:a.default.stdout?a.default.stdout.level:n.DISABLED}}},616:function(e){e.exports=StandardLog},324:function(e,r){var t=this&&this.__spreadArray||function(e,r,t){if(t||2===arguments.length)for(var o,n=0,i=r.length;n<i;n++)!o&&n in r||(o||(o=Array.prototype.slice.call(r,0,n)),o[n]=r[n]);return e.concat(o||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.createColors=void 0,r.createColors=function(e,r,o,n){void 0===n&&(n=[4===e.length?e[3]:4===r.length?r[3]:1,4===r.length?r[3]:4===e.length?e[3]:1]);var i=t([],e,!0),a=[r[0]-e[0],r[1]-e[1],r[2]-e[2],n[1]-n[0]];3===i.length&&i.push(n[0]);for(var u=1/Math.max(o-1,1),A=[],N=0;N<o;N++){var c=[Math.round(i[0]+N*a[0]*u),Math.round(i[1]+N*a[1]*u),Math.round(i[2]+N*a[2]*u),i[3]+N*a[3]*u];A.push(c)}return A}},394:function(e,r,t){Object.defineProperty(r,"__esModule",{value:!0}),r.createColorsFromMap=void 0;var o=t(324);r.createColorsFromMap=function(e,r,t){if(r<e.length)throw new Error("Requires at least ".concat(e.length," shades."));for(var n=[],i=[],a=0;a<e.length;a++)i.push(Math.round(e[a].index*r));for(a=0;a<e.length-1;a++){var u=i[a+1]-i[a],A=e[a].rgb,N=e[a+1].rgb;n.push.apply(n,(0,o.createColors)(A,N,u,t))}return n}},911:function(e,r,t){var o=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var n=Object.getOwnPropertyDescriptor(r,t);n&&!("get"in n?!r.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,n)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),n=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||o(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),n(t(324),r),n(t(394),r),n(t(56),r),n(t(869),r)},56:function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.rgbHex=void 0,r.rgbHex=function(e){for(var r,t="#",o=0;o<3;o++)t+=(void 0,(r=(+e[o]).toString(16)).length<2?"0"+r:r);return t}},869:function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.rgbaString=void 0,r.rgbaString=function(e){return"rgba("+e.join(",")+")"}},338:function(e,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},t.apply(this,arguments)},o=this&&this.__spreadArray||function(e,r,t){if(t||2===arguments.length)for(var o,n=0,i=r.length;n<i;n++)!o&&n in r||(o||(o=Array.prototype.slice.call(r,0,n)),o[n]=r[n]);return e.concat(o||Array.prototype.slice.call(r))};function n(e,r,t){return i([e,r,t],(function(e,r){return a(e,r)}))}function i(e,r){return void 0===e[0]||null===e[0]?e[0]:e.filter((function(e){return!!e})).reduce(r,{})}function a(e,r){return"object"!=typeof e||null===e?void 0!==r?r:e:Array.isArray(e)?Array.isArray(r)?r:void 0===r?o([],e,!0):o(o([],e,!0),[r],!1):u(e).concat(u(r)).reduce((function(t,o){return t[o]=a(e[o],r&&r[o]),t}),{})}function u(e,r){if(void 0===r&&(r=!1),"object"!=typeof e)return[];var t=Object.getOwnPropertyNames(e),o=r?t.filter((function(e){return"constructor"!==e})):t,n=Object.getPrototypeOf(e);return n!==Object.prototype?o.concat(u(n,!0)):o}function A(e){return null!=e}Object.defineProperty(r,"__esModule",{value:!0}),r.unpartialRecursively=r.unpartial=r.requiredDeep=r.required=void 0,r.required=function(e,r,o){return i([e,r,o],(function(e,r){return t(t({},e),r)}))},r.requiredDeep=n,r.unpartial=function(e,r,o){return null==e?e:[e,r,o].filter(A).reduce((function(e,r){return t(t({},e),(o=r,Object.keys(o).reduce((function(e,r){return A(o[r])&&(e[r]=o[r]),e}),{})));var o}),{})},r.unpartialRecursively=function(e,r,t){return n(e,r,t)}}},r={},t=function t(o){var n=r[o];if(void 0!==n)return n.exports;var i=r[o]={exports:{}};return e[o].call(i.exports,i,i.exports,t),i.exports}(744);StandardLogColor=t}();
1
+ var StandardLogColor;!function(){"use strict";var e={12:function(e){const r=function(){const e=/(Chrome|Chromium)\/(?<chromeVersion>\d+)\./.exec(navigator.userAgent);if(e)return Number.parseInt(e.groups.chromeVersion,10)}()>=69&&{level:1,hasBasic:!0,has256:!1,has16m:!1};e.exports={stdout:r,stderr:r}},758:function(e,r,t){var o=this&&this.__spreadArray||function(e,r,t){if(t||2===arguments.length)for(var o,n=0,i=r.length;n<i;n++)!o&&n in r||(o||(o=Array.prototype.slice.call(r,0,n)),o[n]=r[n]);return e.concat(o||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.createAnsiFormatter=void 0;var n=t(616),i=t(35),a=t(174),u=t(721);function A(e){var r=function(e){return c[e]=c[e]||N.list[N.counter++%N.list.length]}(e);return(0,u.wrapAnsi)(" ".concat(e," "),r)}r.createAnsiFormatter=function(e){void 0===e&&(e={timestamp:"none"});var r=(0,n.createTimestampFormatter)(e.timestamp);return function(e){var t=(0,n.toConsoleMethod)(e.level),N=function(e,r){var t=(0,i.supportColor)();return function(e){switch(e){case i.ColorLevels.DISABLED:return function(e){return e};case i.ColorLevels.BASIC:return A;case i.ColorLevels.ANSI:return _;case i.ColorLevels.TRUE:return l}}("error"===e?t.stderr:t.stdout)(r)}(t,e.id),c=function(e,r,t){var n=o([],t.args,!0),i=e(t.timestamp);void 0!==i&&n.push(i);var A="error"===r?[a.ANSI_RED+a.ANSI_FOREGROUND]:"warn"===r?[a.ANSI_YELLOW+a.ANSI_FOREGROUND]:void 0;return A?n.map((function(e){return(0,u.wrapAnsi)(e,A)})):n}(r,t,e);return o([N],c,!0)}};var N={counter:0,list:[[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_RED+a.ANSI_BACKGROUND],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_GREEN+a.ANSI_BACKGROUND],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_YELLOW+a.ANSI_BACKGROUND],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLUE+a.ANSI_BACKGROUND],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_MAGENTA+a.ANSI_BACKGROUND],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_CYAN+a.ANSI_BACKGROUND],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLACK+a.ANSI_BACKGROUND],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_RED+a.ANSI_BACKGROUND,a.ANSI_BRIGHT],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_GREEN+a.ANSI_BACKGROUND,a.ANSI_BRIGHT],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_YELLOW+a.ANSI_BACKGROUND,a.ANSI_BRIGHT],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLUE+a.ANSI_BACKGROUND,a.ANSI_BRIGHT],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_MAGENTA+a.ANSI_BACKGROUND,a.ANSI_BRIGHT],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_CYAN+a.ANSI_BACKGROUND,a.ANSI_BRIGHT],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLACK+a.ANSI_BACKGROUND,a.ANSI_BRIGHT],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_RED+a.ANSI_BACKGROUND,a.ANSI_UNDERSCORE],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_GREEN+a.ANSI_BACKGROUND,a.ANSI_UNDERSCORE],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_YELLOW+a.ANSI_BACKGROUND,a.ANSI_UNDERSCORE],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLUE+a.ANSI_BACKGROUND,a.ANSI_UNDERSCORE],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_MAGENTA+a.ANSI_BACKGROUND,a.ANSI_UNDERSCORE],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_CYAN+a.ANSI_BACKGROUND,a.ANSI_UNDERSCORE],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLACK+a.ANSI_BACKGROUND,a.ANSI_UNDERSCORE],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_RED+a.ANSI_BACKGROUND,a.ANSI_BRIGHT,a.ANSI_UNDERSCORE],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_GREEN+a.ANSI_BACKGROUND,a.ANSI_BRIGHT,a.ANSI_UNDERSCORE],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_YELLOW+a.ANSI_BACKGROUND,a.ANSI_BRIGHT,a.ANSI_UNDERSCORE],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLUE+a.ANSI_BACKGROUND,a.ANSI_BRIGHT,a.ANSI_UNDERSCORE],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_MAGENTA+a.ANSI_BACKGROUND,a.ANSI_BRIGHT,a.ANSI_UNDERSCORE],[a.ANSI_BLACK+a.ANSI_FOREGROUND,a.ANSI_CYAN+a.ANSI_BACKGROUND,a.ANSI_BRIGHT,a.ANSI_UNDERSCORE],[a.ANSI_WHITE+a.ANSI_FOREGROUND,a.ANSI_BLACK+a.ANSI_BACKGROUND,a.ANSI_BRIGHT,a.ANSI_UNDERSCORE]]},c=Object.create(null);function _(e){return A(e)}function l(e){return A(e)}},174:function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ANSI_BACKGROUND=r.ANSI_FOREGROUND=r.ANSI_UNDERSCORE=r.ANSI_BRIGHT=r.ANSI_WHITE=r.ANSI_CYAN=r.ANSI_MAGENTA=r.ANSI_BLUE=r.ANSI_YELLOW=r.ANSI_GREEN=r.ANSI_RED=r.ANSI_BLACK=void 0,r.ANSI_BLACK=0,r.ANSI_RED=1,r.ANSI_GREEN=2,r.ANSI_YELLOW=3,r.ANSI_BLUE=4,r.ANSI_MAGENTA=5,r.ANSI_CYAN=6,r.ANSI_WHITE=7,r.ANSI_BRIGHT=1,r.ANSI_UNDERSCORE=4,r.ANSI_FOREGROUND=30,r.ANSI_BACKGROUND=40},373:function(e,r,t){var o=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var n=Object.getOwnPropertyDescriptor(r,t);n&&!("get"in n?!r.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,n)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),n=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||o(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),n(t(758),r),n(t(174),r),n(t(721),r)},721:function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapAnsi=void 0,r.wrapAnsi=function(e,r){return"[".concat(r.join(";"),"m").concat(e,"")}},578:function(e,r,t){Object.defineProperty(r,"__esModule",{value:!0}),r.createColorLogReporter=void 0;var o=t(616),n=t(338),i=t(84);r.createColorLogReporter=function(e){return(0,o.createConsoleLogReporter)((0,n.unpartial)({formatter:"renderer"===(null===(r=null===window||void 0===window?void 0:window.process)||void 0===r?void 0:r.type)||(null===(t=null===window||void 0===window?void 0:window.process)||void 0===t?void 0:t.__nwjs)||!(null===(a=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===a?void 0:a.toLowerCase().match(/(edge|trident)\/(\d+)/))&&((null===(A=null===(u=null===document||void 0===document?void 0:document.documentElement)||void 0===u?void 0:u.style)||void 0===A?void 0:A.WebkitAppearance)||(null===(N=null===window||void 0===window?void 0:window.console)||void 0===N?void 0:N.firebug)||(null===(c=null===window||void 0===window?void 0:window.console)||void 0===c?void 0:c.exception)&&(null===(_=null===window||void 0===window?void 0:window.console)||void 0===_?void 0:_.table)||(null===(l=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===l?void 0:l.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(RegExp.$1,10)>=31||(null===(I=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===I?void 0:I.toLowerCase().match(/applewebkit\/(\d+)/)))?(0,i.createCssFormatter)(null==e?void 0:e.cssFormatterOptions):o.consoleFormatter},e));var r,t,a,u,A,N,c,_,l,I}},544:function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.rainbow=void 0,r.rainbow=[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}]},528:function(e,r,t){var o=this&&this.__spreadArray||function(e,r,t){if(t||2===arguments.length)for(var o,n=0,i=r.length;n<i;n++)!o&&n in r||(o||(o=Array.prototype.slice.call(r,0,n)),o[n]=r[n]);return e.concat(o||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.createCssFormatter=void 0;var n=t(911),i=t(616),a=t(338),u=t(544);r.createCssFormatter=function(e){var r=(0,a.required)({maxColor:20,timestamp:"none",style:"padding: 2px; line-height: 1rem;"},e),t=r.maxColor,_=r.timestamp,I=r.style,S=Object.create(null),d=(0,n.createColorsFromMap)(u.rainbow,t),s=0,O=(0,i.createTimestampFormatter)(_);return function(e){var r,i="%c ".concat(e.id," ");!function(e){return"string"==typeof e[0]&&-1!==e[0].indexOf("%c")}(e.args)?r=o([],e.args,!0):(i+=e.args[0],r=o([],e.args.slice(1),!0));var a,u=(a=e.id,S[a]=S[a]||d[s++&t]),_=(0,n.rgbHex)(u),f=(0,n.rgbHex)(u.map((function(e){return Math.max(0,e-32)}))),R=function(e){var r=function(e){var r=255-e[0],t=255-e[1],o=255-e[2];return(0,n.rgbHex)([r,t,o])}(e),t=l(e),o=l("#ffffff"===r?[255,255,255]:[0,0,0]);return(t>o?(t+.05)/(o+.05):(o+.05)/(t+.05))<4.5&&(r=e[0]*A+e[1]*N+e[2]*c<220?"#ffffff":"#000000"),r}(u),v=o([i,"".concat(I,"background: ").concat(_,";border: 1px solid ").concat(f,";color: ").concat(R,";")],r,!0),p=O(e.timestamp);return void 0!==p&&v.push(p),v}};var A=.2126,N=.7152,c=.0722,_=1/12.92;function l(e){var r=e[0]/255,t=e[1]/255,o=e[2]/255,n=r<=.03928?r*_:Math.pow((r+.055)/1.055,2.4),i=t<=.03928?t*_:Math.pow((t+.055)/1.055,2.4),a=o<=.03928?o*_:Math.pow((o+.055)/1.055,2.4);return n*A+i*N+a*c}},84:function(e,r,t){var o=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var n=Object.getOwnPropertyDescriptor(r,t);n&&!("get"in n?!r.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,n)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),n=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||o(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),n(t(528),r)},744:function(e,r,t){var o=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var n=Object.getOwnPropertyDescriptor(r,t);n&&!("get"in n?!r.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,n)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),n=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||o(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),n(t(373),r),n(t(578),r),n(t(84),r)},35:function(e,r,t){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.supportColor=r.ColorLevels=void 0;var n,i,a=o(t(12));!function(e){e[e.DISABLED=0]="DISABLED",e[e.BASIC=1]="BASIC",e[e.ANSI=2]="ANSI",e[e.TRUE=3]="TRUE"}(n=r.ColorLevels||(r.ColorLevels={})),r.supportColor=function(){return i=i||{stderr:a.default.stderr?a.default.stderr.level:n.DISABLED,stdout:a.default.stdout?a.default.stdout.level:n.DISABLED}}},616:function(e){e.exports=StandardLog},324:function(e,r){var t=this&&this.__spreadArray||function(e,r,t){if(t||2===arguments.length)for(var o,n=0,i=r.length;n<i;n++)!o&&n in r||(o||(o=Array.prototype.slice.call(r,0,n)),o[n]=r[n]);return e.concat(o||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.createColors=void 0,r.createColors=function(e,r,o,n){void 0===n&&(n=[4===e.length?e[3]:4===r.length?r[3]:1,4===r.length?r[3]:4===e.length?e[3]:1]);var i=t([],e,!0),a=[r[0]-e[0],r[1]-e[1],r[2]-e[2],n[1]-n[0]];3===i.length&&i.push(n[0]);for(var u=1/Math.max(o-1,1),A=[],N=0;N<o;N++){var c=[Math.round(i[0]+N*a[0]*u),Math.round(i[1]+N*a[1]*u),Math.round(i[2]+N*a[2]*u),i[3]+N*a[3]*u];A.push(c)}return A}},394:function(e,r,t){Object.defineProperty(r,"__esModule",{value:!0}),r.createColorsFromMap=void 0;var o=t(324);r.createColorsFromMap=function(e,r,t){if(r<e.length)throw new Error("Requires at least ".concat(e.length," shades."));for(var n=[],i=[],a=0;a<e.length;a++)i.push(Math.round(e[a].index*r));for(a=0;a<e.length-1;a++){var u=i[a+1]-i[a],A=e[a].rgb,N=e[a+1].rgb;n.push.apply(n,(0,o.createColors)(A,N,u,t))}return n}},911:function(e,r,t){var o=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var n=Object.getOwnPropertyDescriptor(r,t);n&&!("get"in n?!r.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,n)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),n=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||o(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),n(t(324),r),n(t(394),r),n(t(56),r),n(t(869),r)},56:function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.rgbHex=void 0,r.rgbHex=function(e){for(var r,t="#",o=0;o<3;o++)t+=(void 0,(r=(+e[o]).toString(16)).length<2?"0"+r:r);return t}},869:function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.rgbaString=void 0,r.rgbaString=function(e){return"rgba("+e.join(",")+")"}},338:function(e,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},t.apply(this,arguments)},o=this&&this.__spreadArray||function(e,r,t){if(t||2===arguments.length)for(var o,n=0,i=r.length;n<i;n++)!o&&n in r||(o||(o=Array.prototype.slice.call(r,0,n)),o[n]=r[n]);return e.concat(o||Array.prototype.slice.call(r))};function n(e,r,t){return i([e,r,t],(function(e,r){return a(e,r)}))}function i(e,r){return void 0===e[0]||null===e[0]?e[0]:e.filter((function(e){return!!e})).reduce(r,{})}function a(e,r){return"object"!=typeof e||null===e?void 0!==r?r:e:Array.isArray(e)?Array.isArray(r)?r:void 0===r?o([],e,!0):o(o([],e,!0),[r],!1):u(e).concat(u(r)).reduce((function(t,o){return t[o]=a(e[o],r&&r[o]),t}),{})}function u(e,r){if(void 0===r&&(r=!1),"object"!=typeof e)return[];var t=Object.getOwnPropertyNames(e),o=r?t.filter((function(e){return"constructor"!==e})):t,n=Object.getPrototypeOf(e);return n!==Object.prototype?o.concat(u(n,!0)):o}function A(e){return null!=e}Object.defineProperty(r,"__esModule",{value:!0}),r.unpartialRecursively=r.unpartial=r.requiredDeep=r.required=void 0,r.required=function(e,r,o){return i([e,r,o],(function(e,r){return t(t({},e),r)}))},r.requiredDeep=n,r.unpartial=function(e,r,o){return null==e?e:[e,r,o].filter(A).reduce((function(e,r){return t(t({},e),(o=r,Object.keys(o).reduce((function(e,r){return A(o[r])&&(e[r]=o[r]),e}),{})));var o}),{})},r.unpartialRecursively=function(e,r,t){return n(e,r,t)}}},r={},t=function t(o){var n=r[o];if(void 0!==n)return n.exports;var i=r[o]={exports:{}};return e[o].call(i.exports,i,i.exports,t),i.exports}(744);StandardLogColor=t}();
2
2
  //# sourceMappingURL=standard-log-color.es5.js.map
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"standard-log-color.es5.js","mappings":"oEAaA,MAAMA,EAVN,WACC,MAAMC,EAAU,6CAA6CC,KAAKC,UAAUC,WAE5E,GAAKH,EAIL,OAAOI,OAAOC,SAASL,EAAQM,OAAOC,cAAe,GACtD,CAEqBC,IAAsB,IAAK,CAC/CC,MAAO,EACPC,UAAU,EACVC,QAAQ,EACRC,QAAQ,GAGTC,EAAOC,QAAU,CAChBC,OAAQhB,EACRiB,OAAQjB,E,oUCtBT,aACA,QACA,SACA,SA2CA,SAASkB,EAAiBC,GACxB,IAAMC,EAyCR,SAAsBD,GACpB,OAAOE,EAAaF,GAAME,EAAaF,IAAOG,EAAWC,KAAKD,EAAWE,UAAYF,EAAWC,KAAKE,OACvG,CA3CgBC,CAAaP,GAC3B,OAAO,IAAAQ,UAAS,WAAIR,EAAE,KAAKC,EAC7B,CAxCA,+BAAoCQ,QAAA,IAAAA,IAAAA,EAAA,CAAkCC,UAAW,SAC/E,IAAMC,GAAqB,IAAAC,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AHAoM,EAAoBF,GAAUrE,KAAK9H,EAAOC,QAASD,EAAQA,EAAOC,QAASiM,GAGpElM,EAAOC,OACf,CCnB0BiM,CAAoB,K","sources":["webpack://StandardLogColor/../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js","webpack://StandardLogColor/./ts/ansi/ansiFormatter.ts","webpack://StandardLogColor/./ts/ansi/constants.ts","webpack://StandardLogColor/./ts/ansi/index.ts","webpack://StandardLogColor/./ts/ansi/wrapAnsi.ts","webpack://StandardLogColor/./ts/createColorLogReporter.browser.ts","webpack://StandardLogColor/./ts/css/colors.ts","webpack://StandardLogColor/./ts/css/cssFormatter.ts","webpack://StandardLogColor/./ts/css/index.ts","webpack://StandardLogColor/./ts/index.ts","webpack://StandardLogColor/./ts/supportColor.ts","webpack://StandardLogColor/external var \"StandardLog\"","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/cjs/createColors.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/cjs/createColorsFromMap.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/cjs/index.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/cjs/rgbHex.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/cjs/rgbaString.js","webpack://StandardLogColor/../../node_modules/.pnpm/unpartial@1.0.4/node_modules/unpartial/cjs/index.js","webpack://StandardLogColor/webpack/bootstrap","webpack://StandardLogColor/webpack/startup"],"sourcesContent":["/* eslint-env browser */\n'use strict';\n\nfunction getChromeVersion() {\n\tconst matches = /(Chrome|Chromium)\\/(?<chromeVersion>\\d+)\\./.exec(navigator.userAgent);\n\n\tif (!matches) {\n\t\treturn;\n\t}\n\n\treturn Number.parseInt(matches.groups.chromeVersion, 10);\n}\n\nconst colorSupport = getChromeVersion() >= 69 ? {\n\tlevel: 1,\n\thasBasic: true,\n\thas256: false,\n\thas16m: false\n} : false;\n\nmodule.exports = {\n\tstdout: colorSupport,\n\tstderr: colorSupport\n};\n","import { createTimestampFormatter, LogEntry, TimestampFormat, toConsoleMethod } from 'standard-log'\nimport { ColorLevels, supportColor } from '../supportColor.js'\nimport { ANSI_BACKGROUND, ANSI_BLACK, ANSI_BLUE, ANSI_BRIGHT, ANSI_CYAN, ANSI_FOREGROUND, ANSI_GREEN, ANSI_MAGENTA, ANSI_RED, ANSI_UNDERSCORE, ANSI_WHITE, ANSI_YELLOW } from './constants.js'\nimport { wrapAnsi } from './wrapAnsi.js'\n\nexport type AnsiFormatterOptions = {\n timestamp: TimestampFormat\n}\n\nexport function createAnsiFormatter(options: AnsiFormatterOptions = { timestamp: 'none' }) {\n const timestampFormatter = createTimestampFormatter(options.timestamp)\n\n return function ansiFormatter(entry: LogEntry) {\n const consoleMethod = toConsoleMethod(entry.level)\n const id = formatID(consoleMethod, entry.id)\n const args = formatArgs(timestampFormatter, consoleMethod, entry)\n return [id, ...args]\n }\n}\n\nfunction formatArgs(timestampFormatter: (timestamp: Date) => string | undefined, method: 'error' | 'warn' | 'info' | 'debug', entry: Pick<LogEntry, 'args' | 'timestamp'>) {\n const args = [...entry.args]\n const timestamp = timestampFormatter(entry.timestamp)\n if (timestamp !== undefined) args.push(timestamp)\n const textCodes = method === 'error' ? [ANSI_RED + ANSI_FOREGROUND] :\n method === 'warn' ? [ANSI_YELLOW + ANSI_FOREGROUND] : undefined\n\n return textCodes ? args.map(x => wrapAnsi(x, textCodes)) : args\n}\n\nfunction formatID(method: 'error' | 'warn' | 'info' | 'debug', id: string) {\n const colorLevels = supportColor()\n const colorLevel = method === 'error' ? colorLevels.stderr : colorLevels.stdout\n return toIDFormatter(colorLevel)(id)\n}\n\nfunction toIDFormatter(colorLevel: ColorLevels) {\n // istanbul ignore next\n switch (colorLevel) {\n case ColorLevels.DISABLED: return (id: string) => id\n case ColorLevels.BASIC: return basicIDFormatter\n case ColorLevels.ANSI: return ansiIDFormatter\n case ColorLevels.TRUE: return truecolorIDFormatter\n }\n}\n\nfunction basicIDFormatter(id: string) {\n const codes = getAnsiColor(id)\n return wrapAnsi(` ${id} `, codes)\n}\n\nconst ansiColors: {\n counter: number,\n list: Array<number[]>\n} = {\n counter: 0, list: [\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n ]\n}\nconst ansiColorMap: Record<string, number[]> = Object.create(null)\n\nfunction getAnsiColor(id: string) {\n return ansiColorMap[id] = ansiColorMap[id] || ansiColors.list[ansiColors.counter++ % ansiColors.list.length]\n}\n\n// istanbul ignore next\nfunction ansiIDFormatter(id: string) {\n return basicIDFormatter(id)\n}\n\n// istanbul ignore next\nfunction truecolorIDFormatter(id: string) {\n return basicIDFormatter(id)\n}\n","export type AnsiColor = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7\nexport const ANSI_BLACK = 0\nexport const ANSI_RED = 1\nexport const ANSI_GREEN = 2\nexport const ANSI_YELLOW = 3\nexport const ANSI_BLUE = 4\nexport const ANSI_MAGENTA = 5\nexport const ANSI_CYAN = 6\nexport const ANSI_WHITE = 7\n\nexport type AnsiStyle = 1 | 4\nexport const ANSI_BRIGHT = 1\nexport const ANSI_UNDERSCORE = 4\n\nexport const ANSI_FOREGROUND = 30\nexport const ANSI_BACKGROUND = 40\n","export * from './ansiFormatter.js'\nexport * from './constants.js'\nexport * from './wrapAnsi.js'\n","export function wrapAnsi(text: string, codes: number[]) {\n return `\\u001B[${codes.join(';')}m${text}\\u001B[0m`\n}\n","import { consoleFormatter, createConsoleLogReporter } from 'standard-log'\nimport { unpartial } from 'unpartial'\nimport { createCssFormatter } from './css/index.js'\nimport type { ColorLogReporterOptions } from './types.js'\n\nexport function createColorLogReporter(options?: ColorLogReporterOptions) {\n return createConsoleLogReporter(unpartial({\n formatter: supportCSSColorInConsole() ? createCssFormatter(options?.cssFormatterOptions) : consoleFormatter\n }, options))\n}\n\n// istanbul ignore next\nfunction supportCSSColorInConsole() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n // @ts-ignore\n if (window?.process?.type === 'renderer' || window?.process?.__nwjs) {\n return true\n }\n\n // Internet Explorer and Edge do not support colors.\n if (navigator?.userAgent?.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false\n }\n\n // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n // @ts-ignore\n return (document?.documentElement?.style?.WebkitAppearance) ||\n // Is firebug? http://stackoverflow.com/a/398120/376773\n // @ts-ignore\n (window?.console?.firebug || (window?.console?.exception && window?.console?.table)) ||\n // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator?.userAgent?.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // Double check webkit in userAgent just in case we are in a worker\n (navigator?.userAgent?.toLowerCase().match(/applewebkit\\/(\\d+)/))\n}\n","import { ColorMap } from 'color-map'\n\nexport const rainbow: ColorMap = [\n { index: 0, rgb: [150, 0, 90] },\n { index: 0.125, rgb: [0, 0, 200] },\n { index: 0.25, rgb: [0, 25, 255] },\n { index: 0.375, rgb: [0, 152, 255] },\n { index: 0.5, rgb: [44, 255, 150] },\n { index: 0.625, rgb: [151, 255, 0] },\n { index: 0.75, rgb: [255, 234, 0] },\n { index: 0.875, rgb: [255, 111, 0] },\n { index: 1, rgb: [255, 0, 0] }\n]\n","import { createColorsFromMap, RGB, RGBA, rgbHex } from 'color-map'\nimport { createTimestampFormatter, LogEntry } from 'standard-log'\nimport { required } from 'unpartial'\nimport type { CssFormatterOptions } from '../types.js'\nimport { rainbow } from './colors.js'\n\nexport function createCssFormatter(options?: CssFormatterOptions) {\n const { maxColor, timestamp, style } = required({\n maxColor: 20,\n timestamp: 'none',\n style: 'padding: 2px; margin: 2px; line-height: 1.8em;'\n }, options)\n const loggerMap: Record<string, RGB> = Object.create(null)\n const colorMap: RGBA[] = createColorsFromMap(rainbow, maxColor)\n let count = 0\n\n const timestampFormatter = createTimestampFormatter(timestamp)\n\n return function cssFormatter(entry: LogEntry) {\n let idStr = `%c ${entry.id} `\n let args: any[]\n if (firstArgIsColorTemplate(entry.args)) {\n idStr += entry.args[0]\n args = [...entry.args.slice(1)]\n }\n else {\n args = [...entry.args]\n }\n const rgb = getRgb(entry.id)\n const background = rgbHex(rgb)\n const border = rgbHex(rgb.map(x => Math.max(0, x - 32)) as RGB)\n const color = getForegroundColor(rgb)\n const result = [\n idStr,\n `${style}background: ${background};border: 1px solid ${border};color: ${color};`,\n ...args\n ]\n const t = timestampFormatter(entry.timestamp)\n if (t !== undefined) result.push(t)\n return result\n }\n\n function firstArgIsColorTemplate(args: any[]) {\n return typeof args[0] === 'string' && args[0].indexOf('%c') !== -1\n }\n\n function getRgb(id: string) {\n return loggerMap[id] = loggerMap[id] || colorMap[count++ & maxColor]\n }\n}\n\nconst gammaMap = {\n rc: 0.2126,\n gc: 0.7152,\n bc: 0.0722,\n lowc: 1 / 12.92\n}\n\nfunction getForegroundColor(background: RGB) {\n // Setting the contrasting color as default\n let color = getComplementary(background)\n const bgLuminance = getRelativeLuminance(background)\n const fgLuminance = (color === '#ffffff') ?\n getRelativeLuminance([255, 255, 255]) :\n getRelativeLuminance([0, 0, 0])\n const relativeL = bgLuminance > fgLuminance ? (bgLuminance + 0.05) / (fgLuminance + 0.05) : (fgLuminance + 0.05) / (bgLuminance + 0.05)\n\n // Can set the contrast ratio based on text size later.\n if (relativeL < 4.5) {\n const avgLuminance = background[0] * gammaMap['rc'] + background[1] * gammaMap['gc'] + background[2] * gammaMap['bc']\n\n // If the relative contrast is lower than standard, we switch color to black/white\n color = (avgLuminance < 220) ? '#ffffff' : '#000000'\n }\n return color\n}\n\nfunction getRelativeLuminance(rgb: RGB) {\n // https://www.w3.org/TR/WCAG/#relativeluminancedef\n const rsrgb = rgb[0] / 255\n const gsrgb = rgb[1] / 255\n const bsrgb = rgb[2] / 255\n\n const r = rsrgb <= 0.03928 ? rsrgb * gammaMap['lowc'] : Math.pow((rsrgb + 0.055) / 1.055, 2.4)\n const g = gsrgb <= 0.03928 ? gsrgb * gammaMap['lowc'] : Math.pow((gsrgb + 0.055) / 1.055, 2.4)\n const b = bsrgb <= 0.03928 ? bsrgb * gammaMap['lowc'] : Math.pow((bsrgb + 0.055) / 1.055, 2.4)\n\n return r * gammaMap['rc'] + g * gammaMap['gc'] + b * gammaMap['bc']\n}\n\nfunction getComplementary(rgb: RGB) {\n const r = 255 - rgb[0]\n const g = 255 - rgb[1]\n const b = 255 - rgb[2]\n return rgbHex([r, g, b])\n}\n","export * from './cssFormatter.js'\n","export * from './ansi/index.js'\nexport * from './createColorLogReporter.js'\nexport * from './css/index.js'\nexport type { ColorLogReporterOptions, CssFormatterOptions } from './types.js'\n","import sc from 'supports-color'\n\n/**\n * Color level.\n * This is the same definition as the `ColorSupportLevel` in `supports-color`.\n * Using the same definition for simplicity\n * @see https://github.com/chalk/supports-color/blob/main/index.d.ts#L19\n */\n export enum ColorLevels {\n DISABLED = 0,\n /**\n * Basic 16 colors (4-bits)\n */\n BASIC = 1,\n /**\n * ANSI 256 colors (8-bits)\n */\n ANSI = 2,\n /**\n * Truecolor 16 million colors (24-bits)\n */\n TRUE = 3\n}\n\nexport namespace supportColor {\n export type Result = { stdout: ColorLevels, stderr: ColorLevels }\n}\n\nlet value: supportColor.Result\n\n/**\n * Detects if the platform supports color.\n * For browser, the value can only be:\n * - `{ stdout: 0, stderr: 0 }`, or\n * - `{ stdout: 3, stderr: 3 }`.\n * So you only need to check one case.\n * The result value is made the same so that it can be used in all platforms.\n */\nexport function supportColor(): supportColor.Result {\n // istanbul ignore next\n return value = value || {\n stderr: sc.stderr ? sc.stderr.level : ColorLevels.DISABLED,\n stdout: sc.stdout ? sc.stdout.level : ColorLevels.DISABLED\n }\n}\n","module.exports = StandardLog;","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createColors = void 0;\nfunction createColors(from, to, shades, alpha) {\n if (alpha === void 0) { alpha = [\n from.length === 4 ? from[3] : to.length === 4 ? to[3] : 1,\n to.length === 4 ? to[3] : from.length === 4 ? from[3] : 1\n ]; }\n var start = __spreadArray([], from, true);\n var diff = [\n to[0] - from[0],\n to[1] - from[1],\n to[2] - from[2],\n alpha[1] - alpha[0]\n ];\n if (start.length === 3)\n start.push(alpha[0]);\n var inc = 1 / Math.max(shades - 1, 1);\n var rgba = [];\n for (var i = 0; i < shades; i++) {\n var color = [\n Math.round(start[0] + i * diff[0] * inc),\n Math.round(start[1] + i * diff[1] * inc),\n Math.round(start[2] + i * diff[2] * inc),\n start[3] + i * diff[3] * inc\n ];\n rgba.push(color);\n }\n return rgba;\n}\nexports.createColors = createColors;\n//# sourceMappingURL=createColors.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createColorsFromMap = void 0;\nvar createColors_js_1 = require(\"./createColors.js\");\n/**\n * Create colors with specified color map.\n */\nfunction createColorsFromMap(colormap, shades, alpha) {\n if (shades < colormap.length) {\n throw new Error(\"Requires at least \".concat(colormap.length, \" shades.\"));\n }\n var result = [];\n var steps = [];\n for (var i = 0; i < colormap.length; i++) {\n steps.push(Math.round(colormap[i].index * shades));\n }\n for (var i = 0; i < colormap.length - 1; i++) {\n var n = steps[i + 1] - steps[i];\n var from = colormap[i].rgb;\n var to = colormap[i + 1].rgb;\n result.push.apply(result, (0, createColors_js_1.createColors)(from, to, n, alpha));\n }\n return result;\n}\nexports.createColorsFromMap = createColorsFromMap;\n//# sourceMappingURL=createColorsFromMap.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./createColors.js\"), exports);\n__exportStar(require(\"./createColorsFromMap.js\"), exports);\n__exportStar(require(\"./rgbHex.js\"), exports);\n__exportStar(require(\"./rgbaString.js\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.rgbHex = void 0;\n/**\n * Convert `RGB` to `#rgb`\n * JavaScript note: no check for array length, use it properly.\n */\nfunction rgbHex(rgb) {\n var hex = '#';\n for (var i = 0; i < 3; i++) {\n hex += d2h(rgb[i]);\n }\n return hex;\n}\nexports.rgbHex = rgbHex;\nfunction d2h(d) {\n var s = (+d).toString(16);\n return s.length < 2 ? '0' + s : s;\n}\n//# sourceMappingURL=rgbHex.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.rgbaString = void 0;\nfunction rgbaString(rgba) {\n return 'rgba(' + rgba.join(',') + ')';\n}\nexports.rgbaString = rgbaString;\n//# sourceMappingURL=rgbaString.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unpartialRecursively = exports.unpartial = exports.requiredDeep = exports.required = void 0;\nfunction required(source1, source2, source3) {\n return merge([source1, source2, source3], function (p, e) {\n return __assign(__assign({}, p), e);\n });\n}\nexports.required = required;\nfunction requiredDeep(source1, source2, source3) {\n return merge([source1, source2, source3], function (p, e) { return deepmerge(p, e); });\n}\nexports.requiredDeep = requiredDeep;\nfunction merge(entries, reducer) {\n if (entries[0] === undefined || entries[0] === null)\n return entries[0];\n return entries.filter(function (x) { return !!x; }).reduce(reducer, {});\n}\nfunction deepmerge(source1, source2) {\n if (typeof source1 !== 'object' || source1 === null)\n return source2 !== undefined ? source2 : source1;\n if (Array.isArray(source1)) {\n if (Array.isArray(source2))\n return source2;\n if (source2 === undefined)\n return __spreadArray([], source1, true);\n return __spreadArray(__spreadArray([], source1, true), [source2], false);\n }\n return getAllKeys(source1).concat(getAllKeys(source2)).reduce(function (p, k) {\n // @ts-ignore\n p[k] = deepmerge(source1[k], source2 && source2[k]);\n return p;\n }, {});\n}\nfunction getAllKeys(subject, internal) {\n if (internal === void 0) { internal = false; }\n if (typeof subject !== 'object')\n return [];\n var propertyNames = Object.getOwnPropertyNames(subject);\n var keys = internal ? propertyNames.filter(function (n) { return n !== 'constructor'; }) : propertyNames;\n var proto = Object.getPrototypeOf(subject);\n return proto !== Object.prototype ? keys.concat(getAllKeys(proto, true)) : keys;\n}\nfunction unpartial(s1, s2, s3) {\n // defensive check for JS\n if (s1 === undefined || s1 === null)\n return s1;\n return [s1, s2, s3]\n .filter(notNil)\n .reduce(function (p, s) { return (__assign(__assign({}, p), trimNilProps(s))); }, {});\n}\nexports.unpartial = unpartial;\nfunction trimNilProps(value) {\n return Object.keys(value).reduce(function (p, k) {\n if (notNil(value[k]))\n p[k] = value[k];\n return p;\n }, {});\n}\nfunction notNil(value) {\n return value !== null && value !== undefined;\n}\nfunction unpartialRecursively(arg1, arg2, arg3) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return requiredDeep(arg1, arg2, arg3);\n}\nexports.unpartialRecursively = unpartialRecursively;\n//# sourceMappingURL=index.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(744);\n"],"names":["colorSupport","matches","exec","navigator","userAgent","Number","parseInt","groups","chromeVersion","getChromeVersion","level","hasBasic","has256","has16m","module","exports","stdout","stderr","basicIDFormatter","id","codes","ansiColorMap","ansiColors","list","counter","length","getAnsiColor","wrapAnsi","options","timestamp","timestampFormatter","createTimestampFormatter","entry","consoleMethod","toConsoleMethod","method","colorLevels","supportColor","colorLevel","ColorLevels","DISABLED","BASIC","ANSI","ansiIDFormatter","TRUE","truecolorIDFormatter","toIDFormatter","formatID","args","undefined","push","textCodes","ANSI_RED","ANSI_FOREGROUND","ANSI_YELLOW","map","x","formatArgs","ANSI_WHITE","ANSI_BACKGROUND","ANSI_BLACK","ANSI_GREEN","ANSI_BLUE","ANSI_MAGENTA","ANSI_CYAN","ANSI_BRIGHT","ANSI_UNDERSCORE","Object","create","text","join","createConsoleLogReporter","unpartial","formatter","window","process","type","__nwjs","toLowerCase","match","document","documentElement","style","WebkitAppearance","console","firebug","exception","table","RegExp","$1","createCssFormatter","cssFormatterOptions","consoleFormatter","rainbow","index","rgb","required","maxColor","loggerMap","colorMap","createColorsFromMap","count","idStr","indexOf","firstArgIsColorTemplate","slice","background","rgbHex","border","Math","max","color","r","g","b","getComplementary","bgLuminance","getRelativeLuminance","fgLuminance","gammaMap","getForegroundColor","result","t","rsrgb","gsrgb","bsrgb","pow","value","StandardLog","__spreadArray","this","to","from","pack","arguments","ar","i","l","Array","prototype","call","concat","defineProperty","createColors","shades","alpha","start","diff","inc","rgba","round","createColors_js_1","colormap","Error","steps","n","apply","__createBinding","o","m","k","k2","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","__exportStar","p","hasOwnProperty","s","hex","toString","rgbaString","__assign","assign","requiredDeep","source1","source2","source3","merge","e","deepmerge","entries","reducer","filter","reduce","isArray","getAllKeys","subject","internal","propertyNames","getOwnPropertyNames","keys","proto","getPrototypeOf","notNil","unpartialRecursively","s1","s2","s3","arg1","arg2","arg3","__webpack_module_cache__","__webpack_exports__","__webpack_require__","moduleId","cachedModule","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"standard-log-color.es5.js","mappings":"oEAaA,MAAMA,EAVN,WACC,MAAMC,EAAU,6CAA6CC,KAAKC,UAAUC,WAE5E,GAAKH,EAIL,OAAOI,OAAOC,SAASL,EAAQM,OAAOC,cAAe,GACtD,CAEqBC,IAAsB,IAAK,CAC/CC,MAAO,EACPC,UAAU,EACVC,QAAQ,EACRC,QAAQ,GAGTC,EAAOC,QAAU,CAChBC,OAAQhB,EACRiB,OAAQjB,E,oUCtBT,aACA,QACA,SACA,SA2CA,SAASkB,EAAiBC,GACxB,IAAMC,EAyCR,SAAsBD,GACpB,OAAOE,EAAaF,GAAME,EAAaF,IAAOG,EAAWC,KAAKD,EAAWE,UAAYF,EAAWC,KAAKE,OACvG,CA3CgBC,CAAaP,GAC3B,OAAO,IAAAQ,UAAS,WAAIR,EAAE,KAAKC,EAC7B,CAxCA,+BAAoCQ,QAAA,IAAAA,IAAAA,EAAA,CAAkCC,UAAW,SAC/E,IAAMC,GAAqB,IAAAC,0BAAyBH,EAAQC,WAE5D,OAAO,SAAuBG,GAC5B,IAAMC,GAAgB,IAAAC,iBAAgBF,EAAMtB,OACtCS,EAgBV,SAAkBgB,EAA6ChB,GAC7D,IAAMiB,GAAc,IAAAC,gBAEpB,OAGF,SAAuBC,GAErB,OAAQA,GACN,KAAK,EAAAC,YAAYC,SAAU,OAAO,SAACrB,GAAe,OAAAA,CAAA,EAClD,KAAK,EAAAoB,YAAYE,MAA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Ae/H,EAAS,aAAc,CAAEgH,OAAO,IACtDhH,EAAQwL,qBAAuBxL,EAAQyD,UAAYzD,EAAQmK,aAAenK,EAAQiF,cAAW,EAM7FjF,EAAQiF,SALR,SAAkBmF,EAASC,EAASC,GAChC,OAAOC,EAAM,CAACH,EAASC,EAASC,IAAU,SAAUX,EAAGa,GACnD,OAAOP,EAASA,EAAS,CAAC,EAAGN,GAAIa,EACrC,GACJ,EAKAxK,EAAQmK,aAAeA,EAuCvBnK,EAAQyD,UARR,SAAmBgI,EAAIC,EAAIC,GAEvB,OAAIF,QACOA,EACJ,CAACA,EAAIC,EAAIC,GACXf,OAAOW,GACPV,QAAO,SAAUlB,EAAGE,GAAK,OAAQI,EAASA,EAAS,CAAC,EAAGN,IAG1C3C,EAH2D6C,EAItEzG,OAAOgI,KAAKpE,GAAO6D,QAAO,SAAUlB,EAAGV,GAG1C,OAFIsC,EAAOvE,EAAMiC,MACbU,EAAEV,GAAKjC,EAAMiC,IACVU,CACX,GAAG,CAAC,KALR,IAAsB3C,CAHiE,GAAG,CAAC,EAC3F,EAgBAhH,EAAQwL,qBAJR,SAA8BI,EAAMC,EAAMC,GAEtC,OAAO3B,EAAayB,EAAMC,EAAMC,EACpC,C,GCpFIC,EAA2B,CAAC,ECE5BC,EDCJ,SAASC,EAAoBC,GAE5B,IAAIC,EAAeJ,EAAyBG,GAC5C,QAAqBhK,IAAjBiK,EACH,OAAOA,EAAanM,QAGrB,IAAID,EAASgM,EAAyBG,GAAY,CAGjDlM,QAAS,CAAC,GAOX,OAHAoM,EAAoBF,GAAUrE,KAAK9H,EAAOC,QAASD,EAAQA,EAAOC,QAASiM,GAGpElM,EAAOC,OACf,CCnB0BiM,CAAoB,K","sources":["webpack://StandardLogColor/../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js","webpack://StandardLogColor/./ts/ansi/ansiFormatter.ts","webpack://StandardLogColor/./ts/ansi/constants.ts","webpack://StandardLogColor/./ts/ansi/index.ts","webpack://StandardLogColor/./ts/ansi/wrapAnsi.ts","webpack://StandardLogColor/./ts/createColorLogReporter.browser.ts","webpack://StandardLogColor/./ts/css/colors.ts","webpack://StandardLogColor/./ts/css/cssFormatter.ts","webpack://StandardLogColor/./ts/css/index.ts","webpack://StandardLogColor/./ts/index.ts","webpack://StandardLogColor/./ts/supportColor.ts","webpack://StandardLogColor/external var \"StandardLog\"","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/cjs/createColors.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/cjs/createColorsFromMap.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/cjs/index.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/cjs/rgbHex.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/cjs/rgbaString.js","webpack://StandardLogColor/../../node_modules/.pnpm/unpartial@1.0.4/node_modules/unpartial/cjs/index.js","webpack://StandardLogColor/webpack/bootstrap","webpack://StandardLogColor/webpack/startup"],"sourcesContent":["/* eslint-env browser */\n'use strict';\n\nfunction getChromeVersion() {\n\tconst matches = /(Chrome|Chromium)\\/(?<chromeVersion>\\d+)\\./.exec(navigator.userAgent);\n\n\tif (!matches) {\n\t\treturn;\n\t}\n\n\treturn Number.parseInt(matches.groups.chromeVersion, 10);\n}\n\nconst colorSupport = getChromeVersion() >= 69 ? {\n\tlevel: 1,\n\thasBasic: true,\n\thas256: false,\n\thas16m: false\n} : false;\n\nmodule.exports = {\n\tstdout: colorSupport,\n\tstderr: colorSupport\n};\n","import { createTimestampFormatter, LogEntry, TimestampFormat, toConsoleMethod } from 'standard-log'\nimport { ColorLevels, supportColor } from '../supportColor.js'\nimport { ANSI_BACKGROUND, ANSI_BLACK, ANSI_BLUE, ANSI_BRIGHT, ANSI_CYAN, ANSI_FOREGROUND, ANSI_GREEN, ANSI_MAGENTA, ANSI_RED, ANSI_UNDERSCORE, ANSI_WHITE, ANSI_YELLOW } from './constants.js'\nimport { wrapAnsi } from './wrapAnsi.js'\n\nexport type AnsiFormatterOptions = {\n timestamp: TimestampFormat\n}\n\nexport function createAnsiFormatter(options: AnsiFormatterOptions = { timestamp: 'none' }) {\n const timestampFormatter = createTimestampFormatter(options.timestamp)\n\n return function ansiFormatter(entry: LogEntry) {\n const consoleMethod = toConsoleMethod(entry.level)\n const id = formatID(consoleMethod, entry.id)\n const args = formatArgs(timestampFormatter, consoleMethod, entry)\n return [id, ...args]\n }\n}\n\nfunction formatArgs(timestampFormatter: (timestamp: Date) => string | undefined, method: 'error' | 'warn' | 'info' | 'debug', entry: Pick<LogEntry, 'args' | 'timestamp'>) {\n const args = [...entry.args]\n const timestamp = timestampFormatter(entry.timestamp)\n if (timestamp !== undefined) args.push(timestamp)\n const textCodes = method === 'error' ? [ANSI_RED + ANSI_FOREGROUND] :\n method === 'warn' ? [ANSI_YELLOW + ANSI_FOREGROUND] : undefined\n\n return textCodes ? args.map(x => wrapAnsi(x, textCodes)) : args\n}\n\nfunction formatID(method: 'error' | 'warn' | 'info' | 'debug', id: string) {\n const colorLevels = supportColor()\n const colorLevel = method === 'error' ? colorLevels.stderr : colorLevels.stdout\n return toIDFormatter(colorLevel)(id)\n}\n\nfunction toIDFormatter(colorLevel: ColorLevels) {\n // istanbul ignore next\n switch (colorLevel) {\n case ColorLevels.DISABLED: return (id: string) => id\n case ColorLevels.BASIC: return basicIDFormatter\n case ColorLevels.ANSI: return ansiIDFormatter\n case ColorLevels.TRUE: return truecolorIDFormatter\n }\n}\n\nfunction basicIDFormatter(id: string) {\n const codes = getAnsiColor(id)\n return wrapAnsi(` ${id} `, codes)\n}\n\nconst ansiColors: {\n counter: number,\n list: Array<number[]>\n} = {\n counter: 0, list: [\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n ]\n}\nconst ansiColorMap: Record<string, number[]> = Object.create(null)\n\nfunction getAnsiColor(id: string) {\n return ansiColorMap[id] = ansiColorMap[id] || ansiColors.list[ansiColors.counter++ % ansiColors.list.length]\n}\n\n// istanbul ignore next\nfunction ansiIDFormatter(id: string) {\n return basicIDFormatter(id)\n}\n\n// istanbul ignore next\nfunction truecolorIDFormatter(id: string) {\n return basicIDFormatter(id)\n}\n","export type AnsiColor = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7\nexport const ANSI_BLACK = 0\nexport const ANSI_RED = 1\nexport const ANSI_GREEN = 2\nexport const ANSI_YELLOW = 3\nexport const ANSI_BLUE = 4\nexport const ANSI_MAGENTA = 5\nexport const ANSI_CYAN = 6\nexport const ANSI_WHITE = 7\n\nexport type AnsiStyle = 1 | 4\nexport const ANSI_BRIGHT = 1\nexport const ANSI_UNDERSCORE = 4\n\nexport const ANSI_FOREGROUND = 30\nexport const ANSI_BACKGROUND = 40\n","export * from './ansiFormatter.js'\nexport * from './constants.js'\nexport * from './wrapAnsi.js'\n","export function wrapAnsi(text: string, codes: number[]) {\n return `\\u001B[${codes.join(';')}m${text}\\u001B[0m`\n}\n","import { consoleFormatter, createConsoleLogReporter } from 'standard-log'\nimport { unpartial } from 'unpartial'\nimport { createCssFormatter } from './css/index.js'\nimport type { ColorLogReporterOptions } from './types.js'\n\nexport function createColorLogReporter(options?: ColorLogReporterOptions) {\n return createConsoleLogReporter(unpartial({\n formatter: supportCSSColorInConsole() ? createCssFormatter(options?.cssFormatterOptions) : consoleFormatter\n }, options))\n}\n\n// istanbul ignore next\nfunction supportCSSColorInConsole() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n // @ts-ignore\n if (window?.process?.type === 'renderer' || window?.process?.__nwjs) {\n return true\n }\n\n // Internet Explorer and Edge do not support colors.\n if (navigator?.userAgent?.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false\n }\n\n // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n // @ts-ignore\n return (document?.documentElement?.style?.WebkitAppearance) ||\n // Is firebug? http://stackoverflow.com/a/398120/376773\n // @ts-ignore\n (window?.console?.firebug || (window?.console?.exception && window?.console?.table)) ||\n // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator?.userAgent?.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // Double check webkit in userAgent just in case we are in a worker\n (navigator?.userAgent?.toLowerCase().match(/applewebkit\\/(\\d+)/))\n}\n","import { ColorMap } from 'color-map'\n\nexport const rainbow: ColorMap = [\n { index: 0, rgb: [150, 0, 90] },\n { index: 0.125, rgb: [0, 0, 200] },\n { index: 0.25, rgb: [0, 25, 255] },\n { index: 0.375, rgb: [0, 152, 255] },\n { index: 0.5, rgb: [44, 255, 150] },\n { index: 0.625, rgb: [151, 255, 0] },\n { index: 0.75, rgb: [255, 234, 0] },\n { index: 0.875, rgb: [255, 111, 0] },\n { index: 1, rgb: [255, 0, 0] }\n]\n","import { createColorsFromMap, RGB, RGBA, rgbHex } from 'color-map'\nimport { createTimestampFormatter, LogEntry } from 'standard-log'\nimport { required } from 'unpartial'\nimport type { CssFormatterOptions } from '../types.js'\nimport { rainbow } from './colors.js'\n\nexport function createCssFormatter(options?: CssFormatterOptions) {\n const { maxColor, timestamp, style } = required({\n maxColor: 20,\n timestamp: 'none',\n style: 'padding: 2px; line-height: 1rem;'\n }, options)\n const loggerMap: Record<string, RGB> = Object.create(null)\n const colorMap: RGBA[] = createColorsFromMap(rainbow, maxColor)\n let count = 0\n\n const timestampFormatter = createTimestampFormatter(timestamp)\n\n return function cssFormatter(entry: LogEntry) {\n let idStr = `%c ${entry.id} `\n let args: any[]\n if (firstArgIsColorTemplate(entry.args)) {\n idStr += entry.args[0]\n args = [...entry.args.slice(1)]\n }\n else {\n args = [...entry.args]\n }\n const rgb = getRgb(entry.id)\n const background = rgbHex(rgb)\n const border = rgbHex(rgb.map(x => Math.max(0, x - 32)) as RGB)\n const color = getForegroundColor(rgb)\n const result = [\n idStr,\n `${style}background: ${background};border: 1px solid ${border};color: ${color};`,\n ...args\n ]\n const t = timestampFormatter(entry.timestamp)\n if (t !== undefined) result.push(t)\n return result\n }\n\n function firstArgIsColorTemplate(args: any[]) {\n return typeof args[0] === 'string' && args[0].indexOf('%c') !== -1\n }\n\n function getRgb(id: string) {\n return loggerMap[id] = loggerMap[id] || colorMap[count++ & maxColor]\n }\n}\n\nconst gammaMap = {\n rc: 0.2126,\n gc: 0.7152,\n bc: 0.0722,\n lowc: 1 / 12.92\n}\n\nfunction getForegroundColor(background: RGB) {\n // Setting the contrasting color as default\n let color = getComplementary(background)\n const bgLuminance = getRelativeLuminance(background)\n const fgLuminance = (color === '#ffffff') ?\n getRelativeLuminance([255, 255, 255]) :\n getRelativeLuminance([0, 0, 0])\n const relativeL = bgLuminance > fgLuminance ? (bgLuminance + 0.05) / (fgLuminance + 0.05) : (fgLuminance + 0.05) / (bgLuminance + 0.05)\n\n // Can set the contrast ratio based on text size later.\n if (relativeL < 4.5) {\n const avgLuminance = background[0] * gammaMap['rc'] + background[1] * gammaMap['gc'] + background[2] * gammaMap['bc']\n\n // If the relative contrast is lower than standard, we switch color to black/white\n color = (avgLuminance < 220) ? '#ffffff' : '#000000'\n }\n return color\n}\n\nfunction getRelativeLuminance(rgb: RGB) {\n // https://www.w3.org/TR/WCAG/#relativeluminancedef\n const rsrgb = rgb[0] / 255\n const gsrgb = rgb[1] / 255\n const bsrgb = rgb[2] / 255\n\n const r = rsrgb <= 0.03928 ? rsrgb * gammaMap['lowc'] : Math.pow((rsrgb + 0.055) / 1.055, 2.4)\n const g = gsrgb <= 0.03928 ? gsrgb * gammaMap['lowc'] : Math.pow((gsrgb + 0.055) / 1.055, 2.4)\n const b = bsrgb <= 0.03928 ? bsrgb * gammaMap['lowc'] : Math.pow((bsrgb + 0.055) / 1.055, 2.4)\n\n return r * gammaMap['rc'] + g * gammaMap['gc'] + b * gammaMap['bc']\n}\n\nfunction getComplementary(rgb: RGB) {\n const r = 255 - rgb[0]\n const g = 255 - rgb[1]\n const b = 255 - rgb[2]\n return rgbHex([r, g, b])\n}\n","export * from './cssFormatter.js'\n","export * from './ansi/index.js'\nexport * from './createColorLogReporter.js'\nexport * from './css/index.js'\nexport type { ColorLogReporterOptions, CssFormatterOptions } from './types.js'\n","import sc from 'supports-color'\n\n/**\n * Color level.\n * This is the same definition as the `ColorSupportLevel` in `supports-color`.\n * Using the same definition for simplicity\n * @see https://github.com/chalk/supports-color/blob/main/index.d.ts#L19\n */\n export enum ColorLevels {\n DISABLED = 0,\n /**\n * Basic 16 colors (4-bits)\n */\n BASIC = 1,\n /**\n * ANSI 256 colors (8-bits)\n */\n ANSI = 2,\n /**\n * Truecolor 16 million colors (24-bits)\n */\n TRUE = 3\n}\n\nexport namespace supportColor {\n export type Result = { stdout: ColorLevels, stderr: ColorLevels }\n}\n\nlet value: supportColor.Result\n\n/**\n * Detects if the platform supports color.\n * For browser, the value can only be:\n * - `{ stdout: 0, stderr: 0 }`, or\n * - `{ stdout: 3, stderr: 3 }`.\n * So you only need to check one case.\n * The result value is made the same so that it can be used in all platforms.\n */\nexport function supportColor(): supportColor.Result {\n // istanbul ignore next\n return value = value || {\n stderr: sc.stderr ? sc.stderr.level : ColorLevels.DISABLED,\n stdout: sc.stdout ? sc.stdout.level : ColorLevels.DISABLED\n }\n}\n","module.exports = StandardLog;","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createColors = void 0;\nfunction createColors(from, to, shades, alpha) {\n if (alpha === void 0) { alpha = [\n from.length === 4 ? from[3] : to.length === 4 ? to[3] : 1,\n to.length === 4 ? to[3] : from.length === 4 ? from[3] : 1\n ]; }\n var start = __spreadArray([], from, true);\n var diff = [\n to[0] - from[0],\n to[1] - from[1],\n to[2] - from[2],\n alpha[1] - alpha[0]\n ];\n if (start.length === 3)\n start.push(alpha[0]);\n var inc = 1 / Math.max(shades - 1, 1);\n var rgba = [];\n for (var i = 0; i < shades; i++) {\n var color = [\n Math.round(start[0] + i * diff[0] * inc),\n Math.round(start[1] + i * diff[1] * inc),\n Math.round(start[2] + i * diff[2] * inc),\n start[3] + i * diff[3] * inc\n ];\n rgba.push(color);\n }\n return rgba;\n}\nexports.createColors = createColors;\n//# sourceMappingURL=createColors.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createColorsFromMap = void 0;\nvar createColors_js_1 = require(\"./createColors.js\");\n/**\n * Create colors with specified color map.\n */\nfunction createColorsFromMap(colormap, shades, alpha) {\n if (shades < colormap.length) {\n throw new Error(\"Requires at least \".concat(colormap.length, \" shades.\"));\n }\n var result = [];\n var steps = [];\n for (var i = 0; i < colormap.length; i++) {\n steps.push(Math.round(colormap[i].index * shades));\n }\n for (var i = 0; i < colormap.length - 1; i++) {\n var n = steps[i + 1] - steps[i];\n var from = colormap[i].rgb;\n var to = colormap[i + 1].rgb;\n result.push.apply(result, (0, createColors_js_1.createColors)(from, to, n, alpha));\n }\n return result;\n}\nexports.createColorsFromMap = createColorsFromMap;\n//# sourceMappingURL=createColorsFromMap.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./createColors.js\"), exports);\n__exportStar(require(\"./createColorsFromMap.js\"), exports);\n__exportStar(require(\"./rgbHex.js\"), exports);\n__exportStar(require(\"./rgbaString.js\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.rgbHex = void 0;\n/**\n * Convert `RGB` to `#rgb`\n * JavaScript note: no check for array length, use it properly.\n */\nfunction rgbHex(rgb) {\n var hex = '#';\n for (var i = 0; i < 3; i++) {\n hex += d2h(rgb[i]);\n }\n return hex;\n}\nexports.rgbHex = rgbHex;\nfunction d2h(d) {\n var s = (+d).toString(16);\n return s.length < 2 ? '0' + s : s;\n}\n//# sourceMappingURL=rgbHex.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.rgbaString = void 0;\nfunction rgbaString(rgba) {\n return 'rgba(' + rgba.join(',') + ')';\n}\nexports.rgbaString = rgbaString;\n//# sourceMappingURL=rgbaString.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unpartialRecursively = exports.unpartial = exports.requiredDeep = exports.required = void 0;\nfunction required(source1, source2, source3) {\n return merge([source1, source2, source3], function (p, e) {\n return __assign(__assign({}, p), e);\n });\n}\nexports.required = required;\nfunction requiredDeep(source1, source2, source3) {\n return merge([source1, source2, source3], function (p, e) { return deepmerge(p, e); });\n}\nexports.requiredDeep = requiredDeep;\nfunction merge(entries, reducer) {\n if (entries[0] === undefined || entries[0] === null)\n return entries[0];\n return entries.filter(function (x) { return !!x; }).reduce(reducer, {});\n}\nfunction deepmerge(source1, source2) {\n if (typeof source1 !== 'object' || source1 === null)\n return source2 !== undefined ? source2 : source1;\n if (Array.isArray(source1)) {\n if (Array.isArray(source2))\n return source2;\n if (source2 === undefined)\n return __spreadArray([], source1, true);\n return __spreadArray(__spreadArray([], source1, true), [source2], false);\n }\n return getAllKeys(source1).concat(getAllKeys(source2)).reduce(function (p, k) {\n // @ts-ignore\n p[k] = deepmerge(source1[k], source2 && source2[k]);\n return p;\n }, {});\n}\nfunction getAllKeys(subject, internal) {\n if (internal === void 0) { internal = false; }\n if (typeof subject !== 'object')\n return [];\n var propertyNames = Object.getOwnPropertyNames(subject);\n var keys = internal ? propertyNames.filter(function (n) { return n !== 'constructor'; }) : propertyNames;\n var proto = Object.getPrototypeOf(subject);\n return proto !== Object.prototype ? keys.concat(getAllKeys(proto, true)) : keys;\n}\nfunction unpartial(s1, s2, s3) {\n // defensive check for JS\n if (s1 === undefined || s1 === null)\n return s1;\n return [s1, s2, s3]\n .filter(notNil)\n .reduce(function (p, s) { return (__assign(__assign({}, p), trimNilProps(s))); }, {});\n}\nexports.unpartial = unpartial;\nfunction trimNilProps(value) {\n return Object.keys(value).reduce(function (p, k) {\n if (notNil(value[k]))\n p[k] = value[k];\n return p;\n }, {});\n}\nfunction notNil(value) {\n return value !== null && value !== undefined;\n}\nfunction unpartialRecursively(arg1, arg2, arg3) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return requiredDeep(arg1, arg2, arg3);\n}\nexports.unpartialRecursively = unpartialRecursively;\n//# sourceMappingURL=index.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(744);\n"],"names":["colorSupport","matches","exec","navigator","userAgent","Number","parseInt","groups","chromeVersion","getChromeVersion","level","hasBasic","has256","has16m","module","exports","stdout","stderr","basicIDFormatter","id","codes","ansiColorMap","ansiColors","list","counter","length","getAnsiColor","wrapAnsi","options","timestamp","timestampFormatter","createTimestampFormatter","entry","consoleMethod","toConsoleMethod","method","colorLevels","supportColor","colorLevel","ColorLevels","DISABLED","BASIC","ANSI","ansiIDFormatter","TRUE","truecolorIDFormatter","toIDFormatter","formatID","args","undefined","push","textCodes","ANSI_RED","ANSI_FOREGROUND","ANSI_YELLOW","map","x","formatArgs","ANSI_WHITE","ANSI_BACKGROUND","ANSI_BLACK","ANSI_GREEN","ANSI_BLUE","ANSI_MAGENTA","ANSI_CYAN","ANSI_BRIGHT","ANSI_UNDERSCORE","Object","create","text","join","createConsoleLogReporter","unpartial","formatter","window","process","type","__nwjs","toLowerCase","match","document","documentElement","style","WebkitAppearance","console","firebug","exception","table","RegExp","$1","createCssFormatter","cssFormatterOptions","consoleFormatter","rainbow","index","rgb","required","maxColor","loggerMap","colorMap","createColorsFromMap","count","idStr","indexOf","firstArgIsColorTemplate","slice","background","rgbHex","border","Math","max","color","r","g","b","getComplementary","bgLuminance","getRelativeLuminance","fgLuminance","gammaMap","getForegroundColor","result","t","rsrgb","gsrgb","bsrgb","pow","value","StandardLog","__spreadArray","this","to","from","pack","arguments","ar","i","l","Array","prototype","call","concat","defineProperty","createColors","shades","alpha","start","diff","inc","rgba","round","createColors_js_1","colormap","Error","steps","n","apply","__createBinding","o","m","k","k2","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","__exportStar","p","hasOwnProperty","s","hex","toString","rgbaString","__assign","assign","requiredDeep","source1","source2","source3","merge","e","deepmerge","entries","reducer","filter","reduce","isArray","getAllKeys","subject","internal","propertyNames","getOwnPropertyNames","keys","proto","getPrototypeOf","notNil","unpartialRecursively","s1","s2","s3","arg1","arg2","arg3","__webpack_module_cache__","__webpack_exports__","__webpack_require__","moduleId","cachedModule","__webpack_modules__"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- var StandardLogColor;!function(){"use strict";var n={12:function(n){const t=function(){const n=/(Chrome|Chromium)\/(?<chromeVersion>\d+)\./.exec(navigator.userAgent);if(n)return Number.parseInt(n.groups.chromeVersion,10)}()>=69&&{level:1,hasBasic:!0,has256:!1,has16m:!1};n.exports={stdout:t,stderr:t}}},t={};function o(r){var e=t[r];if(void 0!==e)return e.exports;var i=t[r]={exports:{}};return n[r](i,i.exports,o),i.exports}o.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return o.d(t,{a:t}),t},o.d=function(n,t){for(var r in t)o.o(t,r)&&!o.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},o.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},o.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})};var r={};!function(){o.r(r),o.d(r,{ANSI_BACKGROUND:function(){return h},ANSI_BLACK:function(){return d},ANSI_BLUE:function(){return s},ANSI_BRIGHT:function(){return m},ANSI_CYAN:function(){return v},ANSI_FOREGROUND:function(){return w},ANSI_GREEN:function(){return a},ANSI_MAGENTA:function(){return f},ANSI_RED:function(){return c},ANSI_UNDERSCORE:function(){return p},ANSI_WHITE:function(){return g},ANSI_YELLOW:function(){return l},createAnsiFormatter:function(){return S},createColorLogReporter:function(){return F},createCssFormatter:function(){return D},wrapAnsi:function(){return A}});var n,t=StandardLog,e=o(12),i=o.n(e);let u;!function(n){n[n.DISABLED=0]="DISABLED",n[n.BASIC=1]="BASIC",n[n.ANSI=2]="ANSI",n[n.TRUE=3]="TRUE"}(n||(n={}));const d=0,c=1,a=2,l=3,s=4,f=5,v=6,g=7,m=1,p=4,w=30,h=40;function A(n,t){return`[${t.join(";")}m${n}`}function S(o={timestamp:"none"}){const r=(0,t.createTimestampFormatter)(o.timestamp);return function(o){const e=(0,t.toConsoleMethod)(o.level),d=function(t,o){const r=u=u||{stderr:i().stderr?i().stderr.level:n.DISABLED,stdout:i().stdout?i().stdout.level:n.DISABLED};return function(t){switch(t){case n.DISABLED:return n=>n;case n.BASIC:return b;case n.ANSI:return N;case n.TRUE:return E}}("error"===t?r.stderr:r.stdout)(o)}(e,o.id),a=function(n,t,o){const r=[...o.args],e=n(o.timestamp);void 0!==e&&r.push(e);const i="error"===t?[c+w]:"warn"===t?[l+w]:void 0;return i?r.map((n=>A(n,i))):r}(r,e,o);return[d,...a]}}function b(n){const t=function(n){return I[n]=I[n]||x.list[x.counter++%x.list.length]}(n);return A(` ${n} `,t)}const x={counter:0,list:[[g+w,c+h],[d+w,a+h],[d+w,l+h],[g+w,s+h],[g+w,f+h],[d+w,v+h],[g+w,d+h],[g+w,c+h,m],[d+w,a+h,m],[d+w,l+h,m],[g+w,s+h,m],[g+w,f+h,m],[d+w,v+h,m],[g+w,d+h,m],[g+w,c+h,p],[d+w,a+h,p],[d+w,l+h,p],[g+w,s+h,p],[g+w,f+h,p],[d+w,v+h,p],[g+w,d+h,p],[g+w,c+h,m,p],[d+w,a+h,m,p],[d+w,l+h,m,p],[g+w,s+h,m,p],[g+w,f+h,m,p],[d+w,v+h,m,p],[g+w,d+h,m,p]]},I=Object.create(null);function N(n){return b(n)}function E(n){return b(n)}function C(n){return Object.keys(n).reduce(((t,o)=>(_(n[o])&&(t[o]=n[o]),t)),{})}function _(n){return null!=n}function L(n,t,o,r=[4===n.length?n[3]:4===t.length?t[3]:1,4===t.length?t[3]:4===n.length?n[3]:1]){const e=[...n],i=[t[0]-n[0],t[1]-n[1],t[2]-n[2],r[1]-r[0]];3===e.length&&e.push(r[0]);const u=1/Math.max(o-1,1),d=[];for(let n=0;n<o;n++){const t=[Math.round(e[0]+n*i[0]*u),Math.round(e[1]+n*i[1]*u),Math.round(e[2]+n*i[2]*u),e[3]+n*i[3]*u];d.push(t)}return d}function y(n){let t="#";for(let o=0;o<3;o++)t+=O(n[o]);return t}function O(n){const t=(+n).toString(16);return t.length<2?"0"+t:t}const R=[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}];function D(n){const{maxColor:o,timestamp:r,style:e}=(u=(n,t)=>({...n,...t}),void 0===(i=[{maxColor:20,timestamp:"none",style:"padding: 2px; margin: 2px; line-height: 1.8em;"},n,void 0])[0]||null===i[0]?i[0]:i.filter((n=>!!n)).reduce(u,{}));var i,u;const d=Object.create(null),c=function(n,t,o){if(t<n.length)throw new Error(`Requires at least ${n.length} shades.`);const r=[],e=[];for(let o=0;o<n.length;o++)e.push(Math.round(n[o].index*t));for(let t=0;t<n.length-1;t++){const o=e[t+1]-e[t],i=n[t].rgb,u=n[t+1].rgb;r.push(...L(i,u,o,undefined))}return r}(R,o);let a=0;const l=(0,t.createTimestampFormatter)(r);return function(n){let t,r=`%c ${n.id} `;!function(n){return"string"==typeof n[0]&&-1!==n[0].indexOf("%c")}(n.args)?t=[...n.args]:(r+=n.args[0],t=[...n.args.slice(1)]);const i=(u=n.id,d[u]=d[u]||c[a++&o]);var u;const s=y(i),f=y(i.map((n=>Math.max(0,n-32)))),v=function(n){let t=function(n){return y([255-n[0],255-n[1],255-n[2]])}(n);const o=j(n),r=j("#ffffff"===t?[255,255,255]:[0,0,0]);return(o>r?(o+.05)/(r+.05):(r+.05)/(o+.05))<4.5&&(t=n[0]*M+n[1]*B+n[2]*T<220?"#ffffff":"#000000"),t}(i),g=[r,`${e}background: ${s};border: 1px solid ${f};color: ${v};`,...t],m=l(n.timestamp);return void 0!==m&&g.push(m),g}}const M=.2126,B=.7152,T=.0722,$=1/12.92;function j(n){const t=n[0]/255,o=n[1]/255,r=n[2]/255,e=t<=.03928?t*$:Math.pow((t+.055)/1.055,2.4),i=o<=.03928?o*$:Math.pow((o+.055)/1.055,2.4),u=r<=.03928?r*$:Math.pow((r+.055)/1.055,2.4);return e*M+i*B+u*T}function F(n){return(0,t.createConsoleLogReporter)(null==(f={formatter:"renderer"===(null===(o=null===window||void 0===window?void 0:window.process)||void 0===o?void 0:o.type)||(null===(r=null===window||void 0===window?void 0:window.process)||void 0===r?void 0:r.__nwjs)||!(null===(e=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===e?void 0:e.toLowerCase().match(/(edge|trident)\/(\d+)/))&&((null===(u=null===(i=null===document||void 0===document?void 0:document.documentElement)||void 0===i?void 0:i.style)||void 0===u?void 0:u.WebkitAppearance)||(null===(d=null===window||void 0===window?void 0:window.console)||void 0===d?void 0:d.firebug)||(null===(c=null===window||void 0===window?void 0:window.console)||void 0===c?void 0:c.exception)&&(null===(a=null===window||void 0===window?void 0:window.console)||void 0===a?void 0:a.table)||(null===(l=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===l?void 0:l.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(RegExp.$1,10)>=31||(null===(s=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===s?void 0:s.toLowerCase().match(/applewebkit\/(\d+)/)))?D(null==n?void 0:n.cssFormatterOptions):t.consoleFormatter})?f:[f,n,v].filter(_).reduce(((n,t)=>({...n,...C(t)})),{}));var o,r,e,i,u,d,c,a,l,s,f,v}}(),StandardLogColor=r}();
1
+ var StandardLogColor;!function(){"use strict";var n={12:function(n){const t=function(){const n=/(Chrome|Chromium)\/(?<chromeVersion>\d+)\./.exec(navigator.userAgent);if(n)return Number.parseInt(n.groups.chromeVersion,10)}()>=69&&{level:1,hasBasic:!0,has256:!1,has16m:!1};n.exports={stdout:t,stderr:t}}},t={};function o(r){var e=t[r];if(void 0!==e)return e.exports;var i=t[r]={exports:{}};return n[r](i,i.exports,o),i.exports}o.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return o.d(t,{a:t}),t},o.d=function(n,t){for(var r in t)o.o(t,r)&&!o.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},o.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},o.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})};var r={};!function(){o.r(r),o.d(r,{ANSI_BACKGROUND:function(){return h},ANSI_BLACK:function(){return d},ANSI_BLUE:function(){return a},ANSI_BRIGHT:function(){return m},ANSI_CYAN:function(){return v},ANSI_FOREGROUND:function(){return w},ANSI_GREEN:function(){return l},ANSI_MAGENTA:function(){return f},ANSI_RED:function(){return c},ANSI_UNDERSCORE:function(){return p},ANSI_WHITE:function(){return g},ANSI_YELLOW:function(){return s},createAnsiFormatter:function(){return S},createColorLogReporter:function(){return F},createCssFormatter:function(){return D},wrapAnsi:function(){return A}});var n,t=StandardLog,e=o(12),i=o.n(e);let u;!function(n){n[n.DISABLED=0]="DISABLED",n[n.BASIC=1]="BASIC",n[n.ANSI=2]="ANSI",n[n.TRUE=3]="TRUE"}(n||(n={}));const d=0,c=1,l=2,s=3,a=4,f=5,v=6,g=7,m=1,p=4,w=30,h=40;function A(n,t){return`[${t.join(";")}m${n}`}function S(o={timestamp:"none"}){const r=(0,t.createTimestampFormatter)(o.timestamp);return function(o){const e=(0,t.toConsoleMethod)(o.level),d=function(t,o){const r=u=u||{stderr:i().stderr?i().stderr.level:n.DISABLED,stdout:i().stdout?i().stdout.level:n.DISABLED};return function(t){switch(t){case n.DISABLED:return n=>n;case n.BASIC:return b;case n.ANSI:return N;case n.TRUE:return E}}("error"===t?r.stderr:r.stdout)(o)}(e,o.id),l=function(n,t,o){const r=[...o.args],e=n(o.timestamp);void 0!==e&&r.push(e);const i="error"===t?[c+w]:"warn"===t?[s+w]:void 0;return i?r.map((n=>A(n,i))):r}(r,e,o);return[d,...l]}}function b(n){const t=function(n){return x[n]=x[n]||I.list[I.counter++%I.list.length]}(n);return A(` ${n} `,t)}const I={counter:0,list:[[g+w,c+h],[d+w,l+h],[d+w,s+h],[g+w,a+h],[g+w,f+h],[d+w,v+h],[g+w,d+h],[g+w,c+h,m],[d+w,l+h,m],[d+w,s+h,m],[g+w,a+h,m],[g+w,f+h,m],[d+w,v+h,m],[g+w,d+h,m],[g+w,c+h,p],[d+w,l+h,p],[d+w,s+h,p],[g+w,a+h,p],[g+w,f+h,p],[d+w,v+h,p],[g+w,d+h,p],[g+w,c+h,m,p],[d+w,l+h,m,p],[d+w,s+h,m,p],[g+w,a+h,m,p],[g+w,f+h,m,p],[d+w,v+h,m,p],[g+w,d+h,m,p]]},x=Object.create(null);function N(n){return b(n)}function E(n){return b(n)}function C(n){return Object.keys(n).reduce(((t,o)=>(_(n[o])&&(t[o]=n[o]),t)),{})}function _(n){return null!=n}function L(n,t,o,r=[4===n.length?n[3]:4===t.length?t[3]:1,4===t.length?t[3]:4===n.length?n[3]:1]){const e=[...n],i=[t[0]-n[0],t[1]-n[1],t[2]-n[2],r[1]-r[0]];3===e.length&&e.push(r[0]);const u=1/Math.max(o-1,1),d=[];for(let n=0;n<o;n++){const t=[Math.round(e[0]+n*i[0]*u),Math.round(e[1]+n*i[1]*u),Math.round(e[2]+n*i[2]*u),e[3]+n*i[3]*u];d.push(t)}return d}function y(n){let t="#";for(let o=0;o<3;o++)t+=O(n[o]);return t}function O(n){const t=(+n).toString(16);return t.length<2?"0"+t:t}const R=[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}];function D(n){const{maxColor:o,timestamp:r,style:e}=(u=(n,t)=>({...n,...t}),void 0===(i=[{maxColor:20,timestamp:"none",style:"padding: 2px; line-height: 1rem;"},n,void 0])[0]||null===i[0]?i[0]:i.filter((n=>!!n)).reduce(u,{}));var i,u;const d=Object.create(null),c=function(n,t,o){if(t<n.length)throw new Error(`Requires at least ${n.length} shades.`);const r=[],e=[];for(let o=0;o<n.length;o++)e.push(Math.round(n[o].index*t));for(let t=0;t<n.length-1;t++){const o=e[t+1]-e[t],i=n[t].rgb,u=n[t+1].rgb;r.push(...L(i,u,o,undefined))}return r}(R,o);let l=0;const s=(0,t.createTimestampFormatter)(r);return function(n){let t,r=`%c ${n.id} `;!function(n){return"string"==typeof n[0]&&-1!==n[0].indexOf("%c")}(n.args)?t=[...n.args]:(r+=n.args[0],t=[...n.args.slice(1)]);const i=(u=n.id,d[u]=d[u]||c[l++&o]);var u;const a=y(i),f=y(i.map((n=>Math.max(0,n-32)))),v=function(n){let t=function(n){return y([255-n[0],255-n[1],255-n[2]])}(n);const o=j(n),r=j("#ffffff"===t?[255,255,255]:[0,0,0]);return(o>r?(o+.05)/(r+.05):(r+.05)/(o+.05))<4.5&&(t=n[0]*M+n[1]*B+n[2]*T<220?"#ffffff":"#000000"),t}(i),g=[r,`${e}background: ${a};border: 1px solid ${f};color: ${v};`,...t],m=s(n.timestamp);return void 0!==m&&g.push(m),g}}const M=.2126,B=.7152,T=.0722,$=1/12.92;function j(n){const t=n[0]/255,o=n[1]/255,r=n[2]/255,e=t<=.03928?t*$:Math.pow((t+.055)/1.055,2.4),i=o<=.03928?o*$:Math.pow((o+.055)/1.055,2.4),u=r<=.03928?r*$:Math.pow((r+.055)/1.055,2.4);return e*M+i*B+u*T}function F(n){return(0,t.createConsoleLogReporter)(null==(f={formatter:"renderer"===(null===(o=null===window||void 0===window?void 0:window.process)||void 0===o?void 0:o.type)||(null===(r=null===window||void 0===window?void 0:window.process)||void 0===r?void 0:r.__nwjs)||!(null===(e=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===e?void 0:e.toLowerCase().match(/(edge|trident)\/(\d+)/))&&((null===(u=null===(i=null===document||void 0===document?void 0:document.documentElement)||void 0===i?void 0:i.style)||void 0===u?void 0:u.WebkitAppearance)||(null===(d=null===window||void 0===window?void 0:window.console)||void 0===d?void 0:d.firebug)||(null===(c=null===window||void 0===window?void 0:window.console)||void 0===c?void 0:c.exception)&&(null===(l=null===window||void 0===window?void 0:window.console)||void 0===l?void 0:l.table)||(null===(s=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===s?void 0:s.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(RegExp.$1,10)>=31||(null===(a=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===a?void 0:a.toLowerCase().match(/applewebkit\/(\d+)/)))?D(null==n?void 0:n.cssFormatterOptions):t.consoleFormatter})?f:[f,n,v].filter(_).reduce(((n,t)=>({...n,...C(t)})),{}));var o,r,e,i,u,d,c,l,s,a,f,v}}(),StandardLogColor=r}();
2
2
  //# sourceMappingURL=standard-log-color.esm.js.map
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"standard-log-color.esm.js","mappings":"oEAaA,MAAMA,EAVN,WACC,MAAMC,EAAU,6CAA6CC,KAAKC,UAAUC,WAE5E,GAAKH,EAIL,OAAOI,OAAOC,SAASL,EAAQM,OAAOC,cAAe,GACtD,CAEqBC,IAAsB,IAAK,CAC/CC,MAAO,EACPC,UAAU,EACVC,QAAQ,EACRC,QAAQ,GAGTC,EAAOC,QAAU,CAChBC,OAAQhB,EACRiB,OAAQjB,E,GCrBLkB,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaN,QAGrB,IAAID,EAASI,EAAyBE,GAAY,CAGjDL,QAAS,CAAC,GAOX,OAHAQ,EAAoBH,GAAUN,EAAQA,EAAOC,QAASI,GAG/CL,EAAOC,OACf,CCrBAI,EAAoBK,EAAI,SAASV,GAChC,IAAIW,EAASX,GAAUA,EAAOY,WAC7B,WAAa,OAAOZ,EAAgB,OAAG,EACvC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SAAS2K,OAAOC,GAAI,KAAO,KAEtE,QAApB,EAAS,OAAT/K,gBAAS,IAATA,eAAS,EAATA,UAAWC,iBAAS,eAAEoK,cAAcC,MAAM,wBA9BH5C,EAAmB7D,aAAO,EAAPA,EAASmH,qBAAuB,EAAAC,mBNiChFlB,EACJ,CAACA,EMjCPlG,ENiCeqH,GACXjD,OAAO9B,GACPH,QAAO,CAACC,EAAGqB,KAAM,IAAMrB,KAAMH,EAAawB,MAAO,CAAC,IM/B3D,I,oBNyB0ByC,EAAQmB,CM5BlC,C","sources":["webpack://StandardLogColor/../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js","webpack://StandardLogColor/webpack/bootstrap","webpack://StandardLogColor/webpack/runtime/compat get default export","webpack://StandardLogColor/webpack/runtime/define property getters","webpack://StandardLogColor/webpack/runtime/hasOwnProperty shorthand","webpack://StandardLogColor/webpack/runtime/make namespace object","webpack://StandardLogColor/external var \"StandardLog\"","webpack://StandardLogColor/./ts/supportColor.ts","webpack://StandardLogColor/./ts/ansi/constants.ts","webpack://StandardLogColor/./ts/ansi/wrapAnsi.ts","webpack://StandardLogColor/./ts/ansi/ansiFormatter.ts","webpack://StandardLogColor/../../node_modules/.pnpm/unpartial@1.0.4/node_modules/unpartial/esm/index.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/esm/createColors.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/esm/rgbHex.js","webpack://StandardLogColor/./ts/css/colors.ts","webpack://StandardLogColor/./ts/css/cssFormatter.ts","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/esm/createColorsFromMap.js","webpack://StandardLogColor/./ts/createColorLogReporter.browser.ts"],"sourcesContent":["/* eslint-env browser */\n'use strict';\n\nfunction getChromeVersion() {\n\tconst matches = /(Chrome|Chromium)\\/(?<chromeVersion>\\d+)\\./.exec(navigator.userAgent);\n\n\tif (!matches) {\n\t\treturn;\n\t}\n\n\treturn Number.parseInt(matches.groups.chromeVersion, 10);\n}\n\nconst colorSupport = getChromeVersion() >= 69 ? {\n\tlevel: 1,\n\thasBasic: true,\n\thas256: false,\n\thas16m: false\n} : false;\n\nmodule.exports = {\n\tstdout: colorSupport,\n\tstderr: colorSupport\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var __WEBPACK_NAMESPACE_OBJECT__ = StandardLog;","import sc from 'supports-color'\n\n/**\n * Color level.\n * This is the same definition as the `ColorSupportLevel` in `supports-color`.\n * Using the same definition for simplicity\n * @see https://github.com/chalk/supports-color/blob/main/index.d.ts#L19\n */\n export enum ColorLevels {\n DISABLED = 0,\n /**\n * Basic 16 colors (4-bits)\n */\n BASIC = 1,\n /**\n * ANSI 256 colors (8-bits)\n */\n ANSI = 2,\n /**\n * Truecolor 16 million colors (24-bits)\n */\n TRUE = 3\n}\n\nexport namespace supportColor {\n export type Result = { stdout: ColorLevels, stderr: ColorLevels }\n}\n\nlet value: supportColor.Result\n\n/**\n * Detects if the platform supports color.\n * For browser, the value can only be:\n * - `{ stdout: 0, stderr: 0 }`, or\n * - `{ stdout: 3, stderr: 3 }`.\n * So you only need to check one case.\n * The result value is made the same so that it can be used in all platforms.\n */\nexport function supportColor(): supportColor.Result {\n // istanbul ignore next\n return value = value || {\n stderr: sc.stderr ? sc.stderr.level : ColorLevels.DISABLED,\n stdout: sc.stdout ? sc.stdout.level : ColorLevels.DISABLED\n }\n}\n","export type AnsiColor = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7\nexport const ANSI_BLACK = 0\nexport const ANSI_RED = 1\nexport const ANSI_GREEN = 2\nexport const ANSI_YELLOW = 3\nexport const ANSI_BLUE = 4\nexport const ANSI_MAGENTA = 5\nexport const ANSI_CYAN = 6\nexport const ANSI_WHITE = 7\n\nexport type AnsiStyle = 1 | 4\nexport const ANSI_BRIGHT = 1\nexport const ANSI_UNDERSCORE = 4\n\nexport const ANSI_FOREGROUND = 30\nexport const ANSI_BACKGROUND = 40\n","export function wrapAnsi(text: string, codes: number[]) {\n return `\\u001B[${codes.join(';')}m${text}\\u001B[0m`\n}\n","import { createTimestampFormatter, LogEntry, TimestampFormat, toConsoleMethod } from 'standard-log'\nimport { ColorLevels, supportColor } from '../supportColor.js'\nimport { ANSI_BACKGROUND, ANSI_BLACK, ANSI_BLUE, ANSI_BRIGHT, ANSI_CYAN, ANSI_FOREGROUND, ANSI_GREEN, ANSI_MAGENTA, ANSI_RED, ANSI_UNDERSCORE, ANSI_WHITE, ANSI_YELLOW } from './constants.js'\nimport { wrapAnsi } from './wrapAnsi.js'\n\nexport type AnsiFormatterOptions = {\n timestamp: TimestampFormat\n}\n\nexport function createAnsiFormatter(options: AnsiFormatterOptions = { timestamp: 'none' }) {\n const timestampFormatter = createTimestampFormatter(options.timestamp)\n\n return function ansiFormatter(entry: LogEntry) {\n const consoleMethod = toConsoleMethod(entry.level)\n const id = formatID(consoleMethod, entry.id)\n const args = formatArgs(timestampFormatter, consoleMethod, entry)\n return [id, ...args]\n }\n}\n\nfunction formatArgs(timestampFormatter: (timestamp: Date) => string | undefined, method: 'error' | 'warn' | 'info' | 'debug', entry: Pick<LogEntry, 'args' | 'timestamp'>) {\n const args = [...entry.args]\n const timestamp = timestampFormatter(entry.timestamp)\n if (timestamp !== undefined) args.push(timestamp)\n const textCodes = method === 'error' ? [ANSI_RED + ANSI_FOREGROUND] :\n method === 'warn' ? [ANSI_YELLOW + ANSI_FOREGROUND] : undefined\n\n return textCodes ? args.map(x => wrapAnsi(x, textCodes)) : args\n}\n\nfunction formatID(method: 'error' | 'warn' | 'info' | 'debug', id: string) {\n const colorLevels = supportColor()\n const colorLevel = method === 'error' ? colorLevels.stderr : colorLevels.stdout\n return toIDFormatter(colorLevel)(id)\n}\n\nfunction toIDFormatter(colorLevel: ColorLevels) {\n // istanbul ignore next\n switch (colorLevel) {\n case ColorLevels.DISABLED: return (id: string) => id\n case ColorLevels.BASIC: return basicIDFormatter\n case ColorLevels.ANSI: return ansiIDFormatter\n case ColorLevels.TRUE: return truecolorIDFormatter\n }\n}\n\nfunction basicIDFormatter(id: string) {\n const codes = getAnsiColor(id)\n return wrapAnsi(` ${id} `, codes)\n}\n\nconst ansiColors: {\n counter: number,\n list: Array<number[]>\n} = {\n counter: 0, list: [\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n ]\n}\nconst ansiColorMap: Record<string, number[]> = Object.create(null)\n\nfunction getAnsiColor(id: string) {\n return ansiColorMap[id] = ansiColorMap[id] || ansiColors.list[ansiColors.counter++ % ansiColors.list.length]\n}\n\n// istanbul ignore next\nfunction ansiIDFormatter(id: string) {\n return basicIDFormatter(id)\n}\n\n// istanbul ignore next\nfunction truecolorIDFormatter(id: string) {\n return basicIDFormatter(id)\n}\n","export function required(source1, source2, source3) {\n return merge([source1, source2, source3], (p, e) => {\n return { ...p, ...e };\n });\n}\nexport function requiredDeep(source1, source2, source3) {\n return merge([source1, source2, source3], (p, e) => deepmerge(p, e));\n}\nfunction merge(entries, reducer) {\n if (entries[0] === undefined || entries[0] === null)\n return entries[0];\n return entries.filter(x => !!x).reduce(reducer, {});\n}\nfunction deepmerge(source1, source2) {\n if (typeof source1 !== 'object' || source1 === null)\n return source2 !== undefined ? source2 : source1;\n if (Array.isArray(source1)) {\n if (Array.isArray(source2))\n return source2;\n if (source2 === undefined)\n return [...source1];\n return [...source1, source2];\n }\n return getAllKeys(source1).concat(getAllKeys(source2)).reduce((p, k) => {\n // @ts-ignore\n p[k] = deepmerge(source1[k], source2 && source2[k]);\n return p;\n }, {});\n}\nfunction getAllKeys(subject, internal = false) {\n if (typeof subject !== 'object')\n return [];\n const propertyNames = Object.getOwnPropertyNames(subject);\n const keys = internal ? propertyNames.filter(n => n !== 'constructor') : propertyNames;\n const proto = Object.getPrototypeOf(subject);\n return proto !== Object.prototype ? keys.concat(getAllKeys(proto, true)) : keys;\n}\nexport function unpartial(s1, s2, s3) {\n // defensive check for JS\n if (s1 === undefined || s1 === null)\n return s1;\n return [s1, s2, s3]\n .filter(notNil)\n .reduce((p, s) => ({ ...p, ...trimNilProps(s) }), {});\n}\nfunction trimNilProps(value) {\n return Object.keys(value).reduce((p, k) => {\n if (notNil(value[k]))\n p[k] = value[k];\n return p;\n }, {});\n}\nfunction notNil(value) {\n return value !== null && value !== undefined;\n}\nexport function unpartialRecursively(arg1, arg2, arg3) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return requiredDeep(arg1, arg2, arg3);\n}\n//# sourceMappingURL=index.js.map","export function createColors(from, to, shades, alpha = [\n from.length === 4 ? from[3] : to.length === 4 ? to[3] : 1,\n to.length === 4 ? to[3] : from.length === 4 ? from[3] : 1\n]) {\n const start = [...from];\n const diff = [\n to[0] - from[0],\n to[1] - from[1],\n to[2] - from[2],\n alpha[1] - alpha[0]\n ];\n if (start.length === 3)\n start.push(alpha[0]);\n const inc = 1 / Math.max(shades - 1, 1);\n const rgba = [];\n for (let i = 0; i < shades; i++) {\n const color = [\n Math.round(start[0] + i * diff[0] * inc),\n Math.round(start[1] + i * diff[1] * inc),\n Math.round(start[2] + i * diff[2] * inc),\n start[3] + i * diff[3] * inc\n ];\n rgba.push(color);\n }\n return rgba;\n}\n//# sourceMappingURL=createColors.js.map","/**\n * Convert `RGB` to `#rgb`\n * JavaScript note: no check for array length, use it properly.\n */\nexport function rgbHex(rgb) {\n let hex = '#';\n for (let i = 0; i < 3; i++) {\n hex += d2h(rgb[i]);\n }\n return hex;\n}\nfunction d2h(d) {\n const s = (+d).toString(16);\n return s.length < 2 ? '0' + s : s;\n}\n//# sourceMappingURL=rgbHex.js.map","import { ColorMap } from 'color-map'\n\nexport const rainbow: ColorMap = [\n { index: 0, rgb: [150, 0, 90] },\n { index: 0.125, rgb: [0, 0, 200] },\n { index: 0.25, rgb: [0, 25, 255] },\n { index: 0.375, rgb: [0, 152, 255] },\n { index: 0.5, rgb: [44, 255, 150] },\n { index: 0.625, rgb: [151, 255, 0] },\n { index: 0.75, rgb: [255, 234, 0] },\n { index: 0.875, rgb: [255, 111, 0] },\n { index: 1, rgb: [255, 0, 0] }\n]\n","import { createColorsFromMap, RGB, RGBA, rgbHex } from 'color-map'\nimport { createTimestampFormatter, LogEntry } from 'standard-log'\nimport { required } from 'unpartial'\nimport type { CssFormatterOptions } from '../types.js'\nimport { rainbow } from './colors.js'\n\nexport function createCssFormatter(options?: CssFormatterOptions) {\n const { maxColor, timestamp, style } = required({\n maxColor: 20,\n timestamp: 'none',\n style: 'padding: 2px; margin: 2px; line-height: 1.8em;'\n }, options)\n const loggerMap: Record<string, RGB> = Object.create(null)\n const colorMap: RGBA[] = createColorsFromMap(rainbow, maxColor)\n let count = 0\n\n const timestampFormatter = createTimestampFormatter(timestamp)\n\n return function cssFormatter(entry: LogEntry) {\n let idStr = `%c ${entry.id} `\n let args: any[]\n if (firstArgIsColorTemplate(entry.args)) {\n idStr += entry.args[0]\n args = [...entry.args.slice(1)]\n }\n else {\n args = [...entry.args]\n }\n const rgb = getRgb(entry.id)\n const background = rgbHex(rgb)\n const border = rgbHex(rgb.map(x => Math.max(0, x - 32)) as RGB)\n const color = getForegroundColor(rgb)\n const result = [\n idStr,\n `${style}background: ${background};border: 1px solid ${border};color: ${color};`,\n ...args\n ]\n const t = timestampFormatter(entry.timestamp)\n if (t !== undefined) result.push(t)\n return result\n }\n\n function firstArgIsColorTemplate(args: any[]) {\n return typeof args[0] === 'string' && args[0].indexOf('%c') !== -1\n }\n\n function getRgb(id: string) {\n return loggerMap[id] = loggerMap[id] || colorMap[count++ & maxColor]\n }\n}\n\nconst gammaMap = {\n rc: 0.2126,\n gc: 0.7152,\n bc: 0.0722,\n lowc: 1 / 12.92\n}\n\nfunction getForegroundColor(background: RGB) {\n // Setting the contrasting color as default\n let color = getComplementary(background)\n const bgLuminance = getRelativeLuminance(background)\n const fgLuminance = (color === '#ffffff') ?\n getRelativeLuminance([255, 255, 255]) :\n getRelativeLuminance([0, 0, 0])\n const relativeL = bgLuminance > fgLuminance ? (bgLuminance + 0.05) / (fgLuminance + 0.05) : (fgLuminance + 0.05) / (bgLuminance + 0.05)\n\n // Can set the contrast ratio based on text size later.\n if (relativeL < 4.5) {\n const avgLuminance = background[0] * gammaMap['rc'] + background[1] * gammaMap['gc'] + background[2] * gammaMap['bc']\n\n // If the relative contrast is lower than standard, we switch color to black/white\n color = (avgLuminance < 220) ? '#ffffff' : '#000000'\n }\n return color\n}\n\nfunction getRelativeLuminance(rgb: RGB) {\n // https://www.w3.org/TR/WCAG/#relativeluminancedef\n const rsrgb = rgb[0] / 255\n const gsrgb = rgb[1] / 255\n const bsrgb = rgb[2] / 255\n\n const r = rsrgb <= 0.03928 ? rsrgb * gammaMap['lowc'] : Math.pow((rsrgb + 0.055) / 1.055, 2.4)\n const g = gsrgb <= 0.03928 ? gsrgb * gammaMap['lowc'] : Math.pow((gsrgb + 0.055) / 1.055, 2.4)\n const b = bsrgb <= 0.03928 ? bsrgb * gammaMap['lowc'] : Math.pow((bsrgb + 0.055) / 1.055, 2.4)\n\n return r * gammaMap['rc'] + g * gammaMap['gc'] + b * gammaMap['bc']\n}\n\nfunction getComplementary(rgb: RGB) {\n const r = 255 - rgb[0]\n const g = 255 - rgb[1]\n const b = 255 - rgb[2]\n return rgbHex([r, g, b])\n}\n","import { createColors } from './createColors.js';\n/**\n * Create colors with specified color map.\n */\nexport function createColorsFromMap(colormap, shades, alpha) {\n if (shades < colormap.length) {\n throw new Error(`Requires at least ${colormap.length} shades.`);\n }\n const result = [];\n const steps = [];\n for (let i = 0; i < colormap.length; i++) {\n steps.push(Math.round(colormap[i].index * shades));\n }\n for (let i = 0; i < colormap.length - 1; i++) {\n const n = steps[i + 1] - steps[i];\n const from = colormap[i].rgb;\n const to = colormap[i + 1].rgb;\n result.push(...createColors(from, to, n, alpha));\n }\n return result;\n}\n//# sourceMappingURL=createColorsFromMap.js.map","import { consoleFormatter, createConsoleLogReporter } from 'standard-log'\nimport { unpartial } from 'unpartial'\nimport { createCssFormatter } from './css/index.js'\nimport type { ColorLogReporterOptions } from './types.js'\n\nexport function createColorLogReporter(options?: ColorLogReporterOptions) {\n return createConsoleLogReporter(unpartial({\n formatter: supportCSSColorInConsole() ? createCssFormatter(options?.cssFormatterOptions) : consoleFormatter\n }, options))\n}\n\n// istanbul ignore next\nfunction supportCSSColorInConsole() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n // @ts-ignore\n if (window?.process?.type === 'renderer' || window?.process?.__nwjs) {\n return true\n }\n\n // Internet Explorer and Edge do not support colors.\n if (navigator?.userAgent?.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false\n }\n\n // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n // @ts-ignore\n return (document?.documentElement?.style?.WebkitAppearance) ||\n // Is firebug? http://stackoverflow.com/a/398120/376773\n // @ts-ignore\n (window?.console?.firebug || (window?.console?.exception && window?.console?.table)) ||\n // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator?.userAgent?.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // Double check webkit in userAgent just in case we are in a worker\n (navigator?.userAgent?.toLowerCase().match(/applewebkit\\/(\\d+)/))\n}\n"],"names":["colorSupport","matches","exec","navigator","userAgent","Number","parseInt","groups","chromeVersion","getChromeVersion","level","hasBasic","has256","has16m","module","exports","stdout","stderr","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","ColorLevels","StandardLog","ANSI_BLACK","ANSI_RED","ANSI_GREEN","ANSI_YELLOW","ANSI_BLUE","ANSI_MAGENTA","ANSI_CYAN","ANSI_WHITE","ANSI_BRIGHT","ANSI_UNDERSCORE","ANSI_FOREGROUND","ANSI_BACKGROUND","wrapAnsi","text","codes","join","createAnsiFormatter","options","timestamp","timestampFormatter","createTimestampFormatter","entry","consoleMethod","toConsoleMethod","id","method","colorLevels","DISABLED","colorLevel","BASIC","basicIDFormatter","ANSI","ansiIDFormatter","TRUE","truecolorIDFormatter","toIDFormatter","formatID","args","push","textCodes","map","x","formatArgs","ansiColorMap","ansiColors","list","counter","length","getAnsiColor","create","trimNilProps","keys","reduce","p","k","notNil","createColors","from","to","shades","alpha","start","diff","inc","Math","max","rgba","i","color","round","rgbHex","rgb","hex","d2h","s","toString","rainbow","index","createCssFormatter","maxColor","style","reducer","e","entries","source3","filter","loggerMap","colorMap","colormap","Error","result","steps","createColorsFromMap","count","idStr","indexOf","firstArgIsColorTemplate","slice","background","border","getComplementary","bgLuminance","getRelativeLuminance","fgLuminance","gammaMap","getForegroundColor","t","rsrgb","gsrgb","bsrgb","pow","g","b","createColorLogReporter","createConsoleLogReporter","s1","formatter","window","process","type","__nwjs","toLowerCase","match","document","documentElement","WebkitAppearance","console","firebug","exception","table","RegExp","$1","cssFormatterOptions","consoleFormatter","s3"],"sourceRoot":""}
1
+ {"version":3,"file":"standard-log-color.esm.js","mappings":"oEAaA,MAAMA,EAVN,WACC,MAAMC,EA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sC,QAAf,EAAM,OAANF,aAAM,IAANA,YAAM,EAANA,OAAQC,eAAO,eAAEE,WAKrC,QAApB,EAAS,OAATpK,gBAAS,IAATA,eAAS,EAATA,UAAWC,iBAAS,eAAEoK,cAAcC,MAAM,6BAON,QAAhC,EAAyB,QAAzB,EAAQ,OAARC,eAAQ,IAARA,cAAQ,EAARA,SAAUC,uBAAe,eAAE5C,aAAK,eAAE6C,oBAGxB,QAAf,EAAM,OAANR,aAAM,IAANA,YAAM,EAANA,OAAQS,eAAO,eAAEC,WAA2B,QAAf,EAAM,OAANV,aAAM,IAANA,YAAM,EAANA,OAAQS,eAAO,eAAEE,aAA4B,QAAf,EAAM,OAANX,aAAM,IAANA,YAAM,EAANA,OAAQS,eAAO,eAAEG,SAGxD,QAApB,EAAS,OAAT7K,gBAAS,IAATA,eAAS,EAATA,UAAWC,iBAAS,eAAEoK,cAAcC,MAAM,oBAAqBnK,SAAS2K,OAAOC,GAAI,KAAO,KAEtE,QAApB,EAAS,OAAT/K,gBAAS,IAATA,eAAS,EAATA,UAAWC,iBAAS,eAAEoK,cAAcC,MAAM,wBA9BH5C,EAAmB7D,aAAO,EAAPA,EAASmH,qBAAuB,EAAAC,mBNiChFlB,EACJ,CAACA,EMjCPlG,ENiCeqH,GACXjD,OAAO9B,GACPH,QAAO,CAACC,EAAGqB,KAAM,IAAMrB,KAAMH,EAAawB,MAAO,CAAC,IM/B3D,I,oBNyB0ByC,EAAQmB,CM5BlC,C","sources":["webpack://StandardLogColor/../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js","webpack://StandardLogColor/webpack/bootstrap","webpack://StandardLogColor/webpack/runtime/compat get default export","webpack://StandardLogColor/webpack/runtime/define property getters","webpack://StandardLogColor/webpack/runtime/hasOwnProperty shorthand","webpack://StandardLogColor/webpack/runtime/make namespace object","webpack://StandardLogColor/external var \"StandardLog\"","webpack://StandardLogColor/./ts/supportColor.ts","webpack://StandardLogColor/./ts/ansi/constants.ts","webpack://StandardLogColor/./ts/ansi/wrapAnsi.ts","webpack://StandardLogColor/./ts/ansi/ansiFormatter.ts","webpack://StandardLogColor/../../node_modules/.pnpm/unpartial@1.0.4/node_modules/unpartial/esm/index.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/esm/createColors.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/esm/rgbHex.js","webpack://StandardLogColor/./ts/css/colors.ts","webpack://StandardLogColor/./ts/css/cssFormatter.ts","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/esm/createColorsFromMap.js","webpack://StandardLogColor/./ts/createColorLogReporter.browser.ts"],"sourcesContent":["/* eslint-env browser */\n'use strict';\n\nfunction getChromeVersion() {\n\tconst matches = /(Chrome|Chromium)\\/(?<chromeVersion>\\d+)\\./.exec(navigator.userAgent);\n\n\tif (!matches) {\n\t\treturn;\n\t}\n\n\treturn Number.parseInt(matches.groups.chromeVersion, 10);\n}\n\nconst colorSupport = getChromeVersion() >= 69 ? {\n\tlevel: 1,\n\thasBasic: true,\n\thas256: false,\n\thas16m: false\n} : false;\n\nmodule.exports = {\n\tstdout: colorSupport,\n\tstderr: colorSupport\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var __WEBPACK_NAMESPACE_OBJECT__ = StandardLog;","import sc from 'supports-color'\n\n/**\n * Color level.\n * This is the same definition as the `ColorSupportLevel` in `supports-color`.\n * Using the same definition for simplicity\n * @see https://github.com/chalk/supports-color/blob/main/index.d.ts#L19\n */\n export enum ColorLevels {\n DISABLED = 0,\n /**\n * Basic 16 colors (4-bits)\n */\n BASIC = 1,\n /**\n * ANSI 256 colors (8-bits)\n */\n ANSI = 2,\n /**\n * Truecolor 16 million colors (24-bits)\n */\n TRUE = 3\n}\n\nexport namespace supportColor {\n export type Result = { stdout: ColorLevels, stderr: ColorLevels }\n}\n\nlet value: supportColor.Result\n\n/**\n * Detects if the platform supports color.\n * For browser, the value can only be:\n * - `{ stdout: 0, stderr: 0 }`, or\n * - `{ stdout: 3, stderr: 3 }`.\n * So you only need to check one case.\n * The result value is made the same so that it can be used in all platforms.\n */\nexport function supportColor(): supportColor.Result {\n // istanbul ignore next\n return value = value || {\n stderr: sc.stderr ? sc.stderr.level : ColorLevels.DISABLED,\n stdout: sc.stdout ? sc.stdout.level : ColorLevels.DISABLED\n }\n}\n","export type AnsiColor = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7\nexport const ANSI_BLACK = 0\nexport const ANSI_RED = 1\nexport const ANSI_GREEN = 2\nexport const ANSI_YELLOW = 3\nexport const ANSI_BLUE = 4\nexport const ANSI_MAGENTA = 5\nexport const ANSI_CYAN = 6\nexport const ANSI_WHITE = 7\n\nexport type AnsiStyle = 1 | 4\nexport const ANSI_BRIGHT = 1\nexport const ANSI_UNDERSCORE = 4\n\nexport const ANSI_FOREGROUND = 30\nexport const ANSI_BACKGROUND = 40\n","export function wrapAnsi(text: string, codes: number[]) {\n return `\\u001B[${codes.join(';')}m${text}\\u001B[0m`\n}\n","import { createTimestampFormatter, LogEntry, TimestampFormat, toConsoleMethod } from 'standard-log'\nimport { ColorLevels, supportColor } from '../supportColor.js'\nimport { ANSI_BACKGROUND, ANSI_BLACK, ANSI_BLUE, ANSI_BRIGHT, ANSI_CYAN, ANSI_FOREGROUND, ANSI_GREEN, ANSI_MAGENTA, ANSI_RED, ANSI_UNDERSCORE, ANSI_WHITE, ANSI_YELLOW } from './constants.js'\nimport { wrapAnsi } from './wrapAnsi.js'\n\nexport type AnsiFormatterOptions = {\n timestamp: TimestampFormat\n}\n\nexport function createAnsiFormatter(options: AnsiFormatterOptions = { timestamp: 'none' }) {\n const timestampFormatter = createTimestampFormatter(options.timestamp)\n\n return function ansiFormatter(entry: LogEntry) {\n const consoleMethod = toConsoleMethod(entry.level)\n const id = formatID(consoleMethod, entry.id)\n const args = formatArgs(timestampFormatter, consoleMethod, entry)\n return [id, ...args]\n }\n}\n\nfunction formatArgs(timestampFormatter: (timestamp: Date) => string | undefined, method: 'error' | 'warn' | 'info' | 'debug', entry: Pick<LogEntry, 'args' | 'timestamp'>) {\n const args = [...entry.args]\n const timestamp = timestampFormatter(entry.timestamp)\n if (timestamp !== undefined) args.push(timestamp)\n const textCodes = method === 'error' ? [ANSI_RED + ANSI_FOREGROUND] :\n method === 'warn' ? [ANSI_YELLOW + ANSI_FOREGROUND] : undefined\n\n return textCodes ? args.map(x => wrapAnsi(x, textCodes)) : args\n}\n\nfunction formatID(method: 'error' | 'warn' | 'info' | 'debug', id: string) {\n const colorLevels = supportColor()\n const colorLevel = method === 'error' ? colorLevels.stderr : colorLevels.stdout\n return toIDFormatter(colorLevel)(id)\n}\n\nfunction toIDFormatter(colorLevel: ColorLevels) {\n // istanbul ignore next\n switch (colorLevel) {\n case ColorLevels.DISABLED: return (id: string) => id\n case ColorLevels.BASIC: return basicIDFormatter\n case ColorLevels.ANSI: return ansiIDFormatter\n case ColorLevels.TRUE: return truecolorIDFormatter\n }\n}\n\nfunction basicIDFormatter(id: string) {\n const codes = getAnsiColor(id)\n return wrapAnsi(` ${id} `, codes)\n}\n\nconst ansiColors: {\n counter: number,\n list: Array<number[]>\n} = {\n counter: 0, list: [\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n ]\n}\nconst ansiColorMap: Record<string, number[]> = Object.create(null)\n\nfunction getAnsiColor(id: string) {\n return ansiColorMap[id] = ansiColorMap[id] || ansiColors.list[ansiColors.counter++ % ansiColors.list.length]\n}\n\n// istanbul ignore next\nfunction ansiIDFormatter(id: string) {\n return basicIDFormatter(id)\n}\n\n// istanbul ignore next\nfunction truecolorIDFormatter(id: string) {\n return basicIDFormatter(id)\n}\n","export function required(source1, source2, source3) {\n return merge([source1, source2, source3], (p, e) => {\n return { ...p, ...e };\n });\n}\nexport function requiredDeep(source1, source2, source3) {\n return merge([source1, source2, source3], (p, e) => deepmerge(p, e));\n}\nfunction merge(entries, reducer) {\n if (entries[0] === undefined || entries[0] === null)\n return entries[0];\n return entries.filter(x => !!x).reduce(reducer, {});\n}\nfunction deepmerge(source1, source2) {\n if (typeof source1 !== 'object' || source1 === null)\n return source2 !== undefined ? source2 : source1;\n if (Array.isArray(source1)) {\n if (Array.isArray(source2))\n return source2;\n if (source2 === undefined)\n return [...source1];\n return [...source1, source2];\n }\n return getAllKeys(source1).concat(getAllKeys(source2)).reduce((p, k) => {\n // @ts-ignore\n p[k] = deepmerge(source1[k], source2 && source2[k]);\n return p;\n }, {});\n}\nfunction getAllKeys(subject, internal = false) {\n if (typeof subject !== 'object')\n return [];\n const propertyNames = Object.getOwnPropertyNames(subject);\n const keys = internal ? propertyNames.filter(n => n !== 'constructor') : propertyNames;\n const proto = Object.getPrototypeOf(subject);\n return proto !== Object.prototype ? keys.concat(getAllKeys(proto, true)) : keys;\n}\nexport function unpartial(s1, s2, s3) {\n // defensive check for JS\n if (s1 === undefined || s1 === null)\n return s1;\n return [s1, s2, s3]\n .filter(notNil)\n .reduce((p, s) => ({ ...p, ...trimNilProps(s) }), {});\n}\nfunction trimNilProps(value) {\n return Object.keys(value).reduce((p, k) => {\n if (notNil(value[k]))\n p[k] = value[k];\n return p;\n }, {});\n}\nfunction notNil(value) {\n return value !== null && value !== undefined;\n}\nexport function unpartialRecursively(arg1, arg2, arg3) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return requiredDeep(arg1, arg2, arg3);\n}\n//# sourceMappingURL=index.js.map","export function createColors(from, to, shades, alpha = [\n from.length === 4 ? from[3] : to.length === 4 ? to[3] : 1,\n to.length === 4 ? to[3] : from.length === 4 ? from[3] : 1\n]) {\n const start = [...from];\n const diff = [\n to[0] - from[0],\n to[1] - from[1],\n to[2] - from[2],\n alpha[1] - alpha[0]\n ];\n if (start.length === 3)\n start.push(alpha[0]);\n const inc = 1 / Math.max(shades - 1, 1);\n const rgba = [];\n for (let i = 0; i < shades; i++) {\n const color = [\n Math.round(start[0] + i * diff[0] * inc),\n Math.round(start[1] + i * diff[1] * inc),\n Math.round(start[2] + i * diff[2] * inc),\n start[3] + i * diff[3] * inc\n ];\n rgba.push(color);\n }\n return rgba;\n}\n//# sourceMappingURL=createColors.js.map","/**\n * Convert `RGB` to `#rgb`\n * JavaScript note: no check for array length, use it properly.\n */\nexport function rgbHex(rgb) {\n let hex = '#';\n for (let i = 0; i < 3; i++) {\n hex += d2h(rgb[i]);\n }\n return hex;\n}\nfunction d2h(d) {\n const s = (+d).toString(16);\n return s.length < 2 ? '0' + s : s;\n}\n//# sourceMappingURL=rgbHex.js.map","import { ColorMap } from 'color-map'\n\nexport const rainbow: ColorMap = [\n { index: 0, rgb: [150, 0, 90] },\n { index: 0.125, rgb: [0, 0, 200] },\n { index: 0.25, rgb: [0, 25, 255] },\n { index: 0.375, rgb: [0, 152, 255] },\n { index: 0.5, rgb: [44, 255, 150] },\n { index: 0.625, rgb: [151, 255, 0] },\n { index: 0.75, rgb: [255, 234, 0] },\n { index: 0.875, rgb: [255, 111, 0] },\n { index: 1, rgb: [255, 0, 0] }\n]\n","import { createColorsFromMap, RGB, RGBA, rgbHex } from 'color-map'\nimport { createTimestampFormatter, LogEntry } from 'standard-log'\nimport { required } from 'unpartial'\nimport type { CssFormatterOptions } from '../types.js'\nimport { rainbow } from './colors.js'\n\nexport function createCssFormatter(options?: CssFormatterOptions) {\n const { maxColor, timestamp, style } = required({\n maxColor: 20,\n timestamp: 'none',\n style: 'padding: 2px; line-height: 1rem;'\n }, options)\n const loggerMap: Record<string, RGB> = Object.create(null)\n const colorMap: RGBA[] = createColorsFromMap(rainbow, maxColor)\n let count = 0\n\n const timestampFormatter = createTimestampFormatter(timestamp)\n\n return function cssFormatter(entry: LogEntry) {\n let idStr = `%c ${entry.id} `\n let args: any[]\n if (firstArgIsColorTemplate(entry.args)) {\n idStr += entry.args[0]\n args = [...entry.args.slice(1)]\n }\n else {\n args = [...entry.args]\n }\n const rgb = getRgb(entry.id)\n const background = rgbHex(rgb)\n const border = rgbHex(rgb.map(x => Math.max(0, x - 32)) as RGB)\n const color = getForegroundColor(rgb)\n const result = [\n idStr,\n `${style}background: ${background};border: 1px solid ${border};color: ${color};`,\n ...args\n ]\n const t = timestampFormatter(entry.timestamp)\n if (t !== undefined) result.push(t)\n return result\n }\n\n function firstArgIsColorTemplate(args: any[]) {\n return typeof args[0] === 'string' && args[0].indexOf('%c') !== -1\n }\n\n function getRgb(id: string) {\n return loggerMap[id] = loggerMap[id] || colorMap[count++ & maxColor]\n }\n}\n\nconst gammaMap = {\n rc: 0.2126,\n gc: 0.7152,\n bc: 0.0722,\n lowc: 1 / 12.92\n}\n\nfunction getForegroundColor(background: RGB) {\n // Setting the contrasting color as default\n let color = getComplementary(background)\n const bgLuminance = getRelativeLuminance(background)\n const fgLuminance = (color === '#ffffff') ?\n getRelativeLuminance([255, 255, 255]) :\n getRelativeLuminance([0, 0, 0])\n const relativeL = bgLuminance > fgLuminance ? (bgLuminance + 0.05) / (fgLuminance + 0.05) : (fgLuminance + 0.05) / (bgLuminance + 0.05)\n\n // Can set the contrast ratio based on text size later.\n if (relativeL < 4.5) {\n const avgLuminance = background[0] * gammaMap['rc'] + background[1] * gammaMap['gc'] + background[2] * gammaMap['bc']\n\n // If the relative contrast is lower than standard, we switch color to black/white\n color = (avgLuminance < 220) ? '#ffffff' : '#000000'\n }\n return color\n}\n\nfunction getRelativeLuminance(rgb: RGB) {\n // https://www.w3.org/TR/WCAG/#relativeluminancedef\n const rsrgb = rgb[0] / 255\n const gsrgb = rgb[1] / 255\n const bsrgb = rgb[2] / 255\n\n const r = rsrgb <= 0.03928 ? rsrgb * gammaMap['lowc'] : Math.pow((rsrgb + 0.055) / 1.055, 2.4)\n const g = gsrgb <= 0.03928 ? gsrgb * gammaMap['lowc'] : Math.pow((gsrgb + 0.055) / 1.055, 2.4)\n const b = bsrgb <= 0.03928 ? bsrgb * gammaMap['lowc'] : Math.pow((bsrgb + 0.055) / 1.055, 2.4)\n\n return r * gammaMap['rc'] + g * gammaMap['gc'] + b * gammaMap['bc']\n}\n\nfunction getComplementary(rgb: RGB) {\n const r = 255 - rgb[0]\n const g = 255 - rgb[1]\n const b = 255 - rgb[2]\n return rgbHex([r, g, b])\n}\n","import { createColors } from './createColors.js';\n/**\n * Create colors with specified color map.\n */\nexport function createColorsFromMap(colormap, shades, alpha) {\n if (shades < colormap.length) {\n throw new Error(`Requires at least ${colormap.length} shades.`);\n }\n const result = [];\n const steps = [];\n for (let i = 0; i < colormap.length; i++) {\n steps.push(Math.round(colormap[i].index * shades));\n }\n for (let i = 0; i < colormap.length - 1; i++) {\n const n = steps[i + 1] - steps[i];\n const from = colormap[i].rgb;\n const to = colormap[i + 1].rgb;\n result.push(...createColors(from, to, n, alpha));\n }\n return result;\n}\n//# sourceMappingURL=createColorsFromMap.js.map","import { consoleFormatter, createConsoleLogReporter } from 'standard-log'\nimport { unpartial } from 'unpartial'\nimport { createCssFormatter } from './css/index.js'\nimport type { ColorLogReporterOptions } from './types.js'\n\nexport function createColorLogReporter(options?: ColorLogReporterOptions) {\n return createConsoleLogReporter(unpartial({\n formatter: supportCSSColorInConsole() ? createCssFormatter(options?.cssFormatterOptions) : consoleFormatter\n }, options))\n}\n\n// istanbul ignore next\nfunction supportCSSColorInConsole() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n // @ts-ignore\n if (window?.process?.type === 'renderer' || window?.process?.__nwjs) {\n return true\n }\n\n // Internet Explorer and Edge do not support colors.\n if (navigator?.userAgent?.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false\n }\n\n // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n // @ts-ignore\n return (document?.documentElement?.style?.WebkitAppearance) ||\n // Is firebug? http://stackoverflow.com/a/398120/376773\n // @ts-ignore\n (window?.console?.firebug || (window?.console?.exception && window?.console?.table)) ||\n // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator?.userAgent?.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // Double check webkit in userAgent just in case we are in a worker\n (navigator?.userAgent?.toLowerCase().match(/applewebkit\\/(\\d+)/))\n}\n"],"names":["colorSupport","matches","exec","navigator","userAgent","Number","parseInt","groups","chromeVersion","getChromeVersion","level","hasBasic","has256","has16m","module","exports","stdout","stderr","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","ColorLevels","StandardLog","ANSI_BLACK","ANSI_RED","ANSI_GREEN","ANSI_YELLOW","ANSI_BLUE","ANSI_MAGENTA","ANSI_CYAN","ANSI_WHITE","ANSI_BRIGHT","ANSI_UNDERSCORE","ANSI_FOREGROUND","ANSI_BACKGROUND","wrapAnsi","text","codes","join","createAnsiFormatter","options","timestamp","timestampFormatter","createTimestampFormatter","entry","consoleMethod","toConsoleMethod","id","method","colorLevels","DISABLED","colorLevel","BASIC","basicIDFormatter","ANSI","ansiIDFormatter","TRUE","truecolorIDFormatter","toIDFormatter","formatID","args","push","textCodes","map","x","formatArgs","ansiColorMap","ansiColors","list","counter","length","getAnsiColor","create","trimNilProps","keys","reduce","p","k","notNil","createColors","from","to","shades","alpha","start","diff","inc","Math","max","rgba","i","color","round","rgbHex","rgb","hex","d2h","s","toString","rainbow","index","createCssFormatter","maxColor","style","reducer","e","entries","source3","filter","loggerMap","colorMap","colormap","Error","result","steps","createColorsFromMap","count","idStr","indexOf","firstArgIsColorTemplate","slice","background","border","getComplementary","bgLuminance","getRelativeLuminance","fgLuminance","gammaMap","getForegroundColor","t","rsrgb","gsrgb","bsrgb","pow","g","b","createColorLogReporter","createConsoleLogReporter","s1","formatter","window","process","type","__nwjs","toLowerCase","match","document","documentElement","WebkitAppearance","console","firebug","exception","table","RegExp","$1","cssFormatterOptions","consoleFormatter","s3"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- var StandardLogColor;!function(){"use strict";var n={12:function(n){const t=function(){const n=/(Chrome|Chromium)\/(?<chromeVersion>\d+)\./.exec(navigator.userAgent);if(n)return Number.parseInt(n.groups.chromeVersion,10)}()>=69&&{level:1,hasBasic:!0,has256:!1,has16m:!1};n.exports={stdout:t,stderr:t}}},t={};function o(r){var e=t[r];if(void 0!==e)return e.exports;var i=t[r]={exports:{}};return n[r](i,i.exports,o),i.exports}o.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return o.d(t,{a:t}),t},o.d=function(n,t){for(var r in t)o.o(t,r)&&!o.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},o.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},o.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})};var r={};!function(){o.r(r),o.d(r,{ANSI_BACKGROUND:function(){return h},ANSI_BLACK:function(){return d},ANSI_BLUE:function(){return s},ANSI_BRIGHT:function(){return m},ANSI_CYAN:function(){return v},ANSI_FOREGROUND:function(){return w},ANSI_GREEN:function(){return a},ANSI_MAGENTA:function(){return f},ANSI_RED:function(){return c},ANSI_UNDERSCORE:function(){return p},ANSI_WHITE:function(){return g},ANSI_YELLOW:function(){return l},createAnsiFormatter:function(){return S},createColorLogReporter:function(){return F},createCssFormatter:function(){return D},wrapAnsi:function(){return A}});var n,t=StandardLog,e=o(12),i=o.n(e);let u;!function(n){n[n.DISABLED=0]="DISABLED",n[n.BASIC=1]="BASIC",n[n.ANSI=2]="ANSI",n[n.TRUE=3]="TRUE"}(n=n||(n={}));const d=0,c=1,a=2,l=3,s=4,f=5,v=6,g=7,m=1,p=4,w=30,h=40;function A(n,t){return`[${t.join(";")}m${n}`}function S(o={timestamp:"none"}){const r=(0,t.createTimestampFormatter)(o.timestamp);return function(o){const e=(0,t.toConsoleMethod)(o.level),d=function(t,o){const r=u=u||{stderr:i().stderr?i().stderr.level:n.DISABLED,stdout:i().stdout?i().stdout.level:n.DISABLED};return function(t){switch(t){case n.DISABLED:return n=>n;case n.BASIC:return b;case n.ANSI:return N;case n.TRUE:return E}}("error"===t?r.stderr:r.stdout)(o)}(e,o.id),a=function(n,t,o){const r=[...o.args],e=n(o.timestamp);void 0!==e&&r.push(e);const i="error"===t?[c+w]:"warn"===t?[l+w]:void 0;return i?r.map((n=>A(n,i))):r}(r,e,o);return[d,...a]}}function b(n){const t=function(n){return I[n]=I[n]||x.list[x.counter++%x.list.length]}(n);return A(` ${n} `,t)}const x={counter:0,list:[[g+w,c+h],[d+w,a+h],[d+w,l+h],[g+w,s+h],[g+w,f+h],[d+w,v+h],[g+w,d+h],[g+w,c+h,m],[d+w,a+h,m],[d+w,l+h,m],[g+w,s+h,m],[g+w,f+h,m],[d+w,v+h,m],[g+w,d+h,m],[g+w,c+h,p],[d+w,a+h,p],[d+w,l+h,p],[g+w,s+h,p],[g+w,f+h,p],[d+w,v+h,p],[g+w,d+h,p],[g+w,c+h,m,p],[d+w,a+h,m,p],[d+w,l+h,m,p],[g+w,s+h,m,p],[g+w,f+h,m,p],[d+w,v+h,m,p],[g+w,d+h,m,p]]},I=Object.create(null);function N(n){return b(n)}function E(n){return b(n)}function C(n){return Object.keys(n).reduce(((t,o)=>(_(n[o])&&(t[o]=n[o]),t)),{})}function _(n){return null!=n}function L(n,t,o,r=[4===n.length?n[3]:4===t.length?t[3]:1,4===t.length?t[3]:4===n.length?n[3]:1]){const e=[...n],i=[t[0]-n[0],t[1]-n[1],t[2]-n[2],r[1]-r[0]];3===e.length&&e.push(r[0]);const u=1/Math.max(o-1,1),d=[];for(let n=0;n<o;n++){const t=[Math.round(e[0]+n*i[0]*u),Math.round(e[1]+n*i[1]*u),Math.round(e[2]+n*i[2]*u),e[3]+n*i[3]*u];d.push(t)}return d}function y(n){let t="#";for(let o=0;o<3;o++)t+=O(n[o]);return t}function O(n){const t=(+n).toString(16);return t.length<2?"0"+t:t}const R=[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}];function D(n){const{maxColor:o,timestamp:r,style:e}=(u=(n,t)=>({...n,...t}),void 0===(i=[{maxColor:20,timestamp:"none",style:"padding: 2px; margin: 2px; line-height: 1.8em;"},n,void 0])[0]||null===i[0]?i[0]:i.filter((n=>!!n)).reduce(u,{}));var i,u;const d=Object.create(null),c=function(n,t,o){if(t<n.length)throw new Error(`Requires at least ${n.length} shades.`);const r=[],e=[];for(let o=0;o<n.length;o++)e.push(Math.round(n[o].index*t));for(let t=0;t<n.length-1;t++){const o=e[t+1]-e[t],i=n[t].rgb,u=n[t+1].rgb;r.push(...L(i,u,o,undefined))}return r}(R,o);let a=0;const l=(0,t.createTimestampFormatter)(r);return function(n){let t,r=`%c ${n.id} `;!function(n){return"string"==typeof n[0]&&-1!==n[0].indexOf("%c")}(n.args)?t=[...n.args]:(r+=n.args[0],t=[...n.args.slice(1)]);const i=(u=n.id,d[u]=d[u]||c[a++&o]);var u;const s=y(i),f=y(i.map((n=>Math.max(0,n-32)))),v=function(n){let t=function(n){return y([255-n[0],255-n[1],255-n[2]])}(n);const o=j(n),r=j("#ffffff"===t?[255,255,255]:[0,0,0]);return(o>r?(o+.05)/(r+.05):(r+.05)/(o+.05))<4.5&&(t=n[0]*M+n[1]*B+n[2]*T<220?"#ffffff":"#000000"),t}(i),g=[r,`${e}background: ${s};border: 1px solid ${f};color: ${v};`,...t],m=l(n.timestamp);return void 0!==m&&g.push(m),g}}const M=.2126,B=.7152,T=.0722,$=1/12.92;function j(n){const t=n[0]/255,o=n[1]/255,r=n[2]/255,e=t<=.03928?t*$:Math.pow((t+.055)/1.055,2.4),i=o<=.03928?o*$:Math.pow((o+.055)/1.055,2.4),u=r<=.03928?r*$:Math.pow((r+.055)/1.055,2.4);return e*M+i*B+u*T}function F(n){return(0,t.createConsoleLogReporter)(null==(f={formatter:"renderer"===(null===(o=null===window||void 0===window?void 0:window.process)||void 0===o?void 0:o.type)||(null===(r=null===window||void 0===window?void 0:window.process)||void 0===r?void 0:r.__nwjs)||!(null===(e=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===e?void 0:e.toLowerCase().match(/(edge|trident)\/(\d+)/))&&((null===(u=null===(i=null===document||void 0===document?void 0:document.documentElement)||void 0===i?void 0:i.style)||void 0===u?void 0:u.WebkitAppearance)||(null===(d=null===window||void 0===window?void 0:window.console)||void 0===d?void 0:d.firebug)||(null===(c=null===window||void 0===window?void 0:window.console)||void 0===c?void 0:c.exception)&&(null===(a=null===window||void 0===window?void 0:window.console)||void 0===a?void 0:a.table)||(null===(l=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===l?void 0:l.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(RegExp.$1,10)>=31||(null===(s=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===s?void 0:s.toLowerCase().match(/applewebkit\/(\d+)/)))?D(null==n?void 0:n.cssFormatterOptions):t.consoleFormatter})?f:[f,n,v].filter(_).reduce(((n,t)=>({...n,...C(t)})),{}));var o,r,e,i,u,d,c,a,l,s,f,v}}(),StandardLogColor=r}();
1
+ var StandardLogColor;!function(){"use strict";var n={12:function(n){const t=function(){const n=/(Chrome|Chromium)\/(?<chromeVersion>\d+)\./.exec(navigator.userAgent);if(n)return Number.parseInt(n.groups.chromeVersion,10)}()>=69&&{level:1,hasBasic:!0,has256:!1,has16m:!1};n.exports={stdout:t,stderr:t}}},t={};function o(r){var e=t[r];if(void 0!==e)return e.exports;var i=t[r]={exports:{}};return n[r](i,i.exports,o),i.exports}o.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return o.d(t,{a:t}),t},o.d=function(n,t){for(var r in t)o.o(t,r)&&!o.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},o.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},o.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})};var r={};!function(){o.r(r),o.d(r,{ANSI_BACKGROUND:function(){return h},ANSI_BLACK:function(){return d},ANSI_BLUE:function(){return a},ANSI_BRIGHT:function(){return m},ANSI_CYAN:function(){return v},ANSI_FOREGROUND:function(){return w},ANSI_GREEN:function(){return l},ANSI_MAGENTA:function(){return f},ANSI_RED:function(){return c},ANSI_UNDERSCORE:function(){return p},ANSI_WHITE:function(){return g},ANSI_YELLOW:function(){return s},createAnsiFormatter:function(){return S},createColorLogReporter:function(){return F},createCssFormatter:function(){return D},wrapAnsi:function(){return A}});var n,t=StandardLog,e=o(12),i=o.n(e);let u;!function(n){n[n.DISABLED=0]="DISABLED",n[n.BASIC=1]="BASIC",n[n.ANSI=2]="ANSI",n[n.TRUE=3]="TRUE"}(n=n||(n={}));const d=0,c=1,l=2,s=3,a=4,f=5,v=6,g=7,m=1,p=4,w=30,h=40;function A(n,t){return`[${t.join(";")}m${n}`}function S(o={timestamp:"none"}){const r=(0,t.createTimestampFormatter)(o.timestamp);return function(o){const e=(0,t.toConsoleMethod)(o.level),d=function(t,o){const r=u=u||{stderr:i().stderr?i().stderr.level:n.DISABLED,stdout:i().stdout?i().stdout.level:n.DISABLED};return function(t){switch(t){case n.DISABLED:return n=>n;case n.BASIC:return b;case n.ANSI:return N;case n.TRUE:return E}}("error"===t?r.stderr:r.stdout)(o)}(e,o.id),l=function(n,t,o){const r=[...o.args],e=n(o.timestamp);void 0!==e&&r.push(e);const i="error"===t?[c+w]:"warn"===t?[s+w]:void 0;return i?r.map((n=>A(n,i))):r}(r,e,o);return[d,...l]}}function b(n){const t=function(n){return x[n]=x[n]||I.list[I.counter++%I.list.length]}(n);return A(` ${n} `,t)}const I={counter:0,list:[[g+w,c+h],[d+w,l+h],[d+w,s+h],[g+w,a+h],[g+w,f+h],[d+w,v+h],[g+w,d+h],[g+w,c+h,m],[d+w,l+h,m],[d+w,s+h,m],[g+w,a+h,m],[g+w,f+h,m],[d+w,v+h,m],[g+w,d+h,m],[g+w,c+h,p],[d+w,l+h,p],[d+w,s+h,p],[g+w,a+h,p],[g+w,f+h,p],[d+w,v+h,p],[g+w,d+h,p],[g+w,c+h,m,p],[d+w,l+h,m,p],[d+w,s+h,m,p],[g+w,a+h,m,p],[g+w,f+h,m,p],[d+w,v+h,m,p],[g+w,d+h,m,p]]},x=Object.create(null);function N(n){return b(n)}function E(n){return b(n)}function C(n){return Object.keys(n).reduce(((t,o)=>(_(n[o])&&(t[o]=n[o]),t)),{})}function _(n){return null!=n}function L(n,t,o,r=[4===n.length?n[3]:4===t.length?t[3]:1,4===t.length?t[3]:4===n.length?n[3]:1]){const e=[...n],i=[t[0]-n[0],t[1]-n[1],t[2]-n[2],r[1]-r[0]];3===e.length&&e.push(r[0]);const u=1/Math.max(o-1,1),d=[];for(let n=0;n<o;n++){const t=[Math.round(e[0]+n*i[0]*u),Math.round(e[1]+n*i[1]*u),Math.round(e[2]+n*i[2]*u),e[3]+n*i[3]*u];d.push(t)}return d}function y(n){let t="#";for(let o=0;o<3;o++)t+=O(n[o]);return t}function O(n){const t=(+n).toString(16);return t.length<2?"0"+t:t}const R=[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}];function D(n){const{maxColor:o,timestamp:r,style:e}=(u=(n,t)=>({...n,...t}),void 0===(i=[{maxColor:20,timestamp:"none",style:"padding: 2px; line-height: 1rem;"},n,void 0])[0]||null===i[0]?i[0]:i.filter((n=>!!n)).reduce(u,{}));var i,u;const d=Object.create(null),c=function(n,t,o){if(t<n.length)throw new Error(`Requires at least ${n.length} shades.`);const r=[],e=[];for(let o=0;o<n.length;o++)e.push(Math.round(n[o].index*t));for(let t=0;t<n.length-1;t++){const o=e[t+1]-e[t],i=n[t].rgb,u=n[t+1].rgb;r.push(...L(i,u,o,undefined))}return r}(R,o);let l=0;const s=(0,t.createTimestampFormatter)(r);return function(n){let t,r=`%c ${n.id} `;!function(n){return"string"==typeof n[0]&&-1!==n[0].indexOf("%c")}(n.args)?t=[...n.args]:(r+=n.args[0],t=[...n.args.slice(1)]);const i=(u=n.id,d[u]=d[u]||c[l++&o]);var u;const a=y(i),f=y(i.map((n=>Math.max(0,n-32)))),v=function(n){let t=function(n){return y([255-n[0],255-n[1],255-n[2]])}(n);const o=j(n),r=j("#ffffff"===t?[255,255,255]:[0,0,0]);return(o>r?(o+.05)/(r+.05):(r+.05)/(o+.05))<4.5&&(t=n[0]*M+n[1]*B+n[2]*T<220?"#ffffff":"#000000"),t}(i),g=[r,`${e}background: ${a};border: 1px solid ${f};color: ${v};`,...t],m=s(n.timestamp);return void 0!==m&&g.push(m),g}}const M=.2126,B=.7152,T=.0722,$=1/12.92;function j(n){const t=n[0]/255,o=n[1]/255,r=n[2]/255,e=t<=.03928?t*$:Math.pow((t+.055)/1.055,2.4),i=o<=.03928?o*$:Math.pow((o+.055)/1.055,2.4),u=r<=.03928?r*$:Math.pow((r+.055)/1.055,2.4);return e*M+i*B+u*T}function F(n){return(0,t.createConsoleLogReporter)(null==(f={formatter:"renderer"===(null===(o=null===window||void 0===window?void 0:window.process)||void 0===o?void 0:o.type)||(null===(r=null===window||void 0===window?void 0:window.process)||void 0===r?void 0:r.__nwjs)||!(null===(e=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===e?void 0:e.toLowerCase().match(/(edge|trident)\/(\d+)/))&&((null===(u=null===(i=null===document||void 0===document?void 0:document.documentElement)||void 0===i?void 0:i.style)||void 0===u?void 0:u.WebkitAppearance)||(null===(d=null===window||void 0===window?void 0:window.console)||void 0===d?void 0:d.firebug)||(null===(c=null===window||void 0===window?void 0:window.console)||void 0===c?void 0:c.exception)&&(null===(l=null===window||void 0===window?void 0:window.console)||void 0===l?void 0:l.table)||(null===(s=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===s?void 0:s.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(RegExp.$1,10)>=31||(null===(a=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===a?void 0:a.toLowerCase().match(/applewebkit\/(\d+)/)))?D(null==n?void 0:n.cssFormatterOptions):t.consoleFormatter})?f:[f,n,v].filter(_).reduce(((n,t)=>({...n,...C(t)})),{}));var o,r,e,i,u,d,c,l,s,a,f,v}}(),StandardLogColor=r}();
2
2
  //# sourceMappingURL=standard-log-color.nodenext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standard-log-color.nodenext.js","mappings":"oEAaA,MAAMA,EAVN,WACC,MAAMC,EAAU,6CAA6CC,KAAKC,UAAUC,WAE5E,GAAKH,EAIL,OAAOI,OAAOC,SAASL,EAAQM,OAAOC,cAAe,GACtD,CAEqBC,IAAsB,IAAK,CAC/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ATA,UAAWC,iBAAS,eAAEoK,cAAcC,MAAM,6BAON,QAAhC,EAAyB,QAAzB,EAAQ,OAARC,eAAQ,IAARA,cAAQ,EAARA,SAAUC,uBAAe,eAAE5C,aAAK,eAAE6C,oBAGxB,QAAf,EAAM,OAANR,aAAM,IAANA,YAAM,EAANA,OAAQS,eAAO,eAAEC,WAA2B,QAAf,EAAM,OAANV,aAAM,IAANA,YAAM,EAANA,OAAQS,eAAO,eAAEE,aAA4B,QAAf,EAAM,OAANX,aAAM,IAANA,YAAM,EAANA,OAAQS,eAAO,eAAEG,SAGxD,QAApB,EAAS,OAAT7K,gBAAS,IAATA,eAAS,EAATA,UAAWC,iBAAS,eAAEoK,cAAcC,MAAM,oBAAqBnK,SAAS2K,OAAOC,GAAI,KAAO,KAEtE,QAApB,EAAS,OAAT/K,gBAAS,IAATA,eAAS,EAATA,UAAWC,iBAAS,eAAEoK,cAAcC,MAAM,wBA9BH5C,EAAmB7D,aAAO,EAAPA,EAASmH,qBAAuB,EAAAC,mBNiChFlB,EACJ,CAACA,EMjCPlG,ENiCeqH,GACXjD,OAAO9B,GACPH,QAAO,CAACC,EAAGqB,KAAM,IAAMrB,KAAMH,EAAawB,MAAO,CAAC,IM/B3D,I,oBNyB0ByC,EAAQmB,CM5BlC,C","sources":["webpack://StandardLogColor/../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js","webpack://StandardLogColor/webpack/bootstrap","webpack://StandardLogColor/webpack/runtime/compat get default export","webpack://StandardLogColor/webpack/runtime/define property getters","webpack://StandardLogColor/webpack/runtime/hasOwnProperty shorthand","webpack://StandardLogColor/webpack/runtime/make namespace object","webpack://StandardLogColor/external var \"StandardLog\"","webpack://StandardLogColor/./ts/supportColor.ts","webpack://StandardLogColor/./ts/ansi/constants.ts","webpack://StandardLogColor/./ts/ansi/wrapAnsi.ts","webpack://StandardLogColor/./ts/ansi/ansiFormatter.ts","webpack://StandardLogColor/../../node_modules/.pnpm/unpartial@1.0.4/node_modules/unpartial/esm/index.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/esm/createColors.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/esm/rgbHex.js","webpack://StandardLogColor/./ts/css/colors.ts","webpack://StandardLogColor/./ts/css/cssFormatter.ts","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/esm/createColorsFromMap.js","webpack://StandardLogColor/./ts/createColorLogReporter.browser.ts"],"sourcesContent":["/* eslint-env browser */\n'use strict';\n\nfunction getChromeVersion() {\n\tconst matches = /(Chrome|Chromium)\\/(?<chromeVersion>\\d+)\\./.exec(navigator.userAgent);\n\n\tif (!matches) {\n\t\treturn;\n\t}\n\n\treturn Number.parseInt(matches.groups.chromeVersion, 10);\n}\n\nconst colorSupport = getChromeVersion() >= 69 ? {\n\tlevel: 1,\n\thasBasic: true,\n\thas256: false,\n\thas16m: false\n} : false;\n\nmodule.exports = {\n\tstdout: colorSupport,\n\tstderr: colorSupport\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var __WEBPACK_NAMESPACE_OBJECT__ = StandardLog;","import sc from 'supports-color'\n\n/**\n * Color level.\n * This is the same definition as the `ColorSupportLevel` in `supports-color`.\n * Using the same definition for simplicity\n * @see https://github.com/chalk/supports-color/blob/main/index.d.ts#L19\n */\n export enum ColorLevels {\n DISABLED = 0,\n /**\n * Basic 16 colors (4-bits)\n */\n BASIC = 1,\n /**\n * ANSI 256 colors (8-bits)\n */\n ANSI = 2,\n /**\n * Truecolor 16 million colors (24-bits)\n */\n TRUE = 3\n}\n\nexport namespace supportColor {\n export type Result = { stdout: ColorLevels, stderr: ColorLevels }\n}\n\nlet value: supportColor.Result\n\n/**\n * Detects if the platform supports color.\n * For browser, the value can only be:\n * - `{ stdout: 0, stderr: 0 }`, or\n * - `{ stdout: 3, stderr: 3 }`.\n * So you only need to check one case.\n * The result value is made the same so that it can be used in all platforms.\n */\nexport function supportColor(): supportColor.Result {\n // istanbul ignore next\n return value = value || {\n stderr: sc.stderr ? sc.stderr.level : ColorLevels.DISABLED,\n stdout: sc.stdout ? sc.stdout.level : ColorLevels.DISABLED\n }\n}\n","export type AnsiColor = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7\nexport const ANSI_BLACK = 0\nexport const ANSI_RED = 1\nexport const ANSI_GREEN = 2\nexport const ANSI_YELLOW = 3\nexport const ANSI_BLUE = 4\nexport const ANSI_MAGENTA = 5\nexport const ANSI_CYAN = 6\nexport const ANSI_WHITE = 7\n\nexport type AnsiStyle = 1 | 4\nexport const ANSI_BRIGHT = 1\nexport const ANSI_UNDERSCORE = 4\n\nexport const ANSI_FOREGROUND = 30\nexport const ANSI_BACKGROUND = 40\n","export function wrapAnsi(text: string, codes: number[]) {\n return `\\u001B[${codes.join(';')}m${text}\\u001B[0m`\n}\n","import { createTimestampFormatter, LogEntry, TimestampFormat, toConsoleMethod } from 'standard-log'\nimport { ColorLevels, supportColor } from '../supportColor.js'\nimport { ANSI_BACKGROUND, ANSI_BLACK, ANSI_BLUE, ANSI_BRIGHT, ANSI_CYAN, ANSI_FOREGROUND, ANSI_GREEN, ANSI_MAGENTA, ANSI_RED, ANSI_UNDERSCORE, ANSI_WHITE, ANSI_YELLOW } from './constants.js'\nimport { wrapAnsi } from './wrapAnsi.js'\n\nexport type AnsiFormatterOptions = {\n timestamp: TimestampFormat\n}\n\nexport function createAnsiFormatter(options: AnsiFormatterOptions = { timestamp: 'none' }) {\n const timestampFormatter = createTimestampFormatter(options.timestamp)\n\n return function ansiFormatter(entry: LogEntry) {\n const consoleMethod = toConsoleMethod(entry.level)\n const id = formatID(consoleMethod, entry.id)\n const args = formatArgs(timestampFormatter, consoleMethod, entry)\n return [id, ...args]\n }\n}\n\nfunction formatArgs(timestampFormatter: (timestamp: Date) => string | undefined, method: 'error' | 'warn' | 'info' | 'debug', entry: Pick<LogEntry, 'args' | 'timestamp'>) {\n const args = [...entry.args]\n const timestamp = timestampFormatter(entry.timestamp)\n if (timestamp !== undefined) args.push(timestamp)\n const textCodes = method === 'error' ? [ANSI_RED + ANSI_FOREGROUND] :\n method === 'warn' ? [ANSI_YELLOW + ANSI_FOREGROUND] : undefined\n\n return textCodes ? args.map(x => wrapAnsi(x, textCodes)) : args\n}\n\nfunction formatID(method: 'error' | 'warn' | 'info' | 'debug', id: string) {\n const colorLevels = supportColor()\n const colorLevel = method === 'error' ? colorLevels.stderr : colorLevels.stdout\n return toIDFormatter(colorLevel)(id)\n}\n\nfunction toIDFormatter(colorLevel: ColorLevels) {\n // istanbul ignore next\n switch (colorLevel) {\n case ColorLevels.DISABLED: return (id: string) => id\n case ColorLevels.BASIC: return basicIDFormatter\n case ColorLevels.ANSI: return ansiIDFormatter\n case ColorLevels.TRUE: return truecolorIDFormatter\n }\n}\n\nfunction basicIDFormatter(id: string) {\n const codes = getAnsiColor(id)\n return wrapAnsi(` ${id} `, codes)\n}\n\nconst ansiColors: {\n counter: number,\n list: Array<number[]>\n} = {\n counter: 0, list: [\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n ]\n}\nconst ansiColorMap: Record<string, number[]> = Object.create(null)\n\nfunction getAnsiColor(id: string) {\n return ansiColorMap[id] = ansiColorMap[id] || ansiColors.list[ansiColors.counter++ % ansiColors.list.length]\n}\n\n// istanbul ignore next\nfunction ansiIDFormatter(id: string) {\n return basicIDFormatter(id)\n}\n\n// istanbul ignore next\nfunction truecolorIDFormatter(id: string) {\n return basicIDFormatter(id)\n}\n","export function required(source1, source2, source3) {\n return merge([source1, source2, source3], (p, e) => {\n return { ...p, ...e };\n });\n}\nexport function requiredDeep(source1, source2, source3) {\n return merge([source1, source2, source3], (p, e) => deepmerge(p, e));\n}\nfunction merge(entries, reducer) {\n if (entries[0] === undefined || entries[0] === null)\n return entries[0];\n return entries.filter(x => !!x).reduce(reducer, {});\n}\nfunction deepmerge(source1, source2) {\n if (typeof source1 !== 'object' || source1 === null)\n return source2 !== undefined ? source2 : source1;\n if (Array.isArray(source1)) {\n if (Array.isArray(source2))\n return source2;\n if (source2 === undefined)\n return [...source1];\n return [...source1, source2];\n }\n return getAllKeys(source1).concat(getAllKeys(source2)).reduce((p, k) => {\n // @ts-ignore\n p[k] = deepmerge(source1[k], source2 && source2[k]);\n return p;\n }, {});\n}\nfunction getAllKeys(subject, internal = false) {\n if (typeof subject !== 'object')\n return [];\n const propertyNames = Object.getOwnPropertyNames(subject);\n const keys = internal ? propertyNames.filter(n => n !== 'constructor') : propertyNames;\n const proto = Object.getPrototypeOf(subject);\n return proto !== Object.prototype ? keys.concat(getAllKeys(proto, true)) : keys;\n}\nexport function unpartial(s1, s2, s3) {\n // defensive check for JS\n if (s1 === undefined || s1 === null)\n return s1;\n return [s1, s2, s3]\n .filter(notNil)\n .reduce((p, s) => ({ ...p, ...trimNilProps(s) }), {});\n}\nfunction trimNilProps(value) {\n return Object.keys(value).reduce((p, k) => {\n if (notNil(value[k]))\n p[k] = value[k];\n return p;\n }, {});\n}\nfunction notNil(value) {\n return value !== null && value !== undefined;\n}\nexport function unpartialRecursively(arg1, arg2, arg3) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return requiredDeep(arg1, arg2, arg3);\n}\n//# sourceMappingURL=index.js.map","export function createColors(from, to, shades, alpha = [\n from.length === 4 ? from[3] : to.length === 4 ? to[3] : 1,\n to.length === 4 ? to[3] : from.length === 4 ? from[3] : 1\n]) {\n const start = [...from];\n const diff = [\n to[0] - from[0],\n to[1] - from[1],\n to[2] - from[2],\n alpha[1] - alpha[0]\n ];\n if (start.length === 3)\n start.push(alpha[0]);\n const inc = 1 / Math.max(shades - 1, 1);\n const rgba = [];\n for (let i = 0; i < shades; i++) {\n const color = [\n Math.round(start[0] + i * diff[0] * inc),\n Math.round(start[1] + i * diff[1] * inc),\n Math.round(start[2] + i * diff[2] * inc),\n start[3] + i * diff[3] * inc\n ];\n rgba.push(color);\n }\n return rgba;\n}\n//# sourceMappingURL=createColors.js.map","/**\n * Convert `RGB` to `#rgb`\n * JavaScript note: no check for array length, use it properly.\n */\nexport function rgbHex(rgb) {\n let hex = '#';\n for (let i = 0; i < 3; i++) {\n hex += d2h(rgb[i]);\n }\n return hex;\n}\nfunction d2h(d) {\n const s = (+d).toString(16);\n return s.length < 2 ? '0' + s : s;\n}\n//# sourceMappingURL=rgbHex.js.map","import { ColorMap } from 'color-map'\n\nexport const rainbow: ColorMap = [\n { index: 0, rgb: [150, 0, 90] },\n { index: 0.125, rgb: [0, 0, 200] },\n { index: 0.25, rgb: [0, 25, 255] },\n { index: 0.375, rgb: [0, 152, 255] },\n { index: 0.5, rgb: [44, 255, 150] },\n { index: 0.625, rgb: [151, 255, 0] },\n { index: 0.75, rgb: [255, 234, 0] },\n { index: 0.875, rgb: [255, 111, 0] },\n { index: 1, rgb: [255, 0, 0] }\n]\n","import { createColorsFromMap, RGB, RGBA, rgbHex } from 'color-map'\nimport { createTimestampFormatter, LogEntry } from 'standard-log'\nimport { required } from 'unpartial'\nimport type { CssFormatterOptions } from '../types.js'\nimport { rainbow } from './colors.js'\n\nexport function createCssFormatter(options?: CssFormatterOptions) {\n const { maxColor, timestamp, style } = required({\n maxColor: 20,\n timestamp: 'none',\n style: 'padding: 2px; margin: 2px; line-height: 1.8em;'\n }, options)\n const loggerMap: Record<string, RGB> = Object.create(null)\n const colorMap: RGBA[] = createColorsFromMap(rainbow, maxColor)\n let count = 0\n\n const timestampFormatter = createTimestampFormatter(timestamp)\n\n return function cssFormatter(entry: LogEntry) {\n let idStr = `%c ${entry.id} `\n let args: any[]\n if (firstArgIsColorTemplate(entry.args)) {\n idStr += entry.args[0]\n args = [...entry.args.slice(1)]\n }\n else {\n args = [...entry.args]\n }\n const rgb = getRgb(entry.id)\n const background = rgbHex(rgb)\n const border = rgbHex(rgb.map(x => Math.max(0, x - 32)) as RGB)\n const color = getForegroundColor(rgb)\n const result = [\n idStr,\n `${style}background: ${background};border: 1px solid ${border};color: ${color};`,\n ...args\n ]\n const t = timestampFormatter(entry.timestamp)\n if (t !== undefined) result.push(t)\n return result\n }\n\n function firstArgIsColorTemplate(args: any[]) {\n return typeof args[0] === 'string' && args[0].indexOf('%c') !== -1\n }\n\n function getRgb(id: string) {\n return loggerMap[id] = loggerMap[id] || colorMap[count++ & maxColor]\n }\n}\n\nconst gammaMap = {\n rc: 0.2126,\n gc: 0.7152,\n bc: 0.0722,\n lowc: 1 / 12.92\n}\n\nfunction getForegroundColor(background: RGB) {\n // Setting the contrasting color as default\n let color = getComplementary(background)\n const bgLuminance = getRelativeLuminance(background)\n const fgLuminance = (color === '#ffffff') ?\n getRelativeLuminance([255, 255, 255]) :\n getRelativeLuminance([0, 0, 0])\n const relativeL = bgLuminance > fgLuminance ? (bgLuminance + 0.05) / (fgLuminance + 0.05) : (fgLuminance + 0.05) / (bgLuminance + 0.05)\n\n // Can set the contrast ratio based on text size later.\n if (relativeL < 4.5) {\n const avgLuminance = background[0] * gammaMap['rc'] + background[1] * gammaMap['gc'] + background[2] * gammaMap['bc']\n\n // If the relative contrast is lower than standard, we switch color to black/white\n color = (avgLuminance < 220) ? '#ffffff' : '#000000'\n }\n return color\n}\n\nfunction getRelativeLuminance(rgb: RGB) {\n // https://www.w3.org/TR/WCAG/#relativeluminancedef\n const rsrgb = rgb[0] / 255\n const gsrgb = rgb[1] / 255\n const bsrgb = rgb[2] / 255\n\n const r = rsrgb <= 0.03928 ? rsrgb * gammaMap['lowc'] : Math.pow((rsrgb + 0.055) / 1.055, 2.4)\n const g = gsrgb <= 0.03928 ? gsrgb * gammaMap['lowc'] : Math.pow((gsrgb + 0.055) / 1.055, 2.4)\n const b = bsrgb <= 0.03928 ? bsrgb * gammaMap['lowc'] : Math.pow((bsrgb + 0.055) / 1.055, 2.4)\n\n return r * gammaMap['rc'] + g * gammaMap['gc'] + b * gammaMap['bc']\n}\n\nfunction getComplementary(rgb: RGB) {\n const r = 255 - rgb[0]\n const g = 255 - rgb[1]\n const b = 255 - rgb[2]\n return rgbHex([r, g, b])\n}\n","import { createColors } from './createColors.js';\n/**\n * Create colors with specified color map.\n */\nexport function createColorsFromMap(colormap, shades, alpha) {\n if (shades < colormap.length) {\n throw new Error(`Requires at least ${colormap.length} shades.`);\n }\n const result = [];\n const steps = [];\n for (let i = 0; i < colormap.length; i++) {\n steps.push(Math.round(colormap[i].index * shades));\n }\n for (let i = 0; i < colormap.length - 1; i++) {\n const n = steps[i + 1] - steps[i];\n const from = colormap[i].rgb;\n const to = colormap[i + 1].rgb;\n result.push(...createColors(from, to, n, alpha));\n }\n return result;\n}\n//# sourceMappingURL=createColorsFromMap.js.map","import { consoleFormatter, createConsoleLogReporter } from 'standard-log'\nimport { unpartial } from 'unpartial'\nimport { createCssFormatter } from './css/index.js'\nimport type { ColorLogReporterOptions } from './types.js'\n\nexport function createColorLogReporter(options?: ColorLogReporterOptions) {\n return createConsoleLogReporter(unpartial({\n formatter: supportCSSColorInConsole() ? createCssFormatter(options?.cssFormatterOptions) : consoleFormatter\n }, options))\n}\n\n// istanbul ignore next\nfunction supportCSSColorInConsole() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n // @ts-ignore\n if (window?.process?.type === 'renderer' || window?.process?.__nwjs) {\n return true\n }\n\n // Internet Explorer and Edge do not support colors.\n if (navigator?.userAgent?.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false\n }\n\n // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n // @ts-ignore\n return (document?.documentElement?.style?.WebkitAppearance) ||\n // Is firebug? http://stackoverflow.com/a/398120/376773\n // @ts-ignore\n (window?.console?.firebug || (window?.console?.exception && window?.console?.table)) ||\n // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator?.userAgent?.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // Double check webkit in userAgent just in case we are in a worker\n (navigator?.userAgent?.toLowerCase().match(/applewebkit\\/(\\d+)/))\n}\n"],"names":["colorSupport","matches","exec","navigator","userAgent","Number","parseInt","groups","chromeVersion","getChromeVersion","level","hasBasic","has256","has16m","module","exports","stdout","stderr","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","ColorLevels","StandardLog","ANSI_BLACK","ANSI_RED","ANSI_GREEN","ANSI_YELLOW","ANSI_BLUE","ANSI_MAGENTA","ANSI_CYAN","ANSI_WHITE","ANSI_BRIGHT","ANSI_UNDERSCORE","ANSI_FOREGROUND","ANSI_BACKGROUND","wrapAnsi","text","codes","join","createAnsiFormatter","options","timestamp","timestampFormatter","createTimestampFormatter","entry","consoleMethod","toConsoleMethod","id","method","colorLevels","DISABLED","colorLevel","BASIC","basicIDFormatter","ANSI","ansiIDFormatter","TRUE","truecolorIDFormatter","toIDFormatter","formatID","args","push","textCodes","map","x","formatArgs","ansiColorMap","ansiColors","list","counter","length","getAnsiColor","create","trimNilProps","keys","reduce","p","k","notNil","createColors","from","to","shades","alpha","start","diff","inc","Math","max","rgba","i","color","round","rgbHex","rgb","hex","d2h","s","toString","rainbow","index","createCssFormatter","maxColor","style","reducer","e","entries","source3","filter","loggerMap","colorMap","colormap","Error","result","steps","createColorsFromMap","count","idStr","indexOf","firstArgIsColorTemplate","slice","background","border","getComplementary","bgLuminance","getRelativeLuminance","fgLuminance","gammaMap","getForegroundColor","t","rsrgb","gsrgb","bsrgb","pow","g","b","createColorLogReporter","createConsoleLogReporter","s1","formatter","window","process","type","__nwjs","toLowerCase","match","document","documentElement","WebkitAppearance","console","firebug","exception","table","RegExp","$1","cssFormatterOptions","consoleFormatter","s3"],"sourceRoot":""}
1
+ {"version":3,"file":"standard-log-color.nodenext.js","mappings":"oEAaA,MAAMA,EAVN,WACC,MAAMC,EAAU,6CAA6CC,KAAKC,UAAUC,WAE5E,GAAKH,EAIL,OAAOI,OAAOC,SAASL,EAAQM,OAAOC,cAAe,GACtD,CAEqBC,IAAsB,IAAK,CAC/CC,MAAO,EACPC,UAAU,EACVC,QAAQ,EACRC,QAAQ,GAGTC,EAAOC,QAAU,CAChBC,OAAQhB,EACRiB,OAAQjB,E,GCrBLkB,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaN,QAGrB,IAAID,EAASI,EAAyBE,GAAY,CAGjDL,QAAS,CAAC,GAOX,OAHAQ,EAAoBH,GAAUN,EAAQA,EAAOC,QAASI,GAG/CL,EAAOC,OACf,CCrBAI,EAAoBK,EAAI,SAASV,GAChC,IAAIW,EAASX,GAAUA,EAAOY,WAC7B,WAAa,OAAOZ,EAAgB,OAAG,EACvC,WAAa,OAAOA,CAAQ,EAE7B,OADAK,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CACR,ECNAN,EAAoBQ,EAAI,SAASZ,EAASc,GACzC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEhB,EAASe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jCPlG,ENiCeqH,GACXjD,OAAO9B,GACPH,QAAO,CAACC,EAAGqB,KAAM,IAAMrB,KAAMH,EAAawB,MAAO,CAAC,IM/B3D,I,oBNyB0ByC,EAAQmB,CM5BlC,C","sources":["webpack://StandardLogColor/../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js","webpack://StandardLogColor/webpack/bootstrap","webpack://StandardLogColor/webpack/runtime/compat get default export","webpack://StandardLogColor/webpack/runtime/define property getters","webpack://StandardLogColor/webpack/runtime/hasOwnProperty shorthand","webpack://StandardLogColor/webpack/runtime/make namespace object","webpack://StandardLogColor/external var \"StandardLog\"","webpack://StandardLogColor/./ts/supportColor.ts","webpack://StandardLogColor/./ts/ansi/constants.ts","webpack://StandardLogColor/./ts/ansi/wrapAnsi.ts","webpack://StandardLogColor/./ts/ansi/ansiFormatter.ts","webpack://StandardLogColor/../../node_modules/.pnpm/unpartial@1.0.4/node_modules/unpartial/esm/index.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/esm/createColors.js","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/esm/rgbHex.js","webpack://StandardLogColor/./ts/css/colors.ts","webpack://StandardLogColor/./ts/css/cssFormatter.ts","webpack://StandardLogColor/../../node_modules/.pnpm/color-map@2.0.6/node_modules/color-map/esm/createColorsFromMap.js","webpack://StandardLogColor/./ts/createColorLogReporter.browser.ts"],"sourcesContent":["/* eslint-env browser */\n'use strict';\n\nfunction getChromeVersion() {\n\tconst matches = /(Chrome|Chromium)\\/(?<chromeVersion>\\d+)\\./.exec(navigator.userAgent);\n\n\tif (!matches) {\n\t\treturn;\n\t}\n\n\treturn Number.parseInt(matches.groups.chromeVersion, 10);\n}\n\nconst colorSupport = getChromeVersion() >= 69 ? {\n\tlevel: 1,\n\thasBasic: true,\n\thas256: false,\n\thas16m: false\n} : false;\n\nmodule.exports = {\n\tstdout: colorSupport,\n\tstderr: colorSupport\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var __WEBPACK_NAMESPACE_OBJECT__ = StandardLog;","import sc from 'supports-color'\n\n/**\n * Color level.\n * This is the same definition as the `ColorSupportLevel` in `supports-color`.\n * Using the same definition for simplicity\n * @see https://github.com/chalk/supports-color/blob/main/index.d.ts#L19\n */\n export enum ColorLevels {\n DISABLED = 0,\n /**\n * Basic 16 colors (4-bits)\n */\n BASIC = 1,\n /**\n * ANSI 256 colors (8-bits)\n */\n ANSI = 2,\n /**\n * Truecolor 16 million colors (24-bits)\n */\n TRUE = 3\n}\n\nexport namespace supportColor {\n export type Result = { stdout: ColorLevels, stderr: ColorLevels }\n}\n\nlet value: supportColor.Result\n\n/**\n * Detects if the platform supports color.\n * For browser, the value can only be:\n * - `{ stdout: 0, stderr: 0 }`, or\n * - `{ stdout: 3, stderr: 3 }`.\n * So you only need to check one case.\n * The result value is made the same so that it can be used in all platforms.\n */\nexport function supportColor(): supportColor.Result {\n // istanbul ignore next\n return value = value || {\n stderr: sc.stderr ? sc.stderr.level : ColorLevels.DISABLED,\n stdout: sc.stdout ? sc.stdout.level : ColorLevels.DISABLED\n }\n}\n","export type AnsiColor = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7\nexport const ANSI_BLACK = 0\nexport const ANSI_RED = 1\nexport const ANSI_GREEN = 2\nexport const ANSI_YELLOW = 3\nexport const ANSI_BLUE = 4\nexport const ANSI_MAGENTA = 5\nexport const ANSI_CYAN = 6\nexport const ANSI_WHITE = 7\n\nexport type AnsiStyle = 1 | 4\nexport const ANSI_BRIGHT = 1\nexport const ANSI_UNDERSCORE = 4\n\nexport const ANSI_FOREGROUND = 30\nexport const ANSI_BACKGROUND = 40\n","export function wrapAnsi(text: string, codes: number[]) {\n return `\\u001B[${codes.join(';')}m${text}\\u001B[0m`\n}\n","import { createTimestampFormatter, LogEntry, TimestampFormat, toConsoleMethod } from 'standard-log'\nimport { ColorLevels, supportColor } from '../supportColor.js'\nimport { ANSI_BACKGROUND, ANSI_BLACK, ANSI_BLUE, ANSI_BRIGHT, ANSI_CYAN, ANSI_FOREGROUND, ANSI_GREEN, ANSI_MAGENTA, ANSI_RED, ANSI_UNDERSCORE, ANSI_WHITE, ANSI_YELLOW } from './constants.js'\nimport { wrapAnsi } from './wrapAnsi.js'\n\nexport type AnsiFormatterOptions = {\n timestamp: TimestampFormat\n}\n\nexport function createAnsiFormatter(options: AnsiFormatterOptions = { timestamp: 'none' }) {\n const timestampFormatter = createTimestampFormatter(options.timestamp)\n\n return function ansiFormatter(entry: LogEntry) {\n const consoleMethod = toConsoleMethod(entry.level)\n const id = formatID(consoleMethod, entry.id)\n const args = formatArgs(timestampFormatter, consoleMethod, entry)\n return [id, ...args]\n }\n}\n\nfunction formatArgs(timestampFormatter: (timestamp: Date) => string | undefined, method: 'error' | 'warn' | 'info' | 'debug', entry: Pick<LogEntry, 'args' | 'timestamp'>) {\n const args = [...entry.args]\n const timestamp = timestampFormatter(entry.timestamp)\n if (timestamp !== undefined) args.push(timestamp)\n const textCodes = method === 'error' ? [ANSI_RED + ANSI_FOREGROUND] :\n method === 'warn' ? [ANSI_YELLOW + ANSI_FOREGROUND] : undefined\n\n return textCodes ? args.map(x => wrapAnsi(x, textCodes)) : args\n}\n\nfunction formatID(method: 'error' | 'warn' | 'info' | 'debug', id: string) {\n const colorLevels = supportColor()\n const colorLevel = method === 'error' ? colorLevels.stderr : colorLevels.stdout\n return toIDFormatter(colorLevel)(id)\n}\n\nfunction toIDFormatter(colorLevel: ColorLevels) {\n // istanbul ignore next\n switch (colorLevel) {\n case ColorLevels.DISABLED: return (id: string) => id\n case ColorLevels.BASIC: return basicIDFormatter\n case ColorLevels.ANSI: return ansiIDFormatter\n case ColorLevels.TRUE: return truecolorIDFormatter\n }\n}\n\nfunction basicIDFormatter(id: string) {\n const codes = getAnsiColor(id)\n return wrapAnsi(` ${id} `, codes)\n}\n\nconst ansiColors: {\n counter: number,\n list: Array<number[]>\n} = {\n counter: 0, list: [\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_BRIGHT],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_RED + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_GREEN + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLUE + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_MAGENTA + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_BLACK + ANSI_FOREGROUND, ANSI_CYAN + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n [ANSI_WHITE + ANSI_FOREGROUND, ANSI_BLACK + ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_UNDERSCORE],\n ]\n}\nconst ansiColorMap: Record<string, number[]> = Object.create(null)\n\nfunction getAnsiColor(id: string) {\n return ansiColorMap[id] = ansiColorMap[id] || ansiColors.list[ansiColors.counter++ % ansiColors.list.length]\n}\n\n// istanbul ignore next\nfunction ansiIDFormatter(id: string) {\n return basicIDFormatter(id)\n}\n\n// istanbul ignore next\nfunction truecolorIDFormatter(id: string) {\n return basicIDFormatter(id)\n}\n","export function required(source1, source2, source3) {\n return merge([source1, source2, source3], (p, e) => {\n return { ...p, ...e };\n });\n}\nexport function requiredDeep(source1, source2, source3) {\n return merge([source1, source2, source3], (p, e) => deepmerge(p, e));\n}\nfunction merge(entries, reducer) {\n if (entries[0] === undefined || entries[0] === null)\n return entries[0];\n return entries.filter(x => !!x).reduce(reducer, {});\n}\nfunction deepmerge(source1, source2) {\n if (typeof source1 !== 'object' || source1 === null)\n return source2 !== undefined ? source2 : source1;\n if (Array.isArray(source1)) {\n if (Array.isArray(source2))\n return source2;\n if (source2 === undefined)\n return [...source1];\n return [...source1, source2];\n }\n return getAllKeys(source1).concat(getAllKeys(source2)).reduce((p, k) => {\n // @ts-ignore\n p[k] = deepmerge(source1[k], source2 && source2[k]);\n return p;\n }, {});\n}\nfunction getAllKeys(subject, internal = false) {\n if (typeof subject !== 'object')\n return [];\n const propertyNames = Object.getOwnPropertyNames(subject);\n const keys = internal ? propertyNames.filter(n => n !== 'constructor') : propertyNames;\n const proto = Object.getPrototypeOf(subject);\n return proto !== Object.prototype ? keys.concat(getAllKeys(proto, true)) : keys;\n}\nexport function unpartial(s1, s2, s3) {\n // defensive check for JS\n if (s1 === undefined || s1 === null)\n return s1;\n return [s1, s2, s3]\n .filter(notNil)\n .reduce((p, s) => ({ ...p, ...trimNilProps(s) }), {});\n}\nfunction trimNilProps(value) {\n return Object.keys(value).reduce((p, k) => {\n if (notNil(value[k]))\n p[k] = value[k];\n return p;\n }, {});\n}\nfunction notNil(value) {\n return value !== null && value !== undefined;\n}\nexport function unpartialRecursively(arg1, arg2, arg3) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return requiredDeep(arg1, arg2, arg3);\n}\n//# sourceMappingURL=index.js.map","export function createColors(from, to, shades, alpha = [\n from.length === 4 ? from[3] : to.length === 4 ? to[3] : 1,\n to.length === 4 ? to[3] : from.length === 4 ? from[3] : 1\n]) {\n const start = [...from];\n const diff = [\n to[0] - from[0],\n to[1] - from[1],\n to[2] - from[2],\n alpha[1] - alpha[0]\n ];\n if (start.length === 3)\n start.push(alpha[0]);\n const inc = 1 / Math.max(shades - 1, 1);\n const rgba = [];\n for (let i = 0; i < shades; i++) {\n const color = [\n Math.round(start[0] + i * diff[0] * inc),\n Math.round(start[1] + i * diff[1] * inc),\n Math.round(start[2] + i * diff[2] * inc),\n start[3] + i * diff[3] * inc\n ];\n rgba.push(color);\n }\n return rgba;\n}\n//# sourceMappingURL=createColors.js.map","/**\n * Convert `RGB` to `#rgb`\n * JavaScript note: no check for array length, use it properly.\n */\nexport function rgbHex(rgb) {\n let hex = '#';\n for (let i = 0; i < 3; i++) {\n hex += d2h(rgb[i]);\n }\n return hex;\n}\nfunction d2h(d) {\n const s = (+d).toString(16);\n return s.length < 2 ? '0' + s : s;\n}\n//# sourceMappingURL=rgbHex.js.map","import { ColorMap } from 'color-map'\n\nexport const rainbow: ColorMap = [\n { index: 0, rgb: [150, 0, 90] },\n { index: 0.125, rgb: [0, 0, 200] },\n { index: 0.25, rgb: [0, 25, 255] },\n { index: 0.375, rgb: [0, 152, 255] },\n { index: 0.5, rgb: [44, 255, 150] },\n { index: 0.625, rgb: [151, 255, 0] },\n { index: 0.75, rgb: [255, 234, 0] },\n { index: 0.875, rgb: [255, 111, 0] },\n { index: 1, rgb: [255, 0, 0] }\n]\n","import { createColorsFromMap, RGB, RGBA, rgbHex } from 'color-map'\nimport { createTimestampFormatter, LogEntry } from 'standard-log'\nimport { required } from 'unpartial'\nimport type { CssFormatterOptions } from '../types.js'\nimport { rainbow } from './colors.js'\n\nexport function createCssFormatter(options?: CssFormatterOptions) {\n const { maxColor, timestamp, style } = required({\n maxColor: 20,\n timestamp: 'none',\n style: 'padding: 2px; line-height: 1rem;'\n }, options)\n const loggerMap: Record<string, RGB> = Object.create(null)\n const colorMap: RGBA[] = createColorsFromMap(rainbow, maxColor)\n let count = 0\n\n const timestampFormatter = createTimestampFormatter(timestamp)\n\n return function cssFormatter(entry: LogEntry) {\n let idStr = `%c ${entry.id} `\n let args: any[]\n if (firstArgIsColorTemplate(entry.args)) {\n idStr += entry.args[0]\n args = [...entry.args.slice(1)]\n }\n else {\n args = [...entry.args]\n }\n const rgb = getRgb(entry.id)\n const background = rgbHex(rgb)\n const border = rgbHex(rgb.map(x => Math.max(0, x - 32)) as RGB)\n const color = getForegroundColor(rgb)\n const result = [\n idStr,\n `${style}background: ${background};border: 1px solid ${border};color: ${color};`,\n ...args\n ]\n const t = timestampFormatter(entry.timestamp)\n if (t !== undefined) result.push(t)\n return result\n }\n\n function firstArgIsColorTemplate(args: any[]) {\n return typeof args[0] === 'string' && args[0].indexOf('%c') !== -1\n }\n\n function getRgb(id: string) {\n return loggerMap[id] = loggerMap[id] || colorMap[count++ & maxColor]\n }\n}\n\nconst gammaMap = {\n rc: 0.2126,\n gc: 0.7152,\n bc: 0.0722,\n lowc: 1 / 12.92\n}\n\nfunction getForegroundColor(background: RGB) {\n // Setting the contrasting color as default\n let color = getComplementary(background)\n const bgLuminance = getRelativeLuminance(background)\n const fgLuminance = (color === '#ffffff') ?\n getRelativeLuminance([255, 255, 255]) :\n getRelativeLuminance([0, 0, 0])\n const relativeL = bgLuminance > fgLuminance ? (bgLuminance + 0.05) / (fgLuminance + 0.05) : (fgLuminance + 0.05) / (bgLuminance + 0.05)\n\n // Can set the contrast ratio based on text size later.\n if (relativeL < 4.5) {\n const avgLuminance = background[0] * gammaMap['rc'] + background[1] * gammaMap['gc'] + background[2] * gammaMap['bc']\n\n // If the relative contrast is lower than standard, we switch color to black/white\n color = (avgLuminance < 220) ? '#ffffff' : '#000000'\n }\n return color\n}\n\nfunction getRelativeLuminance(rgb: RGB) {\n // https://www.w3.org/TR/WCAG/#relativeluminancedef\n const rsrgb = rgb[0] / 255\n const gsrgb = rgb[1] / 255\n const bsrgb = rgb[2] / 255\n\n const r = rsrgb <= 0.03928 ? rsrgb * gammaMap['lowc'] : Math.pow((rsrgb + 0.055) / 1.055, 2.4)\n const g = gsrgb <= 0.03928 ? gsrgb * gammaMap['lowc'] : Math.pow((gsrgb + 0.055) / 1.055, 2.4)\n const b = bsrgb <= 0.03928 ? bsrgb * gammaMap['lowc'] : Math.pow((bsrgb + 0.055) / 1.055, 2.4)\n\n return r * gammaMap['rc'] + g * gammaMap['gc'] + b * gammaMap['bc']\n}\n\nfunction getComplementary(rgb: RGB) {\n const r = 255 - rgb[0]\n const g = 255 - rgb[1]\n const b = 255 - rgb[2]\n return rgbHex([r, g, b])\n}\n","import { createColors } from './createColors.js';\n/**\n * Create colors with specified color map.\n */\nexport function createColorsFromMap(colormap, shades, alpha) {\n if (shades < colormap.length) {\n throw new Error(`Requires at least ${colormap.length} shades.`);\n }\n const result = [];\n const steps = [];\n for (let i = 0; i < colormap.length; i++) {\n steps.push(Math.round(colormap[i].index * shades));\n }\n for (let i = 0; i < colormap.length - 1; i++) {\n const n = steps[i + 1] - steps[i];\n const from = colormap[i].rgb;\n const to = colormap[i + 1].rgb;\n result.push(...createColors(from, to, n, alpha));\n }\n return result;\n}\n//# sourceMappingURL=createColorsFromMap.js.map","import { consoleFormatter, createConsoleLogReporter } from 'standard-log'\nimport { unpartial } from 'unpartial'\nimport { createCssFormatter } from './css/index.js'\nimport type { ColorLogReporterOptions } from './types.js'\n\nexport function createColorLogReporter(options?: ColorLogReporterOptions) {\n return createConsoleLogReporter(unpartial({\n formatter: supportCSSColorInConsole() ? createCssFormatter(options?.cssFormatterOptions) : consoleFormatter\n }, options))\n}\n\n// istanbul ignore next\nfunction supportCSSColorInConsole() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n // @ts-ignore\n if (window?.process?.type === 'renderer' || window?.process?.__nwjs) {\n return true\n }\n\n // Internet Explorer and Edge do not support colors.\n if (navigator?.userAgent?.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false\n }\n\n // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n // @ts-ignore\n return (document?.documentElement?.style?.WebkitAppearance) ||\n // Is firebug? http://stackoverflow.com/a/398120/376773\n // @ts-ignore\n (window?.console?.firebug || (window?.console?.exception && window?.console?.table)) ||\n // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator?.userAgent?.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // Double check webkit in userAgent just in case we are in a worker\n (navigator?.userAgent?.toLowerCase().match(/applewebkit\\/(\\d+)/))\n}\n"],"names":["colorSupport","matches","exec","navigator","userAgent","Number","parseInt","groups","chromeVersion","getChromeVersion","level","hasBasic","has256","has16m","module","exports","stdout","stderr","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","ColorLevels","StandardLog","ANSI_BLACK","ANSI_RED","ANSI_GREEN","ANSI_YELLOW","ANSI_BLUE","ANSI_MAGENTA","ANSI_CYAN","ANSI_WHITE","ANSI_BRIGHT","ANSI_UNDERSCORE","ANSI_FOREGROUND","ANSI_BACKGROUND","wrapAnsi","text","codes","join","createAnsiFormatter","options","timestamp","timestampFormatter","createTimestampFormatter","entry","consoleMethod","toConsoleMethod","id","method","colorLevels","DISABLED","colorLevel","BASIC","basicIDFormatter","ANSI","ansiIDFormatter","TRUE","truecolorIDFormatter","toIDFormatter","formatID","args","push","textCodes","map","x","formatArgs","ansiColorMap","ansiColors","list","counter","length","getAnsiColor","create","trimNilProps","keys","reduce","p","k","notNil","createColors","from","to","shades","alpha","start","diff","inc","Math","max","rgba","i","color","round","rgbHex","rgb","hex","d2h","s","toString","rainbow","index","createCssFormatter","maxColor","style","reducer","e","entries","source3","filter","loggerMap","colorMap","colormap","Error","result","steps","createColorsFromMap","count","idStr","indexOf","firstArgIsColorTemplate","slice","background","border","getComplementary","bgLuminance","getRelativeLuminance","fgLuminance","gammaMap","getForegroundColor","t","rsrgb","gsrgb","bsrgb","pow","g","b","createColorLogReporter","createConsoleLogReporter","s1","formatter","window","process","type","__nwjs","toLowerCase","match","document","documentElement","WebkitAppearance","console","firebug","exception","table","RegExp","$1","cssFormatterOptions","consoleFormatter","s3"],"sourceRoot":""}
@@ -6,7 +6,7 @@ export function createCssFormatter(options) {
6
6
  const { maxColor, timestamp, style } = required({
7
7
  maxColor: 20,
8
8
  timestamp: 'none',
9
- style: 'padding: 2px; margin: 2px; line-height: 1.8em;'
9
+ style: 'padding: 2px; line-height: 1rem;'
10
10
  }, options);
11
11
  const loggerMap = Object.create(null);
12
12
  const colorMap = createColorsFromMap(rainbow, maxColor);
@@ -1 +1 @@
1
- {"version":3,"file":"cssFormatter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,GAAG,KAAK,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAA;IAC9F,MAAM,CAAC,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAA;IAC9F,MAAM,CAAC,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAA;IAE9F,OAAO,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;AACrE,CAAC;AAED,SAAS,gBAAgB,CAAC,GAAQ;IAChC,MAAM,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAA;IACtB,MAAM,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAA;IACtB,MAAM,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAA;IACtB,OAAO,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAC1B,CAAC","sourcesContent":["import { createColorsFromMap, RGB, RGBA, rgbHex } from 'color-map'\nimport { createTimestampFormatter, LogEntry } from 'standard-log'\nimport { required } from 'unpartial'\nimport type { CssFormatterOptions } from '../types.js'\nimport { rainbow } from './colors.js'\n\nexport function createCssFormatter(options?: CssFormatterOptions) {\n const { maxColor, timestamp, style } = required({\n maxColor: 20,\n timestamp: 'none',\n style: 'padding: 2px; margin: 2px; line-height: 1.8em;'\n }, options)\n const loggerMap: Record<string, RGB> = Object.create(null)\n const colorMap: RGBA[] = createColorsFromMap(rainbow, maxColor)\n let count = 0\n\n const timestampFormatter = createTimestampFormatter(timestamp)\n\n return function cssFormatter(entry: LogEntry) {\n let idStr = `%c ${entry.id} `\n let args: any[]\n if (firstArgIsColorTemplate(entry.args)) {\n idStr += entry.args[0]\n args = [...entry.args.slice(1)]\n }\n else {\n args = [...entry.args]\n }\n const rgb = getRgb(entry.id)\n const background = rgbHex(rgb)\n const border = rgbHex(rgb.map(x => Math.max(0, x - 32)) as RGB)\n const color = getForegroundColor(rgb)\n const result = [\n idStr,\n `${style}background: ${background};border: 1px solid ${border};color: ${color};`,\n ...args\n ]\n const t = timestampFormatter(entry.timestamp)\n if (t !== undefined) result.push(t)\n return result\n }\n\n function firstArgIsColorTemplate(args: any[]) {\n return typeof args[0] === 'string' && args[0].indexOf('%c') !== -1\n }\n\n function getRgb(id: string) {\n return loggerMap[id] = loggerMap[id] || colorMap[count++ & maxColor]\n }\n}\n\nconst gammaMap = {\n rc: 0.2126,\n gc: 0.7152,\n bc: 0.0722,\n lowc: 1 / 12.92\n}\n\nfunction getForegroundColor(background: RGB) {\n // Setting the contrasting color as default\n let color = getComplementary(background)\n const bgLuminance = getRelativeLuminance(background)\n const fgLuminance = (color === '#ffffff') ?\n getRelativeLuminance([255, 255, 255]) :\n getRelativeLuminance([0, 0, 0])\n const relativeL = bgLuminance > fgLuminance ? (bgLuminance + 0.05) / (fgLuminance + 0.05) : (fgLuminance + 0.05) / (bgLuminance + 0.05)\n\n // Can set the contrast ratio based on text size later.\n if (relativeL < 4.5) {\n const avgLuminance = background[0] * gammaMap['rc'] + background[1] * gammaMap['gc'] + background[2] * gammaMap['bc']\n\n // If the relative contrast is lower than standard, we switch color to black/white\n color = (avgLuminance < 220) ? '#ffffff' : '#000000'\n }\n return color\n}\n\nfunction getRelativeLuminance(rgb: RGB) {\n // https://www.w3.org/TR/WCAG/#relativeluminancedef\n const rsrgb = rgb[0] / 255\n const gsrgb = rgb[1] / 255\n const bsrgb = rgb[2] / 255\n\n const r = rsrgb <= 0.03928 ? rsrgb * gammaMap['lowc'] : Math.pow((rsrgb + 0.055) / 1.055, 2.4)\n const g = gsrgb <= 0.03928 ? gsrgb * gammaMap['lowc'] : Math.pow((gsrgb + 0.055) / 1.055, 2.4)\n const b = bsrgb <= 0.03928 ? bsrgb * gammaMap['lowc'] : Math.pow((bsrgb + 0.055) / 1.055, 2.4)\n\n return r * gammaMap['rc'] + g * gammaMap['gc'] + b * gammaMap['bc']\n}\n\nfunction getComplementary(rgb: RGB) {\n const r = 255 - rgb[0]\n const g = 255 - rgb[1]\n const b = 255 - rgb[2]\n return rgbHex([r, g, b])\n}\n"]}
1
+ {"version":3,"file":"cssFormatter.js","sourceRoot":"","sources":["../../ts/css/cssFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAa,MAAM,EAAE,MAAM,WAAW,CAAA;AAClE,OAAO,EAAE,wBAAwB,EAAY,MAAM,cAAc,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,MAAM,UAAU,kBAAkB,CAAC,OAA6B;IAC9D,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC;QAC9C,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,MAAM;QACjB,KAAK,EAAE,kCAAkC;KAC1C,EAAE,OAAO,CAAC,CAAA;IACX,MAAM,SAAS,GAAwB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC1D,MAAM,QAAQ,GAAW,mBAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IAC/D,IAAI,KAAK,GAAG,CAAC,CAAA;IAEb,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,SAAS,CAAC,CAAA;IAE9D,OAAO,SAAS,YAAY,CAAC,KAAe;QAC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,CAAC,CAAC,CAAC,CAAA;IACtB,MAAM,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAA;IACtB,OAAO,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAC1B,CAAC","sourcesContent":["import { createColorsFromMap, RGB, RGBA, rgbHex } from 'color-map'\nimport { createTimestampFormatter, LogEntry } from 'standard-log'\nimport { required } from 'unpartial'\nimport type { CssFormatterOptions } from '../types.js'\nimport { rainbow } from './colors.js'\n\nexport function createCssFormatter(options?: CssFormatterOptions) {\n const { maxColor, timestamp, style } = required({\n maxColor: 20,\n timestamp: 'none',\n style: 'padding: 2px; line-height: 1rem;'\n }, options)\n const loggerMap: Record<string, RGB> = Object.create(null)\n const colorMap: RGBA[] = createColorsFromMap(rainbow, maxColor)\n let count = 0\n\n const timestampFormatter = createTimestampFormatter(timestamp)\n\n return function cssFormatter(entry: LogEntry) {\n let idStr = `%c ${entry.id} `\n let args: any[]\n if (firstArgIsColorTemplate(entry.args)) {\n idStr += entry.args[0]\n args = [...entry.args.slice(1)]\n }\n else {\n args = [...entry.args]\n }\n const rgb = getRgb(entry.id)\n const background = rgbHex(rgb)\n const border = rgbHex(rgb.map(x => Math.max(0, x - 32)) as RGB)\n const color = getForegroundColor(rgb)\n const result = [\n idStr,\n `${style}background: ${background};border: 1px solid ${border};color: ${color};`,\n ...args\n ]\n const t = timestampFormatter(entry.timestamp)\n if (t !== undefined) result.push(t)\n return result\n }\n\n function firstArgIsColorTemplate(args: any[]) {\n return typeof args[0] === 'string' && args[0].indexOf('%c') !== -1\n }\n\n function getRgb(id: string) {\n return loggerMap[id] = loggerMap[id] || colorMap[count++ & maxColor]\n }\n}\n\nconst gammaMap = {\n rc: 0.2126,\n gc: 0.7152,\n bc: 0.0722,\n lowc: 1 / 12.92\n}\n\nfunction getForegroundColor(background: RGB) {\n // Setting the contrasting color as default\n let color = getComplementary(background)\n const bgLuminance = getRelativeLuminance(background)\n const fgLuminance = (color === '#ffffff') ?\n getRelativeLuminance([255, 255, 255]) :\n getRelativeLuminance([0, 0, 0])\n const relativeL = bgLuminance > fgLuminance ? (bgLuminance + 0.05) / (fgLuminance + 0.05) : (fgLuminance + 0.05) / (bgLuminance + 0.05)\n\n // Can set the contrast ratio based on text size later.\n if (relativeL < 4.5) {\n const avgLuminance = background[0] * gammaMap['rc'] + background[1] * gammaMap['gc'] + background[2] * gammaMap['bc']\n\n // If the relative contrast is lower than standard, we switch color to black/white\n color = (avgLuminance < 220) ? '#ffffff' : '#000000'\n }\n return color\n}\n\nfunction getRelativeLuminance(rgb: RGB) {\n // https://www.w3.org/TR/WCAG/#relativeluminancedef\n const rsrgb = rgb[0] / 255\n const gsrgb = rgb[1] / 255\n const bsrgb = rgb[2] / 255\n\n const r = rsrgb <= 0.03928 ? rsrgb * gammaMap['lowc'] : Math.pow((rsrgb + 0.055) / 1.055, 2.4)\n const g = gsrgb <= 0.03928 ? gsrgb * gammaMap['lowc'] : Math.pow((gsrgb + 0.055) / 1.055, 2.4)\n const b = bsrgb <= 0.03928 ? bsrgb * gammaMap['lowc'] : Math.pow((bsrgb + 0.055) / 1.055, 2.4)\n\n return r * gammaMap['rc'] + g * gammaMap['gc'] + b * gammaMap['bc']\n}\n\nfunction getComplementary(rgb: RGB) {\n const r = 255 - rgb[0]\n const g = 255 - rgb[1]\n const b = 255 - rgb[2]\n return rgbHex([r, g, b])\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "standard-log-color",
3
- "version": "11.4.0",
3
+ "version": "11.5.0",
4
4
  "description": "Color console reporter for `standard-log`",
5
5
  "homepage": "https://github.com/unional/standard-log/tree/main/packages/color",
6
6
  "bugs": {
@@ -76,13 +76,13 @@
76
76
  "rimraf": "^3.0.2",
77
77
  "satisfier": "^5.2.2",
78
78
  "size-limit": "^8.1.0",
79
- "standard-log": "11.4.0",
80
79
  "ts-jest": "^29.0.3",
81
80
  "ts-loader": "^9.3.0",
82
81
  "tslib": "^2.4.0",
83
82
  "typescript": "^4.8.4",
84
83
  "webpack": "^5.74.0",
85
- "webpack-cli": "^5.0.0"
84
+ "webpack-cli": "^5.0.0",
85
+ "standard-log": "11.5.0"
86
86
  },
87
87
  "peerDependencies": {
88
88
  "standard-log": ">=11.0.1"
@@ -106,7 +106,7 @@
106
106
  "build:clean": "rimraf *.tsbuildinfo",
107
107
  "build:cjs": "tsc -p ./tsconfig.cjs.json && ncp package.cjs.json cjs/package.json",
108
108
  "build:esm": "tsc -p ./tsconfig.esm.json",
109
- "build:tslib": "tsc -p ./tsconfig.tslib.json",
109
+ "build:tslib": "tsc -p ./tsconfig.tslib.json && ncp package.cjs.json tslib/package.json",
110
110
  "bundle": "run-p bundle:es5 bundle:esm bundle:nodenext",
111
111
  "bundle:es5": "webpack -c ./webpack.es5.cjs",
112
112
  "bundle:esm": "webpack -c ./webpack.esm.cjs",
@@ -8,7 +8,7 @@ export function createCssFormatter(options?: CssFormatterOptions) {
8
8
  const { maxColor, timestamp, style } = required({
9
9
  maxColor: 20,
10
10
  timestamp: 'none',
11
- style: 'padding: 2px; margin: 2px; line-height: 1.8em;'
11
+ style: 'padding: 2px; line-height: 1rem;'
12
12
  }, options)
13
13
  const loggerMap: Record<string, RGB> = Object.create(null)
14
14
  const colorMap: RGBA[] = createColorsFromMap(rainbow, maxColor)