@pdf-viewer/react 0.0.0-experimental.0 → 0.0.0-experimental.1

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 (86) hide show
  1. package/dist/{ToolbarLayout.module-89451ab3.js → ToolbarLayout.module-acfd93ef.js} +1231 -1221
  2. package/dist/components/RPController.js +5 -3
  3. package/dist/components/RPPages.js +4 -2
  4. package/dist/components/RPProvider.js +37 -22
  5. package/dist/components/layout/LayoutContainer.js +5 -3
  6. package/dist/components/layout/RPDefaultLayout.js +5 -3
  7. package/dist/components/layout/RPLayout.js +5 -3
  8. package/dist/components/layout/sidebar/RPSidebar.js +5 -3
  9. package/dist/components/layout/sidebar/Thumbnail.js +5 -3
  10. package/dist/components/layout/sidebar/Thumbnails.js +5 -3
  11. package/dist/components/layout/toolbar/DocumentDialog.js +5 -3
  12. package/dist/components/layout/toolbar/FileDownloadTool.js +5 -3
  13. package/dist/components/layout/toolbar/MostPageTool.js +5 -3
  14. package/dist/components/layout/toolbar/OtherTool.js +5 -3
  15. package/dist/components/layout/toolbar/Paginate.js +5 -3
  16. package/dist/components/layout/toolbar/PrintTool.js +5 -3
  17. package/dist/components/layout/toolbar/RPMoreOptions.js +6 -4
  18. package/dist/components/layout/toolbar/RPToolbar.js +5 -3
  19. package/dist/components/layout/toolbar/RPToolbarEnd.js +5 -3
  20. package/dist/components/layout/toolbar/SearchResultNavigator.js +5 -3
  21. package/dist/components/layout/toolbar/SearchTool.js +5 -3
  22. package/dist/components/layout/toolbar/ThumbnailTool.js +6 -4
  23. package/dist/components/layout/toolbar/ToolbarCustom.js +6 -4
  24. package/dist/components/layout/toolbar/ToolbarDefault.js +6 -4
  25. package/dist/components/layout/toolbar/ToolbarLayout.js +6 -4
  26. package/dist/components/layout/toolbar/ZoomTool.js +3 -2
  27. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +6 -4
  28. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +6 -4
  29. package/dist/components/layout/toolbar/tools/InputPageTool.js +6 -4
  30. package/dist/components/layout/toolbar/tools/NextPageTool.js +5 -3
  31. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +6 -4
  32. package/dist/components/layout/toolbar/tools/PrintTool.js +6 -4
  33. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +6 -4
  34. package/dist/components/layout/toolbar/tools/ZoomInTool.js +3 -2
  35. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +3 -2
  36. package/dist/components/layout/toolbar/tools/ZoomOutTool.js +3 -2
  37. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +5 -3
  38. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +6 -4
  39. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +6 -4
  40. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +6 -4
  41. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +6 -4
  42. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +6 -4
  43. package/dist/components/page/AnnotationLayer.js +5 -3
  44. package/dist/components/page/CanvasLayer.js +5 -3
  45. package/dist/components/page/CustomElement.js +7 -2
  46. package/dist/components/page/DualPage.js +5 -3
  47. package/dist/components/page/RPPage.js +4 -2
  48. package/dist/components/page/SinglePage.js +5 -3
  49. package/dist/components/page/TextHighlightLayer.js +5 -3
  50. package/dist/components/page/TextLayer.js +5 -3
  51. package/dist/components/ui/LoadingIndicator.js +5 -3
  52. package/dist/contexts/DimensionPagesContext.js +10 -9
  53. package/dist/contexts/ElementPageContext.js +92 -49
  54. package/dist/contexts/EventCallbackContext.js +30 -0
  55. package/dist/contexts/GlobalCurrentPage.js +13 -10
  56. package/dist/contexts/PagesRotateContext.js +21 -15
  57. package/dist/contexts/PaginationContext.js +7 -5
  58. package/dist/contexts/PrintContext.js +7 -5
  59. package/dist/contexts/RPDocumentContext.js +21 -19
  60. package/dist/contexts/RenderQueueProvider.js +7 -5
  61. package/dist/contexts/SearchContext.js +7 -5
  62. package/dist/contexts/ThumbnailsContext.js +7 -5
  63. package/dist/contexts/ZoomContext.js +13 -12
  64. package/dist/main.js +86 -84
  65. package/dist/types/contexts/EventCallbackContext.d.ts +5 -0
  66. package/dist/types/utils/getElementPositionInPage.d.ts +5 -0
  67. package/dist/types/utils/link_service.d.ts +8 -0
  68. package/dist/types/utils/types.d.ts +10 -1
  69. package/dist/utils/getElementPositionInPage.js +84 -0
  70. package/dist/utils/hooks/useFileDownload.js +5 -3
  71. package/dist/utils/hooks/useLicense.js +1 -1
  72. package/dist/utils/hooks/useLoadPdf.js +49 -47
  73. package/dist/utils/hooks/useLoadWorker.js +8 -8
  74. package/dist/utils/hooks/usePageRotateContext.js +3 -2
  75. package/dist/utils/hooks/usePaginate.js +5 -3
  76. package/dist/utils/hooks/usePinch.js +15 -14
  77. package/dist/utils/hooks/usePresentPage.js +5 -3
  78. package/dist/utils/hooks/usePrint.js +5 -3
  79. package/dist/utils/hooks/useScrollToPage.js +4 -2
  80. package/dist/utils/hooks/useSearch.js +4 -2
  81. package/dist/utils/hooks/useThumbnail.js +5 -3
  82. package/dist/utils/hooks/useVirtualReactWindow.js +5 -3
  83. package/dist/utils/injectPrintCSS.js +11 -11
  84. package/dist/utils/link_service.js +14 -5
  85. package/dist/utils/renderPage.js +1 -0
  86. package/package.json +4 -4
@@ -1,165 +1,166 @@
1
- import { jsx as a, Fragment as he, jsxs as $ } from "react/jsx-runtime";
1
+ import { jsx as a, Fragment as fe, jsxs as $ } from "react/jsx-runtime";
2
2
  import * as X from "react";
3
- import { useRef as k, useEffect as z, useCallback as E, useState as q, useMemo as W, createContext as $e, useContext as qe, useImperativeHandle as rn, createElement as Ve, PureComponent as rr, Component as or, memo as on, forwardRef as ir } from "react";
4
- import { ChevronUpIcon as Ze } from "./components/icons/ChevronUpIcon.js";
3
+ import { useRef as k, useEffect as M, useCallback as E, useState as q, useMemo as W, createContext as qe, useContext as Ge, useImperativeHandle as rn, createElement as Be, PureComponent as io, Component as ao, memo as an, forwardRef as so } from "react";
4
+ import { ChevronUpIcon as Xe } from "./components/icons/ChevronUpIcon.js";
5
5
  import { UIButton as we } from "./components/ui/Button.js";
6
- import { UIInput as an } from "./components/ui/Input.js";
7
- import { ViewMode as Le, ScrollMode as ne, AnnotationSubType as Dt, SelectionMode as ar, ErrorType as sr } from "./utils/types.js";
8
- import { useScrollModeContext as Ne } from "./contexts/ScrollModeContext.js";
9
- import { useDocumentContext as re } from "./contexts/RPDocumentContext.js";
10
- import { useDocumentPasswordContext as cr } from "./contexts/DocumentPasswordContext.js";
11
- import { useDarkModeContext as lr } from "./contexts/DarkModeContext.js";
6
+ import { UIInput as sn } from "./components/ui/Input.js";
7
+ import { ViewMode as Re, ScrollMode as ne, AnnotationSubType as Dt, SelectionMode as co, ErrorType as lo } from "./utils/types.js";
8
+ import { useScrollModeContext as Ee } from "./contexts/ScrollModeContext.js";
9
+ import { useDocumentContext as oe } from "./contexts/RPDocumentContext.js";
10
+ import { useDocumentPasswordContext as uo } from "./contexts/DocumentPasswordContext.js";
11
+ import { useDarkModeContext as po } from "./contexts/DarkModeContext.js";
12
12
  import "./contexts/RotationContext.js";
13
- import { useLayerContext as dr } from "./contexts/LayerContext.js";
13
+ import { useLayerContext as ho } from "./contexts/LayerContext.js";
14
14
  import { useZoomContext as _t } from "./contexts/ZoomContext.js";
15
- import { useViewModeContext as Fe } from "./contexts/ViewModeContext.js";
16
- import { useVirtualScrollContext as Ye } from "./contexts/VirtualScrollContext.js";
17
- import { useVirtualGridContext as sn } from "./contexts/VirtualGridContext.js";
18
- import { useSelectionModeContext as ur } from "./contexts/SelectionModeContext.js";
19
- import { useInitialStateContext as pr } from "./contexts/InitialStateContext.js";
20
- import { useFullScreenContext as hr } from "./contexts/FullScreenContext.js";
15
+ import { useViewModeContext as ze } from "./contexts/ViewModeContext.js";
16
+ import { useVirtualScrollContext as Je } from "./contexts/VirtualScrollContext.js";
17
+ import { useVirtualGridContext as cn } from "./contexts/VirtualGridContext.js";
18
+ import { useSelectionModeContext as fo } from "./contexts/SelectionModeContext.js";
19
+ import { useInitialStateContext as mo } from "./contexts/InitialStateContext.js";
20
+ import { useFullScreenContext as go } from "./contexts/FullScreenContext.js";
21
21
  import "./contexts/FileInputContext.js";
22
22
  import "./contexts/DropFileZoneContext.js";
23
- import { findMatches as fr, resetDivs as mr, highlightMatches as gr, isMatchEntireWord as vr } from "./utils/highlight.js";
23
+ import { findMatches as vo, resetDivs as wo, highlightMatches as _o, isMatchEntireWord as bo } from "./utils/highlight.js";
24
24
  import { useLayoutContainer as be } from "./contexts/LayoutContainerContext.js";
25
- import { useDimensionPagesContext as Ge } from "./contexts/DimensionPagesContext.js";
26
- import { useLocalizationContext as fe } from "./contexts/LocalizationContext.js";
27
- import { useHighlightContext as wr } from "./contexts/HighlightContext.js";
25
+ import { useDimensionPagesContext as Ue } from "./contexts/DimensionPagesContext.js";
26
+ import { useLocalizationContext as me } from "./contexts/LocalizationContext.js";
27
+ import { useHighlightContext as To } from "./contexts/HighlightContext.js";
28
28
  import "./contexts/LicenseContext.js";
29
- import { useDownloadContext as _r } from "./contexts/DownloadContext.js";
30
- import { useSmoothScrollContext as cn } from "./contexts/SmoothScrollContext.js";
29
+ import { useDownloadContext as Co } from "./contexts/DownloadContext.js";
30
+ import { useSmoothScrollContext as ln } from "./contexts/SmoothScrollContext.js";
31
31
  import "./contexts/ElementPageContext.js";
32
- import { usePagesRotateContext as Je } from "./contexts/PagesRotateContext.js";
33
- import { Queue as br } from "./utils/Queue.js";
34
- import { renderPage as Tr } from "./utils/renderPage.js";
35
- import { useGlobalCurrentPage as Cr } from "./contexts/GlobalCurrentPage.js";
32
+ import { usePagesRotateContext as et } from "./contexts/PagesRotateContext.js";
33
+ import { Queue as Po } from "./utils/Queue.js";
34
+ import { renderPage as yo } from "./utils/renderPage.js";
35
+ import { useGlobalCurrentPage as So } from "./contexts/GlobalCurrentPage.js";
36
36
  import { useLoaderContext as bt } from "./contexts/LoaderContext.js";
37
- import { useToolComponentContext as Oe } from "./contexts/ToolComponentContext.js";
37
+ import { useToolComponentContext as Ne } from "./contexts/ToolComponentContext.js";
38
38
  import { useIconToolContext as Te } from "./contexts/IconToolContext.js";
39
- import { useOtherToolContext as Pr } from "./contexts/OtherToolContext.js";
39
+ import { useOtherToolContext as Io } from "./contexts/OtherToolContext.js";
40
+ import { useEventCallbackContext as xo } from "./contexts/EventCallbackContext.js";
40
41
  import "./components/RPConfig.js";
41
- import { ThumbnailIcon as yr } from "./components/icons/Thumbnail.js";
42
- import { c as ce } from "./clsx-0c6e471a.js";
43
- import { LoaderIcon as ln } from "./components/icons/LoaderIcon.js";
44
- import { Container as Sr } from "./components/layout/Container.js";
45
- import { useViewportContext as De, ViewportProvider as Ir } from "./contexts/ViewportContext.js";
46
- import { useToolbarComponentContext as Ce, ToolbarComponentProvider as xr } from "./contexts/ToolbarComponentContext.js";
47
- import { RPSplitter as Rr } from "./components/layout/sidebar/RPSplitter.js";
48
- import { WrapperLayout as Lr } from "./components/layout/WrapperLayout.js";
49
- import { c as _e, L as Er } from "./LayoutWrapper-6224491f.js";
50
- import { useThemeContext as Nr } from "./contexts/ThemeContext.js";
51
- import { RPDropFileZone as Or } from "./components/RPDropFileZone.js";
42
+ import { ThumbnailIcon as Ro } from "./components/icons/Thumbnail.js";
43
+ import { c as de } from "./clsx-0c6e471a.js";
44
+ import { LoaderIcon as dn } from "./components/icons/LoaderIcon.js";
45
+ import { Container as Lo } from "./components/layout/Container.js";
46
+ import { useViewportContext as Oe, ViewportProvider as Eo } from "./contexts/ViewportContext.js";
47
+ import { useToolbarComponentContext as Ce, ToolbarComponentProvider as No } from "./contexts/ToolbarComponentContext.js";
48
+ import { RPSplitter as Oo } from "./components/layout/sidebar/RPSplitter.js";
49
+ import { WrapperLayout as Do } from "./components/layout/WrapperLayout.js";
50
+ import { c as _e, L as Ao } from "./LayoutWrapper-6224491f.js";
51
+ import { useThemeContext as Mo } from "./contexts/ThemeContext.js";
52
+ import { RPDropFileZone as zo } from "./components/RPDropFileZone.js";
52
53
  import { c as te, S as At } from "./SearchCloseButton-08d57275.js";
53
- import { UICheckbox as zt } from "./components/ui/Checkbox.js";
54
- import { useIconContext as Pe, IconProvider as Dr } from "./contexts/IconContext.js";
54
+ import { UICheckbox as Mt } from "./components/ui/Checkbox.js";
55
+ import { useIconContext as Pe, IconProvider as Fo } from "./contexts/IconContext.js";
55
56
  import Q from "./components/ui/RPTooltip.js";
56
- import { UIDropDown as dn } from "./components/ui/DropDown.js";
57
+ import { UIDropDown as un } from "./components/ui/DropDown.js";
57
58
  import "./ZoomTool.module-7082af8c.js";
58
- import { MenuItem as Xe } from "./components/layout/toolbar/MenuItem.js";
59
- import { MenuSeparator as un } from "./components/layout/toolbar/MenuSeparator.js";
60
- import { dateFormatter as Mt } from "./utils/dateFormatter.js";
61
- import { PropertyItem as Ar } from "./components/layout/toolbar/PropertyItem.js";
59
+ import { MenuItem as Qe } from "./components/layout/toolbar/MenuItem.js";
60
+ import { MenuSeparator as pn } from "./components/layout/toolbar/MenuSeparator.js";
61
+ import { dateFormatter as zt } from "./utils/dateFormatter.js";
62
+ import { PropertyItem as ko } from "./components/layout/toolbar/PropertyItem.js";
62
63
  import "./RotateTool.module-67946714.js";
63
- import { withRef as et } from "./utils/withRef.js";
64
- import { useInfiniteScroll as zr } from "./utils/hooks/useInfiniteScroll.js";
65
- import { THUMBNAIL_MIN_WIDTH as Mr } from "./utils/constants.js";
66
- import * as Fr from "pdfjs-dist";
67
- import { PixelsPerInch as kr, AnnotationMode as Wr, RenderingCancelledException as Hr, AnnotationLayer as $r } from "pdfjs-dist";
68
- import { SimpleLinkService as qr } from "./utils/link_service.js";
69
- import { annotationsEvents as Gr, annotationEventsHandler as Ur, handleClick as Ft, handleAnnotationWidget as Vr, handleAnnotationLink as Br, bindLayerEvents as jr, unbindLayerEvents as kt } from "./utils/annotations.js";
70
- import { normalizeSingleKeyword as Kr, sortHighlightPosition as Zr, unwrap as Xr } from "./components/page/searchHighlight.js";
71
- import { CustomElement as Qr } from "./components/page/CustomElement.js";
72
- import { getGridDimension as Tt, getPositionFromPage as Yr, getPageFromPosition as Jr } from "./utils/calculatePage.js";
73
- import { useMousePressed as eo } from "./utils/hooks/useMousePressed.js";
74
- import { useGrabScroll as to } from "./utils/hooks/useGrabScroll.js";
75
- import { usePinch as no } from "./utils/hooks/usePinch.js";
64
+ import { withRef as tt } from "./utils/withRef.js";
65
+ import { useInfiniteScroll as Wo } from "./utils/hooks/useInfiniteScroll.js";
66
+ import { THUMBNAIL_MIN_WIDTH as Ho } from "./utils/constants.js";
67
+ import * as $o from "pdfjs-dist";
68
+ import { PixelsPerInch as qo, AnnotationMode as Go, RenderingCancelledException as Uo, AnnotationLayer as Vo } from "pdfjs-dist";
69
+ import { SimpleLinkService as Ft } from "./utils/link_service.js";
70
+ import { annotationsEvents as Bo, annotationEventsHandler as jo, handleClick as kt, handleAnnotationWidget as Ko, handleAnnotationLink as Zo, bindLayerEvents as Xo, unbindLayerEvents as Wt } from "./utils/annotations.js";
71
+ import { normalizeSingleKeyword as Qo, sortHighlightPosition as Yo, unwrap as Jo } from "./components/page/searchHighlight.js";
72
+ import { CustomElement as er } from "./components/page/CustomElement.js";
73
+ import { getGridDimension as Tt, getPositionFromPage as tr, getPageFromPosition as nr } from "./utils/calculatePage.js";
74
+ import { useMousePressed as or } from "./utils/hooks/useMousePressed.js";
75
+ import { useGrabScroll as rr } from "./utils/hooks/useGrabScroll.js";
76
+ import { usePinch as ir } from "./utils/hooks/usePinch.js";
76
77
  import { useDebounce as Ct } from "./utils/hooks/useDebounce.js";
77
- import ro from "./components/ui/PasswordModal.js";
78
+ import ar from "./components/ui/PasswordModal.js";
78
79
  import { getScrollDistance as Me } from "./utils/getScrollDistance.js";
79
- import { getWordPositionInPage as oo } from "./utils/getWordPositionInPage.js";
80
- import { getThumbnailViewport as io } from "./utils/getThumbnailViewport.js";
80
+ import { getWordPositionInPage as sr } from "./utils/getWordPositionInPage.js";
81
+ import { getThumbnailViewport as cr } from "./utils/getThumbnailViewport.js";
81
82
  import { smoothScrollTo as at } from "./utils/smoothScrollTo.js";
