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AC9BP,EAAcW,EAAU,EAEpBvD,EAAStG,IAEb,MAAM4J,EAAQF,EAAU1J,GAClB8J,EAAQV,EAAIK,WACZI,EAAYD,EAAQE,EACpBC,EAAWJ,EAAa3J,GACxBgK,EAAIF,EAAQ,EACZG,EAAiBF,GAAY,IAAMA,EAAW,IAAOH,EAAQI,GAC7DE,EAAUD,EAAiB,EAAIJ,EAAYA,EAC3CM,EAAkBD,EAAUJ,EAClC,IAAIM,EAAU,EACd,GAAID,EAAkB,EAAG,CACvB,MAAME,EAAMF,EAAkBzK,KAAK4K,IAAIP,GACvCK,EAAU1K,KAAK6K,IAAIF,EAAK,IAC1B,CACAlB,EAAac,EAAgBJ,GAAa,EAAI,KAAO,OAAM,EAAGA,EAAW,OAASO,EAAQ,EAE5F,OAAOhM,EAAc,CACnBuD,KACA1C,YAAa,eACbkH,gBAAiB,GACjBtB,UAAW,GACX1F,WACAkH,QAAS4C,EACTzC,SACAF,SACA,C","sources":["webpack://winpos-weborder/./node_modules/@ionic/core/components/gesture-controller.js","webpack://winpos-weborder/./node_modules/@ionic/core/components/index2.js","webpack://winpos-weborder/./node_modules/@ionic/core/components/swipe-back.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nclass GestureController {\n constructor() {\n this.gestureId = 0;\n this.requestedStart = new Map();\n this.disabledGestures = new Map();\n this.disabledScroll = new Set();\n }\n /**\n * Creates a gesture delegate based on the GestureConfig passed\n */\n createGesture(config) {\n var _a;\n return new GestureDelegate(this, this.newID(), config.name, (_a = config.priority) !== null && _a !== void 0 ? _a : 0, !!config.disableScroll);\n }\n /**\n * Creates a blocker that will block any other gesture events from firing. Set in the ion-gesture component.\n */\n createBlocker(opts = {}) {\n return new BlockerDelegate(this, this.newID(), opts.disable, !!opts.disableScroll);\n }\n start(gestureName, id, priority) {\n if (!this.canStart(gestureName)) {\n this.requestedStart.delete(id);\n return false;\n }\n this.requestedStart.set(id, priority);\n return true;\n }\n capture(gestureName, id, priority) {\n if (!this.start(gestureName, id, priority)) {\n return false;\n }\n const requestedStart = this.requestedStart;\n let maxPriority = -10000;\n requestedStart.forEach((value) => {\n maxPriority = Math.max(maxPriority, value);\n });\n if (maxPriority === priority) {\n this.capturedId = id;\n requestedStart.clear();\n const event = new CustomEvent('ionGestureCaptured', { detail: { gestureName } });\n document.dispatchEvent(event);\n return true;\n }\n requestedStart.delete(id);\n return false;\n }\n release(id) {\n this.requestedStart.delete(id);\n if (this.capturedId === id) {\n this.capturedId = undefined;\n }\n }\n disableGesture(gestureName, id) {\n let set = this.disabledGestures.get(gestureName);\n if (set === undefined) {\n set = new Set();\n this.disabledGestures.set(gestureName, set);\n }\n set.add(id);\n }\n enableGesture(gestureName, id) {\n const set = this.disabledGestures.get(gestureName);\n if (set !== undefined) {\n set.delete(id);\n }\n }\n disableScroll(id) {\n this.disabledScroll.add(id);\n if (this.disabledScroll.size === 1) {\n document.body.classList.add(BACKDROP_NO_SCROLL);\n }\n }\n enableScroll(id) {\n this.disabledScroll.delete(id);\n if (this.disabledScroll.size === 0) {\n document.body.classList.remove(BACKDROP_NO_SCROLL);\n }\n }\n canStart(gestureName) {\n if (this.capturedId !== undefined) {\n // a gesture already captured\n return false;\n }\n if (this.isDisabled(gestureName)) {\n return false;\n }\n return true;\n }\n isCaptured() {\n return this.capturedId !== undefined;\n }\n isScrollDisabled() {\n return this.disabledScroll.size > 0;\n }\n isDisabled(gestureName) {\n const disabled = this.disabledGestures.get(gestureName);\n if (disabled && disabled.size > 0) {\n return true;\n }\n return false;\n }\n newID() {\n this.gestureId++;\n return this.gestureId;\n }\n}\nclass GestureDelegate {\n constructor(ctrl, id, name, priority, disableScroll) {\n this.id = id;\n this.name = name;\n this.disableScroll = disableScroll;\n this.priority = priority * 1000000 + id;\n this.ctrl = ctrl;\n }\n canStart() {\n if (!this.ctrl) {\n return false;\n }\n return this.ctrl.canStart(this.name);\n }\n start() {\n if (!this.ctrl) {\n return false;\n }\n return this.ctrl.start(this.name, this.id, this.priority);\n }\n capture() {\n if (!this.ctrl) {\n return false;\n }\n const captured = this.ctrl.capture(this.name, this.id, this.priority);\n if (captured && this.disableScroll) {\n this.ctrl.disableScroll(this.id);\n }\n return captured;\n }\n release() {\n if (this.ctrl) {\n this.ctrl.release(this.id);\n if (this.disableScroll) {\n this.ctrl.enableScroll(this.id);\n }\n }\n }\n destroy() {\n this.release();\n this.ctrl = undefined;\n }\n}\nclass BlockerDelegate {\n constructor(ctrl, id, disable, disableScroll) {\n this.id = id;\n this.disable = disable;\n this.disableScroll = disableScroll;\n this.ctrl = ctrl;\n }\n block() {\n if (!this.ctrl) {\n return;\n }\n if (this.disable) {\n for (const gesture of this.disable) {\n this.ctrl.disableGesture(gesture, this.id);\n }\n }\n if (this.disableScroll) {\n this.ctrl.disableScroll(this.id);\n }\n }\n unblock() {\n if (!this.ctrl) {\n return;\n }\n if (this.disable) {\n for (const gesture of this.disable) {\n this.ctrl.enableGesture(gesture, this.id);\n }\n }\n if (this.disableScroll) {\n this.ctrl.enableScroll(this.id);\n }\n }\n destroy() {\n this.unblock();\n this.ctrl = undefined;\n }\n}\nconst BACKDROP_NO_SCROLL = 'backdrop-no-scroll';\nconst GESTURE_CONTROLLER = new GestureController();\n\nexport { GESTURE_CONTROLLER as G };\n","/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { G as GESTURE_CONTROLLER } from './gesture-controller.js';\nexport { G as GESTURE_CONTROLLER } from './gesture-controller.js';\n\nconst addEventListener = (el, // TODO(FW-2832): type\neventName, callback, opts) => {\n // use event listener options when supported\n // otherwise it's just a boolean for the \"capture\" arg\n const listenerOpts = supportsPassive(el)\n ? {\n capture: !!opts.capture,\n passive: !!opts.passive,\n }\n : !!opts.capture;\n let add;\n let remove;\n if (el['__zone_symbol__addEventListener']) {\n add = '__zone_symbol__addEventListener';\n remove = '__zone_symbol__removeEventListener';\n }\n else {\n add = 'addEventListener';\n remove = 'removeEventListener';\n }\n el[add](eventName, callback, listenerOpts);\n return () => {\n el[remove](eventName, callback, listenerOpts);\n };\n};\nconst supportsPassive = (node) => {\n if (_sPassive === undefined) {\n try {\n const opts = Object.defineProperty({}, 'passive', {\n get: () => {\n _sPassive = true;\n },\n });\n node.addEventListener('optsTest', () => {\n return;\n }, opts);\n }\n catch (e) {\n _sPassive = false;\n }\n }\n return !!_sPassive;\n};\nlet _sPassive;\n\nconst MOUSE_WAIT = 2000;\n// TODO(FW-2832): types\nconst createPointerEvents = (el, pointerDown, pointerMove, pointerUp, options) => {\n let rmTouchStart;\n let rmTouchMove;\n let rmTouchEnd;\n let rmTouchCancel;\n let rmMouseStart;\n let rmMouseMove;\n let rmMouseUp;\n let lastTouchEvent = 0;\n const handleTouchStart = (ev) => {\n lastTouchEvent = Date.now() + MOUSE_WAIT;\n if (!pointerDown(ev)) {\n return;\n }\n if (!rmTouchMove && pointerMove) {\n rmTouchMove = addEventListener(el, 'touchmove', pointerMove, options);\n }\n /**\n * Events are dispatched on the element that is tapped and bubble up to\n * the reference element in the gesture. In the event that the element this\n * event was first dispatched on is removed from the DOM, the event will no\n * longer bubble up to our reference element. This leaves the gesture in an\n * unusable state. To account for this, the touchend and touchcancel listeners\n * should be added to the event target so that they still fire even if the target\n * is removed from the DOM.\n */\n if (!rmTouchEnd) {\n rmTouchEnd = addEventListener(ev.target, 'touchend', handleTouchEnd, options);\n }\n if (!rmTouchCancel) {\n rmTouchCancel = addEventListener(ev.target, 'touchcancel', handleTouchEnd, options);\n }\n };\n const handleMouseDown = (ev) => {\n if (lastTouchEvent > Date.now()) {\n return;\n }\n if (!pointerDown(ev)) {\n return;\n }\n if (!rmMouseMove && pointerMove) {\n rmMouseMove = addEventListener(getDocument(el), 'mousemove', pointerMove, options);\n }\n if (!rmMouseUp) {\n rmMouseUp = addEventListener(getDocument(el), 'mouseup', handleMouseUp, options);\n }\n };\n const handleTouchEnd = (ev) => {\n stopTouch();\n if (pointerUp) {\n pointerUp(ev);\n }\n };\n const handleMouseUp = (ev) => {\n stopMouse();\n if (pointerUp) {\n pointerUp(ev);\n }\n };\n const stopTouch = () => {\n if (rmTouchMove) {\n rmTouchMove();\n }\n if (rmTouchEnd) {\n rmTouchEnd();\n }\n if (rmTouchCancel) {\n rmTouchCancel();\n }\n rmTouchMove = rmTouchEnd = rmTouchCancel = undefined;\n };\n const stopMouse = () => {\n if (rmMouseMove) {\n rmMouseMove();\n }\n if (rmMouseUp) {\n rmMouseUp();\n }\n rmMouseMove = rmMouseUp = undefined;\n };\n const stop = () => {\n stopTouch();\n stopMouse();\n };\n const enable = (isEnabled = true) => {\n if (!isEnabled) {\n if (rmTouchStart) {\n rmTouchStart();\n }\n if (rmMouseStart) {\n rmMouseStart();\n }\n rmTouchStart = rmMouseStart = undefined;\n stop();\n }\n else {\n if (!rmTouchStart) {\n rmTouchStart = addEventListener(el, 'touchstart', handleTouchStart, options);\n }\n if (!rmMouseStart) {\n rmMouseStart = addEventListener(el, 'mousedown', handleMouseDown, options);\n }\n }\n };\n const destroy = () => {\n enable(false);\n pointerUp = pointerMove = pointerDown = undefined;\n };\n return {\n enable,\n stop,\n destroy,\n };\n};\nconst getDocument = (node) => {\n return node instanceof Document ? node : node.ownerDocument;\n};\n\nconst createPanRecognizer = (direction, thresh, maxAngle) => {\n const radians = maxAngle * (Math.PI / 180);\n const isDirX = direction === 'x';\n const maxCosine = Math.cos(radians);\n const threshold = thresh * thresh;\n let startX = 0;\n let startY = 0;\n let dirty = false;\n let isPan = 0;\n return {\n start(x, y) {\n startX = x;\n startY = y;\n isPan = 0;\n dirty = true;\n },\n detect(x, y) {\n if (!dirty) {\n return false;\n }\n const deltaX = x - startX;\n const deltaY = y - startY;\n const distance = deltaX * deltaX + deltaY * deltaY;\n if (distance < threshold) {\n return false;\n }\n const hypotenuse = Math.sqrt(distance);\n const cosine = (isDirX ? deltaX : deltaY) / hypotenuse;\n if (cosine > maxCosine) {\n isPan = 1;\n }\n else if (cosine < -maxCosine) {\n isPan = -1;\n }\n else {\n isPan = 0;\n }\n dirty = false;\n return true;\n },\n isGesture() {\n return isPan !== 0;\n },\n getDirection() {\n return isPan;\n },\n };\n};\n\n// TODO(FW-2832): types\nconst createGesture = (config) => {\n let hasCapturedPan = false;\n let hasStartedPan = false;\n let hasFiredStart = true;\n let isMoveQueued = false;\n const finalConfig = Object.assign({ disableScroll: false, direction: 'x', gesturePriority: 0, passive: true, maxAngle: 40, threshold: 10 }, config);\n const canStart = finalConfig.canStart;\n const onWillStart = finalConfig.onWillStart;\n const onStart = finalConfig.onStart;\n const onEnd = finalConfig.onEnd;\n const notCaptured = finalConfig.notCaptured;\n const onMove = finalConfig.onMove;\n const threshold = finalConfig.threshold;\n const passive = finalConfig.passive;\n const blurOnStart = finalConfig.blurOnStart;\n const detail = {\n type: 'pan',\n startX: 0,\n startY: 0,\n startTime: 0,\n currentX: 0,\n currentY: 0,\n velocityX: 0,\n velocityY: 0,\n deltaX: 0,\n deltaY: 0,\n currentTime: 0,\n event: undefined,\n data: undefined,\n };\n const pan = createPanRecognizer(finalConfig.direction, finalConfig.threshold, finalConfig.maxAngle);\n const gesture = GESTURE_CONTROLLER.createGesture({\n name: config.gestureName,\n priority: config.gesturePriority,\n disableScroll: config.disableScroll,\n });\n const pointerDown = (ev) => {\n const timeStamp = now(ev);\n if (hasStartedPan || !hasFiredStart) {\n return false;\n }\n updateDetail(ev, detail);\n detail.startX = detail.currentX;\n detail.startY = detail.currentY;\n detail.startTime = detail.currentTime = timeStamp;\n detail.velocityX = detail.velocityY = detail.deltaX = detail.deltaY = 0;\n detail.event = ev;\n // Check if gesture can start\n if (canStart && canStart(detail) === false) {\n return false;\n }\n // Release fallback\n gesture.release();\n // Start gesture\n if (!gesture.start()) {\n return false;\n }\n hasStartedPan = true;\n if (threshold === 0) {\n return tryToCapturePan();\n }\n pan.start(detail.startX, detail.startY);\n return true;\n };\n const pointerMove = (ev) => {\n // fast path, if gesture is currently captured\n // do minimum job to get user-land even dispatched\n if (hasCapturedPan) {\n if (!isMoveQueued && hasFiredStart) {\n isMoveQueued = true;\n calcGestureData(detail, ev);\n requestAnimationFrame(fireOnMove);\n }\n return;\n }\n // gesture is currently being detected\n calcGestureData(detail, ev);\n if (pan.detect(detail.currentX, detail.currentY)) {\n if (!pan.isGesture() || !tryToCapturePan()) {\n abortGesture();\n }\n }\n };\n const fireOnMove = () => {\n // Since fireOnMove is called inside a RAF, onEnd() might be called,\n // we must double check hasCapturedPan\n if (!hasCapturedPan) {\n return;\n }\n isMoveQueued = false;\n if (onMove) {\n onMove(detail);\n }\n };\n const tryToCapturePan = () => {\n if (!gesture.capture()) {\n return false;\n }\n hasCapturedPan = true;\n hasFiredStart = false;\n // reset start position since the real user-land event starts here\n // If the pan detector threshold is big, not resetting the start position\n // will cause a jump in the animation equal to the detector threshold.\n // the array of positions used to calculate the gesture velocity does not\n // need to be cleaned, more points in the positions array always results in a\n // more accurate value of the velocity.\n detail.startX = detail.currentX;\n detail.startY = detail.currentY;\n detail.startTime = detail.currentTime;\n if (onWillStart) {\n onWillStart(detail).then(fireOnStart);\n }\n else {\n fireOnStart();\n }\n return true;\n };\n const blurActiveElement = () => {\n if (typeof document !== 'undefined') {\n const activeElement = document.activeElement;\n if (activeElement === null || activeElement === void 0 ? void 0 : activeElement.blur) {\n activeElement.blur();\n }\n }\n };\n const fireOnStart = () => {\n if (blurOnStart) {\n blurActiveElement();\n }\n if (onStart) {\n onStart(detail);\n }\n hasFiredStart = true;\n };\n const reset = () => {\n hasCapturedPan = false;\n hasStartedPan = false;\n isMoveQueued = false;\n hasFiredStart = true;\n gesture.release();\n };\n // END *************************\n const pointerUp = (ev) => {\n const tmpHasCaptured = hasCapturedPan;\n const tmpHasFiredStart = hasFiredStart;\n reset();\n if (!tmpHasFiredStart) {\n return;\n }\n calcGestureData(detail, ev);\n // Try to capture press\n if (tmpHasCaptured) {\n if (onEnd) {\n onEnd(detail);\n }\n return;\n }\n // Not captured any event\n if (notCaptured) {\n notCaptured(detail);\n }\n };\n const pointerEvents = createPointerEvents(finalConfig.el, pointerDown, pointerMove, pointerUp, {\n capture: false,\n passive,\n });\n const abortGesture = () => {\n reset();\n pointerEvents.stop();\n if (notCaptured) {\n notCaptured(detail);\n }\n };\n return {\n enable(enable = true) {\n if (!enable) {\n if (hasCapturedPan) {\n pointerUp(undefined);\n }\n reset();\n }\n pointerEvents.enable(enable);\n },\n destroy() {\n gesture.destroy();\n pointerEvents.destroy();\n },\n };\n};\nconst calcGestureData = (detail, ev) => {\n if (!ev) {\n return;\n }\n const prevX = detail.currentX;\n const prevY = detail.currentY;\n const prevT = detail.currentTime;\n updateDetail(ev, detail);\n const currentX = detail.currentX;\n const currentY = detail.currentY;\n const timestamp = (detail.currentTime = now(ev));\n const timeDelta = timestamp - prevT;\n if (timeDelta > 0 && timeDelta < 100) {\n const velocityX = (currentX - prevX) / timeDelta;\n const velocityY = (currentY - prevY) / timeDelta;\n detail.velocityX = velocityX * 0.7 + detail.velocityX * 0.3;\n detail.velocityY = velocityY * 0.7 + detail.velocityY * 0.3;\n }\n detail.deltaX = currentX - detail.startX;\n detail.deltaY = currentY - detail.startY;\n detail.event = ev;\n};\nconst updateDetail = (ev, detail) => {\n // get X coordinates for either a mouse click\n // or a touch depending on the given event\n let x = 0;\n let y = 0;\n if (ev) {\n const changedTouches = ev.changedTouches;\n if (changedTouches && changedTouches.length > 0) {\n const touch = changedTouches[0];\n x = touch.clientX;\n y = touch.clientY;\n }\n else if (ev.pageX !== undefined) {\n x = ev.pageX;\n y = ev.pageY;\n }\n }\n detail.currentX = x;\n detail.currentY = y;\n};\nconst now = (ev) => {\n return ev.timeStamp || Date.now();\n};\n\nexport { createGesture };\n","/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { h as clamp } from './helpers.js';\nimport { i as isRTL } from './dir.js';\nimport { createGesture } from './index2.js';\n\nconst createSwipeBackGesture = (el, canStartHandler, onStartHandler, onMoveHandler, onEndHandler) => {\n const win = el.ownerDocument.defaultView;\n const rtl = isRTL(el);\n /**\n * Determine if a gesture is near the edge\n * of the screen. If true, then the swipe\n * to go back gesture should proceed.\n */\n const isAtEdge = (detail) => {\n const threshold = 50;\n const { startX } = detail;\n if (rtl) {\n return startX >= win.innerWidth - threshold;\n }\n return startX <= threshold;\n };\n const getDeltaX = (detail) => {\n return rtl ? -detail.deltaX : detail.deltaX;\n };\n const getVelocityX = (detail) => {\n return rtl ? -detail.velocityX : detail.velocityX;\n };\n const canStart = (detail) => {\n return isAtEdge(detail) && canStartHandler();\n };\n const onMove = (detail) => {\n // set the transition animation's progress\n const delta = getDeltaX(detail);\n const stepValue = delta / win.innerWidth;\n onMoveHandler(stepValue);\n };\n const onEnd = (detail) => {\n // the swipe back gesture has ended\n const delta = getDeltaX(detail);\n const width = win.innerWidth;\n const stepValue = delta / width;\n const velocity = getVelocityX(detail);\n const z = width / 2.0;\n const shouldComplete = velocity >= 0 && (velocity > 0.2 || delta > z);\n const missing = shouldComplete ? 1 - stepValue : stepValue;\n const missingDistance = missing * width;\n let realDur = 0;\n if (missingDistance > 5) {\n const dur = missingDistance / Math.abs(velocity);\n realDur = Math.min(dur, 540);\n }\n onEndHandler(shouldComplete, stepValue <= 0 ? 0.01 : clamp(0, stepValue, 0.9999), realDur);\n };\n return createGesture({\n el,\n gestureName: 'goback-swipe',\n gesturePriority: 40,\n threshold: 10,\n canStart,\n onStart: onStartHandler,\n onMove,\n onEnd,\n });\n};\n\nexport { createSwipeBackGesture };\n"],"names":["GestureController","constructor","this","gestureId","requestedStart","Map","disabledGestures","disabledScroll","Set","createGesture","config","_a","GestureDelegate","newID","name","priority","disableScroll","createBlocker","opts","BlockerDelegate","disable","start","gestureName","id","canStart","set","delete","capture","maxPriority","forEach","value","Math","max","capturedId","clear","event","CustomEvent","detail","document","dispatchEvent","release","undefined","disableGesture","get","add","enableGesture","size","body","classList","BACKDROP_NO_SCROLL","enableScroll","remove","isDisabled","isCaptured","isScrollDisabled","disabled","ctrl","captured","destroy","block","gesture","unblock","GESTURE_CONTROLLER","addEventListener","el","eventName","callback","listenerOpts","supportsPassive","passive","node","_sPassive","Object","defineProperty","e","MOUSE_WAIT","createPointerEvents","pointerDown","pointerMove","pointerUp","options","rmTouchStart","rmTouchMove","rmTouchEnd","rmTouchCancel","rmMouseStart","rmMouseMove","rmMouseUp","lastTouchEvent","handleTouchStart","ev","Date","now","target","handleTouchEnd","handleMouseDown","getDocument","handleMouseUp","stopTouch","stopMouse","stop","enable","isEnabled","Document","ownerDocument","createPanRecognizer","direction","thresh","maxAngle","radians","PI","isDirX","maxCosine","cos","threshold","startX","startY","dirty","isPan","x","y","detect","deltaX","deltaY","distance","hypotenuse","sqrt","cosine","isGesture","getDirection","hasCapturedPan","hasStartedPan","hasFiredStart","isMoveQueued","finalConfig","assign","gesturePriority","onWillStart","onStart","onEnd","notCaptured","onMove","blurOnStart","type","startTime","currentX","currentY","velocityX","velocityY","currentTime","data","pan","timeStamp","updateDetail","tryToCapturePan","calcGestureData","requestAnimationFrame","fireOnMove","abortGesture","then","fireOnStart","blurActiveElement","activeElement","blur","reset","tmpHasCaptured","tmpHasFiredStart","pointerEvents","prevX","prevY","prevT","timestamp","timeDelta","changedTouches","length","touch","clientX","clientY","pageX","pageY","createSwipeBackGesture","canStartHandler","onStartHandler","onMoveHandler","onEndHandler","win","defaultView","rtl","i","isAtEdge","innerWidth","getDeltaX","getVelocityX","delta","stepValue","width","velocity","z","shouldComplete","missing","missingDistance","realDur","dur","abs","min"],"sourceRoot":""}