import*as e from"../utils/domUtils.prod.js";const t={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search(e){for(const n of t.methodOrder){const i=t[n](e);if(i)return i}return null},simulationResume({pointerType:t,eventType:n,eventTarget:i,scope:r}){if(!/down|start/i.test(n))return null;for(const n of r.interactions.list){let r=i;if(n.simulation&&n.simulation.allowResume&&n.pointerType===t)for(;r;){if(r===n.element)return n;r=e.parentNode(r)}}return null},mouseOrPen({pointerId:e,pointerType:t,eventType:i,scope:r}){if("mouse"!==t&&"pen"!==t)return null;let o;for(const i of r.interactions.list)if(i.pointerType===t){if(i.simulation&&!n(i,e))continue;if(i.interacting())return i;o||(o=i)}if(o)return o;for(const e of r.interactions.list)if(!(e.pointerType!==t||/down/i.test(i)&&e.simulation))return e;return null},hasPointer({pointerId:e,scope:t}){for(const i of t.interactions.list)if(n(i,e))return i;return null},idle({pointerType:e,scope:t}){for(const n of t.interactions.list){if(1===n.pointers.length){const e=n.interactable;if(e&&(!e.options.gesture||!e.options.gesture.enabled))continue}else if(n.pointers.length>=2)continue;if(!n.interacting()&&e===n.pointerType)return n}return null}};function n(e,t){return e.pointers.some((({id:e})=>e===t))}export default t;
//# sourceMappingURL=interactionFinder.prod.js.map