import{isBrowser as o}from"./dom.js";function e(o){return!!o.touches}var n={pageX:0,pageY:0};function t(o,e){void 0===e&&(e="page");var t=o.touches[0]||o.changedTouches[0]||n;return{x:t[e+"X"],y:t[e+"Y"]}}function r(o,e){return void 0===e&&(e="page"),{x:o[e+"X"],y:o[e+"Y"]}}function u(o,n){return void 0===n&&(n="page"),{point:e(o)?t(o,n):r(o,n)}}var i=function(o,e){void 0===e&&(e=!1);var n,t=e=>o(e,u(e));return e?(n=t,o=>{var e=o instanceof MouseEvent;(!e||e&&0===o.button)&&n(o)}):t},c={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},p={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function a(e){return o&&null===window.onpointerdown?e:o&&null===window.ontouchstart?p[e]:o&&null===window.onmousedown?c[e]:e}export{u as extractEventInfo,a as getPointerEventName,e as isTouchEvent,i as wrapPointerEventHandler};
//# sourceMappingURL=pointer-event.js.map
