/*! * (C) Ionic http://ionicframework.com - MIT License */ import{j as clamp}from"./helpers-da915de8.js";import{i as isRTL}from"./dir-babeabeb.js";import{createGesture}from"./index-39782642.js";import"./gesture-controller-314a54f6.js";var createSwipeBackGesture=function(r,a,e,t,n){var i=r.ownerDocument.defaultView;var o=isRTL(r);var v=function(r){var a=50;var e=r.startX;if(o){return e>=i.innerWidth-a}return e<=a};var u=function(r){return o?-r.deltaX:r.deltaX};var s=function(r){return o?-r.velocityX:r.velocityX};var c=function(e){o=isRTL(r);return v(e)&&a()};var f=function(r){var a=u(r);var e=a/i.innerWidth;t(e)};var p=function(r){var a=u(r);var e=i.innerWidth;var t=a/e;var o=s(r);var v=e/2;var c=o>=0&&(o>.2||a>v);var f=c?1-t:t;var p=f*e;var m=0;if(p>5){var l=p/Math.abs(o);m=Math.min(l,540)}n(c,t<=0?.01:clamp(0,t,.9999),m)};return createGesture({el:r,gestureName:"goback-swipe",gesturePriority:101,threshold:10,canStart:c,onStart:e,onMove:f,onEnd:p})};export{createSwipeBackGesture};