@agile-team/mach-report 2.24.0 → 2.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/dist/{ExcelBindingWizard-Cy_lPjWV.js → ExcelBindingWizard-bs3F4dD8.js} +3 -3
- package/dist/{ExcelBindingWizard-BV12hGiK.cjs → ExcelBindingWizard-jSdjBtWw.cjs} +1 -1
- package/dist/{ParamEditor-PyOqHzzw.js → ParamEditor-B7YVD28E.js} +2 -2
- package/dist/{ParamEditor-DenKjvKu.cjs → ParamEditor-CGfaweYX.cjs} +1 -1
- package/dist/{ReportBatchPanel-pQ6d0yqJ.cjs → ReportBatchPanel-BRJt0TXp.cjs} +1 -1
- package/dist/{ReportBatchPanel-8EFtMrKk.js → ReportBatchPanel-BTKHtLTW.js} +2 -2
- package/dist/{ReportLabelStudio-B_KF3Zc_.cjs → ReportLabelStudio-BvK_WBke.cjs} +1 -1
- package/dist/{ReportLabelStudio-HUeo2TsU.js → ReportLabelStudio-CZwqyO3t.js} +3 -3
- package/dist/{ReportParamPanel-8xR85nz-.cjs → ReportParamPanel-B27IGJjk.cjs} +1 -1
- package/dist/{ReportParamPanel-DA-YpkvC.js → ReportParamPanel-DGXzBzl2.js} +1 -1
- package/dist/{ReportPreview-_wTJnsG1.js → ReportPreview-CnxaDTCO.js} +2392 -2342
- package/dist/ReportPreview-DqFBcsJQ.cjs +6 -0
- package/dist/{ReportTemplateLibrary-DH8jl9IF.js → ReportTemplateLibrary-C7sB0Jay.js} +1 -1
- package/dist/{ReportTemplateLibrary-CjArKxRG.cjs → ReportTemplateLibrary-ClwxhnC0.cjs} +1 -1
- package/dist/{RuleEditor-GDydlEHz.js → RuleEditor-CsDGFaWz.js} +3 -4
- package/dist/{RuleEditor-Bmj98oC4.cjs → RuleEditor-D-OdaGdR.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-DjPqzU9h.js → TemplateOutlinePanel-CXOT7d1r.js} +2 -2
- package/dist/{TemplateOutlinePanel-B554_qk1.cjs → TemplateOutlinePanel-DAqR9zQi.cjs} +1 -1
- package/dist/{TemplateReusePanel-DtYbCN7U.js → TemplateReusePanel-Dcfx3Hba.js} +2 -2
- package/dist/{TemplateReusePanel-D0628OYc.cjs → TemplateReusePanel-ygIi-Ajz.cjs} +1 -1
- package/dist/{TemplateReviewPanel-D_FR4ISq.js → TemplateReviewPanel-COU8FqPq.js} +1 -1
- package/dist/{TemplateReviewPanel-CSwvCz3f.cjs → TemplateReviewPanel-DyGULVxr.cjs} +1 -1
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +1 -1
- package/dist/analytics.d.ts +1 -1
- package/dist/analytics.js +2 -2
- package/dist/artifact-integrity.json +102 -102
- package/dist/{assets-B4AJIOTB.cjs → assets-BYdpkTIt.cjs} +1 -1
- package/dist/{assets-D0FbszhB.js → assets-C4MIvzQ4.js} +2 -2
- package/dist/{auto-BksreoKc.js → auto-D7x7QsWD.js} +10 -10
- package/dist/{auto-C3mGqzJ8.cjs → auto-mPK9W0y5.cjs} +1 -1
- package/dist/{capabilities-lqDEZSq5.js → capabilities-CN_kSVjO.js} +7 -7
- package/dist/{capabilities-CTwlcl8q.cjs → capabilities-D4nfhcvB.cjs} +1 -1
- package/dist/cell-style-B6Qffrx8.js +37 -0
- package/dist/cell-style-y_uh1pZp.cjs +1 -0
- package/dist/{data-bar-BnGtnJ82.js → data-bar-Bfh54sT4.js} +1 -1
- package/dist/{data-bar-2NLRzOCQ.cjs → data-bar-DzceAVeR.cjs} +1 -1
- package/dist/{designer-BNf7NWd6.js → designer-B597ZdC0.js} +2254 -2248
- package/dist/designer-DFIdv_n7.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +6 -6
- package/dist/designer.d.ts +6 -6
- package/dist/designer.js +1 -1
- package/dist/diagnostic-collector-gB07PHy2.js +392 -0
- package/dist/diagnostic-collector-wASg6Fzs.cjs +1 -0
- package/dist/dom-CXWMmwh-.cjs +1 -0
- package/dist/{dom-C90cTM6Y.js → dom-DxdCMLzs.js} +185 -185
- package/dist/{encoding-DSc9zv2F.js → encoding-Amq3XrtU.js} +2 -2
- package/dist/{encoding-CkziAnZI.cjs → encoding-DRVXs5xm.cjs} +1 -1
- package/dist/{font-loader-i7lZbqH_.js → font-loader-D4NLIKJL.js} +1 -1
- package/dist/{font-loader-D-znWNWS.cjs → font-loader-p_SyTvqt.cjs} +1 -1
- package/dist/{grid-strokes-BPiV1WHe.js → grid-strokes-DkZEZvcI.js} +1 -1
- package/dist/{grid-strokes-DYf-6DMl.cjs → grid-strokes-RFMR91jn.cjs} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +137 -137
- package/dist/{json-snapshot-BJWZNryO.js → json-snapshot-CBVWZvyC.js} +662 -615
- package/dist/json-snapshot-DCFEtfFw.cjs +2 -0
- package/dist/matrix-DUYPRL7t.cjs +1 -0
- package/dist/{matrix-C6e_r_vp.js → matrix-b6T291xo.js} +120 -104
- package/dist/{pdf-DWuq6uxx.cjs → pdf-C060D5UY.cjs} +2 -2
- package/dist/{pdf-0_5XiTCx.js → pdf-DU8HelKd.js} +17 -17
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.js +2 -2
- package/dist/{plugin-B1ydqEmS.js → plugin-BdCplNe1.js} +1 -1
- package/dist/{plugin-BQBz2vLG.cjs → plugin-DHe8y5pD.cjs} +1 -1
- package/dist/{prefill-Cuzh1wxf.js → prefill-Buy4NJ15.js} +2 -2
- package/dist/{prefill-2p9wrpn9.cjs → prefill-Cw4ZYGXZ.cjs} +1 -1
- package/dist/{prepared-DAwe8Il2.cjs → prepared-BlNeOjoO.cjs} +1 -1
- package/dist/{prepared-CVbgO9KR.js → prepared-CBJ7BkK0.js} +2 -2
- package/dist/protocol-BU_4sXP0.cjs +1 -0
- package/dist/protocol-CB19KXGr.js +96 -0
- package/dist/record-bindings-B7djSjNs.cjs +1 -0
- package/dist/{record-bindings-fhav-NLG.js → record-bindings-Cv7lFiof.js} +47 -47
- package/dist/{region-binding-workflow-Cm4mqhih.js → region-binding-workflow-EYxvUYJ-.js} +2 -2
- package/dist/{region-binding-workflow-DWCUgjZl.cjs → region-binding-workflow-NdkMSFCh.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/{rich-text-layout-YJHtCWQI.js → rich-text-layout-Ch_N0Ubu.js} +1 -1
- package/dist/{rich-text-layout-X9YOz1JD.cjs → rich-text-layout-yJGuThtC.cjs} +1 -1
- package/dist/runtime-B5d_lQNQ.js +227 -0
- package/dist/runtime-BRx8Agqr.cjs +1 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server-node.cjs +5 -5
- package/dist/server-node.js +1891 -1793
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +8 -8
- package/dist/style.css +1 -1
- package/dist/{template-catalog-Bu7s7ReF.js → template-catalog-CM6U_RlD.js} +3 -3
- package/dist/{template-catalog--yBX169M.cjs → template-catalog-Cj66M84u.cjs} +1 -1
- package/dist/{template-fragments-Di2vDFnx.js → template-fragments-BDxdCuMD.js} +2 -2
- package/dist/{template-fragments-5EzVn7bm.cjs → template-fragments-DbKdxI1z.cjs} +1 -1
- package/dist/template-registry-B-AK1oam.cjs +1 -0
- package/dist/{template-registry-BCBF2b8j.js → template-registry-DeVgwEZj.js} +145 -144
- package/dist/{textwrap-CmVkhMhx.js → textwrap-BywMBMXM.js} +1 -1
- package/dist/{textwrap-BPFxhpOw.cjs → textwrap-LhJkHWb1.cjs} +1 -1
- package/dist/vue/async.d.cts +4 -4
- package/dist/vue/async.d.ts +4 -4
- package/dist/vue/index.d.cts +6 -6
- package/dist/vue/index.d.ts +6 -6
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +7 -7
- package/dist/{workbook-session-B6P_-5a4.js → workbook-session-B6hRjTyX.js} +106 -107
- package/dist/{workbook-session-BnPK3T58.cjs → workbook-session-BclW7KKH.cjs} +3 -3
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +4 -4
- package/dist/xlsx/node.d.cts +30 -1
- package/dist/xlsx/node.d.ts +30 -1
- package/dist/xlsx-node.cjs +42 -42
- package/dist/xlsx-node.js +3908 -3889
- package/dist/xlsx.cjs +2 -2
- package/dist/xlsx.d.cts +2 -2
- package/dist/xlsx.d.ts +2 -2
- package/dist/xlsx.js +151 -151
- package/package.json +1 -1
- package/dist/ReportPreview-CyUXJSVX.cjs +0 -6
- package/dist/designer-DWnZZ_ej.cjs +0 -2
- package/dist/diagnostic-collector-1sqd7DQP.js +0 -355
- package/dist/diagnostic-collector-D3rlvxm3.cjs +0 -1
- package/dist/dom-CxOkm_Sy.cjs +0 -1
- package/dist/json-snapshot-C7QZrRBf.cjs +0 -2
- package/dist/matrix-B8QWbsGM.cjs +0 -1
- package/dist/progress-BXzlVbIp.js +0 -29
- package/dist/progress-DJBd9Rb9.cjs +0 -1
- package/dist/protocol-BOri9qJL.js +0 -105
- package/dist/protocol-DD5dHSz-.cjs +0 -1
- package/dist/record-bindings-CAyM5tGg.cjs +0 -1
- package/dist/runtime-BpSAgOw1.js +0 -201
- package/dist/runtime-Cd2UTnwe.cjs +0 -1
- package/dist/template-registry-Bnh5aEYf.cjs +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as Kt, g as
|
|
3
|
-
import { o as Ze, s as cr, r as
|
|
4
|
-
import { c as
|
|
5
|
-
import { f as
|
|
1
|
+
import { A as ve, w as Ke, o as He, O as gr, I as yr, R as vr, F as er } from "./diagnostic-collector-gB07PHy2.js";
|
|
2
|
+
import { c as Kt, g as wr } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
3
|
+
import { o as Ze, s as cr, r as _r, t as Ge, u as xr, w as Sr, x as kr, y as Cr, q as Er } from "./region-binding-workflow-EYxvUYJ-.js";
|
|
4
|
+
import { c as Mr } from "./media-Y90dHK9z.js";
|
|
5
|
+
import { f as Tr } from "./number-format-BA_KwrZe.js";
|
|
6
6
|
function $e(G) {
|
|
7
7
|
throw new Error('Could not dynamically require "' + G + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
8
8
|
}
|
|
9
9
|
var qe = { exports: {} };
|
|
10
10
|
var rr;
|
|
11
|
-
function
|
|
11
|
+
function Ar() {
|
|
12
12
|
return rr || (rr = 1, (function(G, tt) {
|
|
13
13
|
(function(s) {
|
|
14
14
|
G.exports = s();
|
|
@@ -22571,16 +22571,16 @@ use chrome, FireFox or Internet Explorer 11`);
|
|
|
22571
22571
|
}));
|
|
22572
22572
|
})(qe)), qe.exports;
|
|
22573
22573
|
}
|
|
22574
|
-
var
|
|
22575
|
-
const
|
|
22576
|
-
function
|
|
22574
|
+
var Rr = Ar();
|
|
22575
|
+
const Or = /* @__PURE__ */ wr(Rr), hr = 25.4 / 96;
|
|
22576
|
+
function jr(G) {
|
|
22577
22577
|
return (G < 1 ? G * 12 : G * 7 + 5) * hr;
|
|
22578
22578
|
}
|
|
22579
|
-
function
|
|
22579
|
+
function kn(G) {
|
|
22580
22580
|
const tt = G / hr;
|
|
22581
22581
|
return tt < 12 ? tt / 12 : (tt - 5) / 7;
|
|
22582
22582
|
}
|
|
22583
|
-
function
|
|
22583
|
+
function Ir(G, tt) {
|
|
22584
22584
|
const s = [0], C = [0];
|
|
22585
22585
|
for (const _ of G.columns) s.push(s[s.length - 1] + _);
|
|
22586
22586
|
for (let _ = tt.top; _ <= tt.bottom; _++) C.push(C[C.length - 1] + G.rowHeight(_));
|
|
@@ -22591,7 +22591,7 @@ function nr(G, tt, s) {
|
|
|
22591
22591
|
const C = s.columnOffsets[G.nativeCol - tt.left + 1] + G.nativeColOff / 36e3 * s.scale, _ = s.rowOffsets[G.nativeRow - tt.top + 1] + G.nativeRowOff / 36e3 * s.scale;
|
|
22592
22592
|
return { x: C, y: _ };
|
|
22593
22593
|
}
|
|
22594
|
-
function
|
|
22594
|
+
function Nr(G, tt) {
|
|
22595
22595
|
const s = G.getImage(Number(tt));
|
|
22596
22596
|
if (!s || !["png", "jpeg", "jpg"].includes(s.extension)) return;
|
|
22597
22597
|
const C = s.extension === "png" ? "png" : "jpeg";
|
|
@@ -22601,20 +22601,20 @@ function jr(G, tt) {
|
|
|
22601
22601
|
for (let o = 0; o < _.length; o += 8192) d.push(String.fromCharCode(..._.subarray(o, o + 8192)));
|
|
22602
22602
|
return `data:image/${C};base64,${btoa(d.join(""))}`;
|
|
22603
22603
|
}
|
|
22604
|
-
function
|
|
22604
|
+
function Pr(G, tt, s, C) {
|
|
22605
22605
|
const _ = G.range.tl, d = nr(_, tt, s);
|
|
22606
22606
|
if (!d || _.nativeCol >= tt.right || _.nativeRow >= tt.bottom) return;
|
|
22607
22607
|
const o = G.range.br ? nr(G.range.br, tt, s) : void 0, a = G.range.ext, r = a ? a.width * 25.4 / 96 * s.scale : (o?.x ?? d.x) - d.x, t = a ? a.height * 25.4 / 96 * s.scale : (o?.y ?? d.y) - d.y, e = s.columnOffsets[s.columnOffsets.length - 1];
|
|
22608
22608
|
if (!(!Number.isFinite(r) || !Number.isFinite(t) || r <= 0 || t <= 0 || d.x + r > e + 0.01))
|
|
22609
22609
|
return { row: _.nativeRow + 1, rowOffset: _.nativeRowOff / 36e3 * s.scale, left: d.x, width: r, height: t, data: C, id: G.imageId };
|
|
22610
22610
|
}
|
|
22611
|
-
function
|
|
22611
|
+
function Fr(G, tt, s, C, _, d) {
|
|
22612
22612
|
const o = tt.getImages();
|
|
22613
22613
|
if (!o.length) return () => [];
|
|
22614
|
-
const a =
|
|
22614
|
+
const a = Ir(C, s), r = /* @__PURE__ */ new Map(), t = [];
|
|
22615
22615
|
for (const [e, l] of o.entries()) {
|
|
22616
|
-
r.has(l.imageId) || r.set(l.imageId,
|
|
22617
|
-
const n = r.get(l.imageId), i = n ?
|
|
22616
|
+
r.has(l.imageId) || r.set(l.imageId, Nr(G, l.imageId));
|
|
22617
|
+
const n = r.get(l.imageId), i = n ? Pr(l, s, a, d(n).dataUrl) : void 0;
|
|
22618
22618
|
i ? t.push({ ...i, id: `${i.id}:${e}` }) : _.add(`${tt.name}: 图片 ${l.imageId} 不在完整选区内或不是 PNG/JPEG,未导入;可扩大 range`);
|
|
22619
22619
|
}
|
|
22620
22620
|
return (e) => {
|
|
@@ -22640,7 +22640,7 @@ function Nr(G, tt, s, C, _, d) {
|
|
|
22640
22640
|
return l;
|
|
22641
22641
|
};
|
|
22642
22642
|
}
|
|
22643
|
-
function
|
|
22643
|
+
function Cn(G, tt) {
|
|
22644
22644
|
const s = G.meta?.xlsxOverlay;
|
|
22645
22645
|
if (s === void 0) return;
|
|
22646
22646
|
if (!s || typeof s != "object") throw new Error("Excel 图片定位元数据无效");
|
|
@@ -22662,7 +22662,7 @@ function ir(G, tt) {
|
|
|
22662
22662
|
if (s.bottom > tt.limits.maxRows || s.right > tt.limits.maxColumns)
|
|
22663
22663
|
throw new Error(`Excel 源文件坐标 ${G} 超过加载行列上限;请先裁剪工作簿或显式提高 limits`);
|
|
22664
22664
|
}
|
|
22665
|
-
function
|
|
22665
|
+
function Br(G, tt, s) {
|
|
22666
22666
|
const C = /^<(?:\w+:)?(\w+)\b/.exec(G)?.[1];
|
|
22667
22667
|
if (C === "c") {
|
|
22668
22668
|
const _ = Me(G, "r");
|
|
@@ -22682,17 +22682,17 @@ function Pr(G, tt, s) {
|
|
|
22682
22682
|
_ && Ze(_);
|
|
22683
22683
|
}
|
|
22684
22684
|
}
|
|
22685
|
-
function
|
|
22685
|
+
function Dr(G, tt) {
|
|
22686
22686
|
/^<(?:\w+:)?srcRect\b/.test(G) && ["l", "t", "r", "b"].some((s) => Number(Me(G, s) ?? 0) !== 0) && tt.add("Excel 图片裁剪暂不还原,导入保留完整图片;请在源文件中将裁剪结果保存为 PNG/JPEG"), /^<(?:\w+:)?xfrm\b/.test(G) && (Number(Me(G, "rot") ?? 0) !== 0 || ["flipH", "flipV"].some((s) => ["1", "true"].includes(Me(G, s) ?? ""))) && tt.add("Excel 图片旋转或翻转暂不还原,请先在源文件中保存变换后的 PNG/JPEG"), /^<(?:\w+:)?blip\b/.test(G) && /\blink\s*=/.test(G) && tt.add("Excel 外部图片链接不会访问或下载,请嵌入 PNG/JPEG 图片"), /^<(?:\w+:)?(?:sp|cxnSp)\b/.test(G) && tt.add("Excel 绘图形状与连接线暂不导入;可在源文件中转换为 PNG/JPEG");
|
|
22687
22687
|
}
|
|
22688
|
-
function
|
|
22688
|
+
function Lr(G, tt, s, C, _, d) {
|
|
22689
22689
|
let o = "";
|
|
22690
22690
|
return (a, r = !1) => {
|
|
22691
22691
|
if (o += a, /<!DOCTYPE|<!ENTITY/i.test(o)) throw new Error("Excel XML 不允许外部实体或 DTD");
|
|
22692
22692
|
const t = /<[^>]*>/g;
|
|
22693
22693
|
let e, l = 0;
|
|
22694
22694
|
for (; e = t.exec(o); ) {
|
|
22695
|
-
if (s &&
|
|
22695
|
+
if (s && Br(e[0], G, tt), d && Dr(e[0], d), C && /^<(?:\w+:)?xf\b/.test(e[0]) && ++tt.styles > 131072) throw new Error("Excel 样式数量超过安全加载上限");
|
|
22696
22696
|
if (_ && /^<(?:\w+:)?si\b/.test(e[0]) && ++tt.strings > 1e6) throw new Error("Excel 共享字符串数量超过安全加载上限");
|
|
22697
22697
|
l = t.lastIndex;
|
|
22698
22698
|
}
|
|
@@ -22701,7 +22701,7 @@ function Br(G, tt, s, C, _, d) {
|
|
|
22701
22701
|
if (r && o) throw new Error("Excel XML 标签不完整");
|
|
22702
22702
|
};
|
|
22703
22703
|
}
|
|
22704
|
-
function
|
|
22704
|
+
function zr(G, tt) {
|
|
22705
22705
|
const s = G.slice(tt.start, tt.start + tt.compressed), C = new Blob([s.buffer]).stream();
|
|
22706
22706
|
if (tt.method === 0) return C;
|
|
22707
22707
|
try {
|
|
@@ -22710,18 +22710,18 @@ function Dr(G, tt) {
|
|
|
22710
22710
|
throw new Error("当前环境不支持安全 Excel 解压;请使用支持 DecompressionStream deflate-raw 的现代浏览器或 Node.js 22+");
|
|
22711
22711
|
}
|
|
22712
22712
|
}
|
|
22713
|
-
async function
|
|
22713
|
+
async function Ur(G, tt, s, C = {}, _) {
|
|
22714
22714
|
let d = 0;
|
|
22715
22715
|
const o = { cells: 0, rows: 0, mergedCells: 0, styles: 0, strings: 0 };
|
|
22716
22716
|
if (tt.filter((r) => /^xl\/worksheets\/[^/]+\.xml$/i.test(r.name)).length > s.limits.maxSheets) throw new Error("Excel 工作表数量超过导入上限");
|
|
22717
22717
|
for (const [r, t] of tt.entries()) {
|
|
22718
22718
|
ve(C.signal);
|
|
22719
|
-
const e =
|
|
22719
|
+
const e = zr(G, t).getReader(), l = () => {
|
|
22720
22720
|
e.cancel(C.signal?.reason).catch(() => {
|
|
22721
22721
|
});
|
|
22722
22722
|
};
|
|
22723
22723
|
C.signal?.addEventListener("abort", l, { once: !0 }), C.signal?.aborted && l();
|
|
22724
|
-
const n = /^xl\/worksheets\/[^/]+\.xml$/i.test(t.name), i = /\.xml$/i.test(t.name) ?
|
|
22724
|
+
const n = /^xl\/worksheets\/[^/]+\.xml$/i.test(t.name), i = /\.xml$/i.test(t.name) ? Lr(s, o, n, t.name === "xl/styles.xml", t.name === "xl/sharedStrings.xml", /^xl\/drawings\/[^/]+\.xml$/i.test(t.name) ? _ : void 0) : void 0, f = i ? new TextDecoder("utf-8", { fatal: !0 }) : void 0;
|
|
22725
22725
|
let c = 0;
|
|
22726
22726
|
try {
|
|
22727
22727
|
for (; ; ) {
|
|
@@ -22738,8 +22738,8 @@ async function Lr(G, tt, s, C = {}, _) {
|
|
|
22738
22738
|
await He({ signal: C.signal }, r + 1, tt.length);
|
|
22739
22739
|
}
|
|
22740
22740
|
}
|
|
22741
|
-
const
|
|
22742
|
-
async function
|
|
22741
|
+
const $r = 101010256, Hr = 33639248, Vr = 67324752;
|
|
22742
|
+
async function Wr(G, tt, s) {
|
|
22743
22743
|
if (ve(s), G instanceof Uint8Array) {
|
|
22744
22744
|
if (G.byteLength > tt) throw new Error("Excel 文件超过导入大小上限");
|
|
22745
22745
|
return new Uint8Array(G);
|
|
@@ -22754,57 +22754,57 @@ async function Hr(G, tt, s) {
|
|
|
22754
22754
|
}
|
|
22755
22755
|
throw new Error("Excel 导入需要 ArrayBuffer、Uint8Array 或 Blob");
|
|
22756
22756
|
}
|
|
22757
|
-
function
|
|
22757
|
+
function qr(G) {
|
|
22758
22758
|
const tt = Math.max(0, G.byteLength - 65557);
|
|
22759
22759
|
for (let s = G.byteLength - 22; s >= tt; s--)
|
|
22760
|
-
if (G.getUint32(s, !0) ===
|
|
22760
|
+
if (G.getUint32(s, !0) === $r && s + 22 + G.getUint16(s + 20, !0) === G.byteLength) return s;
|
|
22761
22761
|
throw new Error("Excel 文件不是完整的 .xlsx ZIP 文件");
|
|
22762
22762
|
}
|
|
22763
|
-
function
|
|
22763
|
+
function Xr(G, tt) {
|
|
22764
22764
|
const s = G.getUint16(tt + 10, !0), C = G.getUint32(tt + 16, !0), _ = G.getUint32(tt + 12, !0);
|
|
22765
22765
|
if (G.getUint16(tt + 4, !0) + G.getUint16(tt + 6, !0) || G.getUint16(tt + 8, !0) !== s || s === 65535 || C === 4294967295 || _ === 4294967295)
|
|
22766
22766
|
throw new Error("不支持分卷或 ZIP64 Excel 文件");
|
|
22767
22767
|
if (s < 1 || s > 2048 || C + _ !== tt) throw new Error("Excel ZIP 目录无效或条目过多");
|
|
22768
22768
|
return { start: C, size: _, entries: s };
|
|
22769
22769
|
}
|
|
22770
|
-
function
|
|
22771
|
-
if (s + 46 > C || tt.getUint32(s, !0) !==
|
|
22770
|
+
function Zr(G, tt, s, C, _) {
|
|
22771
|
+
if (s + 46 > C || tt.getUint32(s, !0) !== Hr) throw new Error("Excel ZIP 条目无效");
|
|
22772
22772
|
const d = tt.getUint16(s + 8, !0), o = tt.getUint16(s + 10, !0), a = tt.getUint16(s + 28, !0), r = s + 46 + a + tt.getUint16(s + 30, !0) + tt.getUint16(s + 32, !0), t = tt.getUint32(s + 42, !0), e = tt.getUint32(s + 20, !0), l = tt.getUint32(s + 24, !0);
|
|
22773
22773
|
if (r > C || t + 30 > G.length || d & 1 || ![0, 8].includes(o)) throw new Error("Excel ZIP 包含无效、加密或不支持的条目");
|
|
22774
|
-
if (l === 4294967295 || e === 4294967295 || tt.getUint32(t, !0) !==
|
|
22774
|
+
if (l === 4294967295 || e === 4294967295 || tt.getUint32(t, !0) !== Vr) throw new Error("Excel ZIP 本地条目无效");
|
|
22775
22775
|
const n = t + 30 + tt.getUint16(t + 26, !0) + tt.getUint16(t + 28, !0);
|
|
22776
22776
|
if (n + e > _ || tt.getUint16(t + 8, !0) !== o || tt.getUint16(t + 6, !0) !== d) throw new Error("Excel ZIP 数据边界或压缩方式无效");
|
|
22777
22777
|
const i = new TextDecoder().decode(G.subarray(s + 46, s + 46 + a));
|
|
22778
22778
|
if (i.includes("\\") || i.split("/").includes("..") || i.startsWith("/")) throw new Error("Excel ZIP 包含不安全路径");
|
|
22779
22779
|
return { name: i, next: r, size: l, start: n, compressed: e, method: o };
|
|
22780
22780
|
}
|
|
22781
|
-
function
|
|
22781
|
+
function Yr(G, tt) {
|
|
22782
22782
|
/^xl\/charts\//.test(G) && tt.add("Excel 图表对象不作为图片导入;请在源文件中插入 PNG/JPEG 图片以保留静态图表外观"), /^xl\/pivot/.test(G) && tt.add("Excel 透视表仅导入已保存的单元格结果,不提供交互或重算"), /^xl\/externalLinks\//.test(G) && tt.add("Excel 外部链接不会访问或刷新,仅使用文件内已保存的结果"), /vbaProject|activeX|embeddings/i.test(G) && tt.add("Excel 宏、控件与嵌入对象不会执行或导入");
|
|
22783
22783
|
}
|
|
22784
|
-
async function
|
|
22785
|
-
const _ = await
|
|
22784
|
+
async function Kr(G, tt, s, C = {}) {
|
|
22785
|
+
const _ = await Wr(G, tt.limits.maxFileBytes, C.signal);
|
|
22786
22786
|
ve(C.signal);
|
|
22787
22787
|
const d = new DataView(_.buffer, _.byteOffset, _.byteLength);
|
|
22788
22788
|
if (_.length < 22) throw new Error("Excel 文件为空或格式无效;仅支持 .xlsx");
|
|
22789
|
-
const o =
|
|
22789
|
+
const o = Xr(d, qr(d));
|
|
22790
22790
|
let a = o.start, r = 0;
|
|
22791
22791
|
const t = /* @__PURE__ */ new Set(), e = [];
|
|
22792
22792
|
for (let l = 0; l < o.entries; l++) {
|
|
22793
22793
|
ve(C.signal);
|
|
22794
|
-
const n =
|
|
22794
|
+
const n = Zr(_, d, a, o.start + o.size, o.start);
|
|
22795
22795
|
if (t.has(n.name)) throw new Error("Excel ZIP 条目名称重复");
|
|
22796
22796
|
if (t.add(n.name), r += n.size, r > tt.limits.maxUncompressedBytes) throw new Error("Excel 解压后内容超过导入大小上限");
|
|
22797
|
-
|
|
22797
|
+
Yr(n.name, s), e.push(n), a = n.next;
|
|
22798
22798
|
}
|
|
22799
22799
|
if (a !== o.start + o.size || !t.has("xl/workbook.xml") || !t.has("[Content_Types].xml"))
|
|
22800
22800
|
throw new Error("文件不是受支持的 .xlsx 工作簿");
|
|
22801
|
-
return await
|
|
22801
|
+
return await Ur(_, e, tt, C, s), _;
|
|
22802
22802
|
}
|
|
22803
|
-
const
|
|
22803
|
+
const Gr = 864e5;
|
|
22804
22804
|
function Ne(G, tt = 2) {
|
|
22805
22805
|
return String(G).padStart(tt, "0");
|
|
22806
22806
|
}
|
|
22807
|
-
function
|
|
22807
|
+
function Jr(G, tt, s) {
|
|
22808
22808
|
const C = [], _ = tt.replace(/"([^"]*)"|\\(.)/g, (a, r, t) => (C.push(r ?? t ?? ""), `${C.length - 1}`)).replace(/\[\$[^\]]*\]/g, "");
|
|
22809
22809
|
if (/\[|ddd|mmm|AM\/PM/i.test(_))
|
|
22810
22810
|
return s(), G.toISOString().replace("T", " ").replace(/\.000Z$/, "");
|
|
@@ -22820,12 +22820,12 @@ function Kr(G, tt, s) {
|
|
|
22820
22820
|
return Ne(e ? G.getUTCMinutes() : G.getUTCMonth() + 1, t.length);
|
|
22821
22821
|
}).replace(/\uE000(\d+)\uE000/g, (a, r) => C[Number(r)] ?? "");
|
|
22822
22822
|
}
|
|
22823
|
-
function
|
|
22823
|
+
function Qr(G, tt, s) {
|
|
22824
22824
|
if (G == null) return { text: "", value: null };
|
|
22825
22825
|
if (G instanceof Date)
|
|
22826
|
-
return Number.isFinite(G.getTime()) ? { text:
|
|
22826
|
+
return Number.isFinite(G.getTime()) ? { text: Jr(G, tt || "yyyy-mm-dd", s), value: G.getTime() / Gr + 25569 } : (s(), { text: "", value: null });
|
|
22827
22827
|
if (typeof G == "number")
|
|
22828
|
-
return Number.isFinite(G) ? { text:
|
|
22828
|
+
return Number.isFinite(G) ? { text: Tr(G, tt, s), value: G } : (s(), { text: String(G), value: null });
|
|
22829
22829
|
if (typeof G == "boolean") return { text: G ? "TRUE" : "FALSE", value: G };
|
|
22830
22830
|
if (typeof G == "string") return { text: G, value: G };
|
|
22831
22831
|
if ("error" in G) return { text: G.error, value: G.error };
|
|
@@ -22835,11 +22835,11 @@ function Gr(G, tt, s) {
|
|
|
22835
22835
|
}
|
|
22836
22836
|
return "text" in G ? { text: String(G.text), value: String(G.text) } : (s(), { text: "", value: null });
|
|
22837
22837
|
}
|
|
22838
|
-
function
|
|
22838
|
+
function tn(G, tt) {
|
|
22839
22839
|
const s = (tt ?? "").replace(/"[^"]*"|\\.|\[[^\]]*\]/g, "");
|
|
22840
22840
|
return typeof G == "number" || G === null && /[0#?]/.test(s) ? "number" : typeof G == "boolean" ? "boolean" : "text";
|
|
22841
22841
|
}
|
|
22842
|
-
function
|
|
22842
|
+
function en(G, tt, s, C, _) {
|
|
22843
22843
|
let d;
|
|
22844
22844
|
try {
|
|
22845
22845
|
d = tt.formula;
|
|
@@ -22848,9 +22848,9 @@ function Qr(G, tt, s, C, _) {
|
|
|
22848
22848
|
}
|
|
22849
22849
|
Object.assign(G, { editable: !1, ...d ? { formula: d } : {} }), _.add(`${C}: 公式使用 Excel 已保存的计算结果并保持只读;修改其他单元格不会自动重算公式`), s == null && _.add(`${C}: 存在没有缓存结果的公式,显示为空;请先在 Excel 中计算并保存`);
|
|
22850
22850
|
}
|
|
22851
|
-
function
|
|
22852
|
-
const _ = G.numFmt, d = () => C.add(`${s}: 存在无法完整还原的自定义数字或日期格式,已保留原值和 numberFormat`), o = G.value, a = o && typeof o == "object" && ("formula" in o || "sharedFormula" in o), r = a ? G.result : o, t =
|
|
22853
|
-
return e.valueType =
|
|
22851
|
+
function rn(G, tt, s, C) {
|
|
22852
|
+
const _ = G.numFmt, d = () => C.add(`${s}: 存在无法完整还原的自定义数字或日期格式,已保留原值和 numberFormat`), o = G.value, a = o && typeof o == "object" && ("formula" in o || "sharedFormula" in o), r = a ? G.result : o, t = Qr(r, _, d), e = { ...t, editable: !0, ..._ ? { numberFormat: _ } : {} };
|
|
22853
|
+
return e.valueType = tn(t.value, _), r instanceof Date && (Object.assign(e, { editable: !1 }), C.add(`${s}: 日期单元格保留 Excel 日期序列与格式,目前在预览中保持只读`), tt && C.add(`${s}: 1904 日期系统已统一转换为 1900 日期系统,保留相同日历日期`)), a && en(e, G, r, s, C), typeof e.text == "string" && /\{\{[^}]+\}\}/.test(e.text) && C.add(`${s}: {{字段}} 占位符按原文导入;动态业务数据需显式绑定,不会自动推断接口字段`), e;
|
|
22854
22854
|
}
|
|
22855
22855
|
const sr = ["FFFFFF", "000000", "E7E6E6", "44546A", "4472C4", "ED7D31", "A5A5A5", "FFC000", "5B9BD5", "70AD47", "0563C1", "954F72"], or = [
|
|
22856
22856
|
"000000",
|
|
@@ -22917,7 +22917,7 @@ const sr = ["FFFFFF", "000000", "E7E6E6", "44546A", "4472C4", "ED7D31", "A5A5A5"
|
|
|
22917
22917
|
"993366",
|
|
22918
22918
|
"333399",
|
|
22919
22919
|
"333333"
|
|
22920
|
-
],
|
|
22920
|
+
], nn = { hair: 0.25, dotted: 0.5, dashed: 0.5, thin: 0.5, medium: 1, thick: 1.5, double: 1 };
|
|
22921
22921
|
function ar(G) {
|
|
22922
22922
|
const tt = G.model, s = /<(?:\w+:)?clrScheme\b[^>]*>([\s\S]*?)<\/(?:\w+:)?clrScheme>/.exec(tt.themes?.theme1 ?? "");
|
|
22923
22923
|
if (!s) return sr;
|
|
@@ -22941,17 +22941,17 @@ function je(G, tt, s = () => {
|
|
|
22941
22941
|
return s(), G.indexed === 64 ? "#000000" : "#FFFFFF";
|
|
22942
22942
|
(G.argb !== void 0 || G.theme !== void 0 || G.indexed !== void 0) && s();
|
|
22943
22943
|
}
|
|
22944
|
-
function
|
|
22944
|
+
function sn(G, tt, s, C) {
|
|
22945
22945
|
const _ = [tt.top, tt.right, tt.bottom, tt.left], d = _.map((a) => !!a?.style);
|
|
22946
22946
|
[G.borderTop, G.borderRight, G.borderBottom, G.borderLeft] = d;
|
|
22947
22947
|
const o = _.filter((a) => a?.style);
|
|
22948
|
-
o.length && (G.borderColor = je(o[0]?.color, s, C) ?? "#000000", G.lineWidthPt =
|
|
22948
|
+
o.length && (G.borderColor = je(o[0]?.color, s, C) ?? "#000000", G.lineWidthPt = nn[o[0].style] ?? 0.5, o.some((a) => a.style !== "thin" && a.style !== "medium" && a.style !== "thick") && C(), o.some((a) => je(a.color, s) !== je(o[0].color, s) || a.style !== o[0].style) && C(), tt.diagonal?.style && C());
|
|
22949
22949
|
}
|
|
22950
|
-
function
|
|
22950
|
+
function on(G, tt, s) {
|
|
22951
22951
|
const C = tt.horizontal;
|
|
22952
22952
|
C && ["left", "center", "right", "justify"].includes(C) ? G.align = C : C && s(), tt.vertical && (G.verticalAlign = tt.vertical === "distributed" || tt.vertical === "justify" ? "middle" : tt.vertical), (tt.textRotation || tt.shrinkToFit || tt.indent || tt.readingOrder) && s();
|
|
22953
22953
|
}
|
|
22954
|
-
function
|
|
22954
|
+
function an(G, tt, s, C) {
|
|
22955
22955
|
const _ = G.style, d = _.font ?? {}, o = { align: "left", verticalAlign: "bottom", fontFamily: d.name || "Calibri", fontSize: d.size || 11 };
|
|
22956
22956
|
d.bold !== void 0 && (o.bold = d.bold), d.italic !== void 0 && (o.italic = d.italic), d.underline !== void 0 && (o.underline = !!d.underline);
|
|
22957
22957
|
const a = () => C.add(`${s}!${G.address}: 系统色按黑/白还原,未知颜色使用默认样式;请在 Excel 中指定明确 RGB 颜色`), r = je(d.color, tt, a);
|
|
@@ -22961,25 +22961,24 @@ function sn(G, tt, s, C) {
|
|
|
22961
22961
|
const e = je(t.fgColor, tt, a);
|
|
22962
22962
|
e && (o.backgroundColor = e);
|
|
22963
22963
|
} else t && !(t.type === "pattern" && t.pattern === "none") && C.add(`${s}: 渐变或图案填充暂不支持,保留单元格内容`);
|
|
22964
|
-
return
|
|
22964
|
+
return sn(o, _.border ?? {}, tt, () => C.add(`${s}: 多种边线颜色、虚线、双线或对角线按单元格统一实线近似呈现`)), _.alignment && on(o, _.alignment, () => C.add(`${s}: 部分旋转、缩进、收缩或分散对齐样式暂不支持`)), (d.strike || d.vertAlign) && C.add(`${s}: 删除线、上标或下标暂不支持`), o;
|
|
22965
22965
|
}
|
|
22966
|
-
function
|
|
22966
|
+
function ln(G, tt, s, C = 1) {
|
|
22967
22967
|
const _ = /* @__PURE__ */ new WeakMap();
|
|
22968
22968
|
return (d) => {
|
|
22969
22969
|
let o = _.get(d.style);
|
|
22970
22970
|
if (!o) {
|
|
22971
|
-
const e =
|
|
22972
|
-
e.fontSize = (e.fontSize ?? 11) * C, o = d.alignment?.horizontal ? { left: e, center: e
|
|
22971
|
+
const e = an(d, G, tt, s);
|
|
22972
|
+
e.fontSize = (e.fontSize ?? 11) * C, o = d.alignment?.horizontal ? { left: e, center: e } : {
|
|
22973
22973
|
left: e,
|
|
22974
|
-
center: { ...e, align: "center" }
|
|
22975
|
-
right: { ...e, align: "right" }
|
|
22974
|
+
center: { ...e, align: "center" }
|
|
22976
22975
|
}, _.set(d.style, o);
|
|
22977
22976
|
}
|
|
22978
|
-
const a = d.value, r = a && typeof a == "object" && ("formula" in a || "sharedFormula" in a) ? d.result : a, t = r == null &&
|
|
22979
|
-
return
|
|
22977
|
+
const a = d.value, r = a && typeof a == "object" && ("formula" in a || "sharedFormula" in a) ? d.result : a, t = r == null && gr(d.numFmt);
|
|
22978
|
+
return o[yr(r, t)];
|
|
22980
22979
|
};
|
|
22981
22980
|
}
|
|
22982
|
-
function
|
|
22981
|
+
function un(G, tt, s, C, _) {
|
|
22983
22982
|
return G.map((d) => {
|
|
22984
22983
|
const o = d.font ?? {}, a = {};
|
|
22985
22984
|
o.name && (a.fontFamily = o.name), o.size && (a.fontSize = o.size * _);
|
|
@@ -23031,8 +23030,8 @@ class Ve {
|
|
|
23031
23030
|
return [...this.messages, ...this.overflow ? ["其余导入告警已合并;请缩小范围进一步检查"] : []];
|
|
23032
23031
|
}
|
|
23033
23032
|
}
|
|
23034
|
-
const
|
|
23035
|
-
function
|
|
23033
|
+
const fn = 25.4 / 72;
|
|
23034
|
+
function cn(G, tt) {
|
|
23036
23035
|
if (tt.sheets === void 0) return G.worksheets.filter((C) => C.state === "visible");
|
|
23037
23036
|
if (!Array.isArray(tt.sheets) || tt.sheets.length === 0) throw new Error("sheets 应为非空的工作表名称或一基位置数组");
|
|
23038
23037
|
const s = [];
|
|
@@ -23055,33 +23054,33 @@ function ur(G, tt, s) {
|
|
|
23055
23054
|
if (!Number.isFinite(G) || G < 0 || G > s) throw new Error(`${tt} 无效或超过尺寸上限`);
|
|
23056
23055
|
return Math.max(0.01, G);
|
|
23057
23056
|
}
|
|
23058
|
-
function
|
|
23057
|
+
function hn(G, tt, s, C) {
|
|
23059
23058
|
const _ = [];
|
|
23060
23059
|
for (let f = tt.left; f <= tt.right; f++) {
|
|
23061
23060
|
const c = G.getColumn(f);
|
|
23062
23061
|
c.hidden && C.add(`${G.name}: 隐藏行列按隐藏尺寸保留;需要编辑时请先在 Excel 中取消隐藏`);
|
|
23063
23062
|
const u = c.width ?? G.properties.defaultColWidth ?? 8.43;
|
|
23064
|
-
_.push(ur(c.hidden || u === 0 ? 0.01 :
|
|
23063
|
+
_.push(ur(c.hidden || u === 0 ? 0.01 : jr(u), "Excel 列宽", 2e3));
|
|
23065
23064
|
}
|
|
23066
23065
|
const d = _.reduce((f, c) => f + c, 0), o = s.layout === "wide", a = s.layout === "a3" ? [297, 420] : [210, 297], r = o ? d : a[s.landscape ? 1 : 0], t = o ? 297 : a[s.landscape ? 0 : 1], e = o ? 0 : 10, l = r - 2 * e, n = o ? 1 : l / d;
|
|
23067
23066
|
!o && n < 0.5 && C.add(`${G.name}: 标准纸张列宽压缩较大;完整宽表建议使用 layout: 'wide'`);
|
|
23068
23067
|
const i = (f) => {
|
|
23069
23068
|
const c = G.getRow(f);
|
|
23070
|
-
return c.hidden && C.add(`${G.name}: 隐藏行列按隐藏尺寸保留;需要编辑时请先在 Excel 中取消隐藏`), ur(c.hidden ? 0.01 : (c.height ?? G.properties.defaultRowHeight ?? 15) *
|
|
23069
|
+
return c.hidden && C.add(`${G.name}: 隐藏行列按隐藏尺寸保留;需要编辑时请先在 Excel 中取消隐藏`), ur(c.hidden ? 0.01 : (c.height ?? G.properties.defaultRowHeight ?? 15) * fn * n, "Excel 行高", 1e3);
|
|
23071
23070
|
};
|
|
23072
23071
|
return { width: l, pageWidth: r, pageHeight: t, margin: e, scale: n, columns: _.map((f) => f * n), rowHeight: i };
|
|
23073
23072
|
}
|
|
23074
|
-
function
|
|
23073
|
+
function dn(G, tt) {
|
|
23075
23074
|
const { sheet: s, range: C, merges: _, style: d, date1904: o, warnings: a, geometry: r } = G, t = [];
|
|
23076
23075
|
for (let e = tt.top; e <= tt.bottom; e++) {
|
|
23077
23076
|
const l = [];
|
|
23078
23077
|
for (let n = C.left; n <= C.right; n++) {
|
|
23079
23078
|
const i = `${e}:${n}`;
|
|
23080
23079
|
if (_.covered.has(i)) continue;
|
|
23081
|
-
const f = s.getCell(e, n), c =
|
|
23080
|
+
const f = s.getCell(e, n), c = rn(f, o, s.name, a);
|
|
23082
23081
|
s.sheetProtection?.sheet === !0 && f.protection?.locked !== !1 && (c.editable = !1), c.style = d(f);
|
|
23083
23082
|
const p = f.value;
|
|
23084
|
-
p && typeof p == "object" && "richText" in p && (c.richParagraphs = [{ segments:
|
|
23083
|
+
p && typeof p == "object" && "richText" in p && (c.richParagraphs = [{ segments: un(p.richText, G.theme, a, `${s.name}!${f.address}`, r.scale) }], c.editable = !1);
|
|
23085
23084
|
const h = _.masters.get(i);
|
|
23086
23085
|
h && (c.colSpan = h.right - h.left + 1, c.rowSpan = h.bottom - h.top + 1), l.push(c);
|
|
23087
23086
|
}
|
|
@@ -23098,19 +23097,19 @@ function fr(G, tt, s, C) {
|
|
|
23098
23097
|
widthMm: _.width,
|
|
23099
23098
|
heightMm: r.reduce((t, e) => t + e, 0),
|
|
23100
23099
|
nid: `xlsx:${G.tableId}:${tt.top}`,
|
|
23101
|
-
grid: { cells:
|
|
23100
|
+
grid: { cells: dn(G, tt), colWidthsMm: _.columns, rowHeightsMm: r, paddingMm: 0.25 * _.scale },
|
|
23102
23101
|
table: {
|
|
23103
23102
|
id: G.tableId,
|
|
23104
23103
|
role: C ? "header" : "body",
|
|
23105
23104
|
rowIndex: C ? -1 : tt.top - G.headerBottom - 1,
|
|
23106
|
-
columnKeys: Array.from({ length: d.right - d.left + 1 }, (t, e) =>
|
|
23105
|
+
columnKeys: Array.from({ length: d.right - d.left + 1 }, (t, e) => Er(d.left + e)),
|
|
23107
23106
|
title: o.name,
|
|
23108
23107
|
layout: a.layout === "wide" ? "wide" : "page"
|
|
23109
23108
|
},
|
|
23110
23109
|
meta: { xlsxSheet: o.name, xlsxRange: Ge({ ...d, top: tt.top, bottom: tt.bottom }) }
|
|
23111
23110
|
};
|
|
23112
23111
|
}
|
|
23113
|
-
function
|
|
23112
|
+
function pn(G, tt) {
|
|
23114
23113
|
const { geometry: s, options: C, range: _, headerBottom: d } = G, o = [];
|
|
23115
23114
|
let a = s.margin;
|
|
23116
23115
|
if (tt.top === _.top) {
|
|
@@ -23129,40 +23128,40 @@ function hn(G, tt) {
|
|
|
23129
23128
|
components: o
|
|
23130
23129
|
};
|
|
23131
23130
|
}
|
|
23132
|
-
function
|
|
23131
|
+
function mn(G, tt) {
|
|
23133
23132
|
const s = G;
|
|
23134
23133
|
G.state !== "visible" && tt.add(`${G.name}: 已按显式选择导入隐藏工作表`), G.sheetProtection?.sheet === !0 && tt.add(`${G.name}: 已保留启用的工作表保护,锁定单元格在预览中保持只读`), s.conditionalFormattings?.length && tt.add(`${G.name}: 条件格式规则暂不执行,仅使用已保存的基础单元格样式`), G.autoFilter && tt.add(`${G.name}: Excel 筛选下拉与排序操作不导入,完整保留选区单元格`), Object.keys(s.dataValidations?.model ?? {}).length && tt.add(`${G.name}: Excel 数据验证与下拉输入规则不导入;业务校验应由宿主配置`);
|
|
23135
23134
|
}
|
|
23136
|
-
async function
|
|
23137
|
-
|
|
23138
|
-
const r =
|
|
23135
|
+
async function bn(G, tt, s, C, _, d, o, a) {
|
|
23136
|
+
mn(G, _);
|
|
23137
|
+
const r = xr(G, tt), t = Sr(tt, r), e = hn(G, tt, C, _), l = tt.right - tt.left + 1, n = Math.max(1, Math.min(C.maxRowsPerPage, Math.floor(1e4 / l)));
|
|
23139
23138
|
if (t.some((p) => (p.bottom - p.top + 1) * l > Math.max(1e4, l)))
|
|
23140
23139
|
throw new Error(`${G.name}: 跨行合并区域超过单段单元格预算,请缩小范围或拆分合并区域`);
|
|
23141
|
-
const i =
|
|
23140
|
+
const i = kr(t, n, C.layout === "wide" ? 1 / 0 : e.pageHeight - e.margin * 2, e.rowHeight), f = {
|
|
23142
23141
|
sheet: G,
|
|
23143
23142
|
range: tt,
|
|
23144
23143
|
geometry: e,
|
|
23145
23144
|
options: C,
|
|
23146
23145
|
warnings: _,
|
|
23147
23146
|
theme: ar(s),
|
|
23148
|
-
merges:
|
|
23149
|
-
style:
|
|
23147
|
+
merges: Cr(r),
|
|
23148
|
+
style: ln(ar(s), G.name, _, e.scale),
|
|
23150
23149
|
date1904: s.properties.date1904 === !0,
|
|
23151
23150
|
tableId: `xlsx:${d}:${G.name}`,
|
|
23152
23151
|
headerBottom: t[0].bottom
|
|
23153
|
-
}, c = [], u =
|
|
23152
|
+
}, c = [], u = Fr(s, G, tt, e, _, a);
|
|
23154
23153
|
for (const p of i) {
|
|
23155
23154
|
ve(o.signal);
|
|
23156
|
-
const h =
|
|
23155
|
+
const h = pn(f, p);
|
|
23157
23156
|
h.components.push(...u(p)), c.push(h), c.length % 8 === 0 && await He({ signal: o.signal }, c.length, i.length);
|
|
23158
23157
|
}
|
|
23159
23158
|
return c;
|
|
23160
23159
|
}
|
|
23161
23160
|
async function Je(G, tt, s) {
|
|
23162
23161
|
ve(tt.signal);
|
|
23163
|
-
const C = dr(tt), _ = await
|
|
23162
|
+
const C = dr(tt), _ = await Kr(G, C, s, tt);
|
|
23164
23163
|
ve(tt.signal);
|
|
23165
|
-
const d = new
|
|
23164
|
+
const d = new Or.Workbook();
|
|
23166
23165
|
try {
|
|
23167
23166
|
await Ke(d.xlsx.load(_), tt.signal);
|
|
23168
23167
|
} catch {
|
|
@@ -23178,30 +23177,30 @@ function mr(G, tt, s) {
|
|
|
23178
23177
|
});
|
|
23179
23178
|
return ve(tt.signal), { sheets: C, warnings: s.result() };
|
|
23180
23179
|
}
|
|
23181
|
-
async function
|
|
23180
|
+
async function En(G, tt = {}) {
|
|
23182
23181
|
const s = new Ve(), { workbook: C } = await Je(G, tt, s);
|
|
23183
23182
|
return mr(C, tt, s);
|
|
23184
23183
|
}
|
|
23185
|
-
async function
|
|
23184
|
+
async function Mn(G, tt = {}) {
|
|
23186
23185
|
const s = new Ve(), { workbook: C, resolved: _ } = await Je(G, tt, s);
|
|
23187
23186
|
return br(C, tt, _, s);
|
|
23188
23187
|
}
|
|
23189
23188
|
async function br(G, tt, s, C) {
|
|
23190
|
-
const _ =
|
|
23189
|
+
const _ = Mr();
|
|
23191
23190
|
ve(tt.signal);
|
|
23192
|
-
const d =
|
|
23191
|
+
const d = cn(G, tt);
|
|
23193
23192
|
if (!d.length) throw new Error("Excel 中没有可导入的可见工作表;可通过 sheets 显式选择隐藏工作表");
|
|
23194
|
-
const o = { schemaVersion:
|
|
23193
|
+
const o = { schemaVersion: vr, pages: [] }, a = [];
|
|
23195
23194
|
let r = s.limits.maxCells;
|
|
23196
23195
|
for (const t of d) {
|
|
23197
23196
|
const e = cr(t, pr(tt, t.name));
|
|
23198
|
-
r -=
|
|
23199
|
-
const l = G.worksheets.indexOf(t) + 1, n = await
|
|
23197
|
+
r -= _r(e, s, r);
|
|
23198
|
+
const l = G.worksheets.indexOf(t) + 1, n = await bn(t, e, G, s, C, l, tt, _);
|
|
23200
23199
|
a.push({ name: t.name, index: l, range: Ge(e), rowCount: e.bottom - e.top + 1, columnCount: e.right - e.left + 1, pageStart: o.pages.length, pageCount: n.length }), o.pages.push(...n), await He(tt, a.length, d.length);
|
|
23201
23200
|
}
|
|
23202
23201
|
return { template: o, warnings: C.result(), sheets: a };
|
|
23203
23202
|
}
|
|
23204
|
-
async function
|
|
23203
|
+
async function gn(G, tt = {}) {
|
|
23205
23204
|
const s = new Ve(), C = await Je(G, tt, s);
|
|
23206
23205
|
let _ = C.workbook, d = !1;
|
|
23207
23206
|
const o = new AbortController(), a = {
|
|
@@ -23226,7 +23225,7 @@ async function mn(G, tt = {}) {
|
|
|
23226
23225
|
const e = r(), l = new AbortController(), n = er(o.signal, l), i = er(t.signal, l);
|
|
23227
23226
|
d = !0;
|
|
23228
23227
|
try {
|
|
23229
|
-
const f = { ...a, ...t, signal: l.signal }, c = await br(e, f, dr(f),
|
|
23228
|
+
const f = { ...a, ...t, signal: l.signal }, c = await br(e, f, dr(f), yn(s));
|
|
23230
23229
|
return ve(l.signal), r(), c;
|
|
23231
23230
|
} finally {
|
|
23232
23231
|
n(), i(), d = !1;
|
|
@@ -23237,21 +23236,21 @@ async function mn(G, tt = {}) {
|
|
|
23237
23236
|
}
|
|
23238
23237
|
};
|
|
23239
23238
|
}
|
|
23240
|
-
function
|
|
23239
|
+
function yn(G) {
|
|
23241
23240
|
const tt = new Ve();
|
|
23242
23241
|
return G.result().forEach((s) => tt.add(s)), tt;
|
|
23243
23242
|
}
|
|
23244
|
-
const
|
|
23243
|
+
const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
23245
23244
|
__proto__: null,
|
|
23246
|
-
openExcelWorkbook:
|
|
23245
|
+
openExcelWorkbook: gn
|
|
23247
23246
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
23248
23247
|
export {
|
|
23249
|
-
|
|
23250
|
-
|
|
23251
|
-
|
|
23252
|
-
|
|
23253
|
-
|
|
23254
|
-
|
|
23255
|
-
|
|
23256
|
-
|
|
23248
|
+
Or as E,
|
|
23249
|
+
Mn as a,
|
|
23250
|
+
En as b,
|
|
23251
|
+
jr as e,
|
|
23252
|
+
Cn as i,
|
|
23253
|
+
kn as m,
|
|
23254
|
+
gn as o,
|
|
23255
|
+
Tn as w
|
|
23257
23256
|
};
|