@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.
Files changed (136) hide show
  1. package/README.md +6 -4
  2. package/dist/{ExcelBindingWizard-Cy_lPjWV.js → ExcelBindingWizard-bs3F4dD8.js} +3 -3
  3. package/dist/{ExcelBindingWizard-BV12hGiK.cjs → ExcelBindingWizard-jSdjBtWw.cjs} +1 -1
  4. package/dist/{ParamEditor-PyOqHzzw.js → ParamEditor-B7YVD28E.js} +2 -2
  5. package/dist/{ParamEditor-DenKjvKu.cjs → ParamEditor-CGfaweYX.cjs} +1 -1
  6. package/dist/{ReportBatchPanel-pQ6d0yqJ.cjs → ReportBatchPanel-BRJt0TXp.cjs} +1 -1
  7. package/dist/{ReportBatchPanel-8EFtMrKk.js → ReportBatchPanel-BTKHtLTW.js} +2 -2
  8. package/dist/{ReportLabelStudio-B_KF3Zc_.cjs → ReportLabelStudio-BvK_WBke.cjs} +1 -1
  9. package/dist/{ReportLabelStudio-HUeo2TsU.js → ReportLabelStudio-CZwqyO3t.js} +3 -3
  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-CnxaDTCO.js} +2392 -2342
  13. package/dist/ReportPreview-DqFBcsJQ.cjs +6 -0
  14. package/dist/{ReportTemplateLibrary-DH8jl9IF.js → ReportTemplateLibrary-C7sB0Jay.js} +1 -1
  15. package/dist/{ReportTemplateLibrary-CjArKxRG.cjs → ReportTemplateLibrary-ClwxhnC0.cjs} +1 -1
  16. package/dist/{RuleEditor-GDydlEHz.js → RuleEditor-CsDGFaWz.js} +3 -4
  17. package/dist/{RuleEditor-Bmj98oC4.cjs → RuleEditor-D-OdaGdR.cjs} +1 -1
  18. package/dist/{TemplateOutlinePanel-DjPqzU9h.js → TemplateOutlinePanel-CXOT7d1r.js} +2 -2
  19. package/dist/{TemplateOutlinePanel-B554_qk1.cjs → TemplateOutlinePanel-DAqR9zQi.cjs} +1 -1
  20. package/dist/{TemplateReusePanel-DtYbCN7U.js → TemplateReusePanel-Dcfx3Hba.js} +2 -2
  21. package/dist/{TemplateReusePanel-D0628OYc.cjs → TemplateReusePanel-ygIi-Ajz.cjs} +1 -1
  22. package/dist/{TemplateReviewPanel-D_FR4ISq.js → TemplateReviewPanel-COU8FqPq.js} +1 -1
  23. package/dist/{TemplateReviewPanel-CSwvCz3f.cjs → TemplateReviewPanel-DyGULVxr.cjs} +1 -1
  24. package/dist/analytics.cjs +1 -1
  25. package/dist/analytics.d.cts +1 -1
  26. package/dist/analytics.d.ts +1 -1
  27. package/dist/analytics.js +2 -2
  28. package/dist/artifact-integrity.json +102 -102
  29. package/dist/{assets-B4AJIOTB.cjs → assets-BYdpkTIt.cjs} +1 -1
  30. package/dist/{assets-D0FbszhB.js → assets-C4MIvzQ4.js} +2 -2
  31. package/dist/{auto-BksreoKc.js → auto-D7x7QsWD.js} +10 -10
  32. package/dist/{auto-C3mGqzJ8.cjs → auto-mPK9W0y5.cjs} +1 -1
  33. package/dist/{capabilities-lqDEZSq5.js → capabilities-CN_kSVjO.js} +7 -7
  34. package/dist/{capabilities-CTwlcl8q.cjs → capabilities-D4nfhcvB.cjs} +1 -1
  35. package/dist/cell-style-B6Qffrx8.js +37 -0
  36. package/dist/cell-style-y_uh1pZp.cjs +1 -0
  37. package/dist/{data-bar-BnGtnJ82.js → data-bar-Bfh54sT4.js} +1 -1
  38. package/dist/{data-bar-2NLRzOCQ.cjs → data-bar-DzceAVeR.cjs} +1 -1
  39. package/dist/{designer-BNf7NWd6.js → designer-B597ZdC0.js} +2254 -2248
  40. package/dist/designer-DFIdv_n7.cjs +2 -0
  41. package/dist/designer.cjs +1 -1
  42. package/dist/designer.d.cts +6 -6
  43. package/dist/designer.d.ts +6 -6
  44. package/dist/designer.js +1 -1
  45. package/dist/diagnostic-collector-gB07PHy2.js +392 -0
  46. package/dist/diagnostic-collector-wASg6Fzs.cjs +1 -0
  47. package/dist/dom-CXWMmwh-.cjs +1 -0
  48. package/dist/{dom-C90cTM6Y.js → dom-DxdCMLzs.js} +185 -185
  49. package/dist/{encoding-DSc9zv2F.js → encoding-Amq3XrtU.js} +2 -2
  50. package/dist/{encoding-CkziAnZI.cjs → encoding-DRVXs5xm.cjs} +1 -1
  51. package/dist/{font-loader-i7lZbqH_.js → font-loader-D4NLIKJL.js} +1 -1
  52. package/dist/{font-loader-D-znWNWS.cjs → font-loader-p_SyTvqt.cjs} +1 -1
  53. package/dist/{grid-strokes-BPiV1WHe.js → grid-strokes-DkZEZvcI.js} +1 -1
  54. package/dist/{grid-strokes-DYf-6DMl.cjs → grid-strokes-RFMR91jn.cjs} +1 -1
  55. package/dist/index.cjs +2 -2
  56. package/dist/index.d.cts +2 -2
  57. package/dist/index.d.ts +2 -2
  58. package/dist/index.js +137 -137
  59. package/dist/{json-snapshot-BJWZNryO.js → json-snapshot-CBVWZvyC.js} +662 -615
  60. package/dist/json-snapshot-DCFEtfFw.cjs +2 -0
  61. package/dist/matrix-DUYPRL7t.cjs +1 -0
  62. package/dist/{matrix-C6e_r_vp.js → matrix-b6T291xo.js} +120 -104
  63. package/dist/{pdf-DWuq6uxx.cjs → pdf-C060D5UY.cjs} +2 -2
  64. package/dist/{pdf-0_5XiTCx.js → pdf-DU8HelKd.js} +17 -17
  65. package/dist/pdf.cjs +1 -1
  66. package/dist/pdf.js +2 -2
  67. package/dist/{plugin-B1ydqEmS.js → plugin-BdCplNe1.js} +1 -1
  68. package/dist/{plugin-BQBz2vLG.cjs → plugin-DHe8y5pD.cjs} +1 -1
  69. package/dist/{prefill-Cuzh1wxf.js → prefill-Buy4NJ15.js} +2 -2
  70. package/dist/{prefill-2p9wrpn9.cjs → prefill-Cw4ZYGXZ.cjs} +1 -1
  71. package/dist/{prepared-DAwe8Il2.cjs → prepared-BlNeOjoO.cjs} +1 -1
  72. package/dist/{prepared-CVbgO9KR.js → prepared-CBJ7BkK0.js} +2 -2
  73. package/dist/protocol-BU_4sXP0.cjs +1 -0
  74. package/dist/protocol-CB19KXGr.js +96 -0
  75. package/dist/record-bindings-B7djSjNs.cjs +1 -0
  76. package/dist/{record-bindings-fhav-NLG.js → record-bindings-Cv7lFiof.js} +47 -47
  77. package/dist/{region-binding-workflow-Cm4mqhih.js → region-binding-workflow-EYxvUYJ-.js} +2 -2
  78. package/dist/{region-binding-workflow-DWCUgjZl.cjs → region-binding-workflow-NdkMSFCh.cjs} +1 -1
  79. package/dist/report-encoding-worker.cjs +1 -1
  80. package/dist/report-encoding-worker.js +1 -1
  81. package/dist/{rich-text-layout-YJHtCWQI.js → rich-text-layout-Ch_N0Ubu.js} +1 -1
  82. package/dist/{rich-text-layout-X9YOz1JD.cjs → rich-text-layout-yJGuThtC.cjs} +1 -1
  83. package/dist/runtime-B5d_lQNQ.js +227 -0
  84. package/dist/runtime-BRx8Agqr.cjs +1 -0
  85. package/dist/sbom.cdx.json +1 -1
  86. package/dist/server-node.cjs +5 -5
  87. package/dist/server-node.js +1891 -1793
  88. package/dist/server.cjs +1 -1
  89. package/dist/server.d.cts +4 -4
  90. package/dist/server.d.ts +4 -4
  91. package/dist/server.js +8 -8
  92. package/dist/style.css +1 -1
  93. package/dist/{template-catalog-Bu7s7ReF.js → template-catalog-CM6U_RlD.js} +3 -3
  94. package/dist/{template-catalog--yBX169M.cjs → template-catalog-Cj66M84u.cjs} +1 -1
  95. package/dist/{template-fragments-Di2vDFnx.js → template-fragments-BDxdCuMD.js} +2 -2
  96. package/dist/{template-fragments-5EzVn7bm.cjs → template-fragments-DbKdxI1z.cjs} +1 -1
  97. package/dist/template-registry-B-AK1oam.cjs +1 -0
  98. package/dist/{template-registry-BCBF2b8j.js → template-registry-DeVgwEZj.js} +145 -144
  99. package/dist/{textwrap-CmVkhMhx.js → textwrap-BywMBMXM.js} +1 -1
  100. package/dist/{textwrap-BPFxhpOw.cjs → textwrap-LhJkHWb1.cjs} +1 -1
  101. package/dist/vue/async.d.cts +4 -4
  102. package/dist/vue/async.d.ts +4 -4
  103. package/dist/vue/index.d.cts +6 -6
  104. package/dist/vue/index.d.ts +6 -6
  105. package/dist/vue-async.cjs +1 -1
  106. package/dist/vue-async.js +3 -3
  107. package/dist/vue.cjs +1 -1
  108. package/dist/vue.js +7 -7
  109. package/dist/{workbook-session-B6P_-5a4.js → workbook-session-B6hRjTyX.js} +106 -107
  110. package/dist/{workbook-session-BnPK3T58.cjs → workbook-session-BclW7KKH.cjs} +3 -3
  111. package/dist/worker.cjs +1 -1
  112. package/dist/worker.js +4 -4
  113. package/dist/xlsx/node.d.cts +30 -1
  114. package/dist/xlsx/node.d.ts +30 -1
  115. package/dist/xlsx-node.cjs +42 -42
  116. package/dist/xlsx-node.js +3908 -3889
  117. package/dist/xlsx.cjs +2 -2
  118. package/dist/xlsx.d.cts +2 -2
  119. package/dist/xlsx.d.ts +2 -2
  120. package/dist/xlsx.js +151 -151
  121. package/package.json +1 -1
  122. package/dist/ReportPreview-CyUXJSVX.cjs +0 -6
  123. package/dist/designer-DWnZZ_ej.cjs +0 -2
  124. package/dist/diagnostic-collector-1sqd7DQP.js +0 -355
  125. package/dist/diagnostic-collector-D3rlvxm3.cjs +0 -1
  126. package/dist/dom-CxOkm_Sy.cjs +0 -1
  127. package/dist/json-snapshot-C7QZrRBf.cjs +0 -2
  128. package/dist/matrix-B8QWbsGM.cjs +0 -1
  129. package/dist/progress-BXzlVbIp.js +0 -29
  130. package/dist/progress-DJBd9Rb9.cjs +0 -1
  131. package/dist/protocol-BOri9qJL.js +0 -105
  132. package/dist/protocol-DD5dHSz-.cjs +0 -1
  133. package/dist/record-bindings-CAyM5tGg.cjs +0 -1
  134. package/dist/runtime-BpSAgOw1.js +0 -201
  135. package/dist/runtime-Cd2UTnwe.cjs +0 -1
  136. package/dist/template-registry-Bnh5aEYf.cjs +0 -1
