@cannymindstech/file-viewers 0.27.12 → 0.28.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 (43) hide show
  1. package/dist/{chunk-7P6WEBHN.js → chunk-4HVU224A.js} +637 -482
  2. package/dist/chunk-4HVU224A.js.map +1 -0
  3. package/dist/{chunk-PZGUVU6N.mjs → chunk-6L72TJIW.mjs} +545 -390
  4. package/dist/chunk-6L72TJIW.mjs.map +1 -0
  5. package/dist/{chunk-KQCU7XW2.mjs → chunk-KWHXS7I4.mjs} +192 -1
  6. package/dist/chunk-KWHXS7I4.mjs.map +1 -0
  7. package/dist/{chunk-QV63FULE.js → chunk-NELCZBZV.js} +7 -6
  8. package/dist/chunk-NELCZBZV.js.map +1 -0
  9. package/dist/{chunk-ECZ6IBOS.js → chunk-S5KXYKBX.js} +192 -1
  10. package/dist/chunk-S5KXYKBX.js.map +1 -0
  11. package/dist/{chunk-7JPF5AYR.mjs → chunk-W2P6JHTQ.mjs} +5 -4
  12. package/dist/chunk-W2P6JHTQ.mjs.map +1 -0
  13. package/dist/components/viewers/AudioViewer.d.mts +1 -1
  14. package/dist/components/viewers/AudioViewer.d.ts +1 -1
  15. package/dist/components/viewers/DefaultViewer.d.mts +1 -1
  16. package/dist/components/viewers/DefaultViewer.d.ts +1 -1
  17. package/dist/components/viewers/ImageViewer.d.mts +1 -1
  18. package/dist/components/viewers/ImageViewer.d.ts +1 -1
  19. package/dist/components/viewers/ImageViewer.js +3 -3
  20. package/dist/components/viewers/ImageViewer.mjs +2 -2
  21. package/dist/components/viewers/PDFViewer.d.mts +1 -1
  22. package/dist/components/viewers/PDFViewer.d.ts +1 -1
  23. package/dist/components/viewers/PDFViewer.js +3 -3
  24. package/dist/components/viewers/PDFViewer.mjs +2 -2
  25. package/dist/components/viewers/TIFFViewer.d.mts +1 -1
  26. package/dist/components/viewers/TIFFViewer.d.ts +1 -1
  27. package/dist/components/viewers/TextViewer.d.mts +1 -1
  28. package/dist/components/viewers/TextViewer.d.ts +1 -1
  29. package/dist/components/viewers/VideoViewer.d.mts +1 -1
  30. package/dist/components/viewers/VideoViewer.d.ts +1 -1
  31. package/dist/index.d.mts +2 -2
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.js +4 -4
  34. package/dist/index.mjs +3 -3
  35. package/dist/{types-BYTxtKEc.d.mts → types-DMF9gANJ.d.mts} +1 -0
  36. package/dist/{types-BYTxtKEc.d.ts → types-DMF9gANJ.d.ts} +1 -0
  37. package/package.json +4 -3
  38. package/dist/chunk-7JPF5AYR.mjs.map +0 -1
  39. package/dist/chunk-7P6WEBHN.js.map +0 -1
  40. package/dist/chunk-ECZ6IBOS.js.map +0 -1
  41. package/dist/chunk-KQCU7XW2.mjs.map +0 -1
  42. package/dist/chunk-PZGUVU6N.mjs.map +0 -1
  43. package/dist/chunk-QV63FULE.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
2
 
3
3
 
4
- var _chunkECZ6IBOSjs = require('./chunk-ECZ6IBOS.js');
4
+ var _chunkS5KXYKBXjs = require('./chunk-S5KXYKBX.js');
5
5
 
6
6
 
7
7
  var _chunkOPJOCUSLjs = require('./chunk-OPJOCUSL.js');
@@ -43,7 +43,9 @@ var StablePDFViewer = _react2.default.memo(({
43
43
  hideInternalLoading,
44
44
  isAnnotationForeign,
45
45
  onAnnotationNoteClick,
46
- isAnnotationInteractive
46
+ isAnnotationInteractive,
47
+ twoPageMode,
48
+ scrollStrategy
47
49
  }) => {
48
50
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
49
51
  HeadlessPDFViewer,
@@ -64,7 +66,9 @@ var StablePDFViewer = _react2.default.memo(({
64
66
  hideInternalLoading,
65
67
  isAnnotationForeign,
66
68
  onAnnotationNoteClick,
67
- isAnnotationInteractive
69
+ isAnnotationInteractive,
70
+ twoPageMode,
71
+ scrollStrategy
68
72
  }
69
73
  );
70
74
  });
@@ -98,9 +102,13 @@ var _Approval = require('@mui/icons-material/Approval'); var _Approval2 = _inter
98
102
  var _StickyNote2 = require('@mui/icons-material/StickyNote2'); var _StickyNote22 = _interopRequireDefault(_StickyNote2);
99
103
  var _KeyboardArrowDown = require('@mui/icons-material/KeyboardArrowDown'); var _KeyboardArrowDown2 = _interopRequireDefault(_KeyboardArrowDown);
100
104
  var _Portrait = require('@mui/icons-material/Portrait'); var _Portrait2 = _interopRequireDefault(_Portrait);
105
+ var _MenuBook = require('@mui/icons-material/MenuBook'); var _MenuBook2 = _interopRequireDefault(_MenuBook);
106
+ var _VerticalSplit = require('@mui/icons-material/VerticalSplit'); var _VerticalSplit2 = _interopRequireDefault(_VerticalSplit);
101
107
  var _SwapVert = require('@mui/icons-material/SwapVert'); var _SwapVert2 = _interopRequireDefault(_SwapVert);
108
+ var _SwapHoriz = require('@mui/icons-material/SwapHoriz'); var _SwapHoriz2 = _interopRequireDefault(_SwapHoriz);
102
109
  var _AutoFixHigh = require('@mui/icons-material/AutoFixHigh'); var _AutoFixHigh2 = _interopRequireDefault(_AutoFixHigh);
103
110
 
111
+
104
112
  var PDFToolbar = _react2.default.memo(
105
113
  ({
106
114
  currentPage,
@@ -119,6 +127,13 @@ var PDFToolbar = _react2.default.memo(
119
127
  showPrint,
120
128
  showRotation,
121
129
  showAnnotations,
130
+ // Layout and Sidebar controls
131
+ twoPageMode = false,
132
+ onTwoPageModeChange,
133
+ scrollStrategy = _pdfviewer.ScrollStrategy.Vertical,
134
+ onScrollStrategyChange,
135
+ showThumbnails = false,
136
+ onToggleThumbnails,
122
137
  // Destructure new props with defaults
123
138
  showAnnotate = true,
124
139
  disabledAnnotate = false,
@@ -174,7 +189,10 @@ var PDFToolbar = _react2.default.memo(
174
189
  hasUnsavedAnnotations,
175
190
  isSavingAnnotations,
176
191
  canSaveAnnotations,
177
- onSaveAnnotations
192
+ onSaveAnnotations,
193
+ // Toolbar mode state
194
+ activeMode = "view",
195
+ onActiveModeChange
178
196
  }) => {
179
197
  const [isPrintMenuOpen, setIsPrintMenuOpen] = _react.useState.call(void 0, false);
180
198
  const [isDownloadMenuOpen, setIsDownloadMenuOpen] = _react.useState.call(void 0, false);
@@ -218,430 +236,508 @@ var PDFToolbar = _react2.default.memo(
218
236
  setIsDownloadMenuOpen(false);
219
237
  _optionalChain([onDownloadWithoutAnnotations, 'optionalCall', _4 => _4()]);
220
238
  };
221
- const [activeMode, setActiveMode] = _react.useState.call(void 0, "view");
222
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "pdf-viewer-toolbar-container", children: [
223
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "pdf-viewer-toolbar", children: [
224
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-left", children: [
225
- showPageNavigation && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-section", children: [
226
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "First Page", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
227
- "button",
228
- {
229
- className: "toolbar-button",
230
- onClick: onFirstPage,
231
- disabled: currentPage <= 1,
232
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _FirstPage2.default, { fontSize: "small" })
233
- }
234
- ) }) }),
235
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Previous Page", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
239
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "pdf-viewer-toolbar-container", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "pdf-viewer-toolbar", children: [
240
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-left", children: [
241
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Toggle Page Previews", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
242
+ "button",
243
+ {
244
+ className: `toolbar-button ${showThumbnails ? "toolbar-button-active" : ""}`,
245
+ onClick: onToggleThumbnails,
246
+ style: { marginRight: "8px" },
247
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _VerticalSplit2.default, { fontSize: "small" })
248
+ }
249
+ ) }),
250
+ showPageNavigation && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-section", children: [
251
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "First Page", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
252
+ "button",
253
+ {
254
+ className: "toolbar-button",
255
+ onClick: onFirstPage,
256
+ disabled: currentPage <= 1,
257
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _FirstPage2.default, { fontSize: "small" })
258
+ }
259
+ ) }) }),
260
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Previous Page", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
261
+ "button",
262
+ {
263
+ className: "toolbar-button",
264
+ onClick: onPreviousPage,
265
+ disabled: currentPage <= 1,
266
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ChevronLeft2.default, { fontSize: "small" })
267
+ }
268
+ ) }) }),
269
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "page-info", style: { display: "flex", alignItems: "center", margin: "0 8px", fontSize: "14px", fontWeight: 500 }, children: [
270
+ currentPage,
271
+ " ",
272
+ showPageCount && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: "#6b7280", marginLeft: "4px" }, children: [
273
+ "/ ",
274
+ totalPages || "..."
275
+ ] })
276
+ ] }),
277
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Next Page", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
278
+ "button",
279
+ {
280
+ className: "toolbar-button",
281
+ onClick: onNextPage,
282
+ disabled: currentPage >= totalPages,
283
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ChevronRight2.default, { fontSize: "small" })
284
+ }
285
+ ) }) }),
286
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Last Page", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
287
+ "button",
288
+ {
289
+ className: "toolbar-button",
290
+ onClick: onLastPage,
291
+ disabled: currentPage >= totalPages,
292
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _LastPage2.default, { fontSize: "small" })
293
+ }
294
+ ) }) })
295
+ ] }),
296
+ showZoomControls && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
297
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-separator" }),
298
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-section", children: [
299
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Zoom Out", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
236
300
  "button",
237
301
  {
238
302
  className: "toolbar-button",
239
- onClick: onPreviousPage,
240
- disabled: currentPage <= 1,
241
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ChevronLeft2.default, { fontSize: "small" })
303
+ onClick: onZoomOut,
304
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Remove2.default, { fontSize: "small" })
242
305
  }
243
- ) }) }),
244
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "page-info", style: { display: "flex", alignItems: "center", margin: "0 8px", fontSize: "14px", fontWeight: 500 }, children: [
245
- currentPage,
246
- " ",
247
- showPageCount && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: "#6b7280", marginLeft: "4px" }, children: [
248
- "/ ",
249
- totalPages || "..."
250
- ] })
306
+ ) }),
307
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "zoom-display", children: [
308
+ zoom,
309
+ "%"
251
310
  ] }),
252
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Next Page", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
311
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Zoom In", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
253
312
  "button",
254
313
  {
255
314
  className: "toolbar-button",
256
- onClick: onNextPage,
257
- disabled: currentPage >= totalPages,
258
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ChevronRight2.default, { fontSize: "small" })
315
+ onClick: onZoomIn,
316
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Add2.default, { fontSize: "small" })
259
317
  }
260
- ) }) }),
261
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Last Page", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
318
+ ) })
319
+ ] })
320
+ ] }),
321
+ (showZoomControls || showRotation) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
322
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-separator" }),
323
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-section", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-dropdown-container", ref: viewMenuRef, children: [
324
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "View Options", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
262
325
  "button",
263
326
  {
264
- className: "toolbar-button",
265
- onClick: onLastPage,
266
- disabled: currentPage >= totalPages,
267
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _LastPage2.default, { fontSize: "small" })
327
+ className: `toolbar-button toolbar-dropdown-button ${isViewMenuOpen ? "toolbar-button-active" : ""}`,
328
+ onClick: () => setIsViewMenuOpen(!isViewMenuOpen),
329
+ children: [
330
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Tune2.default, { fontSize: "small" }),
331
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _KeyboardArrowDown2.default, { fontSize: "small", style: { marginLeft: -4 } })
332
+ ]
268
333
  }
269
- ) }) })
270
- ] }),
271
- showZoomControls && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
272
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-separator" }),
273
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-section", children: [
274
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Zoom Out", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
334
+ ) }),
335
+ isViewMenuOpen && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-dropdown-menu", style: { width: "240px" }, children: [
336
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-header", children: "SPREAD MODE" }),
337
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
275
338
  "button",
