function n(n,o){function t(t){const e=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,c=e.left+i.pageXOffset,u=e.top+i.pageYOffset,p=t.pageX-c,m=t.pageY-u;o?.onMove&&o.onMove(p,m)}document.addEventListener("pointermove",t,{passive:!0}),document.addEventListener("pointerup",(function n(){document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n),o?.onStop&&o.onStop()})),o?.initialEvent instanceof PointerEvent&&t(o.initialEvent)}export{n as d};
