{"version":3,"sources":["../node_modules/@ionic/core/dist/esm-es5/tap-click-8339ee48.js"],"names":["startTapClick","config","scrollingEl","activatableEle","activeRipple","activeDefer","lastTouch","MOUSE_WAIT","lastActivated","useRippleEffect","getBoolean","clearDefers","WeakMap","onTouchEnd","ev","now","pointerUp","cancelActive","clearTimeout","undefined","removeActivated","pointerDown","parentElement","setActivatedElement","getActivatableTarget","el","_a","pointerCoord","x","y","has","Error","classList","contains","ACTIVATED","addActivated","deferId","get","delete","delay","isInstant","ADD_ACTIVATED_DEFERS","remove","setTimeout","Date","add","rippleEffect","getRippleEffect","addRipple","removeRipple","then","smooth","active","time","CLEAR_STATE_DEFERS","set","doc","document","addEventListener","target","t","composedPath","closest","path","i","length","shadowRoot","ripple","querySelector"],"mappings":"wGAAA,iEACIA,EAAgB,SAAUC,GAC1B,IAEIC,EACAC,EACAC,EACAC,EALAC,EAA0B,IAAbC,EACbC,EAAgB,EAKhBC,EAAkBR,EAAOS,WAAW,YAAY,IAAST,EAAOS,WAAW,gBAAgB,GAC3FC,EAAc,IAAIC,QASlBC,EAAa,SAAUC,GACvBR,EAAYS,YAAID,GAChBE,EAAUF,IAcVG,EAAe,WACfC,aAAab,GACbA,OAAcc,EACVhB,IACAiB,GAAgB,GAChBjB,OAAiBgB,IAGrBE,EAAc,SAAUP,GACpBX,QAhCmBgB,IAAhBjB,GAA2D,OAA9BA,EAAYoB,gBAmChDpB,OAAciB,EACdI,EAAoBC,EAAqBV,GAAKA,KAE9CE,EAAY,SAAUF,GACtBS,OAAoBJ,EAAWL,IAE/BS,EAAsB,SAAUE,EAAIX,GAEpC,IAAIW,GAAMA,IAAOtB,EAAjB,CAGAe,aAAab,GACbA,OAAcc,EACd,IAAIO,EAAKC,YAAab,GAAKc,EAAIF,EAAGE,EAAGC,EAAIH,EAAGG,EAE5C,GAAI1B,EAAgB,CAChB,GAAIQ,EAAYmB,IAAI3B,GAChB,MAAM,IAAI4B,MAAM,kBAEf5B,EAAe6B,UAAUC,SAAS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AAIE,iBAAiB,WAAY7C,GAAY,GAC7C2C,EAAIE,iBAAiB,aA7GH,SAAU5C,GACxB,IAAI8C,EAAI7C,YAAID,GAAMP,EACdD,EAAYsD,GACZvC,EAAYP,MA0G2B,GAC/C0C,EAAIE,iBAAiB,WAxGL,SAAU5C,GACtB,IAAI8C,EAAI7C,YAAID,GAAMP,EACdD,EAAYsD,GACZ5C,EAAUF,MAqGyB,IAE3CU,EAAuB,SAAUV,GACjC,IAAIA,EAAG+C,aAUH,OAAO/C,EAAG6C,OAAOG,QAAQ,oBARzB,IADA,IAAIC,EAAOjD,EAAG+C,eACLG,EAAI,EAAGA,EAAID,EAAKE,OAAS,EAAGD,IAAK,CACtC,IAAIvC,EAAKsC,EAAKC,GACd,GAAIvC,EAAGO,WAAaP,EAAGO,UAAUC,SAAS,mBACtC,OAAOR,IAQnBe,EAAY,SAAUf,GACtB,OAAOA,EAAGO,UAAUC,SAAS,4BAE7Bc,EAAkB,SAAUtB,GAC5B,GAAIA,EAAGyC,WAAY,CACf,IAAIC,EAAS1C,EAAGyC,WAAWE,cAAc,qBACzC,GAAID,EACA,OAAOA,EAGf,OAAO1C,EAAG2C,cAAc,sBAExBlC,EAAY,gBACZO,EAAuB,IACvBa,EAAqB,IACrB/C,EAAa","file":"static/js/6.6c30b866.chunk.js","sourcesContent":["import { n as now, p as pointerCoord } from './helpers-d8b49b57.js';\nvar startTapClick = function (config) {\n var lastTouch = -MOUSE_WAIT * 10;\n var lastActivated = 0;\n var scrollingEl;\n var activatableEle;\n var activeRipple;\n var activeDefer;\n var useRippleEffect = config.getBoolean('animated', true) && config.getBoolean('rippleEffect', true);\n var clearDefers = new WeakMap();\n var isScrolling = function () {\n return scrollingEl !== undefined && scrollingEl.parentElement !== null;\n };\n // Touch Events\n var onTouchStart = function (ev) {\n lastTouch = now(ev);\n pointerDown(ev);\n };\n var onTouchEnd = function (ev) {\n lastTouch = now(ev);\n pointerUp(ev);\n };\n var onMouseDown = function (ev) {\n var t = now(ev) - MOUSE_WAIT;\n if (lastTouch < t) {\n pointerDown(ev);\n }\n };\n var onMouseUp = function (ev) {\n var t = now(ev) - MOUSE_WAIT;\n if (lastTouch < t) {\n pointerUp(ev);\n }\n };\n var cancelActive = function () {\n clearTimeout(activeDefer);\n activeDefer = undefined;\n if (activatableEle) {\n removeActivated(false);\n activatableEle = undefined;\n }\n };\n var pointerDown = function (ev) {\n if (activatableEle || isScrolling()) {\n return;\n }\n scrollingEl = undefined;\n setActivatedElement(getActivatableTarget(ev), ev);\n };\n var pointerUp = function (ev) {\n setActivatedElement(undefined, ev);\n };\n var setActivatedElement = function (el, ev) {\n // do nothing\n if (el && el === activatableEle) {\n return;\n }\n clearTimeout(activeDefer);\n activeDefer = undefined;\n var _a = pointerCoord(ev), x = _a.x, y = _a.y;\n // deactivate selected\n if (activatableEle) {\n if (clearDefers.has(activatableEle)) {\n throw new Error('internal error');\n }\n if (!activatableEle.classList.contains(ACTIVATED)) {\n addActivated(activatableEle, x, y);\n }\n removeActivated(true);\n }\n // activate\n if (el) {\n var deferId = clearDefers.get(el);\n if (deferId) {\n clearTimeout(deferId);\n clearDefers.delete(el);\n }\n var delay = isInstant(el) ? 0 : ADD_ACTIVATED_DEFERS;\n el.classList.remove(ACTIVATED);\n activeDefer = setTimeout(function () {\n addActivated(el, x, y);\n activeDefer = undefined;\n }, delay);\n }\n activatableEle = el;\n };\n var addActivated = function (el, x, y) {\n lastActivated = Date.now();\n el.classList.add(ACTIVATED);\n var rippleEffect = useRippleEffect && getRippleEffect(el);\n if (rippleEffect && rippleEffect.addRipple) {\n removeRipple();\n activeRipple = rippleEffect.addRipple(x, y);\n }\n };\n var removeRipple = function () {\n if (activeRipple !== undefined) {\n activeRipple.then(function (remove) { return remove(); });\n activeRipple = undefined;\n }\n };\n var removeActivated = function (smooth) {\n removeRipple();\n var active = activatableEle;\n if (!active) {\n return;\n }\n var time = CLEAR_STATE_DEFERS - Date.now() + lastActivated;\n if (smooth && time > 0 && !isInstant(active)) {\n var deferId = setTimeout(function () {\n active.classList.remove(ACTIVATED);\n clearDefers.delete(active);\n }, CLEAR_STATE_DEFERS);\n clearDefers.set(active, deferId);\n }\n else {\n active.classList.remove(ACTIVATED);\n }\n };\n var doc = document;\n doc.addEventListener('ionScrollStart', function (ev) {\n scrollingEl = ev.target;\n cancelActive();\n });\n doc.addEventListener('ionScrollEnd', function () {\n scrollingEl = undefined;\n });\n doc.addEventListener('ionGestureCaptured', cancelActive);\n doc.addEventListener('touchstart', onTouchStart, true);\n doc.addEventListener('touchcancel', onTouchEnd, true);\n doc.addEventListener('touchend', onTouchEnd, true);\n doc.addEventListener('mousedown', onMouseDown, true);\n doc.addEventListener('mouseup', onMouseUp, true);\n};\nvar getActivatableTarget = function (ev) {\n if (ev.composedPath) {\n var path = ev.composedPath();\n for (var i = 0; i < path.length - 2; i++) {\n var el = path[i];\n if (el.classList && el.classList.contains('ion-activatable')) {\n return el;\n }\n }\n }\n else {\n return ev.target.closest('.ion-activatable');\n }\n};\nvar isInstant = function (el) {\n return el.classList.contains('ion-activatable-instant');\n};\nvar getRippleEffect = function (el) {\n if (el.shadowRoot) {\n var ripple = el.shadowRoot.querySelector('ion-ripple-effect');\n if (ripple) {\n return ripple;\n }\n }\n return el.querySelector('ion-ripple-effect');\n};\nvar ACTIVATED = 'ion-activated';\nvar ADD_ACTIVATED_DEFERS = 200;\nvar CLEAR_STATE_DEFERS = 200;\nvar MOUSE_WAIT = 2500;\nexport { startTapClick };\n"],"sourceRoot":""}