@iyulab/flex-table 0.40.0 → 0.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1783,7 +1783,7 @@ function oe(e) {
1783
1783
  endCol: Math.max(e.startCol, e.endCol)
1784
1784
  };
1785
1785
  }
1786
- var j = class {
1786
+ var se = class {
1787
1787
  constructor() {
1788
1788
  this.activeCell = null, this.rangeAnchor = null, this.range = null, this.extraRanges = [], this._rowCount = 0, this._colCount = 0;
1789
1789
  }
@@ -1881,7 +1881,7 @@ var j = class {
1881
1881
  shiftMoveRight() {
1882
1882
  return this.activeCell ? this.setActiveWithRange(this.activeCell.row, this.activeCell.col + 1) : null;
1883
1883
  }
1884
- }, se = class {
1884
+ }, ce = class {
1885
1885
  constructor() {
1886
1886
  this.current = null;
1887
1887
  }
@@ -1902,7 +1902,7 @@ var j = class {
1902
1902
  let e = this.current;
1903
1903
  return this.current = null, e;
1904
1904
  }
1905
- }, M = class {
1905
+ }, j = class {
1906
1906
  constructor() {
1907
1907
  this._selected = /* @__PURE__ */ new Set(), this._mode = "multi", this._rowCount = 0;
1908
1908
  }
@@ -1963,7 +1963,7 @@ var j = class {
1963
1963
  };
1964
1964
  //#endregion
1965
1965
  //#region src/core/filtering.ts
1966
- function ce(e, t, n) {
1966
+ function le(e, t, n) {
1967
1967
  if (t.length === 0) return Array.from({ length: e.length }, (e, t) => t);
1968
1968
  let r = [];
1969
1969
  for (let i = 0; i < e.length; i++) {
@@ -1982,9 +1982,9 @@ function ce(e, t, n) {
1982
1982
  }
1983
1983
  //#endregion
1984
1984
  //#region src/core/undo.ts
1985
- var le = 100, N = class {
1985
+ var ue = 100, M = class {
1986
1986
  constructor() {
1987
- this._undoStack = [], this._redoStack = [], this._maxSize = le;
1987
+ this._undoStack = [], this._redoStack = [], this._maxSize = ue;
1988
1988
  }
1989
1989
  get maxSize() {
1990
1990
  return this._maxSize;
@@ -2021,7 +2021,7 @@ var le = 100, N = class {
2021
2021
  };
2022
2022
  //#endregion
2023
2023
  //#region src/clipboard/clipboard.ts
2024
- function ue(e, t, n) {
2024
+ function de(e, t, n) {
2025
2025
  let r = [];
2026
2026
  for (let i = n.startRow; i <= n.endRow; i++) {
2027
2027
  let a = e[i], o = [];
@@ -2033,7 +2033,7 @@ function ue(e, t, n) {
2033
2033
  }
2034
2034
  return r.join("\n");
2035
2035
  }
2036
- function P(e) {
2036
+ function N(e) {
2037
2037
  let t = e.replace(/\r\n/g, "\n").replace(/\r/g, "\n"), n = [], r = [], i = 0, a = t.length;
2038
2038
  for (; i <= a;) {
2039
2039
  if (i === a) {
@@ -2063,7 +2063,7 @@ function P(e) {
2063
2063
  }
2064
2064
  return n;
2065
2065
  }
2066
- function F(e, t) {
2066
+ function P(e, t) {
2067
2067
  if (e === "") return null;
2068
2068
  switch (t.type) {
2069
2069
  case "number": {
@@ -2076,7 +2076,7 @@ function F(e, t) {
2076
2076
  }
2077
2077
  //#endregion
2078
2078
  //#region src/export/xlsx-writer.ts
2079
- var de = (() => {
2079
+ var fe = (() => {
2080
2080
  let e = /* @__PURE__ */ new Uint32Array(256);
2081
2081
  for (let t = 0; t < 256; t++) {
2082
2082
  let n = t;
@@ -2085,56 +2085,56 @@ var de = (() => {
2085
2085
  }
2086
2086
  return e;
2087
2087
  })();
2088
- function fe(e) {
2088
+ function pe(e) {
2089
2089
  let t = 4294967295;
2090
- for (let n = 0; n < e.length; n++) t = de[(t ^ e[n]) & 255] ^ t >>> 8;
2090
+ for (let n = 0; n < e.length; n++) t = fe[(t ^ e[n]) & 255] ^ t >>> 8;
2091
2091
  return (t ^ 4294967295) >>> 0;
2092
2092
  }
2093
- var I = new TextEncoder();
2094
- function pe(e) {
2093
+ var F = new TextEncoder();
2094
+ function me(e) {
2095
2095
  let t = [], n = [], r = 0;
2096
2096
  for (let i of e) {
2097
- let e = I.encode(i.name), a = fe(i.data), o = i.data.length, s = new ArrayBuffer(30 + e.length), c = new DataView(s);
2097
+ let e = F.encode(i.name), a = pe(i.data), o = i.data.length, s = new ArrayBuffer(30 + e.length), c = new DataView(s);
2098
2098
  c.setUint32(0, 67324752, !0), c.setUint16(4, 20, !0), c.setUint16(6, 0, !0), c.setUint16(8, 0, !0), c.setUint16(10, 0, !0), c.setUint16(12, 33, !0), c.setUint32(14, a, !0), c.setUint32(18, o, !0), c.setUint32(22, o, !0), c.setUint16(26, e.length, !0), c.setUint16(28, 0, !0), new Uint8Array(s, 30).set(e), t.push(new Uint8Array(s)), t.push(i.data);
2099
2099
  let l = new ArrayBuffer(46 + e.length), u = new DataView(l);
2100
2100
  u.setUint32(0, 33639248, !0), u.setUint16(4, 20, !0), u.setUint16(6, 20, !0), u.setUint16(8, 0, !0), u.setUint16(10, 0, !0), u.setUint16(12, 0, !0), u.setUint16(14, 33, !0), u.setUint32(16, a, !0), u.setUint32(20, o, !0), u.setUint32(24, o, !0), u.setUint16(28, e.length, !0), u.setUint16(30, 0, !0), u.setUint16(32, 0, !0), u.setUint16(34, 0, !0), u.setUint16(36, 0, !0), u.setUint32(38, 0, !0), u.setUint32(42, r, !0), new Uint8Array(l, 46).set(e), n.push(new Uint8Array(l)), r += 30 + e.length + o;
2101
2101
  }
2102
- let i = L(n), a = /* @__PURE__ */ new ArrayBuffer(22), o = new DataView(a);
2103
- return o.setUint32(0, 101010256, !0), o.setUint16(4, 0, !0), o.setUint16(6, 0, !0), o.setUint16(8, e.length, !0), o.setUint16(10, e.length, !0), o.setUint32(12, i.length, !0), o.setUint32(16, r, !0), o.setUint16(20, 0, !0), L([
2102
+ let i = I(n), a = /* @__PURE__ */ new ArrayBuffer(22), o = new DataView(a);
2103
+ return o.setUint32(0, 101010256, !0), o.setUint16(4, 0, !0), o.setUint16(6, 0, !0), o.setUint16(8, e.length, !0), o.setUint16(10, e.length, !0), o.setUint32(12, i.length, !0), o.setUint32(16, r, !0), o.setUint16(20, 0, !0), I([
2104
2104
  ...t,
2105
2105
  i,
2106
2106
  new Uint8Array(a)
2107
2107
  ]);
2108
2108
  }
2109
- function L(e) {
2109
+ function I(e) {
2110
2110
  let t = e.reduce((e, t) => e + t.length, 0), n = new Uint8Array(t), r = 0;
2111
2111
  for (let t of e) n.set(t, r), r += t.length;
2112
2112
  return n;
2113
2113
  }
2114
- function R(e) {
2114
+ function L(e) {
2115
2115
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
2116
2116
  }
2117
- function me(e) {
2117
+ function he(e) {
2118
2118
  let t = "";
2119
2119
  for (e++; e > 0;) t = String.fromCharCode(64 + (e % 26 || 26)) + t, e = Math.floor((e - 1) / 26);
2120
2120
  return t;
2121
2121
  }
2122
- function z(e, t) {
2123
- return me(t) + (e + 1);
2122
+ function R(e, t) {
2123
+ return he(t) + (e + 1);
2124
2124
  }
2125
- function he(e) {
2125
+ function ge(e) {
2126
2126
  let t = Date.UTC(1899, 11, 30);
2127
2127
  return (e.getTime() - t) / 864e5;
2128
2128
  }
2129
- var ge = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\">\n <Default Extension=\"rels\" ContentType=\"application/vnd.openxmlformats-package.relationships+xml\"/>\n <Default Extension=\"xml\" ContentType=\"application/xml\"/>\n <Override PartName=\"/xl/workbook.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\"/>\n <Override PartName=\"/xl/worksheets/sheet1.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\"/>\n <Override PartName=\"/xl/styles.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\"/>\n</Types>", _e = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\n <Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"xl/workbook.xml\"/>\n</Relationships>", ve = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<workbook xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\">\n <sheets><sheet name=\"Sheet1\" sheetId=\"1\" r:id=\"rId1\"/></sheets>\n</workbook>", ye = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\n <Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet\" Target=\"worksheets/sheet1.xml\"/>\n <Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles\" Target=\"styles.xml\"/>\n</Relationships>", be = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<styleSheet xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">\n <numFmts count=\"1\"><numFmt numFmtId=\"164\" formatCode=\"yyyy-mm-dd\"/></numFmts>\n <fonts count=\"2\">\n <font><sz val=\"11\"/><name val=\"Calibri\"/></font>\n <font><sz val=\"11\"/><b/><name val=\"Calibri\"/></font>\n </fonts>\n <fills count=\"2\">\n <fill><patternFill patternType=\"none\"/></fill>\n <fill><patternFill patternType=\"gray125\"/></fill>\n </fills>\n <borders count=\"1\"><border><left/><right/><top/><bottom/><diagonal/></border></borders>\n <cellStyleXfs count=\"1\"><xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\"/></cellStyleXfs>\n <cellXfs count=\"3\">\n <xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\"/>\n <xf numFmtId=\"164\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\" applyNumberFormat=\"1\"/>\n <xf numFmtId=\"0\" fontId=\"1\" fillId=\"0\" borderId=\"0\" xfId=\"0\" applyFont=\"1\"/>\n </cellXfs>\n</styleSheet>";
2130
- function xe(e, t) {
2131
- let n = [], r = t.map((e, t) => `<c r="${z(0, t)}" t="str" s="2"><v>${R(e.label)}</v></c>`);
2129
+ var _e = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\">\n <Default Extension=\"rels\" ContentType=\"application/vnd.openxmlformats-package.relationships+xml\"/>\n <Default Extension=\"xml\" ContentType=\"application/xml\"/>\n <Override PartName=\"/xl/workbook.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\"/>\n <Override PartName=\"/xl/worksheets/sheet1.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\"/>\n <Override PartName=\"/xl/styles.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\"/>\n</Types>", ve = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\n <Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"xl/workbook.xml\"/>\n</Relationships>", ye = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<workbook xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\">\n <sheets><sheet name=\"Sheet1\" sheetId=\"1\" r:id=\"rId1\"/></sheets>\n</workbook>", be = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\n <Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet\" Target=\"worksheets/sheet1.xml\"/>\n <Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles\" Target=\"styles.xml\"/>\n</Relationships>", xe = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<styleSheet xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">\n <numFmts count=\"1\"><numFmt numFmtId=\"164\" formatCode=\"yyyy-mm-dd\"/></numFmts>\n <fonts count=\"2\">\n <font><sz val=\"11\"/><name val=\"Calibri\"/></font>\n <font><sz val=\"11\"/><b/><name val=\"Calibri\"/></font>\n </fonts>\n <fills count=\"2\">\n <fill><patternFill patternType=\"none\"/></fill>\n <fill><patternFill patternType=\"gray125\"/></fill>\n </fills>\n <borders count=\"1\"><border><left/><right/><top/><bottom/><diagonal/></border></borders>\n <cellStyleXfs count=\"1\"><xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\"/></cellStyleXfs>\n <cellXfs count=\"3\">\n <xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\"/>\n <xf numFmtId=\"164\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\" applyNumberFormat=\"1\"/>\n <xf numFmtId=\"0\" fontId=\"1\" fillId=\"0\" borderId=\"0\" xfId=\"0\" applyFont=\"1\"/>\n </cellXfs>\n</styleSheet>";
2130
+ function Se(e, t) {
2131
+ let n = [], r = t.map((e, t) => `<c r="${R(0, t)}" t="str" s="2"><v>${L(e.label)}</v></c>`);
2132
2132
  return n.push(`<row r="1">${r.join("")}</row>`), e.forEach((e, r) => {
2133
2133
  let i = t.map((t, n) => {
2134
- let i = z(r + 1, n), a = e[t.key];
2134
+ let i = R(r + 1, n), a = e[t.key];
2135
2135
  if (a == null) return `<c r="${i}" t="str"><v></v></c>`;
2136
2136
  let o = t.type ?? "text";
2137
- return o === "number" && typeof a == "number" ? `<c r="${i}"><v>${a}</v></c>` : (o === "date" || o === "datetime") && a instanceof Date ? `<c r="${i}" s="1"><v>${he(a).toFixed(6)}</v></c>` : o === "boolean" ? `<c r="${i}" t="b"><v>${+!!a}</v></c>` : `<c r="${i}" t="str"><v>${R(String(a))}</v></c>`;
2137
+ return o === "number" && typeof a == "number" ? `<c r="${i}"><v>${a}</v></c>` : (o === "date" || o === "datetime") && a instanceof Date ? `<c r="${i}" s="1"><v>${ge(a).toFixed(6)}</v></c>` : o === "boolean" ? `<c r="${i}" t="b"><v>${+!!a}</v></c>` : `<c r="${i}" t="str"><v>${L(String(a))}</v></c>`;
2138
2138
  });
2139
2139
  n.push(`<row r="${r + 2}">${i.join("")}</row>`);
2140
2140
  }), `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
@@ -2142,55 +2142,55 @@ function xe(e, t) {
2142
2142
  <sheetData>${n.join("")}</sheetData>
2143
2143
  </worksheet>`;
2144
2144
  }
2145
- function Se(e, t) {
2146
- let n = xe(e, t);
2147
- return pe([
2145
+ function Ce(e, t) {
2146
+ let n = Se(e, t);
2147
+ return me([
2148
2148
  {
2149
2149
  name: "[Content_Types].xml",
2150
- data: I.encode(ge)
2150
+ data: F.encode(_e)
2151
2151
  },
2152
2152
  {
2153
2153
  name: "_rels/.rels",
2154
- data: I.encode(_e)
2154
+ data: F.encode(ve)
2155
2155
  },
2156
2156
  {
2157
2157
  name: "xl/workbook.xml",
2158
- data: I.encode(ve)
2158
+ data: F.encode(ye)
2159
2159
  },
2160
2160
  {
2161
2161
  name: "xl/_rels/workbook.xml.rels",
2162
- data: I.encode(ye)
2162
+ data: F.encode(be)
2163
2163
  },
2164
2164
  {
2165
2165
  name: "xl/worksheets/sheet1.xml",
2166
- data: I.encode(n)
2166
+ data: F.encode(n)
2167
2167
  },
2168
2168
  {
2169
2169
  name: "xl/styles.xml",
2170
- data: I.encode(be)
2170
+ data: F.encode(xe)
2171
2171
  }
2172
2172
  ]);
2173
2173
  }
2174
2174
  //#endregion
2175
2175
  //#region src/export/export.ts
2176
- function B(e, t, n) {
2176
+ function z(e, t, n) {
2177
2177
  switch (n) {
2178
- case "csv": return V(e, t, ",");
2179
- case "tsv": return V(e, t, " ");
2180
- case "json": return we(e, t);
2181
- case "xlsx": return Se(e, t);
2178
+ case "csv": return B(e, t, ",");
2179
+ case "tsv": return B(e, t, " ");
2180
+ case "json": return Te(e, t);
2181
+ case "xlsx": return Ce(e, t);
2182
2182
  }
2183
2183
  }
2184
- function Ce(e, t) {
2184
+ function we(e, t) {
2185
2185
  return e == null ? "" : (t.type === "date" || t.type === "datetime") && e instanceof Date ? e.toISOString() : String(e);
2186
2186
  }
2187
- function V(e, t, n) {
2188
- return [t.map((e) => H(e.label, n)).join(n), ...e.map((e) => t.map((t) => H(Ce(e[t.key], t), n)).join(n))].join("\n");
2187
+ function B(e, t, n) {
2188
+ return [t.map((e) => V(e.label, n)).join(n), ...e.map((e) => t.map((t) => V(we(e[t.key], t), n)).join(n))].join("\n");
2189
2189
  }
2190
- function H(e, t) {
2190
+ function V(e, t) {
2191
2191
  return e.includes(t) || e.includes("\"") || e.includes("\n") || e.includes("\r") ? "\"" + e.replace(/"/g, "\"\"") + "\"" : e;
2192
2192
  }
2193
- function we(e, t) {
2193
+ function Te(e, t) {
2194
2194
  let n = e.map((e) => {
2195
2195
  let n = {};
2196
2196
  for (let r of t) {
@@ -2201,35 +2201,35 @@ function we(e, t) {
2201
2201
  });
2202
2202
  return JSON.stringify(n, null, 2);
2203
2203
  }
2204
- function Te(e, t, n) {
2204
+ function Ee(e, t, n) {
2205
2205
  let r = new Blob([e], { type: n }), i = URL.createObjectURL(r), a = document.createElement("a");
2206
2206
  a.href = i, a.download = t, a.style.display = "none", document.body.appendChild(a), a.click(), document.body.removeChild(a), setTimeout(() => URL.revokeObjectURL(i), 100);
2207
2207
  }
2208
- var Ee = {
2208
+ var De = {
2209
2209
  csv: "text/csv;charset=utf-8",
2210
2210
  tsv: "text/tab-separated-values;charset=utf-8",
2211
2211
  json: "application/json;charset=utf-8",
2212
2212
  xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
2213
- }, De = {
2213
+ }, Oe = {
2214
2214
  csv: ".csv",
2215
2215
  tsv: ".tsv",
2216
2216
  json: ".json",
2217
2217
  xlsx: ".xlsx"
2218
2218
  };
2219
- function Oe(e) {
2220
- return Ee[e];
2221
- }
2222
2219
  function ke(e) {
2223
2220
  return De[e];
2224
2221
  }
2222
+ function Ae(e) {
2223
+ return Oe[e];
2224
+ }
2225
2225
  //#endregion
2226
2226
  //#region src/export/xlsx-reader.ts
2227
- function Ae(e) {
2227
+ function je(e) {
2228
2228
  for (let t = e.byteLength - 22; t >= 0; t--) if (e.getUint32(t, !0) === 101010256) return t;
2229
2229
  throw Error("XLSX: End of central directory not found — not a valid ZIP file");
2230
2230
  }
2231
- function je(e) {
2232
- let t = Ae(e), n = e.getUint32(t + 16, !0), r = e.getUint32(t + 12, !0), i = new TextDecoder("utf-8"), a = [], o = n, s = n + r;
2231
+ function Me(e) {
2232
+ let t = je(e), n = e.getUint32(t + 16, !0), r = e.getUint32(t + 12, !0), i = new TextDecoder("utf-8"), a = [], o = n, s = n + r;
2233
2233
  for (; o < s && e.getUint32(o, !0) === 33639248;) {
2234
2234
  let t = e.getUint16(o + 10, !0), n = e.getUint32(o + 20, !0), r = e.getUint32(o + 24, !0), s = e.getUint16(o + 28, !0), c = e.getUint16(o + 30, !0), l = e.getUint16(o + 32, !0), u = e.getUint32(o + 42, !0), d = i.decode(new Uint8Array(e.buffer, o + 46, s));
2235
2235
  a.push({
@@ -2242,7 +2242,7 @@ function je(e) {
2242
2242
  }
2243
2243
  return a;
2244
2244
  }
2245
- async function Me(e) {
2245
+ async function Ne(e) {
2246
2246
  let t = new DecompressionStream("deflate-raw"), n = t.writable.getWriter(), r = t.readable.getReader();
2247
2247
  n.write(e), n.close();
2248
2248
  let i = [];
@@ -2255,28 +2255,28 @@ async function Me(e) {
2255
2255
  for (let e of i) o.set(e, s), s += e.length;
2256
2256
  return o;
2257
2257
  }
2258
- async function Ne(e, t) {
2258
+ async function Pe(e, t) {
2259
2259
  let n = t.localHeaderOffset, r = e.getUint16(n + 26, !0), i = e.getUint16(n + 28, !0), a = n + 30 + r + i, o = new Uint8Array(e.buffer, a, t.compressedSize);
2260
2260
  if (t.compressionMethod === 0) return o.slice();
2261
- if (t.compressionMethod === 8) return Me(o);
2261
+ if (t.compressionMethod === 8) return Ne(o);
2262
2262
  throw Error(`XLSX: Unsupported compression method ${t.compressionMethod}`);
2263
2263
  }
2264
- async function Pe(e) {
2265
- let t = new DataView(e), n = je(t), r = /* @__PURE__ */ new Map();
2266
- for (let e of n) e.compressedSize === 0 && e.name.endsWith("/") || r.set(e.name, await Ne(t, e));
2264
+ async function Fe(e) {
2265
+ let t = new DataView(e), n = Me(t), r = /* @__PURE__ */ new Map();
2266
+ for (let e of n) e.compressedSize === 0 && e.name.endsWith("/") || r.set(e.name, await Pe(t, e));
2267
2267
  return r;
2268
2268
  }
2269
- var Fe = new TextDecoder("utf-8");
2270
- function U(e) {
2271
- let t = Fe.decode(e);
2269
+ var Ie = new TextDecoder("utf-8");
2270
+ function H(e) {
2271
+ let t = Ie.decode(e);
2272
2272
  return new DOMParser().parseFromString(t, "application/xml");
2273
2273
  }
2274
- function Ie(e) {
2274
+ function Le(e) {
2275
2275
  if (!e) return [];
2276
- let t = U(e);
2276
+ let t = H(e);
2277
2277
  return Array.from(t.querySelectorAll("si")).map((e) => Array.from(e.querySelectorAll("t")).map((e) => e.textContent ?? "").join(""));
2278
2278
  }
2279
- var Le = /* @__PURE__ */ new Set([
2279
+ var Re = /* @__PURE__ */ new Set([
2280
2280
  14,
2281
2281
  15,
2282
2282
  16,
@@ -2296,37 +2296,37 @@ var Le = /* @__PURE__ */ new Set([
2296
2296
  57,
2297
2297
  58
2298
2298
  ]);
2299
- function Re(e) {
2299
+ function ze(e) {
2300
2300
  let t = e.replace(/"[^"]*"/g, "").replace(/\\./g, "").replace(/\[[^\]]*\]/g, "").split(";")[0];
2301
2301
  return /[dy]/i.test(t);
2302
2302
  }
2303
- function ze(e) {
2303
+ function Be(e) {
2304
2304
  let t = /* @__PURE__ */ new Set();
2305
2305
  if (!e) return t;
2306
- let n = U(e), r = /* @__PURE__ */ new Map();
2306
+ let n = H(e), r = /* @__PURE__ */ new Map();
2307
2307
  for (let e of Array.from(n.querySelectorAll("numFmts > numFmt"))) r.set(parseInt(e.getAttribute("numFmtId") ?? "", 10), e.getAttribute("formatCode") ?? "");
2308
2308
  return Array.from(n.querySelectorAll("cellXfs > xf")).forEach((e, n) => {
2309
2309
  let i = parseInt(e.getAttribute("numFmtId") ?? "0", 10), a = r.get(i);
2310
- (a === void 0 ? Le.has(i) : Re(a)) && t.add(n);
2310
+ (a === void 0 ? Re.has(i) : ze(a)) && t.add(n);
2311
2311
  }), t;
2312
2312
  }
2313
- function Be(e) {
2313
+ function Ve(e) {
2314
2314
  if (!e) return !1;
2315
- let t = U(e).querySelector("workbookPr")?.getAttribute("date1904");
2315
+ let t = H(e).querySelector("workbookPr")?.getAttribute("date1904");
2316
2316
  return t === "1" || t === "true";
2317
2317
  }
2318
- function Ve(e, t) {
2318
+ function He(e, t) {
2319
2319
  return new Date((t ? Date.UTC(1904, 0, 1) : Date.UTC(1899, 11, 30)) + Math.floor(e) * 864e5).toISOString().slice(0, 10);
2320
2320
  }
2321
- function He(e, t, n, r) {
2322
- let i = U(e).querySelectorAll("row");
2321
+ function Ue(e, t, n, r) {
2322
+ let i = H(e).querySelectorAll("row");
2323
2323
  if (i.length === 0) return [];
2324
2324
  let a = 0, o = /* @__PURE__ */ new Map();
2325
2325
  for (let e of i) {
2326
2326
  let i = parseInt(e.getAttribute("r") ?? "1", 10) - 1, s = /* @__PURE__ */ new Map();
2327
2327
  o.set(i, s);
2328
2328
  for (let i of e.querySelectorAll("c")) {
2329
- let e = Ue(i.getAttribute("r") ?? "");
2329
+ let e = We(i.getAttribute("r") ?? "");
2330
2330
  e > a && (a = e);
2331
2331
  let o = i.getAttribute("t") ?? "", c = i.getAttribute("s") ?? "", l = i.querySelector("v")?.textContent ?? "", u = i.querySelector("is > t")?.textContent ?? null, d;
2332
2332
  if (o === "s") d = t[parseInt(l, 10)] ?? "";
@@ -2335,7 +2335,7 @@ function He(e, t, n, r) {
2335
2335
  else if (l === "") d = "";
2336
2336
  else {
2337
2337
  let e = parseFloat(l);
2338
- d = c !== "" && n.has(parseInt(c, 10)) && !isNaN(e) && e >= 0 ? Ve(e, r) : l;
2338
+ d = c !== "" && n.has(parseInt(c, 10)) && !isNaN(e) && e >= 0 ? He(e, r) : l;
2339
2339
  }
2340
2340
  s.set(e, d);
2341
2341
  }
@@ -2349,13 +2349,13 @@ function He(e, t, n, r) {
2349
2349
  }
2350
2350
  return c;
2351
2351
  }
2352
- function Ue(e) {
2352
+ function We(e) {
2353
2353
  let t = 0, n = 0;
2354
2354
  for (; n < e.length && e[n] >= "A" && e[n] <= "Z";) t = t * 26 + (e.charCodeAt(n) - 64), n++;
2355
2355
  return t - 1;
2356
2356
  }
2357
- async function W(e) {
2358
- let t = await Pe(e), n = Ie(t.get("xl/sharedStrings.xml")), r = t.get("xl/worksheets/sheet1.xml");
2357
+ async function U(e) {
2358
+ let t = await Fe(e), n = Le(t.get("xl/sharedStrings.xml")), r = t.get("xl/worksheets/sheet1.xml");
2359
2359
  if (!r) {
2360
2360
  for (let [e, n] of t) if (e.toLowerCase().includes("worksheets/sheet")) {
2361
2361
  r = n;
@@ -2363,7 +2363,7 @@ async function W(e) {
2363
2363
  }
2364
2364
  }
2365
2365
  if (!r) throw Error("XLSX: No worksheet found");
2366
- let i = ze(t.get("xl/styles.xml")), a = Be(t.get("xl/workbook.xml")), o = He(r, n, i, a);
2366
+ let i = Be(t.get("xl/styles.xml")), a = Ve(t.get("xl/workbook.xml")), o = Ue(r, n, i, a);
2367
2367
  return o.length === 0 ? {
2368
2368
  headers: [],
2369
2369
  rows: []
@@ -2374,10 +2374,15 @@ async function W(e) {
2374
2374
  }
2375
2375
  //#endregion
2376
2376
  //#region src/models/types.ts
2377
- function G(e) {
2377
+ function W(e) {
2378
2378
  return e.align ? e.align : e.type === "number" ? "end" : e.type === "boolean" ? "center" : "start";
2379
2379
  }
2380
2380
  //#endregion
2381
+ //#region node_modules/@iyulab/components/dist/utilities/keyboard.js
2382
+ function G(e) {
2383
+ return e.isComposing || e.keyCode === 229;
2384
+ }
2385
+ //#endregion
2381
2386
  //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorate.js
2382
2387
  function K(e, t, n, r) {
2383
2388
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
@@ -2394,9 +2399,9 @@ var q = {
2394
2399
  lt: "<",
2395
2400
  gte: "≥",
2396
2401
  lte: "≤"
2397
- }, J = 120, Y = 40, X = 20, Z = 32, Q = 5, We = 200, $ = class extends n {
2402
+ }, J = 120, Y = 40, X = 20, Z = 32, Q = 5, Ge = 200, $ = class extends n {
2398
2403
  constructor(...e) {
2399
- super(...e), this.columns = [], this._data = [], this._inUndoRedo = !1, this.clearUndoOnDataChange = !1, this.clearSelectionOnDataChange = !1, this._rowHeightFromCss = Z, this.showRowNumbers = !1, this.theme = void 0, this.maxRows = 0, this.editable = !0, this.showFilters = !1, this.showContextMenu = !1, this.frozenRows = 0, this.emptyMessage = "No data", this.noMatchingMessage = "No matching data", this.loading = !1, this.importEnabled = !1, this.selectable = !1, this.dataMode = "client", this.footerData = null, this.stylesheets = [], this._scrollTop = 0, this._scrollLeft = 0, this._viewportHeight = 0, this._viewportWidth = 0, this._colLeftOffsets = [], this._totalRowWidth = 0, this._baseStyleSheets = [], this._activeCell = null, this._editingCell = null, this._sortCriteria = [], this._selection = new j(), this._editing = new se(), this._rowSelection = new M(), this._undo = new N(), this._filters = [], this._filteredIndices = [], this._sortedIndices = [], this._openFilterKey = null, this._rowSelectionVersion = 0, this._lastCheckboxRowIndex = null, this._checkboxShiftPending = !1, this._autocompleteState = null, this._headerMenu = null, this._bodyContextMenu = null, this._commentPopup = null, this._viewDirty = !0, this._isDragging = !1, this._wasDrag = !1, this._resizing = null, this._resizeCleanup = null, this._wasHeaderDrag = !1, this._wasRowDrag = !1, this._colDrag = null, this._colDragIndicatorLeft = null, this._fillDrag = null, this._rowDrag = null, this._rowDragIndicatorY = null, this._findState = null, this._columnWidths = /* @__PURE__ */ new Map(), this._hostResizeObserver = null, this._comments = /* @__PURE__ */ new Map(), this._isDragOver = !1, this._warnedUnconstrained = !1, this._onCommentPopupOutsideClick = () => {
2404
+ super(...e), this.columns = [], this._data = [], this._inUndoRedo = !1, this.clearUndoOnDataChange = !1, this.clearSelectionOnDataChange = !1, this._rowHeightFromCss = Z, this.showRowNumbers = !1, this.theme = void 0, this.maxRows = 0, this.editable = !0, this.showFilters = !1, this.showContextMenu = !1, this.frozenRows = 0, this.emptyMessage = "No data", this.noMatchingMessage = "No matching data", this.loading = !1, this.importEnabled = !1, this.selectable = !1, this.dataMode = "client", this.footerData = null, this.stylesheets = [], this._scrollTop = 0, this._scrollLeft = 0, this._viewportHeight = 0, this._viewportWidth = 0, this._colLeftOffsets = [], this._totalRowWidth = 0, this._baseStyleSheets = [], this._activeCell = null, this._editingCell = null, this._sortCriteria = [], this._selection = new se(), this._editing = new ce(), this._rowSelection = new j(), this._undo = new M(), this._filters = [], this._filteredIndices = [], this._sortedIndices = [], this._openFilterKey = null, this._rowSelectionVersion = 0, this._lastCheckboxRowIndex = null, this._checkboxShiftPending = !1, this._autocompleteState = null, this._headerMenu = null, this._bodyContextMenu = null, this._commentPopup = null, this._viewDirty = !0, this._isDragging = !1, this._wasDrag = !1, this._resizing = null, this._resizeCleanup = null, this._wasHeaderDrag = !1, this._wasRowDrag = !1, this._colDrag = null, this._colDragIndicatorLeft = null, this._fillDrag = null, this._rowDrag = null, this._rowDragIndicatorY = null, this._findState = null, this._columnWidths = /* @__PURE__ */ new Map(), this._hostResizeObserver = null, this._comments = /* @__PURE__ */ new Map(), this._isDragOver = !1, this._warnedUnconstrained = !1, this._onCommentPopupOutsideClick = () => {
2400
2405
  this._commitCommentPopup();
2401
2406
  }, this._invalidCells = /* @__PURE__ */ new Map(), this._textFilterState = /* @__PURE__ */ new Map(), this._numberFilterState = /* @__PURE__ */ new Map(), this._dateFilterState = /* @__PURE__ */ new Map(), this._emptyFilterState = /* @__PURE__ */ new Map();
2402
2407
  }
@@ -2761,12 +2766,12 @@ var q = {
2761
2766
  if (!t) return "";
2762
2767
  let n = this.visibleColumns.slice(t.startCol, t.endCol + 1), r = [];
2763
2768
  for (let e = t.startRow; e <= t.endRow; e++) r.push(this.data[this._toDataIndex(e)]);
2764
- return B(r, n, e);
2769
+ return z(r, n, e);
2765
2770
  }
2766
- return B(this._sortedIndices.map((e) => this.data[e]), this.visibleColumns, e);
2771
+ return z(this._sortedIndices.map((e) => this.data[e]), this.visibleColumns, e);
2767
2772
  }
2768
2773
  exportToFile(e, t) {
2769
- Te(this.exportToString(e), t ?? `export${ke(e)}`, Oe(e));
2774
+ Ee(this.exportToString(e), t ?? `export${Ae(e)}`, ke(e));
2770
2775
  }
2771
2776
  setComment(e, t, n) {
2772
2777
  let r = this.getComment(e, t);
@@ -2823,10 +2828,10 @@ var q = {
2823
2828
  async importFromFile(e) {
2824
2829
  let t = e.name.toLowerCase();
2825
2830
  if (t.endsWith(".xlsx")) {
2826
- let t = await W(await e.arrayBuffer());
2831
+ let t = await U(await e.arrayBuffer());
2827
2832
  this._applyImportedSheet(t);
2828
2833
  } else if (t.endsWith(".csv") || t.endsWith(".tsv")) {
2829
- let t = P(await e.text());
2834
+ let t = N(await e.text());
2830
2835
  this._applyImportedRows(t);
2831
2836
  } else console.warn(`flex-table importFromFile: unsupported file type "${e.name}"`);
2832
2837
  }
@@ -2837,7 +2842,7 @@ var q = {
2837
2842
  let a = t.get(e);
2838
2843
  if (!a) return;
2839
2844
  let o = this.columns.find((e) => e.key === a);
2840
- r[a] = o ? F(n[i] ?? "", o) : n[i] ?? null;
2845
+ r[a] = o ? P(n[i] ?? "", o) : n[i] ?? null;
2841
2846
  }), r;
2842
2847
  }), r = [...this.data];
2843
2848
  this.data = n, this._undo.push({
@@ -2862,7 +2867,7 @@ var q = {
2862
2867
  let a = n.get(t);
2863
2868
  if (!a) return;
2864
2869
  let o = this.columns.find((e) => e.key === a);
2865
- r[a] = o ? F(e[i] ?? "", o) : e[i] ?? null;
2870
+ r[a] = o ? P(e[i] ?? "", o) : e[i] ?? null;
2866
2871
  }), r;
2867
2872
  }), i = [...this.data];
2868
2873
  this.data = r, this._undo.push({
@@ -3016,7 +3021,7 @@ var q = {
3016
3021
  this._filteredIndices = Array.from({ length: this.data.length }, (e, t) => t), this._sortedIndices = this._filteredIndices;
3017
3022
  return;
3018
3023
  }
3019
- if (this._filteredIndices = ce(this.data, this._filters, (e, t, n) => {
3024
+ if (this._filteredIndices = le(this.data, this._filters, (e, t, n) => {
3020
3025
  this.dispatchEvent(new CustomEvent("filter-error", {
3021
3026
  detail: {
3022
3027
  error: e,
@@ -3046,7 +3051,7 @@ var q = {
3046
3051
  e !== this._viewportHeight && (this._viewportHeight = e), t !== this._viewportWidth && (this._viewportWidth = t), this._warnIfUnconstrained();
3047
3052
  }
3048
3053
  _warnIfUnconstrained() {
3049
- this._warnedUnconstrained || process.env.NODE_ENV === "production" || this._visibleRowCount < We || this.scrollHeight > this.clientHeight + 1 || (this._warnedUnconstrained = !0, console.warn(`[@iyulab/flex-table] ${this._visibleRowCount} rows but the host has no height constraint — it grew to fit every row, so virtual scrolling is off and all rows are rendered. Give the host a height (e.g. height: 400px, or flex: 1 1 auto with min-height: 0 inside a sized parent) so it becomes the scroll container.`));
3054
+ this._warnedUnconstrained || process.env.NODE_ENV === "production" || this._visibleRowCount < Ge || this.scrollHeight > this.clientHeight + 1 || (this._warnedUnconstrained = !0, console.warn(`[@iyulab/flex-table] ${this._visibleRowCount} rows but the host has no height constraint — it grew to fit every row, so virtual scrolling is off and all rows are rendered. Give the host a height (e.g. height: 400px, or flex: 1 1 auto with min-height: 0 inside a sized parent) so it becomes the scroll container.`));
3050
3055
  }
3051
3056
  _onScroll() {
3052
3057
  this._scrollTop = this.scrollTop, this._scrollLeft = this.scrollLeft;
@@ -3176,7 +3181,7 @@ var q = {
3176
3181
  }
3177
3182
  let t = this.shadowRoot?.querySelector(".ft-editor");
3178
3183
  if (t) {
3179
- let n = F(t.value, e);
3184
+ let n = P(t.value, e);
3180
3185
  this._applyEdit(n);
3181
3186
  } else this._cancelEdit();
3182
3187
  }
@@ -3250,35 +3255,37 @@ var q = {
3250
3255
  }));
3251
3256
  }
3252
3257
  _onEditorKeyDown(e) {
3253
- if (this._autocompleteState && this._autocompleteState.candidates.length > 0) {
3254
- if (e.key === "ArrowDown") {
3255
- e.preventDefault(), e.stopPropagation();
3256
- let t = this._autocompleteState.candidates.length;
3257
- this._autocompleteState = {
3258
- ...this._autocompleteState,
3259
- activeIndex: Math.min(this._autocompleteState.activeIndex + 1, t - 1)
3260
- };
3261
- return;
3262
- }
3263
- if (e.key === "ArrowUp") {
3264
- e.preventDefault(), e.stopPropagation(), this._autocompleteState = {
3265
- ...this._autocompleteState,
3266
- activeIndex: Math.max(this._autocompleteState.activeIndex - 1, -1)
3267
- };
3268
- return;
3269
- }
3270
- if (e.key === "Enter" && this._autocompleteState.activeIndex >= 0) {
3271
- e.preventDefault(), e.stopPropagation();
3272
- let t = this._autocompleteState.candidates[this._autocompleteState.activeIndex];
3273
- this._selectAutocompleteCandidate(t);
3274
- return;
3275
- }
3276
- if (e.key === "Escape") {
3277
- e.preventDefault(), e.stopPropagation(), this._autocompleteState = null;
3278
- return;
3258
+ if (!G(e)) {
3259
+ if (this._autocompleteState && this._autocompleteState.candidates.length > 0) {
3260
+ if (e.key === "ArrowDown") {
3261
+ e.preventDefault(), e.stopPropagation();
3262
+ let t = this._autocompleteState.candidates.length;
3263
+ this._autocompleteState = {
3264
+ ...this._autocompleteState,
3265
+ activeIndex: Math.min(this._autocompleteState.activeIndex + 1, t - 1)
3266
+ };
3267
+ return;
3268
+ }
3269
+ if (e.key === "ArrowUp") {
3270
+ e.preventDefault(), e.stopPropagation(), this._autocompleteState = {
3271
+ ...this._autocompleteState,
3272
+ activeIndex: Math.max(this._autocompleteState.activeIndex - 1, -1)
3273
+ };
3274
+ return;
3275
+ }
3276
+ if (e.key === "Enter" && this._autocompleteState.activeIndex >= 0) {
3277
+ e.preventDefault(), e.stopPropagation();
3278
+ let t = this._autocompleteState.candidates[this._autocompleteState.activeIndex];
3279
+ this._selectAutocompleteCandidate(t);
3280
+ return;
3281
+ }
3282
+ if (e.key === "Escape") {
3283
+ e.preventDefault(), e.stopPropagation(), this._autocompleteState = null;
3284
+ return;
3285
+ }
3279
3286
  }
3287
+ e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), this._commitEdit(), this._selection.moveDown(), this._syncActiveCell()) : e.key === "Tab" ? (e.preventDefault(), e.stopPropagation(), this._commitEdit(), e.shiftKey ? this._selection.movePrev() : this._selection.moveNext(), this._syncActiveCell()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), this._cancelEdit());
3280
3288
  }
3281
- e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), this._commitEdit(), this._selection.moveDown(), this._syncActiveCell()) : e.key === "Tab" ? (e.preventDefault(), e.stopPropagation(), this._commitEdit(), e.shiftKey ? this._selection.movePrev() : this._selection.moveNext(), this._syncActiveCell()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), this._cancelEdit());
3282
3289
  }
3283
3290
  _getAutocompleteCandidates(e, t) {
3284
3291
  let n = t.toLowerCase(), r = /* @__PURE__ */ new Set(), i = [];
@@ -3316,7 +3323,7 @@ var q = {
3316
3323
  ].includes(t) && this._handleCtrlKey(e)) return;
3317
3324
  }
3318
3325
  if (t.length !== 0 && this._visibleRowCount !== 0) {
3319
- if ((e.key === "Enter" || e.key === "F2") && this._activeCell) {
3326
+ if ((e.key === "Enter" || e.key === "F2") && this._activeCell && !G(e)) {
3320
3327
  e.preventDefault();
3321
3328
  let n = t[this._activeCell.col];
3322
3329
  n && this._isCellEditable(n) ? this._startEdit() : e.key === "Enter" && this._fireRowActivate(n);
@@ -3404,7 +3411,7 @@ var q = {
3404
3411
  async _handleCopy(e) {
3405
3412
  let t = this._selection.getEffectiveRange();
3406
3413
  if (!t) return;
3407
- let n = this.visibleColumns, r = ue(this._sortedIndices.map((e) => this.data[e]), n, t);
3414
+ let n = this.visibleColumns, r = de(this._sortedIndices.map((e) => this.data[e]), n, t);
3408
3415
  try {
3409
3416
  await navigator.clipboard.writeText(r);
3410
3417
  } catch (e) {
@@ -3430,7 +3437,7 @@ var q = {
3430
3437
  if (!this._activeCell) return;
3431
3438
  let e = await this._readClipboardText();
3432
3439
  if (e == null) return;
3433
- let t = P(e);
3440
+ let t = N(e);
3434
3441
  if (t.length === 0) return;
3435
3442
  let n = this._expandRowsForPaste(this._activeCell.row, t.length), r = this._applyPasteData(this._activeCell, t);
3436
3443
  if (r.length > 0 || n.length > 0) {
@@ -3488,7 +3495,7 @@ var q = {
3488
3495
  for (let a = 0; a < t[i].length; a++) {
3489
3496
  let s = e.col + a;
3490
3497
  if (s >= n.length) break;
3491
- let c = n[s], l = this.data[o][c.key], u = F(t[i][a], c);
3498
+ let c = n[s], l = this.data[o][c.key], u = P(t[i][a], c);
3492
3499
  this.data[o][c.key] = u, r.push({
3493
3500
  row: o,
3494
3501
  col: s,
@@ -3553,7 +3560,7 @@ var q = {
3553
3560
  for (let r = e.startCol + 1; r <= e.endCol; r++) {
3554
3561
  let e = t[r];
3555
3562
  if (!e || !this._isCellEditable(e)) continue;
3556
- let a = F(o == null ? "" : String(o), e);
3563
+ let a = P(o == null ? "" : String(o), e);
3557
3564
  n.push({
3558
3565
  row: i,
3559
3566
  key: e.key,
@@ -3690,7 +3697,7 @@ var q = {
3690
3697
  return Math.min(n, i);
3691
3698
  }
3692
3699
  _renderHeaderCell(e, t) {
3693
- let n = e.sortable !== !1, r = this._sortCriteria.find((t) => t.key === e.key), o = this._sortCriteria.length > 1 ? this._sortCriteria.findIndex((t) => t.key === e.key) : -1, s = this._filters.some((t) => t.key === e.key), c = e.pinned === "left", l = e.pinned === "right", u = c || l, d = e.headerAlign ?? G(e), f = [
3700
+ let n = e.sortable !== !1, r = this._sortCriteria.find((t) => t.key === e.key), o = this._sortCriteria.length > 1 ? this._sortCriteria.findIndex((t) => t.key === e.key) : -1, s = this._filters.some((t) => t.key === e.key), c = e.pinned === "left", l = e.pinned === "right", u = c || l, d = e.headerAlign ?? W(e), f = [
3694
3701
  "ft-header-cell",
3695
3702
  n ? "ft-sortable" : "",
3696
3703
  u ? "ft-pinned" : "",
@@ -4662,7 +4669,7 @@ var q = {
4662
4669
  this._closeFindPanel();
4663
4670
  return;
4664
4671
  }
4665
- e.key === "Enter" && e.target instanceof HTMLInputElement && e.target.classList.contains("ft-find-input") && (e.shiftKey ? this._findPrev() : this._findNext());
4672
+ e.key === "Enter" && !G(e) && e.target instanceof HTMLInputElement && e.target.classList.contains("ft-find-input") && (e.shiftKey ? this._findPrev() : this._findNext());
4666
4673
  }}>
4667
4674
  <div class="ft-find-row">
4668
4675
  <input class="ft-find-input" type="text" placeholder=${A("findPlaceholder")}
@@ -4848,7 +4855,7 @@ var q = {
4848
4855
  let _ = o || c, v = this._isCellInvalid(n, r), y = (this._findState?.results ?? []).findIndex((e) => e.row === n && e.col === r), b = y >= 0, x = b && y === this._findState.currentIndex, S = [
4849
4856
  "ft-cell",
4850
4857
  `ft-type-${t.type ?? "text"}`,
4851
- `ft-align-${G(t)}`,
4858
+ `ft-align-${W(t)}`,
4852
4859
  o ? "ft-active" : "",
4853
4860
  c ? "ft-selected" : "",
4854
4861
  d ? "ft-pinned" : "",
@@ -5007,4 +5014,4 @@ K([s({ type: Array })], $.prototype, "columns", void 0), K([s({
5007
5014
  attribute: "max-undo-size"
5008
5015
  })], $.prototype, "maxUndoSize", null), K([c()], $.prototype, "_scrollTop", void 0), K([c()], $.prototype, "_scrollLeft", void 0), K([c()], $.prototype, "_viewportHeight", void 0), K([c()], $.prototype, "_viewportWidth", void 0), K([c()], $.prototype, "_activeCell", void 0), K([c()], $.prototype, "_editingCell", void 0), K([c()], $.prototype, "_sortCriteria", void 0), K([c()], $.prototype, "_openFilterKey", void 0), K([c()], $.prototype, "_rowSelectionVersion", void 0), K([c()], $.prototype, "_autocompleteState", void 0), K([c()], $.prototype, "_headerMenu", void 0), K([c()], $.prototype, "_bodyContextMenu", void 0), K([c()], $.prototype, "_commentPopup", void 0), K([c()], $.prototype, "_isDragOver", void 0), $ = K([o("flex-table")], $);
5009
5016
  //#endregion
5010
- export { M as a, N as i, G as n, k as o, B as r, O as s, $ as t };
5017
+ export { j as a, M as i, W as n, k as o, z as r, O as s, $ as t };