276
339
  {
277
- className: "toolbar-button",
278
- onClick: onZoomOut,
279
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Remove2.default, { fontSize: "small" })
340
+ className: `toolbar-dropdown-item ${!twoPageMode ? "toolbar-dropdown-item-active" : ""}`,
341
+ onClick: () => {
342
+ setIsViewMenuOpen(false);
343
+ _optionalChain([onTwoPageModeChange, 'optionalCall', _5 => _5(false)]);
344
+ },
345
+ children: [
346
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Portrait2.default, { fontSize: "small" }),
347
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Single Page" })
348
+ ]
280
349
  }
281
- ) }),
282
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "zoom-display", children: [
283
- zoom,
284
- "%"
285
- ] }),
286
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Zoom In", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
350
+ ),
351
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
287
352
  "button",
288
353
  {
289
- className: "toolbar-button",
290
- onClick: onZoomIn,
291
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Add2.default, { fontSize: "small" })
354
+ className: `toolbar-dropdown-item ${twoPageMode ? "toolbar-dropdown-item-active" : ""}`,
355
+ onClick: () => {
356
+ setIsViewMenuOpen(false);
357
+ _optionalChain([onTwoPageModeChange, 'optionalCall', _6 => _6(true)]);
358
+ },
359
+ children: [
360
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _MenuBook2.default, { fontSize: "small" }),
361
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Two-Page Spread" })
362
+ ]
292
363
  }
293
- ) })
294
- ] })
295
- ] }),
296
- (showZoomControls || showRotation) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
297
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-separator" }),
298
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-section", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-dropdown-container", ref: viewMenuRef, children: [
299
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "View Options", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
364
+ ),
365
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-divider" }),
366
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-header", children: "SCROLL LAYOUT" }),
367
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
300
368
  "button",
301
369
  {
302
- className: `toolbar-button toolbar-dropdown-button ${isViewMenuOpen ? "toolbar-button-active" : ""}`,
303
- onClick: () => setIsViewMenuOpen(!isViewMenuOpen),
370
+ className: `toolbar-dropdown-item ${scrollStrategy !== _pdfviewer.ScrollStrategy.Horizontal ? "toolbar-dropdown-item-active" : ""}`,
371
+ onClick: () => {
372
+ setIsViewMenuOpen(false);
373
+ _optionalChain([onScrollStrategyChange, 'optionalCall', _7 => _7(_pdfviewer.ScrollStrategy.Vertical)]);
374
+ },
304
375
  children: [
305
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Tune2.default, { fontSize: "small" }),
306
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _KeyboardArrowDown2.default, { fontSize: "small", style: { marginLeft: -4 } })
376
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _SwapVert2.default, { fontSize: "small" }),
377
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Vertical Scroll" })
307
378
  ]
308
379
  }
309
- ) }),
310
- isViewMenuOpen && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-dropdown-menu", style: { width: "240px" }, children: [
311
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-header", children: "SPREAD MODE" }),
312
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { className: "toolbar-dropdown-item toolbar-dropdown-item-active", onClick: () => setIsViewMenuOpen(false), children: [
313
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Portrait2.default, { fontSize: "small" }),
314
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Single Page" })
315
- ] }),
316
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-divider" }),
317
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-header", children: "SCROLL LAYOUT" }),
318
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { className: "toolbar-dropdown-item toolbar-dropdown-item-active", onClick: () => setIsViewMenuOpen(false), children: [
319
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _SwapVert2.default, { fontSize: "small" }),
320
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Vertical" })
321
- ] }),
322
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-divider" }),
323
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { className: "toolbar-dropdown-item", onClick: () => {
324
- setIsViewMenuOpen(false);
325
- _optionalChain([onFitToWidth, 'optionalCall', _5 => _5()]);
326
- }, children: [
327
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _AspectRatio2.default, { fontSize: "small" }),
328
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fit to Width" })
329
- ] }),
330
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { className: "toolbar-dropdown-item", onClick: () => {
331
- setIsViewMenuOpen(false);
332
- _optionalChain([onFitToPage, 'optionalCall', _6 => _6()]);
333
- }, children: [
334
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _FitScreen2.default, { fontSize: "small" }),
335
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fit to Page" })
336
- ] }),
337
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-divider" }),
338
- showRotation && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
339
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-header", children: "PAGE ROTATION" }),
340
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
341
- "button",
342
- {
343
- className: "toolbar-dropdown-item",
344
- onClick: () => {
345
- setIsViewMenuOpen(false);
346
- _optionalChain([onRotateRight, 'optionalCall', _7 => _7()]);
347
- },
348
- disabled: false,
349
- children: [
350
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _RotateRight2.default, { fontSize: "small" }),
351
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Rotate Clockwise" })
352
- ]
353
- }
354
- ),
355
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
356
- "button",
357
- {
358
- className: "toolbar-dropdown-item",
359
- onClick: () => {
360
- setIsViewMenuOpen(false);
361
- _optionalChain([onRotateLeft, 'optionalCall', _8 => _8()]);
362
- },
363
- disabled: disabledRotateLeft,
364
- children: [
365
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _RotateLeft2.default, { fontSize: "small" }),
366
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Rotate Counter-Clockwise" })
367
- ]
368
- }
369
- )
370
- ] }),
371
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-divider" }),
380
+ ),
381
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
382
+ "button",
383
+ {
384
+ className: `toolbar-dropdown-item ${scrollStrategy === _pdfviewer.ScrollStrategy.Horizontal ? "toolbar-dropdown-item-active" : ""}`,
385
+ onClick: () => {
386
+ setIsViewMenuOpen(false);
387
+ _optionalChain([onScrollStrategyChange, 'optionalCall', _8 => _8(_pdfviewer.ScrollStrategy.Horizontal)]);
388
+ },
389
+ children: [
390
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _SwapHoriz2.default, { fontSize: "small" }),
391
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Horizontal Scroll" })
392
+ ]
393
+ }
394
+ ),
395
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-divider" }),
396
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { className: "toolbar-dropdown-item", onClick: () => {
397
+ setIsViewMenuOpen(false);
398
+ _optionalChain([onFitToWidth, 'optionalCall', _9 => _9()]);
399
+ }, children: [
400
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _AspectRatio2.default, { fontSize: "small" }),
401
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fit to Width" })
402
+ ] }),
403
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { className: "toolbar-dropdown-item", onClick: () => {
404
+ setIsViewMenuOpen(false);
405
+ _optionalChain([onFitToPage, 'optionalCall', _10 => _10()]);
406
+ }, children: [
407
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _FitScreen2.default, { fontSize: "small" }),
408
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fit to Page" })
409
+ ] }),
410
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-divider" }),
411
+ showRotation && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
412
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-header", children: "PAGE ROTATION" }),
372
413
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
373
414
  "button",
374
415
  {
375
416
  className: "toolbar-dropdown-item",
376
417
  onClick: () => {
377
418
  setIsViewMenuOpen(false);
378
- onToggleFullScreen();
419
+ _optionalChain([onRotateRight, 'optionalCall', _11 => _11()]);
379
420
  },
421
+ disabled: false,
380
422
  children: [
381
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Fullscreen2.default, { fontSize: "small" }),
382
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fullscreen" })
423
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _RotateRight2.default, { fontSize: "small" }),
424
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Rotate Clockwise" })
383
425
  ]
384
426
  }
385
- )
386
- ] })
387
- ] }) })
388
- ] }),
389
- showSearch && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
390
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-separator" }),
391
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-section", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Search", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
392
- "button",
393
- {
394
- className: `toolbar-button ${isSidebarOpen ? "toolbar-button-active" : ""}`,
395
- onClick: onToggleSidebar,
396
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Search2.default, { fontSize: "small" })
397
- }
398
- ) }) })
399
- ] })
400
- ] }),
401
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-center", children: [
402
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
403
- "button",
404
- {
405
- className: `toolbar-tab ${activeMode === "view" ? "toolbar-tab-active" : ""}`,
406
- onClick: () => setActiveMode("view"),
407
- children: "View"
408
- }
409
- ),
410
- showAnnotate && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
411
- "button",
412
- {
413
- className: `toolbar-tab ${activeMode === "annotate" ? "toolbar-tab-active" : ""}`,
414
- onClick: () => !disabledAnnotate && setActiveMode("annotate"),
415
- style: {
416
- position: "relative",
417
- opacity: disabledAnnotate ? 0.5 : 1,
418
- cursor: disabledAnnotate ? "not-allowed" : "pointer"
419
- },
420
- children: [
421
- "Annotate",
422
- hasUnsavedAnnotations && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: {
423
- position: "absolute",
424
- top: "4px",
425
- right: "4px",
426
- width: "6px",
427
- height: "6px",
428
- backgroundColor: "#ef4444",
429
- borderRadius: "50%"
430
- } })
431
- ]
432
- }
433
- )
434
- ] }),
435
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-right", children: (hasUnsavedAnnotations || showDownload || showPrint || showMetadata || showProperties || showTags || showHistory) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
436
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-separator" }),
437
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-section", children: [
438
- showDownload && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-container", ref: downloadMenuRef, children: showDownloadOriginal && showDownloadWithAnnotations ? (
439
- // RENDER DROPDOWN if BOTH are enabled
440
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
441
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Download", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
427
+ ),
428
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
442
429
  "button",
443
430
  {
444
- className: `toolbar-button toolbar-dropdown-button ${isDownloadMenuOpen ? "toolbar-button-active" : ""}`,
445
- onClick: () => setIsDownloadMenuOpen(!isDownloadMenuOpen),
446
- disabled: disabledDownload,
431
+ className: "toolbar-dropdown-item",
432
+ onClick: () => {
433
+ setIsViewMenuOpen(false);
434
+ _optionalChain([onRotateLeft, 'optionalCall', _12 => _12()]);
435
+ },
436
+ disabled: disabledRotateLeft,
447
437
  children: [
448
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Download2.default, { fontSize: "small" }),
449
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _KeyboardArrowDown2.default, { fontSize: "small", style: { marginLeft: -4 } })
438
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _RotateLeft2.default, { fontSize: "small" }),
439
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Rotate Counter-Clockwise" })
450
440
  ]
451
441
  }
452
- ) }) }),
453
- isDownloadMenuOpen && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-dropdown-menu toolbar-dropdown-menu-right", children: [
454
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
455
- "button",
456
- {
457
- className: "toolbar-dropdown-item",
458
- onClick: handleDownloadWithoutAnnotations,
459
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Download Document Only" })
460
- }
461
- ),
462
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
463
- "button",
464
- {
465
- className: "toolbar-dropdown-item",
466
- onClick: handleDownloadWithAnnotations,
467
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Download with Annotations" })
468
- }
469
- )
470
- ] })
471
- ] })
472
- ) : (
473
- // RENDER SINGLE BUTTON if ONLY ONE is enabled
474
- (showDownloadOriginal || showDownloadWithAnnotations) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Download", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
442
+ )
443
+ ] }),
444
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-divider" }),
445
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
446
+ "button",
447
+ {
448
+ className: "toolbar-dropdown-item",
449
+ onClick: () => {
450
+ setIsViewMenuOpen(false);
451
+ onToggleFullScreen();
452
+ },
453
+ children: [
454
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Fullscreen2.default, { fontSize: "small" }),
455
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fullscreen" })
456
+ ]
457
+ }
458
+ )
459
+ ] })
460
+ ] }) })
461
+ ] }),
462
+ showSearch && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
463
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-separator" }),
464
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-section", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Search", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
465
+ "button",
466
+ {
467
+ className: `toolbar-button ${isSidebarOpen ? "toolbar-button-active" : ""}`,
468
+ onClick: onToggleSidebar,
469
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Search2.default, { fontSize: "small" })
470
+ }
471
+ ) }) })
472
+ ] })
473
+ ] }),
474
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-center", children: [
475
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
476
+ "button",
477
+ {
478
+ className: `toolbar-tab ${activeMode === "view" ? "toolbar-tab-active" : ""}`,
479
+ onClick: () => _optionalChain([onActiveModeChange, 'optionalCall', _13 => _13("view")]),
480
+ children: "View"
481
+ }
482
+ ),
483
+ showAnnotate && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
484
+ "button",
485
+ {
486
+ className: `toolbar-tab ${activeMode === "annotate" ? "toolbar-tab-active" : ""}`,
487
+ onClick: () => !disabledAnnotate && _optionalChain([onActiveModeChange, 'optionalCall', _14 => _14("annotate")]),
488
+ style: {
489
+ position: "relative",
490
+ opacity: disabledAnnotate ? 0.5 : 1,
491
+ cursor: disabledAnnotate ? "not-allowed" : "pointer"
492
+ },
493
+ children: [
494
+ "Annotate",
495
+ hasUnsavedAnnotations && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: {
496
+ position: "absolute",
497
+ top: "4px",
498
+ right: "4px",
499
+ width: "6px",
500
+ height: "6px",
501
+ backgroundColor: "#ef4444",
502
+ borderRadius: "50%"
503
+ } })
504
+ ]
505
+ }
506
+ )
507
+ ] }),
508
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-right", children: (hasUnsavedAnnotations || showDownload || showPrint || showMetadata || showProperties || showTags || showHistory) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
509
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-separator" }),
510
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-section", children: [
511
+ showDownload && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-container", ref: downloadMenuRef, children: showDownloadOriginal && showDownloadWithAnnotations ? (
512
+ // RENDER DROPDOWN if BOTH are enabled
513
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
514
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Download", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
475
515
  "button",
