{"version":3,"file":"deprecationWarning.cjs","sources":["../../../src/utils/deprecationWarning.ts"],"sourcesContent":["import { KeyValue } from '../types/data';\n\n// Avoid writing the warning message more than once every 10s\nconst history: KeyValue<number> = {};\n\nexport const deprecationWarning = (file: string, oldName: string, newName?: string) => {\n  let message = `[Deprecation warning] ${file}: ${oldName} is deprecated`;\n  if (newName) {\n    message += `. Use ${newName} instead`;\n  }\n  const now = Date.now();\n  const last = history[message];\n  if (!last || now - last > 10000) {\n    console.warn(message);\n    history[message] = now;\n  }\n};\n"],"names":[],"mappings":";;;;;AAGA,MAAM,UAA4B,EAAC;AAE5B,MAAM,kBAAA,GAAqB,CAAC,IAAA,EAAc,OAAA,EAAiB,OAAA,KAAqB;AACrF,EAAA,IAAI,OAAA,GAAU,CAAA,sBAAA,EAAyB,IAAI,CAAA,EAAA,EAAK,OAAO,CAAA,cAAA,CAAA;AACvD,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,OAAA,IAAW,SAAS,OAAO,CAAA,QAAA,CAAA;AAAA,EAC7B;AACA,EAAA,MAAM,GAAA,GAAM,KAAK,GAAA,EAAI;AACrB,EAAA,MAAM,IAAA,GAAO,QAAQ,OAAO,CAAA;AAC5B,EAAA,IAAI,CAAC,IAAA,IAAQ,GAAA,GAAM,IAAA,GAAO,GAAA,EAAO;AAC/B,IAAA,OAAA,CAAQ,KAAK,OAAO,CAAA;AACpB,IAAA,OAAA,CAAQ,OAAO,CAAA,GAAI,GAAA;AAAA,EACrB;AACF;;;;"}