Загрузка данных


const splitIndicatorSnapshots = (panes: PaneSnapshot[]) => {
  const snapshots = panes.flatMap(({ id, indicators }) =>
    indicators.map((indicator) => ({
      ...indicator,
      paneId: id,
    })),
  );

  return {
    indicatorSnapshots: snapshots.filter(
      ({ indicatorType }) => indicatorType !== undefined,
    ),
    compareSnapshots: snapshots.filter(
      ({ indicatorType }) => indicatorType === undefined,
    ),
  };
};