@react-pdf-kit/viewer 2.0.0-beta.0 → 2.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Combination-54a77a7a.js +701 -0
- package/dist/MostPageTool.module-13578ad6.js +6 -0
- package/dist/OtherTool.module-a4be5f1f.js +6 -0
- package/dist/Paginate.module-206a7d7d.js +8 -0
- package/dist/PaginationContext-9217cab4.js +201 -0
- package/dist/{LayoutWrapper-a871c161.js → RPLayout.module-967bf4bc.js} +3 -9
- package/dist/RPToolbar.module-27d7fe77.js +10 -0
- package/dist/{RotateTool.module-03987eba.js → RotateTool.module-67946714.js} +1 -1
- package/dist/SearchTool.module-99f60dc7.js +16 -0
- package/dist/ToolbarLayout.module-1fee0a18.js +11 -0
- package/dist/{ZoomTool.module-6c5eabbb.js → ZoomTool.module-7082af8c.js} +1 -1
- package/dist/assets/style.css +1 -0
- package/dist/assets/style.js +75 -0
- package/dist/components/RPConfig.js +14 -1489
- package/dist/components/RPController.js +109 -66
- package/dist/components/RPDropFileZone.js +26 -12
- package/dist/components/RPPages.js +991 -58
- package/dist/components/RPProvider.js +107 -19
- package/dist/components/RPTheme.js +6 -5
- package/dist/components/icons/DualPageIcon.js +6 -6
- package/dist/components/icons/LoaderIcon.js +1 -1
- package/dist/components/icons/SinglePageIcon.js +6 -6
- package/dist/components/layout/Container.js +1 -1
- package/dist/components/layout/LayoutContainer.js +32 -57
- package/dist/components/layout/LayoutWrapper.js +9 -4
- package/dist/components/layout/RPDefaultLayout.js +214 -14
- package/dist/components/layout/RPLayout.js +143 -41
- package/dist/components/layout/WrapperLayout.js +22 -9
- package/dist/components/layout/sidebar/RPSidebar.js +110 -13
- package/dist/components/layout/sidebar/RPSplitter.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +129 -52
- package/dist/components/layout/sidebar/Thumbnails.js +75 -6
- package/dist/components/layout/toolbar/DarkModeTool.js +24 -13
- package/dist/components/layout/toolbar/DocumentDialog.js +311 -56
- package/dist/components/layout/toolbar/DocumentProperties.js +21 -8
- package/dist/components/layout/toolbar/FileDownloadTool.js +48 -13
- package/dist/components/layout/toolbar/FileUploadTool.js +34 -10
- package/dist/components/layout/toolbar/FullScreenTool.js +43 -28
- package/dist/components/layout/toolbar/MenuItem.js +15 -8
- package/dist/components/layout/toolbar/MenuSeparator.js +11 -4
- package/dist/components/layout/toolbar/MostPageTool.js +72 -51
- package/dist/components/layout/toolbar/OtherTool.js +188 -22
- package/dist/components/layout/toolbar/Paginate.js +136 -17
- package/dist/components/layout/toolbar/PrintTool.js +70 -13
- package/dist/components/layout/toolbar/PropertyItem.js +1 -1
- package/dist/components/layout/toolbar/RPMenuItem.js +23 -13
- package/dist/components/layout/toolbar/RPMoreOptions.js +119 -47
- package/dist/components/layout/toolbar/RPToolbar.js +148 -8
- package/dist/components/layout/toolbar/RPToolbarEnd.js +118 -7
- package/dist/components/layout/toolbar/RotateTool.js +42 -18
- package/dist/components/layout/toolbar/ScrollModeTool.js +33 -21
- package/dist/components/layout/toolbar/SearchCloseButton.js +30 -7
- package/dist/components/layout/toolbar/SearchResultNavigator.js +87 -8
- package/dist/components/layout/toolbar/SearchTool.js +236 -54
- package/dist/components/layout/toolbar/SelectionModeTool.js +22 -10
- package/dist/components/layout/toolbar/ThumbnailTool.js +32 -10
- package/dist/components/layout/toolbar/ToolbarCustom.js +52 -55
- package/dist/components/layout/toolbar/ToolbarDefault.js +144 -58
- package/dist/components/layout/toolbar/ToolbarLayout.js +149 -6
- package/dist/components/layout/toolbar/ViewModeTool.js +31 -19
- package/dist/components/layout/toolbar/ZoomTool.js +104 -84
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +38 -12
- package/dist/components/layout/toolbar/tools/DualPageTool.js +26 -0
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +31 -9
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +29 -8
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +25 -13
- package/dist/components/layout/toolbar/tools/InputPageTool.js +66 -26
- package/dist/components/layout/toolbar/tools/NextPageTool.js +36 -47
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +51 -11
- package/dist/components/layout/toolbar/tools/PrintTool.js +29 -7
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +31 -8
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +34 -11
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +31 -0
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +26 -0
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +17 -6
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +35 -13
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +49 -20
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +27 -0
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +57 -23
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +47 -18
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +122 -45
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +37 -11
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +18 -5
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +36 -11
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +25 -50
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +24 -9
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +47 -54
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +32 -7
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +36 -12
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +26 -14
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +27 -15
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +30 -18
- package/dist/components/page/AnnotationLayer.js +130 -54
- package/dist/components/page/CanvasLayer.js +62 -49
- package/dist/components/page/CustomElement.js +49 -18
- package/dist/components/page/DualPage.js +97 -4
- package/dist/components/page/RPPage.js +134 -51
- package/dist/components/page/SinglePage.js +87 -4
- package/dist/components/page/TextHighlightLayer.js +195 -57
- package/dist/components/page/TextLayer.js +193 -52
- package/dist/components/ui/Button.js +9 -8
- package/dist/components/ui/Checkbox.js +27 -25
- package/dist/components/ui/DropDown.js +21 -14
- package/dist/components/ui/Input.js +10 -9
- package/dist/components/ui/LoadingIndicator.js +45 -5
- package/dist/components/ui/PasswordModal.js +18 -15
- package/dist/components/ui/RPTooltip.js +98 -95
- package/dist/contexts/DimensionPagesContext.js +35 -17
- package/dist/contexts/DropFileZoneContext.js +32 -22
- package/dist/contexts/ElementPageContext.js +114 -51
- package/dist/contexts/EventCallbackContext.js +30 -0
- package/dist/contexts/FileInputContext.js +32 -22
- package/dist/contexts/FullScreenContext.js +17 -10
- package/dist/contexts/GlobalCurrentPage.js +13 -10
- package/dist/contexts/HighlightContext.js +24 -11
- package/dist/contexts/LicenseContext.js +1 -0
- package/dist/contexts/LoaderContext.js +10 -9
- package/dist/contexts/LocalizationContext.js +25 -29
- package/dist/contexts/PagesRotateContext.js +36 -18
- package/dist/contexts/PaginationContext.js +32 -4
- package/dist/contexts/PrintContext.js +76 -6
- package/dist/contexts/RPDocumentContext.js +48 -30
- package/dist/contexts/RenderQueueProvider.js +70 -8
- package/dist/contexts/RotationContext.js +25 -15
- package/dist/contexts/ScrollModeContext.js +7 -6
- package/dist/contexts/SearchContext.js +94 -6
- package/dist/contexts/SelectionModeContext.js +5 -4
- package/dist/contexts/ThumbnailsContext.js +41 -6
- package/dist/contexts/ViewModeContext.js +10 -9
- package/dist/contexts/ZoomContext.js +48 -38
- package/dist/floating-ui.react-dom-5ec29bd6.js +1327 -0
- package/dist/index-4baea9b5.js +1198 -0
- package/dist/index-655864a7.js +27 -0
- package/dist/{index-35c7f4a2.js → index-c0faa594.js} +63 -86
- package/dist/index-e3ee9457.js +150 -0
- package/dist/libInjectCss.js +9 -0
- package/dist/main.js +269 -84
- package/dist/types/assets/style.d.ts +1 -0
- package/dist/types/components/icons/DualPageIcon.d.ts +1 -1
- package/dist/types/components/icons/SinglePageIcon.d.ts +1 -1
- package/dist/types/components/layout/toolbar/tools/DualPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/SelectionModeSwitcherTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/SinglePageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ZoomLevelDisplay.d.ts +7 -0
- package/dist/types/contexts/EventCallbackContext.d.ts +5 -0
- package/dist/types/contexts/RenderQueueProvider.d.ts +2 -2
- package/dist/types/libInjectCss.d.ts +1 -0
- package/dist/types/main.d.ts +6 -6
- package/dist/types/utils/annotations.d.ts +3 -3
- package/dist/types/utils/approximateFragtion.d.ts +9 -0
- package/dist/types/utils/getElementPositionInPage.d.ts +5 -0
- package/dist/types/utils/hooks/useCopyText.d.ts +1 -0
- package/dist/types/utils/hooks/usePrint.d.ts +3 -2
- package/dist/types/utils/hooks/useSearch.d.ts +1 -2
- package/dist/types/utils/injectPrintCSS.d.ts +1 -0
- package/dist/types/utils/link_service.d.ts +11 -1
- package/dist/types/utils/renderPage.d.ts +2 -2
- package/dist/types/utils/types.d.ts +38 -5
- package/dist/types/utils/zoom.d.ts +2 -0
- package/dist/utils/annotations.js +125 -149
- package/dist/utils/approximateFragtion.js +22 -0
- package/dist/utils/getElementPositionInPage.js +84 -0
- package/dist/utils/getWordPositionInPage.js +5 -5
- package/dist/utils/getZoomLevel.js +9 -8
- package/dist/utils/highlight.js +72 -72
- package/dist/utils/hooks/useCopyText.js +36 -0
- package/dist/utils/hooks/useDarkModeProps.js +3 -2
- package/dist/utils/hooks/useFileDownload.js +29 -54
- package/dist/utils/hooks/useHighlight.js +34 -33
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/useLoadPdf.js +44 -36
- package/dist/utils/hooks/useLoadWorker.js +11 -8
- package/dist/utils/hooks/useLocalization.js +13 -13
- package/dist/utils/hooks/usePageRotateContext.js +33 -17
- package/dist/utils/hooks/usePaginate.js +26 -49
- package/dist/utils/hooks/usePinch.js +62 -41
- package/dist/utils/hooks/usePresentPage.js +80 -50
- package/dist/utils/hooks/usePrint.js +181 -55
- package/dist/utils/hooks/useRotate.js +21 -7
- package/dist/utils/hooks/useScrollToPage.js +26 -51
- package/dist/utils/hooks/useSearch.js +141 -55
- package/dist/utils/hooks/useThumbnail.js +55 -55
- package/dist/utils/hooks/useVirtualReactWindow.js +70 -52
- package/dist/utils/hooks/useWatermark.js +18 -15
- package/dist/utils/injectPrintCSS.js +22 -0
- package/dist/utils/link_service.js +49 -9
- package/dist/utils/renderPage.js +13 -10
- package/dist/utils/zoom.js +6 -0
- package/package.json +6 -8
- package/dist/SearchCloseButton-cbf182aa.js +0 -33
- package/dist/ToolbarLayout.module-c588d36b.js +0 -3411
- package/dist/assets/Button.css +0 -1
- package/dist/assets/Checkbox.css +0 -1
- package/dist/assets/Container.css +0 -1
- package/dist/assets/DropDown.css +0 -1
- package/dist/assets/Input.css +0 -1
- package/dist/assets/LayoutWrapper.css +0 -1
- package/dist/assets/LoaderIcon.css +0 -1
- package/dist/assets/MenuItem.css +0 -1
- package/dist/assets/MenuSeparator.css +0 -1
- package/dist/assets/PasswordModal.css +0 -1
- package/dist/assets/PropertyItem.css +0 -1
- package/dist/assets/RPDropFileZone.css +0 -1
- package/dist/assets/RPSplitter.css +0 -1
- package/dist/assets/RPTooltip.css +0 -1
- package/dist/assets/RotateTool.css +0 -1
- package/dist/assets/SearchCloseButton.css +0 -1
- package/dist/assets/ToolbarLayout.css +0 -1
- package/dist/assets/WrapperLayout.css +0 -1
- package/dist/assets/ZoomTool.css +0 -1
- package/dist/floating-ui.react-dom-6b2fe0df.js +0 -1474
- package/dist/index-f563c6f0.js +0 -1889
|
@@ -224,10 +224,11 @@ export interface DarkModeProps {
|
|
|
224
224
|
export interface DarkMode extends DarkModeProps {
|
|
225
225
|
onDarkModeChange: (value: boolean) => void;
|
|
226
226
|
}
|
|
227
|
-
export interface
|
|
227
|
+
export interface RenderOptions {
|
|
228
228
|
scale?: number;
|
|
229
229
|
rotate?: number;
|
|
230
230
|
renderForms?: boolean;
|
|
231
|
+
interactiveForm?: boolean;
|
|
231
232
|
}
|
|
232
233
|
export interface License {
|
|
233
234
|
validating?: boolean;
|
|
@@ -321,13 +322,18 @@ export interface PreparePrintProgress {
|
|
|
321
322
|
totalPages: number;
|
|
322
323
|
percentage: number;
|
|
323
324
|
}
|
|
325
|
+
export interface PrintConfiguration {
|
|
326
|
+
visibleDefaultProgress?: boolean;
|
|
327
|
+
}
|
|
328
|
+
export type PrintOptions = PrintConfiguration | React.MouseEvent<{}>;
|
|
324
329
|
export interface PrintToolProps {
|
|
325
|
-
print: () => void
|
|
330
|
+
print: (options?: PrintOptions) => Promise<void>;
|
|
326
331
|
cancel: () => void;
|
|
327
332
|
setOnProgress: (callback: (progress: PreparePrintProgress) => void) => void;
|
|
328
333
|
setOnComplete: (callback: () => void) => void;
|
|
329
334
|
setOnError: (callback: (error: Error) => void) => void;
|
|
330
335
|
progress: PreparePrintProgress;
|
|
336
|
+
showDefaultProgress?: boolean;
|
|
331
337
|
}
|
|
332
338
|
export interface ThumbnailToolProps {
|
|
333
339
|
onClick: () => void;
|
|
@@ -456,7 +462,12 @@ export interface CharacterMap {
|
|
|
456
462
|
url: string;
|
|
457
463
|
isCompressed: boolean;
|
|
458
464
|
}
|
|
459
|
-
export interface
|
|
465
|
+
export interface EventCallbackContextType {
|
|
466
|
+
onPageChange?: (page: number) => void;
|
|
467
|
+
onRotate?: (rotation: Record<number, number>) => void;
|
|
468
|
+
onScroll?: (scroll: Event) => void;
|
|
469
|
+
}
|
|
470
|
+
export interface RPProviderProps extends PropsWithChildren, LoadPDFOptions, RPControllerProps, EventCallbackContextType {
|
|
460
471
|
src: RPSrc;
|
|
461
472
|
workerUrl?: string;
|
|
462
473
|
characterMap?: CharacterMap;
|
|
@@ -468,6 +479,8 @@ export interface RPControllerProps extends PropsWithChildren, DarkModeProviderPr
|
|
|
468
479
|
locale?: string;
|
|
469
480
|
localization?: LocalizationMap;
|
|
470
481
|
downloadFilename?: string;
|
|
482
|
+
initialSelectionMode?: SelectionMode;
|
|
483
|
+
interactiveForm?: boolean;
|
|
471
484
|
}
|
|
472
485
|
export interface RPConfigProps extends Omit<ConfigContextType, 'workerUrlAdded'>, RPThemeContextType, PropsWithChildren {
|
|
473
486
|
workerUrl?: string;
|
|
@@ -502,6 +515,7 @@ export interface ZoomContextType {
|
|
|
502
515
|
export type ZoomProps = Omit<ZoomContextType, 'currentZoom'>;
|
|
503
516
|
export type InitialStateContextType = {
|
|
504
517
|
instanceId: string;
|
|
518
|
+
interactiveForm?: boolean;
|
|
505
519
|
} & ZoomProviderProps & PageProviderProps & ViewModeInitialProps & ScrollModeInitialProps & RotateProviderProps;
|
|
506
520
|
export interface ZoomProviderProps {
|
|
507
521
|
initialScale?: number | ZoomLevel;
|
|
@@ -535,6 +549,12 @@ export interface ScrollModeInitialProps {
|
|
|
535
549
|
initialScrollMode?: ScrollMode;
|
|
536
550
|
}
|
|
537
551
|
export interface RectPosition {
|
|
552
|
+
left: number;
|
|
553
|
+
bottom: number;
|
|
554
|
+
width: number;
|
|
555
|
+
height: number;
|
|
556
|
+
}
|
|
557
|
+
export interface ElementPosition {
|
|
538
558
|
left: number;
|
|
539
559
|
top: number;
|
|
540
560
|
width: number;
|
|
@@ -605,8 +625,7 @@ export interface SearchContextType {
|
|
|
605
625
|
prevMatch: () => void;
|
|
606
626
|
searchOptions: SearchOptions;
|
|
607
627
|
setSearchOptions: Dispatch<SetStateAction<SearchOptions>>;
|
|
608
|
-
|
|
609
|
-
setCurrentMatchElement: Dispatch<SetStateAction<HTMLElement | null>>;
|
|
628
|
+
setCurrentMatchPosition: Dispatch<React.SetStateAction<number>>;
|
|
610
629
|
}
|
|
611
630
|
export declare enum SelectionMode {
|
|
612
631
|
TEXT = "TEXT",
|
|
@@ -623,7 +642,11 @@ export type LoaderImage = JSX.Element | string;
|
|
|
623
642
|
export interface LoadPDFOptions {
|
|
624
643
|
onLoadError?: (error: any) => void;
|
|
625
644
|
onLoaded?: (pdfDocument: PDFDocumentProxy) => void;
|
|
645
|
+
onLoadProgress?: (progress: number) => void;
|
|
626
646
|
loaderImage?: LoaderImage;
|
|
647
|
+
disableAutoFetch?: boolean;
|
|
648
|
+
disableStream?: boolean;
|
|
649
|
+
rangeChunkSize?: number;
|
|
627
650
|
}
|
|
628
651
|
export interface ScrollPosition {
|
|
629
652
|
left: number;
|
|
@@ -659,6 +682,9 @@ export interface useElementPage {
|
|
|
659
682
|
removeElement: (pageNumber: number, index: number) => void;
|
|
660
683
|
clearElements: (pageNumber: number) => void;
|
|
661
684
|
elementList: Record<number, Array<HTMLElement | JSX.Element>>;
|
|
685
|
+
scrollToElement: (page: number, index: number, config?: {
|
|
686
|
+
behavior: 'smooth' | 'auto' | 'instant';
|
|
687
|
+
}) => void;
|
|
662
688
|
}
|
|
663
689
|
export interface MatchHighlight extends MatchValue {
|
|
664
690
|
keyword: string | RegExp;
|
|
@@ -710,6 +736,13 @@ export interface ThemeSwitcherIcons {
|
|
|
710
736
|
export interface ThemeSwitcherToolProps {
|
|
711
737
|
icons?: ThemeSwitcherIcons;
|
|
712
738
|
}
|
|
739
|
+
export interface SelectionModeSwitcherIcons {
|
|
740
|
+
textSelectionIcon?: React.ReactNode;
|
|
741
|
+
handModeIcon?: React.ReactNode;
|
|
742
|
+
}
|
|
743
|
+
export interface SelectionModeSwitcherToolProps {
|
|
744
|
+
icons?: SelectionModeSwitcherIcons;
|
|
745
|
+
}
|
|
713
746
|
export interface ToolbarSection {
|
|
714
747
|
component: React.ReactNode;
|
|
715
748
|
}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { sanitizeExternalUrl as
|
|
2
|
-
import {
|
|
3
|
-
import { dateFormatter as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { sanitizeExternalUrl as I } from "./sanitizeExternalUrl.js";
|
|
2
|
+
import { AnnotationType as l } from "./types.js";
|
|
3
|
+
import { dateFormatter as B } from "./dateFormatter.js";
|
|
4
|
+
import "../th_TH-d627cd51.js";
|
|
5
|
+
const v = ["click", "dblclick", "input", "change", "mouseover"], g = /* @__PURE__ */ new Map(), x = (e, t) => `${e.loadingTask.docId}___${t.num}R${t.gen === 0 ? "" : t.gen}`;
|
|
6
|
+
function C(e, t) {
|
|
7
|
+
const n = x(e, t);
|
|
7
8
|
return g.has(n) ? g.get(n) ?? null : null;
|
|
8
9
|
}
|
|
9
|
-
const
|
|
10
|
-
g.set(
|
|
11
|
-
},
|
|
10
|
+
const S = (e, t, n) => {
|
|
11
|
+
g.set(x(e, t), n);
|
|
12
|
+
}, T = (e, t) => {
|
|
12
13
|
switch (t[1].name) {
|
|
13
14
|
case "XYZ":
|
|
14
15
|
return {
|
|
15
|
-
bottomOffset: (n,
|
|
16
|
-
leftOffset: (n,
|
|
16
|
+
bottomOffset: (n, s) => t[3] === null ? s : t[3],
|
|
17
|
+
leftOffset: (n, s) => t[2] === null ? 0 : t[2],
|
|
17
18
|
pageIndex: e,
|
|
18
19
|
scaleTo: t[4]
|
|
19
20
|
};
|
|
@@ -41,123 +42,98 @@ const B = (e, t, n) => {
|
|
|
41
42
|
scaleTo: 1
|
|
42
43
|
};
|
|
43
44
|
}
|
|
45
|
+
}, M = (e) => {
|
|
46
|
+
e && (() => {
|
|
47
|
+
const n = e == null ? void 0 : e.querySelectorAll(
|
|
48
|
+
'[data-l10n-id="pdfjs-annotation-date-time-string"]'
|
|
49
|
+
);
|
|
50
|
+
n == null || n.forEach((s) => {
|
|
51
|
+
const { date: a, time: o, dateObj: i } = JSON.parse(s.dataset.l10nArgs ?? "{}");
|
|
52
|
+
a && o ? s.textContent = `${a}, ${o}` : i && (s.textContent = B(i));
|
|
53
|
+
});
|
|
54
|
+
})();
|
|
44
55
|
};
|
|
45
|
-
async function
|
|
56
|
+
async function E(e, t) {
|
|
46
57
|
let n;
|
|
47
58
|
if (typeof t == "string" ? n = await e.getDestination(t) : n = t, n && typeof n[0] == "object" && n[0] !== null) {
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
50
|
-
const
|
|
51
|
-
return
|
|
59
|
+
const s = n[0], a = C(e, s);
|
|
60
|
+
if (a === null) {
|
|
61
|
+
const o = await e.getPageIndex(s);
|
|
62
|
+
return S(e, s, o), await E(e, n);
|
|
52
63
|
} else
|
|
53
|
-
return
|
|
64
|
+
return T(a, n);
|
|
54
65
|
} else
|
|
55
|
-
return
|
|
66
|
+
return T(n[0], n);
|
|
56
67
|
}
|
|
57
|
-
const H = (e) => {
|
|
58
|
-
const n = e.target.parentNode;
|
|
59
|
-
if (!n)
|
|
60
|
-
return;
|
|
61
|
-
const a = new MutationObserver((s) => {
|
|
62
|
-
s.forEach(() => {
|
|
63
|
-
n.querySelectorAll(
|
|
64
|
-
'[data-l10n-id="pdfjs-annotation-date-time-string"]'
|
|
65
|
-
).forEach((o) => {
|
|
66
|
-
const c = o.getAttribute("data-l10n-args");
|
|
67
|
-
if (c) {
|
|
68
|
-
try {
|
|
69
|
-
const { dateObj: i } = JSON.parse(c);
|
|
70
|
-
i && (o.textContent = I(i));
|
|
71
|
-
} catch {
|
|
72
|
-
}
|
|
73
|
-
a.disconnect();
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
return a.observe(n, {
|
|
79
|
-
childList: !0,
|
|
80
|
-
// Watch for changes to child elements
|
|
81
|
-
subtree: !0,
|
|
82
|
-
// Watch all descendants, not just direct children
|
|
83
|
-
attributes: !0
|
|
84
|
-
// Watch for changes to attributes
|
|
85
|
-
}), () => a.disconnect();
|
|
86
|
-
}, M = (e, t, n, a) => {
|
|
87
|
-
if (e.type !== "click")
|
|
88
|
-
return;
|
|
89
|
-
const s = e.target, r = s.getAttribute("data-element-id"), o = s.getAttribute("href");
|
|
90
|
-
if (o && o !== "#")
|
|
91
|
-
return;
|
|
92
|
-
const c = t.find((i) => i.id === r);
|
|
93
|
-
!c || c.annotationType !== _.Link || c.dest && b(n, c.dest).then((i) => {
|
|
94
|
-
a(i);
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
68
|
function P(e, t) {
|
|
98
69
|
for (const n of v)
|
|
99
70
|
e.addEventListener(n, t);
|
|
100
71
|
}
|
|
101
|
-
function
|
|
72
|
+
function $(e, t) {
|
|
102
73
|
for (const n of v)
|
|
103
74
|
e.removeEventListener(n, t);
|
|
104
75
|
}
|
|
105
|
-
function
|
|
106
|
-
const { id: t, url: n, unsafeUrl:
|
|
107
|
-
new MutationObserver((
|
|
76
|
+
function D(e) {
|
|
77
|
+
const { id: t, url: n, unsafeUrl: s } = e;
|
|
78
|
+
new MutationObserver((o, i) => {
|
|
108
79
|
const c = document.querySelector(`[data-annotation-id="${t}"]`);
|
|
109
80
|
if (c) {
|
|
110
|
-
const
|
|
111
|
-
|
|
81
|
+
const r = c.querySelector("a"), p = I((n || s) ?? "", "");
|
|
82
|
+
r && (r == null || r.setAttribute("target", "_blank"), r == null || r.setAttribute("href", p), r == null || r.setAttribute("rel", "noopener noreferrer")), i.disconnect();
|
|
112
83
|
}
|
|
113
84
|
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
114
85
|
}
|
|
115
|
-
function
|
|
116
|
-
const { rotation:
|
|
86
|
+
function U(e, t, n) {
|
|
87
|
+
const { rotation: s, scale: a } = t, o = s % 180 === 0;
|
|
117
88
|
if (e.fieldType === "Btn" && e.pushButton) {
|
|
118
|
-
const
|
|
119
|
-
|
|
89
|
+
const i = e.rect[2] - e.rect[0], c = e.rect[3] - e.rect[1], r = document.createElement("canvas");
|
|
90
|
+
r.setAttribute("width", ((o ? i : c) * a).toString()), r.setAttribute("height", ((o ? c : i) * a).toString()), n.set(e.id, r);
|
|
120
91
|
}
|
|
121
92
|
}
|
|
122
|
-
function
|
|
123
|
-
var
|
|
93
|
+
function V(e) {
|
|
94
|
+
var o;
|
|
124
95
|
let t = e;
|
|
125
96
|
for (; t.tagName !== "SECTION"; )
|
|
126
97
|
t = t.parentElement;
|
|
127
|
-
const n = t.getAttribute("aria-haspopup") === "dialog",
|
|
128
|
-
if (!n && !
|
|
98
|
+
const n = t.getAttribute("aria-haspopup") === "dialog", s = t.classList.contains("popupAnnotation");
|
|
99
|
+
if (!n && !s)
|
|
129
100
|
return;
|
|
130
|
-
let
|
|
131
|
-
if (
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
|
|
101
|
+
let a = t.id || t.getAttribute("aria-controls");
|
|
102
|
+
if (a || (a = (o = t.firstChild) == null ? void 0 : o.id), a && t.parentElement) {
|
|
103
|
+
const i = t.parentElement.querySelector(`[aria-controls="${a}"]`);
|
|
104
|
+
i && new MutationObserver((r, p) => {
|
|
105
|
+
const b = document.querySelectorAll(".popupDate");
|
|
106
|
+
b.length > 0 && (b.forEach((m) => {
|
|
136
107
|
if (m.innerHTML)
|
|
137
108
|
return !1;
|
|
138
109
|
const N = m.getAttribute("data-l10n-args");
|
|
139
110
|
if (N) {
|
|
140
|
-
const { date:
|
|
141
|
-
|
|
111
|
+
const { date: h, time: O, dateObj: A } = JSON.parse(N);
|
|
112
|
+
if (h && O)
|
|
113
|
+
m.textContent = `${h}, ${O}`;
|
|
114
|
+
else if (A) {
|
|
115
|
+
const _ = new Date(A);
|
|
116
|
+
m.textContent = _.toLocaleString();
|
|
117
|
+
}
|
|
142
118
|
}
|
|
143
119
|
}), p.disconnect());
|
|
144
|
-
}).observe(
|
|
120
|
+
}).observe(i, { childList: !0, subtree: !0 });
|
|
145
121
|
}
|
|
146
122
|
}
|
|
147
123
|
function d(e, t, n) {
|
|
148
|
-
const
|
|
124
|
+
const s = [];
|
|
149
125
|
if (n)
|
|
150
|
-
for (const
|
|
151
|
-
|
|
152
|
-
return
|
|
126
|
+
for (const a of n)
|
|
127
|
+
a[e] === t && s.push(a);
|
|
128
|
+
return s;
|
|
153
129
|
}
|
|
154
130
|
function u(e, t) {
|
|
155
131
|
return { type: e, data: t };
|
|
156
132
|
}
|
|
157
|
-
async function
|
|
133
|
+
async function k(e, t) {
|
|
158
134
|
if (e.dest)
|
|
159
135
|
if (typeof e.dest == "string") {
|
|
160
|
-
const n = await
|
|
136
|
+
const n = await E(t, e.dest);
|
|
161
137
|
return u(l.INTERNAL_LINK, {
|
|
162
138
|
referencedPage: n.pageIndex,
|
|
163
139
|
offset: null
|
|
@@ -178,13 +154,13 @@ async function S(e, t) {
|
|
|
178
154
|
unsafeUrl: e.unsafeUrl
|
|
179
155
|
});
|
|
180
156
|
}
|
|
181
|
-
function
|
|
157
|
+
function y(e) {
|
|
182
158
|
for (const t of e.getElementsByTagName("span")) {
|
|
183
159
|
let n = t.textContent;
|
|
184
|
-
const
|
|
160
|
+
const s = JSON.parse(t.dataset.l10nArgs ?? "{}");
|
|
185
161
|
if (n)
|
|
186
|
-
for (const
|
|
187
|
-
n = n.replace(`{{${
|
|
162
|
+
for (const a in s)
|
|
163
|
+
n = n.replace(`{{${a}}}`, s[a]);
|
|
188
164
|
t.textContent = n;
|
|
189
165
|
}
|
|
190
166
|
}
|
|
@@ -202,20 +178,20 @@ function f(e, t) {
|
|
|
202
178
|
case "select-one":
|
|
203
179
|
case "select-multiple":
|
|
204
180
|
const n = [];
|
|
205
|
-
for (const
|
|
181
|
+
for (const a of e.options)
|
|
206
182
|
n.push({
|
|
207
|
-
value:
|
|
208
|
-
label:
|
|
183
|
+
value: a.value,
|
|
184
|
+
label: a.label
|
|
209
185
|
});
|
|
210
|
-
const
|
|
211
|
-
for (const
|
|
212
|
-
|
|
213
|
-
value:
|
|
214
|
-
label:
|
|
186
|
+
const s = [];
|
|
187
|
+
for (const a of e.selectedOptions)
|
|
188
|
+
s.push({
|
|
189
|
+
value: a.value,
|
|
190
|
+
label: a.label
|
|
215
191
|
});
|
|
216
192
|
return u(l.FORM_SELECT, {
|
|
217
193
|
fieldName: e.name,
|
|
218
|
-
value:
|
|
194
|
+
value: s,
|
|
219
195
|
options: n
|
|
220
196
|
});
|
|
221
197
|
case "checkbox":
|
|
@@ -235,72 +211,72 @@ function f(e, t) {
|
|
|
235
211
|
});
|
|
236
212
|
}
|
|
237
213
|
}
|
|
238
|
-
async function
|
|
239
|
-
var
|
|
240
|
-
let
|
|
241
|
-
if (
|
|
242
|
-
if (
|
|
243
|
-
const
|
|
244
|
-
if (
|
|
245
|
-
const
|
|
246
|
-
if (
|
|
247
|
-
return await
|
|
214
|
+
async function j(e, t, n) {
|
|
215
|
+
var a;
|
|
216
|
+
let s = e.target.parentNode;
|
|
217
|
+
if (s.tagName === "DIV" && (s = s.firstChild), typeof s.className != "object")
|
|
218
|
+
if (s.className === "linkAnnotation" && e.type === "click") {
|
|
219
|
+
const o = (a = s.dataset) == null ? void 0 : a.annotationId;
|
|
220
|
+
if (o) {
|
|
221
|
+
const i = d("id", o, n);
|
|
222
|
+
if (i.length)
|
|
223
|
+
return await k(i[0], t);
|
|
248
224
|
}
|
|
249
225
|
} else if (
|
|
250
226
|
/* annotation.className.includes('popupAnnotation') || */
|
|
251
|
-
|
|
227
|
+
s.className.includes("textAnnotation")
|
|
252
228
|
)
|
|
253
|
-
|
|
254
|
-
else if (
|
|
255
|
-
|
|
256
|
-
const
|
|
257
|
-
if (
|
|
258
|
-
return w(d("id",
|
|
259
|
-
} else if (
|
|
260
|
-
let
|
|
261
|
-
return
|
|
229
|
+
y(s);
|
|
230
|
+
else if (s.className.includes("fileAttachmentAnnotation")) {
|
|
231
|
+
y(s);
|
|
232
|
+
const o = s.dataset.annotationId;
|
|
233
|
+
if (o && e.type === "dblclick")
|
|
234
|
+
return w(d("id", o, n)[0]);
|
|
235
|
+
} else if (s.className.includes("textWidgetAnnotation") && e.type === "input") {
|
|
236
|
+
let o = s.getElementsByTagName("input")[0];
|
|
237
|
+
return o || (o = s.getElementsByTagName("textarea")[0]), f(o);
|
|
262
238
|
} else {
|
|
263
|
-
if (
|
|
264
|
-
return f(
|
|
265
|
-
if (
|
|
266
|
-
return f(
|
|
267
|
-
if (
|
|
268
|
-
const
|
|
269
|
-
if (
|
|
270
|
-
const
|
|
271
|
-
for (const
|
|
239
|
+
if (s.className.includes("choiceWidgetAnnotation") && e.type === "input")
|
|
240
|
+
return f(s.getElementsByTagName("select")[0]);
|
|
241
|
+
if (s.className.includes("buttonWidgetAnnotation checkBox") && e.type === "change")
|
|
242
|
+
return f(s.getElementsByTagName("input")[0]);
|
|
243
|
+
if (s.className.includes("buttonWidgetAnnotation radioButton") && e.type === "change") {
|
|
244
|
+
const o = s.dataset.annotationId;
|
|
245
|
+
if (o) {
|
|
246
|
+
const i = d("id", o, n)[0], c = [];
|
|
247
|
+
for (const r of d(
|
|
272
248
|
"fieldName",
|
|
273
|
-
|
|
249
|
+
i.fieldName,
|
|
274
250
|
n
|
|
275
251
|
))
|
|
276
|
-
|
|
277
|
-
return f(
|
|
278
|
-
value:
|
|
279
|
-
defaultValue:
|
|
252
|
+
r.buttonValue && c.push(r.buttonValue);
|
|
253
|
+
return f(s.getElementsByTagName("input")[0], {
|
|
254
|
+
value: i.buttonValue,
|
|
255
|
+
defaultValue: i.fieldValue,
|
|
280
256
|
options: c
|
|
281
257
|
});
|
|
282
258
|
}
|
|
283
|
-
} else if (
|
|
284
|
-
const
|
|
285
|
-
if (
|
|
286
|
-
const
|
|
287
|
-
return c && ["Print", "SaveAs"].includes(c) ? { type: l.BUTTON, data:
|
|
288
|
-
{ name:
|
|
289
|
-
{ actions:
|
|
259
|
+
} else if (s.className.includes("buttonWidgetAnnotation pushButton") && e.type === "click") {
|
|
260
|
+
const o = s.dataset.annotationId;
|
|
261
|
+
if (o) {
|
|
262
|
+
const i = d("id", o, n)[0], { action: c } = i;
|
|
263
|
+
return c && ["Print", "SaveAs"].includes(c) ? { type: l.BUTTON, data: i } : i.resetForm ? f(
|
|
264
|
+
{ name: i.fieldName, type: "button" },
|
|
265
|
+
{ actions: i.actions, reset: !0 }
|
|
290
266
|
) : f(
|
|
291
|
-
{ name:
|
|
292
|
-
{ actions:
|
|
267
|
+
{ name: i.fieldName, type: "button" },
|
|
268
|
+
{ actions: i.actions, reset: !1 }
|
|
293
269
|
);
|
|
294
270
|
}
|
|
295
271
|
}
|
|
296
272
|
}
|
|
297
273
|
}
|
|
298
274
|
export {
|
|
299
|
-
|
|
300
|
-
H as annotationsEvents,
|
|
275
|
+
j as annotationEventsHandler,
|
|
301
276
|
P as bindLayerEvents,
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
277
|
+
D as handleAnnotationLink,
|
|
278
|
+
U as handleAnnotationWidget,
|
|
279
|
+
V as handleAriaHasPopup,
|
|
280
|
+
M as insertDateText,
|
|
281
|
+
$ as unbindLayerEvents
|
|
306
282
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function u(t) {
|
|
2
|
+
if (Math.floor(t) === t)
|
|
3
|
+
return [t, 1];
|
|
4
|
+
const e = 1 / t, s = 8;
|
|
5
|
+
if (e > s)
|
|
6
|
+
return [1, s];
|
|
7
|
+
if (Math.floor(e) === e)
|
|
8
|
+
return [1, e];
|
|
9
|
+
const r = t > 1 ? e : t;
|
|
10
|
+
let i = 0, n = 1, o = 1, l = 1;
|
|
11
|
+
for (; ; ) {
|
|
12
|
+
const c = i + o, f = n + l;
|
|
13
|
+
if (f > s)
|
|
14
|
+
break;
|
|
15
|
+
r <= c / f ? (o = c, l = f) : (i = c, n = f);
|
|
16
|
+
}
|
|
17
|
+
let a;
|
|
18
|
+
return r - i / n < o / l - r ? a = r === t ? [i, n] : [n, i] : a = r === t ? [o, l] : [l, o], a;
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
u as approximateFraction
|
|
22
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
function g(e, o) {
|
|
2
|
+
!e || typeof e != "object" || Object.entries(e).forEach(([d, i]) => {
|
|
3
|
+
if (i == null)
|
|
4
|
+
return;
|
|
5
|
+
const s = d.replace(/([A-Z])/g, "-$1").toLowerCase(), n = [
|
|
6
|
+
"width",
|
|
7
|
+
"height",
|
|
8
|
+
"top",
|
|
9
|
+
"right",
|
|
10
|
+
"bottom",
|
|
11
|
+
"left",
|
|
12
|
+
"margin",
|
|
13
|
+
"margin-top",
|
|
14
|
+
"margin-right",
|
|
15
|
+
"margin-bottom",
|
|
16
|
+
"margin-left",
|
|
17
|
+
"padding",
|
|
18
|
+
"padding-top",
|
|
19
|
+
"padding-right",
|
|
20
|
+
"padding-bottom",
|
|
21
|
+
"padding-left",
|
|
22
|
+
"border-width",
|
|
23
|
+
"border-top-width",
|
|
24
|
+
"border-right-width",
|
|
25
|
+
"border-bottom-width",
|
|
26
|
+
"border-left-width",
|
|
27
|
+
"font-size",
|
|
28
|
+
"line-height",
|
|
29
|
+
"letter-spacing",
|
|
30
|
+
"word-spacing",
|
|
31
|
+
"min-width",
|
|
32
|
+
"min-height",
|
|
33
|
+
"max-width",
|
|
34
|
+
"max-height",
|
|
35
|
+
"flex-basis",
|
|
36
|
+
"grid-gap",
|
|
37
|
+
"grid-row-gap",
|
|
38
|
+
"grid-column-gap"
|
|
39
|
+
];
|
|
40
|
+
let t;
|
|
41
|
+
typeof i == "number" && i !== 0 ? t = n.includes(s) ? `${i}px` : String(i) : t = String(i), o.style.setProperty(s, t);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const f = (e, o, d, i, s) => {
|
|
45
|
+
let n = "center";
|
|
46
|
+
switch (i) {
|
|
47
|
+
case 90:
|
|
48
|
+
n = `${e.width / 2}px ${e.width / 2}px`;
|
|
49
|
+
break;
|
|
50
|
+
case -90:
|
|
51
|
+
case 270:
|
|
52
|
+
n = `${e.height / 2}px ${e.height / 2}px`;
|
|
53
|
+
break;
|
|
54
|
+
default:
|
|
55
|
+
n = "center";
|
|
56
|
+
}
|
|
57
|
+
const t = document.createElement("div");
|
|
58
|
+
t.id = "parent-element", t.style.width = `${e.width}px`, t.style.height = `${e.height}px`, t.style.setProperty("--scale-factor", s.toString()), t.style.setProperty("--rotation", i.toString()), t.style.setProperty("--transform-origin", n), t.style.left = "-99999px", t.style.visibility = "hidden", t.style.position = "absolute";
|
|
59
|
+
const l = document.createElement("div");
|
|
60
|
+
l.style.position = "relative", l.style.width = "100%", l.style.height = "100%", t.appendChild(l);
|
|
61
|
+
let r;
|
|
62
|
+
if (d instanceof HTMLElement)
|
|
63
|
+
r = d.cloneNode(!0), l.appendChild(r);
|
|
64
|
+
else {
|
|
65
|
+
const p = d.props;
|
|
66
|
+
r = document.createElement("div"), p.style && g(p.style, r), p.className && (r.className = p.className), l.appendChild(r);
|
|
67
|
+
}
|
|
68
|
+
o.appendChild(t);
|
|
69
|
+
const c = t.getBoundingClientRect(), h = r.getBoundingClientRect();
|
|
70
|
+
o.removeChild(t);
|
|
71
|
+
const a = {
|
|
72
|
+
top: o.clientHeight / 2,
|
|
73
|
+
left: o.clientWidth / 2
|
|
74
|
+
};
|
|
75
|
+
return {
|
|
76
|
+
left: h.left - c.left - a.left,
|
|
77
|
+
top: h.top - c.top - a.top,
|
|
78
|
+
width: h.width,
|
|
79
|
+
height: h.height
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export {
|
|
83
|
+
f as getElementPagePosition
|
|
84
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const a = (i, h, l, o, n) => {
|
|
2
|
-
const c = l.height * o, s = l.width * o, y = l.
|
|
2
|
+
const c = l.height * o, s = l.width * o, y = l.bottom * o, m = l.left * o, d = {
|
|
3
3
|
width: n % 180 === 90 ? i.height : i.width,
|
|
4
4
|
height: n % 180 === 90 ? i.width : i.height
|
|
5
5
|
}, r = {
|
|
@@ -8,16 +8,16 @@ const a = (i, h, l, o, n) => {
|
|
|
8
8
|
}, t = document.createElement("div");
|
|
9
9
|
t.style.width = `${d.width}px`, t.style.height = `${d.height}px`, t.style.position = "absolute", t.style.transform = `rotate(${n}deg)`, t.style.transformOrigin = "center center", t.style.visibility = "hidden", t.style.left = "-99999px";
|
|
10
10
|
const e = document.createElement("div");
|
|
11
|
-
e.style.position = "absolute", e.style.width = `${s}px`, e.style.height = `${c}px`, e.style.position = "absolute", e.style.bottom = `${y}px`, e.style.left = `${
|
|
12
|
-
const
|
|
11
|
+
e.style.position = "absolute", e.style.width = `${s}px`, e.style.height = `${c}px`, e.style.position = "absolute", e.style.bottom = `${y}px`, e.style.left = `${m}px`, t.appendChild(e), h.appendChild(t);
|
|
12
|
+
const g = t.getBoundingClientRect(), p = e.getBoundingClientRect();
|
|
13
13
|
h.removeChild(t);
|
|
14
14
|
const u = {
|
|
15
15
|
top: h.clientHeight / 2,
|
|
16
16
|
left: h.clientWidth / 2
|
|
17
17
|
};
|
|
18
18
|
return {
|
|
19
|
-
leftInPage:
|
|
20
|
-
topInPage:
|
|
19
|
+
leftInPage: p.left - g.left - u.left + r.width / 2,
|
|
20
|
+
topInPage: p.top - g.top - u.top + r.height / 2
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { SCROLL_BAR_WIDTH as
|
|
2
|
-
import { ViewMode as
|
|
3
|
-
|
|
1
|
+
import { SCROLL_BAR_WIDTH as n, PAGE_PADDING as f } from "./constants.js";
|
|
2
|
+
import { ViewMode as i, ZoomLevel as r } from "./types.js";
|
|
3
|
+
import "../th_TH-d627cd51.js";
|
|
4
|
+
const D = (o, t, a, e, A, c) => {
|
|
4
5
|
if (typeof o == "number")
|
|
5
6
|
return o;
|
|
6
|
-
const
|
|
7
|
+
const m = c === i.DUAL_PAGE ? 2 * e : e;
|
|
7
8
|
switch (o) {
|
|
8
9
|
case r.PAGE_FIT:
|
|
9
10
|
const s = Math.min(
|
|
10
|
-
(t -
|
|
11
|
-
(
|
|
11
|
+
(t - n) / m,
|
|
12
|
+
(a - f) / A
|
|
12
13
|
);
|
|
13
14
|
return Math.floor(s * 100);
|
|
14
15
|
case r.PAGE_WIDTH:
|
|
15
|
-
return Math.floor((t -
|
|
16
|
+
return Math.floor((t - n) / m * 100);
|
|
16
17
|
case r.ACTUAL:
|
|
17
18
|
default:
|
|
18
19
|
return 100;
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
22
|
export {
|
|
22
|
-
|
|
23
|
+
D as getZoomLevel
|
|
23
24
|
};
|