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 m;let p;let b;const h=n.getBoolean("animated",true)&&n.getBoolean("rippleEffect",true);const w=new WeakMap;const T=()=>l!==undefined&&l.parentElement!==null;const v=e=>{a=t(e);k(e)};const S=e=>{a=t(e);q(e)};const x=e=>{const n=t(e)-f;if(a<n){k(e)}};const E=e=>{const n=t(e)-f;if(a<n){q(e)}};const D=t=>{q(t)};const j=()=>{clearTimeout(b);b=undefined;if(m){M(false);m=undefined}};const k=t=>{if(m||T()){return}l=undefined;y(o(t),t)};const q=t=>{y(undefined,t)};const y=(t,n)=>{if(t&&t===m){return}clearTimeout(b);b=undefined;const{x:o,y:i}=e(n);if(m){if(w.has(m)){throw new Error("internal error")}if(!m.classList.contains(s)){C(m,o,i)}M(true)}if(t){const e=w.get(t);if(e){clearTimeout(e);w.delete(t)}const n=c(t)?0:r;t.classList.remove(s);b=setTimeout((()=>{C(t,o,i);b=undefined}),n)}m=t};const C=(t,e,n)=>{d=Date.now();t.classList.add(s);const o=h&&i(t);if(o&&o.addRipple){G();p=o.addRipple(e,n)}};const G=()=>{if(p!==undefined){p.then((t=>t()));p=undefined}};const M=t=>{G();const e=m;if(!e){return}const n=u-Date.now()+d;if(t&&n>0&&!c(e)){const t=setTimeout((()=>{e.classList.remove(s);w.delete(e)}),u);w.set(e,t)}else{e.classList.remove(s)}};const R=document;R.addEventListener("ionScrollStart",(t=>{l=t.target;j()}));R.addEventListener("ionScrollEnd",(()=>{l=undefined}));R.addEventListener("ionGestureCaptured",j);R.addEventListener("touchstart",v,true);R.addEventListener("touchcancel",S,true);R.addEventListener("touchend",S,true);R.addEventListener("mousedown",x,true);R.addEventListener("mouseup",E,true);R.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-1d7e5e24.js.map