const t = (f, n) => f && f.reduce((i, r) => {
  let s = "default";
  n && n.find((e) => e.name === "series") && (s = r[n.find((e) => e.name === "series").name], delete r[n.find((e) => e.name === "series").name]);
  const d = i.find((e) => e.key === s);
  return d ? d.data.push(r) : i.push({ key: s, data: [r] }), i;
}, []);
export {
  t as groupData
};
