-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2531.2654ccaae225543c.js
1 lines (1 loc) · 1.83 KB
/
2531.2654ccaae225543c.js
1
"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[2531],{2531:(W,m,E)=>{E.r(m),E.d(m,{startTapClick:()=>I});var u=E(5730);const I=o=>{let e,p,i,s=10*-h,r=0;const P=o.getBoolean("animated",!0)&&o.getBoolean("rippleEffect",!0),l=new WeakMap,L=t=>{s=(0,u.u)(t),R(t)},A=()=>{i&&clearTimeout(i),i=void 0,e&&(b(!1),e=void 0)},D=t=>{e||w(M(t),t)},R=t=>{w(void 0,t)},w=(t,n)=>{if(t&&t===e)return;i&&clearTimeout(i),i=void 0;const{x:d,y:a}=(0,u.p)(n);if(e){if(l.has(e))throw new Error("internal error");e.classList.contains(f)||C(e,d,a),b(!0)}if(t){const g=l.get(t);g&&(clearTimeout(g),l.delete(t));const O=v(t)?0:y;t.classList.remove(f),i=setTimeout(()=>{C(t,d,a),i=void 0},O)}e=t},C=(t,n,d)=>{if(r=Date.now(),t.classList.add(f),!P)return;const a=k(t);null!==a&&(S(),p=a.addRipple(n,d))},S=()=>{void 0!==p&&(p.then(t=>t()),p=void 0)},b=t=>{S();const n=e;if(!n)return;const d=T-Date.now()+r;if(t&&d>0&&!v(n)){const a=setTimeout(()=>{n.classList.remove(f),l.delete(n)},T);l.set(n,a)}else n.classList.remove(f)},c=document;c.addEventListener("ionGestureCaptured",A),c.addEventListener("touchstart",t=>{s=(0,u.u)(t),D(t)},!0),c.addEventListener("touchcancel",L,!0),c.addEventListener("touchend",L,!0),c.addEventListener("pointercancel",A,!0),c.addEventListener("mousedown",t=>{if(2===t.button)return;const n=(0,u.u)(t)-h;s<n&&D(t)},!0),c.addEventListener("mouseup",t=>{const n=(0,u.u)(t)-h;s<n&&R(t)},!0)},M=o=>{if(void 0===o.composedPath)return o.target.closest(".ion-activatable");{const s=o.composedPath();for(let r=0;r<s.length-2;r++){const e=s[r];if(!(e instanceof ShadowRoot)&&e.classList.contains("ion-activatable"))return e}}},v=o=>o.classList.contains("ion-activatable-instant"),k=o=>{if(o.shadowRoot){const s=o.shadowRoot.querySelector("ion-ripple-effect");if(s)return s}return o.querySelector("ion-ripple-effect")},f="ion-activated",y=200,T=200,h=2500}}]);