@pdf-viewer/react 1.9.1-rc.4 → 1.9.1-rc.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.
Files changed (61) hide show
  1. package/dist/{ToolbarLayout.module-20b830dd.js → ToolbarLayout.module-e532b211.js} +774 -760
  2. package/dist/assets/ToolbarLayout.css +1 -1
  3. package/dist/components/RPController.js +1 -1
  4. package/dist/components/RPPages.js +1 -1
  5. package/dist/components/layout/LayoutContainer.js +1 -1
  6. package/dist/components/layout/RPDefaultLayout.js +1 -1
  7. package/dist/components/layout/RPLayout.js +1 -1
  8. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  9. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  10. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  11. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  12. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  13. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  14. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  15. package/dist/components/layout/toolbar/Paginate.js +1 -1
  16. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  17. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  18. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  19. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  20. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  21. package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
  22. package/dist/components/layout/toolbar/ToolbarCustom.js +1 -1
  23. package/dist/components/layout/toolbar/ToolbarDefault.js +1 -1
  24. package/dist/components/layout/toolbar/ZoomTool.js +86 -69
  25. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
  26. package/dist/components/layout/toolbar/tools/InputPageTool.js +1 -1
  27. package/dist/components/layout/toolbar/tools/NextPageTool.js +1 -1
  28. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
  29. package/dist/components/layout/toolbar/tools/PrintTool.js +1 -1
  30. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
  31. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +1 -1
  32. package/dist/components/page/AnnotationLayer.js +1 -1
  33. package/dist/components/page/CanvasLayer.js +1 -1
  34. package/dist/components/page/DualPage.js +1 -1
  35. package/dist/components/page/RPPage.js +1 -1
  36. package/dist/components/page/SinglePage.js +1 -1
  37. package/dist/components/page/TextHighlightLayer.js +1 -1
  38. package/dist/components/page/TextLayer.js +1 -1
  39. package/dist/components/ui/LoadingIndicator.js +1 -1
  40. package/dist/contexts/PaginationContext.js +1 -1
  41. package/dist/contexts/PrintContext.js +1 -1
  42. package/dist/contexts/RPDocumentContext.js +31 -29
  43. package/dist/contexts/RenderQueueProvider.js +1 -1
  44. package/dist/contexts/SearchContext.js +1 -1
  45. package/dist/contexts/ThumbnailsContext.js +1 -1
  46. package/dist/contexts/ZoomContext.js +40 -40
  47. package/dist/main.js +1 -1
  48. package/dist/types/utils/hooks/useLoadPdf.d.ts +2 -1
  49. package/dist/types/utils/types.d.ts +4 -0
  50. package/dist/utils/hooks/useFileDownload.js +1 -1
  51. package/dist/utils/hooks/useLicense.js +1 -1
  52. package/dist/utils/hooks/useLoadPdf.js +64 -57
  53. package/dist/utils/hooks/usePaginate.js +1 -1
  54. package/dist/utils/hooks/usePresentPage.js +1 -1
  55. package/dist/utils/hooks/usePrint.js +1 -1
  56. package/dist/utils/hooks/useScrollToPage.js +1 -1
  57. package/dist/utils/hooks/useSearch.js +1 -1
  58. package/dist/utils/hooks/useThumbnail.js +1 -1
  59. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  60. package/dist/utils/types.js +10 -9
  61. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { G as mo } from "../../ToolbarLayout.module-20b830dd.js";
3
+ import { G as mo } from "../../ToolbarLayout.module-e532b211.js";
4
4
  import "../../contexts/RPDocumentContext.js";
5
5
  import "../../contexts/DocumentPasswordContext.js";
6
6
  import "../../contexts/DarkModeContext.js";
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { J as m } from "../../ToolbarLayout.module-20b830dd.js";
3
+ import { J as m } from "../../ToolbarLayout.module-e532b211.js";
4
4
  export {
5
5
  m as SinglePage
6
6
  };
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../contexts/RPDocumentContext.js";
4
4
  import "../../contexts/DocumentPasswordContext.js";
5
- import { F as ir } from "../../ToolbarLayout.module-20b830dd.js";
5
+ import { F as ir } from "../../ToolbarLayout.module-e532b211.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../contexts/RotationContext.js";
8
8
  import "../../contexts/LayerContext.js";
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../contexts/RPDocumentContext.js";
4
4
  import "../../contexts/DocumentPasswordContext.js";
5
- import { D as tr } from "../../ToolbarLayout.module-20b830dd.js";
5
+ import { D as tr } from "../../ToolbarLayout.module-e532b211.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../contexts/RotationContext.js";
8
8
  import "../../contexts/LayerContext.js";
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { p as i } from "../../ToolbarLayout.module-20b830dd.js";
2
+ import { p as i } from "../../ToolbarLayout.module-e532b211.js";
3
3
  import "../../clsx-0c6e471a.js";
4
4
  import "../../contexts/LocalizationContext.js";
