import { ab as e, _ as t, cw as r, T as a, e9 as o, ea as s } from "./index-df8c00b4.js";
import { _ as i } from "./lodash-f1e42446.js";
import "./ant-design-icons-b1480d8d.js";
import "./axios-84bb1c75.js";
import "./redux-devtools-d38e5b33.js";
import "./alasql-0ff6dabf.js";
import "./react-router-a1807b5b.js";
import "./antd-04a23d13.js";
import "react";
import "react-dom";
import "./dayjs-844325ae.js";
import "./fontawesome-2445f580.js";
import "./dnd-kit-56a2f36f.js";
import "./styled-components-1e696d6b.js";
import "./numbro-c1edb412.js";
import "./papaparse-1bac8e5f.js";
import "./uuid-82f303b2.js";
import "./supabase-c27c62e3.js";
import "./fetch-a3c8ad94.js";
import "./react-draggable-60f59f09.js";
import "./remark-gfm-f2973785.js";
import "./buffer-d3713d77.js";
import "./rehype-raw-41b6145f.js";
import "./parse5-6476676e.js";
import "./rehype-sanitize-deb53e9a.js";
import "./simplebar-react-e1b123a3.js";
import "./react-best-gradient-color-picker-4dd60dac.js";
import "./ua-parser-js-094f59ba.js";
import "./clsx-469c2c43.js";
import "./loglevel-6fb66d22.js";
import "./crypto-js-d5eac8ba.js";
import "./codemirror-73d8c217.js";
import "./really-relaxed-json-49b6a70d.js";
import "./immer-c0428a8d.js";
import "./redux-saga-5514e228.js";
import "./hotkeys-js-0dddb21a.js";
import "./cnchar-5678e6bc.js";
import "./react-documents-eb6de859.js";
import "./sql-formatter-69e8df59.js";
import "./rc-trigger-5125aafe.js";
import "./react-json-view-9403d8a1.js";
import "./qrcode-react-cb73d2b6.js";
import "./katex-a34f0265.js";
import "./ecogis-maps-bb0d63f9.js";
import "./devextreme-2fa5bb9a.js";
test("test column", () => {
  const r2 = { title: "name" };
  let a2 = new e({ value: r2 });
  a2 = t(a2);
  const o2 = a2.getView();
  expect(o2.title).toEqual(r2.title);
}), test("test column render", () => {
  let r2 = new e({ value: { render: { compType: "text", comp: { text: "{{currentRow.id}}" } } } });
  r2 = t(r2);
  const a2 = r2.getView();
  expect(a2.render({ currentCell: null, currentIndex: null, currentRow: { id: "hello" }, currentOriginalIndex: null }, "0").getView().view({}).props.normalView).toEqual("hello");
}), test("test table", async () => {
  const e2 = { data: JSON.stringify([{ a: 1 }]), columns: [{ dataIndex: "a", hide: true }, { title: "custom", dataIndex: "", isCustom: true }] }, o2 = { query1: r({ data: [{ q: 1 }] }), query2: r({ data: [{ q2: 2 }] }) };
  let s2 = new a({ dispatch: (e3) => {
    s2 = t(s2.reduce(e3), o2);
  }, value: e2 });
  s2 = t(s2);
  let i2 = s2.children.columns.getView();
  expect(i2.length).toEqual(2), s2 = t(s2.reduce(s2.changeChildAction("data", '[{"a":1, "c":2, "d":3}]'))), await new Promise((e3) => setTimeout(e3, 20)), i2 = s2.children.columns.getView(), expect(i2.length).toEqual(4), expect(i2[0].getView().dataIndex).toEqual("a"), expect(i2[0].getView().hide).toBe(true), expect(i2[1].getView().title).toEqual("custom"), expect(i2[2].getView().title).toEqual("c"), expect(i2[3].getView().title).toEqual("d");
}, 1e3), test("test mock table render", () => {
  let e2 = new o({});
  e2 = t(e2);
}), test("test table data transform", () => {
  function e2(e3, t2) {
    const r3 = t2.exposingValues.displayData, { data: a2 } = t2.getProps(), o3 = t2.filterData;
    return expect(a2.length).toEqual(3), expect(r3.length).toEqual(e3), expect(r3.map((e4) => i.omit(e4, "custom"))).toEqual(i.map(o3, (e4) => i.omit(e4, s))), { transformedData: o3, data: a2, displayData: r3 };
  }
  const r2 = { data: JSON.stringify([{ id: 1, name: "gg" }, { id: 5, name: "gg2" }, { id: 3, name: "jjj" }]), columns: [{ dataIndex: "id", isCustom: false, sortable: true, render: { compType: "text", comp: { text: "{{currentCell}}" } } }, { dataIndex: "name", isCustom: false, render: { compType: "text", comp: { text: "{{currentCell}}" } } }, { title: "custom", dataIndex: "ealekfg", isCustom: true, render: { compType: "image", comp: { src: "{{currentRow.id}}" } } }] };
  let o2 = new a({ dispatch: (e3) => {
    o2 = t(o2.reduce(e3));
  }, value: r2 });
  o2 = t(o2), o2 = t(o2.reduce(o2.changeChildAction("sort", [{ column: "id", desc: true }])));
  let { transformedData: l, data: m, displayData: c } = e2(3, o2);
  expect(l.map((e3) => e3.id)).toEqual([5, 3, 1]), o2 = t(o2.reduce(o2.changeChildAction("toolbar", { searchText: "gg" }))), e2(2, o2), o2 = t(o2.reduce(o2.changeChildAction("toolbar", { showFilter: true, filter: { stackType: "and", filters: [{ columnKey: "id", filterValue: "4", operator: "gt" }, { columnKey: "id", filterValue: "5", operator: "lte" }] } }))), e2(1, o2);
});
