{"version":3,"file":"color.cjs","sources":["../../../../packages/utils/color.ts"],"sourcesContent":["import type { InverseColor, PresetStatusColorType } from '@antdv/types';\nimport { PresetColors } from '@antdv/constants';\n\nconst inverseColors = PresetColors.map<InverseColor>(color => `${color}-inverse`);\nconst presetStatusColorTypes = [\n  'success',\n  'processing',\n  'error',\n  'default',\n  'warning',\n] as const;\n/**\n * determine if the color keyword belongs to the `Ant Design` {@link PresetColors}.\n * @param color color to be judged\n * @param includeInverse whether to include reversed colors\n */\nexport function isPresetColor(color?: any, includeInverse = true) {\n  if (includeInverse)\n    return [...inverseColors, ...PresetColors].includes(color);\n\n  return PresetColors.includes(color);\n}\n\nexport function isPresetStatusColor(color?: any): color is PresetStatusColorType {\n  return presetStatusColorTypes.includes(color);\n}\n"],"names":["PresetColors","color"],"mappings":";;;;;AAGA,MAAM,gBAAgBA,kBAAa,CAAA,GAAA,CAAkB,CAAS,KAAA,KAAA,CAAA,EAAG,KAAK,CAAU,QAAA,CAAA,CAAA,CAAA;AAChF,MAAM,sBAAyB,GAAA;AAAA,EAC7B,SAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AACF,CAAA,CAAA;AAMgB,SAAA,aAAA,CAAcC,OAAa,EAAA,cAAA,GAAiB,IAAM,EAAA;AAChE,EAAI,IAAA,cAAA;AACF,IAAA,OAAO,CAAC,GAAG,aAAA,EAAe,GAAGD,kBAAY,CAAA,CAAE,SAASC,OAAK,CAAA,CAAA;AAE3D,EAAO,OAAAD,kBAAA,CAAa,SAASC,OAAK,CAAA,CAAA;AACpC,CAAA;AAEO,SAAS,oBAAoB,KAA6C,EAAA;AAC/E,EAAO,OAAA,sBAAA,CAAuB,SAAS,KAAK,CAAA,CAAA;AAC9C;;;;;"}