UNPKG

@forbespro/lead-agent

Version:
51 lines (50 loc) 1.34 kB
import { factorySpace as a } from "./index161.js"; import { markdownLineEnding as l } from "./index146.js"; import { subtokenize as p } from "./index159.js"; const d = { resolve: s, tokenize: h }, k = { partial: !0, tokenize: x }; function s(n) { return p(n), n; } function h(n, u) { let r; return i; function i(t) { return n.enter("content"), r = n.enter("chunkContent", { contentType: "content" }), o(t); } function o(t) { return t === null ? c(t) : l(t) ? n.check(k, e, c)(t) : (n.consume(t), o); } function c(t) { return n.exit("chunkContent"), n.exit("content"), u(t); } function e(t) { return n.consume(t), n.exit("chunkContent"), r.next = n.enter("chunkContent", { contentType: "content", previous: r }), r = r.next, o; } } function x(n, u, r) { const i = this; return o; function o(e) { return n.exit("chunkContent"), n.enter("lineEnding"), n.consume(e), n.exit("lineEnding"), a(n, c, "linePrefix"); } function c(e) { if (e === null || l(e)) return r(e); const t = i.events[i.events.length - 1]; return !i.parser.constructs.disable.null.includes("codeIndented") && t && t[1].type === "linePrefix" && t[2].sliceSerialize(t[1], !0).length >= 4 ? u(e) : n.interrupt(i.parser.constructs.flow, r, u)(e); } } export { d as content };