import { resolveParsedValue as m } from "./80ec0617.js";
import { cN as s } from "./56c67d3b.js";
import "react";
import "react-dom";
const {
  readFile: d
} = require("node:fs/promises");
global.TextDecoder = require("util").TextDecoder;
const i = [{
  id: 1,
  name: "Reagen Gilberthorpe",
  date: "7/5/2022",
  department: "Marketing"
}, {
  id: 2,
  name: "Haroun Lortzing",
  date: "11/6/2022",
  department: "Human Resources"
}, {
  id: 3,
  name: "Garret Kilmaster",
  date: "11/14/2021",
  department: "Research and Development"
}, {
  id: 4,
  name: "Israel Harrowsmith",
  date: "4/3/2022",
  department: "Training"
}, {
  id: 5,
  name: "Loren O'Lagen",
  date: "9/10/2022",
  department: "Services"
}, {
  id: 6,
  name: "Wallis Hothersall",
  date: "4/18/2022",
  department: "Accounting"
}, {
  id: 7,
  name: "Kaia Biskup",
  date: "3/4/2022",
  department: "Sales"
}, {
  id: 8,
  name: "Travers Saterweyte",
  date: "1/9/2022",
  department: "Human Resources"
}, {
  id: 9,
  name: "Mikey Niemetz",
  date: "1/4/2022",
  department: "Marketing"
}, {
  id: 10,
  name: "Mano Meckiff",
  date: "2/19/2022",
  department: "Research and Development"
}], o = [{
  id: "1",
  name: "Reagen Gilberthorpe",
  date: "7/5/2022",
  department: "Marketing"
}, {
  id: "2",
  name: "Haroun Lortzing",
  date: "11/6/2022",
  department: "Human Resources"
}, {
  id: "3",
  name: "Garret Kilmaster",
  date: "11/14/2021",
  department: "Research and Development"
}, {
  id: "4",
  name: "Israel Harrowsmith",
  date: "4/3/2022",
  department: "Training"
}, {
  id: "5",
  name: "Loren O'Lagen",
  date: "9/10/2022",
  department: "Services"
}, {
  id: "6",
  name: "Wallis Hothersall",
  date: "4/18/2022",
  department: "Accounting"
}, {
  id: "7",
  name: "Kaia Biskup",
  date: "3/4/2022",
  department: "Sales"
}, {
  id: "8",
  name: "Travers Saterweyte",
  date: "1/9/2022",
  department: "Human Resources"
}, {
  id: "9",
  name: "Mikey Niemetz",
  date: "1/4/2022",
  department: "Marketing"
}, {
  id: "10",
  name: "Mano Meckiff",
  date: "2/19/2022",
  department: "Research and Development"
}];
function c(t) {
  const e = new ArrayBuffer(t.length), n = new Uint8Array(e);
  for (let r = 0; r < t.length; ++r)
    n[r] = t[r];
  return e;
}
function a(t) {
  return d(t).then((e) => ({
    originFileObj: {
      arrayBuffer: () => new Promise((n) => n(c(e))),
      type: s.getType(t.substring(t.lastIndexOf(".")))
    }
  }));
}
test("test resolveParsedValue", async () => {
  const t = await Promise.all([a("packages/lowcoder/src/comps/comps/fileComp/fileComp.test.csv"), a("packages/lowcoder/src/comps/comps/fileComp/fileComp.test.json"), a("packages/lowcoder/src/comps/comps/fileComp/fileComp.test.png"), a("packages/lowcoder/src/comps/comps/fileComp/fileComp.test.txt"), a("packages/lowcoder/src/comps/comps/fileComp/fileComp.test.xlsx")]), e = await m(t);
  expect(e[0]).toMatchObject(o), expect(e[1]).toMatchObject(i), expect(e[2]).toBeNull(), expect(e[3]).toMatchObject(i), expect(e[4]).toMatchObject(o);
});