476
516
  {
477
- className: "toolbar-button",
478
- onClick: showDownloadOriginal ? handleDownloadWithoutAnnotations : handleDownloadWithAnnotations,
517
+ className: `toolbar-button toolbar-dropdown-button ${isDownloadMenuOpen ? "toolbar-button-active" : ""}`,
518
+ onClick: () => setIsDownloadMenuOpen(!isDownloadMenuOpen),
479
519
  disabled: disabledDownload,
480
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Download2.default, { fontSize: "small" })
520
+ children: [
521
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Download2.default, { fontSize: "small" }),
522
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _KeyboardArrowDown2.default, { fontSize: "small", style: { marginLeft: -4 } })
523
+ ]
481
524
  }
482
- ) }) })
483
- ) }),
484
- showPrint && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-container", ref: printMenuRef, children: showPrintOriginal && showPrintWithAnnotations ? (
485
- // RENDER DROPDOWN if BOTH are enabled
486
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
487
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Print", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
525
+ ) }) }),
526
+ isDownloadMenuOpen && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-dropdown-menu toolbar-dropdown-menu-right", children: [
527
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
488
528
  "button",
489
529
  {
490
- className: `toolbar-button toolbar-dropdown-button ${isPrintMenuOpen ? "toolbar-button-active" : ""}`,
491
- onClick: () => setIsPrintMenuOpen(!isPrintMenuOpen),
492
- disabled: disabledPrint,
493
- children: [
494
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Print2.default, { fontSize: "small" }),
495
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _KeyboardArrowDown2.default, { fontSize: "small", style: { marginLeft: -4 } })
496
- ]
530
+ className: "toolbar-dropdown-item",
531
+ onClick: handleDownloadWithoutAnnotations,
532
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Download Document Only" })
497
533
  }
498
- ) }) }),
499
- isPrintMenuOpen && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-dropdown-menu toolbar-dropdown-menu-right", children: [
500
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
501
- "button",
502
- {
503
- className: "toolbar-dropdown-item",
504
- onClick: handlePrintWithoutAnnotations,
505
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Print Document Only" })
506
- }
507
- ),
508
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
509
- "button",
510
- {
511
- className: "toolbar-dropdown-item",
512
- onClick: handlePrintWithAnnotations,
513
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Print with Annotations" })
514
- }
515
- )
516
- ] })
534
+ ),
535
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
536
+ "button",
537
+ {
538
+ className: "toolbar-dropdown-item",
539
+ onClick: handleDownloadWithAnnotations,
540
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Download with Annotations" })
541
+ }
542
+ )
517
543
  ] })
518
- ) : (
519
- // RENDER SINGLE BUTTON if ONLY ONE is enabled
520
- (showPrintOriginal || showPrintWithAnnotations) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Print", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
521
- "button",
522
- {
523
- className: "toolbar-button",
524
- onClick: showPrintOriginal ? handlePrintWithoutAnnotations : handlePrintWithAnnotations,
525
- disabled: disabledPrint,
526
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Print2.default, { fontSize: "small" })
527
- }
528
- ) }) })
529
- ) }),
530
- showMetadata && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Metadata", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
531
- "button",
532
- {
533
- className: "toolbar-button",
534
- onClick: onMetadataClick,
535
- disabled: disabledMetadata,
536
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Description2.default, { fontSize: "small" })
537
- }
538
- ) }) }),
539
- showProperties && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Properties", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
540
- "button",
541
- {
542
- className: "toolbar-button",
543
- onClick: onPropertiesClick,
544
- disabled: disabledProperties,
545
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Info2.default, { fontSize: "small" })
546
- }
547
- ) }) }),
548
- showTags && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Tags", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
544
+ ] })
545
+ ) : (
546
+ // RENDER SINGLE BUTTON if ONLY ONE is enabled
547
+ (showDownloadOriginal || showDownloadWithAnnotations) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Download", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
549
548
  "button",
550
549
  {
551
550
  className: "toolbar-button",
552
- onClick: onTagsClick,
553
- disabled: disabledTags,
554
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsmaterial.LocalOffer, { fontSize: "small" })
551
+ onClick: showDownloadOriginal ? handleDownloadWithoutAnnotations : handleDownloadWithAnnotations,
552
+ disabled: disabledDownload,
553
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Download2.default, { fontSize: "small" })
555
554
  }
556
- ) }) }),
557
- showHistory && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Version History", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
555
+ ) }) })
556
+ ) }),
557
+ showPrint && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "toolbar-dropdown-container", ref: printMenuRef, children: showPrintOriginal && showPrintWithAnnotations ? (
558
+ // RENDER DROPDOWN if BOTH are enabled
559
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
560
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Print", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
561
+ "button",
562
+ {
563
+ className: `toolbar-button toolbar-dropdown-button ${isPrintMenuOpen ? "toolbar-button-active" : ""}`,
564
+ onClick: () => setIsPrintMenuOpen(!isPrintMenuOpen),
565
+ disabled: disabledPrint,
566
+ children: [
567
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Print2.default, { fontSize: "small" }),
568
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _KeyboardArrowDown2.default, { fontSize: "small", style: { marginLeft: -4 } })
569
+ ]
570
+ }
571
+ ) }) }),
572
+ isPrintMenuOpen && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "toolbar-dropdown-menu toolbar-dropdown-menu-right", children: [
573
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
574
+ "button",
575
+ {
576
+ className: "toolbar-dropdown-item",
577
+ onClick: handlePrintWithoutAnnotations,
578
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Print Document Only" })
579
+ }
580
+ ),
581
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
582
+ "button",
583
+ {
584
+ className: "toolbar-dropdown-item",
585
+ onClick: handlePrintWithAnnotations,
586
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Print with Annotations" })
587
+ }
588
+ )
589
+ ] })
590
+ ] })
591
+ ) : (
592
+ // RENDER SINGLE BUTTON if ONLY ONE is enabled
593
+ (showPrintOriginal || showPrintWithAnnotations) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Print", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
558
594
  "button",
559
595
  {
560
596
  className: "toolbar-button",
561
- onClick: onHistoryClick,
562
- disabled: disabledHistory,
563
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _History2.default, { fontSize: "small" })
597
+ onClick: showPrintOriginal ? handlePrintWithoutAnnotations : handlePrintWithAnnotations,
598
+ disabled: disabledPrint,
599
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Print2.default, { fontSize: "small" })
564
600
  }
565
601
  ) }) })
566
- ] })
567
- ] }) })
568
- ] }),
569
- activeMode === "annotate" && showAnnotations && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "pdf-viewer-secondary-toolbar", children: [
570
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Highlight", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
571
- "button",
572
- {
573
- className: `toolbar-button ${isHighlighterActive ? "toolbar-button-active" : ""}`,
574
- onClick: onHighlighterClick,
575
- disabled: disabledHighlighter,
576
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Highlight2.default, { fontSize: "small" })
577
- }
578
- ) }) }),
579
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Stamp", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
580
- "button",
581
- {
582
- className: `toolbar-button ${isStampActive ? "toolbar-button-active" : ""}`,
583
- onClick: onStampClick,
584
- disabled: disabledStamp,
585
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Approval2.default, { fontSize: "small" })
586
- }
587
- ) }) }),
588
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Signature", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
589
- "button",
590
- {
591
- className: "toolbar-button",
592
- onClick: onSignatureClick,
593
- disabled: disabledSignature,
594
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Draw2.default, { fontSize: "small" })
595
- }
596
- ) }) }),
597
- onNoteClick && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Sticky Note", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
598
- "button",
599
- {
600
- className: "toolbar-button",
601
- onClick: onNoteClick,
602
- disabled: disabledNote,
603
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _StickyNote22.default, { fontSize: "small" })
604
- }
605
- ) }) }),
606
- hasUnsavedAnnotations && canSaveAnnotations !== false && onSaveAnnotations && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
607
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { width: 1, height: 24, backgroundColor: "#e5e7eb", margin: "0 8px" } }),
608
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Save Annotations", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
602
+ ) }),
603
+ showMetadata && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Metadata", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
609
604
  "button",
610
605
  {
611
606
  className: "toolbar-button",
612
- onClick: onSaveAnnotations,
613
- disabled: isSavingAnnotations,
614
- style: {
615
- color: hasUnsavedAnnotations ? "#2563eb" : "inherit",
616
- padding: "6px 16px",
617
- border: hasUnsavedAnnotations ? "1px solid #2563eb" : "1px solid transparent",
618
- borderRadius: "6px",
619
- display: "flex",
620
- alignItems: "center",
621
- gap: "6px",
622
- backgroundColor: hasUnsavedAnnotations ? "#eff6ff" : "transparent",
623
- fontSize: "14px",
624
- fontWeight: 500,
625
- width: "auto",
626
- cursor: isSavingAnnotations ? "not-allowed" : "pointer"
627
- },
628
- children: [
629
- isSavingAnnotations ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 24 24", style: { animation: "spin 1s linear infinite" }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3", fill: "none", strokeDasharray: "31.4", strokeDashoffset: "10" }) }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
630
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" }),
631
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "polyline", { points: "17 21 17 13 7 13 7 21" }),
632
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "polyline", { points: "7 3 7 8 15 8" })
633
- ] }),
634
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isSavingAnnotations ? "Saving..." : "Save" })
635
- ]
607
+ onClick: onMetadataClick,
608
+ disabled: disabledMetadata,
609
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Description2.default, { fontSize: "small" })
610
+ }
611
+ ) }) }),
612
+ showProperties && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Properties", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
613
+ "button",
614
+ {
615
+ className: "toolbar-button",
616
+ onClick: onPropertiesClick,
617
+ disabled: disabledProperties,
618
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Info2.default, { fontSize: "small" })
619
+ }
620
+ ) }) }),
621
+ showTags && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Tags", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
622
+ "button",
623
+ {
624
+ className: "toolbar-button",
625
+ onClick: onTagsClick,
626
+ disabled: disabledTags,
627
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsmaterial.LocalOffer, { fontSize: "small" })
628
+ }
629
+ ) }) }),
630
+ showHistory && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Version History", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
631
+ "button",
632
+ {
633
+ className: "toolbar-button",
634
+ onClick: onHistoryClick,
635
+ disabled: disabledHistory,
636
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _History2.default, { fontSize: "small" })
636
637
  }
637
638
  ) }) })
638
639
  ] })
639
- ] }),
640
- activeMode === "redact" && showAnnotations && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "pdf-viewer-secondary-toolbar", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Redact Text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { className: "toolbar-button", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _AutoFixHigh2.default, { fontSize: "small" }) }) }) })
641
- ] });
640
+ ] }) })
641
+ ] }) });
642
642
  }
643
643
  );
644
644
  PDFToolbar.displayName = "PDFToolbar";
