export const ASSET_ENTRY=/"\/(?:[^"\\]|\\.)+":\["[^"\\]+","/g; export function scanAssetChunk(combined,overlap=512){ const boundary=Math.max(0,combined.length-overlap); // Match the full buffer, then assign a marker to the chunk containing its // start. Cutting the buffer first loses markers that straddle the boundary. const entries=[...combined.matchAll(ASSET_ENTRY)].filter(m=>m.indexm[0]); return {entries,carry:combined.slice(boundary)}; }