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IA,CACA,CACA,OAAApT,GEgVSsT,CAAU7B,EAAAzR,EAAA+Q,GADnB/Q,EAGOuT,GAAA","sources":["webpack://colors.tsz/webpack/bootstrap","webpack://colors.tsz/webpack/runtime/define property getters","webpack://colors.tsz/webpack/runtime/hasOwnProperty shorthand","webpack://colors.tsz/webpack/runtime/make namespace object","webpack://colors.tsz/./dist/esm/core/support-detect.mjs","webpack://colors.tsz/./dist/esm/core/ansi-codes.mjs","webpack://colors.tsz/./dist/esm/core/ansi-color-map.mjs","webpack://colors.tsz/./dist/esm/core/theme.mjs","webpack://colors.tsz/./dist/esm/ansi-console.mjs","webpack://colors.tsz/./dist/esm/colors.mjs"],"sourcesContent":["// The require scope\nconst __webpack_require__ = {};\n\n","// define getter/value functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tif(Array.isArray(definition)) {\n\t\tvar i = 0;\n\t\twhile(i < definition.length) {\n\t\t\tvar key = definition[i++];\n\t\t\tvar binding = definition[i++];\n\t\t\tif(!__webpack_require__.o(exports, key)) {\n\t\t\t\tif(binding === 0) {\n\t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, value: definition[i++] });\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: binding });\n\t\t\t\t}\n\t\t\t} else if(binding === 0) { i++; }\n\t\t}\n\t} else {\n\t\tfor(var key in definition) {\n\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t\t}\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/*! Copyright jeffy-g 2025\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file lib/core/support-detect.ts\n */\n/**\n * @import { Support } from \"./support-detect.mts\";\n * @type {Support}\n */\nexport const _Support = /** @type {any} */ ({\n  DISABLE: 0 /* Support.DISABLE */,\n  BASE: 1 /* Support.BASE */,\n  ANSI256: 2 /* Support.ANSI256 */,\n  ANSI24bits: 3 /* Support.ANSI24bits */,\n});\nexport const isDefined = () => globalThis.COLORS_DEFINED === true;\nexport const setDefined = () => {\n  globalThis.COLORS_DEFINED = true;\n};\n/**\n * Detects ANSI color support level of the current process.\n *\n * Inspects CLI arguments, environment variables, OS and terminal information\n * and returns one of the {@link Support} enum values.\n *\n * @returns {Support} Detected color support level.\n */\nexport const detectSupport = () => {\n  /* First, let's check is browser */ {\n    const g = globalThis;\n    if (typeof g.window === \"object\" && typeof g.window.document === \"object\") {\n      return 3 /* Support.ANSI24bits */;\n    }\n  }\n  const proc = (typeof process === \"object\" && process) || undefined;\n  if (\n    !proc ||\n    !proc.versions ||\n    typeof proc.versions.node !== \"string\"\n  ) {\n    return 3 /* Support.ANSI24bits */;\n  }\n  const env = proc.env || {};\n  {\n    const argv = Array.isArray(proc.argv) ? proc.argv : [];\n    if (argv.length) {\n      if (argv.includes(\"nocolor\") || argv.includes(\"nocolors\")) {\n        return 0 /* Support.DISABLE */;\n      }\n      if (argv.find((arg) => /^fullcolors?$/.test(arg)) || argv.find((arg) => /^truecolors?$/.test(arg)) || argv.includes(\"color24bits\")) {\n        return 3 /* Support.ANSI24bits */;\n      }\n      if (argv.find((arg) => /^(?:websafe|color256)$/.test(arg))) {\n        return 2 /* Support.ANSI256 */;\n      }\n      if (argv.find((arg) => /^(?:colorbase|basecolors)$/.test(arg))) {\n        return 1 /* Support.BASE */;\n      }\n    }\n  }\n  if (proc.platform === \"win32\") {\n    if (env.COLORTERM === \"truecolor\") return 3 /* Support.ANSI24bits */;\n    const nodeVersion = proc.versions.node || \"0.0.0\";\n    const nodeMajor = +nodeVersion.split(\".\")[0] || 0;\n    if (nodeMajor >= 8) return 2 /* Support.ANSI256 */;\n    return 1 /* Support.BASE */;\n  }\n  if (\"CI\" in env) {\n    if ([\"TRAVIS\", \"CIRCLECI\", \"APPVEYOR\", \"GITLAB_CI\"].some((sign) => sign in env) || env.CI_NAME === \"codeship\") {\n      return 1 /* Support.BASE */;\n    }\n    return 0 /* Support.DISABLE */;\n  }\n  if (\"TEAMCITY_VERSION\" in env) {\n    // @ts-expect-error regex.test allows undefined value\n    return +/^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION);\n  }\n  if (\"TERM_PROGRAM\" in env) {\n    const termVersion = +(env.TERM_PROGRAM_VERSION || \"\").split(\".\")[0];\n    switch (env.TERM_PROGRAM) {\n      case \"iTerm.app\":\n        return termVersion >= 3 ? 3 : 2;\n      case \"Hyper\":\n        return 3 /* Support.ANSI24bits */;\n      case \"Apple_Terminal\":\n        return 2 /* Support.ANSI256 */;\n    }\n  }\n  const eTerm = env.TERM;\n  // @ts-expect-error regex.test allows undefined value\n  if (/-256(?:color)?$/i.test(eTerm)) {\n    return 2 /* Support.ANSI256 */;\n  }\n  // @ts-expect-error regex.test allows undefined value\n  if (/^(?:screen|xterm|vt100|rxvt)|color|ansi|cygwin|linux/i.test(eTerm)) {\n    return 2 /* Support.ANSI256 */;\n  }\n  if (\"COLORTERM\" in env || eTerm === \"dumb\") return 1 /* Support.BASE */;\n  return 0 /* Support.DISABLE */;\n};","/*! Copyright jeffy-g 2025\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file lib/core/ansi-codes.ts\n */\nexport const _codes_base = {\n  reset: 0,\n  bold: 1,\n  dim: 2,\n  italic: 3,\n  underline: 4,\n  inverse: 7,\n  hidden: 8,\n  strikethrough: 9,\n  black: 30,\n  red: 31,\n  green: 32,\n  yellow: 33,\n  blue: 34,\n  magenta: 35,\n  cyan: 36,\n  white: 37,\n  bg_black: 40,\n  bg_red: 41,\n  bg_green: 42,\n  bg_yellow: 43,\n  bg_blue: 44,\n  bg_magenta: 45,\n  bg_cyan: 46,\n  bg_white: 47,\n};\nexport const _codes_advanced = {\n  brightblack: 90,\n  brightred: 91,\n  brightgreen: 92,\n  brightyellow: 93,\n  brightblue: 94,\n  brightmagenta: 95,\n  brightcyan: 96,\n  brightwhite: 97,\n  bg_brightblack: 100,\n  bg_brightred: 101,\n  bg_brightgreen: 102,\n  bg_brightyellow: 103,\n  bg_brightblue: 104,\n  bg_brightmagenta: 105,\n  bg_brightcyan: 106,\n  bg_brightwhite: 107,\n};\nexport const _reset_ctrl = \"\\x1b[0m\";","/*! Copyright jeffy-g 2025\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file lib/core/ansi-color-map.ts\n */\n/**\n * @import { TColorsBasicMap, TWebColorSafeList } from \"./ansi-color-map.mts\";\n */\n/**\n * Converts a non-negative integer to hexadecimal string (lowercase).\n *\n * + __About 25%__ FASTER! (vs _n2h)\n *\n * @param {number} value - The non-negative integer to convert.\n * @returns {string} The hexadecimal string.\n * @date 2025/11/24 9:37:54\n * @since v1.0.14\n */\nexport const n2h = (value) => {\n  if (value === 0) return \"00\";\n  const HEX_CHARS = \"0123456789abcdef\";\n  let digits = \"\";\n  let n = value;\n  while (n > 0) {\n    digits = HEX_CHARS[n % 16] + digits;\n    n >>>= 4;\n  }\n  return digits.length % 2 ? \"0\" + digits : digits;\n};\n/**\n * hex string map\n *\n * ```\n * ffffff: \"\\u001b[38;5;231m\"\n * ```\n * @type {TColorsBasicMap}\n */\nexport let _color_web_safe_map;\n/**\n * 256 color list\n *\n * + __Actual index__: `index - 16`\n *\n * ```\n * // actual index: (231 - 16)\n * 215: {\n *   \"r\": 255,\n *   \"g\": 255,\n *   \"b\": 255,\n *   \"c\": \"\\u001b[38;5;231m\"\n * }\n * ```\n * @type {TWebColorSafeList[]}\n */\nexport let _color_web_safe_list;\n/**\n * hex string map\n *\n * ```\n * ffffff: \"\\u001b[48;5;231m\"\n * ```\n * @type {TColorsBasicMap}\n */\nexport let _color_bg_web_safe_map;\n/**\n * 256 color list\n *\n * + __Actual index__: `index - 16`\n *\n * ```\n * // actual index: (231 - 16)\n * 215: {\n *   \"r\": 255,\n *   \"g\": 255,\n *   \"b\": 255,\n *   \"c\": \"\\u001b[48;5;231m\"\n * }\n * ```\n * @type {TWebColorSafeList[]}\n */\nexport let _color_bg_web_safe_list;\n/** @type {TColorsBasicMap} */\nexport let _color_gray_map;\n/** @type {TWebColorSafeList[]} */\nexport let _color_gray_list;\n/** @type {TColorsBasicMap} */\nexport let _color_bg_gray_map;\n/** @type {TWebColorSafeList[]} */\nexport let _color_bg_gray_list;\nconst _color_web_safe_map_init = () => {\n  const hexStrA = [\"00\", \"33\", \"66\", \"99\", \"cc\", \"ff\"];\n  const hexNumA = [0, 0x33, 0x66, 0x99, 0xcc, 0xff];\n  _color_web_safe_map = /** @type {TColorsBasicMap} */ ({});\n  _color_web_safe_list = /** @type {TWebColorSafeList[]} */ ([]);\n  _color_bg_web_safe_map = /** @type {TColorsBasicMap} */ ({});\n  _color_bg_web_safe_list = /** @type {TWebColorSafeList[]} */ ([]);\n  _color_gray_map = /** @type {TColorsBasicMap} */ ({});\n  _color_gray_list = /** @type {TWebColorSafeList[]} */ ([]);\n  _color_bg_gray_map = /** @type {TColorsBasicMap} */ ({});\n  _color_bg_gray_list = /** @type {TWebColorSafeList[]} */ ([]);\n  let key = [0, 0, 0];\n  for (let i = 0; i < 216; ++i, ++key[0]) {\n    if (key[0] > 5) {\n      key[0] = 0;\n      key[1]++;\n      if (key[1] > 5) {\n        key[1] = 0;\n        key[2]++;\n      }\n    }\n    const pos = 16 /* EConstans.HEX_BASE */ + i;\n    const hex = hexStrA[key[2]] + hexStrA[key[1]] + hexStrA[key[0]];\n    let c = \"\\u001B[38;5;\" /* EC256bits.colorBits */ + pos + \"m\"; /* EC256bits.colorBitsEndl */\n    _color_web_safe_map[hex] = c;\n    _color_web_safe_list.push({\n      r: hexNumA[key[2]],\n      g: hexNumA[key[1]],\n      b: hexNumA[key[0]],\n      c: c,\n    });\n    c = \"\\u001B[48;5;\" /* EC256bits.colorBitsBg */ + pos + \"m\" /* EC256bits.colorBitsEndl */;\n    _color_bg_web_safe_map[hex] = c;\n    _color_bg_web_safe_list.push({\n      r: hexNumA[key[2]],\n      g: hexNumA[key[1]],\n      b: hexNumA[key[0]],\n      c: c,\n    });\n  }\n  for (let i = 0; i < 24; ++i) {\n    const n = 8 + i * 10;\n    let hex = n2h(n);\n    let grayLevel = 232 /* EConstans.GRAY_CODE_BASE */ + i;\n    let c = \"\\u001B[38;5;\" /* EC256bits.colorBits */ + grayLevel + \"m\"; /* EC256bits.colorBitsEndl */\n    _color_gray_map[hex] = c;\n    _color_gray_list.push({ r: n, g: n, b: n, c: c });\n    c = \"\\u001B[48;5;\" /* EC256bits.colorBitsBg */ + grayLevel + \"m\" /* EC256bits.colorBitsEndl */;\n    _color_bg_gray_map[hex] = c;\n    _color_bg_gray_list.push({ r: n, g: n, b: n, c: c });\n  }\n};\n_color_web_safe_map_init();","/*! Copyright jeffy-g 2025\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file lib/core/theme.ts\n */\n/**\n * @import { TColorsMap } from \"./ansi-color-map.mts\";\n * @import { ColorizeFn, Painter } from \"./theme.mts\";\n */\n/**\n * @type {TColorsMap}\n */\nconst _default_theme = {\n  verbose: \"white\",\n  info: \"green\",\n  debug: \"blue\",\n  warning: \"yellow\",\n  error: \"red\",\n  custom0: \"white\",\n  custom1: \"white\",\n  custom2: \"white\",\n  custom3: \"white\",\n  custom4: \"white\",\n  custom5: \"white\",\n  custom6: \"white\",\n  custom7: \"white\",\n  custom8: \"white\",\n  custom9: \"white\",\n};\n/**\n * point to __current theme__\n * @type {TColorsMap}\n */\nexport let _theme = _default_theme;\n/** @type {(theme?: TColorsMap | null) => void} */\nexport const setTheme = (theme) => {\n  _theme = theme == null ? _default_theme : theme;\n};\n/** @type {(value: string, search: string, replace: string) => string} */\nconst replace_all = (value, search, replace) => {\n  if (!search) return value;\n  if (value.indexOf(search) === -1) return value;\n  return value.split(search).join(replace);\n};\n/** @type {(paint: Painter[], value: string, colorize: ColorizeFn) => string} */\nexport const applyPaint = (paint, value, colorize) => {\n  for (let i = 0; i < paint.length; ++i) {\n    const item = paint[i];\n    const key = item.key;\n    const cs = item.colors;\n    if (key == null || cs == null || cs.length == 0) continue;\n    if (typeof key === \"string\") {\n      value = replace_all(value, key, colorize(cs, key));\n    } else if (key instanceof RegExp) {\n      value = value.replace(key, (ar) => {\n        return colorize(cs, ar);\n      });\n    } else {\n      if (key.length === 0) return value;\n      if (typeof key[0] === \"string\") {\n        for (let idx = 0; idx < key.length; ++idx) {\n          const k = /** @type {string[]} */ (key)[idx];\n          value = replace_all(value, k, colorize(cs, k));\n        }\n      } else {\n        for (let idx = 0; idx < key.length; ++idx) {\n          value = value.replace(/** @type {RegExp} */ (key[idx]), (ar) => {\n            return colorize(cs, ar);\n          });\n        }\n      }\n    }\n  }\n  return value;\n};","/*! Copyright jeffy-g 2025\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file lib/ansi-console.ts\n */\nexport const isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n/**\n * @import { T256Rgb, EAnsiColorList } from \"./ansi-console.mts\";\n */\n/** @type {T256Rgb[]} */\nlet web_safe_list = Array(216);\n/** @type {T256Rgb[]} */\nlet gray_list = Array(24);\n/**\n * @param {number} index\n * @returns {T256Rgb | null}\n */\nexport function getRgbFrom256Index(index) {\n  if (index < 16 /* EConstans.HEX_BASE */ || index > 255 /* EConstans.COLOR_256_MAX */) return null;\n  if (index >= 232 /* EConstans.GRAY_CODE_BASE */) {\n    const level = index - 232; /* EConstans.GRAY_CODE_BASE */\n    let rgb = gray_list[level];\n    if (!rgb) {\n      const n = 8 + level * 10;\n      gray_list[level] = rgb = { r: n, g: n, b: n };\n    }\n    return rgb;\n  }\n  const cubeIndex = index - 16; /* EConstans.HEX_BASE */\n  let rgb = web_safe_list[cubeIndex];\n  if (!rgb) {\n    const hexNumA = [0, 0x33, 0x66, 0x99, 0xcc, 0xff];\n    const bIndex = cubeIndex % 6;\n    const gIndex = ((cubeIndex / 6) | 0) % 6;\n    const rIndex = ((cubeIndex / 36) | 0) % 6;\n    web_safe_list[cubeIndex] = rgb = {\n      r: hexNumA[rIndex],\n      g: hexNumA[gIndex],\n      b: hexNumA[bIndex],\n    };\n  }\n  return rgb;\n}\n/**\n * @template {1=} IsBG\n * @template {[IsBG] extends [1] ? \"background\" : \"color\"} Rule\n * @param {EAnsiColorList} color\n * @param {IsBG=} isBg\n * @returns {`${Rule}:${EAnsiColorList};`}\n */\nconst _tc = (color, isBg) => `${/** @type {Rule} */ (isBg ? \"background\" : \"color\")}:${color};`;\n/**\n * more details see - {@link https://en.wikipedia.org/wiki/ANSI_escape_code#Select_Graphic_Rendition_parameters Select Graphic Rendition parameters}\n */\n/** @type {Record<string, string>} */\nconst SGR_TO_CSS_Map = {\n  [0 /* EAnsiFlag.reset */]: \"\",\n  [1 /* EAnsiFlag.bold */]: \"font-weight: bold;\",\n  [2 /* EAnsiFlag.dim */]: \"opacity: 0.6;\",\n  [3 /* EAnsiFlag.italic */]: \"font-style: italic;\",\n  [4 /* EAnsiFlag.underline */]: \"text-decoration:underline;\",\n  [53 /* EAnsiFlag.overline */]: \"text-decoration:overline;\",\n  [7 /* EAnsiFlag.inverse */]: \"filter: invert(1);\",\n  [8 /* EAnsiFlag.hidden */]: \"color: transparent;\",\n  [9 /* EAnsiFlag.strikethrough */]: \"text-decoration:line-through;\",\n  24: \"underline\",\n  29: \"line-through\",\n  55: \"overline\",\n  [30 /* EAnsiFlag.black */]: _tc(/** @type {EAnsiColorList} */(\"#000\")),\n  [31 /* EAnsiFlag.red */]: _tc(/** @type {EAnsiColorList} */(\"#cd3131\")),\n  [32 /* EAnsiFlag.green */]: _tc(/** @type {EAnsiColorList} */(\"#0dbc79\")),\n  [33 /* EAnsiFlag.yellow */]: _tc(/** @type {EAnsiColorList} */(\"#e5e510\")),\n  [34 /* EAnsiFlag.blue */]: _tc(/** @type {EAnsiColorList} */(\"#2472c8\")),\n  [35 /* EAnsiFlag.magenta */]: _tc(/** @type {EAnsiColorList} */(\"#bc3fbc\")),\n  [36 /* EAnsiFlag.cyan */]: _tc(/** @type {EAnsiColorList} */(\"#11a8cd\")),\n  [37 /* EAnsiFlag.white */]: _tc(/** @type {EAnsiColorList} */(\"#e5e5e5\")),\n  [40 /* EAnsiFlag.bg_black */]: _tc(/** @type {EAnsiColorList} */(\"#000\"), 1),\n  [41 /* EAnsiFlag.bg_red */]: _tc(/** @type {EAnsiColorList} */(\"#cd3131\"), 1),\n  [42 /* EAnsiFlag.bg_green */]: _tc(/** @type {EAnsiColorList} */(\"#0dbc79\"), 1),\n  [43 /* EAnsiFlag.bg_yellow */]: _tc(/** @type {EAnsiColorList} */(\"#e5e510\"), 1),\n  [44 /* EAnsiFlag.bg_blue */]: _tc(/** @type {EAnsiColorList} */(\"#2472c8\"), 1),\n  [45 /* EAnsiFlag.bg_magenta */]: _tc(/** @type {EAnsiColorList} */(\"#bc3fbc\"), 1),\n  [46 /* EAnsiFlag.bg_cyan */]: _tc(/** @type {EAnsiColorList} */(\"#11a8cd\"), 1),\n  [47 /* EAnsiFlag.bg_white */]: _tc(/** @type {EAnsiColorList} */(\"#e5e5e5\"), 1),\n  [90 /* EAnsiFlag.brightblack */]: _tc(/** @type {EAnsiColorList} */(\"#666666\")),\n  [91 /* EAnsiFlag.brightred */]: _tc(/** @type {EAnsiColorList} */(\"#f14c4c\")),\n  [92 /* EAnsiFlag.brightgreen */]: _tc(/** @type {EAnsiColorList} */(\"#23d18b\")),\n  [93 /* EAnsiFlag.brightyellow */]: _tc(/** @type {EAnsiColorList} */(\"#f5f543\")),\n  [94 /* EAnsiFlag.brightblue */]: _tc(/** @type {EAnsiColorList} */(\"#3b8eea\")),\n  [95 /* EAnsiFlag.brightmagenta */]: _tc(/** @type {EAnsiColorList} */(\"#d670d6\")),\n  [96 /* EAnsiFlag.brightcyan */]: _tc(/** @type {EAnsiColorList} */(\"#29b8dB\")),\n  [97 /* EAnsiFlag.brightwhite */]: _tc(/** @type {EAnsiColorList} */(\"#ededed\")),\n  [100 /* EAnsiFlag.bg_brightblack */]: _tc(/** @type {EAnsiColorList} */(\"#666666\"), 1),\n  [101 /* EAnsiFlag.bg_brightred */]: _tc(/** @type {EAnsiColorList} */(\"#f14c4c\"), 1),\n  [102 /* EAnsiFlag.bg_brightgreen */]: _tc(/** @type {EAnsiColorList} */(\"#23d18b\"), 1),\n  [103 /* EAnsiFlag.bg_brightyellow */]: _tc(/** @type {EAnsiColorList} */(\"#f5f543\"), 1),\n  [104 /* EAnsiFlag.bg_brightblue */]: _tc(/** @type {EAnsiColorList} */(\"#3b8eea\"), 1),\n  [105 /* EAnsiFlag.bg_brightmagenta */]: _tc(/** @type {EAnsiColorList} */(\"#d670d6\"), 1),\n  [106 /* EAnsiFlag.bg_brightcyan */]: _tc(/** @type {EAnsiColorList} */(\"#29b8dB\"), 1),\n  [107 /* EAnsiFlag.bg_brightwhite */]: _tc(/** @type {EAnsiColorList} */(\"#ededed\"), 1),\n};\n/**\n * @typedef {`color:#${string};`} TCssPropFg\n * @typedef {`background:#${string};`} TCssPropBg\n * @type {Array<TCssPropFg | TCssPropBg>}\n */\nconst SGR_TO_CSS = (() => {\n  const cssPropArry = Array(108);\n  for (const idx in SGR_TO_CSS_Map) {\n    cssPropArry[+idx] = SGR_TO_CSS_Map[idx];\n  }\n  return cssPropArry;\n})();\n/**\n * Removes a CSS rule matching the given token from the state\n * @param {string} token - CSS property name to match (e.g., \"color:\")\n * @param {string[]} cssState - Current CSS state array\n * @param {string=} tdCriteria - For text-decoration, specific value to remove\n * @returns {1 | 0} 1 if modified, 0 otherwise\n */\nconst pargeStyle = (token, cssState, tdCriteria) => {\n  const finded = cssState.findIndex((state) => state.startsWith(token));\n  if (finded === -1) return 0;\n  if (tdCriteria) {\n    const tdValues = cssState[finded]\n      .slice(16, -1)\n      .split(\" \")\n      .filter((rule) => rule !== tdCriteria);\n    if (tdValues.length) {\n      cssState[finded] = `text-decoration:${tdValues.join(\" \")};`;\n      return 1;\n    }\n  }\n  cssState.splice(finded, 1);\n  return 1;\n};\nconst isa = Array.isArray;\n/**\n * Handles SGR reset codes (22-29, 39)\n *\n * @param {string[]} cssState\n * @param {number} code\n * @returns true if the code was a reset code and was handled\n */\nconst handleResetCode = (cssState, code) => {\n  if (code === 0) {\n    cssState.length = 0;\n    return true;\n  }\n  let tokens;\n  let tdCriteria;\n  switch (code) {\n    case 22: {\n      tokens = [\"font-weight:\", \"opacity:\"];\n      break;\n    }\n    case 23: {\n      tokens = \"font-style:\";\n      break;\n    }\n    case 24:\n    case 29:\n    case 55: {\n      tokens = \"text-decoration:\";\n      tdCriteria = SGR_TO_CSS[code];\n      break;\n    }\n    case 27: {\n      tokens = \"filter:\";\n      break;\n    }\n    case 28:\n    case 39: {\n      tokens = \"color:\";\n      break;\n    }\n    case 49: {\n      tokens = \"background:\";\n      break;\n    }\n    default:\n      return false;\n  }\n  /** @type {any} */\n  let isChanged;\n  if (tokens) {\n    if (isa(tokens)) {\n      for (const token of tokens) {\n        isChanged |= pargeStyle(token, cssState);\n      }\n    } else {\n      isChanged |= pargeStyle(tokens, cssState, tdCriteria);\n    }\n  }\n  return !!isChanged;\n};\n/**\n * Updates or adds a CSS rule to the state\n * Handles text-decoration merging and rule replacement\n * @param {string} css - CSS rule to add or update\n * @param {string[]} cssState - Current CSS state array\n */\nconst updateCssState = (css, cssState) => {\n  const comingPropName = css.slice(0, css.indexOf(\":\"));\n  const isTextDecoration = comingPropName === \"text-decoration\";\n  const reTdTest = /^text-decoration/;\n  for (let i = 0, cssStateLen = cssState.length; i < cssStateLen; ) {\n    const _css = cssState[i++];\n    if (isTextDecoration && reTdTest.test(_css)) {\n      const prev = _css.slice(16, -1).trim().split(\" \");\n      const next = css.slice(16, -1).trim();\n      if (!prev.includes(next)) {\n        prev.push(next);\n        cssState[i - 1] = `text-decoration:${prev.join(\" \")};`;\n      }\n      return;\n    } else {\n      const propName = _css.slice(0, _css.indexOf(\":\"));\n      if (comingPropName === propName) {\n        cssState[i - 1] = css;\n        return;\n      }\n    }\n  }\n  cssState.push(css);\n};\n/**\n * Resolves ANSI SGR color codes (truecolor and 256-color) and updates the CSS state.\n *\n * This function interprets ANSI color codes for both truecolor (24-bit, e.g., 38;2;r;g;b or 48;2;r;g;b)\n * and 256-color (e.g., 38;5;idx or 48;5;idx) sequences, and converts them to corresponding CSS rules.\n * The resulting CSS rule is added to or updates the provided cssState array.\n *\n * @param {number} codeOffset - The current offset in the codes array.\n * @param {string[]} codes The array of SGR code strings.\n *   __`CAVEAT:`__ when use code[number] then MUST convert to number\n *   ```\n *   const code = +codes[3];\n *   ```\n * @param {string[]} sgr2css - The lookup table for standard SGR code to CSS string.\n * @param {string[]} cssState - The current CSS state array to be updated.\n * @returns {number} The new offset in the codes array after processing the color code.\n */\nconst resolveAnsiColor = (codeOffset, codes, sgr2css, cssState) => {\n  const code = +codes[codeOffset++];\n  let css = sgr2css[code];\n  if (!css) {\n    const propName = code === 38 ? \"color\" : \"background\";\n    const isRGB = codes[codeOffset++] === \"2\";\n    if (isRGB) {\n      css = `${propName}: rgb(${codes[codeOffset]} ${codes[codeOffset + 1]} ${codes[codeOffset + 2]});`;\n      codeOffset += 3;\n    } else {\n      const color256Index = +codes[codeOffset++];\n      let rgbEntry = getRgbFrom256Index(color256Index);\n      if (rgbEntry) {\n        css = `${propName}: rgb(${rgbEntry.r} ${rgbEntry.g} ${rgbEntry.b});`;\n      } else {\n        const shift = propName === \"background\" ? 10 : 0;\n        const base = color256Index & 8 ? 82 : 30;\n        css = sgr2css[color256Index + base + shift];\n      }\n    }\n  }\n  updateCssState(css, cssState);\n  return codeOffset;\n};\n/** @type {(strs: string[]) => string} */\nconst join = (strs) => {\n  let contents = \"\";\n  const strsLen = strs.length;\n  if (!strsLen) return contents;\n  for (let idx = 0; idx < strsLen; ) contents += strs[idx++];\n  return contents;\n};\n/**\n * Converts ANSI escape sequences to browser console format\n *\n * In Node.js, returns input as-is (ANSI passthrough)\n * In Browser, converts ANSI codes to %c placeholders with CSS\n *\n * @param {string} format - String containing ANSI escape sequences\n * @param {...unknown} comingArgs - Additional arguments (objects, etc.)\n * @returns {[string, args?: unknown[]]} Tuple of [formatted string, CSS args array]\n *\n * @example\n * // Input: \"\\x1b[31mError\\x1b[0m message\"\n * // Output: [\"%cError%c message\", [\"color:red;\", \"\"]]\n * @version latest\n */\nexport function toConsoleArgsFromAnsiNext(format, ...comingArgs) {\n  const sgr2css = SGR_TO_CSS;\n  /** @type {string} */\n  var text;\n  /**\n   * Currently enabled CSS properties\n   * @type {string[]}\n   */\n  let cssState = [];\n  /** __Flags required for adjusting placeholders, rest args, etc.__ */\n  let isStyleApplied = false;\n  let formatLine = \"\";\n  const args = [];\n  const sdifoOc = \"sdifoOc\";\n  const formatLen = format.length;\n  let lastIndex = 0,\n    offset = 0,\n    comingArgsIdx = 0;\n  while (offset < formatLen) {\n    let ch = format[offset++];\n    if (ch === \"\\x1b\" && format[offset] === \"[\") {\n      const matchStart = offset - 1;\n      const codesStart = (offset += 1);\n      while (offset < formatLen && format[offset] !== \"m\") offset++;\n      if (offset >= formatLen) break;\n      if (lastIndex < matchStart) {\n        if (!isStyleApplied) {\n          text = \"%c\" + format.slice(lastIndex, matchStart);\n          args.push(join(cssState));\n          isStyleApplied = true;\n        } else text = format.slice(lastIndex, matchStart);\n        formatLine += text;\n      }\n      const codes = format.slice(codesStart, offset).split(\";\");\n      isStyleApplied = false;\n      for (let idx = 0, codesLen = codes.length; idx < codesLen; ) {\n        if (handleResetCode(cssState, +codes[idx])) {\n          idx++;\n        } else {\n          idx = resolveAnsiColor(idx, codes, sgr2css, cssState);\n        }\n      }\n      lastIndex = ++offset;\n      continue;\n    }\n    if (ch === \"%\") {\n      if (format[offset] === \"%\") {\n        offset += 1;\n        continue;\n      }\n      while (offset < formatLen) {\n        if (((ch = format[offset]) >= \"0\" && ch <= \"9\") || ch === \".\" || ch === \"-\" || ch === \"+\") {\n          offset++;\n        } else {\n          break;\n        }\n      }\n      if (sdifoOc.includes(format[offset])) {\n        const fragment = format.slice(lastIndex, ++offset);\n        if (isStyleApplied) {\n          formatLine += fragment;\n          args.push(comingArgs[comingArgsIdx++]);\n        } else {\n          formatLine += \"%c\" + fragment;\n          args.push(join(cssState), comingArgs[comingArgsIdx++]);\n          isStyleApplied = true;\n        }\n        lastIndex = offset;\n        continue;\n      }\n    }\n  }\n  if (lastIndex < formatLen) {\n    if (!isStyleApplied) {\n      text = \"%c\" + format.slice(lastIndex);\n      args.push(join(cssState));\n    } else text = format.slice(lastIndex);\n    formatLine += text;\n  }\n  return [formatLine, args.concat(comingArgs.slice(comingArgsIdx))];\n}\nconst _log = console.log;\n/**\n * @typedef {(format: string, ...comingArgs: unknown[]) => [string, args?: unknown[]]} TAnsiParser\n * @param {TAnsiParser} parser\n * @returns {Console[\"log\"]}\n */\nconst createAnsiLogger = (parser) => {\n  if (!isBrowser) return _log;\n  return (...argsIn) => {\n    if (!argsIn.length) return _log();\n    let format = argsIn[0];\n    if (typeof format !== \"string\") return _log(...argsIn);\n    /** @type {unknown[]} */\n    let fmtArgs;\n    [format, fmtArgs = []] = parser(format, ...argsIn.slice(1));\n    _log(format, ...fmtArgs);\n  };\n};\n/** @type {Console[\"log\"]} */\nexport const logAnsi = createAnsiLogger(toConsoleArgsFromAnsiNext);","/*! Copyright xerysherry 2018\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Refactoring by jeffy-g (2025/11).\n */\n/// <reference types=\"node\" preserve=\"true\"/>\n// @ts-ignore this tag for after build source\n/// <reference path=\"../colors.d.ts\" preserve=\"true\"/>\nimport { detectSupport, isDefined, setDefined } from \"./core/support-detect.mjs\";\nexport { _Support as Support } from \"./core/support-detect.mjs\";\nimport { _codes_base, _codes_advanced, _reset_ctrl } from \"./core/ansi-codes.mjs\";\nimport { n2h, _color_web_safe_list, _color_web_safe_map, _color_bg_web_safe_list, _color_bg_web_safe_map, _color_gray_list, _color_gray_map, _color_bg_gray_list, _color_bg_gray_map } from \"./core/ansi-color-map.mjs\";\nimport { _theme, setTheme, applyPaint } from \"./core/theme.mjs\";\nimport { isBrowser } from \"./ansi-console.mjs\";\nexport { logAnsi as log, isBrowser, getRgbFrom256Index, toConsoleArgsFromAnsiNext } from \"./ansi-console.mjs\";\n/**\n * @import { Painter } from \"./core/theme.mts\";\n * @import { TCodesAdvanceKey, TCodesBaseKey } from \"./core/ansi-codes.mts\";\n * @import { TColorsBasicMap, TWebColorSafeList, TColorsMap } from \"./core/ansi-color-map.mts\";\n * @import { Support } from \"./core/support-detect.mts\";\n */\n/**\n * @param {number} level range is __`0 - 25`__, `0` is __black__, and `25` is __white__\n * @param {38 | 48} flag foreground - __38__, backbround - __48__\n */\nconst _get_gray_code = (level, flag) => {\n  if (_enable) {\n    if (_support < 2 /* Support.ANSI256 */) return flag === 48 ? \"\\x1b[48;5;245m\" : \"\\x1b[90m\";\n    if (level <= 0 /* EConstans.GRAY_LEVEL_MIN */)\n      return `\\x1B[${flag};5;0m`;\n    else if (level >= 25 /* EConstans.GRAY_LEVEL_MAX */) return `\\x1B[${flag};5;15m`;\n    return `\\x1B[${flag};5;${level - 1 + 232 /* EConstans.GRAY_CODE_BASE */}m`;\n  }\n  return \"\";\n};\n/**\n * @param {number} idx `0` index base\n * @param {38 | 48} flag foreground - __38__, backbround - __48__\n */\nconst _get_256bits_color_code = (idx, flag) => {\n  if (_support < 2 /* Support.ANSI256 */) return null;\n  if (idx < 0 /* EConstans.COLOR_256_MIN */) idx = 0 /* EConstans.COLOR_256_MIN */;\n  else if (idx > 255 /* EConstans.COLOR_256_MAX */) idx = 255 /* EConstans.COLOR_256_MAX */;\n  return `\\u001B[${flag};5;` + idx + \"m\" /* EC256bits.colorBitsEndl */;\n};\n/**\n * @import {TSafeMapAndGrayListArg} from \"./colors.mts\";\n */\n/** @type {(bg: boolean) => TSafeMapAndGrayListArg} */\nconst _get_safemap_and_graylist_args = (bg) => {\n  /** @type {TSafeMapAndGrayListArg} */\n  let mapListArgs = [bg ? _color_bg_web_safe_map : _color_web_safe_map, bg ? _color_bg_web_safe_list : _color_web_safe_list];\n  if (_more_detail_on_color256) {\n    mapListArgs = [mapListArgs[0], mapListArgs[1], bg ? _color_bg_gray_map : _color_gray_map, bg ? _color_bg_gray_list : _color_gray_list];\n  }\n  return mapListArgs;\n};\n/** @type {(hexcode: string, bg: boolean) => string | null} */\nconst _get_color_by_hex = (hexcode, bg) => {\n  if (_support === 3 /* Support.ANSI24bits */) {\n    let r = +(\"0x\" + hexcode[0] + hexcode[1]);\n    let g = +(\"0x\" + hexcode[2] + hexcode[3]);\n    let b = +(\"0x\" + hexcode[4] + hexcode[5]);\n    return bg ? _get_truecolor_bg(r, g, b) : _get_truecolor(r, g, b);\n  }\n  if (_support < 2 /* Support.ANSI256 */) return null;\n  return _get_web_safe_code_by_hex(hexcode, ..._get_safemap_and_graylist_args(bg));\n};\n/** @type {(r: number, g: number, b: number, bg: boolean) => string | null} */\nconst _get_color_by_rgb = (r, g, b, bg) => {\n  if (_support === 3 /* Support.ANSI24bits */) return bg ? _get_truecolor_bg(r, g, b) : _get_truecolor(r, g, b);\n  if (_support < 2 /* Support.ANSI256 */) return null;\n  return _get_web_safe_code_by_rgb(r, g, b, ..._get_safemap_and_graylist_args(bg));\n};\n/** @type {(hex: string, map: TColorsBasicMap, list: TWebColorSafeList[], map2?: TColorsBasicMap, list2?: TWebColorSafeList[]) => string | null} */\nconst _get_web_safe_code_by_hex = (hex, map, list, map2, list2) => {\n  /** @type {string | null=} */\n  let c = map[hex];\n  if (c) return c;\n  if (map2) {\n    c = map2[hex];\n    if (c) return c;\n  }\n  let r = +(\"0x\" + hex[0] + hex[1]);\n  let g = +(\"0x\" + hex[2] + hex[3]);\n  let b = +(\"0x\" + hex[4] + hex[5]);\n  c = _get_web_safe_code_search(r, g, b, list, list2);\n  if (c) map[hex] = c;\n  return c;\n};\n/** @type {(r: number, g: number, b: number, map: TColorsBasicMap, list: TWebColorSafeList[], map2?: TColorsBasicMap, list2?: TWebColorSafeList[]) => string | null} */\nconst _get_web_safe_code_by_rgb = (r, g, b, map, list, map2, list2) => {\n  let hex = n2h(r) + n2h(g) + n2h(b);\n  /** @type {string | null=} */\n  let c = map[hex];\n  if (c) return c;\n  if (map2) {\n    c = map2[hex];\n    if (c) return c;\n  }\n  c = _get_web_safe_code_search(r, g, b, list, list2);\n  if (c) map[hex] = c;\n  return c;\n};\n/** @type {(r: number, g: number, b: number, list: TWebColorSafeList[], list2?: TWebColorSafeList[]) => string | null} */\nconst _get_web_safe_code_search = (r, g, b, list, list2) => {\n  let m = Number.MAX_VALUE;\n  let c = null;\n  list.forEach((item) => {\n    let v = (item.r - r) * (item.r - r) + (item.g - g) * (item.g - g) + (item.b - b) * (item.b - b);\n    if (v < m) {\n      m = v;\n      c = item.c;\n    }\n  });\n  if (list2) {\n    list2.forEach((item) => {\n      let v = (item.r - r) * (item.r - r) + (item.g - g) * (item.g - g) + (item.b - b) * (item.b - b);\n      if (v < m) {\n        m = v;\n        c = item.c;\n      }\n    });\n  }\n  return c;\n};\n/** @type {(r: number, g: number, b: number) => `\\x1b[38;2;${number};${number};${number}m`} */\nconst _get_truecolor = (r, g, b) => `\\u001b[38;2;${r};${g};${b}m`;\n/** @type {(r: number, g: number, b: number) => `\\x1b[48;2;${number};${number};${number}m`} */\nconst _get_truecolor_bg = (r, g, b) => `\\x1b[48;2;${r};${g};${b}m`;\n/** @type {(color: string) => string | null} */\nconst _get_code = (color) => {\n  if (color.length === 0 || _support < 1 /* Support.BASE */) return null;\n  /** @type {number} */\n  let code = _codes_base[/** @type {TCodesBaseKey} */ (color)];\n  if (code !== void 0) return `\\x1b[${code}m`;\n  code = _codes_advanced[/** @type {TCodesAdvanceKey} */ (color)];\n  if (code !== void 0) return `\\x1b[${code};1m`;\n  color = color.toLowerCase();\n  const c0 = color[0];\n  if (c0 === \"#\") return _get_color_by_hex(color.slice(1), false);\n  else if (c0 === \"g\") return _get_gray_code(+color.slice(1), 38);\n  else if (c0 === \"b\") {\n    if (color[1] === \"#\") return _get_color_by_hex(color.slice(2), true);\n    else if (color[1] === \"g\") return _get_gray_code(+color.slice(2), 48);\n  }\n  return null;\n};\n/**\n * state of __current Support__\n * @type {Support}\n */\nlet _support = 0; /* Support.DISABLE */\n/**\n * state of __current enabling__\n */\nlet _enable = true;\nlet _more_detail_on_color256 = false;\n/**\n * + __`\"\\u001B[0m\"`__.length is **4**\n * @param {string} value\n */\nconst _check_reset_end = (value) => {\n  return value.length >= 4 && value.endsWith(_reset_ctrl);\n};\n/** @type {(x: number, y: number) => `\\x1b[${number};${number}H`} */\nconst _position = (x, y) => `\\x1b[${y};${x}H`;\nconst _strProto = String.prototype;\n/** @type {(key: string, fn: (this: string, ...args: any[]) => string) => void} */\nconst _defineStringProp = (key, fn) => {\n  try {\n    Object.defineProperty(_strProto, key, {\n      get: fn,\n      enumerable: false,\n      configurable: false,\n    });\n  } catch (e) {\n    console.warn(/** @type {Error} */ (e).message);\n  }\n};\n/** @type {(ansiEscape: `\\x1b[${number}m`) => (this: string) => string} */\nconst emitColorsFunction = (ansiEscape) => {\n  return function () {\n    if (!_enable || _support < 1 /* Support.BASE */) return this;\n    const ansiValue = ansiEscape + this;\n    if (_check_reset_end(this)) return ansiValue;\n    else return ansiValue + _reset_ctrl;\n  };\n};\nconst _codes_init = () => {\n  for (const key in _codes_base) {\n    _defineStringProp(key, emitColorsFunction(`\\x1b[${_codes_base[/** @type {TCodesBaseKey} */ (key)]}m`));\n  }\n  for (const key in _codes_advanced) {\n    _defineStringProp(key, emitColorsFunction(`\\x1b[${_codes_advanced[/** @type {TCodesAdvanceKey} */ (key)]}m`));\n  }\n  /** @type {(dis: string, idxOrLevel: number, flag: 38 | 48, fn: (idxOrLevel: number, flag: 38 | 48) => string | null) => string} */\n  const _color_at_256_or_gray_impl = (dis, idxOrLevel, flag, fn) => {\n    if (!_enable) return dis;\n    const code = fn(idxOrLevel, flag);\n    if (!code) return dis;\n    if (_check_reset_end(dis)) return code + dis;\n    else return code + dis + _reset_ctrl;\n  };\n  /** @type {(fn_name: \"color_at_256\" | \"color_bg_at_256\", dis: string, split?: true) => string} */\n  const _colors256_rnd_impl = (fn_name, dis, split) => {\n    const rnd = Math.random;\n    if (split) {\n      let joined = \"\";\n      for (let idx = 0, charsLen = dis.length; idx < charsLen; ) {\n        joined += dis[idx++][fn_name]((rnd() * 256) | 0);\n      }\n      return joined;\n    }\n    return dis[fn_name]((rnd() * 256) | 0);\n  };\n  _strProto.colors256_rnd =\n    /** @type {(this: string, split?: true) => string} */\n    function (split) {\n      if (!_enable) return this;\n      return _colors256_rnd_impl(\"color_at_256\", this, split);\n    };\n  _strProto.colors256_rnd_bg =\n    /** @type {(this: string, split?: true) => string} */\n    function (split) {\n      if (!_enable) return this;\n      return _colors256_rnd_impl(\"color_bg_at_256\", this, split);\n    };\n  _strProto.color_at_256 =\n    /** @type {(this: string, idx: number) => string} */\n    function (idx) {\n      return _color_at_256_or_gray_impl(this, idx, 38, _get_256bits_color_code);\n    };\n  _strProto.color_bg_at_256 =\n    /** @type {(this: string, idx: number) => string} */\n    function (idx) {\n      return _color_at_256_or_gray_impl(this, idx, 48, _get_256bits_color_code);\n    };\n  _strProto.gray =\n    /** @type {(this: string, level: number) => string} */\n    function (level) {\n      return _color_at_256_or_gray_impl(this, level, 38, _get_gray_code);\n    };\n  _strProto.gray_bg =\n    /** @type {(this: string, level: number) => string} */\n    function (level) {\n      return _color_at_256_or_gray_impl(this, level, 48, _get_gray_code);\n    };\n  _strProto.grey = _strProto.gray;\n  _strProto.grey_bg = _strProto.gray_bg;\n  _strProto.colors =\n    /** @type {(this: string, color: string | string[], noreset?: boolean) => string} */\n    function (color, noreset) {\n      return colors(color, this, noreset);\n    };\n  /** @type {(isBg?: boolean) => (this: string, hex: string) => string} */\n  const emit_hex_fn = (isBg = false) =>\n    function (hex) {\n      if (!_enable) return this;\n      const h = hex[0] === \"#\" ? hex.slice(1) : hex;\n      const code = _get_color_by_hex(h, isBg);\n      if (!code) return this;\n      return code + this + _reset_ctrl;\n    };\n  _strProto.hex = emit_hex_fn();\n  _strProto.hex_bg = emit_hex_fn(true);\n  const emit_rgb_fn = (isBg = false) =>\n    /** @type {(this: string, r: number, g: number, b: number) => string} */\n    function (r, g, b) {\n      if (!_enable) return this;\n      const ansiMark = _get_color_by_rgb(r, g, b, isBg);\n      if (!ansiMark) return this;\n      return ansiMark + this + _reset_ctrl;\n    };\n  _strProto.rgb = emit_rgb_fn();\n  _strProto.rgb_bg = emit_rgb_fn(true);\n  _strProto.paint =\n    /** @type {(this: string, pt: Painter[]) => string} */\n    function (pt) {\n      return paint(pt, this);\n    };\n  \"up:A,down:B,right:C,left:D,next_line:E,prev_line:F\".split(\",\").forEach((pair) => {\n    const [method, dir] = pair.split(\":\");\n    // @ts-ignore ignore ts(7015)\n    _strProto[method] =\n      /** @type {(this: string, n?: number) => string} */\n      function (n = 1) {\n        if (!_enable) return this;\n        return `\\x1b[${n}${dir}` + this;\n      };\n  });\n  _strProto.column =\n    /** @type {(this: string, n: number) => string} */\n    function (n) {\n      if (!_enable) return this;\n      return `\\x1b[${n}G` + this;\n    };\n  _strProto.position =\n    /** @type {(this: string, x: number, y: number) => string} */\n    function (x, y) {\n      if (!_enable) return this;\n      return _position(x, y) + this;\n    };\n  /** @type {(pos: string) => (this: string) => string} */\n  const emit_position_fn = (pos) =>\n    function () {\n      if (!_enable) return this;\n      return pos + this;\n    };\n  _defineStringProp(\"load_position\", emit_position_fn(\"\\u001B[u\" /* ECtrlCode.loadPositionCode */));\n  _defineStringProp(\"save_position\", emit_position_fn(\"\\u001B[s\" /* ECtrlCode.savePositionCode */));\n  _defineStringProp(\"clear_screen\", emit_position_fn(\"\\u001B[2J\" /* ECtrlCode.clearScreenCode */));\n  _defineStringProp(\"clear_line\", emit_position_fn(\"\\u001B[K\" /* ECtrlCode.clearLineCode */));\n};\nconst _theme_init = () => {\n  for (const key in _theme) {\n    _defineStringProp(key, function () {\n      if (_enable) {\n        let s = _theme[key];\n        if (!s) return this;\n        return colors(s, this);\n      }\n      return this;\n    });\n  }\n};\nconst _init = () => {\n  _support = detectSupport();\n  if (isDefined()) return;\n  setDefined();\n  _codes_init();\n  _theme_init();\n};\n_init();\n/** @type {(color: string | string[], value: string, noreset?: boolean) => string} */\nexport const colors = (color, value, noreset) => {\n  if (_enable && _support >= 1 /* Support.BASE */) {\n    if (typeof color === \"string\") {\n      let s = _theme[color];\n      if (s) return colors(s, value);\n      var code = _get_code(color);\n      if (!code) return value;\n      if (noreset) return code + value;\n      return code + value + _reset_ctrl;\n    } else {\n      let result = value;\n      for (let i = color.length - 1; i >= 0; --i) {\n        var code = _get_code(color[i]);\n        if (code != null) result = code + result;\n      }\n      if (noreset) return result;\n      return result + _reset_ctrl;\n    }\n  }\n  return value;\n};\n/** @type {(value?: boolean) => void} */\nexport const enable = (value = true) => {\n  _enable = value;\n};\n/** @type {(support?: Support) => Support} */\nexport const support = (support) => {\n  if (typeof support !== \"undefined\") _support = support;\n  return _support;\n};\n/**\n * update theme object\n *\n * @param {TColorsMap} theme new theme\n */\nexport const theme = (theme) => {\n  setTheme(theme);\n};\n/**\n * @param {number} x\n * @param {number} y\n */\nexport const position = (x, y) => {\n  if (isBrowser || !_enable) return;\n  process.stdout.write(_position(x, y));\n};\nexport const save_position = () => {\n  if (isBrowser || !_enable) return;\n  process.stdout.write(\"\\u001B[s\" /* ECtrlCode.savePositionCode */);\n};\nexport const load_position = () => {\n  if (isBrowser || !_enable) return;\n  process.stdout.write(\"\\u001B[u\" /* ECtrlCode.loadPositionCode */);\n};\nexport const clear_screen = () => {\n  if (isBrowser || !_enable) return;\n  process.stdout.write(\"\\u001B[2J\" /* ECtrlCode.clearScreenCode */);\n};\n/**\n * @param {boolean=} show\n */\nexport const show_cursor = (show = true) => {\n  if (isBrowser || !_enable) return;\n  process.stdout.write(show ? \"\\u001B[?25h\" /* ECtrlCode.showCursorCode */ : \"\\u001B[?25l\" /* ECtrlCode.hideCursorCode */);\n};\n/**\n * @param {boolean=} value\n */\nexport const more_detail_on_color256 = (value = true) => {\n  _more_detail_on_color256 = value;\n  return _more_detail_on_color256;\n};\n/** @type {(paint: Painter[], value: string) => string} */\nexport const paint = (paint, value) => {\n  if (!_enable || paint == null || value == null || value.length === 0 || paint.length === 0) return value;\n  return applyPaint(paint, value, colors);\n};\nexport const version = \"1.6.5\";"],"names":["__webpack_require__","exports","definition","Array","isArray","i","length","key","binding","o","Object","defineProperty","enumerable","value","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","_Support","DISABLE","BASE","ANSI256","ANSI24bits","_codes_base","reset","bold","dim","italic","underline","inverse","hidden","strikethrough","black","red","green","yellow","blue","magenta","cyan","white","bg_black","bg_red","bg_green","bg_yellow","bg_blue","bg_magenta","bg_cyan","bg_white","_codes_advanced","brightblack","brightred","brightgreen","brightyellow","brightblue","brightmagenta","brightcyan","brightwhite","bg_brightblack","bg_brightred","bg_brightgreen","bg_brightyellow","bg_brightblue","bg_brightmagenta","bg_brightcyan","bg_brightwhite","n2h","digits","n","_color_web_safe_map","_color_web_safe_list","_color_bg_web_safe_map","_color_bg_web_safe_list","_color_gray_map","_color_gray_list","_color_bg_gray_map","_color_bg_gray_list","hexStrA","hexNumA","pos","hex","c","push","r","g","b","grayLevel","_color_web_safe_map_init","_default_theme","verbose","info","debug","warning","error","custom0","custom1","custom2","custom3","custom4","custom5","custom6","custom7","custom8","custom9","_theme","replace_all","search","replace","indexOf","split","join","isBrowser","window","document","web_safe_list","gray_list","getRgbFrom256Index","index","level","rgb","cubeIndex","bIndex","gIndex","rIndex","_tc","color","isBg","SGR_TO_CSS_Map","SGR_TO_CSS","cssPropArry","idx","pargeStyle","token","cssState","tdCriteria","finded","findIndex","state","startsWith","tdValues","slice","filter","rule","splice","isa","handleResetCode","code","tokens","isChanged","resolveAnsiColor","codeOffset","codes","sgr2css","css","propName","color256Index","rgbEntry","comingPropName","isTextDecoration","reTdTest","cssStateLen","_css","test","prev","trim","next","includes","updateCssState","strs","contents","strsLen","toConsoleArgsFromAnsiNext","format","comingArgs","text","isStyleApplied","formatLine","args","formatLen","lastIndex","offset","comingArgsIdx","ch","matchStart","codesStart","codesLen","fragment","concat","_log","console","log","logAnsi","parser","argsIn","fmtArgs","_get_gray_code","flag","_enable","_support","_get_256bits_color_code","_get_safemap_and_graylist_args","bg","mapListArgs","_more_detail_on_color256","_get_color_by_hex","hexcode","_get_truecolor_bg","_get_truecolor","_get_web_safe_code_by_hex","map","list","map2","list2","_get_web_safe_code_search","m","Number","MAX_VALUE","forEach","item","v","_get_code","c0","toLowerCase","_check_reset_end","endsWith","_position","x","y","_strProto","String","_defineStringProp","fn","configurable","e","warn","message","emitColorsFunction","ansiEscape","this","ansiValue","globalThis","proc","process","undefined","versions","node","env","argv","find","arg","platform","COLORTERM","some","sign","CI_NAME","TEAMCITY_VERSION","termVersion","TERM_PROGRAM_VERSION","TERM_PROGRAM","eTerm","TERM","detectSupport","COLORS_DEFINED","_color_at_256_or_gray_impl","dis","idxOrLevel","_colors256_rnd_impl","fn_name","rnd","Math","random","joined","charsLen","colors256_rnd","colors256_rnd_bg","color_at_256","color_bg_at_256","gray","gray_bg","grey","grey_bg","colors","noreset","emit_hex_fn","h","hex_bg","emit_rgb_fn","ansiMark","_get_web_safe_code_by_rgb","_get_color_by_rgb","rgb_bg","paint","pt","pair","method","dir","column","position","emit_position_fn","_codes_init","s","_theme_init","result","enable","support","theme","setTheme","stdout","write","save_position","load_position","clear_screen","show_cursor","show","more_detail_on_color256","colorize","cs","RegExp","ar","k","applyPaint","version"],"sourceRoot":""}