import { z as a } from "../jszip.min-BZhlzntC.js";
async function c(e) {
  const n = await (await a.loadAsync(e)).file("word/document.xml")?.async("string");
  if (!n) throw new Error("Failed to load document.xml");
  return i(n).split(`
`).filter((t) => t.trim().length > 10).map((t) => [{ role: "text", content: t }]);
}
function i(e) {
  const n = new DOMParser().parseFromString(e, "application/xml");
  return Array.from(n.getElementsByTagName("w:t")).map((t) => t.textContent).join(`
`);
}
export {
  c as loadDOCX
};
