@agile-team/mach-report 2.15.0 → 2.16.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.
- package/README.md +14 -9
- package/dist/{ExcelBindingWizard-Bs43BGNp.cjs → ExcelBindingWizard-CP6h2x1f.cjs} +1 -1
- package/dist/{ExcelBindingWizard-BKH1nGNS.js → ExcelBindingWizard-HhB3hAJE.js} +3 -3
- package/dist/{ParamEditor-Da4akw6V.cjs → ParamEditor-CUQLgoxa.cjs} +1 -1
- package/dist/{ParamEditor-DoAhzJsm.js → ParamEditor-OKesP_nO.js} +1 -1
- package/dist/{ReportBatchPanel-wP9m9Pj1.cjs → ReportBatchPanel-cZCAMAwH.cjs} +1 -1
- package/dist/{ReportBatchPanel-BMf6boMA.js → ReportBatchPanel-ruxcbfY6.js} +3 -3
- package/dist/ReportPreview-BcDKCLiK.js +4834 -0
- package/dist/ReportPreview-Bk9nLfO9.cjs +6 -0
- package/dist/{ReportTemplateLibrary-Sxr3eD0J.cjs → ReportTemplateLibrary-BDlNT8JN.cjs} +1 -1
- package/dist/{ReportTemplateLibrary-C9wutIiT.js → ReportTemplateLibrary-DcwrH-63.js} +1 -1
- package/dist/{RuleEditor-XhGHK8DE.cjs → RuleEditor-BX5S8RSF.cjs} +1 -1
- package/dist/{RuleEditor-C_Clasvd.js → RuleEditor-CGl9XY2s.js} +2 -2
- package/dist/{TemplateOutlinePanel-JTSR53vJ.cjs → TemplateOutlinePanel-CGrT5DFN.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-D6Bkny59.js → TemplateOutlinePanel-SXCjaPKR.js} +1 -1
- package/dist/{TemplateReusePanel-Kx35S0Ql.cjs → TemplateReusePanel-6Z3wRFz8.cjs} +1 -1
- package/dist/{TemplateReusePanel-rVuK1kTz.js → TemplateReusePanel-lHLOS9Wn.js} +2 -2
- package/dist/{TemplateReviewPanel-B0ar9_zf.js → TemplateReviewPanel-CJ9PLc48.js} +1 -1
- package/dist/{TemplateReviewPanel-Dn6X9UmY.cjs → TemplateReviewPanel-Dpk7sLcF.cjs} +1 -1
- package/dist/analytics.d.cts +2 -0
- package/dist/analytics.d.ts +2 -0
- package/dist/artifact-integrity.json +99 -91
- package/dist/{assets-DEaz4qsp.js → assets-CqIbfbTr.js} +24 -22
- package/dist/assets-e4YSke8n.cjs +1 -0
- package/dist/auto-YR7a4BtF.js +240 -0
- package/dist/auto-uVBjX1j5.cjs +1 -0
- package/dist/{batch-BfZHN1do.js → batch-WzDIXJAt.js} +1 -1
- package/dist/{batch-CLpELXBl.cjs → batch-z6Aw5GEY.cjs} +1 -1
- package/dist/capabilities-DDwXr_cA.js +103 -0
- package/dist/capabilities-DNLyZdNw.cjs +1 -0
- package/dist/codes.d.cts +2 -0
- package/dist/codes.d.ts +2 -0
- package/dist/component-tree-Ca6YYfHq.js +61 -0
- package/dist/component-tree-DkGLEfZC.cjs +1 -0
- package/dist/config-Dg_o8e7m.cjs +1 -0
- package/dist/{config-BVsJXSqS.js → config-XQ4qrQ7Q.js} +66 -64
- package/dist/designer-BfQSahxq.js +5163 -0
- package/dist/designer-CPPdeM5_.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +53 -0
- package/dist/designer.d.ts +53 -0
- package/dist/designer.js +1 -1
- package/dist/diagnostic-notification-B9K9We3h.cjs +1 -0
- package/dist/diagnostic-notification-qGAYZdkB.js +7 -0
- package/dist/drill-CsdjgkRM.cjs +1 -0
- package/dist/{drill-ByJviLXS.js → drill-DIGsZfyB.js} +11 -11
- package/dist/encoding-BOGq4qYL.js +21 -0
- package/dist/encoding-BYF9ZTl9.cjs +1 -0
- package/dist/{font-loader-Q3bQjmrI.js → font-loader-CzI1GuBc.js} +1 -1
- package/dist/{font-loader-B_UkxpzC.cjs → font-loader-EKLzOJxf.cjs} +1 -1
- package/dist/index.cjs +7 -8
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +865 -834
- package/dist/json-snapshot-D6ioHth9.js +1702 -0
- package/dist/json-snapshot-DknkjvxP.cjs +2 -0
- package/dist/{pdf-CvvrjPQg.cjs → pdf-ByVCb1i6.cjs} +48 -50
- package/dist/{pdf-BwNyeGpt.js → pdf-DJ5S6ukC.js} +2737 -2749
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +2 -0
- package/dist/pdf.d.ts +2 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-Ca_XZG3l.js → plugin-C2j5_mhx.js} +1 -1
- package/dist/{plugin-DHO7X8z2.cjs → plugin-Dr39GBRG.cjs} +1 -1
- package/dist/prepared-DdrjLC7L.cjs +1 -0
- package/dist/prepared-DqtpvRTn.js +87 -0
- package/dist/progress-BXzlVbIp.js +29 -0
- package/dist/progress-DJBd9Rb9.cjs +1 -0
- package/dist/{progress-D-OTpEav.js → progress-Hc2vxoCs.js} +2 -2
- package/dist/protocol-BzwMP4Vw.cjs +1 -0
- package/dist/protocol-kt4Iy6-3.js +90 -0
- package/dist/{record-bindings-Do_b3h4V.js → record-bindings-CZWBJ1fU.js} +9 -10
- package/dist/record-bindings-DUX1VMlR.cjs +1 -0
- package/dist/{region-binding-workflow-BMhK_TjP.js → region-binding-workflow-CWNvIjkV.js} +1 -1
- package/dist/{region-binding-workflow-DIYJdCUr.cjs → region-binding-workflow-CqSMxQ4p.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -0
- package/dist/report-encoding-worker.d.ts +1 -0
- package/dist/report-encoding-worker.js +2 -0
- package/dist/rich-text-layout-ALlMoYOG.cjs +3 -0
- package/dist/rich-text-layout-Ct5WrY1g.js +102 -0
- package/dist/runtime-BjKBI530.js +168 -0
- package/dist/runtime-CBFEPKEs.cjs +1 -0
- package/dist/sbom.cdx.json +2 -2
- package/dist/server/node.d.cts +86 -1
- package/dist/server/node.d.ts +86 -1
- package/dist/server-node.cjs +5 -1
- package/dist/server-node.js +4558 -473
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +8 -1
- package/dist/server.d.ts +8 -1
- package/dist/server.js +634 -792
- package/dist/sha256-BshdOkCC.cjs +1 -0
- package/dist/sha256-DTG-Gq8i.js +157 -0
- package/dist/style-67OqfNed.js +73 -0
- package/dist/style-C22Pbv3T.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/{template-catalog-j2B1MJlL.js → template-catalog-BtR2JmCL.js} +9 -9
- package/dist/{template-catalog-FJE_c9Qe.cjs → template-catalog-C2NLdrwB.cjs} +1 -1
- package/dist/{template-fragments-DcKeiylI.cjs → template-fragments-BVsbxs4a.cjs} +1 -1
- package/dist/{template-fragments-BGbQLGlV.js → template-fragments-By0aZC1D.js} +2 -2
- package/dist/template-registry-C62vpv4a.cjs +1 -0
- package/dist/{template-registry-BtaKPELV.js → template-registry-Cw3vRTX2.js} +389 -321
- package/dist/{textwrap-DE1kgcJB.js → textwrap-BEIg2w8y.js} +1 -1
- package/dist/textwrap-BI-yJ6Wt.cjs +4 -0
- package/dist/vue/async.d.cts +66 -0
- package/dist/vue/async.d.ts +66 -0
- package/dist/vue/index.d.cts +89 -1
- package/dist/vue/index.d.ts +89 -1
- 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-BvToI-Fd.js → workbook-session-BeSO8PFB.js} +153 -140
- package/dist/{workbook-session-Bjv1YCRK.cjs → workbook-session-Cbts-22R.cjs} +12 -12
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +84 -1
- package/dist/worker.d.ts +84 -1
- package/dist/worker.js +12 -157
- package/dist/xlsx-node.cjs +33 -33
- package/dist/xlsx-node.js +1282 -1289
- package/dist/xlsx.cjs +4 -3
- package/dist/xlsx.d.cts +2 -0
- package/dist/xlsx.d.ts +2 -0
- package/dist/xlsx.js +297 -279
- package/package.json +6 -3
- package/dist/ReportPreview-ChV19HBp.js +0 -4619
- package/dist/ReportPreview-DbLvvOUT.cjs +0 -6
- package/dist/assets-B9ImAi6_.cjs +0 -1
- package/dist/batch-BaP6pWDE.cjs +0 -1
- package/dist/batch-CGyt-b2W.js +0 -273
- package/dist/capabilities-CAh2Nrue.cjs +0 -1
- package/dist/capabilities-DskCHs3V.js +0 -69
- package/dist/config-D10us76d.cjs +0 -1
- package/dist/data-explanation-B8MZRYVS.js +0 -16
- package/dist/data-explanation-DE55G30w.cjs +0 -1
- package/dist/defaults-DXhiM1ZD.js +0 -10
- package/dist/defaults-xhmcLLrf.cjs +0 -1
- package/dist/designer-2bDlcNXQ.js +0 -5136
- package/dist/designer-BT7XCdbW.cjs +0 -2
- package/dist/drill-DYTxuL3A.cjs +0 -1
- package/dist/grid-strokes-Cr7DwUux.cjs +0 -1
- package/dist/grid-strokes-DyyG1q_o.js +0 -53
- package/dist/json-snapshot-DFb2eWkf.js +0 -1416
- package/dist/json-snapshot-WWSGlaHG.cjs +0 -2
- package/dist/prepared-CFy9B75C.cjs +0 -1
- package/dist/prepared-ajM-H-9B.js +0 -69
- package/dist/record-bindings-By_UKZ2g.cjs +0 -1
- package/dist/render-plan-7xpGrCEl.cjs +0 -1
- package/dist/render-plan-Ck6koX9L.js +0 -13
- package/dist/sha256-ArEYjaTI.cjs +0 -1
- package/dist/sha256-DPEuJ3nh.js +0 -155
- package/dist/style-CQ1PK8ZB.js +0 -67
- package/dist/style-UgIJSA1F.cjs +0 -1
- package/dist/template-registry-Co1zPq5e.cjs +0 -1
- package/dist/textwrap-CWHyzkBH.cjs +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const R=Object.freeze({maxRows:1e5,maxPages:1e4,maxCells:2e6,maxOutputBytes:1e8,maxPreparedBytes:64e6,maxDurationMs:12e4});class f extends Error{constructor(t,r,n){super(r),this.code=t,this.path=n,this.name="ReportRuntimeError"}}function l(e){if(!e?.aborted)return;if(e.reason instanceof f)throw e.reason;const t=new Error("报表执行已取消");throw t.name="AbortError",Object.defineProperty(t,"cause",{value:e.reason}),t}function D(e,t,r){if(!Number.isFinite(r)||r<0)throw new f("budget",`${t} 的执行统计无效`,`$.budget.${t}`);const n=e[t];if(n!==void 0&&r>n)throw new f("budget",`${t} 超出预算 ${n}(实际 ${r})`,`$.budget.${t}`)}function p(e){for(const[t,r]of Object.entries(e)){if(r!==void 0&&(!Number.isFinite(r)||r<=0))throw new f("budget",`${t} 应为正有限数字`,`$.budget.${t}`);if(t!=="maxDurationMs"&&r!==void 0&&!Number.isSafeInteger(r))throw new f("budget",`${t} 应为正安全整数`,`$.budget.${t}`);if(t==="maxDurationMs"&&r!==void 0&&r>2147483647)throw new f("budget","maxDurationMs 不能超过 2147483647",`$.budget.${t}`)}}async function T(e,t,r){const n=new AbortController,o=()=>n.abort(e?.reason);e?.addEventListener("abort",o,{once:!0}),e?.aborted&&o();const s=Date.now(),i=t===void 0?void 0:setTimeout(()=>n.abort(new f("timeout",`报表执行超过 ${t}ms`)),t);let a;try{l(n.signal);const d=new Promise((u,m)=>{a=()=>{try{l(n.signal)}catch(w){m(w)}},n.signal.addEventListener("abort",a,{once:!0})}),b=await Promise.race([r(n.signal),d]);if(l(n.signal),t!==void 0&&Date.now()-s>t)throw new f("timeout",`报表执行超过 ${t}ms`);return b}finally{i!==void 0&&clearTimeout(i),a&&n.signal.removeEventListener("abort",a),e?.removeEventListener("abort",o)}}const L=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),c=(e,t)=>e>>>t|e<<32-t;function h(e,t,r){const n=new DataView(e.buffer,e.byteOffset+t,64);for(let o=0;o<16;o++)r[o]=n.getUint32(o*4);for(let o=16;o<64;o++){const s=r[o-15],i=r[o-2],a=c(s,7)^c(s,18)^s>>>3,d=c(i,17)^c(i,19)^i>>>10;r[o]=r[o-16]+a+r[o-7]+d}}function v(e,t){let r=e[0],n=e[1],o=e[2],s=e[3],i=e[4],a=e[5],d=e[6],b=e[7];for(let u=0;u<64;u++){const m=c(i,6)^c(i,11)^c(i,25),w=i&a^~i&d,g=b+m+w+L[u]+t[u]>>>0,$=c(r,2)^c(r,13)^c(r,22),A=r&n^r&o^n&o,U=$+A>>>0;b=d,d=a,a=i,i=s+g>>>0,s=o,o=n,n=r,r=g+U>>>0}e[0]=e[0]+r,e[1]=e[1]+n,e[2]=e[2]+o,e[3]=e[3]+s,e[4]=e[4]+i,e[5]=e[5]+a,e[6]=e[6]+d,e[7]=e[7]+b}function y(e){const t=new Uint8Array(Math.ceil((e.byteLength+9)/64)*64);t.set(e),t[e.byteLength]=128;const r=new DataView(t.buffer);return r.setUint32(t.length-8,Math.floor(e.byteLength/536870912)),r.setUint32(t.length-4,e.byteLength*8>>>0),t}const x=()=>new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),E=e=>Array.from(e,t=>t.toString(16).padStart(8,"0")).join("");function B(e){const t=y(e),r=x(),n=new Uint32Array(64);for(let o=0;o<t.length;o+=64)h(t,o,n),v(r,n);return E(r)}async function O(e){const t=y(e),r=x(),n=new Uint32Array(64);for(let o=0;o<t.length;o+=64)o>0&&o%262144===0&&await new Promise(s=>setTimeout(s,0)),h(t,o,n),v(r,n);return E(r)}exports.DEFAULT_REPORT_RUNTIME_BUDGET=R;exports.ReportRuntimeError=f;exports.assertBudget=D;exports.controlled=T;exports.portableSha256Hex=B;exports.portableSha256HexAsync=O;exports.throwIfAborted=l;exports.validateBudget=p;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
const p = Object.freeze({ maxRows: 1e5, maxPages: 1e4, maxCells: 2e6, maxOutputBytes: 1e8, maxPreparedBytes: 64e6, maxDurationMs: 12e4 });
|
|
2
|
+
class d extends Error {
|
|
3
|
+
constructor(t, r, o) {
|
|
4
|
+
super(r), this.code = t, this.path = o, this.name = "ReportRuntimeError";
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
function w(e) {
|
|
8
|
+
if (!e?.aborted) return;
|
|
9
|
+
if (e.reason instanceof d) throw e.reason;
|
|
10
|
+
const t = new Error("报表执行已取消");
|
|
11
|
+
throw t.name = "AbortError", Object.defineProperty(t, "cause", { value: e.reason }), t;
|
|
12
|
+
}
|
|
13
|
+
function R(e, t, r) {
|
|
14
|
+
if (!Number.isFinite(r) || r < 0) throw new d("budget", `${t} 的执行统计无效`, `$.budget.${t}`);
|
|
15
|
+
const o = e[t];
|
|
16
|
+
if (o !== void 0 && r > o) throw new d("budget", `${t} 超出预算 ${o}(实际 ${r})`, `$.budget.${t}`);
|
|
17
|
+
}
|
|
18
|
+
function L(e) {
|
|
19
|
+
for (const [t, r] of Object.entries(e)) {
|
|
20
|
+
if (r !== void 0 && (!Number.isFinite(r) || r <= 0)) throw new d("budget", `${t} 应为正有限数字`, `$.budget.${t}`);
|
|
21
|
+
if (t !== "maxDurationMs" && r !== void 0 && !Number.isSafeInteger(r)) throw new d("budget", `${t} 应为正安全整数`, `$.budget.${t}`);
|
|
22
|
+
if (t === "maxDurationMs" && r !== void 0 && r > 2147483647) throw new d("budget", "maxDurationMs 不能超过 2147483647", `$.budget.${t}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async function O(e, t, r) {
|
|
26
|
+
const o = new AbortController(), n = () => o.abort(e?.reason);
|
|
27
|
+
e?.addEventListener("abort", n, { once: !0 }), e?.aborted && n();
|
|
28
|
+
const s = Date.now(), i = t === void 0 ? void 0 : setTimeout(() => o.abort(new d("timeout", `报表执行超过 ${t}ms`)), t);
|
|
29
|
+
let a;
|
|
30
|
+
try {
|
|
31
|
+
w(o.signal);
|
|
32
|
+
const f = new Promise((u, m) => {
|
|
33
|
+
a = () => {
|
|
34
|
+
try {
|
|
35
|
+
w(o.signal);
|
|
36
|
+
} catch (l) {
|
|
37
|
+
m(l);
|
|
38
|
+
}
|
|
39
|
+
}, o.signal.addEventListener("abort", a, { once: !0 });
|
|
40
|
+
}), b = await Promise.race([r(o.signal), f]);
|
|
41
|
+
if (w(o.signal), t !== void 0 && Date.now() - s > t) throw new d("timeout", `报表执行超过 ${t}ms`);
|
|
42
|
+
return b;
|
|
43
|
+
} finally {
|
|
44
|
+
i !== void 0 && clearTimeout(i), a && o.signal.removeEventListener("abort", a), e?.removeEventListener("abort", n);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const U = new Uint32Array([
|
|
48
|
+
1116352408,
|
|
49
|
+
1899447441,
|
|
50
|
+
3049323471,
|
|
51
|
+
3921009573,
|
|
52
|
+
961987163,
|
|
53
|
+
1508970993,
|
|
54
|
+
2453635748,
|
|
55
|
+
2870763221,
|
|
56
|
+
3624381080,
|
|
57
|
+
310598401,
|
|
58
|
+
607225278,
|
|
59
|
+
1426881987,
|
|
60
|
+
1925078388,
|
|
61
|
+
2162078206,
|
|
62
|
+
2614888103,
|
|
63
|
+
3248222580,
|
|
64
|
+
3835390401,
|
|
65
|
+
4022224774,
|
|
66
|
+
264347078,
|
|
67
|
+
604807628,
|
|
68
|
+
770255983,
|
|
69
|
+
1249150122,
|
|
70
|
+
1555081692,
|
|
71
|
+
1996064986,
|
|
72
|
+
2554220882,
|
|
73
|
+
2821834349,
|
|
74
|
+
2952996808,
|
|
75
|
+
3210313671,
|
|
76
|
+
3336571891,
|
|
77
|
+
3584528711,
|
|
78
|
+
113926993,
|
|
79
|
+
338241895,
|
|
80
|
+
666307205,
|
|
81
|
+
773529912,
|
|
82
|
+
1294757372,
|
|
83
|
+
1396182291,
|
|
84
|
+
1695183700,
|
|
85
|
+
1986661051,
|
|
86
|
+
2177026350,
|
|
87
|
+
2456956037,
|
|
88
|
+
2730485921,
|
|
89
|
+
2820302411,
|
|
90
|
+
3259730800,
|
|
91
|
+
3345764771,
|
|
92
|
+
3516065817,
|
|
93
|
+
3600352804,
|
|
94
|
+
4094571909,
|
|
95
|
+
275423344,
|
|
96
|
+
430227734,
|
|
97
|
+
506948616,
|
|
98
|
+
659060556,
|
|
99
|
+
883997877,
|
|
100
|
+
958139571,
|
|
101
|
+
1322822218,
|
|
102
|
+
1537002063,
|
|
103
|
+
1747873779,
|
|
104
|
+
1955562222,
|
|
105
|
+
2024104815,
|
|
106
|
+
2227730452,
|
|
107
|
+
2361852424,
|
|
108
|
+
2428436474,
|
|
109
|
+
2756734187,
|
|
110
|
+
3204031479,
|
|
111
|
+
3329325298
|
|
112
|
+
]), c = (e, t) => e >>> t | e << 32 - t;
|
|
113
|
+
function h(e, t, r) {
|
|
114
|
+
const o = new DataView(e.buffer, e.byteOffset + t, 64);
|
|
115
|
+
for (let n = 0; n < 16; n++) r[n] = o.getUint32(n * 4);
|
|
116
|
+
for (let n = 16; n < 64; n++) {
|
|
117
|
+
const s = r[n - 15], i = r[n - 2], a = c(s, 7) ^ c(s, 18) ^ s >>> 3, f = c(i, 17) ^ c(i, 19) ^ i >>> 10;
|
|
118
|
+
r[n] = r[n - 16] + a + r[n - 7] + f;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function v(e, t) {
|
|
122
|
+
let r = e[0], o = e[1], n = e[2], s = e[3], i = e[4], a = e[5], f = e[6], b = e[7];
|
|
123
|
+
for (let u = 0; u < 64; u++) {
|
|
124
|
+
const m = c(i, 6) ^ c(i, 11) ^ c(i, 25), l = i & a ^ ~i & f, g = b + m + l + U[u] + t[u] >>> 0, A = c(r, 2) ^ c(r, 13) ^ c(r, 22), E = r & o ^ r & n ^ o & n, D = A + E >>> 0;
|
|
125
|
+
b = f, f = a, a = i, i = s + g >>> 0, s = n, n = o, o = r, r = g + D >>> 0;
|
|
126
|
+
}
|
|
127
|
+
e[0] = e[0] + r, e[1] = e[1] + o, e[2] = e[2] + n, e[3] = e[3] + s, e[4] = e[4] + i, e[5] = e[5] + a, e[6] = e[6] + f, e[7] = e[7] + b;
|
|
128
|
+
}
|
|
129
|
+
function y(e) {
|
|
130
|
+
const t = new Uint8Array(Math.ceil((e.byteLength + 9) / 64) * 64);
|
|
131
|
+
t.set(e), t[e.byteLength] = 128;
|
|
132
|
+
const r = new DataView(t.buffer);
|
|
133
|
+
return r.setUint32(t.length - 8, Math.floor(e.byteLength / 536870912)), r.setUint32(t.length - 4, e.byteLength * 8 >>> 0), t;
|
|
134
|
+
}
|
|
135
|
+
const $ = () => new Uint32Array([1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]), x = (e) => Array.from(e, (t) => t.toString(16).padStart(8, "0")).join("");
|
|
136
|
+
function P(e) {
|
|
137
|
+
const t = y(e), r = $(), o = new Uint32Array(64);
|
|
138
|
+
for (let n = 0; n < t.length; n += 64)
|
|
139
|
+
h(t, n, o), v(r, o);
|
|
140
|
+
return x(r);
|
|
141
|
+
}
|
|
142
|
+
async function T(e) {
|
|
143
|
+
const t = y(e), r = $(), o = new Uint32Array(64);
|
|
144
|
+
for (let n = 0; n < t.length; n += 64)
|
|
145
|
+
n > 0 && n % 262144 === 0 && await new Promise((s) => setTimeout(s, 0)), h(t, n, o), v(r, o);
|
|
146
|
+
return x(r);
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
p as D,
|
|
150
|
+
d as R,
|
|
151
|
+
T as a,
|
|
152
|
+
R as b,
|
|
153
|
+
O as c,
|
|
154
|
+
P as p,
|
|
155
|
+
w as t,
|
|
156
|
+
L as v
|
|
157
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const c = 1.35, S = 10.5, u = '"Microsoft YaHei", sans-serif', P = 0.75, s = "#333333", f = "#000000", _ = "1.0.0-mach", T = 25.4, h = 96;
|
|
2
|
+
function i(t = 96) {
|
|
3
|
+
return t / 25.4;
|
|
4
|
+
}
|
|
5
|
+
function l(t, n = 96) {
|
|
6
|
+
return (t || 0) * i(n);
|
|
7
|
+
}
|
|
8
|
+
function m(t, n = 96) {
|
|
9
|
+
return t / i(n);
|
|
10
|
+
}
|
|
11
|
+
function a(t, n = 96) {
|
|
12
|
+
return t * n / 72;
|
|
13
|
+
}
|
|
14
|
+
function E(t, n) {
|
|
15
|
+
const o = 10 ** n;
|
|
16
|
+
return Math.round(t * o) / o;
|
|
17
|
+
}
|
|
18
|
+
const M = {
|
|
19
|
+
a3: { widthMm: 297, heightMm: 420 },
|
|
20
|
+
a4: { widthMm: 210, heightMm: 297 },
|
|
21
|
+
a5: { widthMm: 148, heightMm: 210 },
|
|
22
|
+
b4: { widthMm: 250, heightMm: 353 },
|
|
23
|
+
b5: { widthMm: 176, heightMm: 250 }
|
|
24
|
+
};
|
|
25
|
+
function C(t, n = 96, o = 10.5) {
|
|
26
|
+
if (t?.fontSizePx != null)
|
|
27
|
+
return { fontSizePt: t.fontSizePx * 72 / n, fontSizePx: t.fontSizePx };
|
|
28
|
+
const e = t?.fontSize ?? o;
|
|
29
|
+
return { fontSizePt: e, fontSizePx: a(e, n) };
|
|
30
|
+
}
|
|
31
|
+
function x(t, n = s) {
|
|
32
|
+
return {
|
|
33
|
+
color: t?.borderColor ?? t?.lineColor ?? n,
|
|
34
|
+
widthPt: t?.lineWidthPt ?? 0.75
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function z(t, n = f) {
|
|
38
|
+
return t?.color ?? n;
|
|
39
|
+
}
|
|
40
|
+
function D(t) {
|
|
41
|
+
return t?.lineHeight ?? 1.35;
|
|
42
|
+
}
|
|
43
|
+
function L(t) {
|
|
44
|
+
const n = t?.borderTop !== !1, o = t?.borderRight !== !1, e = t?.borderBottom !== !1, r = t?.borderLeft !== !1;
|
|
45
|
+
return { top: n, right: o, bottom: e, left: r, inner: n || o || e || r };
|
|
46
|
+
}
|
|
47
|
+
function d(t, n) {
|
|
48
|
+
const o = { ...t, ...n };
|
|
49
|
+
return n?.fontSize != null && n.fontSizePx == null && delete o.fontSizePx, n?.fontSizePx != null && n.fontSize == null && delete o.fontSize, o;
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
h as C,
|
|
53
|
+
u as D,
|
|
54
|
+
c as L,
|
|
55
|
+
T as M,
|
|
56
|
+
M as P,
|
|
57
|
+
_ as S,
|
|
58
|
+
E as a,
|
|
59
|
+
D as b,
|
|
60
|
+
f as c,
|
|
61
|
+
x as d,
|
|
62
|
+
L as e,
|
|
63
|
+
d as f,
|
|
64
|
+
z as g,
|
|
65
|
+
P as h,
|
|
66
|
+
S as i,
|
|
67
|
+
s as j,
|
|
68
|
+
i as k,
|
|
69
|
+
m as l,
|
|
70
|
+
l as m,
|
|
71
|
+
a as p,
|
|
72
|
+
C as r
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const E='"Microsoft YaHei", sans-serif';const i="#333333",T="#000000",P="1.0.0-mach";function r(o=96){return o/25.4}function f(o,t=96){return(o||0)*r(t)}function c(o,t=96){return o/r(t)}function S(o,t=96){return o*t/72}function s(o,t){const n=10**t;return Math.round(o*n)/n}const u={a3:{widthMm:297,heightMm:420},a4:{widthMm:210,heightMm:297},a5:{widthMm:148,heightMm:210},b4:{widthMm:250,heightMm:353},b5:{widthMm:176,heightMm:250}};function l(o,t=96,n=10.5){if(o?.fontSizePx!=null)return{fontSizePt:o.fontSizePx*72/t,fontSizePx:o.fontSizePx};const e=o?.fontSize??n;return{fontSizePt:e,fontSizePx:S(e,t)}}function m(o,t=i){return{color:o?.borderColor??o?.lineColor??t,widthPt:o?.lineWidthPt??.75}}function M(o,t=T){return o?.color??t}function L(o){return o?.lineHeight??1.35}function F(o){const t=o?.borderTop!==!1,n=o?.borderRight!==!1,e=o?.borderBottom!==!1,_=o?.borderLeft!==!1;return{top:t,right:n,bottom:e,left:_,inner:t||n||e||_}}function C(o,t){const n={...o,...t};return t?.fontSize!=null&&t.fontSizePx==null&&delete n.fontSizePx,t?.fontSizePx!=null&&t.fontSize==null&&delete n.fontSize,n}exports.CSS_DPI=96;exports.DEFAULT_BORDER_PT=.75;exports.DEFAULT_FONT_FAMILY=E;exports.DEFAULT_FONT_PT=10.5;exports.DEFAULT_STROKE_COLOR=i;exports.DEFAULT_TEXT_COLOR=T;exports.LINE_HEIGHT=1.35;exports.MM_PER_INCH=25.4;exports.PAPER_SIZES=u;exports.SCHEMA_VERSION_MACH=P;exports.mergeComponentStyles=C;exports.mmToPx=f;exports.mmToPxFactor=r;exports.ptToPx=S;exports.pxToMm=c;exports.resolveBoxBorders=F;exports.resolveFontSize=l;exports.resolveLineHeight=L;exports.resolveStroke=m;exports.resolveTextColor=M;exports.round=s;
|