5
5
  export {
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { s as p, P as e, u as s } from "../ToolbarLayout.module-20b830dd.js";
3
+ import { s as p, P as e, u as s } from "../ToolbarLayout.module-e532b211.js";
4
4
  import "./RPDocumentContext.js";
5
5
  import "../utils/appConsole.js";
6
6
  import "./GlobalCurrentPage.js";
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { v as e, h as n, c as s } from "../ToolbarLayout.module-20b830dd.js";
3
+ import { v as e, h as n, c as s } from "../ToolbarLayout.module-e532b211.js";
4
4
  export {
5
5
  e as PrintContext,
6
6
  n as PrintProvider,
@@ -1,9 +1,9 @@
1
- import { jsx as x } from "react/jsx-runtime";
2
- import { createContext as C, useState as l, useEffect as h, useMemo as S, useContext as v } from "react";
3
- import { useLoadPdf as D } from "../utils/hooks/useLoadPdf.js";
4
- import { usePdfProperties as F } from "../utils/hooks/usePdfProperties.js";
5
- import { appConsole as M } from "../utils/appConsole.js";
6
- const m = C({
1
+ import { jsx as C } from "react/jsx-runtime";
2
+ import { createContext as h, useState as m, useEffect as v, useMemo as S, useContext as D } from "react";
3
+ import { useLoadPdf as F } from "../utils/hooks/useLoadPdf.js";
4
+ import { usePdfProperties as M } from "../utils/hooks/usePdfProperties.js";
5
+ import { appConsole as j } from "../utils/appConsole.js";
6
+ const u = h({
7
7
  pdf: void 0,
8
8
  pages: /* @__PURE__ */ new Map(),
9
9
  setPdfSrc: () => {
@@ -11,39 +11,41 @@ const m = C({
11
11
  setFilename: () => {
12
12
  },
13
13
  loading: !1,
14
- loaderProgress: 0
15
- }), R = ({
14
+ loaderProgress: 0,
15
+ error: void 0
16
+ }), b = ({
16
17
  children: t,
17
18
  src: e,
18
- characterMap: u,
19
- onLoadError: c,
20
- onLoaded: P
19
+ characterMap: c,
20
+ onLoadError: P,
21
+ onLoaded: g
21
22
  }) => {
22
- const [o, n] = l(e), [s, i] = l(), { pdf: r, pages: p, loading: d, loadingProgress: f } = D(o, u, {
23
- onLoadError: c,
24
- onLoaded: P
25
- }), a = F(o, r, s);
26
- h(() => {
23
+ const [o, n] = m(e), [s, i] = m(), { pdf: r, pages: d, loading: p, loadingProgress: f, error: a } = F(o, c, {
24
+ onLoadError: P,
25
+ onLoaded: g
26
+ }), l = M(o, r, s);
27
+ v(() => {
27
28
  i(e == null ? void 0 : e.split("/").pop()), n(e);
28
29
  }, [e]);
29
- const g = S(() => ({
30
+ const x = S(() => ({
30
31
  pdf: r,
31
- pages: p,
32
+ pages: d,
32
33
  pdfSrc: o,
33
34
  setPdfSrc: n,
34
- pdfProperties: a,
35
+ pdfProperties: l,
35
36
  setFilename: i,
36
37
  filename: s,
37
- loading: d,
38
- loaderProgress: f
39
- }), [r, p, o, a, d, f]);
40
- return /* @__PURE__ */ x(m.Provider, { value: g, children: o ? t : null });
41
- }, b = () => {
42
- const t = v(m);
43
- return t.pdfSrc || M.error("Please use this hooks inside children component of RPDocument"), t;
38
+ loading: p,
39
+ loaderProgress: f,
40
+ error: a
41
+ }), [r, d, o, l, p, f, a]);
42
+ return /* @__PURE__ */ C(u.Provider, { value: x, children: o ? t : null });
43
+ }, q = () => {
44
+ const t = D(u);
45
+ return t.pdfSrc || j.error("Please use this hooks inside children component of RPDocument"), t;
44
46
  };
45
47
  export {
46
- R as DocumentProvider,
47
- m as default,
48
- b as useDocumentContext
48
+ b as DocumentProvider,
49
+ u as default,
50
+ q as useDocumentContext
49
51
  };
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../utils/Queue.js";
4
4
  import "../utils/renderPage.js";
5
- import { A as m, g as p, B as d } from "../ToolbarLayout.module-20b830dd.js";
5
+ import { A as m, g as p, B as d } from "../ToolbarLayout.module-e532b211.js";
6
6
  export {
7
7
  m as RenderQueueContext,
8
8
  p as RenderQueueProvider,
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { z as a, f as s, d as c } from "../ToolbarLayout.module-20b830dd.js";
3
+ import { z as a, f as s, d as c } from "../ToolbarLayout.module-e532b211.js";
4
4
  export {
5
5
  a as SearchContext,
6
6
  s as SearchProvider,
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { x as m, T as r, i as e } from "../ToolbarLayout.module-20b830dd.js";
3
+ import { x as m, T as r, i as e } from "../ToolbarLayout.module-e532b211.js";
4
4
  export {
5
5
  m as ThumbnailContext,
6
6
  r as ThumbnailProvider,
@@ -1,54 +1,54 @@
1
- import { jsx as H } from "react/jsx-runtime";
2
- import { createContext as N, useContext as S, useState as u, useRef as E, useEffect as a, useCallback as x, useMemo as C } from "react";
3
- import { ZoomLevel as G } from "../utils/types.js";
4
- import { appConsole as R } from "../utils/appConsole.js";
5
- import { useInitialStateContext as A } from "./InitialStateContext.js";
6
- import { useDocumentContext as I } from "./RPDocumentContext.js";
7
- import { PAGE_PADDING as M } from "../utils/constants.js";
8
- import { getZoomLevel as O } from "../utils/getZoomLevel.js";
9
- import { useLayoutContainer as J } from "./LayoutContainerContext.js";
10
- import { useViewModeContext as _ } from "./ViewModeContext.js";
11
- import { useRotationContext as j } from "./RotationContext.js";
12
- import { useGlobalCurrentPage as F } from "./GlobalCurrentPage.js";
13
- const L = N({
1
+ import { jsx as S } from "react/jsx-runtime";
2
+ import { createContext as E, useContext as G, useState as c, useRef as A, useEffect as a, useCallback as x, useMemo as C } from "react";
3
+ import { ZoomLevel as I } from "../utils/types.js";
4
+ import { appConsole as M } from "../utils/appConsole.js";
5
+ import { useInitialStateContext as O } from "./InitialStateContext.js";
6
+ import { useDocumentContext as R } from "./RPDocumentContext.js";
7
+ import { PAGE_PADDING as J } from "../utils/constants.js";
8
+ import { getZoomLevel as _ } from "../utils/getZoomLevel.js";
9
+ import { useLayoutContainer as j } from "./LayoutContainerContext.js";
10
+ import { useViewModeContext as F } from "./ViewModeContext.js";
11
+ import { useRotationContext as T } from "./RotationContext.js";
12
+ import { useGlobalCurrentPage as k } from "./GlobalCurrentPage.js";
13
+ const L = E({
14
14
  zoomLevel: 100,
15
15
  currentZoom: 1,
16
16
  setZoomLevel: () => {
17
17
  }
18
- }), ne = () => {
19
- const c = S(L);
20
- return typeof c.currentZoom != "number" && R.warn("Please use this hooks inside children component of RPProvider"), c;
21
- }, re = ({ children: c }) => {
22
- const { initialScale: w = G.PAGE_FIT } = A(), [r, f] = u(w), { pages: l } = I(), { pagesRef: o } = J(), { viewMode: p } = _(), [h, W] = u((o == null ? void 0 : o.clientWidth) || 0), { rotate: d } = j(), [n, b] = u(null), g = E(null), { currentPage: v } = F(), [P, V] = u(v);
18
+ }), ie = () => {
19
+ const m = G(L);
20
+ return typeof m.currentZoom != "number" && M.warn("Please use this hooks inside children component of RPProvider"), m;
21
+ }, se = ({ children: m }) => {
22
+ const { initialScale: w = I.PAGE_FIT } = O(), [r, f] = c(w), { pages: l } = R(), { pagesRef: o } = j(), { viewMode: h } = F(), [p, W] = c((o == null ? void 0 : o.clientWidth) || 0), [H, b] = c((o == null ? void 0 : o.clientHeight) || 0), { rotate: g } = T(), [n, V] = c(null), d = A(null), { currentPage: v } = k(), [P, z] = c(v);
23
23
  a(() => {
24
24
  let e = l.get(P);
25
25
  e || (e = l.get(1));
26
26
  const t = e == null ? void 0 : e.page.getViewport({
27
27
  scale: 1,
28
- rotation: e.defaultRotation + d
28
+ rotation: e.defaultRotation + g
29
29
  });
30
- t && JSON.stringify(t) !== JSON.stringify(g.current) && (g.current = t, b(t));
31
- }, [l, d, P]);
30
+ t && JSON.stringify(t) !== JSON.stringify(d.current) && (d.current = t, V(t));
31
+ }, [l, g, P]);
32
32
  const Z = x(() => {
33
33
  if (!n)
34
34
  return null;
35
- const e = ((n == null ? void 0 : n.width) || 0) + 2 * M, t = (n == null ? void 0 : n.height) || 0, i = (o == null ? void 0 : o.clientWidth) || 0, s = (o == null ? void 0 : o.clientHeight) || 0;
36
- return { pageWidth: e, pageHeight: t, clientWidth: i, clientHeight: s };
37
- }, [n]), m = C(() => {
35
+ const e = ((n == null ? void 0 : n.width) || 0) + 2 * J, t = (n == null ? void 0 : n.height) || 0, s = (o == null ? void 0 : o.clientWidth) || 0, i = (o == null ? void 0 : o.clientHeight) || 0;
36
+ return { pageWidth: e, pageHeight: t, clientWidth: s, clientHeight: i };
37
+ }, [n]), u = C(() => {
38
38
  const e = Z();
39
- if (!h || !e)
39
+ if (!p || !e)
40
40
  return 0;
41
41
  if (typeof r == "number")
42
42
  return r / 100;
43
- const { clientWidth: t, clientHeight: i, pageWidth: s, pageHeight: D } = e;
44
- return O(r, t, i, s, D, p) / 100;
45
- }, [r, h, Z, p]);
43
+ const { clientWidth: t, clientHeight: s, pageWidth: i, pageHeight: N } = e;
44
+ return _(r, t, s, i, N, h) / 100;
45
+ }, [r, p, H, Z, h]);
46
46
  a(() => {
47
- V(v);
47
+ z(v);
48
48
  }, [r]), a(() => {
49
- const e = (i) => {
50
- i.forEach((s) => {
51
- W(s.contentRect.width);
49
+ const e = (s) => {
50
+ s.forEach((i) => {
51
+ W(i.contentRect.width), b(i.contentRect.height);
52
52
  });
53
53
  }, t = new ResizeObserver(e);
54
54
  return o && t.observe(o), () => {
@@ -58,18 +58,18 @@ const L = N({
58
58
  const y = x(
59
59
  (e) => {
60
60
  let t = 0;
61
- typeof e == "function" ? t = e(m * 100) : t = e, t && f(t);
61
+ typeof e == "function" ? t = e(u * 100) : t = e, t && f(t);
62
62
  },
63
- [f, m]
64
- ), z = C(() => ({
63
+ [f, u]
64
+ ), D = C(() => ({
65
65
  zoomLevel: r,
66
- currentZoom: m,
66
+ currentZoom: u,
67
67
  setZoomLevel: y
68
- }), [m, r]);
69
- return /* @__PURE__ */ H(L.Provider, { value: z, children: c });
68
+ }), [u, r]);
69
+ return /* @__PURE__ */ S(L.Provider, { value: D, children: m });
70
70
  };
71
71
  export {
72
72
  L as ZoomContext,
73
- re as ZoomProvider,
74
- ne as useZoomContext
73
+ se as ZoomProvider,
74
+ ie as useZoomContext
75
75
  };
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RPProvider as r } from "./components/RPProvider.js";
2
- import { a as x, R as m, S as l, b as p, u as f, c as a, d as n } from "./ToolbarLayout.module-20b830dd.js";
2
+ import { a as x, R as m, S as l, b as p, u as f, c as a, d as n } from "./ToolbarLayout.module-e532b211.js";
3
3
  import { RPConfig as u } from "./components/RPConfig.js";
4
4
  import { RPLayout as P } from "./components/layout/RPLayout.js";
5
5
  import { RPController as C } from "./components/RPController.js";
@@ -1,9 +1,10 @@
1
1
  import { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api.js';
2
- import { PdfPage, RPSrc, CharacterMap, LoadPDFOptions } from '../types';
2
+ import { PdfPage, RPSrc, CharacterMap, LoadPDFOptions, ErrorType } from '../types';
3
3
  export declare const useLoadPdf: (src?: RPSrc, characterMap?: CharacterMap, options?: LoadPDFOptions) => {
4
4
  pdf: PDFDocumentProxy | undefined;
5
5
  pages: Map<number, PdfPage>;
6
6
  loading: boolean;
7
+ error: ErrorType | undefined;
7
8
  loadingProgress: number;
8
9
  passwordRequired: boolean | undefined;
9
10
  passwordError: string | undefined;
@@ -12,6 +12,7 @@ export interface DocumentContextType {
12
12
  filename?: string | null;
13
13
  loading: boolean;
14
14
  loaderProgress: number;
15
+ error: ErrorType | unknown;
15
16
  }
16
17
  export declare enum AnnotationSubType {
17
18
  Text = 1,
@@ -44,6 +45,9 @@ export declare enum AnnotationType {
44
45
  FORM_BUTTON = "form-button",
45
46
  BUTTON = "button"
46
47
  }
48
+ export declare enum ErrorType {
49
+ NOT_SUPPORTED = "not-supported"
50
+ }
47
51
  export interface AnnotationEventPayload {
48
52
  type: AnnotationType;
49
53
  data: any;
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../contexts/RPDocumentContext.js";
4
4
  import "../../contexts/DocumentPasswordContext.js";
5
- import { b as oo } from "../../ToolbarLayout.module-20b830dd.js";
5
+ import { b as oo } from "../../ToolbarLayout.module-e532b211.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../contexts/RotationContext.js";
8
8
  import "../../contexts/LayerContext.js";
@@ -1,6 +1,6 @@
1
1
  import { useState as E, useCallback as h, useEffect as A } from "react";
2
2
  import { appConsole as l } from "../appConsole.js";
3
- const b = /* @__PURE__ */ new Date("2025-10-01T07:17:09.676Z"), d = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", s = {
3
+ const b = /* @__PURE__ */ new Date("2025-10-02T07:09:09.012Z"), d = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", s = {
4
4
  invalidLicense: `You are currently using without a valid license. ${d}`,
5
5
  mismatchedDomain: `Your license key is not valid for the current domain / IP. ${d}`,
6
6
  expired: `Your license key has expired. ${d}`,
@@ -1,70 +1,77 @@
1
- import { useState as u, useRef as T, useEffect as y } from "react";
2
- import * as V from "pdfjs-dist";
3
- import { getThumbnailViewport as D } from "../getThumbnailViewport.js";
4
- import { useConfigContext as N } from "../../contexts/ConfigContext.js";
5
- import { useDocumentPasswordContext as U } from "../../contexts/DocumentPasswordContext.js";
6
- const h = (l, e, C = {}) => {
7
- const [r, I] = u(), { workerUrlAdded: L } = N(), [q, k] = u(/* @__PURE__ */ new Map()), i = T(), [v, f] = u(0), [m, x] = u(!1), { password: d, passwordError: S, setPasswordError: g, passwordRequired: P, setPasswordRequired: c } = U(), { onLoadError: p, onLoaded: w } = C;
8
- return y(() => {
9
- if (!L || !l)
1
+ import { useState as a, useRef as N, useEffect as k } from "react";
2
+ import * as x from "pdfjs-dist";
3
+ import { ErrorType as O } from "../types.js";
4
+ import { getThumbnailViewport as U } from "../getThumbnailViewport.js";
5
+ import { useConfigContext as h } from "../../contexts/ConfigContext.js";
6
+ import { useDocumentPasswordContext as j } from "../../contexts/DocumentPasswordContext.js";
7
+ const G = (f, s, V = {}) => {
8
+ const [n, C] = a(), { workerUrlAdded: y } = h(), [I, L] = a(/* @__PURE__ */ new Map()), d = N(), [S, m] = a(0), [P, T] = a(!1), [q, v] = a(), { password: u, passwordError: D, setPasswordError: c, passwordRequired: g, setPasswordRequired: p } = j(), { onLoadError: i, onLoaded: w } = V;
9
+ return k(() => {
10
+ if (!y || !f)
10
11
  return;
11
- f(0), i.current = Date.now();
12
- const t = i.current, E = {
13
- url: l,
14
- cMapPacked: (e == null ? void 0 : e.isCompressed) ?? !0,
15
- ...(e == null ? void 0 : e.url) && { cMapUrl: e.url },
16
- ...d && { password: d },
17
- verbosity: V.VerbosityLevel.ERRORS
18
- }, n = V.getDocument(E);
19
- n.onProgress = (o) => {
20
- if (t === i.current) {
21
- const { loaded: b, total: a } = o, R = a ? Math.min(100, Math.round(b / a * 100)) : 0;
22
- f(R);
23
- }
24
- }, x(!0);
25
- const s = n.promise.then((o) => (t === i.current && (I(o), f(100)), w && w(o), c(!1), g(""), o)).catch((o) => {
26
- o instanceof Error && o.name === "PasswordException" ? (c(!0), g(o.message || "Password required")) : o instanceof Error && o.name === "InvalidPDFException" && d ? (c(!0), g("Incorrect password")) : p && p(o);
27
- }).finally(() => {
28
- x(!1);
29
- });
30
- return () => {
31
- s.finally(() => {
32
- n.destroy();
33
- });
12
+ m(0), d.current = Date.now();
13
+ const r = d.current, E = {
14
+ url: f,
15
+ cMapPacked: (s == null ? void 0 : s.isCompressed) ?? !0,
16
+ ...(s == null ? void 0 : s.url) && { cMapUrl: s.url },
17
+ ...u && { password: u },
18
+ verbosity: x.VerbosityLevel.ERRORS
34
19
  };
35
- }, [l, L, d, p, w]), y(() => {
36
- if (P)
20
+ try {
21
+ const e = x.getDocument(E);
22
+ e.onProgress = (o) => {
23
+ if (r === d.current) {
24
+ const { loaded: R, total: l } = o, b = l ? Math.min(100, Math.round(R / l * 100)) : 0;
25
+ m(b);
26
+ }
27
+ }, T(!0);
28
+ const t = e.promise.then((o) => (r === d.current && (C(o), m(100)), w && w(o), p(!1), c(""), o)).catch((o) => {
29
+ o instanceof Error && o.name === "PasswordException" ? (p(!0), c(o.message || "Password required")) : o instanceof Error && o.name === "InvalidPDFException" && u ? (p(!0), c("Incorrect password")) : i && i(o);
30
+ }).finally(() => {
31
+ T(!1);
32
+ });
33
+ return () => {
34
+ t.finally(() => {
35
+ e.destroy();
36
+ });
37
+ };
38
+ } catch (e) {
39
+ v(O.NOT_SUPPORTED), i && i(e);
40
+ }
41
+ }, [f, y, u, i, w]), k(() => {
42
+ if (g)
37
43
  return;
38
- const t = /* @__PURE__ */ new Map();
39
- if (!r || m) {
40
- k(t);
44
+ const r = /* @__PURE__ */ new Map();
45
+ if (!n || P) {
46
+ L(r);
41
47
  return;
42
48
  }
43
- const E = r.numPages, n = [];
44
- for (let s = 1; s <= E; s++) {
45
- const o = r.getPage(s);
46
- n.push(o);
49
+ const E = n.numPages, e = [];
50
+ for (let t = 1; t <= E; t++) {
51
+ const o = n.getPage(t);
52
+ e.push(o);
47
53
  }
48
- Promise.all(n).then((s) => {
49
- s.map((o) => {
50
- const { thumbnailViewport: b, scale: a } = D(o), R = o.getViewport();
51
- t.set(o.pageNumber, {
54
+ Promise.all(e).then((t) => {
55
+ t.map((o) => {
56
+ const { thumbnailViewport: R, scale: l } = U(o), b = o.getViewport();
57
+ r.set(o.pageNumber, {
52
58
  page: o,
53
- thumbnailViewport: b,
54
- thumbnailScale: a,
55
- defaultRotation: R.rotation
59
+ thumbnailViewport: R,
60
+ thumbnailScale: l,
61
+ defaultRotation: b.rotation
56
62
  });
57
- }), k(t);
63
+ }), L(r);
58
64
  });
59
- }, [r, m, P]), {
60
- pdf: r,
61
- pages: q,
62
- loading: m,
63
- loadingProgress: v,
64
- passwordRequired: P,
65
- passwordError: S
65
+ }, [n, P, g]), {
66
+ pdf: n,
67
+ pages: I,
68
+ loading: P,
69
+ error: q,
70
+ loadingProgress: S,
71
+ passwordRequired: g,
72
+ passwordError: D
66
73
  };
67
74
  };
68
75
  export {
69
- h as useLoadPdf
76
+ G as useLoadPdf
70
77
  };
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "../types.js";
3
- import { r as tr } from "../../ToolbarLayout.module-20b830dd.js";
3
+ import { r as tr } from "../../ToolbarLayout.module-e532b211.js";
4
4
  import "react/jsx-runtime";
5
5
  import "../../contexts/RPDocumentContext.js";
6
6
  import "../../contexts/DocumentPasswordContext.js";
@@ -5,7 +5,7 @@ import "../calculatePage.js";
5
5
  import "react/jsx-runtime";
6
6
  import "../../contexts/RPDocumentContext.js";
7
7
  import "../../contexts/DocumentPasswordContext.js";
8
- import { K as tr } from "../../ToolbarLayout.module-20b830dd.js";
8
+ import { K as tr } from "../../ToolbarLayout.module-e532b211.js";
9
9
  import "../../contexts/DarkModeContext.js";
10
10
  import "../../contexts/RotationContext.js";
11
11
  import "../../contexts/LayerContext.js";
@@ -2,7 +2,7 @@ import "react";
2
2
  import "react/jsx-runtime";
3
3
  import "../../contexts/RPDocumentContext.js";
4
4
  import "../../contexts/DocumentPasswordContext.js";
5
- import { t as tr } from "../../ToolbarLayout.module-20b830dd.js";
5
+ import { t as tr } from "../../ToolbarLayout.module-e532b211.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../contexts/RotationContext.js";
8
8
  import "../../contexts/LayerContext.js";
@@ -3,7 +3,7 @@ import "../../contexts/ScrollModeContext.js";
3
3
  import "react/jsx-runtime";
4
4
  import "../../contexts/RPDocumentContext.js";
5
5
  import "../../contexts/DocumentPasswordContext.js";
6
- import { q as po } from "../../ToolbarLayout.module-20b830dd.js";
6
+ import { q as po } from "../../ToolbarLayout.module-e532b211.js";
7
7
  import "../../contexts/DarkModeContext.js";
8
8
  import "../types.js";
9
9
  import "../../contexts/RotationContext.js";
@@ -7,7 +7,7 @@ import "../../contexts/RPDocumentContext.js";
7
7
  import "../../contexts/ZoomContext.js";
8
8
  import "react/jsx-runtime";
9
9
  import "../../contexts/DocumentPasswordContext.js";
10
- import { y as tr } from "../../ToolbarLayout.module-20b830dd.js";
10
+ import { y as tr } from "../../ToolbarLayout.module-e532b211.js";
11
11
  import "../../contexts/DarkModeContext.js";
12
12
  import "../../contexts/RotationContext.js";
13
13
  import "../../contexts/LayerContext.js";
@@ -2,7 +2,7 @@ import "react";
2
2
  import "react/jsx-runtime";
3
3
  import "../../contexts/RPDocumentContext.js";
4
4
  import "../../contexts/DocumentPasswordContext.js";
5
- import { w as om } from "../../ToolbarLayout.module-20b830dd.js";
5
+ import { w as om } from "../../ToolbarLayout.module-e532b211.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../contexts/RotationContext.js";
8
8
  import "../../contexts/LayerContext.js";
@@ -4,7 +4,7 @@ import "../../contexts/ScrollModeContext.js";
4
4
  import "react/jsx-runtime";
5
5
  import "../../contexts/RPDocumentContext.js";
6
6
  import "../../contexts/DocumentPasswordContext.js";
7
- import { H as ro } from "../../ToolbarLayout.module-20b830dd.js";
7
+ import { H as ro } from "../../ToolbarLayout.module-e532b211.js";
8
8
  import "../../contexts/DarkModeContext.js";
9
9
  import "../../contexts/RotationContext.js";
10
10
  import "../../contexts/LayerContext.js";
@@ -1,6 +1,6 @@
1
1
  import { e as r, z as _, i as R, p as o, t as p } from "../th_TH-d627cd51.js";
2
- var D = /* @__PURE__ */ ((O) => (O[O.Text = 1] = "Text", O[O.Link = 2] = "Link", O[O.FreeText = 3] = "FreeText", O[O.Line = 4] = "Line", O[O.Square = 5] = "Square", O[O.Circle = 6] = "Circle", O[O.Polygon = 7] = "Polygon", O[O.Polyline = 8] = "Polyline", O[O.Highlight = 9] = "Highlight", O[O.Underline = 10] = "Underline", O[O.Squiggly = 11] = "Squiggly", O[O.StrikeOut = 12] = "StrikeOut", O[O.Stamp = 13] = "Stamp", O[O.Caret = 14] = "Caret", O[O.Ink = 15] = "Ink", O[O.Popup = 16] = "Popup", O[O.FileAttachment = 17] = "FileAttachment", O[O.Widget = 20] = "Widget", O))(D || {}), N = /* @__PURE__ */ ((O) => (O.INTERNAL_LINK = "internal-link", O.LINK = "link", O.FILE_ATTACHMENT = "file-attachment", O.FORM_TEXT = "form-text", O.FORM_SELECT = "form-select", O.FORM_CHECKBOX = "form-checkbox", O.FORM_RADIO = "form-radio", O.FORM_BUTTON = "form-button", O.BUTTON = "button", O))(N || {}), E = /* @__PURE__ */ ((O) => (O.ACTUAL = "Actual Size", O.PAGE_FIT = "Page Fit", O.PAGE_WIDTH = "Page Width", O))(E || {}), I = /* @__PURE__ */ ((O) => (O.Organization = "organization", O.Developer = "developer", O.FreeTrial = "free-trial", O))(I || {}), L = /* @__PURE__ */ ((O) => (O.SINGLE_PAGE = "Single", O.DUAL_PAGE = "Dual", O))(L || {}), d = /* @__PURE__ */ ((O) => (O.FONT_FAMILY = "--rp-font-family", O.PRIMARY_COLOR = "--rp-primary-color", O.BORDER_RADIUS = "--rp-border-radius", O.TEXT_COLOR = "--rp-text-color", O.OUTLINE_COLOR = "--rp-outline-color", O.FONT_SIZE = "--rp-font-size", O.DROP_MASK_BACKGROUND_COLOR = "--rp-drop-mask-background-color", O.LOADER_BACKDROP_COLOR = "--rp-loader-backdrop-color", O.ICON_DISABLED = "--rp-icon-disabled", O.ICON_FONT_SIZE = "--rp-icon-font-size", O.TOOLBAR_BACKGROUND = "--rp-toolbar-background", O.TOOLBAR_BORDER_COLOR = "--rp-toolbar-border-color", O.TOOLBAR_PADDING = "--rp-toolbar-padding", O.TOOLBAR_GAP = "--rp-toolbar-gap", O.TOOLBAR_SIZE = "--rp-toolbar-size", O.SIDEBAR_WIDTH = "--rp-sidebar-width", O.THUMBNAIL_BORDER_COLOR = "--rp-thumbnail-border-color", O.THUMBNAIL_BACKGROUND_COLOR = "--rp-thumbnail-background-color", O.THUMBNAIL_ACTIVE_COLOR = "--rp-thumbnail-active-color", O.THUMBNAIL_PADDING_Y = "--rp-thumbnail-padding-y", O.BUTTON_HOVER_BACKGROUND = "--rp-button-hover-background", O.BUTTON_PADDING = "--rp-button-padding", O.INPUT_PADDING = "--rp-input-padding", O.INPUT_BORDER_RADIUS = "--rp-input-border-radius", O.INPUT_BACKGROUND_COLOR = "--rp-input-background-color", O.INPUT_PLACEHOLDER_COLOR = "--rp-input-placeholder-color", O.PAGES_BACKGROUND_COLOR = "--rp-pages-background-color", O.ANNOTATION_LAYER_LINK_HOVER_BACKGROUND = "--rp-annotation-layer__link-hover-background", O.DROPDOWN_BACKGROUND_COLOR = "--rp-dropdown-background-color", O.DROPDOWN_PADDING = "--rp-dropdown-padding", O.DROPDOWN_HOVER_BACKGROUND_COLOR = "--rp-dropdown-hover-background-color", O.DROPDOWN_SEPARATOR_COLOR = "--rp-dropdown-separator-color", O.DROPDOWN_SEPARATOR_MARGIN = "--rp-dropdown-separator-margin", O.DROPDOWN_PADDING_MENU_ITEM = "--rp-dropdown-padding-menu-item", O.DROPDOWN_FONT_SIZE = "--rp-dropdown-font-size", O.DROPDOWN_BORDER_RADIUS = "--rp-dropdown-border-radius", O.SEARCH_TOOL_DROPDOWN_PADDING = "--rp-search-tool-dropdown-padding", O.POPOVER_FONT_SIZE = "--rp-popover-font-size", O.POPOVER_BACKGROUND_COLOR = "--rp-popover-background-color", O.POPOVER_COLOR = "--rp-popover-color", O.POPOVER_BORDER_COLOR = "--rp-popover-border-color", O.POPOVER_BORDER_RADIUS = "--rp-popover-border-radius", O.OVERLAY_BACKGROUND_COLOR = "--rp-overlay-background-color", O.DIALOG_BACKGROUND_COLOR = "--rp-dialog-background-color", O.PROPERTIES_DIVIDER_COLOR = "--rp-properties-divider-color", O.PROPERTIES_DIVIDER_MARGIN = "--rp-properties-divider-margin", O.PROPERTY_ITEM_GAP = "--rp-property-item-gap", O.DIALOG_TITLE_COLOR = "--rp-dialog-title-color", O.PROPERTY_ITEM_LABEL_COLOR = "--rp-property-item-label-color", O.PROPERTY_CLOSE_ICON_SIZE = "--rp-property-close-icon-size", O.PROPERTY_ITEM_FONT_SIZE = "--rp-property-item-font-size", O.PROPERTY_ITEM_FONT_WEIGHT = "--rp-property-item-font-weight", O.DIALOG_TITLE_FONT_SIZE = "--rp-dialog-title-font-size", O.DIALOG_TITLE_FONT_WEIGHT = "--rp-dialog-title-font-weight", O.MENU_ITEM_ICON_SIZE = "--rp-menu-item-icon-size", O.PRINT_PROGRESS_BACKGROUND = "--rp-print-progress-background", O.PRINT_PROGRESS_COLOR = "--rp-print-progress-color", O.DROP_ZONE_BORDER = "--rp-drop-zone-border", O.DROP_ZONE_FONT_COLOR = "--rp-drop-zone-font-color", O.DROP_ZONE_FONT_SIZE = "--rp-drop-zone-font-size", O.DROP_ZONE_BACKGROUND_COLOR = "--rp-drop-zone-background-color", O.CHECKBOX_BORDER_RADIUS = "--rp-checkbox-border-radius", O.CHECKBOX_BORDER_COLOR = "--rp-checkbox-border-color", O.CHECKBOX_INDICATOR_COLOR = "--rp-checkbox-indicator-color", O.HIGHLIGHT_BACKGROUND_COLOR = "--rp-highlight-background-color", O.TEXT_LAYER_HIGHLIGHT_BORDER_RADIUS = "--rp-text-layer-highlight-border-radius", O.CURRENT_HIGHLIGHT_BACKGROUND_COLOR = "--rp-current-highlight-background-color", O.TOOLTIP_BACKGROUND_COLOR = "--rp-tooltip-background-color", O.TOOLTIP_BORDER_RADIUS = "--rp-tooltip-border-radius", O.TOOLTIP_FONT_COLOR = "--rp-tooltip-font-color", O.TOOLTIP_FONT_SIZE = "--rp-tooltip-font-size", O.TOOLTIP_PADDING = "--rp-tooltip-padding", O.PASSWORD_MODAL_BACKGROUND_COLOR = "--rp-password-background-color", O.PASSWORD_MODAL_TITLE_FONT_COLOR = "--rp-password-title-font-color", O.PASSWORD_MODAL_CONTENT_FONT_COLOR = "--rp-password-content-font-color", O.PASSWORD_MODAL_INPUT_PLACEHOLDER_COLOR = "--rp-password-input-placeholder-color", O.PASSWORD_MODAL_INPUT_BORDER_COLOR = "--rp-password-input-border-color", O.PASSWORD_MODAL_INPUT_FONT_COLOR = "--rp-password-input-font-color", O.PASSWORD_MODAL_BUTTON_FONT_COLOR = "--rp-password-button-font-color", O.PASSWORD_MODAL_BUTTON_BACKGROUND_COLOR = "--rp-password-button-background-color", O.PASSWORD_MODAL_BUTTON_BORDER_COLOR = "--rp-password-button-border-color", O.PASSWORD_MODAL_BORDER_COLOR = "--rp-password-border-color", O.CONTAINER_FOCUS_OUTLINE_WIDTH = "--rp-container-focus-outline-width", O.CONTAINER_FOCUS_OUTLINE_COLOR = "--rp-container-focus-outline-color", O.CONTAINER_FOCUS_OUTLINE_OFFSET = "--rp-container-focus-outline-offset", O.BUTTON_BORDER_RADIUS = "--rp-button-border-radius", O))(d || {}), C = /* @__PURE__ */ ((O) => (O.PAGE_SCROLLING = "PAGE", O.VERTICAL_SCROLLING = "VERTICAL", O.HORIZONTAL_SCROLLING = "HORIZONTAL", O))(C || {}), P = /* @__PURE__ */ ((O) => (O.TEXT = "TEXT", O.HAND = "HAND", O))(P || {});
3
- const t = {
2
+ var D = /* @__PURE__ */ ((O) => (O[O.Text = 1] = "Text", O[O.Link = 2] = "Link", O[O.FreeText = 3] = "FreeText", O[O.Line = 4] = "Line", O[O.Square = 5] = "Square", O[O.Circle = 6] = "Circle", O[O.Polygon = 7] = "Polygon", O[O.Polyline = 8] = "Polyline", O[O.Highlight = 9] = "Highlight", O[O.Underline = 10] = "Underline", O[O.Squiggly = 11] = "Squiggly", O[O.StrikeOut = 12] = "StrikeOut", O[O.Stamp = 13] = "Stamp", O[O.Caret = 14] = "Caret", O[O.Ink = 15] = "Ink", O[O.Popup = 16] = "Popup", O[O.FileAttachment = 17] = "FileAttachment", O[O.Widget = 20] = "Widget", O))(D || {}), N = /* @__PURE__ */ ((O) => (O.INTERNAL_LINK = "internal-link", O.LINK = "link", O.FILE_ATTACHMENT = "file-attachment", O.FORM_TEXT = "form-text", O.FORM_SELECT = "form-select", O.FORM_CHECKBOX = "form-checkbox", O.FORM_RADIO = "form-radio", O.FORM_BUTTON = "form-button", O.BUTTON = "button", O))(N || {}), E = /* @__PURE__ */ ((O) => (O.NOT_SUPPORTED = "not-supported", O))(E || {}), I = /* @__PURE__ */ ((O) => (O.ACTUAL = "Actual Size", O.PAGE_FIT = "Page Fit", O.PAGE_WIDTH = "Page Width", O))(I || {}), L = /* @__PURE__ */ ((O) => (O.Organization = "organization", O.Developer = "developer", O.FreeTrial = "free-trial", O))(L || {}), d = /* @__PURE__ */ ((O) => (O.SINGLE_PAGE = "Single", O.DUAL_PAGE = "Dual", O))(d || {}), C = /* @__PURE__ */ ((O) => (O.FONT_FAMILY = "--rp-font-family", O.PRIMARY_COLOR = "--rp-primary-color", O.BORDER_RADIUS = "--rp-border-radius", O.TEXT_COLOR = "--rp-text-color", O.OUTLINE_COLOR = "--rp-outline-color", O.FONT_SIZE = "--rp-font-size", O.DROP_MASK_BACKGROUND_COLOR = "--rp-drop-mask-background-color", O.LOADER_BACKDROP_COLOR = "--rp-loader-backdrop-color", O.ICON_DISABLED = "--rp-icon-disabled", O.ICON_FONT_SIZE = "--rp-icon-font-size", O.TOOLBAR_BACKGROUND = "--rp-toolbar-background", O.TOOLBAR_BORDER_COLOR = "--rp-toolbar-border-color", O.TOOLBAR_PADDING = "--rp-toolbar-padding", O.TOOLBAR_GAP = "--rp-toolbar-gap", O.TOOLBAR_SIZE = "--rp-toolbar-size", O.SIDEBAR_WIDTH = "--rp-sidebar-width", O.THUMBNAIL_BORDER_COLOR = "--rp-thumbnail-border-color", O.THUMBNAIL_BACKGROUND_COLOR = "--rp-thumbnail-background-color", O.THUMBNAIL_ACTIVE_COLOR = "--rp-thumbnail-active-color", O.THUMBNAIL_PADDING_Y = "--rp-thumbnail-padding-y", O.BUTTON_HOVER_BACKGROUND = "--rp-button-hover-background", O.BUTTON_PADDING = "--rp-button-padding", O.INPUT_PADDING = "--rp-input-padding", O.INPUT_BORDER_RADIUS = "--rp-input-border-radius", O.INPUT_BACKGROUND_COLOR = "--rp-input-background-color", O.INPUT_PLACEHOLDER_COLOR = "--rp-input-placeholder-color", O.PAGES_BACKGROUND_COLOR = "--rp-pages-background-color", O.ANNOTATION_LAYER_LINK_HOVER_BACKGROUND = "--rp-annotation-layer__link-hover-background", O.DROPDOWN_BACKGROUND_COLOR = "--rp-dropdown-background-color", O.DROPDOWN_PADDING = "--rp-dropdown-padding", O.DROPDOWN_HOVER_BACKGROUND_COLOR = "--rp-dropdown-hover-background-color", O.DROPDOWN_SEPARATOR_COLOR = "--rp-dropdown-separator-color", O.DROPDOWN_SEPARATOR_MARGIN = "--rp-dropdown-separator-margin", O.DROPDOWN_PADDING_MENU_ITEM = "--rp-dropdown-padding-menu-item", O.DROPDOWN_FONT_SIZE = "--rp-dropdown-font-size", O.DROPDOWN_BORDER_RADIUS = "--rp-dropdown-border-radius", O.SEARCH_TOOL_DROPDOWN_PADDING = "--rp-search-tool-dropdown-padding", O.POPOVER_FONT_SIZE = "--rp-popover-font-size", O.POPOVER_BACKGROUND_COLOR = "--rp-popover-background-color", O.POPOVER_COLOR = "--rp-popover-color", O.POPOVER_BORDER_COLOR = "--rp-popover-border-color", O.POPOVER_BORDER_RADIUS = "--rp-popover-border-radius", O.OVERLAY_BACKGROUND_COLOR = "--rp-overlay-background-color", O.DIALOG_BACKGROUND_COLOR = "--rp-dialog-background-color", O.PROPERTIES_DIVIDER_COLOR = "--rp-properties-divider-color", O.PROPERTIES_DIVIDER_MARGIN = "--rp-properties-divider-margin", O.PROPERTY_ITEM_GAP = "--rp-property-item-gap", O.DIALOG_TITLE_COLOR = "--rp-dialog-title-color", O.PROPERTY_ITEM_LABEL_COLOR = "--rp-property-item-label-color", O.PROPERTY_CLOSE_ICON_SIZE = "--rp-property-close-icon-size", O.PROPERTY_ITEM_FONT_SIZE = "--rp-property-item-font-size", O.PROPERTY_ITEM_FONT_WEIGHT = "--rp-property-item-font-weight", O.DIALOG_TITLE_FONT_SIZE = "--rp-dialog-title-font-size", O.DIALOG_TITLE_FONT_WEIGHT = "--rp-dialog-title-font-weight", O.MENU_ITEM_ICON_SIZE = "--rp-menu-item-icon-size", O.PRINT_PROGRESS_BACKGROUND = "--rp-print-progress-background", O.PRINT_PROGRESS_COLOR = "--rp-print-progress-color", O.DROP_ZONE_BORDER = "--rp-drop-zone-border", O.DROP_ZONE_FONT_COLOR = "--rp-drop-zone-font-color", O.DROP_ZONE_FONT_SIZE = "--rp-drop-zone-font-size", O.DROP_ZONE_BACKGROUND_COLOR = "--rp-drop-zone-background-color", O.CHECKBOX_BORDER_RADIUS = "--rp-checkbox-border-radius", O.CHECKBOX_BORDER_COLOR = "--rp-checkbox-border-color", O.CHECKBOX_INDICATOR_COLOR = "--rp-checkbox-indicator-color", O.HIGHLIGHT_BACKGROUND_COLOR = "--rp-highlight-background-color", O.TEXT_LAYER_HIGHLIGHT_BORDER_RADIUS = "--rp-text-layer-highlight-border-radius", O.CURRENT_HIGHLIGHT_BACKGROUND_COLOR = "--rp-current-highlight-background-color", O.TOOLTIP_BACKGROUND_COLOR = "--rp-tooltip-background-color", O.TOOLTIP_BORDER_RADIUS = "--rp-tooltip-border-radius", O.TOOLTIP_FONT_COLOR = "--rp-tooltip-font-color", O.TOOLTIP_FONT_SIZE = "--rp-tooltip-font-size", O.TOOLTIP_PADDING = "--rp-tooltip-padding", O.PASSWORD_MODAL_BACKGROUND_COLOR = "--rp-password-background-color", O.PASSWORD_MODAL_TITLE_FONT_COLOR = "--rp-password-title-font-color", O.PASSWORD_MODAL_CONTENT_FONT_COLOR = "--rp-password-content-font-color", O.PASSWORD_MODAL_INPUT_PLACEHOLDER_COLOR = "--rp-password-input-placeholder-color", O.PASSWORD_MODAL_INPUT_BORDER_COLOR = "--rp-password-input-border-color", O.PASSWORD_MODAL_INPUT_FONT_COLOR = "--rp-password-input-font-color", O.PASSWORD_MODAL_BUTTON_FONT_COLOR = "--rp-password-button-font-color", O.PASSWORD_MODAL_BUTTON_BACKGROUND_COLOR = "--rp-password-button-background-color", O.PASSWORD_MODAL_BUTTON_BORDER_COLOR = "--rp-password-button-border-color", O.PASSWORD_MODAL_BORDER_COLOR = "--rp-password-border-color", O.CONTAINER_FOCUS_OUTLINE_WIDTH = "--rp-container-focus-outline-width", O.CONTAINER_FOCUS_OUTLINE_COLOR = "--rp-container-focus-outline-color", O.CONTAINER_FOCUS_OUTLINE_OFFSET = "--rp-container-focus-outline-offset", O.BUTTON_BORDER_RADIUS = "--rp-button-border-radius", O))(C || {}), P = /* @__PURE__ */ ((O) => (O.PAGE_SCROLLING = "PAGE", O.VERTICAL_SCROLLING = "VERTICAL", O.HORIZONTAL_SCROLLING = "HORIZONTAL", O))(P || {}), c = /* @__PURE__ */ ((O) => (O.TEXT = "TEXT", O.HAND = "HAND", O))(c || {});
3
+ const A = {
4
4
  en_US: r,
5
5
  zh_CN: _,
6
6
  it_IT: R,
@@ -10,11 +10,12 @@ const t = {
10
10
  export {
11
11
  D as AnnotationSubType,
12
12
  N as AnnotationType,
13
- I as LicenseType,
14
- t as Locales,
15
- C as ScrollMode,
16
- P as SelectionMode,
17
- d as ThemeVariables,
18
- L as ViewMode,
19
- E as ZoomLevel
13
+ E as ErrorType,
14
+ L as LicenseType,
15
+ A as Locales,
16
+ P as ScrollMode,
17
+ c as SelectionMode,
18
+ C as ThemeVariables,
19
+ d as ViewMode,
20
+ I as ZoomLevel
20
21
  };