{"version":3,"sources":["chartist-plugin-legend.js"],"names":["root","factory","define","amd","chartist","returnExportsGlobal","exports","module","require","Chartist","this","defaultOptions","className","classNames","removeAll","legendNames","clickable","onClick","position","plugins","legend","options","compareNumbers","a","b","HTMLElement","Error","cachedDOMPosition","extend","chart","existingLegendElement","container","querySelector","parentNode","removeChild","newSeries","data","series","map","seriesIndex","value","alphaNumerate","legendElement","document","createElement","isPieChart","Pie","classList","add","length","width","style","cssText","removedSeries","originalSeries","slice","useLabels","labels","originalLabels","classNamesViable","Array","isArray","forEach","i","li","setAttribute","textContent","name","appendChild","on","insertBefore","childNodes","addEventListener","e","target","hasAttribute","preventDefault","parseInt","getAttribute","removedSeriesIndex","indexOf","splice","remove","push","prototype","call","item","seriesCopy","labelsCopy","sort","reverse","update"],"mappings":"CAAC,SAAUA,EAAMC,GACS,mBAAXC,QAAyBA,OAAOC,IAEvCD,QAAQ,YAAa,SAAUE,GAC3B,OAAQJ,EAAKK,oBAAsBJ,EAAQG,KAErB,iBAAZE,QAIdC,OAAOD,QAAUL,EAAQO,QAAQ,aAEjCR,EAAK,2BAA6BC,EAAQD,EAAKS,WAErDC,KAAM,SAAUD,GAKd,aAEA,IAAIE,GACAC,UAAW,GACXC,YAAY,EACZC,WAAW,EACXC,aAAa,EACbC,WAAW,EACXC,QAAS,KACTC,SAAU,OA0Ld,OAvLAT,EAASU,QAAUV,EAASU,YAE5BV,EAASU,QAAQC,OAAS,SAAUC,GAEhC,SAASC,EAAeC,EAAGC,GACvB,OAAOD,EAAIC,EAIf,GAAIH,GAAWA,EAAQH,SAAU,CAC9B,KAA2B,QAArBG,EAAQH,UAA2C,WAArBG,EAAQH,UAAyBG,EAAQH,oBAAoBO,aAC9F,MAAMC,MAAM,oDAEf,GAAGL,EAAQH,oBAAoBO,YAAY,CAExC,IAAIE,EAAoBN,EAAQH,gBACzBG,EAAQH,UAWrB,OAPAG,EAAUZ,EAASmB,UAAWjB,EAAgBU,GAE3CM,IAECN,EAAQH,SAAWS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