import{aR as i,ay as u,r as f,dv as c}from"./index-9PRMimni.js";function d(e,n,o=!1){if(!i(e))throw new Error("handle is not Function!");const{readyRef:t,stop:r,start:s}=m(n);return o?e():u(t,a=>{a&&e()},{immediate:!1}),{readyRef:t,stop:r,start:s}}function m(e){const n=f(!1);let o;function t(){n.value=!1,o&&window.clearTimeout(o)}function r(){t(),o=setTimeout(()=>{n.value=!0},e)}return r(),c(t),{readyRef:n,stop:t,start:r}}export{d as u};
