@agile-team/mach-report 2.12.0 → 2.13.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/dist/index.js CHANGED
@@ -1,28 +1,28 @@
1
- import { D as Z, a as ye } from "./defaults-DXhiM1ZD.js";
2
- import { b as Ln, c as Dn, d as Fn, L as On, S as zn } from "./defaults-DXhiM1ZD.js";
3
- import { R as _n, e as Bn, f as Wn, p as jn, b as Gn, t as Un, d as Vn } from "./record-bindings-D-5jQlTj.js";
4
- import { a as H, r as _, b as Q, c as W, d as Me, m as ie, e as xe, p as O, f as Ee, P as J } from "./style-CQ1PK8ZB.js";
5
- import { C as Yn, M as Jn, g as Kn, h as Xn } from "./style-CQ1PK8ZB.js";
6
- import { i as ee, a as Te } from "./render-plan-Ck6koX9L.js";
7
- import { R as Qn } from "./render-plan-Ck6koX9L.js";
8
- import { a as tr, v as nr, b as rr, c as ir } from "./validate-DbgEM1Hh.js";
9
- import { v as We } from "./dataset-H5pFuQGU.js";
10
- import { d as ar } from "./dataset-H5pFuQGU.js";
11
- import { h as oe, r as ae, w as Se } from "./assets-Q0wUwNrV.js";
12
- import { O as lr, c as cr, a as dr, b as mr, m as hr } from "./assets-Q0wUwNrV.js";
13
- import { R as je, p as Ge } from "./template-review-BzpcI-tR.js";
14
- import { D as ur, P as fr, a as pr, b as wr, c as vr, d as br, e as yr, f as Mr, g as xr, h as Er, i as Tr, j as Sr, k as Cr, l as Rr, m as Pr, n as Ar, o as kr, q as Ir, r as Nr, s as $r, t as Lr, u as Dr, v as Fr, w as Or, x as zr, y as Hr, z as _r } from "./template-review-BzpcI-tR.js";
15
- import { r as Ce } from "./grid-geometry-BNptEcMm.js";
16
- import { r as Re } from "./grid-strokes-DyyG1q_o.js";
17
- import { r as G, n as Pe, O as Ue } from "./capabilities-CK_7hizc.js";
18
- import { i as Wr } from "./capabilities-CK_7hizc.js";
19
- import { o as Ve } from "./progress-7OSZbFok.js";
20
- import { c as qe } from "./page-window-index-CIuT4BAv.js";
21
- import { v as Ye, R as Je, p as I } from "./template-registry-BjE1VS6g.js";
22
- import { a as Gr, c as Ur, d as Vr, s as qr, b as Yr } from "./template-registry-BjE1VS6g.js";
23
- import { R as Kr, a as Xr, f as Zr, i as Qr, b as ei, c as ti, p as ni, r as ri, v as ii, d as oi } from "./param-validation-BlHHXs6u.js";
24
- import { T as si, c as li, v as ci } from "./tree-CqcQ99NM.js";
25
- const Ke = {
1
+ import { D as Z, a as xe } from "./defaults-DXhiM1ZD.js";
2
+ import { b as Hn, c as _n, d as Bn, L as jn, S as Wn } from "./defaults-DXhiM1ZD.js";
3
+ import { R as Un, e as Vn, f as qn, p as Yn, b as Jn, t as Kn, d as Xn } from "./record-bindings-D-5jQlTj.js";
4
+ import { a as H, r as _, b as Q, c as j, d as Ee, m as ie, e as Te, p as O, f as Se, P as J } from "./style-CQ1PK8ZB.js";
5
+ import { C as Qn, M as er, g as tr, h as nr } from "./style-CQ1PK8ZB.js";
6
+ import { i as ee, a as Ce } from "./render-plan-Ck6koX9L.js";
7
+ import { R as ir } from "./render-plan-Ck6koX9L.js";
8
+ import { a as ar, v as sr, b as lr, c as cr } from "./validate-DbgEM1Hh.js";
9
+ import { v as Ve } from "./dataset-H5pFuQGU.js";
10
+ import { d as mr } from "./dataset-H5pFuQGU.js";
11
+ import { h as oe, r as ae, w as Re } from "./assets-Q0wUwNrV.js";
12
+ import { O as gr, c as ur, a as fr, b as pr, m as wr } from "./assets-Q0wUwNrV.js";
13
+ import { R as se, d as qe, a as Ye, p as Je } from "./template-review-PgEe_Wr9.js";
14
+ import { D as br, P as yr, b as Mr, c as xr, e as Er, f as Tr, g as Sr, h as Cr, i as Rr, j as Pr, k as Ar, l as kr, m as Ir, n as Nr, o as $r, q as Lr, r as Dr, s as Fr, t as Or, u as zr, v as Hr, w as _r, x as Br, y as jr, z as Wr } from "./template-review-PgEe_Wr9.js";
15
+ import { r as Pe } from "./grid-geometry-BNptEcMm.js";
16
+ import { r as Ae } from "./grid-strokes-DyyG1q_o.js";
17
+ import { r as G, n as ke, O as Ke } from "./capabilities-CK_7hizc.js";
18
+ import { i as Ur } from "./capabilities-CK_7hizc.js";
19
+ import { o as Xe } from "./progress-7OSZbFok.js";
20
+ import { c as Ze } from "./page-window-index-CIuT4BAv.js";
21
+ import { v as Ie, R as Ne, p as I } from "./template-registry-BjE1VS6g.js";
22
+ import { a as qr, c as Yr, d as Jr, s as Kr, b as Xr } from "./template-registry-BjE1VS6g.js";
23
+ import { R as Qr, a as ei, f as ti, i as ni, b as ri, c as ii, p as oi, r as ai, v as si, d as li } from "./param-validation-BlHHXs6u.js";
24
+ import { T as di, c as mi, v as hi } from "./tree-CqcQ99NM.js";
25
+ const Qe = {
26
26
  root: "mr-root",
27
27
  page: "mr-page",
28
28
  comp: "mr-comp",
@@ -40,9 +40,9 @@ const Ke = {
40
40
  unknown: "mr-unknown"
41
41
  };
42
42
  function E(e, t) {
43
- return t?.classNames?.[e] ?? Ke[e];
43
+ return t?.classNames?.[e] ?? Qe[e];
44
44
  }
45
- class Xe {
45
+ class et {
46
46
  constructor() {
47
47
  this.props = [];
48
48
  }
@@ -64,50 +64,50 @@ class Xe {
64
64
  }
65
65
  }
66
66
  function y(e, t = "unset") {
67
- return new Xe().add("all", t).add("display", e).add("box-sizing", "border-box");
67
+ return new et().add("all", t).add("display", e).add("box-sizing", "border-box");
68
68
  }
69
- function Ae(e, t, n) {
69
+ function $e(e, t, n) {
70
70
  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(Q(t))).add("text-align", t.align);
71
71
  const r = _(t, n);
72
72
  e.add("font-size", `${H(r.fontSizePx, 2)}px`);
73
73
  }
74
- function Ze(e, t, n) {
74
+ function tt(e, t, n) {
75
75
  const r = t.style ?? {};
76
- Ae(e, r, n), e.add("background-color", r.backgroundColor).add("opacity", r.opacity != null ? String(r.opacity) : void 0).add("transform", r.rotateDeg ? `rotate(${r.rotateDeg}deg)` : void 0);
76
+ $e(e, r, n), e.add("background-color", r.backgroundColor).add("opacity", r.opacity != null ? String(r.opacity) : void 0).add("transform", r.rotateDeg ? `rotate(${r.rotateDeg}deg)` : void 0);
77
77
  }
78
- function Qe(e, t, n, r, i, o) {
78
+ function nt(e, t, n, r, i, o) {
79
79
  const s = e.cell, a = o.createElement("td");
80
80
  a.className = E("cell", i), a.dataset.mrRowIndex = String(e.ri), a.dataset.mrColumnIndex = String(e.ci), a.setAttribute("role", t.table?.role === "header" ? "columnheader" : "cell"), s.colSpan && (a.colSpan = s.colSpan), s.rowSpan && (a.rowSpan = s.rowSpan);
81
- const l = xe(t.style, s.style), c = y("block").add("position", "absolute").mm("left", e.xMm, r).mm("top", e.yMm, r).mm("width", e.widthMm, r).mm("height", e.heightMm, r).add("background-color", l.backgroundColor).add("vertical-align", l.verticalAlign ?? "middle");
82
- Ae(c, l, r), c.applyTo(a);
81
+ const l = Te(t.style, s.style), c = y("block").add("position", "absolute").mm("left", e.xMm, r).mm("top", e.yMm, r).mm("width", e.widthMm, r).mm("height", e.heightMm, r).add("background-color", l.backgroundColor).add("vertical-align", l.verticalAlign ?? "middle");
82
+ $e(c, l, r), c.applyTo(a);
83
83
  const d = o.createElement("div");
84
84
  d.className = "mr-cell-content", y("flex").add("position", "absolute").mm("left", n + (s.indentMm ?? 0), r).mm("right", n, r).mm("top", n, r).mm("bottom", n, r).add("flex-direction", "column").add("justify-content", l.verticalAlign === "top" ? "flex-start" : l.verticalAlign === "bottom" ? "flex-end" : "center").add("overflow-wrap", "anywhere").add("overflow", "hidden").applyTo(d), s.text != null && d.append(s.text);
85
- for (const m of s.children ?? []) d.appendChild(ke(m, r, i, o));
85
+ for (const m of s.children ?? []) d.appendChild(Le(m, r, i, o));
86
86
  return a.appendChild(d), a;
87
87
  }
88
- function et(e, t, n, r) {
89
- return Re(e, t).map((i) => {
88
+ function rt(e, t, n, r) {
89
+ return Ae(e, t).map((i) => {
90
90
  const o = `${H(i.widthPt * n / 72, 2)}px solid ${i.color}`, s = r.createElement("div");
91
91
  s.className = "mr-grid-edge", s.setAttribute("aria-hidden", "true");
92
92
  const a = i.kind === "h";
93
93
  return y("block").add("position", "absolute").add("pointer-events", "none").mm("left", a ? i.from : i.pos, n).mm("top", a ? i.pos : i.from, n).mm("width", a ? i.to - i.from : 0, n).mm("height", a ? 0 : i.to - i.from, n).add(a ? "border-top" : "border-left", o).applyTo(s), s;
94
94
  });
95
95
  }
96
- function tt(e, t, n, r, i) {
96
+ function it(e, t, n, r, i) {
97
97
  const o = i.createElement("table");
98
98
  o.className = E("grid", r), o.setAttribute("role", "table"), y("block").add("position", "relative").add("width", "100%").add("height", "100%").applyTo(o);
99
- const s = Ce(e, t.widthMm, t.heightMm), a = i.createElement("tbody");
99
+ const s = Pe(e, t.widthMm, t.heightMm), a = i.createElement("tbody");
100
100
  y("contents").applyTo(a), o.appendChild(a);
101
101
  const l = e.cells.map(() => {
102
102
  const d = i.createElement("tr");
103
103
  return d.className = E("row", r), d.setAttribute("role", "row"), y("contents").applyTo(d), a.appendChild(d), d;
104
104
  });
105
105
  for (const d of s.cells)
106
- l[d.ri].appendChild(Qe(d, t, e.paddingMm ?? 0.5, n, r, i));
106
+ l[d.ri].appendChild(nt(d, t, e.paddingMm ?? 0.5, n, r, i));
107
107
  const c = i.createElement("div");
108
- return y("block").add("position", "relative").add("width", "100%").add("height", "100%").applyTo(c), c.append(o, ...et(s, t, n, i)), c;
108
+ return y("block").add("position", "relative").add("width", "100%").add("height", "100%").applyTo(c), c.append(o, ...rt(s, t, n, i)), c;
109
109
  }
110
- function nt(e, t, n, r) {
110
+ function ot(e, t, n, r) {
111
111
  const i = r.createElement("div");
112
112
  i.className = E("paragraph", n), y("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);
113
113
  for (const o of e.segments || []) {
@@ -122,11 +122,11 @@ function nt(e, t, n, r) {
122
122
  }
123
123
  return i;
124
124
  }
125
- function rt(e, t, n, r) {
126
- if (Te(e)) {
125
+ function at(e, t, n, r) {
126
+ if (Ce(e)) {
127
127
  const i = r.createElement("div");
128
128
  i.className = E("rich", n), y("block").applyTo(i);
129
- for (const o of e.richParagraphs) i.appendChild(nt(o, t, n, r));
129
+ for (const o of e.richParagraphs) i.appendChild(ot(o, t, n, r));
130
130
  return i;
131
131
  }
132
132
  if (Array.isArray(e.lines) && e.lines.length > 0) {
@@ -140,68 +140,68 @@ function rt(e, t, n, r) {
140
140
  }
141
141
  return e.text ?? "";
142
142
  }
143
- function it(e, t, n, r) {
143
+ function st(e, t, n, r) {
144
144
  const i = r.createElement("div");
145
145
  i.className = E("text", n);
146
146
  const o = e.style || {};
147
- return y("flex").add("width", "100%").add("height", "100%").add("flex-direction", "column").add("justify-content", o.verticalAlign === "middle" ? "center" : o.verticalAlign === "bottom" ? "flex-end" : "flex-start").add("overflow-wrap", "anywhere").add("overflow", "hidden").applyTo(i), i.append(rt(e, t, n, r)), i;
147
+ return y("flex").add("width", "100%").add("height", "100%").add("flex-direction", "column").add("justify-content", o.verticalAlign === "middle" ? "center" : o.verticalAlign === "bottom" ? "flex-end" : "flex-start").add("overflow-wrap", "anywhere").add("overflow", "hidden").applyTo(i), i.append(at(e, t, n, r)), i;
148
148
  }
149
- function ot(e, t, n) {
149
+ function lt(e, t, n) {
150
150
  const r = n.createElement("img");
151
151
  return r.className = E("image", t), r.src = e.imageData, y("block").add("width", "100%").add("height", "100%").add("object-fit", "contain").applyTo(r), r.alt = e.kind, r;
152
152
  }
153
- function ue(e, t, n, r) {
153
+ function fe(e, t, n, r) {
154
154
  const i = r.createElement("div");
155
155
  i.className = E("shape", n);
156
- const o = e.style || {}, s = W(o), a = Me(o), l = `${H(s.widthPt * t / 72, 2)}px solid ${s.color}`, c = y("block");
156
+ const o = e.style || {}, s = j(o), a = Ee(o), l = `${H(s.widthPt * t / 72, 2)}px solid ${s.color}`, c = y("block");
157
157
  return e.grid ? c.add("position", "relative") : e.kind === "rect" ? (a.top && c.add("border-top", l), a.right && c.add("border-right", l), a.bottom && c.add("border-bottom", l), a.left && c.add("border-left", l)) : e.kind === "ellipse" ? (a.inner && c.add("border", l).add("border-radius", "50%"), o.backgroundColor && c.add("background-color", o.backgroundColor)) : e.kind === "line" && c.add("height", "0").add("border-top", l), c.add("box-sizing", "border-box").add("width", "100%").add("height", "100%"), c.applyTo(i), i;
158
158
  }
159
- function at(e, t, n) {
159
+ function ct(e, t, n) {
160
160
  const r = n.createElementNS("http://www.w3.org/2000/svg", "svg"), i = ie(e.widthMm, t), o = ie(e.heightMm, t);
161
161
  r.setAttribute("width", String(Math.max(1, i))), r.setAttribute("height", String(Math.max(1, o))), r.setAttribute("aria-hidden", "true"), r.style.overflow = "visible", r.style.display = "block";
162
162
  const s = n.createElementNS("http://www.w3.org/2000/svg", "line");
163
163
  s.setAttribute("x1", "0"), s.setAttribute("x2", String(i)), s.setAttribute("y1", e.lineDirection === "up" ? String(o) : "0"), s.setAttribute("y2", e.lineDirection === "up" ? "0" : String(o));
164
- const a = W({ ...e.style, borderColor: e.style?.lineColor ?? e.style?.borderColor });
164
+ const a = j({ ...e.style, borderColor: e.style?.lineColor ?? e.style?.borderColor });
165
165
  return s.setAttribute("stroke", a.color), s.setAttribute("stroke-width", String(a.widthPt * t / 72)), r.appendChild(s), r;
166
166
  }
167
- function ke(e, t, n, r) {
167
+ function Le(e, t, n, r) {
168
168
  const i = r.createElement("div");
169
169
  i.className = `${E("comp", n)} mr-kind-${e.kind}`;
170
170
  const o = y("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");
171
- if (Ze(o, e, t), o.applyTo(i), ee(e))
172
- return i.appendChild(ot(e, n, r)), i;
171
+ if (tt(o, e, t), o.applyTo(i), ee(e))
172
+ return i.appendChild(lt(e, n, r)), i;
173
173
  if (e.kind === "text")
174
- return i.appendChild(it(e, t, n, r)), i;
174
+ return i.appendChild(st(e, t, n, r)), i;
175
175
  if (e.grid) {
176
- const a = ue(e, t, n, r);
177
- return a.appendChild(tt(e.grid, e, t, n, r)), i.appendChild(a), i;
176
+ const a = fe(e, t, n, r);
177
+ return a.appendChild(it(e.grid, e, t, n, r)), i.appendChild(a), i;
178
178
  }
179
179
  if (e.kind === "line" && e.lineDirection)
180
- return i.appendChild(at(e, t, r)), i;
180
+ return i.appendChild(ct(e, t, r)), i;
181
181
  if (e.kind === "line" || e.kind === "rect" || e.kind === "ellipse")
182
- return i.appendChild(ue(e, t, n, r)), i;
182
+ return i.appendChild(fe(e, t, n, r)), i;
183
183
  const s = r.createElement("div");
184
184
  return s.className = E("unknown", n), y("block").applyTo(s), s.textContent = e.fallbackText ?? `[${e.kind}]`, s.dataset.mrUnsupported = e.kind, s.setAttribute("role", "note"), i.appendChild(s), i;
185
185
  }
186
- function st(e, t, n, r) {
186
+ function dt(e, t, n, r) {
187
187
  const i = r.createElement("div");
188
- return i.className = E("page", n), y("block", "initial").add("position", "relative").add("font-family", Z).add("font-size", `${H(_(void 0, t).fontSizePx, 2)}px`).add("line-height", String(Q(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", ye).add("overflow", "hidden").add("box-sizing", "border-box").applyTo(i), e.components.forEach((o, s) => {
189
- const a = ke(o, t, n, r);
188
+ return i.className = E("page", n), y("block", "initial").add("position", "relative").add("font-family", Z).add("font-size", `${H(_(void 0, t).fontSizePx, 2)}px`).add("line-height", String(Q(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", xe).add("overflow", "hidden").add("box-sizing", "border-box").applyTo(i), e.components.forEach((o, s) => {
189
+ const a = Le(o, t, n, r);
190
190
  a.dataset.mrComponentIndex = String(s), i.appendChild(a);
191
191
  }), i;
192
192
  }
193
- function gn(e, t, n = {}) {
193
+ function wn(e, t, n = {}) {
194
194
  const r = n.dpi ?? 96;
195
195
  G(e, "dom", n);
196
196
  const i = t.createElement("div");
197
197
  return i.className = E("root", n), y("block").applyTo(i), i.dataset.schemaVersion = e.schemaVersion, e.pages.forEach((o) => {
198
- i.appendChild(st(o, r, n, t));
198
+ i.appendChild(dt(o, r, n, t));
199
199
  }), i;
200
200
  }
201
201
  function R(e) {
202
202
  if (e?.aborted) throw e.reason ?? new DOMException("The operation was aborted.", "AbortError");
203
203
  }
204
- const lt = (e, t) => (R(t), /^data:image\/(?:png|jpe?g|webp|gif|svg\+xml)[;,]/i.test(e) ? new Promise((n, r) => {
204
+ const mt = (e, t) => (R(t), /^data:image\/(?:png|jpe?g|webp|gif|svg\+xml)[;,]/i.test(e) ? new Promise((n, r) => {
205
205
  const i = new Image(), o = () => {
206
206
  i.onload = null, i.onerror = null, t?.removeEventListener("abort", s);
207
207
  }, s = () => {
@@ -213,63 +213,63 @@ const lt = (e, t) => (R(t), /^data:image\/(?:png|jpe?g|webp|gif|svg\+xml)[;,]/i.
213
213
  o(), r(new Error("Image could not be decoded for Canvas output."));
214
214
  }, t?.addEventListener("abort", s, { once: !0 }), i.src = e;
215
215
  }) : Promise.reject(new TypeError("Canvas imageData must be an image data URL; provide imageLoader for other sources.")));
216
- function ct(e, t, n) {
216
+ function ht(e, t, n) {
217
217
  return R(n), n ? new Promise((r, i) => {
218
218
  const o = () => i(n.reason ?? new DOMException("The operation was aborted.", "AbortError"));
219
219
  n.addEventListener("abort", o, { once: !0 }), Promise.resolve().then(() => e(t, n)).then(r, i).finally(() => n.removeEventListener("abort", o));
220
220
  }) : e(t);
221
221
  }
222
- async function dt(e, t, n) {
222
+ async function gt(e, t, n) {
223
223
  const r = /* @__PURE__ */ new Map();
224
224
  for (const i of e.components)
225
- !ee(i) || r.has(i.imageData) || r.set(i.imageData, await ct(t, i.imageData, n));
225
+ !ee(i) || r.has(i.imageData) || r.set(i.imageData, await ht(t, i.imageData, n));
226
226
  return R(n), r;
227
227
  }
228
- function mt(e, t, n, r, i, o) {
228
+ function ut(e, t, n, r, i, o) {
229
229
  const s = t, a = s.naturalWidth ?? s.width ?? i, l = s.naturalHeight ?? s.height ?? o;
230
230
  if (a <= 0 || l <= 0) throw new RangeError("Decoded Canvas image dimensions must be positive.");
231
231
  const c = Math.min(i / a, o / l), d = a * c, m = l * c;
232
232
  e.drawImage(t, n + (i - d) / 2, r + (o - m) / 2, d, m);
233
233
  }
234
- function ht(e) {
235
- return qe(e.pageHeightsPx, e.gapPx).window(e.viewportHeightPx, e.scrollTopPx, e.overscan);
234
+ function ft(e) {
235
+ return Ze(e.pageHeightsPx, e.gapPx).window(e.viewportHeightPx, e.scrollTopPx, e.overscan);
236
236
  }
237
- const se = 96 / 25.4;
238
- function le(e, t = 96) {
239
- const n = t / 96 * se;
237
+ const le = 96 / 25.4;
238
+ function ce(e, t = 96) {
239
+ const n = t / 96 * le;
240
240
  return {
241
241
  widthPx: Math.max(1, Math.round(e.pageWidthMm * n)),
242
242
  heightPx: Math.max(1, Math.round(e.pageHeightMm * n))
243
243
  };
244
244
  }
245
- function Ie(e, t, n, r = 64e6) {
245
+ function De(e, t, n, r = 64e6) {
246
246
  if (!Number.isFinite(t) || t <= 0 || !Number.isFinite(n) || n <= 0) throw new RangeError("Canvas dpr and dpi must be positive finite numbers.");
247
247
  if (!Number.isFinite(r) || r <= 0) throw new RangeError("maxCanvasPixels must be positive and finite.");
248
- const i = le(e, n), o = Math.round(i.widthPx * t), s = Math.round(i.heightPx * t);
248
+ const i = ce(e, n), o = Math.round(i.widthPx * t), s = Math.round(i.heightPx * t);
249
249
  if (!Number.isSafeInteger(o) || !Number.isSafeInteger(s) || o * s > r) throw new RangeError("Canvas page exceeds maxCanvasPixels; reduce resolution or split the report.");
250
250
  return { width: o, height: s };
251
251
  }
252
- function Ne(e, t, n, r) {
253
- const i = document.createElement("canvas"), { widthPx: o, heightPx: s } = le(e, n), a = Ie(e, t, n, r);
252
+ function Fe(e, t, n, r) {
253
+ const i = document.createElement("canvas"), { widthPx: o, heightPx: s } = ce(e, n), a = De(e, t, n, r);
254
254
  i.width = a.width, i.height = a.height, i.style.width = `${o}px`, i.style.height = `${s}px`;
255
255
  const l = i.getContext("2d");
256
256
  if (!l)
257
257
  throw new Error("当前环境不支持 Canvas 2D(测试需真浏览器,见 e2e/canvas.spec.ts)");
258
258
  return l.scale(t, t), l.fillStyle = "#ffffff", l.fillRect(0, 0, o, s), { canvas: i, ctx: l };
259
259
  }
260
- function un(e, t = 96) {
260
+ function vn(e, t = 96) {
261
261
  return _(e, t).fontSizePx;
262
262
  }
263
- function $e(e, t, n, r, i, o, s, a = "top") {
263
+ function Oe(e, t, n, r, i, o, s, a = "top") {
264
264
  e.font = `${t.italic ? "italic " : ""}${t.bold ? "bold " : ""}${t.fontSizePx}px ${s}`, "letterSpacing" in e && (e.letterSpacing = "0px"), e.fillStyle = t.color, e.textBaseline = "alphabetic";
265
265
  const l = t.fontSizePx * t.lineHeight, c = t.text === "" ? [""] : t.text.split(`
266
266
  `), d = c.length * l;
267
267
  let m = r;
268
268
  a === "middle" ? m = r + (o - d) / 2 : a === "bottom" && (m = r + o - d), c.forEach((h, g) => {
269
- gt(e, h, t, n, m + g * l + t.fontSizePx * 0.8, i);
269
+ pt(e, h, t, n, m + g * l + t.fontSizePx * 0.8, i);
270
270
  }), e.textAlign = "left";
271
271
  }
272
- function gt(e, t, n, r, i, o) {
272
+ function pt(e, t, n, r, i, o) {
273
273
  const s = Array.from(t), a = n.letterSpacingPx ?? 0;
274
274
  if (!a) {
275
275
  e.textAlign = n.align === "center" ? "center" : n.align === "right" ? "right" : "left";
@@ -284,34 +284,34 @@ function gt(e, t, n, r, i, o) {
284
284
  e.fillText(m, c + e.measureText(d).width + h * a, i), d += m;
285
285
  });
286
286
  }
287
- function ut(e, t, n, r, i, o, s) {
288
- for (const a of Re(t, n))
287
+ function wt(e, t, n, r, i, o, s) {
288
+ for (const a of Ae(t, n))
289
289
  e.strokeStyle = a.color, e.lineWidth = O(a.widthPt, s), e.beginPath(), a.kind === "v" ? (e.moveTo(r + a.pos * o, i + a.from * o), e.lineTo(r + a.pos * o, i + a.to * o)) : (e.moveTo(r + a.from * o, i + a.pos * o), e.lineTo(r + a.to * o, i + a.pos * o)), e.stroke();
290
290
  }
291
- function ft(e, t, n, r, i, o) {
291
+ function vt(e, t, n, r, i, o) {
292
292
  e.beginPath(), t.top && (e.moveTo(n, r), e.lineTo(n + i, r)), t.right && (e.moveTo(n + i, r), e.lineTo(n + i, r + o)), t.bottom && (e.moveTo(n + i, r + o), e.lineTo(n, r + o)), t.left && (e.moveTo(n, r + o), e.lineTo(n, r)), e.stroke();
293
293
  }
294
- function pt(e, t, n, r, i, o, s, a, l, c, d) {
295
- const m = Ce(t, o / a, s / a);
294
+ function bt(e, t, n, r, i, o, s, a, l, c, d) {
295
+ const m = Pe(t, o / a, s / a);
296
296
  for (const g of m.cells) {
297
297
  const f = g.cell.style?.backgroundColor ?? n.style?.backgroundColor;
298
298
  f && (e.fillStyle = f, e.fillRect(r + g.xMm * a, i + g.yMm * a, g.widthMm * a, g.heightMm * a));
299
299
  }
300
- ut(e, m, n, r, i, a, l);
300
+ wt(e, m, n, r, i, a, l);
301
301
  const h = t.paddingMm ?? 0.5;
302
302
  for (const g of m.cells) {
303
303
  const f = g.cell.text ?? "";
304
304
  if (!f) continue;
305
- const v = xe(n.style, g.cell.style), N = _(v, l), C = g.cell.indentMm ?? 0, T = Math.max(0, g.widthMm - 2 * h - C), A = Se(f, T, { fontSizePt: N.fontSizePt, bold: v.bold, italic: v.italic, fontFamily: v.fontFamily ?? c, letterSpacingPt: v.letterSpacing }, d).join(`
305
+ const v = Te(n.style, g.cell.style), N = _(v, l), C = g.cell.indentMm ?? 0, T = Math.max(0, g.widthMm - 2 * h - C), A = Re(f, T, { fontSizePt: N.fontSizePt, bold: v.bold, italic: v.italic, fontFamily: v.fontFamily ?? c, letterSpacingPt: v.letterSpacing }, d).join(`
306
306
  `);
307
- $e(
307
+ Oe(
308
308
  e,
309
309
  {
310
310
  text: A,
311
311
  fontSizePx: N.fontSizePx,
312
312
  bold: v.bold ?? !1,
313
313
  italic: v.italic,
314
- color: Ee(v, ye),
314
+ color: Se(v, xe),
315
315
  align: v.align ?? "left",
316
316
  lineHeight: Q(v),
317
317
  letterSpacingPx: O(v.letterSpacing ?? 0, l)
@@ -325,64 +325,64 @@ function pt(e, t, n, r, i, o, s, a, l, c, d) {
325
325
  );
326
326
  }
327
327
  }
328
- function wt(e, t, n, r, i, o, s, a, l) {
329
- const c = t.style ?? {}, d = _(c, s), m = Te(t) ? t.richParagraphs.map((h) => h.segments.map((g) => g.text ?? g.field ?? "").join("")).join(`
328
+ function yt(e, t, n, r, i, o, s, a, l) {
329
+ const c = t.style ?? {}, d = _(c, s), m = Ce(t) ? t.richParagraphs.map((h) => h.segments.map((g) => g.text ?? g.field ?? "").join("")).join(`
330
330
  `) : t.lines?.length ? t.lines.join(`
331
- `) : Se(t.text ?? "", t.widthMm, { fontSizePt: d.fontSizePt, bold: c.bold, italic: c.italic, fontFamily: c.fontFamily ?? a, letterSpacingPt: c.letterSpacing }, l).join(`
331
+ `) : Re(t.text ?? "", t.widthMm, { fontSizePt: d.fontSizePt, bold: c.bold, italic: c.italic, fontFamily: c.fontFamily ?? a, letterSpacingPt: c.letterSpacing }, l).join(`
332
332
  `);
333
- $e(e, {
333
+ Oe(e, {
334
334
  text: m,
335
335
  fontSizePx: d.fontSizePx,
336
336
  bold: c.bold ?? !1,
337
337
  italic: c.italic,
338
- color: Ee(c),
338
+ color: Se(c),
339
339
  align: c.align ?? "left",
340
340
  lineHeight: Q(c),
341
341
  letterSpacingPx: O(c.letterSpacing ?? 0, s)
342
342
  }, n, r, i, o, c.fontFamily ?? a, c.verticalAlign);
343
343
  }
344
- function ce(e, t, n, r, i, o, s) {
344
+ function de(e, t, n, r, i, o, s) {
345
345
  const a = t.leftMm * n, l = t.topMm * n, c = t.widthMm * n, d = t.heightMm * n, m = t.style ?? {};
346
346
  if (ee(t)) {
347
347
  const h = s?.get(t.imageData);
348
- h ? mt(e, h, a, l, c, d) : fe(e, t, a, l, c, d);
348
+ h ? ut(e, h, a, l, c, d) : pe(e, t, a, l, c, d);
349
349
  return;
350
350
  }
351
351
  if (t.grid) {
352
- pt(e, t.grid, t, a, l, c, d, n, r, i, o);
352
+ bt(e, t.grid, t, a, l, c, d, n, r, i, o);
353
353
  return;
354
354
  }
355
355
  switch (t.kind) {
356
356
  case "text": {
357
- wt(e, t, a, l, c, d, r, i, o);
357
+ yt(e, t, a, l, c, d, r, i, o);
358
358
  break;
359
359
  }
360
360
  case "rect": {
361
- const h = W(m), g = Me(m);
362
- m.backgroundColor && (e.fillStyle = m.backgroundColor, e.fillRect(a, l, c, d)), g.inner && (e.strokeStyle = h.color, e.lineWidth = O(h.widthPt, r), ft(e, g, a, l, c, d));
361
+ const h = j(m), g = Ee(m);
362
+ m.backgroundColor && (e.fillStyle = m.backgroundColor, e.fillRect(a, l, c, d)), g.inner && (e.strokeStyle = h.color, e.lineWidth = O(h.widthPt, r), vt(e, g, a, l, c, d));
363
363
  break;
364
364
  }
365
365
  case "line": {
366
- const h = W({ ...m, borderColor: m.lineColor ?? m.borderColor });
366
+ const h = j({ ...m, borderColor: m.lineColor ?? m.borderColor });
367
367
  e.strokeStyle = h.color, e.lineWidth = O(h.widthPt, r), e.beginPath();
368
368
  const g = t.lineDirection === "up" ? l + d : t.lineDirection === "down" ? l : l + d / 2, f = t.lineDirection === "up" ? l : t.lineDirection === "down" ? l + d : l + d / 2;
369
369
  e.moveTo(a, g), e.lineTo(a + c, f), e.stroke();
370
370
  break;
371
371
  }
372
372
  case "ellipse": {
373
- const h = W(m);
373
+ const h = j(m);
374
374
  e.strokeStyle = h.color, e.lineWidth = O(h.widthPt, r), m.backgroundColor && (e.fillStyle = m.backgroundColor, e.beginPath(), e.ellipse(a + c / 2, l + d / 2, c / 2, d / 2, 0, 0, Math.PI * 2), e.fill()), e.beginPath(), e.ellipse(a + c / 2, l + d / 2, c / 2, d / 2, 0, 0, Math.PI * 2), e.stroke();
375
375
  break;
376
376
  }
377
377
  default:
378
- fe(e, t, a, l, c, d);
378
+ pe(e, t, a, l, c, d);
379
379
  break;
380
380
  }
381
381
  }
382
- function fe(e, t, n, r, i, o) {
382
+ function pe(e, t, n, r, i, o) {
383
383
  e.save(), e.strokeStyle = "#94a3b8", e.strokeRect(n, r, i, o), e.fillStyle = "#64748b", e.font = "12px sans-serif", e.fillText(t.fallbackText ?? `[${t.kind}]`, n + 3, r + 14), e.restore();
384
384
  }
385
- async function fn(e, t = {}) {
385
+ async function bn(e, t = {}) {
386
386
  if (typeof document > "u")
387
387
  throw new Error("renderPlanToImages 需要浏览器环境(SSR/Node 请在客户端钩子中调用)");
388
388
  const { format: n = "png", quality: r = 0.92, ...i } = t;
@@ -394,17 +394,17 @@ async function fn(e, t = {}) {
394
394
  const s = [...o.diagnostics, ...G(e, "canvas", t)], a = n === "jpeg" ? "image/jpeg" : "image/png", l = [], c = Math.min(e.pages.length - 1, t.end ?? e.pages.length - 1);
395
395
  for (let d = Math.max(0, t.start ?? 0); d <= c; d++) {
396
396
  R(t.signal);
397
- const m = await Le(e.pages[d], d, i, s);
397
+ const m = await ze(e.pages[d], d, i, s);
398
398
  try {
399
- l.push(await vt(m, a, r, t.signal));
399
+ l.push(await Mt(m, a, r, t.signal));
400
400
  } finally {
401
401
  m.width = 0, m.height = 0;
402
402
  }
403
- await Ve(t, l.length, c - Math.max(0, t.start ?? 0) + 1);
403
+ await Xe(t, l.length, c - Math.max(0, t.start ?? 0) + 1);
404
404
  }
405
405
  return R(t.signal), { blobs: l, diagnostics: s };
406
406
  }
407
- function vt(e, t, n, r) {
407
+ function Mt(e, t, n, r) {
408
408
  return R(r), new Promise((i, o) => {
409
409
  const s = () => o(r?.reason ?? new DOMException("The operation was aborted.", "AbortError"));
410
410
  r?.addEventListener("abort", s, { once: !0 });
@@ -417,23 +417,23 @@ function vt(e, t, n, r) {
417
417
  }
418
418
  });
419
419
  }
420
- function pn(e, t = {}) {
420
+ function yn(e, t = {}) {
421
421
  if (R(t.signal), typeof document > "u")
422
422
  throw new Error("renderPlanToCanvas 需要浏览器环境(SSR 请在客户端钩子中调用)");
423
- const n = t.dpr ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1), r = t.dpi ?? 96, i = r / 96 * se, o = t.fontFamily ?? Z, s = t.measurer ?? oe, a = Math.max(0, t.start ?? 0), l = Math.min(e.pages.length - 1, t.end ?? e.pages.length - 1), c = [], d = G(e, "canvas", t), m = bt(e, a, l);
423
+ const n = t.dpr ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1), r = t.dpi ?? 96, i = r / 96 * le, o = t.fontFamily ?? Z, s = t.measurer ?? oe, a = Math.max(0, t.start ?? 0), l = Math.min(e.pages.length - 1, t.end ?? e.pages.length - 1), c = [], d = G(e, "canvas", t), m = xt(e, a, l);
424
424
  for (const h of m)
425
- Pe(h, t), d.push(h);
426
- if (t.fidelity === "strict" && m.length) throw new Ue(d);
425
+ ke(h, t), d.push(h);
426
+ if (t.fidelity === "strict" && m.length) throw new Ke(d);
427
427
  for (let h = a; h <= l; h++) {
428
428
  R(t.signal);
429
- const g = e.pages[h], { canvas: f, ctx: v } = Ne(g, n, r, t.maxCanvasPixels);
429
+ const g = e.pages[h], { canvas: f, ctx: v } = Fe(g, n, r, t.maxCanvasPixels);
430
430
  for (const N of g.components)
431
- ce(v, N, i, r, o, s);
431
+ de(v, N, i, r, o, s);
432
432
  c.push(f);
433
433
  }
434
434
  return { canvases: c, diagnostics: d };
435
435
  }
436
- function bt(e, t, n) {
436
+ function xt(e, t, n) {
437
437
  return n < t ? [] : e.pages.slice(t, n + 1).flatMap((r, i) => r.components.flatMap((o, s) => ee(o) ? [{
438
438
  code: "async-image-required",
439
439
  severity: "warning",
@@ -445,40 +445,40 @@ function bt(e, t, n) {
445
445
  message: "Use renderPlanToCanvasAsync or renderPlanToImages to decode and include images."
446
446
  }] : []));
447
447
  }
448
- async function wn(e, t = {}) {
448
+ async function Mn(e, t = {}) {
449
449
  if (typeof document > "u") throw new Error("renderPlanToCanvasAsync 需要浏览器环境(Node 请使用 PDF 或 XLSX 输出)");
450
450
  R(t.signal);
451
451
  const n = await ae(e, { ...t, format: "canvas" });
452
452
  e = n.plan;
453
453
  const r = [...n.diagnostics, ...G(e, "canvas", t)], i = [], o = Math.min(e.pages.length - 1, t.end ?? e.pages.length - 1);
454
454
  for (let s = Math.max(0, t.start ?? 0); s <= o; s++)
455
- i.push(await Le(e.pages[s], s, t, r));
455
+ i.push(await ze(e.pages[s], s, t, r));
456
456
  return { canvases: i, diagnostics: r };
457
457
  }
458
- async function Le(e, t, n, r) {
459
- const i = n.dpr ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1), o = n.dpi ?? 96, s = n.fontFamily ?? Z, a = await De(e, t, n, r);
458
+ async function ze(e, t, n, r) {
459
+ const i = n.dpr ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1), o = n.dpi ?? 96, s = n.fontFamily ?? Z, a = await He(e, t, n, r);
460
460
  R(n.signal);
461
- const { canvas: l, ctx: c } = Ne(e, i, o, n.maxCanvasPixels);
462
- for (const d of e.components) ce(c, d, o / 25.4, o, s, n.measurer ?? oe, a);
461
+ const { canvas: l, ctx: c } = Fe(e, i, o, n.maxCanvasPixels);
462
+ for (const d of e.components) de(c, d, o / 25.4, o, s, n.measurer ?? oe, a);
463
463
  return l;
464
464
  }
465
- async function De(e, t, n, r) {
466
- const i = n.imageLoader ?? lt;
467
- return dt(e, async (o, s) => {
465
+ async function He(e, t, n, r) {
466
+ const i = n.imageLoader ?? mt;
467
+ return gt(e, async (o, s) => {
468
468
  try {
469
469
  return await i(o, s);
470
470
  } catch (a) {
471
471
  if (s?.aborted) throw a;
472
472
  const l = e.components.findIndex((m) => m.imageData === o), c = e.components[l], d = { code: "image-decode-failed", severity: "warning", format: "canvas", pageIndex: t, componentIndex: l, kind: c.kind, nid: c.nid, message: "Image decoding failed; raster output was cancelled instead of omitting the image." };
473
- throw r.push(d), Pe(d, n), a;
473
+ throw r.push(d), ke(d, n), a;
474
474
  }
475
475
  }, n.signal);
476
476
  }
477
- function vn(e, t = {}) {
478
- const n = t.dpr ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1), r = t.dpi ?? 96, i = r / 96 * se, o = t.fontFamily ?? Z, s = t.measurer ?? oe, a = t.overscan ?? 1, l = t.gapPx ?? 18, c = t.pagesPerFrame ?? 1, d = e.pages.map((u) => u.pageHeightMm * i), m = Math.max(1, ...e.pages.map((u) => u.pageWidthMm * i)), h = { start: 0, end: -1 };
477
+ function xn(e, t = {}) {
478
+ const n = t.dpr ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1), r = t.dpi ?? 96, i = r / 96 * le, o = t.fontFamily ?? Z, s = t.measurer ?? oe, a = t.overscan ?? 1, l = t.gapPx ?? 18, c = t.pagesPerFrame ?? 1, d = e.pages.map((u) => u.pageHeightMm * i), m = Math.max(1, ...e.pages.map((u) => u.pageWidthMm * i)), h = { start: 0, end: -1 };
479
479
  let g = null, f = null, v = null, N = null, C = [], T = 0, A = [], U = 0, B = new AbortController();
480
- const me = [];
481
- function ze() {
480
+ const he = [];
481
+ function je() {
482
482
  const u = g;
483
483
  u.innerHTML = "", f = document.createElement("div"), f.style.cssText = `width:${m}px;margin:0 auto;`, v = document.createElement("div"), N = document.createElement("div"), f.appendChild(v), C = [];
484
484
  const M = Math.min(e.pages.length, 3 + a * 2);
@@ -488,25 +488,25 @@ function vn(e, t = {}) {
488
488
  }
489
489
  f.appendChild(N), u.appendChild(f);
490
490
  }
491
- async function He(u, M) {
491
+ async function We(u, M) {
492
492
  const D = U, b = await ae(e, { ...t, signal: B.signal, format: "canvas", start: M, end: M });
493
- me.push(...b.diagnostics);
494
- const S = b.plan.pages[M], Y = await De(S, M, { ...t, signal: B.signal }, me);
493
+ he.push(...b.diagnostics);
494
+ const S = b.plan.pages[M], Y = await He(S, M, { ...t, signal: B.signal }, he);
495
495
  if (D !== U || !g) return;
496
- const { widthPx: ne, heightPx: re } = le(S, r);
496
+ const { widthPx: ne, heightPx: re } = ce(S, r);
497
497
  let $ = u.firstElementChild;
498
498
  (!$ || $.tagName !== "CANVAS") && ($ = document.createElement("canvas"), u.innerHTML = "", u.appendChild($));
499
- const ge = Ie(S, n, r, t.maxCanvasPixels);
500
- $.width = ge.width, $.height = ge.height, $.style.width = `${ne}px`, $.style.height = `${re}px`;
499
+ const ue = De(S, n, r, t.maxCanvasPixels);
500
+ $.width = ue.width, $.height = ue.height, $.style.width = `${ne}px`, $.style.height = `${re}px`;
501
501
  const F = $.getContext("2d");
502
502
  if (F) {
503
503
  F.setTransform(1, 0, 0, 1, 0, 0), F.scale(n, n), F.fillStyle = "#ffffff", F.fillRect(0, 0, ne, re);
504
- for (const Be of S.components)
505
- ce(F, Be, i, r, o, s, Y);
504
+ for (const Ue of S.components)
505
+ de(F, Ue, i, r, o, s, Y);
506
506
  $.dataset.canvasPage = String(M), u.style.height = `${re}px`, u.style.width = `${ne}px`;
507
507
  }
508
508
  }
509
- function _e(u) {
509
+ function Ge(u) {
510
510
  U++, h.start = u.start, h.end = u.end, v.style.height = `${u.start * l + d.slice(0, u.start).reduce((b, S) => b + S, 0)}px`;
511
511
  const M = e.pages.length - 1 - u.end;
512
512
  N.style.height = `${M * l + d.slice(u.end + 1).reduce((b, S) => b + S, 0)}px`;
@@ -532,7 +532,7 @@ function vn(e, t = {}) {
532
532
  let u = Math.max(1, c);
533
533
  for (; A.length > 0 && u-- > 0; ) {
534
534
  const M = A.shift(), D = C[M - h.start];
535
- D && He(D, M).catch(() => {
535
+ D && We(D, M).catch(() => {
536
536
  });
537
537
  }
538
538
  A.length > 0 && te();
@@ -541,14 +541,14 @@ function vn(e, t = {}) {
541
541
  function V() {
542
542
  T || (T = requestAnimationFrame(() => {
543
543
  T = 0;
544
- const u = g, M = ht({
544
+ const u = g, M = ft({
545
545
  pageHeightsPx: d,
546
546
  viewportHeightPx: u.clientHeight,
547
547
  scrollTopPx: u.scrollTop,
548
548
  overscan: a,
549
549
  gapPx: l
550
550
  });
551
- M.start !== h.start || M.end !== h.end ? _e(M) : te();
551
+ M.start !== h.start || M.end !== h.end ? Ge(M) : te();
552
552
  }));
553
553
  }
554
554
  let q = null;
@@ -556,20 +556,20 @@ function vn(e, t = {}) {
556
556
  attach(u) {
557
557
  if (typeof document > "u")
558
558
  throw new Error("createCanvasPager 需要浏览器环境(SSR 请在客户端钩子中调用 attach)");
559
- R(t.signal), B = new AbortController(), t.signal?.addEventListener("abort", he, { once: !0 }), G(e, "canvas", t), g = u, ze(), u.addEventListener("scroll", V, { passive: !0 }), typeof ResizeObserver < "u" && (q = new ResizeObserver(() => V()), q.observe(u)), V();
559
+ R(t.signal), B = new AbortController(), t.signal?.addEventListener("abort", ge, { once: !0 }), G(e, "canvas", t), g = u, je(), u.addEventListener("scroll", V, { passive: !0 }), typeof ResizeObserver < "u" && (q = new ResizeObserver(() => V()), q.observe(u)), V();
560
560
  },
561
561
  destroy() {
562
- U++, B.abort(), t.signal?.removeEventListener("abort", he), T && cancelAnimationFrame(T), T = 0, q?.disconnect(), q = null, g?.removeEventListener("scroll", V), A = [], f?.remove(), g = null;
562
+ U++, B.abort(), t.signal?.removeEventListener("abort", ge), T && cancelAnimationFrame(T), T = 0, q?.disconnect(), q = null, g?.removeEventListener("scroll", V), A = [], f?.remove(), g = null;
563
563
  },
564
564
  window() {
565
565
  return { ...h };
566
566
  }
567
567
  };
568
- function he() {
568
+ function ge() {
569
569
  B.abort(t.signal?.reason);
570
570
  }
571
571
  }
572
- function Fe(e, t, n) {
572
+ function _e(e, t, n) {
573
573
  let r, i;
574
574
  if (typeof e == "string") {
575
575
  const o = J[e];
@@ -578,7 +578,7 @@ function Fe(e, t, n) {
578
578
  } else typeof e == "number" ? (r = e, i = t ?? 297) : (r = e.widthMm, i = e.heightMm);
579
579
  return n ? { widthMm: i, heightMm: r } : { widthMm: r, heightMm: i };
580
580
  }
581
- class yt {
581
+ class Et {
582
582
  constructor() {
583
583
  this.pages = [], this.pending = null, this.templateParams = void 0;
584
584
  }
@@ -611,12 +611,12 @@ class yt {
611
611
  */
612
612
  page(t = "a4", n = {}, r) {
613
613
  this.collect();
614
- const o = r != null && !("margins" in r) && !("landscape" in r) && ("marginTopMm" in r || "marginBottomMm" in r || "marginLeftMm" in r || "marginRightMm" in r) ? { margins: r } : typeof n == "number" ? r ?? {} : n, { widthMm: s, heightMm: a } = Fe(
614
+ const o = r != null && !("margins" in r) && !("landscape" in r) && ("marginTopMm" in r || "marginBottomMm" in r || "marginLeftMm" in r || "marginRightMm" in r) ? { margins: r } : typeof n == "number" ? r ?? {} : n, { widthMm: s, heightMm: a } = _e(
615
615
  t,
616
616
  typeof n == "number" ? n : void 0,
617
617
  o.landscape
618
618
  ), l = o.margins ?? {};
619
- return this.pending = new Mt(this, {
619
+ return this.pending = new Tt(this, {
620
620
  widthMm: s,
621
621
  heightMm: a,
622
622
  marginTopMm: l.marginTopMm ?? 10,
@@ -638,7 +638,7 @@ class yt {
638
638
  };
639
639
  }
640
640
  }
641
- class Mt {
641
+ class Tt {
642
642
  constructor(t, n) {
643
643
  this.parent = t, this.page = n, this.components = [];
644
644
  }
@@ -707,11 +707,11 @@ class Mt {
707
707
  return this.done().build();
708
708
  }
709
709
  }
710
- function bn() {
711
- return new yt();
710
+ function En() {
711
+ return new Et();
712
712
  }
713
- function yn(e, t = {}) {
714
- return We([], e), e.fields.map((n) => ({
713
+ function Tn(e, t = {}) {
714
+ return Ve([], e), e.fields.map((n) => ({
715
715
  field: n.field,
716
716
  header: `${n.label ?? n.field}${n.unit ? ` (${n.unit})` : ""}`,
717
717
  semanticRole: n.semanticRole ?? (n.type === "number" || n.type === "decimal" ? "measure" : n.type === "date" ? "date" : n.enum ? "dimension" : "text"),
@@ -726,7 +726,7 @@ function K(e, t, n) {
726
726
  if (e !== void 0 && !["left", "center", "right", "justify", ...n ? ["auto"] : []].includes(e))
727
727
  throw new Error(`${t} 必须是 left/center/right/justify${n ? "/auto" : ""}`);
728
728
  }
729
- function xt(e) {
729
+ function St(e) {
730
730
  const t = e.layout ?? "page";
731
731
  if (t !== "page" && t !== "wide")
732
732
  throw new Error("layout 必须是 page 或 wide");
@@ -737,16 +737,16 @@ function xt(e) {
737
737
  const n = e.columnWidthMm ?? 30;
738
738
  return P(n, "columnWidthMm"), { layout: t, columnWidthMm: n };
739
739
  }
740
- function Et(e) {
740
+ function Ct(e) {
741
741
  const t = e.paper === void 0 ? "a4" : e.paper;
742
742
  if (typeof t != "string" && (typeof t != "object" || t === null) || e.landscape !== void 0 && typeof e.landscape != "boolean")
743
743
  throw new Error("paper 必须是纸张预设名或 { widthMm, heightMm } 对象,landscape 必须是布尔值");
744
744
  if (typeof t == "string" && !Object.prototype.hasOwnProperty.call(J, t))
745
745
  throw new Error(`未知纸张预设 "${t}"(可用:${Object.keys(J).join("/")})`);
746
- const n = Fe(t, void 0, e.landscape), r = n.widthMm, i = n.heightMm;
746
+ const n = _e(t, void 0, e.landscape), r = n.widthMm, i = n.heightMm;
747
747
  return P(r, "纸张 widthMm"), P(i, "纸张 heightMm"), { widthMm: r, heightMm: i };
748
748
  }
749
- function Tt(e) {
749
+ function Rt(e) {
750
750
  if (e.margins !== void 0 && (!e.margins || typeof e.margins != "object" || Array.isArray(e.margins)))
751
751
  throw new Error("margins 必须是页边距对象");
752
752
  const t = e.margins ?? {}, n = {
@@ -758,7 +758,7 @@ function Tt(e) {
758
758
  for (const [r, i] of Object.entries(n)) P(i, r, !0);
759
759
  return n;
760
760
  }
761
- function St(e, t) {
761
+ function Pt(e, t) {
762
762
  const n = e.dataset === void 0 ? "detail" : e.dataset;
763
763
  if (typeof n != "string" || !n.trim())
764
764
  throw new Error("dataset 必须是非空字符串");
@@ -771,7 +771,7 @@ function St(e, t) {
771
771
  throw new Error("标题高度与间距占满页面,必须为表格保留可用高度");
772
772
  return { dataset: n, titleHeightMm: r, hasTitle: o, titleSpaceMm: s };
773
773
  }
774
- function Ct(e) {
774
+ function At(e) {
775
775
  if (e.listOptions !== void 0 && (!e.listOptions || typeof e.listOptions != "object" || Array.isArray(e.listOptions)))
776
776
  throw new Error("listOptions 必须是列表配置对象");
777
777
  const t = e.listOptions ?? {};
@@ -782,7 +782,7 @@ function Ct(e) {
782
782
  }
783
783
  return t;
784
784
  }
785
- function Rt(e) {
785
+ function kt(e) {
786
786
  let t = 0, n = 0;
787
787
  for (const [r, i] of e.entries()) {
788
788
  if (!i || typeof i.header != "string" || typeof i.field != "string" || !i.field.trim())
@@ -791,8 +791,8 @@ function Rt(e) {
791
791
  }
792
792
  return { fixedWidthMm: t, maxFlex: n };
793
793
  }
794
- function Pt(e, t, n, r) {
795
- const { fixedWidthMm: i, maxFlex: o } = Rt(e.columns);
794
+ function It(e, t, n, r) {
795
+ const { fixedWidthMm: i, maxFlex: o } = kt(e.columns);
796
796
  if (t === "page" && i > r)
797
797
  throw new Error(`固定列宽 ${i}mm 超出页面可用宽度 ${r}mm`);
798
798
  const s = r - i;
@@ -804,19 +804,19 @@ function Pt(e, t, n, r) {
804
804
  return P(g, `columns[${h}] 分配后的 widthMm`), { ...m, widthMm: g };
805
805
  }), fixedWidthMm: i, maxFlex: o };
806
806
  }
807
- function Mn(e) {
807
+ function Sn(e) {
808
808
  if (!e || typeof e != "object")
809
809
  throw new Error("标准明细模板需要 options 对象");
810
810
  if (!Array.isArray(e.columns) || e.columns.length === 0)
811
811
  throw new Error("columns 至少需要一列");
812
- const { layout: t, columnWidthMm: n } = xt(e), r = Et(e);
812
+ const { layout: t, columnWidthMm: n } = St(e), r = Ct(e);
813
813
  let i = r.widthMm;
814
- const o = r.heightMm, s = Tt(e);
814
+ const o = r.heightMm, s = Rt(e);
815
815
  let a = i - s.marginLeftMm - s.marginRightMm;
816
816
  const l = o - s.marginTopMm - s.marginBottomMm;
817
817
  if (t === "page" && a <= 0 || l <= 0)
818
818
  throw new Error("页边距占满纸张,必须保留正的可用宽度和高度");
819
- const { dataset: c, titleHeightMm: d, hasTitle: m, titleSpaceMm: h } = St(e, l), g = Ct(e), { columns: f, fixedWidthMm: v, maxFlex: N } = Pt(e, t, n, a);
819
+ const { dataset: c, titleHeightMm: d, hasTitle: m, titleSpaceMm: h } = Pt(e, l), g = At(e), { columns: f, fixedWidthMm: v, maxFlex: N } = It(e, t, n, a);
820
820
  t === "wide" && (a = f.reduce((T, A) => T + A.widthMm, 0), P(a, "宽表总列宽"), i = a + s.marginLeftMm + s.marginRightMm, P(i, "宽表总宽度"));
821
821
  const C = { widthMm: i, heightMm: o, ...s, components: [], ...t === "wide" ? { layout: t } : {} };
822
822
  return m && C.components.push({
@@ -841,7 +841,7 @@ function Mn(e) {
841
841
  widthMm: t === "wide" || N > 0 ? a : v
842
842
  }), e.params === void 0 ? { pages: [C] } : { params: e.params, pages: [C] };
843
843
  }
844
- function xn(e) {
844
+ function Cn(e) {
845
845
  if (e.components !== void 0 && e.pages !== void 0) throw new TypeError("标签 components 与 pages 只能选择一种");
846
846
  const { dataset: t, rowKey: n, copies: r, params: i } = e, o = e.pages ?? [{ components: e.components ?? [] }], s = {
847
847
  repeat: { dataset: t, ...n === void 0 ? {} : { rowKey: n }, ...r === void 0 ? {} : { copies: r } },
@@ -856,11 +856,29 @@ function xn(e) {
856
856
  components: l.components,
857
857
  ...l.meta === void 0 ? {} : { meta: l.meta }
858
858
  }))
859
- }, a = Ye(s);
860
- if (!a.ok) throw new Je(a.errors);
859
+ }, a = Ie(s);
860
+ if (!a.ok) throw new Ne(a.errors);
861
861
  return JSON.parse(JSON.stringify(s));
862
862
  }
863
- function En(e) {
863
+ function Nt(e) {
864
+ if (!e || typeof e != "object" || !e.repeat)
865
+ throw new se("config", "defineLabelReport 需要带 repeat 的固定标签模板");
866
+ const t = Ie(e);
867
+ if (!t.ok) throw new Ne(t.errors);
868
+ return e.repeat.dataset;
869
+ }
870
+ function we(e, t) {
871
+ if (!Array.isArray(e)) throw new se("validate", "标签数据应为对象数组;请从业务响应中提取行数组");
872
+ return { [t]: e };
873
+ }
874
+ function Rn(e) {
875
+ const { template: t, rows: n, load: r, dataSchema: i, params: o, pagination: s, dataValidation: a } = e, l = Nt(t);
876
+ if (n !== void 0 == (r !== void 0) || r !== void 0 && typeof r != "function")
877
+ throw new se("config", "标签报表应且只能配置 rows 或 load 其中一种数据来源");
878
+ const c = { template: t, params: o, pagination: s, dataValidation: a, ...i === void 0 ? {} : { dataSchema: { [l]: i } } };
879
+ return r ? qe({ ...c, load: r, mapData: (d) => we(d, l) }) : { ...c, datasets: we(n, l) };
880
+ }
881
+ function Pn(e) {
864
882
  return e;
865
883
  }
866
884
  class L extends Error {
@@ -876,12 +894,12 @@ function x(e) {
876
894
  const t = new Error("模板操作已取消");
877
895
  throw t.name = "AbortError", t;
878
896
  }
879
- function pe(e) {
897
+ function ve(e) {
880
898
  const t = e ? Number(e.revision) : 0;
881
899
  if (!Number.isSafeInteger(t) || t < 0 || t >= Number.MAX_SAFE_INTEGER) throw new L("history", "修订号无效或已达上限");
882
900
  return String(t + 1);
883
901
  }
884
- function Tn(e, t = {}) {
902
+ function An(e, t = {}) {
885
903
  const n = async (s, a) => {
886
904
  x(a);
887
905
  const l = await e.read(s, a);
@@ -900,7 +918,7 @@ function Tn(e, t = {}) {
900
918
  if (!g || g.ok !== !0) throw new L("review", g?.issues?.find((f) => f.severity === "error")?.message ?? "模板发布检查未通过");
901
919
  x(l.signal);
902
920
  }
903
- const d = pe(s), m = I({ ...a, revision: d }), h = { revision: d, document: m, publishedAt: (t.now?.() ?? /* @__PURE__ */ new Date()).toISOString() };
921
+ const d = ve(s), m = I({ ...a, revision: d }), h = { revision: d, document: m, publishedAt: (t.now?.() ?? /* @__PURE__ */ new Date()).toISOString() };
904
922
  return c !== void 0 && (h.restoredFrom = c), i({ id: s.id, revision: d, publishedRevision: d, published: m }, l, h);
905
923
  };
906
924
  return {
@@ -920,7 +938,7 @@ function Tn(e, t = {}) {
920
938
  },
921
939
  saveDraft: async (s, a) => {
922
940
  a = { ...a }, x(a.signal);
923
- const l = I(t.migrate ? await t.migrate(s) : s), c = await r(l.id, a), d = pe(c);
941
+ const l = I(t.migrate ? await t.migrate(s) : s), c = await r(l.id, a), d = ve(c);
924
942
  return i({
925
943
  id: l.id,
926
944
  revision: d,
@@ -946,7 +964,7 @@ function Tn(e, t = {}) {
946
964
  }
947
965
  };
948
966
  }
949
- function Sn() {
967
+ function kn() {
950
968
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
951
969
  return {
952
970
  read: async (n, r) => {
@@ -974,7 +992,7 @@ function Sn() {
974
992
  }
975
993
  };
976
994
  }
977
- function At(e, t) {
995
+ function $t(e, t) {
978
996
  const n = e.publishedRevision ?? e.published?.revision;
979
997
  for (const r of [e.draftRevision, n]) if (r !== void 0 && (typeof r != "string" || !r.trim())) throw new TypeError("模板生命周期修订应为非空字符串");
980
998
  if (e.draftRevision !== void 0 && e.draftRevision !== t.revision) throw new TypeError("可编辑文档应与草稿修订一致");
@@ -982,25 +1000,25 @@ function At(e, t) {
982
1000
  if (!e.published && n !== void 0 && n !== t.revision) throw new TypeError("发布修订需要对应的独立文档");
983
1001
  return { ...e.draftRevision === void 0 ? {} : { draftRevision: e.draftRevision }, ...n === void 0 ? {} : { publishedRevision: n } };
984
1002
  }
985
- function Cn(e, t) {
1003
+ function In(e, t) {
986
1004
  const n = I(e);
987
1005
  if (t.id === n.id) throw new Error("复制模板应使用新的 ID");
988
1006
  const { revision: r, ...i } = n;
989
1007
  return I({ ...i, id: t.id, name: t.name });
990
1008
  }
991
- function Rn(e) {
1009
+ function Nn(e) {
992
1010
  if (!Array.isArray(e) || e.length > 1e3) throw new RangeError("本地模板目录最多 1000 项");
993
1011
  const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = [];
994
1012
  for (const i of e) {
995
1013
  const o = I(i.document);
996
1014
  if (t.has(o.id)) throw new Error(`模板 ID 重复:${o.id}`);
997
1015
  if (i.category !== void 0 && (typeof i.category != "string" || i.category.length > 128) || i.tags !== void 0 && (!Array.isArray(i.tags) || i.tags.length > 20 || i.tags.some((c) => typeof c != "string" || c.length > 128))) throw new TypeError("模板分类和标签无效");
998
- const s = At(i, o), { template: a, ...l } = o;
1016
+ const s = $t(i, o), { template: a, ...l } = o;
999
1017
  t.set(o.id, o), i.published ? n.set(o.id, I(i.published)) : s.publishedRevision && n.set(o.id, I(o)), r.push({ ...l, ...s, ...i.category ? { category: i.category } : {}, ...i.tags ? { tags: [...i.tags] } : {} });
1000
1018
  }
1001
1019
  return r.sort((i, o) => i.id < o.id ? -1 : 1), {
1002
1020
  search: async (i) => {
1003
- we(i.signal);
1021
+ be(i.signal);
1004
1022
  const o = i.limit ?? 30;
1005
1023
  if (!Number.isSafeInteger(o) || o < 1 || o > 100) throw new RangeError("模板每页数量应为 1–100");
1006
1024
  const s = i.query?.trim().toLocaleLowerCase() ?? "", a = r.filter((c) => (!i.category || c.category === i.category) && (!i.cursor || c.id > i.cursor) && (!s || [c.id, c.name, c.description, ...c.tags ?? []].some((d) => d?.toLocaleLowerCase().includes(s)))), l = /* @__PURE__ */ new Map();
@@ -1008,26 +1026,26 @@ function Rn(e) {
1008
1026
  return JSON.parse(JSON.stringify({ items: a.slice(0, o), ...a.length > o ? { next: a[o - 1].id } : {}, categories: Array.from(l, ([c, d]) => ({ id: c, label: c, count: d })) }));
1009
1027
  },
1010
1028
  get: async (i, o) => {
1011
- we(o.signal);
1029
+ be(o.signal);
1012
1030
  const s = o.mode === "published" ? n.get(i) : t.get(i);
1013
1031
  return s ? I(s) : void 0;
1014
1032
  }
1015
1033
  };
1016
1034
  }
1017
- function we(e) {
1035
+ function be(e) {
1018
1036
  if (!e?.aborted) return;
1019
1037
  const t = new Error("模板目录操作已取消");
1020
1038
  throw t.name = "AbortError", t;
1021
1039
  }
1022
- function Pn(e) {
1040
+ function $n(e) {
1023
1041
  return e.map((t) => t.map((n) => /[\t\r\n"]/.test(n) ? `"${n.replace(/"/g, '""')}"` : n).join(" ")).join(`\r
1024
1042
  `);
1025
1043
  }
1026
- function kt(e, t) {
1044
+ function Lt(e, t) {
1027
1045
  const n = e[e.length - 1];
1028
1046
  e.length > 1 && n?.length === 1 && n[0] === "" && /[\r\n]$/.test(t) && e.pop();
1029
1047
  }
1030
- function An(e, t = 1e4) {
1048
+ function Ln(e, t = 1e4) {
1031
1049
  if (e.length > 4 * 1024 * 1024) throw new Error("Clipboard text limit exceeded");
1032
1050
  const n = [[]];
1033
1051
  let r = "", i = !1, o = !1, s = 0;
@@ -1067,9 +1085,9 @@ function An(e, t = 1e4) {
1067
1085
  r += c;
1068
1086
  }
1069
1087
  if (i) throw new Error("Unclosed clipboard quote");
1070
- return a(), kt(n, e), n;
1088
+ return a(), Lt(n, e), n;
1071
1089
  }
1072
- class It extends Error {
1090
+ class Dt extends Error {
1073
1091
  constructor(t, n, r) {
1074
1092
  const i = typeof n.label == "string" ? n.label : "单元格", o = {
1075
1093
  definition: `${i}的编辑器配置无效`,
@@ -1086,46 +1104,46 @@ class It extends Error {
1086
1104
  }
1087
1105
  }
1088
1106
  function p(e, t, n) {
1089
- throw new It(t, e, n);
1107
+ throw new Dt(t, e, n);
1090
1108
  }
1091
- function Oe(e) {
1109
+ function Be(e) {
1092
1110
  if (typeof e != "string" || !/^\d{4}-\d{2}-\d{2}$/.test(e) || e.startsWith("0000-")) return !1;
1093
1111
  const t = /* @__PURE__ */ new Date(`${e}T00:00:00.000Z`);
1094
1112
  return Number.isFinite(t.getTime()) && t.toISOString().slice(0, 10) === e;
1095
1113
  }
1096
- function Nt(e) {
1114
+ function Ft(e) {
1097
1115
  const [t = "", n = "0"] = String(e).toLowerCase().split("e");
1098
1116
  return Math.max(0, (t.split(".")[1]?.length ?? 0) - Number(n));
1099
1117
  }
1100
- function $t(e, t) {
1101
- e.min !== void 0 && t < e.min && p(e, "min", e.min), e.max !== void 0 && t > e.max && p(e, "max", e.max), e.precision !== void 0 && Nt(t) > e.precision && p(e, "precision", e.precision);
1118
+ function Ot(e, t) {
1119
+ e.min !== void 0 && t < e.min && p(e, "min", e.min), e.max !== void 0 && t > e.max && p(e, "max", e.max), e.precision !== void 0 && Ft(t) > e.precision && p(e, "precision", e.precision);
1102
1120
  }
1103
- function Lt(e, t) {
1104
- Oe(t) || p(e, "date"), e.min !== void 0 && t < e.min && p(e, "min", e.min), e.max !== void 0 && t > e.max && p(e, "max", e.max);
1121
+ function zt(e, t) {
1122
+ Be(t) || p(e, "date"), e.min !== void 0 && t < e.min && p(e, "min", e.min), e.max !== void 0 && t > e.max && p(e, "max", e.max);
1105
1123
  }
1106
- function Dt(e) {
1124
+ function Ht(e) {
1107
1125
  [e.min, e.max].some((t) => t !== void 0 && !Number.isFinite(t)) && p(e, "definition"), e.min !== void 0 && e.max !== void 0 && e.min > e.max && p(e, "definition"), e.precision !== void 0 && (!Number.isInteger(e.precision) || e.precision < 0 || e.precision > 15) && p(e, "definition");
1108
1126
  }
1109
- function Ft(e) {
1110
- [e.min, e.max].some((t) => t !== void 0 && !Oe(t)) && p(e, "definition"), e.min !== void 0 && e.max !== void 0 && e.min > e.max && p(e, "definition");
1127
+ function _t(e) {
1128
+ [e.min, e.max].some((t) => t !== void 0 && !Be(t)) && p(e, "definition"), e.min !== void 0 && e.max !== void 0 && e.min > e.max && p(e, "definition");
1111
1129
  }
1112
- function Ot(e, t) {
1130
+ function Bt(e, t) {
1113
1131
  (!Array.isArray(t.options) || !t.options.length) && p(t, "definition");
1114
1132
  const n = e.valueType === "text" ? "string" : e.valueType, r = /* @__PURE__ */ new Set();
1115
1133
  for (const i of t.options)
1116
1134
  (!i || typeof i.value !== n || typeof i.value == "number" && !Number.isFinite(i.value)) && p(t, "definition"), i.label !== void 0 && typeof i.label != "string" && p(t, "definition"), r.has(i.value) && p(t, "definition"), r.add(i.value);
1117
1135
  }
1118
- function zt(e) {
1136
+ function jt(e) {
1119
1137
  e.required !== void 0 && typeof e.required != "boolean" && p(e, "definition"), [e.label, e.hint, e.unit].some((t) => t !== void 0 && typeof t != "string") && p(e, "definition"), e.type === "boolean" && [e.trueLabel, e.falseLabel].some((t) => t !== void 0 && typeof t != "string") && p(e, "definition");
1120
1138
  }
1121
- function Ht(e, t) {
1122
- (!t || typeof t != "object" || Array.isArray(t) || !["text", "number", "boolean", "enum", "date"].includes(t.type)) && p(t ?? { type: "text" }, "definition"), zt(t), (t.type === "number" || t.type === "boolean") && e.valueType !== t.type && p(t, "type"), (t.type === "text" || t.type === "date") && e.valueType !== "text" && p(t, "type"), t.type === "number" && Dt(t), t.type === "text" && t.maxLength !== void 0 && (!Number.isInteger(t.maxLength) || t.maxLength < 0) && p(t, "definition"), t.type === "date" && Ft(t), t.type === "enum" && Ot(e, t);
1139
+ function Wt(e, t) {
1140
+ (!t || typeof t != "object" || Array.isArray(t) || !["text", "number", "boolean", "enum", "date"].includes(t.type)) && p(t ?? { type: "text" }, "definition"), jt(t), (t.type === "number" || t.type === "boolean") && e.valueType !== t.type && p(t, "type"), (t.type === "text" || t.type === "date") && e.valueType !== "text" && p(t, "type"), t.type === "number" && Ht(t), t.type === "text" && t.maxLength !== void 0 && (!Number.isInteger(t.maxLength) || t.maxLength < 0) && p(t, "definition"), t.type === "date" && _t(t), t.type === "enum" && Bt(e, t);
1123
1141
  }
1124
- function kn(e, t, n) {
1125
- if (!e.editable) throw new je("readonly");
1126
- n && Ht(e, n);
1127
- const r = Ge(e, t);
1128
- return n ? (n.required && typeof r == "string" && !r.trim() && p(n, "required"), r === null || r === "" ? (n.required && p(n, "required"), r) : (n.type === "number" && $t(n, r), n.type === "date" && Lt(n, r), n.type === "text" && n.maxLength !== void 0 && [...String(r)].length > n.maxLength && p(n, "length", n.maxLength), n.type === "enum" && !n.options.some((i) => Object.is(i.value, r)) && p(n, "choice"), r)) : r;
1142
+ function Dn(e, t, n) {
1143
+ if (!e.editable) throw new Ye("readonly");
1144
+ n && Wt(e, n);
1145
+ const r = Je(e, t);
1146
+ return n ? (n.required && typeof r == "string" && !r.trim() && p(n, "required"), r === null || r === "" ? (n.required && p(n, "required"), r) : (n.type === "number" && Ot(n, r), n.type === "date" && zt(n, r), n.type === "text" && n.maxLength !== void 0 && [...String(r)].length > n.maxLength && p(n, "length", n.maxLength), n.type === "enum" && !n.options.some((i) => Object.is(i.value, r)) && p(n, "choice"), r)) : r;
1129
1147
  }
1130
1148
  class w extends Error {
1131
1149
  constructor(t) {
@@ -1142,10 +1160,10 @@ async function X(e, t = 1) {
1142
1160
  if (e.scanned += t, e.scanned > e.maxScanned) throw new w("limit");
1143
1161
  z(e.signal), Math.floor(e.scanned / 2048) > n && (await e.yieldToHost(), z(e.signal));
1144
1162
  }
1145
- function de(e) {
1163
+ function me(e) {
1146
1164
  return e.table?.role === "header" ? -Math.max(1, e.grid?.cells.length ?? 1) : e.table?.rowIndex ?? 0;
1147
1165
  }
1148
- function ve(e, t, n) {
1166
+ function ye(e, t, n) {
1149
1167
  if (![t.pageIndex, t.componentIndex, t.rowIndex, t.columnIndex].every((a) => Number.isSafeInteger(a) && a >= 0)) throw new w("selection");
1150
1168
  const r = e.pages[t.pageIndex]?.components[t.componentIndex];
1151
1169
  if (!r?.grid || t.rowIndex >= r.grid.cells.length) throw new w("selection");
@@ -1155,50 +1173,50 @@ function ve(e, t, n) {
1155
1173
  if (o && s && o.id === s.id) {
1156
1174
  const a = s.columnKeys.indexOf(o.columnKeys[t.columnIndex] ?? "");
1157
1175
  if (a < 0) throw new w("selection");
1158
- return { grid: o.id, row: de(r) + t.rowIndex, column: a };
1176
+ return { grid: o.id, row: me(r) + t.rowIndex, column: a };
1159
1177
  }
1160
1178
  return { grid: `${t.pageIndex}:${t.componentIndex}`, row: t.rowIndex, column: t.columnIndex };
1161
1179
  }
1162
- function _t(e, t, n) {
1163
- const r = ve(e, t.anchor, t.anchor), i = ve(e, t.focus, t.anchor);
1180
+ function Gt(e, t, n) {
1181
+ const r = ye(e, t.anchor, t.anchor), i = ye(e, t.focus, t.anchor);
1164
1182
  if (r.grid !== i.grid) throw new w("selection");
1165
1183
  const o = (Math.abs(r.row - i.row) + 1) * (Math.abs(r.column - i.column) + 1);
1166
1184
  if (!Number.isSafeInteger(o) || o > n) throw new w("limit");
1167
1185
  return { grid: r.grid, rowStart: Math.min(r.row, i.row), rowEnd: Math.max(r.row, i.row), columnStart: Math.min(r.column, i.column), columnEnd: Math.max(r.column, i.column), origin: e.pages[t.anchor.pageIndex].components[t.anchor.componentIndex].table };
1168
1186
  }
1169
- function Bt(e) {
1187
+ function Ut(e) {
1170
1188
  if (!e) return !1;
1171
1189
  const t = e.replace(/"[^"]*"|\\.|\[(?![hms]+\])[^\]]*\]/gi, "");
1172
1190
  return /[ymdhs]/i.test(t);
1173
1191
  }
1174
- function Wt(e) {
1175
- if (e.valueType === "text" || e.valueType === "boolean" || Bt(e.numberFormat)) return null;
1192
+ function Vt(e) {
1193
+ if (e.valueType === "text" || e.valueType === "boolean" || Ut(e.numberFormat)) return null;
1176
1194
  const t = e.value;
1177
1195
  if (typeof t != "number" || !Number.isFinite(t)) return null;
1178
1196
  if (Number.isInteger(t) && !Number.isSafeInteger(t)) throw new w("precision");
1179
1197
  return t;
1180
1198
  }
1181
- function jt(e, t, n) {
1199
+ function qt(e, t, n) {
1182
1200
  if (e.seen.has(n)) return;
1183
1201
  e.seen.add(n), e.selected++;
1184
- const r = t ? Wt(t) : null;
1202
+ const r = t ? Vt(t) : null;
1185
1203
  r === null ? e.excluded++ : e.values.push(r);
1186
1204
  }
1187
- function Gt(e, t, n, r) {
1205
+ function Yt(e, t, n, r) {
1188
1206
  return r.origin ? e.table?.id === r.origin.id : `${t}:${n}` === r.grid;
1189
1207
  }
1190
- function Ut(e, t, n) {
1208
+ function Jt(e, t, n) {
1191
1209
  return n.origin ? n.origin.columnKeys.indexOf(e.table.columnKeys[t] ?? "") : t;
1192
1210
  }
1193
- function Vt(e, t, n, r) {
1194
- const i = r.origin ? de(e) + t : t, o = Ut(e, n, r);
1211
+ function Kt(e, t, n, r) {
1212
+ const i = r.origin ? me(e) + t : t, o = Jt(e, n, r);
1195
1213
  return i < r.rowStart || i > r.rowEnd || o < r.columnStart || o > r.columnEnd ? null : `${r.grid}:${i}:${o}`;
1196
1214
  }
1197
- function qt(e, t) {
1198
- const n = t.origin ? de(e) : 0, r = Math.max(0, t.rowStart - n), i = Math.min(e.grid.cells.length, t.rowEnd - n + 1);
1215
+ function Xt(e, t) {
1216
+ const n = t.origin ? me(e) : 0, r = Math.max(0, t.rowStart - n), i = Math.min(e.grid.cells.length, t.rowEnd - n + 1);
1199
1217
  return i > r ? i : 0;
1200
1218
  }
1201
- async function Yt(e, t, n, r, i) {
1219
+ async function Zt(e, t, n, r, i) {
1202
1220
  const o = e.grid;
1203
1221
  if (t > r.maxScanned) throw new w("limit");
1204
1222
  const s = o.colWidthsMm?.length ?? o.cells.reduce((l, c) => Math.max(l, c.length), 1);
@@ -1213,12 +1231,12 @@ async function Yt(e, t, n, r, i) {
1213
1231
  const m = Math.max(1, Math.min(d?.colSpan ?? 1, s - c)), h = Math.min(o.cells.length, l + Math.max(1, d?.rowSpan ?? 1));
1214
1232
  m > 1 && await X(r, m - 1);
1215
1233
  for (let f = c; f < c + m; f++) a.set(f, h);
1216
- const g = Vt(e, l, c, n);
1217
- g && jt(i, d, g), c += m;
1234
+ const g = Kt(e, l, c, n);
1235
+ g && qt(i, d, g), c += m;
1218
1236
  }
1219
1237
  }
1220
1238
  }
1221
- async function Jt(e, t, n) {
1239
+ async function Qt(e, t, n) {
1222
1240
  const r = { values: [], seen: /* @__PURE__ */ new Set(), excluded: 0, selected: 0 };
1223
1241
  for (let i = 0; i < e.pages.length; i++) {
1224
1242
  await X(n);
@@ -1226,26 +1244,26 @@ async function Jt(e, t, n) {
1226
1244
  for (let s = 0; s < o.components.length; s++) {
1227
1245
  await X(n);
1228
1246
  const a = o.components[s];
1229
- if (!a.grid || !Gt(a, i, s, t) || a.table && a.table.role !== "body") continue;
1230
- const l = qt(a, t);
1231
- l && await Yt(a, l, t, n, r);
1247
+ if (!a.grid || !Yt(a, i, s, t) || a.table && a.table.role !== "body") continue;
1248
+ const l = Xt(a, t);
1249
+ l && await Zt(a, l, t, n, r);
1232
1250
  }
1233
1251
  }
1234
1252
  return r;
1235
1253
  }
1236
- function j(e) {
1254
+ function W(e) {
1237
1255
  if (!Number.isFinite(e)) throw new w("overflow");
1238
1256
  return e;
1239
1257
  }
1240
- function Kt(e) {
1258
+ function en(e) {
1241
1259
  let t = 0, n = 0;
1242
1260
  for (const r of e) {
1243
- const i = r - n, o = j(t + i);
1261
+ const i = r - n, o = W(t + i);
1244
1262
  n = o - t - i, t = o;
1245
1263
  }
1246
1264
  return t;
1247
1265
  }
1248
- async function be(e, t) {
1266
+ async function Me(e, t) {
1249
1267
  let n = [...e], r = new Array(e.length);
1250
1268
  for (let o = 1; o < e.length; o *= 2) {
1251
1269
  for (let s = 0; s < e.length; s += o * 2) {
@@ -1257,16 +1275,16 @@ async function be(e, t) {
1257
1275
  [n, r] = [r, n];
1258
1276
  }
1259
1277
  const i = Math.floor(n.length / 2);
1260
- return n.length % 2 ? n[i] : j(n[i - 1] / 2 + n[i] / 2);
1278
+ return n.length % 2 ? n[i] : W(n[i - 1] / 2 + n[i] / 2);
1261
1279
  }
1262
- function Xt(e) {
1263
- const t = Kt(e);
1280
+ function tn(e) {
1281
+ const t = en(e);
1264
1282
  let n = 1 / 0, r = -1 / 0;
1265
1283
  for (const i of e)
1266
1284
  n = Math.min(n, i), r = Math.max(r, i);
1267
1285
  return { SUM: t, AVERAGE: t / e.length, AVG: t / e.length, MIN: n, MAX: r, COUNT: e.length };
1268
1286
  }
1269
- function Zt(e, t) {
1287
+ function nn(e, t) {
1270
1288
  if (typeof e != "string" || e.length > 256) throw new w("expression");
1271
1289
  const n = e.toUpperCase().match(/(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?|[A-Z_]+|[()+\-*/]|\S/g) ?? [];
1272
1290
  if (!n.length || n.length > 64) throw new w("expression");
@@ -1280,8 +1298,8 @@ function Zt(e, t) {
1280
1298
  if (n[r++] !== ")") throw new w("expression");
1281
1299
  return c;
1282
1300
  }
1283
- if (l && /^(?:SUM|AVERAGE|AVG|MIN|MAX|COUNT|MEDIAN)$/.test(l) && Object.prototype.hasOwnProperty.call(t, l)) return j(t[l]);
1284
- if (l && /^(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?$/.test(l)) return j(Number(l));
1301
+ if (l && /^(?:SUM|AVERAGE|AVG|MIN|MAX|COUNT|MEDIAN)$/.test(l) && Object.prototype.hasOwnProperty.call(t, l)) return W(t[l]);
1302
+ if (l && /^(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?$/.test(l)) return W(Number(l));
1285
1303
  throw new w("expression");
1286
1304
  }
1287
1305
  function o(a, l) {
@@ -1292,7 +1310,7 @@ function Zt(e, t) {
1292
1310
  r++;
1293
1311
  const h = o(m + 1, l + 1);
1294
1312
  if (d === "/" && h === 0) throw new w("division");
1295
- c = j(d === "+" ? c + h : d === "-" ? c - h : d === "*" ? c * h : c / h);
1313
+ c = W(d === "+" ? c + h : d === "-" ? c - h : d === "*" ? c * h : c / h);
1296
1314
  }
1297
1315
  return c;
1298
1316
  }
@@ -1300,158 +1318,159 @@ function Zt(e, t) {
1300
1318
  if (r !== n.length) throw new w("expression");
1301
1319
  return s;
1302
1320
  }
1303
- function Qt(e) {
1321
+ function rn(e) {
1304
1322
  const t = e.maxCells ?? 1e5, n = e.maxScannedCells ?? 2e5, r = e.precision ?? 2;
1305
1323
  if (![t, n].every((i) => Number.isSafeInteger(i) && i >= 1 && i <= 2e6)) throw new w("limit");
1306
1324
  if (!Number.isInteger(r) || r < 0 || r > 12) throw new w("precision");
1307
1325
  return { maxCells: t, maxScanned: n, precision: r };
1308
1326
  }
1309
- async function In(e, t, n = {}) {
1310
- const r = Qt(n), i = { scanned: 0, maxScanned: r.maxScanned, signal: n.signal, yieldToHost: n.yieldToHost ?? (() => new Promise((l) => setTimeout(l, 0))) };
1327
+ async function Fn(e, t, n = {}) {
1328
+ const r = rn(n), i = { scanned: 0, maxScanned: r.maxScanned, signal: n.signal, yieldToHost: n.yieldToHost ?? (() => new Promise((l) => setTimeout(l, 0))) };
1311
1329
  z(i.signal);
1312
- const o = await Jt(e, _t(e, t, r.maxCells), i), s = n.operation ?? "sum";
1330
+ const o = await Qt(e, Gt(e, t, r.maxCells), i), s = n.operation ?? "sum";
1313
1331
  if (!["sum", "average", "min", "max", "count", "median", "expression"].includes(s)) throw new w("expression");
1314
1332
  let a = null;
1315
1333
  if (s === "count") a = o.values.length;
1316
1334
  else if (o.values.length)
1317
- if (s === "median") a = await be(o.values, i);
1335
+ if (s === "median") a = await Me(o.values, i);
1318
1336
  else {
1319
- const l = Xt(o.values);
1320
- s === "expression" ? (/\bMEDIAN\b/i.test(n.expression ?? "") && (l.MEDIAN = await be(o.values, i)), a = Zt(n.expression ?? "", l)) : a = l[s.toUpperCase()];
1337
+ const l = tn(o.values);
1338
+ s === "expression" ? (/\bMEDIAN\b/i.test(n.expression ?? "") && (l.MEDIAN = await Me(o.values, i)), a = nn(n.expression ?? "", l)) : a = l[s.toUpperCase()];
1321
1339
  }
1322
1340
  if (z(i.signal), a !== null && Number.isInteger(a) && !Number.isSafeInteger(a)) throw new w("precision");
1323
1341
  return { value: a, formatted: a === null ? "—" : a.toFixed(r.precision), numericCells: o.values.length, excludedCells: o.excluded, selectedCells: o.selected, precision: r.precision };
1324
1342
  }
1325
1343
  export {
1326
- Yn as CSS_DPI,
1327
- Ln as DEFAULT_BORDER_PT,
1344
+ Qn as CSS_DPI,
1345
+ Hn as DEFAULT_BORDER_PT,
1328
1346
  Z as DEFAULT_FONT_FAMILY,
1329
- Dn as DEFAULT_FONT_PT,
1330
- ur as DEFAULT_LABEL_PAGE_LIMIT,
1331
- Fn as DEFAULT_STROKE_COLOR,
1332
- ye as DEFAULT_TEXT_COLOR,
1333
- On as LINE_HEIGHT,
1334
- Jn as MM_PER_INCH,
1335
- lr as OutputAssetError,
1336
- Ue as OutputFidelityError,
1347
+ _n as DEFAULT_FONT_PT,
1348
+ br as DEFAULT_LABEL_PAGE_LIMIT,
1349
+ Bn as DEFAULT_STROKE_COLOR,
1350
+ xe as DEFAULT_TEXT_COLOR,
1351
+ jn as LINE_HEIGHT,
1352
+ er as MM_PER_INCH,
1353
+ gr as OutputAssetError,
1354
+ Ke as OutputFidelityError,
1337
1355
  J as PAPER_SIZES,
1338
- Mt as PageBuilder,
1339
- fr as PaginateCellLimitError,
1340
- pr as PaginatePageLimitError,
1341
- Qn as RENDER_PLAN_SCHEMA_VERSION,
1342
- Gr as REPORT_TEMPLATE_DOCUMENT_VERSION,
1343
- _n as ReportBindingError,
1356
+ Tt as PageBuilder,
1357
+ yr as PaginateCellLimitError,
1358
+ Mr as PaginatePageLimitError,
1359
+ ir as RENDER_PLAN_SCHEMA_VERSION,
1360
+ qr as REPORT_TEMPLATE_DOCUMENT_VERSION,
1361
+ Un as ReportBindingError,
1344
1362
  w as ReportCalculationError,
1345
- je as ReportCellEditError,
1346
- It as ReportCellFieldError,
1347
- Kr as ReportParamValidationError,
1348
- wr as ReportSourceError,
1349
- Je as ReportTemplateError,
1363
+ Ye as ReportCellEditError,
1364
+ Dt as ReportCellFieldError,
1365
+ Qr as ReportParamValidationError,
1366
+ se as ReportSourceError,
1367
+ Ne as ReportTemplateError,
1350
1368
  L as ReportTemplateStoreError,
1351
- zn as SCHEMA_VERSION_MACH,
1352
- yt as TemplateBuilder,
1353
- si as TreeRowLimitError,
1354
- vr as applyReportCellEdit,
1355
- br as applyReportCellEditBatch,
1356
- yr as applyReportEditResult,
1357
- tr as assertRenderPlan,
1358
- Xr as assertReportParams,
1359
- In as calculateReportSelection,
1360
- cr as charWidthEm,
1369
+ Wn as SCHEMA_VERSION_MACH,
1370
+ Et as TemplateBuilder,
1371
+ di as TreeRowLimitError,
1372
+ xr as applyReportCellEdit,
1373
+ Er as applyReportCellEditBatch,
1374
+ Tr as applyReportEditResult,
1375
+ ar as assertRenderPlan,
1376
+ ei as assertReportParams,
1377
+ Fn as calculateReportSelection,
1378
+ ur as charWidthEm,
1361
1379
  E as classOf,
1362
- Cn as cloneReportTemplate,
1363
- yn as columnsFromContract,
1364
- ht as computePageWindow,
1365
- Mr as countTemplatePages,
1366
- dr as createCanvasMeasurer,
1367
- vn as createCanvasPager,
1368
- mr as createHeuristicMeasurer,
1369
- xn as createLabelTemplate,
1370
- Rn as createLocalTemplateCatalog,
1371
- Sn as createMemoryTemplateStore,
1372
- En as createProviderReport,
1373
- xr as createReportCellEdit,
1374
- Er as createReportCellEditBatch,
1375
- Tr as createReportCellResolver,
1376
- Sr as createReportEditSession,
1377
- Cr as createReportSource,
1378
- Mn as createTableTemplate,
1379
- bn as createTemplate,
1380
- Tn as createTemplateManager,
1381
- Ur as createTemplateRegistry,
1382
- li as createTreeTable,
1383
- ar as datasetJsonSchema,
1384
- Rr as defineReport,
1385
- Vr as defineReportTemplate,
1386
- Pr as diffReportTemplates,
1387
- Ar as estimateListLayoutCells,
1388
- Bn as evalStyleRule,
1389
- Zt as evaluateReportAggregateExpression,
1390
- kr as formatReportCellEdit,
1391
- Pn as formatReportClipboard,
1392
- Zr as formatReportDateRange,
1393
- Wn as formatValue,
1394
- Ir as getReportCellContext,
1395
- Nr as getReportEditSession,
1380
+ In as cloneReportTemplate,
1381
+ Tn as columnsFromContract,
1382
+ ft as computePageWindow,
1383
+ Sr as countTemplatePages,
1384
+ fr as createCanvasMeasurer,
1385
+ xn as createCanvasPager,
1386
+ pr as createHeuristicMeasurer,
1387
+ Cn as createLabelTemplate,
1388
+ Nn as createLocalTemplateCatalog,
1389
+ kn as createMemoryTemplateStore,
1390
+ Pn as createProviderReport,
1391
+ Cr as createReportCellEdit,
1392
+ Rr as createReportCellEditBatch,
1393
+ Pr as createReportCellResolver,
1394
+ Ar as createReportEditSession,
1395
+ kr as createReportSource,
1396
+ Sn as createTableTemplate,
1397
+ En as createTemplate,
1398
+ An as createTemplateManager,
1399
+ Yr as createTemplateRegistry,
1400
+ mi as createTreeTable,
1401
+ mr as datasetJsonSchema,
1402
+ Rn as defineLabelReport,
1403
+ qe as defineReport,
1404
+ Jr as defineReportTemplate,
1405
+ Ir as diffReportTemplates,
1406
+ Nr as estimateListLayoutCells,
1407
+ Vn as evalStyleRule,
1408
+ nn as evaluateReportAggregateExpression,
1409
+ $r as formatReportCellEdit,
1410
+ $n as formatReportClipboard,
1411
+ ti as formatReportDateRange,
1412
+ qn as formatValue,
1413
+ Lr as getReportCellContext,
1414
+ Dr as getReportEditSession,
1396
1415
  oe as heuristicMeasurer,
1397
- Wr as inspectOutputCapabilities,
1416
+ Ur as inspectOutputCapabilities,
1398
1417
  ee as isImageBackedComponent,
1399
- Qr as isReportDate,
1400
- ei as isReportMonth,
1401
- ti as isReportYear,
1402
- Te as isRichText,
1403
- le as measurePageSizePx,
1404
- hr as measureTextMm,
1405
- xe as mergeComponentStyles,
1418
+ ni as isReportDate,
1419
+ ri as isReportMonth,
1420
+ ii as isReportYear,
1421
+ Ce as isRichText,
1422
+ ce as measurePageSizePx,
1423
+ wr as measureTextMm,
1424
+ Te as mergeComponentStyles,
1406
1425
  ie as mmToPx,
1407
- Kn as mmToPxFactor,
1408
- $r as paginateTemplate,
1409
- Lr as paginateTemplatePages,
1410
- jn as parseDateLocal,
1411
- kn as parseReportCellFieldInput,
1412
- Ge as parseReportCellInput,
1413
- An as parseReportClipboard,
1414
- ni as parseReportDateRange,
1426
+ tr as mmToPxFactor,
1427
+ Fr as paginateTemplate,
1428
+ Or as paginateTemplatePages,
1429
+ Yn as parseDateLocal,
1430
+ Dn as parseReportCellFieldInput,
1431
+ Je as parseReportCellInput,
1432
+ Ln as parseReportClipboard,
1433
+ oi as parseReportDateRange,
1415
1434
  I as parseReportTemplate,
1416
- un as planFontSizePx,
1417
- Dr as projectListColumns,
1435
+ vn as planFontSizePx,
1436
+ zr as projectListColumns,
1418
1437
  O as ptToPx,
1419
- Xn as pxToMm,
1420
- Fr as registerReportEditSession,
1421
- Or as relocateReportCellEdits,
1422
- ke as renderComponent,
1423
- st as renderPage,
1424
- gn as renderPlan,
1425
- pn as renderPlanToCanvas,
1426
- wn as renderPlanToCanvasAsync,
1427
- fn as renderPlanToImages,
1428
- zr as reportCellEditKey,
1438
+ nr as pxToMm,
1439
+ Hr as registerReportEditSession,
1440
+ _r as relocateReportCellEdits,
1441
+ Le as renderComponent,
1442
+ dt as renderPage,
1443
+ wn as renderPlan,
1444
+ yn as renderPlanToCanvas,
1445
+ Mn as renderPlanToCanvasAsync,
1446
+ bn as renderPlanToImages,
1447
+ Br as reportCellEditKey,
1429
1448
  G as reportOutputDiagnostics,
1430
- ri as reportParamsJsonSchema,
1431
- Me as resolveBoxBorders,
1432
- Gn as resolveComponentBinding,
1449
+ ai as reportParamsJsonSchema,
1450
+ Ee as resolveBoxBorders,
1451
+ Jn as resolveComponentBinding,
1433
1452
  _ as resolveFontSize,
1434
- Ce as resolveGridLayout,
1453
+ Pe as resolveGridLayout,
1435
1454
  Q as resolveLineHeight,
1436
- Fe as resolvePaper,
1455
+ _e as resolvePaper,
1437
1456
  ae as resolvePlanAssets,
1438
- W as resolveStroke,
1439
- Ee as resolveTextColor,
1440
- Hr as reviewReportTemplate,
1457
+ j as resolveStroke,
1458
+ Se as resolveTextColor,
1459
+ jr as reviewReportTemplate,
1441
1460
  H as round,
1442
- qr as serializeReportTemplate,
1443
- _r as summarizeReportCellEdits,
1444
- Un as toExcelNumberFormat,
1445
- Vn as toNumber,
1446
- nr as validateComponent,
1447
- We as validateDatasetRows,
1448
- rr as validatePage,
1449
- ir as validateRenderPlan,
1450
- Ht as validateReportCellFieldDefinition,
1451
- ii as validateReportParamDefinitions,
1452
- oi as validateReportParams,
1453
- Ye as validateReportTemplate,
1454
- Yr as validateReportTemplateDocument,
1455
- ci as validateTreeOptions,
1456
- Se as wrapText
1461
+ Kr as serializeReportTemplate,
1462
+ Wr as summarizeReportCellEdits,
1463
+ Kn as toExcelNumberFormat,
1464
+ Xn as toNumber,
1465
+ sr as validateComponent,
1466
+ Ve as validateDatasetRows,
1467
+ lr as validatePage,
1468
+ cr as validateRenderPlan,
1469
+ Wt as validateReportCellFieldDefinition,
1470
+ si as validateReportParamDefinitions,
1471
+ li as validateReportParams,
1472
+ Ie as validateReportTemplate,
1473
+ Xr as validateReportTemplateDocument,
1474
+ hi as validateTreeOptions,
1475
+ Re as wrapText
1457
1476
  };