@@ -1,9 +1,9 @@
1
- import { s as S, d as j, c as U, a as H } from "./prepared-CVbgO9KR.js";
2
- import { H as I } from "./json-snapshot-BJWZNryO.js";
3
- import { b as W, R as C, v as $, c as N } from "./protocol-BOri9qJL.js";
4
- import { x as G } from "./diagnostic-collector-1sqd7DQP.js";
5
- import { c as K, e as X } from "./runtime-BpSAgOw1.js";
6
- import { D as z, R as O, t as R, v as J, c as D, b as M } from "./sha256-BDQ1Qk7A.js";
1
+ import { s as S, d as j, c as U, a as H } from "./prepared-CBJ7BkK0.js";
2
+ import { H as I } from "./json-snapshot-CBVWZvyC.js";
3
+ import { b as W, R as z, v as $, c as N } from "./protocol-CB19KXGr.js";
4
+ import { z as G } from "./diagnostic-collector-gB07PHy2.js";
5
+ import { c as K, e as X } from "./runtime-B5d_lQNQ.js";
6
+ import { D as C, R as O, t as R, v as J, c as D, b as M } from "./sha256-BDQ1Qk7A.js";
7
7
  class T extends Error {
8
8
  constructor(r) {
9
9
  super("报表 Worker 无法启动"), this.cause = r, this.name = "ReportWorkerStartError";
@@ -17,7 +17,7 @@ function F(e) {
17
17
  function V(e, r) {
18
18
  if (!e || typeof e != "object") return;
19
19
  const t = e;
20
- return t.protocol === C && t.id === r ? t : void 0;
20
+ return t.protocol === z && t.id === r ? t : void 0;
21
21
  }
22
22
  function Y(e, r = {}) {
23
23
  const t = r.timeoutMs ?? 12e4;
@@ -65,7 +65,7 @@ function Y(e, r = {}) {
65
65
  if (a?.addEventListener("abort", k, { once: !0 }), y = setTimeout(() => l(new W({ name: "ReportRuntimeError", code: "timeout", message: `报表 Worker 执行超过 ${t}ms` })), t), a?.aborted) k();
66
66
  else {
67
67
  const { onEvent: f, signal: c, ...g } = s, x = Z(g);
68
- b.postMessage({ protocol: C, id: E, operation: o, input: g, ...r.budget ? { budget: r.budget } : {} }, x);
68
+ b.postMessage({ protocol: z, id: E, operation: o, input: g, ...r.budget ? { budget: r.budget } : {} }, x);
69
69
  }
70
70
  } catch (f) {
71
71
  l(f);
@@ -183,12 +183,12 @@ function B(e, r, t) {
183
183
  M(t, "maxRows", e.stats.rows), M(t, "maxPages", e.stats.pages), M(t, "maxCells", e.stats.cells), M(t, "maxOutputBytes", e.bytes.byteLength), j({ ...r, prepared: { ...r.prepared, stats: e.stats } }, t);
184
184
  }
185
185
  function ae(e, r) {
186
- const t = { ...z, ...r.budget }, n = U(e.prepared, t.maxPreparedBytes, e.signal), o = { ...e, prepared: n.prepared, pdf: S(e.pdf), xlsx: H(e.xlsx) };
186
+ const t = { ...C, ...r.budget }, n = U(e.prepared, t.maxPreparedBytes, e.signal), o = { ...e, prepared: n.prepared, pdf: S(e.pdf), xlsx: H(e.xlsx) };
187
187
  return { request: o, forward: () => ({ ...o, prepared: n.forward() }) };
188
188
  }
189
189
  function ie(e, r) {
190
190
  ne(e);
191
- const t = { ...e, thresholds: { ...e.thresholds }, budget: { ...z, ...e.budget } }, n = t.timeoutMs ?? t.budget.maxDurationMs ?? 12e4, o = K({ reports: {}, budget: { ...t.budget, maxDurationMs: n } }), s = /* @__PURE__ */ new Set();
191
+ const t = { ...e, thresholds: { ...e.thresholds }, budget: { ...C, ...e.budget } }, n = t.timeoutMs ?? t.budget.maxDurationMs ?? 12e4, o = K({ reports: {}, budget: { ...t.budget, maxDurationMs: n } }), s = /* @__PURE__ */ new Set();
192
192
  let a = !1;
193
193
  const u = t.mode !== "worker" && t.fallback !== "error";
194
194
  async function v(i, b) {
@@ -1 +1 @@
1
- "use strict";const O=require("./prepared-DAwe8Il2.cjs"),C=require("./json-snapshot-C7QZrRBf.cjs"),P=require("./protocol-DD5dHSz-.cjs"),I=require("./diagnostic-collector-D3rlvxm3.cjs"),W=require("./runtime-Cd2UTnwe.cjs"),l=require("./sha256-DgZAKXqI.cjs");class M extends Error{constructor(r){super("报表 Worker 无法启动"),this.cause=r,this.name="ReportWorkerStartError"}}let j=0;function F(e){const r=new Error("报表 Worker 任务已取消");return r.name="AbortError",Object.defineProperty(r,"cause",{value:e}),r}function U(e,r){if(!e||typeof e!="object")return;const t=e;return t.protocol===P.REPORT_WORKER_PROTOCOL&&t.id===r?t:void 0}function z(e,r={}){const t=r.timeoutMs??12e4;if(!Number.isFinite(t)||t<=0||t>2147483647)throw new RangeError("Worker timeoutMs 应为正有限数字,且不能超过 2147483647");const n=(o,s,a,d)=>a?.aborted?Promise.reject(F(a.reason)):new Promise((v,i)=>{let g;try{g=e()}catch(f){i(new M(f));return}const h=`mach-report-${Date.now()}-${++j}`;let b=!1,p=()=>{},R;const u=(f,c)=>{if(b)return;b=!0,R&&clearTimeout(R);let w;try{p()}catch(y){w=y}a?.removeEventListener("abort",k),f??=w,Promise.resolve().then(()=>g.terminate()).then(()=>f===void 0?v(c):i(f),y=>i(f??y))},k=()=>u(F(a?.reason)),m=f=>{const c=U(f,h);if(!(!c||b)){if("type"in c&&c.type==="event"){const w="event"in c?c.event:void 0;P.validReportWorkerEvent(w,s)?C.notifyReportTaskEvent(d,w,a):u(new Error("报表 Worker 返回无效阶段事件"));return}c.error&&typeof c.error.name=="string"&&typeof c.error.message=="string"?u(new P.ReportWorkerError(c.error)):P.validReportWorkerResult(c.result,o)&&(o==="prepare"||"format"in c.result&&"format"in s&&c.result.format===s.format)?u(void 0,c.result):u(new Error("报表 Worker 返回无效响应"))}};try{if(p=g.subscribe(m,f=>u(f??new Error("报表 Worker 执行失败"))),b){p();return}if(a?.addEventListener("abort",k,{once:!0}),R=setTimeout(()=>u(new P.ReportWorkerError({name:"ReportRuntimeError",code:"timeout",message:`报表 Worker 执行超过 ${t}ms`})),t),a?.aborted)k();else{const{onEvent:f,signal:c,...w}=s,y=N(w);g.postMessage({protocol:P.REPORT_WORKER_PROTOCOL,id:h,operation:o,input:w,...r.budget?{budget:r.budget}:{}},y)}}catch(f){u(f)}});return{exportPrepared:(o,s,a)=>n("exportPrepared",o,s,a),prepare:(o,s,a)=>n("prepare",o,s,a),export:(o,s,a)=>n("export",o,s,a)}}function N(e){return e.pdf?(e.pdf=O.snapshotPdfFonts(e.pdf),(e.pdf?.customFontFaces?Object.values(e.pdf.customFontFaces):[e.pdf?.customFontBytes]).filter(t=>t instanceof Uint8Array).map(t=>t.buffer)):[]}function _(e,r={}){return z(()=>{const t=e();return{postMessage:(n,o)=>t.postMessage(n,o),terminate:()=>t.terminate(),subscribe:(n,o)=>{const s=d=>n(d.data),a=d=>o(d instanceof ErrorEvent?new Error(d.message):new Error("报表 Worker 消息无法解码"));return t.addEventListener("message",s),t.addEventListener("error",a),t.addEventListener("messageerror",a),()=>{t.removeEventListener("message",s),t.removeEventListener("error",a),t.removeEventListener("messageerror",a)}}}},r)}const $={cells:2e4,pages:20,bytes:2e6};function T(e){return e.cells>=e.limits.cells||e.pages>=e.limits.pages||e.bytes>=e.limits.bytes||e.capped}function x(e){return++e.visits>=1e5&&(e.capped=!0),!T(e)}function E(e){return typeof e=="string"?e.length*2:0}function L(e,r){for(const t of e??[]){if(!x(r))return;for(const n of t.segments){if(!x(r))return;r.bytes+=E(n.text)}}}function S(e,r,t){if(t>32){r.capped=!0;return}if(x(r)){r.bytes+=E(e.text)+E(e.rawText)+E(e.imageData),L(e.richParagraphs,r);for(const n of e.lines??[]){if(!x(r))return;r.bytes+=E(n)}for(const n of e.grid?.cells??[]){if(!x(r))return;for(const o of n){if(!x(r))return;if(o){r.cells++,r.bytes+=E(o.text)+E(o.rawText)+E(o.value),L(o.richParagraphs,r);for(const s of o.children??[]){if(T(r))return;S(s,r,t+1)}}}}}}function H(e,r){if(e.format==="xlsx")for(const t of e.xlsx?.additionalSheets??[]){if(!x(r))return;r.bytes+=E(t?.name);for(const n of t?.rows??[]){if(!x(r))return;for(const o of n??[]){if(!x(r))return;r.cells++,r.bytes+=E(o)}}}}function G(e){const r={...$,...e.thresholds};for(const t of Object.values(r))if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("导出隔离阈值应为正安全整数");return r}function K(e,r){const t=G(r),n=e.pdf?.customFontFaces?Object.values(e.pdf.customFontFaces):[e.pdf?.customFontBytes],o={pages:e.prepared.plan.pages.length,cells:0,bytes:n.reduce((d,v)=>d+(v?.byteLength??0),0),visits:0,capped:!1,limits:t};for(const d of e.prepared.plan.pages){if(T(o))break;for(const v of d.components){if(T(o))break;S(v,o,0)}}H(e,o);let s=T(o)?"worker":"local",a=o.capped?"scan-limit":s==="worker"?"threshold":"small-task";return r.mode==="local"&&(s="local",a="explicit-local"),r.mode==="worker"&&(s="worker",a="explicit-worker"),Object.values(e.xlsx??{}).some(d=>typeof d=="function")&&(s="local",a="nonserializable-options"),{mode:s,reason:a,estimate:{pages:o.pages,cells:o.cells,bytes:o.bytes},hardCancellation:s==="worker"}}function X(e){if(e.mode!==void 0&&!["auto","local","worker"].includes(e.mode))throw new TypeError("无效的导出执行模式");if(e.fallback!==void 0&&!["local","error"].includes(e.fallback))throw new TypeError("无效的导出回退策略");l.validateBudget({...e.budget,maxDurationMs:e.timeoutMs??e.budget?.maxDurationMs??12e4})}function A(e,r){I.observeOutput(()=>e.onDecision?.({...r,estimate:{...r.estimate}}))}function B(e,r){return{...e,mode:"local",reason:r,hardCancellation:!1}}function D(e,r,t){l.assertBudget(t,"maxRows",e.stats.rows),l.assertBudget(t,"maxPages",e.stats.pages),l.assertBudget(t,"maxCells",e.stats.cells),l.assertBudget(t,"maxOutputBytes",e.bytes.byteLength),O.assertPreparedOutputBudget({...r,prepared:{...r.prepared,stats:e.stats}},t)}function J(e,r){const t={...l.DEFAULT_REPORT_RUNTIME_BUDGET,...r.budget},n=O.capturePreparedHandoff(e.prepared,t.maxPreparedBytes,e.signal),o={...e,prepared:n.prepared,pdf:O.snapshotPdfFonts(e.pdf),xlsx:O.snapshotXlsxOptions(e.xlsx)};return{request:o,forward:()=>({...o,prepared:n.forward()})}}function Q(e,r){X(e);const t={...e,thresholds:{...e.thresholds},budget:{...l.DEFAULT_REPORT_RUNTIME_BUDGET,...e.budget}},n=t.timeoutMs??t.budget.maxDurationMs??12e4,o=W.createReportRuntime({reports:{},budget:{...t.budget,maxDurationMs:n}}),s=new Set;let a=!1;const d=t.mode!=="worker"&&t.fallback!=="error";async function v(i,g){const h=Date.now(),b=()=>{const m=n-(Date.now()-h);if(m<=0)throw new l.ReportRuntimeError("timeout",`报表执行超过 ${n}ms`);return m};let p=K(i,t);if(p.reason==="nonserializable-options"&&t.mode==="worker")throw new TypeError("Worker 模式不接受函数选项;请使用本地模式或可序列化配置");if(p.mode==="worker"&&!r){if(!d)throw new M(new Error("未配置 workerFactory"));p=B(p,"worker-unavailable")}const R=J(i,t),u=R.request;if(A(t,p),l.throwIfAborted(i.signal),p.mode==="worker")try{const m=r(b());if(!m.exportPrepared)throw new TypeError("隔离执行器缺少 exportPrepared");const{signal:f,onEvent:c,...w}=u,y=await m.exportPrepared(w,f,c);return l.throwIfAborted(f),D(y,u,t.budget),{...y,execution:p}}catch(m){if(!(m instanceof M)||!d)throw m;l.throwIfAborted(i.signal),p=B(p,"worker-start-failed"),A(t,p)}g&&(u.prepared=W.enforcePrepared(u.prepared,t.budget),O.assertPreparedOutputBudget(u,t.budget));const k=g?await l.controlled(i.signal,b(),m=>g({...u,signal:m})):await l.controlled(i.signal,b(),m=>o.exportPrepared({...R.forward(),signal:m}));return l.throwIfAborted(i.signal),D(k,u,t.budget),{...k,execution:p}}return{async exportPrepared(i,g){if(a)throw new l.ReportRuntimeError("closed","导出执行器已释放");if(l.throwIfAborted(i.signal),s.size>=2)throw new l.ReportRuntimeError("queue-full","同时导出的任务已达 2 个,请等待完成后重试");const h=new AbortController;s.add(h);const b=()=>h.abort(i.signal?.reason);i.signal?.addEventListener("abort",b,{once:!0});try{return await v({...i,signal:h.signal},g)}finally{i.signal?.removeEventListener("abort",b),s.delete(h)}},cancel(){for(const i of s)i.abort()},dispose(){a=!0;for(const i of s)i.abort()}}}function q(e={}){const r=e.workerFactory,t={timeoutMs:e.timeoutMs??e.budget?.maxDurationMs,budget:{...e.budget}};return Q(e,r?n=>_(r,{...t,timeoutMs:n}):void 0)}const V=Object.freeze(Object.defineProperty({__proto__:null,createAutoReportExporter:q},Symbol.toStringTag,{value:"Module"}));exports.ReportWorkerStartError=M;exports.auto=V;exports.createAutoReportExporter=q;exports.createBrowserReportExecutor=_;
1
+ "use strict";const O=require("./prepared-BlNeOjoO.cjs"),C=require("./json-snapshot-DCFEtfFw.cjs"),P=require("./protocol-BU_4sXP0.cjs"),I=require("./diagnostic-collector-wASg6Fzs.cjs"),W=require("./runtime-BRx8Agqr.cjs"),l=require("./sha256-DgZAKXqI.cjs");class M extends Error{constructor(r){super("报表 Worker 无法启动"),this.cause=r,this.name="ReportWorkerStartError"}}let j=0;function F(e){const r=new Error("报表 Worker 任务已取消");return r.name="AbortError",Object.defineProperty(r,"cause",{value:e}),r}function U(e,r){if(!e||typeof e!="object")return;const t=e;return t.protocol===P.REPORT_WORKER_PROTOCOL&&t.id===r?t:void 0}function z(e,r={}){const t=r.timeoutMs??12e4;if(!Number.isFinite(t)||t<=0||t>2147483647)throw new RangeError("Worker timeoutMs 应为正有限数字,且不能超过 2147483647");const n=(o,s,a,d)=>a?.aborted?Promise.reject(F(a.reason)):new Promise((v,i)=>{let g;try{g=e()}catch(f){i(new M(f));return}const h=`mach-report-${Date.now()}-${++j}`;let b=!1,p=()=>{},R;const u=(f,c)=>{if(b)return;b=!0,R&&clearTimeout(R);let w;try{p()}catch(y){w=y}a?.removeEventListener("abort",k),f??=w,Promise.resolve().then(()=>g.terminate()).then(()=>f===void 0?v(c):i(f),y=>i(f??y))},k=()=>u(F(a?.reason)),m=f=>{const c=U(f,h);if(!(!c||b)){if("type"in c&&c.type==="event"){const w="event"in c?c.event:void 0;P.validReportWorkerEvent(w,s)?C.notifyReportTaskEvent(d,w,a):u(new Error("报表 Worker 返回无效阶段事件"));return}c.error&&typeof c.error.name=="string"&&typeof c.error.message=="string"?u(new P.ReportWorkerError(c.error)):P.validReportWorkerResult(c.result,o)&&(o==="prepare"||"format"in c.result&&"format"in s&&c.result.format===s.format)?u(void 0,c.result):u(new Error("报表 Worker 返回无效响应"))}};try{if(p=g.subscribe(m,f=>u(f??new Error("报表 Worker 执行失败"))),b){p();return}if(a?.addEventListener("abort",k,{once:!0}),R=setTimeout(()=>u(new P.ReportWorkerError({name:"ReportRuntimeError",code:"timeout",message:`报表 Worker 执行超过 ${t}ms`})),t),a?.aborted)k();else{const{onEvent:f,signal:c,...w}=s,y=N(w);g.postMessage({protocol:P.REPORT_WORKER_PROTOCOL,id:h,operation:o,input:w,...r.budget?{budget:r.budget}:{}},y)}}catch(f){u(f)}});return{exportPrepared:(o,s,a)=>n("exportPrepared",o,s,a),prepare:(o,s,a)=>n("prepare",o,s,a),export:(o,s,a)=>n("export",o,s,a)}}function N(e){return e.pdf?(e.pdf=O.snapshotPdfFonts(e.pdf),(e.pdf?.customFontFaces?Object.values(e.pdf.customFontFaces):[e.pdf?.customFontBytes]).filter(t=>t instanceof Uint8Array).map(t=>t.buffer)):[]}function _(e,r={}){return z(()=>{const t=e();return{postMessage:(n,o)=>t.postMessage(n,o),terminate:()=>t.terminate(),subscribe:(n,o)=>{const s=d=>n(d.data),a=d=>o(d instanceof ErrorEvent?new Error(d.message):new Error("报表 Worker 消息无法解码"));return t.addEventListener("message",s),t.addEventListener("error",a),t.addEventListener("messageerror",a),()=>{t.removeEventListener("message",s),t.removeEventListener("error",a),t.removeEventListener("messageerror",a)}}}},r)}const $={cells:2e4,pages:20,bytes:2e6};function T(e){return e.cells>=e.limits.cells||e.pages>=e.limits.pages||e.bytes>=e.limits.bytes||e.capped}function x(e){return++e.visits>=1e5&&(e.capped=!0),!T(e)}function E(e){return typeof e=="string"?e.length*2:0}function L(e,r){for(const t of e??[]){if(!x(r))return;for(const n of t.segments){if(!x(r))return;r.bytes+=E(n.text)}}}function S(e,r,t){if(t>32){r.capped=!0;return}if(x(r)){r.bytes+=E(e.text)+E(e.rawText)+E(e.imageData),L(e.richParagraphs,r);for(const n of e.lines??[]){if(!x(r))return;r.bytes+=E(n)}for(const n of e.grid?.cells??[]){if(!x(r))return;for(const o of n){if(!x(r))return;if(o){r.cells++,r.bytes+=E(o.text)+E(o.rawText)+E(o.value),L(o.richParagraphs,r);for(const s of o.children??[]){if(T(r))return;S(s,r,t+1)}}}}}}function H(e,r){if(e.format==="xlsx")for(const t of e.xlsx?.additionalSheets??[]){if(!x(r))return;r.bytes+=E(t?.name);for(const n of t?.rows??[]){if(!x(r))return;for(const o of n??[]){if(!x(r))return;r.cells++,r.bytes+=E(o)}}}}function G(e){const r={...$,...e.thresholds};for(const t of Object.values(r))if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("导出隔离阈值应为正安全整数");return r}function K(e,r){const t=G(r),n=e.pdf?.customFontFaces?Object.values(e.pdf.customFontFaces):[e.pdf?.customFontBytes],o={pages:e.prepared.plan.pages.length,cells:0,bytes:n.reduce((d,v)=>d+(v?.byteLength??0),0),visits:0,capped:!1,limits:t};for(const d of e.prepared.plan.pages){if(T(o))break;for(const v of d.components){if(T(o))break;S(v,o,0)}}H(e,o);let s=T(o)?"worker":"local",a=o.capped?"scan-limit":s==="worker"?"threshold":"small-task";return r.mode==="local"&&(s="local",a="explicit-local"),r.mode==="worker"&&(s="worker",a="explicit-worker"),Object.values(e.xlsx??{}).some(d=>typeof d=="function")&&(s="local",a="nonserializable-options"),{mode:s,reason:a,estimate:{pages:o.pages,cells:o.cells,bytes:o.bytes},hardCancellation:s==="worker"}}function X(e){if(e.mode!==void 0&&!["auto","local","worker"].includes(e.mode))throw new TypeError("无效的导出执行模式");if(e.fallback!==void 0&&!["local","error"].includes(e.fallback))throw new TypeError("无效的导出回退策略");l.validateBudget({...e.budget,maxDurationMs:e.timeoutMs??e.budget?.maxDurationMs??12e4})}function A(e,r){I.observeOutput(()=>e.onDecision?.({...r,estimate:{...r.estimate}}))}function B(e,r){return{...e,mode:"local",reason:r,hardCancellation:!1}}function D(e,r,t){l.assertBudget(t,"maxRows",e.stats.rows),l.assertBudget(t,"maxPages",e.stats.pages),l.assertBudget(t,"maxCells",e.stats.cells),l.assertBudget(t,"maxOutputBytes",e.bytes.byteLength),O.assertPreparedOutputBudget({...r,prepared:{...r.prepared,stats:e.stats}},t)}function J(e,r){const t={...l.DEFAULT_REPORT_RUNTIME_BUDGET,...r.budget},n=O.capturePreparedHandoff(e.prepared,t.maxPreparedBytes,e.signal),o={...e,prepared:n.prepared,pdf:O.snapshotPdfFonts(e.pdf),xlsx:O.snapshotXlsxOptions(e.xlsx)};return{request:o,forward:()=>({...o,prepared:n.forward()})}}function Q(e,r){X(e);const t={...e,thresholds:{...e.thresholds},budget:{...l.DEFAULT_REPORT_RUNTIME_BUDGET,...e.budget}},n=t.timeoutMs??t.budget.maxDurationMs??12e4,o=W.createReportRuntime({reports:{},budget:{...t.budget,maxDurationMs:n}}),s=new Set;let a=!1;const d=t.mode!=="worker"&&t.fallback!=="error";async function v(i,g){const h=Date.now(),b=()=>{const m=n-(Date.now()-h);if(m<=0)throw new l.ReportRuntimeError("timeout",`报表执行超过 ${n}ms`);return m};let p=K(i,t);if(p.reason==="nonserializable-options"&&t.mode==="worker")throw new TypeError("Worker 模式不接受函数选项;请使用本地模式或可序列化配置");if(p.mode==="worker"&&!r){if(!d)throw new M(new Error("未配置 workerFactory"));p=B(p,"worker-unavailable")}const R=J(i,t),u=R.request;if(A(t,p),l.throwIfAborted(i.signal),p.mode==="worker")try{const m=r(b());if(!m.exportPrepared)throw new TypeError("隔离执行器缺少 exportPrepared");const{signal:f,onEvent:c,...w}=u,y=await m.exportPrepared(w,f,c);return l.throwIfAborted(f),D(y,u,t.budget),{...y,execution:p}}catch(m){if(!(m instanceof M)||!d)throw m;l.throwIfAborted(i.signal),p=B(p,"worker-start-failed"),A(t,p)}g&&(u.prepared=W.enforcePrepared(u.prepared,t.budget),O.assertPreparedOutputBudget(u,t.budget));const k=g?await l.controlled(i.signal,b(),m=>g({...u,signal:m})):await l.controlled(i.signal,b(),m=>o.exportPrepared({...R.forward(),signal:m}));return l.throwIfAborted(i.signal),D(k,u,t.budget),{...k,execution:p}}return{async exportPrepared(i,g){if(a)throw new l.ReportRuntimeError("closed","导出执行器已释放");if(l.throwIfAborted(i.signal),s.size>=2)throw new l.ReportRuntimeError("queue-full","同时导出的任务已达 2 个,请等待完成后重试");const h=new AbortController;s.add(h);const b=()=>h.abort(i.signal?.reason);i.signal?.addEventListener("abort",b,{once:!0});try{return await v({...i,signal:h.signal},g)}finally{i.signal?.removeEventListener("abort",b),s.delete(h)}},cancel(){for(const i of s)i.abort()},dispose(){a=!0;for(const i of s)i.abort()}}}function q(e={}){const r=e.workerFactory,t={timeoutMs:e.timeoutMs??e.budget?.maxDurationMs,budget:{...e.budget}};return Q(e,r?n=>_(r,{...t,timeoutMs:n}):void 0)}const V=Object.freeze(Object.defineProperty({__proto__:null,createAutoReportExporter:q},Symbol.toStringTag,{value:"Module"}));exports.ReportWorkerStartError=M;exports.auto=V;exports.createAutoReportExporter=q;exports.createBrowserReportExecutor=_;
@@ -1,4 +1,4 @@
1
- import { y as f, x as E, E as k, u as M, I as $, i as O, A as L, r as C } from "./diagnostic-collector-1sqd7DQP.js";
1
+ import { A as f, z as E, G as k, x as M, N as $, i as O, E as L, r as C } from "./diagnostic-collector-gB07PHy2.js";
2
2
  function X(e, t) {
3
3
  f(t.signal), E(() => t.onDiagnostic?.(e)), f(t.signal);
4
4
  }
@@ -55,24 +55,24 @@ function D(e, t, i, n, s, o, a) {
55
55
  const u = new Set(a).add(e), r = P(e, t);
56
56
  r && o.push({ ...g(e, t, i, n, r), componentPath: s });
57
57
  const d = h(e.style, t);
58
- d && o.push({ ...g(e, t, i, n, { code: "unsupported-style", message: d }), componentPath: s }), w(e, t, i, n, o, s), N(e, t, i, n, s, o, u);
58
+ d && o.push({ ...g(e, t, i, n, { code: "unsupported-style", message: d }), componentPath: s }), w(e, t, i, n, o, s), T(e, t, i, n, s, o, u);
59
59
  }
60
- function R(e, t, i) {
60
+ function N(e, t, i) {
61
61
  if (e.grid) return { code: "nested-components-omitted", message: "XLSX cannot place a nested grid inside a single cell; the nested grid is omitted." };
62
62
  const n = A(e);
63
63
  if (n) return n;
64
64
  if (O(e) && (e.leftMm < 0 || e.topMm < 0 || e.leftMm + e.widthMm > t + 1e-3 || e.topMm + e.heightMm > i + 1e-3)) return { code: "unsupported-style", message: "XLSX cannot clip a child image to a cell; it retains the original image dimensions." };
65
65
  }
66
- function T(e) {
66
+ function R(e) {
67
67
  let t;
68
68
  return (i, n, s, o) => {
69
69
  t ??= new Map(C(e.grid, e.widthMm, e.heightMm).cells.map((r) => [`${r.ri}:${r.ci}`, r]));
70
70
  const a = t.get(`${n}:${s}`), u = 2 * (e.grid?.paddingMm ?? 0.5);
71
- return R(i, (a?.widthMm ?? 0) - u - (o?.indentMm ?? 0), (a?.heightMm ?? 0) - u);
71
+ return N(i, (a?.widthMm ?? 0) - u - (o?.indentMm ?? 0), (a?.heightMm ?? 0) - u);
72
72
  };
73
73
  }
74
- function N(e, t, i, n, s, o, a) {
75
- const u = T(e);
74
+ function T(e, t, i, n, s, o, a) {
75
+ const u = R(e);
76
76
  for (const [r, d] of (e.grid?.cells ?? []).entries()) for (const [c, l] of d.entries()) {
77
77
  l?.dataBar !== void 0 && !L(l.dataBar) && o.push({ ...g(e, t, i, n, { code: "unsupported-style", message: "Invalid resolved data-bar geometry or color; visual data bars require ordered 0–1 ratios and #RRGGBB colors." }), componentPath: [...s, r, c] });
78
78
  const v = h(l?.style, t);
@@ -1 +1 @@
1
- "use strict";const c=require("./diagnostic-collector-D3rlvxm3.cjs");function D(e,t){c.assertOutputActive(t.signal),c.observeOutput(()=>t.onDiagnostic?.(e)),c.assertOutputActive(t.signal)}class M extends Error{constructor(t,i){super(`Output contains ${i?.total??t.length} known fidelity issue(s): ${t[0]?.code??Object.keys(i?.counts??{})[0]??"unknown"}`),this.diagnostics=t,this.diagnosticSummary=i,this.code="output-fidelity",this.name="OutputFidelityError"}}const C=new Set(["text","rect","line","ellipse"]),k=new Set(["image","chart","barcode","qrcode"]);function $(e,t){if(!e.grid){if(c.isImageBackedComponent(e))return(t==="pdf"||t==="xlsx")&&!/^data:image\/(png|jpe?g);base64,/i.test(e.imageData)?{code:"unsupported-image-format",message:`${t.toUpperCase()} accepts PNG or JPEG data URLs; convert this image before exporting.`}:void 0;if(k.has(e.kind))return{code:"missing-image",message:`${e.kind} requires imageData or a renderer adapter before output.`};if(!C.has(e.kind))return{code:"unsupported-component",message:`Unsupported component kind: ${e.kind}.`};if(t==="xlsx"&&e.kind!=="text")return{code:"unsupported-component",message:`XLSX data export omits ${e.kind} geometry.`}}}function p(e,t,i,n,s){const o=Object.getOwnPropertyDescriptor(e,"meta")?.value,a=o&&Object.getOwnPropertyDescriptor(o,"componentExtension")?.value,u=a&&Object.getOwnPropertyDescriptor(a,"id")?.value,r=a&&Object.getOwnPropertyDescriptor(a,"version")?.value,d=typeof u=="string"&&u.length<=128&&typeof r=="string"&&r.length<=64?{id:u,version:r}:void 0;return{...s,severity:"warning",format:t,pageIndex:i,componentIndex:n,kind:e.kind,nid:e.nid,...d?{extension:d}:{}}}function h(e,t){if(!e||t==="dom")return;const i=[];return e.rotateDeg&&i.push("rotateDeg"),e.opacity!==void 0&&e.opacity!==1&&i.push("opacity"),t!=="xlsx"&&e.align==="justify"&&i.push("justify"),t==="xlsx"&&e.letterSpacing&&i.push("letterSpacing"),i.length?`${t} does not preserve these styles: ${i.join(", ")}.`:void 0}function S(e){if(!e)return;const t=["backgroundColor","align","verticalAlign","lineHeight","borderTop","borderRight","borderBottom","borderLeft","borderColor","lineColor","lineWidthPt"].filter(i=>e[i]!==void 0);return t.length?`XLSX rich text does not retain independent run styles: ${t.join(", ")}.`:void 0}function L(e){if(e.kind!=="text")return;const t=S(e.style);if(e.leftMm||e.topMm||t)return{code:"unsupported-style",message:`Nested XLSX text is retained as rich text in component order; absolute child offsets and independent paragraph styles are not retained.${t?` ${t}`:""}`}}function m(e,t,i,n,s,o){const a=u=>{s.push({...p(e,t,i,n,{code:"unsupported-style",message:u}),componentPath:o})};for(const u of e.richParagraphs??[]){t==="xlsx"&&(u.spaceBeforeMm||u.spaceAfterMm||u.indentMm||u.align||u.lineHeight)&&a("XLSX rich text preserves fonts and paragraph newlines; paragraph spacing, indentation and alignment are not retained.");const r=h({align:u.align},t);r&&a(r);for(const d of u.segments){const l=h(d.style,t)??(t==="xlsx"?S(d.style):void 0);l&&a(l)}}}function w(e,t,i,n,s,o,a){if(a.has(e))return;const u=new Set(a).add(e),r=$(e,t);r&&o.push({...p(e,t,i,n,r),componentPath:s});const d=h(e.style,t);d&&o.push({...p(e,t,i,n,{code:"unsupported-style",message:d}),componentPath:s}),m(e,t,i,n,o,s),B(e,t,i,n,s,o,u)}function X(e,t,i){if(e.grid)return{code:"nested-components-omitted",message:"XLSX cannot place a nested grid inside a single cell; the nested grid is omitted."};const n=L(e);if(n)return n;if(c.isImageBackedComponent(e)&&(e.leftMm<0||e.topMm<0||e.leftMm+e.widthMm>t+.001||e.topMm+e.heightMm>i+.001))return{code:"unsupported-style",message:"XLSX cannot clip a child image to a cell; it retains the original image dimensions."}}function j(e){let t;return(i,n,s,o)=>{t??=new Map(c.resolveGridLayout(e.grid,e.widthMm,e.heightMm).cells.map(r=>[`${r.ri}:${r.ci}`,r]));const a=t.get(`${n}:${s}`),u=2*(e.grid?.paddingMm??.5);return X(i,(a?.widthMm??0)-u-(o?.indentMm??0),(a?.heightMm??0)-u)}}function B(e,t,i,n,s,o,a){const u=j(e);for(const[r,d]of(e.grid?.cells??[]).entries())for(const[l,g]of d.entries()){g?.dataBar!==void 0&&!c.validDataBar(g.dataBar)&&o.push({...p(e,t,i,n,{code:"unsupported-style",message:"Invalid resolved data-bar geometry or color; visual data bars require ordered 0–1 ratios and #RRGGBB colors."}),componentPath:[...s,r,l]});const v=h(g?.style,t);v&&o.push({...p(e,t,i,n,{code:"unsupported-style",message:v}),componentPath:[...s,r,l]}),g?.richParagraphs?.length&&m({...e,richParagraphs:g.richParagraphs},t,i,n,o,[...s,r,l]);for(const[E,f]of(g?.children??[]).entries()){const O=[...s,r,l,E];if(t==="xlsx"){const b=u(f,r,l,g);if(b&&o.push({...p(f,t,i,n,b),componentPath:O}),f.grid)continue}w(f,t,i,n,O,o,a)}}}function y(e,t,i){c.assertBoundedRenderTree(e),e.pages.forEach((n,s)=>n.components.forEach((o,a)=>w(o,t,s,a,[],i,new Set)))}function A(e,t){const i=[];return y(e,t,i),i}function G(e,t,i=c.DEFAULT_DIAGNOSTIC_LIMIT){const n=c.createDiagnosticCollector(i);return y(e,t,n),n.snapshot()}function x(e,t,i,n){c.assertOutputActive(i.signal);const s=c.createDiagnosticCollector(i.diagnosticLimit);n?.diagnosticSummary?s.merge(n.diagnosticSummary):n?.diagnostics.forEach(r=>s.push(r));const o=s.entries.length,a=i.diagnosticLimit===void 0?void 0:new Set(s.entries);if(y(e,t,{push:r=>{c.assertOutputActive(i.signal),s.push(r)}}),(a?s.entries.filter(r=>!a.has(r)):s.entries.slice(o)).forEach(r=>D(r,i)),i.fidelity==="strict"&&s.total)throw new M(s.entries,i.diagnosticLimit===void 0?void 0:s.snapshot());return s}function P(e,t,i){return x(e,t,i).entries}exports.OutputFidelityError=M;exports.collectOutputDiagnostics=x;exports.inspectOutputCapabilities=A;exports.inspectOutputCapabilitiesSummary=G;exports.notifyOutputDiagnostic=D;exports.reportOutputDiagnostics=P;
1
+ "use strict";const c=require("./diagnostic-collector-wASg6Fzs.cjs");function D(e,t){c.assertOutputActive(t.signal),c.observeOutput(()=>t.onDiagnostic?.(e)),c.assertOutputActive(t.signal)}class M extends Error{constructor(t,i){super(`Output contains ${i?.total??t.length} known fidelity issue(s): ${t[0]?.code??Object.keys(i?.counts??{})[0]??"unknown"}`),this.diagnostics=t,this.diagnosticSummary=i,this.code="output-fidelity",this.name="OutputFidelityError"}}const C=new Set(["text","rect","line","ellipse"]),k=new Set(["image","chart","barcode","qrcode"]);function $(e,t){if(!e.grid){if(c.isImageBackedComponent(e))return(t==="pdf"||t==="xlsx")&&!/^data:image\/(png|jpe?g);base64,/i.test(e.imageData)?{code:"unsupported-image-format",message:`${t.toUpperCase()} accepts PNG or JPEG data URLs; convert this image before exporting.`}:void 0;if(k.has(e.kind))return{code:"missing-image",message:`${e.kind} requires imageData or a renderer adapter before output.`};if(!C.has(e.kind))return{code:"unsupported-component",message:`Unsupported component kind: ${e.kind}.`};if(t==="xlsx"&&e.kind!=="text")return{code:"unsupported-component",message:`XLSX data export omits ${e.kind} geometry.`}}}function p(e,t,i,n,s){const o=Object.getOwnPropertyDescriptor(e,"meta")?.value,a=o&&Object.getOwnPropertyDescriptor(o,"componentExtension")?.value,u=a&&Object.getOwnPropertyDescriptor(a,"id")?.value,r=a&&Object.getOwnPropertyDescriptor(a,"version")?.value,d=typeof u=="string"&&u.length<=128&&typeof r=="string"&&r.length<=64?{id:u,version:r}:void 0;return{...s,severity:"warning",format:t,pageIndex:i,componentIndex:n,kind:e.kind,nid:e.nid,...d?{extension:d}:{}}}function h(e,t){if(!e||t==="dom")return;const i=[];return e.rotateDeg&&i.push("rotateDeg"),e.opacity!==void 0&&e.opacity!==1&&i.push("opacity"),t!=="xlsx"&&e.align==="justify"&&i.push("justify"),t==="xlsx"&&e.letterSpacing&&i.push("letterSpacing"),i.length?`${t} does not preserve these styles: ${i.join(", ")}.`:void 0}function S(e){if(!e)return;const t=["backgroundColor","align","verticalAlign","lineHeight","borderTop","borderRight","borderBottom","borderLeft","borderColor","lineColor","lineWidthPt"].filter(i=>e[i]!==void 0);return t.length?`XLSX rich text does not retain independent run styles: ${t.join(", ")}.`:void 0}function L(e){if(e.kind!=="text")return;const t=S(e.style);if(e.leftMm||e.topMm||t)return{code:"unsupported-style",message:`Nested XLSX text is retained as rich text in component order; absolute child offsets and independent paragraph styles are not retained.${t?` ${t}`:""}`}}function m(e,t,i,n,s,o){const a=u=>{s.push({...p(e,t,i,n,{code:"unsupported-style",message:u}),componentPath:o})};for(const u of e.richParagraphs??[]){t==="xlsx"&&(u.spaceBeforeMm||u.spaceAfterMm||u.indentMm||u.align||u.lineHeight)&&a("XLSX rich text preserves fonts and paragraph newlines; paragraph spacing, indentation and alignment are not retained.");const r=h({align:u.align},t);r&&a(r);for(const d of u.segments){const l=h(d.style,t)??(t==="xlsx"?S(d.style):void 0);l&&a(l)}}}function w(e,t,i,n,s,o,a){if(a.has(e))return;const u=new Set(a).add(e),r=$(e,t);r&&o.push({...p(e,t,i,n,r),componentPath:s});const d=h(e.style,t);d&&o.push({...p(e,t,i,n,{code:"unsupported-style",message:d}),componentPath:s}),m(e,t,i,n,o,s),B(e,t,i,n,s,o,u)}function X(e,t,i){if(e.grid)return{code:"nested-components-omitted",message:"XLSX cannot place a nested grid inside a single cell; the nested grid is omitted."};const n=L(e);if(n)return n;if(c.isImageBackedComponent(e)&&(e.leftMm<0||e.topMm<0||e.leftMm+e.widthMm>t+.001||e.topMm+e.heightMm>i+.001))return{code:"unsupported-style",message:"XLSX cannot clip a child image to a cell; it retains the original image dimensions."}}function j(e){let t;return(i,n,s,o)=>{t??=new Map(c.resolveGridLayout(e.grid,e.widthMm,e.heightMm).cells.map(r=>[`${r.ri}:${r.ci}`,r]));const a=t.get(`${n}:${s}`),u=2*(e.grid?.paddingMm??.5);return X(i,(a?.widthMm??0)-u-(o?.indentMm??0),(a?.heightMm??0)-u)}}function B(e,t,i,n,s,o,a){const u=j(e);for(const[r,d]of(e.grid?.cells??[]).entries())for(const[l,g]of d.entries()){g?.dataBar!==void 0&&!c.validDataBar(g.dataBar)&&o.push({...p(e,t,i,n,{code:"unsupported-style",message:"Invalid resolved data-bar geometry or color; visual data bars require ordered 0–1 ratios and #RRGGBB colors."}),componentPath:[...s,r,l]});const v=h(g?.style,t);v&&o.push({...p(e,t,i,n,{code:"unsupported-style",message:v}),componentPath:[...s,r,l]}),g?.richParagraphs?.length&&m({...e,richParagraphs:g.richParagraphs},t,i,n,o,[...s,r,l]);for(const[E,f]of(g?.children??[]).entries()){const O=[...s,r,l,E];if(t==="xlsx"){const b=u(f,r,l,g);if(b&&o.push({...p(f,t,i,n,b),componentPath:O}),f.grid)continue}w(f,t,i,n,O,o,a)}}}function y(e,t,i){c.assertBoundedRenderTree(e),e.pages.forEach((n,s)=>n.components.forEach((o,a)=>w(o,t,s,a,[],i,new Set)))}function A(e,t){const i=[];return y(e,t,i),i}function G(e,t,i=c.DEFAULT_DIAGNOSTIC_LIMIT){const n=c.createDiagnosticCollector(i);return y(e,t,n),n.snapshot()}function x(e,t,i,n){c.assertOutputActive(i.signal);const s=c.createDiagnosticCollector(i.diagnosticLimit);n?.diagnosticSummary?s.merge(n.diagnosticSummary):n?.diagnostics.forEach(r=>s.push(r));const o=s.entries.length,a=i.diagnosticLimit===void 0?void 0:new Set(s.entries);if(y(e,t,{push:r=>{c.assertOutputActive(i.signal),s.push(r)}}),(a?s.entries.filter(r=>!a.has(r)):s.entries.slice(o)).forEach(r=>D(r,i)),i.fidelity==="strict"&&s.total)throw new M(s.entries,i.diagnosticLimit===void 0?void 0:s.snapshot());return s}function P(e,t,i){return x(e,t,i).entries}exports.OutputFidelityError=M;exports.collectOutputDiagnostics=x;exports.inspectOutputCapabilities=A;exports.inspectOutputCapabilitiesSummary=G;exports.notifyOutputDiagnostic=D;exports.reportOutputDiagnostics=P;
@@ -0,0 +1,37 @@
1
+ function s(e) {
2
+ if (e?.aborted) throw e.reason ?? new DOMException("The operation was aborted.", "AbortError");
3
+ }
4
+ function u(e) {
5
+ try {
6
+ Promise.resolve(e()).catch(() => {
7
+ });
8
+ } catch {
9
+ }
10
+ }
11
+ function b(e, t) {
12
+ const o = Promise.resolve(e);
13
+ return t?.aborted ? (o.catch(() => {
14
+ }), Promise.reject(t.reason ?? new DOMException("The operation was aborted.", "AbortError"))) : t ? new Promise((c, i) => {
15
+ const r = () => t.removeEventListener("abort", n), n = () => {
16
+ r(), i(t.reason ?? new DOMException("The operation was aborted.", "AbortError"));
17
+ };
18
+ t.addEventListener("abort", n, { once: !0 }), o.then((a) => {
19
+ r(), c(a);
20
+ }, (a) => {
21
+ r(), i(a);
22
+ }), t.aborted && n();
23
+ }) : o;
24
+ }
25
+ function p(e, t = !1) {
26
+ return t || typeof e == "boolean" || e instanceof Date || typeof e == "number" && Number.isFinite(e) ? "center" : "left";
27
+ }
28
+ function f(e) {
29
+ return e !== void 0 && /[0#?]/.test(e.replace(/"[^"]*"|\\.|\[[^\]]*\]/g, ""));
30
+ }
31
+ export {
32
+ p as a,
33
+ s as b,
34
+ f as h,
35
+ u as o,
36
+ b as w
37
+ };
@@ -0,0 +1 @@
1
+ "use strict";function u(t){if(t?.aborted)throw t.reason??new DOMException("The operation was aborted.","AbortError")}function s(t){try{Promise.resolve(t()).catch(()=>{})}catch{}}function b(t,e){const r=Promise.resolve(t);return e?.aborted?(r.catch(()=>{}),Promise.reject(e.reason??new DOMException("The operation was aborted.","AbortError"))):e?new Promise((a,c)=>{const o=()=>e.removeEventListener("abort",n),n=()=>{o(),c(e.reason??new DOMException("The operation was aborted.","AbortError"))};e.addEventListener("abort",n,{once:!0}),r.then(i=>{o(),a(i)},i=>{o(),c(i)}),e.aborted&&n()}):r}function p(t,e=!1){return e||typeof t=="boolean"||t instanceof Date||typeof t=="number"&&Number.isFinite(t)?"center":"left"}function m(t){return t!==void 0&&/[0#?]/.test(t.replace(/"[^"]*"|\\.|\[[^\]]*\]/g,""))}exports.assertOutputActive=u;exports.automaticCellAlignment=p;exports.hasNumericCellFormat=m;exports.observeOutput=s;exports.waitForOutput=b;
@@ -1,4 +1,4 @@
1
- import { A as n } from "./diagnostic-collector-1sqd7DQP.js";
1
+ import { E as n } from "./diagnostic-collector-gB07PHy2.js";
2
2
  function i(t, r, d, o) {
3
3
  if (!n(t) || t.start === t.end) return;
4
4
  const a = Math.max(0, r - 2 * o);
@@ -1 +1 @@
1
- "use strict";const d=require("./diagnostic-collector-D3rlvxm3.cjs");function i(t,r,c,o){if(!d.validDataBar(t)||t.start===t.end)return;const a=Math.max(0,r-2*o);return{x:o+a*t.start,y:o,width:a*(t.end-t.start),height:Math.max(0,c-2*o),color:t.color}}exports.dataBarBox=i;
1
+ "use strict";const d=require("./diagnostic-collector-wASg6Fzs.cjs");function i(t,r,c,o){if(!d.validDataBar(t)||t.start===t.end)return;const a=Math.max(0,r-2*o);return{x:o+a*t.start,y:o,width:a*(t.end-t.start),height:Math.max(0,c-2*o),color:t.color}}exports.dataBarBox=i;