@agile-team/mach-report 2.24.0 → 2.25.0

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.
Files changed (130) hide show
  1. package/README.md +4 -4
  2. package/dist/{ExcelBindingWizard-BV12hGiK.cjs → ExcelBindingWizard-BgJG-T6k.cjs} +1 -1
  3. package/dist/{ExcelBindingWizard-Cy_lPjWV.js → ExcelBindingWizard-NQ_v396s.js} +3 -3
  4. package/dist/{ParamEditor-DenKjvKu.cjs → ParamEditor-DEP38mBp.cjs} +1 -1
  5. package/dist/{ParamEditor-PyOqHzzw.js → ParamEditor-Z-3yodp5.js} +2 -2
  6. package/dist/{ReportBatchPanel-pQ6d0yqJ.cjs → ReportBatchPanel-D33LjMrA.cjs} +1 -1
  7. package/dist/{ReportBatchPanel-8EFtMrKk.js → ReportBatchPanel-DG8FV-5X.js} +2 -2
  8. package/dist/{ReportLabelStudio-HUeo2TsU.js → ReportLabelStudio-BZp23_hA.js} +3 -3
  9. package/dist/{ReportLabelStudio-B_KF3Zc_.cjs → ReportLabelStudio-Bz-xAayk.cjs} +1 -1
  10. package/dist/{ReportParamPanel-8xR85nz-.cjs → ReportParamPanel-B27IGJjk.cjs} +1 -1
  11. package/dist/{ReportParamPanel-DA-YpkvC.js → ReportParamPanel-DGXzBzl2.js} +1 -1
  12. package/dist/{ReportPreview-_wTJnsG1.js → ReportPreview-CilFAS9U.js} +2392 -2342
  13. package/dist/ReportPreview-dOOzPts2.cjs +6 -0
  14. package/dist/{ReportTemplateLibrary-DH8jl9IF.js → ReportTemplateLibrary-DpSGgvFa.js} +1 -1
  15. package/dist/{ReportTemplateLibrary-CjArKxRG.cjs → ReportTemplateLibrary-uG1gENaW.cjs} +1 -1
  16. package/dist/{RuleEditor-GDydlEHz.js → RuleEditor-BONALh1Q.js} +2 -3
  17. package/dist/{RuleEditor-Bmj98oC4.cjs → RuleEditor-bLXiRcxL.cjs} +1 -1
  18. package/dist/{TemplateOutlinePanel-B554_qk1.cjs → TemplateOutlinePanel-C3nfHuaR.cjs} +1 -1
  19. package/dist/{TemplateOutlinePanel-DjPqzU9h.js → TemplateOutlinePanel-JGBKeF3e.js} +2 -2
  20. package/dist/{TemplateReusePanel-D0628OYc.cjs → TemplateReusePanel-BKhgp6kg.cjs} +1 -1
  21. package/dist/{TemplateReusePanel-DtYbCN7U.js → TemplateReusePanel-DXQUO6nQ.js} +2 -2
  22. package/dist/{TemplateReviewPanel-CSwvCz3f.cjs → TemplateReviewPanel-5RWFUUEf.cjs} +1 -1
  23. package/dist/{TemplateReviewPanel-D_FR4ISq.js → TemplateReviewPanel-DhL7Hapy.js} +1 -1
  24. package/dist/analytics.d.cts +1 -1
  25. package/dist/analytics.d.ts +1 -1
  26. package/dist/artifact-integrity.json +98 -98
  27. package/dist/{assets-B4AJIOTB.cjs → assets-BYdpkTIt.cjs} +1 -1
  28. package/dist/{assets-D0FbszhB.js → assets-C4MIvzQ4.js} +2 -2
  29. package/dist/{auto-C3mGqzJ8.cjs → auto-D-eDZa_V.cjs} +1 -1
  30. package/dist/{auto-BksreoKc.js → auto-umW_ozwr.js} +10 -10
  31. package/dist/{capabilities-lqDEZSq5.js → capabilities-CN_kSVjO.js} +7 -7
  32. package/dist/{capabilities-CTwlcl8q.cjs → capabilities-D4nfhcvB.cjs} +1 -1
  33. package/dist/cell-style-B6Qffrx8.js +37 -0
  34. package/dist/cell-style-y_uh1pZp.cjs +1 -0
  35. package/dist/{data-bar-BnGtnJ82.js → data-bar-Bfh54sT4.js} +1 -1
  36. package/dist/{data-bar-2NLRzOCQ.cjs → data-bar-DzceAVeR.cjs} +1 -1
  37. package/dist/{designer-BNf7NWd6.js → designer-CCyj5WYS.js} +2254 -2248
  38. package/dist/designer-Cj7fn4Hh.cjs +2 -0
  39. package/dist/designer.cjs +1 -1
  40. package/dist/designer.d.cts +6 -6
  41. package/dist/designer.d.ts +6 -6
  42. package/dist/designer.js +1 -1
  43. package/dist/diagnostic-collector-gB07PHy2.js +392 -0
  44. package/dist/diagnostic-collector-wASg6Fzs.cjs +1 -0
  45. package/dist/dom-CXWMmwh-.cjs +1 -0
  46. package/dist/{dom-C90cTM6Y.js → dom-DxdCMLzs.js} +185 -185
  47. package/dist/{encoding-DSc9zv2F.js → encoding-CEkBtlUP.js} +2 -2
  48. package/dist/{encoding-CkziAnZI.cjs → encoding-Cipno7dq.cjs} +1 -1
  49. package/dist/{font-loader-i7lZbqH_.js → font-loader-D4NLIKJL.js} +1 -1
  50. package/dist/{font-loader-D-znWNWS.cjs → font-loader-p_SyTvqt.cjs} +1 -1
  51. package/dist/{grid-strokes-BPiV1WHe.js → grid-strokes-DkZEZvcI.js} +1 -1
  52. package/dist/{grid-strokes-DYf-6DMl.cjs → grid-strokes-RFMR91jn.cjs} +1 -1
  53. package/dist/index.cjs +2 -2
  54. package/dist/index.d.cts +2 -2
  55. package/dist/index.d.ts +2 -2
  56. package/dist/index.js +137 -137
  57. package/dist/json-snapshot-DQdkA_At.cjs +2 -0
  58. package/dist/{json-snapshot-BJWZNryO.js → json-snapshot-x0JpllWL.js} +8 -8
  59. package/dist/{pdf-DWuq6uxx.cjs → pdf-C060D5UY.cjs} +2 -2
  60. package/dist/{pdf-0_5XiTCx.js → pdf-DU8HelKd.js} +17 -17
  61. package/dist/pdf.cjs +1 -1
  62. package/dist/pdf.js +2 -2
  63. package/dist/{plugin-BQBz2vLG.cjs → plugin-B_k23hut.cjs} +1 -1
  64. package/dist/{plugin-B1ydqEmS.js → plugin-CttO46hc.js} +1 -1
  65. package/dist/{prefill-Cuzh1wxf.js → prefill-BkF9Fw_p.js} +2 -2
  66. package/dist/{prefill-2p9wrpn9.cjs → prefill-BvkuwooY.cjs} +1 -1
  67. package/dist/{prepared-DAwe8Il2.cjs → prepared-CSywIEAZ.cjs} +1 -1
  68. package/dist/{prepared-CVbgO9KR.js → prepared-Cyuh61fJ.js} +2 -2
  69. package/dist/protocol-BwbJNVZl.cjs +1 -0
  70. package/dist/protocol-DwtxjXzO.js +96 -0
  71. package/dist/record-bindings-B7djSjNs.cjs +1 -0
  72. package/dist/{record-bindings-fhav-NLG.js → record-bindings-Cv7lFiof.js} +47 -47
  73. package/dist/{region-binding-workflow-DWCUgjZl.cjs → region-binding-workflow-COD8nISZ.cjs} +1 -1
  74. package/dist/{region-binding-workflow-Cm4mqhih.js → region-binding-workflow-D8I4QWRh.js} +2 -2
  75. package/dist/report-encoding-worker.cjs +1 -1
  76. package/dist/report-encoding-worker.js +1 -1
  77. package/dist/{rich-text-layout-YJHtCWQI.js → rich-text-layout-Ch_N0Ubu.js} +1 -1
  78. package/dist/{rich-text-layout-X9YOz1JD.cjs → rich-text-layout-yJGuThtC.cjs} +1 -1
  79. package/dist/runtime-BE30icyB.js +227 -0
  80. package/dist/runtime-DRSuy_SQ.cjs +1 -0
  81. package/dist/sbom.cdx.json +1 -1
  82. package/dist/server-node.cjs +5 -5
  83. package/dist/server-node.js +1695 -1661
  84. package/dist/server.cjs +1 -1
  85. package/dist/server.d.cts +4 -4
  86. package/dist/server.d.ts +4 -4
  87. package/dist/server.js +8 -8
  88. package/dist/style.css +1 -1
  89. package/dist/{template-catalog--yBX169M.cjs → template-catalog-C0riwrx7.cjs} +1 -1
  90. package/dist/{template-catalog-Bu7s7ReF.js → template-catalog-D_gl93va.js} +3 -3
  91. package/dist/{template-fragments-5EzVn7bm.cjs → template-fragments-CgzPdFKB.cjs} +1 -1
  92. package/dist/{template-fragments-Di2vDFnx.js → template-fragments-D94ZZmPc.js} +2 -2
  93. package/dist/{template-registry-Bnh5aEYf.cjs → template-registry-BMScUmM4.cjs} +1 -1
  94. package/dist/{template-registry-BCBF2b8j.js → template-registry-DZOtRY7t.js} +10 -10
  95. package/dist/{textwrap-CmVkhMhx.js → textwrap-BywMBMXM.js} +1 -1
  96. package/dist/{textwrap-BPFxhpOw.cjs → textwrap-LhJkHWb1.cjs} +1 -1
  97. package/dist/vue/async.d.cts +4 -4
  98. package/dist/vue/async.d.ts +4 -4
  99. package/dist/vue/index.d.cts +6 -6
  100. package/dist/vue/index.d.ts +6 -6
  101. package/dist/vue-async.cjs +1 -1
  102. package/dist/vue-async.js +3 -3
  103. package/dist/vue.cjs +1 -1
  104. package/dist/vue.js +7 -7
  105. package/dist/{workbook-session-BnPK3T58.cjs → workbook-session-DR2j6Hxm.cjs} +3 -3
  106. package/dist/{workbook-session-B6P_-5a4.js → workbook-session-SzfILBJJ.js} +106 -107
  107. package/dist/worker.cjs +1 -1
  108. package/dist/worker.js +4 -4
  109. package/dist/xlsx/node.d.cts +30 -1
  110. package/dist/xlsx/node.d.ts +30 -1
  111. package/dist/xlsx-node.cjs +42 -42
  112. package/dist/xlsx-node.js +3908 -3889
  113. package/dist/xlsx.cjs +2 -2
  114. package/dist/xlsx.d.cts +2 -2
  115. package/dist/xlsx.d.ts +2 -2
  116. package/dist/xlsx.js +151 -151
  117. package/package.json +1 -1
  118. package/dist/ReportPreview-CyUXJSVX.cjs +0 -6
  119. package/dist/designer-DWnZZ_ej.cjs +0 -2
  120. package/dist/diagnostic-collector-1sqd7DQP.js +0 -355
  121. package/dist/diagnostic-collector-D3rlvxm3.cjs +0 -1
  122. package/dist/dom-CxOkm_Sy.cjs +0 -1
  123. package/dist/json-snapshot-C7QZrRBf.cjs +0 -2
  124. package/dist/progress-BXzlVbIp.js +0 -29
  125. package/dist/progress-DJBd9Rb9.cjs +0 -1
  126. package/dist/protocol-BOri9qJL.js +0 -105
  127. package/dist/protocol-DD5dHSz-.cjs +0 -1
  128. package/dist/record-bindings-CAyM5tGg.cjs +0 -1
  129. package/dist/runtime-BpSAgOw1.js +0 -201
  130. package/dist/runtime-Cd2UTnwe.cjs +0 -1
