import { B as f } from "../index-Cp39cXWe.js";
const p = 100 * 1024 * 1024;
async function d(i, n = p, e = "text") {
  const r = await (await import("../parquet-Bqjmp2vo.js").then((t) => t.p)).ParquetReader.openBuffer(f.from(await i.arrayBuffer())), a = [], s = r.getCursor([[e]]);
  let o = 0;
  for (; ; ) {
    const t = await s.next();
    if (!t || t[e] === void 0 || typeof t[e] != "string")
      break;
    if (t[e].length !== 0 && (a.push([{ role: "text", content: t[e] }]), o += t[e].length, o > n))
      break;
  }
  return r.close(), a;
}
export {
  d as loadParquet
};
