@agile-team/mach-report 2.23.1 → 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.
- package/README.md +10 -4
- package/dist/{ExcelBindingWizard-BrTmdo7f.cjs → ExcelBindingWizard-BgJG-T6k.cjs} +1 -1
- package/dist/{ExcelBindingWizard-CcDMLO8Q.js → ExcelBindingWizard-NQ_v396s.js} +3 -3
- package/dist/ParamEditor-DEP38mBp.cjs +1 -0
- package/dist/ParamEditor-Z-3yodp5.js +750 -0
- package/dist/{ReportBatchPanel-CHxBtG9R.cjs → ReportBatchPanel-D33LjMrA.cjs} +1 -1
- package/dist/{ReportBatchPanel-CJB67WNd.js → ReportBatchPanel-DG8FV-5X.js} +2 -2
- package/dist/{ReportLabelStudio-Tplc1TLJ.js → ReportLabelStudio-BZp23_hA.js} +68 -68
- package/dist/ReportLabelStudio-Bz-xAayk.cjs +1 -0
- package/dist/ReportParamPanel-B27IGJjk.cjs +1 -0
- package/dist/{ReportParamPanel-GI43aGa0.js → ReportParamPanel-DGXzBzl2.js} +328 -298
- package/dist/ReportPreview-CilFAS9U.js +7170 -0
- package/dist/ReportPreview-dOOzPts2.cjs +6 -0
- package/dist/{ReportTemplateLibrary-KqX4E2sN.js → ReportTemplateLibrary-DpSGgvFa.js} +28 -28
- package/dist/{ReportTemplateLibrary-BFQIX0sg.cjs → ReportTemplateLibrary-uG1gENaW.cjs} +1 -1
- package/dist/{RuleEditor-OPX1awrH.js → RuleEditor-BONALh1Q.js} +846 -835
- package/dist/RuleEditor-bLXiRcxL.cjs +1 -0
- package/dist/{TemplateOutlinePanel-CVYKVLv_.cjs → TemplateOutlinePanel-C3nfHuaR.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-DQS-eOs6.js → TemplateOutlinePanel-JGBKeF3e.js} +10 -10
- package/dist/{TemplateReusePanel-CY6O93Zk.cjs → TemplateReusePanel-BKhgp6kg.cjs} +1 -1
- package/dist/{TemplateReusePanel-DKXiFTyB.js → TemplateReusePanel-DXQUO6nQ.js} +2 -2
- package/dist/TemplateReviewPanel-5RWFUUEf.cjs +1 -0
- package/dist/TemplateReviewPanel-DhL7Hapy.js +602 -0
- package/dist/analytics.d.cts +1 -1
- package/dist/analytics.d.ts +1 -1
- package/dist/artifact-integrity.json +98 -98
- package/dist/assets-BYdpkTIt.cjs +1 -0
- package/dist/assets-C4MIvzQ4.js +137 -0
- package/dist/auto-D-eDZa_V.cjs +1 -0
- package/dist/{auto-BB99S802.js → auto-umW_ozwr.js} +10 -10
- package/dist/capabilities-CN_kSVjO.js +121 -0
- package/dist/capabilities-D4nfhcvB.cjs +1 -0
- package/dist/cell-style-B6Qffrx8.js +37 -0
- package/dist/cell-style-y_uh1pZp.cjs +1 -0
- package/dist/{data-bar-IkI6VvMQ.js → data-bar-Bfh54sT4.js} +1 -1
- package/dist/data-bar-DzceAVeR.cjs +1 -0
- package/dist/designer-CCyj5WYS.js +7595 -0
- package/dist/designer-Cj7fn4Hh.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +143 -10
- package/dist/designer.d.ts +143 -10
- package/dist/designer.js +5 -5
- package/dist/diagnostic-collector-gB07PHy2.js +392 -0
- package/dist/diagnostic-collector-wASg6Fzs.cjs +1 -0
- package/dist/dom-CXWMmwh-.cjs +1 -0
- package/dist/{dom-JWrchIre.js → dom-DxdCMLzs.js} +185 -185
- package/dist/{encoding-CEd-dq9A.js → encoding-CEkBtlUP.js} +2 -2
- package/dist/{encoding-7lquyj0w.cjs → encoding-Cipno7dq.cjs} +1 -1
- package/dist/{font-loader-CNWXomuV.js → font-loader-D4NLIKJL.js} +1 -1
- package/dist/{font-loader-D8pI87fL.cjs → font-loader-p_SyTvqt.cjs} +1 -1
- package/dist/{grid-strokes-EoY66L2f.js → grid-strokes-DkZEZvcI.js} +1 -1
- package/dist/grid-strokes-RFMR91jn.cjs +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +48 -9
- package/dist/index.d.ts +48 -9
- package/dist/index.js +137 -136
- package/dist/json-snapshot-DQdkA_At.cjs +2 -0
- package/dist/{json-snapshot-BRnzKudk.js → json-snapshot-x0JpllWL.js} +919 -791
- package/dist/{pdf-DpMkW72B.cjs → pdf-C060D5UY.cjs} +31 -31
- package/dist/{pdf-CJToa81Z.js → pdf-DU8HelKd.js} +2499 -2492
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +18 -0
- package/dist/pdf.d.ts +18 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-BWTp-X7b.cjs → plugin-B_k23hut.cjs} +1 -1
- package/dist/{plugin-_BkUVc2z.js → plugin-CttO46hc.js} +1 -1
- package/dist/{prefill-CWGdnqQd.js → prefill-BkF9Fw_p.js} +13 -13
- package/dist/prefill-BvkuwooY.cjs +1 -0
- package/dist/prepared-CSywIEAZ.cjs +1 -0
- package/dist/prepared-Cyuh61fJ.js +128 -0
- package/dist/protocol-BwbJNVZl.cjs +1 -0
- package/dist/protocol-DwtxjXzO.js +96 -0
- package/dist/record-bindings-B7djSjNs.cjs +1 -0
- package/dist/{record-bindings-DatJZv_e.js → record-bindings-Cv7lFiof.js} +47 -47
- package/dist/{region-binding-workflow-l7NGfagJ.cjs → region-binding-workflow-COD8nISZ.cjs} +1 -1
- package/dist/{region-binding-workflow-DjrXuR1q.js → region-binding-workflow-D8I4QWRh.js} +2 -2
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/{rich-text-layout-Ciwa6D2o.js → rich-text-layout-Ch_N0Ubu.js} +1 -1
- package/dist/rich-text-layout-yJGuThtC.cjs +3 -0
- package/dist/runtime-BE30icyB.js +227 -0
- package/dist/runtime-DRSuy_SQ.cjs +1 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +55 -7
- package/dist/server/node.d.ts +55 -7
- package/dist/server-node.cjs +5 -5
- package/dist/server-node.js +2742 -2417
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +51 -16
- package/dist/server.d.ts +51 -16
- package/dist/server.js +8 -8
- package/dist/style.css +1 -1
- package/dist/{template-catalog-DtrtT1FY.cjs → template-catalog-C0riwrx7.cjs} +1 -1
- package/dist/{template-catalog-CRuZL3pi.js → template-catalog-D_gl93va.js} +3 -3
- package/dist/template-fragments-CgzPdFKB.cjs +1 -0
- package/dist/{template-fragments-CPpGpQoz.js → template-fragments-D94ZZmPc.js} +2 -2
- package/dist/template-registry-BMScUmM4.cjs +1 -0
- package/dist/{template-registry-O0hNIOfB.js → template-registry-DZOtRY7t.js} +19 -19
- package/dist/{textwrap-D4ZksyMK.js → textwrap-BywMBMXM.js} +1 -1
- package/dist/textwrap-LhJkHWb1.cjs +4 -0
- package/dist/vue/async.d.cts +101 -22
- package/dist/vue/async.d.ts +101 -22
- package/dist/vue/index.d.cts +133 -34
- package/dist/vue/index.d.ts +133 -34
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +192 -162
- package/dist/{workbook-session-C6-SrnCT.cjs → workbook-session-DR2j6Hxm.cjs} +3 -3
- package/dist/{workbook-session-C9ZmCBwY.js → workbook-session-SzfILBJJ.js} +106 -107
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +55 -7
- package/dist/worker.d.ts +55 -7
- package/dist/worker.js +4 -4
- package/dist/xlsx/node.d.cts +30 -1
- package/dist/xlsx/node.d.ts +30 -1
- package/dist/xlsx-node.cjs +42 -42
- package/dist/xlsx-node.js +3908 -3889
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +20 -3
- package/dist/xlsx.d.ts +20 -3
- package/dist/xlsx.js +302 -295
- package/package.json +1 -1
- package/dist/ParamEditor-BGjovFUe.js +0 -737
- package/dist/ParamEditor-CeNp4_zQ.cjs +0 -1
- package/dist/ReportLabelStudio-g8PkqJWn.cjs +0 -1
- package/dist/ReportParamPanel-C7fZTllk.cjs +0 -1
- package/dist/ReportPreview-BoGBGyRr.cjs +0 -6
- package/dist/ReportPreview-QLONCyci.js +0 -6257
- package/dist/RuleEditor-BZUP9yvL.cjs +0 -1
- package/dist/TemplateReviewPanel-DbeNC8Ms.cjs +0 -1
- package/dist/TemplateReviewPanel-Dijwm9YE.js +0 -593
- package/dist/assets-D2gHc4Mz.cjs +0 -1
- package/dist/assets-T_gDeFaz.js +0 -132
- package/dist/auto-BrPWo7Xm.cjs +0 -1
- package/dist/capabilities-DiBj4Qgl.cjs +0 -1
- package/dist/capabilities-pg7j7VLT.js +0 -106
- package/dist/data-bar-CeZuFmYl.cjs +0 -1
- package/dist/designer-BZoVWTgl.js +0 -7172
- package/dist/designer-zS2uKJmY.cjs +0 -2
- package/dist/dom-ChE5D-L-.cjs +0 -1
- package/dist/grid-strokes-Be24LGuV.cjs +0 -1
- package/dist/json-snapshot-DNiIbpOr.cjs +0 -2
- package/dist/prefill-PaAy6wLk.cjs +0 -1
- package/dist/prepared-CJy_qk7d.js +0 -94
- package/dist/prepared-D0yCSxSO.cjs +0 -1
- package/dist/progress-BXzlVbIp.js +0 -29
- package/dist/progress-ByiOxUD3.js +0 -250
- package/dist/progress-DJBd9Rb9.cjs +0 -1
- package/dist/progress-WomPRP3B.cjs +0 -1
- package/dist/protocol-BG16rz6D.js +0 -90
- package/dist/protocol-wzhl1Fim.cjs +0 -1
- package/dist/record-bindings-MBxbeBsi.cjs +0 -1
- package/dist/rich-text-layout-DK7A_a5r.cjs +0 -3
- package/dist/runtime-DYMOS_gz.cjs +0 -1
- package/dist/runtime-PiCax9zQ.js +0 -171
- package/dist/template-fragments-GVjpew_q.cjs +0 -1
- package/dist/template-registry-DI59PXVK.cjs +0 -1
- package/dist/textwrap-DEHqAjKZ.cjs +0 -4
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
import { b as P } from "./template-serialization-CWmHq7lX.js";
|
|
2
|
-
import { d as U } from "./data-bar-
|
|
2
|
+
import { d as U } from "./data-bar-Bfh54sT4.js";
|
|
3
3
|
import { s as B } from "./dom-cell-address-Fn-8nk7D.js";
|
|
4
|
-
import { r as D, i as _,
|
|
5
|
-
import { r as H } from "./grid-strokes-
|
|
6
|
-
import { r as
|
|
7
|
-
function
|
|
4
|
+
import { r as D, i as _, e as G, f as W, n as y, t as b, c as F, a as k, g as X, u as Y, b as J, D as q, h as Q } from "./diagnostic-collector-gB07PHy2.js";
|
|
5
|
+
import { r as H } from "./grid-strokes-DkZEZvcI.js";
|
|
6
|
+
import { r as Z } from "./capabilities-CN_kSVjO.js";
|
|
7
|
+
function ee(e) {
|
|
8
8
|
const t = /\.pages\[(\d+)\](?:\.components\[(\d+)\])?/.exec(e);
|
|
9
9
|
return t ? {
|
|
10
10
|
pageIndex: Number(t[1]),
|
|
11
11
|
...t[2] === void 0 ? {} : { componentIndex: Number(t[2]) }
|
|
12
12
|
} : {};
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Te(e, t, r) {
|
|
15
15
|
return P(e).filter((n) => n.dataset === t).flatMap(
|
|
16
|
-
(n) => n.fields.filter((
|
|
17
|
-
...
|
|
18
|
-
...
|
|
16
|
+
(n) => n.fields.filter((i) => i.field === r).map((i) => ({
|
|
17
|
+
...i,
|
|
18
|
+
...ee(i.path),
|
|
19
19
|
dataset: t,
|
|
20
|
-
kind: /\.computed\[/.test(
|
|
20
|
+
kind: /\.computed\[/.test(i.path) ? "calculation" : /\.columns\[\d+\]\.field$/.test(i.path) ? "display" : "binding"
|
|
21
21
|
}))
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function te(e, t) {
|
|
25
25
|
const r = e.kind === "list" ? e.title || e.dataset : e.binding?.field || e.text || e.nid;
|
|
26
26
|
return `${e.kind} · ${(r || String(t + 1)).replace(/\s+/g, " ").slice(0, 80)}`;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function Ae(e) {
|
|
29
29
|
const t = P(e), r = /* @__PURE__ */ new Map();
|
|
30
|
-
for (const
|
|
31
|
-
for (const l of
|
|
30
|
+
for (const i of t)
|
|
31
|
+
for (const l of i.fields) {
|
|
32
32
|
const a = /^\$\.template\.pages\[\d+\]\.components\[\d+\]/.exec(
|
|
33
33
|
l.path
|
|
34
34
|
)?.[0];
|
|
35
35
|
if (!a) continue;
|
|
36
36
|
const s = r.get(a) ?? [];
|
|
37
|
-
s.push({ ...l, dataset:
|
|
37
|
+
s.push({ ...l, dataset: i.dataset }), r.set(a, s);
|
|
38
38
|
}
|
|
39
39
|
const n = [];
|
|
40
|
-
return e.pages.forEach((
|
|
40
|
+
return e.pages.forEach((i, l) => {
|
|
41
41
|
const a = `$.template.pages[${l}]`;
|
|
42
42
|
n.push({
|
|
43
43
|
path: a,
|
|
44
44
|
pageIndex: l,
|
|
45
45
|
kind: "page",
|
|
46
46
|
depth: 0,
|
|
47
|
-
title: typeof
|
|
48
|
-
}),
|
|
49
|
-
const d = `${a}.components[${
|
|
47
|
+
title: typeof i.meta?.title == "string" ? i.meta.title : `${l + 1} · ${i.widthMm} × ${i.heightMm} mm`
|
|
48
|
+
}), i.components.forEach((s, o) => {
|
|
49
|
+
const d = `${a}.components[${o}]`, h = { pageIndex: l, componentIndex: o };
|
|
50
50
|
n.push({
|
|
51
51
|
path: d,
|
|
52
52
|
...h,
|
|
53
53
|
depth: 1,
|
|
54
54
|
kind: "component",
|
|
55
|
-
title:
|
|
55
|
+
title: te(s, o)
|
|
56
56
|
}), s.kind === "list" && (s.columns.forEach(
|
|
57
|
-
(m,
|
|
58
|
-
path: `${d}.columns[${
|
|
57
|
+
(m, u) => n.push({
|
|
58
|
+
path: `${d}.columns[${u}].field`,
|
|
59
59
|
...h,
|
|
60
60
|
depth: 2,
|
|
61
61
|
kind: "field",
|
|
@@ -64,8 +64,8 @@ function Te(e) {
|
|
|
64
64
|
dataset: s.dataset
|
|
65
65
|
})
|
|
66
66
|
), s.computed?.forEach(
|
|
67
|
-
(m,
|
|
68
|
-
path: `${d}.computed[${
|
|
67
|
+
(m, u) => n.push({
|
|
68
|
+
path: `${d}.computed[${u}]`,
|
|
69
69
|
...h,
|
|
70
70
|
depth: 2,
|
|
71
71
|
kind: "calculation",
|
|
@@ -87,10 +87,10 @@ function Te(e) {
|
|
|
87
87
|
}), n;
|
|
88
88
|
}
|
|
89
89
|
function x(e, t, r) {
|
|
90
|
-
let n = 0,
|
|
91
|
-
for (; n <
|
|
92
|
-
const l = n +
|
|
93
|
-
r(e[l]) < t ? n = l + 1 :
|
|
90
|
+
let n = 0, i = e.length;
|
|
91
|
+
for (; n < i; ) {
|
|
92
|
+
const l = n + i >>> 1;
|
|
93
|
+
r(e[l]) < t ? n = l + 1 : i = l;
|
|
94
94
|
}
|
|
95
95
|
return n;
|
|
96
96
|
}
|
|
@@ -98,51 +98,51 @@ function L(e) {
|
|
|
98
98
|
if (![e.leftMm, e.topMm, e.widthMm, e.heightMm].every(Number.isFinite) || e.widthMm < 0 || e.heightMm < 0) throw new RangeError("Preview viewport must have finite coordinates and nonnegative dimensions.");
|
|
99
99
|
return e;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function ne(e) {
|
|
102
102
|
const t = e.rows.map(() => []);
|
|
103
103
|
for (const r of e.cells) {
|
|
104
104
|
const n = Math.min(t.length, r.ri + (r.cell.rowSpan ?? 1));
|
|
105
|
-
for (let
|
|
105
|
+
for (let i = r.ri; i < n; i++) t[i].push(r);
|
|
106
106
|
}
|
|
107
|
-
for (const r of t) r.sort((n,
|
|
107
|
+
for (const r of t) r.sort((n, i) => n.xMm - i.xMm);
|
|
108
108
|
return {
|
|
109
109
|
cells(r) {
|
|
110
110
|
L(r);
|
|
111
|
-
const n = /* @__PURE__ */ new Set(),
|
|
111
|
+
const n = /* @__PURE__ */ new Set(), i = r.topMm + r.heightMm, l = r.leftMm + r.widthMm;
|
|
112
112
|
let a = x(e.rows, r.topMm, (s) => s.pos + s.size);
|
|
113
|
-
for (; a < t.length && e.rows[a].pos <=
|
|
113
|
+
for (; a < t.length && e.rows[a].pos <= i; ) {
|
|
114
114
|
const s = t[a++];
|
|
115
|
-
let
|
|
116
|
-
for (;
|
|
115
|
+
let o = x(s, r.leftMm, (d) => d.xMm + d.widthMm);
|
|
116
|
+
for (; o < s.length && s[o].xMm <= l; ) n.add(s[o++]);
|
|
117
117
|
}
|
|
118
|
-
return [...n].sort((s,
|
|
118
|
+
return [...n].sort((s, o) => s.ri - o.ri || s.ci - o.ci);
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
const t = ["h", "v"].map((r) => e.filter((n) => n.kind === r).sort((n,
|
|
122
|
+
function re(e) {
|
|
123
|
+
const t = ["h", "v"].map((r) => e.filter((n) => n.kind === r).sort((n, i) => n.pos - i.pos));
|
|
124
124
|
return (r) => {
|
|
125
125
|
const n = [];
|
|
126
|
-
return t.forEach((
|
|
127
|
-
const a = l === 0 ? r.topMm : r.leftMm, s = a + (l === 0 ? r.heightMm : r.widthMm),
|
|
128
|
-
let h = x(
|
|
129
|
-
for (; h <
|
|
130
|
-
const c =
|
|
131
|
-
c.to >=
|
|
126
|
+
return t.forEach((i, l) => {
|
|
127
|
+
const a = l === 0 ? r.topMm : r.leftMm, s = a + (l === 0 ? r.heightMm : r.widthMm), o = l === 0 ? r.leftMm : r.topMm, d = o + (l === 0 ? r.widthMm : r.heightMm);
|
|
128
|
+
let h = x(i, a, (c) => c.pos);
|
|
129
|
+
for (; h < i.length && i[h].pos <= s; ) {
|
|
130
|
+
const c = i[h++];
|
|
131
|
+
c.to >= o && c.from <= d && n.push(c);
|
|
132
132
|
}
|
|
133
133
|
}), n;
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function ie() {
|
|
137
137
|
const e = [];
|
|
138
138
|
return {
|
|
139
139
|
mount(t) {
|
|
140
|
-
e.push(
|
|
140
|
+
e.push(ce(t));
|
|
141
141
|
},
|
|
142
|
-
update(t, r, n,
|
|
142
|
+
update(t, r, n, i) {
|
|
143
143
|
L(t);
|
|
144
144
|
let l = !1;
|
|
145
|
-
for (const a of e) l = a.update(t, a.component === r ? n : void 0,
|
|
145
|
+
for (const a of e) l = a.update(t, a.component === r ? n : void 0, i) || l;
|
|
146
146
|
return l;
|
|
147
147
|
}
|
|
148
148
|
};
|
|
@@ -156,71 +156,71 @@ function oe(e, t) {
|
|
|
156
156
|
heightMm: e.heightMm + 2 * n
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function le(e, t, r) {
|
|
160
160
|
let n = t.get(r);
|
|
161
161
|
return n || (n = e.table.ownerDocument.createElement("tr"), n.className = e.rowClass, n.setAttribute("role", "row"), n.setAttribute("aria-rowindex", String(r + 1)), n.style.cssText = "all:unset;display:contents;box-sizing:border-box", t.set(r, n)), n;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
const
|
|
165
|
-
for (const [
|
|
166
|
-
d.remove(), r.delete(
|
|
167
|
-
const h = e.reuseKey?.(
|
|
163
|
+
function ae(e, t, r, n) {
|
|
164
|
+
const i = new Set(t), l = new Set(t.map((o) => o.ri)), a = /* @__PURE__ */ new Map();
|
|
165
|
+
for (const [o, d] of r) if (!i.has(o)) {
|
|
166
|
+
d.remove(), r.delete(o);
|
|
167
|
+
const h = e.reuseKey?.(o);
|
|
168
168
|
if (h !== void 0) {
|
|
169
169
|
const c = a.get(h) ?? [];
|
|
170
170
|
c.push(d), a.set(h, c);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
for (const [
|
|
174
|
-
for (const
|
|
175
|
-
let d = r.get(
|
|
173
|
+
for (const [o, d] of n) l.has(o) || (d.remove(), n.delete(o));
|
|
174
|
+
for (const o of t) {
|
|
175
|
+
let d = r.get(o);
|
|
176
176
|
if (!d) {
|
|
177
|
-
const c = e.reuseKey?.(
|
|
178
|
-
d = m && e.reuseCell?.(m,
|
|
177
|
+
const c = e.reuseKey?.(o), m = c === void 0 ? void 0 : a.get(c)?.pop();
|
|
178
|
+
d = m && e.reuseCell?.(m, o) ? m : e.drawCell(o), d.setAttribute("aria-colindex", String(o.ci + 1)), r.set(o, d);
|
|
179
179
|
}
|
|
180
|
-
const h =
|
|
180
|
+
const h = le(e, n, o.ri);
|
|
181
181
|
d.parentElement !== h && h.appendChild(d);
|
|
182
182
|
}
|
|
183
183
|
const s = /* @__PURE__ */ new Map();
|
|
184
|
-
for (const
|
|
185
|
-
const d = s.get(
|
|
186
|
-
d.push(r.get(
|
|
184
|
+
for (const o of t) {
|
|
185
|
+
const d = s.get(o.ri) ?? [];
|
|
186
|
+
d.push(r.get(o)), s.set(o.ri, d);
|
|
187
187
|
}
|
|
188
|
-
for (const [
|
|
189
|
-
A(e.body, [...l].sort((
|
|
188
|
+
for (const [o, d] of s) A(n.get(o), d);
|
|
189
|
+
A(e.body, [...l].sort((o, d) => o - d).map((o) => n.get(o)));
|
|
190
190
|
}
|
|
191
191
|
function A(e, t) {
|
|
192
192
|
let r = e.firstElementChild;
|
|
193
193
|
for (const n of t)
|
|
194
194
|
n === r ? r = r.nextElementSibling : e.insertBefore(n, r);
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function se(e, t) {
|
|
197
197
|
return e.table?.role === "header" ? e.heightMm : t.rows[0]?.size ?? 0;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
const
|
|
201
|
-
l &&
|
|
199
|
+
function de(e, t, r, n) {
|
|
200
|
+
const i = [e], l = n.freezeHeaders && (r.table?.role === "header" || !r.table), a = se(r, t);
|
|
201
|
+
l && i.push({ ...e, topMm: 0, heightMm: Math.max(0, a - 1e-4) });
|
|
202
202
|
const s = Math.max(0, Math.min(20, Math.floor(n.frozenColumns ?? 0))) || 0;
|
|
203
|
-
if (!s || !t.columns.length) return
|
|
204
|
-
const
|
|
205
|
-
return
|
|
203
|
+
if (!s || !t.columns.length) return i;
|
|
204
|
+
const o = t.columns[Math.min(s, t.columns.length) - 1], d = { ...e, leftMm: 0, widthMm: Math.max(0, o.pos + o.size - 1e-4) };
|
|
205
|
+
return i.push(d), l && i.push({ ...d, topMm: 0, heightMm: Math.max(0, a - 1e-4) }), i;
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
const t = D(e.grid, e.component.widthMm, e.component.heightMm), r = new Map(t.cells.map((h) => [`${h.ri}:${h.ci}`, h])), n =
|
|
207
|
+
function ce(e) {
|
|
208
|
+
const t = D(e.grid, e.component.widthMm, e.component.heightMm), r = new Map(t.cells.map((h) => [`${h.ri}:${h.ci}`, h])), n = ne(t), i = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), a = re(H(t, e.component));
|
|
209
209
|
e.table.setAttribute("aria-rowcount", String(t.rows.length)), e.table.setAttribute("aria-colcount", String(t.columns.length));
|
|
210
|
-
let s = "",
|
|
210
|
+
let s = "", o = "";
|
|
211
211
|
function d(h, c) {
|
|
212
212
|
const m = /* @__PURE__ */ new Set();
|
|
213
|
-
for (const
|
|
213
|
+
for (const u of de(h, t, e.component, c ?? {})) for (const w of n.cells(u)) m.add(w);
|
|
214
214
|
return [...m];
|
|
215
215
|
}
|
|
216
216
|
return { component: e.component, update(h, c, m) {
|
|
217
|
-
const
|
|
217
|
+
const u = oe(h, e.component), w = d(u, m), M = c && r.get(`${c.rowIndex}:${c.columnIndex}`);
|
|
218
218
|
M && !w.includes(M) && w.push(M), w.sort((p, T) => p.ri - T.ri || p.ci - T.ci);
|
|
219
|
-
const C = w.map((p) => `${p.ri}:${p.ci}`).join(";"), S = a(
|
|
220
|
-
return E && (s = C,
|
|
219
|
+
const C = w.map((p) => `${p.ri}:${p.ci}`).join(";"), S = a(u), v = S.map((p) => `${p.kind}:${p.pos}:${p.from}:${p.to}`).join(";"), E = C !== s, $ = v !== o;
|
|
220
|
+
return E && (s = C, ae(e, w, i, l)), $ && (o = v, e.edgeHost.replaceChildren(...e.drawEdges(S))), E || $;
|
|
221
221
|
} };
|
|
222
222
|
}
|
|
223
|
-
const I = /* @__PURE__ */ new WeakMap(),
|
|
223
|
+
const I = /* @__PURE__ */ new WeakMap(), he = {
|
|
224
224
|
root: "mr-root",
|
|
225
225
|
page: "mr-page",
|
|
226
226
|
comp: "mr-comp",
|
|
@@ -237,18 +237,18 @@ const I = /* @__PURE__ */ new WeakMap(), ce = {
|
|
|
237
237
|
cell: "mr-cell",
|
|
238
238
|
unknown: "mr-unknown"
|
|
239
239
|
};
|
|
240
|
-
function
|
|
241
|
-
return t?.classNames?.[e] ??
|
|
240
|
+
function g(e, t) {
|
|
241
|
+
return t?.classNames?.[e] ?? he[e];
|
|
242
242
|
}
|
|
243
|
-
class
|
|
243
|
+
class me {
|
|
244
244
|
constructor() {
|
|
245
245
|
this.props = [];
|
|
246
246
|
}
|
|
247
247
|
add(t, r) {
|
|
248
248
|
return r == null || r === !1 || r === "" ? this : (this.props.push([t, String(r)]), this);
|
|
249
249
|
}
|
|
250
|
-
mm(t, r, n,
|
|
251
|
-
return this.add(t, `${b(y(r, n),
|
|
250
|
+
mm(t, r, n, i = 2) {
|
|
251
|
+
return this.add(t, `${b(y(r, n), i)}px`);
|
|
252
252
|
}
|
|
253
253
|
toString() {
|
|
254
254
|
let t = "";
|
|
@@ -262,191 +262,191 @@ class he {
|
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
function f(e, t = "unset") {
|
|
265
|
-
return new
|
|
265
|
+
return new me().add("all", t).add("display", e).add("box-sizing", "border-box");
|
|
266
266
|
}
|
|
267
267
|
function O(e, t, r) {
|
|
268
|
-
e.add("color", t.color).add("font-family", t.fontFamily).add("font-weight", t.bold != null ? t.bold ? "700" : "400" : void 0).add("font-style", t.italic != null ? t.italic ? "italic" : "normal" : void 0).add("text-decoration", t.underline != null ? t.underline ? "underline" : "none" : void 0).add("letter-spacing", t.letterSpacing != null ? `${t.letterSpacing}pt` : void 0).add("line-height", String(
|
|
268
|
+
e.add("color", t.color).add("font-family", t.fontFamily).add("font-weight", t.bold != null ? t.bold ? "700" : "400" : void 0).add("font-style", t.italic != null ? t.italic ? "italic" : "normal" : void 0).add("text-decoration", t.underline != null ? t.underline ? "underline" : "none" : void 0).add("letter-spacing", t.letterSpacing != null ? `${t.letterSpacing}pt` : void 0).add("line-height", String(F(t))).add("text-align", t.align);
|
|
269
269
|
const n = k(t, r);
|
|
270
270
|
e.add("font-size", `${b(n.fontSizePx, 2)}px`);
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function fe(e, t, r) {
|
|
273
273
|
const n = t.style ?? {};
|
|
274
274
|
O(e, n, r);
|
|
275
|
-
const
|
|
276
|
-
e.add("background-color",
|
|
275
|
+
const i = !t.grid && (t.kind === "ellipse" || t.kind === "line");
|
|
276
|
+
e.add("background-color", i ? void 0 : n.backgroundColor).add("opacity", n.opacity != null ? String(n.opacity) : void 0).add("transform", n.rotateDeg ? `rotate(${n.rotateDeg}deg)` : void 0);
|
|
277
277
|
}
|
|
278
|
-
function N(e, t, r, n,
|
|
278
|
+
function N(e, t, r, n, i, l) {
|
|
279
279
|
const a = e.cell, s = l.createElement("td");
|
|
280
|
-
s.className =
|
|
281
|
-
const
|
|
282
|
-
O(d,
|
|
280
|
+
s.className = g("cell", i), B(s, e.ri, e.ci), s.setAttribute("role", t.table?.role === "header" ? "columnheader" : "cell"), a.colSpan && (s.colSpan = a.colSpan), a.rowSpan && (s.rowSpan = a.rowSpan);
|
|
281
|
+
const o = J(t.style, a), d = f("block").add("position", "absolute").mm("left", e.xMm, n).mm("top", e.yMm, n).mm("width", e.widthMm, n).mm("height", e.heightMm, n).add("background-color", o.backgroundColor).add("vertical-align", o.verticalAlign ?? "middle");
|
|
282
|
+
O(d, o, n), d.applyTo(s);
|
|
283
283
|
const h = U(a.dataBar, e.widthMm, e.heightMm, r);
|
|
284
284
|
if (h) {
|
|
285
285
|
const m = l.createElement("div");
|
|
286
286
|
m.className = "mr-cell-data-bar", m.setAttribute("aria-hidden", "true"), f("block").add("position", "absolute").mm("left", h.x, n).mm("top", h.y, n).mm("width", h.width, n).mm("height", h.height, n).add("background-color", h.color).add("opacity", "0.35").add("pointer-events", "none").applyTo(m), s.appendChild(m);
|
|
287
287
|
}
|
|
288
288
|
const c = l.createElement("div");
|
|
289
|
-
c.className = "mr-cell-content", f("flex").add("position", "absolute").mm("left", r + (a.indentMm ?? 0), n).mm("right", r, n).mm("top", r, n).mm("bottom", r, n).add("flex-direction", "column").add("justify-content",
|
|
290
|
-
for (const m of a.children ?? []) c.appendChild(j(m, n,
|
|
289
|
+
c.className = "mr-cell-content", f("flex").add("position", "absolute").mm("left", r + (a.indentMm ?? 0), n).mm("right", r, n).mm("top", r, n).mm("bottom", r, n).add("flex-direction", "column").add("justify-content", o.verticalAlign === "top" ? "flex-start" : o.verticalAlign === "bottom" ? "flex-end" : "center").add("overflow-wrap", "anywhere").add("overflow", "hidden").applyTo(c), a.richParagraphs?.length ? c.appendChild(R({ ...t, kind: "text", richParagraphs: a.richParagraphs }, n, i, l)) : a.text != null && c.append(a.text);
|
|
290
|
+
for (const m of a.children ?? []) c.appendChild(j(m, n, i, l));
|
|
291
291
|
return s.insertBefore(c, s.firstChild), s;
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function ue(e, t, r, n) {
|
|
294
294
|
return V(H(e, t), r, n);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
const
|
|
298
|
-
if (!(
|
|
299
|
-
return JSON.stringify([
|
|
296
|
+
function ge(e, t) {
|
|
297
|
+
const r = e.cell;
|
|
298
|
+
if (!(r.children?.length || r.richParagraphs?.length || r.dataBar || (r.colSpan ?? 1) !== 1 || (r.rowSpan ?? 1) !== 1))
|
|
299
|
+
return JSON.stringify([r.style, r.indentMm, Y(t, r)]);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function pe(e, t, r) {
|
|
302
302
|
if (e.style.position !== "absolute" || e.style.zIndex || e.style.transform || e.children.length !== 1) return !1;
|
|
303
303
|
const n = e.firstElementChild;
|
|
304
304
|
return !(n instanceof HTMLElement) || n.className !== "mr-cell-content" ? !1 : (B(e, t.ri, t.ci), e.style.left = `${b(y(t.xMm, r), 2)}px`, e.style.top = `${b(y(t.yMm, r), 2)}px`, e.style.width = `${b(y(t.widthMm, r), 2)}px`, e.style.height = `${b(y(t.heightMm, r), 2)}px`, n.textContent = t.cell.text ?? "", !0);
|
|
305
305
|
}
|
|
306
306
|
function V(e, t, r) {
|
|
307
307
|
return e.map((n) => {
|
|
308
|
-
const
|
|
308
|
+
const i = `${b(n.widthPt * t / 72, 2)}px solid ${n.color}`, l = r.createElement("div");
|
|
309
309
|
l.className = "mr-grid-edge", l.setAttribute("aria-hidden", "true");
|
|
310
310
|
const a = n.kind === "h";
|
|
311
|
-
return f("block").add("position", "absolute").add("pointer-events", "none").mm("left", a ? n.from : n.pos, t).mm("top", a ? n.pos : n.from, t).mm("width", a ? n.to - n.from : 0, t).mm("height", a ? 0 : n.to - n.from, t).add(a ? "border-top" : "border-left",
|
|
311
|
+
return f("block").add("position", "absolute").add("pointer-events", "none").mm("left", a ? n.from : n.pos, t).mm("top", a ? n.pos : n.from, t).mm("width", a ? n.to - n.from : 0, t).mm("height", a ? 0 : n.to - n.from, t).add(a ? "border-top" : "border-left", i).applyTo(l), l;
|
|
312
312
|
});
|
|
313
313
|
}
|
|
314
|
-
function
|
|
315
|
-
const l =
|
|
316
|
-
l.className =
|
|
317
|
-
const a =
|
|
314
|
+
function be(e, t, r, n, i) {
|
|
315
|
+
const l = i.createElement("table");
|
|
316
|
+
l.className = g("grid", n), l.setAttribute("role", "table"), f("block").add("position", "relative").add("width", "100%").add("height", "100%").applyTo(l);
|
|
317
|
+
const a = i.createElement("tbody");
|
|
318
318
|
f("contents").applyTo(a), l.appendChild(a);
|
|
319
319
|
const s = t.style?.rotateDeg ? void 0 : I.get(n);
|
|
320
320
|
if (s) {
|
|
321
|
-
const c =
|
|
321
|
+
const c = i.createElement("div");
|
|
322
322
|
f("block").add("position", "relative").add("width", "100%").add("height", "100%").applyTo(c);
|
|
323
|
-
const m =
|
|
323
|
+
const m = i.createElement("div");
|
|
324
324
|
return f("contents").applyTo(m), m.setAttribute("aria-hidden", "true"), s.mount({
|
|
325
325
|
grid: e,
|
|
326
326
|
component: t,
|
|
327
327
|
table: l,
|
|
328
|
-
rowClass:
|
|
328
|
+
rowClass: g("row", n),
|
|
329
329
|
body: a,
|
|
330
330
|
edgeHost: m,
|
|
331
|
-
drawCell: (
|
|
332
|
-
reuseKey:
|
|
333
|
-
reuseCell: (
|
|
334
|
-
drawEdges: (
|
|
331
|
+
drawCell: (u) => N(u, t, e.paddingMm ?? 0.5, r, { ...n }, i),
|
|
332
|
+
reuseKey: (u) => ge(u, t.style),
|
|
333
|
+
reuseCell: (u, w) => pe(u, w, r),
|
|
334
|
+
drawEdges: (u) => V(u, r, i)
|
|
335
335
|
}), c.append(l, m), c;
|
|
336
336
|
}
|
|
337
|
-
const
|
|
338
|
-
const c =
|
|
339
|
-
return c.className =
|
|
337
|
+
const o = D(e, t.widthMm, t.heightMm), d = e.cells.map(() => {
|
|
338
|
+
const c = i.createElement("tr");
|
|
339
|
+
return c.className = g("row", n), c.setAttribute("role", "row"), f("contents").applyTo(c), a.appendChild(c), c;
|
|
340
340
|
});
|
|
341
|
-
for (const c of
|
|
342
|
-
d[c.ri].appendChild(N(c, t, e.paddingMm ?? 0.5, r, n,
|
|
343
|
-
const h =
|
|
344
|
-
return f("block").add("position", "relative").add("width", "100%").add("height", "100%").applyTo(h), h.append(l, ...
|
|
345
|
-
}
|
|
346
|
-
function
|
|
347
|
-
const
|
|
348
|
-
|
|
341
|
+
for (const c of o.cells)
|
|
342
|
+
d[c.ri].appendChild(N(c, t, e.paddingMm ?? 0.5, r, n, i));
|
|
343
|
+
const h = i.createElement("div");
|
|
344
|
+
return f("block").add("position", "relative").add("width", "100%").add("height", "100%").applyTo(h), h.append(l, ...ue(o, t, r, i)), h;
|
|
345
|
+
}
|
|
346
|
+
function we(e, t, r, n) {
|
|
347
|
+
const i = n.createElement("div");
|
|
348
|
+
i.className = g("paragraph", r), f("block").add("text-align", e.align).add("line-height", e.lineHeight != null ? String(e.lineHeight) : void 0).mm("margin-top", e.spaceBeforeMm ?? 0, t).mm("margin-bottom", e.spaceAfterMm ?? 0, t).mm("text-indent", e.indentMm ?? 0, t).applyTo(i);
|
|
349
349
|
for (const l of e.segments || []) {
|
|
350
350
|
const a = n.createElement("span");
|
|
351
|
-
a.className =
|
|
351
|
+
a.className = g("segment", r), a.textContent = l.kind === "field" ? l.field ?? "" : l.text ?? "";
|
|
352
352
|
const s = f("inline");
|
|
353
353
|
if (l.style) {
|
|
354
|
-
const
|
|
355
|
-
s.add("color",
|
|
354
|
+
const o = l.style;
|
|
355
|
+
s.add("color", o.color).add("background-color", o.backgroundColor).add("font-family", o.fontFamily).add("line-height", o.lineHeight).add("letter-spacing", o.letterSpacing == null ? void 0 : `${o.letterSpacing * t / 72}px`).add("font-weight", o.bold != null ? o.bold ? "700" : "400" : void 0).add("font-style", o.italic != null ? o.italic ? "italic" : "normal" : void 0).add("text-decoration", o.underline != null ? o.underline ? "underline" : "none" : void 0), (o.fontSize != null || o.fontSizePx != null) && s.add("font-size", `${b(k(o, t).fontSizePx, 2)}px`);
|
|
356
356
|
}
|
|
357
|
-
s.applyTo(a),
|
|
357
|
+
s.applyTo(a), i.appendChild(a);
|
|
358
358
|
}
|
|
359
|
-
return
|
|
359
|
+
return i;
|
|
360
360
|
}
|
|
361
361
|
function R(e, t, r, n) {
|
|
362
362
|
if (X(e)) {
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
for (const l of e.richParagraphs)
|
|
366
|
-
return
|
|
363
|
+
const i = n.createElement("div");
|
|
364
|
+
i.className = g("rich", r), f("block").applyTo(i);
|
|
365
|
+
for (const l of e.richParagraphs) i.appendChild(we(l, t, r, n));
|
|
366
|
+
return i;
|
|
367
367
|
}
|
|
368
368
|
if (Array.isArray(e.lines) && e.lines.length > 0) {
|
|
369
|
-
const
|
|
370
|
-
|
|
369
|
+
const i = n.createElement("div");
|
|
370
|
+
i.className = g("lines", r), f("block").applyTo(i);
|
|
371
371
|
for (const l of e.lines) {
|
|
372
372
|
const a = n.createElement("div");
|
|
373
|
-
a.className =
|
|
373
|
+
a.className = g("line", r), a.textContent = l, f("block").add("white-space", "pre").add("min-height", "1lh").applyTo(a), i.appendChild(a);
|
|
374
374
|
}
|
|
375
|
-
return
|
|
375
|
+
return i;
|
|
376
376
|
}
|
|
377
377
|
return e.text ?? "";
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
const
|
|
381
|
-
|
|
379
|
+
function ye(e, t, r, n) {
|
|
380
|
+
const i = n.createElement("div");
|
|
381
|
+
i.className = g("text", r);
|
|
382
382
|
const l = e.style || {};
|
|
383
|
-
return f("flex").add("width", "100%").add("height", "100%").add("flex-direction", "column").add("justify-content", l.verticalAlign === "middle" ? "center" : l.verticalAlign === "bottom" ? "flex-end" : "flex-start").add("overflow-wrap", "anywhere").add("overflow", "hidden").applyTo(
|
|
383
|
+
return f("flex").add("width", "100%").add("height", "100%").add("flex-direction", "column").add("justify-content", l.verticalAlign === "middle" ? "center" : l.verticalAlign === "bottom" ? "flex-end" : "flex-start").add("overflow-wrap", "anywhere").add("overflow", "hidden").applyTo(i), i.append(R(e, t, r, n)), i;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function Me(e, t, r) {
|
|
386
386
|
const n = r.createElement("img");
|
|
387
|
-
return n.className =
|
|
387
|
+
return n.className = g("image", t), n.src = e.imageData, f("block").add("width", "100%").add("height", "100%").add("object-fit", "contain").applyTo(n), n.alt = e.kind, n;
|
|
388
388
|
}
|
|
389
389
|
function z(e, t, r, n) {
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
-
const l = e.style || {}, a =
|
|
393
|
-
return e.grid ? d.add("position", "relative") : e.kind === "rect" ? (s.top && d.add("border-top",
|
|
394
|
-
}
|
|
395
|
-
function
|
|
396
|
-
const n = r.createElementNS("http://www.w3.org/2000/svg", "svg"),
|
|
397
|
-
n.setAttribute("width", String(Math.max(1,
|
|
390
|
+
const i = n.createElement("div");
|
|
391
|
+
i.className = g("shape", r);
|
|
392
|
+
const l = e.style || {}, a = G(l), s = W(l), o = `${b(a.widthPt * t / 72, 2)}px solid ${a.color}`, d = f("block");
|
|
393
|
+
return e.grid ? d.add("position", "relative") : e.kind === "rect" ? (s.top && d.add("border-top", o), s.right && d.add("border-right", o), s.bottom && d.add("border-bottom", o), s.left && d.add("border-left", o)) : e.kind === "ellipse" ? (d.add("border-radius", "50%"), s.inner && d.add("border", o), l.backgroundColor && d.add("background-color", l.backgroundColor)) : e.kind === "line" && d.add("height", "0").add("border-top", o), d.add("box-sizing", "border-box").add("width", "100%").add("height", "100%"), d.applyTo(i), i;
|
|
394
|
+
}
|
|
395
|
+
function xe(e, t, r) {
|
|
396
|
+
const n = r.createElementNS("http://www.w3.org/2000/svg", "svg"), i = y(e.widthMm, t), l = y(e.heightMm, t);
|
|
397
|
+
n.setAttribute("width", String(Math.max(1, i))), n.setAttribute("height", String(Math.max(1, l))), n.setAttribute("aria-hidden", "true"), n.style.overflow = "visible", n.style.display = "block";
|
|
398
398
|
const a = r.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
399
|
-
a.setAttribute("x1", "0"), a.setAttribute("x2", String(
|
|
400
|
-
const s =
|
|
399
|
+
a.setAttribute("x1", "0"), a.setAttribute("x2", String(i)), a.setAttribute("y1", e.lineDirection === "up" ? String(l) : "0"), a.setAttribute("y2", e.lineDirection === "up" ? "0" : String(l));
|
|
400
|
+
const s = G({ ...e.style, borderColor: e.style?.lineColor ?? e.style?.borderColor });
|
|
401
401
|
return a.setAttribute("stroke", s.color), a.setAttribute("stroke-width", String(s.widthPt * t / 72)), n.appendChild(a), n;
|
|
402
402
|
}
|
|
403
403
|
function j(e, t, r, n) {
|
|
404
|
-
const
|
|
405
|
-
|
|
404
|
+
const i = n.createElement("div");
|
|
405
|
+
i.className = `${g("comp", r)} mr-kind-${e.kind}`;
|
|
406
406
|
const l = f("block").add("position", "absolute").mm("left", e.leftMm, t).mm("top", e.topMm, t).mm("width", e.widthMm, t).mm("height", e.heightMm, t).add("box-sizing", "border-box");
|
|
407
|
-
if (
|
|
408
|
-
return
|
|
407
|
+
if (fe(l, e, t), l.applyTo(i), _(e))
|
|
408
|
+
return i.appendChild(Me(e, r, n)), i;
|
|
409
409
|
if (e.kind === "text")
|
|
410
|
-
return
|
|
410
|
+
return i.appendChild(ye(e, t, r, n)), i;
|
|
411
411
|
if (e.grid) {
|
|
412
412
|
const s = z(e, t, r, n);
|
|
413
|
-
return s.appendChild(
|
|
413
|
+
return s.appendChild(be(e.grid, e, t, r, n)), i.appendChild(s), i;
|
|
414
414
|
}
|
|
415
415
|
if (e.kind === "line" && e.lineDirection)
|
|
416
|
-
return
|
|
416
|
+
return i.appendChild(xe(e, t, n)), i;
|
|
417
417
|
if (e.kind === "line" || e.kind === "rect" || e.kind === "ellipse")
|
|
418
|
-
return
|
|
418
|
+
return i.appendChild(z(e, t, r, n)), i;
|
|
419
419
|
const a = n.createElement("div");
|
|
420
|
-
return a.className =
|
|
420
|
+
return a.className = g("unknown", r), f("block").applyTo(a), a.textContent = e.fallbackText ?? `[${e.kind}]`, a.dataset.mrUnsupported = e.kind, a.setAttribute("role", "note"), i.appendChild(a), i;
|
|
421
421
|
}
|
|
422
422
|
function K(e, t, r, n) {
|
|
423
|
-
const
|
|
424
|
-
return
|
|
423
|
+
const i = n.createElement("div");
|
|
424
|
+
return i.className = g("page", r), f("block", "initial").add("position", "relative").add("font-family", q).add("font-size", `${b(k(void 0, t).fontSizePx, 2)}px`).add("line-height", String(F(void 0))).add("white-space", "pre-wrap").add("direction", "ltr").mm("width", e.pageWidthMm, t).mm("height", e.pageHeightMm, t).add("background-color", "#fff").add("color", Q).add("overflow", "hidden").add("box-sizing", "border-box").applyTo(i), e.components.forEach((l, a) => {
|
|
425
425
|
const s = j(l, t, r, n);
|
|
426
|
-
s.dataset.mrComponentIndex = String(a),
|
|
427
|
-
}),
|
|
426
|
+
s.dataset.mrComponentIndex = String(a), i.appendChild(s);
|
|
427
|
+
}), i;
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function Ne(e, t, r = {}) {
|
|
430
430
|
const n = r.dpi ?? 96;
|
|
431
|
-
|
|
432
|
-
const
|
|
433
|
-
return
|
|
434
|
-
|
|
435
|
-
}),
|
|
436
|
-
}
|
|
437
|
-
function
|
|
438
|
-
const
|
|
439
|
-
return I.set(
|
|
440
|
-
return l.update(s,
|
|
431
|
+
Z(e, "dom", r);
|
|
432
|
+
const i = t.createElement("div");
|
|
433
|
+
return i.className = g("root", r), f("block").applyTo(i), i.dataset.schemaVersion = e.schemaVersion, e.pages.forEach((l) => {
|
|
434
|
+
i.appendChild(K(l, n, r, t));
|
|
435
|
+
}), i;
|
|
436
|
+
}
|
|
437
|
+
function ze(e, t, r, n) {
|
|
438
|
+
const i = { ...r }, l = ie();
|
|
439
|
+
return I.set(i, l), { element: K(e, t, i, n), update(s, o, d) {
|
|
440
|
+
return l.update(s, o && e.components[o.componentIndex], o, d);
|
|
441
441
|
} };
|
|
442
442
|
}
|
|
443
443
|
export {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
444
|
+
Ae as a,
|
|
445
|
+
ze as b,
|
|
446
|
+
g as c,
|
|
447
447
|
K as d,
|
|
448
|
-
|
|
449
|
-
|
|
448
|
+
Ne as e,
|
|
449
|
+
Te as i,
|
|
450
450
|
j as r,
|
|
451
|
-
|
|
451
|
+
ee as t
|
|
452
452
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as n } from "./runtime-
|
|
2
|
-
import { i, a as p, r as d, R as a, s as R } from "./protocol-
|
|
1
|
+
import { c as n } from "./runtime-BE30icyB.js";
|
|
2
|
+
import { i, a as p, r as d, R as a, s as R } from "./protocol-DwtxjXzO.js";
|
|
3
3
|
async function u(r, e) {
|
|
4
4
|
try {
|
|
5
5
|
if (r.operation !== "exportPrepared") throw new TypeError("内置编码 Worker 仅接受 exportPrepared");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./runtime-
|
|
1
|
+
"use strict";const s=require("./runtime-DRSuy_SQ.cjs"),e=require("./protocol-BwbJNVZl.cjs");async function a(r,t){try{if(r.operation!=="exportPrepared")throw new TypeError("内置编码 Worker 仅接受 exportPrepared");return await e.runReportWorkerRequest(s.createReportRuntime({reports:{},budget:r.budget}),r,t)}catch(o){return{protocol:e.REPORT_WORKER_PROTOCOL,id:r.id,error:e.serializeError(o)}}}function R(r=globalThis){const t=o=>{if(!e.isReportWorkerRequest(o.data))return;const i=o.data;a(i,n=>r.postMessage({protocol:e.REPORT_WORKER_PROTOCOL,id:i.id,type:"event",event:n})).then(n=>r.postMessage(n,e.reportWorkerTransferList(n)))};return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}exports.serveReportEncodingWorker=R;
|