@gui-chat-plugin/spreadsheet 0.5.0 → 0.5.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.
package/dist/vue.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as TOOL_DEFINITION, i as SYSTEM_PROMPT, n as executeSpreadsheet, o as TOOL_NAME, r as pluginCore, t as samples } from "./samples-DkxfVw3O.js";
1
+ import { a as TOOL_DEFINITION, i as SYSTEM_PROMPT, n as executeSpreadsheet, o as TOOL_NAME, r as pluginCore, t as samples } from "./samples-sKAnErVb.js";
2
2
  import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, onMounted, onUnmounted, openBlock, ref, renderList, toDisplayString, unref, vModelRadio, vModelText, watch, withDirectives, withKeys } from "vue";
3
3
  //#region node_modules/xlsx/xlsx.mjs
4
4
  var XLSX = {};
@@ -83,9 +83,9 @@ function Base64_decode(e) {
83
83
  for (var u = 0; u < e.length;) o = Base64_map.indexOf(e.charAt(u++)), s = Base64_map.indexOf(e.charAt(u++)), n = o << 2 | s >> 4, t += String.fromCharCode(n), c = Base64_map.indexOf(e.charAt(u++)), r = (s & 15) << 4 | c >> 2, c !== 64 && (t += String.fromCharCode(r)), l = Base64_map.indexOf(e.charAt(u++)), a = (c & 3) << 6 | l, l !== 64 && (t += String.fromCharCode(a));
84
84
  return t;
85
85
  }
