@epam/ai-dial-attachment-canvas 1.1.0-dev.45 → 1.1.0-dev.456
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 +166 -0
- package/PdfContent-DhfjgYL-.js +260 -0
- package/PdfContent.css +1 -0
- package/attachment-canvas-Bp6WeQws.js +12 -0
- package/bounded-raw-part-cache-BfbSxRIL-DD07NKh9.js +37832 -0
- package/chart-ex-B0DgG3Dt.js +1009 -0
- package/comment-occurrence-CqejEuts-7SeKCBXk.js +6 -0
- package/comment-ui-runtime-DEtgcmj7-B1G7PH4z.js +170 -0
- package/comment-ui-runtime-TLHustXJ-DWCXG2mL.js +2 -0
- package/comment-ui-runtime-lXwVOgjW-Be4RALsI.js +112 -0
- package/comments-CAn2A_Xh-CdgNAj0h.js +282 -0
- package/components/AttachmentCanvas/AttachmentCanvas.d.ts +1 -0
- package/components/AttachmentCanvas/AttachmentCanvas.d.ts.map +1 -1
- package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts +4 -0
- package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts.map +1 -0
- package/components/AttachmentCanvasContainer/AttachmentCanvasContainer.d.ts +14 -0
- package/components/AttachmentCanvasContainer/AttachmentCanvasContainer.d.ts.map +1 -1
- package/components/CodeContent/CodeContent.d.ts +24 -0
- package/components/CodeContent/CodeContent.d.ts.map +1 -0
- package/components/HtmlContent/HtmlContent.d.ts +21 -0
- package/components/HtmlContent/HtmlContent.d.ts.map +1 -0
- package/components/LazyContentBoundary/LazyContentBoundary.d.ts +73 -0
- package/components/LazyContentBoundary/LazyContentBoundary.d.ts.map +1 -0
- package/components/McpAppCanvasRenderer/McpAppCanvasRenderer.d.ts +12 -0
- package/components/McpAppCanvasRenderer/McpAppCanvasRenderer.d.ts.map +1 -0
- package/components/OoxmlContent/OoxmlContent.d.ts +22 -0
- package/components/OoxmlContent/OoxmlContent.d.ts.map +1 -0
- package/components/PdfContent/PdfContent.d.ts +56 -0
- package/components/PdfContent/PdfContent.d.ts.map +1 -1
- package/components/VisualizerCanvasRenderer/VisualizerCanvasRenderer.d.ts +25 -0
- package/components/VisualizerCanvasRenderer/VisualizerCanvasRenderer.d.ts.map +1 -0
- package/constants/file.d.ts +8 -0
- package/constants/file.d.ts.map +1 -1
- package/context/AttachmentCanvasContext.d.ts +5 -3
- package/context/AttachmentCanvasContext.d.ts.map +1 -1
- package/delimited-text-worker-host-DcHj_JZt-DWJmaPag.js +25 -0
- package/docx-B9qBTEkj.js +29822 -0
- package/hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas.d.ts +64 -0
- package/hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas.d.ts.map +1 -0
- package/index.css +1 -2
- package/index.d.ts +11 -3
- package/index.d.ts.map +1 -1
- package/index.js +1123 -17237
- package/line-distribute-IsUGfHXm-DeITjLzJ.js +1234 -0
- package/line-metrics-CBbw80Ko-DoOuwYxZ.js +60 -0
- package/models/attachment-canvas.d.ts +314 -11
- package/models/attachment-canvas.d.ts.map +1 -1
- package/ooxml-highlight-surfaces-BhfVZvru.js +294 -0
- package/package.json +17 -9
- package/pptx-dkJw0-Vx.js +9179 -0
- package/read-only-comment-decoration-BTnWEeo5-BNhbteYc.js +94 -0
- package/read-only-comment-margin-plStyGfE-mggNAMB_.js +189 -0
- package/render-worker-host-BEfLZvSL-COy91Rd8.js +7 -0
- package/render-worker-host-Ba6Fchqr-DZeKpMWD.js +7 -0
- package/render-worker-host-C3xwtHnv-BBGHFdo9.js +7 -0
- package/renderer-module-contract-Cu-GKuPd-Bt0YZuzB.js +10063 -0
- package/types/attachment-canvas.d.ts +22 -0
- package/types/attachment-canvas.d.ts.map +1 -1
- package/utils/content.d.ts +11 -0
- package/utils/content.d.ts.map +1 -1
- package/utils/download.d.ts.map +1 -1
- package/utils/ooxml-highlight-geometry.d.ts +158 -0
- package/utils/ooxml-highlight-geometry.d.ts.map +1 -0
- package/utils/ooxml-highlight-surfaces.d.ts +42 -0
- package/utils/ooxml-highlight-surfaces.d.ts.map +1 -0
- package/utils/visualizer.d.ts +8 -0
- package/utils/visualizer.d.ts.map +1 -0
- package/utils/vite-external-matcher.d.ts +16 -0
- package/utils/vite-external-matcher.d.ts.map +1 -0
- package/visible-index-DPoQYSDt-9lRc-2Ik.js +162 -0
- package/xlsx-BAXMTJTG.js +8585 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { n as e, r as t, t as n } from "./attachment-canvas-Bp6WeQws.js";
|
|
2
|
+
import { MIMEType as r, ensureDownloadFilename as i, mergeClasses as a, triggerAnchorDownload as o, triggerBlobDownload as s } from "@epam/ai-dial-chat-shared";
|
|
3
|
+
import { Button as c, Spinner as l } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { Component as u, Suspense as d } from "react";
|
|
5
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
6
|
+
//#region src/utils/download.ts
|
|
7
|
+
var m = {
|
|
8
|
+
[t.Docx]: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
9
|
+
[t.Xlsx]: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
10
|
+
[t.Pptx]: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
11
|
+
[t.Csv]: r.CSV
|
|
12
|
+
}, h = (t) => {
|
|
13
|
+
switch (t.type) {
|
|
14
|
+
case n.PlainText:
|
|
15
|
+
case n.Markdown:
|
|
16
|
+
case n.Json:
|
|
17
|
+
case n.Image:
|
|
18
|
+
case n.Audio:
|
|
19
|
+
case n.Pdf:
|
|
20
|
+
case n.Ooxml:
|
|
21
|
+
case n.Code: return !0;
|
|
22
|
+
case n.Html: return t.url != null;
|
|
23
|
+
case n.MarkdownTable:
|
|
24
|
+
case n.Visualizer:
|
|
25
|
+
case n.McpApp: return !1;
|
|
26
|
+
case n.Unsupported: return t.url != null;
|
|
27
|
+
case n.Error: return t.errorType !== e.Forbidden && t.url != null;
|
|
28
|
+
}
|
|
29
|
+
}, g = async (e) => {
|
|
30
|
+
let t = await fetch(e);
|
|
31
|
+
if (!t.ok) throw Error(`HTTP ${t.status}`);
|
|
32
|
+
return t.blob();
|
|
33
|
+
}, _ = (e) => {
|
|
34
|
+
switch (e.type) {
|
|
35
|
+
case n.Image: return {
|
|
36
|
+
url: e.url,
|
|
37
|
+
mimeType: void 0
|
|
38
|
+
};
|
|
39
|
+
case n.Audio: return {
|
|
40
|
+
url: e.url,
|
|
41
|
+
mimeType: e.mimeType
|
|
42
|
+
};
|
|
43
|
+
case n.Pdf: return {
|
|
44
|
+
url: e.url,
|
|
45
|
+
mimeType: r.PDF
|
|
46
|
+
};
|
|
47
|
+
case n.Ooxml: return {
|
|
48
|
+
url: e.url,
|
|
49
|
+
mimeType: m[e.format]
|
|
50
|
+
};
|
|
51
|
+
case n.Html: return {
|
|
52
|
+
url: e.url,
|
|
53
|
+
mimeType: r.HTML
|
|
54
|
+
};
|
|
55
|
+
case n.Unsupported:
|
|
56
|
+
case n.Error: return {
|
|
57
|
+
url: e.url,
|
|
58
|
+
mimeType: void 0
|
|
59
|
+
};
|
|
60
|
+
case n.PlainText:
|
|
61
|
+
case n.Code: return {
|
|
62
|
+
url: void 0,
|
|
63
|
+
mimeType: r.Plain
|
|
64
|
+
};
|
|
65
|
+
case n.Markdown:
|
|
66
|
+
case n.MarkdownTable: return {
|
|
67
|
+
url: void 0,
|
|
68
|
+
mimeType: r.Markdown
|
|
69
|
+
};
|
|
70
|
+
case n.Json: return {
|
|
71
|
+
url: void 0,
|
|
72
|
+
mimeType: r.JSON
|
|
73
|
+
};
|
|
74
|
+
default: return {
|
|
75
|
+
url: void 0,
|
|
76
|
+
mimeType: void 0
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}, v = (e, t) => {
|
|
80
|
+
let { url: a, mimeType: c } = _(e), l = i(t ?? "attachment", a, c);
|
|
81
|
+
switch (e.type) {
|
|
82
|
+
case n.PlainText:
|
|
83
|
+
if (e.text === "") return;
|
|
84
|
+
s(new Blob([e.text], { type: r.Plain }), l);
|
|
85
|
+
return;
|
|
86
|
+
case n.Markdown:
|
|
87
|
+
if (e.text === "") return;
|
|
88
|
+
s(new Blob([e.text], { type: r.Markdown }), l);
|
|
89
|
+
return;
|
|
90
|
+
case n.Json:
|
|
91
|
+
s(new Blob([JSON.stringify(e.value, null, 2)], { type: r.JSON }), l);
|
|
92
|
+
return;
|
|
93
|
+
case n.Image:
|
|
94
|
+
case n.Audio:
|
|
95
|
+
case n.Pdf:
|
|
96
|
+
case n.Ooxml:
|
|
97
|
+
o(e.url, l);
|
|
98
|
+
return;
|
|
99
|
+
case n.Code:
|
|
100
|
+
if (e.text === "") return;
|
|
101
|
+
s(new Blob([e.text], { type: r.Plain }), l);
|
|
102
|
+
return;
|
|
103
|
+
case n.Html:
|
|
104
|
+
if (e.url == null) return;
|
|
105
|
+
o(e.url, l);
|
|
106
|
+
return;
|
|
107
|
+
case n.MarkdownTable:
|
|
108
|
+
case n.Visualizer:
|
|
109
|
+
case n.McpApp: return;
|
|
110
|
+
case n.Unsupported:
|
|
111
|
+
if (e.url == null) return;
|
|
112
|
+
o(e.url, l);
|
|
113
|
+
return;
|
|
114
|
+
case n.Error:
|
|
115
|
+
if (!h(e) || e.url == null) return;
|
|
116
|
+
o(e.url, l);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
}, y = ({ loadingLabel: e, pendingContent: t }) => /* @__PURE__ */ p("div", {
|
|
120
|
+
role: "status",
|
|
121
|
+
"aria-live": "polite",
|
|
122
|
+
className: "flex h-full items-center justify-center",
|
|
123
|
+
children: [t ?? /* @__PURE__ */ f(l, {}), /* @__PURE__ */ f("span", {
|
|
124
|
+
className: "sr-only",
|
|
125
|
+
children: e
|
|
126
|
+
})]
|
|
127
|
+
}), b = ({ errorLabel: e, retryLabel: t, onRetry: n, errorContent: r }) => /* @__PURE__ */ p("div", {
|
|
128
|
+
className: "flex h-full flex-col items-center justify-center gap-3 p-4",
|
|
129
|
+
children: [r, /* @__PURE__ */ p("div", {
|
|
130
|
+
role: "alert",
|
|
131
|
+
className: "flex flex-col items-center gap-3 text-center",
|
|
132
|
+
children: [/* @__PURE__ */ f("p", {
|
|
133
|
+
className: a("dial-body-text", "text-secondary"),
|
|
134
|
+
children: e
|
|
135
|
+
}), /* @__PURE__ */ f(c, {
|
|
136
|
+
label: t,
|
|
137
|
+
"aria-label": t,
|
|
138
|
+
onClick: n
|
|
139
|
+
})]
|
|
140
|
+
})]
|
|
141
|
+
}), x = class extends u {
|
|
142
|
+
state = { hasError: !1 };
|
|
143
|
+
static getDerivedStateFromError() {
|
|
144
|
+
return { hasError: !0 };
|
|
145
|
+
}
|
|
146
|
+
componentDidUpdate(e) {
|
|
147
|
+
e.retryKey !== this.props.retryKey && this.state.hasError && this.setState({ hasError: !1 });
|
|
148
|
+
}
|
|
149
|
+
render() {
|
|
150
|
+
let { children: e, onRetry: t, pendingContent: n, errorContent: r, labels: { loadingLabel: i = "Loading…", errorLabel: a = "Failed to load content", retryLabel: o = "Retry" } = {} } = this.props;
|
|
151
|
+
return this.state.hasError ? /* @__PURE__ */ f(b, {
|
|
152
|
+
errorLabel: a,
|
|
153
|
+
retryLabel: o,
|
|
154
|
+
onRetry: t,
|
|
155
|
+
errorContent: r
|
|
156
|
+
}) : /* @__PURE__ */ f(d, {
|
|
157
|
+
fallback: /* @__PURE__ */ f(y, {
|
|
158
|
+
loadingLabel: i,
|
|
159
|
+
pendingContent: n
|
|
160
|
+
}),
|
|
161
|
+
children: e
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
//#endregion
|
|
166
|
+
export { g as a, v as i, b as n, h as o, y as r, x as t };
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import "./PdfContent.css";
|
|
2
|
+
import { a as e, n as t, r as n } from "./LazyContentBoundary-CL7J_W9c.js";
|
|
3
|
+
import { mergeClasses as r } from "@epam/ai-dial-chat-shared";
|
|
4
|
+
import { DIAL_ICON_SIZE as i, DIAL_KIT_ICON_STROKE as a, Dropdown as o, ElementSize as s, FabButton as c, Input as ee } from "@epam/ai-dial-ui-kit";
|
|
5
|
+
import { IconMenu2 as te, IconX as ne } from "@tabler/icons-react";
|
|
6
|
+
import { useCallback as l, useEffect as u, useId as re, useRef as d, useState as f } from "react";
|
|
7
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
8
|
+
import { DocumentPreview as ie, PageThumbnail as ae } from "@epam/ai-dial-react-pdf-highlighter";
|
|
9
|
+
var oe = { viewer: "_viewer_1gfxm_1" }, h = null, g = (e) => (h ||= new Promise((t, n) => {
|
|
10
|
+
try {
|
|
11
|
+
t(e());
|
|
12
|
+
} catch (e) {
|
|
13
|
+
n(e);
|
|
14
|
+
}
|
|
15
|
+
}).catch((e) => {
|
|
16
|
+
throw h = null, e;
|
|
17
|
+
}), h), se = 15, _ = 3, ce = 172, le = 400, v = 150, ue = 60, y = ({ url: h, highlights: y, selectedHighlightId: b, selectedPageNumber: x, loadPdf: de, configurePdfWorker: S, hideHeader: fe = !1, labels: { thumbnailsLabel: pe = "Thumbnails", showThumbnailsLabel: me = "Show thumbnails", hideThumbnailsLabel: he = "Hide thumbnails", pageNumberLabel: ge = "Page number", loadingLabel: _e = "Loading…", errorLabel: ve = "Failed to load content", retryLabel: ye = "Retry" } = {} }) => {
|
|
18
|
+
let [C, w] = f(() => S ? "preparing" : "ready"), [T, be] = f(0);
|
|
19
|
+
u(() => {
|
|
20
|
+
if (!S) return;
|
|
21
|
+
w("preparing");
|
|
22
|
+
let e = !1;
|
|
23
|
+
return g(S).then(() => {
|
|
24
|
+
e || w("ready");
|
|
25
|
+
}).catch(() => {
|
|
26
|
+
e || w("error");
|
|
27
|
+
}), () => {
|
|
28
|
+
e = !0;
|
|
29
|
+
};
|
|
30
|
+
}, [S, T]);
|
|
31
|
+
let xe = l(() => {
|
|
32
|
+
be((e) => e + 1);
|
|
33
|
+
}, []), E = re(), [D, Se] = f(0), [O, k] = f(/* @__PURE__ */ new Map()), [A, j] = f(!1), [M, N] = f(() => x ?? (b ? y.find((e) => e.id === b)?.bboxes[0]?.page ?? 1 : 1)), P = d(null), F = d(null), [Ce, I] = f([]), [L, we] = f(ce), [R, Te] = f(le), [z, B] = f(0), V = d(!1), H = d(0), U = d(null);
|
|
34
|
+
u(() => {
|
|
35
|
+
if (x != null) {
|
|
36
|
+
N(x);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (!b) return;
|
|
40
|
+
let e = y.find((e) => e.id === b)?.bboxes[0]?.page;
|
|
41
|
+
e != null && N(e);
|
|
42
|
+
}, [
|
|
43
|
+
x,
|
|
44
|
+
b,
|
|
45
|
+
y
|
|
46
|
+
]), u(() => {
|
|
47
|
+
let e = F.current;
|
|
48
|
+
if (!A || !e) return;
|
|
49
|
+
let t = new ResizeObserver((e) => {
|
|
50
|
+
let t = e[0]?.contentRect.height;
|
|
51
|
+
t && Te(t);
|
|
52
|
+
});
|
|
53
|
+
return t.observe(e), () => t.disconnect();
|
|
54
|
+
}, [A]);
|
|
55
|
+
let Ee = l((e) => {
|
|
56
|
+
if (!e || V.current) return;
|
|
57
|
+
let t = e.getBoundingClientRect().height;
|
|
58
|
+
t > 0 && (V.current = !0, we(t));
|
|
59
|
+
}, []), De = l((e) => {
|
|
60
|
+
H.current = e.currentTarget.scrollTop, U.current ??= requestAnimationFrame(() => {
|
|
61
|
+
U.current = null, B(H.current);
|
|
62
|
+
});
|
|
63
|
+
}, []);
|
|
64
|
+
u(() => () => {
|
|
65
|
+
U.current != null && cancelAnimationFrame(U.current);
|
|
66
|
+
}, []);
|
|
67
|
+
let W = l((e) => {
|
|
68
|
+
if (D === 0) return;
|
|
69
|
+
let t = Math.max(0, (M - 1) * L - e.clientHeight / 2 + L / 2);
|
|
70
|
+
H.current = t, B(t), e.scrollTop = t;
|
|
71
|
+
}, [
|
|
72
|
+
M,
|
|
73
|
+
D,
|
|
74
|
+
L
|
|
75
|
+
]), Oe = l((e) => {
|
|
76
|
+
F.current = e, e && W(e);
|
|
77
|
+
}, [W]);
|
|
78
|
+
u(() => {
|
|
79
|
+
let e = F.current;
|
|
80
|
+
e && W(e);
|
|
81
|
+
}, [W]);
|
|
82
|
+
let G = Math.max(0, Math.floor(z / L) - _), ke = Math.ceil(R / L) + _ * 2, K = Math.min(D - 1, G + ke);
|
|
83
|
+
u(() => {
|
|
84
|
+
if (D === 0) return;
|
|
85
|
+
let e = Math.min(D, se);
|
|
86
|
+
I(Array.from({ length: e }, (e, t) => t + 1));
|
|
87
|
+
}, [D]), u(() => {
|
|
88
|
+
if (!A || D === 0) return;
|
|
89
|
+
let e = setTimeout(() => {
|
|
90
|
+
I((e) => {
|
|
91
|
+
let t = new Set(e), n = !1;
|
|
92
|
+
for (let e = G + 1; e <= K + 1; e++) t.has(e) || (t.add(e), n = !0);
|
|
93
|
+
return n ? Array.from(t).sort((e, t) => e - t) : e;
|
|
94
|
+
});
|
|
95
|
+
}, v);
|
|
96
|
+
return () => clearTimeout(e);
|
|
97
|
+
}, [
|
|
98
|
+
A,
|
|
99
|
+
G,
|
|
100
|
+
K,
|
|
101
|
+
D
|
|
102
|
+
]), u(() => {
|
|
103
|
+
if (D === 0) return;
|
|
104
|
+
let e = setTimeout(() => {
|
|
105
|
+
let e = Math.ceil(R / L / 2) + _, t = Math.max(0, M - 1 - e), n = Math.min(D - 1, M - 1 + e);
|
|
106
|
+
I((e) => {
|
|
107
|
+
let r = new Set(e), i = !1;
|
|
108
|
+
for (let e = t + 1; e <= n + 1; e++) r.has(e) || (r.add(e), i = !0);
|
|
109
|
+
return i ? Array.from(r).sort((e, t) => e - t) : e;
|
|
110
|
+
});
|
|
111
|
+
}, v);
|
|
112
|
+
return () => clearTimeout(e);
|
|
113
|
+
}, [
|
|
114
|
+
M,
|
|
115
|
+
D,
|
|
116
|
+
R,
|
|
117
|
+
L
|
|
118
|
+
]);
|
|
119
|
+
let Ae = l((e) => {
|
|
120
|
+
k((t) => new Map([...t, ...e]));
|
|
121
|
+
}, []), [q, je] = f(!1), Me = l((e) => {
|
|
122
|
+
P.current = e, je(!0);
|
|
123
|
+
}, []), J = d(null);
|
|
124
|
+
u(() => {
|
|
125
|
+
if (!q) return;
|
|
126
|
+
let e = J.current, t = e?.querySelector(".pdf-container"), n = e?.querySelector(".pdf-highlight-viewer");
|
|
127
|
+
if (!t || !n) return;
|
|
128
|
+
let r = () => {
|
|
129
|
+
let e = n.scrollWidth - n.clientWidth;
|
|
130
|
+
e > 0 && (n.scrollLeft = e / 2);
|
|
131
|
+
};
|
|
132
|
+
r();
|
|
133
|
+
let i = new ResizeObserver(r);
|
|
134
|
+
i.observe(t), i.observe(n);
|
|
135
|
+
let a = P.current?.getZoom(), o = 0, s, c = () => {
|
|
136
|
+
let e = P.current?.getZoom();
|
|
137
|
+
e !== a && (a = e, o = ue), o > 0 && (r(), --o), s = requestAnimationFrame(c);
|
|
138
|
+
};
|
|
139
|
+
return s = requestAnimationFrame(c), () => {
|
|
140
|
+
cancelAnimationFrame(s), i.disconnect();
|
|
141
|
+
};
|
|
142
|
+
}, [q]), u(() => {
|
|
143
|
+
if (!q || b || x != null) return;
|
|
144
|
+
let e = requestAnimationFrame(() => {
|
|
145
|
+
P.current?.navigateToPage(1);
|
|
146
|
+
});
|
|
147
|
+
return () => cancelAnimationFrame(e);
|
|
148
|
+
}, [
|
|
149
|
+
q,
|
|
150
|
+
b,
|
|
151
|
+
x
|
|
152
|
+
]);
|
|
153
|
+
let Y = l((e) => {
|
|
154
|
+
N(e), P.current?.navigateToPage(e);
|
|
155
|
+
}, []), Ne = l((e) => {
|
|
156
|
+
N(e);
|
|
157
|
+
}, []), [X, Z] = f(() => String(M));
|
|
158
|
+
u(() => {
|
|
159
|
+
Z(String(M));
|
|
160
|
+
}, [M]);
|
|
161
|
+
let Q = l((e) => {
|
|
162
|
+
let t = Number(e);
|
|
163
|
+
Number.isInteger(t) && t >= 1 && t <= D ? Y(t) : Z(String(M));
|
|
164
|
+
}, [
|
|
165
|
+
D,
|
|
166
|
+
M,
|
|
167
|
+
Y
|
|
168
|
+
]);
|
|
169
|
+
if (!h) return null;
|
|
170
|
+
if (C === "preparing") return /* @__PURE__ */ p(n, { loadingLabel: _e });
|
|
171
|
+
if (C === "error") return /* @__PURE__ */ p(t, {
|
|
172
|
+
errorLabel: ve,
|
|
173
|
+
retryLabel: ye,
|
|
174
|
+
onRetry: xe
|
|
175
|
+
});
|
|
176
|
+
let $ = [];
|
|
177
|
+
for (let e = G + 1; e <= K + 1 && e <= D; e++) $.push(/* @__PURE__ */ p("div", {
|
|
178
|
+
ref: e === G + 1 ? Ee : void 0,
|
|
179
|
+
children: /* @__PURE__ */ p(ae, {
|
|
180
|
+
pageNum: e,
|
|
181
|
+
onSelectPage: Y,
|
|
182
|
+
isSelected: M === e,
|
|
183
|
+
isLoading: !O.has(e),
|
|
184
|
+
thumbnailUrl: O.get(e) ?? null
|
|
185
|
+
})
|
|
186
|
+
}, e));
|
|
187
|
+
let Pe = G * L, Fe = Math.max(0, D - K - 1) * L;
|
|
188
|
+
return /* @__PURE__ */ m("div", {
|
|
189
|
+
className: "relative flex h-full overflow-hidden",
|
|
190
|
+
children: [D > 0 && /* @__PURE__ */ p("div", {
|
|
191
|
+
className: "absolute start-3 top-3 z-10",
|
|
192
|
+
children: /* @__PURE__ */ p(o, {
|
|
193
|
+
open: A,
|
|
194
|
+
onOpenChange: j,
|
|
195
|
+
placement: "bottom-start",
|
|
196
|
+
matchReferenceWidth: !1,
|
|
197
|
+
renderOverlay: () => /* @__PURE__ */ m("div", {
|
|
198
|
+
className: "flex w-36 flex-col",
|
|
199
|
+
children: [/* @__PURE__ */ p("div", {
|
|
200
|
+
className: "shrink-0 p-1",
|
|
201
|
+
children: /* @__PURE__ */ p(ee, {
|
|
202
|
+
size: s.Small,
|
|
203
|
+
"aria-label": ge,
|
|
204
|
+
value: X,
|
|
205
|
+
postfix: `/ ${D}`,
|
|
206
|
+
inputMode: "numeric",
|
|
207
|
+
onChange: (e) => Z(e ?? ""),
|
|
208
|
+
onBlur: () => Q(X),
|
|
209
|
+
onKeyDown: (e) => {
|
|
210
|
+
e.key === "Enter" && Q(X);
|
|
211
|
+
}
|
|
212
|
+
})
|
|
213
|
+
}), /* @__PURE__ */ m("div", {
|
|
214
|
+
ref: Oe,
|
|
215
|
+
id: E,
|
|
216
|
+
role: "region",
|
|
217
|
+
"aria-label": pe,
|
|
218
|
+
onScroll: De,
|
|
219
|
+
className: "max-h-[70vh] min-h-0 overflow-y-auto overflow-x-hidden p-1 [scrollbar-gutter:stable]",
|
|
220
|
+
children: [
|
|
221
|
+
/* @__PURE__ */ p("div", { style: { height: Pe } }),
|
|
222
|
+
$,
|
|
223
|
+
/* @__PURE__ */ p("div", { style: { height: Fe } })
|
|
224
|
+
]
|
|
225
|
+
})]
|
|
226
|
+
}),
|
|
227
|
+
children: /* @__PURE__ */ p(c, {
|
|
228
|
+
icon: p(A ? ne : te, {
|
|
229
|
+
size: i.LG,
|
|
230
|
+
stroke: a,
|
|
231
|
+
"aria-hidden": !0
|
|
232
|
+
}),
|
|
233
|
+
"aria-label": A ? he : me,
|
|
234
|
+
"aria-expanded": A,
|
|
235
|
+
"aria-controls": A ? E : void 0
|
|
236
|
+
})
|
|
237
|
+
})
|
|
238
|
+
}), /* @__PURE__ */ p("div", {
|
|
239
|
+
ref: J,
|
|
240
|
+
className: r("min-w-0 flex-1 overflow-hidden", oe.viewer),
|
|
241
|
+
children: /* @__PURE__ */ p(ie, {
|
|
242
|
+
fileUrl: h,
|
|
243
|
+
loadFileCb: de ?? e,
|
|
244
|
+
highlights: y,
|
|
245
|
+
selectedHighlightId: b,
|
|
246
|
+
selectedPageNumber: x,
|
|
247
|
+
showOccurrences: !1,
|
|
248
|
+
onTotalPagesChange: Se,
|
|
249
|
+
thumbnailPageNumbers: Ce,
|
|
250
|
+
onThumbnailsLoaded: Ae,
|
|
251
|
+
onViewerReady: Me,
|
|
252
|
+
onCurrentPageChange: Ne,
|
|
253
|
+
viewerOptions: { enableVirtualScrolling: !0 },
|
|
254
|
+
containerClassName: fe ? "[&>div:first-child]:hidden" : void 0
|
|
255
|
+
})
|
|
256
|
+
})]
|
|
257
|
+
});
|
|
258
|
+
};
|
|
259
|
+
//#endregion
|
|
260
|
+
export { y as PdfContent };
|
package/PdfContent.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._viewer_1gfxm_1 .pdf-container{min-width:max-content}*,:after,:before,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:after,:before{box-sizing:border-box;border:0 solid}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre,fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder{opacity:1;color:#9ca3af}textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::-moz-placeholder{opacity:1;color:#9ca3af}textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (width>=640px){.container{max-width:640px}}@media (width>=768px){.container{max-width:768px}}@media (width>=769px){.container{max-width:769px}}@media (width>=1024px){.container{max-width:1024px}}@media (width>=1280px){.container{max-width:1280px}}@media (width>=1536px){.container{max-width:1536px}}.visible{visibility:visible}.static{position:static}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.left-1{left:.25rem}.top-1{top:.25rem}.z-10{z-index:10}.z-20{z-index:20}.mx-auto{margin-left:auto;margin-right:auto}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.hidden{display:none}.h-4{height:1rem}.h-6{height:1.5rem}.h-\[146px\]{height:146px}.h-\[186px\]{height:186px}.h-\[600px\]{height:600px}.h-\[700px\]{height:700px}.h-full{height:100%}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-6{min-height:1.5rem}.min-h-\[26px\]{min-height:26px}.w-64{width:16rem}.w-\[104px\]{width:104px}.w-\[120px\]{width:120px}.w-\[208px\]{width:208px}.w-\[28\%\]{width:28%}.w-\[500px\]{width:500px}.w-\[58\%\]{width:58%}.w-fit{width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-3{min-width:.75rem}.max-w-\[320px\]{max-width:320px}.max-w-\[40\%\]{max-width:40%}.max-w-\[520px\]{max-width:520px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}@keyframes skeleton-wave{0%{background-position:200% 0}to{background-position:-200% 0}}.animate-skeleton-wave{animation:3.5s ease-in-out infinite skeleton-wave}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.\!justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:4px}.rounded-\[120px\]{border-radius:120px}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-r{border-right-width:1px}.border-accent{border-color:var(--stroke-accent,#1d4ed8)}.border-primary{border-color:var(--stroke-primary,#57647a)}.border-tertiary{border-color:var(--stroke-tertiary,#e0e6f0)}.border-transparent{border-color:#0000}.bg-backdrop{background-color:var(--bg-backdrop,#161b2d4d)}.bg-control-accent-alpha{background-color:var(--bg-control-accent-alpha,#2764d90f)}.bg-control-neutral{background-color:var(--bg-control-neutral,#fcfcfc)}.bg-layer-base{background-color:var(--bg-layer-base,#f5f7fa)}.bg-layer-raised{background-color:var(--bg-layer-raised,#fcfcfc)}.bg-layer-sunken{background-color:var(--bg-layer-sunken,#eef1f7)}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-layer-sunken{--tw-gradient-from:var(--bg-layer-sunken,#eef1f7) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-layer-raised{--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--bg-layer-raised,#fcfcfc) var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-layer-sunken{--tw-gradient-to:var(--bg-layer-sunken,#eef1f7) var(--tw-gradient-to-position)}.bg-\[length\:200\%_100\%\]{background-size:200% 100%}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-4{padding:1rem}.\!py-0{padding-top:0!important;padding-bottom:0!important}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\[60px\]{padding-left:60px;padding-right:60px}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pl-0\.5{padding-left:.125rem}.pt-10{padding-top:2.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-xs{font-size:.75rem;line-height:1rem}.uppercase{text-transform:uppercase}.tracking-wide{letter-spacing:.025em}.text-accent{color:var(--text-accent,#1d4ed8)}.text-primary{color:var(--text-primary,#161b2d)}.text-secondary{color:var(--text-secondary,#57647a)}.outline{outline-width:1px;outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:border-accent-alpha:hover{border-color:var(--stroke-accent-alpha,#2764d933)}.hover\:bg-control-accent-alpha-hover:hover{background-color:var(--bg-control-accent-alpha-hover,#2764d924)}.pdf-highlight-viewer{contain:layout style paint;background:#f5f5f5;width:100%;height:100%;position:relative;overflow:auto}.pdf-container{contain:layout style paint;margin:0 auto;padding:20px;position:relative}.pdf-page-container{contain:layout style paint;background:#fff;margin:0 auto 20px;position:relative;box-shadow:0 2px 8px #0000001a}.pdf-canvas{z-index:1;-webkit-user-select:none;user-select:none;width:100%;height:auto;display:block;position:relative}.unified-layer{z-index:2;pointer-events:none;opacity:.01;contain:layout style;width:100%;height:100%;position:absolute;top:0;left:0}.unified-layer .text-segment,.unified-layer .highlight-wrapper{pointer-events:auto}.text-segment{white-space:pre;transform-origin:0 0;-webkit-user-select:text;user-select:text;color:#0000;background:0 0;border:none;outline:none;margin:0;padding:0;line-height:1;position:absolute}.text-segment.selectable{cursor:text}.highlight-wrapper{cursor:pointer;transform-origin:0 0;contain:layout style;transition:opacity .2s;position:absolute}.highlight-wrapper:hover{z-index:3}.highlight-background{z-index:-1;will-change:opacity, transform;border-radius:3px;transition:opacity .2s,transform .2s;position:absolute;inset:-2px}.highlight-wrapper:hover .highlight-background{transform:scale(1.02)}.highlight-label{white-space:nowrap;box-sizing:border-box;border:1px solid #0000;flex-shrink:0;align-items:center;padding:2px 4px;font-size:12px;line-height:1.2;display:flex}.highlight-label-icon{box-sizing:border-box;flex-shrink:0;justify-content:center;align-items:center;min-width:0;min-height:0;display:inline-flex;overflow:hidden}.highlight-label-icon svg{max-width:100%;max-height:100%;color:inherit;fill:none;stroke:currentColor;flex-shrink:0;display:block;width:100%!important;height:100%!important}.unified-layer .highlight-label{margin-right:0}.protein-highlight .highlight-background{background:#ffc8004d;border:1px solid #ffb40099}.protein-highlight:hover .highlight-background{background:#ffc80080;border-color:#ffa000cc}.protein-highlight.selected .highlight-background{outline-offset:1px;background:#ffc800b3;border:2px solid #ff8c00;outline:2px solid #007acc}.gene-highlight .highlight-background{background:#00c8644d;border:1px solid #00b45a99}.gene-highlight:hover .highlight-background{background:#00c86480;border-color:#00a050cc}.gene-highlight.selected .highlight-background{outline-offset:1px;background:#00c864b3;border:2px solid #008c46;outline:2px solid #007acc}.disease-highlight .highlight-background{background:#dc32324d;border:1px solid #c8282899}.disease-highlight:hover .highlight-background{background:#dc323280;border-color:#b41e1ecc}.disease-highlight.selected .highlight-background{outline-offset:1px;background:#dc3232b3;border:2px solid #a01414;outline:2px solid #007acc}.chemical-highlight .highlight-background{background:#0096ff4d;border:1px solid #0082eb99}.chemical-highlight:hover .highlight-background{background:#0096ff80;border-color:#006ed7cc}.chemical-highlight.selected .highlight-background{outline-offset:1px;background:#0096ffb3;border:2px solid #005ac3;outline:2px solid #007acc}.species-highlight .highlight-background{background:#9664c84d;border:1px solid #8250b499}.species-highlight:hover .highlight-background{background:#9664c880;border-color:#6e3ca0cc}.species-highlight.selected .highlight-background{outline-offset:1px;background:#9664c8b3;border:2px solid #5a288c;outline:2px solid #007acc}.pdf-highlight-viewer.scrolling .unified-layer{will-change:transform}.pdf-highlight-viewer.scrolling .highlight-background{transition:none}.highlight-background{backface-visibility:hidden;transform:translateZ(0)}.highlight-wrapper{contain:layout style paint}.text-segment::-moz-selection{color:#0000;background:#007bff4d}.text-segment::selection{color:#0000;background:#007bff4d}.highlight-wrapper .text-segment::-moz-selection{color:#0000;background:#ffffff80}.highlight-wrapper .text-segment::selection{color:#0000;background:#ffffff80}.pdf-page-container.loading{opacity:.7}.pdf-page-container.loading:after{content:"";border:3px solid #f3f3f3;border-top-color:#007acc;border-radius:50%;width:32px;height:32px;margin:-16px 0 0 -16px;animation:1s linear infinite spin;position:absolute;top:50%;left:50%}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.search-result-highlight .highlight-background{animation:1s ease-in-out infinite alternate pulse-search;background:#ff06!important;border:2px solid #ffd700cc!important}@keyframes pulse-search{0%{opacity:.4}to{opacity:.8}}@media (prefers-contrast:high){.highlight-background{opacity:.8!important;border-width:2px!important}.protein-highlight .highlight-background{background:#ffc80099;border-color:#ff8c00}.gene-highlight .highlight-background{background:#00c86499;border-color:#008c46}.disease-highlight .highlight-background{background:#dc323299;border-color:#a01414}.chemical-highlight .highlight-background{background:#0096ff99;border-color:#005ac3}.species-highlight .highlight-background{background:#9664c899;border-color:#5a288c}}@media (prefers-reduced-motion:reduce){.highlight-background,.highlight-wrapper{transition:none!important;animation:none!important}}.highlight-wrapper:focus{outline-offset:2px;outline:2px solid #007acc}.highlight-wrapper:focus .highlight-background{opacity:.8;transform:scale(1.05)}.pdf-context-menu{z-index:1000;background:#fff;border:1px solid #ccc;border-radius:4px;min-width:180px;padding:4px 0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:14px;position:fixed;box-shadow:0 4px 12px #00000026}.pdf-context-menu-item{cursor:pointer;text-align:left;color:#333;background:0 0;border:none;width:100%;padding:8px 16px}.pdf-context-menu-item:hover{background:#f0f0f0}.pdf-context-menu-item:disabled{color:#999;cursor:not-allowed}.pdf-context-menu-separator{background:#eee;height:1px;margin:4px 0}.pdf-tooltip{color:#fff;z-index:1001;pointer-events:none;word-wrap:break-word;background:#000c;border-radius:4px;max-width:300px;padding:8px 12px;font-size:12px;position:fixed}.pdf-tooltip:after{content:"";border:5px solid #0000;border-top-color:#000c;width:0;height:0;margin-left:-5px;position:absolute;top:100%;left:50%}@media (width<=768px){.pdf-container{padding:10px}.pdf-page-container{margin-bottom:10px}.highlight-wrapper{min-width:44px;min-height:44px}.pdf-context-menu{min-width:200px;font-size:16px}.pdf-context-menu-item{padding:12px 16px}}@media print{.pdf-highlight-viewer{background:#fff}.pdf-page-container{box-shadow:none;page-break-after:always;margin-bottom:0}.highlight-background{transition:none;opacity:.6!important}.pdf-context-menu,.pdf-tooltip{display:none!important}}@media (prefers-color-scheme:dark){.pdf-highlight-viewer{background:#1a1a1a}.pdf-page-container{background:#2a2a2a;box-shadow:0 2px 8px #0000004d}.pdf-context-menu{color:#fff;background:#333;border-color:#555}.pdf-context-menu-item{color:#fff}.pdf-context-menu-item:hover,.pdf-context-menu-separator{background:#555}}.highlight-enter{opacity:0;transform:scale(.8)}.highlight-enter-active{opacity:1;transition:opacity .3s,transform .3s;transform:scale(1)}.highlight-exit{opacity:1;transform:scale(1)}.highlight-exit-active{opacity:0;transition:opacity .3s,transform .3s;transform:scale(.8)}.pdf-hidden{display:none!important}.pdf-invisible{visibility:hidden!important}.pdf-no-select{-webkit-user-select:none!important;user-select:none!important}.pdf-no-pointer-events{pointer-events:none!important}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/types/attachment-canvas.ts
|
|
2
|
+
var e = /* @__PURE__ */ function(e) {
|
|
3
|
+
return e.PlainText = "plain_text", e.Image = "image", e.Audio = "audio", e.Markdown = "markdown", e.MarkdownTable = "markdown_table", e.Json = "json", e.Pdf = "pdf", e.Ooxml = "ooxml", e.Code = "code", e.Html = "html", e.Visualizer = "visualizer", e.McpApp = "mcp_app", e.Unsupported = "unsupported", e.Error = "error", e;
|
|
4
|
+
}({}), t = /* @__PURE__ */ function(e) {
|
|
5
|
+
return e.Docx = "docx", e.Xlsx = "xlsx", e.Pptx = "pptx", e.Csv = "csv", e;
|
|
6
|
+
}({}), n = /* @__PURE__ */ function(e) {
|
|
7
|
+
return e.DocxTextRange = "docxTextRange", e.PptxTextRange = "pptxTextRange", e.XlsxCellRange = "xlsxCellRange", e;
|
|
8
|
+
}({}), r = /* @__PURE__ */ function(e) {
|
|
9
|
+
return e.LoadFailed = "load_failed", e.Forbidden = "forbidden", e;
|
|
10
|
+
}({});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as i, r as n, t as r, e as t };
|