function e(e) {
	return e();
}
function t(e) {
	let t = !1;
	return function(...n) {
		t ||= (requestAnimationFrame(() => {
			e(...n), t = !1;
		}), !0);
	};
}
function n(e) {
	return new Promise((t) => setTimeout(t, e));
}
function r(e, t) {
	let n = setTimeout(e, t);
	return () => {
		clearTimeout(n);
	};
}
function i(e, t) {
	return e = Math.ceil(e), t = Math.floor(t), Math.floor(Math.random() * (t - e)) + e;
}
function a(e) {
	let t = "";
	for (let n = 0; n < e; n++) t += String.fromCharCode(i(65, 91));
	return t;
}
function o(e) {
	return function(t) {
		return 1 - e(1 - t);
	};
}
function s(e) {
	return function(t) {
		return t < .5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2;
	};
}
function c(e) {
	let { duration: t, draw: n, timing: r } = e, i = performance.now(), a = !1;
	return requestAnimationFrame(function e(o) {
		let s = (o - i) / t;
		(s > 1 || a) && (s = 1), n(r(s)), s < 1 && requestAnimationFrame(e);
	}), function() {
		a = !0;
	};
}
function l(e) {
	let { getFraction: t, draw: n, timing: r } = e, i = performance.now(), a = !1;
	return requestAnimationFrame(function e(o) {
		let s = t(o - i);
		a || (s > 1 && (s = 1), n(r(s)), s < 1 && requestAnimationFrame(e));
	}), function() {
		a = !0;
	};
}
function u(e, t, n = !0) {
	let r = 0, i;
	return function(...a) {
		i = () => {
			e.apply(this, a), r = (/* @__PURE__ */ new Date()).getTime() + t, i = null, n && setTimeout(() => {
				i?.();
			}, t);
		}, (/* @__PURE__ */ new Date()).getTime() > r && i();
	};
}
function d(e) {
	return e.map((e) => ({
		text: String(e),
		value: e
	}));
}
function f(e) {
	if (!Array.isArray(e)) throw Error("Invalid component options: " + String(e));
	return e.map((e) => ({
		label: "label" in e ? e.label : e.text,
		value: e.value,
		description: e.description,
		group: e.group
	}));
}
export { c as animate, l as animateInfinite, e as call, n as delay, d as listToOptions, s as makeEaseInOut, o as makeEaseOut, f as normalizeListOptions, i as randomInt, a as randomString, t as requestTick, u as throttle, r as timeout };

//# sourceMappingURL=utils.js.map