86
- var has_buf = /* @__PURE__ */ (function() {
86
+ var has_buf = /*#__PURE__*/ (function() {
87
87
  return typeof Buffer < "u" && typeof process < "u" && process.versions !== void 0 && !!process.versions.node;
88
- })(), Buffer_from = /* @__PURE__ */ (function() {
88
+ })(), Buffer_from = /*#__PURE__*/ (function() {
89
89
  if (typeof Buffer < "u") {
90
90
  var e = !Buffer.from;
91
91
  if (!e) try {
@@ -98,7 +98,7 @@ var has_buf = /* @__PURE__ */ (function() {
98
98
  } : Buffer.from.bind(Buffer);
99
99
  }
100
100
  return function() {};
101
- })(), buf_utf16le = /* @__PURE__ */ (function() {
101
+ })(), buf_utf16le = /*#__PURE__*/ (function() {
102
102
  if (typeof Buffer > "u") return !1;
103
103
  var e = Buffer_from([65, 0]);
104
104
  return e ? e.toString("utf16le").length == 1 : !1;
@@ -1257,7 +1257,7 @@ var bad_formats = { "d.m": "d\\.m" };
1257
1257
  function SSF__load(e, t) {
1258
1258
  return SSF_load(bad_formats[e] || e, t);
1259
1259
  }
1260
- var CRC32 = /* @__PURE__ */ (function() {
1260
+ var CRC32 = /*#__PURE__*/ (function() {
1261
1261
  var e = {};
1262
1262
  e.version = "1.2.0";
1263
1263
  function t() {
@@ -1266,7 +1266,7 @@ var CRC32 = /* @__PURE__ */ (function() {
1266
1266
  }
1267
1267
  var n = t();
1268
1268
  function r(e) {
1269
- var t = 0, n = 0, r = 0, a = typeof Int32Array < "u" ? new Int32Array(4096) : Array(4096);
1269
+ var t = 0, n = 0, r = 0, a = typeof Int32Array < "u" ? /* @__PURE__ */ new Int32Array(4096) : Array(4096);
1270
1270
  for (r = 0; r != 256; ++r) a[r] = e[r];
1271
1271
  for (r = 0; r != 256; ++r) for (n = e[r], t = 256 + r; t < 4096; t += 256) n = a[t] = n >>> 8 ^ e[n & 255];
1272
1272
  var o = [];
@@ -1288,7 +1288,7 @@ var CRC32 = /* @__PURE__ */ (function() {
1288
1288
  return ~r;
1289
1289
  }
1290
1290
  return e.table = n, e.bstr = x, e.buf = S, e.str = C, e;
1291
- })(), CFB = /* @__PURE__ */ (function() {
1291
+ })(), CFB = /*#__PURE__*/ (function() {
1292
1292
  var e = {};
1293
1293
  e.version = "1.2.2";
1294
1294
  function t(e, t) {
@@ -1816,7 +1816,7 @@ var CRC32 = /* @__PURE__ */ (function() {
1816
1816
  var t = (e << 1 | e << 11) & 139536 | (e << 5 | e << 15) & 558144;
1817
1817
  return (t >> 16 | t >> 8 | t) & 255;
1818
1818
  }
1819
- for (var V = typeof Uint8Array < "u", H = V ? new Uint8Array(256) : [], U = 0; U < 256; ++U) H[U] = re(U);
1819
+ for (var V = typeof Uint8Array < "u", H = V ? /* @__PURE__ */ new Uint8Array(256) : [], U = 0; U < 256; ++U) H[U] = re(U);
1820
1820
  function ie(e, t) {
1821
1821
  var n = H[e & 255];
1822
1822
  return t <= 8 ? n >>> 8 - t : (n = n << 8 | H[e >> 8 & 255], t <= 16 ? n >>> 16 - t : (n = n << 8 | H[e >> 16 & 255], n >>> 24 - t));
@@ -1882,7 +1882,7 @@ var CRC32 = /* @__PURE__ */ (function() {
1882
1882
  return t;
1883
1883
  }
1884
1884
  function Y(e, t, n) {
1885
- var r = 1, a = 0, o = 0, s = 0, c = 0, l = e.length, u = V ? new Uint16Array(32) : J(32);
1885
+ var r = 1, a = 0, o = 0, s = 0, c = 0, l = e.length, u = V ? /* @__PURE__ */ new Uint16Array(32) : J(32);
1886
1886
  for (o = 0; o < 32; ++o) u[o] = 0;
1887
1887
  for (o = l; o < n; ++o) e[o] = 0;
1888
1888
  l = e.length;
@@ -1894,7 +1894,7 @@ var CRC32 = /* @__PURE__ */ (function() {
1894
1894
  for (o = 0; o < l; ++o) if (f = e[o], f != 0) for (c = ie(d[o], r) >> r - f, s = (1 << r + 4 - f) - 1; s >= 0; --s) t[c | s << f] = f & 15 | o << 4;
1895
1895
  return r;
1896
1896
  }
1897
- var X = V ? new Uint16Array(512) : J(512), Z = V ? new Uint16Array(32) : J(32);
1897
+ var X = V ? /* @__PURE__ */ new Uint16Array(512) : J(512), Z = V ? /* @__PURE__ */ new Uint16Array(32) : J(32);
1898
1898
  if (!V) {
1899
1899
  for (var Q = 0; Q < 512; ++Q) X[Q] = 0;
1900
1900
  for (Q = 0; Q < 32; ++Q) Z[Q] = 0;
@@ -1909,10 +1909,10 @@ var CRC32 = /* @__PURE__ */ (function() {
1909
1909
  for (; t <= 287; t++) n.push(8);
1910
1910
  Y(n, X, 288);
1911
1911
  })();
1912
- var fe = /* @__PURE__ */ (function() {
1913
- for (var e = V ? new Uint8Array(32768) : [], t = 0, n = 0; t < B.length - 1; ++t) for (; n < B[t + 1]; ++n) e[n] = t;
1912
+ var fe = /*#__PURE__*/ (function() {
1913
+ for (var e = V ? /* @__PURE__ */ new Uint8Array(32768) : [], t = 0, n = 0; t < B.length - 1; ++t) for (; n < B[t + 1]; ++n) e[n] = t;
1914
1914
  for (; n < 32768; ++n) e[n] = 29;
1915
- var r = V ? new Uint8Array(259) : [];
1915
+ var r = V ? /* @__PURE__ */ new Uint8Array(259) : [];
1916
1916
  for (t = 0, n = 0; t < z.length - 1; ++t) for (; n < z[t + 1]; ++n) r[n] = t;
1917
1917
  function a(e, t) {
1918
1918
  for (var n = 0; n < e.length;) {
@@ -1922,7 +1922,7 @@ var CRC32 = /* @__PURE__ */ (function() {
1922
1922
  return t.l;
1923
1923
  }
1924
1924
  function o(t, n) {
1925
- for (var a = 0, o = 0, s = V ? new Uint16Array(32768) : []; o < t.length;) {
1925
+ for (var a = 0, o = 0, s = V ? /* @__PURE__ */ new Uint16Array(32768) : []; o < t.length;) {
1926
1926
  var c = Math.min(65535, t.length - o);
1927
1927
  if (c < 10) {
1928
1928
  for (a = le(n, a, +(o + c == t.length)), a & 7 && (a += 8 - (a & 7)), n.l = a / 8 | 0, n.write_shift(2, c), n.write_shift(2, ~c & 65535); c-- > 0;) n[n.l++] = t[o++];
@@ -1957,7 +1957,7 @@ var CRC32 = /* @__PURE__ */ (function() {
1957
1957
  var t = new_buf(50 + Math.floor(e.length * 1.1)), n = fe(e, t);
1958
1958
  return t.slice(0, n);
1959
1959
  }
1960
- var me = V ? new Uint16Array(32768) : J(32768), he = V ? new Uint16Array(32768) : J(32768), ge = V ? new Uint16Array(128) : J(128), _e = 1, ve = 1;
1960
+ var me = V ? /* @__PURE__ */ new Uint16Array(32768) : J(32768), he = V ? /* @__PURE__ */ new Uint16Array(32768) : J(32768), ge = V ? /* @__PURE__ */ new Uint16Array(128) : J(128), _e = 1, ve = 1;
1961
1961
  function ye(e, t) {
1962
1962
  var n = se(e, t) + 257;
1963
1963
  t += 5;
@@ -1965,7 +1965,7 @@ var CRC32 = /* @__PURE__ */ (function() {
1965
1965
  t += 5;
1966
1966
  var a = oe(e, t) + 4;
1967
1967
  t += 4;
1968
- for (var o = 0, s = V ? new Uint8Array(19) : J(19), c = [
1968
+ for (var o = 0, s = V ? /* @__PURE__ */ new Uint8Array(19) : J(19), c = [
1969
1969
  0,
1970
1970
  0,
1971
1971
  0,
@@ -1985,7 +1985,7 @@ var CRC32 = /* @__PURE__ */ (function() {
1985
1985
  0,
1986
1986
  0,
1987
1987
  0
1988
- ], l = 1, u = V ? new Uint8Array(8) : J(8), d = V ? new Uint8Array(8) : J(8), f = s.length, p = 0; p < a; ++p) s[ne[p]] = o = W(e, t), l < o && (l = o), u[o]++, t += 3;
1988
+ ], l = 1, u = V ? /* @__PURE__ */ new Uint8Array(8) : J(8), d = V ? /* @__PURE__ */ new Uint8Array(8) : J(8), f = s.length, p = 0; p < a; ++p) s[ne[p]] = o = W(e, t), l < o && (l = o), u[o]++, t += 3;
1989
1989
  var m = 0;
1990
1990
  for (u[0] = 0, p = 1; p <= l; ++p) d[p] = m = m + u[p - 1] << 1;
1991
1991
  for (p = 0; p < f; ++p) (m = s[p]) != 0 && (c[p] = d[m]++);
@@ -2354,7 +2354,7 @@ function evert_arr(e) {
2354
2354
  for (var t = [], n = keys(e), r = 0; r !== n.length; ++r) t[e[n[r]]] ?? (t[e[n[r]]] = []), t[e[n[r]]].push(n[r]);
2355
2355
  return t;
2356
2356
  }
2357
- var dnthresh = /* @__PURE__ */ Date.UTC(1899, 11, 30, 0, 0, 0), dnthresh1 = /* @__PURE__ */ Date.UTC(1899, 11, 31, 0, 0, 0), dnthresh2 = /* @__PURE__ */ Date.UTC(1904, 0, 1, 0, 0, 0);
2357
+ var dnthresh = /*#__PURE__*/ Date.UTC(1899, 11, 30, 0, 0, 0), dnthresh1 = /*#__PURE__*/ Date.UTC(1899, 11, 31, 0, 0, 0), dnthresh2 = /*#__PURE__*/ Date.UTC(1904, 0, 1, 0, 0, 0);
2358
2358
  function datenum(e, t) {
2359
2359
  var n = (/* @__PURE__ */ e.getTime() - dnthresh) / (1440 * 60 * 1e3);
2360
2360
  return t ? (n -= 1462, n < -1402 ? n - 1 : n) : n < 60 ? n - 1 : n;
@@ -2513,7 +2513,7 @@ var XML_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\
2513
2513
  "&gt;": ">",
2514
2514
  "&lt;": "<",
2515
2515
  "&amp;": "&"
2516
- }, rencoding = /* @__PURE__ */ evert(encodings), decregex = /[&<>'"]/g, charegex = /[\u0000-\u0008\u000b-\u001f\uFFFE-\uFFFF]/g;
2516
+ }, rencoding = /*#__PURE__*/ evert(encodings), decregex = /[&<>'"]/g, charegex = /[\u0000-\u0008\u000b-\u001f\uFFFE-\uFFFF]/g;
2517
2517
  function escapexml(e) {
2518
2518
  return (e + "").replace(decregex, function(e) {
2519
2519
  return rencoding[e];
@@ -2581,7 +2581,7 @@ function utf8readb(e) {
2581
2581
  function utf8readc(e) {
2582
2582
  return Buffer_from(e, "binary").toString("utf8");
2583
2583
  }
2584
- var utf8corpus = "foo bar baz☃🍣", utf8read = has_buf && (/* @__PURE__ */ utf8readc(utf8corpus) == /* @__PURE__ */ utf8reada(utf8corpus) && utf8readc || /* @__PURE__ */ utf8readb(utf8corpus) == /* @__PURE__ */ utf8reada(utf8corpus) && utf8readb) || utf8reada, utf8write = has_buf ? function(e) {
2584
+ var utf8corpus = "foo bar baz☃🍣", utf8read = has_buf && (/*#__PURE__*/ utf8readc(utf8corpus) == /*#__PURE__*/ utf8reada(utf8corpus) && utf8readc || /*#__PURE__*/ utf8readb(utf8corpus) == /*#__PURE__*/ utf8reada(utf8corpus) && utf8readb) || utf8reada, utf8write = has_buf ? function(e) {
2585
2585
  return Buffer_from(e, "utf8").toString("binary");
2586
2586
  } : function(e) {
2587
2587
  for (var t = [], n = 0, r = 0, a = 0; n < e.length;) switch (r = e.charCodeAt(n++), !0) {
@@ -2597,7 +2597,7 @@ var utf8corpus = "foo bar baz☃🍣", utf8read = has_buf && (/* @__PURE_
2597
2597
  default: t.push(String.fromCharCode(224 + (r >> 12))), t.push(String.fromCharCode(128 + (r >> 6 & 63))), t.push(String.fromCharCode(128 + (r & 63)));
2598
2598
  }
2599
2599
  return t.join("");
2600
- }, htmldecode = /* @__PURE__ */ (function() {
2600
+ }, htmldecode = /*#__PURE__*/ (function() {
2601
2601
  var e = [
2602
2602
  ["nbsp", " "],
2603
2603
  ["middot", "·"],
@@ -3551,7 +3551,7 @@ function rgbify(e) {
3551
3551
  ];
3552
3552
  });
3553
3553
  }
3554
- var XLSIcv = /* @__PURE__ */ dup(/* @__PURE__ */ rgbify([
3554
+ var XLSIcv = /*#__PURE__*/ dup(/* @__PURE__ */ rgbify([
3555
3555
  0,
3556
3556
  16777215,
3557
3557
  16711680,
@@ -4556,7 +4556,7 @@ function write_BIFF2INT(e, t, n, r, a) {
4556
4556
  var o = new_buf(9);
4557
4557
  return write_BIFF2Cell(o, e, t, r || 0, a || 0), o.write_shift(2, n), o;
4558
4558
  }
4559
- var DBF = /* @__PURE__ */ (function() {
4559
+ var DBF = /*#__PURE__*/ (function() {
4560
4560
  var e = {
4561
4561
  1: 437,
4562
4562
  2: 850,
@@ -4918,7 +4918,7 @@ var DBF = /* @__PURE__ */ (function() {
4918
4918
  to_sheet: r,
4919
4919
  from_sheet: s
4920
4920
  };
4921
- })(), SYLK = /* @__PURE__ */ (function() {
4921
+ })(), SYLK = /*#__PURE__*/ (function() {
4922
4922
  var e = {
4923
4923
  AA: "À",
4924
4924
  BA: "Á",
@@ -5258,7 +5258,7 @@ var DBF = /* @__PURE__ */ (function() {
5258
5258
  to_workbook: c,
5259
5259
  from_sheet: p
5260
5260
  };
5261
- })(), DIF = /* @__PURE__ */ (function() {
5261
+ })(), DIF = /*#__PURE__*/ (function() {
5262
5262
  function e(e, n) {
5263
5263
  switch (n.type) {
5264
5264
  case "base64": return t(Base64_decode(e), n);
@@ -5354,7 +5354,7 @@ var DBF = /* @__PURE__ */ (function() {
5354
5354
  to_sheet: n,
5355
5355
  from_sheet: s
5356
5356
  };
5357
- })(), ETH = /* @__PURE__ */ (function() {
5357
+ })(), ETH = /*#__PURE__*/ (function() {
5358
5358
  function e(e) {
5359
5359
  return e.replace(/\\b/g, "\\").replace(/\\c/g, ":").replace(/\\n/g, "\n");
5360
5360
  }
@@ -5449,7 +5449,7 @@ var DBF = /* @__PURE__ */ (function() {
5449
5449
  to_sheet: r,
5450
5450
  from_sheet: d
5451
5451
  };
5452
- })(), PRN = /* @__PURE__ */ (function() {
5452
+ })(), PRN = /*#__PURE__*/ (function() {
5453
5453
  function e(e, t, n, r, a) {
5454
5454
  a.raw ? t[n][r] = e : e === "" || (e === "TRUE" ? t[n][r] = !0 : e === "FALSE" ? t[n][r] = !1 : isNaN(fuzzynum(e)) ? isNaN(fuzzydate(e).getDate()) ? e.charCodeAt(0) == 35 && RBErr[e] != null ? t[n][r] = {
5455
5455
  t: "e",
@@ -5588,7 +5588,7 @@ var DBF = /* @__PURE__ */ (function() {
5588
5588
  to_sheet: c,
5589
5589
  from_sheet: u
5590
5590
  };
5591
- })(), WK_ = /* @__PURE__ */ (function() {
5591
+ })(), WK_ = /*#__PURE__*/ (function() {
5592
5592
  function e(e, t, n) {
5593
5593
  if (e) {
5594
5594
  prep_blob(e, e.l || 0);
@@ -6648,7 +6648,7 @@ function rgb2Hex(e) {
6648
6648
  for (var t = 0, n = 1; t != 3; ++t) n = n * 256 + (e[t] > 255 ? 255 : e[t] < 0 ? 0 : e[t]);
6649
6649
  return n.toString(16).toUpperCase().slice(1);
6650
6650
  }
6651
- var DEF_MDW = 6, MAX_MDW = 15, MIN_MDW = 1, MDW = DEF_MDW;
6651
+ var DEF_MDW = 6, MDW = DEF_MDW;
6652
6652
  function width2px(e) {
6653
6653
  return Math.floor((e + Math.round(128 / MDW) / 256) * MDW);
6654
6654
  }
@@ -7091,7 +7091,7 @@ var VBAFMTS = [
7091
7091
  "xlam",
7092
7092
  "biff8",
7093
7093
  "xla"
7094
- ], rc_to_a1 = /* @__PURE__ */ (function() {
7094
+ ], rc_to_a1 = /*#__PURE__*/ (function() {
7095
7095
  var e = /(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g, t = {
7096
7096
  r: 0,
7097
7097
  c: 0
@@ -7109,7 +7109,7 @@ var VBAFMTS = [
7109
7109
  try {
7110
7110
  crefregex = /(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g;
7111
7111
  } catch {}
7112
- var a1_to_rc = /* @__PURE__ */ (function() {
7112
+ var a1_to_rc = /*#__PURE__*/ (function() {
7113
7113
  return function(e, t) {
7114
7114
  return e.replace(crefregex, function(e, n, r, a, o, s) {
7115
7115
  var c = decode_col(a) - (r ? 0 : t.c), l = decode_row(s) - (o ? 0 : t.r), u = o == "$" ? l + 1 : l == 0 ? "" : "[" + l + "]", d = r == "$" ? c + 1 : c == 0 ? "" : "[" + c + "]";
@@ -8215,7 +8215,7 @@ function stringify_formula(e, t, n, r, a) {
8215
8215
  }
8216
8216
  }
8217
8217
  if (c.length > 1 && a.WTF) throw Error("bad formula stack");
8218
- return c[0] == "TRUE" ? !0 : c[0] == "FALSE" ? !1 : c[0];
8218
+ return c[0] == "TRUE" || c[0] != "FALSE" && c[0];
8219
8219
  }
8220
8220
  function write_FormulaValue(e) {
8221
8221
  if (e == null) {
@@ -10236,7 +10236,7 @@ var WBPropsDef = [
10236
10236
  function safe1904(e) {
10237
10237
  return !e.Workbook || !e.Workbook.WBProps ? "false" : parsexmlbool(e.Workbook.WBProps.date1904) ? "true" : "false";
10238
10238
  }
10239
- var badchars = /* @__PURE__ */ ":][*?/\\".split("");
10239
+ var badchars = /*#__PURE__*/ ":][*?/\\".split("");
10240
10240
  function check_ws_name(e, t) {
10241
10241
  try {
10242
10242
  if (e == "") throw Error("Sheet name cannot be blank");
@@ -12333,7 +12333,7 @@ function parse_varint49(e, t) {
12333
12333
  return t.l = n, r;
12334
12334
  }
12335
12335
  function write_varint49(e) {
12336
- var t = new Uint8Array(7);
12336
+ var t = /* @__PURE__ */ new Uint8Array(7);
12337
12337
  t[0] = e & 127;
12338
12338
  var n = 1;
12339
12339
  sz: if (e > 127) {
@@ -12489,7 +12489,7 @@ function decompress_iwa_file(e) {
12489
12489
  }
12490
12490
  function compress_iwa_file(e) {
12491
12491
  for (var t = [], n = 0; n < e.length;) {
12492
- var r = Math.min(e.length - n, 268435455), a = new Uint8Array(4);
12492
+ var r = Math.min(e.length - n, 268435455), a = /* @__PURE__ */ new Uint8Array(4);
12493
12493
  t.push(a);
12494
12494
  var o = write_varint49(r), s = o.length;
12495
12495
  t.push(o), r <= 60 ? (s++, t.push(new Uint8Array([r - 1 << 2]))) : r <= 256 ? (s += 2, t.push(new Uint8Array([240, r - 1 & 255]))) : r <= 65536 ? (s += 3, t.push(new Uint8Array([
@@ -12512,7 +12512,7 @@ function compress_iwa_file(e) {
12512
12512
  return u8concat(t);
12513
12513
  }
12514
12514
  function write_new_storage(e, t) {
12515
- var n = new Uint8Array(32), r = u8_to_dataview(n), a = 12, o = 0;
12515
+ var n = /* @__PURE__ */ new Uint8Array(32), r = u8_to_dataview(n), a = 12, o = 0;
12516
12516
  switch (n[0] = 5, e.t) {
12517
12517
  case "n":
12518
12518
  if (e.z && fmt_is_date(e.z)) {
@@ -12550,7 +12550,7 @@ function write_new_storage(e, t) {
12550
12550
  return e.c && (t.cmnt.push(s5s_to_iwa_comment(e.c)), r.setUint32(a, t.cmnt.length - 1, !0), o |= 524288, a += 4), r.setUint32(8, o, !0), n[subarray](0, a);
12551
12551
  }
12552
12552
  function write_old_storage(e, t) {
12553
- var n = new Uint8Array(32), r = u8_to_dataview(n), a = 12, o = 0, s = "";
12553
+ var n = /* @__PURE__ */ new Uint8Array(32), r = u8_to_dataview(n), a = 12, o = 0, s = "";
12554
12554
  switch (n[0] = 4, e.t) {
12555
12555
  case "n": break;
12556
12556
  case "b": break;
@@ -14859,8 +14859,8 @@ function calculateSheet(e, t) {
14859
14859
  if (typeof a == "number") return a;
14860
14860
  d.add(e);
14861
14861
  try {
14862
- let a = _(r.substring(1));
14863
- return d.delete(e), u[t][n] = a, a;
14862
+ let a = r.substring(1), o = _(a);
14863
+ return d.delete(e), u[t][n] = o, o;
14864
14864
  } catch (a) {
14865
14865
  return d.delete(e), console.error(`Error evaluating formula at row ${t}, col ${n}:`, a), c.push({
14866
14866
  cell: {
@@ -15946,7 +15946,7 @@ var colToIndex = (e) => {
15946
15946
  return -1;
15947
15947
  }, vlookupHandler = (e, t) => {
15948
15948
  if (e.length < 3 || e.length > 4) throw Error("VLOOKUP requires 3 or 4 arguments");
15949
- let n = t.evaluateFormula(e[0]), r = e[1], a = toNumber(t.evaluateFormula(e[2])), o = e.length === 4 ? t.evaluateFormula(e[3]) : !0, s = +(o === !0 || o === 1 || o === "1");
15949
+ let n = t.evaluateFormula(e[0]), r = e[1], a = toNumber(t.evaluateFormula(e[2])), o = e.length !== 4 || t.evaluateFormula(e[3]), s = +(o === !0 || o === 1 || o === "1");
15950
15950
  if (!r.match(/^([A-Z]+)(\d+):([A-Z]+)(\d+)$/)) throw Error("Invalid table array range");
15951
15951
  let c = "", l = r;
15952
15952
  if (r.includes("!")) {
@@ -15966,7 +15966,7 @@ var colToIndex = (e) => {
15966
15966
  return t.getCellValue(v);
15967
15967
  }, hlookupHandler = (e, t) => {
15968
15968
  if (e.length < 3 || e.length > 4) throw Error("HLOOKUP requires 3 or 4 arguments");
15969
- let n = t.evaluateFormula(e[0]), r = e[1], a = toNumber(t.evaluateFormula(e[2])), o = e.length === 4 ? t.evaluateFormula(e[3]) : !0, s = +(o === !0 || o === 1 || o === "1"), c = "", l = r;
15969
+ let n = t.evaluateFormula(e[0]), r = e[1], a = toNumber(t.evaluateFormula(e[2])), o = e.length !== 4 || t.evaluateFormula(e[3]), s = +(o === !0 || o === 1 || o === "1"), c = "", l = r;
15970
15970
  if (r.includes("!")) {
15971
15971
  let e = r.split("!");
15972
15972
  c = e[0] + "!", l = e[1];
@@ -16263,7 +16263,7 @@ var SpreadsheetEngine = class {
16263
16263
  }, _hoisted_12 = { class: "mini-editor-content" }, _hoisted_13 = {
16264
16264
  key: 0,
16265
16265
  class: "cell-ref"
16266
- }, _hoisted_14 = { class: "radio-group" }, _hoisted_15 = { class: "radio-option" }, _hoisted_16 = { class: "radio-option" }, View_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
16266
+ }, _hoisted_14 = { class: "radio-group" }, _hoisted_15 = { class: "radio-option" }, _hoisted_16 = { class: "radio-option" }, View_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
16267
16267
  __name: "View",
16268
16268
  props: { selectedResult: {} },
16269
16269
  emits: ["updateResult"],
@@ -16384,13 +16384,15 @@ var SpreadsheetEngine = class {
16384
16384
  }
16385
16385
  _.value && (d.f = _.value);
16386
16386
  }
16387
- u[o][l] = d, t.data = u, c.value = JSON.stringify(e, null, 2), a("updateResult", {
16387
+ u[o][l] = d, t.data = u, c.value = JSON.stringify(e, null, 2);
16388
+ let f = {
16388
16389
  ...r.selectedResult,
16389
16390
  data: {
16390
16391
  ...r.selectedResult.data,
16391
16392
  sheets: e
16392
16393
  }
16393
- }), typeof d.v == "string" && d.v.startsWith("=") ? v.value = E(d.v) : v.value = [];
16394
+ };
16395
+ a("updateResult", f), typeof d.v == "string" && d.v.startsWith("=") ? v.value = E(d.v) : v.value = [];
16394
16396
  } catch (e) {
16395
16397
  alert(`Failed to save cell: ${e instanceof Error ? e.message : "Unknown error"}`);
16396
16398
  }
@@ -16444,13 +16446,14 @@ var SpreadsheetEngine = class {
16444
16446
  try {
16445
16447
  let e = JSON.parse(c.value);
16446
16448
  if (!Array.isArray(e)) throw Error("Data must be an array of sheets");
16447
- a("updateResult", {
16449
+ let t = {
16448
16450
  ...r.selectedResult,
16449
16451
  data: {
16450
16452
  ...r.selectedResult.data,
16451
16453
  sheets: e
16452
16454
  }
16453
- }), s.value = 0;
16455
+ };
16456
+ a("updateResult", t), s.value = 0;
16454
16457
  } catch (e) {
16455
16458
  alert(`Invalid JSON format: ${e instanceof Error ? e.message : "Unknown error"}`);
16456
16459
  }
@@ -16607,10 +16610,10 @@ var SpreadsheetEngine = class {
16607
16610
  let n = e.__vccOpts || e;
16608
16611
  for (let [e, r] of t) n[e] = r;
16609
16612
  return n;
16610
- }, View_default = /* @__PURE__ */ _plugin_vue_export_helper_default(View_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-46c4c1c7"]]), _hoisted_1 = { class: "text-center p-4 bg-green-50 dark:bg-green-900 rounded" }, _hoisted_2 = { class: "text-sm text-gray-800 dark:text-gray-200 mt-1 font-medium truncate" }, _hoisted_3 = {
16613
+ }, View_default = /*#__PURE__*/ _plugin_vue_export_helper_default(View_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-46c4c1c7"]]), _hoisted_1 = { class: "text-center p-4 bg-green-50 dark:bg-green-900 rounded" }, _hoisted_2 = { class: "text-sm text-gray-800 dark:text-gray-200 mt-1 font-medium truncate" }, _hoisted_3 = {
16611
16614
  key: 0,
16612
16615
  class: "text-xs text-gray-600 dark:text-gray-400 mt-1"
16613
- }, Preview_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
16616
+ }, Preview_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
16614
16617
  __name: "Preview",
16615
16618
  props: { result: {} },
16616
16619
  setup(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gui-chat-plugin/spreadsheet",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Spreadsheet plugin for GUIChat",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -49,22 +49,22 @@
49
49
  },
50
50
  "devDependencies": {
51
51
  "@eslint/js": "^10.0.1",
52
- "@tailwindcss/vite": "^4.2.4",
53
- "@typescript-eslint/eslint-plugin": "^8.59.2",
54
- "@typescript-eslint/parser": "^8.59.2",
55
- "@vitejs/plugin-vue": "^6.0.5",
56
- "eslint": "^10.3.0",
57
- "eslint-plugin-vue": "^10.9.1",
58
- "globals": "^17.6.0",
52
+ "@tailwindcss/vite": "^4.3.2",
53
+ "@typescript-eslint/eslint-plugin": "^8.64.0",
54
+ "@typescript-eslint/parser": "^8.64.0",
55
+ "@vitejs/plugin-vue": "^6.0.8",
56
+ "eslint": "^10.7.0",
57
+ "eslint-plugin-vue": "^10.9.2",
58
+ "globals": "^17.7.0",
59
59
  "gui-chat-protocol": "^0.4.0",
60
- "tailwindcss": "^4.2.4",
61
- "tsx": "^4.21.0",
60
+ "tailwindcss": "^4.3.2",
61
+ "tsx": "^4.23.1",
62
62
  "typescript": "~6.0.3",
63
- "vite": "^8.0.11",
64
- "vitest": "^4.0.17",
65
- "vue": "^3.5.34",
66
- "vue-eslint-parser": "^10.4.0",
67
- "vue-tsc": "^3.2.8"
63
+ "vite": "^8.1.4",
64
+ "vitest": "^4.1.10",
65
+ "vue": "^3.5.39",
66
+ "vue-eslint-parser": "^10.4.1",
67
+ "vue-tsc": "^3.3.7"
68
68
  },
69
69
  "keywords": [
70
70
  "guichat",