1 |
- {"ast":null,"code":"'use strict';\n\nconst wrapAnsi16 = (fn, offset) => (...args) => {\n const code = fn(...args);\n return `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => (...args) => {\n const code = fn(...args);\n return `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => (...args) => {\n const rgb = fn(...args);\n return `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nconst ansi2ansi = n => n;\n\nconst rgb2rgb = (r, g, b) => [r, g, b];\n\nconst setLazyProperty = (object, property, get) => {\n Object.defineProperty(object, property, {\n get: () => {\n const value = get();\n Object.defineProperty(object, property, {\n value,\n enumerable: true,\n configurable: true\n });\n return value;\n },\n enumerable: true,\n configurable: true\n });\n};\n/** @type {typeof import('color-convert')} */\n\n\nlet colorConvert;\n\nconst makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {\n if (colorConvert === undefined) {\n colorConvert = require('color-convert');\n }\n\n const offset = isBackground ? 10 : 0;\n const styles = {};\n\n for (const [sourceSpace, suite] of Object.entries(colorConvert)) {\n const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;\n\n if (sourceSpace === targetSpace) {\n styles[name] = wrap(identity, offset);\n } else if (typeof suite === 'object') {\n styles[name] = wrap(suite[targetSpace], offset);\n }\n }\n\n return styles;\n};\n\nfunction assembleStyles() {\n const codes = new Map();\n const styles = {\n modifier: {\n reset: [0, 0],\n // 21 isn't widely supported and 22 does the same thing\n bold: [1, 22],\n dim: [2, 22],\n italic: [3, 23],\n underline: [4, 24],\n inverse: [7, 27],\n hidden: [8, 28],\n strikethrough: [9, 29]\n },\n color: {\n black: [30, 39],\n red: [31, 39],\n green: [32, 39],\n yellow: [33, 39],\n blue: [34, 39],\n magenta: [35, 39],\n cyan: [36, 39],\n white: [37, 39],\n // Bright color\n blackBright: [90, 39],\n redBright: [91, 39],\n greenBright: [92, 39],\n yellowBright: [93, 39],\n blueBright: [94, 39],\n magentaBright: [95, 39],\n cyanBright: [96, 39],\n whiteBright: [97, 39]\n },\n bgColor: {\n bgBlack: [40, 49],\n bgRed: [41, 49],\n bgGreen: [42, 49],\n bgYellow: [43, 49],\n bgBlue: [44, 49],\n bgMagenta: [45, 49],\n bgCyan: [46, 49],\n bgWhite: [47, 49],\n // Bright color\n bgBlackBright: [100, 49],\n bgRedBright: [101, 49],\n bgGreenBright: [102, 49],\n bgYellowBright: [103, 49],\n bgBlueBright: [104, 49],\n bgMagentaBright: [105, 49],\n bgCyanBright: [106, 49],\n bgWhiteBright: [107, 49]\n }\n }; // Alias bright black as gray (and grey)\n\n styles.color.gray = styles.color.blackBright;\n styles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n styles.color.grey = styles.color.blackBright;\n styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n for (const [groupName, group] of Object.entries(styles)) {\n for (const [styleName, style] of Object.entries(group)) {\n styles[styleName] = {\n open: `\\u001B[${style[0]}m`,\n close: `\\u001B[${style[1]}m`\n };\n group[styleName] = styles[styleName];\n codes.set(style[0], style[1]);\n }\n\n Object.defineProperty(styles, groupName, {\n value: group,\n enumerable: false\n });\n }\n\n Object.defineProperty(styles, 'codes', {\n value: codes,\n enumerable: false\n });\n styles.color.close = '\\u001B[39m';\n styles.bgColor.close = '\\u001B[49m';\n setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));\n setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));\n setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));\n setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));\n setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));\n setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));\n return styles;\n} // Make the export immutable\n\n\nObject.defineProperty(module, 'exports', {\n enumerable: true,\n get: assembleStyles\n});","map":{"version":3,"sources":["/Users/jane/Documents/Курс Front-end/HW8/myproject/node_modules/pretty-format/node_modules/ansi-styles/index.js"],"names":["wrapAnsi16","fn","offset","args","code","wrapAnsi256","wrapAnsi16m","rgb","ansi2ansi","n","rgb2rgb","r","g","b","setLazyProperty","object","property","get","Object","defineProperty","value","enumerable","configurable","colorConvert","makeDynamicStyles","wrap","targetSpace","identity","isBackground","undefined","require","styles","sourceSpace","suite","entries","name","assembleStyles","codes","Map","modifier","reset","bold","dim","italic","underline","inverse","hidden","strikethrough","color","black","red","green","yellow","blue","magenta","cyan","white","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgColor","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","gray","bgGray","grey","bgGrey","groupName","group","styleName","style","open","close","set","module"],"mappings":"AAAA;;AAEA,MAAMA,UAAU,GAAG,CAACC,EAAD,EAAKC,MAAL,KAAgB,CAAC,GAAGC,IAAJ,KAAa;AAC/C,QAAMC,IAAI,GAAGH,EAAE,CAAC,GAAGE,IAAJ,CAAf;AACA,SAAQ,UAASC,IAAI,GAAGF,MAAO,GAA/B;AACA,CAHD;;AAKA,MAAMG,WAAW,GAAG,CAACJ,EAAD,EAAKC,MAAL,KAAgB,CAAC,GAAGC,IAAJ,KAAa;AAChD,QAAMC,IAAI,GAAGH,EAAE,CAAC,GAAGE,IAAJ,CAAf;AACA,SAAQ,UAAS,KAAKD,MAAO,MAAKE,IAAK,GAAvC;AACA,CAHD;;AAKA,MAAME,WAAW,GAAG,CAACL,EAAD,EAAKC,MAAL,KAAgB,CAAC,GAAGC,IAAJ,KAAa;A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AAf;AACAM,EAAAA,eAAe,CAACiB,MAAM,CAACkC,OAAR,EAAiB,SAAjB,EAA4B,MAAMzC,iBAAiB,CAACnB,WAAD,EAAc,SAAd,EAAyBG,SAAzB,EAAoC,IAApC,CAAnD,CAAf;AACAM,EAAAA,eAAe,CAACiB,MAAM,CAACkC,OAAR,EAAiB,SAAjB,EAA4B,MAAMzC,iBAAiB,CAAClB,WAAD,EAAc,KAAd,EAAqBI,OAArB,EAA8B,IAA9B,CAAnD,CAAf;AAEA,SAAOqB,MAAP;AACA,C,CAED;;;AACAb,MAAM,CAACC,cAAP,CAAsB0E,MAAtB,EAA8B,SAA9B,EAAyC;AACxCxE,EAAAA,UAAU,EAAE,IAD4B;AAExCJ,EAAAA,GAAG,EAAEmB;AAFmC,CAAzC","sourcesContent":["'use strict';\n\nconst wrapAnsi16 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => (...args) => {\n\tconst rgb = fn(...args);\n\treturn `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nconst ansi2ansi = n => n;\nconst rgb2rgb = (r, g, b) => [r, g, b];\n\nconst setLazyProperty = (object, property, get) => {\n\tObject.defineProperty(object, property, {\n\t\tget: () => {\n\t\t\tconst value = get();\n\n\t\t\tObject.defineProperty(object, property, {\n\t\t\t\tvalue,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\n\t\t\treturn value;\n\t\t},\n\t\tenumerable: true,\n\t\tconfigurable: true\n\t});\n};\n\n/** @type {typeof import('color-convert')} */\nlet colorConvert;\nconst makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {\n\tif (colorConvert === undefined) {\n\t\tcolorConvert = require('color-convert');\n\t}\n\n\tconst offset = isBackground ? 10 : 0;\n\tconst styles = {};\n\n\tfor (const [sourceSpace, suite] of Object.entries(colorConvert)) {\n\t\tconst name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;\n\t\tif (sourceSpace === targetSpace) {\n\t\t\tstyles[name] = wrap(identity, offset);\n\t\t} else if (typeof suite === 'object') {\n\t\t\tstyles[name] = wrap(suite[targetSpace], offset);\n\t\t}\n\t}\n\n\treturn styles;\n};\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tsetLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));\n\tsetLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n"]},"metadata":{},"sourceType":"script"}
|