ooxml-excel-editor 1.16.0 → 1.16.2

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/index.js CHANGED
@@ -1,58 +1,58 @@
1
- var Gs = Object.defineProperty, qs = Object.defineProperties;
2
- var Xs = Object.getOwnPropertyDescriptors;
3
- var Xt = Object.getOwnPropertySymbols;
4
- var Zs = Object.prototype.hasOwnProperty, Ys = Object.prototype.propertyIsEnumerable;
5
- var Zt = (v, x, p) => x in v ? Gs(v, x, { enumerable: !0, configurable: !0, writable: !0, value: p }) : v[x] = p, K = (v, x) => {
6
- for (var p in x || (x = {}))
7
- Zs.call(x, p) && Zt(v, p, x[p]);
8
- if (Xt)
9
- for (var p of Xt(x))
10
- Ys.call(x, p) && Zt(v, p, x[p]);
11
- return v;
12
- }, ye = (v, x) => qs(v, Xs(x));
13
- import { ref as y, shallowRef as ht, defineComponent as se, onBeforeUnmount as we, openBlock as u, createElementBlock as c, createElementVNode as n, createCommentVNode as w, createTextVNode as O, toDisplayString as M, Fragment as V, unref as h, withModifiers as Ue, renderList as Y, computed as R, normalizeClass as U, reactive as ss, withDirectives as G, vModelRadio as He, vModelSelect as Ct, vModelCheckbox as yt, onMounted as Ke, normalizeStyle as We, vModelText as Qs, withKeys as ea, nextTick as Se, watch as N, createBlock as Z, Teleport as ta, renderSlot as ue, createVNode as Yt } from "vue";
14
- import { r as wt, l as as, d as ns, f as ls, a as sa, k as St, j as xe, e as aa, b as xt, V as na, P as la, D as Qt, g as ia, s as oa, c as ua, h as da, i as va, m as ca, n as ra } from "./chunks/index-CoOchGdS.js";
15
- import { B as ni, C as li, o as ii, p as oi, E as ui, F as di, q as vi, G as ci, K as ri, O as mi, t as fi, W as pi, u as gi, v as bi, w as ki, x as Ci, y as yi, z as Si, A as xi, H as hi, I as wi, J as Fi, L as $i, M as Ei, N as Ii, Q as Ti, R as Pi, S as Ri, T as Mi, U as Ai, X as Di, Y as Bi, Z as zi, _ as Li, $ as Ni, a0 as Oi, a1 as Vi, a2 as Hi, S as Wi, a3 as Ui, a4 as Ki, a5 as _i, a6 as ji, a7 as Ji, a8 as Gi, a9 as qi, aa as Xi, ab as Zi, ac as Yi, ad as Qi, ae as eo, af as to, ag as so, ah as ao, ai as no, aj as lo, ak as io, al as oo, am as uo, an as vo, ao as co, ap as ro, aq as mo, ar as fo, as as po, at as go, au as bo, av as ko, aw as Co, ax as yo, ay as So } from "./chunks/index-CoOchGdS.js";
16
- import { p as is, a as de, j as he, b as ma, S as fa, i as pa, R as ga, l as ba, r as es, s as ka, c as Ca, d as ya, e as Sa, T as xa, f as ha, g as wa, k as Fa, h as $a } from "./chunks/toolbar-builtins-DldwAB3X.js";
17
- function Ea() {
18
- const v = y(!1), x = y(null), p = ht(null), l = y(null), b = ht(null);
19
- async function E(m, r) {
20
- var o;
21
- v.value = !0, x.value = null, p.value && wt(p.value), p.value = null, b.value = null, l.value = { stage: "read", ratio: 0 };
1
+ var ja = Object.defineProperty, Ja = Object.defineProperties;
2
+ var Ka = Object.getOwnPropertyDescriptors;
3
+ var jt = Object.getOwnPropertySymbols;
4
+ var Ga = Object.prototype.hasOwnProperty, Xa = Object.prototype.propertyIsEnumerable;
5
+ var Jt = (m, x, g) => x in m ? ja(m, x, { enumerable: !0, configurable: !0, writable: !0, value: g }) : m[x] = g, W = (m, x) => {
6
+ for (var g in x || (x = {}))
7
+ Ga.call(x, g) && Jt(m, g, x[g]);
8
+ if (jt)
9
+ for (var g of jt(x))
10
+ Xa.call(x, g) && Jt(m, g, x[g]);
11
+ return m;
12
+ }, ke = (m, x) => Ja(m, Ka(x));
13
+ import { ref as S, shallowRef as bt, defineComponent as ue, onBeforeUnmount as Le, openBlock as d, createElementBlock as v, createElementVNode as i, createCommentVNode as h, createTextVNode as L, toDisplayString as $, Fragment as O, unref as R, withModifiers as Ct, renderList as Q, computed as E, normalizeClass as ee, reactive as Za, withDirectives as X, vModelRadio as ze, vModelSelect as ct, vModelCheckbox as rt, withKeys as Ya, normalizeStyle as Ke, onMounted as yt, nextTick as Ce, watch as _, createBlock as se, Teleport as qa, renderSlot as le, createVNode as Kt } from "vue";
14
+ import { r as kt, l as Yt, d as qt, f as Qt, a as Qa, k as gt, j as ye, e as es, b as pt, V as ts, P as as, D as Gt, g as ss, s as is, c as ns, h as ls, i as os, m as us, n as ds } from "./chunks/index-Dg4LsUaW.js";
15
+ import { B as Bn, C as _n, o as zn, p as Ln, E as On, F as Hn, q as Nn, G as Vn, K as Wn, O as Un, t as jn, W as Jn, u as Kn, v as Gn, w as Xn, x as Zn, y as Yn, z as qn, A as Qn, H as el, I as tl, J as al, L as sl, M as il, N as nl, Q as ll, R as ol, S as ul, T as dl, U as vl, X as ml, Y as fl, Z as cl, _ as rl, $ as gl, a0 as pl, a1 as bl, a2 as kl, S as Cl, a3 as yl, a4 as Sl, a5 as xl, a6 as hl, a7 as Fl, a8 as wl, a9 as Il, aa as Tl, ab as El, ac as $l, ad as Pl, ae as Rl, af as Ml, ag as Dl, ah as Al, ai as Bl, aj as _l, ak as zl, al as Ll, am as Ol, an as Hl, ao as Nl, ap as Vl, aq as Wl, ar as Ul, as as jl, at as Jl, au as Kl, av as Gl, aw as Xl, ax as Zl, ay as Yl } from "./chunks/index-Dg4LsUaW.js";
16
+ import { p as ea, a as oe, j as Se, b as vs, S as ms, i as fs, R as cs, l as rs, r as Xt, s as gs, c as ps, d as bs, e as ks, T as Cs, f as ys, g as Ss, k as xs, h as hs } from "./chunks/toolbar-builtins-CeOlAWgM.js";
17
+ function Fs() {
18
+ const m = S(!1), x = S(null), g = bt(null), n = S(null), C = bt(null);
19
+ async function M(y, f) {
20
+ var l;
21
+ m.value = !0, x.value = null, g.value && kt(g.value), g.value = null, C.value = null, n.value = { stage: "read", ratio: 0 };
22
22
  try {
23
- const d = await as(m, (I, T) => {
24
- l.value = { stage: "read", ratio: T ? I / T : void 0 };
25
- }), k = ns(d);
26
- if (k === "xls") throw new Error("这是旧版 .xls(BIFF) 或加密文件,本预览器只支持 .xlsx/.xlsm。");
27
- if (k === "not-zip") throw new Error("文件不是有效的 .xlsx(非 ZIP 包)。");
28
- if (k === "empty") throw new Error("文件为空。");
29
- let z = await is(d, (I) => {
30
- l.value = I;
23
+ const u = await Yt(y, (B, H) => {
24
+ n.value = { stage: "read", ratio: H ? B / H : void 0 };
25
+ }), p = qt(u);
26
+ if (p === "xls") throw new Error("这是旧版 .xls(BIFF) 或加密文件,本预览器只支持 .xlsx/.xlsm。");
27
+ if (p === "not-zip") throw new Error("文件不是有效的 .xlsx(非 ZIP 包)。");
28
+ if (p === "empty") throw new Error("文件为空。");
29
+ let D = await ea(u, (B) => {
30
+ n.value = B;
31
31
  });
32
- r && (z = (o = r(z)) != null ? o : z), ls(z), b.value = d.slice(0), p.value = z;
33
- } catch (d) {
34
- x.value = d != null && d.message && /预览器|损坏|加密|为空|ZIP/.test(d.message) ? d.message : sa(d), console.error("[ooxml-preview] 解析失败:", d);
32
+ f && (D = (l = f(D)) != null ? l : D), Qt(D), C.value = u.slice(0), g.value = D;
33
+ } catch (u) {
34
+ x.value = u != null && u.message && /预览器|损坏|加密|为空|ZIP/.test(u.message) ? u.message : Qa(u), console.error("[ooxml-preview] 解析失败:", u);
35
35
  } finally {
36
- v.value = !1, l.value = null;
36
+ m.value = !1, n.value = null;
37
37
  }
38
38
  }
39
- function f(m, r) {
40
- var o;
41
- p.value && wt(p.value), b.value = null, x.value = null, l.value = null, p.value = r && (o = r(m)) != null ? o : m;
39
+ function c(y, f) {
40
+ var l;
41
+ g.value && kt(g.value), C.value = null, x.value = null, n.value = null, g.value = f && (l = f(y)) != null ? l : y;
42
42
  }
43
- return { loading: v, error: x, workbook: p, load: E, loadModel: f, progress: l, sourceBuffer: b };
43
+ return { loading: m, error: x, workbook: g, load: M, loadModel: c, progress: n, sourceBuffer: C };
44
44
  }
45
- const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
45
+ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
46
46
  key: 0,
47
47
  class: "modified",
48
48
  title: "已修改(未保存)"
49
- }, Ra = {
49
+ }, Es = {
50
50
  key: 1,
51
51
  class: "tpl"
52
- }, Ma = { class: "meta" }, Aa = { title: "模型数据体积估算(确定性;非真实 JS 堆,实际堆约 1.5~3x)" }, Da = { title: "JS 堆增量(performance.memory;仅 Chromium、整页口径、被安全分桶粗化)" }, Ba = { class: "export-wrap" }, za = {
52
+ }, $s = { class: "meta" }, Ps = { title: "模型数据体积估算(确定性;非真实 JS 堆,实际堆约 1.5~3x)" }, Rs = { title: "JS 堆增量(performance.memory;仅 Chromium、整页口径、被安全分桶粗化)" }, Ms = { class: "export-wrap" }, Ds = {
53
53
  key: 0,
54
54
  class: "menu"
55
- }, La = { class: "zoom" }, Na = ["value"], Oa = ["value"], Va = ["value"], Ha = /* @__PURE__ */ se({
55
+ }, As = { class: "zoom" }, Bs = ["value"], _s = ["value"], zs = ["value"], Ls = /* @__PURE__ */ ue({
56
56
  __name: "ViewerToolbar",
57
57
  props: {
58
58
  fileName: {},
@@ -65,164 +65,164 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
65
65
  heapBytes: {}
66
66
  },
67
67
  emits: ["update:zoom", "export-image", "export-pdf", "export-pdf-vector", "export-xlsx", "export-csv", "export-json", "print", "open-settings"],
68
- setup(v, { emit: x }) {
69
- const p = x, l = [0.5, 0.75, 1, 1.25, 1.5, 2];
70
- function b(o) {
71
- p("update:zoom", Math.min(3, Math.max(0.3, o)));
72
- }
73
- const E = y(!1);
74
- function f() {
75
- E.value = !E.value;
76
- }
77
- function m(o) {
78
- E.value = !1, p(o === "export-image" ? "export-image" : o === "export-pdf" ? "export-pdf" : o === "export-pdf-vector" ? "export-pdf-vector" : o === "export-xlsx" ? "export-xlsx" : o === "export-csv" ? "export-csv" : o === "export-json" ? "export-json" : o === "print" ? "print" : "open-settings");
79
- }
80
- function r(o) {
81
- var d;
82
- (d = o.target) != null && d.closest(".export-wrap") || (E.value = !1);
83
- }
84
- return typeof document != "undefined" && document.addEventListener("click", r), we(() => {
85
- typeof document != "undefined" && document.removeEventListener("click", r);
86
- }), (o, d) => (u(), c("div", Ia, [
87
- n("span", {
68
+ setup(m, { emit: x }) {
69
+ const g = x, n = [0.5, 0.75, 1, 1.25, 1.5, 2];
70
+ function C(l) {
71
+ g("update:zoom", Math.min(3, Math.max(0.3, l)));
72
+ }
73
+ const M = S(!1);
74
+ function c() {
75
+ M.value = !M.value;
76
+ }
77
+ function y(l) {
78
+ M.value = !1, g(l === "export-image" ? "export-image" : l === "export-pdf" ? "export-pdf" : l === "export-pdf-vector" ? "export-pdf-vector" : l === "export-xlsx" ? "export-xlsx" : l === "export-csv" ? "export-csv" : l === "export-json" ? "export-json" : l === "print" ? "print" : "open-settings");
79
+ }
80
+ function f(l) {
81
+ var u;
82
+ (u = l.target) != null && u.closest(".export-wrap") || (M.value = !1);
83
+ }
84
+ return typeof document != "undefined" && document.addEventListener("click", f), Le(() => {
85
+ typeof document != "undefined" && document.removeEventListener("click", f);
86
+ }), (l, u) => (d(), v("div", ws, [
87
+ i("span", {
88
88
  class: "file",
89
- title: (v.modified ? "* 已修改(未保存) · " : "") + (v.fileName || "未命名工作簿") + (v.templateName ? " · 模板: " + v.templateName : "")
89
+ title: (m.modified ? "* 已修改(未保存) · " : "") + (m.fileName || "未命名工作簿") + (m.templateName ? " · 模板: " + m.templateName : "")
90
90
  }, [
91
- v.modified ? (u(), c("span", Pa, "*")) : w("", !0),
92
- O(M(v.fileName || "未命名工作簿"), 1),
93
- v.templateName ? (u(), c("span", Ra, " · 模板: " + M(v.templateName), 1)) : w("", !0)
94
- ], 8, Ta),
95
- n("span", Ma, [
96
- O(M(v.sheetCount) + " 个工作表", 1),
97
- v.fileSize != null ? (u(), c(V, { key: 0 }, [
98
- O(" · 源文件 " + M(h(St)(v.fileSize)), 1)
99
- ], 64)) : w("", !0),
100
- v.dataBytes != null ? (u(), c(V, { key: 1 }, [
101
- d[11] || (d[11] = O(" · ", -1)),
102
- n("span", Aa, "数据约 " + M(h(St)(v.dataBytes)), 1)
103
- ], 64)) : w("", !0),
104
- v.heapBytes != null ? (u(), c(V, { key: 2 }, [
105
- d[13] || (d[13] = O(" · ", -1)),
106
- n("span", Da, [
107
- O("堆约 " + M(h(St)(v.heapBytes)), 1),
108
- d[12] || (d[12] = n("span", { class: "rough" }, "粗略", -1))
91
+ m.modified ? (d(), v("span", Ts, "*")) : h("", !0),
92
+ L($(m.fileName || "未命名工作簿"), 1),
93
+ m.templateName ? (d(), v("span", Es, " · 模板: " + $(m.templateName), 1)) : h("", !0)
94
+ ], 8, Is),
95
+ i("span", $s, [
96
+ L($(m.sheetCount) + " 个工作表", 1),
97
+ m.fileSize != null ? (d(), v(O, { key: 0 }, [
98
+ L(" · 源文件 " + $(R(gt)(m.fileSize)), 1)
99
+ ], 64)) : h("", !0),
100
+ m.dataBytes != null ? (d(), v(O, { key: 1 }, [
101
+ u[11] || (u[11] = L(" · ", -1)),
102
+ i("span", Ps, "数据约 " + $(R(gt)(m.dataBytes)), 1)
103
+ ], 64)) : h("", !0),
104
+ m.heapBytes != null ? (d(), v(O, { key: 2 }, [
105
+ u[13] || (u[13] = L(" · ", -1)),
106
+ i("span", Rs, [
107
+ L("堆约 " + $(R(gt)(m.heapBytes)), 1),
108
+ u[12] || (u[12] = i("span", { class: "rough" }, "粗略", -1))
109
109
  ])
110
- ], 64)) : w("", !0)
110
+ ], 64)) : h("", !0)
111
111
  ]),
112
- d[17] || (d[17] = n("div", { class: "spacer" }, null, -1)),
113
- n("div", Ba, [
114
- n("button", {
112
+ u[17] || (u[17] = i("div", { class: "spacer" }, null, -1)),
113
+ i("div", Ms, [
114
+ i("button", {
115
115
  class: "export-btn",
116
- onClick: Ue(f, ["stop"]),
116
+ onClick: Ct(c, ["stop"]),
117
117
  title: "导出 / 打印"
118
- }, [...d[14] || (d[14] = [
119
- O(" 导出 ", -1),
120
- n("span", { class: "caret" }, "▾", -1)
118
+ }, [...u[14] || (u[14] = [
119
+ L(" 导出 ", -1),
120
+ i("span", { class: "caret" }, "▾", -1)
121
121
  ])]),
122
- E.value ? (u(), c("div", za, [
123
- n("button", {
124
- onClick: d[0] || (d[0] = (k) => m("export-xlsx"))
122
+ M.value ? (d(), v("div", Ds, [
123
+ i("button", {
124
+ onClick: u[0] || (u[0] = (p) => y("export-xlsx"))
125
125
  }, "导出为 Excel (.xlsx)"),
126
- n("button", {
127
- onClick: d[1] || (d[1] = (k) => m("export-csv"))
126
+ i("button", {
127
+ onClick: u[1] || (u[1] = (p) => y("export-csv"))
128
128
  }, "导出为 CSV (.csv)"),
129
- n("button", {
130
- onClick: d[2] || (d[2] = (k) => m("export-json"))
129
+ i("button", {
130
+ onClick: u[2] || (u[2] = (p) => y("export-json"))
131
131
  }, "导出为 JSON (.json)"),
132
- d[15] || (d[15] = n("div", { class: "sep" }, null, -1)),
133
- n("button", {
134
- onClick: d[3] || (d[3] = (k) => m("export-image"))
132
+ u[15] || (u[15] = i("div", { class: "sep" }, null, -1)),
133
+ i("button", {
134
+ onClick: u[3] || (u[3] = (p) => y("export-image"))
135
135
  }, "导出为图片 (PNG)"),
136
- n("button", {
137
- onClick: d[4] || (d[4] = (k) => m("export-pdf"))
136
+ i("button", {
137
+ onClick: u[4] || (u[4] = (p) => y("export-pdf"))
138
138
  }, "导出为 PDF (位图)"),
139
- n("button", {
140
- onClick: d[5] || (d[5] = (k) => m("export-pdf-vector"))
139
+ i("button", {
140
+ onClick: u[5] || (u[5] = (p) => y("export-pdf-vector"))
141
141
  }, "导出为 PDF (矢量·文字可选)"),
142
- n("button", {
143
- onClick: d[6] || (d[6] = (k) => m("print"))
142
+ i("button", {
143
+ onClick: u[6] || (u[6] = (p) => y("print"))
144
144
  }, "打印…"),
145
- d[16] || (d[16] = n("div", { class: "sep" }, null, -1)),
146
- n("button", {
147
- onClick: d[7] || (d[7] = (k) => m("open-settings"))
145
+ u[16] || (u[16] = i("div", { class: "sep" }, null, -1)),
146
+ i("button", {
147
+ onClick: u[7] || (u[7] = (p) => y("open-settings"))
148
148
  }, "导出设置…")
149
- ])) : w("", !0)
149
+ ])) : h("", !0)
150
150
  ]),
151
- n("div", La, [
152
- n("button", {
153
- onClick: d[8] || (d[8] = (k) => b(v.zoom - 0.1)),
151
+ i("div", As, [
152
+ i("button", {
153
+ onClick: u[8] || (u[8] = (p) => C(m.zoom - 0.1)),
154
154
  title: "缩小"
155
155
  }, "−"),
156
- n("select", {
157
- value: v.zoom,
158
- onChange: d[9] || (d[9] = (k) => b(parseFloat(k.target.value)))
156
+ i("select", {
157
+ value: m.zoom,
158
+ onChange: u[9] || (u[9] = (p) => C(parseFloat(p.target.value)))
159
159
  }, [
160
- (u(), c(V, null, Y(l, (k) => n("option", {
161
- key: k,
162
- value: k
163
- }, M(Math.round(k * 100)) + "%", 9, Oa)), 64)),
164
- l.includes(v.zoom) ? w("", !0) : (u(), c("option", {
160
+ (d(), v(O, null, Q(n, (p) => i("option", {
161
+ key: p,
162
+ value: p
163
+ }, $(Math.round(p * 100)) + "%", 9, _s)), 64)),
164
+ n.includes(m.zoom) ? h("", !0) : (d(), v("option", {
165
165
  key: 0,
166
- value: v.zoom
167
- }, M(Math.round(v.zoom * 100)) + "%", 9, Va))
168
- ], 40, Na),
169
- n("button", {
170
- onClick: d[10] || (d[10] = (k) => b(v.zoom + 0.1)),
166
+ value: m.zoom
167
+ }, $(Math.round(m.zoom * 100)) + "%", 9, zs))
168
+ ], 40, Bs),
169
+ i("button", {
170
+ onClick: u[10] || (u[10] = (p) => C(m.zoom + 0.1)),
171
171
  title: "放大"
172
172
  }, "+")
173
173
  ])
174
174
  ]));
175
175
  }
176
- }), ae = (v, x) => {
177
- const p = v.__vccOpts || v;
178
- for (const [l, b] of x)
179
- p[l] = b;
180
- return p;
181
- }, Wa = /* @__PURE__ */ ae(Ha, [["__scopeId", "data-v-55f10e63"]]), Ua = { class: "sheet-tabs" }, Ka = ["onClick", "title"], _a = /* @__PURE__ */ se({
176
+ }), de = (m, x) => {
177
+ const g = m.__vccOpts || m;
178
+ for (const [n, C] of x)
179
+ g[n] = C;
180
+ return g;
181
+ }, Os = /* @__PURE__ */ de(Ls, [["__scopeId", "data-v-55f10e63"]]), Hs = { class: "sheet-tabs" }, Ns = ["onClick", "title"], Vs = /* @__PURE__ */ ue({
182
182
  __name: "SheetTabs",
183
183
  props: {
184
184
  workbook: {},
185
185
  active: {}
186
186
  },
187
187
  emits: ["select"],
188
- setup(v, { emit: x }) {
189
- const p = v, l = x, b = R(() => p.workbook.sheets.filter((E) => E.state === "visible"));
190
- return (E, f) => (u(), c("div", Ua, [
191
- (u(!0), c(V, null, Y(b.value, (m) => (u(), c("button", {
192
- key: m.index,
193
- class: U(["tab", { active: m.index === v.active }]),
194
- onClick: (r) => l("select", m.index),
195
- title: m.name
196
- }, M(m.name), 11, Ka))), 128))
188
+ setup(m, { emit: x }) {
189
+ const g = m, n = x, C = E(() => g.workbook.sheets.filter((M) => M.state === "visible"));
190
+ return (M, c) => (d(), v("div", Hs, [
191
+ (d(!0), v(O, null, Q(C.value, (y) => (d(), v("button", {
192
+ key: y.index,
193
+ class: ee(["tab", { active: y.index === m.active }]),
194
+ onClick: (f) => n("select", y.index),
195
+ title: y.name
196
+ }, $(y.name), 11, Ns))), 128))
197
197
  ]));
198
198
  }
199
- }), ja = /* @__PURE__ */ ae(_a, [["__scopeId", "data-v-431b6f9c"]]), Ja = {
199
+ }), Ws = /* @__PURE__ */ de(Vs, [["__scopeId", "data-v-431b6f9c"]]), Us = {
200
200
  class: "dlg",
201
201
  role: "dialog",
202
202
  "aria-label": "导出设置"
203
- }, Ga = { class: "dlg-head" }, qa = { class: "dlg-body" }, Xa = { class: "field" }, Za = { class: "opts" }, Ya = ["disabled"], Qa = {
203
+ }, js = { class: "dlg-head" }, Js = { class: "dlg-body" }, Ks = { class: "field" }, Gs = { class: "opts" }, Xs = ["disabled"], Zs = {
204
204
  key: 0,
205
205
  class: "hint"
206
- }, en = {
206
+ }, Ys = {
207
207
  key: 1,
208
208
  class: "hint"
209
- }, tn = { class: "field" }, sn = { class: "field" }, an = { class: "opts inline" }, nn = { class: "field" }, ln = { class: "opts" }, on = { class: "field" }, un = { class: "opts inline" }, dn = { class: "dlg-foot" }, vn = /* @__PURE__ */ se({
209
+ }, qs = { class: "field" }, Qs = { class: "field" }, ei = { class: "opts inline" }, ti = { class: "field" }, ai = { class: "opts" }, si = { class: "field" }, ii = { class: "opts inline" }, ni = { class: "dlg-foot" }, li = /* @__PURE__ */ ue({
210
210
  __name: "ExportDialog",
211
211
  props: {
212
212
  selection: {},
213
213
  sheetCount: {}
214
214
  },
215
215
  emits: ["close", "export"],
216
- setup(v, { emit: x }) {
217
- const p = v, l = x, b = R(() => {
218
- const r = p.selection;
219
- return !!r && !(r.top === r.bottom && r.left === r.right);
220
- }), E = R(() => {
221
- const r = p.selection;
222
- return r ? `${xe(r.left)}${r.top + 1}:${xe(r.right)}${r.bottom + 1}` : "";
223
- }), f = ss({
216
+ setup(m, { emit: x }) {
217
+ const g = m, n = x, C = E(() => {
218
+ const f = g.selection;
219
+ return !!f && !(f.top === f.bottom && f.left === f.right);
220
+ }), M = E(() => {
221
+ const f = g.selection;
222
+ return f ? `${ye(f.left)}${f.top + 1}:${ye(f.right)}${f.bottom + 1}` : "";
223
+ }), c = Za({
224
224
  action: "png",
225
- scope: b.value ? "selection" : "sheet",
225
+ scope: C.value ? "selection" : "sheet",
226
226
  scale: 2,
227
227
  includeHeaders: !1,
228
228
  gridlines: !0,
@@ -231,647 +231,444 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
231
231
  fitToWidth: !0,
232
232
  pdfVector: !1
233
233
  });
234
- function m(r) {
235
- l("export", ye(K({}, f), { action: r }));
234
+ function y(f) {
235
+ n("export", ke(W({}, c), { action: f }));
236
236
  }
237
- return (r, o) => (u(), c("div", {
237
+ return (f, l) => (d(), v("div", {
238
238
  class: "dlg-mask",
239
- onClick: o[16] || (o[16] = Ue((d) => l("close"), ["self"]))
239
+ onClick: l[16] || (l[16] = Ct((u) => n("close"), ["self"]))
240
240
  }, [
241
- n("div", Ja, [
242
- n("div", Ga, [
243
- o[17] || (o[17] = n("span", null, "导出 / 打印设置", -1)),
244
- n("button", {
241
+ i("div", Us, [
242
+ i("div", js, [
243
+ l[17] || (l[17] = i("span", null, "导出 / 打印设置", -1)),
244
+ i("button", {
245
245
  class: "x",
246
- onClick: o[0] || (o[0] = (d) => l("close")),
246
+ onClick: l[0] || (l[0] = (u) => n("close")),
247
247
  title: "关闭"
248
248
  }, "×")
249
249
  ]),
250
- n("div", qa, [
251
- n("div", Xa, [
252
- o[20] || (o[20] = n("label", { class: "lbl" }, "范围", -1)),
253
- n("div", Za, [
254
- n("label", {
255
- class: U({ disabled: !b.value })
250
+ i("div", Js, [
251
+ i("div", Ks, [
252
+ l[20] || (l[20] = i("label", { class: "lbl" }, "范围", -1)),
253
+ i("div", Gs, [
254
+ i("label", {
255
+ class: ee({ disabled: !C.value })
256
256
  }, [
257
- G(n("input", {
257
+ X(i("input", {
258
258
  type: "radio",
259
259
  value: "selection",
260
- "onUpdate:modelValue": o[1] || (o[1] = (d) => f.scope = d),
261
- disabled: !b.value
262
- }, null, 8, Ya), [
263
- [He, f.scope]
260
+ "onUpdate:modelValue": l[1] || (l[1] = (u) => c.scope = u),
261
+ disabled: !C.value
262
+ }, null, 8, Xs), [
263
+ [ze, c.scope]
264
264
  ]),
265
- o[18] || (o[18] = O(" 当前选区 ", -1)),
266
- b.value ? (u(), c("span", Qa, M(E.value), 1)) : (u(), c("span", en, "(未选多格)"))
265
+ l[18] || (l[18] = L(" 当前选区 ", -1)),
266
+ C.value ? (d(), v("span", Zs, $(M.value), 1)) : (d(), v("span", Ys, "(未选多格)"))
267
267
  ], 2),
268
- n("label", null, [
269
- G(n("input", {
268
+ i("label", null, [
269
+ X(i("input", {
270
270
  type: "radio",
271
271
  value: "sheet",
272
- "onUpdate:modelValue": o[2] || (o[2] = (d) => f.scope = d)
272
+ "onUpdate:modelValue": l[2] || (l[2] = (u) => c.scope = u)
273
273
  }, null, 512), [
274
- [He, f.scope]
274
+ [ze, c.scope]
275
275
  ]),
276
- o[19] || (o[19] = O(" 当前工作表", -1))
276
+ l[19] || (l[19] = L(" 当前工作表", -1))
277
277
  ]),
278
- n("label", null, [
279
- G(n("input", {
278
+ i("label", null, [
279
+ X(i("input", {
280
280
  type: "radio",
281
281
  value: "all",
282
- "onUpdate:modelValue": o[3] || (o[3] = (d) => f.scope = d)
282
+ "onUpdate:modelValue": l[3] || (l[3] = (u) => c.scope = u)
283
283
  }, null, 512), [
284
- [He, f.scope]
284
+ [ze, c.scope]
285
285
  ]),
286
- O(" 全部工作表 (" + M(v.sheetCount) + ")", 1)
286
+ L(" 全部工作表 (" + $(m.sheetCount) + ")", 1)
287
287
  ])
288
288
  ])
289
289
  ]),
290
- n("div", tn, [
291
- o[22] || (o[22] = n("label", { class: "lbl" }, "清晰度", -1)),
292
- G(n("select", {
293
- "onUpdate:modelValue": o[4] || (o[4] = (d) => f.scale = d)
294
- }, [...o[21] || (o[21] = [
295
- n("option", { value: 1 }, "标准 (1×)", -1),
296
- n("option", { value: 2 }, "高清 (2×)", -1),
297
- n("option", { value: 3 }, "超清 (3×)", -1)
290
+ i("div", qs, [
291
+ l[22] || (l[22] = i("label", { class: "lbl" }, "清晰度", -1)),
292
+ X(i("select", {
293
+ "onUpdate:modelValue": l[4] || (l[4] = (u) => c.scale = u)
294
+ }, [...l[21] || (l[21] = [
295
+ i("option", { value: 1 }, "标准 (1×)", -1),
296
+ i("option", { value: 2 }, "高清 (2×)", -1),
297
+ i("option", { value: 3 }, "超清 (3×)", -1)
298
298
  ])], 512), [
299
299
  [
300
- Ct,
301
- f.scale,
300
+ ct,
301
+ c.scale,
302
302
  void 0,
303
303
  { number: !0 }
304
304
  ]
305
305
  ])
306
306
  ]),
307
- n("div", sn, [
308
- o[25] || (o[25] = n("label", { class: "lbl" }, "内容", -1)),
309
- n("div", an, [
310
- n("label", null, [
311
- G(n("input", {
307
+ i("div", Qs, [
308
+ l[25] || (l[25] = i("label", { class: "lbl" }, "内容", -1)),
309
+ i("div", ei, [
310
+ i("label", null, [
311
+ X(i("input", {
312
312
  type: "checkbox",
313
- "onUpdate:modelValue": o[5] || (o[5] = (d) => f.includeHeaders = d)
313
+ "onUpdate:modelValue": l[5] || (l[5] = (u) => c.includeHeaders = u)
314
314
  }, null, 512), [
315
- [yt, f.includeHeaders]
315
+ [rt, c.includeHeaders]
316
316
  ]),
317
- o[23] || (o[23] = O(" 含行列号", -1))
317
+ l[23] || (l[23] = L(" 含行列号", -1))
318
318
  ]),
319
- n("label", null, [
320
- G(n("input", {
319
+ i("label", null, [
320
+ X(i("input", {
321
321
  type: "checkbox",
322
- "onUpdate:modelValue": o[6] || (o[6] = (d) => f.gridlines = d)
322
+ "onUpdate:modelValue": l[6] || (l[6] = (u) => c.gridlines = u)
323
323
  }, null, 512), [
324
- [yt, f.gridlines]
324
+ [rt, c.gridlines]
325
325
  ]),
326
- o[24] || (o[24] = O(" 网格线", -1))
326
+ l[24] || (l[24] = L(" 网格线", -1))
327
327
  ])
328
328
  ])
329
329
  ]),
330
- n("div", nn, [
331
- o[30] || (o[30] = n("label", { class: "lbl" }, "PDF 类型", -1)),
332
- n("div", ln, [
333
- n("label", null, [
334
- G(n("input", {
330
+ i("div", ti, [
331
+ l[30] || (l[30] = i("label", { class: "lbl" }, "PDF 类型", -1)),
332
+ i("div", ai, [
333
+ i("label", null, [
334
+ X(i("input", {
335
335
  type: "radio",
336
336
  value: !1,
337
- "onUpdate:modelValue": o[7] || (o[7] = (d) => f.pdfVector = d)
337
+ "onUpdate:modelValue": l[7] || (l[7] = (u) => c.pdfVector = u)
338
338
  }, null, 512), [
339
- [He, f.pdfVector]
339
+ [ze, c.pdfVector]
340
340
  ]),
341
- o[26] || (o[26] = O(" 位图 ", -1)),
342
- o[27] || (o[27] = n("span", { class: "hint" }, "(完整还原观感)", -1))
341
+ l[26] || (l[26] = L(" 位图 ", -1)),
342
+ l[27] || (l[27] = i("span", { class: "hint" }, "(完整还原观感)", -1))
343
343
  ]),
344
- n("label", null, [
345
- G(n("input", {
344
+ i("label", null, [
345
+ X(i("input", {
346
346
  type: "radio",
347
347
  value: !0,
348
- "onUpdate:modelValue": o[8] || (o[8] = (d) => f.pdfVector = d)
348
+ "onUpdate:modelValue": l[8] || (l[8] = (u) => c.pdfVector = u)
349
349
  }, null, 512), [
350
- [He, f.pdfVector]
350
+ [ze, c.pdfVector]
351
351
  ]),
352
- o[28] || (o[28] = O(" 矢量 ", -1)),
353
- o[29] || (o[29] = n("span", { class: "hint" }, "(文字可选可搜·清晰·文件小;中文需注册字体,否则该格转图)", -1))
352
+ l[28] || (l[28] = L(" 矢量 ", -1)),
353
+ l[29] || (l[29] = i("span", { class: "hint" }, "(文字可选可搜·清晰·文件小;中文需注册字体,否则该格转图)", -1))
354
354
  ])
355
355
  ])
356
356
  ]),
357
- n("div", on, [
358
- o[34] || (o[34] = n("label", { class: "lbl" }, [
359
- O("纸张 "),
360
- n("span", { class: "hint" }, "(PDF/打印)")
357
+ i("div", si, [
358
+ l[34] || (l[34] = i("label", { class: "lbl" }, [
359
+ L("纸张 "),
360
+ i("span", { class: "hint" }, "(PDF/打印)")
361
361
  ], -1)),
362
- n("div", un, [
363
- G(n("select", {
364
- "onUpdate:modelValue": o[9] || (o[9] = (d) => f.format = d)
365
- }, [...o[31] || (o[31] = [
366
- n("option", { value: "auto" }, "自动(跟随表)", -1),
367
- n("option", { value: "a4" }, "A4", -1),
368
- n("option", { value: "a3" }, "A3", -1),
369
- n("option", { value: "letter" }, "Letter", -1)
362
+ i("div", ii, [
363
+ X(i("select", {
364
+ "onUpdate:modelValue": l[9] || (l[9] = (u) => c.format = u)
365
+ }, [...l[31] || (l[31] = [
366
+ i("option", { value: "auto" }, "自动(跟随表)", -1),
367
+ i("option", { value: "a4" }, "A4", -1),
368
+ i("option", { value: "a3" }, "A3", -1),
369
+ i("option", { value: "letter" }, "Letter", -1)
370
370
  ])], 512), [
371
- [Ct, f.format]
371
+ [ct, c.format]
372
372
  ]),
373
- G(n("select", {
374
- "onUpdate:modelValue": o[10] || (o[10] = (d) => f.orientation = d)
375
- }, [...o[32] || (o[32] = [
376
- n("option", { value: "auto" }, "方向: 自动", -1),
377
- n("option", { value: "portrait" }, "纵向", -1),
378
- n("option", { value: "landscape" }, "横向", -1)
373
+ X(i("select", {
374
+ "onUpdate:modelValue": l[10] || (l[10] = (u) => c.orientation = u)
375
+ }, [...l[32] || (l[32] = [
376
+ i("option", { value: "auto" }, "方向: 自动", -1),
377
+ i("option", { value: "portrait" }, "纵向", -1),
378
+ i("option", { value: "landscape" }, "横向", -1)
379
379
  ])], 512), [
380
- [Ct, f.orientation]
380
+ [ct, c.orientation]
381
381
  ]),
382
- n("label", null, [
383
- G(n("input", {
382
+ i("label", null, [
383
+ X(i("input", {
384
384
  type: "checkbox",
385
- "onUpdate:modelValue": o[11] || (o[11] = (d) => f.fitToWidth = d)
385
+ "onUpdate:modelValue": l[11] || (l[11] = (u) => c.fitToWidth = u)
386
386
  }, null, 512), [
387
- [yt, f.fitToWidth]
387
+ [rt, c.fitToWidth]
388
388
  ]),
389
- o[33] || (o[33] = O(" 适应页宽", -1))
389
+ l[33] || (l[33] = L(" 适应页宽", -1))
390
390
  ])
391
391
  ])
392
392
  ])
393
393
  ]),
394
- n("div", dn, [
395
- n("button", {
394
+ i("div", ni, [
395
+ i("button", {
396
396
  class: "ghost",
397
- onClick: o[12] || (o[12] = (d) => l("close"))
397
+ onClick: l[12] || (l[12] = (u) => n("close"))
398
398
  }, "取消"),
399
- o[35] || (o[35] = n("div", { class: "grow" }, null, -1)),
400
- n("button", {
401
- onClick: o[13] || (o[13] = (d) => m("png"))
399
+ l[35] || (l[35] = i("div", { class: "grow" }, null, -1)),
400
+ i("button", {
401
+ onClick: l[13] || (l[13] = (u) => y("png"))
402
402
  }, "导出 PNG"),
403
- n("button", {
404
- onClick: o[14] || (o[14] = (d) => m("pdf"))
403
+ i("button", {
404
+ onClick: l[14] || (l[14] = (u) => y("pdf"))
405
405
  }, "导出 PDF"),
406
- n("button", {
406
+ i("button", {
407
407
  class: "primary",
408
- onClick: o[15] || (o[15] = (d) => m("print"))
408
+ onClick: l[15] || (l[15] = (u) => y("print"))
409
409
  }, "打印…")
410
410
  ])
411
411
  ])
412
412
  ]));
413
413
  }
414
- }), cn = /* @__PURE__ */ ae(vn, [["__scopeId", "data-v-544df24f"]]), rn = { class: "row" }, mn = ["value"], fn = ["disabled"], pn = ["disabled"], gn = {
415
- key: 0,
416
- class: "row replace-row"
417
- }, bn = ["value"], kn = ["disabled"], Cn = ["disabled"], yn = /* @__PURE__ */ se({
418
- __name: "FindBar",
419
- props: {
420
- query: {},
421
- matchCount: {},
422
- current: {},
423
- matchCase: { type: Boolean },
424
- wholeCell: { type: Boolean },
425
- editable: { type: Boolean },
426
- replace: {}
427
- },
428
- emits: ["update:query", "update:matchCase", "update:wholeCell", "update:replace", "next", "prev", "replace-one", "replace-all", "close"],
429
- setup(v, { expose: x, emit: p }) {
430
- const l = p, b = y(null);
431
- Ke(() => {
432
- var m;
433
- return (m = b.value) == null ? void 0 : m.focus();
434
- });
435
- function E(m) {
436
- var r;
437
- (m.ctrlKey || m.metaKey) && (m.key === "f" || m.key === "F") ? (m.preventDefault(), (r = b.value) == null || r.select()) : m.key === "Enter" ? (m.preventDefault(), m.shiftKey ? l("prev") : l("next")) : m.key === "Escape" && (m.preventDefault(), l("close"));
438
- }
439
- function f(m) {
440
- m.key === "Enter" ? (m.preventDefault(), l("replace-one")) : m.key === "Escape" && (m.preventDefault(), l("close"));
441
- }
442
- return x({ focus: () => {
443
- var m;
444
- return (m = b.value) == null ? void 0 : m.focus();
445
- } }), (m, r) => (u(), c("div", {
446
- class: "find-bar",
447
- onKeydown: r[9] || (r[9] = Ue(() => {
448
- }, ["stop"]))
449
- }, [
450
- n("div", rn, [
451
- n("input", {
452
- ref_key: "inputEl",
453
- ref: b,
454
- class: "q",
455
- type: "text",
456
- placeholder: "查找…",
457
- value: v.query,
458
- onInput: r[0] || (r[0] = (o) => l("update:query", o.target.value)),
459
- onKeydown: E
460
- }, null, 40, mn),
461
- n("span", {
462
- class: U(["count", { none: v.query && v.matchCount === 0 }])
463
- }, M(v.matchCount ? `${v.current + 1}/${v.matchCount}` : v.query ? "无结果" : ""), 3),
464
- n("button", {
465
- class: U(["opt", { on: v.matchCase }]),
466
- title: "区分大小写",
467
- onClick: r[1] || (r[1] = (o) => l("update:matchCase", !v.matchCase))
468
- }, "Aa", 2),
469
- n("button", {
470
- class: U(["opt", { on: v.wholeCell }]),
471
- title: "全字匹配(整格相等)",
472
- onClick: r[2] || (r[2] = (o) => l("update:wholeCell", !v.wholeCell))
473
- }, "▢", 2),
474
- n("button", {
475
- class: "nav",
476
- title: "上一个 (Shift+Enter)",
477
- disabled: !v.matchCount,
478
- onClick: r[3] || (r[3] = (o) => l("prev"))
479
- }, "▲", 8, fn),
480
- n("button", {
481
- class: "nav",
482
- title: "下一个 (Enter)",
483
- disabled: !v.matchCount,
484
- onClick: r[4] || (r[4] = (o) => l("next"))
485
- }, "▼", 8, pn),
486
- n("button", {
487
- class: "close",
488
- title: "关闭 (Esc)",
489
- onClick: r[5] || (r[5] = (o) => l("close"))
490
- }, "×")
491
- ]),
492
- v.editable ? (u(), c("div", gn, [
493
- n("input", {
494
- class: "q",
495
- type: "text",
496
- placeholder: "替换为…",
497
- value: v.replace,
498
- onInput: r[6] || (r[6] = (o) => l("update:replace", o.target.value)),
499
- onKeydown: f
500
- }, null, 40, bn),
501
- n("button", {
502
- class: "rep",
503
- title: "替换当前并查找下一个",
504
- disabled: !v.matchCount,
505
- onClick: r[7] || (r[7] = (o) => l("replace-one"))
506
- }, "替换", 8, kn),
507
- n("button", {
508
- class: "rep",
509
- title: "全部替换",
510
- disabled: !v.matchCount,
511
- onClick: r[8] || (r[8] = (o) => l("replace-all"))
512
- }, "全部替换", 8, Cn)
513
- ])) : w("", !0)
514
- ], 32));
515
- }
516
- }), Sn = /* @__PURE__ */ ae(yn, [["__scopeId", "data-v-7c933ccd"]]), xn = { class: "sort" }, hn = { class: "all" }, wn = ["checked"], Fn = { class: "list" }, $n = ["checked", "onChange"], En = ["title"], In = {
517
- key: 0,
518
- class: "empty"
519
- }, Tn = { class: "foot" }, Pn = /* @__PURE__ */ se({
520
- __name: "FilterPopup",
521
- props: {
522
- values: {},
523
- selected: {},
524
- x: {},
525
- y: {},
526
- sortDir: {}
527
- },
528
- emits: ["apply", "clear", "close", "sort"],
529
- setup(v, { emit: x }) {
530
- const p = v, l = x, b = y(""), E = ss(new Set(p.selected.length ? p.selected : p.values)), f = R(() => {
531
- const I = b.value.trim().toLowerCase();
532
- return I ? p.values.filter((T) => T.toLowerCase().includes(I)) : p.values;
533
- }), m = R(() => f.value.length > 0 && f.value.every((I) => E.has(I)));
534
- function r(I) {
535
- E.has(I) ? E.delete(I) : E.add(I);
536
- }
537
- function o() {
538
- const I = !m.value;
539
- for (const T of f.value) I ? E.add(T) : E.delete(T);
540
- }
541
- function d() {
542
- l("apply", [...E]);
543
- }
544
- const k = y(null);
545
- function z(I) {
546
- k.value && !k.value.contains(I.target) && l("close");
547
- }
548
- return Ke(() => setTimeout(() => document.addEventListener("mousedown", z), 0)), we(() => document.removeEventListener("mousedown", z)), (I, T) => (u(), c("div", {
549
- class: "filter-pop",
550
- ref_key: "rootEl",
551
- ref: k,
552
- style: We({ left: v.x + "px", top: v.y + "px" }),
553
- onKeydown: T[5] || (T[5] = Ue(() => {
554
- }, ["stop"]))
555
- }, [
556
- n("div", xn, [
557
- n("button", {
558
- class: U({ on: v.sortDir === "asc" }),
559
- onClick: T[0] || (T[0] = (B) => l("sort", "asc")),
560
- title: "升序"
561
- }, "↑ 升序", 2),
562
- n("button", {
563
- class: U({ on: v.sortDir === "desc" }),
564
- onClick: T[1] || (T[1] = (B) => l("sort", "desc")),
565
- title: "降序"
566
- }, "↓ 降序", 2)
567
- ]),
568
- G(n("input", {
569
- class: "search",
570
- type: "text",
571
- placeholder: "搜索…",
572
- "onUpdate:modelValue": T[2] || (T[2] = (B) => b.value = B)
573
- }, null, 512), [
574
- [Qs, b.value]
575
- ]),
576
- n("label", hn, [
577
- n("input", {
578
- type: "checkbox",
579
- checked: m.value,
580
- onChange: o
581
- }, null, 40, wn),
582
- T[6] || (T[6] = O(" (全选) ", -1))
583
- ]),
584
- n("div", Fn, [
585
- (u(!0), c(V, null, Y(f.value, (B) => (u(), c("label", {
586
- key: B,
587
- class: "row"
588
- }, [
589
- n("input", {
590
- type: "checkbox",
591
- checked: E.has(B),
592
- onChange: (_) => r(B)
593
- }, null, 40, $n),
594
- n("span", {
595
- class: "val",
596
- title: B
597
- }, M(B), 9, En)
598
- ]))), 128)),
599
- f.value.length ? w("", !0) : (u(), c("div", In, "无匹配值"))
600
- ]),
601
- n("div", Tn, [
602
- n("button", {
603
- class: "link",
604
- onClick: T[3] || (T[3] = (B) => l("clear"))
605
- }, "清除筛选"),
606
- T[7] || (T[7] = n("div", { class: "grow" }, null, -1)),
607
- n("button", {
608
- onClick: T[4] || (T[4] = (B) => l("close"))
609
- }, "取消"),
610
- n("button", {
611
- class: "primary",
612
- onClick: d
613
- }, "确定")
614
- ])
615
- ], 36));
616
- }
617
- }), Rn = /* @__PURE__ */ ae(Pn, [["__scopeId", "data-v-4b0bc283"]]), Mn = { class: "tb-menu" }, An = {
414
+ }), oi = /* @__PURE__ */ de(li, [["__scopeId", "data-v-544df24f"]]), ui = { class: "tb-menu" }, di = {
618
415
  key: 0,
619
416
  class: "sep"
620
- }, Dn = ["placeholder", "value", "onKeydown"], Bn = ["disabled", "onClick", "onMouseenter", "onMouseleave"], zn = ["innerHTML"], Ln = {
417
+ }, vi = ["placeholder", "value", "onKeydown"], mi = ["disabled", "onClick", "onMouseenter", "onMouseleave"], fi = ["innerHTML"], ci = {
621
418
  key: 2,
622
419
  class: "ic-e"
623
- }, Nn = {
420
+ }, ri = {
624
421
  key: 3,
625
422
  class: "lb"
626
- }, On = /* @__PURE__ */ se({
423
+ }, gi = /* @__PURE__ */ ue({
627
424
  __name: "ToolbarMenu",
628
425
  props: {
629
426
  items: {}
630
427
  },
631
428
  emits: ["pick"],
632
- setup(v, { emit: x }) {
633
- const p = x;
634
- let l = null;
635
- function b(f) {
636
- var m;
637
- f.disabled || (l = f, (m = f.onHover) == null || m.call(f));
638
- }
639
- function E(f) {
640
- var m;
641
- l === f && (l = null), (m = f.onHoverEnd) == null || m.call(f);
642
- }
643
- return we(() => {
644
- var f;
645
- (f = l == null ? void 0 : l.onHoverEnd) == null || f.call(l), l = null;
646
- }), (f, m) => (u(), c("div", Mn, [
647
- (u(!0), c(V, null, Y(v.items, (r) => (u(), c(V, {
648
- key: r.id
429
+ setup(m, { emit: x }) {
430
+ const g = x;
431
+ let n = null;
432
+ function C(c) {
433
+ var y;
434
+ c.disabled || (n = c, (y = c.onHover) == null || y.call(c));
435
+ }
436
+ function M(c) {
437
+ var y;
438
+ n === c && (n = null), (y = c.onHoverEnd) == null || y.call(c);
439
+ }
440
+ return Le(() => {
441
+ var c;
442
+ (c = n == null ? void 0 : n.onHoverEnd) == null || c.call(n), n = null;
443
+ }), (c, y) => (d(), v("div", ui, [
444
+ (d(!0), v(O, null, Q(m.items, (f) => (d(), v(O, {
445
+ key: f.id
649
446
  }, [
650
- r.type === "separator" ? (u(), c("div", An)) : r.input ? (u(), c("input", {
447
+ f.type === "separator" ? (d(), v("div", di)) : f.input ? (d(), v("input", {
651
448
  key: 1,
652
449
  class: "mi-input",
653
- placeholder: r.input.placeholder,
654
- value: r.input.value,
655
- onKeydown: ea((o) => {
656
- r.input.onCommit(o.target.value), p("pick", r);
450
+ placeholder: f.input.placeholder,
451
+ value: f.input.value,
452
+ onKeydown: Ya((l) => {
453
+ f.input.onCommit(l.target.value), g("pick", f);
657
454
  }, ["enter"]),
658
- onClick: m[0] || (m[0] = Ue(() => {
455
+ onClick: y[0] || (y[0] = Ct(() => {
659
456
  }, ["stop"]))
660
- }, null, 40, Dn)) : (u(), c("button", {
457
+ }, null, 40, vi)) : (d(), v("button", {
661
458
  key: 2,
662
- class: U(["mi", { active: r.active }]),
663
- disabled: r.disabled,
664
- onClick: (o) => p("pick", r),
665
- onMouseenter: (o) => b(r),
666
- onMouseleave: (o) => E(r)
459
+ class: ee(["mi", { active: f.active }]),
460
+ disabled: f.disabled,
461
+ onClick: (l) => g("pick", f),
462
+ onMouseenter: (l) => C(f),
463
+ onMouseleave: (l) => M(f)
667
464
  }, [
668
- r.swatch ? (u(), c("span", {
465
+ f.swatch ? (d(), v("span", {
669
466
  key: 0,
670
467
  class: "sw",
671
- style: We({ background: r.swatch })
672
- }, null, 4)) : r.iconSvg ? (u(), c("span", {
468
+ style: Ke({ background: f.swatch })
469
+ }, null, 4)) : f.iconSvg ? (d(), v("span", {
673
470
  key: 1,
674
471
  class: "ic",
675
- innerHTML: h(de)(r.iconSvg)
676
- }, null, 8, zn)) : r.icon ? (u(), c("span", Ln, M(r.icon), 1)) : w("", !0),
677
- r.label ? (u(), c("span", Nn, M(r.label), 1)) : w("", !0)
678
- ], 42, Bn))
472
+ innerHTML: R(oe)(f.iconSvg)
473
+ }, null, 8, fi)) : f.icon ? (d(), v("span", ci, $(f.icon), 1)) : h("", !0),
474
+ f.label ? (d(), v("span", ri, $(f.label), 1)) : h("", !0)
475
+ ], 42, mi))
679
476
  ], 64))), 128))
680
477
  ]));
681
478
  }
682
- }), Qe = /* @__PURE__ */ ae(On, [["__scopeId", "data-v-35d480c3"]]), Vn = {
479
+ }), Ge = /* @__PURE__ */ de(gi, [["__scopeId", "data-v-35d480c3"]]), pi = {
683
480
  key: 0,
684
481
  class: "divider"
685
- }, Hn = {
482
+ }, bi = {
686
483
  key: 1,
687
484
  class: "tool"
688
- }, Wn = ["innerHTML"], Un = {
485
+ }, ki = ["innerHTML"], Ci = {
689
486
  key: 1,
690
487
  class: "ic-e"
691
- }, Kn = {
488
+ }, yi = {
692
489
  key: 2,
693
490
  class: "lb"
694
- }, _n = ["innerHTML"], jn = {
491
+ }, Si = ["innerHTML"], xi = {
695
492
  key: 0,
696
493
  class: "divider"
697
- }, Jn = {
494
+ }, hi = {
698
495
  key: 1,
699
496
  class: "dd"
700
- }, Gn = ["disabled", "title", "onClick"], qn = ["innerHTML"], Xn = {
497
+ }, Fi = ["disabled", "title", "onClick"], wi = ["innerHTML"], Ii = {
701
498
  key: 1,
702
499
  class: "ic-e"
703
- }, Zn = {
500
+ }, Ti = {
704
501
  key: 2,
705
502
  class: "lb"
706
- }, Yn = ["innerHTML"], Qn = {
503
+ }, Ei = ["innerHTML"], $i = {
707
504
  key: 0,
708
505
  class: "dd more"
709
- }, el = ["innerHTML"], tl = 46, ts = 4, sl = /* @__PURE__ */ se({
506
+ }, Pi = ["innerHTML"], Ri = 46, Zt = 4, Mi = /* @__PURE__ */ ue({
710
507
  __name: "ActionToolbar",
711
508
  props: {
712
509
  items: {}
713
510
  },
714
- setup(v) {
715
- const x = v, p = y(null), l = y(null), b = y([]), E = y(0), f = y(null);
716
- function m() {
717
- var L, P;
718
- const g = l.value;
719
- g && (b.value = Array.from(g.children).map((ve) => ve.offsetWidth), E.value = (P = (L = p.value) == null ? void 0 : L.clientWidth) != null ? P : 0);
720
- }
721
- const r = R(() => {
722
- const g = E.value, L = b.value;
723
- if (!g || L.length !== x.items.length) return x.items.length;
724
- let P = 0, ve = !0;
725
- for (let j = 0; j < x.items.length; j++)
726
- if (P += L[j] + ts, P > g) {
511
+ setup(m) {
512
+ const x = m, g = S(null), n = S(null), C = S([]), M = S(0), c = S(null);
513
+ function y() {
514
+ var A, F;
515
+ const r = n.value;
516
+ r && (C.value = Array.from(r.children).map((ve) => ve.offsetWidth), M.value = (F = (A = g.value) == null ? void 0 : A.clientWidth) != null ? F : 0);
517
+ }
518
+ const f = E(() => {
519
+ const r = M.value, A = C.value;
520
+ if (!r || A.length !== x.items.length) return x.items.length;
521
+ let F = 0, ve = !0;
522
+ for (let U = 0; U < x.items.length; U++)
523
+ if (F += A[U] + Zt, F > r) {
727
524
  ve = !1;
728
525
  break;
729
526
  }
730
527
  if (ve) return x.items.length;
731
- let _e = tl, Fe = 0;
732
- for (let j = 0; j < x.items.length && (_e += L[j] + ts, !(_e > g)); j++)
733
- Fe++;
734
- return Math.max(0, Fe);
735
- }), o = R(() => x.items.slice(0, r.value)), d = R(() => x.items.slice(r.value)), k = he.more;
736
- function z(g) {
737
- f.value = f.value === g ? null : g;
738
- }
739
- function I(g) {
740
- var L;
741
- g.disabled || (L = g.onClick) == null || L.call(g);
742
- }
743
- function T(g) {
744
- var L;
745
- g.disabled || ((L = g.items) != null && L.length ? z(g.id) : (I(g), f.value = null));
746
- }
747
- function B(g) {
748
- I(g), g.keepOpen || (f.value = null);
749
- }
750
- function _(g) {
751
- return g.iconSvg ? de(g.iconSvg) : null;
752
- }
753
- let A = null;
754
- function ie(g) {
755
- p.value && !p.value.contains(g.target) && (f.value = null);
756
- }
757
- return Ke(() => {
758
- Se(m), A = new ResizeObserver(() => {
759
- var g, L;
760
- return E.value = (L = (g = p.value) == null ? void 0 : g.clientWidth) != null ? L : 0;
761
- }), p.value && A.observe(p.value), document.addEventListener("mousedown", ie);
762
- }), we(() => {
763
- A == null || A.disconnect(), document.removeEventListener("mousedown", ie);
764
- }), N(
765
- () => x.items.map((g) => {
766
- var L;
767
- return g.id + ((L = g.label) != null ? L : "");
528
+ let Oe = Ri, xe = 0;
529
+ for (let U = 0; U < x.items.length && (Oe += A[U] + Zt, !(Oe > r)); U++)
530
+ xe++;
531
+ return Math.max(0, xe);
532
+ }), l = E(() => x.items.slice(0, f.value)), u = E(() => x.items.slice(f.value)), p = Se.more;
533
+ function D(r) {
534
+ c.value = c.value === r ? null : r;
535
+ }
536
+ function B(r) {
537
+ var A;
538
+ r.disabled || (A = r.onClick) == null || A.call(r);
539
+ }
540
+ function H(r) {
541
+ var A;
542
+ r.disabled || ((A = r.items) != null && A.length ? D(r.id) : (B(r), c.value = null));
543
+ }
544
+ function z(r) {
545
+ B(r), r.keepOpen || (c.value = null);
546
+ }
547
+ function K(r) {
548
+ return r.iconSvg ? oe(r.iconSvg) : null;
549
+ }
550
+ let T = null;
551
+ function ie(r) {
552
+ g.value && !g.value.contains(r.target) && (c.value = null);
553
+ }
554
+ return yt(() => {
555
+ Ce(y), T = new ResizeObserver(() => {
556
+ var r, A;
557
+ return M.value = (A = (r = g.value) == null ? void 0 : r.clientWidth) != null ? A : 0;
558
+ }), g.value && T.observe(g.value), document.addEventListener("mousedown", ie);
559
+ }), Le(() => {
560
+ T == null || T.disconnect(), document.removeEventListener("mousedown", ie);
561
+ }), _(
562
+ () => x.items.map((r) => {
563
+ var A;
564
+ return r.id + ((A = r.label) != null ? A : "");
768
565
  }).join("|"),
769
- () => Se(m)
770
- ), (g, L) => (u(), c("div", {
566
+ () => Ce(y)
567
+ ), (r, A) => (d(), v("div", {
771
568
  class: "action-toolbar",
772
569
  ref_key: "containerEl",
773
- ref: p
570
+ ref: g
774
571
  }, [
775
- n("div", {
572
+ i("div", {
776
573
  class: "measure",
777
574
  ref_key: "measureEl",
778
- ref: l,
575
+ ref: n,
779
576
  "aria-hidden": "true"
780
577
  }, [
781
- (u(!0), c(V, null, Y(v.items, (P) => (u(), c(V, {
782
- key: "m" + P.id
578
+ (d(!0), v(O, null, Q(m.items, (F) => (d(), v(O, {
579
+ key: "m" + F.id
783
580
  }, [
784
- P.type === "separator" ? (u(), c("span", Vn)) : (u(), c("button", Hn, [
785
- _(P) ? (u(), c("span", {
581
+ F.type === "separator" ? (d(), v("span", pi)) : (d(), v("button", bi, [
582
+ K(F) ? (d(), v("span", {
786
583
  key: 0,
787
584
  class: "ic",
788
- innerHTML: _(P)
789
- }, null, 8, Wn)) : P.icon ? (u(), c("span", Un, M(P.icon), 1)) : w("", !0),
790
- P.label ? (u(), c("span", Kn, M(P.label), 1)) : w("", !0),
791
- P.items ? (u(), c("span", {
585
+ innerHTML: K(F)
586
+ }, null, 8, ki)) : F.icon ? (d(), v("span", Ci, $(F.icon), 1)) : h("", !0),
587
+ F.label ? (d(), v("span", yi, $(F.label), 1)) : h("", !0),
588
+ F.items ? (d(), v("span", {
792
589
  key: 3,
793
590
  class: "caret",
794
- innerHTML: h(de)(h(he).caret)
795
- }, null, 8, _n)) : w("", !0)
591
+ innerHTML: R(oe)(R(Se).caret)
592
+ }, null, 8, Si)) : h("", !0)
796
593
  ]))
797
594
  ], 64))), 128))
798
595
  ], 512),
799
- (u(!0), c(V, null, Y(o.value, (P) => (u(), c(V, {
800
- key: P.id
596
+ (d(!0), v(O, null, Q(l.value, (F) => (d(), v(O, {
597
+ key: F.id
801
598
  }, [
802
- P.type === "separator" ? (u(), c("span", jn)) : (u(), c("div", Jn, [
803
- n("button", {
804
- class: U(["tool", { active: P.active, open: f.value === P.id }]),
805
- disabled: P.disabled,
806
- title: P.title || P.label || P.id,
807
- onClick: (ve) => T(P)
599
+ F.type === "separator" ? (d(), v("span", xi)) : (d(), v("div", hi, [
600
+ i("button", {
601
+ class: ee(["tool", { active: F.active, open: c.value === F.id }]),
602
+ disabled: F.disabled,
603
+ title: F.title || F.label || F.id,
604
+ onClick: (ve) => H(F)
808
605
  }, [
809
- _(P) ? (u(), c("span", {
606
+ K(F) ? (d(), v("span", {
810
607
  key: 0,
811
608
  class: "ic",
812
- innerHTML: _(P)
813
- }, null, 8, qn)) : P.icon ? (u(), c("span", Xn, M(P.icon), 1)) : w("", !0),
814
- P.label ? (u(), c("span", Zn, M(P.label), 1)) : w("", !0),
815
- P.items ? (u(), c("span", {
609
+ innerHTML: K(F)
610
+ }, null, 8, wi)) : F.icon ? (d(), v("span", Ii, $(F.icon), 1)) : h("", !0),
611
+ F.label ? (d(), v("span", Ti, $(F.label), 1)) : h("", !0),
612
+ F.items ? (d(), v("span", {
816
613
  key: 3,
817
614
  class: "caret",
818
- innerHTML: h(de)(h(he).caret)
819
- }, null, 8, Yn)) : w("", !0)
820
- ], 10, Gn),
821
- P.items && f.value === P.id ? (u(), Z(Qe, {
615
+ innerHTML: R(oe)(R(Se).caret)
616
+ }, null, 8, Ei)) : h("", !0)
617
+ ], 10, Fi),
618
+ F.items && c.value === F.id ? (d(), se(Ge, {
822
619
  key: 0,
823
- items: P.items,
824
- onPick: B
825
- }, null, 8, ["items"])) : w("", !0)
620
+ items: F.items,
621
+ onPick: z
622
+ }, null, 8, ["items"])) : h("", !0)
826
623
  ]))
827
624
  ], 64))), 128)),
828
- d.value.length ? (u(), c("div", Qn, [
829
- n("button", {
830
- class: U(["tool", { open: f.value === "__more" }]),
625
+ u.value.length ? (d(), v("div", $i, [
626
+ i("button", {
627
+ class: ee(["tool", { open: c.value === "__more" }]),
831
628
  title: "更多",
832
- onClick: L[0] || (L[0] = (P) => z("__more"))
629
+ onClick: A[0] || (A[0] = (F) => D("__more"))
833
630
  }, [
834
- n("span", {
631
+ i("span", {
835
632
  class: "ic",
836
- innerHTML: h(de)(h(k))
837
- }, null, 8, el)
633
+ innerHTML: R(oe)(R(p))
634
+ }, null, 8, Pi)
838
635
  ], 2),
839
- f.value === "__more" ? (u(), Z(Qe, {
636
+ c.value === "__more" ? (d(), se(Ge, {
840
637
  key: 0,
841
- items: d.value,
842
- onPick: B
843
- }, null, 8, ["items"])) : w("", !0)
844
- ])) : w("", !0)
638
+ items: u.value,
639
+ onPick: z
640
+ }, null, 8, ["items"])) : h("", !0)
641
+ ])) : h("", !0)
845
642
  ], 512));
846
643
  }
847
- }), al = /* @__PURE__ */ ae(sl, [["__scopeId", "data-v-d4df1c57"]]), nl = {
644
+ }), Di = /* @__PURE__ */ de(Mi, [["__scopeId", "data-v-d4df1c57"]]), Ai = {
848
645
  class: "ribbon-tabs",
849
646
  role: "tablist"
850
- }, ll = ["aria-selected", "onClick"], il = ["innerHTML"], ol = { class: "ribbon-panel" }, ul = {
647
+ }, Bi = ["aria-selected", "onClick"], _i = ["innerHTML"], zi = { class: "ribbon-panel" }, Li = {
851
648
  key: 0,
852
649
  class: "rb-sep"
853
- }, dl = { class: "rb-group" }, vl = { class: "rb-group-body" }, cl = {
650
+ }, Oi = { class: "rb-group" }, Hi = { class: "rb-group-body" }, Ni = {
854
651
  key: 0,
855
652
  class: "rb-dd"
856
- }, rl = ["disabled", "title", "onClick"], ml = ["innerHTML"], fl = { class: "lb" }, pl = {
653
+ }, Vi = ["disabled", "title", "onClick"], Wi = ["innerHTML"], Ui = { class: "lb" }, ji = {
857
654
  key: 0,
858
655
  class: "caret-inline"
859
- }, gl = {
656
+ }, Ji = {
860
657
  key: 1,
861
658
  class: "rb-smalls"
862
- }, bl = {
659
+ }, Ki = {
863
660
  key: 0,
864
661
  class: "rb-vsep"
865
- }, kl = {
662
+ }, Gi = {
866
663
  key: 1,
867
664
  class: "rb-dd"
868
- }, Cl = ["disabled", "title", "onClick"], yl = ["innerHTML"], Sl = {
665
+ }, Xi = ["disabled", "title", "onClick"], Zi = ["innerHTML"], Yi = {
869
666
  key: 1,
870
667
  class: "lb-sm"
871
- }, xl = ["innerHTML"], hl = {
668
+ }, qi = ["innerHTML"], Qi = {
872
669
  key: 0,
873
670
  class: "rb-group-name"
874
- }, wl = /* @__PURE__ */ se({
671
+ }, en = /* @__PURE__ */ ue({
875
672
  __name: "RibbonBar",
876
673
  props: {
877
674
  sections: {},
@@ -880,138 +677,138 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
880
677
  showSettings: { type: Boolean }
881
678
  },
882
679
  emits: ["update:activeSectionId", "open-settings"],
883
- setup(v, { emit: x }) {
884
- const p = v, l = x, b = y(null), E = y(null), f = R(() => p.groups.map((k) => ({ id: k.id, name: k.name, segs: ma(k.items) })));
885
- function m(k) {
886
- return k.iconSvg ? de(k.iconSvg) : null;
680
+ setup(m, { emit: x }) {
681
+ const g = m, n = x, C = S(null), M = S(null), c = E(() => g.groups.map((p) => ({ id: p.id, name: p.name, segs: vs(p.items) })));
682
+ function y(p) {
683
+ return p.iconSvg ? oe(p.iconSvg) : null;
887
684
  }
888
- function r(k) {
889
- var z, I;
890
- k.disabled || ((z = k.items) != null && z.length ? b.value = b.value === k.id ? null : k.id : ((I = k.onClick) == null || I.call(k), b.value = null));
685
+ function f(p) {
686
+ var D, B;
687
+ p.disabled || ((D = p.items) != null && D.length ? C.value = C.value === p.id ? null : p.id : ((B = p.onClick) == null || B.call(p), C.value = null));
891
688
  }
892
- function o(k) {
893
- var z;
894
- (z = k.onClick) == null || z.call(k), k.keepOpen || (b.value = null);
689
+ function l(p) {
690
+ var D;
691
+ (D = p.onClick) == null || D.call(p), p.keepOpen || (C.value = null);
895
692
  }
896
- function d(k) {
897
- E.value && !E.value.contains(k.target) && (b.value = null);
693
+ function u(p) {
694
+ M.value && !M.value.contains(p.target) && (C.value = null);
898
695
  }
899
- return Ke(() => document.addEventListener("mousedown", d)), we(() => document.removeEventListener("mousedown", d)), (k, z) => (u(), c("div", {
696
+ return yt(() => document.addEventListener("mousedown", u)), Le(() => document.removeEventListener("mousedown", u)), (p, D) => (d(), v("div", {
900
697
  class: "ribbon",
901
698
  ref_key: "rootEl",
902
- ref: E
699
+ ref: M
903
700
  }, [
904
- n("div", nl, [
905
- (u(!0), c(V, null, Y(v.sections, (I) => (u(), c("button", {
906
- key: I.id,
907
- class: U(["ribbon-tab", { active: I.id === v.activeSectionId }]),
701
+ i("div", Ai, [
702
+ (d(!0), v(O, null, Q(m.sections, (B) => (d(), v("button", {
703
+ key: B.id,
704
+ class: ee(["ribbon-tab", { active: B.id === m.activeSectionId }]),
908
705
  role: "tab",
909
- "aria-selected": I.id === v.activeSectionId,
910
- onClick: (T) => l("update:activeSectionId", I.id)
911
- }, M(I.name), 11, ll))), 128)),
912
- z[2] || (z[2] = n("span", { class: "ribbon-tabs-spacer" }, null, -1)),
913
- v.showSettings ? (u(), c("button", {
706
+ "aria-selected": B.id === m.activeSectionId,
707
+ onClick: (H) => n("update:activeSectionId", B.id)
708
+ }, $(B.name), 11, Bi))), 128)),
709
+ D[2] || (D[2] = i("span", { class: "ribbon-tabs-spacer" }, null, -1)),
710
+ m.showSettings ? (d(), v("button", {
914
711
  key: 0,
915
712
  class: "ribbon-gear",
916
713
  title: "设置(工具板块 / 常规 / 视图)",
917
- onClick: z[0] || (z[0] = (I) => l("open-settings"))
714
+ onClick: D[0] || (D[0] = (B) => n("open-settings"))
918
715
  }, [
919
- n("span", {
716
+ i("span", {
920
717
  class: "ic",
921
- innerHTML: h(de)(h(he).settings)
922
- }, null, 8, il),
923
- z[1] || (z[1] = n("span", { class: "lbl" }, "设置", -1))
924
- ])) : w("", !0)
718
+ innerHTML: R(oe)(R(Se).settings)
719
+ }, null, 8, _i),
720
+ D[1] || (D[1] = i("span", { class: "lbl" }, "设置", -1))
721
+ ])) : h("", !0)
925
722
  ]),
926
- n("div", ol, [
927
- (u(!0), c(V, null, Y(f.value, (I, T) => (u(), c(V, {
928
- key: I.id
723
+ i("div", zi, [
724
+ (d(!0), v(O, null, Q(c.value, (B, H) => (d(), v(O, {
725
+ key: B.id
929
726
  }, [
930
- T > 0 ? (u(), c("div", ul)) : w("", !0),
931
- n("div", dl, [
932
- n("div", vl, [
933
- (u(!0), c(V, null, Y(I.segs, (B, _) => (u(), c(V, { key: _ }, [
934
- B.kind === "large" ? (u(), c("div", cl, [
935
- n("button", {
936
- class: U(["rb-btn rb-large", { active: B.item.active, open: b.value === B.item.id }]),
937
- disabled: B.item.disabled,
938
- title: B.item.title || B.item.label,
939
- onClick: (A) => r(B.item)
727
+ H > 0 ? (d(), v("div", Li)) : h("", !0),
728
+ i("div", Oi, [
729
+ i("div", Hi, [
730
+ (d(!0), v(O, null, Q(B.segs, (z, K) => (d(), v(O, { key: K }, [
731
+ z.kind === "large" ? (d(), v("div", Ni, [
732
+ i("button", {
733
+ class: ee(["rb-btn rb-large", { active: z.item.active, open: C.value === z.item.id }]),
734
+ disabled: z.item.disabled,
735
+ title: z.item.title || z.item.label,
736
+ onClick: (T) => f(z.item)
940
737
  }, [
941
- m(B.item) ? (u(), c("span", {
738
+ y(z.item) ? (d(), v("span", {
942
739
  key: 0,
943
740
  class: "ic-lg",
944
- innerHTML: m(B.item)
945
- }, null, 8, ml)) : w("", !0),
946
- n("span", fl, [
947
- O(M(B.item.label), 1),
948
- B.item.items ? (u(), c("span", pl, "▾")) : w("", !0)
741
+ innerHTML: y(z.item)
742
+ }, null, 8, Wi)) : h("", !0),
743
+ i("span", Ui, [
744
+ L($(z.item.label), 1),
745
+ z.item.items ? (d(), v("span", ji, "▾")) : h("", !0)
949
746
  ])
950
- ], 10, rl),
951
- B.item.items && b.value === B.item.id ? (u(), Z(Qe, {
747
+ ], 10, Vi),
748
+ z.item.items && C.value === z.item.id ? (d(), se(Ge, {
952
749
  key: 0,
953
- items: B.item.items,
954
- onPick: o
955
- }, null, 8, ["items"])) : w("", !0)
956
- ])) : (u(), c("div", gl, [
957
- (u(!0), c(V, null, Y(B.rows, (A, ie) => (u(), c("div", {
750
+ items: z.item.items,
751
+ onPick: l
752
+ }, null, 8, ["items"])) : h("", !0)
753
+ ])) : (d(), v("div", Ji, [
754
+ (d(!0), v(O, null, Q(z.rows, (T, ie) => (d(), v("div", {
958
755
  key: ie,
959
756
  class: "rb-row"
960
757
  }, [
961
- (u(!0), c(V, null, Y(A, (g) => (u(), c(V, {
962
- key: g.id
758
+ (d(!0), v(O, null, Q(T, (r) => (d(), v(O, {
759
+ key: r.id
963
760
  }, [
964
- g.type === "separator" ? (u(), c("span", bl)) : (u(), c("div", kl, [
965
- n("button", {
966
- class: U(["rb-btn rb-small", { active: g.active, open: b.value === g.id, combo: !!g.items && !!g.label }]),
967
- disabled: g.disabled,
968
- title: g.title || g.label || g.id,
969
- onClick: (L) => r(g)
761
+ r.type === "separator" ? (d(), v("span", Ki)) : (d(), v("div", Gi, [
762
+ i("button", {
763
+ class: ee(["rb-btn rb-small", { active: r.active, open: C.value === r.id, combo: !!r.items && !!r.label }]),
764
+ disabled: r.disabled,
765
+ title: r.title || r.label || r.id,
766
+ onClick: (A) => f(r)
970
767
  }, [
971
- m(g) ? (u(), c("span", {
768
+ y(r) ? (d(), v("span", {
972
769
  key: 0,
973
770
  class: "ic-sm",
974
- innerHTML: m(g)
975
- }, null, 8, yl)) : w("", !0),
976
- (g.items || g.showLabel) && g.label ? (u(), c("span", Sl, M(g.label), 1)) : w("", !0),
977
- g.items ? (u(), c("span", {
771
+ innerHTML: y(r)
772
+ }, null, 8, Zi)) : h("", !0),
773
+ (r.items || r.showLabel) && r.label ? (d(), v("span", Yi, $(r.label), 1)) : h("", !0),
774
+ r.items ? (d(), v("span", {
978
775
  key: 2,
979
776
  class: "caret",
980
- innerHTML: h(de)(h(he).caret)
981
- }, null, 8, xl)) : w("", !0)
982
- ], 10, Cl),
983
- g.items && b.value === g.id ? (u(), Z(Qe, {
777
+ innerHTML: R(oe)(R(Se).caret)
778
+ }, null, 8, qi)) : h("", !0)
779
+ ], 10, Xi),
780
+ r.items && C.value === r.id ? (d(), se(Ge, {
984
781
  key: 0,
985
- items: g.items,
986
- onPick: o
987
- }, null, 8, ["items"])) : w("", !0)
782
+ items: r.items,
783
+ onPick: l
784
+ }, null, 8, ["items"])) : h("", !0)
988
785
  ]))
989
786
  ], 64))), 128))
990
787
  ]))), 128))
991
788
  ]))
992
789
  ], 64))), 128))
993
790
  ]),
994
- I.name ? (u(), c("div", hl, M(I.name), 1)) : w("", !0)
791
+ B.name ? (d(), v("div", Qi, $(B.name), 1)) : h("", !0)
995
792
  ])
996
793
  ], 64))), 128))
997
794
  ])
998
795
  ], 512));
999
796
  }
1000
- }), Fl = /* @__PURE__ */ ae(wl, [["__scopeId", "data-v-669e85fe"]]), $l = {
797
+ }), tn = /* @__PURE__ */ de(en, [["__scopeId", "data-v-669e85fe"]]), an = {
1001
798
  key: 0,
1002
799
  class: "export-progress-overlay",
1003
800
  role: "dialog",
1004
801
  "aria-modal": "true",
1005
802
  "aria-live": "polite"
1006
- }, El = { class: "card" }, Il = { class: "title" }, Tl = { class: "row" }, Pl = { class: "pct" }, Rl = /* @__PURE__ */ se({
803
+ }, sn = { class: "card" }, nn = { class: "title" }, ln = { class: "row" }, on = { class: "pct" }, un = /* @__PURE__ */ ue({
1007
804
  __name: "ExportProgressOverlay",
1008
805
  props: {
1009
806
  state: {},
1010
807
  busy: { type: Boolean }
1011
808
  },
1012
809
  emits: ["cancel"],
1013
- setup(v, { emit: x }) {
1014
- const p = x, l = {
810
+ setup(m, { emit: x }) {
811
+ const g = x, n = {
1015
812
  render: "渲染中",
1016
813
  compose: "合成中",
1017
814
  paginate: "分页中",
@@ -1019,53 +816,53 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
1019
816
  zip: "zip 压缩",
1020
817
  convert: "批量转换"
1021
818
  };
1022
- return (b, E) => {
1023
- var f, m, r, o, d, k, z;
1024
- return u(), Z(ta, { to: "body" }, [
1025
- v.busy ? (u(), c("div", $l, [
1026
- n("div", El, [
1027
- n("div", Il, M(((f = v.state) == null ? void 0 : f.label) || l[(r = (m = v.state) == null ? void 0 : m.stage) != null ? r : ""] || "处理中…"), 1),
1028
- n("div", {
1029
- class: U(["bar", { indeterminate: ((o = v.state) == null ? void 0 : o.ratio) == null }])
819
+ return (C, M) => {
820
+ var c, y, f, l, u, p, D;
821
+ return d(), se(qa, { to: "body" }, [
822
+ m.busy ? (d(), v("div", an, [
823
+ i("div", sn, [
824
+ i("div", nn, $(((c = m.state) == null ? void 0 : c.label) || n[(f = (y = m.state) == null ? void 0 : y.stage) != null ? f : ""] || "处理中…"), 1),
825
+ i("div", {
826
+ class: ee(["bar", { indeterminate: ((l = m.state) == null ? void 0 : l.ratio) == null }])
1030
827
  }, [
1031
- ((d = v.state) == null ? void 0 : d.ratio) != null ? (u(), c("div", {
828
+ ((u = m.state) == null ? void 0 : u.ratio) != null ? (d(), v("div", {
1032
829
  key: 0,
1033
830
  class: "fill",
1034
- style: We({ width: Math.round(((k = v.state.ratio) != null ? k : 0) * 100) + "%" })
1035
- }, null, 4)) : w("", !0)
831
+ style: Ke({ width: Math.round(((p = m.state.ratio) != null ? p : 0) * 100) + "%" })
832
+ }, null, 4)) : h("", !0)
1036
833
  ], 2),
1037
- n("div", Tl, [
1038
- n("span", Pl, M(((z = v.state) == null ? void 0 : z.ratio) != null ? Math.round(v.state.ratio * 100) + "%" : "正在处理…"), 1),
1039
- n("button", {
834
+ i("div", ln, [
835
+ i("span", on, $(((D = m.state) == null ? void 0 : D.ratio) != null ? Math.round(m.state.ratio * 100) + "%" : "正在处理…"), 1),
836
+ i("button", {
1040
837
  class: "cancel",
1041
- onClick: E[0] || (E[0] = (I) => p("cancel")),
838
+ onClick: M[0] || (M[0] = (B) => g("cancel")),
1042
839
  title: "按 Esc 也可取消"
1043
840
  }, "取消")
1044
841
  ])
1045
842
  ])
1046
- ])) : w("", !0)
843
+ ])) : h("", !0)
1047
844
  ]);
1048
845
  };
1049
846
  }
1050
- }), Ml = /* @__PURE__ */ ae(Rl, [["__scopeId", "data-v-629027ad"]]), Al = {
847
+ }), dn = /* @__PURE__ */ de(un, [["__scopeId", "data-v-629027ad"]]), vn = {
1051
848
  key: 2,
1052
849
  class: "formula-bar"
1053
- }, Dl = { class: "addr" }, Bl = ["value", "title"], zl = ["title"], Ll = { class: "ov-slot" }, Nl = {
1054
- key: 3,
850
+ }, mn = { class: "addr" }, fn = ["value", "title"], cn = ["title"], rn = { class: "ov-slot" }, gn = {
851
+ key: 1,
1055
852
  class: "state"
1056
- }, Ol = { class: "loader" }, Vl = { class: "loader-label" }, Hl = { key: 0 }, Wl = { class: "loader-track" }, Ul = {
853
+ }, pn = { class: "loader" }, bn = { class: "loader-label" }, kn = { key: 0 }, Cn = { class: "loader-track" }, yn = {
1057
854
  key: 1,
1058
855
  class: "loader-fill indeterminate"
1059
- }, Kl = {
1060
- key: 4,
856
+ }, Sn = {
857
+ key: 2,
1061
858
  class: "state error"
1062
- }, _l = {
1063
- key: 5,
859
+ }, xn = {
860
+ key: 3,
1064
861
  class: "state hint"
1065
- }, jl = {
862
+ }, hn = {
1066
863
  key: 3,
1067
864
  class: "status-bar"
1068
- }, Jl = { class: "sel" }, Gl = { key: 1 }, ql = /* @__PURE__ */ se({
865
+ }, Fn = { class: "sel" }, wn = { key: 1 }, In = /* @__PURE__ */ ue({
1069
866
  __name: "ExcelViewer",
1070
867
  props: {
1071
868
  src: {},
@@ -1101,420 +898,419 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
1101
898
  contextMenu: { type: [Boolean, Function], default: void 0 }
1102
899
  },
1103
900
  emits: ["rendered", "error", "progress", "cell-click", "cell-dblclick", "selection-change", "sheet-change", "hyperlink-click", "cell-change", "edit-start", "edit-commit", "dim-change", "dirty-change", "image-change", "struct-change", "permission-denied", "before-context-menu", "context-menu", "update:editable", "update:cellImageFit"],
1104
- setup(v, { expose: x, emit: p }) {
1105
- const l = v, b = R(() => {
901
+ setup(m, { expose: x, emit: g }) {
902
+ const n = m, C = E(() => {
1106
903
  var e;
1107
- return (e = l.plugins) != null ? e : [];
1108
- }), E = R(
1109
- () => Object.assign({}, ...b.value.map((e) => e.theme || {}), l.theme || {})
1110
- ), f = R(() => !!l.cellStyle || b.value.some((e) => e.cellStyle));
1111
- function m(e, s, a) {
1112
- let i;
1113
- const F = ($) => {
1114
- const C = $ == null ? void 0 : $(e, s, a);
1115
- C && (i = K(K({}, i || {}), C));
904
+ return (e = n.plugins) != null ? e : [];
905
+ }), M = E(
906
+ () => Object.assign({}, ...C.value.map((e) => e.theme || {}), n.theme || {})
907
+ ), c = E(() => !!n.cellStyle || C.value.some((e) => e.cellStyle));
908
+ function y(e, a, s) {
909
+ let o;
910
+ const w = (I) => {
911
+ const b = I == null ? void 0 : I(e, a, s);
912
+ b && (o = W(W({}, o || {}), b));
1116
913
  };
1117
- for (const $ of b.value) F($.cellStyle);
1118
- return F(l.cellStyle), i;
1119
- }
1120
- function r(e) {
1121
- var a, i;
1122
- let s = e;
1123
- for (const F of b.value) F.transformModel && (s = (a = F.transformModel(s)) != null ? a : s);
1124
- return l.transformModel && (s = (i = l.transformModel(s)) != null ? i : s), s;
1125
- }
1126
- const o = y(null);
1127
- N(() => l.editable, () => {
1128
- o.value = null;
914
+ for (const I of C.value) w(I.cellStyle);
915
+ return w(n.cellStyle), o;
916
+ }
917
+ function f(e) {
918
+ var s, o;
919
+ let a = e;
920
+ for (const w of C.value) w.transformModel && (a = (s = w.transformModel(a)) != null ? s : a);
921
+ return n.transformModel && (a = (o = n.transformModel(a)) != null ? o : a), a;
922
+ }
923
+ const l = S(null);
924
+ _(() => n.editable, () => {
925
+ l.value = null;
1129
926
  });
1130
- const d = y(null);
1131
- N(() => l.cellImageFit, () => {
1132
- d.value = null;
927
+ const u = S(null);
928
+ _(() => n.cellImageFit, () => {
929
+ u.value = null;
1133
930
  });
1134
- const k = R(() => {
931
+ const p = E(() => {
1135
932
  var e;
1136
933
  return {
1137
- editable: (e = o.value) != null ? e : l.editable,
1138
- pivotTable: l.pivotTable,
1139
- conditionalFormat: l.conditionalFormat,
1140
- cellReadOnly: l.cellReadOnly,
1141
- readOnlyRanges: l.readOnlyRanges,
1142
- editableTargets: l.editableTargets,
1143
- strictDimensions: l.strictDimensions,
1144
- recalc: l.recalc,
1145
- formulaEngine: l.formulaEngine,
1146
- pasteBehavior: l.pasteBehavior,
1147
- readOnlyPrompt: l.readOnlyPrompt
934
+ editable: (e = l.value) != null ? e : n.editable,
935
+ pivotTable: n.pivotTable,
936
+ conditionalFormat: n.conditionalFormat,
937
+ cellReadOnly: n.cellReadOnly,
938
+ readOnlyRanges: n.readOnlyRanges,
939
+ editableTargets: n.editableTargets,
940
+ strictDimensions: n.strictDimensions,
941
+ recalc: n.recalc,
942
+ formulaEngine: n.formulaEngine,
943
+ pasteBehavior: n.pasteBehavior,
944
+ readOnlyPrompt: n.readOnlyPrompt
1148
945
  };
1149
946
  });
1150
- function z(e, s) {
1151
- var i, F;
1152
- const a = (i = l.editor) == null ? void 0 : i.call(l, e, s);
1153
- if (a) return a;
1154
- for (const $ of b.value) {
1155
- const C = (F = $.editor) == null ? void 0 : F.call($, e, s);
1156
- if (C) return C;
947
+ function D(e, a) {
948
+ var o, w;
949
+ const s = (o = n.editor) == null ? void 0 : o.call(n, e, a);
950
+ if (s) return s;
951
+ for (const I of C.value) {
952
+ const b = (w = I.editor) == null ? void 0 : w.call(I, e, a);
953
+ if (b) return b;
1157
954
  }
1158
955
  }
1159
- const I = R(() => !!l.editor || b.value.some((e) => e.editor)), T = p, { loading: B, error: _, workbook: A, load: ie, loadModel: g, progress: L, sourceBuffer: P } = Ea(), ve = R(() => {
1160
- var e, s;
1161
- return (s = (e = P.value) == null ? void 0 : e.byteLength) != null ? s : null;
1162
- }), _e = R(() => A.value ? aa(A.value) : null), Fe = y(null);
1163
- let j = xt();
1164
- N(B, (e) => {
1165
- var s;
1166
- e && (j = (s = xt()) != null ? s : j);
956
+ const B = E(() => !!n.editor || C.value.some((e) => e.editor)), H = g, { loading: z, error: K, workbook: T, load: ie, loadModel: r, progress: A, sourceBuffer: F } = Fs(), ve = E(() => {
957
+ var e, a;
958
+ return (a = (e = F.value) == null ? void 0 : e.byteLength) != null ? a : null;
959
+ }), Oe = E(() => T.value ? es(T.value) : null), xe = S(null);
960
+ let U = pt();
961
+ _(z, (e) => {
962
+ var a;
963
+ e && (U = (a = pt()) != null ? a : U);
1167
964
  });
1168
- function os(e) {
1169
- return e ? ca(e) ? e : ra(e, l.jsonOptions) : null;
1170
- }
1171
- const et = y(null), Ft = y(null), $t = R(() => {
1172
- var e, s;
1173
- return (s = (e = et.value) != null ? e : l.templateFile) != null ? s : null;
1174
- }), Et = R(() => {
1175
- var e, s;
1176
- return (s = (e = Ft.value) != null ? e : l.templateName) != null ? s : "";
965
+ function ta(e) {
966
+ return e ? us(e) ? e : ds(e, n.jsonOptions) : null;
967
+ }
968
+ const Xe = S(null), St = S(null), xt = E(() => {
969
+ var e, a;
970
+ return (a = (e = Xe.value) != null ? e : n.templateFile) != null ? a : null;
971
+ }), ht = E(() => {
972
+ var e, a;
973
+ return (a = (e = St.value) != null ? e : n.templateName) != null ? a : "";
1177
974
  });
1178
- function It(e, s) {
1179
- et.value = e, Ft.value = s;
975
+ function Ft(e, a) {
976
+ Xe.value = e, St.value = a;
1180
977
  }
1181
- function Tt() {
1182
- It(null, null);
978
+ function wt() {
979
+ Ft(null, null);
1183
980
  }
1184
- const Pt = y(null);
1185
- function us() {
981
+ const It = S(null);
982
+ function aa() {
1186
983
  var e;
1187
- (e = Pt.value) == null || e.click();
984
+ (e = It.value) == null || e.click();
1188
985
  }
1189
- function ds(e) {
1190
- var a;
1191
- const s = (a = e.target.files) == null ? void 0 : a[0];
1192
- s && (It(s, s.name), e.target.value = "");
986
+ function sa(e) {
987
+ var s;
988
+ const a = (s = e.target.files) == null ? void 0 : s[0];
989
+ a && (Ft(a, a.name), e.target.value = "");
1193
990
  }
1194
- const vs = R(() => {
1195
- var e, s;
1196
- return l.fileName ? l.fileName : l.workbook ? "JSON 数据" : ((s = (e = A.value) == null ? void 0 : e.sheets[0]) == null ? void 0 : s.name) || "";
991
+ const ia = E(() => {
992
+ var e, a;
993
+ return n.fileName ? n.fileName : n.workbook ? "JSON 数据" : ((a = (e = T.value) == null ? void 0 : e.sheets[0]) == null ? void 0 : a.name) || "";
1197
994
  });
1198
- async function cs(e) {
1199
- const s = await as(e), a = ns(s);
1200
- if (a === "xls") throw new Error("模板文件是旧版 .xls 或加密,仅支持 .xlsx/.xlsm");
1201
- if (a === "not-zip") throw new Error("模板文件不是有效的 .xlsx(非 ZIP 包)");
1202
- if (a === "empty") throw new Error("模板文件为空");
1203
- const i = await is(s);
1204
- return ls(i), i;
1205
- }
1206
- async function Rt() {
1207
- const e = $t.value, s = os(l.workbook);
1208
- if (l.src) {
1209
- e && console.warn("[ooxml-excel-editor] :templateFile 只在 :workbook (JSON / 模型) 数据源下生效;xlsx 数据源已自带格式,模板已忽略."), await ie(l.src, r);
995
+ async function na(e) {
996
+ const a = await Yt(e), s = qt(a);
997
+ if (s === "xls") throw new Error("模板文件是旧版 .xls 或加密,仅支持 .xlsx/.xlsm");
998
+ if (s === "not-zip") throw new Error("模板文件不是有效的 .xlsx(非 ZIP 包)");
999
+ if (s === "empty") throw new Error("模板文件为空");
1000
+ const o = await ea(a);
1001
+ return Qt(o), o;
1002
+ }
1003
+ async function Tt() {
1004
+ const e = xt.value, a = ta(n.workbook);
1005
+ if (n.src) {
1006
+ e && console.warn("[ooxml-excel-editor] :templateFile 只在 :workbook (JSON / 模型) 数据源下生效;xlsx 数据源已自带格式,模板已忽略."), await ie(n.src, f);
1210
1007
  return;
1211
1008
  }
1212
- if (s && e) {
1009
+ if (a && e) {
1213
1010
  try {
1214
- const a = await cs(e), i = Ca(s, a);
1215
- g(i, r);
1216
- } catch (a) {
1217
- console.error("[ooxml-excel-editor] 模板加载失败,降级为纯 JSON 渲染:", a), g(s, r);
1011
+ const s = await na(e), o = ps(a, s);
1012
+ r(o, f);
1013
+ } catch (s) {
1014
+ console.error("[ooxml-excel-editor] 模板加载失败,降级为纯 JSON 渲染:", s), r(a, f);
1218
1015
  }
1219
1016
  return;
1220
1017
  }
1221
- if (s) {
1222
- g(s, r);
1018
+ if (a) {
1019
+ r(a, f);
1223
1020
  return;
1224
1021
  }
1225
- e && await ie(e, r);
1022
+ e && await ie(e, f);
1226
1023
  }
1227
- const Mt = R(() => {
1228
- const e = L.value;
1024
+ const Et = E(() => {
1025
+ const e = A.value;
1229
1026
  return e ? e.stage === "read" ? "读取文件…" : e.stage === "parse" ? "解析中…" : "构建表格…" : "";
1230
- }), $e = R(() => {
1231
- const e = L.value;
1232
- return e && e.ratio != null ? Math.round(e.ratio * 100) : null;
1233
- }), Q = y(0), At = y(0), q = y(1), rs = y(null), Ee = y(null), tt = y(null), ce = y(null), st = y(null), at = y(null), nt = y(null), lt = y(null), Ie = ht(null), ms = y({ scrollX: 0, scrollY: 0, width: 0, height: 0, zoom: 1 }), ge = R(() => {
1234
- var s, a;
1027
+ }), he = E(() => {
1235
1028
  const e = A.value;
1236
- return e && (a = (s = e.sheets[Q.value]) != null ? s : e.sheets[0]) != null ? a : null;
1237
- }), re = y(0), Dt = y(!1), it = y(null), ot = y(null);
1029
+ return e && e.ratio != null ? Math.round(e.ratio * 100) : null;
1030
+ }), Z = S(0), $t = S(0), j = S(1), la = S(null), Fe = S(null), Ze = S(null), re = S(null), Ye = S(null), qe = S(null), Qe = S(null), et = S(null), we = bt(null), oa = S({ scrollX: 0, scrollY: 0, width: 0, height: 0, zoom: 1 }), ge = E(() => {
1031
+ var a, s;
1032
+ const e = T.value;
1033
+ return e && (s = (a = e.sheets[Z.value]) != null ? a : e.sheets[0]) != null ? s : null;
1034
+ }), me = S(0), Pt = S(!1), tt = S(null), at = S(null);
1238
1035
  let t = null;
1239
- function je() {
1036
+ function He() {
1240
1037
  t == null || t.render();
1241
1038
  }
1242
- function fs() {
1039
+ function ua() {
1243
1040
  t == null || t.measure();
1244
1041
  }
1245
- function ut() {
1246
- const e = ge.value, s = A.value;
1247
- !e || !s || !t || (t.rebuild(e, s, q.value, {
1248
- theme: E.value,
1249
- cellStyle: f.value ? m : void 0,
1250
- cellImageFit: l.cellImageFit,
1251
- readOnlyCellStyle: l.readOnlyCellStyle
1042
+ function st() {
1043
+ const e = ge.value, a = T.value;
1044
+ !e || !a || !t || (t.rebuild(e, a, j.value, {
1045
+ theme: M.value,
1046
+ cellStyle: c.value ? y : void 0,
1047
+ cellImageFit: n.cellImageFit,
1048
+ readOnlyCellStyle: n.readOnlyCellStyle
1252
1049
  // Phase C 2026-06-08
1253
- }), t.setSourceBuffer(P.value));
1050
+ }), t.setSourceBuffer(F.value));
1254
1051
  }
1255
- function ps() {
1256
- const e = ce.value;
1257
- e && (me.value = null, t == null || t.setScroll(e.scrollLeft, e.scrollTop));
1052
+ function da() {
1053
+ const e = re.value;
1054
+ e && (fe.value = null, t == null || t.setScroll(e.scrollLeft, e.scrollTop));
1258
1055
  }
1259
- let Te = null;
1260
- Ke(() => {
1261
- qt(), tt.value && Ee.value && ce.value && it.value && ot.value && st.value && at.value && nt.value && lt.value && (t = new na(
1056
+ let Ie = null;
1057
+ yt(() => {
1058
+ Ut(), Ze.value && Fe.value && re.value && tt.value && at.value && Ye.value && qe.value && Qe.value && et.value && (t = new ts(
1262
1059
  {
1263
- canvas: tt.value,
1264
- renderArea: Ee.value,
1265
- scroller: ce.value,
1266
- spacer: it.value,
1267
- overlays: { main: st.value, frow: at.value, fcol: nt.value, corner: lt.value },
1268
- editorSlot: ot.value
1060
+ canvas: Ze.value,
1061
+ renderArea: Fe.value,
1062
+ scroller: re.value,
1063
+ spacer: tt.value,
1064
+ overlays: { main: Ye.value, frow: qe.value, fcol: Qe.value, corner: et.value },
1065
+ editorSlot: at.value
1269
1066
  },
1270
1067
  {
1271
- onRenderer: (e) => Ie.value = e,
1272
- onRenderTick: () => re.value++,
1273
- onSelectionChange: () => ne.value++,
1274
- onCellClick: (e, s, a) => Ce("cell-click", { row: e, col: s, text: a }),
1275
- onCellDblClick: (e, s, a) => Ce("cell-dblclick", { row: e, col: s, text: a }),
1276
- onHyperlink: (e, s) => {
1277
- Ce("hyperlink-click", { url: e, cell: s }), l.openLinks && window.open(e, "_blank", "noopener");
1068
+ onRenderer: (e) => we.value = e,
1069
+ onRenderTick: () => me.value++,
1070
+ onSelectionChange: () => te.value++,
1071
+ onCellClick: (e, a, s) => be("cell-click", { row: e, col: a, text: s }),
1072
+ onCellDblClick: (e, a, s) => be("cell-dblclick", { row: e, col: a, text: s }),
1073
+ onHyperlink: (e, a) => {
1074
+ be("hyperlink-click", { url: e, cell: a }), n.openLinks && window.open(e, "_blank", "noopener");
1278
1075
  },
1279
- onTooltip: (e) => me.value = e,
1280
- onFindChange: () => ft.value++,
1281
- onFilterChange: () => pt.value++,
1076
+ onTooltip: (e) => fe.value = e,
1077
+ onFindChange: () => dt.value++,
1078
+ onFilterChange: () => Lt.value++,
1282
1079
  onActiveSheetChange: (e) => {
1283
- Q.value = e, At.value++;
1080
+ Z.value = e, $t.value++;
1284
1081
  },
1285
1082
  // core 新增表(透视新建工作表)→ 顶版本号让 SheetTabs 重读(workbook 是 shallowRef,push 不自动通知)
1286
- onEditEvent: (e, s) => Ce(e, s),
1083
+ onZoomChange: (e) => {
1084
+ j.value = e;
1085
+ },
1086
+ // 触屏 pinch/双击改缩放 → 同步工具栏 %(watch 会去重不再回 setZoom)
1087
+ onEditEvent: (e, a) => be(e, a),
1287
1088
  onContextMenuBefore: (e) => {
1288
- for (const s of b.value)
1289
- if (s.contextMenu) {
1290
- const a = s.contextMenu(e.ctx, e.items);
1291
- Array.isArray(a) && e.items.splice(0, e.items.length, ...a);
1089
+ for (const a of C.value)
1090
+ if (a.contextMenu) {
1091
+ const s = a.contextMenu(e.ctx, e.items);
1092
+ Array.isArray(s) && e.items.splice(0, e.items.length, ...s);
1292
1093
  }
1293
- l.contextMenu === !1 && e.preventDefault(), T("before-context-menu", e);
1094
+ n.contextMenu === !1 && e.preventDefault(), H("before-context-menu", e);
1294
1095
  },
1295
- onContextMenuShow: (e) => T("context-menu", e)
1096
+ onContextMenuShow: (e) => H("context-menu", e)
1296
1097
  }
1297
- ), ms.value = t.view, t.fileName = l.fileName, t.setEditConfig(k.value), t.setEditorResolver(I.value ? z : void 0), t.setLightboxEnabled(l.imageLightbox !== !1), t.setContextMenuTransform(typeof l.contextMenu == "function" ? l.contextMenu : null)), kt.value && (pe = new la(kt.value)), Rt(), Te = new ResizeObserver(() => {
1298
- fs(), je();
1299
- }), Ee.value && Te.observe(Ee.value);
1300
- }), we(() => {
1301
- Te == null || Te.disconnect(), t == null || t.dispose(), Gt.dispose(), pe == null || pe.dispose(), Ye.forEach((e) => e()), A.value && wt(A.value);
1302
- }), N([() => l.src, () => l.workbook, () => l.templateFile, et], () => {
1303
- Rt();
1304
- }), N(() => l.fileName, (e) => {
1098
+ ), oa.value = t.view, t.fileName = n.fileName, t.setEditConfig(p.value), t.setEditorResolver(B.value ? D : void 0), t.setLightboxEnabled(n.imageLightbox !== !1), t.setContextMenuTransform(typeof n.contextMenu == "function" ? n.contextMenu : null)), ft.value && (ce = new as(ft.value)), Tt(), Ie = new ResizeObserver(() => {
1099
+ ua(), He();
1100
+ }), Fe.value && Ie.observe(Fe.value);
1101
+ }), Le(() => {
1102
+ Ie == null || Ie.disconnect(), t == null || t.dispose(), Wt.dispose(), ce == null || ce.dispose(), Je.forEach((e) => e()), T.value && kt(T.value);
1103
+ }), _([() => n.src, () => n.workbook, () => n.templateFile, Xe], () => {
1104
+ Tt();
1105
+ }), _(() => n.fileName, (e) => {
1305
1106
  t && (t.fileName = e);
1306
- }), N(k, (e) => t == null ? void 0 : t.setEditConfig(e)), N(() => l.contextMenu, (e) => t == null ? void 0 : t.setContextMenuTransform(typeof e == "function" ? e : null)), N([() => l.editor, b], () => t == null ? void 0 : t.setEditorResolver(I.value ? z : void 0)), N(() => l.cellImageFit, (e) => {
1107
+ }), _(p, (e) => t == null ? void 0 : t.setEditConfig(e)), _(() => n.contextMenu, (e) => t == null ? void 0 : t.setContextMenuTransform(typeof e == "function" ? e : null)), _([() => n.editor, C], () => t == null ? void 0 : t.setEditorResolver(B.value ? D : void 0)), _(() => n.cellImageFit, (e) => {
1307
1108
  e && (t == null || t.setCellImageFit(e));
1308
- }), N(() => l.imageLightbox, (e) => t == null ? void 0 : t.setLightboxEnabled(e !== !1)), N(
1309
- () => [E.value, l.cellStyle, l.plugins],
1109
+ }), _(() => n.imageLightbox, (e) => t == null ? void 0 : t.setLightboxEnabled(e !== !1)), _(
1110
+ () => [M.value, n.cellStyle, n.plugins],
1310
1111
  () => {
1311
- Ie.value && ut();
1112
+ we.value && st();
1312
1113
  },
1313
1114
  { deep: !0 }
1314
- ), N(() => l.plugins, () => qt(), { deep: !1 }), N(A, async (e) => {
1115
+ ), _(() => n.plugins, () => Ut(), { deep: !1 }), _(T, async (e) => {
1315
1116
  if (!e) return;
1316
- t == null || t.clearFilterState(), Q.value = e.activeSheet, await Se(), ut();
1317
- const s = xt();
1318
- Fe.value = s != null && j != null ? Math.max(0, s - j) : null, T("rendered", e);
1319
- }), N(Q, (e) => {
1320
- const s = A.value;
1321
- s != null && s.sheets[e] && Ce("sheet-change", { index: e, name: s.sheets[e].name });
1322
- }), N(_, (e) => {
1323
- e && T("error", e);
1324
- }), N(L, (e) => {
1325
- e && T("progress", e);
1326
- }), N(Q, async (e, s) => {
1327
- var a;
1328
- s != null && (t == null || t.resetFilter((a = A.value) == null ? void 0 : a.sheets[s])), await Se(), ut();
1329
- }), N(q, (e) => t == null ? void 0 : t.setZoom(e));
1330
- const ne = y(0), me = y(null), J = R(() => {
1117
+ t == null || t.clearFilterState(), Z.value = e.activeSheet, await Ce(), st();
1118
+ const a = pt();
1119
+ xe.value = a != null && U != null ? Math.max(0, a - U) : null, H("rendered", e);
1120
+ }), _(Z, (e) => {
1121
+ const a = T.value;
1122
+ a != null && a.sheets[e] && be("sheet-change", { index: e, name: a.sheets[e].name });
1123
+ }), _(K, (e) => {
1124
+ e && H("error", e);
1125
+ }), _(A, (e) => {
1126
+ e && H("progress", e);
1127
+ }), _(Z, async (e, a) => {
1128
+ var s;
1129
+ a != null && (t == null || t.resetFilter((s = T.value) == null ? void 0 : s.sheets[a])), await Ce(), st();
1130
+ }), _(j, (e) => {
1131
+ t && Math.abs(t.getZoom() - e) < 1e-6 || t == null || t.setZoom(e);
1132
+ });
1133
+ const te = S(0), fe = S(null), J = E(() => {
1331
1134
  var e;
1332
- return ne.value, Ie.value, (e = t == null ? void 0 : t.getSelection()) != null ? e : null;
1333
- }), dt = R(() => {
1334
- ne.value;
1135
+ return te.value, we.value, (e = t == null ? void 0 : t.getSelection()) != null ? e : null;
1136
+ }), it = E(() => {
1137
+ te.value;
1335
1138
  const e = t == null ? void 0 : t.getActiveCell();
1336
- return e ? xe(e.col) + (e.row + 1) : "";
1337
- }), Bt = R(() => {
1139
+ return e ? ye(e.col) + (e.row + 1) : "";
1140
+ }), Rt = E(() => {
1338
1141
  const e = J.value;
1339
- return !e || e.top === e.bottom && e.left === e.right ? "" : `${xe(e.left)}${e.top + 1}:${xe(e.right)}${e.bottom + 1}`;
1340
- }), zt = R(() => {
1341
- var a;
1342
- ne.value;
1343
- const e = Ie.value, s = t == null ? void 0 : t.getActiveCell();
1344
- return !e || !s ? "" : (a = e.cellFormula(s.row, s.col)) != null ? a : e.cellText(s.row, s.col);
1345
- }), gs = R(() => {
1142
+ return !e || e.top === e.bottom && e.left === e.right ? "" : `${ye(e.left)}${e.top + 1}:${ye(e.right)}${e.bottom + 1}`;
1143
+ }), Mt = E(() => {
1144
+ var s;
1145
+ te.value;
1146
+ const e = we.value, a = t == null ? void 0 : t.getActiveCell();
1147
+ return !e || !a ? "" : (s = e.cellFormula(a.row, a.col)) != null ? s : e.cellText(a.row, a.col);
1148
+ }), va = E(() => {
1346
1149
  var e;
1347
- return ne.value, (e = t == null ? void 0 : t.isFormulaBarVisible()) != null ? e : !0;
1348
- }), le = y(""), Pe = y(!1), Lt = y(null);
1349
- function vt() {
1350
- const e = Lt.value;
1150
+ return te.value, (e = t == null ? void 0 : t.isFormulaBarVisible()) != null ? e : !0;
1151
+ }), ae = S(""), Te = S(!1), Dt = S(null);
1152
+ function nt() {
1153
+ const e = Dt.value;
1351
1154
  e && (e.style.height = "auto", e.style.height = e.scrollHeight + "px");
1352
1155
  }
1353
- function bs(e) {
1354
- le.value = e.target.value, vt();
1156
+ function ma(e) {
1157
+ ae.value = e.target.value, nt();
1355
1158
  }
1356
- const ks = R(() => (ne.value, re.value, !!(t != null && t.canEditActiveCell()))), Je = R(() => {
1159
+ const fa = E(() => (te.value, me.value, !!(t != null && t.canEditActiveCell()))), Ne = E(() => {
1357
1160
  var e;
1358
- return ne.value, re.value, (e = t == null ? void 0 : t.getCellEditString()) != null ? e : "";
1161
+ return te.value, me.value, (e = t == null ? void 0 : t.getCellEditString()) != null ? e : "";
1359
1162
  });
1360
- N(Je, (e) => {
1361
- Pe.value || (le.value = e);
1362
- }, { immediate: !0 }), N(le, () => Se(vt));
1363
- function Cs() {
1364
- Pe.value = !0, le.value = Je.value, Se(vt);
1163
+ _(Ne, (e) => {
1164
+ Te.value || (ae.value = e);
1165
+ }, { immediate: !0 }), _(ae, () => Ce(nt));
1166
+ function ca() {
1167
+ Te.value = !0, ae.value = Ne.value, Ce(nt);
1365
1168
  }
1366
- function Nt(e) {
1367
- var s;
1368
- t == null || t.commitActiveCellValue(le.value, e), Pe.value = !1, le.value = Je.value, e === "down" && ((s = ce.value) == null || s.focus());
1169
+ function At(e) {
1170
+ var a;
1171
+ t == null || t.commitActiveCellValue(ae.value, e), Te.value = !1, ae.value = Ne.value, e === "down" && ((a = re.value) == null || a.focus());
1369
1172
  }
1370
- function ys() {
1173
+ function ra() {
1371
1174
  var e;
1372
- Pe.value = !1, le.value = Je.value, (e = ce.value) == null || e.focus();
1175
+ Te.value = !1, ae.value = Ne.value, (e = re.value) == null || e.focus();
1373
1176
  }
1374
- function Ss() {
1375
- Pe.value && Nt();
1177
+ function ga() {
1178
+ Te.value && At();
1376
1179
  }
1377
- function xs(e) {
1378
- e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), Nt("down")) : e.key === "Escape" && (e.preventDefault(), ys());
1180
+ function pa(e) {
1181
+ e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), At("down")) : e.key === "Escape" && (e.preventDefault(), ra());
1379
1182
  }
1380
- const X = R(() => {
1183
+ const G = E(() => {
1381
1184
  var e;
1382
- return ne.value, (e = t == null ? void 0 : t.getSelectionStats()) != null ? e : null;
1185
+ return te.value, (e = t == null ? void 0 : t.getSelectionStats()) != null ? e : null;
1383
1186
  });
1384
- function Ge(e) {
1187
+ function Ve(e) {
1385
1188
  return isFinite(e) ? e.toLocaleString("en-US", { maximumFractionDigits: 2 }) : "—";
1386
1189
  }
1387
- function hs(e) {
1190
+ function ba(e) {
1388
1191
  t == null || t.onMouseDown(e);
1389
1192
  }
1390
- function ws(e) {
1193
+ function ka(e) {
1391
1194
  t == null || t.onContextMenu(e);
1392
1195
  }
1393
- function Fs(e) {
1196
+ function Ca(e) {
1394
1197
  t == null || t.onMouseMove(e);
1395
1198
  }
1396
- function $s(e) {
1199
+ function ya(e) {
1397
1200
  t == null || t.onMouseUp(e);
1398
1201
  }
1399
- function Es() {
1202
+ function Sa() {
1400
1203
  t == null || t.onMouseLeave();
1401
1204
  }
1402
- function Is(e) {
1205
+ function xa(e) {
1403
1206
  t == null || t.onDblClick(e);
1404
1207
  }
1405
- function Ts(e) {
1208
+ function ha(e) {
1406
1209
  t == null || t.onKeyDown(e);
1407
1210
  }
1408
- N(J, (e) => {
1409
- const s = t == null ? void 0 : t.getActiveCell();
1410
- e && s && Ce("selection-change", { range: e, active: s });
1211
+ _(J, (e) => {
1212
+ const a = t == null ? void 0 : t.getActiveCell();
1213
+ e && a && be("selection-change", { range: e, active: a });
1411
1214
  });
1412
- function ct(e, s) {
1413
- var a;
1414
- return (a = t == null ? void 0 : t.rectOf(e, s)) != null ? a : null;
1415
- }
1416
- function rt(e) {
1215
+ function lt(e, a) {
1417
1216
  var s;
1418
- return (s = t == null ? void 0 : t.rectOfRange(e)) != null ? s : null;
1419
- }
1420
- const Re = y(null), qe = y(!1);
1421
- let Me = null;
1422
- function Ot() {
1423
- Me == null || Me.abort();
1424
- }
1425
- function ee(e, s) {
1426
- if (l.exportProgress === !1) return s(e);
1427
- const a = new AbortController();
1428
- Me = a, e != null && e.signal && (e.signal.aborted ? a.abort() : e.signal.addEventListener("abort", () => a.abort(), { once: !0 })), qe.value = !0, Re.value = null;
1429
- const i = ($) => {
1430
- var C;
1431
- Re.value = $, (C = e == null ? void 0 : e.onProgress) == null || C.call(e, $);
1432
- }, F = ye(K({}, e != null ? e : {}), { onProgress: i, signal: a.signal });
1433
- return s(F).finally(() => {
1434
- qe.value = !1, Re.value = null, Me = null;
1217
+ return (s = t == null ? void 0 : t.rectOf(e, a)) != null ? s : null;
1218
+ }
1219
+ function ot(e) {
1220
+ var a;
1221
+ return (a = t == null ? void 0 : t.rectOfRange(e)) != null ? a : null;
1222
+ }
1223
+ const Ee = S(null), We = S(!1);
1224
+ let $e = null;
1225
+ function Bt() {
1226
+ $e == null || $e.abort();
1227
+ }
1228
+ function Y(e, a) {
1229
+ if (n.exportProgress === !1) return a(e);
1230
+ const s = new AbortController();
1231
+ $e = s, e != null && e.signal && (e.signal.aborted ? s.abort() : e.signal.addEventListener("abort", () => s.abort(), { once: !0 })), We.value = !0, Ee.value = null;
1232
+ const o = (I) => {
1233
+ var b;
1234
+ Ee.value = I, (b = e == null ? void 0 : e.onProgress) == null || b.call(e, I);
1235
+ }, w = ke(W({}, e != null ? e : {}), { onProgress: o, signal: s.signal });
1236
+ return a(w).finally(() => {
1237
+ We.value = !1, Ee.value = null, $e = null;
1435
1238
  });
1436
1239
  }
1437
- const Ps = (e) => ee(e, (s) => t.exportImage(s)), Ae = (e) => ee(e, (s) => t.downloadImage(s)), Rs = (e) => ee(e, (s) => t.exportPdf(s)), De = (e) => ee(e, (s) => t.downloadPdf(s)), Be = (e) => ee(e, (s) => t.print(s)), Ms = (e) => ee(e, (s) => t.downloadXlsx(s)), As = () => t == null ? void 0 : t.downloadCsv(), Ds = () => t == null ? void 0 : t.downloadJson(), Bs = (e) => t ? t.openPrintPreview(e) : Promise.resolve(!1);
1438
- async function Vt() {
1240
+ const Fa = (e) => Y(e, (a) => t.exportImage(a)), Pe = (e) => Y(e, (a) => t.downloadImage(a)), wa = (e) => Y(e, (a) => t.exportPdf(a)), Re = (e) => Y(e, (a) => t.downloadPdf(a)), Me = (e) => Y(e, (a) => t.print(a)), Ia = (e) => Y(e, (a) => t.downloadXlsx(a)), Ta = () => t == null ? void 0 : t.downloadCsv(), Ea = () => t == null ? void 0 : t.downloadJson(), $a = (e) => t ? t.openPrintPreview(e) : Promise.resolve(!1);
1241
+ async function _t() {
1439
1242
  try {
1440
- await De();
1243
+ await Re();
1441
1244
  } catch (e) {
1442
- mt(e);
1245
+ ut(e);
1443
1246
  }
1444
1247
  }
1445
- async function Ht() {
1248
+ async function zt() {
1446
1249
  try {
1447
- await De({ vector: !0 });
1250
+ await Re({ vector: !0 });
1448
1251
  } catch (e) {
1449
- mt(e);
1252
+ ut(e);
1450
1253
  }
1451
1254
  }
1452
- function mt(e) {
1453
- const s = (e == null ? void 0 : e.message) || String(e);
1454
- console.error("[ooxml-excel-editor] 导出失败:", e), T("error", s), typeof window != "undefined" && window.alert && window.alert(s);
1255
+ function ut(e) {
1256
+ const a = (e == null ? void 0 : e.message) || String(e);
1257
+ console.error("[ooxml-excel-editor] 导出失败:", e), H("error", a), typeof window != "undefined" && window.alert && window.alert(a);
1455
1258
  }
1456
- const ze = y(!1), ft = y(0), be = R(() => {
1457
- var e;
1458
- return ft.value, (e = t == null ? void 0 : t.getFindState()) != null ? e : { query: "", matchCase: !1, wholeCell: !1, count: 0, index: -1, replace: "" };
1459
- });
1460
- function Wt() {
1461
- ze.value = !0;
1259
+ const dt = S(0), Pa = E(() => (dt.value, !!(t != null && t.isFindDialogOpen())));
1260
+ function Ra() {
1261
+ t == null || t.openFindReplaceDialog("find");
1462
1262
  }
1463
- function Ut() {
1464
- var e;
1465
- ze.value = !1, t == null || t.clearFind(), (e = ce.value) == null || e.focus();
1263
+ function Ma() {
1264
+ t != null && t.isFindDialogOpen() ? t.closeFindReplaceDialog() : t == null || t.openFindReplaceDialog("find");
1466
1265
  }
1467
- function zs(e) {
1468
- (e.ctrlKey || e.metaKey) && (e.key === "f" || e.key === "F") && (e.preventDefault(), Wt());
1266
+ function Da(e) {
1267
+ (e.ctrlKey || e.metaKey) && (e.key === "f" || e.key === "F") && (e.preventDefault(), Ra());
1469
1268
  }
1470
- const pt = y(0), fe = R(() => {
1471
- var e;
1472
- return pt.value, (e = t == null ? void 0 : t.getFilterPopup()) != null ? e : null;
1473
- });
1474
- function Ls() {
1269
+ const Lt = S(0);
1270
+ function Aa() {
1475
1271
  t == null || t.toggleAutoFilter();
1476
1272
  }
1477
- function Ns() {
1478
- const e = ge.value, s = Ie.value;
1479
- if (!e || !s) return;
1480
- const a = e.freeze;
1481
- if (a.frozenRows || a.frozenCols)
1273
+ function Ba() {
1274
+ const e = ge.value, a = we.value;
1275
+ if (!e || !a) return;
1276
+ const s = e.freeze;
1277
+ if (s.frozenRows || s.frozenCols)
1482
1278
  e.freeze = { frozenRows: 0, frozenCols: 0 };
1483
1279
  else {
1484
- const i = t == null ? void 0 : t.getActiveCell();
1485
- e.freeze = { frozenRows: i ? i.row : 1, frozenCols: i ? i.col : 0 };
1280
+ const o = t == null ? void 0 : t.getActiveCell();
1281
+ e.freeze = { frozenRows: o ? o.row : 1, frozenCols: o ? o.col : 0 };
1486
1282
  }
1487
- s.rebuildMetrics(), t == null || t.refreshContentSize(), je();
1488
- }
1489
- const Le = y(!1);
1490
- async function Os(e) {
1491
- var $;
1492
- Le.value = !1;
1493
- const s = e.scope === "all" ? "all" : "active", a = e.scope === "selection" && ($ = J.value) != null ? $ : void 0, i = {
1494
- target: s,
1495
- range: a,
1283
+ a.rebuildMetrics(), t == null || t.refreshContentSize(), He();
1284
+ }
1285
+ const De = S(!1);
1286
+ async function _a(e) {
1287
+ var I;
1288
+ De.value = !1;
1289
+ const a = e.scope === "all" ? "all" : "active", s = e.scope === "selection" && (I = J.value) != null ? I : void 0, o = {
1290
+ target: a,
1291
+ range: s,
1496
1292
  scale: e.scale,
1497
1293
  includeHeaders: e.includeHeaders,
1498
1294
  gridlines: e.gridlines
1499
- }, F = ye(K(K({}, e.format !== "auto" ? { format: e.format } : {}), e.orientation !== "auto" ? { orientation: e.orientation } : {}), {
1295
+ }, w = ke(W(W({}, e.format !== "auto" ? { format: e.format } : {}), e.orientation !== "auto" ? { orientation: e.orientation } : {}), {
1500
1296
  fitToWidth: e.fitToWidth
1501
1297
  });
1502
1298
  try {
1503
- e.action === "png" ? await Ae(i) : e.action === "pdf" ? await De(ye(K(K({}, i), F), { vector: e.pdfVector })) : await Be(K(K({}, i), F));
1504
- } catch (C) {
1505
- mt(C);
1299
+ e.action === "png" ? await Pe(o) : e.action === "pdf" ? await Re(ke(W(W({}, o), w), { vector: e.pdfVector })) : await Me(W(W({}, o), w));
1300
+ } catch (b) {
1301
+ ut(b);
1506
1302
  }
1507
1303
  }
1508
- function Vs(e) {
1304
+ function za(e) {
1509
1305
  t == null || t.setSelectionRange(e);
1510
1306
  }
1511
- const Ne = {
1512
- load: (e) => ie(e, r),
1513
- getWorkbook: () => A.value,
1514
- getActiveSheet: () => Q.value,
1307
+ const Ae = {
1308
+ load: (e) => ie(e, f),
1309
+ getWorkbook: () => T.value,
1310
+ getActiveSheet: () => Z.value,
1515
1311
  setActiveSheet: (e) => {
1516
- var s;
1517
- (s = A.value) != null && s.sheets[e] && (Q.value = e);
1312
+ var a;
1313
+ (a = T.value) != null && a.sheets[e] && (Z.value = e);
1518
1314
  },
1519
1315
  getSelection: () => J.value,
1520
1316
  getSelectionRanges: () => {
@@ -1525,31 +1321,31 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
1525
1321
  var e;
1526
1322
  return (e = t == null ? void 0 : t.hasMultiSelection()) != null ? e : !1;
1527
1323
  },
1528
- setSelection: Vs,
1529
- scrollToCell: (e, s, a) => {
1530
- var i;
1531
- return (i = t == null ? void 0 : t.scrollToCell(e, s, a)) != null ? i : !1;
1324
+ setSelection: za,
1325
+ scrollToCell: (e, a, s) => {
1326
+ var o;
1327
+ return (o = t == null ? void 0 : t.scrollToCell(e, a, s)) != null ? o : !1;
1532
1328
  },
1533
- rectOf: ct,
1534
- rectOfRange: rt,
1535
- redraw: () => je(),
1536
- isCellEditable: (e, s) => {
1537
- var a;
1538
- return (a = t == null ? void 0 : t.isCellEditable(e, s)) != null ? a : !1;
1329
+ rectOf: lt,
1330
+ rectOfRange: ot,
1331
+ redraw: () => He(),
1332
+ isCellEditable: (e, a) => {
1333
+ var s;
1334
+ return (s = t == null ? void 0 : t.isCellEditable(e, a)) != null ? s : !1;
1539
1335
  },
1540
1336
  setEditableTargets: (e) => t == null ? void 0 : t.setEditableTargets(e),
1541
1337
  getEditableTargets: () => t == null ? void 0 : t.getEditableTargets(),
1542
1338
  sortActiveColumn: (e) => {
1543
- var s;
1544
- return (s = t == null ? void 0 : t.sortActiveColumn(e)) != null ? s : !1;
1339
+ var a;
1340
+ return (a = t == null ? void 0 : t.sortActiveColumn(e)) != null ? a : !1;
1545
1341
  },
1546
1342
  createPivotTable: (e) => {
1547
- var s;
1548
- return (s = t == null ? void 0 : t.createPivotTable(e)) != null ? s : !1;
1343
+ var a;
1344
+ return (a = t == null ? void 0 : t.createPivotTable(e)) != null ? a : !1;
1549
1345
  },
1550
1346
  createPivotTableFromSelection: (e) => {
1551
- var s;
1552
- return (s = t == null ? void 0 : t.createPivotTableFromSelection(e)) != null ? s : !1;
1347
+ var a;
1348
+ return (a = t == null ? void 0 : t.createPivotTableFromSelection(e)) != null ? a : !1;
1553
1349
  },
1554
1350
  openPivotTableDialog: () => {
1555
1351
  var e;
@@ -1560,28 +1356,28 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
1560
1356
  return (e = t == null ? void 0 : t.getConditionalRules()) != null ? e : [];
1561
1357
  },
1562
1358
  addConditionalRule: (e) => {
1563
- var s;
1564
- return (s = t == null ? void 0 : t.addConditionalRule(e)) != null ? s : !1;
1565
- },
1566
- updateConditionalRule: (e, s) => {
1567
1359
  var a;
1568
- return (a = t == null ? void 0 : t.updateConditionalRule(e, s)) != null ? a : !1;
1360
+ return (a = t == null ? void 0 : t.addConditionalRule(e)) != null ? a : !1;
1569
1361
  },
1570
- removeConditionalRule: (e) => {
1362
+ updateConditionalRule: (e, a) => {
1571
1363
  var s;
1572
- return (s = t == null ? void 0 : t.removeConditionalRule(e)) != null ? s : !1;
1364
+ return (s = t == null ? void 0 : t.updateConditionalRule(e, a)) != null ? s : !1;
1365
+ },
1366
+ removeConditionalRule: (e) => {
1367
+ var a;
1368
+ return (a = t == null ? void 0 : t.removeConditionalRule(e)) != null ? a : !1;
1573
1369
  },
1574
1370
  setConditionalRules: (e) => {
1575
- var s;
1576
- return (s = t == null ? void 0 : t.setConditionalRules(e)) != null ? s : !1;
1371
+ var a;
1372
+ return (a = t == null ? void 0 : t.setConditionalRules(e)) != null ? a : !1;
1577
1373
  },
1578
1374
  openConditionalFormatDialog: () => {
1579
1375
  var e;
1580
1376
  return (e = t == null ? void 0 : t.openConditionalFormatDialog()) != null ? e : !1;
1581
1377
  },
1582
1378
  setSelectionNumberFormat: (e) => {
1583
- var s;
1584
- return (s = t == null ? void 0 : t.setSelectionNumberFormat(e)) != null ? s : !1;
1379
+ var a;
1380
+ return (a = t == null ? void 0 : t.setSelectionNumberFormat(e)) != null ? a : !1;
1585
1381
  },
1586
1382
  openNumberFormatDialog: () => {
1587
1383
  var e;
@@ -1597,96 +1393,96 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
1597
1393
  return (e = t == null ? void 0 : t.getSelectionAlignState()) != null ? e : {};
1598
1394
  },
1599
1395
  toggleSelectionFont: (e) => {
1600
- var s;
1601
- return (s = t == null ? void 0 : t.toggleSelectionFont(e)) != null ? s : !1;
1396
+ var a;
1397
+ return (a = t == null ? void 0 : t.toggleSelectionFont(e)) != null ? a : !1;
1602
1398
  },
1603
1399
  setSelectionUnderline: (e) => {
1604
- var s;
1605
- return (s = t == null ? void 0 : t.setSelectionUnderline(e)) != null ? s : !1;
1400
+ var a;
1401
+ return (a = t == null ? void 0 : t.setSelectionUnderline(e)) != null ? a : !1;
1606
1402
  },
1607
1403
  setSelectionFontName: (e) => {
1608
- var s;
1609
- return (s = t == null ? void 0 : t.setSelectionFontName(e)) != null ? s : !1;
1404
+ var a;
1405
+ return (a = t == null ? void 0 : t.setSelectionFontName(e)) != null ? a : !1;
1610
1406
  },
1611
1407
  setSelectionFontSize: (e) => {
1612
- var s;
1613
- return (s = t == null ? void 0 : t.setSelectionFontSize(e)) != null ? s : !1;
1408
+ var a;
1409
+ return (a = t == null ? void 0 : t.setSelectionFontSize(e)) != null ? a : !1;
1614
1410
  },
1615
1411
  adjustSelectionFontSize: (e) => {
1616
- var s;
1617
- return (s = t == null ? void 0 : t.adjustSelectionFontSize(e)) != null ? s : !1;
1412
+ var a;
1413
+ return (a = t == null ? void 0 : t.adjustSelectionFontSize(e)) != null ? a : !1;
1618
1414
  },
1619
1415
  setSelectionHAlign: (e) => {
1620
- var s;
1621
- return (s = t == null ? void 0 : t.setSelectionHAlign(e)) != null ? s : !1;
1416
+ var a;
1417
+ return (a = t == null ? void 0 : t.setSelectionHAlign(e)) != null ? a : !1;
1622
1418
  },
1623
1419
  setSelectionVAlign: (e) => {
1624
- var s;
1625
- return (s = t == null ? void 0 : t.setSelectionVAlign(e)) != null ? s : !1;
1626
- },
1627
- setSelectionBorders: (e, s) => {
1628
1420
  var a;
1629
- return (a = t == null ? void 0 : t.setSelectionBorders(e, s)) != null ? a : !1;
1421
+ return (a = t == null ? void 0 : t.setSelectionVAlign(e)) != null ? a : !1;
1422
+ },
1423
+ setSelectionBorders: (e, a) => {
1424
+ var s;
1425
+ return (s = t == null ? void 0 : t.setSelectionBorders(e, a)) != null ? s : !1;
1630
1426
  },
1631
1427
  mergeCenterSelection: () => {
1632
1428
  var e;
1633
1429
  return (e = t == null ? void 0 : t.mergeCenterSelection()) != null ? e : !1;
1634
1430
  },
1635
1431
  clearSelectionCells: (e) => {
1636
- var s;
1637
- return (s = t == null ? void 0 : t.clearSelectionCells(e)) != null ? s : !1;
1432
+ var a;
1433
+ return (a = t == null ? void 0 : t.clearSelectionCells(e)) != null ? a : !1;
1638
1434
  },
1639
1435
  freezePanes: (e) => {
1640
- var s;
1641
- return (s = t == null ? void 0 : t.freezePanes(e)) != null ? s : !1;
1436
+ var a;
1437
+ return (a = t == null ? void 0 : t.freezePanes(e)) != null ? a : !1;
1642
1438
  },
1643
1439
  getFreezeState: () => {
1644
1440
  var e;
1645
1441
  return (e = t == null ? void 0 : t.getFreezeState()) != null ? e : { frozenRows: 0, frozenCols: 0 };
1646
1442
  },
1647
1443
  sortByKeys: (e) => {
1648
- var s;
1649
- return (s = t == null ? void 0 : t.sortByKeys(e)) != null ? s : !1;
1444
+ var a;
1445
+ return (a = t == null ? void 0 : t.sortByKeys(e)) != null ? a : !1;
1650
1446
  },
1651
1447
  openSortDialog: () => {
1652
1448
  var e;
1653
1449
  return (e = t == null ? void 0 : t.openSortDialog()) != null ? e : !1;
1654
1450
  },
1655
1451
  setSelectionRowsHidden: (e) => {
1656
- var s;
1657
- return (s = t == null ? void 0 : t.setSelectionRowsHidden(e)) != null ? s : !1;
1452
+ var a;
1453
+ return (a = t == null ? void 0 : t.setSelectionRowsHidden(e)) != null ? a : !1;
1658
1454
  },
1659
1455
  setSelectionColsHidden: (e) => {
1660
- var s;
1661
- return (s = t == null ? void 0 : t.setSelectionColsHidden(e)) != null ? s : !1;
1456
+ var a;
1457
+ return (a = t == null ? void 0 : t.setSelectionColsHidden(e)) != null ? a : !1;
1662
1458
  },
1663
1459
  autoFitSelection: (e) => {
1664
- var s;
1665
- return (s = t == null ? void 0 : t.autoFitSelection(e)) != null ? s : !1;
1460
+ var a;
1461
+ return (a = t == null ? void 0 : t.autoFitSelection(e)) != null ? a : !1;
1666
1462
  },
1667
1463
  adjustSelectionIndent: (e) => {
1668
- var s;
1669
- return (s = t == null ? void 0 : t.adjustSelectionIndent(e)) != null ? s : !1;
1464
+ var a;
1465
+ return (a = t == null ? void 0 : t.adjustSelectionIndent(e)) != null ? a : !1;
1670
1466
  },
1671
1467
  adjustSelectionDecimals: (e) => {
1672
- var s;
1673
- return (s = t == null ? void 0 : t.adjustSelectionDecimals(e)) != null ? s : !1;
1468
+ var a;
1469
+ return (a = t == null ? void 0 : t.adjustSelectionDecimals(e)) != null ? a : !1;
1674
1470
  },
1675
1471
  applySelectionStyle: (e) => {
1676
- var s;
1677
- return (s = t == null ? void 0 : t.applySelectionStyle(e)) != null ? s : !1;
1472
+ var a;
1473
+ return (a = t == null ? void 0 : t.applySelectionStyle(e)) != null ? a : !1;
1678
1474
  },
1679
1475
  applyTableStyle: (e) => {
1680
- var s;
1681
- return (s = t == null ? void 0 : t.applyTableStyle(e)) != null ? s : !1;
1682
- },
1683
- fillSelection: (e, s) => {
1684
1476
  var a;
1685
- return (a = t == null ? void 0 : t.fillSelection(e, s)) != null ? a : !1;
1477
+ return (a = t == null ? void 0 : t.applyTableStyle(e)) != null ? a : !1;
1686
1478
  },
1687
- fillSeries: (e) => {
1479
+ fillSelection: (e, a) => {
1688
1480
  var s;
1689
- return (s = t == null ? void 0 : t.fillSeries(e)) != null ? s : !1;
1481
+ return (s = t == null ? void 0 : t.fillSelection(e, a)) != null ? s : !1;
1482
+ },
1483
+ fillSeries: (e) => {
1484
+ var a;
1485
+ return (a = t == null ? void 0 : t.fillSeries(e)) != null ? a : !1;
1690
1486
  },
1691
1487
  openFillSeriesDialog: () => {
1692
1488
  var e;
@@ -1697,16 +1493,16 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
1697
1493
  return (e = t == null ? void 0 : t.flashFill()) != null ? e : !1;
1698
1494
  },
1699
1495
  convertSelection: (e) => {
1700
- var s;
1701
- return (s = t == null ? void 0 : t.convertSelection(e)) != null ? s : !1;
1496
+ var a;
1497
+ return (a = t == null ? void 0 : t.convertSelection(e)) != null ? a : !1;
1702
1498
  },
1703
1499
  autoSumSelection: (e) => {
1704
- var s;
1705
- return (s = t == null ? void 0 : t.autoSumSelection(e)) != null ? s : !1;
1500
+ var a;
1501
+ return (a = t == null ? void 0 : t.autoSumSelection(e)) != null ? a : !1;
1706
1502
  },
1707
1503
  openInsertFunctionDialog: (e) => {
1708
- var s;
1709
- return (s = t == null ? void 0 : t.openInsertFunctionDialog(e)) != null ? s : !1;
1504
+ var a;
1505
+ return (a = t == null ? void 0 : t.openInsertFunctionDialog(e)) != null ? a : !1;
1710
1506
  },
1711
1507
  recalcAll: () => {
1712
1508
  var e;
@@ -1725,9 +1521,23 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
1725
1521
  var e;
1726
1522
  return (e = t == null ? void 0 : t.reapplyFilters()) != null ? e : !1;
1727
1523
  },
1728
- openDataValidationDialog: (e) => {
1524
+ toggleAutoFilter: () => t == null ? void 0 : t.toggleAutoFilter(),
1525
+ hasFilters: () => {
1526
+ var e;
1527
+ return (e = t == null ? void 0 : t.hasFilters()) != null ? e : !1;
1528
+ },
1529
+ clearAllFilters: () => t == null ? void 0 : t.clearAllFilters(),
1530
+ openFilterConditionDialog: (e) => t == null ? void 0 : t.openFilterConditionDialog(e),
1531
+ applyFilterCondition: (e, a) => {
1729
1532
  var s;
1730
- return (s = t == null ? void 0 : t.openDataValidationDialog(e)) != null ? s : !1;
1533
+ return (s = t == null ? void 0 : t.applyFilterCondition(e, a)) != null ? s : !1;
1534
+ },
1535
+ openFindReplaceDialog: (e) => t == null ? void 0 : t.openFindReplaceDialog(e),
1536
+ closeFindReplaceDialog: () => t == null ? void 0 : t.closeFindReplaceDialog(),
1537
+ isFindDialogOpen: () => !!(t != null && t.isFindDialogOpen()),
1538
+ openDataValidationDialog: (e) => {
1539
+ var a;
1540
+ return (a = t == null ? void 0 : t.openDataValidationDialog(e)) != null ? a : !1;
1731
1541
  },
1732
1542
  openRemoveDuplicatesDialog: () => {
1733
1543
  var e;
@@ -1750,8 +1560,8 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
1750
1560
  return (e = t == null ? void 0 : t.deleteActiveComment()) != null ? e : !1;
1751
1561
  },
1752
1562
  gotoComment: (e) => {
1753
- var s;
1754
- return (s = t == null ? void 0 : t.gotoComment(e)) != null ? s : !1;
1563
+ var a;
1564
+ return (a = t == null ? void 0 : t.gotoComment(e)) != null ? a : !1;
1755
1565
  },
1756
1566
  toggleShowAllComments: () => {
1757
1567
  var e;
@@ -1835,20 +1645,20 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
1835
1645
  return (e = t == null ? void 0 : t.getPageSetup()) != null ? e : {};
1836
1646
  },
1837
1647
  setPageSetup: (e) => {
1838
- var s;
1839
- return (s = t == null ? void 0 : t.setPageSetup(e)) != null ? s : !1;
1840
- },
1841
- setPageBreaks: (e, s) => {
1842
1648
  var a;
1843
- return (a = t == null ? void 0 : t.setPageBreaks(e, s)) != null ? a : !1;
1649
+ return (a = t == null ? void 0 : t.setPageSetup(e)) != null ? a : !1;
1650
+ },
1651
+ setPageBreaks: (e, a) => {
1652
+ var s;
1653
+ return (s = t == null ? void 0 : t.setPageBreaks(e, a)) != null ? s : !1;
1844
1654
  },
1845
1655
  setPrintAreaFromSelection: () => {
1846
1656
  var e;
1847
1657
  return (e = t == null ? void 0 : t.setPrintAreaFromSelection()) != null ? e : !1;
1848
1658
  },
1849
1659
  togglePageBreakAt: (e) => {
1850
- var s;
1851
- return (s = t == null ? void 0 : t.togglePageBreakAt(e)) != null ? s : !1;
1660
+ var a;
1661
+ return (a = t == null ? void 0 : t.togglePageBreakAt(e)) != null ? a : !1;
1852
1662
  },
1853
1663
  clearPageBreaks: () => {
1854
1664
  var e;
@@ -1861,53 +1671,53 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
1861
1671
  getBackground: () => t == null ? void 0 : t.getBackground(),
1862
1672
  getWatermark: () => t == null ? void 0 : t.getWatermark(),
1863
1673
  setBackground: (e) => {
1864
- var s;
1865
- return (s = t == null ? void 0 : t.setBackground(e)) != null ? s : !1;
1674
+ var a;
1675
+ return (a = t == null ? void 0 : t.setBackground(e)) != null ? a : !1;
1866
1676
  },
1867
1677
  setWatermark: (e) => {
1868
- var s;
1869
- return (s = t == null ? void 0 : t.setWatermark(e)) != null ? s : !1;
1678
+ var a;
1679
+ return (a = t == null ? void 0 : t.setWatermark(e)) != null ? a : !1;
1870
1680
  },
1871
1681
  openBackgroundDialog: () => {
1872
1682
  var e;
1873
1683
  return (e = t == null ? void 0 : t.openBackgroundDialog()) != null ? e : !1;
1874
1684
  },
1875
1685
  startFormatPainter: (e) => {
1876
- var s;
1877
- return (s = t == null ? void 0 : t.startFormatPainter(e)) != null ? s : !1;
1686
+ var a;
1687
+ return (a = t == null ? void 0 : t.startFormatPainter(e)) != null ? a : !1;
1878
1688
  },
1879
1689
  isFormatPainterArmed: () => {
1880
1690
  var e;
1881
1691
  return (e = t == null ? void 0 : t.isFormatPainterArmed()) != null ? e : !1;
1882
1692
  },
1883
1693
  cancelFormatPainter: () => t == null ? void 0 : t.cancelFormatPainter(),
1884
- getCellComment: (e, s) => {
1885
- var a;
1886
- return (a = t == null ? void 0 : t.getCellComment(e, s)) != null ? a : "";
1694
+ getCellComment: (e, a) => {
1695
+ var s;
1696
+ return (s = t == null ? void 0 : t.getCellComment(e, a)) != null ? s : "";
1887
1697
  },
1888
- setCellComment: (e, s, a) => {
1889
- var i;
1890
- return (i = t == null ? void 0 : t.setCellComment(e, s, a)) != null ? i : !1;
1698
+ setCellComment: (e, a, s) => {
1699
+ var o;
1700
+ return (o = t == null ? void 0 : t.setCellComment(e, a, s)) != null ? o : !1;
1891
1701
  },
1892
- openCommentEditor: (e, s) => {
1893
- var a;
1894
- return (a = t == null ? void 0 : t.openCommentEditor(e, s)) != null ? a : !1;
1895
- },
1896
- editCell: (e, s, a) => {
1897
- var i;
1898
- return (i = t == null ? void 0 : t.editCell(e, s, a)) != null ? i : !1;
1702
+ openCommentEditor: (e, a) => {
1703
+ var s;
1704
+ return (s = t == null ? void 0 : t.openCommentEditor(e, a)) != null ? s : !1;
1899
1705
  },
1900
- editRange: (e, s) => {
1901
- var a;
1902
- return (a = t == null ? void 0 : t.editRange(e, s)) != null ? a : !1;
1706
+ editCell: (e, a, s) => {
1707
+ var o;
1708
+ return (o = t == null ? void 0 : t.editCell(e, a, s)) != null ? o : !1;
1903
1709
  },
1904
- clearRange: (e) => {
1710
+ editRange: (e, a) => {
1905
1711
  var s;
1906
- return (s = t == null ? void 0 : t.clearRange(e)) != null ? s : !1;
1712
+ return (s = t == null ? void 0 : t.editRange(e, a)) != null ? s : !1;
1907
1713
  },
1908
- setStyle: (e, s) => {
1714
+ clearRange: (e) => {
1909
1715
  var a;
1910
- return (a = t == null ? void 0 : t.setStyle(e, s)) != null ? a : !1;
1716
+ return (a = t == null ? void 0 : t.clearRange(e)) != null ? a : !1;
1717
+ },
1718
+ setStyle: (e, a) => {
1719
+ var s;
1720
+ return (s = t == null ? void 0 : t.setStyle(e, a)) != null ? s : !1;
1911
1721
  },
1912
1722
  getActiveFillColor: () => {
1913
1723
  var e;
@@ -1918,12 +1728,12 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
1918
1728
  return (e = t == null ? void 0 : t.getActiveFontColor()) != null ? e : "#000000";
1919
1729
  },
1920
1730
  setSelectionFill: (e) => {
1921
- var s;
1922
- return (s = t == null ? void 0 : t.setSelectionFill(e)) != null ? s : !1;
1731
+ var a;
1732
+ return (a = t == null ? void 0 : t.setSelectionFill(e)) != null ? a : !1;
1923
1733
  },
1924
1734
  setSelectionFontColor: (e) => {
1925
- var s;
1926
- return (s = t == null ? void 0 : t.setSelectionFontColor(e)) != null ? s : !1;
1735
+ var a;
1736
+ return (a = t == null ? void 0 : t.setSelectionFontColor(e)) != null ? a : !1;
1927
1737
  },
1928
1738
  getSelectionWrapState: () => {
1929
1739
  var e;
@@ -1934,86 +1744,86 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
1934
1744
  return (e = t == null ? void 0 : t.toggleWrapTextOnSelection()) != null ? e : !1;
1935
1745
  },
1936
1746
  mergeCells: (e) => {
1937
- var s;
1938
- return (s = t == null ? void 0 : t.mergeCells(e)) != null ? s : !1;
1747
+ var a;
1748
+ return (a = t == null ? void 0 : t.mergeCells(e)) != null ? a : !1;
1939
1749
  },
1940
1750
  unmergeCells: (e) => {
1941
- var s;
1942
- return (s = t == null ? void 0 : t.unmergeCells(e)) != null ? s : !1;
1943
- },
1944
- pasteText: (e, s) => {
1945
1751
  var a;
1946
- return (a = t == null ? void 0 : t.pasteText(e, s)) != null ? a : !1;
1752
+ return (a = t == null ? void 0 : t.unmergeCells(e)) != null ? a : !1;
1753
+ },
1754
+ pasteText: (e, a) => {
1755
+ var s;
1756
+ return (s = t == null ? void 0 : t.pasteText(e, a)) != null ? s : !1;
1947
1757
  },
1948
- pasteRichHtml: (e, s, a) => {
1949
- var i;
1950
- return (i = t == null ? void 0 : t.pasteRichHtml(e, s, a)) != null ? i : !1;
1758
+ pasteRichHtml: (e, a, s) => {
1759
+ var o;
1760
+ return (o = t == null ? void 0 : t.pasteRichHtml(e, a, s)) != null ? o : !1;
1951
1761
  },
1952
1762
  getPasteBehavior: () => {
1953
1763
  var e;
1954
- return (e = t == null ? void 0 : t.getPasteBehavior()) != null ? e : Qt;
1764
+ return (e = t == null ? void 0 : t.getPasteBehavior()) != null ? e : Gt;
1955
1765
  },
1956
1766
  setPasteBehavior: (e) => t == null ? void 0 : t.setPasteBehavior(e),
1957
1767
  openPasteConfigDialog: () => {
1958
1768
  var e;
1959
1769
  return (e = t == null ? void 0 : t.openPasteConfigDialog()) != null ? e : !1;
1960
1770
  },
1961
- pasteImageBlob: (e, s) => {
1962
- var a;
1963
- return (a = t == null ? void 0 : t.pasteImageBlob(e, s)) != null ? a : Promise.resolve(!1);
1771
+ pasteImageBlob: (e, a) => {
1772
+ var s;
1773
+ return (s = t == null ? void 0 : t.pasteImageBlob(e, a)) != null ? s : Promise.resolve(!1);
1964
1774
  },
1965
1775
  getImageInsertMode: () => {
1966
1776
  var e;
1967
1777
  return (e = t == null ? void 0 : t.getImageInsertMode()) != null ? e : "float";
1968
1778
  },
1969
1779
  setImageInsertMode: (e) => t == null ? void 0 : t.setImageInsertMode(e),
1970
- insertImageBlob: (e, s, a) => {
1971
- var i;
1972
- return (i = t == null ? void 0 : t.insertImageBlob(e, s, a)) != null ? i : Promise.resolve(!1);
1780
+ insertImageBlob: (e, a, s) => {
1781
+ var o;
1782
+ return (o = t == null ? void 0 : t.insertImageBlob(e, a, s)) != null ? o : Promise.resolve(!1);
1973
1783
  },
1974
- openImagePicker: (e, s) => {
1975
- var a;
1976
- return (a = t == null ? void 0 : t.openImagePicker(e, s)) != null ? a : !1;
1784
+ openImagePicker: (e, a) => {
1785
+ var s;
1786
+ return (s = t == null ? void 0 : t.openImagePicker(e, a)) != null ? s : !1;
1977
1787
  },
1978
1788
  getImages: () => {
1979
1789
  var e;
1980
1790
  return (e = t == null ? void 0 : t.getImages()) != null ? e : [];
1981
1791
  },
1982
1792
  addImage: (e) => {
1983
- var s;
1984
- return (s = t == null ? void 0 : t.addImage(e)) != null ? s : -1;
1793
+ var a;
1794
+ return (a = t == null ? void 0 : t.addImage(e)) != null ? a : -1;
1985
1795
  },
1986
1796
  removeImage: (e) => {
1987
- var s;
1988
- return (s = t == null ? void 0 : t.removeImage(e)) != null ? s : !1;
1797
+ var a;
1798
+ return (a = t == null ? void 0 : t.removeImage(e)) != null ? a : !1;
1989
1799
  },
1990
- moveImage: (e, s, a) => {
1991
- var i;
1992
- return (i = t == null ? void 0 : t.moveImage(e, s, a)) != null ? i : !1;
1800
+ moveImage: (e, a, s) => {
1801
+ var o;
1802
+ return (o = t == null ? void 0 : t.moveImage(e, a, s)) != null ? o : !1;
1993
1803
  },
1994
- resizeImage: (e, s, a) => {
1995
- var i;
1996
- return (i = t == null ? void 0 : t.resizeImage(e, s, a)) != null ? i : !1;
1804
+ resizeImage: (e, a, s) => {
1805
+ var o;
1806
+ return (o = t == null ? void 0 : t.resizeImage(e, a, s)) != null ? o : !1;
1997
1807
  },
1998
1808
  resetImageSize: (e) => {
1999
- var s;
2000
- return (s = t == null ? void 0 : t.resetImageSize(e)) != null ? s : Promise.resolve(!1);
2001
- },
2002
- setImageRotation: (e, s) => {
2003
1809
  var a;
2004
- return (a = t == null ? void 0 : t.setImageRotation(e, s)) != null ? a : !1;
1810
+ return (a = t == null ? void 0 : t.resetImageSize(e)) != null ? a : Promise.resolve(!1);
2005
1811
  },
2006
- rotateImage: (e, s) => {
2007
- var a;
2008
- return (a = t == null ? void 0 : t.rotateImage(e, s)) != null ? a : !1;
1812
+ setImageRotation: (e, a) => {
1813
+ var s;
1814
+ return (s = t == null ? void 0 : t.setImageRotation(e, a)) != null ? s : !1;
2009
1815
  },
2010
- setImageCrop: (e, s) => {
2011
- var a;
2012
- return (a = t == null ? void 0 : t.setImageCrop(e, s)) != null ? a : !1;
1816
+ rotateImage: (e, a) => {
1817
+ var s;
1818
+ return (s = t == null ? void 0 : t.rotateImage(e, a)) != null ? s : !1;
2013
1819
  },
2014
- enterImageCrop: (e) => {
1820
+ setImageCrop: (e, a) => {
2015
1821
  var s;
2016
- return (s = t == null ? void 0 : t.enterImageCrop(e)) != null ? s : !1;
1822
+ return (s = t == null ? void 0 : t.setImageCrop(e, a)) != null ? s : !1;
1823
+ },
1824
+ enterImageCrop: (e) => {
1825
+ var a;
1826
+ return (a = t == null ? void 0 : t.enterImageCrop(e)) != null ? a : !1;
2017
1827
  },
2018
1828
  exitImageCrop: () => t == null ? void 0 : t.exitImageCrop(),
2019
1829
  getCellEditString: () => {
@@ -2024,61 +1834,61 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
2024
1834
  var e;
2025
1835
  return (e = t == null ? void 0 : t.canEditActiveCell()) != null ? e : !1;
2026
1836
  },
2027
- commitActiveCellValue: (e, s) => {
2028
- var a;
2029
- return (a = t == null ? void 0 : t.commitActiveCellValue(e, s)) != null ? a : !1;
1837
+ commitActiveCellValue: (e, a) => {
1838
+ var s;
1839
+ return (s = t == null ? void 0 : t.commitActiveCellValue(e, a)) != null ? s : !1;
2030
1840
  },
2031
1841
  getCellImages: () => {
2032
1842
  var e;
2033
1843
  return (e = t == null ? void 0 : t.getCellImages()) != null ? e : [];
2034
1844
  },
2035
- getCellImageAt: (e, s) => {
2036
- var a;
2037
- return (a = t == null ? void 0 : t.getCellImageAt(e, s)) != null ? a : null;
1845
+ getCellImageAt: (e, a) => {
1846
+ var s;
1847
+ return (s = t == null ? void 0 : t.getCellImageAt(e, a)) != null ? s : null;
2038
1848
  },
2039
- openImageLightbox: (e, s, a) => t == null ? void 0 : t.openImageLightbox(e, s, a),
1849
+ openImageLightbox: (e, a, s) => t == null ? void 0 : t.openImageLightbox(e, a, s),
2040
1850
  setCellImageFit: (e) => t == null ? void 0 : t.setCellImageFit(e),
2041
- convertImageToCell: (e, s, a) => {
2042
- var i;
2043
- return (i = t == null ? void 0 : t.convertImageToCell(e, s, a)) != null ? i : !1;
1851
+ convertImageToCell: (e, a, s) => {
1852
+ var o;
1853
+ return (o = t == null ? void 0 : t.convertImageToCell(e, a, s)) != null ? o : !1;
2044
1854
  },
2045
1855
  convertImageToCellAuto: (e) => {
2046
- var s;
2047
- return (s = t == null ? void 0 : t.convertImageToCellAuto(e)) != null ? s : !1;
1856
+ var a;
1857
+ return (a = t == null ? void 0 : t.convertImageToCellAuto(e)) != null ? a : !1;
2048
1858
  },
2049
1859
  convertAllImagesToCells: (e) => {
2050
- var s;
2051
- return (s = t == null ? void 0 : t.convertAllImagesToCells(e)) != null ? s : 0;
1860
+ var a;
1861
+ return (a = t == null ? void 0 : t.convertAllImagesToCells(e)) != null ? a : 0;
2052
1862
  },
2053
- convertImagesInRangeToCell: (e) => ee({}, async (s) => {
2054
- var a, i;
2055
- return (a = s.onProgress) == null || a.call(s, { stage: "convert", label: "选区浮动图批量嵌入…", ratio: void 0 }), (i = t == null ? void 0 : t.convertImagesInRangeToCell(e)) != null ? i : 0;
1863
+ convertImagesInRangeToCell: (e) => Y({}, async (a) => {
1864
+ var s, o;
1865
+ return (s = a.onProgress) == null || s.call(a, { stage: "convert", label: "选区浮动图批量嵌入…", ratio: void 0 }), (o = t == null ? void 0 : t.convertImagesInRangeToCell(e)) != null ? o : 0;
2056
1866
  }),
2057
- convertCellImagesInRangeToFloat: (e, s) => ee({}, async (a) => {
2058
- var i, F;
2059
- return (i = a.onProgress) == null || i.call(a, { stage: "convert", label: "选区内嵌图批量浮动化…", ratio: void 0 }), (F = t == null ? void 0 : t.convertCellImagesInRangeToFloat(e, s)) != null ? F : 0;
1867
+ convertCellImagesInRangeToFloat: (e, a) => Y({}, async (s) => {
1868
+ var o, w;
1869
+ return (o = s.onProgress) == null || o.call(s, { stage: "convert", label: "选区内嵌图批量浮动化…", ratio: void 0 }), (w = t == null ? void 0 : t.convertCellImagesInRangeToFloat(e, a)) != null ? w : 0;
2060
1870
  }),
2061
- openContextMenu: (e, s, a) => t == null ? void 0 : t.openContextMenu(e, s, a),
1871
+ openContextMenu: (e, a, s) => t == null ? void 0 : t.openContextMenu(e, a, s),
2062
1872
  closeContextMenu: () => t == null ? void 0 : t.closeContextMenu(),
2063
- convertCellImageToFloat: (e, s, a) => {
2064
- var i;
2065
- return (i = t == null ? void 0 : t.convertCellImageToFloat(e, s, a)) != null ? i : !1;
1873
+ convertCellImageToFloat: (e, a, s) => {
1874
+ var o;
1875
+ return (o = t == null ? void 0 : t.convertCellImageToFloat(e, a, s)) != null ? o : !1;
2066
1876
  },
2067
- insertRows: (e, s) => {
2068
- var a;
2069
- return (a = t == null ? void 0 : t.insertRows(e, s)) != null ? a : !1;
1877
+ insertRows: (e, a) => {
1878
+ var s;
1879
+ return (s = t == null ? void 0 : t.insertRows(e, a)) != null ? s : !1;
2070
1880
  },
2071
- deleteRows: (e, s) => {
2072
- var a;
2073
- return (a = t == null ? void 0 : t.deleteRows(e, s)) != null ? a : !1;
1881
+ deleteRows: (e, a) => {
1882
+ var s;
1883
+ return (s = t == null ? void 0 : t.deleteRows(e, a)) != null ? s : !1;
2074
1884
  },
2075
- insertCols: (e, s) => {
2076
- var a;
2077
- return (a = t == null ? void 0 : t.insertCols(e, s)) != null ? a : !1;
1885
+ insertCols: (e, a) => {
1886
+ var s;
1887
+ return (s = t == null ? void 0 : t.insertCols(e, a)) != null ? s : !1;
2078
1888
  },
2079
- deleteCols: (e, s) => {
2080
- var a;
2081
- return (a = t == null ? void 0 : t.deleteCols(e, s)) != null ? a : !1;
1889
+ deleteCols: (e, a) => {
1890
+ var s;
1891
+ return (s = t == null ? void 0 : t.deleteCols(e, a)) != null ? s : !1;
2082
1892
  },
2083
1893
  undo: () => t == null ? void 0 : t.undo(),
2084
1894
  redo: () => t == null ? void 0 : t.redo(),
@@ -2094,46 +1904,46 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
2094
1904
  var e;
2095
1905
  return (e = t == null ? void 0 : t.getEditingCell()) != null ? e : null;
2096
1906
  },
2097
- getCellSnapshot: (e, s) => {
2098
- var a;
2099
- return (a = t == null ? void 0 : t.getCellSnapshot(e, s)) != null ? a : null;
1907
+ getCellSnapshot: (e, a) => {
1908
+ var s;
1909
+ return (s = t == null ? void 0 : t.getCellSnapshot(e, a)) != null ? s : null;
2100
1910
  },
2101
- inspectCell: (e, s) => {
2102
- var a;
2103
- return (a = t == null ? void 0 : t.inspectCell(e, s)) != null ? a : null;
1911
+ inspectCell: (e, a) => {
1912
+ var s;
1913
+ return (s = t == null ? void 0 : t.inspectCell(e, a)) != null ? s : null;
2104
1914
  },
2105
- beginEdit: (e, s) => {
2106
- var a;
2107
- return (a = t == null ? void 0 : t.beginEdit(e, s)) != null ? a : !1;
1915
+ beginEdit: (e, a) => {
1916
+ var s;
1917
+ return (s = t == null ? void 0 : t.beginEdit(e, a)) != null ? s : !1;
2108
1918
  },
2109
1919
  cancelEdit: () => t == null ? void 0 : t.cancelEdit(),
2110
1920
  isEditing: () => {
2111
1921
  var e;
2112
1922
  return (e = t == null ? void 0 : t.isEditing()) != null ? e : !1;
2113
1923
  },
2114
- setColumnWidth: (e, s) => {
2115
- var a;
2116
- return (a = t == null ? void 0 : t.setColumnWidth(e, s)) != null ? a : 0;
1924
+ setColumnWidth: (e, a) => {
1925
+ var s;
1926
+ return (s = t == null ? void 0 : t.setColumnWidth(e, a)) != null ? s : 0;
2117
1927
  },
2118
- setRowHeight: (e, s) => {
2119
- var a;
2120
- return (a = t == null ? void 0 : t.setRowHeight(e, s)) != null ? a : 0;
1928
+ setRowHeight: (e, a) => {
1929
+ var s;
1930
+ return (s = t == null ? void 0 : t.setRowHeight(e, a)) != null ? s : 0;
2121
1931
  },
2122
1932
  autoFitColumns: (e) => {
2123
- var s;
2124
- return (s = t == null ? void 0 : t.autoFitColumns(e)) != null ? s : 0;
1933
+ var a;
1934
+ return (a = t == null ? void 0 : t.autoFitColumns(e)) != null ? a : 0;
2125
1935
  },
2126
1936
  autoFitRows: (e) => {
2127
- var s;
2128
- return (s = t == null ? void 0 : t.autoFitRows(e)) != null ? s : 0;
1937
+ var a;
1938
+ return (a = t == null ? void 0 : t.autoFitRows(e)) != null ? a : 0;
2129
1939
  },
2130
1940
  resetColumnWidth: (e) => {
2131
- var s;
2132
- return (s = t == null ? void 0 : t.resetColumnWidth(e)) != null ? s : 0;
1941
+ var a;
1942
+ return (a = t == null ? void 0 : t.resetColumnWidth(e)) != null ? a : 0;
2133
1943
  },
2134
1944
  resetRowHeight: (e) => {
2135
- var s;
2136
- return (s = t == null ? void 0 : t.resetRowHeight(e)) != null ? s : 0;
1945
+ var a;
1946
+ return (a = t == null ? void 0 : t.resetRowHeight(e)) != null ? a : 0;
2137
1947
  },
2138
1948
  isRecalcReady: () => {
2139
1949
  var e;
@@ -2151,297 +1961,297 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
2151
1961
  var e;
2152
1962
  return (e = t == null ? void 0 : t.resetToOriginal()) != null ? e : !1;
2153
1963
  },
2154
- exportImage: Ps,
2155
- downloadImage: Ae,
2156
- exportPdf: Rs,
2157
- downloadPdf: De,
2158
- print: Be,
2159
- openPrintPreview: Bs,
2160
- exportXlsx: (e) => ee(e, (s) => t.exportXlsx(s)),
2161
- downloadXlsx: (e) => ee(e, (s) => t.downloadXlsx(s)),
1964
+ exportImage: Fa,
1965
+ downloadImage: Pe,
1966
+ exportPdf: wa,
1967
+ downloadPdf: Re,
1968
+ print: Me,
1969
+ openPrintPreview: $a,
1970
+ exportXlsx: (e) => Y(e, (a) => t.exportXlsx(a)),
1971
+ downloadXlsx: (e) => Y(e, (a) => t.downloadXlsx(a)),
2162
1972
  exportJson: (e) => {
2163
- var s;
2164
- return (s = t == null ? void 0 : t.exportJson(e)) != null ? s : "{}";
1973
+ var a;
1974
+ return (a = t == null ? void 0 : t.exportJson(e)) != null ? a : "{}";
2165
1975
  },
2166
1976
  downloadJson: (e) => t == null ? void 0 : t.downloadJson(e),
2167
1977
  exportCsv: (e) => {
2168
- var s;
2169
- return (s = t == null ? void 0 : t.exportCsv(e)) != null ? s : "";
1978
+ var a;
1979
+ return (a = t == null ? void 0 : t.exportCsv(e)) != null ? a : "";
2170
1980
  },
2171
1981
  downloadCsv: (e) => t == null ? void 0 : t.downloadCsv(e),
2172
1982
  // ---- 数据读取(委托独立函数,自动绑 date1904 + 默认当前表) ----
2173
- getCellValue: (e, s, a) => {
2174
- const i = Oe(a);
2175
- return i ? va(i, e, s) : null;
2176
- },
2177
- getCellText: (e, s, a) => {
2178
- var F, $;
2179
- const i = Oe(a);
2180
- return i ? da(i, e, s, ($ = (F = A.value) == null ? void 0 : F.date1904) != null ? $ : !1) : "";
2181
- },
2182
- getSheetData: (e, s) => {
2183
- const a = Oe(s);
2184
- return a ? ua(a, gt(e)) : [];
2185
- },
2186
- getSheetJSON: (e, s) => {
2187
- const a = Oe(s);
2188
- return a ? oa(a, gt(e)) : [];
2189
- },
2190
- getRangeData: (e, s, a) => {
2191
- const i = Oe(a);
2192
- return i ? ia(i, e, gt(s)) : [];
1983
+ getCellValue: (e, a, s) => {
1984
+ const o = Be(s);
1985
+ return o ? os(o, e, a) : null;
1986
+ },
1987
+ getCellText: (e, a, s) => {
1988
+ var w, I;
1989
+ const o = Be(s);
1990
+ return o ? ls(o, e, a, (I = (w = T.value) == null ? void 0 : w.date1904) != null ? I : !1) : "";
1991
+ },
1992
+ getSheetData: (e, a) => {
1993
+ const s = Be(a);
1994
+ return s ? ns(s, vt(e)) : [];
1995
+ },
1996
+ getSheetJSON: (e, a) => {
1997
+ const s = Be(a);
1998
+ return s ? is(s, vt(e)) : [];
1999
+ },
2000
+ getRangeData: (e, a, s) => {
2001
+ const o = Be(s);
2002
+ return o ? ss(o, e, vt(a)) : [];
2193
2003
  }
2194
2004
  };
2195
- function Oe(e) {
2196
- var a;
2197
- const s = A.value;
2198
- return s && (a = s.sheets[e != null ? e : Q.value]) != null ? a : null;
2005
+ function Be(e) {
2006
+ var s;
2007
+ const a = T.value;
2008
+ return a && (s = a.sheets[e != null ? e : Z.value]) != null ? s : null;
2199
2009
  }
2200
- function gt(e) {
2201
- var s, a;
2202
- return ye(K({}, e), { date1904: (a = (s = A.value) == null ? void 0 : s.date1904) != null ? a : !1 });
2010
+ function vt(e) {
2011
+ var a, s;
2012
+ return ke(W({}, e), { date1904: (s = (a = T.value) == null ? void 0 : a.date1904) != null ? s : !1 });
2203
2013
  }
2204
- x(Ne);
2205
- const H = (e) => he[e];
2206
- function D(e) {
2207
- return K({ kind: "builtin" }, e);
2014
+ x(Ae);
2015
+ const N = (e) => Se[e];
2016
+ function P(e) {
2017
+ return W({ kind: "builtin" }, e);
2208
2018
  }
2209
- function Hs(e) {
2210
- var a, i, F, $, C;
2211
- const s = Fa(e, { controller: t != null ? t : null, editable: !!l.editable, hasSelection: !!J.value });
2212
- if (s) return s;
2019
+ function La(e) {
2020
+ var s, o, w, I, b;
2021
+ const a = xs(e, { controller: t != null ? t : null, editable: !!n.editable, hasSelection: !!J.value });
2022
+ if (a) return a;
2213
2023
  switch (e) {
2214
2024
  case "find":
2215
- return D({
2025
+ return P({
2216
2026
  id: e,
2217
- iconSvg: H("find"),
2027
+ iconSvg: N("find"),
2218
2028
  label: "查找",
2219
- title: "查找 (Ctrl+F)",
2220
- active: ze.value,
2221
- onClick: () => ze.value ? Ut() : Wt()
2029
+ title: "查找和替换 (Ctrl+F)",
2030
+ active: Pa.value,
2031
+ onClick: () => Ma()
2222
2032
  });
2223
2033
  case "filter":
2224
- return D({
2034
+ return P({
2225
2035
  id: e,
2226
- iconSvg: H("filter"),
2036
+ iconSvg: N("filter"),
2227
2037
  label: "筛选",
2228
2038
  title: "切换自动筛选",
2229
- active: !!((a = ge.value) != null && a.autoFilterRange),
2230
- onClick: Ls
2039
+ active: !!((s = ge.value) != null && s.autoFilterRange),
2040
+ onClick: Aa
2231
2041
  });
2232
2042
  case "clear-filter":
2233
- return D({
2043
+ return P({
2234
2044
  id: e,
2235
- iconSvg: H("clear-filter"),
2045
+ iconSvg: N("clear-filter"),
2236
2046
  label: "清除筛选",
2237
2047
  title: "清除当前表全部筛选",
2238
2048
  disabled: !(t != null && t.hasFilters()),
2239
2049
  onClick: () => t == null ? void 0 : t.clearAllFilters()
2240
2050
  });
2241
2051
  case "sort": {
2242
- const S = t == null ? void 0 : t.getSortState(), W = t == null ? void 0 : t.getActiveCell(), te = !W || !ge.value;
2243
- return D({
2052
+ const k = t == null ? void 0 : t.getSortState(), V = t == null ? void 0 : t.getActiveCell(), q = !V || !ge.value;
2053
+ return P({
2244
2054
  id: e,
2245
- iconSvg: H("sort"),
2055
+ iconSvg: N("sort"),
2246
2056
  label: "排序",
2247
- title: W ? `按 ${xe(W.col)} 列排序` : "选中一个单元格后按该列排序",
2248
- active: !!(W && (S == null ? void 0 : S.col) === W.col && S.dir),
2249
- disabled: te,
2057
+ title: V ? `按 ${ye(V.col)} 列排序` : "选中一个单元格后按该列排序",
2058
+ active: !!(V && (k == null ? void 0 : k.col) === V.col && k.dir),
2059
+ disabled: q,
2250
2060
  items: [
2251
- D({
2061
+ P({
2252
2062
  id: "sort-asc",
2253
2063
  label: "升序 (A → Z / 小 → 大)",
2254
- active: !!(W && (S == null ? void 0 : S.col) === W.col && S.dir === "asc"),
2255
- disabled: te,
2064
+ active: !!(V && (k == null ? void 0 : k.col) === V.col && k.dir === "asc"),
2065
+ disabled: q,
2256
2066
  onClick: () => t == null ? void 0 : t.sortActiveColumn("asc")
2257
2067
  }),
2258
- D({
2068
+ P({
2259
2069
  id: "sort-desc",
2260
2070
  label: "降序 (Z → A / 大 → 小)",
2261
- active: !!(W && (S == null ? void 0 : S.col) === W.col && S.dir === "desc"),
2262
- disabled: te,
2071
+ active: !!(V && (k == null ? void 0 : k.col) === V.col && k.dir === "desc"),
2072
+ disabled: q,
2263
2073
  onClick: () => t == null ? void 0 : t.sortActiveColumn("desc")
2264
2074
  }),
2265
- D({ id: "sort-custom-sep", type: "separator" }),
2266
- D({ id: "sort-custom", label: "自定义排序…", title: "多关键字排序", onClick: () => t == null ? void 0 : t.openSortDialog() })
2075
+ P({ id: "sort-custom-sep", type: "separator" }),
2076
+ P({ id: "sort-custom", label: "自定义排序…", title: "多关键字排序", onClick: () => t == null ? void 0 : t.openSortDialog() })
2267
2077
  ]
2268
2078
  });
2269
2079
  }
2270
2080
  case "copy":
2271
- return D({
2081
+ return P({
2272
2082
  id: e,
2273
- iconSvg: H("copy"),
2083
+ iconSvg: N("copy"),
2274
2084
  label: "复制",
2275
2085
  title: "复制选区 (Ctrl+C)",
2276
2086
  disabled: !J.value,
2277
2087
  onClick: () => void (t == null ? void 0 : t.copySelection())
2278
2088
  });
2279
2089
  case "pivot-table":
2280
- return l.pivotTable ? D({
2090
+ return n.pivotTable ? P({
2281
2091
  id: e,
2282
- iconSvg: H("pivot-table"),
2092
+ iconSvg: N("pivot-table"),
2283
2093
  label: "透视表",
2284
2094
  title: "选择字段并基于当前选区创建静态透视汇总表",
2285
- disabled: !J.value || !l.editable,
2095
+ disabled: !J.value || !n.editable,
2286
2096
  onClick: () => t == null ? void 0 : t.openPivotTableDialog()
2287
2097
  }) : null;
2288
2098
  case "conditional-format":
2289
- return l.conditionalFormat ? D({
2099
+ return n.conditionalFormat ? P({
2290
2100
  id: e,
2291
- iconSvg: H("conditional-format"),
2101
+ iconSvg: N("conditional-format"),
2292
2102
  label: "条件格式",
2293
2103
  title: "管理条件格式规则(新建/编辑/删除;新建套到当前选区)",
2294
- disabled: !l.editable,
2104
+ disabled: !n.editable,
2295
2105
  onClick: () => t == null ? void 0 : t.openConditionalFormatDialog()
2296
2106
  }) : null;
2297
2107
  case "number-format":
2298
- return D({
2108
+ return P({
2299
2109
  id: e,
2300
- iconSvg: H("number-format"),
2110
+ iconSvg: N("number-format"),
2301
2111
  label: "数字格式",
2302
2112
  title: "设置单元格数字格式(数值/货币/百分比/日期/自定义)",
2303
- disabled: !J.value || !l.editable,
2113
+ disabled: !J.value || !n.editable,
2304
2114
  onClick: () => t == null ? void 0 : t.openNumberFormatDialog()
2305
2115
  });
2306
2116
  case "format-painter":
2307
- return D({
2117
+ return P({
2308
2118
  id: e,
2309
- iconSvg: H("format-painter"),
2119
+ iconSvg: N("format-painter"),
2310
2120
  label: "格式刷",
2311
2121
  title: "格式刷:先选源格点此采样,再点/拖目标刷上格式(Esc 取消)",
2312
2122
  active: !!(t != null && t.isFormatPainterArmed()),
2313
- disabled: !J.value || !l.editable,
2123
+ disabled: !J.value || !n.editable,
2314
2124
  onClick: () => t != null && t.isFormatPainterArmed() ? t == null ? void 0 : t.cancelFormatPainter() : t == null ? void 0 : t.startFormatPainter()
2315
2125
  });
2316
2126
  case "wrap-text": {
2317
- const S = (i = t == null ? void 0 : t.getSelectionWrapState()) != null ? i : "none";
2318
- return D({
2127
+ const k = (o = t == null ? void 0 : t.getSelectionWrapState()) != null ? o : "none";
2128
+ return P({
2319
2129
  id: e,
2320
- iconSvg: H("wrap-text"),
2130
+ iconSvg: N("wrap-text"),
2321
2131
  label: "自动换行",
2322
2132
  title: "自动换行(选区,WPS 风格 toggle)",
2323
- active: S === "all",
2324
- disabled: !J.value || !l.editable,
2133
+ active: k === "all",
2134
+ disabled: !J.value || !n.editable,
2325
2135
  onClick: () => void (t == null ? void 0 : t.toggleWrapTextOnSelection())
2326
2136
  });
2327
2137
  }
2328
2138
  case "template": {
2329
- const S = !!$t.value, W = Et.value, te = !!l.src && !l.workbook;
2330
- return D({
2139
+ const k = !!xt.value, V = ht.value, q = !!n.src && !n.workbook;
2140
+ return P({
2331
2141
  id: e,
2332
- iconSvg: H("template"),
2142
+ iconSvg: N("template"),
2333
2143
  label: "模板",
2334
- title: te ? "模板仅对 JSON / 模型数据源生效;当前是 .xlsx 数据源,模板不可用" : S ? `模板已加载:${W || "(未命名)"}` : "为 JSON / 模型数据源套用 .xlsx 模板的样式(边框 / 字体 / 列宽 / 合并 等);模板的文字内容会被丢弃",
2335
- active: S,
2336
- disabled: te,
2144
+ title: q ? "模板仅对 JSON / 模型数据源生效;当前是 .xlsx 数据源,模板不可用" : k ? `模板已加载:${V || "(未命名)"}` : "为 JSON / 模型数据源套用 .xlsx 模板的样式(边框 / 字体 / 列宽 / 合并 等);模板的文字内容会被丢弃",
2145
+ active: k,
2146
+ disabled: q,
2337
2147
  items: [
2338
- D({
2148
+ P({
2339
2149
  id: "tpl-default",
2340
- label: (S ? "" : "✓ ") + "默认渲染",
2150
+ label: (k ? "" : "✓ ") + "默认渲染",
2341
2151
  title: "不套模板,数据按默认样式渲染",
2342
- disabled: !S,
2343
- onClick: Tt
2152
+ disabled: !k,
2153
+ onClick: wt
2344
2154
  }),
2345
- D({ id: "tpl-sep", type: "separator" }),
2346
- D({
2155
+ P({ id: "tpl-sep", type: "separator" }),
2156
+ P({
2347
2157
  id: "tpl-import",
2348
2158
  label: "导入 .xlsx 模板…",
2349
2159
  title: "选一份 .xlsx,把它的 styling(边框/字体/列宽/合并/freeze) 套到当前 JSON 数据上;模板的文字内容会被丢弃",
2350
- onClick: us
2160
+ onClick: aa
2351
2161
  }),
2352
- D({
2162
+ P({
2353
2163
  id: "tpl-clear",
2354
2164
  label: "清除模板",
2355
2165
  title: "切回默认样式渲染",
2356
- disabled: !S,
2357
- onClick: Tt
2166
+ disabled: !k,
2167
+ onClick: wt
2358
2168
  })
2359
2169
  ]
2360
2170
  });
2361
2171
  }
2362
2172
  case "image-tools": {
2363
- const S = J.value, W = t == null ? void 0 : t.getActiveCell(), te = (($ = (F = ge.value) == null ? void 0 : F.images.length) != null ? $ : 0) > 0;
2364
- return D({
2173
+ const k = J.value, V = t == null ? void 0 : t.getActiveCell(), q = ((I = (w = ge.value) == null ? void 0 : w.images.length) != null ? I : 0) > 0;
2174
+ return P({
2365
2175
  id: e,
2366
- iconSvg: H("image-tools"),
2176
+ iconSvg: N("image-tools"),
2367
2177
  label: "图片工具",
2368
2178
  title: "浮动图 ⇄ 单元格内嵌图(WPS DISPIMG)互转",
2369
- disabled: !l.editable,
2179
+ disabled: !n.editable,
2370
2180
  items: [
2371
- D({
2181
+ P({
2372
2182
  id: "img-sel-to-cell",
2373
2183
  label: "选区:浮动 → 嵌入",
2374
2184
  title: '把选区里"中心格在选区内"的浮动图,就近嵌入',
2375
- disabled: !S || !te,
2376
- onClick: () => S && (t == null ? void 0 : t.convertImagesInRangeToCell(S))
2185
+ disabled: !k || !q,
2186
+ onClick: () => k && (t == null ? void 0 : t.convertImagesInRangeToCell(k))
2377
2187
  }),
2378
- D({
2188
+ P({
2379
2189
  id: "img-sel-to-float",
2380
2190
  label: "选区:嵌入 → 浮动",
2381
2191
  title: "把选区内所有 DISPIMG 格拎成浮动图",
2382
- disabled: !S,
2383
- onClick: () => S && (t == null ? void 0 : t.convertCellImagesInRangeToFloat(S))
2192
+ disabled: !k,
2193
+ onClick: () => k && (t == null ? void 0 : t.convertCellImagesInRangeToFloat(k))
2384
2194
  }),
2385
- D({ id: "img-sep", type: "separator" }),
2386
- D({
2195
+ P({ id: "img-sep", type: "separator" }),
2196
+ P({
2387
2197
  id: "img-all-to-cell",
2388
2198
  label: "整表:浮动 → 嵌入",
2389
2199
  title: "全表浮动图按几何就近嵌入各自单元格",
2390
- disabled: !te,
2200
+ disabled: !q,
2391
2201
  onClick: () => t == null ? void 0 : t.convertAllImagesToCells()
2392
2202
  }),
2393
- D({
2203
+ P({
2394
2204
  id: "img-col-to-cell",
2395
2205
  label: "整列:浮动 → 嵌入(活动列)",
2396
2206
  title: "把中心落在活动列的浮动图就近嵌入",
2397
- disabled: !te || !W,
2398
- onClick: () => W && (t == null ? void 0 : t.convertAllImagesToCells(W.col))
2207
+ disabled: !q || !V,
2208
+ onClick: () => V && (t == null ? void 0 : t.convertAllImagesToCells(V.col))
2399
2209
  })
2400
2210
  ]
2401
2211
  });
2402
2212
  }
2403
2213
  case "freeze": {
2404
- const S = (C = ge.value) == null ? void 0 : C.freeze;
2405
- return D({
2214
+ const k = (b = ge.value) == null ? void 0 : b.freeze;
2215
+ return P({
2406
2216
  id: e,
2407
- iconSvg: H("freeze"),
2217
+ iconSvg: N("freeze"),
2408
2218
  label: "冻结",
2409
2219
  title: "冻结/取消冻结(在活动单元格)",
2410
- active: !!(S && (S.frozenRows || S.frozenCols)),
2411
- onClick: Ns
2220
+ active: !!(k && (k.frozenRows || k.frozenCols)),
2221
+ onClick: Ba
2412
2222
  });
2413
2223
  }
2414
2224
  case "export":
2415
- return D({
2225
+ return P({
2416
2226
  id: e,
2417
- iconSvg: H("export"),
2227
+ iconSvg: N("export"),
2418
2228
  label: "导出",
2419
2229
  title: "导出 / 打印",
2420
2230
  items: [
2421
- D({ id: "export-png", label: "导出为图片 (PNG)", onClick: () => void Ae() }),
2422
- D({ id: "export-pdf", label: "导出为 PDF (位图)", onClick: Vt }),
2423
- D({ id: "export-pdf-vector", label: "导出为 PDF (矢量·文字可选)", onClick: Ht }),
2424
- D({ id: "export-print", label: "打印…", onClick: () => void Be() }),
2425
- D({ id: "export-sep", type: "separator" }),
2426
- D({ id: "export-settings", label: "导出设置…", onClick: () => Le.value = !0 })
2231
+ P({ id: "export-png", label: "导出为图片 (PNG)", onClick: () => void Pe() }),
2232
+ P({ id: "export-pdf", label: "导出为 PDF (位图)", onClick: _t }),
2233
+ P({ id: "export-pdf-vector", label: "导出为 PDF (矢量·文字可选)", onClick: zt }),
2234
+ P({ id: "export-print", label: "打印…", onClick: () => void Me() }),
2235
+ P({ id: "export-sep", type: "separator" }),
2236
+ P({ id: "export-settings", label: "导出设置…", onClick: () => De.value = !0 })
2427
2237
  ]
2428
2238
  });
2429
2239
  case "zoom":
2430
- return D({
2240
+ return P({
2431
2241
  id: e,
2432
- iconSvg: H("zoom"),
2433
- label: Math.round(q.value * 100) + "%",
2242
+ iconSvg: N("zoom"),
2243
+ label: Math.round(j.value * 100) + "%",
2434
2244
  title: "缩放",
2435
2245
  items: [50, 75, 100, 125, 150, 200].map(
2436
- (S) => D({ id: "zoom-" + S, label: S + "%", active: Math.round(q.value * 100) === S, onClick: () => q.value = S / 100 })
2246
+ (k) => P({ id: "zoom-" + k, label: k + "%", active: Math.round(j.value * 100) === k, onClick: () => j.value = k / 100 })
2437
2247
  )
2438
2248
  });
2439
2249
  default:
2440
2250
  return null;
2441
2251
  }
2442
2252
  }
2443
- function bt(e, s) {
2444
- var a, i, F;
2253
+ function mt(e, a) {
2254
+ var s, o, w;
2445
2255
  return {
2446
2256
  id: e.id,
2447
2257
  type: e.type,
@@ -2449,497 +2259,429 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
2449
2259
  icon: e.icon,
2450
2260
  label: e.label,
2451
2261
  title: e.title,
2452
- active: !!((a = e.active) != null && a.call(e, Ne)),
2453
- disabled: !!((i = e.disabled) != null && i.call(e, Ne)),
2454
- onClick: e.onClick ? () => e.onClick(Ne) : void 0,
2455
- items: (F = e.items) == null ? void 0 : F.map(($) => bt($, s)),
2456
- kind: s
2262
+ active: !!((s = e.active) != null && s.call(e, Ae)),
2263
+ disabled: !!((o = e.disabled) != null && o.call(e, Ae)),
2264
+ onClick: e.onClick ? () => e.onClick(Ae) : void 0,
2265
+ items: (w = e.items) == null ? void 0 : w.map((I) => mt(I, a)),
2266
+ kind: a
2457
2267
  };
2458
2268
  }
2459
- function Ws(e, s) {
2460
- var i, F, $;
2461
- const a = [];
2462
- for (const C of e)
2463
- if (ya(C))
2464
- a.push({ id: "br-" + a.length, type: "rowbreak", kind: "builtin" });
2465
- else if (Sa(C))
2466
- a.push({ id: "sep-" + a.length, type: "separator", kind: "builtin" });
2467
- else if (s[C])
2468
- a.push(bt(s[C], "custom"));
2269
+ function Oa(e, a) {
2270
+ var o, w, I;
2271
+ const s = [];
2272
+ for (const b of e)
2273
+ if (bs(b))
2274
+ s.push({ id: "br-" + s.length, type: "rowbreak", kind: "builtin" });
2275
+ else if (ks(b))
2276
+ s.push({ id: "sep-" + s.length, type: "separator", kind: "builtin" });
2277
+ else if (a[b])
2278
+ s.push(mt(a[b], "custom"));
2469
2279
  else {
2470
- const S = Hs(C);
2471
- S && (S.size = ($ = (F = S.size) != null ? F : (i = xa[C]) == null ? void 0 : i.size) != null ? $ : "small", a.push(S));
2280
+ const k = La(b);
2281
+ k && (k.size = (I = (w = k.size) != null ? w : (o = Cs[b]) == null ? void 0 : o.size) != null ? I : "small", s.push(k));
2472
2282
  }
2473
- return a;
2283
+ return s;
2474
2284
  }
2475
- const Kt = R(() => pa(l.ribbon, l.toolbar)), Ve = R(() => l.ribbonPersistKey === null ? null : l.ribbonPersistKey || ga), Xe = y(Ve.value ? ba(Ve.value) : null), ke = R(
2476
- () => es({
2477
- ribbon: l.ribbon,
2478
- toolbar: l.toolbar,
2479
- userState: Kt.value && Ve.value ? Xe.value : null
2285
+ const Ot = E(() => fs(n.ribbon, n.toolbar)), _e = E(() => n.ribbonPersistKey === null ? null : n.ribbonPersistKey || cs), Ue = S(_e.value ? rs(_e.value) : null), pe = E(
2286
+ () => Xt({
2287
+ ribbon: n.ribbon,
2288
+ toolbar: n.toolbar,
2289
+ userState: Ot.value && _e.value ? Ue.value : null
2480
2290
  })
2481
- ), oe = y("");
2482
- N(
2483
- ke,
2291
+ ), ne = S("");
2292
+ _(
2293
+ pe,
2484
2294
  (e) => {
2485
- e.sections && (e.sections.some((s) => s.id === oe.value) || (oe.value = e.activeSectionId));
2295
+ e.sections && (e.sections.some((a) => a.id === ne.value) || (ne.value = e.activeSectionId));
2486
2296
  },
2487
2297
  { immediate: !0 }
2488
2298
  );
2489
- const _t = R(() => {
2490
- var F, $;
2491
- re.value, ne.value, ft.value, pt.value;
2492
- const e = ke.value;
2299
+ const Ht = E(() => {
2300
+ var w, I;
2301
+ me.value, te.value, dt.value, Lt.value;
2302
+ const e = pe.value;
2493
2303
  if (!e.sections) return [];
2494
- const s = (F = e.sections.find((C) => C.id === oe.value)) != null ? F : e.sections[0], a = ka(s).map((C) => ({ id: C.id, name: C.name, items: Ws(C.tools, e.customItems) })), i = [];
2495
- for (const C of b.value) for (const S of ($ = C.toolbar) != null ? $ : []) i.push(bt(S, "plugin"));
2496
- return i.length && (a.length ? a[a.length - 1].items.push(...i) : a.push({ id: "plugins", name: "", items: i })), a;
2497
- }), jt = R(() => _t.value.flatMap((e) => e.items)), Jt = jt, Us = R(() => !!ke.value.sections && jt.value.length > 0), Ks = R(() => Kt.value), Gt = new fa();
2498
- function _s(e, s) {
2499
- const a = Ve.value;
2500
- Xe.value = { v: 1, sections: e, activeSectionId: s }, a && $a(a, Xe.value);
2501
- }
2502
- function js() {
2503
- var s, a, i, F, $;
2504
- const e = ke.value;
2505
- Gt.show({
2506
- sections: (s = e.sections) != null ? s : [],
2507
- activeSectionId: oe.value,
2508
- catalog: ha,
2509
- zoom: q.value,
2510
- editable: (a = o.value) != null ? a : !!l.editable,
2511
- cellImageFit: (F = (i = d.value) != null ? i : l.cellImageFit) != null ? F : "fill",
2512
- pasteBehavior: ($ = t == null ? void 0 : t.getPasteBehavior()) != null ? $ : Qt,
2513
- onRibbonChange: (C, S) => {
2514
- _s(C, S), oe.value = S;
2304
+ const a = (w = e.sections.find((b) => b.id === ne.value)) != null ? w : e.sections[0], s = gs(a).map((b) => ({ id: b.id, name: b.name, items: Oa(b.tools, e.customItems) })), o = [];
2305
+ for (const b of C.value) for (const k of (I = b.toolbar) != null ? I : []) o.push(mt(k, "plugin"));
2306
+ return o.length && (s.length ? s[s.length - 1].items.push(...o) : s.push({ id: "plugins", name: "", items: o })), s;
2307
+ }), Nt = E(() => Ht.value.flatMap((e) => e.items)), Vt = Nt, Ha = E(() => !!pe.value.sections && Nt.value.length > 0), Na = E(() => Ot.value), Wt = new ms();
2308
+ function Va(e, a) {
2309
+ const s = _e.value;
2310
+ Ue.value = { v: 1, sections: e, activeSectionId: a }, s && hs(s, Ue.value);
2311
+ }
2312
+ function Wa() {
2313
+ var a, s, o, w, I;
2314
+ const e = pe.value;
2315
+ Wt.show({
2316
+ sections: (a = e.sections) != null ? a : [],
2317
+ activeSectionId: ne.value,
2318
+ catalog: ys,
2319
+ zoom: j.value,
2320
+ editable: (s = l.value) != null ? s : !!n.editable,
2321
+ cellImageFit: (w = (o = u.value) != null ? o : n.cellImageFit) != null ? w : "fill",
2322
+ pasteBehavior: (I = t == null ? void 0 : t.getPasteBehavior()) != null ? I : Gt,
2323
+ onRibbonChange: (b, k) => {
2324
+ Va(b, k), ne.value = k;
2515
2325
  },
2516
- onRuntimeChange: (C) => {
2517
- C.zoom != null && (q.value = C.zoom), C.editable != null && (o.value = C.editable, T("update:editable", C.editable)), C.cellImageFit != null && (d.value = C.cellImageFit, t == null || t.setCellImageFit(C.cellImageFit), T("update:cellImageFit", C.cellImageFit)), C.pasteBehavior != null && (t == null || t.setPasteBehavior(C.pasteBehavior));
2326
+ onRuntimeChange: (b) => {
2327
+ b.zoom != null && (j.value = b.zoom), b.editable != null && (l.value = b.editable, H("update:editable", b.editable)), b.cellImageFit != null && (u.value = b.cellImageFit, t == null || t.setCellImageFit(b.cellImageFit), H("update:cellImageFit", b.cellImageFit)), b.pasteBehavior != null && (t == null || t.setPasteBehavior(b.pasteBehavior));
2518
2328
  },
2519
2329
  onReset: () => {
2520
- const C = Ve.value;
2521
- C && wa(C), Xe.value = null;
2522
- const S = es({ ribbon: l.ribbon, toolbar: l.toolbar, userState: null });
2523
- oe.value = S.activeSectionId;
2330
+ const b = _e.value;
2331
+ b && Ss(b), Ue.value = null;
2332
+ const k = Xt({ ribbon: n.ribbon, toolbar: n.toolbar, userState: null });
2333
+ ne.value = k.activeSectionId;
2524
2334
  }
2525
2335
  });
2526
2336
  }
2527
- const Ze = /* @__PURE__ */ new Map();
2528
- let Ye = [];
2529
- function Ce(e, s) {
2530
- var a;
2531
- e === "dirty-change" && (Dt.value = !!(s != null && s.dirty)), T(e, s), (a = Ze.get(e)) == null || a.forEach((i) => i(s));
2337
+ const je = /* @__PURE__ */ new Map();
2338
+ let Je = [];
2339
+ function be(e, a) {
2340
+ var s;
2341
+ e === "dirty-change" && (Pt.value = !!(a != null && a.dirty)), H(e, a), (s = je.get(e)) == null || s.forEach((o) => o(a));
2532
2342
  }
2533
- function qt() {
2534
- var a;
2535
- Ye.forEach((i) => i()), Ye = [], Ze.clear();
2536
- const e = (i, F) => {
2537
- let $ = Ze.get(i);
2538
- $ || Ze.set(i, $ = /* @__PURE__ */ new Set()), $.add(F);
2539
- }, s = { viewer: Ne, on: e, redraw: () => je() };
2540
- for (const i of b.value) {
2541
- if (i.events)
2542
- for (const [$, C] of Object.entries(i.events)) C && e($, C);
2543
- const F = (a = i.setup) == null ? void 0 : a.call(i, s);
2544
- typeof F == "function" && Ye.push(F);
2343
+ function Ut() {
2344
+ var s;
2345
+ Je.forEach((o) => o()), Je = [], je.clear();
2346
+ const e = (o, w) => {
2347
+ let I = je.get(o);
2348
+ I || je.set(o, I = /* @__PURE__ */ new Set()), I.add(w);
2349
+ }, a = { viewer: Ae, on: e, redraw: () => He() };
2350
+ for (const o of C.value) {
2351
+ if (o.events)
2352
+ for (const [I, b] of Object.entries(o.events)) b && e(I, b);
2353
+ const w = (s = o.setup) == null ? void 0 : s.call(o, a);
2354
+ typeof w == "function" && Je.push(w);
2545
2355
  }
2546
2356
  }
2547
- const kt = y(null);
2548
- let pe = null;
2549
- function Js() {
2550
- const e = { rectOf: ct, rectOfRange: rt, tick: re.value, workbook: A.value };
2551
- pe == null || pe.render(b.value, e);
2357
+ const ft = S(null);
2358
+ let ce = null;
2359
+ function Ua() {
2360
+ const e = { rectOf: lt, rectOfRange: ot, tick: me.value, workbook: T.value };
2361
+ ce == null || ce.render(C.value, e);
2552
2362
  }
2553
- return N([re, b], Js, { flush: "post" }), (e, s) => (u(), c("div", {
2363
+ return _([me, C], Ua, { flush: "post" }), (e, a) => (d(), v("div", {
2554
2364
  class: "excel-viewer",
2555
2365
  ref_key: "rootEl",
2556
- ref: rs,
2557
- onKeydown: zs
2366
+ ref: la,
2367
+ onKeydown: Da
2558
2368
  }, [
2559
- h(A) ? ue(e.$slots, "header", {
2369
+ R(T) ? le(e.$slots, "header", {
2560
2370
  key: 0,
2561
- workbook: h(A),
2562
- zoom: q.value,
2563
- setZoom: (a) => q.value = a,
2564
- downloadImage: Ae,
2565
- downloadPdf: De,
2566
- print: Be
2371
+ workbook: R(T),
2372
+ zoom: j.value,
2373
+ setZoom: (s) => j.value = s,
2374
+ downloadImage: Pe,
2375
+ downloadPdf: Re,
2376
+ print: Me
2567
2377
  }, () => [
2568
- Yt(Wa, {
2569
- "file-name": vs.value,
2570
- modified: Dt.value,
2571
- "template-name": Et.value,
2572
- "sheet-count": h(A).sheets.filter((a) => a.state === "visible").length,
2378
+ Kt(Os, {
2379
+ "file-name": ia.value,
2380
+ modified: Pt.value,
2381
+ "template-name": ht.value,
2382
+ "sheet-count": R(T).sheets.filter((s) => s.state === "visible").length,
2573
2383
  "file-size": ve.value,
2574
- "data-bytes": _e.value,
2575
- "heap-bytes": Fe.value,
2576
- zoom: q.value,
2577
- "onUpdate:zoom": s[0] || (s[0] = (a) => q.value = a),
2578
- onExportImage: s[1] || (s[1] = (a) => Ae()),
2579
- onExportPdf: Vt,
2580
- onExportPdfVector: Ht,
2581
- onExportXlsx: s[2] || (s[2] = (a) => Ms()),
2582
- onExportCsv: s[3] || (s[3] = (a) => As()),
2583
- onExportJson: s[4] || (s[4] = (a) => Ds()),
2584
- onPrint: s[5] || (s[5] = (a) => Be()),
2585
- onOpenSettings: s[6] || (s[6] = (a) => Le.value = !0)
2384
+ "data-bytes": Oe.value,
2385
+ "heap-bytes": xe.value,
2386
+ zoom: j.value,
2387
+ "onUpdate:zoom": a[0] || (a[0] = (s) => j.value = s),
2388
+ onExportImage: a[1] || (a[1] = (s) => Pe()),
2389
+ onExportPdf: _t,
2390
+ onExportPdfVector: zt,
2391
+ onExportXlsx: a[2] || (a[2] = (s) => Ia()),
2392
+ onExportCsv: a[3] || (a[3] = (s) => Ta()),
2393
+ onExportJson: a[4] || (a[4] = (s) => Ea()),
2394
+ onPrint: a[5] || (a[5] = (s) => Me()),
2395
+ onOpenSettings: a[6] || (a[6] = (s) => De.value = !0)
2586
2396
  }, null, 8, ["file-name", "modified", "template-name", "sheet-count", "file-size", "data-bytes", "heap-bytes", "zoom"])
2587
- ], !0) : w("", !0),
2588
- h(A) && Us.value ? ue(e.$slots, "toolbar", {
2397
+ ], !0) : h("", !0),
2398
+ R(T) && Ha.value ? le(e.$slots, "toolbar", {
2589
2399
  key: 1,
2590
- items: h(Jt)
2400
+ items: R(Vt)
2591
2401
  }, () => [
2592
- ke.value.singleSection ? (u(), Z(al, {
2402
+ pe.value.singleSection ? (d(), se(Di, {
2593
2403
  key: 1,
2594
- items: h(Jt)
2595
- }, null, 8, ["items"])) : (u(), Z(Fl, {
2404
+ items: R(Vt)
2405
+ }, null, 8, ["items"])) : (d(), se(tn, {
2596
2406
  key: 0,
2597
- sections: ke.value.sections,
2598
- "active-section-id": oe.value,
2599
- groups: _t.value,
2600
- "show-settings": Ks.value,
2601
- "onUpdate:activeSectionId": s[7] || (s[7] = (a) => oe.value = a),
2602
- onOpenSettings: js
2407
+ sections: pe.value.sections,
2408
+ "active-section-id": ne.value,
2409
+ groups: Ht.value,
2410
+ "show-settings": Na.value,
2411
+ "onUpdate:activeSectionId": a[7] || (a[7] = (s) => ne.value = s),
2412
+ onOpenSettings: Wa
2603
2413
  }, null, 8, ["sections", "active-section-id", "groups", "show-settings"]))
2604
- ], !0) : w("", !0),
2605
- h(A) && gs.value ? (u(), c("div", Al, [
2606
- n("span", Dl, M(dt.value || "—"), 1),
2607
- s[22] || (s[22] = n("span", { class: "fx" }, "fx", -1)),
2608
- ks.value ? (u(), c("textarea", {
2414
+ ], !0) : h("", !0),
2415
+ R(T) && va.value ? (d(), v("div", vn, [
2416
+ i("span", mn, $(it.value || "—"), 1),
2417
+ a[10] || (a[10] = i("span", { class: "fx" }, "fx", -1)),
2418
+ fa.value ? (d(), v("textarea", {
2609
2419
  key: 0,
2610
2420
  ref_key: "fbEl",
2611
- ref: Lt,
2421
+ ref: Dt,
2612
2422
  class: "content content-input",
2613
- value: le.value,
2614
- title: le.value,
2423
+ value: ae.value,
2424
+ title: ae.value,
2615
2425
  rows: "1",
2616
2426
  spellcheck: "false",
2617
- onFocus: Cs,
2618
- onInput: bs,
2619
- onKeydown: xs,
2620
- onBlur: Ss
2621
- }, null, 40, Bl)) : (u(), c("span", {
2427
+ onFocus: ca,
2428
+ onInput: ma,
2429
+ onKeydown: pa,
2430
+ onBlur: ga
2431
+ }, null, 40, fn)) : (d(), v("span", {
2622
2432
  key: 1,
2623
2433
  class: "content",
2624
- title: zt.value
2625
- }, M(zt.value), 9, zl))
2626
- ])) : w("", !0),
2627
- n("div", {
2434
+ title: Mt.value
2435
+ }, $(Mt.value), 9, cn))
2436
+ ])) : h("", !0),
2437
+ i("div", {
2628
2438
  class: "render-area",
2629
2439
  ref_key: "renderAreaEl",
2630
- ref: Ee
2440
+ ref: Fe
2631
2441
  }, [
2632
- n("canvas", {
2442
+ i("canvas", {
2633
2443
  ref_key: "canvasEl",
2634
- ref: tt,
2444
+ ref: Ze,
2635
2445
  class: "grid-canvas"
2636
2446
  }, null, 512),
2637
- n("div", {
2447
+ i("div", {
2638
2448
  class: "ov",
2639
2449
  ref_key: "ovMain",
2640
- ref: st
2450
+ ref: Ye
2641
2451
  }, null, 512),
2642
- n("div", {
2452
+ i("div", {
2643
2453
  class: "ov",
2644
2454
  ref_key: "ovFCol",
2645
- ref: nt
2455
+ ref: Qe
2646
2456
  }, null, 512),
2647
- n("div", {
2457
+ i("div", {
2648
2458
  class: "ov",
2649
2459
  ref_key: "ovFRow",
2650
- ref: at
2460
+ ref: qe
2651
2461
  }, null, 512),
2652
- n("div", {
2462
+ i("div", {
2653
2463
  class: "ov",
2654
2464
  ref_key: "ovCorner",
2655
- ref: lt
2465
+ ref: et
2656
2466
  }, null, 512),
2657
- n("div", {
2467
+ i("div", {
2658
2468
  class: "scroller",
2659
2469
  ref_key: "scrollerEl",
2660
- ref: ce,
2470
+ ref: re,
2661
2471
  tabindex: "0",
2662
- onScroll: ps,
2663
- onMousedown: hs,
2664
- onMousemove: Fs,
2665
- onMouseup: $s,
2666
- onMouseleave: Es,
2667
- onDblclick: Is,
2668
- onKeydown: Ts,
2669
- onContextmenu: ws
2472
+ onScroll: da,
2473
+ onMousedown: ba,
2474
+ onMousemove: Ca,
2475
+ onMouseup: ya,
2476
+ onMouseleave: Sa,
2477
+ onDblclick: xa,
2478
+ onKeydown: ha,
2479
+ onContextmenu: ka
2670
2480
  }, [
2671
- n("div", {
2481
+ i("div", {
2672
2482
  class: "spacer",
2673
2483
  ref_key: "spacerEl",
2674
- ref: it
2484
+ ref: tt
2675
2485
  }, null, 512)
2676
2486
  ], 544),
2677
- ze.value && h(A) ? (u(), Z(Sn, {
2678
- key: 0,
2679
- query: be.value.query,
2680
- "match-count": be.value.count,
2681
- current: be.value.index,
2682
- "match-case": be.value.matchCase,
2683
- "whole-cell": be.value.wholeCell,
2684
- editable: !!l.editable,
2685
- replace: be.value.replace,
2686
- "onUpdate:query": s[8] || (s[8] = (a) => {
2687
- var i;
2688
- return (i = h(t)) == null ? void 0 : i.setFindQuery(a);
2689
- }),
2690
- "onUpdate:matchCase": s[9] || (s[9] = (a) => {
2691
- var i;
2692
- return (i = h(t)) == null ? void 0 : i.setFindMatchCase(a);
2693
- }),
2694
- "onUpdate:wholeCell": s[10] || (s[10] = (a) => {
2695
- var i;
2696
- return (i = h(t)) == null ? void 0 : i.setFindWholeCell(a);
2697
- }),
2698
- "onUpdate:replace": s[11] || (s[11] = (a) => {
2699
- var i;
2700
- return (i = h(t)) == null ? void 0 : i.setFindReplace(a);
2701
- }),
2702
- onNext: s[12] || (s[12] = (a) => {
2703
- var i;
2704
- return (i = h(t)) == null ? void 0 : i.findNext();
2705
- }),
2706
- onPrev: s[13] || (s[13] = (a) => {
2707
- var i;
2708
- return (i = h(t)) == null ? void 0 : i.findPrev();
2709
- }),
2710
- onReplaceOne: s[14] || (s[14] = (a) => {
2711
- var i;
2712
- return (i = h(t)) == null ? void 0 : i.replaceCurrent();
2713
- }),
2714
- onReplaceAll: s[15] || (s[15] = (a) => {
2715
- var i;
2716
- return (i = h(t)) == null ? void 0 : i.replaceAll();
2717
- }),
2718
- onClose: Ut
2719
- }, null, 8, ["query", "match-count", "current", "match-case", "whole-cell", "editable", "replace"])) : w("", !0),
2720
- fe.value ? (u(), Z(Rn, {
2721
- key: 1,
2722
- values: fe.value.values,
2723
- selected: fe.value.selected,
2724
- x: fe.value.x,
2725
- y: fe.value.y,
2726
- "sort-dir": fe.value.sortDir,
2727
- onApply: s[16] || (s[16] = (a) => {
2728
- var i;
2729
- return (i = h(t)) == null ? void 0 : i.applyFilterSelection(a);
2730
- }),
2731
- onClear: s[17] || (s[17] = (a) => {
2732
- var i;
2733
- return (i = h(t)) == null ? void 0 : i.clearFilterColumn();
2734
- }),
2735
- onClose: s[18] || (s[18] = (a) => {
2736
- var i;
2737
- return (i = h(t)) == null ? void 0 : i.closeFilterPopup();
2738
- }),
2739
- onSort: s[19] || (s[19] = (a) => {
2740
- var F, $, C;
2741
- const i = (F = fe.value) == null ? void 0 : F.col;
2742
- ($ = h(t)) == null || $.closeFilterPopup(), i != null && ((C = h(t)) == null || C.sortColumn(i, a));
2743
- })
2744
- }, null, 8, ["values", "selected", "x", "y", "sort-dir"])) : w("", !0),
2745
- n("div", Ll, [
2746
- ue(e.$slots, "overlay", {
2747
- rectOf: ct,
2748
- rectOfRange: rt,
2749
- tick: re.value
2487
+ i("div", rn, [
2488
+ le(e.$slots, "overlay", {
2489
+ rectOf: lt,
2490
+ rectOfRange: ot,
2491
+ tick: me.value
2750
2492
  }, void 0, !0),
2751
- n("div", {
2493
+ i("div", {
2752
2494
  ref_key: "pluginOvEl",
2753
- ref: kt
2495
+ ref: ft
2754
2496
  }, null, 512)
2755
2497
  ]),
2756
- n("div", {
2498
+ i("div", {
2757
2499
  class: "editor-slot",
2758
2500
  ref_key: "editorSlotEl",
2759
- ref: ot
2501
+ ref: at
2760
2502
  }, null, 512),
2761
- me.value ? (u(), c("div", {
2762
- key: 2,
2763
- class: U(["cell-tooltip", me.value.kind]),
2764
- style: We({ left: me.value.x + "px", top: me.value.y + "px" })
2765
- }, M(me.value.text), 7)) : w("", !0),
2766
- h(B) ? (u(), c("div", Nl, [
2767
- ue(e.$slots, "loading", {
2768
- progress: h(L),
2769
- label: Mt.value,
2770
- pct: $e.value
2503
+ fe.value ? (d(), v("div", {
2504
+ key: 0,
2505
+ class: ee(["cell-tooltip", fe.value.kind]),
2506
+ style: Ke({ left: fe.value.x + "px", top: fe.value.y + "px" })
2507
+ }, $(fe.value.text), 7)) : h("", !0),
2508
+ R(z) ? (d(), v("div", gn, [
2509
+ le(e.$slots, "loading", {
2510
+ progress: R(A),
2511
+ label: Et.value,
2512
+ pct: he.value
2771
2513
  }, () => [
2772
- n("div", Ol, [
2773
- n("div", Vl, [
2774
- O(M(Mt.value), 1),
2775
- $e.value != null ? (u(), c("span", Hl, M($e.value) + "%", 1)) : w("", !0)
2514
+ i("div", pn, [
2515
+ i("div", bn, [
2516
+ L($(Et.value), 1),
2517
+ he.value != null ? (d(), v("span", kn, $(he.value) + "%", 1)) : h("", !0)
2776
2518
  ]),
2777
- n("div", Wl, [
2778
- $e.value != null ? (u(), c("div", {
2519
+ i("div", Cn, [
2520
+ he.value != null ? (d(), v("div", {
2779
2521
  key: 0,
2780
2522
  class: "loader-fill",
2781
- style: We({ width: $e.value + "%" })
2782
- }, null, 4)) : (u(), c("div", Ul))
2523
+ style: Ke({ width: he.value + "%" })
2524
+ }, null, 4)) : (d(), v("div", yn))
2783
2525
  ])
2784
2526
  ])
2785
2527
  ], !0)
2786
- ])) : h(_) ? (u(), c("div", Kl, [
2787
- ue(e.$slots, "error", { error: h(_) }, () => [
2788
- O("解析失败:" + M(h(_)), 1)
2528
+ ])) : R(K) ? (d(), v("div", Sn, [
2529
+ le(e.$slots, "error", { error: R(K) }, () => [
2530
+ L("解析失败:" + $(R(K)), 1)
2789
2531
  ], !0)
2790
- ])) : h(A) ? w("", !0) : (u(), c("div", _l, [
2791
- ue(e.$slots, "empty", {}, () => [
2792
- s[23] || (s[23] = O("拖入或选择一个 .xlsx 文件", -1))
2532
+ ])) : R(T) ? h("", !0) : (d(), v("div", xn, [
2533
+ le(e.$slots, "empty", {}, () => [
2534
+ a[11] || (a[11] = L("拖入或选择一个 .xlsx 文件", -1))
2793
2535
  ], !0)
2794
2536
  ]))
2795
2537
  ], 512),
2796
- h(A) ? (u(), c("div", jl, [
2797
- ue(e.$slots, "statusbar", {
2798
- stats: X.value,
2799
- range: Bt.value || dt.value
2538
+ R(T) ? (d(), v("div", hn, [
2539
+ le(e.$slots, "statusbar", {
2540
+ stats: G.value,
2541
+ range: Rt.value || it.value
2800
2542
  }, () => [
2801
- n("span", Jl, M(Bt.value || dt.value), 1),
2802
- s[24] || (s[24] = n("div", { class: "grow" }, null, -1)),
2803
- X.value && X.value.numCount > 0 ? (u(), c(V, { key: 0 }, [
2804
- n("span", null, "计数 " + M(X.value.count), 1),
2805
- n("span", null, "求和 " + M(Ge(X.value.sum)), 1),
2806
- n("span", null, "平均 " + M(Ge(X.value.avg)), 1),
2807
- n("span", null, "最大 " + M(Ge(X.value.max)), 1),
2808
- n("span", null, "最小 " + M(Ge(X.value.min)), 1)
2809
- ], 64)) : X.value && X.value.count > 0 ? (u(), c("span", Gl, "计数 " + M(X.value.count), 1)) : w("", !0)
2543
+ i("span", Fn, $(Rt.value || it.value), 1),
2544
+ a[12] || (a[12] = i("div", { class: "grow" }, null, -1)),
2545
+ G.value && G.value.numCount > 0 ? (d(), v(O, { key: 0 }, [
2546
+ i("span", null, "计数 " + $(G.value.count), 1),
2547
+ i("span", null, "求和 " + $(Ve(G.value.sum)), 1),
2548
+ i("span", null, "平均 " + $(Ve(G.value.avg)), 1),
2549
+ i("span", null, "最大 " + $(Ve(G.value.max)), 1),
2550
+ i("span", null, "最小 " + $(Ve(G.value.min)), 1)
2551
+ ], 64)) : G.value && G.value.count > 0 ? (d(), v("span", wn, "计数 " + $(G.value.count), 1)) : h("", !0)
2810
2552
  ], !0)
2811
- ])) : w("", !0),
2812
- h(A) ? (u(), Z(ja, {
2813
- key: At.value,
2814
- workbook: h(A),
2815
- active: Q.value,
2816
- onSelect: s[20] || (s[20] = (a) => Q.value = a)
2817
- }, null, 8, ["workbook", "active"])) : w("", !0),
2818
- Le.value && h(A) ? (u(), Z(cn, {
2553
+ ])) : h("", !0),
2554
+ R(T) ? (d(), se(Ws, {
2555
+ key: $t.value,
2556
+ workbook: R(T),
2557
+ active: Z.value,
2558
+ onSelect: a[8] || (a[8] = (s) => Z.value = s)
2559
+ }, null, 8, ["workbook", "active"])) : h("", !0),
2560
+ De.value && R(T) ? (d(), se(oi, {
2819
2561
  key: 5,
2820
2562
  selection: J.value,
2821
- "sheet-count": h(A).sheets.filter((a) => a.state === "visible").length,
2822
- onClose: s[21] || (s[21] = (a) => Le.value = !1),
2823
- onExport: Os
2824
- }, null, 8, ["selection", "sheet-count"])) : w("", !0),
2825
- n("input", {
2563
+ "sheet-count": R(T).sheets.filter((s) => s.state === "visible").length,
2564
+ onClose: a[9] || (a[9] = (s) => De.value = !1),
2565
+ onExport: _a
2566
+ }, null, 8, ["selection", "sheet-count"])) : h("", !0),
2567
+ i("input", {
2826
2568
  ref_key: "templateInputEl",
2827
- ref: Pt,
2569
+ ref: It,
2828
2570
  type: "file",
2829
2571
  accept: ".xlsx,.xlsm",
2830
2572
  hidden: "",
2831
- onChange: ds
2573
+ onChange: sa
2832
2574
  }, null, 544),
2833
- v.exportProgress !== !1 ? ue(e.$slots, "export-progress", {
2575
+ m.exportProgress !== !1 ? le(e.$slots, "export-progress", {
2834
2576
  key: 6,
2835
- state: Re.value,
2836
- busy: qe.value,
2837
- cancel: Ot
2577
+ state: Ee.value,
2578
+ busy: We.value,
2579
+ cancel: Bt
2838
2580
  }, () => [
2839
- Yt(Ml, {
2840
- state: Re.value,
2841
- busy: qe.value,
2842
- onCancel: Ot
2581
+ Kt(dn, {
2582
+ state: Ee.value,
2583
+ busy: We.value,
2584
+ onCancel: Bt
2843
2585
  }, null, 8, ["state", "busy"])
2844
- ], !0) : w("", !0)
2586
+ ], !0) : h("", !0)
2845
2587
  ], 544));
2846
2588
  }
2847
- }), Xl = /* @__PURE__ */ ae(ql, [["__scopeId", "data-v-0c479ebc"]]), ti = {
2848
- install(v) {
2849
- v.component("ExcelViewer", Xl);
2589
+ }), Tn = /* @__PURE__ */ de(In, [["__scopeId", "data-v-fb0591c2"]]), Mn = {
2590
+ install(m) {
2591
+ m.component("ExcelViewer", Tn);
2850
2592
  }
2851
2593
  };
2852
2594
  export {
2853
- ni as BuiltinFormulaEngine,
2854
- li as CanvasRenderer,
2855
- ii as CellEditorHost,
2856
- Qt as DEFAULT_PASTE_BEHAVIOR,
2857
- oi as DEFAULT_THEME,
2858
- ui as EditController,
2859
- Xl as ExcelViewer,
2860
- di as FUNCTION_CATEGORIES,
2861
- vi as FUNCTION_NAMES,
2862
- ci as GridMetrics,
2863
- ri as KEYBOARD_SHORTCUTS,
2864
- mi as OverlayManager,
2865
- fi as PASTE_PRESET_VALUES_ONLY,
2866
- la as PluginOverlayHost,
2867
- na as ViewerController,
2868
- pi as WorkbookExporter,
2869
- gi as addImage,
2870
- bi as applyFlashProgram,
2871
- ki as applyStyleOverride,
2872
- Ci as buildCellSnapshot,
2873
- yi as builtinFormulaEngineFactory,
2874
- Si as canvasToBlob,
2875
- xi as canvasToDataURL,
2876
- hi as captureStructure,
2877
- wi as cellContentForEngine,
2878
- Fi as cellDisplayText,
2879
- $i as cellKey,
2880
- Ei as clearCell,
2881
- Ii as cloneCell,
2882
- Ti as cloneImageAnchor,
2883
- Pi as cloneWorkbook,
2884
- xe as colIndexToLetters,
2885
- ti as default,
2886
- Ri as defaultFormulaEngineFactory,
2887
- Mi as definePlugin,
2888
- Ai as deleteCols,
2889
- Di as deleteIntersectsMerge,
2890
- Bi as deleteRows,
2891
- ns as detectFormat,
2892
- zi as downloadBlob,
2893
- aa as estimateWorkbookBytes,
2894
- ls as finalizeImages,
2895
- St as formatBytes,
2896
- Li as formatValue,
2897
- sa as friendlyError,
2898
- Ni as functionMeta,
2899
- Oi as getCell,
2900
- Vi as getCellStyle,
2901
- da as getCellText,
2902
- va as getCellValue,
2903
- ia as getRangeData,
2904
- ua as getSheetData,
2905
- Hi as getWorkbookJSON,
2906
- Wi as hyperFormulaEngineFactory,
2907
- Ui as inferFlashFill,
2908
- Ki as insertCols,
2909
- _i as insertRows,
2910
- ji as internStyle,
2911
- Ji as isDimCommand,
2912
- Gi as isImageCommand,
2913
- qi as isStructCommand,
2914
- ca as isWorkbookModel,
2915
- ra as jsonToWorkbook,
2916
- as as loadArrayBuffer,
2917
- Xi as makeDefaultStyle,
2918
- Zi as mergeStyleOverride,
2919
- Yi as mergeTheme,
2920
- Qi as openWorkbook,
2921
- eo as parseSignature,
2922
- to as parseWorkbook,
2923
- xt as readHeapUsed,
2924
- so as removeImage,
2925
- ao as resolveEditable,
2926
- no as resolvePasteBehavior,
2927
- lo as restoreCell,
2928
- io as restoreDimension,
2929
- oo as restoreStructure,
2930
- uo as restoreWorkbookInto,
2931
- wt as revokeImages,
2932
- vo as rewriteWorkbookFormulas,
2933
- co as setCellValue,
2934
- ro as setColumnWidth,
2935
- mo as setImageRect,
2936
- fo as setRangeValues,
2937
- po as setRowHeight,
2938
- oa as sheetToJSON,
2939
- go as shiftFormulaRefs,
2940
- bo as synthesizeFlashFill,
2941
- ko as toCsv,
2942
- Co as toWorkbookJson,
2943
- yo as workbookToXlsxBlob,
2944
- So as workbookToXlsxBytes
2595
+ Bn as BuiltinFormulaEngine,
2596
+ _n as CanvasRenderer,
2597
+ zn as CellEditorHost,
2598
+ Gt as DEFAULT_PASTE_BEHAVIOR,
2599
+ Ln as DEFAULT_THEME,
2600
+ On as EditController,
2601
+ Tn as ExcelViewer,
2602
+ Hn as FUNCTION_CATEGORIES,
2603
+ Nn as FUNCTION_NAMES,
2604
+ Vn as GridMetrics,
2605
+ Wn as KEYBOARD_SHORTCUTS,
2606
+ Un as OverlayManager,
2607
+ jn as PASTE_PRESET_VALUES_ONLY,
2608
+ as as PluginOverlayHost,
2609
+ ts as ViewerController,
2610
+ Jn as WorkbookExporter,
2611
+ Kn as addImage,
2612
+ Gn as applyFlashProgram,
2613
+ Xn as applyStyleOverride,
2614
+ Zn as buildCellSnapshot,
2615
+ Yn as builtinFormulaEngineFactory,
2616
+ qn as canvasToBlob,
2617
+ Qn as canvasToDataURL,
2618
+ el as captureStructure,
2619
+ tl as cellContentForEngine,
2620
+ al as cellDisplayText,
2621
+ sl as cellKey,
2622
+ il as clearCell,
2623
+ nl as cloneCell,
2624
+ ll as cloneImageAnchor,
2625
+ ol as cloneWorkbook,
2626
+ ye as colIndexToLetters,
2627
+ Mn as default,
2628
+ ul as defaultFormulaEngineFactory,
2629
+ dl as definePlugin,
2630
+ vl as deleteCols,
2631
+ ml as deleteIntersectsMerge,
2632
+ fl as deleteRows,
2633
+ qt as detectFormat,
2634
+ cl as downloadBlob,
2635
+ es as estimateWorkbookBytes,
2636
+ Qt as finalizeImages,
2637
+ gt as formatBytes,
2638
+ rl as formatValue,
2639
+ Qa as friendlyError,
2640
+ gl as functionMeta,
2641
+ pl as getCell,
2642
+ bl as getCellStyle,
2643
+ ls as getCellText,
2644
+ os as getCellValue,
2645
+ ss as getRangeData,
2646
+ ns as getSheetData,
2647
+ kl as getWorkbookJSON,
2648
+ Cl as hyperFormulaEngineFactory,
2649
+ yl as inferFlashFill,
2650
+ Sl as insertCols,
2651
+ xl as insertRows,
2652
+ hl as internStyle,
2653
+ Fl as isDimCommand,
2654
+ wl as isImageCommand,
2655
+ Il as isStructCommand,
2656
+ us as isWorkbookModel,
2657
+ ds as jsonToWorkbook,
2658
+ Yt as loadArrayBuffer,
2659
+ Tl as makeDefaultStyle,
2660
+ El as mergeStyleOverride,
2661
+ $l as mergeTheme,
2662
+ Pl as openWorkbook,
2663
+ Rl as parseSignature,
2664
+ Ml as parseWorkbook,
2665
+ pt as readHeapUsed,
2666
+ Dl as removeImage,
2667
+ Al as resolveEditable,
2668
+ Bl as resolvePasteBehavior,
2669
+ _l as restoreCell,
2670
+ zl as restoreDimension,
2671
+ Ll as restoreStructure,
2672
+ Ol as restoreWorkbookInto,
2673
+ kt as revokeImages,
2674
+ Hl as rewriteWorkbookFormulas,
2675
+ Nl as setCellValue,
2676
+ Vl as setColumnWidth,
2677
+ Wl as setImageRect,
2678
+ Ul as setRangeValues,
2679
+ jl as setRowHeight,
2680
+ is as sheetToJSON,
2681
+ Jl as shiftFormulaRefs,
2682
+ Kl as synthesizeFlashFill,
2683
+ Gl as toCsv,
2684
+ Xl as toWorkbookJson,
2685
+ Zl as workbookToXlsxBlob,
2686
+ Yl as workbookToXlsxBytes
2945
2687
  };