@@ -1,14 +1,14 @@
1
- import { y as ve, w as Ke, o as He, R as gr, B as er } from "./diagnostic-collector-1sqd7DQP.js";
2
- import { c as Kt, g as yr } from "./_commonjsHelpers-DaMA6jEr.js";
3
- import { o as Ze, s as cr, r as vr, t as Ge, u as wr, w as _r, x as xr, y as Sr, q as kr } from "./region-binding-workflow-Cm4mqhih.js";
4
- import { c as Cr } from "./media-Y90dHK9z.js";
5
- import { f as Er } from "./number-format-BA_KwrZe.js";
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-D8I4QWRh.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 Mr() {
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 Tr = Mr();
22575
- const Ar = /* @__PURE__ */ yr(Tr), hr = 25.4 / 96;
22576
- function Rr(G) {
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 xn(G) {
22579
+ function kn(G) {
22580
22580
  const tt = G / hr;
22581
22581
  return tt < 12 ? tt / 12 : (tt - 5) / 7;
22582
22582
  }
22583
- function Or(G, tt) {
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 jr(G, tt) {
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 Ir(G, tt, s, C) {
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 Nr(G, tt, s, C, _, d) {
22611
+ function Fr(G, tt, s, C, _, d) {
22612
22612
  const o = tt.getImages();
22613
22613
  if (!o.length) return () => [];
22614
- const a = Or(C, s), r = /* @__PURE__ */ new Map(), t = [];
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, jr(G, l.imageId));
22617
- const n = r.get(l.imageId), i = n ? Ir(l, s, a, d(n).dataUrl) : void 0;
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 Sn(G, tt) {
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 Pr(G, tt, s) {
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 Fr(G, tt) {
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 Br(G, tt, s, C, _, d) {
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 && Pr(e[0], G, tt), d && Fr(e[0], d), C && /^<(?:\w+:)?xf\b/.test(e[0]) && ++tt.styles > 131072) throw new Error("Excel 样式数量超过安全加载上限");
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 Dr(G, tt) {
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 Lr(G, tt, s, C = {}, _) {
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 = Dr(G, t).getReader(), l = () => {
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) ? Br(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;
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 zr = 101010256, Ur = 33639248, $r = 67324752;
22742
- async function Hr(G, tt, s) {
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 Vr(G) {
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) === zr && s + 22 + G.getUint16(s + 20, !0) === G.byteLength) return s;
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 Wr(G, tt) {
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 qr(G, tt, s, C, _) {
22771
- if (s + 46 > C || tt.getUint32(s, !0) !== Ur) throw new Error("Excel ZIP 条目无效");
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) !== $r) throw new Error("Excel ZIP 本地条目无效");
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 Xr(G, tt) {
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 Zr(G, tt, s, C = {}) {
22785
- const _ = await Hr(G, tt.limits.maxFileBytes, C.signal);
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 = Wr(d, Vr(d));
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 = qr(_, d, a, o.start + o.size, o.start);
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
- Xr(n.name, s), e.push(n), a = n.next;
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 Lr(_, e, tt, C, s), _;
22801
+ return await Ur(_, e, tt, C, s), _;
22802
22802
  }
22803
- const Yr = 864e5;
22803
+ const Gr = 864e5;
22804
22804
  function Ne(G, tt = 2) {
22805
22805
  return String(G).padStart(tt, "0");
22806
22806
  }
22807
- function Kr(G, tt, s) {
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 Gr(G, tt, s) {
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: Kr(G, tt || "yyyy-mm-dd", s), value: G.getTime() / Yr + 25569 } : (s(), { text: "", value: null });
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: Er(G, tt, s), value: G } : (s(), { text: String(G), value: null });
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 Jr(G, tt) {
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 Qr(G, tt, s, C, _) {
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 tn(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 = Gr(r, _, d), e = { ...t, editable: !0, ..._ ? { numberFormat: _ } : {} };
22853
- return e.valueType = Jr(t.value, _), r instanceof Date && (Object.assign(e, { editable: !1 }), C.add(`${s}: 日期单元格保留 Excel 日期序列与格式,目前在预览中保持只读`), tt && C.add(`${s}: 1904 日期系统已统一转换为 1900 日期系统,保留相同日历日期`)), a && Qr(e, G, r, s, C), typeof e.text == "string" && /\{\{[^}]+\}\}/.test(e.text) && C.add(`${s}: {{字段}} 占位符按原文导入;动态业务数据需显式绑定,不会自动推断接口字段`), e;
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
- ], en = { hair: 0.25, dotted: 0.5, dashed: 0.5, thin: 0.5, medium: 1, thick: 1.5, double: 1 };
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 rn(G, tt, s, C) {
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 = en[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());
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 nn(G, tt, s) {
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 sn(G, tt, s, C) {
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 rn(o, _.border ?? {}, tt, () => C.add(`${s}: 多种边线颜色、虚线、双线或对角线按单元格统一实线近似呈现`)), _.alignment && nn(o, _.alignment, () => C.add(`${s}: 部分旋转、缩进、收缩或分散对齐样式暂不支持`)), (d.strike || d.vertAlign) && C.add(`${s}: 删除线、上标或下标暂不支持`), o;
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 on(G, tt, s, C = 1) {
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 = sn(d, G, tt, s);
22972
- e.fontSize = (e.fontSize ?? 11) * C, o = d.alignment?.horizontal ? { left: e, center: e, right: 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 && /[0#?]/.test((d.numFmt ?? "").replace(/"[^"]*"|\\.|\[[^\]]*\]/g, ""));
22979
- return typeof r == "boolean" ? o.center : typeof r == "number" || r instanceof Date || t ? o.right : o.left;
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 an(G, tt, s, C, _) {
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 ln = 25.4 / 72;
23035
- function un(G, tt) {
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 fn(G, tt, s, C) {
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 : Rr(u), "Excel 列宽", 2e3));
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) * ln * n, "Excel 行高", 1e3);
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 cn(G, tt) {
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 = tn(f, o, s.name, a);
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: an(p.richText, G.theme, a, `${s.name}!${f.address}`, r.scale) }], c.editable = !1);
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: cn(G, tt), colWidthsMm: _.columns, rowHeightsMm: r, paddingMm: 0.25 * _.scale },
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) => kr(d.left + 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 hn(G, tt) {
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 dn(G, tt) {
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 pn(G, tt, s, C, _, d, o, a) {
23137
- dn(G, _);
23138
- const r = wr(G, tt), t = _r(tt, r), e = fn(G, tt, C, _), l = tt.right - tt.left + 1, n = Math.max(1, Math.min(C.maxRowsPerPage, Math.floor(1e4 / l)));
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 = xr(t, n, C.layout === "wide" ? 1 / 0 : e.pageHeight - e.margin * 2, e.rowHeight), f = {
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: Sr(r),
23149
- style: on(ar(s), G.name, _, e.scale),
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 = Nr(s, G, tt, e, _, a);
23152
+ }, c = [], u = Fr(s, G, tt, e, _, a);
23154
23153
  for (const p of i) {
23155
23154
  ve(o.signal);
23156
- const h = hn(f, p);
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 Zr(G, C, s, tt);
23162
+ const C = dr(tt), _ = await Kr(G, C, s, tt);
23164
23163
  ve(tt.signal);
23165
- const d = new Ar.Workbook();
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 kn(G, tt = {}) {
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 Cn(G, tt = {}) {
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 _ = Cr();
23189
+ const _ = Mr();
23191
23190
  ve(tt.signal);
23192
- const d = un(G, tt);
23191
+ const d = cn(G, tt);
23193
23192
  if (!d.length) throw new Error("Excel 中没有可导入的可见工作表;可通过 sheets 显式选择隐藏工作表");
23194
- const o = { schemaVersion: gr, pages: [] }, a = [];
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 -= vr(e, s, r);
23199
- const l = G.worksheets.indexOf(t) + 1, n = await pn(t, e, G, s, C, l, tt, _);
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 mn(G, tt = {}) {
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), bn(s));
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 bn(G) {
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 En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23243
+ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23245
23244
  __proto__: null,
23246
- openExcelWorkbook: mn
23245
+ openExcelWorkbook: gn
23247
23246
  }, Symbol.toStringTag, { value: "Module" }));
23248
23247
  export {
23249
- Ar as E,
23250
- Cn as a,
23251
- kn as b,
23252
- Rr as e,
23253
- Sn as i,
23254
- xn as m,
23255
- mn as o,
23256
- En as w
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
  };
package/dist/worker.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./protocol-DD5dHSz-.cjs"),s=require("./auto-C3mGqzJ8.cjs"),R=require("./encoding-CkziAnZI.cjs");function p(n,e=globalThis){const a=t=>{r.isReportWorkerRequest(t.data)&&r.runReportWorkerRequest(n,t.data,o=>e.postMessage({protocol:r.REPORT_WORKER_PROTOCOL,id:t.data.id,type:"event",event:o})).then(o=>e.postMessage(o,r.reportWorkerTransferList(o)))};return e.addEventListener("message",a),()=>e.removeEventListener("message",a)}exports.ReportWorkerError=r.ReportWorkerError;exports.ReportWorkerStartError=s.ReportWorkerStartError;exports.createAutoReportExporter=s.createAutoReportExporter;exports.createBrowserReportExecutor=s.createBrowserReportExecutor;exports.serveReportEncodingWorker=R.serveReportEncodingWorker;exports.serveReportWorker=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./protocol-BwbJNVZl.cjs"),s=require("./auto-D-eDZa_V.cjs"),R=require("./encoding-Cipno7dq.cjs");function p(n,e=globalThis){const a=t=>{r.isReportWorkerRequest(t.data)&&r.runReportWorkerRequest(n,t.data,o=>e.postMessage({protocol:r.REPORT_WORKER_PROTOCOL,id:t.data.id,type:"event",event:o})).then(o=>e.postMessage(o,r.reportWorkerTransferList(o)))};return e.addEventListener("message",a),()=>e.removeEventListener("message",a)}exports.ReportWorkerError=r.ReportWorkerError;exports.ReportWorkerStartError=s.ReportWorkerStartError;exports.createAutoReportExporter=s.createAutoReportExporter;exports.createBrowserReportExecutor=s.createBrowserReportExecutor;exports.serveReportEncodingWorker=R.serveReportEncodingWorker;exports.serveReportWorker=p;
package/dist/worker.js CHANGED
@@ -1,7 +1,7 @@
1
- import { i as a, r as R, R as p, a as n } from "./protocol-BOri9qJL.js";
2
- import { b as W } from "./protocol-BOri9qJL.js";
3
- import { R as g, c as k, a as u } from "./auto-BksreoKc.js";
4
- import { s as x } from "./encoding-DSc9zv2F.js";
1
+ import { i as a, r as R, R as p, a as n } from "./protocol-DwtxjXzO.js";
2
+ import { b as W } from "./protocol-DwtxjXzO.js";
3
+ import { R as g, c as k, a as u } from "./auto-umW_ozwr.js";
4
+ import { s as x } from "./encoding-CEkBtlUP.js";
5
5
  function d(s, r = globalThis) {
6
6
  const t = (o) => {
7
7
  a(o.data) && R(s, o.data, (e) => r.postMessage({ protocol: p, id: o.data.id, type: "event", event: e })).then((e) => r.postMessage(e, n(e)));
@@ -2,9 +2,36 @@
2
2
 
3
3
  import { Writable } from 'node:stream';
4
4
 
5
+ declare interface ComponentStyle {
6
+ fontSizePx?: number;
7
+ fontSize?: number;
8
+ fontFamily?: string;
9
+ bold?: boolean;
10
+ italic?: boolean;
11
+ underline?: boolean;
12
+ color?: string;
13
+ backgroundColor?: string;
14
+ align?: "left" | "center" | "right" | "justify";
15
+ verticalAlign?: "top" | "middle" | "bottom";
16
+ lineColor?: string;
17
+ borderColor?: string;
18
+ lineWidthPt?: number;
19
+ borderTop?: boolean;
20
+ borderRight?: boolean;
21
+ borderBottom?: boolean;
22
+ borderLeft?: boolean;
23
+ lineHeight?: number;
24
+ letterSpacing?: number;
25
+ opacity?: number;
26
+ rotateDeg?: number;
27
+ }
28
+
29
+ /** auto:真实数字、显式数值格式、日期与布尔居中,其他内容居左。 */
30
+ declare type ListAlignment = NonNullable<ComponentStyle["align"]> | "auto";
31
+
5
32
  /**
6
33
  * Commits each source row directly to ExcelJS WorkbookWriter. No RenderPlan, full row array,
7
- * Workbook or Buffer is retained. Styles are column-scoped; shared strings are disabled.
34
+ * Workbook or Buffer is retained. Alignment variants are reused; shared strings are disabled.
8
35
  * Destination is ended by the writer. An abort/error leaves a partial, unusable XLSX file.
9
36
  */
10
37
  export declare function writeRowsToXlsx<Row extends object>(rows: AsyncIterable<Row> | Iterable<Row>, options: XlsxStreamOptions<Row>): Promise<XlsxStreamProgress>;
@@ -16,6 +43,8 @@ export declare interface XlsxStreamColumn<Row> {
16
43
  header?: string;
17
44
  width?: number;
18
45
  numberFormat?: string;
46
+ /** Data alignment. Defaults to auto, centering numeric/date/boolean values. */
47
+ align?: ListAlignment;
19
48
  value?: (row: Row, rowIndex: number) => XlsxRowValue;
20
49
  }
21
50