@epam/ai-dial-attachment-canvas 1.2.0-dev.2 → 1.2.0-dev.6
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/{LazyContentBoundary-CL7J_W9c.js → LazyContentBoundary-CRXN6PG3.js} +1 -1
- package/{PdfContent-DhfjgYL-.js → PdfContent-D71LPAe3.js} +1 -1
- package/{attachment-canvas-Bp6WeQws.js → attachment-canvas-nvhW3tKV.js} +3 -1
- package/{bounded-raw-part-cache-BfbSxRIL-DD07NKh9.js → bounded-raw-part-cache-Cg1BsSZQ-DN8p45IK.js} +1111 -1043
- package/{chart-ex-B0DgG3Dt.js → chart-ex-DsESBs97.js} +1 -1
- package/{comment-occurrence-CqejEuts-7SeKCBXk.js → comment-occurrence-C8Y2uoVr-C1cxz2TU.js} +1 -1
- package/{comment-ui-runtime-lXwVOgjW-Be4RALsI.js → comment-ui-runtime-BfE7MJZn-DhQ_eg15.js} +29 -29
- package/comment-ui-runtime-BsK8pmUT-EgWiymew.js +2 -0
- package/{comment-ui-runtime-DEtgcmj7-B1G7PH4z.js → comment-ui-runtime-DcJOYlw--B15auUq-.js} +52 -52
- package/{comments-CAn2A_Xh-CdgNAj0h.js → comments-Diid5ujN-BdQhRNjI.js} +2 -2
- package/components/OoxmlContent/OoxmlContent.d.ts.map +1 -1
- package/{delimited-text-worker-host-DcHj_JZt-DWJmaPag.js → delimited-text-worker-host-BVY-Ecni-AimUmSn0.js} +1 -1
- package/{docx-B9qBTEkj.js → docx-B-VcIRoc.js} +4628 -4580
- package/index.js +564 -564
- package/line-distribute-Dtudnqhs--BYZNgzX.js +1237 -0
- package/{line-metrics-CBbw80Ko-DoOuwYxZ.js → line-metrics-B60C86uh-DfQUk7X1.js} +1 -1
- package/ooxml-highlight-surfaces-CaMjx8u-.js +351 -0
- package/package.json +4 -4
- package/{pptx-dkJw0-Vx.js → pptx-CnoDB8Fv.js} +955 -923
- package/{read-only-comment-decoration-BTnWEeo5-BNhbteYc.js → read-only-comment-decoration-Dz7eTQ4d-Cl3RKKH6.js} +1 -1
- package/{read-only-comment-margin-plStyGfE-mggNAMB_.js → read-only-comment-margin-DkgzASAl-BbDxMI5E.js} +1 -1
- package/render-worker-host-BfbnEChF-D2thMRGX.js +7 -0
- package/render-worker-host-DNL9dWRh-Bky38ZHE.js +7 -0
- package/render-worker-host-IkHrYOci-DbjyHK7U.js +7 -0
- package/{renderer-module-contract-Cu-GKuPd-Bt0YZuzB.js → renderer-module-contract-D91rkYHH-BtfSKxb4.js} +1 -1
- package/test-setup.d.ts +10 -1
- package/test-setup.d.ts.map +1 -1
- package/types/attachment-canvas.d.ts +17 -0
- package/types/attachment-canvas.d.ts.map +1 -1
- package/utils/ooxml-highlight-geometry.d.ts +87 -3
- package/utils/ooxml-highlight-geometry.d.ts.map +1 -1
- package/utils/ooxml-highlight-surfaces.d.ts +33 -6
- package/utils/ooxml-highlight-surfaces.d.ts.map +1 -1
- package/{visible-index-DPoQYSDt-9lRc-2Ik.js → visible-index-BgiHEc1z-BOzE9X5U.js} +7 -7
- package/{xlsx-BAXMTJTG.js → xlsx-Dn0XSlTO.js} +1581 -1556
- package/comment-ui-runtime-TLHustXJ-DWCXG2mL.js +0 -2
- package/line-distribute-IsUGfHXm-DeITjLzJ.js +0 -1234
- package/ooxml-highlight-surfaces-DhK1KJcR.js +0 -294
- package/render-worker-host-BEfLZvSL-COy91Rd8.js +0 -7
- package/render-worker-host-Ba6Fchqr-DZeKpMWD.js +0 -7
- package/render-worker-host-C3xwtHnv-BBGHFdo9.js +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, Ct as r, D as i, F as a, Ht as o, I as s, L as c, M as l, Mt as u, N as d, O as f, P as p, Pt as m, R as h, Rt as g, S as _, T as v, Y as y, _ as b, a as x, at as S, b as C, c as w, ct as T, d as E, dt as D, f as O, ft as k, g as ee, gt as A, h as j, ht as M, i as N, it as P, j as te, k as F, kt as ne, l as re, lt as ie, m as ae, n as I, o as oe, ot as se, p as L, q as R, r as ce, rt as z, s as le, u as ue, v as B, vt as V, w as de, wt as fe, x as pe, xt as me, y as he, z as ge } from "./renderer-module-contract-
|
|
1
|
+
import { A as e, B as t, C as n, Ct as r, D as i, F as a, Ht as o, I as s, L as c, M as l, Mt as u, N as d, O as f, P as p, Pt as m, R as h, Rt as g, S as _, T as v, Y as y, _ as b, a as x, at as S, b as C, c as w, ct as T, d as E, dt as D, f as O, ft as k, g as ee, gt as A, h as j, ht as M, i as N, it as P, j as te, k as F, kt as ne, l as re, lt as ie, m as ae, n as I, o as oe, ot as se, p as L, q as R, r as ce, rt as z, s as le, u as ue, v as B, vt as V, w as de, wt as fe, x as pe, xt as me, y as he, z as ge } from "./renderer-module-contract-D91rkYHH-BtfSKxb4.js";
|
|
2
2
|
//#region ../../node_modules/@silurus/ooxml/dist/chart-ex.mjs
|
|
3
3
|
function H(e) {
|
|
4
4
|
return e != null && Number.isFinite(e) ? e : null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/@silurus/ooxml/dist/comment-occurrence-
|
|
1
|
+
//#region ../../node_modules/@silurus/ooxml/dist/comment-occurrence-C8Y2uoVr.js
|
|
2
2
|
function e(e, t, n) {
|
|
3
3
|
return `slide:${n}:${e.id ?? `classic:${e.authorId ?? "unknown"}:${e.index ?? t}`}`;
|
|
4
4
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./renderer-module-contract-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { i as
|
|
5
|
-
import { t as u } from "./comment-
|
|
6
|
-
//#region ../../node_modules/@silurus/ooxml/dist/comment-ui-runtime-
|
|
1
|
+
import "./renderer-module-contract-D91rkYHH-BtfSKxb4.js";
|
|
2
|
+
import { O as e } from "./line-distribute-Dtudnqhs--BYZNgzX.js";
|
|
3
|
+
import { t } from "./comment-occurrence-C8Y2uoVr-C1cxz2TU.js";
|
|
4
|
+
import { a as n, i as r, n as i, s as a, t as o } from "./read-only-comment-margin-DkgzASAl-BbDxMI5E.js";
|
|
5
|
+
import { i as s, n as c, r as l, t as u } from "./read-only-comment-decoration-Dz7eTQ4d-Cl3RKKH6.js";
|
|
6
|
+
//#region ../../node_modules/@silurus/ooxml/dist/comment-ui-runtime-BfE7MJZn.js
|
|
7
7
|
function d(e, t, n) {
|
|
8
8
|
return {
|
|
9
9
|
messageKey: `${t}:reply:${e.id ?? n}`,
|
|
@@ -14,45 +14,45 @@ function d(e, t, n) {
|
|
|
14
14
|
status: e.status
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
function f(
|
|
18
|
-
|
|
19
|
-
let S =
|
|
17
|
+
function f(a, o, c, l, u, f, p, m, h, g, _, v, y = !1, b, x) {
|
|
18
|
+
n(a.ownerDocument), o && (o.dataset.ooxmlCommentZoom = String(g)), a.replaceChildren();
|
|
19
|
+
let S = c.map((e, n) => ({
|
|
20
20
|
comment: e,
|
|
21
|
-
index:
|
|
22
|
-
id:
|
|
23
|
-
})).filter(({ comment: e }) => y || e.status !== "resolved" && e.status !== "closed"), C = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), T = new Map(
|
|
24
|
-
for (let [t,
|
|
25
|
-
let { comment:
|
|
21
|
+
index: n,
|
|
22
|
+
id: t(e, n, u)
|
|
23
|
+
})).filter(({ comment: e }) => y || e.status !== "resolved" && e.status !== "closed"), C = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), T = new Map(l.map((e) => [e.elementId, e])), E = a.parentElement;
|
|
24
|
+
for (let [t, n] of S.entries()) {
|
|
25
|
+
let { comment: i, id: o } = n, s = (i.anchors ?? []).flatMap((e) => {
|
|
26
26
|
if (e.type !== "drawingElement" && e.type !== "textRange" || !e.elementId) return [];
|
|
27
27
|
let t = T.get(e.elementId);
|
|
28
28
|
return t ? [t] : [];
|
|
29
29
|
});
|
|
30
30
|
if (m === o) for (let t of s) {
|
|
31
|
-
let n =
|
|
32
|
-
n.dataset.ooxmlCommentTarget = o, n.style.cssText = `left:${e(t.bounds.x, f)};top:${e(t.bounds.y, p)};width:${e(t.bounds.width, f)};height:${e(t.bounds.height, p)};border-width:${2 * g}px;transform:rotate(${t.bounds.rotation}deg);`,
|
|
31
|
+
let n = a.ownerDocument.createElement("div");
|
|
32
|
+
n.dataset.ooxmlCommentTarget = o, n.style.cssText = `left:${e(t.bounds.x, f)};top:${e(t.bounds.y, p)};width:${e(t.bounds.width, f)};height:${e(t.bounds.height, p)};border-width:${2 * g}px;transform:rotate(${t.bounds.rotation}deg);`, a.appendChild(n);
|
|
33
33
|
}
|
|
34
|
-
let c = s[0]?.bounds, l = Number.isFinite(
|
|
34
|
+
let c = s[0]?.bounds, l = Number.isFinite(i.x) && Number.isFinite(i.y);
|
|
35
35
|
if (!l && !c) continue;
|
|
36
|
-
let u = Math.max(0, Math.min(c ? c.x + (l ?
|
|
36
|
+
let u = Math.max(0, Math.min(c ? c.x + (l ? i.x : c.width) : i.x, f)), d = Math.max(0, Math.min(c ? c.y + (l ? i.y : 0) : i.y, p));
|
|
37
37
|
if (C.set(o, Object.freeze({
|
|
38
38
|
x: u / 9525 * g - 24 * g / 2,
|
|
39
39
|
y: d / 9525 * g - 24 * g / 2,
|
|
40
40
|
width: 24 * g,
|
|
41
41
|
height: 24 * g
|
|
42
42
|
})), m === o && s.length === 0 && !v) {
|
|
43
|
-
let t =
|
|
44
|
-
t.dataset.ooxmlCommentTarget = o, t.style.cssText = `left:${e(u, f)};top:${e(d, p)};width:${24 * g}px;height:${24 * g}px;border-width:${2 * g}px;border-radius:50%;transform:translate(-50%,-50%);`,
|
|
43
|
+
let t = a.ownerDocument.createElement("div");
|
|
44
|
+
t.dataset.ooxmlCommentTarget = o, t.style.cssText = `left:${e(u, f)};top:${e(d, p)};width:${24 * g}px;height:${24 * g}px;border-width:${2 * g}px;border-radius:50%;transform:translate(-50%,-50%);`, a.appendChild(t);
|
|
45
45
|
}
|
|
46
46
|
if (v) {
|
|
47
|
-
let
|
|
47
|
+
let n = r(a.ownerDocument, {
|
|
48
48
|
occurrenceKey: o,
|
|
49
49
|
visibleIndex: t,
|
|
50
|
-
author:
|
|
50
|
+
author: i.author,
|
|
51
51
|
active: m === o,
|
|
52
52
|
zoom: g,
|
|
53
53
|
onSetActive: h
|
|
54
54
|
});
|
|
55
|
-
|
|
55
|
+
n.style.left = e(u, f), n.style.top = e(d, p), a.appendChild(n), w.set(o, n);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
let D = S.map(({ comment: e, id: t }) => ({
|
|
@@ -66,7 +66,7 @@ function f(i, a, s, c, l, f, p, m, h, g, _, v, y = !1, b, x) {
|
|
|
66
66
|
status: e.status
|
|
67
67
|
},
|
|
68
68
|
replies: e.replies?.map((e, n) => d(e, t, n)) ?? []
|
|
69
|
-
})), O =
|
|
69
|
+
})), O = o ? i(o, D, {
|
|
70
70
|
activeId: m,
|
|
71
71
|
zoom: g,
|
|
72
72
|
logicalWidth: _,
|
|
@@ -91,10 +91,10 @@ function f(i, a, s, c, l, f, p, m, h, g, _, v, y = !1, b, x) {
|
|
|
91
91
|
anchorRects: Object.freeze(t ? [t] : [])
|
|
92
92
|
});
|
|
93
93
|
})),
|
|
94
|
-
scrollTop:
|
|
94
|
+
scrollTop: o?.scrollTop ?? 0
|
|
95
95
|
});
|
|
96
|
-
let k =
|
|
97
|
-
let t = O.get(e.occurrenceKey), n = t && E ?
|
|
96
|
+
let k = o && E ? s(o, E) : void 0, A = Object.freeze(D.map((e) => {
|
|
97
|
+
let t = O.get(e.occurrenceKey), n = t && E ? s(t, E) : void 0, r = C.get(e.occurrenceKey);
|
|
98
98
|
return Object.freeze({
|
|
99
99
|
occurrenceKey: e.occurrenceKey,
|
|
100
100
|
active: m === e.occurrenceKey,
|
|
@@ -105,8 +105,8 @@ function f(i, a, s, c, l, f, p, m, h, g, _, v, y = !1, b, x) {
|
|
|
105
105
|
return Object.freeze({
|
|
106
106
|
threads: A,
|
|
107
107
|
...k ? { cardClipBounds: k } : {},
|
|
108
|
-
scrollTop:
|
|
108
|
+
scrollTop: o?.scrollTop ?? 0
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
//#endregion
|
|
112
|
-
export { f as buildPptxCommentMargin,
|
|
112
|
+
export { f as buildPptxCommentMargin, c as buildReadOnlyCommentDecoration, u as disposeReadOnlyCommentDecoration, a as disposeReadOnlyCommentMargin, o as previewReadOnlyCommentMargin, l as projectReadOnlyCommentMarginScroll };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
//#region ../../node_modules/@silurus/ooxml/dist/comment-ui-runtime-
|
|
6
|
-
function p(e,
|
|
7
|
-
let
|
|
8
|
-
for (let e of
|
|
9
|
-
if (
|
|
10
|
-
let
|
|
11
|
-
for (let
|
|
12
|
-
if (!(
|
|
13
|
-
let e =
|
|
14
|
-
e.length > 0 &&
|
|
15
|
-
anchor:
|
|
1
|
+
import { O as e } from "./line-distribute-Dtudnqhs--BYZNgzX.js";
|
|
2
|
+
import { a as t, i as n, n as r, o as i, s as a, t as o } from "./read-only-comment-margin-DkgzASAl-BbDxMI5E.js";
|
|
3
|
+
import { i as s, n as c, r as l, t as u } from "./read-only-comment-decoration-Dz7eTQ4d-Cl3RKKH6.js";
|
|
4
|
+
import { r as d, s as f } from "./comments-Diid5ujN-BdQhRNjI.js";
|
|
5
|
+
//#region ../../node_modules/@silurus/ooxml/dist/comment-ui-runtime-DcJOYlw-.js
|
|
6
|
+
function p(e, t) {
|
|
7
|
+
let n = /* @__PURE__ */ new Set();
|
|
8
|
+
for (let e of t) e.source && n.add(f(e.source));
|
|
9
|
+
if (n.size === 0) return [];
|
|
10
|
+
let r = [];
|
|
11
|
+
for (let i of e) {
|
|
12
|
+
if (!(n.has(f(i.source)) || n.has(f(i.reference.source)) || i.geometryFallback !== void 0 && n.has(f(i.geometryFallback.source)))) continue;
|
|
13
|
+
let e = d(i, t);
|
|
14
|
+
e.length > 0 && r.push({
|
|
15
|
+
anchor: i,
|
|
16
16
|
runs: e
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
return
|
|
19
|
+
return r;
|
|
20
20
|
}
|
|
21
21
|
function m(e, t) {
|
|
22
22
|
let n = new Map(e.map((e) => [e.id, e])), r = e.filter((e) => e.parentId === void 0), i = /* @__PURE__ */ new Map();
|
|
@@ -81,31 +81,31 @@ function v(e) {
|
|
|
81
81
|
}
|
|
82
82
|
return t;
|
|
83
83
|
}
|
|
84
|
-
function y(e,
|
|
85
|
-
|
|
86
|
-
let T = m(
|
|
87
|
-
for (let e of
|
|
88
|
-
let k = p(
|
|
84
|
+
function y(e, a, o, c, l, u, d, f, y, b, x, S = !1, C, w) {
|
|
85
|
+
t(e.ownerDocument), a && (a.dataset.ooxmlCommentZoom = String(y)), e.innerHTML = "";
|
|
86
|
+
let T = m(c.comments, S), E = new Map(T.map((e) => [e.root.id, i(e.root.author)])), D = new Set(T.map((e) => e.root.id)), O = /* @__PURE__ */ new Map();
|
|
87
|
+
for (let e of c.anchors) D.has(e.commentId) && !O.has(e.commentId) && O.set(e.commentId, e);
|
|
88
|
+
let k = p(c.anchors, o), A = new Set(k.map(({ anchor: e }) => e)), j = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), N = e.parentElement;
|
|
89
89
|
for (let { anchor: t, runs: n } of k) {
|
|
90
90
|
if (!D.has(t.commentId)) continue;
|
|
91
91
|
let r = d === t.commentId;
|
|
92
|
-
for (let
|
|
93
|
-
let n = g(e,
|
|
94
|
-
x:
|
|
95
|
-
y:
|
|
96
|
-
width:
|
|
97
|
-
height:
|
|
98
|
-
}),
|
|
99
|
-
j.has(t.commentId) || j.set(t.commentId,
|
|
100
|
-
let d =
|
|
101
|
-
x:
|
|
102
|
-
y:
|
|
103
|
-
width:
|
|
104
|
-
height:
|
|
92
|
+
for (let a of v(n.map(_))) {
|
|
93
|
+
let n = g(e, a, l, u, r, E.get(t.commentId) ?? i(void 0)), o = a.transform && N ? s(n, N) : Object.freeze({
|
|
94
|
+
x: a.x,
|
|
95
|
+
y: a.y,
|
|
96
|
+
width: a.w,
|
|
97
|
+
height: a.h
|
|
98
|
+
}), c = j.get(t.commentId) ?? [];
|
|
99
|
+
j.has(t.commentId) || j.set(t.commentId, c);
|
|
100
|
+
let d = o ?? Object.freeze({
|
|
101
|
+
x: a.x,
|
|
102
|
+
y: a.y,
|
|
103
|
+
width: a.w,
|
|
104
|
+
height: a.h
|
|
105
105
|
});
|
|
106
|
-
|
|
106
|
+
c.push(d), M.has(t.commentId) || M.set(t.commentId, Object.freeze({
|
|
107
107
|
rect: d,
|
|
108
|
-
...
|
|
108
|
+
...a.direction ? { direction: a.direction } : {}
|
|
109
109
|
}));
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -116,7 +116,7 @@ function y(e, t, n, s, c, u, d, f, y, b, x, S = !1, C, w) {
|
|
|
116
116
|
root: h(e.root, e.root.id, 0),
|
|
117
117
|
replies: e.replies.map((t, n) => h(t, e.root.id, n + 1))
|
|
118
118
|
}];
|
|
119
|
-
}), F =
|
|
119
|
+
}), F = a ? r(a, P, {
|
|
120
120
|
activeId: d,
|
|
121
121
|
zoom: y,
|
|
122
122
|
logicalWidth: b,
|
|
@@ -128,19 +128,19 @@ function y(e, t, n, s, c, u, d, f, y, b, x, S = !1, C, w) {
|
|
|
128
128
|
return [e.occurrenceKey, t?.y ?? 0];
|
|
129
129
|
}))
|
|
130
130
|
}) : /* @__PURE__ */ new Map();
|
|
131
|
-
if (x) for (let [t,
|
|
132
|
-
let
|
|
133
|
-
if (!
|
|
134
|
-
let a =
|
|
135
|
-
occurrenceKey:
|
|
131
|
+
if (x) for (let [t, r] of P.entries()) {
|
|
132
|
+
let i = M.get(r.occurrenceKey);
|
|
133
|
+
if (!i) continue;
|
|
134
|
+
let a = n(e.ownerDocument, {
|
|
135
|
+
occurrenceKey: r.occurrenceKey,
|
|
136
136
|
visibleIndex: t,
|
|
137
|
-
author:
|
|
138
|
-
active: d ===
|
|
137
|
+
author: r.root.author,
|
|
138
|
+
active: d === r.occurrenceKey,
|
|
139
139
|
zoom: y,
|
|
140
140
|
onSetActive: f
|
|
141
|
-
}), o = 24 * y / 2, s = 4 * y,
|
|
142
|
-
a.style.left = `${m /
|
|
143
|
-
let g = F.get(
|
|
141
|
+
}), o = 24 * y / 2, s = 4 * y, c = e.ownerDocument.defaultView?.getComputedStyle?.(e).direction, p = (i.direction ?? c) === "rtl" ? i.rect.x - s - o : i.rect.x + i.rect.width + s + o, m = Math.max(o, Math.min(p, l - o)), h = Math.max(o, Math.min(i.rect.y + i.rect.height / 2, u - o));
|
|
142
|
+
a.style.left = `${m / l * 100}%`, a.style.top = `${h / u * 100}%`;
|
|
143
|
+
let g = F.get(r.occurrenceKey);
|
|
144
144
|
g?.id && a.setAttribute("aria-controls", g.id), e.appendChild(a);
|
|
145
145
|
}
|
|
146
146
|
if (!C && !w) return Object.freeze({
|
|
@@ -149,10 +149,10 @@ function y(e, t, n, s, c, u, d, f, y, b, x, S = !1, C, w) {
|
|
|
149
149
|
active: d === e.occurrenceKey,
|
|
150
150
|
anchorRects: Object.freeze(j.get(e.occurrenceKey) ?? [])
|
|
151
151
|
}))),
|
|
152
|
-
scrollTop:
|
|
152
|
+
scrollTop: a?.scrollTop ?? 0
|
|
153
153
|
});
|
|
154
|
-
let I =
|
|
155
|
-
let t = F.get(e.occurrenceKey), n = t && N ?
|
|
154
|
+
let I = a && N ? s(a, N) : void 0, L = Object.freeze(P.map((e) => {
|
|
155
|
+
let t = F.get(e.occurrenceKey), n = t && N ? s(t, N) : void 0;
|
|
156
156
|
return Object.freeze({
|
|
157
157
|
occurrenceKey: e.occurrenceKey,
|
|
158
158
|
active: d === e.occurrenceKey,
|
|
@@ -163,8 +163,8 @@ function y(e, t, n, s, c, u, d, f, y, b, x, S = !1, C, w) {
|
|
|
163
163
|
return Object.freeze({
|
|
164
164
|
threads: L,
|
|
165
165
|
...I ? { cardClipBounds: I } : {},
|
|
166
|
-
scrollTop:
|
|
166
|
+
scrollTop: a?.scrollTop ?? 0
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
//#endregion
|
|
170
|
-
export { y as buildDocxCommentMargin,
|
|
170
|
+
export { y as buildDocxCommentMargin, c as buildReadOnlyCommentDecoration, u as disposeReadOnlyCommentDecoration, a as disposeReadOnlyCommentMargin, o as previewReadOnlyCommentMargin, l as projectReadOnlyCommentMarginScroll };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/@silurus/ooxml/dist/source-key-
|
|
1
|
+
//#region ../../node_modules/@silurus/ooxml/dist/source-key-DIJG8BA0.js
|
|
2
2
|
function e(t, n = "$") {
|
|
3
3
|
if (t === null || typeof t == "boolean" || typeof t == "number" || typeof t == "string") return JSON.stringify(t);
|
|
4
4
|
if (Array.isArray(t)) return `[${t.map((t, r) => e(t, `${n}[${r}]`)).join(",")}]`;
|
|
@@ -37,7 +37,7 @@ function s(e, t) {
|
|
|
37
37
|
return `anchor:${n(e)}:${encodeURIComponent(t)}`;
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
40
|
-
//#region ../../node_modules/@silurus/ooxml/dist/comments-
|
|
40
|
+
//#region ../../node_modules/@silurus/ooxml/dist/comments-Diid5ujN.js
|
|
41
41
|
function c(e) {
|
|
42
42
|
if (e === void 0) return;
|
|
43
43
|
let t = e.replace(/^[\t\n\r ]+|[\t\n\r ]+$/g, "");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OoxmlContent.d.ts","sourceRoot":"","sources":["../../../src/components/OoxmlContent/OoxmlContent.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,EAA+B,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"OoxmlContent.d.ts","sourceRoot":"","sources":["../../../src/components/OoxmlContent/OoxmlContent.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,EAA+B,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAiPzE,UAAU,iBAAiB;IACzB,gDAAgD;IAChD,OAAO,EAAE,kBAAkB,CAAC;IAC5B,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,cAAc,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,YAAY,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,qBAAqB,EAAE,MAAM,CAAC;IAC9B,gGAAgG;IAChG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,2HAA2H;IAC3H,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,oHAAoH;AACpH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA+U9C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/@silurus/ooxml/dist/delimited-text-worker-host-
|
|
1
|
+
//#region ../../node_modules/@silurus/ooxml/dist/delimited-text-worker-host-BVY-Ecni.js
|
|
2
2
|
var e = "var e=(e,t)=>()=>(e&&(t=e(e=0)),t),t=class e extends Error{code;constructor(t,n){super(n),this.name=`OoxmlError`,this.code=t,Object.setPrototypeOf(this,e.prototype)}},n=class e extends Error{code=`ooxml-resource-limit`;details;constructor(t,n){super(t),this.name=`OoxmlResourceLimitError`;let r=n.violation,i=Object.freeze({format:r.format,operation:r.operation,resource:r.resource,metric:r.metric,...r.part===void 0?{}:{part:r.part},limit:r.limit,observed:r.observed,configurable:r.configurable,usage:Object.freeze({archiveEntryCount:r.usage.archiveEntryCount,declaredInflatedBytes:r.usage.declaredInflatedBytes,...r.usage.largestInflatedEntryBytes===void 0?{}:{largestInflatedEntryBytes:r.usage.largestInflatedEntryBytes},distinctInflatedBytes:r.usage.distinctInflatedBytes,operationInflatedBytes:r.usage.operationInflatedBytes})});this.details=Object.freeze({stage:n.stage,violation:i}),Object.setPrototypeOf(this,e.prototype)}};function r(e){return e===`image-dimension`||e===`image-pixels`||e===`active-decoded-bytes`}function i(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function a(e){if(!(!e||typeof e!=`object`))try{let t=e,n=t.code,a=t.metric,o=t.limit,s=t.observed;return n!==`ooxml-decoded-image-limit`||!r(a)||!i(o)||!i(s)||s<=o?void 0:{metric:a,limit:o,observed:s}}catch{return}}var o,s,c,l=e((()=>{o=1<<25,s=1<<27,o*4,s*4,c=class e extends RangeError{code=`ooxml-decoded-image-limit`;constructor(t,n,r){super(`OOXML decoded image limit exceeded: ${t} ${r} > ${n}`),this.metric=t,this.limit=n,this.observed=r,this.name=`OoxmlDecodedImageLimitError`,Object.setPrototypeOf(this,e.prototype)}}}));function u(e){if(!(typeof e!=`object`||!e))try{let t=e,n=t.code,r=t.message;return n===`ooxml-tiff-decode`&&typeof r==`string`?{message:r}:void 0}catch{return}}var d=e((()=>{}));function f(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>0}function p(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return f(t.requiredBytes)&&f(t.offeredBytes)&&t.requiredBytes>t.offeredBytes}var m=class e extends RangeError{code=`ooxml-insufficient-credit`;requiredBytes;offeredBytes;constructor(t){super(`Pull unit requires ${t.requiredBytes} bytes but credit is ${t.offeredBytes}`),this.name=`PullSessionInsufficientCreditError`,this.requiredBytes=t.requiredBytes,this.offeredBytes=t.offeredBytes,Object.setPrototypeOf(this,e.prototype)}};function h(e){if(e instanceof m)return e;let t=e instanceof Error?e.message:String(e);if(!t.startsWith(`OOXML_INSUFFICIENT_CREDIT:`))return;let n;try{n=JSON.parse(t.slice(26))}catch{return}if(!n||typeof n!=`object`||Array.isArray(n))return;let r=n;if(!(r.code!==`ooxml-insufficient-credit`||!p(r)))return new m(r)}l(),d();const g=`OOXML_RESOURCE_LIMIT:`;function _(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function v(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return _(t.archiveEntryCount)&&_(t.declaredInflatedBytes)&&(t.largestInflatedEntryBytes===void 0||_(t.largestInflatedEntryBytes))&&_(t.distinctInflatedBytes)&&_(t.operationInflatedBytes)}function y(e){return e===`docx`||e===`xlsx`||e===`pptx`}function b(e){return e===`container`||e===`decompression`||e===`parsing`||e===`serialization`||e===`layout`||e===`rendering`||e===`worker`}function x(e,t){return typeof e==`string`&&e.length>0&&e.length<=t&&!/[\\u0000-\\u001f\\u007f]/u.test(e)}function S(e){return x(e,128)&&/^[a-z0-9][a-z0-9-]*$/u.test(e)}function C(e){return!x(e,4096)||e.startsWith(`/`)||e.startsWith(`\\\\`)||e.includes(`\\\\`)||e.includes(`?`)||e.includes(`#`)||e.includes(`://`)||/^[a-z]:/iu.test(e)?!1:e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`)}const w=new Map([[`archive-entry:declared-inflated-bytes`,{stage:`container`,part:`required`}],[`archive-entry:actual-inflated-bytes`,{stage:`decompression`,part:`required`}],[`archive:entry-count`,{stage:`container`,part:`forbidden`}],[`archive:central-directory-bytes`,{stage:`container`,part:`forbidden`,configurable:!1}],[`archive:distinct-inflated-bytes`,{stage:`decompression`,part:`required`}],[`xml-event:bytes`,{stage:`parsing`,part:`optional`,configurable:!1}],[`xml-context:bytes`,{stage:`parsing`,part:`optional`,configurable:!1}],[`xml-tree:depth`,{stage:`parsing`,part:`optional`,configurable:!1}],[`worksheet-row:projected-bytes`,{stage:`parsing`,part:`optional`,configurable:!1}],[`worksheet-shell:projected-bytes`,{stage:`parsing`,part:`optional`,configurable:!1}]]),T=new Set([...w.keys()].map(e=>e.slice(0,e.indexOf(`:`)))),E=new Set([...w.keys()].map(e=>e.slice(e.indexOf(`:`)+1)));function D(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return!y(t.format)||!x(t.operation,256)||!S(t.resource)||!S(t.metric)||!_(t.limit)||!_(t.observed)||typeof t.configurable!=`boolean`||!v(t.usage)?!1:!(`part`in t)||C(t.part)}function O(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;if(!b(t.stage)||!D(t.violation))return!1;let n=t.violation,r=w.get(`${n.resource}:${n.metric}`);return r?t.stage!==r.stage||r.configurable===!1&&n.configurable!==!1?!1:r.part===`required`?n.part!==void 0:r.part===`forbidden`?n.part===void 0:!0:!(T.has(n.resource)&&E.has(n.metric))}function k(e){return{archiveEntryCount:e.archiveEntryCount,declaredInflatedBytes:e.declaredInflatedBytes,...e.largestInflatedEntryBytes===void 0?{}:{largestInflatedEntryBytes:e.largestInflatedEntryBytes},distinctInflatedBytes:e.distinctInflatedBytes,operationInflatedBytes:e.operationInflatedBytes}}function A(e){if(!O(e))return;let t=e.violation,n={stage:e.stage,violation:{format:t.format,operation:t.operation,resource:t.resource,metric:t.metric,...t.part===void 0?{}:{part:t.part},limit:t.limit,observed:t.observed,configurable:t.configurable,usage:k(t.usage)}};return O(n)?n:void 0}function j(e){let t=e.violation;return`OOXML resource limit exceeded${t.part?` for ${t.part}`:``}: ${t.metric} ${t.observed} > ${t.limit}`}function M(e){let t=e instanceof Error?e.message:String(e);if(!t.startsWith(g))return;let r;try{r=JSON.parse(t.slice(21))}catch{return}if(!r||typeof r!=`object`)return;let i=r;if(!(i.code!==`ooxml-resource-limit`||!O(i.details)))return new n(j(i.details),i.details)}function N(e){let r=a(e);if(r){let e=new c(r.metric,r.limit,r.observed);return{message:e.message,errorName:e.name,code:e.code,decodedImage:r}}let i=u(e);if(i)return{message:i.message,errorName:`TiffDecodeError`,code:`ooxml-tiff-decode`};let o=h(e);if(o)return{message:o.message,errorName:o.name,code:o.code,insufficientCredit:{requiredBytes:o.requiredBytes,offeredBytes:o.offeredBytes}};let s=e instanceof t||e instanceof n?e:M(e);if(s instanceof n){let e=A(s.details);return e?{message:typeof s.message==`string`?s.message:j(e),errorName:`OoxmlResourceLimitError`,code:`ooxml-resource-limit`,resourceLimit:e}:{message:`Invalid OOXML resource-limit error payload`,errorName:`Error`}}if(s instanceof t)return{message:typeof s.message==`string`?s.message:String(s.message),errorName:x(s.name,128)?s.name:`OoxmlError`,...S(s.code)?{code:s.code}:{}};let l=e instanceof Error?e.message:String(e);if(typeof l==`string`&&l.startsWith(g))return{message:`Invalid OOXML resource-limit payload`,errorName:`Error`};let d=e instanceof Error?e:Error(l),f=d;return{message:typeof d.message==`string`?d.message:String(d.message),errorName:x(d.name,128)?d.name:`Error`,...typeof f.code==`string`?{code:f.code}:{}}}function P(e){try{return N(e)}catch{return{message:`Worker operation failed with an unreadable error`,errorName:`Error`}}}function F(e,t){if(!Number.isSafeInteger(e)||e<0)throw Error(`${t} must be a non-negative safe integer`)}function I(e,t,n){return F(e,`resource measurement`),F(t,`resource measurement`),F(n,`resource measurement limit`),e>n||t>n||t>n-e?n===2**53-1?n:n+1:e+t}function L(e,t=2**53-1){F(t,`resource measurement limit`);let n=0;for(let r=0;r<e.length;r+=1){let i=e.charCodeAt(r),a;if(i<=127)a=1;else if(i<=2047)a=2;else if(i>=55296&&i<=56319&&r+1<e.length){let t=e.charCodeAt(r+1);t>=56320&&t<=57343?(a=4,r+=1):a=3}else a=3;if(n=I(n,a,t),n>t)return n}return n}function R(e,t=2**53-1){F(t,`resource measurement limit`);let n=I(0,2,t);if(n>t)return n;for(let r=0;r<e.length;r+=1){let i=e.charCodeAt(r),a;if(i===34||i===92||i===8||i===9||i===10||i===12||i===13)a=2;else if(i<=31)a=6;else if(i<=127)a=1;else if(i<=2047)a=2;else if(i>=55296&&i<=56319&&r+1<e.length){let t=e.charCodeAt(r+1);t>=56320&&t<=57343?(a=4,r+=1):a=6}else a=i>=55296&&i<=57343?6:3;if(n=I(n,a,t),n>t)return n}return n}function z(e,t){return I(0,e,t)}function B(e,t=2**53-1,n=!1){if(F(t,`resource measurement limit`),e===null)return{jsonBytes:z(4,t),stringValueUtf8Bytes:0};if(typeof e==`string`)return{jsonBytes:R(e,t),stringValueUtf8Bytes:L(e,t)};if(typeof e==`boolean`)return{jsonBytes:z(e?4:5,t),stringValueUtf8Bytes:0};if(typeof e==`number`)return{jsonBytes:z((Number.isFinite(e)?String(Object.is(e,-0)?0:e):`null`).length,t),stringValueUtf8Bytes:0};if(typeof e==`bigint`)throw TypeError(`BigInt values cannot be serialized to JSON`);if(Array.isArray(e)){let n=z(2,t),r=0;for(let i=0;i<e.length;i+=1){i!==0&&(n=I(n,1,t));let a=B(e[i],t,!0);n=I(n,a.jsonBytes,t),r=I(r,a.stringValueUtf8Bytes,t)}return{jsonBytes:n,stringValueUtf8Bytes:r}}if(typeof e==`object`){let n=z(2,t),r=0,i=0;for(let[a,o]of Object.entries(e)){if(o===void 0||typeof o==`function`||typeof o==`symbol`)continue;i++!==0&&(n=I(n,1,t)),n=I(n,R(a,t),t),n=I(n,1,t);let e=B(o,t);n=I(n,e.jsonBytes,t),r=I(r,e.stringValueUtf8Bytes,t)}return{jsonBytes:n,stringValueUtf8Bytes:r}}return{jsonBytes:n?z(4,t):0,stringValueUtf8Bytes:0}}const V=1e5,H=25e4,U=33554432,W=67108864,G=Object.freeze({archiveEntryCount:0,declaredInflatedBytes:0,distinctInflatedBytes:0,operationInflatedBytes:0});function K(e){let t=e.reduce((e,t)=>I(e,t.cells.length,H),0);return{rows:e.length,cells:t,ownedUtf8Bytes:e.reduce((e,t)=>t.cells.reduce((e,t)=>{let n=B(t.value,U).stringValueUtf8Bytes;return I(e,I(n,t.formula===void 0?0:L(t.formula,U),U),U)},e),0)}}function q(e){return J(e,K(e.rows))}function J(e,t){let n=B(e,67108864);return{...t,jsonBytes:n.jsonBytes}}function Y(e,t,r,i,a,o,s){let c=r===`worksheet-json`?`serialization`:`parsing`;return new n(`OOXML resource limit exceeded${t?` for ${t}`:``}: ${i} ${o} > ${a}`,{stage:c,violation:{format:`xlsx`,operation:e,resource:r,metric:i,...t===void 0?{}:{part:t},limit:a,observed:Math.min(o,a+1),configurable:!1,usage:s??G}})}function X(e,t,n,r){let i=[[`rows`,e.rows,V],[`cells`,e.cells,H],[`owned-utf8-bytes`,e.ownedUtf8Bytes,U]];for(let[e,a,o]of i)if(a>o)throw Y(t,n,e===`owned-utf8-bytes`?`worksheet-cell-content`:`worksheet-model`,e,o,a,r)}function Z(e,t,n,r){if(e>W)throw Y(t,n,`worksheet-json`,`bytes`,W,e,r)}const Q=`load-delimited-text`,$=W;function ee(e){if(e>$)throw Y(Q,void 0,`delimited-text-source`,`bytes`,$,e)}const te=Object.freeze({fonts:[Object.freeze({bold:!1,italic:!1,underline:!1,strike:!1,size:11,color:null,name:`Calibri`})],fills:[Object.freeze({patternType:`none`,fgColor:null,bgColor:null})],borders:[Object.freeze({left:null,right:null,top:null,bottom:null})],cellXfs:[Object.freeze({fontId:0,fillId:0,borderId:0,numFmtId:0,alignH:null,alignV:null,wrapText:!1})],numFmts:[],dxfs:[]});function ne(e,t){ee(e.byteLength);let n;try{n=new TextDecoder(t.encoding,{fatal:!0}).decode(e)}catch(e){throw TypeError(`Delimited text could not be decoded as ${t.encoding}`,{cause:e})}let r=[],i=[],a=``,o,s=1,c=1,l=0,u=0,d=!1,f=!1,p=e=>{a+=e,a.length>=4096&&((o??=[]).push(a),a=``)},m=()=>{if(l++,l>H)throw Y(Q,void 0,`worksheet-model`,`cells`,H,l);if(c>16384)throw RangeError(`Delimited text row ${s} has more than 16384 columns`);let e=o?o.join(``)+a:a;if(e!==``){if(u+=L(e,U+1),u>U)throw Y(Q,void 0,`worksheet-cell-content`,`owned-utf8-bytes`,U,u);i.push({row:s,col:c,value:{type:`text`,text:e}})}a=``,o=void 0,c++,f=!1},h=()=>{if(s>V)throw Y(Q,void 0,`worksheet-model`,`rows`,V,s);r.push({index:s,height:null,cells:i}),i=[],s++,c=1};for(let e=0;e<n.length;e++){let r=n[e];if(d){if(r!==`\"`){r===`\\r`?(p(`\n`),n[e+1]===`\n`&&e++):p(r);continue}n[e+1]===`\"`?(p(`\"`),e++):(d=!1,f=!0);continue}if(f){if(r!==t.delimiter&&r!==`\\r`&&r!==`\n`)throw SyntaxError(`Unexpected character after closing quote at row ${s}, column ${c}`)}else if(r===`\"`&&a===``&&o===void 0){d=!0;continue}if(r===t.delimiter){m();continue}if(r===`\\r`||r===`\n`){m(),h(),r===`\\r`&&n[e+1]===`\n`&&e++;continue}p(r)}if(d)throw SyntaxError(`Unterminated quoted field at row ${s}, column ${c}`);let g=n.endsWith(`\n`)||n.endsWith(`\\r`);n.length>0&&!g&&(m(),h());let _={name:t.sheetName,rows:r,colWidths:{},rowHeights:{},defaultColWidth:8.43,defaultRowHeight:15,mergeCells:[],freezeRows:0,freezeCols:0,conditionalFormats:[],images:[],charts:[],defaultFontFamily:`Calibri`,defaultFontSize:11},v=q(_);return X(v,Q,void 0),Z(v.jsonBytes,Q,void 0),{workbook:{workbook:{sheets:[{name:t.sheetName,sheetId:1,rId:`rId1`}]},styles:te,sharedStrings:[]},worksheet:_}}self.onmessage=e=>{let t=e.data;try{let{workbook:e,worksheet:n}=ne(t.data,t.options),r=new TextEncoder().encode(JSON.stringify(n)).buffer,i={type:`delimitedTextParsed`,id:t.id,workbook:e,worksheetJson:r};self.postMessage(i,[r])}catch(e){let n={type:`error`,id:t.id,...P(e)};self.postMessage(n)}};", t = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", e], { type: "text/javascript;charset=utf-8" });
|
|
3
3
|
function n(n) {
|
|
4
4
|
let r;
|