import { a as __exportAll } from "./runner-K8XK101B.mjs";

//#region src/utils/chunks.ts
var chunks_exports = /* @__PURE__ */ __exportAll({
	SQL_BATCH_SIZE: () => SQL_BATCH_SIZE,
	chunks: () => chunks
});
/**
* Split an array into chunks of at most `size` elements.
*
* Used to keep SQL `IN (?, ?, …)` clauses within Cloudflare D1's
* bound-parameter limit (~100 per statement).
*/
function chunks(arr, size) {
	if (arr.length === 0) return [];
	const result = [];
	for (let i = 0; i < arr.length; i += size) result.push(arr.slice(i, i + size));
	return result;
}
/** Conservative default chunk size for SQL IN clauses (well within D1's limit). */
const SQL_BATCH_SIZE = 50;

//#endregion
export { chunks as n, chunks_exports as r, SQL_BATCH_SIZE as t };
//# sourceMappingURL=chunks-B2isWQhr.mjs.map