import{createPluginContext as t,resetState as e,isDisabled as n,flow as o,isMoveOrEndOrCancel as i,getStatusName as s,TYPE_END as r,TYPE_CANCEL as a}from"@any-touch/shared";import{ComputeVAndDir as c,ComputeDistance as h,ComputeDeltaXY as m}from"@any-touch/compute";const p={name:"pan",threshold:10,pointLength:1};function u(u,d){const f=t(p,d);return u.compute([c,h,m],(t=>{if(e(f),n(f))return;const c=function(){const{pointLength:e,distance:n}=t;return f.pointLength===e&&f.threshold<=n}();if(f.state=o(c,f.state,t.phase),c||i(f.state)){const{name:e}=f;u.emit2(e,t,f),u.emit2(e+s(f.state),t,f),![r,a].includes(t.phase)&&t.direction&&u.emit2(e+t.direction,t,f)}})),f}export{u as default}; //# sourceMappingURL=index.es.js.map