@react-pdf-kit/viewer 2.9.2 → 2.10.0-beta.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/AnnotationLayer-lagF0zYo.js +116 -0
- package/dist/{Button-DBu3SaMk.js → Button-B_yuVBQ_.js} +1 -1
- package/dist/{Checkbox-CSIEUyO8.js → Checkbox-BVARFFLh.js} +2 -2
- package/dist/{Combination-11kyhTGt.js → Combination-ILTe_xfZ.js} +2 -2
- package/dist/{Container-BuamPhw4.js → Container-CY9sCoDd.js} +1 -1
- package/dist/{DocumentDialog-cRr9sSSH.js → DocumentDialog-CYKsfOE1.js} +4 -4
- package/dist/{DropDown-CM6xEwZC.js → DropDown-DEnDtOIT.js} +2 -2
- package/dist/{Input-Dpo1Xfxe.js → Input-CVjTHdhy.js} +1 -1
- package/dist/{LoaderIcon-B3ddfd0D.js → LoaderIcon-SD35XFV2.js} +1 -1
- package/dist/{LoadingIndicator-0E8WHnSN.js → LoadingIndicator-SLpllUQ1.js} +1 -1
- package/dist/{MenuItem-lItnKNd5.js → MenuItem-DEd62cAM.js} +2 -2
- package/dist/{MenuSeparator-CaFxd8b5.js → MenuSeparator-BVQWugN3.js} +1 -1
- package/dist/{PasswordModal-CxHFn0pB.js → PasswordModal-BCjtXHN4.js} +1 -1
- package/dist/{RPDropFileZone-Bq1bzWmO.js → RPDropFileZone-lI-AmN-1.js} +3 -3
- package/dist/{RPPages-BZwgKgfJ.js → RPPages-BVSFaPUT.js} +2 -2
- package/dist/{RPTooltip-QWwWh4HW.js → RPTooltip-KdCUxOyM.js} +3 -3
- package/dist/TextHighlightLayer-BMhYl-9Q.js +162 -0
- package/dist/{TextLayer-Bp1CDIIa.js → TextLayer-CUtANGvL.js} +2 -2
- package/dist/{Thumbnail-BXMk0OWF.js → Thumbnail-BDGp0xdd.js} +3 -3
- package/dist/{Thumbnails-BIuN8LZ8.js → Thumbnails-C6maORBh.js} +1 -1
- package/dist/XfaLayer.module-w4FOd2dm.js +4 -0
- package/dist/assets/XfaLayer.css +1 -0
- package/dist/assets/style.js +1 -1
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPDropFileZone.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/icons/DarkPdfIcon.js +1 -1
- package/dist/components/icons/LightPdfIcon.js +1 -1
- package/dist/components/icons/LoaderIcon.js +1 -1
- package/dist/components/layout/Container.js +1 -1
- package/dist/components/layout/LayoutContainer.js +2 -2
- package/dist/components/layout/LayoutWrapper.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +5 -5
- package/dist/components/layout/RPLayout.js +5 -5
- package/dist/components/layout/SkipLink.js +1 -1
- package/dist/components/layout/WrapperLayout.js +1 -1
- package/dist/components/layout/sidebar/CustomThumbnailElement.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +4 -4
- package/dist/components/layout/sidebar/RPSplitter.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DarkModeTool.js +2 -2
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/FileDownloadTool.js +3 -3
- package/dist/components/layout/toolbar/FileUploadTool.js +3 -3
- package/dist/components/layout/toolbar/FullScreenTool.js +3 -3
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +5 -5
- package/dist/components/layout/toolbar/OtherTool.js +7 -7
- package/dist/components/layout/toolbar/Paginate.js +4 -4
- package/dist/components/layout/toolbar/PrintTool.js +3 -3
- package/dist/components/layout/toolbar/PropertyItem.js +1 -1
- package/dist/components/layout/toolbar/RPMenuItem.js +3 -3
- package/dist/components/layout/toolbar/RPMoreOptions.js +7 -7
- package/dist/components/layout/toolbar/RPToolbar.js +2 -2
- package/dist/components/layout/toolbar/RotateTool.js +5 -5
- package/dist/components/layout/toolbar/ScrollModeTool.js +3 -3
- package/dist/components/layout/toolbar/SearchCloseButton.js +3 -3
- package/dist/components/layout/toolbar/SearchResultNavigator.js +3 -3
- package/dist/components/layout/toolbar/SearchTool.js +7 -7
- package/dist/components/layout/toolbar/SelectionModeTool.js +4 -4
- package/dist/components/layout/toolbar/ThumbnailTool.js +2 -2
- package/dist/components/layout/toolbar/ToolbarCustom.js +4 -4
- package/dist/components/layout/toolbar/ToolbarDefault.js +4 -4
- package/dist/components/layout/toolbar/ViewModeTool.js +4 -4
- package/dist/components/layout/toolbar/ZoomTool.js +8 -8
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +3 -3
- package/dist/components/layout/toolbar/tools/DualPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +1 -1
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +2 -2
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +2 -2
- package/dist/components/layout/toolbar/tools/InputPageTool.js +3 -3
- package/dist/components/layout/toolbar/tools/LastPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/NextPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PrintTool.js +2 -2
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +2 -2
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +3 -3
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +2 -2
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +2 -2
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +7 -7
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +2 -2
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +5 -5
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +5 -5
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +4 -4
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +4 -4
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/RPPage.js +54 -52
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/page/XfaLayer.js +49 -0
- package/dist/components/ui/Button.js +1 -1
- package/dist/components/ui/Checkbox.js +1 -1
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/Input.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/PasswordModal.js +1 -1
- package/dist/components/ui/RPTooltip.js +1 -1
- package/dist/contexts/LoaderContext.js +1 -1
- package/dist/contexts/RenderQueueProvider.js +46 -43
- package/dist/{dist-CNbFpoT1.js → dist-BgFO-PWQ.js} +1 -1
- package/dist/{dist-VbpVNBs6.js → dist-CtoH1CMU.js} +4 -4
- package/dist/{dist-B2hwhF6G.js → dist-D6Fk7CTS.js} +3 -3
- package/dist/{dist-BfuBBQ14.js → dist-SBjhcXgf.js} +1 -1
- package/dist/icons.js +3 -3
- package/dist/{main-DCzVrq0G.js → main-DrddwgsH.js} +3 -3
- package/dist/main.js +4 -4
- package/dist/{style-dcYpxEeL.js → style-DW_uCDpt.js} +1 -1
- package/dist/types/components/page/XfaLayer.d.ts +6 -0
- package/dist/types/utils/pdfOperationTracker.d.ts +20 -0
- package/dist/utils/annotations.js +72 -71
- package/dist/utils/hooks/useFileDownload.js +10 -6
- package/dist/utils/hooks/useHighlight.js +43 -42
- package/dist/utils/hooks/useLicense.js +2 -2
- package/dist/utils/hooks/useLoadPdf.js +66 -64
- package/dist/utils/hooks/usePdfProperties.js +33 -32
- package/dist/utils/hooks/usePrint.js +123 -88
- package/dist/utils/hooks/useSearch.js +84 -83
- package/dist/utils/hooks/useWatermark.js +1 -1
- package/dist/utils/injectPrintCSS.js +1 -1
- package/dist/utils/link_service.js +33 -17
- package/dist/utils/pdfOperationTracker.js +27 -4
- package/package.json +1 -1
- package/dist/AnnotationLayer-oDu2B4X1.js +0 -114
- package/dist/TextHighlightLayer-3vIZbRyL.js +0 -157
- /package/dist/{CanvasLayer-C3gb8EXu.js → CanvasLayer-DkVH-tX2.js} +0 -0
- /package/dist/{CustomThumbnailElement-C2quEICO.js → CustomThumbnailElement-BxTSbzpP.js} +0 -0
- /package/dist/{DarkPdfIcon-B5ehd9CV.js → DarkPdfIcon-2aDGWxuA.js} +0 -0
- /package/dist/{LightPdfIcon-DL8MYtWQ.js → LightPdfIcon-LatCGY0T.js} +0 -0
- /package/dist/{MostPageTool.module-BRVv-sGz.js → MostPageTool.module-BP2BMoK8.js} +0 -0
- /package/dist/{OtherTool.module-BQY9Nfqz.js → OtherTool.module-CMbI70sn.js} +0 -0
- /package/dist/{Paginate.module-DhE7N8AA.js → Paginate.module-DxXyYoYp.js} +0 -0
- /package/dist/{PropertyItem-evJWWmWZ.js → PropertyItem-CmRC2e5Z.js} +0 -0
- /package/dist/{RPLayout.module-BH5r8dDc.js → RPLayout.module-DLX1UwA3.js} +0 -0
- /package/dist/{RPSplitter-C63X9M8w.js → RPSplitter-DGnDuwsT.js} +0 -0
- /package/dist/{RPToolbar.module-BwqWLviy.js → RPToolbar.module-ODOa9FwW.js} +0 -0
- /package/dist/{RotateTool.module-DH5yWbvM.js → RotateTool.module-BHFeo1yn.js} +0 -0
- /package/dist/{SearchTool.module-DY8Ucfb_.js → SearchTool.module-BQDBENlo.js} +0 -0
- /package/dist/{SkipLink-Dj83gZdk.js → SkipLink-mnqFQj0O.js} +0 -0
- /package/dist/{ToolbarLayout.module-Zo715dbb.js → ToolbarLayout.module-BC9eQ9LN.js} +0 -0
- /package/dist/{WrapperLayout-Dcd9l9xH.js → WrapperLayout-NjsBnUaz.js} +0 -0
- /package/dist/{ZoomTool.module-BrIPy8pO.js → ZoomTool.module-DO-r2IDy.js} +0 -0
- /package/dist/{clsx-DSGuh5YW.js → clsx-BD2qMUU1.js} +0 -0
- /package/dist/{dist-CgoP608h.js → dist-DjD1zIE0.js} +0 -0
- /package/dist/{lib-CSInlR9T.js → lib-DTkzWIMS.js} +0 -0
- /package/dist/{useWatermark-CvAAf66v.js → useWatermark-DlRNcg9p.js} +0 -0
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { AnnotationType as e } from "./types.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { runPdfOperation as t } from "./pdfOperationTracker.js";
|
|
3
|
+
import { sanitizeExternalUrl as n } from "./sanitizeExternalUrl.js";
|
|
4
|
+
import { dateFormatter as r } from "./dateFormatter.js";
|
|
4
5
|
//#region lib/utils/annotations.ts
|
|
5
|
-
var
|
|
6
|
+
var i = [
|
|
6
7
|
"click",
|
|
7
8
|
"dblclick",
|
|
8
9
|
"input",
|
|
9
10
|
"change",
|
|
10
11
|
"mouseover"
|
|
11
|
-
],
|
|
12
|
-
function
|
|
13
|
-
let n =
|
|
14
|
-
return
|
|
12
|
+
], a = /* @__PURE__ */ new Map(), o = (e, t) => `${e.loadingTask.docId}___${t.num}R${t.gen === 0 ? "" : t.gen}`;
|
|
13
|
+
function s(e, t) {
|
|
14
|
+
let n = o(e, t);
|
|
15
|
+
return a.has(n) ? a.get(n) ?? null : null;
|
|
15
16
|
}
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
},
|
|
17
|
+
var c = (e, t, n) => {
|
|
18
|
+
a.set(o(e, t), n);
|
|
19
|
+
}, l = (e, t) => {
|
|
19
20
|
switch (t[1].name) {
|
|
20
21
|
case "XYZ": return {
|
|
21
22
|
bottomOffset: (e, n) => t[3] === null ? n : t[3],
|
|
@@ -44,52 +45,52 @@ var s = (e, t, n) => {
|
|
|
44
45
|
scaleTo: 1
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
|
-
},
|
|
48
|
+
}, u = (e) => {
|
|
48
49
|
e && (e?.querySelectorAll("[data-l10n-id=\"pdfjs-annotation-date-time-string\"]"))?.forEach((e) => {
|
|
49
|
-
let { date: t, time:
|
|
50
|
-
t &&
|
|
50
|
+
let { date: t, time: n, dateObj: i } = JSON.parse(e.dataset.l10nArgs ?? "{}");
|
|
51
|
+
t && n ? e.textContent = `${t}, ${n}` : i && (e.textContent = r(i));
|
|
51
52
|
});
|
|
52
53
|
};
|
|
53
|
-
async function
|
|
54
|
-
let
|
|
55
|
-
if (
|
|
56
|
-
let
|
|
57
|
-
return
|
|
58
|
-
} else return
|
|
59
|
-
}
|
|
60
|
-
function d(e, t) {
|
|
61
|
-
for (let n of r) e.addEventListener(n, t);
|
|
54
|
+
async function d(e, n) {
|
|
55
|
+
let r;
|
|
56
|
+
if (r = typeof n == "string" ? await t(e, () => e.getDestination(n)) : n, r && typeof r[0] == "object" && r[0] !== null) {
|
|
57
|
+
let n = r[0], i = s(e, n);
|
|
58
|
+
return i === null ? (c(e, n, await t(e, () => e.getPageIndex(n))), await d(e, r)) : l(i, r);
|
|
59
|
+
} else return l(r[0], r);
|
|
62
60
|
}
|
|
63
61
|
function f(e, t) {
|
|
64
|
-
for (let n of
|
|
62
|
+
for (let n of i) e.addEventListener(n, t);
|
|
63
|
+
}
|
|
64
|
+
function p(e, t) {
|
|
65
|
+
for (let n of i) e.removeEventListener(n, t);
|
|
65
66
|
}
|
|
66
|
-
function
|
|
67
|
-
let { id:
|
|
67
|
+
function m(e) {
|
|
68
|
+
let { id: t, url: r, unsafeUrl: i } = e;
|
|
68
69
|
new MutationObserver((e, a) => {
|
|
69
|
-
let o = document.querySelector(`[data-annotation-id="${
|
|
70
|
+
let o = document.querySelector(`[data-annotation-id="${t}"]`);
|
|
70
71
|
if (o) {
|
|
71
|
-
let e = o.querySelector("a"),
|
|
72
|
-
e && (e?.setAttribute("target", "_blank"), e?.setAttribute("href",
|
|
72
|
+
let e = o.querySelector("a"), t = n((r || i) ?? "", "");
|
|
73
|
+
e && (e?.setAttribute("target", "_blank"), e?.setAttribute("href", t), e?.setAttribute("rel", "noopener noreferrer")), a.disconnect();
|
|
73
74
|
}
|
|
74
75
|
}).observe(document.body, {
|
|
75
76
|
childList: !0,
|
|
76
77
|
subtree: !0
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function h(e, t, n) {
|
|
80
81
|
let { rotation: r, scale: i } = t, a = r % 180 == 0;
|
|
81
82
|
if (e.fieldType === "Btn" && e.pushButton) {
|
|
82
83
|
let t = e.rect[2] - e.rect[0], r = e.rect[3] - e.rect[1], o = document.createElement("canvas");
|
|
83
84
|
o.setAttribute("width", ((a ? t : r) * i).toString()), o.setAttribute("height", ((a ? r : t) * i).toString()), n.set(e.id, o);
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
function
|
|
87
|
+
function g(e) {
|
|
87
88
|
e.querySelectorAll("[tabindex]").forEach((e) => {
|
|
88
89
|
let t = e.getAttribute("tabindex");
|
|
89
90
|
t && parseInt(t, 10) > 0 && (e.tagName === "A" || e.tagName === "BUTTON" || e.getAttribute("role") === "button" || e.getAttribute("role") === "link" || e.classList.contains("linkAnnotation") ? e.setAttribute("tabindex", "0") : e.removeAttribute("tabindex"));
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
+
function _(e) {
|
|
93
94
|
e.querySelectorAll("a").forEach((e) => {
|
|
94
95
|
let t = e.textContent && e.textContent.trim().length > 0, n = e.getAttribute("aria-label");
|
|
95
96
|
if (!t && !n) {
|
|
@@ -104,53 +105,53 @@ function g(e) {
|
|
|
104
105
|
}
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
|
-
function
|
|
108
|
+
function v(e, t, n) {
|
|
108
109
|
let r = [];
|
|
109
110
|
if (n) for (let i of n) i[e] === t && r.push(i);
|
|
110
111
|
return r;
|
|
111
112
|
}
|
|
112
|
-
function
|
|
113
|
+
function y(e, t) {
|
|
113
114
|
return {
|
|
114
115
|
type: e,
|
|
115
116
|
data: t
|
|
116
117
|
};
|
|
117
118
|
}
|
|
118
|
-
async function
|
|
119
|
-
if (
|
|
120
|
-
let
|
|
121
|
-
return
|
|
122
|
-
referencedPage:
|
|
119
|
+
async function b(n, r) {
|
|
120
|
+
if (n.dest) if (typeof n.dest == "string") {
|
|
121
|
+
let t = await d(r, n.dest);
|
|
122
|
+
return y(e.INTERNAL_LINK, {
|
|
123
|
+
referencedPage: t.pageIndex,
|
|
123
124
|
offset: null
|
|
124
125
|
});
|
|
125
126
|
} else {
|
|
126
|
-
let
|
|
127
|
-
return
|
|
128
|
-
referencedPage:
|
|
127
|
+
let i = await t(r, () => r.getPageIndex(n.dest[0]));
|
|
128
|
+
return y(e.INTERNAL_LINK, {
|
|
129
|
+
referencedPage: i,
|
|
129
130
|
offset: {
|
|
130
|
-
left:
|
|
131
|
-
bottom:
|
|
131
|
+
left: n.dest[2],
|
|
132
|
+
bottom: n.dest[3]
|
|
132
133
|
}
|
|
133
134
|
});
|
|
134
135
|
}
|
|
135
|
-
else if (
|
|
136
|
-
url:
|
|
137
|
-
unsafeUrl:
|
|
136
|
+
else if (n.url || n.unsafeUrl) return y(e.LINK, {
|
|
137
|
+
url: n.url ?? n.unsafeUrl,
|
|
138
|
+
unsafeUrl: n.unsafeUrl
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
|
-
function
|
|
141
|
+
function x(e) {
|
|
141
142
|
for (let t of e.getElementsByTagName("span")) {
|
|
142
143
|
let e = t.textContent, n = JSON.parse(t.dataset.l10nArgs ?? "{}");
|
|
143
144
|
if (e) for (let t in n) e = e.replace(`{{${t}}}`, n[t]);
|
|
144
145
|
t.textContent = e;
|
|
145
146
|
}
|
|
146
147
|
}
|
|
147
|
-
function
|
|
148
|
-
return
|
|
148
|
+
function S(t) {
|
|
149
|
+
return y(e.FILE_ATTACHMENT, t.file);
|
|
149
150
|
}
|
|
150
|
-
function
|
|
151
|
+
function C(t, n) {
|
|
151
152
|
switch (t.type) {
|
|
152
153
|
case "textarea":
|
|
153
|
-
case "text": return
|
|
154
|
+
case "text": return y(e.FORM_TEXT, {
|
|
154
155
|
fieldName: t.name,
|
|
155
156
|
value: t.value
|
|
156
157
|
});
|
|
@@ -166,50 +167,50 @@ function S(t, n) {
|
|
|
166
167
|
value: e.value,
|
|
167
168
|
label: e.label
|
|
168
169
|
});
|
|
169
|
-
return
|
|
170
|
+
return y(e.FORM_SELECT, {
|
|
170
171
|
fieldName: t.name,
|
|
171
172
|
value: i,
|
|
172
173
|
options: r
|
|
173
174
|
});
|
|
174
|
-
case "checkbox": return
|
|
175
|
+
case "checkbox": return y(e.FORM_CHECKBOX, {
|
|
175
176
|
fieldName: t.name,
|
|
176
177
|
checked: t.checked
|
|
177
178
|
});
|
|
178
|
-
case "radio": return
|
|
179
|
+
case "radio": return y(e.FORM_RADIO, {
|
|
179
180
|
fieldName: t.name,
|
|
180
181
|
...n
|
|
181
182
|
});
|
|
182
|
-
case "button": return
|
|
183
|
+
case "button": return y(e.FORM_BUTTON, {
|
|
183
184
|
fieldName: t.name,
|
|
184
185
|
...n
|
|
185
186
|
});
|
|
186
187
|
}
|
|
187
188
|
}
|
|
188
|
-
async function
|
|
189
|
+
async function w(t, n, r) {
|
|
189
190
|
let i = t.target.parentNode;
|
|
190
191
|
if (i.tagName === "DIV" && (i = i.firstChild), typeof i.className != "object") {
|
|
191
192
|
if (i.className === "linkAnnotation" && t.type === "click") {
|
|
192
193
|
let e = i.dataset?.annotationId;
|
|
193
194
|
if (e) {
|
|
194
|
-
let t =
|
|
195
|
-
if (t.length) return await
|
|
195
|
+
let t = v("id", e, r);
|
|
196
|
+
if (t.length) return await b(t[0], n);
|
|
196
197
|
}
|
|
197
|
-
} else if (i.className.includes("textAnnotation"))
|
|
198
|
+
} else if (i.className.includes("textAnnotation")) x(i);
|
|
198
199
|
else if (i.className.includes("fileAttachmentAnnotation")) {
|
|
199
|
-
|
|
200
|
+
x(i);
|
|
200
201
|
let e = i.dataset.annotationId;
|
|
201
|
-
if (e && t.type === "dblclick") return
|
|
202
|
+
if (e && t.type === "dblclick") return S(v("id", e, r)[0]);
|
|
202
203
|
} else if (i.className.includes("textWidgetAnnotation") && t.type === "input") {
|
|
203
204
|
let e = i.getElementsByTagName("input")[0];
|
|
204
|
-
return e ||= i.getElementsByTagName("textarea")[0],
|
|
205
|
-
} else if (i.className.includes("choiceWidgetAnnotation") && t.type === "input") return
|
|
206
|
-
else if (i.className.includes("buttonWidgetAnnotation checkBox") && t.type === "change") return
|
|
205
|
+
return e ||= i.getElementsByTagName("textarea")[0], C(e);
|
|
206
|
+
} else if (i.className.includes("choiceWidgetAnnotation") && t.type === "input") return C(i.getElementsByTagName("select")[0]);
|
|
207
|
+
else if (i.className.includes("buttonWidgetAnnotation checkBox") && t.type === "change") return C(i.getElementsByTagName("input")[0]);
|
|
207
208
|
else if (i.className.includes("buttonWidgetAnnotation radioButton") && t.type === "change") {
|
|
208
209
|
let e = i.dataset.annotationId;
|
|
209
210
|
if (e) {
|
|
210
|
-
let t =
|
|
211
|
-
for (let e of
|
|
212
|
-
return
|
|
211
|
+
let t = v("id", e, r)[0], n = [];
|
|
212
|
+
for (let e of v("fieldName", t.fieldName, r)) e.buttonValue && n.push(e.buttonValue);
|
|
213
|
+
return C(i.getElementsByTagName("input")[0], {
|
|
213
214
|
value: t.buttonValue,
|
|
214
215
|
defaultValue: t.fieldValue,
|
|
215
216
|
options: n
|
|
@@ -218,17 +219,17 @@ async function C(t, n, r) {
|
|
|
218
219
|
} else if (i.className.includes("buttonWidgetAnnotation pushButton") && t.type === "click") {
|
|
219
220
|
let t = i.dataset.annotationId;
|
|
220
221
|
if (t) {
|
|
221
|
-
let n =
|
|
222
|
+
let n = v("id", t, r)[0], { action: i } = n;
|
|
222
223
|
return i && ["Print", "SaveAs"].includes(i) ? {
|
|
223
224
|
type: e.BUTTON,
|
|
224
225
|
data: n
|
|
225
|
-
} : n.resetForm ?
|
|
226
|
+
} : n.resetForm ? C({
|
|
226
227
|
name: n.fieldName,
|
|
227
228
|
type: "button"
|
|
228
229
|
}, {
|
|
229
230
|
actions: n.actions,
|
|
230
231
|
reset: !0
|
|
231
|
-
}) :
|
|
232
|
+
}) : C({
|
|
232
233
|
name: n.fieldName,
|
|
233
234
|
type: "button"
|
|
234
235
|
}, {
|
|
@@ -240,4 +241,4 @@ async function C(t, n, r) {
|
|
|
240
241
|
}
|
|
241
242
|
}
|
|
242
243
|
//#endregion
|
|
243
|
-
export {
|
|
244
|
+
export { w as annotationEventsHandler, f as bindLayerEvents, _ as enhanceLinkAccessibility, g as fixTabIndexAccessibility, m as handleAnnotationLink, h as handleAnnotationWidget, u as insertDateText, p as unbindLayerEvents };
|
|
@@ -3,15 +3,19 @@ import { useDownloadContext as t } from "../../contexts/DownloadContext.js";
|
|
|
3
3
|
import { useCallback as n } from "react";
|
|
4
4
|
//#region lib/utils/hooks/useFileDownload.ts
|
|
5
5
|
var r = ".pdf", i = (e) => URL.createObjectURL(e), a = async (e) => i(await (await fetch(e)).blob()), o = () => {
|
|
6
|
-
let { filename:
|
|
7
|
-
let t =
|
|
6
|
+
let { filename: o, pdfSrc: s, pdf: c } = e(), { downloadFilename: l } = t(), u = (e) => {
|
|
7
|
+
let t = l || e;
|
|
8
8
|
return t.endsWith(r) ? t : `${t}${r}`;
|
|
9
9
|
};
|
|
10
10
|
return { download: n(async () => {
|
|
11
|
-
if (!
|
|
12
|
-
let e = document.createElement("a");
|
|
13
|
-
e.href = await a(
|
|
14
|
-
}, [
|
|
11
|
+
if (!o || !s) throw Error("There is no PDF source to download");
|
|
12
|
+
let e = document.createElement("a"), t = (c?.annotationStorage.size ?? 0) > 0, n = c && t ? await c.saveDocument() : void 0;
|
|
13
|
+
e.href = n ? i(new Blob([new Uint8Array(n)], { type: "application/pdf" })) : await a(s), e.download = u(o), document.body.appendChild(e), e.click(), document.body.removeChild(e), setTimeout(() => URL.revokeObjectURL(e.href), 0);
|
|
14
|
+
}, [
|
|
15
|
+
c,
|
|
16
|
+
o,
|
|
17
|
+
s
|
|
18
|
+
]) };
|
|
15
19
|
};
|
|
16
20
|
//#endregion
|
|
17
21
|
export { o as useFileDownload };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { runPdfOperation as e } from "../pdfOperationTracker.js";
|
|
2
|
+
import { findMatches as t, getHighlightOptionsWithDefaults as n } from "../highlight.js";
|
|
3
|
+
import { useCallback as r, useEffect as i, useState as a } from "react";
|
|
3
4
|
//#region lib/utils/hooks/useHighlight.ts
|
|
4
|
-
var
|
|
5
|
+
var o = (e) => {
|
|
5
6
|
let t = Math.min(...e.map((e) => e.left)), n = Math.max(...e.map((e) => e.left + e.width)), r = Math.min(...e.map((e) => e.bottom)), i = Math.max(...e.map((e) => e.height));
|
|
6
7
|
return {
|
|
7
8
|
left: t,
|
|
@@ -9,28 +10,28 @@ var a = (e) => {
|
|
|
9
10
|
width: n - t,
|
|
10
11
|
height: i
|
|
11
12
|
};
|
|
12
|
-
},
|
|
13
|
+
}, s = (e) => e.flatMap((e) => e.rects ?? (e.rect ? [e.rect] : [])), c = (e) => {
|
|
13
14
|
let t = e.reduce((e, t) => {
|
|
14
15
|
let n = Math.round(t.bottom);
|
|
15
16
|
return e[n] || (e[n] = []), e[n].push(t), e;
|
|
16
17
|
}, {});
|
|
17
|
-
return Object.entries(t).sort((e, t) => Number(t[0]) - Number(e[0])).map(([e, t]) =>
|
|
18
|
-
},
|
|
18
|
+
return Object.entries(t).sort((e, t) => Number(t[0]) - Number(e[0])).map(([e, t]) => o(t));
|
|
19
|
+
}, l = (e) => {
|
|
19
20
|
let t = {};
|
|
20
21
|
for (let n of e) {
|
|
21
22
|
let e = n.keyword, r = t[e] ?? [];
|
|
22
23
|
r.push(n), t[e] = r;
|
|
23
24
|
}
|
|
24
25
|
return t;
|
|
25
|
-
},
|
|
26
|
-
let n = e[0], r =
|
|
26
|
+
}, u = (e, t) => {
|
|
27
|
+
let n = e[0], r = s(e), i = r.length > 0 ? c(r) : n.rect ? [n.rect] : [];
|
|
27
28
|
return {
|
|
28
29
|
...n,
|
|
29
30
|
pageMatchIdx: t,
|
|
30
31
|
rect: i[0] ?? n.rect,
|
|
31
32
|
rects: i
|
|
32
33
|
};
|
|
33
|
-
},
|
|
34
|
+
}, d = (e) => {
|
|
34
35
|
let t = {};
|
|
35
36
|
for (let n of e) {
|
|
36
37
|
let e = t[n.page] ?? [];
|
|
@@ -38,56 +39,56 @@ var a = (e) => {
|
|
|
38
39
|
}
|
|
39
40
|
let n = 0, r = [];
|
|
40
41
|
for (let e of Object.values(t)) {
|
|
41
|
-
let t =
|
|
42
|
-
for (let e of Object.values(t)) r.push(
|
|
42
|
+
let t = l(e);
|
|
43
|
+
for (let e of Object.values(t)) r.push(u(e, n++));
|
|
43
44
|
}
|
|
44
45
|
return r;
|
|
45
|
-
},
|
|
46
|
-
let [
|
|
47
|
-
if (!
|
|
48
|
-
let
|
|
49
|
-
for (let
|
|
50
|
-
let
|
|
51
|
-
|
|
46
|
+
}, f = (o) => {
|
|
47
|
+
let [s, c] = a(void 0), [l, u] = a([]), f = r(async (t) => {
|
|
48
|
+
if (!t) return {};
|
|
49
|
+
let n = t.numPages, r = {};
|
|
50
|
+
for (let i = 1; i <= n; i++) {
|
|
51
|
+
let n = await e(t, () => t.getPage(i));
|
|
52
|
+
r[i.toString()] = await e(t, () => n.getTextContent());
|
|
52
53
|
}
|
|
53
|
-
return
|
|
54
|
-
}, []),
|
|
55
|
-
|
|
56
|
-
}, []),
|
|
57
|
-
|
|
54
|
+
return r;
|
|
55
|
+
}, []), p = r(async (e) => {
|
|
56
|
+
c(e);
|
|
57
|
+
}, []), m = r(() => {
|
|
58
|
+
u([]), c(void 0);
|
|
58
59
|
}, []);
|
|
59
|
-
return
|
|
60
|
-
|
|
60
|
+
return i(() => {
|
|
61
|
+
o && f(o).then((e) => {
|
|
61
62
|
let r = [];
|
|
62
|
-
for (let { keyword: i, highlightColor: a, options:
|
|
63
|
+
for (let { keyword: i, highlightColor: a, options: o } of s) {
|
|
63
64
|
if (!i) continue;
|
|
64
|
-
let
|
|
65
|
-
for (let
|
|
66
|
-
let
|
|
65
|
+
let s = n(o);
|
|
66
|
+
for (let n of Object.keys(e)) {
|
|
67
|
+
let o = t([i], e[n], Number(n) - 1, s).map((e, t) => ({
|
|
67
68
|
...e,
|
|
68
|
-
page: Number(
|
|
69
|
-
pageMatchIdx:
|
|
69
|
+
page: Number(n),
|
|
70
|
+
pageMatchIdx: t,
|
|
70
71
|
color: a,
|
|
71
72
|
keyword: i
|
|
72
73
|
}));
|
|
73
|
-
r = [...r, ...
|
|
74
|
+
r = [...r, ...o];
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
|
-
|
|
77
|
+
u(d(r));
|
|
77
78
|
}).catch(() => {
|
|
78
|
-
|
|
79
|
+
m();
|
|
79
80
|
});
|
|
80
81
|
}, [
|
|
82
|
+
s,
|
|
81
83
|
o,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
d
|
|
84
|
+
m,
|
|
85
|
+
f
|
|
85
86
|
]), {
|
|
86
|
-
highlight:
|
|
87
|
-
clear:
|
|
88
|
-
highlightMatches:
|
|
89
|
-
highlightKeywords:
|
|
87
|
+
highlight: p,
|
|
88
|
+
clear: m,
|
|
89
|
+
highlightMatches: l,
|
|
90
|
+
highlightKeywords: s
|
|
90
91
|
};
|
|
91
92
|
};
|
|
92
93
|
//#endregion
|
|
93
|
-
export {
|
|
94
|
+
export { f as useHighlight };
|
|
@@ -3,7 +3,7 @@ import { LicenseType as t } from "../types.js";
|
|
|
3
3
|
import { appConsole as n } from "../appConsole.js";
|
|
4
4
|
import { useCallback as r, useEffect as i, useState as a } from "react";
|
|
5
5
|
//#region lib/utils/hooks/useLicense.ts
|
|
6
|
-
var o = /* @__PURE__ */ new Date("2026-09-
|
|
6
|
+
var o = /* @__PURE__ */ new Date("2026-09-23T06:43:32.834Z"), s = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvIokvErJ0Fctu0jduSAx\ngr+5Har/VSuZLlOunS28hnlqqA+OF1apHL7RYkjBosS15yvviYdLrVWYHpHnoY4b\nHLQ9I6YX6FMB9T/VbB4xLdVdKvfi8r49aTScl5EKuSpgpPgz2VSJTfvVGcRuth/Y\nBm7PPGYdL2l2gvKDxchmmsHFPukGki9L4JOUeIVX0GXAxabENckaEH/iC1NZhX+W\nvXnpHeHuIIKlZ16LSivXNgo6BH2Z3GFdg4G3cAaXr6qNP8fsacYNqv2SpTW1viFD\nvzcGRabN25gpJAp9/syeScefWH3OiJY1lmw88oTiJbjIoiq6AkPhfn3G9mF54nvR\nkwIDAQAB\n-----END PUBLIC KEY-----", c = "Please visit https://app.react-pdf-kit.dev to generate a new license key.", l = {
|
|
7
7
|
invalidLicense: `You are currently using without a valid license. ${c}`,
|
|
8
8
|
mismatchedDomain: `Your license key is not valid for the current domain / IP. ${c}`,
|
|
9
9
|
expired: `Your license key has expired. ${c}`,
|
|
@@ -22,7 +22,7 @@ function d(e) {
|
|
|
22
22
|
}
|
|
23
23
|
async function f(t) {
|
|
24
24
|
try {
|
|
25
|
-
let n = await import("../../lib-
|
|
25
|
+
let n = await import("../../lib-DTkzWIMS.js").then((t) => /* @__PURE__ */ e(t.default, 1)), r = n?.default ?? n, i = r.pki.publicKeyFromPem(s), a = atob(t.data), o = r.util.decode64(t.signature), c = r.md.sha256.create();
|
|
26
26
|
c.update(a, "utf8");
|
|
27
27
|
let l = r.pss.create({
|
|
28
28
|
md: r.md.sha256.create(),
|
|
@@ -5,95 +5,97 @@ import { useConfigContext as n } from "../../contexts/ConfigContext.js";
|
|
|
5
5
|
import { appConsole as r } from "../appConsole.js";
|
|
6
6
|
import { useDocumentPasswordContext as i } from "../../contexts/DocumentPasswordContext.js";
|
|
7
7
|
import { BROWSER_NOT_SUPPORTED_MESSAGE as a, INVALID_OR_CORRUPTED_PDF_MESSAGE as o, WASM_URL_REQUIRED_CONSOLE_MESSAGE as s, WASM_URL_REQUIRED_MESSAGE as c } from "../const.js";
|
|
8
|
-
import {
|
|
9
|
-
import { useEffect as
|
|
10
|
-
import * as
|
|
8
|
+
import { isPdfDocumentDestroyedError as l, markPdfDestroying as u, runPdfOperation as d, waitForPdfOperations as f } from "../pdfOperationTracker.js";
|
|
9
|
+
import { useEffect as p, useRef as m, useState as h } from "react";
|
|
10
|
+
import * as g from "pdfjs-dist";
|
|
11
11
|
//#region lib/utils/hooks/useLoadPdf.ts
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
return e.some((t, n) => t ===
|
|
12
|
+
var _ = new TextEncoder().encode("/JPXDecode");
|
|
13
|
+
function v(e) {
|
|
14
|
+
return e.some((t, n) => t === _[0] ? _.every((t, r) => e[n + r] === t) : !1);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function y(e) {
|
|
17
17
|
let t = Error(o);
|
|
18
18
|
return t.cause = e, t;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function b() {
|
|
21
21
|
return Error(c);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function x(e) {
|
|
24
24
|
let t = Error(a);
|
|
25
25
|
return t.cause = e, t;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
let [
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
}, [
|
|
32
|
-
if (!
|
|
33
|
-
|
|
34
|
-
let t =
|
|
27
|
+
var S = (a, o, c = {}) => {
|
|
28
|
+
let [_, S] = h(), { workerUrlAdded: C, wasmUrl: w, iccUrl: T, standardFontDataUrl: E } = n(), [D, O] = h(/* @__PURE__ */ new Map()), k = m(), [A, j] = h(0), [M, N] = h(!1), [P, F] = h(), { password: I, passwordError: L, setPasswordError: R, passwordRequired: z, setPasswordRequired: B } = i(), { onLoadError: V, onLoaded: H, onLoadProgress: U, disableAutoFetch: W, disableStream: G, rangeChunkSize: K, withCredentials: q, httpHeaders: J } = c;
|
|
29
|
+
return p(() => {
|
|
30
|
+
U && U(A);
|
|
31
|
+
}, [A, U]), p(() => {
|
|
32
|
+
if (!C || !a) return;
|
|
33
|
+
j(0), F(void 0), k.current = Date.now();
|
|
34
|
+
let t = k.current, n = {
|
|
35
35
|
url: a,
|
|
36
36
|
cMapPacked: o?.isCompressed ?? !0,
|
|
37
37
|
...o?.url && { cMapUrl: o.url },
|
|
38
|
-
...
|
|
39
|
-
...
|
|
40
|
-
...
|
|
41
|
-
...
|
|
42
|
-
...
|
|
43
|
-
...
|
|
44
|
-
...
|
|
45
|
-
...
|
|
46
|
-
iccUrl:
|
|
38
|
+
...I && { password: I },
|
|
39
|
+
...W !== void 0 && { disableAutoFetch: W },
|
|
40
|
+
...G !== void 0 && { disableStream: G },
|
|
41
|
+
...K !== void 0 && { rangeChunkSize: K },
|
|
42
|
+
...q !== void 0 && { withCredentials: q },
|
|
43
|
+
...J !== void 0 && { httpHeaders: J },
|
|
44
|
+
...w && { wasmUrl: w },
|
|
45
|
+
...T && {
|
|
46
|
+
iccUrl: T,
|
|
47
47
|
useWorkerFetch: !0
|
|
48
48
|
},
|
|
49
|
-
...
|
|
50
|
-
|
|
49
|
+
...E && { standardFontDataUrl: E },
|
|
50
|
+
enableXfa: !0,
|
|
51
|
+
verbosity: g.VerbosityLevel.ERRORS
|
|
51
52
|
};
|
|
52
53
|
try {
|
|
53
|
-
let i =
|
|
54
|
+
let i = g.getDocument(n);
|
|
54
55
|
i.onProgress = (e) => {
|
|
55
|
-
if (t ===
|
|
56
|
+
if (t === k.current) {
|
|
56
57
|
let { loaded: t, total: n } = e;
|
|
57
|
-
|
|
58
|
+
j(n ? Math.min(100, Math.round(t / n * 100)) : 0);
|
|
58
59
|
}
|
|
59
|
-
},
|
|
60
|
-
let a, o = i.promise.then(async (n) => (a = n, !
|
|
61
|
-
if (t instanceof Error && t.name === "PasswordException") {
|
|
60
|
+
}, N(!0), S(void 0);
|
|
61
|
+
let a, o = i.promise.then(async (n) => (a = n, !w && v(await d(n, () => n.getData())) ? (t === k.current && (S(void 0), F(e.WASM_URL_REQUIRED)), r.error(s), V?.(b()), n) : (t === k.current && (S(n), j(100)), H && H(n), B(!1), R(""), n))).catch((t) => {
|
|
62
|
+
if (!l(t)) if (t instanceof Error && t.name === "PasswordException") {
|
|
62
63
|
let e = t.code;
|
|
63
|
-
|
|
64
|
-
} else t instanceof Error && t.name === "InvalidPDFException" &&
|
|
64
|
+
B(!0), e === g.PasswordResponses.INCORRECT_PASSWORD ? R("Incorrect password") : R(void 0);
|
|
65
|
+
} else t instanceof Error && t.name === "InvalidPDFException" && I ? (B(!0), R("Incorrect password")) : t instanceof Error && t.name === "InvalidPDFException" ? (F(e.INVALID_OR_CORRUPTED_PDF), V?.(y(t))) : V && V(t);
|
|
65
66
|
}).finally(() => {
|
|
66
|
-
|
|
67
|
+
N(!1);
|
|
67
68
|
});
|
|
68
69
|
return () => {
|
|
69
70
|
o.finally(() => {
|
|
70
|
-
|
|
71
|
+
let e;
|
|
72
|
+
a ? (u(a), e = f(a)) : e = Promise.resolve(), e.finally(() => {
|
|
71
73
|
i.destroy();
|
|
72
74
|
});
|
|
73
75
|
});
|
|
74
76
|
};
|
|
75
77
|
} catch (t) {
|
|
76
|
-
|
|
78
|
+
F(e.NOT_SUPPORTED), V?.(x(t));
|
|
77
79
|
}
|
|
78
80
|
}, [
|
|
79
81
|
a,
|
|
80
|
-
x,
|
|
81
|
-
S,
|
|
82
82
|
C,
|
|
83
83
|
w,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
T,
|
|
85
|
+
E,
|
|
86
|
+
I,
|
|
87
|
+
V,
|
|
88
|
+
H
|
|
89
|
+
]), p(() => {
|
|
90
|
+
if (z) return;
|
|
89
91
|
let n = /* @__PURE__ */ new Map();
|
|
90
|
-
if (!
|
|
91
|
-
|
|
92
|
+
if (!_ || M) {
|
|
93
|
+
O(n);
|
|
92
94
|
return;
|
|
93
95
|
}
|
|
94
|
-
let r =
|
|
96
|
+
let r = _.numPages, i = [];
|
|
95
97
|
for (let e = 1; e <= r; e++) {
|
|
96
|
-
let t =
|
|
98
|
+
let t = d(_, () => _.getPage(e));
|
|
97
99
|
i.push(t);
|
|
98
100
|
}
|
|
99
101
|
Promise.allSettled(i).then((e) => {
|
|
@@ -107,24 +109,24 @@ var b = (a, o, c = {}) => {
|
|
|
107
109
|
thumbnailScale: i,
|
|
108
110
|
defaultRotation: a.rotation
|
|
109
111
|
});
|
|
110
|
-
}),
|
|
112
|
+
}), O(n);
|
|
111
113
|
}).catch((t) => {
|
|
112
|
-
|
|
114
|
+
l(t) || (S(void 0), F(e.INVALID_OR_CORRUPTED_PDF), V?.(y(t)));
|
|
113
115
|
});
|
|
114
116
|
}, [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
_,
|
|
118
|
+
M,
|
|
119
|
+
z,
|
|
120
|
+
V
|
|
119
121
|
]), {
|
|
120
|
-
pdf:
|
|
121
|
-
pages:
|
|
122
|
-
loading:
|
|
123
|
-
error:
|
|
124
|
-
loadingProgress:
|
|
125
|
-
passwordRequired:
|
|
126
|
-
passwordError:
|
|
122
|
+
pdf: _,
|
|
123
|
+
pages: D,
|
|
124
|
+
loading: M,
|
|
125
|
+
error: P,
|
|
126
|
+
loadingProgress: A,
|
|
127
|
+
passwordRequired: z,
|
|
128
|
+
passwordError: L
|
|
127
129
|
};
|
|
128
130
|
};
|
|
129
131
|
//#endregion
|
|
130
|
-
export {
|
|
132
|
+
export { S as useLoadPdf };
|