import{u as t,q as e}from"./p-7cbdb4ea.js";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const n=n=>{let a=-f*10;let d=0;let l;let p;let m;const b=n.getBoolean("animated",true)&&n.getBoolean("rippleEffect",true);const h=new WeakMap;const w=e=>{a=t(e);j(e)};const T=e=>{a=t(e);k(e)};const v=e=>{const n=t(e)-f;if(a<n){j(e)}};const x=e=>{const n=t(e)-f;if(a<n){k(e)}};const D=t=>{k(t)};const E=()=>{clearTimeout(m);m=undefined;if(l){G(false);l=undefined}};const j=t=>{if(l){return}q(o(t),t)};const k=t=>{q(undefined,t)};const q=(t,n)=>{if(t&&t===l){return}clearTimeout(m);m=undefined;const{x:o,y:i}=e(n);if(l){if(h.has(l)){throw new Error("internal error")}if(!l.classList.contains(s)){y(l,o,i)}G(true)}if(t){const e=h.get(t);if(e){clearTimeout(e);h.delete(t)}const n=c(t)?0:r;t.classList.remove(s);m=setTimeout((()=>{y(t,o,i);m=undefined}),n)}l=t};const y=(t,e,n)=>{d=Date.now();t.classList.add(s);const o=b&&i(t);if(o&&o.addRipple){C();p=o.addRipple(e,n)}};const C=()=>{if(p!==undefined){p.then((t=>t()));p=undefined}};const G=t=>{C();const e=l;if(!e){return}const n=u-Date.now()+d;if(t&&n>0&&!c(e)){const t=setTimeout((()=>{e.classList.remove(s);h.delete(e)}),u);h.set(e,t)}else{e.classList.remove(s)}};const M=document;M.addEventListener("ionGestureCaptured",E);M.addEventListener("touchstart",w,true);M.addEventListener("touchcancel",T,true);M.addEventListener("touchend",T,true);M.addEventListener("pointercancel",E,true);M.addEventListener("mousedown",v,true);M.addEventListener("mouseup",x,true);M.addEventListener("contextmenu",D,true)};const o=t=>{if(t.composedPath){const e=t.composedPath();for(let t=0;t<e.length-2;t++){const n=e[t];if(!(n instanceof ShadowRoot)&&n.classList.contains("ion-activatable")){return n}}}else{return t.target.closest(".ion-activatable")}};const c=t=>t.classList.contains("ion-activatable-instant");const i=t=>{if(t.shadowRoot){const e=t.shadowRoot.querySelector("ion-ripple-effect");if(e){return e}}return t.querySelector("ion-ripple-effect")};const s="ion-activated";const r=200;const u=200;const f=2500;export{n as startTapClick};
//# sourceMappingURL=p-7dc6a744.js.map