collectSourceAttributions_(frameState) {
    const layers = this.getMap().getAllLayers();
    const visibleAttributions = new Set(
      layers.flatMap((layer) => layer.getAttributions(frameState)),
    );
    if (this.attributions_ !== undefined) {
      Array.isArray(this.attributions_)
        ? this.attributions_.forEach((item) => visibleAttributions.add(item))
        : visibleAttributions.add(this.attributions_);
    }

    if (!this.overrideCollapsible_) {
      const collapsible = !layers.some(
        (layer) => layer.getSource()?.getAttributionsCollapsible() === false,
      );
      this.setCollapsible(collapsible);
    }
    return Array.from(visibleAttributions);
  }
Collect a list of visible attributions and set the collapsible state.
@param {import("../Map.js").FrameState} frameState Frame state.
@return {Array<string>} Attributions.
@private