"use client";
class u {
  setTimeout(n) {
    var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, i = performance.now(), e = null, t = (a) => {
      a - i >= r ? n(a) : typeof requestAnimationFrame == "function" && (e = requestAnimationFrame(t));
    };
    return e = requestAnimationFrame(t), () => {
      cancelAnimationFrame(e);
    };
  }
}
export {
  u as RequestAnimationFrameTimeoutController
};
