{"version":3,"file":"hasDuplicateSeries.cjs","names":["hasDuplicateSeries","series","Set","map","chartSeries","name","size","length","exports"],"sources":["../../../../src/charts/utils/hasDuplicateSeries.ts"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { ChartSeries } from \"./chartTypes.js\";\n\nexport type HasDuplicateSeriesProps = {\n  series: ChartSeries[];\n};\n\n/**\n * Returns `true` when two or more series share one name.\n *\n * A chart uses the name of a series as its React key and as its legend label. When two series share one name, React drops one of them, and the chart draws fewer lines than the data holds.\n */\nexport const hasDuplicateSeries = ({ series }: HasDuplicateSeriesProps) =>\n  new Set(series.map((chartSeries) => chartSeries.name)).size !== series.length;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAaO,MAAMA,kBAAkB,GAAGA,CAAC;EAAEC;AAAgC,CAAC,KACpE,IAAIC,GAAG,CAACD,MAAM,CAACE,GAAG,CAAEC,WAAW,IAAKA,WAAW,CAACC,IAAI,CAAC,CAAC,CAACC,IAAI,KAAKL,MAAM,CAACM,MAAM;AAACC,OAAA,CAAAR,kBAAA,GAAAA,kBAAA","ignoreList":[]}