import { parseLine as r, createLineData as u } from "./parser.js"; function h(s, f = " ") { const e = u("", f); let t = !1; async function c(n = -1) { if (t) t = !1; else { const i = await s.next(); if (i === null) return !1; e.line = i, r(e); } return l() <= n ? (t = !0, !1) : !0; } const l = () => e.level, o = () => e.line.slice(e.offsetHead), a = () => e.line.slice(e.offsetHead, e.offsetTail); return { next: c, level: l, line: o, head: a, tail: () => e.line.slice(e.offsetTail), match: (n) => n === a() }; } export { h as useDocument };