//#region libs/shared/common/src/functions/utils/resolve-sync.utils.ts
var e = (e) => e.reduce((e, t) => e.then(() => t()), Promise.resolve()), t = (e, t, n) => {
	let r = [];
	if (n) {
		let i = e;
		for (; i <= t;) {
			let e = Math.min(i + n - 1, t);
			r.push({
				from: i,
				to: e
			}), i = e + 1;
		}
	} else r.push({
		from: e,
		to: t
	});
	return r;
}, n = (e, t = 100) => new Promise((n, r) => {
	setTimeout(async () => {
		try {
			await e(), n(0);
		} catch (e) {
			r(e);
		}
	}, t);
});
//#endregion
export { t as getSequence, n as promisify, e as resolveSync };
