import{R as w,bf as g,Z as y,bd as c,bg as O,bh as P}from"./index.8f93de0e.js";var p;const u=typeof window!="undefined",A=t=>typeof t=="string",j=()=>{};u&&((p=window==null?void 0:window.navigator)==null?void 0:p.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function d(t){return O()?(P(t),!0):!1}function b(t,e=1e3,r={}){const{immediate:a=!0,immediateCallback:o=!1}=r;let n=null;const s=w(!1);function l(){n&&(clearInterval(n),n=null)}function f(){s.value=!1,l()}function i(){c(e)<=0||(s.value=!0,o&&t(),l(),n=setInterval(t,c(e)))}if(a&&u&&i(),g(e)){const _=y(e,()=>{s.value&&u&&i()});d(_)}return d(f),{isActive:s,pause:f,resume:i}}var h=Object.defineProperty,v=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,m=(t,e,r)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$=(t,e)=>{for(var r in e||(e={}))I.call(e,r)&&m(t,r,e[r]);if(v)for(var r of v(e))S.call(e,r)&&m(t,r,e[r]);return t};function x(t=1e3,e={}){const{controls:r=!1,immediate:a=!0}=e,o=w(0),n=b(()=>o.value+=1,t,{immediate:a});return r?$({counter:o},n):o}export{u as a,b,A as i,j as n,d as t,x as u};
