@agile-team/mach-report 2.25.0 → 2.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/{ExcelBindingWizard-NQ_v396s.js → ExcelBindingWizard-bs3F4dD8.js} +3 -3
- package/dist/{ExcelBindingWizard-BgJG-T6k.cjs → ExcelBindingWizard-jSdjBtWw.cjs} +1 -1
- package/dist/{ParamEditor-Z-3yodp5.js → ParamEditor-B7YVD28E.js} +1 -1
- package/dist/{ParamEditor-DEP38mBp.cjs → ParamEditor-CGfaweYX.cjs} +1 -1
- package/dist/{ReportBatchPanel-D33LjMrA.cjs → ReportBatchPanel-BRJt0TXp.cjs} +1 -1
- package/dist/{ReportBatchPanel-DG8FV-5X.js → ReportBatchPanel-BTKHtLTW.js} +1 -1
- package/dist/{ReportLabelStudio-Bz-xAayk.cjs → ReportLabelStudio-BvK_WBke.cjs} +1 -1
- package/dist/{ReportLabelStudio-BZp23_hA.js → ReportLabelStudio-CZwqyO3t.js} +2 -2
- package/dist/ReportPreview-D1ZC5kzz.js +7317 -0
- package/dist/ReportPreview-DAU-V3Ov.cjs +6 -0
- package/dist/{ReportTemplateLibrary-DpSGgvFa.js → ReportTemplateLibrary-C7sB0Jay.js} +1 -1
- package/dist/{ReportTemplateLibrary-uG1gENaW.cjs → ReportTemplateLibrary-ClwxhnC0.cjs} +1 -1
- package/dist/{RuleEditor-BONALh1Q.js → RuleEditor-CsDGFaWz.js} +3 -3
- package/dist/{RuleEditor-bLXiRcxL.cjs → RuleEditor-D-OdaGdR.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-JGBKeF3e.js → TemplateOutlinePanel-CXOT7d1r.js} +1 -1
- package/dist/{TemplateOutlinePanel-C3nfHuaR.cjs → TemplateOutlinePanel-DAqR9zQi.cjs} +1 -1
- package/dist/{TemplateReusePanel-DXQUO6nQ.js → TemplateReusePanel-Dcfx3Hba.js} +2 -2
- package/dist/{TemplateReusePanel-BKhgp6kg.cjs → TemplateReusePanel-ygIi-Ajz.cjs} +1 -1
- package/dist/{TemplateReviewPanel-DhL7Hapy.js → TemplateReviewPanel-COU8FqPq.js} +1 -1
- package/dist/{TemplateReviewPanel-5RWFUUEf.cjs → TemplateReviewPanel-DyGULVxr.cjs} +1 -1
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.js +2 -2
- package/dist/artifact-integrity.json +71 -71
- package/dist/{auto-D-eDZa_V.cjs → auto-DjmvmcX-.cjs} +1 -1
- package/dist/{auto-umW_ozwr.js → auto-j7mr8Kvc.js} +82 -82
- package/dist/{designer-CCyj5WYS.js → designer-B597ZdC0.js} +4 -4
- package/dist/{designer-Cj7fn4Hh.cjs → designer-DFIdv_n7.cjs} +1 -1
- package/dist/designer.cjs +1 -1
- package/dist/designer.js +1 -1
- package/dist/{encoding-CEkBtlUP.js → encoding-BWEMdzFG.js} +2 -2
- package/dist/{encoding-Cipno7dq.cjs → encoding-DVea2qIR.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/{json-snapshot-x0JpllWL.js → json-snapshot-DdzALe8q.js} +995 -911
- package/dist/json-snapshot-L_gJ7KRS.cjs +2 -0
- package/dist/matrix-DUYPRL7t.cjs +1 -0
- package/dist/{matrix-C6e_r_vp.js → matrix-b6T291xo.js} +120 -104
- package/dist/{plugin-B_k23hut.cjs → plugin-D5BRHlne.cjs} +1 -1
- package/dist/{plugin-CttO46hc.js → plugin-FWhTnjr0.js} +1 -1
- package/dist/{prefill-BvkuwooY.cjs → prefill-DZymomY6.cjs} +1 -1
- package/dist/{prefill-BkF9Fw_p.js → prefill-m01IM1hl.js} +1 -1
- package/dist/{prepared-CSywIEAZ.cjs → prepared-BHu8bIdj.cjs} +1 -1
- package/dist/{prepared-Cyuh61fJ.js → prepared-DO5pe6Ed.js} +1 -1
- package/dist/{protocol-DwtxjXzO.js → protocol-CZddmu2n.js} +2 -2
- package/dist/{protocol-BwbJNVZl.cjs → protocol-CymmHWmL.cjs} +1 -1
- package/dist/{region-binding-workflow-D8I4QWRh.js → region-binding-workflow-EYxvUYJ-.js} +1 -1
- package/dist/{region-binding-workflow-COD8nISZ.cjs → region-binding-workflow-NdkMSFCh.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/{runtime-BE30icyB.js → runtime-D8AlfJ6S.js} +83 -76
- package/dist/runtime-ywf3oLBR.cjs +1 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server-node.cjs +5 -5
- package/dist/server-node.js +1880 -1773
- package/dist/server.cjs +1 -1
- package/dist/server.js +6 -6
- package/dist/{template-catalog-D_gl93va.js → template-catalog-DLu814zA.js} +2 -2
- package/dist/{template-catalog-C0riwrx7.cjs → template-catalog-Lil5Ryt-.cjs} +1 -1
- package/dist/{template-fragments-D94ZZmPc.js → template-fragments-BDxdCuMD.js} +1 -1
- package/dist/{template-fragments-CgzPdFKB.cjs → template-fragments-DbKdxI1z.cjs} +1 -1
- package/dist/template-registry-B-AK1oam.cjs +1 -0
- package/dist/{template-registry-DZOtRY7t.js → template-registry-DeVgwEZj.js} +143 -142
- package/dist/vue/index.d.cts +2 -1
- package/dist/vue/index.d.ts +2 -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 +127 -126
- package/dist/{workbook-session-SzfILBJJ.js → workbook-session-B6hRjTyX.js} +1 -1
- package/dist/{workbook-session-DR2j6Hxm.cjs → workbook-session-BclW7KKH.cjs} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +1 -1
- package/dist/xlsx.js +3 -3
- package/package.json +1 -1
- package/dist/ReportPreview-CilFAS9U.js +0 -7170
- package/dist/ReportPreview-dOOzPts2.cjs +0 -6
- package/dist/json-snapshot-DQdkA_At.cjs +0 -2
- package/dist/matrix-B8QWbsGM.cjs +0 -1
- package/dist/runtime-DRSuy_SQ.cjs +0 -1
- package/dist/template-registry-BMScUmM4.cjs +0 -1
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import { s as S, d as j, c as U, a as H } from "./prepared-
|
|
2
|
-
import { H as I } from "./json-snapshot-
|
|
3
|
-
import { b as W, R as z, v as $, c as N } from "./protocol-
|
|
1
|
+
import { s as S, d as j, c as U, a as H } from "./prepared-DO5pe6Ed.js";
|
|
2
|
+
import { H as I } from "./json-snapshot-DdzALe8q.js";
|
|
3
|
+
import { b as W, R as z, v as $, c as N } from "./protocol-CZddmu2n.js";
|
|
4
4
|
import { z as G } from "./diagnostic-collector-gB07PHy2.js";
|
|
5
|
-
import { c as K, e as X } from "./runtime-
|
|
6
|
-
import { D as C, R as O, t as R, v as
|
|
5
|
+
import { c as K, e as X, a as J } from "./runtime-D8AlfJ6S.js";
|
|
6
|
+
import { D as C, R as O, t as R, v as Q, 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";
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
let
|
|
12
|
+
let V = 0;
|
|
13
13
|
function F(e) {
|
|
14
14
|
const r = new Error("报表 Worker 任务已取消");
|
|
15
15
|
return r.name = "AbortError", Object.defineProperty(r, "cause", { value: e }), r;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function Y(e, r) {
|
|
18
18
|
if (!e || typeof e != "object") return;
|
|
19
19
|
const t = e;
|
|
20
20
|
return t.protocol === z && t.id === r ? t : void 0;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Z(e, r = {}) {
|
|
23
23
|
const t = r.timeoutMs ?? 12e4;
|
|
24
24
|
if (!Number.isFinite(t) || t <= 0 || t > 2147483647) throw new RangeError("Worker timeoutMs 应为正有限数字,且不能超过 2147483647");
|
|
25
|
-
const
|
|
26
|
-
let
|
|
25
|
+
const a = (o, s, n, u) => n?.aborted ? Promise.reject(F(n.reason)) : new Promise((v, i) => {
|
|
26
|
+
let p;
|
|
27
27
|
try {
|
|
28
|
-
|
|
28
|
+
p = e();
|
|
29
29
|
} catch (f) {
|
|
30
30
|
i(new T(f));
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
const E = `mach-report-${Date.now()}-${++
|
|
34
|
-
let
|
|
35
|
-
},
|
|
33
|
+
const E = `mach-report-${Date.now()}-${++V}`;
|
|
34
|
+
let b = !1, d = () => {
|
|
35
|
+
}, k;
|
|
36
36
|
const l = (f, c) => {
|
|
37
|
-
if (
|
|
38
|
-
|
|
37
|
+
if (b) return;
|
|
38
|
+
b = !0, k && clearTimeout(k);
|
|
39
39
|
let g;
|
|
40
40
|
try {
|
|
41
41
|
d();
|
|
42
42
|
} catch (x) {
|
|
43
43
|
g = x;
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
n?.removeEventListener("abort", y), f ??= g, Promise.resolve().then(() => p.terminate()).then(
|
|
46
46
|
() => f === void 0 ? v(c) : i(f),
|
|
47
47
|
(x) => i(f ?? x)
|
|
48
48
|
);
|
|
49
|
-
},
|
|
50
|
-
const c =
|
|
51
|
-
if (!(!c ||
|
|
49
|
+
}, y = () => l(F(n?.reason)), m = (f) => {
|
|
50
|
+
const c = Y(f, E);
|
|
51
|
+
if (!(!c || b)) {
|
|
52
52
|
if ("type" in c && c.type === "event") {
|
|
53
53
|
const g = "event" in c ? c.event : void 0;
|
|
54
|
-
$(g, s) ? I(u, g,
|
|
54
|
+
$(g, s) ? I(u, g, n) : l(new Error("报表 Worker 返回无效阶段事件"));
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
c.error && typeof c.error.name == "string" && typeof c.error.message == "string" ? l(new W(c.error)) : N(c.result, o) && (o === "prepare" || "format" in c.result && "format" in s && c.result.format === s.format) ? l(void 0, c.result) : l(new Error("报表 Worker 返回无效响应"));
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
try {
|
|
61
|
-
if (d =
|
|
61
|
+
if (d = p.subscribe(m, (f) => l(f ?? new Error("报表 Worker 执行失败"))), b) {
|
|
62
62
|
d();
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
if (
|
|
65
|
+
if (n?.addEventListener("abort", y, { once: !0 }), k = setTimeout(() => l(new W({ name: "ReportRuntimeError", code: "timeout", message: `报表 Worker 执行超过 ${t}ms` })), t), n?.aborted) y();
|
|
66
66
|
else {
|
|
67
|
-
const { onEvent: f, signal: c, ...g } = s, x =
|
|
68
|
-
|
|
67
|
+
const { onEvent: f, signal: c, ...g } = s, x = ee(g);
|
|
68
|
+
p.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);
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
|
-
return { exportPrepared: (o, s,
|
|
74
|
+
return { exportPrepared: (o, s, n) => a("exportPrepared", o, s, n), prepare: (o, s, n) => a("prepare", o, s, n), export: (o, s, n) => a("export", o, s, n) };
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function ee(e) {
|
|
77
77
|
return e.pdf ? (e.pdf = S(e.pdf), (e.pdf?.customFontFaces ? Object.values(e.pdf.customFontFaces) : [e.pdf?.customFontBytes]).filter((t) => t instanceof Uint8Array).map((t) => t.buffer)) : [];
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
return
|
|
79
|
+
function re(e, r = {}) {
|
|
80
|
+
return Z(() => {
|
|
81
81
|
const t = e();
|
|
82
82
|
return {
|
|
83
|
-
postMessage: (
|
|
83
|
+
postMessage: (a, o) => t.postMessage(a, o),
|
|
84
84
|
terminate: () => t.terminate(),
|
|
85
|
-
subscribe: (
|
|
86
|
-
const s = (u) =>
|
|
87
|
-
return t.addEventListener("message", s), t.addEventListener("error",
|
|
88
|
-
t.removeEventListener("message", s), t.removeEventListener("error",
|
|
85
|
+
subscribe: (a, o) => {
|
|
86
|
+
const s = (u) => a(u.data), n = (u) => o(u instanceof ErrorEvent ? new Error(u.message) : new Error("报表 Worker 消息无法解码"));
|
|
87
|
+
return t.addEventListener("message", s), t.addEventListener("error", n), t.addEventListener("messageerror", n), () => {
|
|
88
|
+
t.removeEventListener("message", s), t.removeEventListener("error", n), t.removeEventListener("messageerror", n);
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
92
|
}, r);
|
|
93
93
|
}
|
|
94
|
-
const
|
|
94
|
+
const te = { cells: 2e4, pages: 20, bytes: 2e6 };
|
|
95
95
|
function P(e) {
|
|
96
96
|
return e.cells >= e.limits.cells || e.pages >= e.limits.pages || e.bytes >= e.limits.bytes || e.capped;
|
|
97
97
|
}
|
|
@@ -104,9 +104,9 @@ function w(e) {
|
|
|
104
104
|
function L(e, r) {
|
|
105
105
|
for (const t of e ?? []) {
|
|
106
106
|
if (!h(r)) return;
|
|
107
|
-
for (const
|
|
107
|
+
for (const a of t.segments) {
|
|
108
108
|
if (!h(r)) return;
|
|
109
|
-
r.bytes += w(
|
|
109
|
+
r.bytes += w(a.text);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
@@ -117,13 +117,13 @@ function q(e, r, t) {
|
|
|
117
117
|
}
|
|
118
118
|
if (h(r)) {
|
|
119
119
|
r.bytes += w(e.text) + w(e.rawText) + w(e.imageData), L(e.richParagraphs, r);
|
|
120
|
-
for (const
|
|
120
|
+
for (const a of e.lines ?? []) {
|
|
121
121
|
if (!h(r)) return;
|
|
122
|
-
r.bytes += w(
|
|
122
|
+
r.bytes += w(a);
|
|
123
123
|
}
|
|
124
|
-
for (const
|
|
124
|
+
for (const a of e.grid?.cells ?? []) {
|
|
125
125
|
if (!h(r)) return;
|
|
126
|
-
for (const o of
|
|
126
|
+
for (const o of a) {
|
|
127
127
|
if (!h(r)) return;
|
|
128
128
|
if (o) {
|
|
129
129
|
r.cells++, r.bytes += w(o.text) + w(o.rawText) + w(o.value), L(o.richParagraphs, r);
|
|
@@ -136,27 +136,27 @@ function q(e, r, t) {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function oe(e, r) {
|
|
140
140
|
if (e.format === "xlsx")
|
|
141
141
|
for (const t of e.xlsx?.additionalSheets ?? []) {
|
|
142
142
|
if (!h(r)) return;
|
|
143
143
|
r.bytes += w(t?.name);
|
|
144
|
-
for (const
|
|
144
|
+
for (const a of t?.rows ?? []) {
|
|
145
145
|
if (!h(r)) return;
|
|
146
|
-
for (const o of
|
|
146
|
+
for (const o of a ?? []) {
|
|
147
147
|
if (!h(r)) return;
|
|
148
148
|
r.cells++, r.bytes += w(o);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
const r = { ...
|
|
153
|
+
function se(e) {
|
|
154
|
+
const r = { ...te, ...e.thresholds };
|
|
155
155
|
for (const t of Object.values(r)) if (!Number.isSafeInteger(t) || t <= 0) throw new RangeError("导出隔离阈值应为正安全整数");
|
|
156
156
|
return r;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
const t =
|
|
158
|
+
function ae(e, r) {
|
|
159
|
+
const t = se(r), a = e.pdf?.customFontFaces ? Object.values(e.pdf.customFontFaces) : [e.pdf?.customFontBytes], o = { pages: e.prepared.plan.pages.length, cells: 0, bytes: a.reduce((u, v) => u + (v?.byteLength ?? 0), 0), visits: 0, capped: !1, limits: t };
|
|
160
160
|
for (const u of e.prepared.plan.pages) {
|
|
161
161
|
if (P(o)) break;
|
|
162
162
|
for (const v of u.components) {
|
|
@@ -164,14 +164,14 @@ function se(e, r) {
|
|
|
164
164
|
q(v, o, 0);
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
|
|
168
|
-
let s = P(o) ? "worker" : "local",
|
|
169
|
-
return r.mode === "local" && (s = "local",
|
|
167
|
+
oe(e, o);
|
|
168
|
+
let s = P(o) ? "worker" : "local", n = o.capped ? "scan-limit" : s === "worker" ? "threshold" : "small-task";
|
|
169
|
+
return r.mode === "local" && (s = "local", n = "explicit-local"), r.mode === "worker" && (s = "worker", n = "explicit-worker"), Object.values(e.xlsx ?? {}).some((u) => typeof u == "function") && (s = "local", n = "nonserializable-options"), { mode: s, reason: n, estimate: { pages: o.pages, cells: o.cells, bytes: o.bytes }, hardCancellation: s === "worker" };
|
|
170
170
|
}
|
|
171
171
|
function ne(e) {
|
|
172
172
|
if (e.mode !== void 0 && !["auto", "local", "worker"].includes(e.mode)) throw new TypeError("无效的导出执行模式");
|
|
173
173
|
if (e.fallback !== void 0 && !["local", "error"].includes(e.fallback)) throw new TypeError("无效的导出回退策略");
|
|
174
|
-
|
|
174
|
+
Q({ ...e.budget, maxDurationMs: e.timeoutMs ?? e.budget?.maxDurationMs ?? 12e4 });
|
|
175
175
|
}
|
|
176
176
|
function _(e, r) {
|
|
177
177
|
G(() => e.onDecision?.({ ...r, estimate: { ...r.estimate } }));
|
|
@@ -182,31 +182,31 @@ function A(e, r) {
|
|
|
182
182
|
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
|
-
function ae(e, r) {
|
|
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
|
-
return { request: o, forward: () => ({ ...o, prepared: n.forward() }) };
|
|
188
|
-
}
|
|
189
185
|
function ie(e, r) {
|
|
186
|
+
const t = { ...C, ...r.budget }, a = U(e.prepared, t.maxPreparedBytes, e.signal), o = { ...e, prepared: a.prepared, pdf: S(e.pdf), xlsx: H(e.xlsx) };
|
|
187
|
+
return { request: o, forward: () => ({ ...o, prepared: a.forward() }) };
|
|
188
|
+
}
|
|
189
|
+
function ce(e, r) {
|
|
190
190
|
ne(e);
|
|
191
|
-
const t = { ...e, thresholds: { ...e.thresholds }, budget: { ...C, ...e.budget } },
|
|
192
|
-
let
|
|
191
|
+
const t = { ...e, thresholds: { ...e.thresholds }, budget: { ...C, ...e.budget } }, a = t.timeoutMs ?? t.budget.maxDurationMs ?? 12e4, o = K({ reports: {}, budget: { ...t.budget, maxDurationMs: a } }), s = /* @__PURE__ */ new Set();
|
|
192
|
+
let n = !1;
|
|
193
193
|
const u = t.mode !== "worker" && t.fallback !== "error";
|
|
194
|
-
async function v(i,
|
|
195
|
-
const E = Date.now(),
|
|
196
|
-
const m =
|
|
197
|
-
if (m <= 0) throw new O("timeout", `报表执行超过 ${
|
|
194
|
+
async function v(i, p) {
|
|
195
|
+
const E = Date.now(), b = () => {
|
|
196
|
+
const m = a - (Date.now() - E);
|
|
197
|
+
if (m <= 0) throw new O("timeout", `报表执行超过 ${a}ms`);
|
|
198
198
|
return m;
|
|
199
199
|
};
|
|
200
|
-
let d =
|
|
200
|
+
let d = ae(i, t);
|
|
201
201
|
if (d.reason === "nonserializable-options" && t.mode === "worker") throw new TypeError("Worker 模式不接受函数选项;请使用本地模式或可序列化配置");
|
|
202
202
|
if (d.mode === "worker" && !r) {
|
|
203
203
|
if (!u) throw new T(new Error("未配置 workerFactory"));
|
|
204
204
|
d = A(d, "worker-unavailable");
|
|
205
205
|
}
|
|
206
|
-
const
|
|
206
|
+
const k = ie(i, t), l = k.request;
|
|
207
207
|
if (_(t, d), R(i.signal), d.mode === "worker")
|
|
208
208
|
try {
|
|
209
|
-
const m = r(
|
|
209
|
+
const m = r(b());
|
|
210
210
|
if (!m.exportPrepared) throw new TypeError("隔离执行器缺少 exportPrepared");
|
|
211
211
|
const { signal: f, onEvent: c, ...g } = l, x = await m.exportPrepared(g, f, c);
|
|
212
212
|
return R(f), B(x, l, t.budget), { ...x, execution: d };
|
|
@@ -214,44 +214,44 @@ function ie(e, r) {
|
|
|
214
214
|
if (!(m instanceof T) || !u) throw m;
|
|
215
215
|
R(i.signal), d = A(d, "worker-start-failed"), _(t, d);
|
|
216
216
|
}
|
|
217
|
-
|
|
218
|
-
const
|
|
219
|
-
return R(i.signal), B(
|
|
217
|
+
p && (l.prepared = X(l.prepared, t.budget), j(l, t.budget));
|
|
218
|
+
const y = p ? await D(i.signal, b(), (m) => p({ ...l, signal: m })) : await D(i.signal, b(), (m) => o.exportPrepared({ ...k.forward(), signal: m }));
|
|
219
|
+
return R(i.signal), p && J(y, l.format), B(y, l, t.budget), { ...y, execution: d };
|
|
220
220
|
}
|
|
221
221
|
return {
|
|
222
|
-
async exportPrepared(i,
|
|
223
|
-
if (
|
|
222
|
+
async exportPrepared(i, p) {
|
|
223
|
+
if (n) throw new O("closed", "导出执行器已释放");
|
|
224
224
|
if (R(i.signal), s.size >= 2) throw new O("queue-full", "同时导出的任务已达 2 个,请等待完成后重试");
|
|
225
225
|
const E = new AbortController();
|
|
226
226
|
s.add(E);
|
|
227
|
-
const
|
|
228
|
-
i.signal?.addEventListener("abort",
|
|
227
|
+
const b = () => E.abort(i.signal?.reason);
|
|
228
|
+
i.signal?.addEventListener("abort", b, { once: !0 });
|
|
229
229
|
try {
|
|
230
|
-
return await v({ ...i, signal: E.signal },
|
|
230
|
+
return await v({ ...i, signal: E.signal }, p);
|
|
231
231
|
} finally {
|
|
232
|
-
i.signal?.removeEventListener("abort",
|
|
232
|
+
i.signal?.removeEventListener("abort", b), s.delete(E);
|
|
233
233
|
}
|
|
234
234
|
},
|
|
235
235
|
cancel() {
|
|
236
236
|
for (const i of s) i.abort();
|
|
237
237
|
},
|
|
238
238
|
dispose() {
|
|
239
|
-
|
|
239
|
+
n = !0;
|
|
240
240
|
for (const i of s) i.abort();
|
|
241
241
|
}
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function le(e = {}) {
|
|
245
245
|
const r = e.workerFactory, t = { timeoutMs: e.timeoutMs ?? e.budget?.maxDurationMs, budget: { ...e.budget } };
|
|
246
|
-
return
|
|
246
|
+
return ce(e, r ? (a) => re(r, { ...t, timeoutMs: a }) : void 0);
|
|
247
247
|
}
|
|
248
|
-
const
|
|
248
|
+
const ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
249
249
|
__proto__: null,
|
|
250
|
-
createAutoReportExporter:
|
|
250
|
+
createAutoReportExporter: le
|
|
251
251
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
252
252
|
export {
|
|
253
253
|
T as R,
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
254
|
+
re as a,
|
|
255
|
+
ge as b,
|
|
256
|
+
le as c
|
|
257
257
|
};
|
|
@@ -5624,9 +5624,9 @@ const Ou = ["aria-label", "aria-busy"], Vu = { class: "mr-designer-bar" }, ju =
|
|
|
5624
5624
|
emits: ["update:modelValue", "saved", "excel-bound", "update:mode"],
|
|
5625
5625
|
setup(e, { expose: l, emit: a }) {
|
|
5626
5626
|
const i = Se(
|
|
5627
|
-
() => import("./ExcelBindingWizard-
|
|
5628
|
-
), n = Se(() => import("./ParamEditor-
|
|
5629
|
-
() => import("./TemplateReviewPanel-
|
|
5627
|
+
() => import("./ExcelBindingWizard-bs3F4dD8.js")
|
|
5628
|
+
), n = Se(() => import("./ParamEditor-B7YVD28E.js")), s = Se(() => import("./RuleEditor-CsDGFaWz.js")), r = Se(() => import("./TemplateOutlinePanel-CXOT7d1r.js")), u = Se(() => import("./TemplateReusePanel-Dcfx3Hba.js")), c = Se(
|
|
5629
|
+
() => import("./TemplateReviewPanel-COU8FqPq.js")
|
|
5630
5630
|
), w = e, M = nn(() => w.preview?.theme), $ = a, y = Hu(w, (X, I) => {
|
|
5631
5631
|
$(X === "saved" ? "saved" : "update:modelValue", I);
|
|
5632
5632
|
}), {
|
|
@@ -7556,7 +7556,7 @@ function of(e) {
|
|
|
7556
7556
|
}
|
|
7557
7557
|
return { operating: l, busy: i, error: a, run: u, guardChanges: c, apply: w, dispose: r };
|
|
7558
7558
|
}
|
|
7559
|
-
const sf = Se(() => import("./TemplateReviewPanel-
|
|
7559
|
+
const sf = Se(() => import("./TemplateReviewPanel-COU8FqPq.js")), rf = Se(() => import("./ExcelBindingWizard-bs3F4dD8.js")), df = Se(() => import("./RuleEditor-CsDGFaWz.js")), uf = Se(() => import("./ParamEditor-B7YVD28E.js")), cf = Se(() => import("./ReportBatchPanel-BTKHtLTW.js")), mf = Se(() => import("./ReportTemplateLibrary-C7sB0Jay.js")), vf = Se(() => import("./TemplateOutlinePanel-CXOT7d1r.js")), ff = Se(() => import("./TemplateReusePanel-Dcfx3Hba.js")), pf = Se(() => import("./ReportLabelStudio-CZwqyO3t.js"));
|
|
7560
7560
|
export {
|
|
7561
7561
|
Qv as A,
|
|
7562
7562
|
eu as C,
|