import type { FactItem, FactGroup, SplitData } from '../../types'; import FactFiscalCalculator from './FactFiscalCalculator'; /** * There are many facts properties for the same period but filed at different times. * This groups those together and resolves the period and trailing values for each group. */ export default class FactGrouper { private preferFirstValue; private createFactGroup; private createGroupKey; private toValue; /** * Map structure { 2022_Q3: { name: ... } }. NOTE: Does not include fiscal year report key. * All groups contain both trailing and period values, so use trailing from Q4 to get FY values. */ buildFactGroupsByReportKey(params: { facts: FactItem[]; splits?: SplitData[]; cik: number; fiscalCalculator: FactFiscalCalculator; resolvePeriodValues: boolean; generateMissingGroups?: boolean; }): { factGroupsByReportKey: Map; minYear: number; maxYear: number; }; }