/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @typechecks
 */

var getUnboundedScrollPosition_1;
var hasRequiredGetUnboundedScrollPosition;

function requireGetUnboundedScrollPosition () {
	if (hasRequiredGetUnboundedScrollPosition) return getUnboundedScrollPosition_1;
	hasRequiredGetUnboundedScrollPosition = 1;
	/**
	 * Gets the scroll position of the supplied element or window.
	 *
	 * The return values are unbounded, unlike `getScrollPosition`. This means they
	 * may be negative or exceed the element boundaries (which is possible using
	 * inertial scrolling).
	 *
	 * @param {DOMWindow|DOMElement} scrollable
	 * @return {object} Map with `x` and `y` keys.
	 */

	function getUnboundedScrollPosition(scrollable) {
	  if (scrollable.Window && scrollable instanceof scrollable.Window) {
	    return {
	      x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
	      y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
	    };
	  }

	  return {
	    x: scrollable.scrollLeft,
	    y: scrollable.scrollTop
	  };
	}

	getUnboundedScrollPosition_1 = getUnboundedScrollPosition;
	return getUnboundedScrollPosition_1;
}

export { requireGetUnboundedScrollPosition as __require };
//# sourceMappingURL=getUnboundedScrollPosition.js.map
