import{c as t}from"./p-251a23b9.js";import{createGesture as o}from"./p-00d852d9.js";const r=(r,e,s,n,a)=>{const c=r.ownerDocument.defaultView;return o({el:r,gestureName:"goback-swipe",gesturePriority:40,threshold:10,canStart:t=>t.startX<=50&&e(),onStart:s,onMove:t=>{n(t.deltaX/c.innerWidth)},onEnd:o=>{const r=c.innerWidth,e=o.deltaX/r,s=o.velocityX,n=s>=0&&(s>.2||o.deltaX>r/2),i=(n?1-e:e)*r;let p=0;if(i>5){const t=i/Math.abs(s);p=Math.min(t,540)}a(n,e<=0?.01:t(0,e,.9999),p)}})};export{r as createSwipeBackGesture};