82
- import { appConsole as ao } from "./utils/appConsole.js";
83
- import { FileUploadTool as pn } from "./components/layout/toolbar/FileUploadTool.js";
84
- import { DarkModeTool as so } from "./components/layout/toolbar/DarkModeTool.js";
85
- import { ThreeDotIcon as co } from "./components/icons/ThreeDotIcon.js";
86
- import { c as lo, u as Pt, P as Ue, a as He, b as yt, k as uo, e as po, i as ho } from "./index-c9a2990a.js";
87
- import { D as fo, d as st } from "./floating-ui.react-dom-d22a10b4.js";
88
- import { a as mo, h as go, u as vo, F as wo, b as _o, G as hn } from "./index-3bf64864.js";
89
- import { CloseIcon as bo } from "./components/icons/CloseIcon.js";
90
- import { DocumentProperties as To } from "./components/layout/toolbar/DocumentProperties.js";
91
- import { RotateTool as Co } from "./components/layout/toolbar/RotateTool.js";
92
- import { ViewModeTool as Po } from "./components/layout/toolbar/ViewModeTool.js";
93
- import { ScrollModeTool as yo } from "./components/layout/toolbar/ScrollModeTool.js";
94
- import { FileDownloadDefaultIcon as So } from "./components/icons/FileDownloadDefaultIcon.js";
95
- import { PrintDefaultTool as Io } from "./components/icons/PrintDefaultIcon.js";
96
- import { FullScreenTool as fn } from "./components/layout/toolbar/FullScreenTool.js";
97
- import { GoToDownIcon as mn } from "./components/icons/GoToDownIcon.js";
98
- import { SelectionModeTool as xo } from "./components/layout/toolbar/SelectionModeTool.js";
99
- import { ZoomTool as Ro } from "./components/layout/toolbar/ZoomTool.js";
100
- import { SearchIcon as gn } from "./components/icons/SearchIcon.js";
101
- import { ClearIcon as Lo } from "./components/icons/ClearIcon.js";
102
- import { InfoIcon as Wt } from "./components/icons/InfoIcon.js";
103
- const vn = () => {
104
- const { viewMode: t } = Fe(), { scrollMode: e } = Ne(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = Ye(), { setFocusedPage: i } = de(), c = k(), { columnCount: l } = sn(), { widths: d, heights: f } = Ge(), m = k(e), C = k(t), p = k(l), { targetScrollPage: T } = cn();
105
- z(() => {
83
+ import { appConsole as lr } from "./utils/appConsole.js";
84
+ import { FileUploadTool as hn } from "./components/layout/toolbar/FileUploadTool.js";
85
+ import { DarkModeTool as dr } from "./components/layout/toolbar/DarkModeTool.js";
86
+ import { ThreeDotIcon as ur } from "./components/icons/ThreeDotIcon.js";
87
+ import { c as pr, u as Pt, P as Ve, a as $e, b as yt, k as hr, e as fr, i as mr } from "./index-c9a2990a.js";
88
+ import { D as gr, d as st } from "./floating-ui.react-dom-d22a10b4.js";
89
+ import { a as vr, h as wr, u as _r, F as br, b as Tr, G as fn } from "./index-3bf64864.js";
90
+ import { CloseIcon as Cr } from "./components/icons/CloseIcon.js";
91
+ import { DocumentProperties as Pr } from "./components/layout/toolbar/DocumentProperties.js";
92
+ import { RotateTool as yr } from "./components/layout/toolbar/RotateTool.js";
93
+ import { ViewModeTool as Sr } from "./components/layout/toolbar/ViewModeTool.js";
94
+ import { ScrollModeTool as Ir } from "./components/layout/toolbar/ScrollModeTool.js";
95
+ import { FileDownloadDefaultIcon as xr } from "./components/icons/FileDownloadDefaultIcon.js";
96
+ import { PrintDefaultTool as Rr } from "./components/icons/PrintDefaultIcon.js";
97
+ import { FullScreenTool as mn } from "./components/layout/toolbar/FullScreenTool.js";
98
+ import { GoToDownIcon as gn } from "./components/icons/GoToDownIcon.js";
99
+ import { SelectionModeTool as Lr } from "./components/layout/toolbar/SelectionModeTool.js";
100
+ import { ZoomTool as Er } from "./components/layout/toolbar/ZoomTool.js";
101
+ import { SearchIcon as vn } from "./components/icons/SearchIcon.js";
102
+ import { ClearIcon as Nr } from "./components/icons/ClearIcon.js";
103
+ import { InfoIcon as Ht } from "./components/icons/InfoIcon.js";
104
+ const wn = () => {
105
+ const { viewMode: t } = ze(), { scrollMode: e } = Ee(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = Je(), { setFocusedPage: i } = pe(), c = k(), { columnCount: l } = cn(), { widths: d, heights: f } = Ue(), m = k(e), P = k(t), u = k(l), { targetScrollPage: T } = ln();
106
+ M(() => {
106
107
  n != null && n.scrollToItem && (c.current = n);
107
- }, [n]), z(() => {
108
- m.current = e, C.current = t;
108
+ }, [n]), M(() => {
109
+ m.current = e, P.current = t;
109
110
  }, [e, t]);
110
- const P = E(
111
+ const C = E(
111
112
  (g, S) => {
112
- if (!r)
113
+ if (!o)
113
114
  return;
114
115
  const v = Math.ceil(g / 2) * 2 - 1;
115
116
  if (g === v + 1) {
116
- const u = {
117
+ const p = {
117
118
  left: d[v],
118
119
  top: 0
119
120
  };
120
121
  return new Promise(
121
- (s) => at(r, u, s)
122
+ (s) => at(o, p, s)
122
123
  );
123
124
  }
124
125
  const h = {
125
126
  left: 0,
126
127
  top: 0
127
128
  };
128
- return r == null ? void 0 : r.scrollTo({
129
+ return o == null ? void 0 : o.scrollTo({
129
130
  ...h,
130
131
  behavior: S
131
132
  });
132
133
  },
133
- [r, d, at]
134
+ [o, d, at]
134
135
  );
135
- return z(() => {
136
- m.current = e, C.current = t;
137
- }, [e, t]), z(() => {
138
- p.current = l;
136
+ return M(() => {
137
+ m.current = e, P.current = t;
138
+ }, [e, t]), M(() => {
139
+ u.current = l;
139
140
  }, [l]), { scrollToPage: E(
140
141
  (g, S = "smooth") => {
141
142
  i(g);
142
143
  const v = g - 1;
143
- let h = v, u = 0;
144
- if (C.current === Le.DUAL_PAGE && m.current === ne.PAGE_SCROLLING) {
145
- P(g, S);
144
+ let h = v, p = 0;
145
+ if (P.current === Re.DUAL_PAGE && m.current === ne.PAGE_SCROLLING) {
146
+ C(g, S);
146
147
  return;
147
148
  }
148
149
  if (m.current === ne.PAGE_SCROLLING) {
149
150
  i(g);
150
151
  return;
151
152
  }
152
- if (!c.current || !o)
153
+ if (!c.current || !r)
153
154
  return;
154
- const s = o;
155
+ const s = r;
155
156
  S === "smooth" && (T.current = g);
156
157
  const { columnsWidth: w, rowsHeight: _ } = Tt(
157
158
  { widths: d, heights: f },
158
159
  l
159
160
  );
160
161
  if (m.current === ne.HORIZONTAL_SCROLLING) {
161
- u = v;
162
- const I = Me(w, u), R = {
162
+ p = v;
163
+ const I = Me(w, p), R = {
163
164
  left: Math.floor(I),
164
165
  top: 0
165
166
  };
@@ -168,9 +169,9 @@ const vn = () => {
168
169
  behavior: S
169
170
  });
170
171
  }
171
- if (C.current === Le.DUAL_PAGE) {
172
- u = v % 2, h = Math.floor(v / 2);
173
- const R = Me(w, u), L = Me(_, h), N = {
172
+ if (P.current === Re.DUAL_PAGE) {
173
+ p = v % 2, h = Math.floor(v / 2);
174
+ const R = Me(w, p), L = Me(_, h), N = {
174
175
  left: Math.floor(R),
175
176
  top: Math.floor(L)
176
177
  };
@@ -189,55 +190,55 @@ const vn = () => {
189
190
  });
190
191
  },
191
192
  [
192
- o,
193
+ r,
193
194
  l,
194
- P,
195
+ C,
195
196
  i,
196
197
  at,
197
198
  f,
198
199
  d
199
200
  ]
200
201
  ) };
201
- }, Eo = (t = 1) => {
202
- const [e, n] = q(t), [o, r] = q(0), { scrollToPage: i } = vn(), c = k(1), { viewMode: l } = Fe(), { scrollMode: d } = Ne(), { widths: f } = Ge(), { pagesRef: m } = be(), C = Ct(e, 100), p = E(
202
+ }, Or = (t = 1) => {
203
+ const [e, n] = q(t), [r, o] = q(0), { scrollToPage: i } = wn(), c = k(1), { viewMode: l } = ze(), { scrollMode: d } = Ee(), { widths: f } = Ue(), { pagesRef: m } = be(), P = Ct(e, 100), u = E(
203
204
  (h) => {
204
205
  if (!/^[0-9]*$/g.test(h.toString()) || !h)
205
206
  return { success: !1, currentPage: c.current };
206
207
  const s = +h;
207
- return s < 0 || s > o ? { success: !1, currentPage: c.current } : (n(s), c.current = s, { success: !0, currentPage: +h });
208
+ return s < 0 || s > r ? { success: !1, currentPage: c.current } : (n(s), c.current = s, { success: !0, currentPage: +h });
208
209
  },
209
- [o]
210
- ), T = E(p, [p]), P = E(
210
+ [r]
211
+ ), T = E(u, [u]), C = E(
211
212
  (h) => {
212
- const u = p(h);
213
- return u.success && i(u.currentPage), u;
213
+ const p = u(h);
214
+ return p.success && i(p.currentPage), p;
214
215
  },
215
- [p, i]
216
+ [u, i]
216
217
  ), b = E((h) => {
217
- const u = h % 2 === 1;
218
- if (!m || u)
218
+ const p = h % 2 === 1;
219
+ if (!m || p)
219
220
  return !1;
220
- const s = u ? f[h] : f[h - 1], w = u ? f[h + 1] : f[h];
221
- return l === Le.DUAL_PAGE && s + w < m.clientWidth;
222
- }, [l, f, m, o]), g = E(() => {
221
+ const s = p ? f[h] : f[h - 1], w = p ? f[h + 1] : f[h];
222
+ return l === Re.DUAL_PAGE && s + w < m.clientWidth;
223
+ }, [l, f, m, r]), g = E(() => {
223
224
  let h = e - 1;
224
- b(h) && (h = e - 2), P(h);
225
- }, [P, e, l, d, b]), S = W(() => l === Le.DUAL_PAGE && d === ne.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, l, d]), v = E(() => {
225
+ b(h) && (h = e - 2), C(h);
226
+ }, [C, e, l, d, b]), S = W(() => l === Re.DUAL_PAGE && d === ne.PAGE_SCROLLING ? e === r - 1 : e === r, [e, r, l, d]), v = E(() => {
226
227
  if (S)
227
228
  return;
228
229
  let h = e + 1;
229
- b(h) && (h = e + 2), P(h);
230
- }, [P, e, b, l, d, S]);
230
+ b(h) && (h = e + 2), C(h);
231
+ }, [C, e, b, l, d, S]);
231
232
  return {
232
- focusedPage: C,
233
- totalPages: o,
233
+ focusedPage: P,
234
+ totalPages: r,
234
235
  setFocusedPage: T,
235
- setTotalPages: r,
236
+ setTotalPages: o,
236
237
  nextPage: v,
237
238
  prevPage: g,
238
- goToPage: P
239
+ goToPage: C
239
240
  };
240
- }, wn = $e({
241
+ }, _n = qe({
241
242
  focusedPage: 0,
242
243
  setFocusedPage: (t) => {
243
244
  },
@@ -249,21 +250,21 @@ const vn = () => {
249
250
  },
250
251
  nextPage: () => {
251
252
  }
252
- }), de = () => {
253
- const t = qe(wn);
254
- return typeof (t == null ? void 0 : t.focusedPage) > "u" && ao.error("Please use this hooks inside children component of RPProvider"), t;
255
- }, Zs = ({ children: t }) => {
256
- const { pdf: e } = re(), { setCurrentPage: n } = Cr(), { focusedPage: o, totalPages: r, setFocusedPage: i, setTotalPages: c, goToPage: l, nextPage: d, prevPage: f } = Eo();
257
- return z(() => {
253
+ }), pe = () => {
254
+ const t = Ge(_n);
255
+ return typeof (t == null ? void 0 : t.focusedPage) > "u" && lr.error("Please use this hooks inside children component of RPProvider"), t;
256
+ }, Ys = ({ children: t }) => {
257
+ const { pdf: e } = oe(), { setCurrentPage: n } = So(), { focusedPage: r, totalPages: o, setFocusedPage: i, setTotalPages: c, goToPage: l, nextPage: d, prevPage: f } = Or();
258
+ return M(() => {
258
259
  e != null && e.numPages && (c(e.numPages), i(1));
259
- }, [e, c, i]), z(() => {
260
- n(o);
261
- }, [o, n]), /* @__PURE__ */ a(
262
- wn.Provider,
260
+ }, [e, c, i]), M(() => {
261
+ n(r);
262
+ }, [r, n]), /* @__PURE__ */ a(
263
+ _n.Provider,
263
264
  {
264
265
  value: {
265
- focusedPage: o,
266
- totalPages: r,
266
+ focusedPage: r,
267
+ totalPages: o,
267
268
  setFocusedPage: i,
268
269
  setTotalPages: c,
269
270
  nextPage: d,
@@ -273,30 +274,30 @@ const vn = () => {
273
274
  children: t
274
275
  }
275
276
  );
276
- }, No = () => {
277
- const { pdf: t, pages: e } = re(), [n, o] = q({
277
+ }, Dr = () => {
278
+ const { pdf: t, pages: e } = oe(), [n, r] = q({
278
279
  loadedPages: 0,
279
280
  totalPages: 0,
280
281
  percentage: 0
281
- }), [r, i] = q(!1), [c, l] = q(!1), [d, f] = q(null), m = k(!1);
282
- z(() => {
282
+ }), [o, i] = q(!1), [c, l] = q(!1), [d, f] = q(null), m = k(!1);
283
+ M(() => {
283
284
  m.current;
284
285
  }, [m]);
285
- const C = E(() => {
286
+ const P = E(() => {
286
287
  document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
287
288
  const h = document.querySelector(".rp-print-zone");
288
289
  h && h.remove();
289
- }, []), p = E(() => {
290
- m.current = !1, i(!1), l(!1), f(null), o({
290
+ }, []), u = E(() => {
291
+ m.current = !1, i(!1), l(!1), f(null), r({
291
292
  loadedPages: 0,
292
293
  totalPages: 0,
293
294
  percentage: 0
294
295
  });
295
296
  }, []), T = () => {
296
297
  m.current = !0;
297
- }, P = async ({
298
+ }, C = async ({
298
299
  scratchCanvas: h,
299
- pdfDocument: u,
300
+ pdfDocument: p,
300
301
  pageNumber: s,
301
302
  viewerPdfPage: w,
302
303
  printResolution: _,
@@ -304,66 +305,67 @@ const vn = () => {
304
305
  printAnnotationStoragePromise: x
305
306
  }) => {
306
307
  if (m.current) {
307
- p();
308
+ u();
308
309
  return;
309
310
  }
310
- const I = _ / kr.PDF;
311
+ const I = _ / qo.PDF;
311
312
  h.width = Math.floor(w.width * I), h.height = Math.floor(w.height * I);
312
313
  const R = h.getContext("2d");
313
314
  R.save(), R.fillStyle = "rgb(255, 255, 255)", R.fillRect(0, 0, h.width, h.height), R.restore();
314
315
  const [L, N] = await Promise.all([
315
- u.getPage(s),
316
+ p.getPage(s),
316
317
  x
317
318
  ]);
318
319
  if (m.current) {
319
- p();
320
+ u();
320
321
  return;
321
322
  }
322
323
  const F = {
324
+ canvas: h,
323
325
  canvasContext: R,
324
326
  transform: [I, 0, 0, I, 0, 0],
325
327
  viewport: L.getViewport({ scale: 1, rotation: w.rotation }),
326
328
  intent: "print",
327
- annotationMode: Wr.ENABLE_STORAGE,
329
+ annotationMode: Go.ENABLE_STORAGE,
328
330
  optionalContentConfigPromise: y,
329
331
  printAnnotationStorage: N
330
332
  };
331
333
  try {
332
334
  return L.render(F).promise;
333
- } catch (M) {
334
- throw M instanceof Hr || console.error(M), M;
335
+ } catch (z) {
336
+ throw z instanceof Uo || console.error(z), z;
335
337
  }
336
338
  }, b = E(() => {
337
339
  const h = window.print;
338
- return new Promise((u) => {
340
+ return new Promise((p) => {
339
341
  const s = (y) => {
340
342
  setTimeout(() => {
341
343
  h.call(window), setTimeout(() => y(), 20);
342
344
  }, 0);
343
345
  };
344
346
  if (document.querySelector(".rp-print-zone")) {
345
- s(u);
347
+ s(p);
346
348
  return;
347
349
  }
348
350
  const _ = new MutationObserver(() => {
349
- document.querySelector(".rp-print-zone") && (s(u), _.disconnect());
351
+ document.querySelector(".rp-print-zone") && (s(p), _.disconnect());
350
352
  });
351
353
  _.observe(document.body, { childList: !0, subtree: !0 });
352
354
  });
353
355
  }, []), g = async (h) => {
354
- const u = document.createElement("img"), s = document.createElement("div");
356
+ const p = document.createElement("img"), s = document.createElement("div");
355
357
  return s.classList.add("rp-print-page"), await new Promise((w, _) => {
356
358
  h.toBlob((y) => {
357
- y ? (u.src = URL.createObjectURL(y), u.onload = () => {
358
- URL.revokeObjectURL(u.src), w();
359
- }, u.onerror = _) : _(new Error("Failed to create blob"));
359
+ y ? (p.src = URL.createObjectURL(y), p.onload = () => {
360
+ URL.revokeObjectURL(p.src), w();
361
+ }, p.onerror = _) : _(new Error("Failed to create blob"));
360
362
  });
361
363
  }).catch(() => {
362
- }), s.appendChild(u), s;
363
- }, S = (h, u) => {
364
+ }), s.appendChild(p), s;
365
+ }, S = (h, p) => {
364
366
  const s = document.createElement("div");
365
367
  s.classList.add("rp-print-zone");
366
- const w = document.createElement("style"), _ = u.get(1);
368
+ const w = document.createElement("style"), _ = p.get(1);
367
369
  if (_) {
368
370
  const { width: y, height: x } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
369
371
  w.innerHTML = `@page { size: ${y}px ${x}px }`;
@@ -372,8 +374,8 @@ const vn = () => {
372
374
  }, v = E(async () => {
373
375
  if (!t)
374
376
  return;
375
- p();
376
- const h = document.createElement("canvas"), u = [];
377
+ u();
378
+ const h = document.createElement("canvas"), p = [];
377
379
  try {
378
380
  t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
379
381
  const w = t.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
@@ -381,11 +383,11 @@ const vn = () => {
381
383
  ), y = e.size;
382
384
  for (const [I, R] of e) {
383
385
  if (m.current) {
384
- p();
386
+ u();
385
387
  return;
386
388
  }
387
389
  const L = R.page.getViewport({ scale: 1 });
388
- if (await P({
390
+ if (await C({
389
391
  scratchCanvas: h,
390
392
  pdfDocument: t,
391
393
  pageNumber: I,
@@ -394,23 +396,23 @@ const vn = () => {
394
396
  optionalContentConfigPromise: w,
395
397
  printAnnotationStoragePromise: _
396
398
  }), m.current) {
397
- p();
399
+ u();
398
400
  return;
399
401
  }
400
402
  const N = await g(h);
401
- u.push(N);
402
- const F = parseFloat((u.length / y * 100).toFixed(2));
403
- o({
403
+ p.push(N);
404
+ const F = parseFloat((p.length / y * 100).toFixed(2));
405
+ r({
404
406
  loadedPages: I,
405
407
  totalPages: y,
406
408
  percentage: F
407
409
  });
408
410
  }
409
411
  if (m.current) {
410
- p();
412
+ u();
411
413
  return;
412
414
  }
413
- const x = S(u, e);
415
+ const x = S(p, e);
414
416
  document.body.appendChild(x), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), i(!0), await b();
415
417
  } catch (s) {
416
418
  l(!0), s instanceof Error && f(s);
@@ -418,22 +420,22 @@ const vn = () => {
418
420
  h.height = 0, h.width = 0;
419
421
  }
420
422
  }, [t, e, m]);
421
- return z(() => {
423
+ return M(() => {
422
424
  const h = () => {
423
- p(), C();
425
+ u(), P();
424
426
  };
425
427
  return window.addEventListener("afterprint", h, !0), () => {
426
428
  window.removeEventListener("afterprint", h, !0);
427
429
  };
428
- }, [C, p]), {
430
+ }, [P, u]), {
429
431
  print: v,
430
432
  cancel: T,
431
433
  progress: n,
432
- isComplete: r,
434
+ isComplete: o,
433
435
  isError: c,
434
436
  error: d
435
437
  };
436
- }, _n = $e({
438
+ }, bn = qe({
437
439
  print: () => {
438
440
  },
439
441
  cancel: () => {
@@ -450,10 +452,10 @@ const vn = () => {
450
452
  console.error("Error in setOnError callback:", e);
451
453
  }
452
454
  }
453
- }), Xs = ({ children: t }) => {
454
- const [e, n] = q(null), [o, r] = q(null), { print: i, cancel: c, progress: l, isComplete: d, isError: f, error: m } = No(), C = E((g) => {
455
- g && typeof g == "function" && r(() => g);
456
- }, []), p = (g) => {
455
+ }), Js = ({ children: t }) => {
456
+ const [e, n] = q(null), [r, o] = q(null), { print: i, cancel: c, progress: l, isComplete: d, isError: f, error: m } = Dr(), P = E((g) => {
457
+ g && typeof g == "function" && o(() => g);
458
+ }, []), u = (g) => {
457
459
  m && g(m);
458
460
  }, T = E(
459
461
  (g) => {
@@ -461,53 +463,53 @@ const vn = () => {
461
463
  },
462
464
  [l, e]
463
465
  );
464
- z(() => {
465
- d && o && P();
466
- }, [d, o]), z(() => {
467
- f && p((g) => {
466
+ M(() => {
467
+ d && r && C();
468
+ }, [d, r]), M(() => {
469
+ f && u((g) => {
468
470
  console.error(g);
469
471
  });
470
- }, [f]), z(() => {
472
+ }, [f]), M(() => {
471
473
  l && e && e(l);
472
474
  }, [l, e]);
473
- const P = () => {
474
- o && (o(), r(null));
475
+ const C = () => {
476
+ r && (r(), o(null));
475
477
  }, b = {
476
478
  print: i,
477
479
  cancel: c,
478
480
  setOnProgress: T,
479
- setOnComplete: C,
480
- setOnError: p,
481
+ setOnComplete: P,
482
+ setOnError: u,
481
483
  progress: l
482
484
  };
483
- return /* @__PURE__ */ a(_n.Provider, { value: b, children: t });
484
- }, tt = () => {
485
- const t = qe(_n);
485
+ return /* @__PURE__ */ a(bn.Provider, { value: b, children: t });
486
+ }, nt = () => {
487
+ const t = Ge(bn);
486
488
  if (!t)
487
489
  throw new Error("usePrintContext must be used within a PrintProvider");
488
490
  return t;
489
- }, Oo = () => {
490
- const [t, e] = q({}), { pages: n } = re(), o = W(() => Object.keys(t).length, [t]), r = E(
491
+ }, Ar = () => {
492
+ const [t, e] = q({}), { pages: n } = oe(), r = W(() => Object.keys(t).length, [t]), o = E(
491
493
  (c) => {
492
494
  if (!n.size)
493
495
  return;
494
496
  const l = c > n.size ? n.size : c, f = Array.from(n.values()).slice(0, l).map((m) => {
495
- const { thumbnailViewport: C, scale: p } = io(m.page, m.defaultRotation);
497
+ const { thumbnailViewport: P, scale: u } = cr(m.page, m.defaultRotation);
496
498
  return {
497
- scale: p,
499
+ scale: u,
498
500
  page: m.page,
499
501
  loading: !0,
500
- viewport: C,
502
+ viewport: P,
501
503
  defaultRotation: m.defaultRotation
502
504
  };
503
- }).reduce((m, C) => (m[C.page.pageNumber] = C, m), {});
505
+ }).reduce((m, P) => (m[P.page.pageNumber] = P, m), {});
504
506
  e(f);
505
507
  },
506
508
  [n]
507
509
  );
508
- z(() => {
509
- r(10);
510
- }, [r]);
510
+ M(() => {
511
+ o(10);
512
+ }, [o]);
511
513
  const i = E(
512
514
  (c) => {
513
515
  if (!n)
@@ -526,8 +528,8 @@ const vn = () => {
526
528
  },
527
529
  [n]
528
530
  );
529
- return { thumbnailPages: t, addPage: i, addToPage: r, thumbnailLength: o };
530
- }, bn = $e({
531
+ return { thumbnailPages: t, addPage: i, addToPage: o, thumbnailLength: r };
532
+ }, Tn = qe({
531
533
  thumbnailPages: {},
532
534
  addPage: (t) => {
533
535
  },
@@ -537,50 +539,50 @@ const vn = () => {
537
539
  setActive: (t) => {
538
540
  },
539
541
  active: !1
540
- }), Tn = () => qe(bn), Qs = ({
542
+ }), Cn = () => Ge(Tn), ec = ({
541
543
  children: t,
542
544
  initialThumbnailsVisible: e
543
545
  }) => {
544
- const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: i } = Oo(), [c, l] = q(e);
546
+ const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: i } = Ar(), [c, l] = q(e);
545
547
  return /* @__PURE__ */ a(
546
- bn.Provider,
548
+ Tn.Provider,
547
549
  {
548
- value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: i, active: c, setActive: l },
550
+ value: { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: i, active: c, setActive: l },
549
551
  children: t
550
552
  }
551
553
  );
552
- }, Do = (t = {}, e = "") => {
553
- const [n, o] = q(e), [r, i] = q(!1), { pdf: c, pages: l } = re(), { widths: d, heights: f } = Ge(), m = k(!n), { currentZoom: C } = _t(), [p, T] = q([]), { setFocusedPage: P } = de(), { columnCount: b } = Fe(), { pageRotate: g } = Je(), [S, v] = q(0), { pageScrollElementRef: h, virtualScrollableElementRef: u } = Ye(), { scrollMode: s } = Ne(), { pagesRef: w } = be(), [_, y] = q(null), x = k({}), I = k(0), R = W(() => S === 0 ? null : p[S - 1], [S, p]), L = W(() => p.length, [p]), N = E(
554
+ }, Mr = (t = {}, e = "") => {
555
+ const [n, r] = q(e), [o, i] = q(!1), { pdf: c, pages: l } = oe(), { widths: d, heights: f } = Ue(), m = k(!n), { currentZoom: P } = _t(), [u, T] = q([]), { setFocusedPage: C } = pe(), { columnCount: b } = ze(), { pageRotate: g } = et(), [S, v] = q(0), { pageScrollElementRef: h, virtualScrollableElementRef: p } = Je(), { scrollMode: s } = Ee(), { pagesRef: w } = be(), [_, y] = q(null), x = k({}), I = k(0), R = W(() => S === 0 ? null : u[S - 1], [S, u]), L = W(() => u.length, [u]), N = E(
554
556
  (O) => {
555
557
  if (O === 0)
556
558
  return;
557
- const A = p[O - 1];
559
+ const A = u[O - 1];
558
560
  if (!A || !l)
559
561
  return;
560
- const H = u || h;
562
+ const H = p || h;
561
563
  if (!H || !w)
562
564
  return;
563
565
  const U = l.get(A.page);
564
- if (s === ne.PAGE_SCROLLING && P(A.page), !U)
566
+ if (s === ne.PAGE_SCROLLING && C(A.page), !U)
565
567
  return;
566
568
  let B = 0, V = 0;
567
569
  if (s === ne.VERTICAL_SCROLLING) {
568
- const ue = A.page - 1, J = b, me = ue % J, ye = Math.floor(ue / J);
569
- B = Me(f, ye), V = Me(d, me);
570
+ const se = A.page - 1, ce = b, ae = se % ce, Fe = Math.floor(se / ce);
571
+ B = Me(f, Fe), V = Me(d, ae);
570
572
  }
571
- s === ne.HORIZONTAL_SCROLLING && (V = d.slice(0, A.page - 1).reduce((ue, J) => ue + J, 0));
572
- const ee = {
573
+ s === ne.HORIZONTAL_SCROLLING && (V = d.slice(0, A.page - 1).reduce((se, ce) => se + ce, 0));
574
+ const J = {
573
575
  height: f[A.page - 1],
574
576
  width: d[A.page - 1]
575
- }, G = g[A.page], { leftInPage: Z, topInPage: Y } = oo(
576
- ee,
577
+ }, G = g[A.page], { leftInPage: K, topInPage: Y } = sr(
578
+ J,
577
579
  w,
578
580
  A.rect,
579
- C,
581
+ P,
580
582
  G
581
- ), oe = V + Z, ae = B + Y, ie = {
582
- left: Math.max(oe, 0),
583
- top: Math.max(ae, 0)
583
+ ), ee = V + K, re = B + Y, ie = {
584
+ left: Math.max(ee, 0),
585
+ top: Math.max(re, 0)
584
586
  };
585
587
  H.scrollTo({
586
588
  ...ie,
@@ -589,17 +591,17 @@ const vn = () => {
589
591
  },
590
592
  [
591
593
  l,
592
- P,
594
+ C,
593
595
  d,
594
596
  f,
595
597
  s,
596
- u,
598
+ p,
597
599
  h,
598
600
  w,
599
- p
601
+ u
600
602
  ]
601
603
  );
602
- z(() => {
604
+ M(() => {
603
605
  S && N(S);
604
606
  }, [S]);
605
607
  const F = E(() => {
@@ -607,7 +609,7 @@ const vn = () => {
607
609
  let A;
608
610
  return L ? O + 1 > L ? A = 1 : A = O + 1 : A = 0, I.current = A, A;
609
611
  }), I.current === 1 && N(I.current);
610
- }, [L, N]), M = E(() => {
612
+ }, [L, N]), z = E(() => {
611
613
  v((O) => {
612
614
  let A;
613
615
  return L ? O - 1 <= 0 ? A = L : A = O - 1 : A = 0, I.current = A, A;
@@ -624,7 +626,7 @@ const vn = () => {
624
626
  }
625
627
  return H;
626
628
  }, []);
627
- return z(() => {
629
+ return M(() => {
628
630
  if (!n) {
629
631
  m.current = !0, T([]), v(0);
630
632
  return;
@@ -632,12 +634,12 @@ const vn = () => {
632
634
  m.current = !1, i(!0), T([]), v(0), D(c).then((O) => {
633
635
  x.current = O;
634
636
  const H = Object.keys(O).reduce((U, B) => {
635
- const V = fr(
637
+ const V = vo(
636
638
  [n],
637
639
  O[B],
638
640
  Number(B) - 1,
639
641
  t
640
- ).map((ee, G) => ({ ...ee, page: Number(B), pageMatchIdx: G }));
642
+ ).map((J, G) => ({ ...J, page: Number(B), pageMatchIdx: G }));
641
643
  return [...U, ...V];
642
644
  }, []);
643
645
  T(H), v(H.length ? 1 : 0);
@@ -646,18 +648,18 @@ const vn = () => {
646
648
  }).finally(() => i(!1));
647
649
  }, [n, D, c, t]), {
648
650
  search: n,
649
- setSearch: o,
650
- loading: r,
651
- matches: p,
651
+ setSearch: r,
652
+ loading: o,
653
+ matches: u,
652
654
  totalMatches: L,
653
655
  currentMatchPosition: S,
654
656
  currentMatch: R,
655
657
  nextMatch: F,
656
- prevMatch: M,
658
+ prevMatch: z,
657
659
  currentMatchElement: _,
658
660
  setCurrentMatchElement: y
659
661
  };
660
- }, Cn = $e({
662
+ }, Pn = qe({
661
663
  search: "",
662
664
  setSearch: (t) => {
663
665
  },
@@ -675,48 +677,48 @@ const vn = () => {
675
677
  currentMatchElement: null,
676
678
  setCurrentMatchElement: (t) => {
677
679
  }
678
- }), Ys = ({
680
+ }), tc = ({
679
681
  children: t,
680
682
  initialSearch: e
681
683
  }) => {
682
- const [n, o] = q({}), {
683
- loading: r,
684
+ const [n, r] = q({}), {
685
+ loading: o,
684
686
  setSearch: i,
685
687
  totalMatches: c,
686
688
  currentMatchPosition: l,
687
689
  currentMatch: d,
688
690
  search: f,
689
691
  matches: m,
690
- nextMatch: C,
691
- prevMatch: p,
692
+ nextMatch: P,
693
+ prevMatch: u,
692
694
  currentMatchElement: T,
693
- setCurrentMatchElement: P
694
- } = Do(n, e);
695
+ setCurrentMatchElement: C
696
+ } = Mr(n, e);
695
697
  return /* @__PURE__ */ a(
696
- Cn.Provider,
698
+ Pn.Provider,
697
699
  {
698
700
  value: {
699
701
  searchOptions: n,
700
- setSearchOptions: o,
701
- loading: r,
702
+ setSearchOptions: r,
703
+ loading: o,
702
704
  setSearch: i,
703
705
  totalMatches: c,
704
706
  currentMatchPosition: l,
705
707
  currentMatch: d,
706
- nextMatch: C,
707
- prevMatch: p,
708
+ nextMatch: P,
709
+ prevMatch: u,
708
710
  search: f,
709
711
  matches: m,
710
712
  currentMatchElement: T,
711
- setCurrentMatchElement: P
713
+ setCurrentMatchElement: C
712
714
  },
713
715
  children: t
714
716
  }
715
717
  );
716
- }, St = () => qe(Cn), Pn = $e(null), Js = ({ children: t }) => {
717
- const e = k(!1), [n, o] = q([]), r = E((d) => {
718
- o((f) => [...f, { id: d.page.pageNumber.toString(), data: d, priority: 0 }]);
719
- }, []), i = W(() => new br(r), [r]), { focusedPage: c } = de(), l = E((d) => (e.current = !0, Tr(
718
+ }, St = () => Ge(Pn), yn = qe(null), nc = ({ children: t }) => {
719
+ const e = k(!1), [n, r] = q([]), o = E((d) => {
720
+ r((f) => [...f, { id: d.page.pageNumber.toString(), data: d, priority: 0 }]);
721
+ }, []), i = W(() => new Po(o), [o]), { focusedPage: c } = pe(), l = E((d) => (e.current = !0, yo(
720
722
  d.data.page,
721
723
  d.data.canvasElem,
722
724
  d.data.options
@@ -725,25 +727,25 @@ const vn = () => {
725
727
  }).finally(() => {
726
728
  d.data.onLoaded && d.data.onLoaded();
727
729
  })), []);
728
- return z(() => {
730
+ return M(() => {
729
731
  c && (i.changePagePriority(`^page-${c}`, 0), i.changePagePriority(`^thumbnail-${c}`, 1));
730
- }, [c]), z(() => {
732
+ }, [c]), M(() => {
731
733
  if (i.isEmpty() || e.current)
732
734
  return;
733
735
  const d = () => {
734
736
  const f = i.dequeue();
735
737
  f ? l(f).finally(() => {
736
738
  d();
737
- }) : (e.current = !1, o(i.peekAll()));
739
+ }) : (e.current = !1, r(i.peekAll()));
738
740
  };
739
741
  d();
740
- }, [i, l, n]), /* @__PURE__ */ a(Pn.Provider, { value: i, children: t });
741
- }, yn = () => {
742
- const t = qe(Pn);
742
+ }, [i, l, n]), /* @__PURE__ */ a(yn.Provider, { value: i, children: t });
743
+ }, Sn = () => {
744
+ const t = Ge(yn);
743
745
  if (!t)
744
746
  throw new Error("RenderQueue not found");
745
747
  return t;
746
- }, se = {
748
+ }, le = {
747
749
  "rp-pages": "_rp-pages_u7m2r_1",
748
750
  "rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_u7m2r_6",
749
751
  "rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_u7m2r_11",
@@ -758,21 +760,21 @@ const vn = () => {
758
760
  "rp-page-wrapper": "_rp-page-wrapper_ii91u_1",
759
761
  "rp-page": "_rp-page_ii91u_1",
760
762
  "rp-loader-wrapper": "_rp-loader-wrapper_ii91u_15"
761
- }, Ao = (t) => {
762
- const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = k(null), { pages: i } = re(), { pageRotate: c } = Je(), l = k(), { currentZoom: d } = _t(), f = yn(), m = k(`page-${e}`);
763
- return z(() => {
763
+ }, zr = (t) => {
764
+ const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = k(null), { pages: i } = oe(), { pageRotate: c } = et(), l = k(), { currentZoom: d } = _t(), f = Sn(), m = k(`page-${e}`);
765
+ return M(() => {
764
766
  if (!i || d === 0)
765
767
  return;
766
- const C = i.get(e);
767
- if (r.current && C) {
768
- const p = r.current;
769
- p.hidden = !0;
768
+ const P = i.get(e);
769
+ if (o.current && P) {
770
+ const u = o.current;
771
+ u.hidden = !0;
770
772
  const T = l.current;
771
- T && T.cancel(), o && o(), f.enqueue(
773
+ T && T.cancel(), r && r(), f.enqueue(
772
774
  m.current,
773
775
  {
774
- page: C.page,
775
- canvasElem: p,
776
+ page: P.page,
777
+ canvasElem: u,
776
778
  options: {
777
779
  scale: d,
778
780
  rotate: c[e],
@@ -786,31 +788,31 @@ const vn = () => {
786
788
  return () => {
787
789
  f.removeQueue(m.current);
788
790
  };
789
- }, [i, e, c, d, o, n, f]), /* @__PURE__ */ a("canvas", { "data-rp": `page-${e}-canvas`, ref: r });
790
- }, zo = "_selecting_ppr5g_10", Mo = "_markedContent_ppr5g_33", ge = {
791
+ }, [i, e, c, d, r, n, f]), /* @__PURE__ */ a("canvas", { "data-rp": `page-${e}-canvas`, ref: o });
792
+ }, Fr = "_selecting_ppr5g_10", kr = "_markedContent_ppr5g_33", ge = {
791
793
  "rp-text-layer": "_rp-text-layer_ppr5g_1",
792
- selecting: zo,
793
- markedContent: Mo,
794
+ selecting: Fr,
795
+ markedContent: kr,
794
796
  "rp-text-layer-text": "_rp-text-layer-text_ppr5g_52"
795
- }, Fo = (t) => {
796
- const { pageNumber: e } = t, { pages: n } = re(), o = k(null), { matches: r, currentMatch: i, setCurrentMatchElement: c } = St(), [l, d] = q(
797
+ }, Wr = (t) => {
798
+ const { pageNumber: e } = t, { pages: n } = oe(), r = k(null), { matches: o, currentMatch: i, setCurrentMatchElement: c } = St(), [l, d] = q(
797
799
  []
798
- ), f = k(), m = k(), C = k([]), p = W(() => r.filter((h) => h.pageIndex === e - 1), [r, e]), T = E(
799
- (h, u, s = !1) => {
800
- if (s && mr(h, u), !p.length) {
801
- C.current = [], d([]);
800
+ ), f = k(), m = k(), P = k([]), u = W(() => o.filter((h) => h.pageIndex === e - 1), [o, e]), T = E(
801
+ (h, p, s = !1) => {
802
+ if (s && wo(h, p), !u.length) {
803
+ P.current = [], d([]);
802
804
  return;
803
805
  }
804
- const w = gr(p, h, u);
806
+ const w = _o(u, h, p);
805
807
  d(w);
806
808
  },
807
- [p]
808
- ), P = k(), b = k(!1), g = E(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
809
- z(() => ((() => {
810
- if (P.current)
809
+ [u]
810
+ ), C = k(), b = k(!1), g = E(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
811
+ M(() => ((() => {
812
+ if (C.current)
811
813
  return;
812
- P.current = new AbortController();
813
- const { signal: u } = P.current, s = () => {
814
+ C.current = new AbortController();
815
+ const { signal: p } = C.current, s = () => {
814
816
  g().forEach((_) => {
815
817
  const y = _.querySelector(".endOfContent");
816
818
  y && (_.appendChild(y), y.style.width = "", y.style.height = "", _.classList.remove(ge.selecting));
@@ -821,31 +823,31 @@ const vn = () => {
821
823
  () => {
822
824
  b.current = !0;
823
825
  },
824
- { signal: u }
826
+ { signal: p }
825
827
  ), document.addEventListener(
826
828
  "pointerup",
827
829
  () => {
828
830
  b.current = !1, s();
829
831
  },
830
- { signal: u }
832
+ { signal: p }
831
833
  ), window.addEventListener(
832
834
  "blur",
833
835
  () => {
834
836
  b.current = !1, s();
835
837
  },
836
- { signal: u }
838
+ { signal: p }
837
839
  ), document.addEventListener(
838
840
  "keyup",
839
841
  () => {
840
842
  b.current || s();
841
843
  },
842
- { signal: u }
844
+ { signal: p }
843
845
  );
844
846
  let w = null;
845
847
  document.addEventListener(
846
848
  "selectionchange",
847
849
  () => {
848
- var F, M;
850
+ var F, z;
849
851
  const _ = document.getSelection();
850
852
  if (!_)
851
853
  return;
@@ -874,100 +876,100 @@ const vn = () => {
874
876
  const L = (F = R.parentElement) == null ? void 0 : F.closest(
875
877
  ge["rp-text-layer"]
876
878
  ), N = L == null ? void 0 : L.querySelector(".endOfContent");
877
- N && L && (N.style.width = L.style.width, N.style.height = L.style.height, (M = R.parentElement) == null || M.insertBefore(N, R.nextSibling)), w = x.cloneRange();
879
+ N && L && (N.style.width = L.style.width, N.style.height = L.style.height, (z = R.parentElement) == null || z.insertBefore(N, R.nextSibling)), w = x.cloneRange();
878
880
  },
879
- { signal: u }
881
+ { signal: p }
880
882
  );
881
883
  })(), () => {
882
- var u;
883
- (u = P.current) == null || u.abort(), P.current = void 0;
884
+ var p;
885
+ (p = C.current) == null || p.abort(), C.current = void 0;
884
886
  }), [g]);
885
887
  const S = E(() => {
886
- o.current && o.current.classList.add(ge.selecting);
888
+ r.current && r.current.classList.add(ge.selecting);
887
889
  }, []), v = E(() => {
888
- o.current && o.current.classList.remove(ge.selecting);
890
+ r.current && r.current.classList.remove(ge.selecting);
889
891
  }, []);
890
- return z(() => {
891
- if (C.current.forEach((s) => {
892
+ return M(() => {
893
+ if (P.current.forEach((s) => {
892
894
  s.classList.remove("selected");
893
895
  }), !l.length || !i || i.pageIndex !== e - 1)
894
896
  return;
895
- const h = p.findIndex(
897
+ const h = u.findIndex(
896
898
  (s) => JSON.stringify(s) === JSON.stringify(i)
897
899
  );
898
900
  if (h === -1)
899
901
  return;
900
- const u = l.filter((s) => s.index === h);
901
- u.length && (C.current = u.map((s) => s.element), c(u[0].element), u.forEach((s) => {
902
+ const p = l.filter((s) => s.index === h);
903
+ p.length && (P.current = p.map((s) => s.element), c(p[0].element), p.forEach((s) => {
902
904
  s.element.classList.add("selected");
903
905
  }));
904
- }, [i, l, p]), z(() => {
906
+ }, [i, l, u]), M(() => {
905
907
  const h = n.get(e);
906
- if (!h || !o.current)
908
+ if (!h || !r.current)
907
909
  return;
908
- const u = o.current;
910
+ const p = r.current;
909
911
  return f.current && f.current.cancel(), h.page.getTextContent().then((s) => {
910
912
  const w = h.page.getViewport({ scale: 1 });
911
- return f.current = new Fr.TextLayer({
913
+ return f.current = new $o.TextLayer({
912
914
  viewport: w,
913
915
  textContentSource: s,
914
- container: u
915
- }), m.current = s, u && (u.innerText = ""), f.current.render();
916
+ container: p
917
+ }), m.current = s, p && (p.innerText = ""), f.current.render();
916
918
  }).then(() => {
917
919
  var y, x;
918
- [].slice.call(u.children).forEach((I) => {
920
+ [].slice.call(p.children).forEach((I) => {
919
921
  I.classList.add(ge["rp-text-layer-text"]), I.setAttribute("data-rp", "rp-text-layer-text");
920
922
  });
921
923
  const w = (y = f.current) == null ? void 0 : y.textDivs;
922
924
  w && m.current && T(m.current, w);
923
925
  const _ = document.createElement("div");
924
- _.className = "endOfContent", (x = o.current) == null || x.appendChild(_);
926
+ _.className = "endOfContent", (x = r.current) == null || x.appendChild(_);
925
927
  }).catch(() => {
926
928
  }), () => {
927
929
  var s;
928
930
  (s = f.current) == null || s.cancel();
929
931
  };
930
- }, [n, e]), z(() => {
932
+ }, [n, e]), M(() => {
931
933
  var s;
932
- [].slice.call(o.current.children).forEach((w) => {
934
+ [].slice.call(r.current.children).forEach((w) => {
933
935
  w.classList.add(ge["rp-text-layer-text"]);
934
936
  });
935
- const u = (s = f.current) == null ? void 0 : s.textDivs;
936
- u && m.current && T(m.current, u, !0);
937
+ const p = (s = f.current) == null ? void 0 : s.textDivs;
938
+ p && m.current && T(m.current, p, !0);
937
939
  }, [T]), /* @__PURE__ */ a(
938
940
  "div",
939
941
  {
940
942
  "data-rp-text-layer": !0,
941
943
  "data-rp": `page-${e}-textLayer`,
942
944
  className: ge["rp-text-layer"],
943
- ref: o,
945
+ ref: r,
944
946
  onMouseDown: S,
945
947
  onMouseUp: v
946
948
  }
947
949
  );
948
- }, ko = {
950
+ }, Hr = {
949
951
  "rp-annotation-layer": "_rp-annotation-layer_1udza_1"
950
952
  };
951
- let Wo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
952
- const Ho = (t) => {
953
- const { pageNumber: e } = t, n = k(null), { pages: o, pdf: r } = re(), i = k(), [c, l] = q(), { setFocusedPage: d, goToPage: f } = de(), { scrollMode: m } = Ne(), { print: C } = tt(), { download: p } = Gn(), T = W(() => o.get(e), [o, e]), P = W(() => T == null ? void 0 : T.page.getViewport(), [T]);
954
- z(() => {
953
+ let $r = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
954
+ const qr = (t) => {
955
+ const { pageNumber: e } = t, n = k(null), { pages: r, pdf: o } = oe(), i = k(), [c, l] = q(), { setFocusedPage: d, goToPage: f } = pe(), { scrollMode: m } = Ee(), { print: P } = nt(), { download: u } = Un(), T = W(() => r.get(e), [r, e]), C = W(() => T == null ? void 0 : T.page.getViewport(), [T]);
956
+ M(() => {
955
957
  i.current && (i.current.div.replaceChildren(), i.current = void 0);
956
- }, [r]), z(() => {
958
+ }, [o]), M(() => {
957
959
  T && T.page.getAnnotations().then((g) => {
958
960
  i.current = void 0, l(g), n.current && (n.current.innerText = "");
959
961
  });
960
962
  }, [T]);
961
963
  const b = E(
962
964
  (g) => {
963
- !c || !r || (Gr(g), Ur(g, r, c).then((S) => {
965
+ !c || !o || (Bo(g), jo(g, o, c).then((S) => {
964
966
  var v, h;
965
- ((v = S == null ? void 0 : S.data) == null ? void 0 : v.action) === "Print" ? C() : ((h = S == null ? void 0 : S.data) == null ? void 0 : h.action) === "SaveAs" && p();
966
- }), m === ne.PAGE_SCROLLING ? Ft(g, c, r, (S) => d(S.pageIndex + 1)) : Ft(g, c, r, (S) => f(S.pageIndex + 1)));
967
+ ((v = S == null ? void 0 : S.data) == null ? void 0 : v.action) === "Print" ? P() : ((h = S == null ? void 0 : S.data) == null ? void 0 : h.action) === "SaveAs" && u();
968
+ }), m === ne.PAGE_SCROLLING ? kt(g, c, o, (S) => d(S.pageIndex + 1)) : kt(g, c, o, (S) => f(S.pageIndex + 1)));
967
969
  },
968
- [r, c, f, d, m, C, p]
970
+ [o, c, f, d, m, P, u]
969
971
  );
970
- return z(() => {
972
+ return M(() => {
971
973
  if (!T || !c)
972
974
  return;
973
975
  const g = T.page.getViewport();
@@ -978,108 +980,111 @@ const Ho = (t) => {
978
980
  return;
979
981
  }
980
982
  const S = /* @__PURE__ */ new Map([]);
981
- for (const u of c) {
982
- const { annotationType: s } = u;
983
+ for (const p of c) {
984
+ const { annotationType: s } = p;
983
985
  switch (s) {
984
986
  case Dt.Link:
985
- Br(u);
987
+ Zo(p);
986
988
  break;
987
989
  case Dt.Widget:
988
- Vr(u, g, S);
990
+ Ko(p, g, S);
989
991
  break;
990
992
  }
991
993
  }
992
994
  const v = new AbortController();
993
995
  return (async () => {
994
996
  var w;
995
- i.current && (i.current.div.replaceChildren(), i.current = void 0), n.current && (n.current.innerText = ""), i.current = new $r({
997
+ i.current && (i.current.div.replaceChildren(), i.current = void 0), n.current && (n.current.innerText = ""), i.current = new Vo({
996
998
  div: n.current,
997
999
  accessibilityManager: void 0,
998
1000
  annotationCanvasMap: void 0,
999
1001
  annotationEditorUIManager: void 0,
1000
1002
  structTreeLayer: null,
1001
1003
  page: T.page,
1002
- viewport: g.clone({ dontFlip: !0 })
1003
- }), n.current && kt(n.current, b);
1004
- const u = await (r == null ? void 0 : r.hasJSActions()), s = await (r == null ? void 0 : r.getFieldObjects());
1004
+ viewport: g.clone({ dontFlip: !0 }),
1005
+ commentManager: void 0,
1006
+ linkService: new Ft(),
1007
+ annotationStorage: o == null ? void 0 : o.annotationStorage
1008
+ }), n.current && Wt(n.current, b);
1009
+ const p = await (o == null ? void 0 : o.hasJSActions()), s = await (o == null ? void 0 : o.getFieldObjects());
1005
1010
  if (v.signal.aborted)
1006
1011
  throw "abort";
1007
1012
  return (w = i.current) == null ? void 0 : w.render({
1008
1013
  annotations: c,
1009
- annotationStorage: r == null ? void 0 : r.annotationStorage,
1010
- hasJSActions: u,
1014
+ annotationStorage: o == null ? void 0 : o.annotationStorage,
1015
+ hasJSActions: p,
1011
1016
  fieldObjects: s,
1012
1017
  div: n.current,
1013
1018
  viewport: g.clone({ dontFlip: !0 }),
1014
1019
  page: T.page,
1015
- imageResourcesPath: Wo,
1020
+ imageResourcesPath: $r,
1016
1021
  renderForms: !0,
1017
- linkService: new qr(),
1022
+ linkService: new Ft(),
1018
1023
  downloadManager: null,
1019
1024
  enableScripting: !1
1020
1025
  });
1021
1026
  })().then(() => {
1022
- n.current && jr(n.current, b);
1023
- }).catch((u) => {
1024
- if (u !== "abort")
1025
- throw u;
1027
+ n.current && Xo(n.current, b);
1028
+ }).catch((p) => {
1029
+ if (p !== "abort")
1030
+ throw p;
1026
1031
  }), () => {
1027
- v.abort("clear"), n.current && kt(n.current, b);
1032
+ v.abort("clear"), n.current && Wt(n.current, b);
1028
1033
  };
1029
- }, [r, c, b]), /* @__PURE__ */ a(
1034
+ }, [o, c, b]), /* @__PURE__ */ a(
1030
1035
  "div",
1031
1036
  {
1032
1037
  "data-rp": `page-${e}-annotationLayer`,
1033
- style: { width: `${P == null ? void 0 : P.width}px`, height: `${P == null ? void 0 : P.height}px` },
1034
- className: ko["rp-annotation-layer"],
1038
+ style: { width: `${C == null ? void 0 : C.width}px`, height: `${C == null ? void 0 : C.height}px` },
1039
+ className: Hr["rp-annotation-layer"],
1035
1040
  ref: n
1036
1041
  }
1037
1042
  );
1038
- }, $o = {
1043
+ }, Gr = {
1039
1044
  "rp-text-highlight": "_rp-text-highlight_jdkf8_1"
1040
- }, qo = ({ pageNumber: t, viewport: e }) => {
1041
- const [n, o] = q(), { pages: r } = re(), { highlightKeywords: i } = wr(), c = !0, l = k(null), [d, f] = q(null), [m, C] = q([]);
1042
- z(() => {
1045
+ }, Ur = ({ pageNumber: t, viewport: e }) => {
1046
+ const [n, r] = q(), { pages: o } = oe(), { highlightKeywords: i } = To(), c = !0, l = k(null), [d, f] = q(null), [m, P] = q([]);
1047
+ M(() => {
1043
1048
  l.current && f(l.current.parentElement);
1044
- }, [l]), z(() => {
1049
+ }, [l]), M(() => {
1045
1050
  (async () => {
1046
- const h = r.get(t);
1051
+ const h = o.get(t);
1047
1052
  if (!h || !l.current)
1048
1053
  return;
1049
- const u = await h.page.getTextContent();
1050
- o(u);
1054
+ const p = await h.page.getTextContent();
1055
+ r(p);
1051
1056
  })();
1052
- }, [r, t]);
1053
- const p = W(() => i ? i.map((v) => {
1054
- var h, u;
1057
+ }, [o, t]);
1058
+ const u = W(() => i ? i.map((v) => {
1059
+ var h, p;
1055
1060
  return {
1056
- ...Kr(v.keyword, (h = v.options) == null ? void 0 : h.matchCase, (u = v.options) == null ? void 0 : u.wholeWords),
1061
+ ...Qo(v.keyword, (h = v.options) == null ? void 0 : h.matchCase, (p = v.options) == null ? void 0 : p.wholeWords),
1057
1062
  color: v.highlightColor
1058
1063
  };
1059
1064
  }) : [], [i]);
1060
1065
  function T(v, h) {
1061
1066
  if (!v)
1062
1067
  return;
1063
- const u = `[data-rp="page-${h}-textLayer"]`;
1068
+ const p = `[data-rp="page-${h}-textLayer"]`;
1064
1069
  return new Promise((s) => {
1065
- const w = v.querySelector(u);
1070
+ const w = v.querySelector(p);
1066
1071
  if (w) {
1067
1072
  s(w);
1068
1073
  return;
1069
1074
  }
1070
1075
  new MutationObserver((y, x) => {
1071
- const I = v.querySelector(u);
1076
+ const I = v.querySelector(p);
1072
1077
  I && (s(I), x.disconnect());
1073
1078
  }).observe(v, { childList: !0, subtree: !0 });
1074
1079
  });
1075
1080
  }
1076
- function P(v) {
1081
+ function C(v) {
1077
1082
  return new Promise((h) => {
1078
- const u = v.querySelectorAll(
1083
+ const p = v.querySelectorAll(
1079
1084
  '[data-rp="rp-text-layer-text"]'
1080
1085
  );
1081
- if (u.length) {
1082
- h(Array.from(u));
1086
+ if (p.length) {
1087
+ h(Array.from(p));
1083
1088
  return;
1084
1089
  }
1085
1090
  new MutationObserver((w, _) => {
@@ -1090,9 +1095,9 @@ const Ho = (t) => {
1090
1095
  }).observe(v, { childList: !0, subtree: !0 });
1091
1096
  });
1092
1097
  }
1093
- const b = (v, h, u, s) => {
1098
+ const b = (v, h, p, s) => {
1094
1099
  var U;
1095
- const w = document.createRange(), _ = u.firstChild;
1100
+ const w = document.createRange(), _ = p.firstChild;
1096
1101
  if (!_ || _.nodeType !== Node.TEXT_NODE)
1097
1102
  return null;
1098
1103
  const y = ((U = _.textContent) == null ? void 0 : U.length) ?? 0, x = s[0].charIdxInSpan, I = s.length === 1 ? x : s[s.length - 1].charIdxInSpan;
@@ -1101,22 +1106,22 @@ const Ho = (t) => {
1101
1106
  w.setStart(_, x), w.setEnd(_, I + 1);
1102
1107
  const R = document.createElement("span");
1103
1108
  R.style.width = "auto", w.surroundContents(R);
1104
- const L = R.getBoundingClientRect(), N = v.getBoundingClientRect(), F = N.height, M = N.width, D = 100 * (L.left - N.left) / M, O = 100 * (L.top - N.top) / F, A = 100 * L.height / F, H = 100 * L.width / M;
1105
- return Xr(R), {
1109
+ const L = R.getBoundingClientRect(), N = v.getBoundingClientRect(), F = N.height, z = N.width, D = 100 * (L.left - N.left) / z, O = 100 * (L.top - N.top) / F, A = 100 * L.height / F, H = 100 * L.width / z;
1110
+ return Jo(R), {
1106
1111
  keywordStr: h,
1107
1112
  left: D,
1108
1113
  top: O,
1109
1114
  height: A,
1110
1115
  width: H,
1111
1116
  pageHeight: F,
1112
- pageWidth: M
1117
+ pageWidth: z
1113
1118
  };
1114
1119
  };
1115
1120
  async function g(v, h) {
1116
- const u = await T(d, v);
1117
- if (!u)
1121
+ const p = await T(d, v);
1122
+ if (!p)
1118
1123
  return;
1119
- const s = await P(u);
1124
+ const s = await C(p);
1120
1125
  if (s.length) {
1121
1126
  const w = s.map((y) => y.tagName === "BR" ? " " : y.textContent).reduce(
1122
1127
  (y, x, I) => y.concat(
@@ -1133,27 +1138,27 @@ const Ho = (t) => {
1133
1138
  spanIdx: 0
1134
1139
  }
1135
1140
  ]
1136
- ).slice(1), _ = S(u, h, s, w);
1137
- C(_);
1141
+ ).slice(1), _ = S(p, h, s, w);
1142
+ P(_);
1138
1143
  }
1139
1144
  }
1140
- const S = (v, h, u, s) => {
1145
+ const S = (v, h, p, s) => {
1141
1146
  const w = h.length;
1142
1147
  if (!s.length || !w)
1143
1148
  return [];
1144
1149
  const _ = [], y = s.map((x) => x.char).join("");
1145
- return p.forEach((x) => {
1150
+ return u.forEach((x) => {
1146
1151
  const { keyword: I, regExp: R, wholeWords: L, color: N } = x, F = I;
1147
1152
  if (!F.trim())
1148
1153
  return;
1149
- const M = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
1154
+ const z = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
1150
1155
  let D;
1151
1156
  const O = [];
1152
- for (; (D = M.exec(y)) !== null; )
1153
- L && !vr(y, D.index, D[0].length) || O.push({
1154
- keyword: M,
1157
+ for (; (D = z.exec(y)) !== null; )
1158
+ L && !bo(y, D.index, D[0].length) || O.push({
1159
+ keyword: z,
1155
1160
  startIndex: D.index,
1156
- endIndex: M.lastIndex
1161
+ endIndex: z.lastIndex
1157
1162
  });
1158
1163
  const A = O.map((H) => ({
1159
1164
  keyword: H.keyword,
@@ -1167,26 +1172,26 @@ const Ho = (t) => {
1167
1172
  );
1168
1173
  for (const B of Object.values(U))
1169
1174
  if (B.length !== 1 || B[0].char.trim() !== "") {
1170
- const V = B, ee = u[V[0].spanIdx], G = b(
1175
+ const V = B, J = p[V[0].spanIdx], G = b(
1171
1176
  v,
1172
1177
  F,
1173
- ee,
1178
+ J,
1174
1179
  V
1175
1180
  );
1176
1181
  if (G) {
1177
- const { left: Z, top: Y } = G;
1178
- if (_.find((ae) => ae.left === Z && ae.top === Y))
1182
+ const { left: K, top: Y } = G;
1183
+ if (_.find((re) => re.left === K && re.top === Y))
1179
1184
  continue;
1180
1185
  _.push({ ...G, highlightColor: H.color });
1181
1186
  }
1182
1187
  }
1183
1188
  }
1184
- }), _.sort(Zr), _;
1189
+ }), _.sort(Yo), _;
1185
1190
  };
1186
- return z(() => {
1191
+ return M(() => {
1187
1192
  (async () => {
1188
1193
  if (!i || i.length === 0) {
1189
- C([]);
1194
+ P([]);
1190
1195
  return;
1191
1196
  }
1192
1197
  try {
@@ -1195,10 +1200,10 @@ const Ho = (t) => {
1195
1200
  console.error(h);
1196
1201
  }
1197
1202
  })();
1198
- }, [c, i, t, n, e]), /* @__PURE__ */ a(he, { children: /* @__PURE__ */ a("div", { ref: l, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((v, h) => /* @__PURE__ */ a(
1203
+ }, [c, i, t, n, e]), /* @__PURE__ */ a(fe, { children: /* @__PURE__ */ a("div", { ref: l, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((v, h) => /* @__PURE__ */ a(
1199
1204
  "div",
1200
1205
  {
1201
- className: $o["rp-text-highlight"],
1206
+ className: Gr["rp-text-highlight"],
1202
1207
  style: {
1203
1208
  top: `${v.top}%`,
1204
1209
  left: `${v.left}%`,
@@ -1209,36 +1214,36 @@ const Ho = (t) => {
1209
1214
  },
1210
1215
  h
1211
1216
  )) }) });
1212
- }, It = et((t, e) => {
1213
- const { pageNumber: n, style: o, ...r } = t, { pages: i } = re(), { pageRotate: c } = Je(), { textLayer: l } = dr(), { currentZoom: d } = _t(), { LoaderImageComponent: f } = bt(), m = k(i.get(n)), [C, p] = q(!1), T = k(null), [P, b] = q({
1217
+ }, It = tt((t, e) => {
1218
+ const { pageNumber: n, style: r, ...o } = t, { pages: i } = oe(), { pageRotate: c } = et(), { textLayer: l } = ho(), { currentZoom: d } = _t(), { LoaderImageComponent: f } = bt(), m = k(i.get(n)), [P, u] = q(!1), T = k(null), [C, b] = q({
1214
1219
  width: 0,
1215
1220
  height: 0
1216
1221
  });
1217
1222
  rn(e, () => T.current);
1218
1223
  const g = W(() => m.current ? c[n] : 0, [n, c]);
1219
- z(() => {
1224
+ M(() => {
1220
1225
  if (i && (m.current = i.get(n), m.current)) {
1221
- const u = m.current.page.getViewport({
1226
+ const p = m.current.page.getViewport({
1222
1227
  scale: d,
1223
1228
  rotation: g
1224
1229
  });
1225
- b(u);
1230
+ b(p);
1226
1231
  }
1227
1232
  }, [i, n, g, d]);
1228
1233
  const S = W(() => {
1229
1234
  switch (g) {
1230
1235
  case 90:
1231
- return `${P.width / 2}px ${P.width / 2}px`;
1236
+ return `${C.width / 2}px ${C.width / 2}px`;
1232
1237
  case -90:
1233
1238
  case 270:
1234
- return `${P.height / 2}px ${P.height / 2}px`;
1239
+ return `${C.height / 2}px ${C.height / 2}px`;
1235
1240
  default:
1236
1241
  return "center";
1237
1242
  }
1238
- }, [g, P]), v = E(() => {
1239
- p(!0);
1243
+ }, [g, C]), v = E(() => {
1244
+ u(!0);
1240
1245
  }, []), h = E(() => {
1241
- p(!1);
1246
+ u(!1);
1242
1247
  }, []);
1243
1248
  return /* @__PURE__ */ a(
1244
1249
  "div",
@@ -1246,9 +1251,9 @@ const Ho = (t) => {
1246
1251
  ref: T,
1247
1252
  id: `page-${n}`,
1248
1253
  "data-rp": `page-${n}`,
1249
- ...r,
1254
+ ...o,
1250
1255
  style: {
1251
- ...o,
1256
+ ...r,
1252
1257
  "--rp-rotate": `${g}deg`,
1253
1258
  "--rp-page-rotate-translate": `${S}`,
1254
1259
  "--scale-factor": d
@@ -1258,17 +1263,17 @@ const Ho = (t) => {
1258
1263
  "div",
1259
1264
  {
1260
1265
  style: {
1261
- width: `${P.width}px`,
1262
- height: `${P.height}px`
1266
+ width: `${C.width}px`,
1267
+ height: `${C.height}px`
1263
1268
  },
1264
1269
  className: ct["rp-page"],
1265
1270
  children: [
1266
- /* @__PURE__ */ a(Ao, { onLoading: v, onLoaded: h, pageNumber: n }),
1267
- C && f && /* @__PURE__ */ a("div", { className: ct["rp-loader-wrapper"], children: /* @__PURE__ */ a(f, {}) }),
1268
- /* @__PURE__ */ a(Qr, { pageNumber: n }),
1269
- l && /* @__PURE__ */ a(Fo, { pageNumber: n }),
1270
- /* @__PURE__ */ a(qo, { pageNumber: n, viewport: P }),
1271
- /* @__PURE__ */ a(Ho, { pageNumber: n })
1271
+ /* @__PURE__ */ a(zr, { onLoading: v, onLoaded: h, pageNumber: n }),
1272
+ P && f && /* @__PURE__ */ a("div", { className: ct["rp-loader-wrapper"], children: /* @__PURE__ */ a(f, {}) }),
1273
+ /* @__PURE__ */ a(er, { pageNumber: n }),
1274
+ l && /* @__PURE__ */ a(Wr, { pageNumber: n }),
1275
+ /* @__PURE__ */ a(Ur, { pageNumber: n, viewport: C }),
1276
+ /* @__PURE__ */ a(qr, { pageNumber: n })
1272
1277
  ]
1273
1278
  }
1274
1279
  )
@@ -1279,112 +1284,112 @@ function mt() {
1279
1284
  return mt = Object.assign ? Object.assign.bind() : function(t) {
1280
1285
  for (var e = 1; e < arguments.length; e++) {
1281
1286
  var n = arguments[e];
1282
- for (var o in n)
1283
- ({}).hasOwnProperty.call(n, o) && (t[o] = n[o]);
1287
+ for (var r in n)
1288
+ ({}).hasOwnProperty.call(n, r) && (t[r] = n[r]);
1284
1289
  }
1285
1290
  return t;
1286
1291
  }, mt.apply(null, arguments);
1287
1292
  }
1288
- function Ht(t) {
1293
+ function $t(t) {
1289
1294
  if (t === void 0)
1290
1295
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1291
1296
  return t;
1292
1297
  }
1293
1298
  function gt(t, e) {
1294
- return gt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
1295
- return n.__proto__ = o, n;
1299
+ return gt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
1300
+ return n.__proto__ = r, n;
1296
1301
  }, gt(t, e);
1297
1302
  }
1298
- function Go(t, e) {
1303
+ function Vr(t, e) {
1299
1304
  t.prototype = Object.create(e.prototype), t.prototype.constructor = t, gt(t, e);
1300
1305
  }
1301
- var $t = Number.isNaN || function(e) {
1306
+ var qt = Number.isNaN || function(e) {
1302
1307
  return typeof e == "number" && e !== e;
1303
1308
  };
1304
- function Uo(t, e) {
1305
- return !!(t === e || $t(t) && $t(e));
1309
+ function Br(t, e) {
1310
+ return !!(t === e || qt(t) && qt(e));
1306
1311
  }
1307
- function Vo(t, e) {
1312
+ function jr(t, e) {
1308
1313
  if (t.length !== e.length)
1309
1314
  return !1;
1310
1315
  for (var n = 0; n < t.length; n++)
1311
- if (!Uo(t[n], e[n]))
1316
+ if (!Br(t[n], e[n]))
1312
1317
  return !1;
1313
1318
  return !0;
1314
1319
  }
1315
1320
  function lt(t, e) {
1316
- e === void 0 && (e = Vo);
1317
- var n, o = [], r, i = !1;
1321
+ e === void 0 && (e = jr);
1322
+ var n, r = [], o, i = !1;
1318
1323
  function c() {
1319
1324
  for (var l = [], d = 0; d < arguments.length; d++)
1320
1325
  l[d] = arguments[d];
1321
- return i && n === this && e(l, o) || (r = t.apply(this, l), i = !0, n = this, o = l), r;
1326
+ return i && n === this && e(l, r) || (o = t.apply(this, l), i = !0, n = this, r = l), o;
1322
1327
  }
1323
1328
  return c;
1324
1329
  }
1325
- function qt(t, e) {
1330
+ function Gt(t, e) {
1326
1331
  if (t == null)
1327
1332
  return {};
1328
1333
  var n = {};
1329
- for (var o in t)
1330
- if ({}.hasOwnProperty.call(t, o)) {
1331
- if (e.indexOf(o) !== -1)
1334
+ for (var r in t)
1335
+ if ({}.hasOwnProperty.call(t, r)) {
1336
+ if (e.indexOf(r) !== -1)
1332
1337
  continue;
1333
- n[o] = t[o];
1338
+ n[r] = t[r];
1334
1339
  }
1335
1340
  return n;
1336
1341
  }
1337
- var Bo = typeof performance == "object" && typeof performance.now == "function", Gt = Bo ? function() {
1342
+ var Kr = typeof performance == "object" && typeof performance.now == "function", Ut = Kr ? function() {
1338
1343
  return performance.now();
1339
1344
  } : function() {
1340
1345
  return Date.now();
1341
1346
  };
1342
- function Ut(t) {
1347
+ function Vt(t) {
1343
1348
  cancelAnimationFrame(t.id);
1344
1349
  }
1345
- function jo(t, e) {
1346
- var n = Gt();
1347
- function o() {
1348
- Gt() - n >= e ? t.call(null) : r.id = requestAnimationFrame(o);
1350
+ function Zr(t, e) {
1351
+ var n = Ut();
1352
+ function r() {
1353
+ Ut() - n >= e ? t.call(null) : o.id = requestAnimationFrame(r);
1349
1354
  }
1350
- var r = {
1351
- id: requestAnimationFrame(o)
1355
+ var o = {
1356
+ id: requestAnimationFrame(r)
1352
1357
  };
1353
- return r;
1358
+ return o;
1354
1359
  }
1355
1360
  var dt = -1;
1356
- function Ko(t) {
1361
+ function Xr(t) {
1357
1362
  if (t === void 0 && (t = !1), dt === -1 || t) {
1358
1363
  var e = document.createElement("div"), n = e.style;
1359
1364
  n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e), dt = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
1360
1365
  }
1361
1366
  return dt;
1362
1367
  }
1363
- var Ae = null;
1364
- function Vt(t) {
1365
- if (t === void 0 && (t = !1), Ae === null || t) {
1368
+ var De = null;
1369
+ function Bt(t) {
1370
+ if (t === void 0 && (t = !1), De === null || t) {
1366
1371
  var e = document.createElement("div"), n = e.style;
1367
1372
  n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
1368
- var o = document.createElement("div"), r = o.style;
1369
- return r.width = "100px", r.height = "100px", e.appendChild(o), document.body.appendChild(e), e.scrollLeft > 0 ? Ae = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? Ae = "negative" : Ae = "positive-ascending"), document.body.removeChild(e), Ae;
1373
+ var r = document.createElement("div"), o = r.style;
1374
+ return o.width = "100px", o.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ? De = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? De = "negative" : De = "positive-ascending"), document.body.removeChild(e), De;
1370
1375
  }
1371
- return Ae;
1376
+ return De;
1372
1377
  }
1373
- var Zo = 150, Xo = function(e) {
1378
+ var Qr = 150, Yr = function(e) {
1374
1379
  var n = e.columnIndex;
1375
1380
  e.data;
1376
- var o = e.rowIndex;
1377
- return o + ":" + n;
1378
- }, Be = null, je = null, Ke = null;
1379
- process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet(), Ke = /* @__PURE__ */ new WeakSet());
1380
- function Qo(t) {
1381
- var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, i = t.getColumnWidth, c = t.getEstimatedTotalHeight, l = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, f = t.getOffsetForRowAndAlignment, m = t.getRowHeight, C = t.getRowOffset, p = t.getRowStartIndexForOffset, T = t.getRowStopIndexForStartIndex, P = t.initInstanceProps, b = t.shouldResetStyleCacheOnItemSizeChange, g = t.validateProps;
1381
+ var r = e.rowIndex;
1382
+ return r + ":" + n;
1383
+ }, je = null, Ke = null, Ze = null;
1384
+ process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (je = /* @__PURE__ */ new WeakSet(), Ke = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet());
1385
+ function Jr(t) {
1386
+ var e, n = t.getColumnOffset, r = t.getColumnStartIndexForOffset, o = t.getColumnStopIndexForStartIndex, i = t.getColumnWidth, c = t.getEstimatedTotalHeight, l = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, f = t.getOffsetForRowAndAlignment, m = t.getRowHeight, P = t.getRowOffset, u = t.getRowStartIndexForOffset, T = t.getRowStopIndexForStartIndex, C = t.initInstanceProps, b = t.shouldResetStyleCacheOnItemSizeChange, g = t.validateProps;
1382
1387
  return e = /* @__PURE__ */ function(S) {
1383
- Go(v, S);
1384
- function v(u) {
1388
+ Vr(v, S);
1389
+ function v(p) {
1385
1390
  var s;
1386
- return s = S.call(this, u) || this, s._instanceProps = P(s.props, Ht(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
1387
- instance: Ht(s),
1391
+ return s = S.call(this, p) || this, s._instanceProps = C(s.props, $t(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
1392
+ instance: $t(s),
1388
1393
  isScrolling: !1,
1389
1394
  horizontalScrollDirection: "forward",
1390
1395
  scrollLeft: typeof s.props.initialScrollLeft == "number" ? s.props.initialScrollLeft : 0,
@@ -1415,12 +1420,12 @@ function Qo(t) {
1415
1420
  if (L.hasOwnProperty(N))
1416
1421
  F = L[N];
1417
1422
  else {
1418
- var M = n(s.props, _, s._instanceProps), D = I === "rtl";
1423
+ var z = n(s.props, _, s._instanceProps), D = I === "rtl";
1419
1424
  L[N] = F = {
1420
1425
  position: "absolute",
1421
- left: D ? void 0 : M,
1422
- right: D ? M : void 0,
1423
- top: C(s.props, w, s._instanceProps),
1426
+ left: D ? void 0 : z,
1427
+ right: D ? z : void 0,
1428
+ top: P(s.props, w, s._instanceProps),
1424
1429
  height: m(s.props, w, s._instanceProps),
1425
1430
  width: i(s.props, _, s._instanceProps)
1426
1431
  };
@@ -1433,9 +1438,9 @@ function Qo(t) {
1433
1438
  s.setState(function(F) {
1434
1439
  if (F.scrollLeft === I && F.scrollTop === R)
1435
1440
  return null;
1436
- var M = s.props.direction, D = I;
1437
- if (M === "rtl")
1438
- switch (Vt()) {
1441
+ var z = s.props.direction, D = I;
1442
+ if (z === "rtl")
1443
+ switch (Bt()) {
1439
1444
  case "negative":
1440
1445
  D = -I;
1441
1446
  break;
@@ -1458,7 +1463,7 @@ function Qo(t) {
1458
1463
  var _ = s.props.outerRef;
1459
1464
  s._outerRef = w, typeof _ == "function" ? _(w) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = w);
1460
1465
  }, s._resetIsScrollingDebounced = function() {
1461
- s._resetIsScrollingTimeoutId !== null && Ut(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId = jo(s._resetIsScrolling, Zo);
1466
+ s._resetIsScrollingTimeoutId !== null && Vt(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId = Zr(s._resetIsScrolling, Qr);
1462
1467
  }, s._resetIsScrolling = function() {
1463
1468
  s._resetIsScrollingTimeoutId = null, s.setState({
1464
1469
  isScrolling: !1
@@ -1468,7 +1473,7 @@ function Qo(t) {
1468
1473
  }, s;
1469
1474
  }
1470
1475
  v.getDerivedStateFromProps = function(s, w) {
1471
- return Yo(s, w), g(s), null;
1476
+ return ei(s, w), g(s), null;
1472
1477
  };
1473
1478
  var h = v.prototype;
1474
1479
  return h.scrollTo = function(s) {
@@ -1483,7 +1488,7 @@ function Qo(t) {
1483
1488
  };
1484
1489
  }, this._resetIsScrollingDebounced);
1485
1490
  }, h.scrollToItem = function(s) {
1486
- var w = s.align, _ = w === void 0 ? "auto" : w, y = s.columnIndex, x = s.rowIndex, I = this.props, R = I.columnCount, L = I.height, N = I.rowCount, F = I.width, M = this.state, D = M.scrollLeft, O = M.scrollTop, A = Ko();
1491
+ var w = s.align, _ = w === void 0 ? "auto" : w, y = s.columnIndex, x = s.rowIndex, I = this.props, R = I.columnCount, L = I.height, N = I.rowCount, F = I.width, z = this.state, D = z.scrollLeft, O = z.scrollTop, A = Xr();
1487
1492
  y !== void 0 && (y = Math.max(0, Math.min(y, R - 1))), x !== void 0 && (x = Math.max(0, Math.min(x, N - 1)));
1488
1493
  var H = c(this.props, this._instanceProps), U = l(this.props, this._instanceProps), B = U > F ? A : 0, V = H > L ? A : 0;
1489
1494
  this.scrollTo({
@@ -1502,7 +1507,7 @@ function Qo(t) {
1502
1507
  if (x && this._outerRef != null) {
1503
1508
  var I = this._outerRef;
1504
1509
  if (s === "rtl")
1505
- switch (Vt()) {
1510
+ switch (Bt()) {
1506
1511
  case "negative":
1507
1512
  I.scrollLeft = -_;
1508
1513
  break;
@@ -1520,26 +1525,26 @@ function Qo(t) {
1520
1525
  }
1521
1526
  this._callPropsCallbacks();
1522
1527
  }, h.componentWillUnmount = function() {
1523
- this._resetIsScrollingTimeoutId !== null && Ut(this._resetIsScrollingTimeoutId);
1528
+ this._resetIsScrollingTimeoutId !== null && Vt(this._resetIsScrollingTimeoutId);
1524
1529
  }, h.render = function() {
1525
- var s = this.props, w = s.children, _ = s.className, y = s.columnCount, x = s.direction, I = s.height, R = s.innerRef, L = s.innerElementType, N = s.innerTagName, F = s.itemData, M = s.itemKey, D = M === void 0 ? Xo : M, O = s.outerElementType, A = s.outerTagName, H = s.rowCount, U = s.style, B = s.useIsScrolling, V = s.width, ee = this.state.isScrolling, G = this._getHorizontalRangeToRender(), Z = G[0], Y = G[1], oe = this._getVerticalRangeToRender(), ae = oe[0], ie = oe[1], ue = [];
1530
+ var s = this.props, w = s.children, _ = s.className, y = s.columnCount, x = s.direction, I = s.height, R = s.innerRef, L = s.innerElementType, N = s.innerTagName, F = s.itemData, z = s.itemKey, D = z === void 0 ? Yr : z, O = s.outerElementType, A = s.outerTagName, H = s.rowCount, U = s.style, B = s.useIsScrolling, V = s.width, J = this.state.isScrolling, G = this._getHorizontalRangeToRender(), K = G[0], Y = G[1], ee = this._getVerticalRangeToRender(), re = ee[0], ie = ee[1], se = [];
1526
1531
  if (y > 0 && H)
1527
- for (var J = ae; J <= ie; J++)
1528
- for (var me = Z; me <= Y; me++)
1529
- ue.push(Ve(w, {
1530
- columnIndex: me,
1532
+ for (var ce = re; ce <= ie; ce++)
1533
+ for (var ae = K; ae <= Y; ae++)
1534
+ se.push(Be(w, {
1535
+ columnIndex: ae,
1531
1536
  data: F,
1532
- isScrolling: B ? ee : void 0,
1537
+ isScrolling: B ? J : void 0,
1533
1538
  key: D({
1534
- columnIndex: me,
1539
+ columnIndex: ae,
1535
1540
  data: F,
1536
- rowIndex: J
1541
+ rowIndex: ce
1537
1542
  }),
1538
- rowIndex: J,
1539
- style: this._getItemStyle(J, me)
1543
+ rowIndex: ce,
1544
+ style: this._getItemStyle(ce, ae)
1540
1545
  }));
1541
- var ye = c(this.props, this._instanceProps), rt = l(this.props, this._instanceProps);
1542
- return Ve(O || A || "div", {
1546
+ var Fe = c(this.props, this._instanceProps), ke = l(this.props, this._instanceProps);
1547
+ return Be(O || A || "div", {
1543
1548
  className: _,
1544
1549
  onScroll: this._onScroll,
1545
1550
  ref: this._outerRefSetter,
@@ -1552,167 +1557,167 @@ function Qo(t) {
1552
1557
  willChange: "transform",
1553
1558
  direction: x
1554
1559
  }, U)
1555
- }, Ve(L || N || "div", {
1556
- children: ue,
1560
+ }, Be(L || N || "div", {
1561
+ children: se,
1557
1562
  ref: R,
1558
1563
  style: {
1559
- height: ye,
1560
- pointerEvents: ee ? "none" : void 0,
1561
- width: rt
1564
+ height: Fe,
1565
+ pointerEvents: J ? "none" : void 0,
1566
+ width: ke
1562
1567
  }
1563
1568
  }));
1564
1569
  }, h._callPropsCallbacks = function() {
1565
1570
  var s = this.props, w = s.columnCount, _ = s.onItemsRendered, y = s.onScroll, x = s.rowCount;
1566
1571
  if (typeof _ == "function" && w > 0 && x > 0) {
1567
- var I = this._getHorizontalRangeToRender(), R = I[0], L = I[1], N = I[2], F = I[3], M = this._getVerticalRangeToRender(), D = M[0], O = M[1], A = M[2], H = M[3];
1572
+ var I = this._getHorizontalRangeToRender(), R = I[0], L = I[1], N = I[2], F = I[3], z = this._getVerticalRangeToRender(), D = z[0], O = z[1], A = z[2], H = z[3];
1568
1573
  this._callOnItemsRendered(R, L, D, O, N, F, A, H);
1569
1574
  }
1570
1575
  if (typeof y == "function") {
1571
- var U = this.state, B = U.horizontalScrollDirection, V = U.scrollLeft, ee = U.scrollTop, G = U.scrollUpdateWasRequested, Z = U.verticalScrollDirection;
1572
- this._callOnScroll(V, ee, B, Z, G);
1576
+ var U = this.state, B = U.horizontalScrollDirection, V = U.scrollLeft, J = U.scrollTop, G = U.scrollUpdateWasRequested, K = U.verticalScrollDirection;
1577
+ this._callOnScroll(V, J, B, K, G);
1573
1578
  }
1574
1579
  }, h._getHorizontalRangeToRender = function() {
1575
- var s = this.props, w = s.columnCount, _ = s.overscanColumnCount, y = s.overscanColumnsCount, x = s.overscanCount, I = s.rowCount, R = this.state, L = R.horizontalScrollDirection, N = R.isScrolling, F = R.scrollLeft, M = _ || y || x || 1;
1580
+ var s = this.props, w = s.columnCount, _ = s.overscanColumnCount, y = s.overscanColumnsCount, x = s.overscanCount, I = s.rowCount, R = this.state, L = R.horizontalScrollDirection, N = R.isScrolling, F = R.scrollLeft, z = _ || y || x || 1;
1576
1581
  if (w === 0 || I === 0)
1577
1582
  return [0, 0, 0, 0];
1578
- var D = o(this.props, F, this._instanceProps), O = r(this.props, D, F, this._instanceProps), A = !N || L === "backward" ? Math.max(1, M) : 1, H = !N || L === "forward" ? Math.max(1, M) : 1;
1583
+ var D = r(this.props, F, this._instanceProps), O = o(this.props, D, F, this._instanceProps), A = !N || L === "backward" ? Math.max(1, z) : 1, H = !N || L === "forward" ? Math.max(1, z) : 1;
1579
1584
  return [Math.max(0, D - A), Math.max(0, Math.min(w - 1, O + H)), D, O];
1580
1585
  }, h._getVerticalRangeToRender = function() {
1581
- var s = this.props, w = s.columnCount, _ = s.overscanCount, y = s.overscanRowCount, x = s.overscanRowsCount, I = s.rowCount, R = this.state, L = R.isScrolling, N = R.verticalScrollDirection, F = R.scrollTop, M = y || x || _ || 1;
1586
+ var s = this.props, w = s.columnCount, _ = s.overscanCount, y = s.overscanRowCount, x = s.overscanRowsCount, I = s.rowCount, R = this.state, L = R.isScrolling, N = R.verticalScrollDirection, F = R.scrollTop, z = y || x || _ || 1;
1582
1587
  if (w === 0 || I === 0)
1583
1588
  return [0, 0, 0, 0];
1584
- var D = p(this.props, F, this._instanceProps), O = T(this.props, D, F, this._instanceProps), A = !L || N === "backward" ? Math.max(1, M) : 1, H = !L || N === "forward" ? Math.max(1, M) : 1;
1589
+ var D = u(this.props, F, this._instanceProps), O = T(this.props, D, F, this._instanceProps), A = !L || N === "backward" ? Math.max(1, z) : 1, H = !L || N === "forward" ? Math.max(1, z) : 1;
1585
1590
  return [Math.max(0, D - A), Math.max(0, Math.min(I - 1, O + H)), D, O];
1586
1591
  }, v;
1587
- }(rr), e.defaultProps = {
1592
+ }(io), e.defaultProps = {
1588
1593
  direction: "ltr",
1589
1594
  itemData: void 0,
1590
1595
  useIsScrolling: !1
1591
1596
  }, e;
1592
1597
  }
1593
- var Yo = function(e, n) {
1594
- var o = e.children, r = e.direction, i = e.height, c = e.innerTagName, l = e.outerTagName, d = e.overscanColumnsCount, f = e.overscanCount, m = e.overscanRowsCount, C = e.width, p = n.instance;
1598
+ var ei = function(e, n) {
1599
+ var r = e.children, o = e.direction, i = e.height, c = e.innerTagName, l = e.outerTagName, d = e.overscanColumnsCount, f = e.overscanCount, m = e.overscanRowsCount, P = e.width, u = n.instance;
1595
1600
  if (process.env.NODE_ENV !== "production") {
1596
- if (typeof f == "number" && Be && !Be.has(p) && (Be.add(p), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof m == "number") && je && !je.has(p) && (je.add(p), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || l != null) && Ke && !Ke.has(p) && (Ke.add(p), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1597
- throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
1598
- switch (r) {
1601
+ if (typeof f == "number" && je && !je.has(u) && (je.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof m == "number") && Ke && !Ke.has(u) && (Ke.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || l != null) && Ze && !Ze.has(u) && (Ze.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
1602
+ throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
1603
+ switch (o) {
1599
1604
  case "ltr":
1600
1605
  case "rtl":
1601
1606
  break;
1602
1607
  default:
1603
- throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + r + '" was specified.'));
1608
+ throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + o + '" was specified.'));
1604
1609
  }
1605
- if (typeof C != "number")
1606
- throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (C === null ? "null" : typeof C) + '" was specified.'));
1610
+ if (typeof P != "number")
1611
+ throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (P === null ? "null" : typeof P) + '" was specified.'));
1607
1612
  if (typeof i != "number")
1608
1613
  throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (i === null ? "null" : typeof i) + '" was specified.'));
1609
1614
  }
1610
- }, Bt = 50, Sn = function(e, n) {
1611
- var o = e.rowCount, r = n.rowMetadataMap, i = n.estimatedRowHeight, c = n.lastMeasuredRowIndex, l = 0;
1612
- if (c >= o && (c = o - 1), c >= 0) {
1613
- var d = r[c];
1615
+ }, jt = 50, In = function(e, n) {
1616
+ var r = e.rowCount, o = n.rowMetadataMap, i = n.estimatedRowHeight, c = n.lastMeasuredRowIndex, l = 0;
1617
+ if (c >= r && (c = r - 1), c >= 0) {
1618
+ var d = o[c];
1614
1619
  l = d.offset + d.size;
1615
1620
  }
1616
- var f = o - c - 1, m = f * i;
1621
+ var f = r - c - 1, m = f * i;
1617
1622
  return l + m;
1618
- }, In = function(e, n) {
1619
- var o = e.columnCount, r = n.columnMetadataMap, i = n.estimatedColumnWidth, c = n.lastMeasuredColumnIndex, l = 0;
1620
- if (c >= o && (c = o - 1), c >= 0) {
1621
- var d = r[c];
1623
+ }, xn = function(e, n) {
1624
+ var r = e.columnCount, o = n.columnMetadataMap, i = n.estimatedColumnWidth, c = n.lastMeasuredColumnIndex, l = 0;
1625
+ if (c >= r && (c = r - 1), c >= 0) {
1626
+ var d = o[c];
1622
1627
  l = d.offset + d.size;
1623
1628
  }
1624
- var f = o - c - 1, m = f * i;
1629
+ var f = r - c - 1, m = f * i;
1625
1630
  return l + m;
1626
- }, ve = function(e, n, o, r) {
1631
+ }, ve = function(e, n, r, o) {
1627
1632
  var i, c, l;
1628
- if (e === "column" ? (i = r.columnMetadataMap, c = n.columnWidth, l = r.lastMeasuredColumnIndex) : (i = r.rowMetadataMap, c = n.rowHeight, l = r.lastMeasuredRowIndex), o > l) {
1633
+ if (e === "column" ? (i = o.columnMetadataMap, c = n.columnWidth, l = o.lastMeasuredColumnIndex) : (i = o.rowMetadataMap, c = n.rowHeight, l = o.lastMeasuredRowIndex), r > l) {
1629
1634
  var d = 0;
1630
1635
  if (l >= 0) {
1631
1636
  var f = i[l];
1632
1637
  d = f.offset + f.size;
1633
1638
  }
1634
- for (var m = l + 1; m <= o; m++) {
1635
- var C = c(m);
1639
+ for (var m = l + 1; m <= r; m++) {
1640
+ var P = c(m);
1636
1641
  i[m] = {
1637
1642
  offset: d,
1638
- size: C
1639
- }, d += C;
1643
+ size: P
1644
+ }, d += P;
1640
1645
  }
1641
- e === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
1646
+ e === "column" ? o.lastMeasuredColumnIndex = r : o.lastMeasuredRowIndex = r;
1642
1647
  }
1643
- return i[o];
1644
- }, jt = function(e, n, o, r) {
1648
+ return i[r];
1649
+ }, Kt = function(e, n, r, o) {
1645
1650
  var i, c;
1646
- e === "column" ? (i = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (i = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
1651
+ e === "column" ? (i = r.columnMetadataMap, c = r.lastMeasuredColumnIndex) : (i = r.rowMetadataMap, c = r.lastMeasuredRowIndex);
1647
1652
  var l = c > 0 ? i[c].offset : 0;
1648
- return l >= r ? xn(e, n, o, c, 0, r) : Jo(e, n, o, Math.max(0, c), r);
1649
- }, xn = function(e, n, o, r, i, c) {
1650
- for (; i <= r; ) {
1651
- var l = i + Math.floor((r - i) / 2), d = ve(e, n, l, o).offset;
1653
+ return l >= o ? Rn(e, n, r, c, 0, o) : ti(e, n, r, Math.max(0, c), o);
1654
+ }, Rn = function(e, n, r, o, i, c) {
1655
+ for (; i <= o; ) {
1656
+ var l = i + Math.floor((o - i) / 2), d = ve(e, n, l, r).offset;
1652
1657
  if (d === c)
1653
1658
  return l;
1654
- d < c ? i = l + 1 : d > c && (r = l - 1);
1659
+ d < c ? i = l + 1 : d > c && (o = l - 1);
1655
1660
  }
1656
1661
  return i > 0 ? i - 1 : 0;
1657
- }, Jo = function(e, n, o, r, i) {
1658
- for (var c = e === "column" ? n.columnCount : n.rowCount, l = 1; r < c && ve(e, n, r, o).offset < i; )
1659
- r += l, l *= 2;
1660
- return xn(e, n, o, Math.min(r, c - 1), Math.floor(r / 2), i);
1661
- }, Kt = function(e, n, o, r, i, c, l) {
1662
- var d = e === "column" ? n.width : n.height, f = ve(e, n, o, c), m = e === "column" ? In(n, c) : Sn(n, c), C = Math.max(0, Math.min(m - d, f.offset)), p = Math.max(0, f.offset - d + l + f.size);
1663
- switch (r === "smart" && (i >= p - d && i <= C + d ? r = "auto" : r = "center"), r) {
1662
+ }, ti = function(e, n, r, o, i) {
1663
+ for (var c = e === "column" ? n.columnCount : n.rowCount, l = 1; o < c && ve(e, n, o, r).offset < i; )
1664
+ o += l, l *= 2;
1665
+ return Rn(e, n, r, Math.min(o, c - 1), Math.floor(o / 2), i);
1666
+ }, Zt = function(e, n, r, o, i, c, l) {
1667
+ var d = e === "column" ? n.width : n.height, f = ve(e, n, r, c), m = e === "column" ? xn(n, c) : In(n, c), P = Math.max(0, Math.min(m - d, f.offset)), u = Math.max(0, f.offset - d + l + f.size);
1668
+ switch (o === "smart" && (i >= u - d && i <= P + d ? o = "auto" : o = "center"), o) {
1664
1669
  case "start":
1665
- return C;
1670
+ return P;
1666
1671
  case "end":
1667
- return p;
1672
+ return u;
1668
1673
  case "center":
1669
- return Math.round(p + (C - p) / 2);
1674
+ return Math.round(u + (P - u) / 2);
1670
1675
  case "auto":
1671
1676
  default:
1672
- return i >= p && i <= C ? i : p > C || i < p ? p : C;
1677
+ return i >= u && i <= P ? i : u > P || i < u ? u : P;
1673
1678
  }
1674
- }, ei = /* @__PURE__ */ Qo({
1675
- getColumnOffset: function(e, n, o) {
1676
- return ve("column", e, n, o).offset;
1679
+ }, ni = /* @__PURE__ */ Jr({
1680
+ getColumnOffset: function(e, n, r) {
1681
+ return ve("column", e, n, r).offset;
1677
1682
  },
1678
- getColumnStartIndexForOffset: function(e, n, o) {
1679
- return jt("column", e, o, n);
1683
+ getColumnStartIndexForOffset: function(e, n, r) {
1684
+ return Kt("column", e, r, n);
1680
1685
  },
1681
- getColumnStopIndexForStartIndex: function(e, n, o, r) {
1682
- for (var i = e.columnCount, c = e.width, l = ve("column", e, n, r), d = o + c, f = l.offset + l.size, m = n; m < i - 1 && f < d; )
1683
- m++, f += ve("column", e, m, r).size;
1686
+ getColumnStopIndexForStartIndex: function(e, n, r, o) {
1687
+ for (var i = e.columnCount, c = e.width, l = ve("column", e, n, o), d = r + c, f = l.offset + l.size, m = n; m < i - 1 && f < d; )
1688
+ m++, f += ve("column", e, m, o).size;
1684
1689
  return m;
1685
1690
  },
1686
- getColumnWidth: function(e, n, o) {
1687
- return o.columnMetadataMap[n].size;
1691
+ getColumnWidth: function(e, n, r) {
1692
+ return r.columnMetadataMap[n].size;
1688
1693
  },
1689
- getEstimatedTotalHeight: Sn,
1690
- getEstimatedTotalWidth: In,
1691
- getOffsetForColumnAndAlignment: function(e, n, o, r, i, c) {
1692
- return Kt("column", e, n, o, r, i, c);
1694
+ getEstimatedTotalHeight: In,
1695
+ getEstimatedTotalWidth: xn,
1696
+ getOffsetForColumnAndAlignment: function(e, n, r, o, i, c) {
1697
+ return Zt("column", e, n, r, o, i, c);
1693
1698
  },
1694
- getOffsetForRowAndAlignment: function(e, n, o, r, i, c) {
1695
- return Kt("row", e, n, o, r, i, c);
1699
+ getOffsetForRowAndAlignment: function(e, n, r, o, i, c) {
1700
+ return Zt("row", e, n, r, o, i, c);
1696
1701
  },
1697
- getRowOffset: function(e, n, o) {
1698
- return ve("row", e, n, o).offset;
1702
+ getRowOffset: function(e, n, r) {
1703
+ return ve("row", e, n, r).offset;
1699
1704
  },
1700
- getRowHeight: function(e, n, o) {
1701
- return o.rowMetadataMap[n].size;
1705
+ getRowHeight: function(e, n, r) {
1706
+ return r.rowMetadataMap[n].size;
1702
1707
  },
1703
- getRowStartIndexForOffset: function(e, n, o) {
1704
- return jt("row", e, o, n);
1708
+ getRowStartIndexForOffset: function(e, n, r) {
1709
+ return Kt("row", e, r, n);
1705
1710
  },
1706
- getRowStopIndexForStartIndex: function(e, n, o, r) {
1707
- for (var i = e.rowCount, c = e.height, l = ve("row", e, n, r), d = o + c, f = l.offset + l.size, m = n; m < i - 1 && f < d; )
1708
- m++, f += ve("row", e, m, r).size;
1711
+ getRowStopIndexForStartIndex: function(e, n, r, o) {
1712
+ for (var i = e.rowCount, c = e.height, l = ve("row", e, n, o), d = r + c, f = l.offset + l.size, m = n; m < i - 1 && f < d; )
1713
+ m++, f += ve("row", e, m, o).size;
1709
1714
  return m;
1710
1715
  },
1711
1716
  initInstanceProps: function(e, n) {
1712
- var o = e, r = o.estimatedColumnWidth, i = o.estimatedRowHeight, c = {
1717
+ var r = e, o = r.estimatedColumnWidth, i = r.estimatedRowHeight, c = {
1713
1718
  columnMetadataMap: {},
1714
- estimatedColumnWidth: r || Bt,
1715
- estimatedRowHeight: i || Bt,
1719
+ estimatedColumnWidth: o || jt,
1720
+ estimatedRowHeight: i || jt,
1716
1721
  lastMeasuredColumnIndex: -1,
1717
1722
  lastMeasuredRowIndex: -1,
1718
1723
  rowMetadataMap: {}
@@ -1728,41 +1733,41 @@ var Yo = function(e, n) {
1728
1733
  shouldForceUpdate: d
1729
1734
  });
1730
1735
  }, n.resetAfterIndices = function(l) {
1731
- var d = l.columnIndex, f = l.rowIndex, m = l.shouldForceUpdate, C = m === void 0 ? !0 : m;
1732
- typeof d == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, d - 1)), typeof f == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, f - 1)), n._getItemStyleCache(-1), C && n.forceUpdate();
1736
+ var d = l.columnIndex, f = l.rowIndex, m = l.shouldForceUpdate, P = m === void 0 ? !0 : m;
1737
+ typeof d == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, d - 1)), typeof f == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, f - 1)), n._getItemStyleCache(-1), P && n.forceUpdate();
1733
1738
  }, c;
1734
1739
  },
1735
1740
  shouldResetStyleCacheOnItemSizeChange: !1,
1736
1741
  validateProps: function(e) {
1737
- var n = e.columnWidth, o = e.rowHeight;
1742
+ var n = e.columnWidth, r = e.rowHeight;
1738
1743
  if (process.env.NODE_ENV !== "production") {
1739
1744
  if (typeof n != "function")
1740
1745
  throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. ' + ('"' + (n === null ? "null" : typeof n) + '" was specified.'));
1741
- if (typeof o != "function")
1742
- throw Error('An invalid "rowHeight" prop has been specified. Value should be a function. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
1746
+ if (typeof r != "function")
1747
+ throw Error('An invalid "rowHeight" prop has been specified. Value should be a function. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
1743
1748
  }
1744
1749
  }
1745
1750
  });
1746
1751
  process.env.NODE_ENV;
1747
- function Zt(t, e) {
1752
+ function Xt(t, e) {
1748
1753
  for (var n in t)
1749
1754
  if (!(n in e))
1750
1755
  return !0;
1751
- for (var o in e)
1752
- if (t[o] !== e[o])
1756
+ for (var r in e)
1757
+ if (t[r] !== e[r])
1753
1758
  return !0;
1754
1759
  return !1;
1755
1760
  }
1756
- var ti = ["style"], ni = ["style"];
1757
- function ri(t, e) {
1758
- var n = t.style, o = qt(t, ti), r = e.style, i = qt(e, ni);
1759
- return !Zt(n, r) && !Zt(o, i);
1761
+ var oi = ["style"], ri = ["style"];
1762
+ function ii(t, e) {
1763
+ var n = t.style, r = Gt(t, oi), o = e.style, i = Gt(e, ri);
1764
+ return !Xt(n, o) && !Xt(r, i);
1760
1765
  }
1761
- const oi = () => {
1762
- const { viewMode: t } = Fe(), { scrollMode: e } = Ne(), { setColumnCount: n } = sn(), { virtualScrollableElementRef: o } = Ye(), r = Ge(), i = W(() => r.heights.length, [r.heights]), c = W(() => e === ne.HORIZONTAL_SCROLLING ? i : t === Le.DUAL_PAGE ? 2 : 1, [t, e, e, i, o]), l = W(() => r.widths.reduce((g, S, v) => {
1766
+ const ai = () => {
1767
+ const { viewMode: t } = ze(), { scrollMode: e } = Ee(), { setColumnCount: n } = cn(), { virtualScrollableElementRef: r } = Je(), o = Ue(), i = W(() => o.heights.length, [o.heights]), c = W(() => e === ne.HORIZONTAL_SCROLLING ? i : t === Re.DUAL_PAGE ? 2 : 1, [t, e, e, i, r]), l = W(() => o.widths.reduce((g, S, v) => {
1763
1768
  const h = v % c;
1764
1769
  return (!g[h] || S > g[h]) && (g[h] = S), g;
1765
- }, []), [r.widths, c]), d = E(
1770
+ }, []), [o.widths, c]), d = E(
1766
1771
  (b) => {
1767
1772
  const g = b % l.length;
1768
1773
  return l[g] || 0;
@@ -1772,22 +1777,22 @@ const oi = () => {
1772
1777
  (b) => {
1773
1778
  const g = Array.from({ length: c }, (S, v) => {
1774
1779
  const h = b * c + v;
1775
- return r.heights[h] || 0;
1780
+ return o.heights[h] || 0;
1776
1781
  });
1777
1782
  return Math.max(...g);
1778
1783
  },
1779
- [r.heights, c]
1784
+ [o.heights, c]
1780
1785
  );
1781
- z(() => {
1786
+ M(() => {
1782
1787
  n(c);
1783
1788
  }, [c, n]);
1784
- const m = W(() => e === ne.HORIZONTAL_SCROLLING || e === ne.PAGE_SCROLLING ? 1 : Math.round(i / c), [c, i, e]), C = W(() => r.heights.reduce((b, g) => b + g, 0) / r.heights.length || 0, [r]), p = W(() => r.widths.reduce((b, g) => b + g, 0) / r.widths.length || 0, [r]), T = W(() => {
1785
- const { rowsHeight: b, columnsWidth: g } = Tt(r, c);
1789
+ const m = W(() => e === ne.HORIZONTAL_SCROLLING || e === ne.PAGE_SCROLLING ? 1 : Math.round(i / c), [c, i, e]), P = W(() => o.heights.reduce((b, g) => b + g, 0) / o.heights.length || 0, [o]), u = W(() => o.widths.reduce((b, g) => b + g, 0) / o.widths.length || 0, [o]), T = W(() => {
1790
+ const { rowsHeight: b, columnsWidth: g } = Tt(o, c);
1786
1791
  return {
1787
1792
  rowsHeight: b,
1788
1793
  columnsWidth: g
1789
1794
  };
1790
- }, [r, c]), P = W(() => ({
1795
+ }, [o, c]), C = W(() => ({
1791
1796
  width: T.columnsWidth.reduce((b, g) => b + g, 0),
1792
1797
  height: T.rowsHeight.reduce((b, g) => b + g, 0)
1793
1798
  }), [T]);
@@ -1796,36 +1801,36 @@ const oi = () => {
1796
1801
  rowHeight: f,
1797
1802
  columnCount: c,
1798
1803
  columnWidth: d,
1799
- pageDimension: r,
1800
- estimatedRowHeight: C,
1801
- estimatedColumnWidth: p,
1804
+ pageDimension: o,
1805
+ estimatedRowHeight: P,
1806
+ estimatedColumnWidth: u,
1802
1807
  gridDimension: T,
1803
- totalDimension: P
1808
+ totalDimension: C
1804
1809
  };
1805
1810
  };
1806
- let le;
1807
- typeof window < "u" ? le = window : typeof self < "u" ? le = self : le = global;
1811
+ let ue;
1812
+ typeof window < "u" ? ue = window : typeof self < "u" ? ue = self : ue = global;
1808
1813
  let vt = null, wt = null;
1809
- const Xt = 20, ut = le.clearTimeout, Qt = le.setTimeout, pt = le.cancelAnimationFrame || le.mozCancelAnimationFrame || le.webkitCancelAnimationFrame, Yt = le.requestAnimationFrame || le.mozRequestAnimationFrame || le.webkitRequestAnimationFrame;
1810
- pt == null || Yt == null ? (vt = ut, wt = function(e) {
1811
- return Qt(e, Xt);
1814
+ const Qt = 20, ut = ue.clearTimeout, Yt = ue.setTimeout, pt = ue.cancelAnimationFrame || ue.mozCancelAnimationFrame || ue.webkitCancelAnimationFrame, Jt = ue.requestAnimationFrame || ue.mozRequestAnimationFrame || ue.webkitRequestAnimationFrame;
1815
+ pt == null || Jt == null ? (vt = ut, wt = function(e) {
1816
+ return Yt(e, Qt);
1812
1817
  }) : (vt = function([e, n]) {
1813
1818
  pt(e), ut(n);
1814
1819
  }, wt = function(e) {
1815
- const n = Yt(function() {
1816
- ut(o), e();
1817
- }), o = Qt(function() {
1820
+ const n = Jt(function() {
1821
+ ut(r), e();
1822
+ }), r = Yt(function() {
1818
1823
  pt(n), e();
1819
- }, Xt);
1820
- return [n, o];
1824
+ }, Qt);
1825
+ return [n, r];
1821
1826
  });
1822
- function ii(t) {
1823
- let e, n, o, r, i, c, l;
1827
+ function si(t) {
1828
+ let e, n, r, o, i, c, l;
1824
1829
  const d = typeof document < "u" && document.attachEvent;
1825
1830
  if (!d) {
1826
1831
  c = function(S) {
1827
- const v = S.__resizeTriggers__, h = v.firstElementChild, u = v.lastElementChild, s = h.firstElementChild;
1828
- u.scrollLeft = u.scrollWidth, u.scrollTop = u.scrollHeight, s.style.width = h.offsetWidth + 1 + "px", s.style.height = h.offsetHeight + 1 + "px", h.scrollLeft = h.scrollWidth, h.scrollTop = h.scrollHeight;
1832
+ const v = S.__resizeTriggers__, h = v.firstElementChild, p = v.lastElementChild, s = h.firstElementChild;
1833
+ p.scrollLeft = p.scrollWidth, p.scrollTop = p.scrollHeight, s.style.width = h.offsetWidth + 1 + "px", s.style.height = h.offsetHeight + 1 + "px", h.scrollLeft = h.scrollWidth, h.scrollTop = h.scrollHeight;
1829
1834
  }, i = function(S) {
1830
1835
  return S.offsetWidth !== S.__resizeLast__.width || S.offsetHeight !== S.__resizeLast__.height;
1831
1836
  }, l = function(S) {
@@ -1838,60 +1843,60 @@ function ii(t) {
1838
1843
  }));
1839
1844
  });
1840
1845
  };
1841
- let p = !1, T = "";
1842
- o = "animationstart";
1843
- const P = "Webkit Moz O ms".split(" ");
1846
+ let u = !1, T = "";
1847
+ r = "animationstart";
1848
+ const C = "Webkit Moz O ms".split(" ");
1844
1849
  let b = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), g = "";
1845
1850
  {
1846
1851
  const S = document.createElement("fakeelement");
1847
- if (S.style.animationName !== void 0 && (p = !0), p === !1) {
1848
- for (let v = 0; v < P.length; v++)
1849
- if (S.style[P[v] + "AnimationName"] !== void 0) {
1850
- g = P[v], T = "-" + g.toLowerCase() + "-", o = b[v], p = !0;
1852
+ if (S.style.animationName !== void 0 && (u = !0), u === !1) {
1853
+ for (let v = 0; v < C.length; v++)
1854
+ if (S.style[C[v] + "AnimationName"] !== void 0) {
1855
+ g = C[v], T = "-" + g.toLowerCase() + "-", r = b[v], u = !0;
1851
1856
  break;
1852
1857
  }
1853
1858
  }
1854
1859
  }
1855
- n = "resizeanim", e = "@" + T + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = T + "animation: 1ms " + n + "; ";
1860
+ n = "resizeanim", e = "@" + T + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", o = T + "animation: 1ms " + n + "; ";
1856
1861
  }
1857
- const f = function(p) {
1858
- if (!p.getElementById("detectElementResize")) {
1859
- const T = (e || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', P = p.head || p.getElementsByTagName("head")[0], b = p.createElement("style");
1860
- b.id = "detectElementResize", b.type = "text/css", t != null && b.setAttribute("nonce", t), b.styleSheet ? b.styleSheet.cssText = T : b.appendChild(p.createTextNode(T)), P.appendChild(b);
1862
+ const f = function(u) {
1863
+ if (!u.getElementById("detectElementResize")) {
1864
+ const T = (e || "") + ".resize-triggers { " + (o || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', C = u.head || u.getElementsByTagName("head")[0], b = u.createElement("style");
1865
+ b.id = "detectElementResize", b.type = "text/css", t != null && b.setAttribute("nonce", t), b.styleSheet ? b.styleSheet.cssText = T : b.appendChild(u.createTextNode(T)), C.appendChild(b);
1861
1866
  }
1862
1867
  };
1863
1868
  return {
1864
- addResizeListener: function(p, T) {
1869
+ addResizeListener: function(u, T) {
1865
1870
  if (d)
1866
- p.attachEvent("onresize", T);
1871
+ u.attachEvent("onresize", T);
1867
1872
  else {
1868
- if (!p.__resizeTriggers__) {
1869
- const P = p.ownerDocument, b = le.getComputedStyle(p);
1870
- b && b.position === "static" && (p.style.position = "relative"), f(P), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = P.createElement("div")).className = "resize-triggers";
1871
- const g = P.createElement("div");
1872
- g.className = "expand-trigger", g.appendChild(P.createElement("div"));
1873
- const S = P.createElement("div");
1874
- S.className = "contract-trigger", p.__resizeTriggers__.appendChild(g), p.__resizeTriggers__.appendChild(S), p.appendChild(p.__resizeTriggers__), c(p), p.addEventListener("scroll", l, !0), o && (p.__resizeTriggers__.__animationListener__ = function(h) {
1875
- h.animationName === n && c(p);
1876
- }, p.__resizeTriggers__.addEventListener(o, p.__resizeTriggers__.__animationListener__));
1873
+ if (!u.__resizeTriggers__) {
1874
+ const C = u.ownerDocument, b = ue.getComputedStyle(u);
1875
+ b && b.position === "static" && (u.style.position = "relative"), f(C), u.__resizeLast__ = {}, u.__resizeListeners__ = [], (u.__resizeTriggers__ = C.createElement("div")).className = "resize-triggers";
1876
+ const g = C.createElement("div");
1877
+ g.className = "expand-trigger", g.appendChild(C.createElement("div"));
1878
+ const S = C.createElement("div");
1879
+ S.className = "contract-trigger", u.__resizeTriggers__.appendChild(g), u.__resizeTriggers__.appendChild(S), u.appendChild(u.__resizeTriggers__), c(u), u.addEventListener("scroll", l, !0), r && (u.__resizeTriggers__.__animationListener__ = function(h) {
1880
+ h.animationName === n && c(u);
1881
+ }, u.__resizeTriggers__.addEventListener(r, u.__resizeTriggers__.__animationListener__));
1877
1882
  }
1878
- p.__resizeListeners__.push(T);
1883
+ u.__resizeListeners__.push(T);
1879
1884
  }
1880
1885
  },
1881
- removeResizeListener: function(p, T) {
1886
+ removeResizeListener: function(u, T) {
1882
1887
  if (d)
1883
- p.detachEvent("onresize", T);
1884
- else if (p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(T), 1), !p.__resizeListeners__.length) {
1885
- p.removeEventListener("scroll", l, !0), p.__resizeTriggers__.__animationListener__ && (p.__resizeTriggers__.removeEventListener(o, p.__resizeTriggers__.__animationListener__), p.__resizeTriggers__.__animationListener__ = null);
1888
+ u.detachEvent("onresize", T);
1889
+ else if (u.__resizeListeners__.splice(u.__resizeListeners__.indexOf(T), 1), !u.__resizeListeners__.length) {
1890
+ u.removeEventListener("scroll", l, !0), u.__resizeTriggers__.__animationListener__ && (u.__resizeTriggers__.removeEventListener(r, u.__resizeTriggers__.__animationListener__), u.__resizeTriggers__.__animationListener__ = null);
1886
1891
  try {
1887
- p.__resizeTriggers__ = !p.removeChild(p.__resizeTriggers__);
1892
+ u.__resizeTriggers__ = !u.removeChild(u.__resizeTriggers__);
1888
1893
  } catch {
1889
1894
  }
1890
1895
  }
1891
1896
  }
1892
1897
  };
1893
1898
  }
1894
- class ai extends or {
1899
+ class ci extends ao {
1895
1900
  constructor(...e) {
1896
1901
  super(...e), this.state = {
1897
1902
  height: this.props.defaultHeight || 0,
@@ -1900,28 +1905,28 @@ class ai extends or {
1900
1905
  this._timeoutId = null;
1901
1906
  const {
1902
1907
  disableHeight: n,
1903
- disableWidth: o,
1904
- onResize: r
1908
+ disableWidth: r,
1909
+ onResize: o
1905
1910
  } = this.props;
1906
1911
  if (this._parentNode) {
1907
- const i = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(i.paddingLeft || "0"), l = parseFloat(i.paddingRight || "0"), d = parseFloat(i.paddingTop || "0"), f = parseFloat(i.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), C = m.height - d - f, p = m.width - c - l;
1908
- if (!n && this.state.height !== C || !o && this.state.width !== p) {
1912
+ const i = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(i.paddingLeft || "0"), l = parseFloat(i.paddingRight || "0"), d = parseFloat(i.paddingTop || "0"), f = parseFloat(i.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), P = m.height - d - f, u = m.width - c - l;
1913
+ if (!n && this.state.height !== P || !r && this.state.width !== u) {
1909
1914
  this.setState({
1910
- height: C,
1911
- width: p
1915
+ height: P,
1916
+ width: u
1912
1917
  });
1913
1918
  const T = () => {
1914
1919
  this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
1915
1920
  };
1916
- typeof r == "function" && r({
1917
- height: C,
1918
- width: p,
1921
+ typeof o == "function" && o({
1922
+ height: P,
1923
+ width: u,
1919
1924
  // TODO Remove these params in the next major release
1920
1925
  get scaledHeight() {
1921
- return T(), C;
1926
+ return T(), P;
1922
1927
  },
1923
1928
  get scaledWidth() {
1924
- return T(), p;
1929
+ return T(), u;
1925
1930
  }
1926
1931
  });
1927
1932
  }
@@ -1936,10 +1941,10 @@ class ai extends or {
1936
1941
  } = this.props, n = this._autoSizer ? this._autoSizer.parentNode : null;
1937
1942
  if (n != null && n.ownerDocument && n.ownerDocument.defaultView && n instanceof n.ownerDocument.defaultView.HTMLElement) {
1938
1943
  this._parentNode = n;
1939
- const o = n.ownerDocument.defaultView.ResizeObserver;
1940
- o != null ? (this._resizeObserver = new o(() => {
1944
+ const r = n.ownerDocument.defaultView.ResizeObserver;
1945
+ r != null ? (this._resizeObserver = new r(() => {
1941
1946
  this._timeoutId = setTimeout(this._onResize, 0);
1942
- }), this._resizeObserver.observe(n)) : (this._detectElementResize = ii(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
1947
+ }), this._resizeObserver.observe(n)) : (this._detectElementResize = si(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
1943
1948
  }
1944
1949
  }
1945
1950
  componentWillUnmount() {
@@ -1949,42 +1954,42 @@ class ai extends or {
1949
1954
  const {
1950
1955
  children: e,
1951
1956
  defaultHeight: n,
1952
- defaultWidth: o,
1953
- disableHeight: r = !1,
1957
+ defaultWidth: r,
1958
+ disableHeight: o = !1,
1954
1959
  disableWidth: i = !1,
1955
1960
  doNotBailOutOnEmptyChildren: c = !1,
1956
1961
  nonce: l,
1957
1962
  onResize: d,
1958
1963
  style: f = {},
1959
1964
  tagName: m = "div",
1960
- ...C
1965
+ ...P
1961
1966
  } = this.props, {
1962
- height: p,
1967
+ height: u,
1963
1968
  width: T
1964
- } = this.state, P = {
1969
+ } = this.state, C = {
1965
1970
  overflow: "visible"
1966
1971
  }, b = {};
1967
1972
  let g = !1;
1968
- return r || (p === 0 && (g = !0), P.height = 0, b.height = p, b.scaledHeight = p), i || (T === 0 && (g = !0), P.width = 0, b.width = T, b.scaledWidth = T), c && (g = !1), Ve(m, {
1973
+ return o || (u === 0 && (g = !0), C.height = 0, b.height = u, b.scaledHeight = u), i || (T === 0 && (g = !0), C.width = 0, b.width = T, b.scaledWidth = T), c && (g = !1), Be(m, {
1969
1974
  ref: this._setRef,
1970
1975
  style: {
1971
- ...P,
1976
+ ...C,
1972
1977
  ...f
1973
1978
  },
1974
- ...C
1979
+ ...P
1975
1980
  }, !g && e(b));
1976
1981
  }
1977
1982
  }
1978
- const si = on(({ widths: t, heights: e }) => {
1979
- const { focusedPage: n, totalPages: o } = de(), r = W(() => {
1983
+ const li = an(({ widths: t, heights: e }) => {
1984
+ const { focusedPage: n, totalPages: r } = pe(), o = W(() => {
1980
1985
  const l = [], d = Math.ceil(n / 2) * 2 - 1;
1981
- if (l.push(d), d + 1 <= o) {
1986
+ if (l.push(d), d + 1 <= r) {
1982
1987
  const f = d + 1;
1983
1988
  l.push(f);
1984
1989
  }
1985
1990
  return l;
1986
- }, [n, o]), i = W(() => {
1987
- const l = n % 2 === 1 ? n - 1 : n - 2, d = Math.floor(l / 2), f = e(d), m = t(l), C = t(l + 1);
1991
+ }, [n, r]), i = W(() => {
1992
+ const l = n % 2 === 1 ? n - 1 : n - 2, d = Math.floor(l / 2), f = e(d), m = t(l), P = t(l + 1);
1988
1993
  return [
1989
1994
  {
1990
1995
  position: "absolute",
@@ -1995,64 +2000,64 @@ const si = on(({ widths: t, heights: e }) => {
1995
2000
  {
1996
2001
  position: "absolute",
1997
2002
  left: m,
1998
- width: C,
2003
+ width: P,
1999
2004
  height: f
2000
2005
  }
2001
2006
  ];
2002
- }, [t, e, r]), c = W(() => i.reduce((l, d) => l + Number(d.width || 0), 0), [i]);
2003
- return /* @__PURE__ */ a("div", { style: { width: c, position: "relative" }, children: r.map((l, d) => /* @__PURE__ */ a(It, { style: i[d], pageNumber: l }, l)) });
2004
- }), ci = ({ widths: t, heights: e }) => {
2005
- const { focusedPage: n } = de(), o = W(() => ({
2007
+ }, [t, e, o]), c = W(() => i.reduce((l, d) => l + Number(d.width || 0), 0), [i]);
2008
+ return /* @__PURE__ */ a("div", { style: { width: c, position: "relative" }, children: o.map((l, d) => /* @__PURE__ */ a(It, { style: i[d], pageNumber: l }, l)) });
2009
+ }), di = ({ widths: t, heights: e }) => {
2010
+ const { focusedPage: n } = pe(), r = W(() => ({
2006
2011
  position: "absolute",
2007
2012
  width: t(n - 1),
2008
2013
  height: e(n - 1)
2009
- }), [t, e, n]), r = W(() => t(n - 1), [t]);
2014
+ }), [t, e, n]), o = W(() => t(n - 1), [t]);
2010
2015
  return /* @__PURE__ */ a(
2011
2016
  "div",
2012
2017
  {
2013
2018
  style: {
2014
- width: r,
2019
+ width: o,
2015
2020
  position: "relative"
2016
2021
  },
2017
- children: /* @__PURE__ */ a(It, { style: o, pageNumber: n }, n)
2022
+ children: /* @__PURE__ */ a(It, { style: r, pageNumber: n }, n)
2018
2023
  }
2019
2024
  );
2020
- }, li = (t, e, n) => {
2021
- const o = k(), { contentRef: r } = be(), { heights: i, widths: c } = Ge(), { setFocusedPage: l } = de(), [d, f] = q([]), { targetScrollPage: m } = cn(), C = Ct(d, 0, 500), p = W(() => {
2022
- const { rowsHeight: P, columnsWidth: b } = Tt({ heights: i, widths: c }, t);
2025
+ }, ui = (t, e, n) => {
2026
+ const r = k(), { contentRef: o } = be(), { heights: i, widths: c } = Ue(), { setFocusedPage: l } = pe(), [d, f] = q([]), { targetScrollPage: m } = ln(), P = Ct(d, 0, 500), u = W(() => {
2027
+ const { rowsHeight: C, columnsWidth: b } = Tt({ heights: i, widths: c }, t);
2023
2028
  return i.map((g, S) => {
2024
- const v = c[S], h = Yr(S + 1, t), u = b.slice(0, h.columnIndex).reduce((y, x) => y + x, 0), s = P.slice(0, h.rowIndex).reduce((y, x) => y + x, 0), w = u + v, _ = s + g;
2029
+ const v = c[S], h = tr(S + 1, t), p = b.slice(0, h.columnIndex).reduce((y, x) => y + x, 0), s = C.slice(0, h.rowIndex).reduce((y, x) => y + x, 0), w = p + v, _ = s + g;
2025
2030
  return {
2026
2031
  pageNumber: S + 1,
2027
2032
  ...h,
2028
2033
  width: v,
2029
2034
  height: g,
2030
- startX: u,
2035
+ startX: p,
2031
2036
  startY: s,
2032
2037
  endX: w,
2033
2038
  endY: _
2034
2039
  };
2035
2040
  });
2036
2041
  }, [i, c, t, e]);
2037
- z(() => {
2042
+ M(() => {
2038
2043
  var b;
2039
- C.length > 0 && !m.current && l(C[0].pageNumber), ((b = C[0]) == null ? void 0 : b.ratio) && C.some((g) => g.pageNumber === m.current) && setTimeout(() => {
2044
+ P.length > 0 && !m.current && l(P[0].pageNumber), ((b = P[0]) == null ? void 0 : b.ratio) && P.some((g) => g.pageNumber === m.current) && setTimeout(() => {
2040
2045
  m.current = void 0;
2041
2046
  }, 500);
2042
- }, [C, l]);
2047
+ }, [P, l]);
2043
2048
  const T = E(
2044
- (P) => {
2045
- o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
2046
- const b = P.target, g = {
2049
+ (C) => {
2050
+ r.current && cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
2051
+ const b = C.target, g = {
2047
2052
  startTop: b.scrollTop,
2048
2053
  startLeft: b.scrollLeft,
2049
2054
  endTop: b.scrollTop + b.clientHeight,
2050
2055
  endLeft: b.scrollLeft + b.clientWidth
2051
- }, S = p.filter((v) => {
2052
- const h = v.endX >= g.startLeft && v.endY >= g.startTop, u = v.startX <= g.endLeft && v.startY <= g.endTop;
2053
- return h && u;
2056
+ }, S = u.filter((v) => {
2057
+ const h = v.endX >= g.startLeft && v.endY >= g.startTop, p = v.startX <= g.endLeft && v.startY <= g.endTop;
2058
+ return h && p;
2054
2059
  }).map((v) => {
2055
- const h = g.startLeft > v.startX ? g.startLeft : v.startX, u = g.startTop > v.startY ? g.startTop : v.startY, s = g.endLeft < v.endX ? g.endLeft : v.endX, w = g.endTop < v.endY ? g.endTop : v.endY, _ = s - h, y = w - u, I = +(_ * y / (v.width * v.height) * 100).toFixed(2);
2060
+ const h = g.startLeft > v.startX ? g.startLeft : v.startX, p = g.startTop > v.startY ? g.startTop : v.startY, s = g.endLeft < v.endX ? g.endLeft : v.endX, w = g.endTop < v.endY ? g.endTop : v.endY, _ = s - h, y = w - p, I = +(_ * y / (v.width * v.height) * 100).toFixed(2);
2056
2061
  return {
2057
2062
  pageNumber: v.pageNumber,
2058
2063
  ratio: I
@@ -2061,55 +2066,55 @@ const si = on(({ widths: t, heights: e }) => {
2061
2066
  f(S);
2062
2067
  });
2063
2068
  },
2064
- [r, p]
2069
+ [o, u]
2065
2070
  );
2066
- z(() => {
2071
+ M(() => {
2067
2072
  if (n)
2068
2073
  return n == null || n.addEventListener("scroll", T), () => {
2069
2074
  n == null || n.removeEventListener("scroll", T);
2070
2075
  };
2071
2076
  }, [n, T]);
2072
- }, Rn = et((t, e) => {
2073
- const { children: n, toolbarRef: o, style: r, className: i, ...c } = t, { customVariables: l, customDarkVariables: d } = Nr(), { darkMode: f } = lr();
2077
+ }, Ln = tt((t, e) => {
2078
+ const { children: n, toolbarRef: r, style: o, className: i, ...c } = t, { customVariables: l, customDarkVariables: d } = Mo(), { darkMode: f } = po();
2074
2079
  return /* @__PURE__ */ a(
2075
2080
  "div",
2076
2081
  {
2077
2082
  ref: e,
2078
2083
  ...c,
2079
- className: ce(
2084
+ className: de(
2080
2085
  _e["rp-theme-variables"],
2081
2086
  _e["rp-container"],
2082
2087
  f ? _e["rp-dark-mode"] : "",
2083
2088
  i
2084
2089
  ),
2085
2090
  style: {
2086
- "--rp-toolbar-height": `${(o == null ? void 0 : o.clientHeight) || 48}px`,
2091
+ "--rp-toolbar-height": `${(r == null ? void 0 : r.clientHeight) || 48}px`,
2087
2092
  ...l,
2088
2093
  ...f ? d : {},
2089
- ...r
2094
+ ...o
2090
2095
  },
2091
2096
  children: n
2092
2097
  }
2093
2098
  );
2094
- }), di = on(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
2095
- const r = Jr(e, t, n.columnCount);
2096
- return /* @__PURE__ */ a(It, { style: o, pageNumber: r }, r);
2097
- }, ri), ec = () => {
2098
- const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = pr(), { pagesRef: o, setPagesRef: r, setContentRef: i } = be(), { scrollToPage: c } = vn(), {
2099
+ }), pi = an(({ columnIndex: t, rowIndex: e, data: n, style: r }) => {
2100
+ const o = nr(e, t, n.columnCount);
2101
+ return /* @__PURE__ */ a(It, { style: r, pageNumber: o }, o);
2102
+ }, ii), oc = () => {
2103
+ const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = mo(), { pagesRef: r, setPagesRef: o, setContentRef: i } = be(), { scrollToPage: c } = wn(), {
2099
2104
  virtualScrollRef: l,
2100
2105
  getVirtualScrollRef: d,
2101
2106
  getPageScrollElementRef: f,
2102
2107
  getVirtualScrollableElementRef: m,
2103
- setTotalInnerDimensions: C,
2104
- virtualScrollableElementRef: p,
2108
+ setTotalInnerDimensions: P,
2109
+ virtualScrollableElementRef: u,
2105
2110
  totalInnerDimensions: T,
2106
- pageScrollElementRef: P
2107
- } = Ye(), b = k(!0), { nextPage: g, prevPage: S, setFocusedPage: v, focusedPage: h } = de(), { scrollMode: u } = Ne(), { viewMode: s } = Fe(), w = k(null), { loading: _, error: y } = re(), { passwordRequired: x } = cr(), { LoaderImageComponent: I } = bt(), R = k(
2111
+ pageScrollElementRef: C
2112
+ } = Je(), b = k(!0), { nextPage: g, prevPage: S, setFocusedPage: v, focusedPage: h } = pe(), { scrollMode: p } = Ee(), { viewMode: s } = ze(), w = k(null), { loading: _, error: y } = oe(), { passwordRequired: x } = uo(), { LoaderImageComponent: I } = bt(), R = k(
2108
2113
  T
2109
2114
  ), L = k({
2110
2115
  viewMode: s,
2111
- scrollMode: u
2112
- }), N = k(!1), F = k(), { isFullScreen: M } = hr(), {
2116
+ scrollMode: p
2117
+ }), N = k(!1), F = k(), { isFullScreen: z } = go(), {
2113
2118
  pageDimension: D,
2114
2119
  rowCount: O,
2115
2120
  rowHeight: A,
@@ -2117,125 +2122,130 @@ const si = on(({ widths: t, heights: e }) => {
2117
2122
  columnWidth: U,
2118
2123
  estimatedColumnWidth: B,
2119
2124
  estimatedRowHeight: V,
2120
- totalDimension: ee
2121
- } = oi(), G = Ct(T, 100), Z = k();
2122
- li(H, O, p);
2123
- const Y = k({
2125
+ totalDimension: J
2126
+ } = ai(), G = Ct(T, 100), { onScroll: K } = xo(), Y = k();
2127
+ ui(H, O, u);
2128
+ const ee = k({
2124
2129
  scrollTop: 0,
2125
2130
  scrollLeft: 0
2126
2131
  });
2127
- no(o);
2128
- const { isPressed: oe } = eo(), { selectionMode: ae } = ur(), { initializeGrabScroll: ie, resetGrabState: ue } = to({
2129
- isPressed: oe
2130
- }), J = W(() => ae === ar.HAND, [ae]), me = W(() => ({
2132
+ ir(r);
2133
+ const { isPressed: re } = or(), { selectionMode: ie } = fo(), { initializeGrabScroll: se, resetGrabState: ce } = rr({
2134
+ isPressed: re
2135
+ }), ae = W(() => ie === co.HAND, [ie]), Fe = W(() => ({
2131
2136
  columnCount: H
2132
- }), [H]), ye = E(
2137
+ }), [H]), ke = E(
2133
2138
  (j) => {
2134
- const K = document.activeElement !== o;
2135
- !M && K || (["ArrowUp", "ArrowLeft"].includes(j.key) ? (j.preventDefault(), S()) : ["ArrowDown", "ArrowRight"].includes(j.key) && (j.preventDefault(), g()));
2139
+ const Z = document.activeElement !== r;
2140
+ !z && Z || (["ArrowUp", "ArrowLeft"].includes(j.key) ? (j.preventDefault(), S()) : ["ArrowDown", "ArrowRight"].includes(j.key) && (j.preventDefault(), g()));
2136
2141
  },
2137
- [g, S, M, u]
2142
+ [g, S, z, p]
2138
2143
  );
2139
- z(() => (window.addEventListener("keydown", ye), () => {
2140
- window.removeEventListener("keydown", ye);
2141
- }), [ye]), z(() => {
2144
+ M(() => (window.addEventListener("keydown", ke), () => {
2145
+ window.removeEventListener("keydown", ke);
2146
+ }), [ke]), M(() => {
2142
2147
  if (w.current && (w.current.style.position = "relative"), !!l)
2143
2148
  for (let j = 0; j < O; j++)
2144
- for (let K = 0; K < H; K++)
2149
+ for (let Z = 0; Z < H; Z++)
2145
2150
  l.resetAfterIndices({
2146
- columnIndex: K,
2151
+ columnIndex: Z,
2147
2152
  rowIndex: j,
2148
2153
  shouldForceUpdate: !0
2149
2154
  });
2150
2155
  }, [O, H, D, l]);
2151
- const rt = E(
2152
- (j, K) => {
2153
- if (!p)
2156
+ const Qn = E(
2157
+ (j, Z) => {
2158
+ if (!u)
2154
2159
  return { scrollTop: 0, scrollLeft: 0 };
2155
- const Se = Y.current.scrollTop > K, Ie = Y.current.scrollLeft > j;
2156
- return Se || Ie ? Y.current : {
2157
- scrollTop: p.scrollTop,
2158
- scrollLeft: p.scrollLeft
2160
+ const ye = ee.current.scrollTop > Z, Se = ee.current.scrollLeft > j;
2161
+ return ye || Se ? ee.current : {
2162
+ scrollTop: u.scrollTop,
2163
+ scrollLeft: u.scrollLeft
2159
2164
  };
2160
2165
  },
2161
- [p]
2166
+ [u]
2162
2167
  ), Et = E(
2163
- (j, K) => {
2164
- if (L.current.viewMode !== s || L.current.scrollMode !== u) {
2165
- Z.current && clearTimeout(Z.current), N.current = !0, c(h, "auto"), Z.current = setTimeout(() => {
2168
+ (j, Z) => {
2169
+ if (L.current.viewMode !== s || L.current.scrollMode !== p) {
2170
+ Y.current && clearTimeout(Y.current), N.current = !0, c(h, "auto"), Y.current = setTimeout(() => {
2166
2171
  requestAnimationFrame(() => {
2167
- L.current = { viewMode: s, scrollMode: u };
2172
+ L.current = { viewMode: s, scrollMode: p };
2168
2173
  });
2169
2174
  }, 100);
2170
2175
  return;
2171
2176
  }
2172
- const Ie = j.scrollTop, ot = j.scrollLeft;
2173
- if (!K.height || !K.width)
2177
+ const Se = j.scrollTop, rt = j.scrollLeft;
2178
+ if (!Z.height || !Z.width)
2174
2179
  return;
2175
2180
  N.current = !0;
2176
- const { height: xe, width: it } = K, { height: Nt, width: Ot } = R.current;
2177
- if (Nt === xe && Ot === it)
2181
+ const { height: Ie, width: it } = Z, { height: Nt, width: Ot } = R.current;
2182
+ if (Nt === Ie && Ot === it)
2178
2183
  return;
2179
- const Jn = Ie / Nt * xe, er = ot / Ot * it, tr = Math.round(Math.min(Jn, xe)) || 0, nr = Math.round(Math.min(er, it)) || 0;
2184
+ const to = Se / Nt * Ie, no = rt / Ot * it, oo = Math.round(Math.min(to, Ie)) || 0, ro = Math.round(Math.min(no, it)) || 0;
2180
2185
  F.current = setTimeout(() => {
2181
2186
  requestAnimationFrame(() => {
2182
- p == null || p.scrollTo({
2183
- top: tr,
2184
- left: nr,
2187
+ u == null || u.scrollTo({
2188
+ top: oo,
2189
+ left: ro,
2185
2190
  behavior: "auto"
2186
2191
  });
2187
2192
  });
2188
2193
  }, 0), R.current = {
2189
- height: K.height,
2190
- width: K.width
2194
+ height: Z.height,
2195
+ width: Z.width
2191
2196
  };
2192
2197
  },
2193
- [p, s, u, c]
2198
+ [u, s, p, c]
2194
2199
  );
2195
- z(() => {
2200
+ M(() => {
2196
2201
  clearTimeout(F.current);
2197
2202
  const j = Array.from({ length: O }).reduce(
2198
- (Ie, ot, xe) => Ie + A(xe),
2203
+ (Se, rt, Ie) => Se + A(Ie),
2199
2204
  0
2200
- ), K = Array.from({ length: H }).reduce(
2201
- (Ie, ot, xe) => Ie + U(xe),
2205
+ ), Z = Array.from({ length: H }).reduce(
2206
+ (Se, rt, Ie) => Se + U(Ie),
2202
2207
  0
2203
- ), Se = rt(K, j);
2204
- Y.current = Se, Et(Se, { height: j, width: K }), C({
2208
+ ), ye = Qn(Z, j);
2209
+ ee.current = ye, Et(ye, { height: j, width: Z }), P({
2205
2210
  height: j,
2206
- width: K
2211
+ width: Z
2207
2212
  });
2208
2213
  }, [D, O, H, Et]);
2209
- const Xn = E(
2214
+ const Yn = E(
2210
2215
  (j) => {
2211
- Y.current = {
2216
+ ee.current = {
2212
2217
  scrollTop: j.scrollTop,
2213
2218
  scrollLeft: j.scrollLeft
2214
2219
  };
2215
2220
  },
2216
- [p]
2221
+ [u]
2217
2222
  );
2218
- z(() => () => {
2219
- Z.current && clearTimeout(Z.current);
2223
+ M(() => {
2224
+ if (K)
2225
+ return C && C.addEventListener("scroll", K), u && u.addEventListener("scroll", K), () => {
2226
+ C == null || C.removeEventListener("scroll", K), u == null || u.removeEventListener("scroll", K);
2227
+ };
2228
+ }, [u, C, K]), M(() => () => {
2229
+ Y.current && clearTimeout(Y.current);
2220
2230
  }, []);
2221
- const Qn = W(() => ce(se["rp-pages-container"], {
2222
- [se["rp-cursor-grab"]]: J && !oe,
2223
- [se["rp-cursor-grabbing"]]: J && oe
2224
- }), [J, oe]), Yn = E(
2231
+ const Jn = W(() => de(le["rp-pages-container"], {
2232
+ [le["rp-cursor-grab"]]: ae && !re,
2233
+ [le["rp-cursor-grabbing"]]: ae && re
2234
+ }), [ae, re]), eo = E(
2225
2235
  (j) => {
2226
- if (J && j) {
2227
- const K = ce(se["rp-pages"]), Se = document.querySelector(`.${K}`);
2228
- ie(Se);
2236
+ if (ae && j) {
2237
+ const Z = de(le["rp-pages"]), ye = document.querySelector(`.${Z}`);
2238
+ se(ye);
2229
2239
  }
2230
2240
  },
2231
- [J, ie, se]
2241
+ [ae, se, le]
2232
2242
  );
2233
- return z(() => {
2234
- _ && ue();
2235
- }, [_]), z(() => {
2243
+ return M(() => {
2244
+ _ && ce();
2245
+ }, [_]), M(() => {
2236
2246
  if (!(G.height === 0 || !b.current)) {
2237
2247
  if (e === ne.PAGE_SCROLLING) {
2238
- t !== h && P && v(t), b.current = !1;
2248
+ t !== h && C && v(t), b.current = !1;
2239
2249
  return;
2240
2250
  }
2241
2251
  c(t, "auto"), v(t), b.current = !1;
@@ -2243,57 +2253,57 @@ const si = on(({ widths: t, heights: e }) => {
2243
2253
  }, [
2244
2254
  c,
2245
2255
  e,
2246
- P,
2256
+ C,
2247
2257
  v,
2248
2258
  G
2249
- ]), /* @__PURE__ */ $(he, { children: [
2250
- /* @__PURE__ */ a(Er, { ref: i, children: /* @__PURE__ */ a(
2251
- Rn,
2259
+ ]), /* @__PURE__ */ $(fe, { children: [
2260
+ /* @__PURE__ */ a(Ao, { ref: i, children: /* @__PURE__ */ a(
2261
+ Ln,
2252
2262
  {
2253
2263
  id: n,
2254
- ref: r,
2264
+ ref: o,
2255
2265
  tabIndex: -1,
2256
- className: Qn,
2257
- children: /* @__PURE__ */ a(ai, { style: { minHeight: "50px" }, children: ({ width: j, height: K }) => /* @__PURE__ */ a("div", { "data-rp": "pages", ref: Yn, style: { width: j, height: K }, children: u === ne.PAGE_SCROLLING ? /* @__PURE__ */ a(
2266
+ className: Jn,
2267
+ children: /* @__PURE__ */ a(ci, { style: { minHeight: "50px" }, children: ({ width: j, height: Z }) => /* @__PURE__ */ a("div", { "data-rp": "pages", ref: eo, style: { width: j, height: Z }, children: p === ne.PAGE_SCROLLING ? /* @__PURE__ */ a(
2258
2268
  "div",
2259
2269
  {
2260
2270
  ref: f,
2261
- style: { width: j, height: K },
2262
- className: ce(se["rp-pages"], se["rp-page-scrolling-wrapper"]),
2263
- children: s === Le.DUAL_PAGE ? /* @__PURE__ */ a(si, { widths: U, heights: A }) : /* @__PURE__ */ a(ci, { widths: U, heights: A })
2271
+ style: { width: j, height: Z },
2272
+ className: de(le["rp-pages"], le["rp-page-scrolling-wrapper"]),
2273
+ children: s === Re.DUAL_PAGE ? /* @__PURE__ */ a(li, { widths: U, heights: A }) : /* @__PURE__ */ a(di, { widths: U, heights: A })
2264
2274
  }
2265
2275
  ) : V ? /* @__PURE__ */ a(
2266
- ei,
2276
+ ni,
2267
2277
  {
2268
2278
  ref: d,
2269
- itemData: me,
2279
+ itemData: Fe,
2270
2280
  outerRef: m,
2271
2281
  innerRef: w,
2272
- onScroll: Xn,
2282
+ onScroll: Yn,
2273
2283
  columnCount: H,
2274
2284
  columnWidth: U,
2275
2285
  rowHeight: A,
2276
- height: K,
2286
+ height: Z,
2277
2287
  width: j,
2278
2288
  estimatedColumnWidth: B,
2279
2289
  estimatedRowHeight: V,
2280
2290
  rowCount: O,
2281
- className: ce(
2282
- se["rp-pages"],
2283
- u === ne.HORIZONTAL_SCROLLING ? se["rp-pages-horizontal-scroll"] : ""
2291
+ className: de(
2292
+ le["rp-pages"],
2293
+ p === ne.HORIZONTAL_SCROLLING ? le["rp-pages-horizontal-scroll"] : ""
2284
2294
  ),
2285
2295
  style: {
2286
- "--rp-pages-height": `${ee.height}px`,
2287
- "--rp-pages-width": `${ee.width}px`,
2296
+ "--rp-pages-height": `${J.height}px`,
2297
+ "--rp-pages-width": `${J.width}px`,
2288
2298
  "--rp-row-count": `${O}`,
2289
2299
  "--rp-column-count": `${H}`
2290
2300
  },
2291
- children: di
2301
+ children: pi
2292
2302
  }
2293
2303
  ) : !_ && !y ? /* @__PURE__ */ a(
2294
2304
  "div",
2295
2305
  {
2296
- className: se["rp-loader"],
2306
+ className: le["rp-loader"],
2297
2307
  style: {
2298
2308
  display: "flex",
2299
2309
  justifyContent: "center",
@@ -2303,7 +2313,7 @@ const si = on(({ widths: t, heights: e }) => {
2303
2313
  },
2304
2314
  children: I && /* @__PURE__ */ a(I, {})
2305
2315
  }
2306
- ) : y === sr.NOT_SUPPORTED ? /* @__PURE__ */ a("div", { className: se["rp-not-supported"], children: /* @__PURE__ */ $("div", { className: se["rp-not-supported-content"], children: [
2316
+ ) : y === lo.NOT_SUPPORTED ? /* @__PURE__ */ a("div", { className: le["rp-not-supported"], children: /* @__PURE__ */ $("div", { className: le["rp-not-supported-content"], children: [
2307
2317
  "React PDF is unable to render on this browser. Please use the supported browsers from the list below:",
2308
2318
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ $("ul", { children: [
2309
2319
  /* @__PURE__ */ a("li", { children: "Chrome 110+" }),
@@ -2316,9 +2326,9 @@ const si = on(({ widths: t, heights: e }) => {
2316
2326
  ] }) }) : null }) })
2317
2327
  }
2318
2328
  ) }),
2319
- x && /* @__PURE__ */ a(ro, {})
2329
+ x && /* @__PURE__ */ a(ar, {})
2320
2330
  ] });
2321
- }, ke = {
2331
+ }, We = {
2322
2332
  "rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
2323
2333
  "rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
2324
2334
  "rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
@@ -2328,20 +2338,20 @@ const si = on(({ widths: t, heights: e }) => {
2328
2338
  "rp-paginate": "_rp-paginate_1gck0_1",
2329
2339
  "rp-page-input": "_rp-page-input_1gck0_6",
2330
2340
  "rp-total-page": "_rp-total-page_1gck0_18"
2331
- }, ui = () => {
2341
+ }, hi = () => {
2332
2342
  const { prevIcon: t } = Pe(), { prevIcon: e } = Te();
2333
- return t || e || /* @__PURE__ */ a(Ze, {});
2334
- }, pi = () => {
2343
+ return t || e || /* @__PURE__ */ a(Xe, {});
2344
+ }, fi = () => {
2335
2345
  const { nextIcon: t } = Pe(), { nextIcon: e } = Te();
2336
- return t || e || /* @__PURE__ */ a(Ze, { style: { transform: "rotate(180deg" } });
2337
- }, hi = () => {
2338
- const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: i } = de(), [c, l] = q(t.toString()), { pageNavigationTool: d = !0 } = Ce(), { pageNavigationTool: f = !0 } = Oe(), { isSmallScreen: m } = De(), { viewMode: C } = Fe(), { scrollMode: p } = Ne(), { localeMessages: T } = fe();
2339
- z(() => {
2346
+ return t || e || /* @__PURE__ */ a(Xe, { style: { transform: "rotate(180deg" } });
2347
+ }, mi = () => {
2348
+ const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: i } = pe(), [c, l] = q(t.toString()), { pageNavigationTool: d = !0 } = Ce(), { pageNavigationTool: f = !0 } = Ne(), { isSmallScreen: m } = Oe(), { viewMode: P } = ze(), { scrollMode: u } = Ee(), { localeMessages: T } = me();
2349
+ M(() => {
2340
2350
  l(t.toString());
2341
2351
  }, [t]);
2342
- const P = E((h) => {
2343
- const u = h.target.value;
2344
- l(u);
2352
+ const C = E((h) => {
2353
+ const p = h.target.value;
2354
+ l(p);
2345
2355
  }, []), b = E(async () => {
2346
2356
  const h = i(c);
2347
2357
  h.success || l(h.currentPage.toString());
@@ -2352,14 +2362,14 @@ const si = on(({ widths: t, heights: e }) => {
2352
2362
  h.key === "Enter" && b();
2353
2363
  },
2354
2364
  [b]
2355
- ), v = W(() => C === Le.DUAL_PAGE && p === ne.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, C, p]);
2365
+ ), v = W(() => P === Re.DUAL_PAGE && u === ne.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, P, u]);
2356
2366
  return !d || !f ? null : typeof d != "boolean" ? /* @__PURE__ */ a(
2357
2367
  d,
2358
2368
  {
2359
2369
  total: e,
2360
2370
  current: t,
2361
- nextPage: o,
2362
- prevPage: r,
2371
+ nextPage: r,
2372
+ prevPage: o,
2363
2373
  goToPage: i,
2364
2374
  changePage: n
2365
2375
  }
@@ -2368,8 +2378,8 @@ const si = on(({ widths: t, heights: e }) => {
2368
2378
  {
2369
2379
  total: e,
2370
2380
  current: t,
2371
- nextPage: o,
2372
- prevPage: r,
2381
+ nextPage: r,
2382
+ prevPage: o,
2373
2383
  goToPage: i,
2374
2384
  changePage: n
2375
2385
  }
@@ -2377,18 +2387,18 @@ const si = on(({ widths: t, heights: e }) => {
2377
2387
  !m && /* @__PURE__ */ a(Q, { content: T == null ? void 0 : T.previousPageTooltip, children: /* @__PURE__ */ a(
2378
2388
  we,
2379
2389
  {
2380
- onClick: r,
2390
+ onClick: o,
2381
2391
  "aria-label": T == null ? void 0 : T.previousPageTooltip,
2382
2392
  "aria-disabled": t === 1,
2383
- children: /* @__PURE__ */ a(ui, {})
2393
+ children: /* @__PURE__ */ a(hi, {})
2384
2394
  }
2385
2395
  ) }),
2386
2396
  /* @__PURE__ */ a(Q, { content: T == null ? void 0 : T.currentPageTooltip, children: /* @__PURE__ */ a(
2387
- an,
2397
+ sn,
2388
2398
  {
2389
2399
  onKeyDown: S,
2390
2400
  onBlur: g,
2391
- onChange: P,
2401
+ onChange: C,
2392
2402
  value: c,
2393
2403
  className: ht["rp-page-input"],
2394
2404
  id: "page-input",
@@ -2402,30 +2412,30 @@ const si = on(({ widths: t, heights: e }) => {
2402
2412
  !m && /* @__PURE__ */ a(Q, { content: T == null ? void 0 : T.nextPageTooltip, children: /* @__PURE__ */ a(
2403
2413
  we,
2404
2414
  {
2405
- onClick: o,
2415
+ onClick: r,
2406
2416
  "aria-label": T == null ? void 0 : T.nextPageTooltip,
2407
2417
  "aria-disabled": v,
2408
- children: /* @__PURE__ */ a(pi, {})
2418
+ children: /* @__PURE__ */ a(fi, {})
2409
2419
  }
2410
2420
  ) })
2411
2421
  ] });
2412
2422
  };
2413
- var nt = "Dialog", [Ln, tc] = lo(nt), [fi, pe] = Ln(nt), En = (t) => {
2423
+ var ot = "Dialog", [En, rc] = pr(ot), [gi, he] = En(ot), Nn = (t) => {
2414
2424
  const {
2415
2425
  __scopeDialog: e,
2416
2426
  children: n,
2417
- open: o,
2418
- defaultOpen: r,
2427
+ open: r,
2428
+ defaultOpen: o,
2419
2429
  onOpenChange: i,
2420
2430
  modal: c = !0
2421
- } = t, l = X.useRef(null), d = X.useRef(null), [f, m] = po({
2422
- prop: o,
2423
- defaultProp: r ?? !1,
2431
+ } = t, l = X.useRef(null), d = X.useRef(null), [f, m] = fr({
2432
+ prop: r,
2433
+ defaultProp: o ?? !1,
2424
2434
  onChange: i,
2425
- caller: nt
2435
+ caller: ot
2426
2436
  });
2427
2437
  return /* @__PURE__ */ a(
2428
- fi,
2438
+ gi,
2429
2439
  {
2430
2440
  scope: e,
2431
2441
  triggerRef: l,
@@ -2435,104 +2445,104 @@ var nt = "Dialog", [Ln, tc] = lo(nt), [fi, pe] = Ln(nt), En = (t) => {
2435
2445
  descriptionId: st(),
2436
2446
  open: f,
2437
2447
  onOpenChange: m,
2438
- onOpenToggle: X.useCallback(() => m((C) => !C), [m]),
2448
+ onOpenToggle: X.useCallback(() => m((P) => !P), [m]),
2439
2449
  modal: c,
2440
2450
  children: n
2441
2451
  }
2442
2452
  );
2443
2453
  };
2444
- En.displayName = nt;
2445
- var Nn = "DialogTrigger", mi = X.forwardRef(
2454
+ Nn.displayName = ot;
2455
+ var On = "DialogTrigger", vi = X.forwardRef(
2446
2456
  (t, e) => {
2447
- const { __scopeDialog: n, ...o } = t, r = pe(Nn, n), i = Pt(e, r.triggerRef);
2457
+ const { __scopeDialog: n, ...r } = t, o = he(On, n), i = Pt(e, o.triggerRef);
2448
2458
  return /* @__PURE__ */ a(
2449
- Ue.button,
2459
+ Ve.button,
2450
2460
  {
2451
2461
  type: "button",
2452
2462
  "aria-haspopup": "dialog",
2453
- "aria-expanded": r.open,
2454
- "aria-controls": r.contentId,
2455
- "data-state": Lt(r.open),
2456
- ...o,
2463
+ "aria-expanded": o.open,
2464
+ "aria-controls": o.contentId,
2465
+ "data-state": Lt(o.open),
2466
+ ...r,
2457
2467
  ref: i,
2458
- onClick: He(t.onClick, r.onOpenToggle)
2468
+ onClick: $e(t.onClick, o.onOpenToggle)
2459
2469
  }
2460
2470
  );
2461
2471
  }
2462
2472
  );
2463
- mi.displayName = Nn;
2464
- var xt = "DialogPortal", [gi, On] = Ln(xt, {
2473
+ vi.displayName = On;
2474
+ var xt = "DialogPortal", [wi, Dn] = En(xt, {
2465
2475
  forceMount: void 0
2466
- }), Dn = (t) => {
2467
- const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, i = pe(xt, e);
2468
- return /* @__PURE__ */ a(gi, { scope: e, forceMount: n, children: X.Children.map(o, (c) => /* @__PURE__ */ a(yt, { present: n || i.open, children: /* @__PURE__ */ a(_o, { asChild: !0, container: r, children: c }) })) });
2476
+ }), An = (t) => {
2477
+ const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, i = he(xt, e);
2478
+ return /* @__PURE__ */ a(wi, { scope: e, forceMount: n, children: X.Children.map(r, (c) => /* @__PURE__ */ a(yt, { present: n || i.open, children: /* @__PURE__ */ a(Tr, { asChild: !0, container: o, children: c }) })) });
2469
2479
  };
2470
- Dn.displayName = xt;
2471
- var Qe = "DialogOverlay", An = X.forwardRef(
2480
+ An.displayName = xt;
2481
+ var Ye = "DialogOverlay", Mn = X.forwardRef(
2472
2482
  (t, e) => {
2473
- const n = On(Qe, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, i = pe(Qe, t.__scopeDialog);
2474
- return i.modal ? /* @__PURE__ */ a(yt, { present: o || i.open, children: /* @__PURE__ */ a(wi, { ...r, ref: e }) }) : null;
2483
+ const n = Dn(Ye, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i = he(Ye, t.__scopeDialog);
2484
+ return i.modal ? /* @__PURE__ */ a(yt, { present: r || i.open, children: /* @__PURE__ */ a(bi, { ...o, ref: e }) }) : null;
2475
2485
  }
2476
2486
  );
2477
- An.displayName = Qe;
2478
- var vi = ho("DialogOverlay.RemoveScroll"), wi = X.forwardRef(
2487
+ Mn.displayName = Ye;
2488
+ var _i = mr("DialogOverlay.RemoveScroll"), bi = X.forwardRef(
2479
2489
  (t, e) => {
2480
- const { __scopeDialog: n, ...o } = t, r = pe(Qe, n);
2490
+ const { __scopeDialog: n, ...r } = t, o = he(Ye, n);
2481
2491
  return (
2482
2492
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2483
2493
  // ie. when `Overlay` and `Content` are siblings
2484
- /* @__PURE__ */ a(mo, { as: vi, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ a(
2485
- Ue.div,
2494
+ /* @__PURE__ */ a(vr, { as: _i, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ a(
2495
+ Ve.div,
2486
2496
  {
2487
- "data-state": Lt(r.open),
2488
- ...o,
2497
+ "data-state": Lt(o.open),
2498
+ ...r,
2489
2499
  ref: e,
2490
- style: { pointerEvents: "auto", ...o.style }
2500
+ style: { pointerEvents: "auto", ...r.style }
2491
2501
  }
2492
2502
  ) })
2493
2503
  );
2494
2504
  }
2495
- ), Ee = "DialogContent", zn = X.forwardRef(
2505
+ ), Le = "DialogContent", zn = X.forwardRef(
2496
2506
  (t, e) => {
2497
- const n = On(Ee, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, i = pe(Ee, t.__scopeDialog);
2498
- return /* @__PURE__ */ a(yt, { present: o || i.open, children: i.modal ? /* @__PURE__ */ a(_i, { ...r, ref: e }) : /* @__PURE__ */ a(bi, { ...r, ref: e }) });
2507
+ const n = Dn(Le, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i = he(Le, t.__scopeDialog);
2508
+ return /* @__PURE__ */ a(yt, { present: r || i.open, children: i.modal ? /* @__PURE__ */ a(Ti, { ...o, ref: e }) : /* @__PURE__ */ a(Ci, { ...o, ref: e }) });
2499
2509
  }
2500
2510
  );
2501
- zn.displayName = Ee;
2502
- var _i = X.forwardRef(
2511
+ zn.displayName = Le;
2512
+ var Ti = X.forwardRef(
2503
2513
  (t, e) => {
2504
- const n = pe(Ee, t.__scopeDialog), o = X.useRef(null), r = Pt(e, n.contentRef, o);
2514
+ const n = he(Le, t.__scopeDialog), r = X.useRef(null), o = Pt(e, n.contentRef, r);
2505
2515
  return X.useEffect(() => {
2506
- const i = o.current;
2516
+ const i = r.current;
2507
2517
  if (i)
2508
- return go(i);
2518
+ return wr(i);
2509
2519
  }, []), /* @__PURE__ */ a(
2510
- Mn,
2520
+ Fn,
2511
2521
  {
2512
2522
  ...t,
2513
- ref: r,
2523
+ ref: o,
2514
2524
  trapFocus: n.open,
2515
2525
  disableOutsidePointerEvents: !0,
2516
- onCloseAutoFocus: He(t.onCloseAutoFocus, (i) => {
2526
+ onCloseAutoFocus: $e(t.onCloseAutoFocus, (i) => {
2517
2527
  var c;
2518
2528
  i.preventDefault(), (c = n.triggerRef.current) == null || c.focus();
2519
2529
  }),
2520
- onPointerDownOutside: He(t.onPointerDownOutside, (i) => {
2530
+ onPointerDownOutside: $e(t.onPointerDownOutside, (i) => {
2521
2531
  const c = i.detail.originalEvent, l = c.button === 0 && c.ctrlKey === !0;
2522
2532
  (c.button === 2 || l) && i.preventDefault();
2523
2533
  }),
2524
- onFocusOutside: He(
2534
+ onFocusOutside: $e(
2525
2535
  t.onFocusOutside,
2526
2536
  (i) => i.preventDefault()
2527
2537
  )
2528
2538
  }
2529
2539
  );
2530
2540
  }
2531
- ), bi = X.forwardRef(
2541
+ ), Ci = X.forwardRef(
2532
2542
  (t, e) => {
2533
- const n = pe(Ee, t.__scopeDialog), o = X.useRef(!1), r = X.useRef(!1);
2543
+ const n = he(Le, t.__scopeDialog), r = X.useRef(!1), o = X.useRef(!1);
2534
2544
  return /* @__PURE__ */ a(
2535
- Mn,
2545
+ Fn,
2536
2546
  {
2537
2547
  ...t,
2538
2548
  ref: e,
@@ -2540,31 +2550,31 @@ var _i = X.forwardRef(
2540
2550
  disableOutsidePointerEvents: !1,
2541
2551
  onCloseAutoFocus: (i) => {
2542
2552
  var c, l;
2543
- (c = t.onCloseAutoFocus) == null || c.call(t, i), i.defaultPrevented || (o.current || (l = n.triggerRef.current) == null || l.focus(), i.preventDefault()), o.current = !1, r.current = !1;
2553
+ (c = t.onCloseAutoFocus) == null || c.call(t, i), i.defaultPrevented || (r.current || (l = n.triggerRef.current) == null || l.focus(), i.preventDefault()), r.current = !1, o.current = !1;
2544
2554
  },
2545
2555
  onInteractOutside: (i) => {
2546
2556
  var d, f;
2547
- (d = t.onInteractOutside) == null || d.call(t, i), i.defaultPrevented || (o.current = !0, i.detail.originalEvent.type === "pointerdown" && (r.current = !0));
2557
+ (d = t.onInteractOutside) == null || d.call(t, i), i.defaultPrevented || (r.current = !0, i.detail.originalEvent.type === "pointerdown" && (o.current = !0));
2548
2558
  const c = i.target;
2549
- ((f = n.triggerRef.current) == null ? void 0 : f.contains(c)) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && r.current && i.preventDefault();
2559
+ ((f = n.triggerRef.current) == null ? void 0 : f.contains(c)) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && o.current && i.preventDefault();
2550
2560
  }
2551
2561
  }
2552
2562
  );
2553
2563
  }
2554
- ), Mn = X.forwardRef(
2564
+ ), Fn = X.forwardRef(
2555
2565
  (t, e) => {
2556
- const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: i, ...c } = t, l = pe(Ee, n), d = X.useRef(null), f = Pt(e, d);
2557
- return vo(), /* @__PURE__ */ $(he, { children: [
2566
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...c } = t, l = he(Le, n), d = X.useRef(null), f = Pt(e, d);
2567
+ return _r(), /* @__PURE__ */ $(fe, { children: [
2558
2568
  /* @__PURE__ */ a(
2559
- wo,
2569
+ br,
2560
2570
  {
2561
2571
  asChild: !0,
2562
2572
  loop: !0,
2563
- trapped: o,
2564
- onMountAutoFocus: r,
2573
+ trapped: r,
2574
+ onMountAutoFocus: o,
2565
2575
  onUnmountAutoFocus: i,
2566
2576
  children: /* @__PURE__ */ a(
2567
- fo,
2577
+ gr,
2568
2578
  {
2569
2579
  role: "dialog",
2570
2580
  id: l.contentId,
@@ -2578,50 +2588,50 @@ var _i = X.forwardRef(
2578
2588
  )
2579
2589
  }
2580
2590
  ),
2581
- /* @__PURE__ */ $(he, { children: [
2582
- /* @__PURE__ */ a(Ci, { titleId: l.titleId }),
2583
- /* @__PURE__ */ a(yi, { contentRef: d, descriptionId: l.descriptionId })
2591
+ /* @__PURE__ */ $(fe, { children: [
2592
+ /* @__PURE__ */ a(yi, { titleId: l.titleId }),
2593
+ /* @__PURE__ */ a(Ii, { contentRef: d, descriptionId: l.descriptionId })
2584
2594
  ] })
2585
2595
  ] });
2586
2596
  }
2587
- ), Rt = "DialogTitle", Fn = X.forwardRef(
2597
+ ), Rt = "DialogTitle", kn = X.forwardRef(
2588
2598
  (t, e) => {
2589
- const { __scopeDialog: n, ...o } = t, r = pe(Rt, n);
2590
- return /* @__PURE__ */ a(Ue.h2, { id: r.titleId, ...o, ref: e });
2599
+ const { __scopeDialog: n, ...r } = t, o = he(Rt, n);
2600
+ return /* @__PURE__ */ a(Ve.h2, { id: o.titleId, ...r, ref: e });
2591
2601
  }
2592
2602
  );
2593
- Fn.displayName = Rt;
2594
- var kn = "DialogDescription", Ti = X.forwardRef(
2603
+ kn.displayName = Rt;
2604
+ var Wn = "DialogDescription", Pi = X.forwardRef(
2595
2605
  (t, e) => {
2596
- const { __scopeDialog: n, ...o } = t, r = pe(kn, n);
2597
- return /* @__PURE__ */ a(Ue.p, { id: r.descriptionId, ...o, ref: e });
2606
+ const { __scopeDialog: n, ...r } = t, o = he(Wn, n);
2607
+ return /* @__PURE__ */ a(Ve.p, { id: o.descriptionId, ...r, ref: e });
2598
2608
  }
2599
2609
  );
2600
- Ti.displayName = kn;
2601
- var Wn = "DialogClose", Hn = X.forwardRef(
2610
+ Pi.displayName = Wn;
2611
+ var Hn = "DialogClose", $n = X.forwardRef(
2602
2612
  (t, e) => {
2603
- const { __scopeDialog: n, ...o } = t, r = pe(Wn, n);
2613
+ const { __scopeDialog: n, ...r } = t, o = he(Hn, n);
2604
2614
  return /* @__PURE__ */ a(
2605
- Ue.button,
2615
+ Ve.button,
2606
2616
  {
2607
2617
  type: "button",
2608
- ...o,
2618
+ ...r,
2609
2619
  ref: e,
2610
- onClick: He(t.onClick, () => r.onOpenChange(!1))
2620
+ onClick: $e(t.onClick, () => o.onOpenChange(!1))
2611
2621
  }
2612
2622
  );
2613
2623
  }
2614
2624
  );
2615
- Hn.displayName = Wn;
2625
+ $n.displayName = Hn;
2616
2626
  function Lt(t) {
2617
2627
  return t ? "open" : "closed";
2618
2628
  }
2619
- var $n = "DialogTitleWarning", [nc, qn] = uo($n, {
2620
- contentName: Ee,
2629
+ var qn = "DialogTitleWarning", [ic, Gn] = hr(qn, {
2630
+ contentName: Le,
2621
2631
  titleName: Rt,
2622
2632
  docsSlug: "dialog"
2623
- }), Ci = ({ titleId: t }) => {
2624
- const e = qn($n), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
2633
+ }), yi = ({ titleId: t }) => {
2634
+ const e = Gn(qn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
2625
2635
 
2626
2636
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
2627
2637
 
@@ -2629,15 +2639,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
2629
2639
  return X.useEffect(() => {
2630
2640
  t && (document.getElementById(t) || console.error(n));
2631
2641
  }, [n, t]), null;
2632
- }, Pi = "DialogDescriptionWarning", yi = ({ contentRef: t, descriptionId: e }) => {
2633
- const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qn(Pi).contentName}}.`;
2642
+ }, Si = "DialogDescriptionWarning", Ii = ({ contentRef: t, descriptionId: e }) => {
2643
+ const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Gn(Si).contentName}}.`;
2634
2644
  return X.useEffect(() => {
2635
2645
  var i;
2636
- const r = (i = t.current) == null ? void 0 : i.getAttribute("aria-describedby");
2637
- e && r && (document.getElementById(e) || console.warn(o));
2638
- }, [o, t, e]), null;
2639
- }, Si = En, Ii = Dn, xi = An, Ri = zn, Li = Fn, Ei = Hn;
2640
- const Re = {
2646
+ const o = (i = t.current) == null ? void 0 : i.getAttribute("aria-describedby");
2647
+ e && o && (document.getElementById(e) || console.warn(r));
2648
+ }, [r, t, e]), null;
2649
+ }, xi = Nn, Ri = An, Li = Mn, Ei = zn, Ni = kn, Oi = $n;
2650
+ const xe = {
2641
2651
  "rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
2642
2652
  "rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
2643
2653
  "rp-document-dialog": "_rp-document-dialog_slqo7_13",
@@ -2645,8 +2655,8 @@ const Re = {
2645
2655
  "rp-dialog-title": "_rp-dialog-title_slqo7_39",
2646
2656
  "rp-dialog-close": "_rp-dialog-close_slqo7_47",
2647
2657
  "rp-properties-divider": "_rp-properties-divider_slqo7_55"
2648
- }, Ni = () => {
2649
- const { pdfProperties: t } = re(), { container: e } = be(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = Pr(), { localeMessages: r } = fe(), i = W(() => {
2658
+ }, Di = () => {
2659
+ const { pdfProperties: t } = oe(), { container: e } = be(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = Io(), { localeMessages: o } = me(), i = W(() => {
2650
2660
  if (!t)
2651
2661
  return [];
2652
2662
  const {
@@ -2655,86 +2665,86 @@ const Re = {
2655
2665
  title: d,
2656
2666
  author: f,
2657
2667
  subject: m,
2658
- createdOn: C,
2659
- creator: p,
2668
+ createdOn: P,
2669
+ creator: u,
2660
2670
  keywords: T,
2661
- modifiedOn: P,
2671
+ modifiedOn: C,
2662
2672
  pdfProducer: b,
2663
2673
  pdfVersion: g,
2664
2674
  pageCount: S
2665
2675
  } = t;
2666
2676
  return [
2667
- { label: r == null ? void 0 : r.propertiesFilenameLabel, value: l },
2668
- { label: r == null ? void 0 : r.propertiesFileSizeLabel, value: c },
2677
+ { label: o == null ? void 0 : o.propertiesFilenameLabel, value: l },
2678
+ { label: o == null ? void 0 : o.propertiesFileSizeLabel, value: c },
2669
2679
  { separate: !0 },
2670
- { label: r == null ? void 0 : r.propertiesTitleLabel, value: d },
2671
- { label: r == null ? void 0 : r.propertiesAuthorLabel, value: f },
2672
- { label: r == null ? void 0 : r.propertiesSubjectLabel, value: m },
2673
- { label: r == null ? void 0 : r.propertiesKeywordLabel, value: T },
2674
- { label: r == null ? void 0 : r.propertiesCreatorLabel, value: p },
2680
+ { label: o == null ? void 0 : o.propertiesTitleLabel, value: d },
2681
+ { label: o == null ? void 0 : o.propertiesAuthorLabel, value: f },
2682
+ { label: o == null ? void 0 : o.propertiesSubjectLabel, value: m },
2683
+ { label: o == null ? void 0 : o.propertiesKeywordLabel, value: T },
2684
+ { label: o == null ? void 0 : o.propertiesCreatorLabel, value: u },
2675
2685
  {
2676
- label: r == null ? void 0 : r.propertiesCreateOnLabel,
2677
- value: C ? Mt(C) : ""
2686
+ label: o == null ? void 0 : o.propertiesCreateOnLabel,
2687
+ value: P ? zt(P) : ""
2678
2688
  },
2679
2689
  {
2680
- label: r == null ? void 0 : r.propertiesModifiedOnLabel,
2681
- value: P ? Mt(P) : ""
2690
+ label: o == null ? void 0 : o.propertiesModifiedOnLabel,
2691
+ value: C ? zt(C) : ""
2682
2692
  },
2683
2693
  { separate: !0 },
2684
- { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: b },
2685
- { label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: g },
2686
- { label: r == null ? void 0 : r.propertiesPageCountLabel, value: S }
2694
+ { label: o == null ? void 0 : o.propertiesPDFProducerLabel, value: b },
2695
+ { label: o == null ? void 0 : o.propertiesPDFVersionLabel, value: g },
2696
+ { label: o == null ? void 0 : o.propertiesPageCountLabel, value: S }
2687
2697
  ];
2688
- }, [t, r]);
2689
- return /* @__PURE__ */ a(Si, { open: n, onOpenChange: o, children: /* @__PURE__ */ a(Ii, { container: e, children: /* @__PURE__ */ $("div", { className: Re["rp-dialog-wrapper"], children: [
2690
- /* @__PURE__ */ a(xi, { className: Re["rp-dialog-overlay"] }),
2691
- /* @__PURE__ */ $(Ri, { className: Re["rp-document-dialog"], children: [
2692
- /* @__PURE__ */ a(Li, { className: Re["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2693
- /* @__PURE__ */ a("div", { className: Re["rp-document-properties"], children: i.map((c, l) => /* @__PURE__ */ a("div", { children: c.separate ? /* @__PURE__ */ a("div", { className: Re["rp-properties-divider"] }) : /* @__PURE__ */ a(Ar, { label: c.label, value: c.value }) }, l)) }),
2694
- /* @__PURE__ */ a(Ei, { asChild: !0, className: Re["rp-dialog-close"], children: /* @__PURE__ */ a(bo, {}) })
2698
+ }, [t, o]);
2699
+ return /* @__PURE__ */ a(xi, { open: n, onOpenChange: r, children: /* @__PURE__ */ a(Ri, { container: e, children: /* @__PURE__ */ $("div", { className: xe["rp-dialog-wrapper"], children: [
2700
+ /* @__PURE__ */ a(Li, { className: xe["rp-dialog-overlay"] }),
2701
+ /* @__PURE__ */ $(Ei, { className: xe["rp-document-dialog"], children: [
2702
+ /* @__PURE__ */ a(Ni, { className: xe["rp-dialog-title"], children: o == null ? void 0 : o.documentPropertiesLabel }),
2703
+ /* @__PURE__ */ a("div", { className: xe["rp-document-properties"], children: i.map((c, l) => /* @__PURE__ */ a("div", { children: c.separate ? /* @__PURE__ */ a("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ a(ko, { label: c.label, value: c.value }) }, l)) }),
2704
+ /* @__PURE__ */ a(Oi, { asChild: !0, className: xe["rp-dialog-close"], children: /* @__PURE__ */ a(Cr, {}) })
2695
2705
  ] })
2696
2706
  ] }) }) });
2697
- }, Oi = {
2707
+ }, Ai = {
2698
2708
  "rp-other-tool-content": "_rp-other-tool-content_su718_1"
2699
- }, Jt = ".pdf", Di = (t) => URL.createObjectURL(t), Ai = async (t) => {
2709
+ }, en = ".pdf", Mi = (t) => URL.createObjectURL(t), zi = async (t) => {
2700
2710
  const n = await (await fetch(t)).blob();
2701
- return Di(n);
2702
- }, Gn = () => {
2703
- const { filename: t, pdfSrc: e } = re(), { downloadFilename: n } = _r(), o = (i) => {
2711
+ return Mi(n);
2712
+ }, Un = () => {
2713
+ const { filename: t, pdfSrc: e } = oe(), { downloadFilename: n } = Co(), r = (i) => {
2704
2714
  const c = n || i;
2705
- return c.endsWith(Jt) ? c : `${c}${Jt}`;
2715
+ return c.endsWith(en) ? c : `${c}${en}`;
2706
2716
  };
2707
2717
  return { download: E(async () => {
2708
2718
  if (!t || !e)
2709
2719
  throw new Error("There is no PDF source to download");
2710
2720
  const i = document.createElement("a");
2711
- i.href = await Ai(e), i.download = o(t), document.body.appendChild(i), i.click(), document.body.removeChild(i);
2721
+ i.href = await zi(e), i.download = r(t), document.body.appendChild(i), i.click(), document.body.removeChild(i);
2712
2722
  }, [t, e]) };
2713
- }, Un = () => {
2723
+ }, Vn = () => {
2714
2724
  const { downloadIcon: t } = Pe(), { downloadIcon: e } = Te();
2715
- return t || e || /* @__PURE__ */ a(So, {});
2716
- }, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ a(Q, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), zi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ a(Vn, { localeMessages: e, children: /* @__PURE__ */ a(we, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ a(Un, {}) }) }), Mi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ a(Xe, { onClick: t, children: /* @__PURE__ */ $(Vn, { className: "rp-menu-item", localeMessages: e, children: [
2717
- /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Un, {}) }),
2725
+ return t || e || /* @__PURE__ */ a(xr, {});
2726
+ }, Bn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ a(Q, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Fi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ a(Bn, { localeMessages: e, children: /* @__PURE__ */ a(we, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ a(Vn, {}) }) }), ki = ({ download: t, localeMessages: e }) => /* @__PURE__ */ a(Qe, { onClick: t, children: /* @__PURE__ */ $(Bn, { className: "rp-menu-item", localeMessages: e, children: [
2727
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Vn, {}) }),
2718
2728
  e == null ? void 0 : e.downloadFileLabel
2719
- ] }) }), Bn = () => {
2720
- const { download: t } = Gn(), { downloadTool: e = !0 } = Ce(), { downloadTool: n = !0 } = Oe(), { isSmallScreen: o } = De(), { localeMessages: r } = fe(), i = r == null ? void 0 : r.downloadFileTooltip;
2721
- return !e || !n ? null : o ? /* @__PURE__ */ a(Mi, { download: t, localeMessages: r }) : typeof e == "function" ? /* @__PURE__ */ a(Q, { content: i, children: /* @__PURE__ */ a(e, { download: t }) }) : typeof n == "function" ? /* @__PURE__ */ a(Q, { content: i, children: /* @__PURE__ */ a(n, { download: t }) }) : /* @__PURE__ */ a(zi, { download: t, localeMessages: r });
2722
- }, jn = () => {
2729
+ ] }) }), jn = () => {
2730
+ const { download: t } = Un(), { downloadTool: e = !0 } = Ce(), { downloadTool: n = !0 } = Ne(), { isSmallScreen: r } = Oe(), { localeMessages: o } = me(), i = o == null ? void 0 : o.downloadFileTooltip;
2731
+ return !e || !n ? null : r ? /* @__PURE__ */ a(ki, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ a(Q, { content: i, children: /* @__PURE__ */ a(e, { download: t }) }) : typeof n == "function" ? /* @__PURE__ */ a(Q, { content: i, children: /* @__PURE__ */ a(n, { download: t }) }) : /* @__PURE__ */ a(Fi, { download: t, localeMessages: o });
2732
+ }, Kn = () => {
2723
2733
  const { printIcon: t } = Pe(), { printIcon: e } = Te();
2724
- return t || e || /* @__PURE__ */ a(Io, {});
2725
- }, Kn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ a(Q, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Fi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ a(Kn, { localeMessages: e, children: /* @__PURE__ */ a(we, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ a(jn, {}) }) }), ki = ({ print: t, localeMessages: e }) => /* @__PURE__ */ a(Xe, { onClick: t, children: /* @__PURE__ */ $(Kn, { className: "rp-menu-item", localeMessages: e, children: [
2726
- /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(jn, {}) }),
2734
+ return t || e || /* @__PURE__ */ a(Rr, {});
2735
+ }, Zn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ a(Q, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Wi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ a(Zn, { localeMessages: e, children: /* @__PURE__ */ a(we, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ a(Kn, {}) }) }), Hi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ a(Qe, { onClick: t, children: /* @__PURE__ */ $(Zn, { className: "rp-menu-item", localeMessages: e, children: [
2736
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Kn, {}) }),
2727
2737
  e == null ? void 0 : e.printLabel
2728
- ] }) }), Zn = () => {
2729
- const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: i } = tt(), { printTool: c = !0 } = Ce(), { printTool: l = !0 } = Oe(), { isSmallScreen: d } = De(), { localeMessages: f } = fe(), m = f == null ? void 0 : f.printTooltip;
2730
- return !c || !l ? null : d ? /* @__PURE__ */ a(ki, { print: t, localeMessages: f }) : typeof c == "function" ? /* @__PURE__ */ a(Q, { content: m, children: /* @__PURE__ */ a(
2738
+ ] }) }), Xn = () => {
2739
+ const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: i } = nt(), { printTool: c = !0 } = Ce(), { printTool: l = !0 } = Ne(), { isSmallScreen: d } = Oe(), { localeMessages: f } = me(), m = f == null ? void 0 : f.printTooltip;
2740
+ return !c || !l ? null : d ? /* @__PURE__ */ a(Hi, { print: t, localeMessages: f }) : typeof c == "function" ? /* @__PURE__ */ a(Q, { content: m, children: /* @__PURE__ */ a(
2731
2741
  c,
2732
2742
  {
2733
2743
  print: t,
2734
2744
  cancel: e,
2735
2745
  setOnProgress: n,
2736
- setOnError: r,
2737
- setOnComplete: o,
2746
+ setOnError: o,
2747
+ setOnComplete: r,
2738
2748
  progress: i
2739
2749
  }
2740
2750
  ) }) : typeof l == "function" ? /* @__PURE__ */ a(Q, { content: m, children: /* @__PURE__ */ a(
@@ -2743,75 +2753,75 @@ const Re = {
2743
2753
  print: t,
2744
2754
  cancel: e,
2745
2755
  setOnProgress: n,
2746
- setOnError: r,
2747
- setOnComplete: o,
2756
+ setOnError: o,
2757
+ setOnComplete: r,
2748
2758
  progress: i
2749
2759
  }
2750
- ) }) : /* @__PURE__ */ a(Fi, { print: t, localeMessages: f });
2751
- }, Wi = {
2760
+ ) }) : /* @__PURE__ */ a(Wi, { print: t, localeMessages: f });
2761
+ }, $i = {
2752
2762
  "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2753
- }, Hi = () => {
2763
+ }, qi = () => {
2754
2764
  const { goToFirstPageIcon: t } = Pe(), { goToFirstPageIcon: e } = Te();
2755
- return t || e || /* @__PURE__ */ a(mn, { className: Wi["rp-go-to-Top"] });
2756
- }, $i = () => {
2765
+ return t || e || /* @__PURE__ */ a(gn, { className: $i["rp-go-to-Top"] });
2766
+ }, Gi = () => {
2757
2767
  const { goToLastPageIcon: t } = Pe(), { goToLastPageIcon: e } = Te();
2758
- return t || e || /* @__PURE__ */ a(mn, {});
2759
- }, en = { width: "100%" }, qi = () => {
2760
- const { goToPage: t, totalPages: e, focusedPage: n } = de(), { jumpNavigationTool: o = !0 } = Ce(), { jumpNavigationTool: r = !0 } = Oe(), { localeMessages: i } = fe(), c = W(() => n === 1, [n]), l = W(() => n === e, [n, e]), d = E(() => {
2768
+ return t || e || /* @__PURE__ */ a(gn, {});
2769
+ }, tn = { width: "100%" }, Ui = () => {
2770
+ const { goToPage: t, totalPages: e, focusedPage: n } = pe(), { jumpNavigationTool: r = !0 } = Ce(), { jumpNavigationTool: o = !0 } = Ne(), { localeMessages: i } = me(), c = W(() => n === 1, [n]), l = W(() => n === e, [n, e]), d = E(() => {
2761
2771
  t(1);
2762
2772
  }, [t]), f = E(() => {
2763
2773
  t(e);
2764
2774
  }, [t, e]);
2765
- return !o || !r ? null : /* @__PURE__ */ $(hn, { children: [
2766
- /* @__PURE__ */ a(Xe, { onClick: d, children: /* @__PURE__ */ a(Q, { content: i == null ? void 0 : i.firstPageTooltip, style: en, children: /* @__PURE__ */ $("div", { className: "rp-menu-item", "aria-disabled": c, children: [
2767
- /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Hi, {}) }),
2775
+ return !r || !o ? null : /* @__PURE__ */ $(fn, { children: [
2776
+ /* @__PURE__ */ a(Qe, { onClick: d, children: /* @__PURE__ */ a(Q, { content: i == null ? void 0 : i.firstPageTooltip, style: tn, children: /* @__PURE__ */ $("div", { className: "rp-menu-item", "aria-disabled": c, children: [
2777
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(qi, {}) }),
2768
2778
  /* @__PURE__ */ a("span", { children: i == null ? void 0 : i.firstPageLabel })
2769
2779
  ] }) }) }),
2770
- /* @__PURE__ */ a(Xe, { onClick: f, children: /* @__PURE__ */ a(Q, { content: i == null ? void 0 : i.lastPageTooltip, style: en, children: /* @__PURE__ */ $("div", { className: "rp-menu-item", "aria-disabled": l, children: [
2771
- /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a($i, {}) }),
2780
+ /* @__PURE__ */ a(Qe, { onClick: f, children: /* @__PURE__ */ a(Q, { content: i == null ? void 0 : i.lastPageTooltip, style: tn, children: /* @__PURE__ */ $("div", { className: "rp-menu-item", "aria-disabled": l, children: [
2781
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Gi, {}) }),
2772
2782
  /* @__PURE__ */ a("span", { children: i == null ? void 0 : i.lastPageLabel })
2773
2783
  ] }) }) }),
2774
- /* @__PURE__ */ a(un, {})
2784
+ /* @__PURE__ */ a(pn, {})
2775
2785
  ] });
2776
- }, Gi = () => {
2777
- const [t, e] = q(!1), { container: n, pagesRef: o } = be(), { isSmallScreen: r } = De(), {
2786
+ }, Vi = () => {
2787
+ const [t, e] = q(!1), { container: n, pagesRef: r } = be(), { isSmallScreen: o } = Oe(), {
2778
2788
  openFileTool: i,
2779
2789
  downloadTool: c,
2780
2790
  documentProperties: l,
2781
2791
  scrollModeTool: d,
2782
2792
  rotateTool: f,
2783
2793
  selectionModeTool: m,
2784
- jumpNavigationTool: C,
2785
- printTool: p,
2794
+ jumpNavigationTool: P,
2795
+ printTool: u,
2786
2796
  fullscreenTool: T,
2787
- viewModeTool: P
2797
+ viewModeTool: C
2788
2798
  } = Ce(), {
2789
2799
  openFileTool: b,
2790
2800
  downloadTool: g,
2791
2801
  documentProperties: S,
2792
2802
  scrollModeTool: v,
2793
2803
  rotateTool: h,
2794
- selectionModeTool: u,
2804
+ selectionModeTool: p,
2795
2805
  jumpNavigationTool: s,
2796
2806
  printTool: w,
2797
2807
  fullscreenTool: _,
2798
2808
  viewModeTool: y
2799
- } = Oe(), { localeMessages: x } = fe(), [I, R] = q(0), L = k(
2800
- new ResizeObserver((M) => {
2801
- R(M[0].contentRect.height);
2809
+ } = Ne(), { localeMessages: x } = me(), [I, R] = q(0), L = k(
2810
+ new ResizeObserver((z) => {
2811
+ R(z[0].contentRect.height);
2802
2812
  })
2803
- ), N = W(() => C || f || m || d || l || P || r && (i || c || p || T), [
2813
+ ), N = W(() => P || f || m || d || l || C || o && (i || c || u || T), [
2804
2814
  i,
2805
2815
  c,
2806
- p,
2816
+ u,
2807
2817
  T,
2808
2818
  l,
2809
2819
  d,
2810
2820
  f,
2811
2821
  m,
2812
- C,
2813
- r
2814
- ]), F = W(() => s || h || u || v || S || y || r && (b || g || w || _), [
2822
+ P,
2823
+ o
2824
+ ]), F = W(() => s || h || p || v || S || y || o && (b || g || w || _), [
2815
2825
  b,
2816
2826
  g,
2817
2827
  w,
@@ -2819,70 +2829,70 @@ const Re = {
2819
2829
  S,
2820
2830
  v,
2821
2831
  h,
2822
- u,
2832
+ p,
2823
2833
  s,
2824
- r
2834
+ o
2825
2835
  ]);
2826
- return z(() => (o && L.current.observe(o), () => {
2836
+ return M(() => (r && L.current.observe(r), () => {
2827
2837
  L.current.disconnect();
2828
- }), [o]), !N || !F ? null : /* @__PURE__ */ $(he, { children: [
2838
+ }), [r]), !N || !F ? null : /* @__PURE__ */ $(fe, { children: [
2829
2839
  /* @__PURE__ */ a(
2830
- dn,
2840
+ un,
2831
2841
  {
2832
2842
  container: n,
2833
2843
  onOpenChange: e,
2834
- triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(Q, { content: x == null ? void 0 : x.moreOptionTooltip, children: /* @__PURE__ */ a(we, { active: t, "aria-label": x == null ? void 0 : x.moreOptionTooltip, children: /* @__PURE__ */ a(co, {}) }) }) }),
2844
+ triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(Q, { content: x == null ? void 0 : x.moreOptionTooltip, children: /* @__PURE__ */ a(we, { active: t, "aria-label": x == null ? void 0 : x.moreOptionTooltip, children: /* @__PURE__ */ a(ur, {}) }) }) }),
2835
2845
  side: "bottom",
2836
2846
  avoidCollisions: !1,
2837
2847
  children: /* @__PURE__ */ $(
2838
2848
  "div",
2839
2849
  {
2840
2850
  style: { maxHeight: `${I}px`, overflow: "auto" },
2841
- className: Oi["rp-other-tool-content"],
2851
+ className: Ai["rp-other-tool-content"],
2842
2852
  "data-rp": "moreOptionsDropdown",
2843
2853
  children: [
2844
- r && /* @__PURE__ */ $(hn, { children: [
2845
- /* @__PURE__ */ a(pn, {}),
2846
- /* @__PURE__ */ a(Bn, {}),
2847
- /* @__PURE__ */ a(Zn, {}),
2848
- /* @__PURE__ */ a(fn, {}),
2849
- /* @__PURE__ */ a(un, {})
2854
+ o && /* @__PURE__ */ $(fn, { children: [
2855
+ /* @__PURE__ */ a(hn, {}),
2856
+ /* @__PURE__ */ a(jn, {}),
2857
+ /* @__PURE__ */ a(Xn, {}),
2858
+ /* @__PURE__ */ a(mn, {}),
2859
+ /* @__PURE__ */ a(pn, {})
2850
2860
  ] }),
2851
- /* @__PURE__ */ a(qi, {}),
2852
- /* @__PURE__ */ a(Co, {}),
2853
- /* @__PURE__ */ a(xo, {}),
2854
- /* @__PURE__ */ a(Po, {}),
2855
- /* @__PURE__ */ a(yo, {}),
2856
- /* @__PURE__ */ a(To, {})
2861
+ /* @__PURE__ */ a(Ui, {}),
2862
+ /* @__PURE__ */ a(yr, {}),
2863
+ /* @__PURE__ */ a(Lr, {}),
2864
+ /* @__PURE__ */ a(Sr, {}),
2865
+ /* @__PURE__ */ a(Ir, {}),
2866
+ /* @__PURE__ */ a(Pr, {})
2857
2867
  ]
2858
2868
  }
2859
2869
  )
2860
2870
  }
2861
2871
  ),
2862
- /* @__PURE__ */ a(Ni, {})
2872
+ /* @__PURE__ */ a(Di, {})
2863
2873
  ] });
2864
- }, Ui = () => {
2865
- const { isSmallScreen: t } = De();
2866
- return /* @__PURE__ */ $(he, { children: [
2867
- /* @__PURE__ */ a(so, {}),
2868
- !t && /* @__PURE__ */ $(he, { children: [
2869
- /* @__PURE__ */ a(pn, {}),
2870
- /* @__PURE__ */ a(Bn, {}),
2871
- /* @__PURE__ */ a(Zn, {}),
2872
- /* @__PURE__ */ a(fn, {})
2874
+ }, Bi = () => {
2875
+ const { isSmallScreen: t } = Oe();
2876
+ return /* @__PURE__ */ $(fe, { children: [
2877
+ /* @__PURE__ */ a(dr, {}),
2878
+ !t && /* @__PURE__ */ $(fe, { children: [
2879
+ /* @__PURE__ */ a(hn, {}),
2880
+ /* @__PURE__ */ a(jn, {}),
2881
+ /* @__PURE__ */ a(Xn, {}),
2882
+ /* @__PURE__ */ a(mn, {})
2873
2883
  ] }),
2874
- /* @__PURE__ */ a(Gi, {})
2884
+ /* @__PURE__ */ a(Vi, {})
2875
2885
  ] });
2876
- }, tn = () => {
2877
- const { totalMatches: t, nextMatch: e, prevMatch: n } = St(), { localeMessages: o } = fe();
2878
- return /* @__PURE__ */ $(he, { children: [
2886
+ }, nn = () => {
2887
+ const { totalMatches: t, nextMatch: e, prevMatch: n } = St(), { localeMessages: r } = me();
2888
+ return /* @__PURE__ */ $(fe, { children: [
2879
2889
  /* @__PURE__ */ a(
2880
2890
  Q,
2881
2891
  {
2882
- content: o == null ? void 0 : o.searchPrevTooltip,
2892
+ content: r == null ? void 0 : r.searchPrevTooltip,
2883
2893
  className: te["rp-search-tool-result-navigator"],
2884
- children: /* @__PURE__ */ a(we, { tabIndex: 0, onClick: n, "aria-label": o == null ? void 0 : o.searchPrevTooltip, children: /* @__PURE__ */ a(
2885
- Ze,
2894
+ children: /* @__PURE__ */ a(we, { tabIndex: 0, onClick: n, "aria-label": r == null ? void 0 : r.searchPrevTooltip, children: /* @__PURE__ */ a(
2895
+ Xe,
2886
2896
  {
2887
2897
  className: te["rp-search-tool-input-icon"],
2888
2898
  "aria-disabled": !t
@@ -2893,10 +2903,10 @@ const Re = {
2893
2903
  /* @__PURE__ */ a(
2894
2904
  Q,
2895
2905
  {
2896
- content: o == null ? void 0 : o.searchNextTooltip,
2906
+ content: r == null ? void 0 : r.searchNextTooltip,
2897
2907
  className: te["rp-search-tool-result-navigator"],
2898
- children: /* @__PURE__ */ a(we, { tabIndex: 0, onClick: e, "aria-label": o == null ? void 0 : o.searchNextTooltip, children: /* @__PURE__ */ a(
2899
- Ze,
2908
+ children: /* @__PURE__ */ a(we, { tabIndex: 0, onClick: e, "aria-label": r == null ? void 0 : r.searchNextTooltip, children: /* @__PURE__ */ a(
2909
+ Xe,
2900
2910
  {
2901
2911
  style: { transform: "rotate(180deg" },
2902
2912
  className: te["rp-search-tool-input-icon"],
@@ -2906,27 +2916,27 @@ const Re = {
2906
2916
  }
2907
2917
  )
2908
2918
  ] });
2909
- }, Vi = () => {
2919
+ }, ji = () => {
2910
2920
  const { searchIcon: t } = Pe(), { searchIcon: e } = Te();
2911
- return t || e || /* @__PURE__ */ a(gn, {});
2912
- }, Bi = ({ icon: t }) => {
2913
- const { container: e } = be(), [n, o] = q(!1), { pdf: r } = re(), [i, c] = q(null), {
2921
+ return t || e || /* @__PURE__ */ a(vn, {});
2922
+ }, Ki = ({ icon: t }) => {
2923
+ const { container: e } = be(), [n, r] = q(!1), { pdf: o } = oe(), [i, c] = q(null), {
2914
2924
  searchOptions: l,
2915
2925
  setSearchOptions: d,
2916
2926
  loading: f,
2917
2927
  setSearch: m,
2918
- totalMatches: C,
2919
- currentMatchPosition: p,
2928
+ totalMatches: P,
2929
+ currentMatchPosition: u,
2920
2930
  nextMatch: T,
2921
- prevMatch: P,
2931
+ prevMatch: C,
2922
2932
  search: b
2923
- } = St(), { searchTool: g = !0 } = Ce(), { searchTool: S = !0 } = Oe(), [v, h] = q(b), { localeMessages: u } = fe(), { isSmallScreen: s } = De(), [w, _] = q(null), [y, x] = q(!1), I = E(() => {
2924
- o(!0);
2933
+ } = St(), { searchTool: g = !0 } = Ce(), { searchTool: S = !0 } = Ne(), [v, h] = q(b), { localeMessages: p } = me(), { isSmallScreen: s } = Oe(), [w, _] = q(null), [y, x] = q(!1), I = E(() => {
2934
+ r(!0);
2925
2935
  }, []), R = E(() => {
2926
- m(""), h(""), o(!1);
2936
+ m(""), h(""), r(!1);
2927
2937
  }, [m]), L = (G) => {
2928
- const Z = G.key === "Enter", Y = G.key === " ";
2929
- (Z || Y) && R();
2938
+ const K = G.key === "Enter", Y = G.key === " ";
2939
+ (K || Y) && R();
2930
2940
  }, N = E(
2931
2941
  (G) => {
2932
2942
  G.key === "Escape" && n && R();
@@ -2934,55 +2944,55 @@ const Re = {
2934
2944
  [n]
2935
2945
  ), F = E(
2936
2946
  (G) => {
2937
- G.shiftKey && G.key === "Enter" ? P() : G.key === "Enter" && b !== v ? m(v) : G.key === "Enter" && T();
2947
+ G.shiftKey && G.key === "Enter" ? C() : G.key === "Enter" && b !== v ? m(v) : G.key === "Enter" && T();
2938
2948
  },
2939
- [v, P, T, m, b]
2949
+ [v, C, T, m, b]
2940
2950
  );
2941
- z(() => {
2951
+ M(() => {
2942
2952
  h(b);
2943
- }, [b]), z(() => {
2944
- b && r && x(!0);
2945
- }, [b, r]), z(() => {
2953
+ }, [b]), M(() => {
2954
+ b && o && x(!0);
2955
+ }, [b, o]), M(() => {
2946
2956
  b && b.trim() !== "" && (h(b), m(b));
2947
- }, []), z(() => (window.addEventListener("keydown", N), () => {
2957
+ }, []), M(() => (window.addEventListener("keydown", N), () => {
2948
2958
  window.removeEventListener("keydown", N);
2949
- }), [N]), z(() => {
2959
+ }), [N]), M(() => {
2950
2960
  i && setTimeout(() => {
2951
2961
  i.focus();
2952
2962
  }, 0);
2953
2963
  }, [i]);
2954
- const M = E((G) => {
2964
+ const z = E((G) => {
2955
2965
  h(G.target.value);
2956
2966
  }, []), D = E(() => {
2957
2967
  h(""), m("");
2958
- }, [m]), O = W(() => `${p} / ${C}`, [p, C]), { wholeWords: A, matchCase: H } = W(() => l, [l]), U = E(
2968
+ }, [m]), O = W(() => `${u} / ${P}`, [u, P]), { wholeWords: A, matchCase: H } = W(() => l, [l]), U = E(
2959
2969
  (G) => {
2960
- d((Z) => ({ ...Z, matchCase: G }));
2970
+ d((K) => ({ ...K, matchCase: G }));
2961
2971
  },
2962
2972
  [d]
2963
2973
  ), B = E(
2964
2974
  (G) => {
2965
- d((Z) => ({ ...Z, wholeWords: G }));
2975
+ d((K) => ({ ...K, wholeWords: G }));
2966
2976
  },
2967
2977
  [d]
2968
2978
  );
2969
- z(() => {
2970
- r && y && R();
2971
- }, [r, R]);
2972
- const V = W(() => (w == null ? void 0 : w.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [w]), ee = E(
2979
+ M(() => {
2980
+ o && y && R();
2981
+ }, [o, R]);
2982
+ const V = W(() => (w == null ? void 0 : w.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [w]), J = E(
2973
2983
  (G) => {
2974
2984
  if (G.key === "Tab") {
2975
- const Z = document.activeElement;
2985
+ const K = document.activeElement;
2976
2986
  let Y = 0;
2977
- V.forEach((ie, ue) => {
2978
- ie === Z && (Y = ue);
2987
+ V.forEach((ie, se) => {
2988
+ ie === K && (Y = se);
2979
2989
  });
2980
- let oe = Y + 1;
2981
- G.shiftKey && (oe = Y - 1);
2982
- const ae = V[oe];
2983
- if (ae)
2984
- ae.focus();
2985
- else if (oe > V.length - 1) {
2990
+ let ee = Y + 1;
2991
+ G.shiftKey && (ee = Y - 1);
2992
+ const re = V[ee];
2993
+ if (re)
2994
+ re.focus();
2995
+ else if (ee > V.length - 1) {
2986
2996
  const ie = V[0];
2987
2997
  ie && ie.focus();
2988
2998
  } else {
@@ -2993,8 +3003,8 @@ const Re = {
2993
3003
  },
2994
3004
  [V]
2995
3005
  );
2996
- return !g || !S ? null : /* @__PURE__ */ a(he, { children: /* @__PURE__ */ a(
2997
- dn,
3006
+ return !g || !S ? null : /* @__PURE__ */ a(fe, { children: /* @__PURE__ */ a(
3007
+ un,
2998
3008
  {
2999
3009
  open: n,
3000
3010
  container: e,
@@ -3002,13 +3012,13 @@ const Re = {
3002
3012
  align: "start",
3003
3013
  tabIndex: 0,
3004
3014
  avoidCollisions: !1,
3005
- triggerComponent: /* @__PURE__ */ a(Q, { content: u == null ? void 0 : u.searchButtonTooltip, children: /* @__PURE__ */ a(
3015
+ triggerComponent: /* @__PURE__ */ a(Q, { content: p == null ? void 0 : p.searchButtonTooltip, children: /* @__PURE__ */ a(
3006
3016
  we,
3007
3017
  {
3008
3018
  active: n,
3009
3019
  onClick: I,
3010
- "aria-label": u == null ? void 0 : u.searchButtonTooltip,
3011
- children: t || /* @__PURE__ */ a(Vi, {})
3020
+ "aria-label": p == null ? void 0 : p.searchButtonTooltip,
3021
+ children: t || /* @__PURE__ */ a(ji, {})
3012
3022
  }
3013
3023
  ) }),
3014
3024
  children: /* @__PURE__ */ $(
@@ -3017,57 +3027,57 @@ const Re = {
3017
3027
  ref: _,
3018
3028
  className: te["rp-search-tool-content"],
3019
3029
  tabIndex: 0,
3020
- onKeyDown: ee,
3030
+ onKeyDown: J,
3021
3031
  children: [
3022
3032
  /* @__PURE__ */ $("div", { className: te["rp-search-tool-input-wrapper"], children: [
3023
3033
  /* @__PURE__ */ $("div", { className: te["rp-search-tool-input"], children: [
3024
- /* @__PURE__ */ a(Q, { content: u == null ? void 0 : u.searchInputTooltip, children: /* @__PURE__ */ a(
3025
- an,
3034
+ /* @__PURE__ */ a(Q, { content: p == null ? void 0 : p.searchInputTooltip, children: /* @__PURE__ */ a(
3035
+ sn,
3026
3036
  {
3027
3037
  value: v,
3028
3038
  onKeyDown: F,
3029
- onChange: M,
3030
- icon: /* @__PURE__ */ a(gn, {}),
3031
- placeholder: u == null ? void 0 : u.searchInputPlaceholder,
3039
+ onChange: z,
3040
+ icon: /* @__PURE__ */ a(vn, {}),
3041
+ placeholder: p == null ? void 0 : p.searchInputPlaceholder,
3032
3042
  className: te["rp-search-input"],
3033
3043
  ref: c,
3034
3044
  id: "search-input",
3035
3045
  name: "search-input",
3036
3046
  tabIndex: 0,
3037
- children: !!v && /* @__PURE__ */ a("span", { className: te["rp-search-tool-input-clear"], onClick: D, children: /* @__PURE__ */ a(Lo, {}) })
3047
+ children: !!v && /* @__PURE__ */ a("span", { className: te["rp-search-tool-input-clear"], onClick: D, children: /* @__PURE__ */ a(Nr, {}) })
3038
3048
  }
3039
3049
  ) }),
3040
- f ? /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(ln, { className: te["rp-search-loader-icon"] }) }) : /* @__PURE__ */ a("span", { children: O }),
3050
+ f ? /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(dn, { className: te["rp-search-loader-icon"] }) }) : /* @__PURE__ */ a("span", { children: O }),
3041
3051
  s && /* @__PURE__ */ a("div", { className: te["rp-search-tool-controls"], children: /* @__PURE__ */ a(At, { onKeyPress: L, handleClose: R }) })
3042
3052
  ] }),
3043
3053
  /* @__PURE__ */ $("div", { className: te["rp-search-tool-input-checkboxes"], children: [
3044
- s && /* @__PURE__ */ a(tn, {}),
3054
+ s && /* @__PURE__ */ a(nn, {}),
3045
3055
  /* @__PURE__ */ a(
3046
- zt,
3056
+ Mt,
3047
3057
  {
3048
3058
  tabIndex: 0,
3049
3059
  name: "matchCase",
3050
3060
  value: H,
3051
3061
  onChange: U,
3052
- children: u == null ? void 0 : u.searchMatchCaseLabel
3062
+ children: p == null ? void 0 : p.searchMatchCaseLabel
3053
3063
  }
3054
3064
  ),
3055
- !s && /* @__PURE__ */ a(Q, { content: u == null ? void 0 : u.searchMatchCaseTooltip, children: /* @__PURE__ */ a("div", { className: te["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ a(Wt, {}) }) }),
3065
+ !s && /* @__PURE__ */ a(Q, { content: p == null ? void 0 : p.searchMatchCaseTooltip, children: /* @__PURE__ */ a("div", { className: te["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ a(Ht, {}) }) }),
3056
3066
  /* @__PURE__ */ a(
3057
- zt,
3067
+ Mt,
3058
3068
  {
3059
3069
  tabIndex: 0,
3060
3070
  name: "wholeWord",
3061
3071
  value: A,
3062
3072
  onChange: B,
3063
- children: u == null ? void 0 : u.searchWholeWordsLabel
3073
+ children: p == null ? void 0 : p.searchWholeWordsLabel
3064
3074
  }
3065
3075
  ),
3066
- !s && /* @__PURE__ */ a(Q, { content: u == null ? void 0 : u.searchWholeWordsTooltip, children: /* @__PURE__ */ a("div", { tabIndex: 0, className: te["rp-search-icon-info"], children: /* @__PURE__ */ a(Wt, {}) }) })
3076
+ !s && /* @__PURE__ */ a(Q, { content: p == null ? void 0 : p.searchWholeWordsTooltip, children: /* @__PURE__ */ a("div", { tabIndex: 0, className: te["rp-search-icon-info"], children: /* @__PURE__ */ a(Ht, {}) }) })
3067
3077
  ] })
3068
3078
  ] }),
3069
3079
  !s && /* @__PURE__ */ $("div", { className: te["rp-search-tool-controls"], children: [
3070
- /* @__PURE__ */ a(tn, {}),
3080
+ /* @__PURE__ */ a(nn, {}),
3071
3081
  /* @__PURE__ */ a(At, { onKeyPress: L, handleClose: R })
3072
3082
  ] })
3073
3083
  ]
@@ -3075,43 +3085,43 @@ const Re = {
3075
3085
  )
3076
3086
  }
3077
3087
  ) });
3078
- }, ji = "_loading_wazy2_1", ze = {
3088
+ }, Zi = "_loading_wazy2_1", Ae = {
3079
3089
  "rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
3080
3090
  "rp-loading-modal": "_rp-loading-modal_wazy2_14",
3081
3091
  "rp-loading-title": "_rp-loading-title_wazy2_27",
3082
3092
  "rp-loading-progress-bar": "_rp-loading-progress-bar_wazy2_35",
3083
3093
  "rp-loading-progress": "_rp-loading-progress_wazy2_35",
3084
3094
  "rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
3085
- loading: ji
3086
- }, Ki = ({ percentage: t }) => {
3087
- const { cancel: e } = tt(), { localeMessages: n } = fe();
3088
- return t < 1 ? null : /* @__PURE__ */ a("div", { className: ce(ze["rp-loading-overlay"]), children: /* @__PURE__ */ $("div", { className: ce(ze["rp-loading-modal"]), children: [
3089
- /* @__PURE__ */ $("div", { className: ce(ze["rp-loading-title"]), children: [
3095
+ loading: Zi
3096
+ }, Xi = ({ percentage: t }) => {
3097
+ const { cancel: e } = nt(), { localeMessages: n } = me();
3098
+ return t < 1 ? null : /* @__PURE__ */ a("div", { className: de(Ae["rp-loading-overlay"]), children: /* @__PURE__ */ $("div", { className: de(Ae["rp-loading-modal"]), children: [
3099
+ /* @__PURE__ */ $("div", { className: de(Ae["rp-loading-title"]), children: [
3090
3100
  n == null ? void 0 : n.printLoadingMessage,
3091
3101
  "..."
3092
3102
  ] }),
3093
- /* @__PURE__ */ a("div", { className: ce(ze["rp-loading-progress-bar"]), children: /* @__PURE__ */ a(
3103
+ /* @__PURE__ */ a("div", { className: de(Ae["rp-loading-progress-bar"]), children: /* @__PURE__ */ a(
3094
3104
  "div",
3095
3105
  {
3096
- className: ce(ze["rp-loading-progress"]),
3106
+ className: de(Ae["rp-loading-progress"]),
3097
3107
  style: { width: `${t}%` }
3098
3108
  }
3099
3109
  ) }),
3100
- /* @__PURE__ */ a("button", { className: ce(ze["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
3110
+ /* @__PURE__ */ a("button", { className: de(Ae["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
3101
3111
  ] }) });
3102
- }, Zi = et((t, e) => {
3103
- const { showPrintProgress: n = !0 } = Ce(), { showPrintProgress: o = !0 } = Oe(), { progress: r } = tt(), { isSmallScreen: i } = De(), { percentage: c } = r || {}, l = () => i ? { gridTemplateColumns: "25% 60% 15%" } : void 0, d = () => {
3104
- if (!(!n || !o || !c))
3105
- return /* @__PURE__ */ a(Ki, { percentage: c });
3112
+ }, Qi = tt((t, e) => {
3113
+ const { showPrintProgress: n = !0 } = Ce(), { showPrintProgress: r = !0 } = Ne(), { progress: o } = nt(), { isSmallScreen: i } = Oe(), { percentage: c } = o || {}, l = () => i ? { gridTemplateColumns: "25% 60% 15%" } : void 0, d = () => {
3114
+ if (!(!n || !r || !c))
3115
+ return /* @__PURE__ */ a(Xi, { percentage: c });
3106
3116
  };
3107
3117
  return /* @__PURE__ */ $("div", { children: [
3108
- /* @__PURE__ */ a("div", { "data-rp": "topBar", ref: e, className: ke["rp-toolbar-content"], children: /* @__PURE__ */ $("div", { className: ke["rp-toolbar-wrapper"], style: l(), children: [
3109
- /* @__PURE__ */ $("div", { "data-rp": "topBarLeft", className: ke["rp-toolbar-start"], children: [
3110
- /* @__PURE__ */ a(Bi, {}),
3111
- /* @__PURE__ */ a(hi, {})
3118
+ /* @__PURE__ */ a("div", { "data-rp": "topBar", ref: e, className: We["rp-toolbar-content"], children: /* @__PURE__ */ $("div", { className: We["rp-toolbar-wrapper"], style: l(), children: [
3119
+ /* @__PURE__ */ $("div", { "data-rp": "topBarLeft", className: We["rp-toolbar-start"], children: [
3120
+ /* @__PURE__ */ a(Ki, {}),
3121
+ /* @__PURE__ */ a(mi, {})
3112
3122
  ] }),
3113
- /* @__PURE__ */ a("div", { "data-rp": "topBarCenter", className: ke["rp-toolbar-middle"], children: /* @__PURE__ */ a(Ro, {}) }),
3114
- /* @__PURE__ */ a("div", { "data-rp": "topBarRight", className: ke["rp-toolbar-end"], children: /* @__PURE__ */ a(Ui, {}) })
3123
+ /* @__PURE__ */ a("div", { "data-rp": "topBarCenter", className: We["rp-toolbar-middle"], children: /* @__PURE__ */ a(Er, {}) }),
3124
+ /* @__PURE__ */ a("div", { "data-rp": "topBarRight", className: We["rp-toolbar-end"], children: /* @__PURE__ */ a(Bi, {}) })
3115
3125
  ] }) }),
3116
3126
  /* @__PURE__ */ a(d, {})
3117
3127
  ] });
@@ -3119,44 +3129,44 @@ const Re = {
3119
3129
  "rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1bqgz_1",
3120
3130
  "rp-sidebar-content": "_rp-sidebar-content_1bqgz_1",
3121
3131
  "rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_1bqgz_16"
3122
- }, We = {
3132
+ }, He = {
3123
3133
  "rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
3124
3134
  "rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
3125
3135
  "rp-thumbnail": "_rp-thumbnail_3fenb_1",
3126
3136
  "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
3127
3137
  "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
3128
- }, Xi = (t) => {
3129
- const { pageNumber: e, isFocused: n, viewport: o } = t, { goToPage: r } = de(), { pageRotate: i } = Je(), c = k(null), l = yn(), { pages: d } = re(), [f, m] = q(null), C = k(!1), p = k(), T = W(() => n ? We["rp-thumbnail-active"] : "", [n]), P = W(() => ({
3130
- width: Math.round(o.width),
3131
- height: Math.round(o.height)
3132
- }), [o]), b = E(() => {
3133
- e && r(e);
3134
- }, [r, e]);
3135
- return z(() => {
3138
+ }, Yi = (t) => {
3139
+ const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = pe(), { pageRotate: i } = et(), c = k(null), l = Sn(), { pages: d } = oe(), [f, m] = q(null), P = k(!1), u = k(), T = W(() => n ? He["rp-thumbnail-active"] : "", [n]), C = W(() => ({
3140
+ width: Math.round(r.width),
3141
+ height: Math.round(r.height)
3142
+ }), [r]), b = E(() => {
3143
+ e && o(e);
3144
+ }, [o, e]);
3145
+ return M(() => {
3136
3146
  const g = d.get(e);
3137
- p.current === g || (m(null), p.current = g);
3138
- }, [d, e]), z(() => {
3147
+ u.current === g || (m(null), u.current = g);
3148
+ }, [d, e]), M(() => {
3139
3149
  const g = d.get(e);
3140
3150
  if (!c.current || !e || !g || f)
3141
3151
  return;
3142
3152
  const S = new IntersectionObserver((v) => {
3143
3153
  v.forEach((h) => {
3144
- if (C.current) {
3145
- C.current = !1, l.removeQueue(`thumbnail-${e}`);
3154
+ if (P.current) {
3155
+ P.current = !1, l.removeQueue(`thumbnail-${e}`);
3146
3156
  return;
3147
3157
  }
3148
3158
  if (h.isIntersecting) {
3149
- const u = document.createElement("canvas");
3150
- C.current = !0, l.enqueue(
3159
+ const p = document.createElement("canvas");
3160
+ P.current = !0, l.enqueue(
3151
3161
  `thumbnail-${e}`,
3152
3162
  {
3153
3163
  page: g.page,
3154
- canvasElem: u,
3164
+ canvasElem: p,
3155
3165
  options: {
3156
3166
  scale: 1
3157
3167
  },
3158
3168
  onLoaded: () => {
3159
- u.toBlob((s) => {
3169
+ p.toBlob((s) => {
3160
3170
  if (!s)
3161
3171
  return;
3162
3172
  const w = URL.createObjectURL(s);
@@ -3177,7 +3187,7 @@ const Re = {
3177
3187
  {
3178
3188
  onClick: b,
3179
3189
  id: `page-${e}`,
3180
- className: We["rp-thumbnail-wrapper"],
3190
+ className: He["rp-thumbnail-wrapper"],
3181
3191
  ref: c,
3182
3192
  children: [
3183
3193
  /* @__PURE__ */ a(
@@ -3186,77 +3196,77 @@ const Re = {
3186
3196
  style: {
3187
3197
  transform: `rotate(${i[e || 0]}deg)`
3188
3198
  },
3189
- className: ce(T, We["rp-thumbnail"]),
3199
+ className: de(T, He["rp-thumbnail"]),
3190
3200
  children: f ? /* @__PURE__ */ a(
3191
3201
  "img",
3192
3202
  {
3193
3203
  src: f,
3194
- width: P.width,
3195
- height: P.height,
3204
+ width: C.width,
3205
+ height: C.height,
3196
3206
  alt: "thumbnail"
3197
3207
  }
3198
3208
  ) : /* @__PURE__ */ a(
3199
3209
  "div",
3200
3210
  {
3201
- className: We["rp-thumbnail-loader"],
3211
+ className: He["rp-thumbnail-loader"],
3202
3212
  style: {
3203
- width: `${P.width}px`,
3204
- height: `${P.height}px`
3213
+ width: `${C.width}px`,
3214
+ height: `${C.height}px`
3205
3215
  },
3206
- children: /* @__PURE__ */ a(ln, {})
3216
+ children: /* @__PURE__ */ a(dn, {})
3207
3217
  }
3208
3218
  )
3209
3219
  }
3210
3220
  ),
3211
- /* @__PURE__ */ a("div", { className: We["rp-thumbnail-text"], children: e })
3221
+ /* @__PURE__ */ a("div", { className: He["rp-thumbnail-text"], children: e })
3212
3222
  ]
3213
3223
  }
3214
3224
  );
3215
- }, nn = {
3225
+ }, on = {
3216
3226
  "rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
3217
3227
  "rp-thumbnails": "_rp-thumbnails_16vqr_1"
3218
- }, Qi = 16, Yi = (t, e) => {
3228
+ }, Ji = 16, ea = (t, e) => {
3219
3229
  const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
3220
- t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Qi);
3221
- }, Ji = et((t, e) => {
3222
- const { show: n, width: o } = t, { focusedPage: r, totalPages: i } = de(), { thumbnailPages: c, addPage: l, thumbnailLength: d, addToPage: f } = Tn(), m = k(null), C = k(1);
3230
+ t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Ji);
3231
+ }, ta = tt((t, e) => {
3232
+ const { show: n, width: r } = t, { focusedPage: o, totalPages: i } = pe(), { thumbnailPages: c, addPage: l, thumbnailLength: d, addToPage: f } = Cn(), m = k(null), P = k(1);
3223
3233
  rn(e, () => m.current);
3224
- const p = W(() => Object.values(c), [c]), T = E(() => {
3225
- const P = d + 1;
3226
- P <= i && l(P);
3234
+ const u = W(() => Object.values(c), [c]), T = E(() => {
3235
+ const C = d + 1;
3236
+ C <= i && l(C);
3227
3237
  }, [l, i, d]);
3228
- return z(() => {
3229
- r > d && i > d ? f(r) : n && C.current !== r && (Yi(m.current, r), C.current = r);
3230
- }, [r, d, f, n, p]), zr(m.current, T), /* @__PURE__ */ a("div", { ref: m, className: nn["rp-thumbnails-container"], style: { width: o }, children: /* @__PURE__ */ a("div", { className: nn["rp-thumbnails"], children: n ? p.map((P, b) => {
3238
+ return M(() => {
3239
+ o > d && i > d ? f(o) : n && P.current !== o && (ea(m.current, o), P.current = o);
3240
+ }, [o, d, f, n, u]), Wo(m.current, T), /* @__PURE__ */ a("div", { ref: m, className: on["rp-thumbnails-container"], style: { width: r }, children: /* @__PURE__ */ a("div", { className: on["rp-thumbnails"], children: n ? u.map((C, b) => {
3231
3241
  var g, S;
3232
3242
  return /* @__PURE__ */ a(
3233
- Xi,
3243
+ Yi,
3234
3244
  {
3235
- isFocused: r === ((g = P.page) == null ? void 0 : g.pageNumber),
3236
- pageNumber: (S = P.page) == null ? void 0 : S.pageNumber,
3237
- loading: P.loading,
3238
- viewport: P.viewport,
3239
- defaultRotation: P.defaultRotation
3245
+ isFocused: o === ((g = C.page) == null ? void 0 : g.pageNumber),
3246
+ pageNumber: (S = C.page) == null ? void 0 : S.pageNumber,
3247
+ loading: C.loading,
3248
+ viewport: C.viewport,
3249
+ defaultRotation: C.defaultRotation
3240
3250
  },
3241
3251
  b
3242
3252
  );
3243
3253
  }) : null }) });
3244
- }), ea = () => {
3254
+ }), na = () => {
3245
3255
  const { thumbnailIcon: t } = Pe(), { thumbnailIcon: e } = Te();
3246
- return t || e || /* @__PURE__ */ a(yr, {});
3247
- }, ta = () => {
3248
- const { active: t, setActive: e } = Tn(), [n, o] = q(Mr), r = k(null), i = k(null), { thumbnailTool: c, sidebarEnable: l } = Ce(), { localeMessages: d } = fe(), f = E(() => {
3249
- e((C) => !C);
3256
+ return t || e || /* @__PURE__ */ a(Ro, {});
3257
+ }, oa = () => {
3258
+ const { active: t, setActive: e } = Cn(), [n, r] = q(Ho), o = k(null), i = k(null), { thumbnailTool: c, sidebarEnable: l } = Ce(), { localeMessages: d } = me(), f = E(() => {
3259
+ e((P) => !P);
3250
3260
  }, []), m = W(() => typeof c != "boolean" && c ? /* @__PURE__ */ a(c, { onClick: f, active: t }) : c ? /* @__PURE__ */ a(Q, { content: d == null ? void 0 : d.thumbnailTooltip, children: /* @__PURE__ */ a(
3251
3261
  we,
3252
3262
  {
3253
3263
  onClick: f,
3254
3264
  active: t,
3255
3265
  "aria-label": d == null ? void 0 : d.thumbnailTooltip,
3256
- children: /* @__PURE__ */ a(ea, {})
3266
+ children: /* @__PURE__ */ a(na, {})
3257
3267
  }
3258
3268
  ) }) : null, [c, t, f, d]);
3259
- return /* @__PURE__ */ a(he, { children: l && /* @__PURE__ */ $(
3269
+ return /* @__PURE__ */ a(fe, { children: l && /* @__PURE__ */ $(
3260
3270
  "div",
3261
3271
  {
3262
3272
  style: { "--rp-thumbnail-width": `${n}px` },
@@ -3271,12 +3281,12 @@ const Re = {
3271
3281
  hidden: !t,
3272
3282
  className: ft["rp-thumbnails-wrapper"],
3273
3283
  children: [
3274
- /* @__PURE__ */ a(Ji, { show: t, ref: r }),
3284
+ /* @__PURE__ */ a(ta, { show: t, ref: o }),
3275
3285
  /* @__PURE__ */ a(
3276
- Rr,
3286
+ Oo,
3277
3287
  {
3278
- onWidthChange: o,
3279
- thumbnailRef: r,
3288
+ onWidthChange: r,
3289
+ thumbnailRef: o,
3280
3290
  leftSidebarRef: i
3281
3291
  }
3282
3292
  )
@@ -3286,36 +3296,36 @@ const Re = {
3286
3296
  ]
3287
3297
  }
3288
3298
  ) });
3289
- }, rc = ir((t, e) => {
3299
+ }, ac = so((t, e) => {
3290
3300
  const {
3291
3301
  children: n,
3292
- slots: o,
3293
- icons: r,
3302
+ slots: r,
3303
+ icons: o,
3294
3304
  style: i,
3295
3305
  className: c,
3296
3306
  mobileWidth: l,
3297
3307
  onLoaded: d,
3298
3308
  cleanupOnLoaded: f,
3299
3309
  onLayoutWidthChange: m
3300
- } = t, [C, p] = q(null), { setContainer: T, setContentRef: P } = be(), { loading: b } = re(), { LoaderImageComponent: g } = bt();
3301
- return z(() => (d && d(), () => {
3310
+ } = t, [P, u] = q(null), { setContainer: T, setContentRef: C } = be(), { loading: b } = oe(), { LoaderImageComponent: g } = bt();
3311
+ return M(() => (d && d(), () => {
3302
3312
  f && f();
3303
3313
  }), [d, f]), // TODO: deprecated in v2.0.0, remove later ~
3304
- /* @__PURE__ */ a(Rn, { toolbarRef: C, ref: e, children: /* @__PURE__ */ a(Ir, { mobileWidth: l, onLayoutWidthChange: m, children: /* @__PURE__ */ a(xr, { slots: o, children: /* @__PURE__ */ a(Dr, { icons: r, children: /* @__PURE__ */ $(Sr, { getContainerRef: T, style: i, className: c, children: [
3305
- /* @__PURE__ */ $(Lr, { children: [
3314
+ /* @__PURE__ */ a(Ln, { toolbarRef: P, ref: e, children: /* @__PURE__ */ a(Eo, { mobileWidth: l, onLayoutWidthChange: m, children: /* @__PURE__ */ a(No, { slots: r, children: /* @__PURE__ */ a(Fo, { icons: o, children: /* @__PURE__ */ $(Lo, { getContainerRef: T, style: i, className: c, children: [
3315
+ /* @__PURE__ */ $(Do, { children: [
3306
3316
  /* @__PURE__ */ $("div", { className: _e["rp-layout"], children: [
3307
3317
  /* @__PURE__ */ a(
3308
- Zi,
3318
+ Qi,
3309
3319
  {
3310
- ref: p
3320
+ ref: u
3311
3321
  }
3312
3322
  ),
3313
3323
  /* @__PURE__ */ $("div", { className: _e["rp-content"], children: [
3314
- /* @__PURE__ */ a("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ a(ta, {}) }),
3315
- /* @__PURE__ */ a("div", { ref: P, className: _e["rp-pages"], children: n })
3324
+ /* @__PURE__ */ a("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ a(oa, {}) }),
3325
+ /* @__PURE__ */ a("div", { ref: C, className: _e["rp-pages"], children: n })
3316
3326
  ] })
3317
3327
  ] }),
3318
- /* @__PURE__ */ a(Or, {})
3328
+ /* @__PURE__ */ a(zo, {})
3319
3329
  ] }),
3320
3330
  b ? /* @__PURE__ */ a(
3321
3331
  "div",
@@ -3346,7 +3356,7 @@ const Re = {
3346
3356
  }
3347
3357
  ) : null
3348
3358
  ] }) }) }) }) });
3349
- }), oc = {
3359
+ }), sc = {
3350
3360
  "rp-toolbar-layout": "_rp-toolbar-layout_vwobs_1",
3351
3361
  "rp-content": "_rp-content_vwobs_7",
3352
3362
  "rp-topbar-content": "_rp-topbar-content_vwobs_13",
@@ -3355,56 +3365,56 @@ const Re = {
3355
3365
  "rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_vwobs_37"
3356
3366
  };
3357
3367
  export {
3358
- Cn as A,
3359
- Pn as B,
3360
- yn as C,
3361
- Ni as D,
3362
- Ao as E,
3363
- Fo as F,
3364
- Ho as G,
3365
- qo as H,
3368
+ Pn as A,
3369
+ yn as B,
3370
+ Sn as C,
3371
+ Di as D,
3372
+ zr as E,
3373
+ Wr as F,
3374
+ qr as G,
3375
+ Ur as H,
3366
3376
  It as I,
3367
- oi as J,
3368
- si as K,
3369
- Rn as L,
3370
- ci as M,
3371
- li as N,
3372
- Bn as O,
3373
- Zs as P,
3374
- Zn as Q,
3375
- ec as R,
3376
- Bi as S,
3377
- Qs as T,
3378
- qi as U,
3379
- Gi as V,
3380
- tn as W,
3381
- Zi as X,
3382
- Xi as Y,
3383
- ta as Z,
3384
- rc as a,
3385
- Gn as b,
3386
- tt as c,
3377
+ ai as J,
3378
+ li as K,
3379
+ Ln as L,
3380
+ di as M,
3381
+ ui as N,
3382
+ jn as O,
3383
+ Ys as P,
3384
+ Xn as Q,
3385
+ oc as R,
3386
+ Ki as S,
3387
+ ec as T,
3388
+ Ui as U,
3389
+ Vi as V,
3390
+ nn as W,
3391
+ Qi as X,
3392
+ Yi as Y,
3393
+ oa as Z,
3394
+ ac as a,
3395
+ Un as b,
3396
+ nt as c,
3387
3397
  St as d,
3388
- Ys as e,
3389
- Js as f,
3390
- Xs as g,
3391
- Tn as h,
3398
+ tc as e,
3399
+ nc as f,
3400
+ Js as g,
3401
+ Cn as h,
3392
3402
  ht as i,
3393
- ke as j,
3394
- hi as k,
3395
- Ui as l,
3396
- oc as m,
3397
- Ji as n,
3398
- Ki as o,
3399
- Oi as p,
3400
- Wi as q,
3401
- vn as r,
3402
- Eo as s,
3403
- wn as t,
3404
- de as u,
3405
- No as v,
3406
- _n as w,
3407
- Oo as x,
3408
- bn as y,
3409
- Do as z
3403
+ We as j,
3404
+ mi as k,
3405
+ Bi as l,
3406
+ sc as m,
3407
+ ta as n,
3408
+ Xi as o,
3409
+ Ai as p,
3410
+ $i as q,
3411
+ wn as r,
3412
+ Or as s,
3413
+ _n as t,
3414
+ pe as u,
3415
+ Dr as v,
3416
+ bn as w,
3417
+ Ar as x,
3418
+ Tn as y,
3419
+ Mr as z
3410
3420
  };