645
+ var PDFSecondaryToolbar = _react2.default.memo(({
646
+ activeMode,
647
+ showAnnotations,
648
+ isHighlighterActive,
649
+ isStampActive,
650
+ disabledHighlighter,
651
+ disabledStamp,
652
+ disabledSignature,
653
+ disabledNote,
654
+ onHighlighterClick,
655
+ onStampClick,
656
+ onSignatureClick,
657
+ onNoteClick,
658
+ hasUnsavedAnnotations,
659
+ isSavingAnnotations,
660
+ canSaveAnnotations,
661
+ onSaveAnnotations
662
+ }) => {
663
+ if (!showAnnotations) return null;
664
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
665
+ activeMode === "annotate" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "pdf-viewer-secondary-toolbar", children: [
666
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Highlight", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
667
+ "button",
668
+ {
669
+ className: `toolbar-button ${isHighlighterActive ? "toolbar-button-active" : ""}`,
670
+ onClick: onHighlighterClick,
671
+ disabled: disabledHighlighter,
672
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Highlight2.default, { fontSize: "small" })
673
+ }
674
+ ) }) }),
675
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Stamp", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
676
+ "button",
677
+ {
678
+ className: `toolbar-button ${isStampActive ? "toolbar-button-active" : ""}`,
679
+ onClick: onStampClick,
680
+ disabled: disabledStamp,
681
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Approval2.default, { fontSize: "small" })
682
+ }
683
+ ) }) }),
684
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Signature", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
685
+ "button",
686
+ {
687
+ className: "toolbar-button",
688
+ onClick: onSignatureClick,
689
+ disabled: disabledSignature,
690
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Draw2.default, { fontSize: "small" })
691
+ }
692
+ ) }) }),
693
+ onNoteClick && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Sticky Note", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
694
+ "button",
695
+ {
696
+ className: "toolbar-button",
697
+ onClick: onNoteClick,
698
+ disabled: disabledNote,
699
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _StickyNote22.default, { fontSize: "small" })
700
+ }
701
+ ) }) }),
702
+ hasUnsavedAnnotations && canSaveAnnotations !== false && onSaveAnnotations && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
703
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { width: 1, height: 24, backgroundColor: "#e5e7eb", margin: "0 8px" } }),
704
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Save Annotations", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
705
+ "button",
706
+ {
707
+ className: "toolbar-button",
708
+ onClick: onSaveAnnotations,
709
+ disabled: isSavingAnnotations,
710
+ style: {
711
+ color: hasUnsavedAnnotations ? "#2563eb" : "inherit",
712
+ padding: "6px 16px",
713
+ border: hasUnsavedAnnotations ? "1px solid #2563eb" : "1px solid transparent",
714
+ borderRadius: "6px",
715
+ display: "flex",
716
+ alignItems: "center",
717
+ gap: "6px",
718
+ backgroundColor: hasUnsavedAnnotations ? "#eff6ff" : "transparent",
719
+ fontSize: "14px",
720
+ fontWeight: 500,
721
+ width: "auto",
722
+ cursor: isSavingAnnotations ? "not-allowed" : "pointer"
723
+ },
724
+ children: [
725
+ isSavingAnnotations ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 24 24", style: { animation: "spin 1s linear infinite" }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3", fill: "none", strokeDasharray: "31.4", strokeDashoffset: "10" }) }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
726
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" }),
727
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "polyline", { points: "17 21 17 13 7 13 7 21" }),
728
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "polyline", { points: "7 3 7 8 15 8" })
729
+ ] }),
730
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isSavingAnnotations ? "Saving..." : "Save" })
731
+ ]
732
+ }
733
+ ) }) })
734
+ ] })
735
+ ] }),
736
+ activeMode === "redact" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "pdf-viewer-secondary-toolbar", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: "Redact Text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { className: "toolbar-button", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _AutoFixHigh2.default, { fontSize: "small" }) }) }) })
737
+ ] });
738
+ });
739
+ PDFSecondaryToolbar.displayName = "PDFSecondaryToolbar";
740
+ PDFToolbar.displayName = "PDFToolbar";
645
741
 
646
742
  // src/components/viewers/pdf/PDFHeader.tsx
647
743
 
