hunk.code_window:       ? getBoundingClientRect(offsetParent)
         : { left: 0, top: 0 };
     // We want all the scrolling containers only up to and including the
     // offsetParent
     const offsetScrollParentIndex = scrollParents.indexOf(offsetParent);
     const relevantScrollParents = scrollParents.slice(
       0,
       Math.max(0, scrollParents.indexOf(offsetParent)) + 1
     );
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep
hunk.file_path: src/dom-utils/getRectRelativeToOffsetParent.js
hunk.type: replace
file: // @flow
  import type { ModifierArguments, Modifier } from '../types';
  import computeOffsets from '../utils/computeOffsets';
  import getCommonTotalScroll from '../dom-utils/getCommonTotalScroll';
  import unwrapVirtualElement from '../dom-utils/unwrapVirtualElement';
  
  export function popperOffsets({ state, name }: ModifierArguments<{||}>) {
    // Offsets are the actual position the popper needs to have to be
    // properly positioned near its reference element
    // This is the most basic placement, and will be adjusted by
    // the modifiers in the next step
    state.modifiersData[name] = computeOffsets({
      reference: state.measures.reference,
      element: state.measures.popper,
      strategy: 'absolute',
      placement: state.placement,
      scroll: getCommonTotalScroll(
        unwrapVirtualElement(state.elements.reference),
        state.scrollParents.reference,
        state.scrollParents.popper
      ),
    });
  
    return state;
  }
  
  export default ({
    name: 'popperOffsets',
    enabled: true,
    phase: 'read',
    fn: popperOffsets,
    data: {},
  }: Modifier<{||}>);
  