{"version":3,"sources":["webpack:///./node_modules/@ionic/core/dist/esm-es5/swipe-back-35ad8e37.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wEAAa;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACkC","file":"1.js","sourcesContent":["import { createGesture } from './index-624eea58.js';\nvar createSwipeBackGesture = function (el, canStartHandler, onStartHandler, onMoveHandler, onEndHandler) {\n var win = el.ownerDocument.defaultView;\n var canStart = function (detail) {\n return detail.startX <= 50 && canStartHandler();\n };\n var onMove = function (detail) {\n // set the transition animation's progress\n var delta = detail.deltaX;\n var stepValue = delta / win.innerWidth;\n onMoveHandler(stepValue);\n };\n var onEnd = function (detail) {\n // the swipe back gesture has ended\n var delta = detail.deltaX;\n var width = win.innerWidth;\n var stepValue = delta / width;\n var velocity = detail.velocityX;\n var z = width / 2.0;\n var shouldComplete = velocity >= 0 && (velocity > 0.2 || detail.deltaX > z);\n var missing = shouldComplete ? 1 - stepValue : stepValue;\n var missingDistance = missing * width;\n var realDur = 0;\n if (missingDistance > 5) {\n var dur = missingDistance / Math.abs(velocity);\n realDur = Math.min(dur, 540);\n }\n /**\n * TODO: stepValue can sometimes return a negative\n * value, but you can't have a negative time value\n * for the cubic bezier curve (at least with web animations)\n * Not sure if the negative step value is an error or not\n */\n onEndHandler(shouldComplete, (stepValue <= 0) ? 0.01 : stepValue, realDur);\n };\n return createGesture({\n el: el,\n gestureName: 'goback-swipe',\n gesturePriority: 40,\n threshold: 10,\n canStart: canStart,\n onStart: onStartHandler,\n onMove: onMove,\n onEnd: onEnd\n });\n};\nexport { createSwipeBackGesture };\n"],"sourceRoot":""}