import{R as w,ba as b,Z as g,b8 as u,bb as y,bc as O}from"./index.633135c2.js";var p;const c=typeof window!="undefined",C=r=>typeof r=="string",D=()=>{};c&&((p=window==null?void 0:window.navigator)==null?void 0:p.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function h(r,e){function t(...n){r(()=>e.apply(this,n),{fn:e,thisArg:this,args:n})}return t}function P(r,e={}){let t,n;return o=>{const i=u(r),a=u(e.maxWait);if(t&&clearTimeout(t),i<=0||a!==void 0&&a<=0)return n&&(clearTimeout(n),n=null),o();a&&!n&&(n=setTimeout(()=>{t&&clearTimeout(t),n=null,o()},a)),t=setTimeout(()=>{n&&clearTimeout(n),n=null,o()},i)}}function m(r){return y()?(O(r),!0):!1}function F(r,e=200,t={}){return h(P(e,t),r)}function T(r,e=1e3,t={}){const{immediate:n=!0,immediateCallback:s=!1}=t;let o=null;const i=w(!1);function a(){o&&(clearInterval(o),o=null)}function f(){i.value=!1,a()}function l(){u(e)<=0||(i.value=!0,s&&r(),a(),o=setInterval(r,u(e)))}if(n&&c&&l(),b(e)){const _=g(e,()=>{i.value&&c&&l()});m(_)}return m(f),{isActive:i,pause:f,resume:l}}var I=Object.defineProperty,d=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,v=(r,e,t)=>e in r?I(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,x=(r,e)=>{for(var t in e||(e={}))S.call(e,t)&&v(r,t,e[t]);if(d)for(var t of d(e))$.call(e,t)&&v(r,t,e[t]);return r};function W(r=1e3,e={}){const{controls:t=!1,immediate:n=!0}=e,s=w(0),o=T(()=>s.value+=1,r,{immediate:n});return t?x({counter:s},o):s}export{c as a,T as b,F as c,C as i,D as n,m as t,W as u};