import { U as p } from "./UserAgent_DEPRECATED.mjs";
import { i as t } from "./isEventSupported.mjs";
var d = p, h = t, f = 10, o = 40, s = 800;
function E(i) {
  var r = 0, l = 0, e = 0, a = 0;
  return "detail" in i && (l = i.detail), "wheelDelta" in i && (l = -i.wheelDelta / 120), "wheelDeltaY" in i && (l = -i.wheelDeltaY / 120), "wheelDeltaX" in i && (r = -i.wheelDeltaX / 120), "axis" in i && i.axis === i.HORIZONTAL_AXIS && (r = l, l = 0), e = r * f, a = l * f, "deltaY" in i && (a = i.deltaY), "deltaX" in i && (e = i.deltaX), (e || a) && i.deltaMode && (i.deltaMode == 1 ? (e *= o, a *= o) : (e *= s, a *= s)), e && !r && (r = e < 1 ? -1 : 1), a && !l && (l = a < 1 ? -1 : 1), {
    spinX: r,
    spinY: l,
    pixelX: e,
    pixelY: a
  };
}
E.getEventType = function() {
  return d.firefox() ? "DOMMouseScroll" : h("wheel") ? "wheel" : "mousewheel";
};
var w = E;
export {
  w as n
};