@@ -1318,6 +1414,7 @@ var PasswordDialog = ({
1318
1414
 
1319
1415
  // src/components/viewers/PDFViewer.tsx
1320
1416
 
1417
+
1321
1418
  var PDFViewerContent = _react.forwardRef.call(void 0,
1322
1419
  (props, ref) => {
1323
1420
  const {
@@ -1372,7 +1469,8 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1372
1469
  isSavingAnnotations,
1373
1470
  canSaveAnnotations,
1374
1471
  onSaveAnnotations,
1375
- loading
1472
+ loading,
1473
+ themeMode = "light"
1376
1474
  } = props;
1377
1475
  const [pdfBuffer, setPdfBuffer] = _react.useState.call(void 0, null);
1378
1476
  const [state, setState] = _react.useState.call(void 0, "idle");
@@ -1398,7 +1496,7 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1398
1496
  );
1399
1497
  const [currentPage, setCurrentPage] = _react.useState.call(void 0, 1);
1400
1498
  const [totalPages, setTotalPages] = _react.useState.call(void 0, 0);
1401
- const [zoom, setZoom] = _react.useState.call(void 0, 100);
1499
+ const [zoom, setZoom] = _react.useState.call(void 0, 122);
1402
1500
  const [searchQuery, setSearchQuery] = _react.useState.call(void 0, "");
1403
1501
  const [isSearching, setIsSearching] = _react.useState.call(void 0, false);
1404
1502
  const [pdfContainer, setPdfContainer] = _react.useState.call(void 0, null);
@@ -1410,6 +1508,10 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1410
1508
  !!initialSearchText
1411
1509
  );
1412
1510
  const [isFullScreen, setIsFullScreen] = _react.useState.call(void 0, false);
1511
+ const [twoPageMode, setTwoPageMode] = _react.useState.call(void 0, false);
1512
+ const [scrollStrategy, setScrollStrategy] = _react.useState.call(void 0, _pdfviewer.ScrollStrategy.Vertical);
1513
+ const [showThumbnails, setShowThumbnails] = _react.useState.call(void 0, true);
1514
+ const [activeMode, setActiveMode] = _react.useState.call(void 0, "view");
1413
1515
  const containerRef = _react.useRef.call(void 0, null);
1414
1516
  const [isPasswordDialogOpen, setIsPasswordDialogOpen] = _react.useState.call(void 0, false);
1415
1517
  const [passwordError, setPasswordError] = _react.useState.call(void 0, "");
@@ -1418,7 +1520,7 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1418
1520
  const passwordTimeoutRef = _react.useRef.call(void 0, null);
1419
1521
  const hasExecutedInitialSearch = _react.useRef.call(void 0, false);
1420
1522
  const handleToggleFullScreen = _react.useCallback.call(void 0, () => {
1421
- if (!isFullScreen && _optionalChain([containerRef, 'access', _9 => _9.current, 'optionalAccess', _10 => _10.requestFullscreen])) {
1523
+ if (!isFullScreen && _optionalChain([containerRef, 'access', _15 => _15.current, 'optionalAccess', _16 => _16.requestFullscreen])) {
1422
1524
  containerRef.current.requestFullscreen();
1423
1525
  setIsFullScreen(true);
1424
1526
  } else if (isFullScreen && document.exitFullscreen) {
@@ -1442,7 +1544,7 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1442
1544
  setSearchResults([]);
1443
1545
  setTotalSearchResults(0);
1444
1546
  setCurrentSearchResultIndex(0);
1445
- _optionalChain([pdfViewerRef, 'access', _11 => _11.current, 'optionalAccess', _12 => _12.search, 'access', _13 => _13.stopSearch, 'call', _14 => _14()]);
1547
+ _optionalChain([pdfViewerRef, 'access', _17 => _17.current, 'optionalAccess', _18 => _18.search, 'access', _19 => _19.stopSearch, 'call', _20 => _20()]);
1446
1548
  }, []);
1447
1549
  const toolbar = _chunkEM63H4SAjs.mergeToolbarConfig.call(void 0, {
1448
1550
  showDownload,
@@ -1463,66 +1565,66 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1463
1565
  const toolbarHandlers = _react.useMemo.call(void 0,
1464
1566
  () => ({
1465
1567
  handleZoomIn: () => {
1466
- _optionalChain([pdfViewerRef, 'access', _15 => _15.current, 'optionalAccess', _16 => _16.zoom, 'access', _17 => _17.zoomIn, 'call', _18 => _18()]);
1568
+ _optionalChain([pdfViewerRef, 'access', _21 => _21.current, 'optionalAccess', _22 => _22.zoom, 'access', _23 => _23.zoomIn, 'call', _24 => _24()]);
1467
1569
  requestAnimationFrame(() => {
1468
- const zoomValue = _optionalChain([pdfViewerRef, 'access', _19 => _19.current, 'optionalAccess', _20 => _20.zoom, 'access', _21 => _21.getZoom, 'call', _22 => _22()]);
1570
+ const zoomValue = _optionalChain([pdfViewerRef, 'access', _25 => _25.current, 'optionalAccess', _26 => _26.zoom, 'access', _27 => _27.getZoom, 'call', _28 => _28()]);
1469
1571
  if (typeof zoomValue === "number") {
1470
1572
  setZoom(Math.round(zoomValue * 100));
1471
1573
  }
1472
1574
  });
1473
1575
  },
1474
1576
  handleZoomOut: () => {
1475
- _optionalChain([pdfViewerRef, 'access', _23 => _23.current, 'optionalAccess', _24 => _24.zoom, 'access', _25 => _25.zoomOut, 'call', _26 => _26()]);
1577
+ _optionalChain([pdfViewerRef, 'access', _29 => _29.current, 'optionalAccess', _30 => _30.zoom, 'access', _31 => _31.zoomOut, 'call', _32 => _32()]);
1476
1578
  requestAnimationFrame(() => {
1477
- const zoomValue = _optionalChain([pdfViewerRef, 'access', _27 => _27.current, 'optionalAccess', _28 => _28.zoom, 'access', _29 => _29.getZoom, 'call', _30 => _30()]);
1579
+ const zoomValue = _optionalChain([pdfViewerRef, 'access', _33 => _33.current, 'optionalAccess', _34 => _34.zoom, 'access', _35 => _35.getZoom, 'call', _36 => _36()]);
1478
1580
  if (typeof zoomValue === "number") {
1479
1581
  setZoom(Math.round(zoomValue * 100));
1480
1582
  }
1481
1583
  });
1482
1584
  },
1483
1585
  handleFitToWidth: () => {
1484
- _optionalChain([pdfViewerRef, 'access', _31 => _31.current, 'optionalAccess', _32 => _32.zoom, 'access', _33 => _33.fitToWidth, 'call', _34 => _34()]);
1586
+ _optionalChain([pdfViewerRef, 'access', _37 => _37.current, 'optionalAccess', _38 => _38.zoom, 'access', _39 => _39.fitToWidth, 'call', _40 => _40()]);
1485
1587
  requestAnimationFrame(() => {
1486
- const zoomValue = _optionalChain([pdfViewerRef, 'access', _35 => _35.current, 'optionalAccess', _36 => _36.zoom, 'access', _37 => _37.getZoom, 'call', _38 => _38()]);
1588
+ const zoomValue = _optionalChain([pdfViewerRef, 'access', _41 => _41.current, 'optionalAccess', _42 => _42.zoom, 'access', _43 => _43.getZoom, 'call', _44 => _44()]);
1487
1589
  if (typeof zoomValue === "number") {
1488
1590
  setZoom(Math.round(zoomValue * 100));
1489
1591
  }
1490
1592
  });
1491
1593
  },
1492
1594
  handleFitToPage: () => {
1493
- _optionalChain([pdfViewerRef, 'access', _39 => _39.current, 'optionalAccess', _40 => _40.zoom, 'access', _41 => _41.fitToPage, 'call', _42 => _42()]);
1595
+ _optionalChain([pdfViewerRef, 'access', _45 => _45.current, 'optionalAccess', _46 => _46.zoom, 'access', _47 => _47.fitToPage, 'call', _48 => _48()]);
1494
1596
  requestAnimationFrame(() => {
1495
- const zoomValue = _optionalChain([pdfViewerRef, 'access', _43 => _43.current, 'optionalAccess', _44 => _44.zoom, 'access', _45 => _45.getZoom, 'call', _46 => _46()]);
1597
+ const zoomValue = _optionalChain([pdfViewerRef, 'access', _49 => _49.current, 'optionalAccess', _50 => _50.zoom, 'access', _51 => _51.getZoom, 'call', _52 => _52()]);
1496
1598
  if (typeof zoomValue === "number") {
1497
1599
  setZoom(Math.round(zoomValue * 100));
1498
1600
  }
1499
1601
  });
1500
1602
  },
1501
1603
  handlePreviousPage: () => {
1502
- _optionalChain([pdfViewerRef, 'access', _47 => _47.current, 'optionalAccess', _48 => _48.navigation, 'access', _49 => _49.previousPage, 'call', _50 => _50()]);
1604
+ _optionalChain([pdfViewerRef, 'access', _53 => _53.current, 'optionalAccess', _54 => _54.navigation, 'access', _55 => _55.previousPage, 'call', _56 => _56()]);
1503
1605
  requestAnimationFrame(() => {
1504
- const current = _optionalChain([pdfViewerRef, 'access', _51 => _51.current, 'optionalAccess', _52 => _52.navigation, 'access', _53 => _53.getCurrentPage, 'call', _54 => _54()]) || 1;
1606
+ const current = _optionalChain([pdfViewerRef, 'access', _57 => _57.current, 'optionalAccess', _58 => _58.navigation, 'access', _59 => _59.getCurrentPage, 'call', _60 => _60()]) || 1;
1505
1607
  setCurrentPage(current);
1506
1608
  });
1507
1609
  },
1508
1610
  handleNextPage: () => {
1509
- _optionalChain([pdfViewerRef, 'access', _55 => _55.current, 'optionalAccess', _56 => _56.navigation, 'access', _57 => _57.nextPage, 'call', _58 => _58()]);
1611
+ _optionalChain([pdfViewerRef, 'access', _61 => _61.current, 'optionalAccess', _62 => _62.navigation, 'access', _63 => _63.nextPage, 'call', _64 => _64()]);
1510
1612
  requestAnimationFrame(() => {
1511
- const current = _optionalChain([pdfViewerRef, 'access', _59 => _59.current, 'optionalAccess', _60 => _60.navigation, 'access', _61 => _61.getCurrentPage, 'call', _62 => _62()]) || 1;
1613
+ const current = _optionalChain([pdfViewerRef, 'access', _65 => _65.current, 'optionalAccess', _66 => _66.navigation, 'access', _67 => _67.getCurrentPage, 'call', _68 => _68()]) || 1;
1512
1614
  setCurrentPage(current);
1513
1615
  });
1514
1616
  },
1515
1617
  handleFirstPage: () => {
1516
- _optionalChain([pdfViewerRef, 'access', _63 => _63.current, 'optionalAccess', _64 => _64.navigation, 'access', _65 => _65.goToFirstPage, 'call', _66 => _66()]);
1618
+ _optionalChain([pdfViewerRef, 'access', _69 => _69.current, 'optionalAccess', _70 => _70.navigation, 'access', _71 => _71.goToFirstPage, 'call', _72 => _72()]);
1517
1619
  requestAnimationFrame(() => {
1518
- const current = _optionalChain([pdfViewerRef, 'access', _67 => _67.current, 'optionalAccess', _68 => _68.navigation, 'access', _69 => _69.getCurrentPage, 'call', _70 => _70()]) || 1;
1620
+ const current = _optionalChain([pdfViewerRef, 'access', _73 => _73.current, 'optionalAccess', _74 => _74.navigation, 'access', _75 => _75.getCurrentPage, 'call', _76 => _76()]) || 1;
1519
1621
  setCurrentPage(current);
1520
1622
  });
1521
1623
  },
1522
1624
  handleLastPage: () => {
1523
- _optionalChain([pdfViewerRef, 'access', _71 => _71.current, 'optionalAccess', _72 => _72.navigation, 'access', _73 => _73.goToLastPage, 'call', _74 => _74()]);
1625
+ _optionalChain([pdfViewerRef, 'access', _77 => _77.current, 'optionalAccess', _78 => _78.navigation, 'access', _79 => _79.goToLastPage, 'call', _80 => _80()]);
1524
1626
  requestAnimationFrame(() => {
1525
- const current = _optionalChain([pdfViewerRef, 'access', _75 => _75.current, 'optionalAccess', _76 => _76.navigation, 'access', _77 => _77.getCurrentPage, 'call', _78 => _78()]) || 1;
1627
+ const current = _optionalChain([pdfViewerRef, 'access', _81 => _81.current, 'optionalAccess', _82 => _82.navigation, 'access', _83 => _83.getCurrentPage, 'call', _84 => _84()]) || 1;
1526
1628
  setCurrentPage(current);
1527
1629
  });
1528
1630
  },
@@ -1540,7 +1642,7 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1540
1642
  }
1541
1643
  const page = parseInt(value, 10);
1542
1644
  if (!isNaN(page) && page >= 1 && (totalPages === 0 || page <= totalPages)) {
1543
- _optionalChain([pdfViewerRef, 'access', _79 => _79.current, 'optionalAccess', _80 => _80.navigation, 'access', _81 => _81.goToPage, 'call', _82 => _82(page)]);
1645
+ _optionalChain([pdfViewerRef, 'access', _85 => _85.current, 'optionalAccess', _86 => _86.navigation, 'access', _87 => _87.goToPage, 'call', _88 => _88(page)]);
1544
1646
  setCurrentPage(page);
1545
1647
  }
1546
1648
  },
@@ -1549,78 +1651,78 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1549
1651
  const value = e.target.value;
1550
1652
  const page = parseInt(value, 10);
1551
1653
  if (!isNaN(page) && page >= 1 && (totalPages === 0 || page <= totalPages)) {
1552
- _optionalChain([pdfViewerRef, 'access', _83 => _83.current, 'optionalAccess', _84 => _84.navigation, 'access', _85 => _85.goToPage, 'call', _86 => _86(page)]);
1654
+ _optionalChain([pdfViewerRef, 'access', _89 => _89.current, 'optionalAccess', _90 => _90.navigation, 'access', _91 => _91.goToPage, 'call', _92 => _92(page)]);
1553
1655
  setCurrentPage(page);
1554
1656
  }
1555
1657
  }
1556
1658
  },
1557
1659
  handleRotateLeft: () => {
1558
- _optionalChain([pdfViewerRef, 'access', _87 => _87.current, 'optionalAccess', _88 => _88.rotate, 'optionalAccess', _89 => _89.rotateBackward, 'call', _90 => _90()]);
1660
+ _optionalChain([pdfViewerRef, 'access', _93 => _93.current, 'optionalAccess', _94 => _94.rotate, 'optionalAccess', _95 => _95.rotateBackward, 'call', _96 => _96()]);
1559
1661
  },
1560
1662
  handleRotateRight: () => {
1561
- _optionalChain([pdfViewerRef, 'access', _91 => _91.current, 'optionalAccess', _92 => _92.rotate, 'optionalAccess', _93 => _93.rotateForward, 'call', _94 => _94()]);
1663
+ _optionalChain([pdfViewerRef, 'access', _97 => _97.current, 'optionalAccess', _98 => _98.rotate, 'optionalAccess', _99 => _99.rotateForward, 'call', _100 => _100()]);
1562
1664
  },
1563
1665
  handlePrint: () => {
1564
- _optionalChain([pdfViewerRef, 'access', _95 => _95.current, 'optionalAccess', _96 => _96.print, 'optionalAccess', _97 => _97.print, 'call', _98 => _98()]);
1666
+ _optionalChain([pdfViewerRef, 'access', _101 => _101.current, 'optionalAccess', _102 => _102.print, 'optionalAccess', _103 => _103.print, 'call', _104 => _104()]);
1565
1667
  },
1566
1668
  handlePrintWithAnnotations: async () => {
1567
1669
  if (onPrintWithAnnotations) {
1568
1670
  await onPrintWithAnnotations();
1569
1671
  } else {
1570
- await _optionalChain([pdfViewerRef, 'access', _99 => _99.current, 'optionalAccess', _100 => _100.print, 'optionalAccess', _101 => _101.printWithAnnotations, 'optionalCall', _102 => _102()]);
1672
+ await _optionalChain([pdfViewerRef, 'access', _105 => _105.current, 'optionalAccess', _106 => _106.print, 'optionalAccess', _107 => _107.printWithAnnotations, 'optionalCall', _108 => _108()]);
1571
1673
  }
1572
1674
  },
1573
1675
  handlePrintWithoutAnnotations: async () => {
1574
1676
  if (onPrintWithoutAnnotations) {
1575
1677
  await onPrintWithoutAnnotations();
1576
1678
  } else {
1577
- await _optionalChain([pdfViewerRef, 'access', _103 => _103.current, 'optionalAccess', _104 => _104.print, 'optionalAccess', _105 => _105.printWithoutAnnotations, 'optionalCall', _106 => _106()]);
1679
+ await _optionalChain([pdfViewerRef, 'access', _109 => _109.current, 'optionalAccess', _110 => _110.print, 'optionalAccess', _111 => _111.printWithoutAnnotations, 'optionalCall', _112 => _112()]);
1578
1680
  }
1579
1681
  },
1580
1682
  handleDownloadWithAnnotations: async () => {
1581
1683
  if (onDownloadWithAnnotations) {
1582
1684
  onDownloadWithAnnotations();
1583
1685
  } else {
1584
- await _optionalChain([pdfViewerRef, 'access', _107 => _107.current, 'optionalAccess', _108 => _108.download, 'optionalAccess', _109 => _109.downloadWithAnnotations, 'optionalCall', _110 => _110(resolvedFileName)]);
1686
+ await _optionalChain([pdfViewerRef, 'access', _113 => _113.current, 'optionalAccess', _114 => _114.download, 'optionalAccess', _115 => _115.downloadWithAnnotations, 'optionalCall', _116 => _116(resolvedFileName)]);
1585
1687
  }
1586
1688
  },
1587
1689
  handleDownloadWithoutAnnotations: async () => {
1588
1690
  if (onDownloadWithoutAnnotations) {
1589
1691
  onDownloadWithoutAnnotations();
1590
1692
  } else {
1591
- await _optionalChain([pdfViewerRef, 'access', _111 => _111.current, 'optionalAccess', _112 => _112.download, 'optionalAccess', _113 => _113.downloadWithoutAnnotations, 'optionalCall', _114 => _114(resolvedFileName)]);
1693
+ await _optionalChain([pdfViewerRef, 'access', _117 => _117.current, 'optionalAccess', _118 => _118.download, 'optionalAccess', _119 => _119.downloadWithoutAnnotations, 'optionalCall', _120 => _120(resolvedFileName)]);
1592
1694
  }
1593
1695
  },
1594
1696
  handleHighlighterClick: () => {
1595
1697
  if (highlighterActive) {
1596
- _optionalChain([pdfViewerRef, 'access', _115 => _115.current, 'optionalAccess', _116 => _116.annotation, 'optionalAccess', _117 => _117.deactivateHighlighter, 'call', _118 => _118()]);
1698
+ _optionalChain([pdfViewerRef, 'access', _121 => _121.current, 'optionalAccess', _122 => _122.annotation, 'optionalAccess', _123 => _123.deactivateHighlighter, 'call', _124 => _124()]);
1597
1699
  setInternalHighlighterActive(false);
1598
1700
  } else {
1599
1701
  if (stampActive) {
1600
- _optionalChain([pdfViewerRef, 'access', _119 => _119.current, 'optionalAccess', _120 => _120.annotation, 'optionalAccess', _121 => _121.deactivateStamp, 'call', _122 => _122()]);
1702
+ _optionalChain([pdfViewerRef, 'access', _125 => _125.current, 'optionalAccess', _126 => _126.annotation, 'optionalAccess', _127 => _127.deactivateStamp, 'call', _128 => _128()]);
1601
1703
  setInternalStampActive(false);
1602
1704
  }
1603
- _optionalChain([pdfViewerRef, 'access', _123 => _123.current, 'optionalAccess', _124 => _124.annotation, 'optionalAccess', _125 => _125.activateHighlighter, 'call', _126 => _126()]);
1705
+ _optionalChain([pdfViewerRef, 'access', _129 => _129.current, 'optionalAccess', _130 => _130.annotation, 'optionalAccess', _131 => _131.activateHighlighter, 'call', _132 => _132()]);
1604
1706
  setInternalHighlighterActive(true);
1605
1707
  }
1606
1708
  },
1607
1709
  handleStampClick: () => {
1608
1710
  if (stampActive) {
1609
- _optionalChain([pdfViewerRef, 'access', _127 => _127.current, 'optionalAccess', _128 => _128.annotation, 'optionalAccess', _129 => _129.deactivateStamp, 'call', _130 => _130()]);
1711
+ _optionalChain([pdfViewerRef, 'access', _133 => _133.current, 'optionalAccess', _134 => _134.annotation, 'optionalAccess', _135 => _135.deactivateStamp, 'call', _136 => _136()]);
1610
1712
  setInternalStampActive(false);
1611
1713
  } else {
1612
1714
  if (highlighterActive) {
1613
- _optionalChain([pdfViewerRef, 'access', _131 => _131.current, 'optionalAccess', _132 => _132.annotation, 'optionalAccess', _133 => _133.deactivateHighlighter, 'call', _134 => _134()]);
1715
+ _optionalChain([pdfViewerRef, 'access', _137 => _137.current, 'optionalAccess', _138 => _138.annotation, 'optionalAccess', _139 => _139.deactivateHighlighter, 'call', _140 => _140()]);
1614
1716
  setInternalHighlighterActive(false);
1615
1717
  }
1616
- _optionalChain([pdfViewerRef, 'access', _135 => _135.current, 'optionalAccess', _136 => _136.annotation, 'optionalAccess', _137 => _137.activateStamp, 'call', _138 => _138("")]);
1718
+ _optionalChain([pdfViewerRef, 'access', _141 => _141.current, 'optionalAccess', _142 => _142.annotation, 'optionalAccess', _143 => _143.activateStamp, 'call', _144 => _144("")]);
1617
1719
  setInternalStampActive(true);
1618
1720
  }
1619
1721
  },
1620
1722
  handleSignatureClick: () => {
1621
1723
  },
1622
1724
  handleCopy: () => {
1623
- _optionalChain([pdfViewerRef, 'access', _139 => _139.current, 'optionalAccess', _140 => _140.selection, 'access', _141 => _141.copy, 'call', _142 => _142()]);
1725
+ _optionalChain([pdfViewerRef, 'access', _145 => _145.current, 'optionalAccess', _146 => _146.selection, 'access', _147 => _147.copy, 'call', _148 => _148()]);
1624
1726
  },
1625
1727
  handleToggleFullScreen
1626
1728
  }),
@@ -1631,13 +1733,13 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1631
1733
  const isPDFReady = state === "ready";
1632
1734
  const isPagesInitialized = totalPages > 0;
1633
1735
  const isViewerAvailable = !!pdfViewerRef.current;
1634
- const isSearchAPIReady = !!_optionalChain([pdfViewerRef, 'access', _143 => _143.current, 'optionalAccess', _144 => _144.search, 'optionalAccess', _145 => _145.searchText]);
1736
+ const isSearchAPIReady = !!_optionalChain([pdfViewerRef, 'access', _149 => _149.current, 'optionalAccess', _150 => _150.search, 'optionalAccess', _151 => _151.searchText]);
1635
1737
  const canExecuteSearch = isPDFReady && isPagesInitialized && isViewerAvailable && isSearchAPIReady;
1636
1738
  if (!canExecuteSearch) return;
1637
1739
  hasExecutedInitialSearch.current = true;
1638
1740
  const SEARCH_INITIALIZATION_DELAY = 100;
1639
1741
  setTimeout(() => {
1640
- if (!_optionalChain([pdfViewerRef, 'access', _146 => _146.current, 'optionalAccess', _147 => _147.search, 'optionalAccess', _148 => _148.searchText])) {
1742
+ if (!_optionalChain([pdfViewerRef, 'access', _152 => _152.current, 'optionalAccess', _153 => _153.search, 'optionalAccess', _154 => _154.searchText])) {
1641
1743
  hasExecutedInitialSearch.current = false;
1642
1744
  return;
1643
1745
  }
@@ -1666,7 +1768,7 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1666
1768
  hasExecutedInitialSearch.current = false;
1667
1769
  setCurrentPage(1);
1668
1770
  setTotalPages(0);
1669
- setZoom(100);
1771
+ setZoom(122);
1670
1772
  setState("idle");
1671
1773
  setError(null);
1672
1774
  setPdfBuffer(null);
@@ -1697,13 +1799,13 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1697
1799
  const checkInternalReadiness = async () => {
1698
1800
  if (!pdfViewerRef.current) return;
1699
1801
  try {
1700
- const count = _optionalChain([pdfViewerRef, 'access', _149 => _149.current, 'access', _150 => _150.navigation, 'optionalAccess', _151 => _151.getTotalPages, 'optionalCall', _152 => _152()]);
1802
+ const count = _optionalChain([pdfViewerRef, 'access', _155 => _155.current, 'access', _156 => _156.navigation, 'optionalAccess', _157 => _157.getTotalPages, 'optionalCall', _158 => _158()]);
1701
1803
  if (count && count > 0) {
1702
1804
  setTotalPages(count);
1703
1805
  setIsInternalReady(true);
1704
1806
  return;
1705
1807
  }
1706
- const docInfo = _optionalChain([pdfViewerRef, 'access', _153 => _153.current, 'optionalAccess', _154 => _154.document, 'optionalAccess', _155 => _155.getDocumentInfo, 'optionalCall', _156 => _156()]);
1808
+ const docInfo = _optionalChain([pdfViewerRef, 'access', _159 => _159.current, 'optionalAccess', _160 => _160.document, 'optionalAccess', _161 => _161.getDocumentInfo, 'optionalCall', _162 => _162()]);
1707
1809
  if (docInfo && docInfo.totalPages > 0) {
1708
1810
  setTotalPages(docInfo.totalPages);
1709
1811
  setIsInternalReady(true);
@@ -1715,6 +1817,15 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1715
1817
  const pollInterval = setInterval(checkInternalReadiness, 100);
1716
1818
  return () => clearInterval(pollInterval);
1717
1819
  }, [state]);
1820
+ _react.useEffect.call(void 0, () => {
1821
+ if (isInternalReady && pdfViewerRef.current) {
1822
+ try {
1823
+ pdfViewerRef.current.zoom.setZoom(1.22);
1824
+ setZoom(122);
1825
+ } catch (e) {
1826
+ }
1827
+ }
1828
+ }, [isInternalReady]);
1718
1829
  _react.useEffect.call(void 0, () => {
1719
1830
  if (state !== "ready" || totalPages > 0) return;
1720
1831
  const initializePageCount = async () => {
@@ -1733,7 +1844,7 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1733
1844
  if (!viewer) return;
1734
1845
  await new Promise((resolve) => requestAnimationFrame(resolve));
1735
1846
  try {
1736
- const count = _optionalChain([viewer, 'access', _157 => _157.navigation, 'optionalAccess', _158 => _158.getTotalPages, 'optionalCall', _159 => _159()]);
1847
+ const count = _optionalChain([viewer, 'access', _163 => _163.navigation, 'optionalAccess', _164 => _164.getTotalPages, 'optionalCall', _165 => _165()]);
1737
1848
  if (count && count > 0) {
1738
1849
  setTotalPages(count);
1739
1850
  setIsInternalReady(true);
@@ -1748,17 +1859,17 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1748
1859
  if (state === "ready") {
1749
1860
  const updateInfo = () => {
1750
1861
  if (!pdfViewerRef.current) return;
1751
- const current = _optionalChain([pdfViewerRef, 'access', _160 => _160.current, 'optionalAccess', _161 => _161.navigation, 'access', _162 => _162.getCurrentPage, 'call', _163 => _163()]) || 1;
1752
- const docInfo = _optionalChain([pdfViewerRef, 'access', _164 => _164.current, 'optionalAccess', _165 => _165.document, 'optionalAccess', _166 => _166.getDocumentInfo, 'optionalCall', _167 => _167()]);
1753
- const navTotal = _optionalChain([pdfViewerRef, 'access', _168 => _168.current, 'optionalAccess', _169 => _169.navigation, 'optionalAccess', _170 => _170.getTotalPages, 'optionalCall', _171 => _171()]);
1862
+ const current = _optionalChain([pdfViewerRef, 'access', _166 => _166.current, 'optionalAccess', _167 => _167.navigation, 'access', _168 => _168.getCurrentPage, 'call', _169 => _169()]) || 1;
1863
+ const docInfo = _optionalChain([pdfViewerRef, 'access', _170 => _170.current, 'optionalAccess', _171 => _171.document, 'optionalAccess', _172 => _172.getDocumentInfo, 'optionalCall', _173 => _173()]);
1864
+ const navTotal = _optionalChain([pdfViewerRef, 'access', _174 => _174.current, 'optionalAccess', _175 => _175.navigation, 'optionalAccess', _176 => _176.getTotalPages, 'optionalCall', _177 => _177()]);
1754
1865
  let total = 0;
1755
1866
  if (docInfo && docInfo.totalPages > 0) {
1756
1867
  total = docInfo.totalPages;
1757
1868
  } else if (typeof navTotal === "number" && navTotal > 0) {
1758
1869
  total = navTotal;
1759
1870
  }
1760
- const zoomValue = _optionalChain([pdfViewerRef, 'access', _172 => _172.current, 'optionalAccess', _173 => _173.zoom, 'access', _174 => _174.getZoom, 'call', _175 => _175()]);
1761
- const currentSearchState = _optionalChain([pdfViewerRef, 'access', _176 => _176.current, 'optionalAccess', _177 => _177.search, 'access', _178 => _178.getSearchState, 'call', _179 => _179()]);
1871
+ const zoomValue = _optionalChain([pdfViewerRef, 'access', _178 => _178.current, 'optionalAccess', _179 => _179.zoom, 'access', _180 => _180.getZoom, 'call', _181 => _181()]);
1872
+ const currentSearchState = _optionalChain([pdfViewerRef, 'access', _182 => _182.current, 'optionalAccess', _183 => _183.search, 'access', _184 => _184.getSearchState, 'call', _185 => _185()]);
1762
1873
  setCurrentPage(current);
1763
1874
  if (total > 0 && total !== totalPages) {
1764
1875
  setTotalPages(total);
@@ -1777,50 +1888,50 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1777
1888
  ref,
1778
1889
  () => ({
1779
1890
  zoomIn: () => {
1780
- _optionalChain([pdfViewerRef, 'access', _180 => _180.current, 'optionalAccess', _181 => _181.zoom, 'access', _182 => _182.zoomIn, 'call', _183 => _183()]);
1891
+ _optionalChain([pdfViewerRef, 'access', _186 => _186.current, 'optionalAccess', _187 => _187.zoom, 'access', _188 => _188.zoomIn, 'call', _189 => _189()]);
1781
1892
  updateZoomDisplay();
1782
1893
  },
1783
1894
  zoomOut: () => {
1784
- _optionalChain([pdfViewerRef, 'access', _184 => _184.current, 'optionalAccess', _185 => _185.zoom, 'access', _186 => _186.zoomOut, 'call', _187 => _187()]);
1895
+ _optionalChain([pdfViewerRef, 'access', _190 => _190.current, 'optionalAccess', _191 => _191.zoom, 'access', _192 => _192.zoomOut, 'call', _193 => _193()]);
1785
1896
  updateZoomDisplay();
1786
1897
  },
1787
1898
  setZoom: (level) => {
1788
- _optionalChain([pdfViewerRef, 'access', _188 => _188.current, 'optionalAccess', _189 => _189.zoom, 'access', _190 => _190.setZoom, 'call', _191 => _191(level)]);
1899
+ _optionalChain([pdfViewerRef, 'access', _194 => _194.current, 'optionalAccess', _195 => _195.zoom, 'access', _196 => _196.setZoom, 'call', _197 => _197(level)]);
1789
1900
  updateZoomDisplay();
1790
1901
  },
1791
1902
  resetZoom: () => {
1792
- _optionalChain([pdfViewerRef, 'access', _192 => _192.current, 'optionalAccess', _193 => _193.zoom, 'access', _194 => _194.resetZoom, 'call', _195 => _195()]);
1903
+ _optionalChain([pdfViewerRef, 'access', _198 => _198.current, 'optionalAccess', _199 => _199.zoom, 'access', _200 => _200.resetZoom, 'call', _201 => _201()]);
1793
1904
  updateZoomDisplay();
1794
1905
  },
1795
1906
  getZoom: () => {
1796
- const zoom2 = _optionalChain([pdfViewerRef, 'access', _196 => _196.current, 'optionalAccess', _197 => _197.zoom, 'access', _198 => _198.getZoom, 'call', _199 => _199()]);
1907
+ const zoom2 = _optionalChain([pdfViewerRef, 'access', _202 => _202.current, 'optionalAccess', _203 => _203.zoom, 'access', _204 => _204.getZoom, 'call', _205 => _205()]);
1797
1908
  return typeof zoom2 === "number" ? zoom2 : 1;
1798
1909
  },
1799
1910
  goToPage: (page) => {
1800
- _optionalChain([pdfViewerRef, 'access', _200 => _200.current, 'optionalAccess', _201 => _201.navigation, 'access', _202 => _202.goToPage, 'call', _203 => _203(page)]);
1911
+ _optionalChain([pdfViewerRef, 'access', _206 => _206.current, 'optionalAccess', _207 => _207.navigation, 'access', _208 => _208.goToPage, 'call', _209 => _209(page)]);
1801
1912
  setCurrentPage(page);
1802
1913
  },
1803
- getCurrentPage: () => _optionalChain([pdfViewerRef, 'access', _204 => _204.current, 'optionalAccess', _205 => _205.navigation, 'access', _206 => _206.getCurrentPage, 'call', _207 => _207()]) || 1,
1804
- getTotalPages: () => _optionalChain([pdfViewerRef, 'access', _208 => _208.current, 'optionalAccess', _209 => _209.navigation, 'access', _210 => _210.getTotalPages, 'call', _211 => _211()]) || 0,
1914
+ getCurrentPage: () => _optionalChain([pdfViewerRef, 'access', _210 => _210.current, 'optionalAccess', _211 => _211.navigation, 'access', _212 => _212.getCurrentPage, 'call', _213 => _213()]) || 1,
1915
+ getTotalPages: () => _optionalChain([pdfViewerRef, 'access', _214 => _214.current, 'optionalAccess', _215 => _215.navigation, 'access', _216 => _216.getTotalPages, 'call', _217 => _217()]) || 0,
1805
1916
  nextPage: () => {
1806
- _optionalChain([pdfViewerRef, 'access', _212 => _212.current, 'optionalAccess', _213 => _213.navigation, 'access', _214 => _214.nextPage, 'call', _215 => _215()]);
1917
+ _optionalChain([pdfViewerRef, 'access', _218 => _218.current, 'optionalAccess', _219 => _219.navigation, 'access', _220 => _220.nextPage, 'call', _221 => _221()]);
1807
1918
  updatePageDisplay();
1808
1919
  },
1809
1920
  previousPage: () => {
1810
- _optionalChain([pdfViewerRef, 'access', _216 => _216.current, 'optionalAccess', _217 => _217.navigation, 'access', _218 => _218.previousPage, 'call', _219 => _219()]);
1921
+ _optionalChain([pdfViewerRef, 'access', _222 => _222.current, 'optionalAccess', _223 => _223.navigation, 'access', _224 => _224.previousPage, 'call', _225 => _225()]);
1811
1922
  updatePageDisplay();
1812
1923
  },
1813
1924
  goToFirstPage: () => {
1814
- _optionalChain([pdfViewerRef, 'access', _220 => _220.current, 'optionalAccess', _221 => _221.navigation, 'access', _222 => _222.goToFirstPage, 'call', _223 => _223()]);
1925
+ _optionalChain([pdfViewerRef, 'access', _226 => _226.current, 'optionalAccess', _227 => _227.navigation, 'access', _228 => _228.goToFirstPage, 'call', _229 => _229()]);
1815
1926
  updatePageDisplay();
1816
1927
  },
1817
1928
  goToLastPage: () => {
1818
- _optionalChain([pdfViewerRef, 'access', _224 => _224.current, 'optionalAccess', _225 => _225.navigation, 'access', _226 => _226.goToLastPage, 'call', _227 => _227()]);
1929
+ _optionalChain([pdfViewerRef, 'access', _230 => _230.current, 'optionalAccess', _231 => _231.navigation, 'access', _232 => _232.goToLastPage, 'call', _233 => _233()]);
1819
1930
  updatePageDisplay();
1820
1931
  },
1821
1932
  searchText: async (keyword) => {
1822
1933
  setIsSearching(true);
1823
- const results = await _optionalChain([pdfViewerRef, 'access', _228 => _228.current, 'optionalAccess', _229 => _229.search, 'access', _230 => _230.searchText, 'call', _231 => _231(
1934
+ const results = await _optionalChain([pdfViewerRef, 'access', _234 => _234.current, 'optionalAccess', _235 => _235.search, 'access', _236 => _236.searchText, 'call', _237 => _237(
1824
1935
  keyword
1825
1936
  )]);
1826
1937
  setIsSearching(false);
@@ -1828,58 +1939,58 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1828
1939
  return results;
1829
1940
  },
1830
1941
  nextResult: () => {
1831
- const index = _optionalChain([pdfViewerRef, 'access', _232 => _232.current, 'optionalAccess', _233 => _233.search, 'access', _234 => _234.nextResult, 'call', _235 => _235()]) || -1;
1942
+ const index = _optionalChain([pdfViewerRef, 'access', _238 => _238.current, 'optionalAccess', _239 => _239.search, 'access', _240 => _240.nextResult, 'call', _241 => _241()]) || -1;
1832
1943
  return index;
1833
1944
  },
1834
1945
  previousResult: () => {
1835
- const index = _optionalChain([pdfViewerRef, 'access', _236 => _236.current, 'optionalAccess', _237 => _237.search, 'access', _238 => _238.previousResult, 'call', _239 => _239()]) || -1;
1946
+ const index = _optionalChain([pdfViewerRef, 'access', _242 => _242.current, 'optionalAccess', _243 => _243.search, 'access', _244 => _244.previousResult, 'call', _245 => _245()]) || -1;
1836
1947
  return index;
1837
1948
  },
1838
- goToResult: (index) => _optionalChain([pdfViewerRef, 'access', _240 => _240.current, 'optionalAccess', _241 => _241.search, 'access', _242 => _242.goToResult, 'call', _243 => _243(index)]) || -1,
1949
+ goToResult: (index) => _optionalChain([pdfViewerRef, 'access', _246 => _246.current, 'optionalAccess', _247 => _247.search, 'access', _248 => _248.goToResult, 'call', _249 => _249(index)]) || -1,
1839
1950
  stopSearch: () => {
1840
- _optionalChain([pdfViewerRef, 'access', _244 => _244.current, 'optionalAccess', _245 => _245.search, 'access', _246 => _246.stopSearch, 'call', _247 => _247()]);
1951
+ _optionalChain([pdfViewerRef, 'access', _250 => _250.current, 'optionalAccess', _251 => _251.search, 'access', _252 => _252.stopSearch, 'call', _253 => _253()]);
1841
1952
  setSearchQuery("");
1842
1953
  },
1843
- getSearchState: () => _optionalChain([pdfViewerRef, 'access', _248 => _248.current, 'optionalAccess', _249 => _249.search, 'access', _250 => _250.getSearchState, 'call', _251 => _251()]) || null,
1954
+ getSearchState: () => _optionalChain([pdfViewerRef, 'access', _254 => _254.current, 'optionalAccess', _255 => _255.search, 'access', _256 => _256.getSearchState, 'call', _257 => _257()]) || null,
1844
1955
  getSelectedText: async () => {
1845
- return await _optionalChain([pdfViewerRef, 'access', _252 => _252.current, 'optionalAccess', _253 => _253.selection, 'access', _254 => _254.getSelectedText, 'call', _255 => _255()]) || "";
1956
+ return await _optionalChain([pdfViewerRef, 'access', _258 => _258.current, 'optionalAccess', _259 => _259.selection, 'access', _260 => _260.getSelectedText, 'call', _261 => _261()]) || "";
1846
1957
  },
1847
- clearSelection: () => _optionalChain([pdfViewerRef, 'access', _256 => _256.current, 'optionalAccess', _257 => _257.selection, 'access', _258 => _258.clearSelection, 'call', _259 => _259()]),
1848
- copy: () => _optionalChain([pdfViewerRef, 'access', _260 => _260.current, 'optionalAccess', _261 => _261.selection, 'access', _262 => _262.copy, 'call', _263 => _263()]),
1849
- rotateForward: () => _optionalChain([pdfViewerRef, 'access', _264 => _264.current, 'optionalAccess', _265 => _265.rotate, 'optionalAccess', _266 => _266.rotateForward, 'call', _267 => _267()]),
1850
- rotateBackward: () => _optionalChain([pdfViewerRef, 'access', _268 => _268.current, 'optionalAccess', _269 => _269.rotate, 'optionalAccess', _270 => _270.rotateBackward, 'call', _271 => _271()]),
1851
- getRotation: () => _optionalChain([pdfViewerRef, 'access', _272 => _272.current, 'optionalAccess', _273 => _273.rotate, 'optionalAccess', _274 => _274.getRotation, 'call', _275 => _275()]) || 0,
1852
- print: () => _optionalChain([pdfViewerRef, 'access', _276 => _276.current, 'optionalAccess', _277 => _277.print, 'optionalAccess', _278 => _278.print, 'call', _279 => _279()]),
1958
+ clearSelection: () => _optionalChain([pdfViewerRef, 'access', _262 => _262.current, 'optionalAccess', _263 => _263.selection, 'access', _264 => _264.clearSelection, 'call', _265 => _265()]),
1959
+ copy: () => _optionalChain([pdfViewerRef, 'access', _266 => _266.current, 'optionalAccess', _267 => _267.selection, 'access', _268 => _268.copy, 'call', _269 => _269()]),
1960
+ rotateForward: () => _optionalChain([pdfViewerRef, 'access', _270 => _270.current, 'optionalAccess', _271 => _271.rotate, 'optionalAccess', _272 => _272.rotateForward, 'call', _273 => _273()]),
1961
+ rotateBackward: () => _optionalChain([pdfViewerRef, 'access', _274 => _274.current, 'optionalAccess', _275 => _275.rotate, 'optionalAccess', _276 => _276.rotateBackward, 'call', _277 => _277()]),
1962
+ getRotation: () => _optionalChain([pdfViewerRef, 'access', _278 => _278.current, 'optionalAccess', _279 => _279.rotate, 'optionalAccess', _280 => _280.getRotation, 'call', _281 => _281()]) || 0,
1963
+ print: () => _optionalChain([pdfViewerRef, 'access', _282 => _282.current, 'optionalAccess', _283 => _283.print, 'optionalAccess', _284 => _284.print, 'call', _285 => _285()]),
1853
1964
  printWithAnnotations: async () => {
1854
- await _optionalChain([pdfViewerRef, 'access', _280 => _280.current, 'optionalAccess', _281 => _281.print, 'optionalAccess', _282 => _282.printWithAnnotations, 'optionalCall', _283 => _283()]);
1965
+ await _optionalChain([pdfViewerRef, 'access', _286 => _286.current, 'optionalAccess', _287 => _287.print, 'optionalAccess', _288 => _288.printWithAnnotations, 'optionalCall', _289 => _289()]);
1855
1966
  },
1856
1967
  printWithoutAnnotations: async () => {
1857
- await _optionalChain([pdfViewerRef, 'access', _284 => _284.current, 'optionalAccess', _285 => _285.print, 'optionalAccess', _286 => _286.printWithoutAnnotations, 'optionalCall', _287 => _287()]);
1968
+ await _optionalChain([pdfViewerRef, 'access', _290 => _290.current, 'optionalAccess', _291 => _291.print, 'optionalAccess', _292 => _292.printWithoutAnnotations, 'optionalCall', _293 => _293()]);
1858
1969
  },
1859
1970
  downloadWithAnnotations: async (filename) => {
1860
- await _optionalChain([pdfViewerRef, 'access', _288 => _288.current, 'optionalAccess', _289 => _289.download, 'optionalAccess', _290 => _290.downloadWithAnnotations, 'optionalCall', _291 => _291(filename)]);
1971
+ await _optionalChain([pdfViewerRef, 'access', _294 => _294.current, 'optionalAccess', _295 => _295.download, 'optionalAccess', _296 => _296.downloadWithAnnotations, 'optionalCall', _297 => _297(filename)]);
1861
1972
  },
1862
1973
  downloadWithoutAnnotations: async (filename) => {
1863
- await _optionalChain([pdfViewerRef, 'access', _292 => _292.current, 'optionalAccess', _293 => _293.download, 'optionalAccess', _294 => _294.downloadWithoutAnnotations, 'optionalCall', _295 => _295(filename)]);
1974
+ await _optionalChain([pdfViewerRef, 'access', _298 => _298.current, 'optionalAccess', _299 => _299.download, 'optionalAccess', _300 => _300.downloadWithoutAnnotations, 'optionalCall', _301 => _301(filename)]);
1864
1975
  },
1865
1976
  get annotation() {
1866
- return _optionalChain([pdfViewerRef, 'access', _296 => _296.current, 'optionalAccess', _297 => _297.annotation]);
1977
+ return _optionalChain([pdfViewerRef, 'access', _302 => _302.current, 'optionalAccess', _303 => _303.annotation]);
1867
1978
  },
1868
1979
  get download() {
1869
- return _optionalChain([pdfViewerRef, 'access', _298 => _298.current, 'optionalAccess', _299 => _299.download]);
1980
+ return _optionalChain([pdfViewerRef, 'access', _304 => _304.current, 'optionalAccess', _305 => _305.download]);
1870
1981
  }
1871
1982
  }),
1872
1983
  []
1873
1984
  );
1874
1985
  const updatePageDisplay = () => {
1875
1986
  requestAnimationFrame(() => {
1876
- const current = _optionalChain([pdfViewerRef, 'access', _300 => _300.current, 'optionalAccess', _301 => _301.navigation, 'access', _302 => _302.getCurrentPage, 'call', _303 => _303()]) || 1;
1987
+ const current = _optionalChain([pdfViewerRef, 'access', _306 => _306.current, 'optionalAccess', _307 => _307.navigation, 'access', _308 => _308.getCurrentPage, 'call', _309 => _309()]) || 1;
1877
1988
  setCurrentPage(current);
1878
1989
  });
1879
1990
  };
1880
1991
  const updateZoomDisplay = () => {
1881
1992
  requestAnimationFrame(() => {
1882
- const zoomValue = _optionalChain([pdfViewerRef, 'access', _304 => _304.current, 'optionalAccess', _305 => _305.zoom, 'access', _306 => _306.getZoom, 'call', _307 => _307()]);
1993
+ const zoomValue = _optionalChain([pdfViewerRef, 'access', _310 => _310.current, 'optionalAccess', _311 => _311.zoom, 'access', _312 => _312.getZoom, 'call', _313 => _313()]);
1883
1994
  if (typeof zoomValue === "number") {
1884
1995
  setZoom(Math.round(zoomValue * 100));
1885
1996
  }
@@ -1888,11 +1999,11 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1888
1999
  const handleSearch = async () => {
1889
2000
  if (!searchQuery.trim()) return;
1890
2001
  setIsSearching(true);
1891
- const results = await _optionalChain([pdfViewerRef, 'access', _308 => _308.current, 'optionalAccess', _309 => _309.search, 'access', _310 => _310.searchText, 'call', _311 => _311(
2002
+ const results = await _optionalChain([pdfViewerRef, 'access', _314 => _314.current, 'optionalAccess', _315 => _315.search, 'access', _316 => _316.searchText, 'call', _317 => _317(
1892
2003
  searchQuery
1893
2004
  )]);
1894
2005
  setIsSearching(false);
1895
- if (_optionalChain([results, 'optionalAccess', _312 => _312.results]) && Array.isArray(results.results) && results.results.length > 0) {
2006
+ if (_optionalChain([results, 'optionalAccess', _318 => _318.results]) && Array.isArray(results.results) && results.results.length > 0) {
1896
2007
  const formattedResults = formatSearchResults(results.results);
1897
2008
  updateSearchState(formattedResults);
1898
2009
  } else {
@@ -1910,10 +2021,10 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1910
2021
  setSearchResults([]);
1911
2022
  setTotalSearchResults(0);
1912
2023
  setCurrentSearchResultIndex(0);
1913
- _optionalChain([pdfViewerRef, 'access', _313 => _313.current, 'optionalAccess', _314 => _314.search, 'access', _315 => _315.stopSearch, 'call', _316 => _316()]);
2024
+ _optionalChain([pdfViewerRef, 'access', _319 => _319.current, 'optionalAccess', _320 => _320.search, 'access', _321 => _321.stopSearch, 'call', _322 => _322()]);
1914
2025
  return;
1915
2026
  }
1916
- if (!_optionalChain([pdfViewerRef, 'access', _317 => _317.current, 'optionalAccess', _318 => _318.search, 'optionalAccess', _319 => _319.searchText])) {
2027
+ if (!_optionalChain([pdfViewerRef, 'access', _323 => _323.current, 'optionalAccess', _324 => _324.search, 'optionalAccess', _325 => _325.searchText])) {
1917
2028
  console.warn("Search functionality not yet available");
1918
2029
  return;
1919
2030
  }
@@ -1921,7 +2032,7 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1921
2032
  try {
1922
2033
  const results = await pdfViewerRef.current.search.searchText(keyword);
1923
2034
  setIsSearching(false);
1924
- const hasValidResults = _optionalChain([results, 'optionalAccess', _320 => _320.results]) && Array.isArray(results.results) && results.results.length > 0;
2035
+ const hasValidResults = _optionalChain([results, 'optionalAccess', _326 => _326.results]) && Array.isArray(results.results) && results.results.length > 0;
1925
2036
  if (hasValidResults) {
1926
2037
  const formattedResults = formatSearchResults(results.results);
1927
2038
  updateSearchState(formattedResults);
@@ -1987,24 +2098,24 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
1987
2098
  };
1988
2099
  const navigateToPage = (pageNumber) => {
1989
2100
  requestAnimationFrame(() => {
1990
- _optionalChain([pdfViewerRef, 'access', _321 => _321.current, 'optionalAccess', _322 => _322.navigation, 'access', _323 => _323.goToPage, 'call', _324 => _324(pageNumber)]);
2101
+ _optionalChain([pdfViewerRef, 'access', _327 => _327.current, 'optionalAccess', _328 => _328.navigation, 'access', _329 => _329.goToPage, 'call', _330 => _330(pageNumber)]);
1991
2102
  setCurrentPage(pageNumber);
1992
2103
  });
1993
2104
  };
1994
2105
  const handleSearchResultClick = (pageNumber, resultIndex) => {
1995
- _optionalChain([pdfViewerRef, 'access', _325 => _325.current, 'optionalAccess', _326 => _326.navigation, 'access', _327 => _327.goToPage, 'call', _328 => _328(pageNumber)]);
2106
+ _optionalChain([pdfViewerRef, 'access', _331 => _331.current, 'optionalAccess', _332 => _332.navigation, 'access', _333 => _333.goToPage, 'call', _334 => _334(pageNumber)]);
1996
2107
  setCurrentSearchResultIndex(resultIndex);
1997
2108
  setCurrentPage(pageNumber);
1998
- _optionalChain([pdfViewerRef, 'access', _329 => _329.current, 'optionalAccess', _330 => _330.search, 'access', _331 => _331.goToResult, 'call', _332 => _332(resultIndex)]);
2109
+ _optionalChain([pdfViewerRef, 'access', _335 => _335.current, 'optionalAccess', _336 => _336.search, 'access', _337 => _337.goToResult, 'call', _338 => _338(resultIndex)]);
1999
2110
  };
2000
2111
  const handleNextSearchResult = () => {
2001
2112
  if (currentSearchResultIndex < totalSearchResults - 1) {
2002
2113
  const nextIndex = currentSearchResultIndex + 1;
2003
2114
  setCurrentSearchResultIndex(nextIndex);
2004
- _optionalChain([pdfViewerRef, 'access', _333 => _333.current, 'optionalAccess', _334 => _334.search, 'access', _335 => _335.nextResult, 'call', _336 => _336()]);
2115
+ _optionalChain([pdfViewerRef, 'access', _339 => _339.current, 'optionalAccess', _340 => _340.search, 'access', _341 => _341.nextResult, 'call', _342 => _342()]);
2005
2116
  if (searchResults[nextIndex]) {
2006
2117
  const pageNumber = searchResults[nextIndex].pageNumber;
2007
- _optionalChain([pdfViewerRef, 'access', _337 => _337.current, 'optionalAccess', _338 => _338.navigation, 'access', _339 => _339.goToPage, 'call', _340 => _340(pageNumber)]);
2118
+ _optionalChain([pdfViewerRef, 'access', _343 => _343.current, 'optionalAccess', _344 => _344.navigation, 'access', _345 => _345.goToPage, 'call', _346 => _346(pageNumber)]);
2008
2119
  setCurrentPage(pageNumber);
2009
2120
  }
2010
2121
  }
@@ -2013,10 +2124,10 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
2013
2124
  if (currentSearchResultIndex > 0) {
2014
2125
  const prevIndex = currentSearchResultIndex - 1;
2015
2126
  setCurrentSearchResultIndex(prevIndex);
2016
- _optionalChain([pdfViewerRef, 'access', _341 => _341.current, 'optionalAccess', _342 => _342.search, 'access', _343 => _343.previousResult, 'call', _344 => _344()]);
2127
+ _optionalChain([pdfViewerRef, 'access', _347 => _347.current, 'optionalAccess', _348 => _348.search, 'access', _349 => _349.previousResult, 'call', _350 => _350()]);
2017
2128
  if (searchResults[prevIndex]) {
2018
2129
  const pageNumber = searchResults[prevIndex].pageNumber;
2019
- _optionalChain([pdfViewerRef, 'access', _345 => _345.current, 'optionalAccess', _346 => _346.navigation, 'access', _347 => _347.goToPage, 'call', _348 => _348(pageNumber)]);
2130
+ _optionalChain([pdfViewerRef, 'access', _351 => _351.current, 'optionalAccess', _352 => _352.navigation, 'access', _353 => _353.goToPage, 'call', _354 => _354(pageNumber)]);
2020
2131
  setCurrentPage(pageNumber);
2021
2132
  }
2022
2133
  }
@@ -2047,12 +2158,12 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
2047
2158
  }
2048
2159
  setPdfBuffer(arrayBuffer);
2049
2160
  setState("ready");
2050
- _optionalChain([onLoad, 'optionalCall', _349 => _349()]);
2161
+ _optionalChain([onLoad, 'optionalCall', _355 => _355()]);
2051
2162
  } catch (err) {
2052
2163
  const errorMessage = err.message || "Failed to load PDF";
2053
2164
  setState("error");
2054
2165
  setError(errorMessage);
2055
- _optionalChain([onError, 'optionalCall', _350 => _350(err)]);
2166
+ _optionalChain([onError, 'optionalCall', _356 => _356(err)]);
2056
2167
  }
2057
2168
  };
2058
2169
  loadPDF();
@@ -2148,8 +2259,8 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
2148
2259
  }
2149
2260
  const isReady = pdfBuffer && state === "ready";
2150
2261
  const showOverlay = loading || !isReady || !isInternalReady;
2151
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { ref: containerRef, className: "pdf-viewer-container", style: { position: "relative", height: "100%", width: "100%" }, children: [
2152
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "style", { children: _chunkECZ6IBOSjs.toolbarStyles }),
2262
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { ref: containerRef, className: `pdf-viewer-container ${themeMode === "dark" ? "dark-theme" : ""}`, style: { position: "relative", height: "100%", width: "100%" }, children: [
2263
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "style", { children: _chunkS5KXYKBXjs.toolbarStyles }),
2153
2264
  showOverlay && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, LoadingSpinner, { fileName: resolvedFileName }),
2154
2265
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: { opacity: !showOverlay ? 1 : 0, height: "100%", display: "flex", flexDirection: "column" }, children: [
2155
2266
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PDFHeader, { fileName: resolvedFileName, fileExtension }),
@@ -2224,35 +2335,79 @@ var PDFViewerContent = _react.forwardRef.call(void 0,
2224
2335
  showPrintWithAnnotations,
2225
2336
  showDownloadOriginal,
2226
2337
  showDownloadWithAnnotations,
2338
+ twoPageMode,
2339
+ onTwoPageModeChange: setTwoPageMode,
2340
+ scrollStrategy,
2341
+ onScrollStrategyChange: setScrollStrategy,
2342
+ showThumbnails,
2343
+ onToggleThumbnails: () => setShowThumbnails(!showThumbnails),
2227
2344
  hasUnsavedAnnotations,
2228
2345
  isSavingAnnotations,
2229
2346
  canSaveAnnotations,
2230
- onSaveAnnotations
2347
+ onSaveAnnotations,
2348
+ activeMode,
2349
+ onActiveModeChange: setActiveMode
2231
2350
  }
2232
2351
  ),
2233
2352
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "pdf-viewer-main", children: [
2234
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "pdf-viewer-viewer-area", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2235
- StablePDFViewer,
2353
+ showThumbnails && pdfBuffer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2354
+ _pdfviewer.PdfThumbnailSidebar,
2236
2355
  {
2237
- pdfBuffer: pdfBuffer || new ArrayBuffer(0),
2238
- onPasswordRequest: handlePasswordRequest,
2239
- pdfViewerRef,
2240
- hideInternalLoading: true,
2241
- showAnnotations,
2242
- userDetails,
2243
- annotationSelectionMenu,
2244
- isHighlighterActive: highlighterActive,
2245
- isStampActive: stampActive,
2246
- onHighlighterClick: onHighlighterClick || toolbarHandlers.handleHighlighterClick,
2247
- onStampClick: onStampClick || toolbarHandlers.handleStampClick,
2248
- onSignatureClick: onSignatureClick || toolbarHandlers.handleSignatureClick,
2249
- onNoteClick,
2250
- permissions: props.permissions,
2251
- isAnnotationForeign,
2252
- onAnnotationNoteClick,
2253
- isAnnotationInteractive
2356
+ pdfBuffer,
2357
+ totalPages,
2358
+ currentPage,
2359
+ onPageClick: (pageNum) => _optionalChain([pdfViewerRef, 'access', _357 => _357.current, 'optionalAccess', _358 => _358.navigation, 'access', _359 => _359.goToPage, 'call', _360 => _360(pageNum)]),
2360
+ onClose: () => setShowThumbnails(false),
2361
+ twoPageMode: false
2254
2362
  }
2255
- ) }),
2363
+ ),
2364
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "pdf-viewer-viewer-area", children: [
2365
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2366
+ PDFSecondaryToolbar,
2367
+ {
2368
+ activeMode,
2369
+ showAnnotations,
2370
+ isHighlighterActive: highlighterActive,
2371
+ isStampActive: stampActive,
2372
+ disabledHighlighter: toolbar.isDisabled("highlighter"),
2373
+ disabledStamp: toolbar.isDisabled("stamp"),
2374
+ disabledSignature: toolbar.isDisabled("signature"),
2375
+ disabledNote: toolbar.isDisabled("note"),
2376
+ onHighlighterClick: onHighlighterClick || toolbarHandlers.handleHighlighterClick,
2377
+ onStampClick: onStampClick || toolbarHandlers.handleStampClick,
2378
+ onSignatureClick: onSignatureClick || toolbarHandlers.handleSignatureClick,
2379
+ onNoteClick,
2380
+ hasUnsavedAnnotations,
2381
+ isSavingAnnotations,
2382
+ canSaveAnnotations,
2383
+ onSaveAnnotations
2384
+ }
2385
+ ),
2386
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2387
+ StablePDFViewer,
2388
+ {
2389
+ pdfBuffer: pdfBuffer || new ArrayBuffer(0),
2390
+ onPasswordRequest: handlePasswordRequest,
2391
+ pdfViewerRef,
2392
+ hideInternalLoading: true,
2393
+ showAnnotations,
2394
+ userDetails,
2395
+ annotationSelectionMenu,
2396
+ isHighlighterActive: highlighterActive,
2397
+ isStampActive: stampActive,
2398
+ onHighlighterClick: onHighlighterClick || toolbarHandlers.handleHighlighterClick,
2399
+ onStampClick: onStampClick || toolbarHandlers.handleStampClick,
2400
+ onSignatureClick: onSignatureClick || toolbarHandlers.handleSignatureClick,
2401
+ onNoteClick,
2402
+ permissions: props.permissions,
2403
+ isAnnotationForeign,
2404
+ onAnnotationNoteClick,
2405
+ isAnnotationInteractive,
2406
+ twoPageMode,
2407
+ scrollStrategy
2408
+ }
2409
+ )
2410
+ ] }),
2256
2411
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2257
2412
  SearchSidebar,
2258
2413
  {
@@ -2296,4 +2451,4 @@ PDFViewer.displayName = "PDFViewer";
2296
2451
 
2297
2452
 
2298
2453
  exports.PDFViewer = PDFViewer;
2299
- //# sourceMappingURL=chunk-7P6WEBHN.js.map
2454
+ //# sourceMappingURL=chunk-4HVU224A.js.map